Panda3D
 All Classes Functions Variables Enumerations
physxCapsuleForceFieldShape.h
1 // Filename: physxCapsuleForceFieldShape.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 PHYSXCAPSULEFORCEFIELDSHAPE_H
16 #define PHYSXCAPSULEFORCEFIELDSHAPE_H
17 
18 #include "pandabase.h"
19 #include "luse.h"
20 
21 #include "physxForceFieldShape.h"
22 #include "physx_includes.h"
23 
25 
26 ////////////////////////////////////////////////////////////////////
27 // Class : PhysxCapsuleForceFieldShape
28 // Description : A capsule shaped region used to define a force
29 // field.
30 ////////////////////////////////////////////////////////////////////
31 class EXPCL_PANDAPHYSX PhysxCapsuleForceFieldShape : public PhysxForceFieldShape {
32 
33 PUBLISHED:
35  INLINE ~PhysxCapsuleForceFieldShape();
36 
37  void save_to_desc(PhysxCapsuleForceFieldShapeDesc &shapeDesc) const;
38 
39  void set_radius(float radius);
40  void set_height(float height);
41 
42  float get_radius() const;
43  float get_height() const;
44 
45 ////////////////////////////////////////////////////////////////////
46 public:
47  INLINE NxForceFieldShape *ptr() const { return (NxForceFieldShape *)_ptr; };
48 
49  void link(NxForceFieldShape *shapePtr);
50  void unlink();
51 
52 private:
53  NxCapsuleForceFieldShape *_ptr;
54 
55 ////////////////////////////////////////////////////////////////////
56 public:
57  static TypeHandle get_class_type() {
58  return _type_handle;
59  }
60  static void init_type() {
61  PhysxForceFieldShape::init_type();
62  register_type(_type_handle, "PhysxCapsuleForceFieldShape",
63  PhysxForceFieldShape::get_class_type());
64  }
65  virtual TypeHandle get_type() const {
66  return get_class_type();
67  }
68  virtual TypeHandle force_init_type() {
69  init_type();
70  return get_class_type();
71  }
72 
73 private:
74  static TypeHandle _type_handle;
75 };
76 
77 #include "physxCapsuleForceFieldShape.I"
78 
79 #endif // PHYSXCAPSULEFORCEFIELDSHAPE_H
Abstract base class for force field shapes.
A capsule shaped region used to define a force field.
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85
Descriptor for a capsule force field shape.