Project

General

Profile

SO3Engine
OgreNewt::MaterialPair Class Reference

define interaction between materials More...

#include <OgreNewt_MaterialPair.h>

Public Member Functions

 MaterialPair (const World *world, const MaterialID *mat1, const MaterialID *mat2)
 constructor
 
 ~MaterialPair ()
 destructor
 
void setDefaultSoftness (Ogre::Real softness) const
 set default softness for the material pair.
 
void setDefaultElasticity (Ogre::Real elasticity) const
 set default elasticity for the material pair.
 
void setDefaultCollidable (int state) const
 set default collision for the material pair.
 
void setDefaultSurfaceThickness (float thickness) const
 set the default thickness for this material pair
 
void setDefaultFriction (Ogre::Real stat, Ogre::Real kinetic) const
 set default friction for the material pair.
 
void setContactCallback (OgreNewt::ContactCallback *callback)
 assign a custom collision callback.
 

Protected Attributes

const MaterialIDid0
 
const MaterialIDid1
 
const Worldm_world
 
OgreNewt::ContactCallbackm_contactcallback
 

Detailed Description

define interaction between materials

this class represents a pair of Newton MaterialGroupIDs, which is used to define interaction bewteen materials.

Definition at line 31 of file OgreNewt_MaterialPair.h.

Constructor & Destructor Documentation

◆ MaterialPair()

OgreNewt::MaterialPair::MaterialPair ( const World world,
const MaterialID mat1,
const MaterialID mat2 
)

constructor

creates an object representing a pair of materials, and defining how they will interact.

Parameters
worldpointer to the OgreNewt::World
mat1pointer to first materialID
mat2pointer to second materialID

Definition at line 9 of file OgreNewt_MaterialPair.cpp.

◆ ~MaterialPair()

OgreNewt::MaterialPair::~MaterialPair ( )

destructor

Definition at line 17 of file OgreNewt_MaterialPair.cpp.

Member Function Documentation

◆ setContactCallback()

void OgreNewt::MaterialPair::setContactCallback ( OgreNewt::ContactCallback callback)

assign a custom collision callback.

ContactCallbacks allow for custom interaction between bodies of specific materials.

Parameters
callbackpointer to a user-created ContactCallback object

Definition at line 22 of file OgreNewt_MaterialPair.cpp.

◆ setDefaultCollidable()

void OgreNewt::MaterialPair::setDefaultCollidable ( int  state) const
inline

set default collision for the material pair.

Definition at line 57 of file OgreNewt_MaterialPair.h.

◆ setDefaultElasticity()

void OgreNewt::MaterialPair::setDefaultElasticity ( Ogre::Real  elasticity) const
inline

set default elasticity for the material pair.

Definition at line 54 of file OgreNewt_MaterialPair.h.

◆ setDefaultFriction()

void OgreNewt::MaterialPair::setDefaultFriction ( Ogre::Real  stat,
Ogre::Real  kinetic 
) const
inline

set default friction for the material pair.

Definition at line 63 of file OgreNewt_MaterialPair.h.

◆ setDefaultSoftness()

void OgreNewt::MaterialPair::setDefaultSoftness ( Ogre::Real  softness) const
inline

set default softness for the material pair.

Definition at line 51 of file OgreNewt_MaterialPair.h.

◆ setDefaultSurfaceThickness()

void OgreNewt::MaterialPair::setDefaultSurfaceThickness ( float  thickness) const
inline

set the default thickness for this material pair

Definition at line 60 of file OgreNewt_MaterialPair.h.

Member Data Documentation

◆ id0

const MaterialID* OgreNewt::MaterialPair::id0
protected

Definition at line 74 of file OgreNewt_MaterialPair.h.

◆ id1

const MaterialID* OgreNewt::MaterialPair::id1
protected

Definition at line 75 of file OgreNewt_MaterialPair.h.

◆ m_contactcallback

OgreNewt::ContactCallback* OgreNewt::MaterialPair::m_contactcallback
protected

Definition at line 77 of file OgreNewt_MaterialPair.h.

◆ m_world

const World* OgreNewt::MaterialPair::m_world
protected

Definition at line 76 of file OgreNewt_MaterialPair.h.


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