Panda3D
physxForceFieldShapeGroup.h
Go to the documentation of this file.
1 /**
2  * PANDA 3D SOFTWARE
3  * Copyright (c) Carnegie Mellon University. All rights reserved.
4  *
5  * All use of this software is subject to the terms of the revised BSD
6  * license. You should have received a copy of this license along
7  * with this source code in a file named "LICENSE."
8  *
9  * @file physxForceFieldShapeGroup.h
10  * @author enn0x
11  * @date 2009-11-11
12  */
13 
14 #ifndef PHYSXFORCEFIELDSHAPEGROUP_H
15 #define PHYSXFORCEFIELDSHAPEGROUP_H
16 
17 #include "pandabase.h"
18 
19 #include "physxObject.h"
20 #include "physxEnums.h"
21 
22 #include "physx_includes.h"
23 
24 class PhysxScene;
25 class PhysxForceField;
29 
30 /**
31  *
32  */
33 class EXPCL_PANDAPHYSX PhysxForceFieldShapeGroup : public PhysxObject, public PhysxEnums {
34 
35 PUBLISHED:
37  INLINE ~PhysxForceFieldShapeGroup();
38 
39  void save_to_desc(PhysxForceFieldShapeGroupDesc &groupDesc) const;
40 
41  PhysxScene *get_scene() const;
42  PhysxForceField *get_force_field() const;
43  const char *get_name() const;
44 
45  void set_name(const char *name);
46 
47  // Shapes
48  unsigned int get_num_shapes() const;
50  PhysxForceFieldShape *get_shape(unsigned int idx) const;
51  MAKE_SEQ(get_shapes, get_num_shapes, get_shape);
52 
53 PUBLISHED:
54  void release();
55 
56  INLINE void ls() const;
57  INLINE void ls(std::ostream &out, int indent_level=0) const;
58 
59 public:
60  INLINE NxForceFieldShapeGroup *ptr() const { return _ptr; };
61 
62  void link(NxForceFieldShapeGroup *ptr);
63  void unlink();
64 
66 
67 private:
68  NxForceFieldShapeGroup *_ptr;
69  std::string _name;
70 
71 public:
72  static TypeHandle get_class_type() {
73  return _type_handle;
74  }
75  static void init_type() {
76  PhysxObject::init_type();
77  register_type(_type_handle, "PhysxForceFieldShapeGroup",
78  PhysxObject::get_class_type());
79  }
80  virtual TypeHandle get_type() const {
81  return get_class_type();
82  }
83  virtual TypeHandle force_init_type() {
84  init_type();
85  return get_class_type();
86  }
87 
88 private:
89  static TypeHandle _type_handle;
90 };
91 
93 
94 #endif // PHYSXFORCEFIELDSHAPEGROUP_H
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Abstract base class for descriptors for force field shapes descriptors.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
Definition: register_type.I:22
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A scene is a collection of bodies, constraints, and effectors which can interact.
Definition: physxScene.h:69
Abstract base class for force field shapes.
This class exists just to provide scoping for the enums shared by PhysX classes.
Definition: physxEnums.h:355
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A force field effector.
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:81
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.