diff options
Diffstat (limited to 'source/gameengine/Ketsji/KX_GameObject.h')
-rw-r--r-- | source/gameengine/Ketsji/KX_GameObject.h | 146 |
1 files changed, 73 insertions, 73 deletions
diff --git a/source/gameengine/Ketsji/KX_GameObject.h b/source/gameengine/Ketsji/KX_GameObject.h index 9c582d3e27a..7a8243eb43d 100644 --- a/source/gameengine/Ketsji/KX_GameObject.h +++ b/source/gameengine/Ketsji/KX_GameObject.h @@ -36,7 +36,7 @@ #ifdef _MSC_VER /* get rid of this stupid "warning 'this' used in initialiser list", generated by VC when including Solid/Sumo */ # pragma warning (disable:4355) -#endif +#endif #include <stddef.h> @@ -91,10 +91,10 @@ protected: std::vector<RAS_MeshObject*> m_lodmeshes; int m_currentLodLevel; short m_previousLodLevel; - SG_QList m_meshSlots; // head of mesh slots of this + SG_QList m_meshSlots; // head of mesh slots of this struct Object* m_pBlenderObject; struct Object* m_pBlenderGroupObject; - + bool m_bUseObjectColor; bool m_bIsNegativeScaling; MT_Vector4 m_objectColor; @@ -105,8 +105,8 @@ protected: // visible = user setting // culled = while rendering, depending on camera - bool m_bVisible; - bool m_bCulled; + bool m_bVisible; + bool m_bCulled; bool m_bOccluder; PHY_IPhysicsController* m_pPhysicsController; @@ -126,7 +126,7 @@ protected: BL_ActionManager* m_actionManager; BL_ActionManager* GetActionManager(); - + bool m_bRecordAnimation; public: @@ -135,7 +135,7 @@ public: /** * KX_GameObject custom infos for ray cast, it contains property name, * collision mask, xray flag and hited object. - * This structure is created during ray cast and passed as argument + * This structure is created during ray cast and passed as argument * "data" to functions KX_GameObject::NeedRayCast and KX_GameObject::RayHit. */ struct RayCastData; @@ -174,21 +174,21 @@ public: * Compute an OpenGl compatible 4x4 matrix. Has the * side effect of storing the result internally. The * memory for the matrix remains the property of this class. - */ + */ float * GetOpenGLMatrix( ); /** - * Return a pointer to a MT_CmMatrix4x4 storing the + * Return a pointer to a MT_CmMatrix4x4 storing the * opengl transformation for this object. This is updated - * by a call to GetOpenGLMatrix(). This class owns the + * by a call to GetOpenGLMatrix(). This class owns the * memory for the returned matrix. */ MT_CmMatrix4x4 * GetOpenGLMatrixPtr( - ) { + ) { return &m_OpenGL_4x4Matrix; }; @@ -209,11 +209,11 @@ public: std::vector<bRigidBodyJointConstraint*> GetConstraints(); void ClearConstraints(); - /** - * Get a pointer to the game object that is the parent of + /** + * Get a pointer to the game object that is the parent of * this object. Or NULL if there is no parent. The returned * object is part of a reference counting scheme. Calling - * this function ups the reference count on the returned + * this function ups the reference count on the returned * object. It is the responsibility of the caller to decrement * the reference count when you have finished with it. */ @@ -221,12 +221,12 @@ public: GetParent( ); - /** + /** * Sets the parent of this object to a game object */ void SetParent(KX_Scene *scene, KX_GameObject *obj, bool addToCompound=true, bool ghost=true); - /** + /** * Removes the parent of this object to a game object */ void RemoveParent(KX_Scene *scene); @@ -250,8 +250,8 @@ public: void AddInstanceObjects(KX_GameObject* ); - - void + + void RemoveDupliGroupObject( ); @@ -332,7 +332,7 @@ public: *********************************/ /** - * Construct a game object. This class also inherits the + * Construct a game object. This class also inherits the * default constructors - use those with care! */ @@ -341,13 +341,13 @@ public: SG_Callbacks callbacks ); - virtual + virtual ~KX_GameObject( ); - /** + /** * \section Stuff which is here due to poor design. - * Inherited from CValue and needs an implementation. + * Inherited from CValue and needs an implementation. * Do not expect these functions do to anything sensible. */ @@ -373,7 +373,7 @@ public: /** * Inherited from CValue -- does nothing! */ - const + const STR_String & GetText( ); @@ -387,7 +387,7 @@ public: /** * \section Inherited from CValue. These are the useful - * part of the CValue interface that this class implements. + * part of the CValue interface that this class implements. */ /** @@ -405,35 +405,35 @@ public: const char *name ); - /** + /** * Inherited from CValue -- return a new copy of this - * instance allocated on the heap. Ownership of the new + * instance allocated on the heap. Ownership of the new * object belongs with the caller. */ virtual CValue* GetReplica( ); - + /** - * Inherited from CValue -- Makes sure any internal + * Inherited from CValue -- Makes sure any internal * data owned by this class is deep copied. Called internally */ virtual void ProcessReplica(); - /** + /** * Return the linear velocity of the game object. */ - MT_Vector3 + MT_Vector3 GetLinearVelocity( bool local=false ); - /** + /** * Return the linear velocity of a given point in world coordinate * but relative to center of object ([0,0,0]=center of object) */ - MT_Vector3 + MT_Vector3 GetVelocity( const MT_Point3& position ); @@ -450,25 +450,25 @@ public: MT_Vector3 GetLocalInertia(); - /** + /** * Return the angular velocity of the game object. */ - MT_Vector3 + MT_Vector3 GetAngularVelocity( bool local=false ); - /** + /** * Align the object to a given normal. */ - void + void AlignAxisToVect( const MT_Vector3& vect, int axis = 2, float fac = 1.0 ); - /** + /** * Quick'n'dirty obcolor ipo stuff */ @@ -481,7 +481,7 @@ public: GetObjectColor(); - void + void ResolveCombinedVelocities( const MT_Vector3 & lin_vel, const MT_Vector3 & ang_vel, @@ -496,7 +496,7 @@ public: PHY_IPhysicsController* GetPhysicsController(); void SetPhysicsController(PHY_IPhysicsController* physicscontroller,bool isDynamic) - { + { m_bDyna = isDynamic; m_pPhysicsController = physicscontroller; } @@ -511,15 +511,15 @@ public: } /** - * \return a pointer to the graphic controller owner by this class + * \return a pointer to the graphic controller owner by this class */ PHY_IGraphicController* GetGraphicController() { return m_pGraphicController; } - void SetGraphicController(PHY_IGraphicController* graphiccontroller) - { + void SetGraphicController(PHY_IGraphicController* graphiccontroller) + { m_pGraphicController = graphiccontroller; } /* @@ -577,13 +577,13 @@ public: * \section scene graph node accessor functions. */ - SG_Node* GetSGNode( ) - { + SG_Node* GetSGNode( ) + { return m_pSGNode; } const SG_Node* GetSGNode( ) const - { + { return m_pSGNode; } @@ -610,9 +610,9 @@ public: { m_pBlenderGroupObject = obj; } - + bool IsDupliGroup() - { + { return (m_pBlenderObject && (m_pBlenderObject->transflag & OB_DUPLIGROUP) && m_pBlenderObject->dup_group != NULL) ? true : false; @@ -627,14 +627,14 @@ public: * node. */ void SetSGNode(SG_Node* node ) - { - m_pSGNode = node; + { + m_pSGNode = node; } - + //Is it a dynamic/physics object ? - bool IsDynamic() const - { - return m_bDyna; + bool IsDynamic() const + { + return m_bDyna; } bool IsDynamicsSuspended() const; @@ -670,7 +670,7 @@ public: /** * \section Physics accessors for this node. * - * All these calls get passed directly to the physics controller + * All these calls get passed directly to the physics controller * owned by this object. * This is real interface bloat. Why not just use the physics controller * directly? I think this is because the python interface is in the wrong @@ -743,7 +743,7 @@ public: /** * Function to set IPO option at start of IPO - */ + */ void InitIPO( bool ipo_as_force, @@ -753,16 +753,16 @@ public: /** * Odd function to update an ipo. ??? - */ + */ void UpdateIPO( float curframetime, bool recurse ); /** - * Updates Material Ipo data + * Updates Material Ipo data */ - void + void UpdateMaterialData( dword matname_hash, MT_Vector4 rgba, @@ -785,7 +785,7 @@ public: void AddMeshUser( ); - + /** * Update buckets with data about the mesh after * creating or duplicating the object, changing @@ -841,8 +841,8 @@ public: RAS_MeshObject* GetMesh( int num - ) const { - return m_meshes[num]; + ) const { + return m_meshes[num]; } /** @@ -851,10 +851,10 @@ public: */ int GetMeshCount( - ) const { - return m_meshes.size(); + ) const { + return m_meshes.size(); } - + /** * Set the debug color of the meshes associated with this * class. Does this still work? @@ -864,7 +864,7 @@ public: unsigned int bgra ); - /** + /** * Reset the debug color of meshes associated with this class. */ void @@ -904,7 +904,7 @@ public: SetCulled( bool c ) { m_bCulled = c; } - + /** * Is this object an occluder? */ @@ -921,7 +921,7 @@ public: bool v, bool recursive ); - + /** * Change the layer of the object (when it is added in another layer * than the original layer) @@ -938,7 +938,7 @@ public: GetLayer( void ); - + /** * Get the negative scaling state */ @@ -973,14 +973,14 @@ public: { m_pObstacleSimulation = NULL; } - + /** * add debug object to the debuglist. */ void SetUseDebugProperties(bool debug, bool recursive); KX_ClientObjectInfo* getClientInfo() { return m_pClient_info; } - + CListValue* GetChildren(); CListValue* GetChildrenRecursive(); @@ -1047,10 +1047,10 @@ public: KX_PYMETHOD_DOC(KX_GameObject, getActionName); KX_PYMETHOD_DOC(KX_GameObject, setActionFrame); KX_PYMETHOD_DOC(KX_GameObject, isPlayingAction); - + /* Dict access */ KX_PYMETHOD_VARARGS(KX_GameObject,get); - + /* attributes */ static PyObject* pyattr_get_name(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef); static PyObject* pyattr_get_parent(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef); @@ -1130,7 +1130,7 @@ public: static PyObject* pyattr_get_sensors(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef); static PyObject* pyattr_get_controllers(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef); static PyObject* pyattr_get_actuators(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef); - + /* getitem/setitem */ static PyMappingMethods Mapping; static PySequenceMethods Sequence; |