DirectAnimation Animated Header --Vector3Bvr Class DirectAnimation Animated Header --Vector3Bvr Class* Microsoft DirectAnimation SDK
*Index  *Topic Contents
*Previous Topic: Vector2Bvr Class
*Next Topic: Viewer Interface

Vector3Bvr Class


public class Vector3Bvr extends Behavior {
    // Methods

    public Vector3Bvr div(NumberBvr scalar);
    public NumberBvr  getSphericalCoordLength();
    public NumberBvr  getSphericalCoordXYAngle();
    public NumberBvr  getSphericalCoordYZAngle();
    public NumberBvr  getPolarCoordAngle();
    public NumberBvr  getX();
    public NumberBvr  getY();
    public NumberBvr  getZ();
    public NumberBvr  length();
    public NumberBvr  lengthSquared();
    public Vector3Bvr mul(NumberBvr scalar);
    public Vector3Bvr normalize();
    public Vector3Bvr transform(Transform3Bvr xf);

    public static Vector3Bvr newUninitBvr();

}

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, lenght). 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.

Vector3Bvr Methods

bullet1.gifdiv

bullet1.gifgetSphericalCoordLength

bullet1.gifgetSphericalCoordXYAngle

bullet1.gifgetSphericalCoordYZAngle

bullet1.gifgetX

bullet1.gifgetY

bullet1.gifgetZ

bullet1.giflength

bullet1.giflengthSquared

bullet1.gifmul

bullet1.gifnormalize

bullet1.giftransform

bullet1.gifnewUninitBvr


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.

public Vector3Bvr div(
  NumberBvr scalar
  );

Parameters
scalar
A NumberBvr object. This parameter can also be of type double.
Return Values

Returns the Vector3Bvr object.

See Also

mul


getSphericalCoordLength

Vector3Bvr Class

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

public NumberBvr getSphericalCoordLength( );

Return Values

Returns the NumberBvr object.

See Also

getSphericalCoordXYAngle, getSphericalCoordYZAngle, vector3Spherical


getSphericalCoordXYAngle

Vector3Bvr Class

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

public NumberBvr getSphericalCoordXYAngle( );

Return Values

Returns the NumberBvr object.

See Also

getSphericalCoordYZ, getSphericalCoordLength, vector3Spherical


getSphericalCoordYZAngle

Vector3Bvr Class

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

public NumberBvr getSphericalCoordYZAngle( );

Return Values

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.

public NumberBvr getX( );

Return Values

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.

public NumberBvr getY( );

Return Values

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.

public NumberBvr getZ( );

Return Values

Returns the NumberBvr object.

See Also

getX, getY, vector3


length

Vector3Bvr Class

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

public NumberBvr length( );

Return Values

Returns the NumberBvr object.

See Also

lengthSquared


lengthSquared

Vector3Bvr Class

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

public NumberBvr lengthSquared( );

Return Values

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.

public Vector3Bvr mul(
  NumberBvr scalar
  );

Parameters
scalar
A NumberBvr object. This parameter can also be of type double.
Return Values

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.

public Vector3Bvr normalize( );

Return Values

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.

public Vector3Bvr transform(
  Transform3Bvr xf
  );

Parameters
xf
A Transform3Bvr object.
Return Values

Returns the Vector3Bvr object.

Remarks

This attribute composes values.


newUninitBvr

Vector3Bvr Class

This method allows you to refer to an 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.

public static Vector3Bvr newUninitBvr( );

Return Values

Returns the Vector3Bvr object.

Relevant Methods from the Statics Class

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

public static Vector3Bvr add(Vector3Bvr v1, Vector3Bvr v2);

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

public static Vector3Bvr cross(Vector3Bvr v1, Vector3Bvr v2);

public static Vector3Bvr derivative(Vector3Bvr vec);

public static NumberBvr dot(Vector3Bvr v1, Vector3Bvr v2);

public static Vector3Bvr integral(Vector3Bvr vec);

public static Vector3Bvr neg(Vector3Bvr v1);

public static Vector3Bvr sub(Vector3Bvr v1, Vector3Bvr v2);

public static Vector3Bvr vector3(NumberBvr x, NumberBvr y, NumberBvr z);

public static Vector3Bvr vector3Spherical(NumberBvr XYangle, NumberBvr YZangle, NumberBvr length);

Relevant Fields from the Statics Class

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

public final static Vector3Bvr xVector3;

public final static Vector3Bvr yVector3;

public final static Vector3Bvr zVector3;

public final static Vector3Bvr zeroVector3;

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

*Top of Page