DAModifiableBehavior Class

A DAModifiableBehavior object represents an animated behavior that can be replaced, at run time, with another animated behavior. This is useful when you can't predict the states of an animation model at development time, as well as for integrating animation models with other events and functions.

For relevant properties in the DAStatics class, see DAStatic Properties Relevant to DAModifiableBehavior Objects

See also the DAStatics function ModifiableBehavior.

DAModifiableBehavior Functions

SwitchToExReplaces one modifiable behavior with another.

DAModifiableBehavior Properties

CurrentBehaviorA read/write property that sets and retrieves the current running behavior.

DAModifiableBehavior Methods

This section contains reference material for the DAModifiableBehavior method.

SwitchToEx

DAModifiableBehavior Class

Replaces one behavior with another and enables you to specify flags that control the switching.

Note this function can be used only with Microsoft® DirectAnimation® version 6.x or later.

Syntax

modifiableBvrObj.SwitchToEx( newBvr, dwFlags )

Parameters

newBvr
DABehavior object that will replace the initial behavior.
dwFlags
DWORD (32-bit unsigned integer) value that contains the switcher flags, which can be one or more of the following values.
DAContinueTimeline = 1
Indicates that the time line of the behavior switched to will start at the beginning of the initial behavior's time line, not at the time of the switch. For example, if the initial behavior started at time t0, and the switch occurs at time ts, the switched-to behavior will behave as if it began at time t0 and has continued through to ts. If you switch to a reactive behavior with this flag set, events that might have altered the behavior between t0 and ts will have no effect.
DASwitchFinal = 2
Indicates that this switch is final and the behavior won't switch again, so DirectAnimation can perform optimization based on the fact that switching won't occur again.
DASwitchNextTick = 4
Indicates that the switch should occur at the next tick. Typically, there is a tick with every new frame.

Return Value

Returns the DAModifiableBehavior object with the specified switching behavior.

Remarks

The following code switches bvr to newbvr and sets the switching flags to DAContinueTimeline and DASwitchNextTick. The | operator is a bit-wise logical OR.

bvr.SwitchToEx(newbvr, (1 | 4));

DAModifiableBehavior Properties

This section contains reference material for the DAModifiableBehavior property.

CurrentBehavior

DAModifiableBehavior Class

Sets or retrieves the current running behavior. This property is read/write.

Syntax

modifiableBvrObj.CurrentBehavior

Return Value

When read, returns the DABehavior object that is the new current behavior.


Top of Page Top of Page
© 2000 Microsoft and/or its suppliers. All rights reserved. Terms of Use.