Physics
Physics
Physics Reference
#include "TrueAxis.bi"
Description
The main interface to the True Axis Physics Wrapper.
The class Physics provides a starting point for all interactions with the True Axis Physics Wrapper.
Tasks such as creating and updating a physics simulation as well as adding and removing physics objects are done here.
Objects that can be added to a physics simulation inherit from PhysicsObject. These objects are divided into to two types, static objects and dynamic objects:
- Static objects can be created through the class StaticObject. They are designed to represent large static arbitrary polygon meshes. This should typically be used for static scenery. Everything that doesn't react physically but that may be collided with should be part of an StaticObject. A static object can be added to a simulation with the function PhysicsAddStaticObject. See StaticObject for more details.
- Dynamic objects can be create through the class DynamicObject. They represent any interactive objects in the physics simulation. There are some limitations to the size and complexity of dynamic objects. See PhysicsObject for more details.
This class also provides interfaces for performing collision queries with the world through functions such as PhysicsTestLineForCollision and PhysicsTestRayForCollision..
- Singletons:
- This class is a singleton. Only one instance of the class can be created at any time. To create an instance call the function PhysicsCreateInstance. When the class is no longer needed, the function PhysicsDestroyInstance should be called.
- Functions:
- PhysicsCreateInstance
- PhysicsDestroyInstance
- PhysicsSetWorldDimensions
- PhysicsGetWorldDimensions
- PhysicsSetGravity
- PhysicsGetGravity
- PhysicsSetMaxNumCollisions
- PhysicsGetMaxNumCollisions
- PhysicsSetMaxNumMovingObjects
- PhysicsGetMaxNumMovingObjects
- PhysicsSetSlowSolverMaxNumCollisions
- PhysicsGetSlowSolverMaxNumCollisions
- PhysicsSetSlowSolverMaxNumObjects
- PhysicsGetSlowSolverMaxNumObjects
- PhysicsSetMaxNumObjectPairs
- PhysicsGetMaxNumObjectPairs
- PhysicsSetSpacialDivisionType
- PhysicsGetSpacialDivisionType
- PhysicsSetMovementPropagationEnabled
- PhysicsIsMovementPropagationEnabled
- PhysicsSetupSimulation
- PhysicsUpdate
- PhysicsRender()
- PhysicsRenderBoundingBoxes()
- PhysicsStaticObject
- PhysicsAddStaticObject
- PhysicsRemoveStaticObject
- PhysicsAddStaticGround
- PhysicsDynamicObject
- PhysicsAddDynamicObject
- PhysicsRemoveDynamicObject
- PhysicsSetDynamicObjectIsMoving
- PhysicsWakeUpAllIntersectingObjects
- Physics Ray/Line Collision
- declare function PhysicsTestRayForCollision (byval startX as single, byval startY as single, byval startZ as single, _
- byval dirX as single, byval dirY as single, byval dirZ as single, _
- byval length as single, byval flags as ePHYSICS_FLAGS=ALL_OBJECTS) as eCOLLISION_FLAGS
- declare function PhysicsV3TestRayForCollision(byref v3Start as const TA_Vec3, byref v3Dir as const TA_Vec3, _
- byval length as single, byval flags as ePHYSICS_FLAGS=ALL_OBJECTS) as eCOLLISION_FLAGS
- declare function PhysicsTestLineForCollision(byval startX as single, byval startY as single, byval startZ as single, _
- byval endX as single, byval endY as single, byval endZ as single, _
- byval flags as ePHYSICS_FLAGS=ALL_OBJECTS) as eCOLLISION_FLAGS
- declare function PhysicsV3TestLineForCollision(byref v3Start as const TA_Vec3, byref v3End as const TA_Vec3, byval flags as ePHYSICS_FLAGS=ALL_OBJECTS) as eCOLLISION_FLAGS
- PhysicsCallbacks
- declare sub PhysicsSetOnBrokenJointCallBack(byval cb as OnBrokenJointCB)
- declare sub PhysicsSetOnRestingCallBack(byval cb as OnRestingCB,byval pUserData as any ptr=0)
- declare sub PhysicsSetOnMovingCallBack (byval cb as OnMovingCB ,byval pUserData as any ptr=0)
- declare sub PhysicsSetPreProcessCollisionCallBack (byval cb as PreProcessCollisionCB)
- declare sub PhysicsSetPostProcessCollisionCallBack(byval cb as PostProcessCollisionCB)
- PhysicsSurfaceAttribute
- declare function PhysicsAddSurfaceAttribute() as integer
- declare sub PhysicsRemoveSurfaceAttribute(byval n as integer)
- declare function PhysicsGetNumSurfaceAttributes() as integer
- declare sub SurfaceAttributeSetCollisionFriction(byval n as integer, byval fCollisionFriction as single)
- declare function SurfaceAttributeGetCollisionFriction(byval n as integer) as single
- declare sub SurfaceAttributeSetRestitution(byval n as integer, byval fRestitution as single)
- declare function SurfaceAttributeGetRestitution(byval n as integer) as single
- declare sub SurfaceAttributeSetUserData(byval n as integer, byval pUserData as const any ptr)
- declare function SurfaceAttributeGetUserData(byval n as integer) as any ptr
Copyright © 2015
Created with the Freeware Edition of HelpNDoc: Full featured Documentation generator