Public Member Functions | List of all members
ILiveBody Interface Referenceabstract

Represents a living organism in the world. More...

#include <lmcore.h>

Inherits IWorldElement.

Inherited by LiveBody.

Public Member Functions

virtual ResultCode EnterState (ILiveBodyState *pIncomingState, const Variant &args)=0
 Make the live body enter a state. More...
 
virtual const System::Core::Vector3dGetPosition ()=0
 Get the position of this object. More...
 
virtual void AddHealth (f32 delta)=0
 Increase or decrease the health of the live body. More...
 
virtual const f32 & GetHealth ()=0
 Get the health of the live body. More...
 
virtual void SetHealth (f32 health)=0
 Set the health of the live body. More...
 
virtual ResultCode EnterWorld (IWorld *pWorld)=0
 Make the live body enter the world. More...
 
virtual ResultCode LeaveWorld ()=0
 Make the live body leave the current world. More...
 
virtual BOOL TestIntersection (const System::Core::Line3d &line)=0
 Performs a livebody - line segment intersection test Performs an intersection test with the live body's bounding volume using a line segment of finite length. More...
 
virtual BOOL TestIntersection (const System::Core::Ray3d &ray)=0
 Performs an intersection test with the live body's bounding volume using a ray of infinite length. More...
 
virtual void MoveFree (const System::Core::Vector3d &delta)=0
 Displaces the object by delta amount along the global x, y, and z axes. More...
 
virtual void LookAt (const System::Core::Vector3d &target)=0
 
virtual ILiveBodySensoryGetSensoryUnit ()=0
 Get the sensory unit of this live body. More...
 
virtual ILiveBodyMotorSystemGetMotorSystem ()=0
 Get the motor system of this live body. More...
 
virtual IGameMapVolumeNodeGetNode ()=0
 Returns the cube volume of the 3d space containing the live body. More...
 
- Public Member Functions inherited from IWorldElement
virtual ISceneNodeGetVisual ()=0
 Get the visual component of the element. More...
 
virtual void AttachModel (ISceneNode *pNode)=0
 Associates a scenegraph with the world element. More...
 
virtual void MoveAxial (const System::Core::Vector3d &delta)=0
 Displaces the object along the local axes by delta. More...
 
virtual void RotateAxial (const System::Core::Vector3d &delta)=0
 Rotates the object around the local axes by delta amount. More...
 
virtual IWorldGetWorld ()=0
 Get the world object this element is in. More...
 
virtual BOOL IsPrimary ()=0
 Tells whether this world element is an actor/protagonist. More...
 
virtual void SetAttribute (const LivebodyAttribute &attrib)=0
 Sets the attribute bits of the world element. The LBATTRIB_ constants define live body attribute bits. More...
 
virtual void ClearAttribute (const LivebodyAttribute &attrib)=0
 Clear the attribute bits of the world element. More...
 
virtual u32 GetAttribute ()=0
 Get the attribute bits of the world element. More...
 
virtual void SetPosition (const System::Core::Vector3d &position)=0
 Set the position of the live body in space. More...
 
virtual void Tick ()=0
 This method is invoked by the game play system. More...
 
virtual void SetMindBox (IMindBox *pBox)=0
 Place an AI component to control the world element. More...
 
virtual IMindBoxGetMindBox ()=0
 Get the AI unit currently in place. For NPCs, it returns null. More...
 
virtual const System::Core::SphereGetBoundingSphere ()=0
 Get the bounding sphere. More...
 
virtual IBoundingVolumeGetBoundingVolume ()=0
 Access the bounding volume. More...
 
virtual ResultCode SetLevelOfDetail (u32 lod)=0
 Set the level of for this object. More...
 
virtual ResultCode AddLODModel (u32 lod, ISceneNode *pModel)=0
 Add model at a specific level of detail. More...
 
virtual u32 GetNumLODModels ()=0
 Get the number of Lod models present. More...
 
- Public Member Functions inherited from IObject
virtual u32 Grab ()=0
 Increments the reference count of the object by one. More...
 
