DirectX Media for Animation Java Reference |
![]() Previous |
![]() Classes |
![]() Index |
![]() Next |
public class BooleanBvr extends Behavior { // Fields public static BooleanBvr falseBvr; public static BooleanBvr trueBvr; // Methods public boolean extract() throws IllegalExtract; public static BooleanBvr and(BooleanBvr b1, BooleanBvr b2); public static BooleanBvr newUninitBvr(); public static BooleanBvr not(BooleanBvr b); public static BooleanBvr or(BooleanBvr b1, BooleanBvr b2); public static BooleanBvr toBvr(boolean bool); }
A BooleanBvr is an object that represents a Boolean behavior. At any given time, the value of the behavior is either true or false.
For more information about behaviors, see the Behavior class.
public boolean extract() throws IllegalExtract;Extracts the value of the behavior, returning a Java boolean value. This behavior must have a constant value.
Return Value:
Returns either true or false.
Throws:
IllegalExtract Attempt to call on a non-constant BooleanBvr object, such as created by the until method.
public static BooleanBvr and(BooleanBvr b1, BooleanBvr b2);Creates a Boolean behavior that represents the logical AND of the given behaviors. The behavior's value is true when both b1 and b2 are true; otherwise, it is false.
Return Value:
Returns the BooleanBvr object.
Parameter Description b1 and b2 The BooleanBvr objects to combine.
public static BooleanBvr newUninitBvr();Allows you to refer to a boolean 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.
Return Value:
Returns the BooleanBvr object.
public static BooleanBvr not(BooleanBvr b);Creates a Boolean behavior that represents the logical NOT of the given behavior. The behavior's value is true when b is false; otherwise, it is false.
Return Value:
Returns the BooleanBvr object.
Parameter Description b The BooleanBvr object to apply the operation to.
public static BooleanBvr or(BooleanBvr b1, BooleanBvr b2);Creates a Boolean behavior that represents the logical OR of the given behaviors. The behavior's value true when either b1 or b2 are true; otherwise it is false.
Return Value:
Returns the BooleanBvr object.
Parameter Description b1 and b2 The BooleanBvr objects to combine.
public static BooleanBvr toBvr(boolean bool);Converts a boolean to a BooleanBvr. The only time toBvr is used is when converting Java numbers, booleans, or strings to their corresponding Direct Animation types. It is not used for constants such as red, yVector3, and origin2 because these are defined as constant behaviors.
Return Value:
Returns the BooleanBvr object.
Parameter Description bool The Java boolean type to be converted.
© 1997 Microsoft Corporation. All rights reserved. Legal Notices.