Blender V2.61 - r43446
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends

SCA_IActuator Class Reference

#include <SCA_IActuator.h>

Inheritance diagram for SCA_IActuator:
Inheritance graph
[legend]

List of all members.

Public Types

enum  KX_ACTUATOR_TYPE {
  KX_ACT_OBJECT, KX_ACT_IPO, KX_ACT_CAMERA, KX_ACT_SOUND,
  KX_ACT_PROPERTY, KX_ACT_ADD_OBJECT, KX_ACT_END_OBJECT, KX_ACT_DYNAMIC,
  KX_ACT_REPLACE_MESH, KX_ACT_TRACKTO, KX_ACT_CONSTRAINT, KX_ACT_SCENE,
  KX_ACT_RANDOM, KX_ACT_MESSAGE, KX_ACT_ACTION, KX_ACT_CD,
  KX_ACT_GAME, KX_ACT_VISIBILITY, KX_ACT_2DFILTER, KX_ACT_PARENT,
  KX_ACT_SHAPEACTION, KX_ACT_STATE, KX_ACT_ARMATURE, KX_ACT_STEERING
}

Public Member Functions

 SCA_IActuator (SCA_IObject *gameobj, KX_ACTUATOR_TYPE type)
virtual bool UnlinkObject (SCA_IObject *clientobj)
virtual bool Update (double curtime, bool frame)
virtual bool Update ()
void AddEvent (bool event)
virtual void ProcessReplica ()
bool IsNegativeEvent () const
virtual ~SCA_IActuator ()
virtual void Deactivate ()
virtual void Activate (SG_DList &head)
void LinkToController (SCA_IController *controller)
void UnlinkController (class SCA_IController *cont)
void UnlinkAllControllers ()
void ClrLink ()
void IncLink ()
void DecLink ()
bool IsNoLink () const
bool IsType (KX_ACTUATOR_TYPE type)

Protected Member Functions

void RemoveAllEvents ()

Protected Attributes

int m_type
int m_links
bool m_posevent
bool m_negevent
std::vector< class
SCA_IController * > 
m_linkedcontrollers

Friends

class SCA_LogicManager

Detailed Description

Use of SG_DList : None Use of SG_QList : element of activated actuator list of their owner Head: SCA_IObject::m_activeActuators

Definition at line 43 of file SCA_IActuator.h.


Member Enumeration Documentation

This class also inherits the default copy constructors

Enumerator:
KX_ACT_OBJECT 
KX_ACT_IPO 
KX_ACT_CAMERA 
KX_ACT_SOUND 
KX_ACT_PROPERTY 
KX_ACT_ADD_OBJECT 
KX_ACT_END_OBJECT 
KX_ACT_DYNAMIC 
KX_ACT_REPLACE_MESH 
KX_ACT_TRACKTO 
KX_ACT_CONSTRAINT 
KX_ACT_SCENE 
KX_ACT_RANDOM 
KX_ACT_MESSAGE 
KX_ACT_ACTION 
KX_ACT_CD 
KX_ACT_GAME 
KX_ACT_VISIBILITY 
KX_ACT_2DFILTER 
KX_ACT_PARENT 
KX_ACT_SHAPEACTION 
KX_ACT_STATE 
KX_ACT_ARMATURE 
KX_ACT_STEERING 

Definition at line 67 of file SCA_IActuator.h.


Constructor & Destructor Documentation

SCA_IActuator::SCA_IActuator ( SCA_IObject gameobj,
KX_ACTUATOR_TYPE  type 
)

Definition at line 38 of file SCA_IActuator.cpp.

SCA_IActuator::~SCA_IActuator ( ) [virtual]

Definition at line 94 of file SCA_IActuator.cpp.

References RemoveAllEvents().


Member Function Documentation

void SCA_IActuator::Activate ( SG_DList head) [virtual]
void SCA_IActuator::AddEvent ( bool  event) [inline]

Add an event to an actuator.

Definition at line 123 of file SCA_IActuator.h.

References m_negevent, and m_posevent.

Referenced by SCA_LogicManager::AddActiveActuator(), and SCA_LogicManager::UpdateFrame().

void SCA_IActuator::ClrLink ( ) [inline]

