Panda3D
 All Classes Functions Variables Enumerations
physxForceFieldShapeGroup.h
1 // Filename: physxForceFieldShapeGroup.h
2 // Created by: enn0x (11Nov09)
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 PHYSXFORCEFIELDSHAPEGROUP_H
16 #define PHYSXFORCEFIELDSHAPEGROUP_H
17 
18 #include "pandabase.h"
19 
20 #include "physxObject.h"
21 #include "physxEnums.h"
22 
23 #include "physx_includes.h"
24 
25 class PhysxScene;
26 class PhysxForceField;
30 
31 ////////////////////////////////////////////////////////////////////
32 // Class : PhysxForceFieldShapeGroup
33 // Description :
34 ////////////////////////////////////////////////////////////////////
35 class EXPCL_PANDAPHYSX PhysxForceFieldShapeGroup : public PhysxObject, public PhysxEnums {
36 
37 PUBLISHED:
39  INLINE ~PhysxForceFieldShapeGroup();
40 
41  void save_to_desc(PhysxForceFieldShapeGroupDesc &groupDesc) const;
42 
43  PhysxScene *get_scene() const;
44  PhysxForceField *get_force_field() const;
45  const char *get_name() const;
46 
47  void set_name(const char *name);
48 
49  // Shapes
50  unsigned int get_num_shapes() const;
52  PhysxForceFieldShape *get_shape(unsigned int idx) const;
53  MAKE_SEQ(get_shapes, get_num_shapes, get_shape);
54 
55 ////////////////////////////////////////////////////////////////////
56 PUBLISHED:
57  void release();
58 
59  INLINE void ls() const;
60  INLINE void ls(ostream &out, int indent_level=0) const;
61 
62 public:
63  INLINE NxForceFieldShapeGroup *ptr() const { return _ptr; };
64 
65  void link(NxForceFieldShapeGroup *ptr);
66  void unlink();
67 
69 
70 private:
71  NxForceFieldShapeGroup *_ptr;
72  string _name;
73 
74 ////////////////////////////////////////////////////////////////////
75 public:
76  static TypeHandle get_class_type() {
77  return _type_handle;
78  }
79  static void init_type() {
80  PhysxObject::init_type();
81  register_type(_type_handle, "PhysxForceFieldShapeGroup",
82  PhysxObject::get_class_type());
83  }
84  virtual TypeHandle get_type() const {
85  return get_class_type();
86  }
87  virtual TypeHandle force_init_type() {
88  init_type();
89  return get_class_type();
90  }
91 
92 private:
93  static TypeHandle _type_handle;
94 };
95 
96 #include "physxForceFieldShapeGroup.I"
97 
98 #endif // PHYSXFORCEFIELDSHAPEGROUP_H
Abstract base class for descriptors for force field shapes descriptors.
A scene is a collection of bodies, constraints, and effectors which can interact. ...
Definition: physxScene.h:73
Abstract base class for force field shapes.
This class exists just to provide scoping for the enums shared by PhysX classes.
Definition: physxEnums.h:357
A force field effector.
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85