Panda3D
Public Member Functions | Public Attributes
PhysxMaterialDesc Class Reference

Descriptor class for materials. More...

#include "physxMaterialDesc.h"

Inheritance diagram for PhysxMaterialDesc:
PhysxEnums

List of all members.

Public Member Functions

LVector3f get_dir_of_anisotropy () const
 Returns the shape space direction (unit vector) of anisotropy.
float get_dynamic_friction () const
 Returns the coefficient of dynamic friction.
float get_dynamic_friction_v () const
 Returns the anisotropic dynamic 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.
PhysxCombineMode get_friction_combine_mode () const
 Returns the friction combine mode.
float get_restitution () const
 Returns the coefficient of restitution.
PhysxCombineMode get_restitution_combine_mode () const
 Returns the restitution combine mode.
float get_static_friction () const
 Retruns the coefficient of static friction.
float get_static_friction_v () const
 Returns the anisotropic static friction coefficient for along the secondary (V) axis of anisotropy.
bool is_valid () const
 Returns true if the descriptor is valid.
void set_dir_of_anisotropy (const LVector3f dir)
 Sets the shape space direction (unit vector) of anisotropy.
void set_dynamic_friction (float coef)
 Sets the coefficient of dynamic friction -- should be in [0, +inf].
void set_dynamic_friction_v (float coef)
 Sets the anisotropic dynamic friction coefficient for along the secondary (V) axis of anisotropy.
void set_flag (PhysxMaterialFlag flag, bool value)
 Sets flags which control the behavior of a material.
void set_friction_combine_mode (PhysxCombineMode mode)
 Sets the friction combine mode.
void set_restitution (float rest)
 Sets the coefficient of restitution -- 0 makes the object bounce as little as possible, higher values up to 1.0 result in more bounce.
void set_restitution_combine_mode (PhysxCombineMode mode)
 Sets the restitution combine mode.
void set_static_friction (float coef)
 Sets the coefficient of static friction -- should be in [0, +inf].
void set_static_friction_v (float coef)
 Sets the anisotropic static friction coefficient for along the secondary (V) axis of anisotropy.
void set_to_default ()
 (re)sets the structure to the default.

Public Attributes

NxMaterialDesc _desc

Detailed Description

Descriptor class for materials.

See PhysxMaterial.

Definition at line 27 of file physxMaterialDesc.h.


Member Function Documentation

Returns the shape space direction (unit vector) of anisotropy.

Definition at line 232 of file physxMaterialDesc.cxx.

References PhysxManager::nxVec3_to_vec3().

Returns the coefficient of dynamic friction.

Definition at line 183 of file physxMaterialDesc.cxx.

Returns the anisotropic dynamic friction coefficient for along the secondary (V) axis of anisotropy.

Definition at line 208 of file physxMaterialDesc.cxx.

bool PhysxMaterialDesc::get_flag ( PhysxMaterialFlag  flag) const

Returns flags which control the behavior of a material.

Definition at line 220 of file physxMaterialDesc.cxx.

PhysxEnums::PhysxCombineMode PhysxMaterialDesc::get_friction_combine_mode ( ) const

Returns the friction combine mode.

Definition at line 243 of file physxMaterialDesc.cxx.

Returns the coefficient of restitution.

Definition at line 161 of file physxMaterialDesc.cxx.

PhysxEnums::PhysxCombineMode PhysxMaterialDesc::get_restitution_combine_mode ( ) const

Returns the restitution combine mode.

Definition at line 254 of file physxMaterialDesc.cxx.

Retruns the coefficient of static friction.

Definition at line 172 of file physxMaterialDesc.cxx.

Returns the anisotropic static friction coefficient for along the secondary (V) axis of anisotropy.

Definition at line 195 of file physxMaterialDesc.cxx.

bool PhysxMaterialDesc::is_valid ( ) const [inline]

Returns true if the descriptor is valid.

Definition at line 54 of file physxMaterialDesc.I.

Referenced by PhysxScene::create_material().

Sets the shape space direction (unit vector) of anisotropy.

This is only used if the flag MF_anisotropic is set.

Definition at line 120 of file physxMaterialDesc.cxx.

References PhysxManager::vec3_to_nxVec3().

Sets the coefficient of dynamic friction -- should be in [0, +inf].

If set to greater than staticFriction, the effective value of staticFriction will be increased to match. If the flag MF_anisotropic is set, then this value is used for the primary direction of anisotropy (U axis).

Definition at line 61 of file physxMaterialDesc.cxx.

Sets the anisotropic dynamic friction coefficient for along the secondary (V) axis of anisotropy.

This is only used if the flag MF_anisotropic is set.

Definition at line 89 of file physxMaterialDesc.cxx.

void PhysxMaterialDesc::set_flag ( PhysxMaterialFlag  flag,
bool  value 
)

Sets flags which control the behavior of a material.

Definition at line 101 of file physxMaterialDesc.cxx.

Referenced by PhysxScene::get_wheel_shape_material().

void PhysxMaterialDesc::set_friction_combine_mode ( PhysxCombineMode  mode)

Sets the friction combine mode.

  • CM_average : Average: (a + b)/2.
  • CM_min : Minimum: min(a,b).
  • CM_multiply : Multiply: a*b.
  • CM_max : Maximum: max(a,b).

Definition at line 135 of file physxMaterialDesc.cxx.

void PhysxMaterialDesc::set_restitution ( float  restitution)

Sets the coefficient of restitution -- 0 makes the object bounce as little as possible, higher values up to 1.0 result in more bounce.

Note that values close to or above 1 may cause stability problems and/or increasing energy. Range: [0,1] Default: 0.0

Definition at line 29 of file physxMaterialDesc.cxx.

void PhysxMaterialDesc::set_restitution_combine_mode ( PhysxCombineMode  mode)

Sets the restitution combine mode.

  • CM_average : Average: (a + b)/2.
  • CM_min : Minimum: min(a,b).
  • CM_multiply : Multiply: a*b.
  • CM_max : Maximum: max(a,b).

Definition at line 150 of file physxMaterialDesc.cxx.

Sets the coefficient of static friction -- should be in [0, +inf].

If the flag MF_anisotropic is set, then this value is used for the primary direction of anisotropy (U axis).

Definition at line 44 of file physxMaterialDesc.cxx.

Sets the anisotropic static friction coefficient for along the secondary (V) axis of anisotropy.

This is only used if the flag MF_anisotropic is set.

Definition at line 75 of file physxMaterialDesc.cxx.

(re)sets the structure to the default.

Definition at line 43 of file physxMaterialDesc.I.


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations