Panda3D

physxFixedJoint.h

00001 // Filename: physxFixedJoint.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 PHYSXFIXEDJOINT_H
00016 #define PHYSXFIXEDJOINT_H
00017 
00018 #include "pandabase.h"
00019 
00020 #include "physxJoint.h"
00021 #include "physx_includes.h"
00022 
00023 class PhysxFixedJointDesc;
00024 
00025 ////////////////////////////////////////////////////////////////////
00026 //       Class : PhysxFixedJoint
00027 // Description : A fixed joint permits no relative movement between
00028 //               two bodies. ie the bodies are glued together. 
00029 ////////////////////////////////////////////////////////////////////
00030 class EXPCL_PANDAPHYSX PhysxFixedJoint : public PhysxJoint {
00031 
00032 PUBLISHED:
00033   INLINE PhysxFixedJoint();
00034   INLINE ~PhysxFixedJoint();
00035 
00036   void save_to_desc(PhysxFixedJointDesc &jointDesc) const;
00037   void load_from_desc(const PhysxFixedJointDesc &jointDesc);
00038 
00039 ////////////////////////////////////////////////////////////////////
00040 public:
00041   INLINE NxJoint *ptr() const { return (NxJoint *)_ptr; };
00042 
00043   void link(NxJoint *jointPtr);
00044   void unlink();
00045 
00046 private:
00047   NxFixedJoint *_ptr;
00048 
00049 ////////////////////////////////////////////////////////////////////
00050 public:
00051   static TypeHandle get_class_type() {
00052     return _type_handle;
00053   }
00054   static void init_type() {
00055     PhysxJoint::init_type();
00056     register_type(_type_handle, "PhysxFixedJoint", 
00057                   PhysxJoint::get_class_type());
00058   }
00059   virtual TypeHandle get_type() const {
00060     return get_class_type();
00061   }
00062   virtual TypeHandle force_init_type() {
00063     init_type();
00064     return get_class_type();
00065   }
00066 
00067 private:
00068   static TypeHandle _type_handle;
00069 };
00070 
00071 #include "physxFixedJoint.I"
00072 
00073 #endif // PHYSXFIXEDJOINT_H
 All Classes Functions Variables Enumerations