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

Point2Bvr Class


public class Point2Bvr extends Behavior {
        
    // Methods
    public NumberBvr  getPolarCoordLength();
    public NumberBvr  getPolarCoordAngle();
    public NumberBvr  getX();
    public NumberBvr  getY();
    public Point2Bvr  transform(Transform2Bvr xf);
        
    public static Point2Bvr  newUninitBvr();
}

Creates an object that represents a two-dimensional point behavior. At any given time, the value of the behavior is a point, representing a location in a plane or on the screen. Each point has a pair of coordinate values that define the point's location relative to a fixed point called the origin. These coordinate values are given as either Cartesian coordinates (x,y) or polar coordinates (XY angle,length) when the point behavior is created.

Because coordinate values are number behaviors (NumberBvr objects), the location of a point behavior may change over time as the number behaviors change. For more information about behaviors, see the Behavior class and the Point3Bvr class.

Point2Bvr Methods

bullet1.gifgetPolarCoordAngle

bullet1.gifgetPolarCoordLength()

bullet1.gifgetX

bullet1.gifgetY

bullet1.giftransform

bullet1.gifnewUninitBvr


getPolarCoordAngle

Point2Bvr Class

Creates a number behavior that represents the counter-clockwise angular displacement, in radians, relative to the positive x-axis, of the point behavior. The range is [-Pi, +Pi].

public NumberBvr getPolarCoordAngle( );

Return Values

Returns the NumberBvr object.

See Also

getPolarCoordLength, point2Polar


getPolarCoordLength()

Point2Bvr Class

Creates a number behavior that represents the length (or magnitude) of the vector.

public NumberBvr getPolarCoordLength( );

Return Values

Returns the NumberBvr object.

See Also

getPolarCoordAngle, point2Polar


getX

Point2Bvr Class

Creates a number behavior that represents the x coordinate of this point behavior.

public NumberBvr getX( );

Return Values

Returns the NumberBvr object.

See Also

getY, point2


getY

Point2Bvr Class

Creates a number behavior that represents the y coordinate of this point behavior.

public NumberBvr getY( );

Return Values

Returns the NumberBvr object.

See Also

getX, point2


transform

Point2Bvr Class

Creates a new two-dimensional point behavior that is the result of applying the given transformation to the original point behavior.

public Point2Bvr transform(
  Transform2Bvr xf
  );

Parameters
xf
The Transform2Bvr object.
Return Values

Returns the Point2Bvr object.

Remarks

This attribute composes values.


newUninitBvr

Point2Bvr Class

This method allows you to refer to an Point2Bvr behavior before that behavior has been defined. With this method you can create the behavior and use it in the definition of other behaviors, but not actually define its contents until some later point. (This is accomplished with the init method, which is available on all behaviors.) The system generates a run-time error if you initialize a non-uninitialized behavior, initialize an uninitialized behavior that has already been initialized, or run an initialized behavior that has not yet been initialized.

public static Point2Bvr newUninitBvr( );

Return Values

Returns the Point2Bvr object.

Relevant Methods from the Statics Class

The following methods are defined in the Statics class and are most relevant to objects of type Point2Bvr.

public static Point2Bvr add(Point2Bvr pt, Vector2Bvr vec);

public static Point2Bvr bSpline(int degree, NumberBvr[] knots, Point2Bvr[] control_elements, NumberBvr[] weights, NumberBvr evaluation);

public static Vector2Bvr derivative(Point2Bvr pt);

public static NumberBvr distance(Point2Bvr p1, Point2Bvr p2);

public static NumberBvr distanceSquared(Point2Bvr p1, Point2Bvr p2);

public static Point2Bvr point2(NumberBvr x, NumberBvr y);

public static Point2Bvr point2Polar(NumberBvr XYangle, NumberBvr length);

public static Vector2Bvr sub(Point2Bvr p1, Point2Bvr p2);

public static Point2Bvr sub(Point2Bvr pt, Vector2Bvr vec);

Relevant Fields from the Statics Class

The following fields are defined in the Statics class and are most relevant to objects of type Point2Bvr.

public final static Point2Bvr mousePosition;

public final static Point2Bvr origin2;

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

*Top of Page