Vector3Bvr Class

Creates an object that represents a three-dimensional vector behavior. At any given time, the value of the behavior is a direction and length (magnitude), specified as a triplet of coordinate values given as either Cartesian coordinates (x, y, z) or spherical coordinates (XYangle, YZangle, length). The direction of the vector is parallel to the ray that starts at the origin and passes through the point specified by the vector's coordinates, and the length is the distance between the origin and the point.

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

For relevant methods and fields from the Statics class, see the following topics.

Vector3Bvr Methods

div Creates a new three-dimensional vector behavior that points in the same direction as the original vector but has a length that has been divided by scalar.
getSphericalCoordLength Retrieves the NumberBvr object that is the distance of the vector from the origin.
getSphericalCoordXYAngle Retrieves the NumberBvr object that is the counter-clockwise angle, in radians, of the vector about the y-axis, starting at positive z.
getSphericalCoordYZAngle Retrieves the NumberBvr object that is the YZ angle, in radians, going up from the XZ-plane toward the positive y-ray.
getX Creates a number behavior that represents the x-coordinate of this vector behavior.
getY Creates a number behavior that represents the y-coordinate of this vector behavior.
getZ Creates a number behavior that represents the z-coordinate of this vector behavior.
length Creates a number behavior that represents the length of a vector behavior.
lengthSquared Creates a number behavior that represents the length of a vector behavior squared.
mul Creates a new three-dimensional vector behavior that points in the same direction as the original vector but has a length that has been multiplied by scalar.
normalize Creates a normalized, three-dimensional vector behavior.
transform Creates a new three-dimensional vector behavior that is the result of applying the given transformation to the original vector.
newUninitBvr Enables you to refer to a Vector3Bvr behavior before that behavior has been defined.

div

Vector3Bvr Class

Creates a new three-dimensional vector behavior that points in the same direction as the original vector but has a length that has been divided by scalar.

Syntax

public Vector3Bvr div( NumberBvr scalar );

Parameters

scalar
NumberBvr object. This parameter can also be of type double.

Return Value

Returns the Vector3Bvr object.

See Also

mul

getSphericalCoordLength

Vector3Bvr Class

Retrieves the NumberBvr object that is the distance of the vector from the origin.

Syntax

public NumberBvr getSphericalCoordLength( );

Return Value

Returns the NumberBvr object.

See Also

getSphericalCoordXYAngle, getSphericalCoordYZAngle, vector3Spherical

getSphericalCoordXYAngle

Vector3Bvr Class

Retrieves the NumberBvr object that is the counter-clockwise angle, in radians, of the vector about the y-axis, starting at positive z. The range is [-Pi, +Pi].

Syntax

public NumberBvr getSphericalCoordXYAngle( );

Return Value

Returns the NumberBvr object.

See Also

getSphericalCoordYZ, getSphericalCoordLength, vector3Spherical

getSphericalCoordYZAngle

Vector3Bvr Class

Retrieves the NumberBvr object that is the YZ angle, in radians, going up from the XZ-plane towards the positive y-ray. The range is [-Pi/2, +Pi/2].

Syntax

public NumberBvr getSphericalCoordYZAngle( );

Return Value

Returns the NumberBvr object.

See Also

getSphericalCoordXYAngle, getSphericalCoordLength, vector3Spherical

getX

Vector3Bvr Class

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

Syntax

public NumberBvr getX( );

Return Value

Returns the NumberBvr object.

See Also

getY, getZ, vector3

getY

Vector3Bvr Class

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

Syntax

public NumberBvr getY( );

Return Value

Returns the NumberBvr object.

See Also

getX, getZ, vector3

getZ

Vector3Bvr Class

Creates a number behavior that represents the z-coordinate of this vector behavior.

Syntax

public NumberBvr getZ( );

Return Value

Returns the NumberBvr object.

See Also

getX, getY, vector3

length

Vector3Bvr Class

Creates a number behavior that represents the length of a vector behavior.

Syntax

public NumberBvr length( );

Return Value

Returns the NumberBvr object.

See Also

lengthSquared

lengthSquared

Vector3Bvr Class

Creates a number behavior that represents the length of a vector behavior squared.

Syntax

public NumberBvr lengthSquared( );

Return Value

Returns the NumberBvr object.

See Also

length

mul

Vector3Bvr Class

Creates a new three-dimensional vector behavior that points in the same direction as the original vector but has a length that has been multiplied by scalar.

Syntax

public Vector3Bvr mul( NumberBvr scalar );

Parameters

scalar
NumberBvr object. This parameter can also be of type double.

Return Value

Returns the Vector3Bvr object.

See Also

div

normalize

Vector3Bvr Class

Creates a normalized, three-dimensional vector behavior. The normalized vector has the same direction as the original vector, but the length is 1.

Syntax

public Vector3Bvr normalize( );

Return Value

Returns the Vector3Bvr object.

transform

Vector3Bvr Class

Creates a new three-dimensional vector behavior that is the result of applying the given transformation to the original vector. The translation elements of the transformation are ignored; translation does not apply to vectors.

Syntax

public Vector3Bvr transform( Transform3Bvr xf );

Parameters

xf
Transform3Bvr object.

Return Value

Returns the Vector3Bvr object.

Remarks

This attribute composes values.

newUninitBvr

Vector3Bvr Class

Enables you to refer to a Vector3Bvr 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 Vector3Bvr newUninitBvr( );

Return Value

Returns the Vector3Bvr object.


Top of Page Top of Page
© 2000 Microsoft and/or its suppliers. All rights reserved. Terms of Use.