Panda3D

physxPointInPlaneJoint.h

00001 // Filename: physxPointInPlaneJoint.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 PHYSXPOINTINPLANEJOINT_H
00016 #define PHYSXPOINTINPLANEJOINT_H
00017 
00018 #include "pandabase.h"
00019 
00020 #include "physxJoint.h"
00021 #include "physx_includes.h"
00022 
00023 class PhysxPointInPlaneJointDesc;
00024 
00025 ////////////////////////////////////////////////////////////////////
00026 //       Class : PhysxPointInPlaneJoint
00027 // Description : A point in plane joint constrains a point on one
00028 //               body to only move inside a plane attached to another
00029 //               body. 
00030 //               The starting point of the point is defined as the
00031 //               anchor point. The plane through this point is
00032 //               specified by its normal which is the joint axis
00033 //               vector.
00034 ////////////////////////////////////////////////////////////////////
00035 class EXPCL_PANDAPHYSX PhysxPointInPlaneJoint : public PhysxJoint {
00036 
00037 PUBLISHED:
00038   INLINE PhysxPointInPlaneJoint();
00039   INLINE ~PhysxPointInPlaneJoint();
00040 
00041   void save_to_desc(PhysxPointInPlaneJointDesc &jointDesc) const;
00042   void load_from_desc(const PhysxPointInPlaneJointDesc &jointDesc);
00043 
00044 ////////////////////////////////////////////////////////////////////
00045 public:
00046   INLINE NxJoint *ptr() const { return (NxJoint *)_ptr; };
00047 
00048   void link(NxJoint *jointPtr);
00049   void unlink();
00050 
00051 private:
00052   NxPointInPlaneJoint *_ptr;
00053 
00054 ////////////////////////////////////////////////////////////////////
00055 public:
00056   static TypeHandle get_class_type() {
00057     return _type_handle;
00058   }
00059   static void init_type() {
00060     PhysxJoint::init_type();
00061     register_type(_type_handle, "PhysxPointInPlaneJoint", 
00062                   PhysxJoint::get_class_type());
00063   }
00064   virtual TypeHandle get_type() const {
00065     return get_class_type();
00066   }
00067   virtual TypeHandle force_init_type() {
00068     init_type();
00069     return get_class_type();
00070   }
00071 
00072 private:
00073   static TypeHandle _type_handle;
00074 };
00075 
00076 #include "physxPointInPlaneJoint.I"
00077 
00078 #endif // PHYSXPOINTINPLANEJOINT_H
 All Classes Functions Variables Enumerations