DirectAnimation Animated Header --Static Methods Relevant to Transform3Bvr Objects DirectAnimation Animated Header --Static Methods Relevant to Transform3Bvr Objects* Microsoft DirectAnimation SDK
*Index  *Topic Contents
*Previous Topic: Static Fields Relevant to Transform2Bvr Objects
*Next Topic: Static Fields Relevant to Transform3Bvr Objects

Static Methods Relevant to Transform3Bvr Objects



compose

Statics Class

Creates a three-dimensional transformation behavior that is a composition of the given transformation behaviors.

public static Transform3Bvr compose(
  Transform3Bvr xf1,
  Transform3Bvr xf2
  );

Parameters
xf1 and xf2
The Transform3Bvr objects.
Return Values

Returns the Transform3Bvr object.

Remarks

Composing a transform is equivalent to first applying xf2 and then applying xf1. In other words:


geo.transform(compose(xf1, xf2) == geo.transform(xf2).transform(xf1)


compose3Array

Statics Class

Creates a three-dimensional transformation behavior that is a composition of the Transform3Bvr objects in the array.

public static Transform3Bvr compose3Array(
  Transform3Bvr[] xforms
  );

Parameters
xf1 and xf2
The Transform3Bvr objects.
Return Values

Returns the Transform3Bvr object.

Remarks

Composing a transform is equivalent to first applying the nth transform, then applying the (nth-1) transform, and so on.


lookAtFrom

Statics Class

Creates a three-dimensional transformation behavior that transforms an object from a standard position and orientation to the "from" point, and aimed at the "to" point, with "up" mapping to the object's up direction. Prior to this transform, objects must be located at the origin, with the up side aligned with positive y, and aimed in the negative z-direction.

public static Transform3Bvr lookAtFrom(
  Point3Bvr from,
  Point3Bvr to,
  Vector3Bvr up
  );

Parameters
from
The Point3Bvr object specifying the point from which to view.
to
The Point3Bvr object specifying the point toward which to view.
up
The Point3Bvr object specifying the point determining the upright position.
Return Values

Returns the Transform3Bvr object.

Remarks

This transform is useful for positioning and orienting cameras, lights, microphones, and other three-dimensional objects.


rotate

Statics Class

Creates a three-dimensional transformation behavior that, when applied to a point or vector behavior, rotates the point or vector by the given angle (expressed in radians) around the given axis.

public static Transform3Bvr rotate(
  Vector3Bvr axis,
  NumberBvr radians
  );

Parameters
axis
The Vector3Bvr object representing the axis around which to rotate. The plane of rotation is perpendicular to the ray defined by this vector.
radians
The NumberBvr object representing the angle of rotation. This parameter can also be of type double.
Return Values

Returns the Transform3Bvr object.

Remarks

Rotations obey the right-hand rule. This means that, when looking down the axis vector, they are counter-clockwise.


rotateDegrees

Statics Class

Creates a three-dimensional transformation behavior that, when applied to a point or vector behavior, rotates the point or vector by the given angle (expressed in degrees) around the given axis.

public static Transform3Bvr rotateDegrees(
  Vector3Bvr axis,
  double degrees
  );

Parameters
axis
The Vector3Bvr object representing the axis around which to rotate. The plane of rotation is perpendicular to the ray defined by this vector.
degrees
The double representing the angle of rotation (expressed in degrees).
Return Values

Returns the Transform3Bvr object.

Remarks

Rotations obey the right-hand rule. This means that, when looking down the axis vector, they are counter-clockwise.


rotateRate

Statics Class

Creates a three-dimensional transformation behavior that, when applied to a point or vector behavior, rotates the point or vector by the given angle (expressed in radians) around the given axis. The rotation rate is determined by multiplying the angle by localTime.

public static Transform3Bvr rotateRate(
  Vector3Bvr axis,
  double radians
  );

Parameters
axis
The Vector3Bvr object representing the axis around which to rotate. The plane of rotation is perpendicular to the ray defined by this vector.
radians
The double representing the angle of rotation, multiplied by localTime. The unit is radians/second.
Return Values

Returns the Transform3Bvr object.

Remarks

Rotations obey the right-hand rule. This means that, when looking down the axis vector, they are counter-clockwise.


rotateRateDegrees

Statics Class

Creates a three-dimensional transformation behavior that, when applied to a point or vector behavior, rotates the point or vector by the given angle (expressed in degrees) around the given axis. The rotation rate is determined by multiplying the angle by localTime.

public static Transform3Bvr rotateRateDegrees(
  Vector3Bvr axis,
  double degrees
  );

Parameters
axis
The Vector3Bvr object representing the axis around which to rotate. The plane of rotation is perpendicular to the ray defined by this vector.
degrees
The double representing the angle of rotation (expressed in degrees) multiplied by localTime. The unit is degrees/second.
Return Values

Returns the Transform3Bvr object.

Remarks

Rotations obey the right-hand rule. This means that, when looking down the axis vector, they are counter-clockwise.


scale

Statics Class

Creates a three-dimensional transformation behavior that, when applied to a three-dimensional object, scales it. For example, the transformation modifies the length of a vector by multiplying the vector's coordinates by the values of the corresponding number behaviors.

public static Transform3Bvr scale(
  NumberBvr sx,
  NumberBvr sy,
  NumberBvr sz
  );

Parameters
sx, sy, and sz
The NumberBvr objects representing the amounts to scale. The value of sx applies to the x coordinate, sy to the y coordinate, and sz to the z coordinate. These parameters can also be of type double.
Return Values

Returns the Transform3Bvr object.


scale

Statics Class

Creates a three-dimensional transformation behavior that, when applied to a three-dimensional object, scales it. For example, the transformation modifies the location of a point by multiplying the point's coordinates by the values of the corresponding vector coordinates.

public static Transform3Bvr scale(
  Vector3Bvr v
  );

Parameters
v
The Vector3Bvr object. The x, y, and z coordinates of the vector behavior specify the amounts to scale the x, y, and z coordinates, respectively.
Return Values

Returns the Transform3Bvr object.


scaleRate

Statics Class

Creates a three-dimensional transformation behavior that, when applied to a three-dimensional object, scales it. The scaling rates are determined by multiplying the arguments by localTime.

public Transform3Bvr scaleRate(
  double x,
  double y,
  double z
  );

Parameters
x, y, and z
The doubles representing the amounts to scale. The value of x applies to the x coordinate, y to the y coordinate, and z to the z coordinate.
Return Values

Returns the Transform3Bvr object.


scale3

Statics Class

Creates a three-dimensional transformation behavior that, when applied to a three-dimensional object, scales it uniformly.

public static Transform3Bvr scale3(
  NumberBvr uniformFactor
  );

Parameters
uniformFactor
The NumberBvr object representing the value to apply to the x, y, and z coordinates, respectively. This parameter can also be of type double.
Return Values

Returns the Transform3Bvr object.

See Also

scale, scale


scale3Rate

Statics Class

Creates a three-dimensional transformation behavior that, when applied to a three-dimensional object, scales it uniformly. The scaling rate is determined by multiplying the argument by localTime.

public Transform3Bvr scale3Rate(
  double rate
  );

Parameters
rate
The double representing the value to apply to the x, y, and z coordinates, respectively, multiplied by localTime. The unit is degrees/second.
Return Values

Returns the Transform3Bvr object.


transform4x4

Statics Class

Creates a three-dimensional transformation behavior that consists of the 4 by 4 matrix having the values specified by the given number behaviors.

public static Transform3Bvr transform4x4(
  NumberBvr[] matrix
  );

Parameters
matrix
The 4 by 4 matrix. The first row of the matrix can be represented by the NumberBvr objects a00, a01, a02, a03. Use a00 to scale the x coordinate and a03 to translate x.
The second row of the matrix can be represented by the NumberBvr objects a10, a11, a12, a13. Use a11 to scale the y coordinate and a13 to translate y.
The third row of the matrix can be represented by the NumberBvr objects a20, a21, a22, a23. Use a22 to scale the z coordinate and a23 to translate z.
The fourth row of the matrix can be represented by the NumberBvr objects a30, a31, a32, a33.
Return Values

Returns the Transform3Bvr object.

Remarks

The translation components for the matrix are in the last column. The last row of the matrix must be [0 0 0 1].


translate

Statics Class

Creates a three-dimensional transformation behavior that, when applied to a point behavior, translates (moves) the point by the amounts given by the number behaviors.

public static Transform3Bvr translate(
  NumberBvr tx,
  NumberBvr ty,
  NumberBvr tz
  );

Parameters
tx, ty, and tz
The NumberBvr objects representing the amounts to translate the point along the x, y, and z axes, respectively. These parameters can also be of type double.
Return Values

Returns the Transform3Bvr object.

Remarks

Vectors are unchanged by translations.


translate

Statics Class

Creates a two-dimensional transformation that, when applied to a point, translates (moves) the point to the new location loc.

public static Transform3Bvr translate(
  Point3Bvr loc
  );

Parameters
loc
The Point3Bvr object specifying the new location.
Return Values

Returns the Transform3Bvr object.


translate

Statics Class

Creates a three-dimensional transformation behavior that, when applied to a point behavior, translates (moves) the point by the amounts given by the vector behavior.

public static Transform3Bvr translate(
  Vector3Bvr v
  );

Parameters
v
The Vector3Bvr object. The x, y, and z coordinates of the vector behavior specify the amounts to translate along the x, y, and z axes, respectively.
Return Values

Returns the Transform3Bvr object.

Remarks

Vectors are unchanged by translations.


translateRate

Statics Class

Creates a three-dimensional transformation behavior that, when applied to a point behavior, translates (moves) the point by the amounts given by the doubles. The translation rate is determined by multiplying the arguments by localTime.

public Transform3Bvr translateRate(
  double x,
  double y,
  double z
  );

Parameters
x, y, and z
The doubles representing the amounts to translate the point along the x, y, and z axes, respectively.
Return Values

Returns the Transform3Bvr object.

Remarks

Vectors are unchanged by translations.


xShear

Statics Class

Shears the x-axis in the positive y-direction by a and in the positive z-direction by b. The X-coordinate remains unchanged, and the Y and Z coordinates increase by the product of the X-coordinate and the shear factors. In other words, X2 = X1, Y2 = Y1 + aX1, and Z2 = Z1 + bX1, where a and b are the shear factors.

public static Transform3Bvr xShear(
  NumberBvr a,
  NumberBvr b
  );

Parameters
a
The NumberBvr object representing the amount of shear in the Y direction. This parameter can also be of type double.
b
The NumberBvr object representing the amount of shear in the Z direction. This parameter can also be of type double.
Return Values

Returns the Transform3Bvr object.

See Also

yShear, zShear


xShearRate

Statics Class

Shears the x-axis in the positive y-direction by a and in the positive z-direction by b. The shear rates are determined by multiplying the arguments by localTime.

public static Transform3Bvr xShearRate(
  double a,
  double b
  );

Parameters
a
The double representing the amount of shear in the Y direction, multiplied by localTime. The unit is meters/second.
b
The double representing the amount of shear in the Z direction, multiplied by localTime. The unit is meters/second.
Return Values

Returns the Transform3Bvr object.

See Also

yShear, zShear


yShear

Statics Class

Shears the y-axis in the positive x-direction by c and in the positive z-direction by d. The Y-coordinate remains unchanged, and the X and Z coordinates increase by the product of the Y-coordinate and the shear factors. In other words, Y2 = Y1, X2 = X1 + cY1, and Z2 = Z1 + dY1, where c and d are the shear factors.

public static Transform3Bvr yShear(
  NumberBvr c,
  NumberBvr d
  );

Parameters
c
The NumberBvr object representing the amount of shear in the X direction. This parameter can also be of type double.
d
The NumberBvr object representing the amount of shear in the Z direction. This parameter can also be of type double.
Return Values

Returns the Transform3Bvr object.

See Also

xShear, zShear


yShearRate

Statics Class

Shears the y-axis in the positive x-direction by c and in the positive z-direction by d. The shear rates are determined by multiplying the arguments by localTime.

public static Transform3Bvr yShearRate(
  double c,
  double d
  );

Parameters
c
The double representing the amount of shear in the X direction, multiplied by localTime. The unit is meters/second.
d
The double representing the amount of shear in the Z direction, multiplied by localTime. The unit is meters/second.
Return Values

Returns the Transform3Bvr object.

See Also

xShear, zShear


zShear

Statics Class

Shears the z-axis in the positive x-direction by e and in the positive y-direction by f. The Z-coordinate remains unchanged, and the X and Y coordinates increase by the product of the Z-coordinate and the shear factors. In other words, Z2 = Z1, X2 = X1 + eZ1, and Y2 = Y1 + fZ1, where e and f are the shear factors.

public static Transform3Bvr zShear(
  NumberBvr e,
  NumberBvr f
  );

Parameters
e
The NumberBvr object representing the amount of shear in the X direction. This parameter can also be of type double.
f
The NumberBvr object representing the amount of shear in the Y direction. This parameter can also be of type double.
Return Values

Returns the Transform3Bvr object.

See Also

xShear, yShear


zShearRate

Statics Class

Shears the z-axis in the positive x-direction by e and in the positive y-direction by f. The shear rates are determined by multiplying the arguments by localTime.

public static Transform3Bvr zShearRate(
  double e,
  double f
  );

Parameters
e
The double representing the amount of shear in the X direction, multiplied by localTime. The unit is meters/second.
f
The double representing the amount of shear in the Y direction, multiplied by localTime. The unit is meters/second.
Return Values

Returns the Transform3Bvr object.

See Also

xShear, yShear

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

*Top of Page