Changeset View
Changeset View
Standalone View
Standalone View
source/gameengine/GameLogic/SCA_SteeringActuator.h
- This file was moved from source/gameengine/Ketsji/KX_SteeringActuator.h.
| Show All 18 Lines | |||||
| * | * | ||||
| * The Original Code is: all of this file. | * The Original Code is: all of this file. | ||||
| * | * | ||||
| * Contributor(s): none yet. | * Contributor(s): none yet. | ||||
| * | * | ||||
| * ***** END GPL LICENSE BLOCK ***** | * ***** END GPL LICENSE BLOCK ***** | ||||
| */ | */ | ||||
| #ifndef __KX_STEERINGACTUATOR_H__ | #ifndef __SCA_STEERINGACTUATOR_H__ | ||||
| #define __KX_STEERINGACTUATOR_H__ | #define __SCA_STEERINGACTUATOR_H__ | ||||
| /** \file SCA_SteeringActuator.h | |||||
| * \ingroup gamelogic | |||||
| */ | |||||
| #include "SCA_IActuator.h" | #include "SCA_IActuator.h" | ||||
| #include "SCA_LogicManager.h" | #include "SCA_LogicManager.h" | ||||
| #include "MT_Matrix3x3.h" | #include "MT_Matrix3x3.h" | ||||
| class KX_GameObject; | class KX_GameObject; | ||||
| class KX_NavMeshObject; | class KX_NavMeshObject; | ||||
| struct KX_Obstacle; | struct KX_Obstacle; | ||||
| class KX_ObstacleSimulation; | class KX_ObstacleSimulation; | ||||
| const int MAX_PATH_LENGTH = 128; | const int MAX_PATH_LENGTH = 128; | ||||
| class KX_SteeringActuator : public SCA_IActuator | class SCA_SteeringActuator : public SCA_IActuator | ||||
| { | { | ||||
| Py_Header | Py_Header | ||||
| /** Target object */ | /** Target object */ | ||||
| KX_GameObject *m_target; | KX_GameObject *m_target; | ||||
| KX_NavMeshObject *m_navmesh; | KX_NavMeshObject *m_navmesh; | ||||
| int m_mode; | int m_mode; | ||||
| float m_distance; | float m_distance; | ||||
| Show All 22 Lines | public: | ||||
| { | { | ||||
| KX_STEERING_NODEF = 0, | KX_STEERING_NODEF = 0, | ||||
| KX_STEERING_SEEK, | KX_STEERING_SEEK, | ||||
| KX_STEERING_FLEE, | KX_STEERING_FLEE, | ||||
| KX_STEERING_PATHFOLLOWING, | KX_STEERING_PATHFOLLOWING, | ||||
| KX_STEERING_MAX | KX_STEERING_MAX | ||||
| }; | }; | ||||
| KX_SteeringActuator(class SCA_IObject* gameobj, | SCA_SteeringActuator(class SCA_IObject* gameobj, | ||||
| int mode, | int mode, | ||||
| KX_GameObject *target, | KX_GameObject *target, | ||||
| KX_GameObject *navmesh, | KX_GameObject *navmesh, | ||||
| float distance, | float distance, | ||||
| float velocity, | float velocity, | ||||
| float acceleration, | float acceleration, | ||||
| float turnspeed, | float turnspeed, | ||||
| bool isSelfTerminated, | bool isSelfTerminated, | ||||
| int pathUpdatePeriod, | int pathUpdatePeriod, | ||||
| KX_ObstacleSimulation* simulation, | KX_ObstacleSimulation* simulation, | ||||
| short facingmode, | short facingmode, | ||||
| bool normalup, | bool normalup, | ||||
| bool enableVisualization); | bool enableVisualization); | ||||
| virtual ~KX_SteeringActuator(); | virtual ~SCA_SteeringActuator(); | ||||
| virtual bool Update(double curtime, bool frame); | virtual bool Update(double curtime, bool frame); | ||||
| virtual CValue* GetReplica(); | virtual CValue* GetReplica(); | ||||
| virtual void ProcessReplica(); | virtual void ProcessReplica(); | ||||
| virtual void ReParent(SCA_IObject* parent); | virtual void ReParent(SCA_IObject* parent); | ||||
| virtual void Relink(CTR_Map<CTR_HashedPtr, void*> *obj_map); | virtual void Relink(CTR_Map<CTR_HashedPtr, void*> *obj_map); | ||||
| virtual bool UnlinkObject(SCA_IObject* clientobj); | virtual bool UnlinkObject(SCA_IObject* clientobj); | ||||
| const MT_Vector3& GetSteeringVec(); | const MT_Vector3& GetSteeringVec(); | ||||
| Show All 9 Lines | #ifdef WITH_PYTHON | ||||
| static int pyattr_set_target(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef, PyObject *value); | static int pyattr_set_target(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef, PyObject *value); | ||||
| static PyObject *pyattr_get_navmesh(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef); | static PyObject *pyattr_get_navmesh(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef); | ||||
| static int pyattr_set_navmesh(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef, PyObject *value); | static int pyattr_set_navmesh(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef, PyObject *value); | ||||
| static PyObject *pyattr_get_steeringVec(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef); | static PyObject *pyattr_get_steeringVec(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef); | ||||
| #endif /* WITH_PYTHON */ | #endif /* WITH_PYTHON */ | ||||
| }; /* end of class KX_SteeringActuator : public SCA_PropertyActuator */ | }; /* end of class SCA_SteeringActuator */ | ||||
| #endif /* __KX_STEERINGACTUATOR_H__ */ | #endif /* __SCA_STEERINGACTUATOR_H__ */ | ||||