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.
For relevant methods and fields from the Statics class, see the following topics.
Point2Bvr Methods
getPolarCoordAngle Creates a number behavior that represents the counter-clockwise angular displacement, in radians, relative to the positive x-axis, of the point behavior. getPolarCoordLength Creates a number behavior that represents the length (or magnitude) of the vector. getX Creates a number behavior that represents the x-coordinate of this point behavior. getY Creates a number behavior that represents the y-coordinate of this point behavior. transform Creates a new two-dimensional point behavior that is the result of applying the given transformation to the original point behavior. newUninitBvr Enables you to refer to a Point2Bvr behavior before that behavior has been defined.
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].
Syntax
public NumberBvr getPolarCoordAngle( );
Return Value
Returns the NumberBvr object.
See Also
Creates a number behavior that represents the length (or magnitude) of the vector.
Syntax
public NumberBvr getPolarCoordLength( );
Return Value
Returns the NumberBvr object.
See Also
Creates a number behavior that represents the x-coordinate of this point behavior.
Syntax
public NumberBvr getX( );
Return Value
Returns the NumberBvr object.
See Also
Creates a number behavior that represents the y-coordinate of this point behavior.
Syntax
public NumberBvr getY( );
Return Value
Returns the NumberBvr object.
See Also
Creates a new two-dimensional point behavior that is the result of applying the given transformation to the original point behavior.
Syntax
public Point2Bvr transform( Transform2Bvr xf );
Parameters
- xf
- Transform2Bvr object.
Return Value
Returns the Point2Bvr object.
Remarks
This attribute composes values.
Enables you to refer to a 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.
Syntax
public static Point2Bvr newUninitBvr( );
Return Value
Returns the Point2Bvr object.
Top of Page
© 2000 Microsoft and/or its suppliers. All rights reserved. Terms of Use.