DigitalSpaces::DIAgent1 Struct Reference
[Agent Management]

#include <Interfaces.h>

Inherits DigitalSpaces::DIObjectBase.


Detailed Description

The DInterface for working abstractly with an Agent Implementation.

See also:
DIAgentManager1

Public Member Functions

void SetVelocity (in_Vector3f *velocity)
 Set the target velocity for the agent.
void SetVelocityNextCollision (in_Vector3f *velocity)
 Velocity is not applied immediately, but until the agent touches something.
void SetRotation (in_Vector3f *rotation)
 Set the target rotation (change in orientation per second) for the agent.
void SetPosition (in_Vector3f *position)
 Set the target position for the Agent.
void SetOrientation (in_Quaternionf *orientation)
 Set the target orientation for the Agent.
void GetPosition (out_Vector3f *position)
 Returns the current position of the Agent.
void GetVelocity (out_Vector3f *velocity)
 Returns the current velocity of the Agent.
void GetRotation (out_Vector3f *rotat)
 Returns the current rotation (change in orientation over time) of the Agent.
void GetOrientation (out_Quaternionf *orientation)
 Returns the current orientation of the Agent.
const char * GetName ()
 Returns the name given to the Agent Implementation when it was created by the Agent Manager.
DISGBaseGetCentralNode ()
 Returns the "cnetral node" of the Agent.
State Functions
A State is the way that a Controller can affect how the Agent implementation performs.

States can be set with any floating point value, however the values that are valid for a particular State are dependant on the Agent Implementation. Common values are from 0.0 to 1.0 (completely off to completely on), especially when dealing with binary States that are truely either on or off. Multiple States can be "set" (larger then 0.0) at any time, however the results of this are dependant on the Implementation.

void ActivateState (const char *stateName)
 Sets specified State level to 1.0. This is a shortcut for SetStateLevel( stateName, 1.0 ).
void DeactivateState (const char *stateName)
 Sets specified State level to 0.0. This is a shortcut for SetStateLevel( stateName, 0.0 ).
void SetStateLevel (const char *stateName, float stateLevel)
 Sets specified State to specified level. This does not affect the level of any other States.
void SetState (const char *stateName)
 Sets the specified State level to 1.0, sets all other State levels to 0.0.
void GetStateList (DIStringList1 *iList)
 Get a list of all the states this implementation supports.
float GetStateLevel (const char *stateName)
 Returns the current level of the specified State.
Private functions.
These functions are called by the Agent Manager.

They should not be called by anything else.

bool RenderFrame (float fDelta)
 Called once per frame by the AgentManager.
void SelfDestruct ()
 Called during cleanup by the AgentManager.

Member Function Documentation

void DigitalSpaces::DIAgent1::SetVelocity ( in_Vector3f velocity  ) 

Set the target velocity for the agent.

Note that as a velocity, this includes both a direction and a speed (length of the vector). Depending on the implementation, the length of the vector may be ignored, ie, the implementation may have its own speed limitation.

Parameters:
velocity The target velocity. It should be in world co-ordinates.


The documentation for this struct was generated from the following file:

Generated on Sun Aug 31 17:46:28 2008 for Digital Spaces by  doxygen 1.5.6