ScummVM API documentation
hpl::cSurfaceData Class Reference

Public Member Functions

 cSurfaceData (const tString &asName, cPhysics *apPhysics, cResources *apResources)
 
const tStringGetName () const
 
void OnImpact (float afSpeed, const cVector3f &avPos, int alContacts, iPhysicsBody *apBody)
 
void OnSlide (float afSpeed, const cVector3f &avPos, int alContacts, iPhysicsBody *apBody, iPhysicsBody *apSlideAgainstBody)
 
void CreateImpactEffect (float afSpeed, const cVector3f &avPos, int alContacts, cSurfaceData *apSecondSurface)
 
void UpdateRollEffect (iPhysicsBody *apBody)
 
void SetElasticity (float afElasticity)
 
float GetElasticity () const
 
void SetStaticFriction (float afElasticity)
 
float GetStaticFriction () const
 
void SetKineticFriction (float afElasticity)
 
float GetKineticFriction () const
 
void SetPriority (int alPriority)
 
int GetPriority () const
 
void SetFrictionCombMode (ePhysicsMaterialCombMode aMode)
 
ePhysicsMaterialCombMode GetFrictionCombMode () const
 
void SetElasticityCombMode (ePhysicsMaterialCombMode aMode)
 
ePhysicsMaterialCombMode GetElasticityCombMode () const
 
const tStringGetStepType ()
 
void GetStepType (const tString &asX)
 
void SetMinScrapeSpeed (float afX)
 
void SetMinScrapeFreq (float afX)
 
void SetMinScrapeFreqSpeed (float afX)
 
void SetMaxScrapeFreq (float afX)
 
void SetMaxScrapeFreqSpeed (float afX)
 
void SetMiddleScrapeSpeed (float afX)
 
void SetMinScrapeContacts (int alX)
 
void SetScrapeSoundName (const tString &asName)
 
void SetMinRollSpeed (float afX)
 
void SetMinRollFreq (float afX)
 
void SetMinRollVolume (float afX)
 
void SetMinRollFreqSpeed (float afX)
 
void SetMaxRollFreq (float afX)
 
void SetMaxRollVolume (float afX)
 
void SetMaxRollFreqSpeed (float afX)
 
void SetMiddleRollSpeed (float afX)
 
void SetRollSoundName (const tString &asName)
 
void SetRollAxisFlags (tFlag aAxisFlags)
 
void PreloadData ()
 
iPhysicsMaterialToMaterial (iPhysicsWorld *apWorld)
 
cSurfaceImpactDataCreateImpactData (float afMinSpeed)
 
cSurfaceImpactDataGetImpactData (int alIdx)
 
int GetImpactDataNum ()
 
cSurfaceImpactDataGetImpactDataFromSpeed (float afSpeed)
 
cSurfaceImpactDataCreateHitData (float afMinSpeed)
 
cSurfaceImpactDataGetHitData (int alIdx)
 
int GetHitDataNum ()
 
cSurfaceImpactDataGetHitDataFromSpeed (float afSpeed)
 

Protected Attributes

cResourcesmpResources
 
cPhysicsmpPhysics
 
tString msName
 
ePhysicsMaterialCombMode mFrictionMode
 
ePhysicsMaterialCombMode mElasticityMode
 
float mfElasticity
 
float mfStaticFriction
 
float mfKineticFriction
 
int mlPriority
 
float mfMinScrapeSpeed
 
float mfMinScrapeFreq
 
float mfMinScrapeFreqSpeed
 
float mfMaxScrapeFreq
 
float mfMaxScrapeFreqSpeed
 
float mfMiddleScrapeSpeed
 
int mlMinScrapeContacts
 
tString msScrapeSoundName
 
float mfMinRollSpeed
 
float mfMinRollFreq
 
float mfMinRollVolume
 
float mfMinRollFreqSpeed
 
float mfMaxRollFreq
 
float mfMaxRollVolume
 
float mfMaxRollFreqSpeed
 
float mfMiddleRollSpeed
 
int mlMinRollContacts
 
tString msRollSoundName
 
tFlag mRollAxisFlags
 
tString msStepType
 
tSurfaceImpactDataVec mvImpactData
 
tSurfaceImpactDataVec mvHitData
 

Member Function Documentation

◆ CreateImpactData()

cSurfaceImpactData* hpl::cSurfaceData::CreateImpactData ( float  afMinSpeed)

This must be added with the largest speed first.

◆ GetImpactDataFromSpeed()

cSurfaceImpactData* hpl::cSurfaceData::GetImpactDataFromSpeed ( float  afSpeed)

Gets the the appropriate impact data depending on speed. It gets the data with highest speed not higher than afSpeed

Parameters
afSpeedThe speed value.
Returns

◆ CreateHitData()

cSurfaceImpactData* hpl::cSurfaceData::CreateHitData ( float  afMinSpeed)

This must be added with the largest speed first.

◆ GetHitDataFromSpeed()

cSurfaceImpactData* hpl::cSurfaceData::GetHitDataFromSpeed ( float  afSpeed)

Gets the the appropriate hit data depending on speed. It gets the data with highest speed not higher than afSpeed

Parameters
afSpeedThe speed value.
Returns

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