Panda3D

physxVehicle.h

00001 // Filename: physxVehicle.h
00002 // Created by:  enn0x (23Mar10)
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 PHYSXVEHICLE_H
00016 #define PHYSXVEHICLE_H
00017 
00018 #include "pandabase.h"
00019 #include "pointerToArray.h"
00020 
00021 #include "physxObject.h"
00022 #include "physx_includes.h"
00023 
00024 class PhysxActor;
00025 class PhysxWheel;
00026 class PhysxVehicleDesc;
00027 class PhysxScene;
00028 
00029 ////////////////////////////////////////////////////////////////////
00030 //       Class : PhysxVehicle
00031 // Description : 
00032 ////////////////////////////////////////////////////////////////////
00033 class EXPCL_PANDAPHYSX PhysxVehicle : public PhysxObject {
00034 
00035 PUBLISHED:
00036   INLINE PhysxVehicle();
00037   INLINE ~PhysxVehicle();
00038 
00039   //PhysxActor *get_actor() const;
00040 
00041   //unsigned int get_num_wheels() const;
00042   //PhysxWheel *get_wheel(unsigned int idx) const;
00043   //MAKE_SEQ(get_wheels, get_num_wheels, get_wheel);
00044 
00045   INLINE void ls() const;
00046   INLINE void ls(ostream &out, int indent_level=0) const;
00047 
00048 private:
00049 
00050 ////////////////////////////////////////////////////////////////////
00051 PUBLISHED:
00052   void release();
00053 
00054 public:
00055   void create(PhysxScene *scene, PhysxVehicleDesc &desc);
00056   void update_vehicle(float dt);
00057 
00058 private:
00059   PTA(PT(PhysxWheel)) _wheels;
00060   PT(PhysxActor) _actor;
00061   PT(PhysxScene) _scene;
00062 
00063 ////////////////////////////////////////////////////////////////////
00064 public:
00065   static TypeHandle get_class_type() {
00066     return _type_handle;
00067   }
00068   static void init_type() {
00069     PhysxObject::init_type();
00070     register_type(_type_handle, "PhysxVehicle", 
00071                   PhysxObject::get_class_type());
00072   }
00073   virtual TypeHandle get_type() const {
00074     return get_class_type();
00075   }
00076   virtual TypeHandle force_init_type() {
00077     init_type();
00078     return get_class_type();
00079   }
00080 
00081 private:
00082   static TypeHandle _type_handle;
00083 };
00084 
00085 #include "physxVehicle.I"
00086 
00087 #endif // PHYSXVEHICLE_H
 All Classes Functions Variables Enumerations