virtual u32 Drop ()=0
 Decrements the reference count of the object by one. More...
 
virtual u32 GetRefCount ()=0
 Get the reference count of the object. More...
 
virtual ResultCode QueryData (u32 dataId, Variant &data)=0
 Query an information from the object. More...
 
virtual void SetName (const c8 *objName)=0
 Set a friendly/user defined name of this object. More...
 
virtual const c8 * GetName ()=0
 Returns the user defined/friendly name of this object. More...
 
virtual const c8 * GetId ()=0
 Get the unique id of this object. More...
 
virtual void SetId (const c8 *objId)=0
 Set an Id for the object. More...
 
virtual const TypeId & GetType ()=0
 Returns the type id of the object. More...
 

Detailed Description

Represents a living organism in the world.

LiveBodies represent living organisms in the world. A Livebody is characterized by its visual, physical and biological properties.

Member Function Documentation

◆ AddHealth()

virtual void ILiveBody::AddHealth ( f32  delta)
pure virtual

Increase or decrease the health of the live body.

Parameters
delta- The value to be added or subtracted to the existing health value

Implemented in LiveBody.

◆ EnterState()

virtual ResultCode ILiveBody::EnterState ( ILiveBodyState pIncomingState,
const Variant args 
)
pure virtual

Make the live body enter a state.

Parameters
pIncomingStateThe incoming state.
pArgsArguments for the incoming state

Implemented in LiveBody.

◆ EnterWorld()

virtual ResultCode ILiveBody::EnterWorld ( IWorld pWorld)
pure virtual

Make the live body enter the world.

Parameters
pWorld- The world to enter

Implemented in LiveBody.

◆ GetHealth()

virtual const f32& ILiveBody::GetHealth ( )
pure virtual

Get the health of the live body.

Implemented in LiveBody.

◆ GetMotorSystem()

virtual ILiveBodyMotorSystem* ILiveBody::GetMotorSystem ( )
pure virtual

Get the motor system of this live body.

Implemented in LiveBody.

◆ GetNode()

virtual IGameMapVolumeNode* ILiveBody::GetNode ( )
pure virtual

Returns the cube volume of the 3d space containing the live body.

Implemented in LiveBody.

◆ GetPosition()

virtual const System::Core::Vector3d& ILiveBody::GetPosition ( )
pure virtual

Get the position of this object.

Implemented in LiveBody.

◆ GetSensoryUnit()

virtual ILiveBodySensory* ILiveBody::GetSensoryUnit ( )
pure virtual

Get the sensory unit of this live body.

Implemented in LiveBody.

◆ LeaveWorld()

virtual ResultCode ILiveBody::LeaveWorld ( )
pure virtual

Make the live body leave the current world.

Implemented in LiveBody.

◆ LookAt()

virtual void ILiveBody::LookAt ( const System::Core::Vector3d target)
pure virtual

Make the live body face a specified location in space.

Parameters
target- Point to lookat.

Implemented in LiveBody.

◆ MoveFree()

virtual void ILiveBody::MoveFree ( const System::Core::Vector3d delta)
pure virtual

Displaces the object by delta amount along the global x, y, and z axes.

Implemented in LiveBody.

◆ SetHealth()

virtual void ILiveBody::SetHealth ( f32  health)
pure virtual

Set the health of the live body.

This value must be between 0 and 1.
Out of range values will beclamped between the nearest limits.

Parameters
health- The health value to set.

Implemented in LiveBody.

◆ TestIntersection() [1/2]

virtual BOOL ILiveBody::TestIntersection ( const System::Core::Line3d line)
pure virtual

Performs a livebody - line segment intersection test Performs an intersection test with the live body's bounding volume using a line segment of finite length.

Implemented in LiveBody.

◆ TestIntersection() [2/2]

virtual BOOL ILiveBody::TestIntersection ( const System::Core::Ray3d ray)
pure virtual

Performs an intersection test with the live body's bounding volume using a ray of infinite length.

Implemented in LiveBody.