HBhvSensor
Functions
void |
|
void |
|
void |
|
void |
|
bool |
|
bool |
|
bool |
|
void |
|
char const * |
|
void |
|
void * |
Detailed Description
-
class HBhvSensor
The HBhvSensor class encapsulates an animation sensor.
A HBhvSensor objects holds a list of conditions which are usually related to an object in the segment hierachy and actions that should be performed based on whether these conditions are met.
Public Functions
-
HBhvSensor(char const *name, bool active, HBhvBehaviorManager *BehaviorManager)
Constructs an HBhvSensor object.
- Parameters
name – The name of the sensor.
active – The activity state. Pass true if you want this sensor to be active by default.
BehaviorManager – A pointer to the HBhvBehaviorManager object.
-
virtual ~HBhvSensor()
-
void AddCondition(HBhvCondition *condition)
Adds a new condition to the condition list.
- Parameters
condition – A pointer to condition object to be added.
-
void Serialize(HUtilityXMLGenerator *xmlgen)
Writes XML data to a buffer.
-
inline HBhvBehaviorManager *GetBehaviorManager()
- Returns
A pointer to HBhvBehaviorManager object
-
void Activate(int delay = 0)
This method activates the sensor. It fires the sensor activated event and registers the items in the conditions array.
- Parameters
delay – The delay time in ticks before activation.
-
void DeActivate()
This method deactivates the sensor and unregisters all the items in the conditions array.
-
inline bool GetDefaultActive()
- Returns
True if the sensor is active by default or false if the sensor is inactive by default.
-
inline bool GetCurrentlyActive()
- Returns
True if the sensor is currently active or false if ensor is not currently active.
-
bool Evaluate()
Evaluates the sensor conditions. If the conditions are met, then the actions list is executed.
- Returns
True if the conditions are met to true or false if conditions are not met.
-
void AddAction(HBhvAction *action)
Adds a new item to the action list.
- Parameters
action – A pointer to the action object you want added.
-
inline char const *GetName()
- Returns
A pointer to the name of the sensor.
-
void Tick()
Performs any time based sensor action.
Public Static Functions
-
static void *XMLCallback(HUtilityXMLTag *xt, bool open, void *m_pExtraData)
This is XML read callback which parses XML data and then populates the member variables with the associated values.
-
HBhvSensor(char const *name, bool active, HBhvBehaviorManager *BehaviorManager)