newspeoplefor developersdocumentationdownloads

balljoint.h

Go to the documentation of this file.
00001 #ifndef PHYSICS_BALLJOINT_H
00002 #define PHYSICS_BALLJOINT_H
00003 //------------------------------------------------------------------------------
00011 #include "physics/joint.h"
00012 
00013 //------------------------------------------------------------------------------
00014 namespace Physics
00015 {
00016 class BallJoint : public Joint
00017 {
00018     DeclareRtti;
00019     DeclareFactory(BallJoint);
00020 
00021 public:
00023     BallJoint();
00025     virtual ~BallJoint();
00027     virtual void Attach(dWorldID worldID, dJointGroupID groupID, const matrix44& m);
00029     virtual void UpdateTransform(const matrix44& m);
00031     virtual void RenderDebug();
00033     void SetAnchor(const vector3& v);
00035     const vector3& GetAnchor() const;
00036 
00037 private:
00038     vector3 anchor;
00039 };
00040 
00041 RegisterFactory(BallJoint);
00042 
00043 //------------------------------------------------------------------------------
00046 inline
00047 void 
00048 BallJoint::SetAnchor(const vector3& v)
00049 {
00050     this->anchor = v;
00051 }
00052 
00053 //------------------------------------------------------------------------------
00056 inline
00057 const vector3& 
00058 BallJoint::GetAnchor() const
00059 {
00060     return this->anchor;
00061 }
00062 
00063 }; // namespace Physics
00064 //------------------------------------------------------------------------------
00065 #endif

Copyright © 1999-2005 by the contributing authors. Ideas, requests, problems: Send feedback.