HPL3/Amnesia: Rebirth/Scripting/iPhysicsWorld

From Frictional Wiki
< HPL3‎ | Amnesia: Rebirth‎ | Scripting
Revision as of 00:45, 16 November 2020 by Abion47 (talk | contribs) (Created page with "{{ScriptingStub}} Have some helpful descriptions to add to this class? Edit this page and add your insight to the Wiki! ==Fields== iPhysicsWorld has no public fields. ==Fun...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Have some helpful descriptions to add to this class? Edit this page and add your insight to the Wiki!

Fields

iPhysicsWorld has no public fields.

Functions

Return Type Function And Description
float CastRayOnShape(iCollideShape@ apShape, const cMatrixf &in a_mtxTransform, const cVector3f &in avOrigin, const cVector3f &in avEnd, cVector3f &out avOutNormal, bool abLocalRayPositions)
bool CheckShapeCollision(iCollideShape@ apShapeA, const cMatrixf &in a_mtxA, iCollideShape@ apShapeB, const cMatrixf &in a_mtxB, cCollideData &inout aCollideData, int alMaxPoints, bool abCorrectNormalDirection, int alThreadID = 0)
bool CheckShapeWorldCollision(cVector3f &out avPushVector, iCollideShape@ apShape, const cMatrixf &in a_mtxTransform, iPhysicsBody@ apSkipBody, bool abSkipStatic, bool abIsCharacter, bool abCollideCharacter)
bool CheckShapeWorldCollision(cVector3f &out avPushVector, iCollideShape@ apShape, const cMatrixf &in a_mtxTransform, iPhysicsBody@ apSkipBody, bool abSkipStatic)
iPhysicsBody CreateBody(const tString &in asName, iCollideShape@ apShape, float afMass)
tID CreateBodyID(const tString &in asName, iCollideShape@ apShape, float afMass)
iCollideShape CreateBoxShape(const cVector3f &in avSize, cMatrixf &in a_mtxOffsetMtx)
iCollideShape CreateCapsuleShape(float afRadius, float afHeight, cMatrixf &in a_mtxOffsetMtx)
iCharacterBody CreateCharacterBody(const tString &in asName, const cVector3f &in avSize)
tID CreateCharacterBodyID(const tString &in asName, const cVector3f &in avSize)
iPhysicsCloth CreateCloth(const tString &in asName, const cVector3f &in avStartPos, const cVector2f &in avClothSize, int alDimension)
iCollideShape CreateCompundShape(array<iCollideShape@> avShapes)
iPhysicsController CreateController(const tString &in asName)
iCollideShape CreateCylinderShape(float afRadius, float afHeight, cMatrixf &in a_mtxOffsetMtx)
iPhysicsJointBall CreateJointBall(const tString &in asName, const cVector3f &in avPivotPoint, const cVector3f &in avPinDir, iPhysicsBody@ apParentBody, iPhysicsBody@ apChildBody)
tID CreateJointBallID(const tString &in asName, const cVector3f &in avPivotPoint, const cVector3f &in avPinDir, iPhysicsBody@ apParentBody, iPhysicsBody@ apChildBody)
iPhysicsJointHinge CreateJointHinge(const tString &in asName, const cVector3f &in avPivotPoint, const cVector3f &in avPinDir, iPhysicsBody@ apParentBody, iPhysicsBody@ apChildBody)
tID CreateJointHingeID(const tString &in asName, const cVector3f &in avPivotPoint, const cVector3f &in avPinDir, iPhysicsBody@ apParentBody, iPhysicsBody@ apChildBody)
iPhysicsJointSlider CreateJointSlider(const tString &in asName, const cVector3f &in avPivotPoint, const cVector3f &in avPinDir, iPhysicsBody@ apParentBody, iPhysicsBody@ apChildBody)
tID CreateJointSliderID(const tString &in asName, const cVector3f &in avPivotPoint, const cVector3f &in avPinDir, iPhysicsBody@ apParentBody, iPhysicsBody@ apChildBody)
iPhysicsMaterial CreateMaterial(const tString &in asName)
iCollideShape CreateMeshShape(iVertexBuffer@ apVtxBuffer)
iPhysicsRope CreateRope(const tString &in asName, const cVector3f &in avStartPos, const cVector3f &in avEndPos)
iCollideShape CreateSphereShape(const cVector3f &in avRadii, cMatrixf &in a_mtxOffsetMtx)
void DestroyBody(iPhysicsBody@ apBody)
void DestroyCharacterBody(iCharacterBody@ apBody)
void DestroyCloth(iPhysicsCloth@ apCloth)
void DestroyController(iPhysicsController@ apController)
void DestroyJoint(iPhysicsJoint@ apJoint)
void DestroyRope(iPhysicsRope@ apRope)
void DestroyShape(iCollideShape@ apShape)
void EnableBodiesInAABB(const cVector3f &in avMin, const cVector3f &in avMax, bool abEnabled)
void FadeoutAllLoopSounds(float afFadeSpeed)
ePhysicsAccuracy GetAccuracyLevel()
void GetBodiesInAABB(const cVector3f &in avMin, const cVector3f &in avMax, array<iPhysicsBody@> apBodyVec)
iPhysicsBody GetBody(const tString &in asName)
iPhysicsBody GetCharacterBody(const tString &in asName)
iCharacterBody GetCharacterBodyFromID(tID aID)
iPhysicsCloth GetCloth(const tString &in asName)
iPhysicsCloth GetClothFromUniqueID(int alID)
cVector3f GetGravity()
iPhysicsJoint GetJoint(const tString &in asName)
iPhysicsMaterial GetMaterialFromId(int alId)
iPhysicsMaterial GetMaterialFromName(const tString &in asName)
float GetMaxTimeStep()
int GetNumberOfThreads()
iPhysicsBody GetPhysicsBodyFromID(tID aID)
iPhysicsJoint GetPhysicsJointFromID(tID aID)
iPhysicsRope GetRope(const tString &in asName)
iPhysicsRope GetRopeFromUniqueID(int alID)
cVector3f GetWorldSizeMax()
cVector3f GetWorldSizeMin()
bool JointExists(iPhysicsJoint@ apJoint)
iCollideShape LoadMeshShapeFromBuffer(cBinaryBuffer@ apBuffer)
void PostUpdate(float afTimeStep)
void RenderDebugGeometry(iLowLevelGraphics@ apLowLevel)
void RenderShapeDebugGeometry(iCollideShape@ apShape, const cMatrixf &in a_mtxTransform, iLowLevelGraphics@ apLowLevel, const cColor &in aColor)
void SaveMeshShapeToBuffer(iCollideShape@ apMeshShape, cBinaryBuffer@ apBuffer)
void SetAccuracyLevel(ePhysicsAccuracy aAccuracy)
void SetGravity(const cVector3f &in avGravity)
void SetMaxTimeStep(float afTimeStep)
void SetNumberOfThreads(int alThreads)
void SetWorldSize(const cVector3f &in avMin, const cVector3f &in avMax)

Details

CastRayOnShape

float CastRayOnShape(iCollideShape@ apShape,
                     const cMatrixf &in a_mtxTransform,
                     const cVector3f &in avOrigin,
                     const cVector3f &in avEnd,
                     cVector3f &out avOutNormal,
                     bool abLocalRayPositions)


Parameters

Returns:

  • float

CheckShapeCollision

bool CheckShapeCollision(iCollideShape@ apShapeA,
                         const cMatrixf &in a_mtxA,
                         iCollideShape@ apShapeB,
                         const cMatrixf &in a_mtxB,
                         cCollideData &inout aCollideData,
                         int alMaxPoints,
                         bool abCorrectNormalDirection,
                         int alThreadID = 0)


Parameters

Returns:

  • bool

CheckShapeWorldCollision

bool CheckShapeWorldCollision(cVector3f &out avPushVector,
                              iCollideShape@ apShape,
                              const cMatrixf &in a_mtxTransform,
                              iPhysicsBody@ apSkipBody,
                              bool abSkipStatic,
                              bool abIsCharacter,
                              bool abCollideCharacter)


Parameters

Returns:

  • bool

CheckShapeWorldCollision

bool CheckShapeWorldCollision(cVector3f &out avPushVector,
                              iCollideShape@ apShape,
                              const cMatrixf &in a_mtxTransform,
                              iPhysicsBody@ apSkipBody,
                              bool abSkipStatic)


Parameters

Returns:

  • bool

CreateBody

iPhysicsBody@ CreateBody(const tString &in asName,
                         iCollideShape@ apShape,
                         float afMass)


Parameters

Returns:

  • iPhysicsBody@

CreateBodyID

tID CreateBodyID(const tString &in asName,
                 iCollideShape@ apShape,
                 float afMass)


Parameters

Returns:

  • tID

CreateBoxShape

iCollideShape@ CreateBoxShape(const cVector3f &in avSize,
                              cMatrixf &in a_mtxOffsetMtx)


Parameters

Returns:

  • iCollideShape@

CreateCapsuleShape

iCollideShape@ CreateCapsuleShape(float afRadius,
                                  float afHeight,
                                  cMatrixf &in a_mtxOffsetMtx)


Parameters

  • afRadius (float) —
  • afHeight (float) —
  • a_mtxOffsetMtx (cMatrixf) —

Returns:

  • iCollideShape@

CreateCharacterBody

iCharacterBody@ CreateCharacterBody(const tString &in asName,
                                    const cVector3f &in avSize)


Parameters

Returns:

  • iCharacterBody@

CreateCharacterBodyID

tID CreateCharacterBodyID(const tString &in asName,
                          const cVector3f &in avSize)


Parameters

Returns:

  • tID

CreateCloth

iPhysicsCloth@ CreateCloth(const tString &in asName,
                           const cVector3f &in avStartPos,
                           const cVector2f &in avClothSize,
                           int alDimension)


Parameters

Returns:

  • iPhysicsCloth@

CreateCompundShape

iCollideShape@ CreateCompundShape(iCollideShape@ avShapes)


Parameters

Returns:

  • iCollideShape@

CreateController

iPhysicsController@ CreateController(const tString &in asName)


Parameters

Returns:

  • iPhysicsController@

CreateCylinderShape

iCollideShape@ CreateCylinderShape(float afRadius,
                                   float afHeight,
                                   cMatrixf &in a_mtxOffsetMtx)


Parameters

  • afRadius (float) —
  • afHeight (float) —
  • a_mtxOffsetMtx (cMatrixf) —

Returns:

  • iCollideShape@

CreateJointBall

iPhysicsJointBall@ CreateJointBall(const tString &in asName,
                                   const cVector3f &in avPivotPoint,
                                   const cVector3f &in avPinDir,
                                   iPhysicsBody@ apParentBody,
                                   iPhysicsBody@ apChildBody)


Parameters

Returns:

  • iPhysicsJointBall@

CreateJointBallID

tID CreateJointBallID(const tString &in asName,
                      const cVector3f &in avPivotPoint,
                      const cVector3f &in avPinDir,
                      iPhysicsBody@ apParentBody,
                      iPhysicsBody@ apChildBody)


Parameters

Returns:

  • tID

CreateJointHinge

iPhysicsJointHinge@ CreateJointHinge(const tString &in asName,
                                     const cVector3f &in avPivotPoint,
                                     const cVector3f &in avPinDir,
                                     iPhysicsBody@ apParentBody,
                                     iPhysicsBody@ apChildBody)


Parameters

Returns:

  • iPhysicsJointHinge@

CreateJointHingeID

tID CreateJointHingeID(const tString &in asName,
                       const cVector3f &in avPivotPoint,
                       const cVector3f &in avPinDir,
                       iPhysicsBody@ apParentBody,
                       iPhysicsBody@ apChildBody)


Parameters

Returns:

  • tID

CreateJointSlider

iPhysicsJointSlider@ CreateJointSlider(const tString &in asName,
                                       const cVector3f &in avPivotPoint,
                                       const cVector3f &in avPinDir,
                                       iPhysicsBody@ apParentBody,
                                       iPhysicsBody@ apChildBody)


Parameters

Returns:

  • iPhysicsJointSlider@

CreateJointSliderID

tID CreateJointSliderID(const tString &in asName,
                        const cVector3f &in avPivotPoint,
                        const cVector3f &in avPinDir,
                        iPhysicsBody@ apParentBody,
                        iPhysicsBody@ apChildBody)


Parameters

Returns:

  • tID

CreateMaterial

iPhysicsMaterial@ CreateMaterial(const tString &in asName)


Parameters

Returns:

  • iPhysicsMaterial@

CreateMeshShape

iCollideShape@ CreateMeshShape(iVertexBuffer@ apVtxBuffer)


Parameters

Returns:

  • iCollideShape@

CreateRope

iPhysicsRope@ CreateRope(const tString &in asName,
                         const cVector3f &in avStartPos,
                         const cVector3f &in avEndPos)


Parameters

Returns:

  • iPhysicsRope@

CreateSphereShape

iCollideShape@ CreateSphereShape(const cVector3f &in avRadii,
                                 cMatrixf &in a_mtxOffsetMtx)


Parameters

Returns:

  • iCollideShape@

DestroyBody

void DestroyBody(iPhysicsBody@ apBody)


Parameters

Returns:

  • void

DestroyCharacterBody

void DestroyCharacterBody(iCharacterBody@ apBody)


Parameters

Returns:

  • void

DestroyCloth

void DestroyCloth(iPhysicsCloth@ apCloth)


Parameters

Returns:

  • void

DestroyController

void DestroyController(iPhysicsController@ apController)


Parameters

Returns:

  • void

DestroyJoint

void DestroyJoint(iPhysicsJoint@ apJoint)


Parameters

Returns:

  • void

DestroyRope

void DestroyRope(iPhysicsRope@ apRope)


Parameters

Returns:

  • void

DestroyShape

void DestroyShape(iCollideShape@ apShape)


Parameters

Returns:

  • void

EnableBodiesInAABB

void EnableBodiesInAABB(const cVector3f &in avMin,
                        const cVector3f &in avMax,
                        bool abEnabled)


Parameters

Returns:

  • void

FadeoutAllLoopSounds

void FadeoutAllLoopSounds(float afFadeSpeed)


Parameters

  • afFadeSpeed (float) —

Returns:

  • void

GetAccuracyLevel

ePhysicsAccuracy GetAccuracyLevel()

Returns:

  • ePhysicsAccuracy

GetBodiesInAABB

void GetBodiesInAABB(const cVector3f &in avMin,
                     const cVector3f &in avMax,
                     iPhysicsBody@ apBodyVec)


Parameters

Returns:

  • void

GetBody

iPhysicsBody@ GetBody(const tString &in asName)


Parameters

Returns:

  • iPhysicsBody@

GetCharacterBody

iPhysicsBody@ GetCharacterBody(const tString &in asName)


Parameters

Returns:

  • iPhysicsBody@

GetCharacterBodyFromID

iCharacterBody@ GetCharacterBodyFromID(tID aID)


Parameters

Returns:

  • iCharacterBody@

GetCloth

iPhysicsCloth@ GetCloth(const tString &in asName)


Parameters

Returns:

  • iPhysicsCloth@

GetClothFromUniqueID

iPhysicsCloth@ GetClothFromUniqueID(int alID)


Parameters

  • alID (int) —

Returns:

  • iPhysicsCloth@

GetGravity

cVector3f GetGravity()

Returns:

  • cVector3f

GetJoint

iPhysicsJoint@ GetJoint(const tString &in asName)


Parameters

Returns:

  • iPhysicsJoint@

GetMaterialFromId

iPhysicsMaterial@ GetMaterialFromId(int alId)


Parameters

  • alId (int) —

Returns:

  • iPhysicsMaterial@

GetMaterialFromName

iPhysicsMaterial@ GetMaterialFromName(const tString &in asName)


Parameters

Returns:

  • iPhysicsMaterial@

GetMaxTimeStep

float GetMaxTimeStep()

Returns:

  • float

GetNumberOfThreads

int GetNumberOfThreads()

Returns:

  • int

GetPhysicsBodyFromID

iPhysicsBody@ GetPhysicsBodyFromID(tID aID)


Parameters

Returns:

  • iPhysicsBody@

GetPhysicsJointFromID

iPhysicsJoint@ GetPhysicsJointFromID(tID aID)


Parameters

Returns:

  • iPhysicsJoint@

GetRope

iPhysicsRope@ GetRope(const tString &in asName)


Parameters

Returns:

  • iPhysicsRope@

GetRopeFromUniqueID

iPhysicsRope@ GetRopeFromUniqueID(int alID)


Parameters

  • alID (int) —

Returns:

  • iPhysicsRope@

GetWorldSizeMax

cVector3f GetWorldSizeMax()

Returns:

  • cVector3f

GetWorldSizeMin

cVector3f GetWorldSizeMin()

Returns:

  • cVector3f

JointExists

bool JointExists(iPhysicsJoint@ apJoint)


Parameters

Returns:

  • bool

LoadMeshShapeFromBuffer

iCollideShape@ LoadMeshShapeFromBuffer(cBinaryBuffer@ apBuffer)


Parameters

Returns:

  • iCollideShape@

PostUpdate

void PostUpdate(float afTimeStep)


Parameters

  • afTimeStep (float) —

Returns:

  • void

RenderDebugGeometry

void RenderDebugGeometry(iLowLevelGraphics@ apLowLevel)


Parameters

Returns:

  • void

RenderShapeDebugGeometry

void RenderShapeDebugGeometry(iCollideShape@ apShape,
                              const cMatrixf &in a_mtxTransform,
                              iLowLevelGraphics@ apLowLevel,
                              const cColor &in aColor)


Parameters

Returns:

  • void

SaveMeshShapeToBuffer

void SaveMeshShapeToBuffer(iCollideShape@ apMeshShape,
                           cBinaryBuffer@ apBuffer)


Parameters

Returns:

  • void

SetAccuracyLevel

void SetAccuracyLevel(ePhysicsAccuracy aAccuracy)


Parameters

Returns:

  • void

SetGravity

void SetGravity(const cVector3f &in avGravity)


Parameters

Returns:

  • void

SetMaxTimeStep

void SetMaxTimeStep(float afTimeStep)


Parameters

  • afTimeStep (float) —

Returns:

  • void

SetNumberOfThreads

void SetNumberOfThreads(int alThreads)


Parameters

  • alThreads (int) —

Returns:

  • void

SetWorldSize

void SetWorldSize(const cVector3f &in avMin,
                  const cVector3f &in avMax)


Parameters

Returns:

  • void

References

See all references...