Panda3D
Loading...
Searching...
No Matches
physxMaterialDesc.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 physxMaterialDesc.h
10 * @author enn0x
11 * @date 2009-09-21
12 */
13
14#ifndef PHYSXMATERIALDESC_H
15#define PHYSXMATERIALDESC_H
16
17#include "pandabase.h"
18
19#include "physxEnums.h"
20#include "physx_includes.h"
21
22/**
23 * Descriptor class for materials. See PhysxMaterial.
24 */
25class EXPCL_PANDAPHYSX PhysxMaterialDesc : public PhysxEnums {
26
27PUBLISHED:
28 INLINE PhysxMaterialDesc();
29 INLINE ~PhysxMaterialDesc();
30
31 INLINE void set_to_default();
32 INLINE bool is_valid() const;
33
34 void set_dynamic_friction(float coef);
35 void set_static_friction(float coef);
36 void set_restitution(float rest);
37 void set_dynamic_friction_v(float coef);
38 void set_static_friction_v(float coef);
39 void set_dir_of_anisotropy(const LVector3f dir);
40 void set_flag(PhysxMaterialFlag flag, bool value);
41 void set_friction_combine_mode(PhysxCombineMode mode);
42 void set_restitution_combine_mode(PhysxCombineMode mode);
43
44 float get_dynamic_friction() const;
45 float get_static_friction() const;
46 float get_restitution() const;
47 float get_dynamic_friction_v() const;
48 float get_static_friction_v() const;
49 LVector3f get_dir_of_anisotropy() const;
50 bool get_flag(PhysxMaterialFlag flag) const;
51 PhysxCombineMode get_friction_combine_mode() const;
52 PhysxCombineMode get_restitution_combine_mode() const;
53
54public:
55 NxMaterialDesc _desc;
56};
57
58#include "physxMaterialDesc.I"
59
60#endif // PHYSXMATERIALDESC_H
This class exists just to provide scoping for the enums shared by PhysX classes.
Definition physxEnums.h:355
void set_dynamic_friction_v(float coef)
Sets the anisotropic dynamic friction coefficient for along the secondary (V) axis of anisotropy.
void set_dynamic_friction(float coef)
Sets the coefficient of dynamic friction – should be in [0, +inf].
float get_restitution() const
Returns the coefficient of restitution.
void set_restitution(float rest)
Sets the coefficient of restitution – 0 makes the object bounce as little as possible,...
void set_friction_combine_mode(PhysxCombineMode mode)
Sets the friction combine mode.
float get_dynamic_friction_v() const
Returns the anisotropic dynamic friction coefficient for along the secondary (V) axis of anisotropy.
void set_restitution_combine_mode(PhysxCombineMode mode)
Sets the restitution combine mode.
float get_dynamic_friction() const
Returns the coefficient of dynamic friction.
void set_static_friction(float coef)
Sets the coefficient of static friction – should be in [0, +inf].
float get_static_friction() const
Retruns the coefficient of static friction.
void set_flag(PhysxMaterialFlag flag, bool value)
Sets flags which control the behavior of a material.
void set_dir_of_anisotropy(const LVector3f dir)
Sets the shape space direction (unit vector) of anisotropy.
PhysxCombineMode get_friction_combine_mode() const
Returns the friction combine mode.
LVector3f get_dir_of_anisotropy() const
Returns the shape space direction (unit vector) of anisotropy.
bool is_valid() const
Returns true if the descriptor is valid.
PhysxCombineMode get_restitution_combine_mode() const
Returns the restitution combine mode.
float get_static_friction_v() const
Returns the anisotropic static friction coefficient for along the secondary (V) axis of anisotropy.
void set_static_friction_v(float coef)
Sets the anisotropic static friction coefficient for along the secondary (V) axis of anisotropy.
bool get_flag(PhysxMaterialFlag flag) const
Returns flags which control the behavior of a material.
void set_to_default()
(re)sets the structure to the default.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.