DirectAnimation Animated Header --Transform2Bvr Class DirectAnimation Animated Header --Transform2Bvr Class* Microsoft DirectAnimation SDK
*Contents  *Index  *Topic Contents
*Previous Topic: StringBvr Class
*Next Topic: Transform3Bvr Class

Transform2Bvr Class


public class Transform2Bvr extends Behavior {

    // Methods
    public Transform2Bvr inverse();
    public BooleanBvr    isSingular();

    public static Transform2Bvr newUninitBvr();
}

Creates an object that represents a two-dimensional transformation behavior. The behavior consists of a 3 by 2 matrix of number behaviors that can be applied to two-dimensional point behaviors to translate, scale, rotate or skew the location of the point, and can be applied to two-dimensional vector behaviors to scale, rotate, or skew the length and/or direction of the vector.

Because matrix values are number behaviors (NumberBvr objects), the transformation behavior may change over time as the number behaviors change. For more information about behaviors, see the Behavior class.

Transform2Bvr Methods

bullet1.gifinverse

bullet1.gifisSingular

bullet1.gifnewUninitBvr


inverse

Transform2Bvr Class

Creates a transformation behavior that is the inverse of the original transformation.

public Transform2Bvr inverse( );

Return Values

Returns the Transform2Bvr object.

Remarks

The inverse transformation is useful for removing the effects of the original transformation from a point or vector behavior. Some transforms have no inverse. To characterize transforms of an unknown type, use isSingular.


isSingular

Transform2Bvr Class

Creates a boolean behavior that indicates whether the transform is singular or not. A singular transform is one that has no inverse.

public BooleanBvr isSingular( );

Return Values

Returns the BooleanBvr object. This object's value is true if the transform is singular; otherwise, it is false.


newUninitBvr

Transform2Bvr Class

This method allows you to refer to an Transform2Bvr 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 Transform2Bvr newUninitBvr( );

Return Values

Returns the Transform2Bvr object.

Relevant Methods from the Statics Class

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

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

public static Transform2Bvr compose2Array(Transform2Bvr[] xforms);

public static Transform2Bvr followPath(Path2Bvr path, NumberBvr evaluator);

public static Transform2Bvr followPathAngle(Path2Bvr path, NumberBvr evaluator);

public static Transform2Bvr followPathAngleUpright(Path2Bvr path, NumberBvr evaluator);

public static Transform2Bvr rotate(NumberBvr radians);

public static Transform2Bvr rotateDegrees(double degrees);

public static Transform2Bvr rotateRate(double radians);

public static Transform2Bvr rotateRateDegrees(double degrees);

public static Transform2Bvr scale(NumberBvr sx, NumberBvr sy);

public static Transform2Bvr scale(Vector2Bvr v);

public static Transform2Bvr scaleRate(double x, double y);

public static Transform2Bvr scale2(NumberBvr uniformFactor);

public static Transform2Bvr scale2Rate(double rate);

public static Transform2Bvr transform3x2(NumberBvr[] matrix);

public static Transform2Bvr translate(NumberBvr tx, NumberBvr ty);

public static Transform2Bvr translate(Point2Bvr loc);

public static Transform2Bvr translate(Vector2Bvr v);

public static Transform2Bvr translate(double x, double y);

public static Transform2Bvr translateRate(double x, double y);

public static Transform2Bvr xShear(NumberBvr x);

public static Transform2Bvr xShearRate(double rate);

public static Transform2Bvr yShear(NumberBvr y);

public static Transform2Bvr yShearRate(double rate);

Relevant Fields from the Statics Class

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

public final static Transform2Bvr identityTransform2;

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

*Top of Page