Panda3D
physxConvexForceFieldShape.h
1 // Filename: physxConvexForceFieldShape.h
2 // Created by: enn0x (15Nov09)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef PHYSXCONVEXFORCEFIELDSHAPE_H
16 #define PHYSXCONVEXFORCEFIELDSHAPE_H
17 
18 #include "pandabase.h"
19 
20 #include "physxForceFieldShape.h"
21 #include "physx_includes.h"
22 
24 
25 ////////////////////////////////////////////////////////////////////
26 // Class : PhysxConvexForceFieldShape
27 // Description : A convex shaped region used to define force field.
28 ////////////////////////////////////////////////////////////////////
29 class EXPCL_PANDAPHYSX PhysxConvexForceFieldShape : public PhysxForceFieldShape {
30 
31 PUBLISHED:
33  INLINE ~PhysxConvexForceFieldShape();
34 
35  void save_to_desc(PhysxConvexForceFieldShapeDesc &shapeDesc) const;
36 
37 ////////////////////////////////////////////////////////////////////
38 public:
39  INLINE NxForceFieldShape *ptr() const { return (NxForceFieldShape *)_ptr; };
40 
41  void link(NxForceFieldShape *shapePtr);
42  void unlink();
43 
44 private:
45  NxConvexForceFieldShape *_ptr;
46 
47 ////////////////////////////////////////////////////////////////////
48 public:
49  static TypeHandle get_class_type() {
50  return _type_handle;
51  }
52  static void init_type() {
53  PhysxForceFieldShape::init_type();
54  register_type(_type_handle, "PhysxConvexForceFieldShape",
55  PhysxForceFieldShape::get_class_type());
56  }
57  virtual TypeHandle get_type() const {
58  return get_class_type();
59  }
60  virtual TypeHandle force_init_type() {
61  init_type();
62  return get_class_type();
63  }
64 
65 private:
66  static TypeHandle _type_handle;
67 };
68 
69 #include "physxConvexForceFieldShape.I"
70 
71 #endif // PHYSXCONVEXFORCEFIELDSHAPE_H
A descriptor for a convex force field shape.
A convex shaped region used to define force field.
Abstract base class for force field shapes.
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85