PxMaterial.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved.
3  *
4  * NVIDIA CORPORATION and its licensors retain all intellectual property
5  * and proprietary rights in and to this software, related documentation
6  * and any modifications thereto. Any use, reproduction, disclosure or
7  * distribution of this software and related documentation without an express
8  * license agreement from NVIDIA CORPORATION is strictly prohibited.
9  */
10 // Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
11 // Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
12 
13 
14 #ifndef PX_PHYSICS_NXMATERIAL
15 #define PX_PHYSICS_NXMATERIAL
16 
20 #include "PxPhysXConfig.h"
21 #include "common/PxBase.h"
22 
23 #ifndef PX_DOXYGEN
24 namespace physx
25 {
26 #endif
27 
28 class PxScene;
29 
36 {
37  enum Enum
38  {
39 
43  eDISABLE_FRICTION = 1 << 0,
44 
63  eDISABLE_STRONG_FRICTION = 1 << 1
64  };
65 };
66 
74 
75 
76 
96 {
97  enum Enum
98  {
99  eAVERAGE = 0,
100  eMIN = 1,
101  eMULTIPLY = 2,
102  eMAX = 3,
103  eN_VALUES = 4,
104  ePAD_32 = 0x7fffffff
105  };
106 };
107 
113 class PxMaterial : public PxBase
114 {
115 public:
116 
124  virtual void release() = 0;
125 
134  virtual PxU32 getReferenceCount() const = 0;
135 
147  virtual void setDynamicFriction(PxReal coef) = 0;
148 
156  virtual PxReal getDynamicFriction() const = 0;
157 
169  virtual void setStaticFriction(PxReal coef) = 0;
170 
177  virtual PxReal getStaticFriction() const = 0;
178 
190  virtual void setRestitution(PxReal rest) = 0;
191 
201  virtual PxReal getRestitution() const = 0;
202 
214  virtual void setFlag(PxMaterialFlag::Enum flag, bool) = 0;
215 
216 
225  virtual void setFlags( PxMaterialFlags inFlags ) = 0;
226 
234  virtual PxMaterialFlags getFlags() const = 0;
235 
247  virtual void setFrictionCombineMode(PxCombineMode::Enum combMode) = 0;
248 
258  virtual PxCombineMode::Enum getFrictionCombineMode() const = 0;
259 
271  virtual void setRestitutionCombineMode(PxCombineMode::Enum combMode) = 0;
272 
282  virtual PxCombineMode::Enum getRestitutionCombineMode() const = 0;
283 
284  //public variables:
285  void* userData;
286 
287  virtual const char* getConcreteTypeName() const { return "PxMaterial"; }
288 
289 protected:
290  PX_INLINE PxMaterial(PxType concreteType, PxBaseFlags baseFlags) : PxBase(concreteType, baseFlags), userData(NULL) {}
291  PX_INLINE PxMaterial(PxBaseFlags baseFlags) : PxBase(baseFlags) {}
292  virtual ~PxMaterial() {}
293  virtual bool isKindOf(const char* name) const { return !strcmp("PxMaterial", name) || PxBase::isKindOf(name); }
294 
295 };
296 
297 #ifndef PX_DOXYGEN
298 } // namespace physx
299 #endif
300 
302 #endif


Copyright © 2008-2015 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved. www.nvidia.com