DirectAnimation Animated Header --PickableImage Class DirectAnimation Animated Header --PickableImage Class* Microsoft DirectAnimation SDK
*Index  *Topic Contents
*Previous Topic: PickableGeometry Class
*Next Topic: Point2Bvr Class

PickableImage Class


public class PickableImage extends java.lang.Object {
    // Constructor
    public PickableImage(ImageBvr im);

    // Methods
    public ImageBvr getImageBvr();
    public DXMEvent getPickEvent();
}

Creates an object representing a pickable image behavior. The behavior is identical to an image behavior except that an event occurs whenever the mouse pointer is "in" the image.

Applets typically use the event returned by the getPickEvent method to set an event handler or to create a reactive behavior with the until or untilNotify method.

When the pick event occurs, the event data is a DXMEvent object. The first element is a Point2Bvr object representing the intersection point, and the second element is a Vector2Bvr object that is perpendicular to the surface.


PickableImage Constructor

PickableImage Class

Creates a pickable ImageBvr object that, depending on the value of bool, either is or is not pickable when there are other images between it and the mouse.

public PickableImage(
  ImageBvr im,
  bool
  );

Parameters
im
A new instance of the ImageBvr that is pickable.
bool
Determines whether the image is pickable where occluded. (This means that the pickable image will still get the pick event even if the mouse is on an occluding image.) The default is false, which means the image is not pickable where occluded. It isn't necessary to include the false value in the arguments. If true, the image is pickable where occluded. The true value must be included in the argument list.


PickableImage Methods

bullet1.gifgetImageBvr

bullet1.gifgetPickEvent


getImageBvr

PickableImage Class

Returns the ImageBvr object.

public ImageBvr getImageBvr( );

Return Values

Returns the ImageBvr object.


getPickEvent

PickableImage Class

Creates an event for the pickable image behavior.

public DXMEvent getPickEvent( );

Return Values

Returns a DXMEvent object. Its data is a PairObject. The first member is the intersection point that is in the plane perpendicular to the viewing direction and is under the mouse. The second member is a time-varying vector that gives the model-coordinate offset to the intersection point. Each sample taken while the mouse is over the object returns a new point and a new time-varying vector. Each time-varying vector tracks the mouse, relative to the associated intersection point.

Remarks

Use this event to set an event handler or create a reactive behavior with the until or untilNotify method.

© 1998 Microsoft Corporation. All rights reserved. Terms of Use.

*Top of Page