Om  1.0.0
A universal framework for multimedia simulation
Public Member Functions | Static Public Attributes | List of all members
om::physics::base::PhysicsMaterial Class Reference

A class that describes the physical and simulated properties of a type of material. More...

#include <omPhysicsMaterial.h>

Public Member Functions

 PhysicsMaterial ()
 Create a material with the default material parameters. More...
 
Float getDensity () const
 Return the density of this material in mass units (kg) over length units (m) cubed. More...
 
void setDensity (Float newDensity)
 Set the density of this material in mass units (kg) over length units (m) cubed. More...
 
Float getElasticity () const
 Return the coefficient of restitution of this material. More...
 
void setElasticity (Float newElasticity)
 Set the coefficient of restitution of this material. More...
 
Float getCaptureVelocity () const
 Return the capture velocity of this material. More...
 
void setCaptureVelocity (Float newCaptureVelocity)
 Return the capture velocity of this material. More...
 
Float getYieldVelocity () const
 Return the yield velocity of this material. More...
 
void setYieldVelocity (Float newYieldVelocity)
 Return the yield velocity of this material. More...
 
Float getKineticFriction () const
 Return the coefficient of kinetic friction for this material. More...
 
void setKineticFriction (Float newKineticFriction)
 Set the coefficient of kinetic friction for this material. More...
 
Float getStaticFriction () const
 Return the coefficient of static friction for this material. More...
 
void setStaticFriction (Float newStaticFriction)
 Set the coefficient of static friction for this material. More...
 
Float getStaticFrictionThreshold () const
 Return the relative speed threshold below which static friction is in effect. More...
 
void setStaticFrictionThreshold (Float newStaticFrictionThreshold)
 Set the relative speed threshold below which static friction is in effect. More...
 
Float getRollingFriction () const
 Return the coefficient of rolling friction for this material. More...
 
void setRollingFriction (Float newRollingFriction)
 Set the coefficient of rolling friction for this material. More...
 

Static Public Attributes

static const PhysicsMaterial DEFAULT
 The default physics material. More...
 
static const ResourceType RESOURCE_TYPE
 The resource type for a physics material. More...
 

Detailed Description

A class that describes the physical and simulated properties of a type of material.

Constructor & Destructor Documentation

om::physics::base::PhysicsMaterial::PhysicsMaterial ( )

Create a material with the default material parameters.

Member Function Documentation

Float om::physics::base::PhysicsMaterial::getDensity ( ) const
inline

Return the density of this material in mass units (kg) over length units (m) cubed.

void om::physics::base::PhysicsMaterial::setDensity ( Float  newDensity)
inline

Set the density of this material in mass units (kg) over length units (m) cubed.

The density of the material is clamped to the range [0,+infinity).

Float om::physics::base::PhysicsMaterial::getElasticity ( ) const
inline

Return the coefficient of restitution of this material.

A value of 0 indicates that this material undergoes totally inelastic collisions, while a value of 1 indicates that collisions are highly elastic.

void om::physics::base::PhysicsMaterial::setElasticity ( Float  newElasticity)
inline

Set the coefficient of restitution of this material.

This value is clamped to the range [0,1]. A value of 0 indicates that this material undergoes totally inelastic collisions, while a value of 1 indicates that collisions are perfectly elastic.

Float om::physics::base::PhysicsMaterial::getCaptureVelocity ( ) const
inline

Return the capture velocity of this material.

void om::physics::base::PhysicsMaterial::setCaptureVelocity ( Float  newCaptureVelocity)
inline

Return the capture velocity of this material.

This value is clamped to the range [0,infinity).

Float om::physics::base::PhysicsMaterial::getYieldVelocity ( ) const
inline

Return the yield velocity of this material.

void om::physics::base::PhysicsMaterial::setYieldVelocity ( Float  newYieldVelocity)
inline

Return the yield velocity of this material.

This value is clamped to the range [0,infinity).

Float om::physics::base::PhysicsMaterial::getKineticFriction ( ) const
inline

Return the coefficient of kinetic friction for this material.

This value indicates the coefficient of friction to be used when the relative speed between two objects is greater than the static friction threshold.

void om::physics::base::PhysicsMaterial::setKineticFriction ( Float  newKineticFriction)
inline

Set the coefficient of kinetic friction for this material.

This value indicates the coefficient of friction to be used when the relative speed between two objects is greater than the static friction threshold. This value is clamped to the range of [0,+infinity).

Float om::physics::base::PhysicsMaterial::getStaticFriction ( ) const
inline

Return the coefficient of static friction for this material.

This value indicates the coefficient of friction to be used when the relative speed between two objects is less than the static friction threshold.

void om::physics::base::PhysicsMaterial::setStaticFriction ( Float  newStaticFriction)
inline

Set the coefficient of static friction for this material.

This value indicates the coefficient of friction to be used when the relative speed between two objects is less than the static friction threshold. This value is clamped to the range of [0,+infinity).

Float om::physics::base::PhysicsMaterial::getStaticFrictionThreshold ( ) const
inline

Return the relative speed threshold below which static friction is in effect.

This value indicates the maximum relative speed at the point of collision between two objects where static friction has effect. If the relative speed is greater than this value, kinetic friction is observed.

void om::physics::base::PhysicsMaterial::setStaticFrictionThreshold ( Float  newStaticFrictionThreshold)
inline

Set the relative speed threshold below which static friction is in effect.

This value indicates the maximum relative speed at the point of collision between two objects where static friction has effect. If the relative speed is greater than this value, kinetic friction is observed. This value is clamped to the range of [0,+infinity).

Float om::physics::base::PhysicsMaterial::getRollingFriction ( ) const
inline

Return the coefficient of rolling friction for this material.

void om::physics::base::PhysicsMaterial::setRollingFriction ( Float  newRollingFriction)
inline

Set the coefficient of rolling friction for this material.

This value is clamped to the range of [0,+infinity).

Member Data Documentation

const PhysicsMaterial om::physics::base::PhysicsMaterial::DEFAULT
static

The default physics material.

const ResourceType om::physics::base::PhysicsMaterial::RESOURCE_TYPE
static

The resource type for a physics material.


The documentation for this class was generated from the following file: