Index Topic Contents | |||
Previous Topic: Static Methods Relevant to StringBvr Objects Next Topic: Static Fields Relevant to Transform2Bvr Objects |
Static Methods Relevant to Transform2Bvr Objects
Statics Class
composeCreates a two-dimensional transformation behavior that is a composition of the given transformation behaviors.
public static Transform2Bvr compose(
Transform2Bvr xf1,
Transform2Bvr xf2
);Parameters
- xf1 and xf2
- The Transform2Bvr objects.
Return Values
Returns the Transform2Bvr object.
Remarks
Composing a transform is equivalent to first applying xf2 and then applying xf1. In other words:
im.transform(compose(xf1, xf2) == im.transform(xf2).transform(xf1)Statics Class
compose2ArrayCreates a two-dimensional transformation behavior that is a composition of the Transform2Bvr objects included in the array.
public static Transform2Bvr compose2Array(
Transform2Bvr[] xforms
);Parameters
- xforms
- The Transform2Bvr objects.
Return Values
Returns the Transform2Bvr object.
Remarks
Composing a transform is equivalent to first applying the nth transform, then applying the (nth-1) transform, and so on.
Statics Class
followPathCreates a Transform2Bvr object that is a translation (from the origin) that follows a 2-D vector drawing path. The Path2Bvr object is converted into the equivalent translation transform.
public static Transform2Bvr followPath(
Path2Bvr path,
NumberBvr evaluator
);Parameters
- path
- The Path2Bvr object that will be traced.
- evaluator
- The NumberBvr object representing an evaluator with a value in the range [0, 1]. This value is equivalent to a position on the path, where 0 is the beginning of the path and 1 is the end. This parameter can also be of type double. If it is, then the parameter is treated as a duration, representing the amount of time it will take (in seconds) to trace the entire path.
Return Values
Returns the Transform2Bvr object.
Statics Class
followPathAngleCreates a Transform2Bvr object that is equal to the angle of the path's tangent while it is being traversed, translated by its position. This is equivalent to rotating the position by its derivative.
public static Transform2Bvr followPathAngle(
Path2Bvr path,
NumberBvr evaluator
);Parameters
- path
- The Path2Bvr object this is traversed.
- evaluator
- The NumberBvr object representing an evaluator with a value in the range [0, 1]. This value is equivalent to a position on the path, where 0 is the beginning of the path and 1 is the end. This parameter can also be of type double. If it is, then the parameter is treated as a duration, representing the amount of time it will take (in seconds) to trace the entire path.
Return Values
Returns the Transform2Bvr object.
Statics Class
followPathAngleUprightCreates a Transform2Bvr object that is equal to the angle of the path's tangent while it is being traversed, translated by its position. This is equivalent to rotating the position by its derivative, except that the angle that is perpendicular to the X-axis (in local coordinates) will always be less than 180 degrees.
public static Transform2Bvr followPathAngleUpright(
Path2Bvr path,
NumberBvr evaluator
);Parameters
- path
- The Path2Bvr object that is traversed.
- evaluator
- The NumberBvr object representing an evaluator with a value in the range [0, 1]. This value is equivalent to a position on the path, where 0 is the beginning of the path and 1 is the end. This parameter can also be of type double. If it is, then the parameter is treated as a duration, representing the amount of time it will take (in seconds) to trace the entire path.
Return Values
Returns the Transform2Bvr object.
Statics Class
rotateCreates a two-dimensional transformation behavior that, when applied to any two-dimensional object, rotates it by the given angle (expressed in radians).
public static Transform2Bvr rotate(
NumberBvr radians
);Parameters
- radians
- The NumberBvr object representing the angle of rotation. This parameter can also be of type double.
Return Values
Returns the Transform2Bvr object.
Remarks
Rotations are counter-clockwise.
Statics Class
rotateDegreesCreates a two-dimensional transformation behavior that, when applied to any two-dimensional object, rotates it by the given angle (expressed in degrees).
public static Transform2Bvr rotateDegrees(
double degrees
);Parameters
- degrees
- The double representing the angle of rotation (expressed in degrees).
Return Values
Returns the Transform2Bvr object.
Remarks
Rotations are counter-clockwise.
Statics Class
rotateRateCreates a two-dimensional transformation behavior that, when applied to any two-dimensional object, rotates it by the given angle (expressed in radians). This value is multiplied by localTime to determine the rotation rate.
public static Transform2Bvr rotateRate(
double radians
);Parameters
- radians
- The double representing the angle of rotation, multiplied by localTime. The unit is radians/second.
Return Values
Returns the Transform2Bvr object.
Remarks
Rotations are counter-clockwise.
Statics Class
rotateRateDegreesCreates a two-dimensional transformation behavior that, when applied to any two-dimensional object, rotates it by the given angle (expressed in degrees). This value is multiplied by localTime to determine the rotation rate.
public static Transform2Bvr rotateRateDegrees(
double degrees
);Parameters
- degrees
- The double representing the angle of rotation, multiplied by localTime. The unit is degrees/second.
Return Values
Returns the Transform2Bvr object.
Remarks
Rotations are counter-clockwise.
Statics Class
scaleCreates a two-dimensional transformation behavior that, when applied to any two-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 Transform2Bvr scale(
NumberBvr sx,
NumberBvr sy
);Parameters
- sx and sy
- The NumberBvr objects representing the amount to scale. The value of sx applies to the x coordinate, and sy to the y coordinate. These parameters can also be of type double.
Return Values
Returns the Transform2Bvr object.
Statics Class
scaleCreates a two-dimensional transformation behavior that, when applied to any two-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 Transform2Bvr scale(
Vector2Bvr v
);Parameters
- v
- The Vector2Bvr object. The x and y coordinates of the vector behavior specify the amount to scale the x and y coordinates, respectively.
Return Values
Returns the Transform2Bvr object.
Statics Class
scaleRateCreates a two-dimensional transformation behavior that, when applied to any two-dimensional object, scales it. The scaling rates are determined by multiplying each argument by localTime.
public static Transform2Bvr scaleRate(
double x,
double y
);Parameters
- sx and sy
- The doubles representing the amounts to scale. The value of sx applies to the x coordinate, and sy to the y coordinate.
Return Values
Returns the Transform2Bvr object.
Statics Class
scale2Creates a two-dimensional transformation behavior that applies a uniform scale to every coordinate of a two-dimensional object.
public static Transform2Bvr scale2(
NumberBvr uniformFactor
);Parameters
- uniformFactor
- The NumberBvr object representing the value to apply to both the x and y coordinates, respectively. This parameter can also be of type double.
Return Values
Returns the Transform2Bvr object.
See Also
Statics Class
scale2RateCreates a two-dimensional transformation behavior that applies a uniform scale to every coordinate of a two-dimensional object. The scaling rate is determined by multiplying the argument by localTime.
public static Transform2Bvr scale2Rate(
double rate
);Parameters
- rate
- The double representing the value to apply to both the x and y coordinates, respectively.
Return Values
Returns the Transform2Bvr object.
Statics Class
transform3x2Creates a two-dimensional transformation behavior that consists of a 3 by 2 matrix having the values specified by the given number behaviors.
public static Transform2Bvr transform3x2(
NumberBvr[] matrix
);Parameters
- matrix
- A 3 by 2 matrix. The top row of the matrix could be represented as containing NumberBvr objects a00, a01, and a02. Use a00 to scale the x coordinate and a02 to translate x.
- The bottom row of the matrix could be represented as containing the NumberBvr objects a10, a11, and a12. Use a11 to scale the y coordinate and a12 to translate y.
Return Values
Returns the Transform2Bvr object.
Remarks
The X and Y translation components are given by a02 and a12, respectively.
Statics Class
translateCreates a two-dimensional transformation behavior that, when applied to a point behavior, translates (moves) the point by the amount given by the number behaviors.
public static Transform2Bvr translate(
NumberBvr tx,
NumberBvr ty
);Parameters
- tx and ty
- The NumberBvr objects representing the amount to translate the point along the x and y axes, respectively. These parameters can also be of type double.
Return Values
Returns the Transform2Bvr object.
Remarks
Two-dimensional vectors are unchanged by translations.
Statics Class
translateCreates a two-dimensional transformation that, when applied to a point, translates (moves) the point to the new location loc.
public static Transform2Bvr translate(
Point2Bvr loc
);Parameters
- loc
- The Point2Bvr object specifying the new location.
Return Values
Returns the Transform2Bvr object.
Statics Class
translateCreates a two-dimensional transformation behavior that when applied to a point behavior translates (moves) the point by the amount given by the vector behavior.
public static Transform2Bvr translate(
Vector2Bvr v
);Parameters
- v
- The Vector2Bvr object. The x and y coordinates of the vector behavior specify the amount to translate along the x and y axes, respectively.
Return Values
Returns the Transform2Bvr object.
Remarks
Two-dimensional vectors are unchanged by translations.
Statics Class
translateRateCreates a two-dimensional transformation behavior that, when applied to a point, translates (moves) the point by the amount given by the arguments. The translation rates are determined by multiplying the arguments by localTime.
public static Transform2Bvr translateRate(
double x,
double y
);Parameters
- x and y
- The doubles representing the amounts to translate the point along the X and Y axes, respectively.
Return Values
Returns the Transform2Bvr object.
Remarks
Two-dimensional vectors are unchanged by translations.
Statics Class
xShearCreates a two-dimensional transformation behavior that shears the x-axis either up or down. This means the X-coordinate of the points remains unchanged, and the Y-coordinate increases by the product of the X-coordinate and the shear factor. In other words, X2 = X1, and Y2 = Y1 + aX1, where a is the shear factor.
public static Transform2Bvr xShear(
NumberBvr x
);Parameters
- x
- The NumberBvr object representing the amount to shear. This parameter can also be of type double.
Return Values
Returns the Transform2Bvr object.
See Also
Statics Class
xShearRateCreates a two-dimensional transformation behavior that shears the x-axis either up or down. The shear rate is determined by multiplying the argument by localTime.
public static Transform2Bvr xShearRate(
double rate
);Parameters
- rate
- The double representing the amount to shear, multiplied by localTime. The unit is meters/second.
Return Values
Returns the Transform2Bvr object.
Statics Class
yShearCreates a two-dimensional transformation behavior that shears the y-axis either left or right. This means the Y-coordinate of the points remains unchanged, and the X-coordinate increases by the product of the Y-coordinate and the shear factor. In other words, Y2 = Y1 and X2 = X1 + aY1, where a is the shear factor.
public static Transform2Bvr yShear(
NumberBvr y
);Parameters
- y
- The NumberBvr object representing the amount to shear. This parameter can also be of type double.
Return Values
Returns the Transform2Bvr object.
See Also
Statics Class
yShearRateCreates a two-dimensional transformation behavior that shears the y-axis either left or right. The shear rate is determined by multiplying the argument by localTime.
public static Transform2Bvr yShearRate(
double rate
);Parameters
- rate
- The double representing the amount to shear the y-axis, multiplied by localTime. The unit is meters/second.
Return Values
Returns the Transform2Bvr object.
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.