Panda3D
physxMaterialDesc.h
1 // Filename: physxMaterialDesc.h
2 // Created by: enn0x (21Sep09)
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 PHYSXMATERIALDESC_H
16 #define PHYSXMATERIALDESC_H
17 
18 #include "pandabase.h"
19 
20 #include "physxEnums.h"
21 #include "physx_includes.h"
22 
23 ////////////////////////////////////////////////////////////////////
24 // Class : PhysxMaterialDesc
25 // Description : Descriptor class for materials. See PhysxMaterial.
26 ////////////////////////////////////////////////////////////////////
27 class EXPCL_PANDAPHYSX PhysxMaterialDesc : public PhysxEnums {
28 
29 PUBLISHED:
30  INLINE PhysxMaterialDesc();
31  INLINE ~PhysxMaterialDesc();
32 
33  INLINE void set_to_default();
34  INLINE bool is_valid() const;
35 
36  void set_dynamic_friction(float coef);
37  void set_static_friction(float coef);
38  void set_restitution(float rest);
39  void set_dynamic_friction_v(float coef);
40  void set_static_friction_v(float coef);
41  void set_dir_of_anisotropy(const LVector3f dir);
42  void set_flag(PhysxMaterialFlag flag, bool value);
43  void set_friction_combine_mode(PhysxCombineMode mode);
44  void set_restitution_combine_mode(PhysxCombineMode mode);
45 
46  float get_dynamic_friction() const;
47  float get_static_friction() const;
48  float get_restitution() const;
49  float get_dynamic_friction_v() const;
50  float get_static_friction_v() const;
51  LVector3f get_dir_of_anisotropy() const;
52  bool get_flag(PhysxMaterialFlag flag) const;
53  PhysxCombineMode get_friction_combine_mode() const;
54  PhysxCombineMode get_restitution_combine_mode() const;
55 
56 public:
57  NxMaterialDesc _desc;
58 };
59 
60 #include "physxMaterialDesc.I"
61 
62 #endif // PHYSXMATERIALDESC_H
Descriptor class for materials.
This is a three-component vector distance (as opposed to a three-component point, which represents a ...
Definition: lvector3.h:100
This class exists just to provide scoping for the enums shared by PhysX classes.
Definition: physxEnums.h:357