Definition at line 156 of file SCA_IActuator.h.

References m_links.

Referenced by SCA_IObject::ReParentLogic().

void SCA_IActuator::Deactivate ( ) [virtual]

remove this actuator from the list of active actuators

Reimplemented in KX_StateActuator.

Definition at line 73 of file SCA_IActuator.cpp.

References SG_DList::Delink(), SCA_IObject::m_activeActuators, SCA_ILogicBrick::m_gameobj, SG_QList::QDelink(), and SG_QList::QEmpty().

Referenced by SCA_LogicManager::RemoveActuator().

void SCA_IActuator::DecLink ( )

Definition at line 99 of file SCA_IActuator.cpp.

References m_links, SCA_ILogicBrick::m_name, and STR_String::Ptr().

void SCA_IActuator::IncLink ( ) [inline]

Definition at line 157 of file SCA_IActuator.h.

References m_links.

Referenced by SCA_IController::LinkToActuator().

bool SCA_IActuator::IsNegativeEvent ( ) const [inline]
bool SCA_IActuator::IsNoLink ( ) const [inline]

Definition at line 159 of file SCA_IActuator.h.

References m_links.

Referenced by SCA_LogicManager::UpdateFrame().

bool SCA_IActuator::IsType ( KX_ACTUATOR_TYPE  type) [inline]

Definition at line 160 of file SCA_IActuator.h.

References m_type.

void SCA_IActuator::LinkToController ( SCA_IController controller)

Definition at line 109 of file SCA_IActuator.cpp.

References m_linkedcontrollers.

Referenced by SCA_LogicManager::RegisterToActuator().

void SCA_IActuator::ProcessReplica ( ) [virtual]
void SCA_IActuator::RemoveAllEvents ( ) [inline, protected]
void SCA_IActuator::UnlinkAllControllers ( )

Definition at line 131 of file SCA_IActuator.cpp.

References m_linkedcontrollers.

Referenced by SCA_LogicManager::RemoveActuator().

void SCA_IActuator::UnlinkController ( class SCA_IController cont)
virtual bool SCA_IActuator::UnlinkObject ( SCA_IObject clientobj) [inline, virtual]

UnlinkObject(...) Certain actuator use gameobject pointers (like TractTo actuator) This function can be called when an object is removed to make sure that the actuator will not use it anymore.

Reimplemented in BL_ArmatureActuator, SCA_PropertyActuator, KX_CameraActuator, KX_ObjectActuator, KX_ParentActuator, KX_SCA_AddObjectActuator, KX_SceneActuator, KX_SteeringActuator, and KX_TrackToActuator.

Definition at line 103 of file SCA_IActuator.h.

bool SCA_IActuator::Update ( void  ) [virtual]
bool SCA_IActuator::Update ( double  curtime,
bool  frame 
) [virtual]

Update(...) Update the actuator based upon the events received since the last call to Update, the current time and deltatime the time elapsed in this frame ? It is the responsibility of concrete Actuators to clear their event's. This is usually done in the Update() method via a call to RemoveAllEvents()

Reimplemented in BL_ActionActuator, BL_ArmatureActuator, BL_ShapeActionActuator, KX_CameraActuator, KX_ConstraintActuator, KX_IpoActuator, KX_SoundActuator, KX_SteeringActuator, and KX_TrackToActuator.

Definition at line 48 of file SCA_IActuator.cpp.

References Update().

Referenced by SCA_LogicManager::UpdateFrame().


Friends And Related Function Documentation

friend class SCA_LogicManager [friend]

Definition at line 45 of file SCA_IActuator.h.


Member Data Documentation

std::vector<class SCA_IController*> SCA_IActuator::m_linkedcontrollers [protected]
int SCA_IActuator::m_links [protected]

Definition at line 48 of file SCA_IActuator.h.

Referenced by ClrLink(), DecLink(), IncLink(), and IsNoLink().

bool SCA_IActuator::m_negevent [protected]
bool SCA_IActuator::m_posevent [protected]
int SCA_IActuator::m_type [protected]

Reimplemented in KX_IpoActuator, and KX_SoundActuator.

Definition at line 47 of file SCA_IActuator.h.

Referenced by IsType().


The documentation for this class was generated from the following files: