DirectX Media for Animation Java Reference Previous
Previous
Classes
Classes
Index
Index
Next
Next

PickableImageBvr Class

Constructor , Methods

public class PickableImageBvr extends ImageBvr {
    // Constructor
    public PickableImageBvr(ImageBvr im);

    // Methods
    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.


Constructor


PickableImageBvr

public PickableImageBvr(ImageBvr im);

Creates a pickable image behavior.

ParameterDescription
im A new instance of the ImageBvr that is pickable.


Methods


getPickEvent

public DXMEvent  getPickEvent();

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

Return Value:

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. .



Top© 1997 Microsoft Corporation. All rights reserved. Legal Notices.