Panda3D
 All Classes Functions Variables Enumerations
physxConvexShape.h
00001 // Filename: physxConvexShape.h
00002 // Created by:  enn0x (14Oct09)
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 PHYSXCONVEXSHAPE_H
00016 #define PHYSXCONVEXSHAPE_H
00017 
00018 #include "pandabase.h"
00019 
00020 #include "physxShape.h"
00021 #include "physx_includes.h"
00022 
00023 class PhysxConvexShapeDesc;
00024 
00025 ////////////////////////////////////////////////////////////////////
00026 //       Class : PhysxConvexShape
00027 // Description : A shapes which is used to represent an instance of
00028 //               an convex mesh.
00029 ////////////////////////////////////////////////////////////////////
00030 class EXPCL_PANDAPHYSX PhysxConvexShape : public PhysxShape {
00031 
00032 PUBLISHED:
00033   INLINE PhysxConvexShape();
00034   INLINE ~PhysxConvexShape();
00035 
00036   void save_to_desc(PhysxConvexShapeDesc &shapeDesc) const;
00037 
00038 ////////////////////////////////////////////////////////////////////
00039 public:
00040   INLINE NxShape *ptr() const { return (NxShape *)_ptr; };
00041 
00042   void link(NxShape *shapePtr);
00043   void unlink();
00044 
00045 private:
00046   NxConvexShape *_ptr;
00047 
00048 ////////////////////////////////////////////////////////////////////
00049 public:
00050   static TypeHandle get_class_type() {
00051     return _type_handle;
00052   }
00053   static void init_type() {
00054     PhysxShape::init_type();
00055     register_type(_type_handle, "PhysxConvexShape", 
00056                   PhysxShape::get_class_type());
00057   }
00058   virtual TypeHandle get_type() const {
00059     return get_class_type();
00060   }
00061   virtual TypeHandle force_init_type() {
00062     init_type();
00063     return get_class_type();
00064   }
00065 
00066 private:
00067   static TypeHandle _type_handle;
00068 };
00069 
00070 #include "physxConvexShape.I"
00071 
00072 #endif // PHYSXCONVEXSHAPE_H
 All Classes Functions Variables Enumerations