Panda3D
 All Classes Functions Variables Enumerations
physxShapeDesc.h
1 // Filename: physxShapeDesc.h
2 // Created by: enn0x (08Sep09)
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 PHYSXSHAPEDESC_H
16 #define PHYSXSHAPEDESC_H
17 
18 #include "pandabase.h"
19 #include "luse.h"
20 
21 #include "physxEnums.h"
22 #include "physx_includes.h"
23 
24 class PhysxMaterial;
25 
26 ////////////////////////////////////////////////////////////////////
27 // Class : PhysxShapeDesc
28 // Description : Abstract base class for shape descriptors.
29 // Descriptors for all the different shape types are
30 // derived from this class.
31 ////////////////////////////////////////////////////////////////////
32 class EXPCL_PANDAPHYSX PhysxShapeDesc : public PhysxEnums, public ReferenceCount {
33 
34 PUBLISHED:
35  virtual void set_to_default() = 0;
36  virtual bool is_valid() const = 0;
37 
38  void set_name(const char *name);
39  void set_trigger(bool value);
40  void set_local_pos(const LPoint3f &pos);
41  void set_local_mat(const LMatrix4f &mat);
42  void set_local_hpr(float h, float p, float r);
43  void set_skin_width(float skinWidth);
44  void set_shape_flag(const PhysxShapeFlag flag, bool value);
45  void set_mass(float mass);
46  void set_density(float density);
47  void set_group(unsigned short group);
48  void set_material(const PhysxMaterial &material);
49  void set_material_index(unsigned short index);
50 
51  const char *get_name() const;
52  LPoint3f get_local_pos() const;
53  LMatrix4f get_local_mat() const;
54  float get_skin_width() const;
55  bool get_shape_flag(const PhysxShapeFlag flag) const;
56  float get_mass() const;
57  float get_density() const;
58  unsigned short get_group() const;
59  unsigned short get_material_index() const;
60 
61 public:
62  virtual NxShapeDesc *ptr() const = 0;
63 
64 private:
65  string _name;
66 
67 protected:
68  INLINE PhysxShapeDesc();
69  INLINE ~PhysxShapeDesc();
70 };
71 
72 #include "physxShapeDesc.I"
73 
74 #endif // PHYSXSHAPEDESC_H
This is a three-component point in space (as opposed to a three-component vector, which represents a ...
Definition: lpoint3.h:99
A class for describing a shape's surface properties.
Definition: physxMaterial.h:51
This class exists just to provide scoping for the enums shared by PhysX classes.
Definition: physxEnums.h:357
This is a 4-by-4 transform matrix.
Definition: lmatrix.h:451
A base class for all things that want to be reference-counted.
Abstract base class for shape descriptors.