14#ifndef PHYSXMATERIAL_H
15#define PHYSXMATERIAL_H
44class EXPCL_PANDAPHYSX PhysxMaterial :
public PhysxObject,
public PhysxEnums {
47 INLINE PhysxMaterial();
48 INLINE ~PhysxMaterial();
62 void set_flag(PhysxMaterialFlag flag,
bool value);
72 bool get_flag(PhysxMaterialFlag flag)
const;
76 INLINE
void ls()
const;
77 INLINE
void ls(std::ostream &out,
int indent_level=0)
const;
83 INLINE NxMaterial *ptr()
const {
return _ptr; };
85 void link(NxMaterial *ptr);
95 static void init_type() {
96 PhysxObject::init_type();
98 PhysxObject::get_class_type());
101 return get_class_type();
105 return get_class_type();
This class exists just to provide scoping for the enums shared by PhysX classes.
Descriptor class for materials.
void set_restitution_combine_mode(PhysxCombineMode mode)
Sets the restitution combine mode.
void set_dynamic_friction_v(float coef)
Sets the dynamic friction coefficient along the secondary (V) axis.
void load_from_desc(const PhysxMaterialDesc &materialDesc)
Loads the entire state of the material from a descriptor with a single call.
float get_restitution() const
Returns the coefficient of restitution.
float get_static_friction() const
Returns the coefficient of static friction.
PhysxScene * get_scene() const
Returns the scene that owns this material.
PhysxCombineMode get_restitution_combine_mode() const
Returns the restitution combine mode.
void set_dir_of_anisotropy(const LVector3f dir)
Sets the shape space direction (unit vector) of anisotropy.
void set_restitution(float rest)
Sets the coefficient of restitution.
bool get_flag(PhysxMaterialFlag flag) const
Returns the value of a single flag.
PhysxCombineMode get_friction_combine_mode() const
Returns the friction combine mode.
float get_static_friction_v() const
Returns the static friction coefficient for the V direction.
LVector3f get_dir_of_anisotropy() const
Returns the direction of anisotropy value.
float get_dynamic_friction_v() const
Returns the dynamic friction coefficient for the V direction.
void set_dynamic_friction(float coef)
Sets the coefficient of dynamic friction.
void set_static_friction_v(float coef)
Sets the static friction coefficient along the secondary (V) axis.
void save_to_desc(PhysxMaterialDesc &materialDesc) const
Saves the state of the material object to a descriptor.
void set_static_friction(float coef)
Sets the coefficient of static friction.
float get_dynamic_friction() const
Returns the DynamicFriction value.
unsigned short get_material_index() const
Returns the material index for this material.
void set_friction_combine_mode(PhysxCombineMode mode)
Sets the friction combine mode.
void set_flag(PhysxMaterialFlag flag, bool value)
Sets the value of a single flag.
A scene is a collection of bodies, constraints, and effectors which can interact.
TypeHandle is the identifier used to differentiate C++ class types.
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.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...