Panda3D

physxCylindricalJoint.h

00001 // Filename: physxCylindricalJoint.h
00002 // Created by:  enn0x (02Oct09)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 #ifndef PHYSXCYLINDRICALJOINT_H
00016 #define PHYSXCYLINDRICALJOINT_H
00017 
00018 #include "pandabase.h"
00019 
00020 #include "physxJoint.h"
00021 #include "physx_includes.h"
00022 
00023 class PhysxCylindricalJointDesc;
00024 
00025 ////////////////////////////////////////////////////////////////////
00026 //       Class : PhysxCylindricalJoint
00027 // Description : Cylindrical Joints permit relative translational
00028 //               movement between two bodies along an axis, and also
00029 //               relative rotation along the axis. 
00030 ////////////////////////////////////////////////////////////////////
00031 class EXPCL_PANDAPHYSX PhysxCylindricalJoint : public PhysxJoint {
00032 
00033 PUBLISHED:
00034   INLINE PhysxCylindricalJoint();
00035   INLINE ~PhysxCylindricalJoint();
00036 
00037   void save_to_desc(PhysxCylindricalJointDesc &jointDesc) const;
00038   void load_from_desc(const PhysxCylindricalJointDesc &jointDesc);
00039 
00040 ////////////////////////////////////////////////////////////////////
00041 public:
00042   INLINE NxJoint *ptr() const { return (NxJoint *)_ptr; };
00043 
00044   void link(NxJoint *jointPtr);
00045   void unlink();
00046 
00047 private:
00048   NxCylindricalJoint *_ptr;
00049 
00050 ////////////////////////////////////////////////////////////////////
00051 public:
00052   static TypeHandle get_class_type() {
00053     return _type_handle;
00054   }
00055   static void init_type() {
00056     PhysxJoint::init_type();
00057     register_type(_type_handle, "PhysxCylindricalJoint", 
00058                   PhysxJoint::get_class_type());
00059   }
00060   virtual TypeHandle get_type() const {
00061     return get_class_type();
00062   }
00063   virtual TypeHandle force_init_type() {
00064     init_type();
00065     return get_class_type();
00066   }
00067 
00068 private:
00069   static TypeHandle _type_handle;
00070 };
00071 
00072 #include "physxCylindricalJoint.I"
00073 
00074 #endif // PHYSXCYLINDRICALJOINT_H
 All Classes Functions Variables Enumerations