Panda3D

physxBoxController.h

00001 // Filename: physxBoxController.h
00002 // Created by:  enn0x (24Sep09)
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 PHYSXBOXCONTROLLER_H
00016 #define PHYSXBOXCONTROLLER_H
00017 
00018 #include "pandabase.h"
00019 #include "luse.h"
00020 
00021 #include "physxController.h"
00022 #include "physx_includes.h"
00023 
00024 ////////////////////////////////////////////////////////////////////
00025 //       Class : PhysxBoxController
00026 // Description : Box character controller.
00027 ////////////////////////////////////////////////////////////////////
00028 class EXPCL_PANDAPHYSX PhysxBoxController : public PhysxController {
00029 
00030 PUBLISHED:
00031   INLINE PhysxBoxController();
00032   INLINE ~PhysxBoxController();
00033 
00034   void set_extents(const LVector3f &extents);
00035   LVector3f get_extents() const;
00036 
00037 ////////////////////////////////////////////////////////////////////
00038 public:
00039   INLINE NxController *ptr() const { return (NxController *)_ptr; };
00040 
00041   void link(NxController *controllerPtr);
00042   void unlink();
00043 
00044 private:
00045   NxBoxController *_ptr;
00046 
00047 ////////////////////////////////////////////////////////////////////
00048 public:
00049   static TypeHandle get_class_type() {
00050     return _type_handle;
00051   }
00052   static void init_type() {
00053     PhysxController::init_type();
00054     register_type(_type_handle, "PhysxBoxController", 
00055                   PhysxController::get_class_type());
00056   }
00057   virtual TypeHandle get_type() const {
00058     return get_class_type();
00059   }
00060   virtual TypeHandle force_init_type() {
00061     init_type();
00062     return get_class_type();
00063   }
00064 
00065 private:
00066   static TypeHandle _type_handle;
00067 };
00068 
00069 #include "physxBoxController.I"
00070 
00071 #endif // PHYSXBOXCONTROLLER_H
 All Classes Functions Variables Enumerations