True Axis Wrapper Documentation

True Axis Wrapper Documentation

Introduction

Welcome to the True Axis Wrapper. This library provides an interface for collision testing and physics simulation aimed at game developers. It is fast, robust and copes well with fast moving objects and low frame rates.

TRUE AXIS PHYSICS SDK NON COMMERCIAL LICENSE AGREEMENT

1. LICENSE AGREEMENT

This document is an agreement between True Axis Pty. Ltd. Australia ("Licensor") and Licensee regarding the use of the obfuscated source version of True Axis Physics SDK 1.2.0.3 ("Software") by Licensee for non-commercial use. Commercial use and or use or access to full source code is not permitted under this agreement. If Licensee has purchased a TRUE AXIS PHYSICS SDK BUDGET LICENSE AGREEMENT, then Licensee may use the TRUE AXIS PHYSICS SDK BUDGET LICENSE AGREEMENT in place of this agreement.

2. COPYRIGHT

All material contained in the distribution library is Copyright © True Axis Pty Ltd, Australia, unless otherwise noted.

3. OWNERSHIP

The title and ownership of the Software and shall remain with Licensor. All rights to patents, copyrights, or any other intellectual property rights shall remain with the Licensor, or their respective owner.

4. LICENSE GRANT

a. Licensee may not redistribute, transfer, sub-license or sell the Software.

b. Licensee may not use the Software in a commercial product or a product that directly or indirectly receives an income with out a separate commercial license from Licensor.

c. Licensee may use the Software in object code form as as part a non-commercial product on the condition the Licenses agrees to all the terms of this contract.

5. DISCLAIMER OF WARRANTY

The Software is provided “AS IS” and any warranty, expressed or implied, including with out limitation, the implied warranties of merchantability and fitness for a particular purpose, and non-infringement of any third party rights are disclaimed.

If you do not accept this disclaimer of warranty or it is not enforceable in your jurisdiction, then you may not use the Software.

6. NO LIABILITY

Licensee agrees that use of the Software is at their own risk. Licensee agrees that they or any third party shall not have any claim against Licensor or anyone associated directly or indirectly with Licensor for any direct, indirect, consequential, special, exemplary, punitive, and/or other damages (including with out limitation harm, injury, loss of profits, loss of data and/or business interruption) from any cause, in connection to the use and/or distribution of the Software.

If you do not accept this disclaimer of warranty or it is not enforceable in your jurisdiction, then you may not use the Software.

7. HIGH RISK ACTIVITY

The Software is not designed to be fault tolerant. It is not intended for use in any environment in which failure of the Software could lead to death, injury severe physical or environmental damage('High Risk Activities'). Use of the Software for High Risk Activities is explicitly prohibited. Any expressed or implied warranty of fitness for High Risk Activities is specifically disclaimed.

8. MISCELLANEOUS

If any provision in this agreement is unenforceable or invalid it shall not affect the rest of the agreement. The licensee agrees to replace any unenforceable or invalid provision with a valid provision that upholds the intent of the provision to the greatest extent possible. The validity and interpretation of this agreement will be governed by the laws of Australia in the state of Victoria.

9. AGREEMENT

This agreement constitutes the complete agreement concerning this license. Any change to this agreement must be made in writing.

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Easily create HTML Help documents


TrueAxis.bi

TrueAxis.bi

include file: TrueAxis.bi

Description

The FreeBASIC True Axis Wrapper include file.

' used by PhysicsTestRayForCollision and PhysicsTestLineForCollision

enum ePHYSICS_FLAGS

DYNAMIC_OBJECTS = 1

STATIC_OBJECTS = 2

ALL_OBJECTS = DYNAMIC_OBJECTS or STATIC_OBJECTS

GHOST_OBJECTS = 8

end enum

' flags marked as "*" are usable after a collision

' the most important flag are FLAG_COLLISION_OCCURRED

enum eCOLLISION_FLAGS

FLAG_CONSTRAIN_IN_BOTH_DIRECTIONS = &H000001

FLAG_FRICTION = &H000002 ' *

FLAG_FRICTION_GENERATING_IMPULSE = &H000004

FLAG_NO_FRICTION = &H000008 ' *

FLAG_JOINT = &H000010 ' *

FLAG_JOINT_LIMIT = &H000020 ' *

FLAG_COLLISION_OCCURRED = &H000040 ' *

FLAG_DISABLE_PUSHOUT = &H000080

FLAG_FRICTION_GENERATING_IMPULSE2 = &H000100

FLAG_MARKED = &H000200

FLAG_RESTITUTION_CALCULATED = &H000400

FLAG_OBJECTA_SOLID = &H001000

FLAG_OBJECTB_SOLID = &H002000

FLAG_NEW_COLLISION = &H004000

FLAG_ROTATION_CONSTRAINT = &H008000 ' *

FLAG_OBJECTB_INFINITE_MASS = &H010000

FLAG_DEPTH_CALCULATED_FROM_TIME = &H020000

FLAG_USE_PUSH_OUT_MODIFIER = &H040000

FLAG_OBJECTA_SOLID_INTERNAL = &H080000

FLAG_OBJECTB_SOLID_INTERNAL = &H100000

end enum

' every triangle from static AABB mesh can define

' it's own surface attribute default is -1

const as integer DEFAULT_SURFACE_ATTRIBUTE = -1

' used by PhysicsSetDynamicObjectIsMoving

enum ePHYSICS_MOVING_PRIORITIES

SET_MOVING_PRIORITY_LOW = 0

SET_MOVING_PRIORITY_HIGH = 1

end enum

' used by Physics Set/Get SpacialDivisionType

enum ePHYSICS_SPACIAL_DIVISION_TYPES

FLAG_XY_COLLISION_GRID = &H020

FLAG_XZ_COLLISION_GRID = &H040

FLAG_YZ_COLLISION_GRID = &H060

FLAG_DYNAMIC_OCTREE = &H080

FLAG_CTREE = &H100

end enum

' used by PhysicsJointGetType

enum ePHYSICS_JOINT_TYPES

BALL_AND_SOCKET = 0

LIMITED_BALL_AND_SOCKET

SQUARE_SOCKET

EULER_ANGLE_CONSTRAINT

LINEAR_SLIDER

ROTATION_CONSTRAINT

VECTOR_CONSTRAINT

end enum

' used by CollisionObjectGetCollisionObjectType

enum eCOLLISIONOBJECT_TYPES

TYPE_CONVEX = 0

TYPE_LINE_LIST

TYPE_CAPSULE

TYPE_SPHERE

TYPE_CYLINDER

TYPE_COMPLEX

TYPE_CACHED_POLY_DATA

TYPE_COMBO

end enum

type TA_Vec3

declare operator cast as single ptr

declare operator cast as string

as single x,y,z,pad

end type

operator TA_Vec3.cast as single ptr

operator = @x

end operator

operator TA_Vec3.cast as string

operator = str(x) & "," & y & "," & z

end operator

type TA_AABB

as TA_Vec3 v3Center

as TA_Vec3 v3Extent

end type

enum eROTATION_AXIS

ROTATION_AXIS_X = 0

ROTATION_AXIS_Y

ROTATION_AXIS_Z

end enum

type TA_EulerAngles

as single x

as single y

as single z

end type

type TA_Mat33

as TA_Vec3 v3X

as TA_Vec3 v3Y

as TA_Vec3 v3Z

end type

type TA_MFrame

as TA_Mat33 m33Rotation

as TA_Vec3 v3Translation

end type

type PhysicsObject

private:

as integer dummy

end type

type StaticObject extends PhysicsObject

private:

as integer dummy

end type

type DynamicObject extends PhysicsObject

private:

as integer dummy

end type

type DynamicObjectTemplate extends DynamicObject

private:

as integer Dummy

end type

type DynamicObjectTank extends DynamicObject

private:

as integer Dummy

end type

type CarTemplate

private:

as integer dummy

end type

type DynamicObjectCar extends DynamicObject

private:

as integer Dummy

end type

type CollisionObject

private:

as integer dummy

end type

' A CollisionObjectSimple descripts an CollisionObject by params not polygones.

type CollisionObjectSimple extends CollisionObject

private:

as integer dummy

end type

' A CollisionObjectSphere are defined by it's center and radius

type CollisionObjectSphere extends CollisionObjectSimple

private:

as integer dummy

end type

' A CollisionObjectCylinder are defined by two points and radius

type CollisionObjectCylinder extends CollisionObjectSimple

private:

as integer dummy

end type

' A CollisionObjectCapsule are defined by two points and radius

type CollisionObjectCapsule extends CollisionObjectSimple

private:

as integer dummy

end type

' A CollisionObjectLineList is a colection of lines.

' This lines can be used as sensors for collision detection.

type CollisionObjectLineList extends CollisionObjectSimple

private:

as integer dummy

end type

' CollisionObjectConvex descripts a convex shape

' by faces like a box, pyramid ...

type CollisionObjectConvex extends CollisionObjectSimple

private:

as integer dummy

end type

' CollisionObjectCombo is a collection of multiply CollisionObjectSimple

type CollisionObjectCombo extends CollisionObject

private:

as integer dummy

end type

' A CollisionObjectComplex descripts a CollisionObject

' by polygon data like vertices, edges and face normal's

type CollisionObjectComplex extends CollisionObject

private:

as integer dummy

end type

' A CollisionObjectAABBMesh is a complex (large) static shape like a terrain.

type CollisionObjectAABBMesh extends CollisionObjectComplex

private:

as integer dummy

end type

' A PhysicsJoint descripts the contrains between DynamicObject's.

type PhysicsJoint

private:

as integer dummy

end type

type PreCollision

private:

as integer dummy

end type

type PostCollision

private:

as integer dummy

end type

' if a CollisionObjectLineList collided with any object

' this struct descripts a line collision.

type LineIntersection

as single fIntersectingDepth

as DynamicObject ptr pDynamicObject

as CollisionObject ptr pCollisionObject

as integer nSurfaceAttribute

as TA_Vec3 v3Position

as TA_Vec3 v3Normal

end type

' ######################

' # optional callbacks #

' ######################

#define TA_CB cdecl

' A DynamicOject made from DynamicObjectTemplate must be updated.

type UpdateCB as sub TA_CB (byval pObj as DynamicObjectTemplate ptr, byval fDt as single)

' A joint that was broken.

type OnBrokenJointCB as sub TA_CB (byval pJoint as PhysicsJoint ptr)

' A DynamicObject may be moving or at rest.

' When an object is at rest no physics calculations or collision testing is done

' on this object until another hits it, at which point it is set moving.

type OnMovingCB as sub TA_CB (byval pObj as DynamicObject ptr, byval pUserData as any ptr)

type OnRestingCB as sub TA_CB (byval pObj as DynamicObject ptr, byval pUserData as any ptr)

' This function allows users to provide their own function to be called "BEFORE"

' each collision test between 2 dynamic objects is performed during PhysicsUpdate().

' The provided function will only be called when at least one of the objects are moving

' and it has been determined that the objects are in close proximity.

' Users can use this functionality as flexible way to disallow collisions between objects

' if they so wish before full and more computationally expensive collision testing is done.

' If the callback returns false=0, the collision test will be skipped.

type DynamicVsDynamicCollisionTestCB as function TA_CB (byval pObjA as DynamicObject ptr, _

byval pObjB as DynamicObject ptr) as ubyte

' The function provided by the user through this method will be called for each collision

' that occurs, "BEFORE" its affects are applied to the simulation.

' By returning false=0, users can choose to ignore a particular collision.

type PreProcessCollisionCB as function TA_CB (byval collision as PreCollision ptr) as ubyte

' The function provided by the user through this method will be called for each collision

' that occurs, "AFTER" its affects have been applied to the simulation.

' The effect of strength of the collision can be found from PostCollisionGetImpulse.

type PostProcessCollisionCB as sub TA_CB (byval collision as PostCollision ptr)

extern "C"

' ###########

' # Physics #

' ###########

' The instance of the Physics class is singleton and must be created at first.

declare function PhysicsCreateInstance() as integer

' Call this function to clean up when the instance of Physics is no longer needed.

' Any objects still added to the simulation will be automatically removed and released.

declare sub PhysicsDestroyInstance()

' Call this function to set the position and size of the world that the physics simulation will run in.

' This may affect the speed and memory usage of culling algorithms.

' The size of the world should be made only as big as necessary. (default are 2000m x 2000m x 2000m)

declare sub PhysicsSetWorldDimensions(byval centerX as single, byval centerY as single, byval centerZ as single, _

byval width_ as single, byval height as single, byval depth as single)

declare sub PhysicsGetWorldDimensions(byref centerX as single, byref centerY as single, byref centerZ as single, _

byref width_ as single, byref height as single, byref depth as single)

declare sub PhysicsV3SetWorldDimensions(byref v3Center as const TA_Vec3, byref v3Dimension as const TA_Vec3)

declare sub PhysicsV3GetWorldDimensions(byref v3Center as TA_Vec3, byref v3Dimension as TA_Vec3)

declare sub PhysicsAABBSetWorldDimensions(byref aabb as const TA_AABB)

declare sub PhysicsAABBGetWorldDimensions(byref aabb as TA_AABB)

' Call this function to set the acceleration due to gravity applied

' to all objects in the simulation. (default are 0.0 ,8.91, 0.0 )

declare sub PhysicsSetGravity(byval x as single, byval y as single, byval z as single)

declare sub PhysicsGetGravity(byref x as single, byref y as single, byref z as single)

declare sub PhysicsV3SetGravity(byref v3Gravity as const TA_Vec3)

declare sub PhysicsV3GetGravity(byref v3Gravity as TA_Vec3)

' Call this function to set the maximum number of collisions allowed at once.

declare sub PhysicsSetMaxNumCollisions(byval n as integer)

declare function PhysicsGetMaxNumCollisions() as integer

' Call this function to set the maximum number of moving objects allowed at once.

declare sub PhysicsSetMaxNumMovingObjects(byval n as integer)

declare function PhysicsGetMaxNumMovingObjects() as integer

' Call this function to set the number of collisions at which true axis will swap

' from using a the slow solver to the, fast solver physics solver.

declare sub PhysicsSetSlowSolverMaxNumCollisions(byval n as integer)

declare function PhysicsGetSlowSolverMaxNumCollisions() as integer

' Call this function to set the number of objects at which true axis will swap

' from using a the slow solver to the, fast solver physics solver.

declare sub PhysicsSetSlowSolverMaxNumObjects(byval n as integer)

declare function PhysicsGetSlowSolverMaxNumObjects() as integer

' Call this function to set the maximum number of object pairs.

' This value controls the amount of memory allocated for object pairs.

' If this number is too low, efficiency may be impacted and if not enough pairs are available, some collisions may be ignored.

' If this number is too high, memory is wasted and in some cases, memory cache efficiency may be impacted.

declare sub PhysicsSetMaxNumObjectPairs(byval nPairs as integer)

declare function PhysicsGetMaxNumObjectPairs() as integer

' Call this function to set the type of spacial sub division used by the True Axis Physics SDK.

' (default are FLAG_DYNAMIC_OCTREE)

declare sub PhysicsSetSpacialDivisionType(byval DivisionType as ePHYSICS_SPACIAL_DIVISION_TYPES)

declare function PhysicsGetSpacialDivisionType() as ePHYSICS_SPACIAL_DIVISION_TYPES

' Call this function to enable or disable movement propagation. The default value is true. (<>0)

declare sub PhysicsSetMovementPropagationEnabled(byval bEnabled as integer)

declare function PhysicsIsMovementPropagationEnabled() as integer

' Initialise the simulation based on the settings set above.

declare sub PhysicsSetupSimulation(byval MaxObjects as integer=0)

' Call this function to update the physics simulation one frame.

declare sub PhysicsUpdate(byval dt as single=1.0/75.0)

' Call this functions to draw all physics parts (DEBUG mode only)

declare sub PhysicsRender()

declare sub PhysicsRenderBoundingBoxes()

' ########################

' # Physics StaticObject #

' ########################

declare sub PhysicsAddStaticObject(byval pObj as const StaticObject ptr)

declare sub PhysicsRemoveStaticObject(byval pObj as const StaticObject ptr)

declare function PhysicsAddStaticGround(byval fSize as single=-1.0) as StaticObject ptr

' #########################

' # Physics DynamicObject #

' #########################

declare sub PhysicsAddDynamicObject(byval pObj as const DynamicObject ptr, byval bInitiallyMoving as integer=1)

declare sub PhysicsRemoveDynamicObject(byval pObj as const DynamicObject ptr)

declare sub PhysicsSetDynamicObjectIsMoving(byval pObj as const DynamicObject ptr, byval priority as ePHYSICS_MOVING_PRIORITIES = SET_MOVING_PRIORITY_LOW)

' Call this function to wake up all objects that intersect with a given bounding box.

declare sub PhysicsWakeUpAllIntersectingObjects(byval centerX as single, byval centerY as single, byval centerZ as single, _

byval width_ as single, byval height as single, byval depth as single)

declare sub PhysicsAABBWakeUpAllIntersectingObjects(byref aabb as const TA_AABB)

' ##############################

' # 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

' #####################

' # LineRay Collision #

' #####################

' after a PhysicsTestRay or PhysicsTestLine Collision

declare function CollisionOccurred() as integer

declare function CollisionIsObjectA() as integer

declare function CollisionGetObjectA() as DynamicObject ptr

declare function CollisionGetAttributeA() as integer

declare function CollisionIsObjectB() as integer

declare function CollisionGetObjectB() as DynamicObject ptr

declare function CollisionGetAttributeB() as integer

declare function CollisionIsJoint() as integer

declare function CollisionGetJoint() as PhysicsJoint ptr

declare sub CollisionGetPosition(byref x as single, byref y as single, byref z as single)

declare sub CollisionV3GetPosition(byref v3Position as TA_Vec3)

declare sub CollisionGetNormal (byref x as single, byref y as single, byref z as single)

declare sub CollisionV3GetNormal(byref v3Normal as TA_Vec3)

declare function CollisionGetFlags() as eCOLLISION_FLAGS

declare function CollisionGetRestitution() as single

declare function CollisionGetImpulse() as single

declare function CollisionGetFrictionCoefficient() as single

declare function CollisionGetTime() as single

declare function CollisionGetIntersectingDepth() as single

' ################

' # PreCollision #

' ################

' inside a PreCollisionCallback

declare function PreCollisionGetNext(byval pPreCollision as PreCollision ptr) as PreCollision ptr

declare function PreCollisionIsObjectA(byval pPreCollision as PreCollision ptr) as integer

declare function PreCollisionGetObjectA(byval pPreCollision as PreCollision ptr) as DynamicObject ptr

declare function PreCollisionGetAttributeA(byval pPreCollision as PreCollision ptr) as integer

declare function PreCollisionIsObjectB(byval pPreCollision as PreCollision ptr) as integer

declare function PreCollisionGetObjectB(byval pPreCollision as PreCollision ptr) as DynamicObject ptr

declare function PreCollisionGetAttributeB(byval pPreCollision as PreCollision ptr) as integer

declare function PreCollisionIsJoint(byval pPreCollision as PreCollision ptr) as integer

declare function PreCollisionGetJoint(byval pPreCollision as PreCollision ptr) as PhysicsJoint ptr

declare function PreCollisionGetFlags(byval pPreCollision as PreCollision ptr) as integer

declare function PreCollisionGetIntersectingDepth(byval pPreCollision as PreCollision ptr) as single

declare function PreCollisionGetRestitution(byval pPreCollision as PreCollision ptr) as single

declare function PreCollisionGetFrictionCoefficient(byval pPreCollision as PreCollision ptr) as single

declare sub PreCollisionGetNormal(byval pPreCollision as PreCollision ptr, byref nx as single, byref ny as single, byref nz as single)

declare sub PreCollisionV3GetNormal(byval pPreCollision as PreCollision ptr, byref v3Normal as TA_Vec3)

declare sub PreCollisionGetPosition(byval pPreCollision as PreCollision ptr, byref px as single, byref py as single, byref pz as single)

declare sub PreCollisionV3GetPosition(byval pPreCollision as PreCollision ptr, byref v3Position as TA_Vec3)

' #################

' # PostCollision #

' #################

' inside a PostCollisionCallback

declare function PostCollisionGetNext(byval pPostCollision as PostCollision ptr) as PostCollision ptr

declare function PostCollisionIsObjectA(byval pPostCollision as PostCollision ptr) as integer

declare function PostCollisionGetObjectA(byval pPostCollision as PostCollision ptr) as DynamicObject ptr

declare function PostCollisionGetAttributeA(byval pPostCollision as PostCollision ptr) as integer

declare function PostCollisionIsObjectB(byval pPostCollision as PostCollision ptr) as integer

declare function PostCollisionGetObjectB(byval pPostCollision as PostCollision ptr) as DynamicObject ptr

declare function PostCollisionGetAttributeB(byval pPostCollision as PostCollision ptr) as integer

declare function PostCollisionIsJoint(byval pPostCollision as PostCollision ptr) as integer

declare function PostCollisionGetJoint(byval pPostCollision as PostCollision ptr) as PhysicsJoint ptr

declare function PostCollisionGetFlags(byval pPostCollision as PostCollision ptr) as integer

declare function PostCollisionGetImpulse(byval pPostCollision as PostCollision ptr) as single

declare function PostCollisionGetIntersectingDepth(byval pPostCollision as PostCollision ptr) as single

declare sub PostCollisionGetNormal(byval pPostCollision as PostCollision ptr, byref nx as single, byref ny as single, byref nz as single)

declare sub PostCollisionV3GetNormal(byval pPostCollision as PostCollision ptr, byref v3Normal as TA_Vec3)

declare sub PostCollisionGetPosition(byval pPostCollision as PostCollision ptr, byref px as single, byref py as single, byref pz as single)

declare sub PostCollisionV3GetPosition(byval pPostCollision as PostCollision ptr, byref v3Position as TA_Vec3)

' ###################

' # CollisionObject #

' ###################

declare function CollisionObjectGetCollisionObjectType(byval pObj as const CollisionObject ptr) as eCOLLISIONOBJECT_TYPES

' #########################

' # CollisionObjectConvex #

' #########################

declare function CollisionObjectConvexCreateNew() as CollisionObjectConvex ptr

declare sub CollisionObjectConvexRelease(byref pObj as CollisionObjectConvex ptr)

declare sub CollisionObjectConvexInitialiseAsACube(byval pObj as const CollisionObjectConvex ptr, _

byval centerX as single, byval centerY as single, byval centerZ as single, _

byval size as single)

declare sub CollisionObjectConvexV3InitialiseAsACube(byval pObj as const CollisionObjectConvex ptr, _

byref v3Center as const TA_Vec3, byval size as single)

declare sub CollisionObjectConvexInitialiseAsAnOrientedCube(byval pObj as const CollisionObjectConvex ptr, _

byval cx as single, byval cy as single, byval cz as single, _ ' center

byval size as single, _

byval px as single, byval py as single, byval pz as single, _ ' position

byval pitch as single, byval yaw as single, byval roll as single)

declare sub CollisionObjectConvexV3InitialiseAsAnOrientedCube(byval pObj as const CollisionObjectConvex ptr, _

byref v3Center as const TA_Vec3, _

byval size as single, _

byref v3Position as const TA_Vec3, _

byval pitch as single, byval yaw as single, byval roll as single)

declare sub CollisionObjectConvexInitialiseAsABox (byval pObj as const CollisionObjectConvex ptr, _

byval centerX as single, byval centerY as single, byval centerZ as single, _

byval sizeX as single, byval sizeY as single, byval sizeZ as single)

declare sub CollisionObjectConvexV3InitialiseAsABox (byval pObj as const CollisionObjectConvex ptr, _

byref v3Center as const TA_Vec3, byref v3Size as const TA_Vec3)

declare sub CollisionObjectConvexAABBInitialiseAsABox(byval pObj as const CollisionObjectConvex ptr, _

byref aabb as const TA_AABB)

declare sub CollisionObjectConvexInitialiseAsAnOrientedBox(byval pObj as const CollisionObjectConvex ptr, _

byval cx as single, byval cy as single, byval cz as single, _ ' center

byval w as single, byval h as single, byval d as single, _ ' size

byval px as single, byval py as single, byval pz as single, _ ' position

byval pitch as single, byval yaw as single, byval roll as single)

declare sub CollisionObjectConvexV3InitialiseAsAnOrientedBox(byval pObj as const CollisionObjectConvex ptr, _

byref v3Center as const TA_Vec3, _

byref v3Size as const TA_Vec3, _

byref v3Position as const TA_Vec3, _

byval pitch as single, byval yaw as single, byval roll as single)

declare sub CollisionObjectConvexAABBInitialiseAsAnOrientedBox(byval pObj as const CollisionObjectConvex ptr, _

byref aabb as const TA_AABB, _ ' center and extend

byref frame as const TA_MFrame) ' rotation and position

declare sub CollisionObjectConvexInitialiseFromPointList(byval pObj as const CollisionObjectConvex ptr, _

byval pFloat as single ptr, byval nPoints as integer)

declare sub CollisionObjectConvexV3InitialiseFromPointList(byval pObj as const CollisionObjectConvex ptr, _

byref pV3 as const TA_Vec3 ptr, byval nPoints as integer)

declare sub CollisionObjectConvexTransform (byval pObj as const CollisionObjectConvex ptr, _

byval posX as single, byval posY as single, byval posZ as single, _

byval pitchRad as single, byval yawRad as single, byval rollRad as single)

declare sub CollisionObjectConvexV3Transform (byval pObj as const CollisionObjectConvex ptr, _

byref v3Position as const TA_Vec3, _

byval pitchRad as single, byval yawRad as single, byval rollRad as single)

declare sub CollisionObjectConvexTransformD(byval pObj as const CollisionObjectConvex ptr, _

byval posX as single, byval posY as single, byval posZ as single, _

byval pitchDeg as single, byval yawDeg as single, byval rollDeg as single)

declare sub CollisionObjectConvexV3TransformD(byval pObj as const CollisionObjectConvex ptr, _

byref v3Position as const TA_Vec3, _

byval pitchDeg as single, byval yawDeg as single, byval rollDeg as single)

' #########################

' # CollisionObjectSphere #

' #########################

declare function CollisionObjectSphereCreateNew () as CollisionObjectSphere ptr

declare sub CollisionObjectSphereRelease (byref pObj as CollisionObjectSphere ptr)

declare sub CollisionObjectSphereInitialise(byval pObj as const CollisionObjectSphere ptr, _

byval centerX as single, byval centerY as single, byval centerZ as single, _

byval radius as single)

declare sub CollisionObjectSphereV3Initialise(byval pObj as const CollisionObjectSphere ptr, _

byref v3Center as const TA_Vec3, byval radius as single)

declare sub CollisionObjectSphereGetPoint (byval pObj as const CollisionObjectSphere ptr, _

byref centerX as single, byref centerY as single, byref centerZ as single)

declare sub CollisionObjectSphereV3GetPoint (byval pObj as const CollisionObjectSphere ptr, byref v3Point as TA_Vec3)

declare function CollisionObjectSphereGetRadius (byval pObj as const CollisionObjectSphere ptr) as single

' ###########################

' # CollisionObjectCylinder #

' ###########################

declare function CollisionObjectCylinderCreateNew () as CollisionObjectCylinder ptr

declare sub CollisionObjectCylinderRelease (byref pObj as CollisionObjectCylinder ptr)

declare sub CollisionObjectCylinderInitialise(byval pObj as const CollisionObjectCylinder ptr, _

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 radius as single)

declare sub CollisionObjectCylinderV3Initialise(byval pObj as const CollisionObjectCylinder ptr, _

byref PointA as const TA_Vec3,byref PointB as const TA_Vec3,byref radius as single)

declare sub CollisionObjectCylinderGetPointA (byval pObj as const CollisionObjectCylinder ptr, _

byref startX as single, byref startY as single, byref startZ as single)

declare sub CollisionObjectCylinderV3GetPointA(byval pObj as const CollisionObjectCylinder ptr, byref v3PointA as TA_Vec3)

declare sub CollisionObjectCylinderGetPointB (byval pObj as const CollisionObjectCylinder ptr, _

byref endX as single, byref endY as single, byref endZ as single)

declare sub CollisionObjectCylinderV3GetPointB(byval pObj as const CollisionObjectCylinder ptr, byref v3PointB as TA_Vec3)

declare function CollisionObjectCylinderGetRadius (byval pObj as const CollisionObjectCylinder ptr) as single

' ##########################

' # CollisionObjectCapsule #

' ##########################

declare function CollisionObjectCapsuleCreateNew () as CollisionObjectCapsule ptr

declare sub CollisionObjectCapsuleRelease (byref pObj as const CollisionObjectCapsule ptr)

declare sub CollisionObjectCapsuleInitialise(byval pObj as const CollisionObjectCapsule ptr, _

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 radius as single)

declare sub CollisionObjectCapsuleV3Initialise(byval pObj as const CollisionObjectCapsule ptr, _

byref PointA as const TA_Vec3, byref PointB as const TA_Vec3, byval radius as single)

declare sub CollisionObjectCapsuleGetPointA (byval pObj as const CollisionObjectCapsule ptr, _

byref startX as single, byref startY as single, byref startZ as single)

declare sub CollisionObjectCapsuleV3GetPointA(byval pObj as const CollisionObjectCapsule ptr, byref v3PointA as TA_Vec3)

declare sub CollisionObjectCapsuleGetPointB (byval pObj as const CollisionObjectCapsule ptr, _

byref endX as single, byref endY as single, byref endZ as single)

declare sub CollisionObjectCapsuleV3GetPointB(byval pObj as const CollisionObjectCapsule ptr, byref v3PointB as TA_Vec3)

declare function CollisionObjectCapsuleGetRadius (byval pObj as const CollisionObjectCapsule ptr) as single

' ###########################

' # CollisionObjectLineList #

' ###########################

declare function CollisionObjectLineListCreateNew() as CollisionObjectLineList ptr

declare sub CollisionObjectLineListRelease(byref co as CollisionObjectLineList ptr)

' pFloat points to a liat of x,y,z coords 6 for each line (startX,startY,startZ, endX,endY,endZ)

declare sub CollisionObjectLineListInitialise (byval pObj as const CollisionObjectLineList ptr, _

byval pFloat as const single ptr, byval nLines as integer)

' pV3 points to a list of vertices 2 vertex for each line (v3Start,v3End)

declare sub CollisionObjectLineListV3Initialise(byval pObj as const CollisionObjectLineList ptr, _

byval pV3 as const TA_Vec3 ptr, byval nLines as integer)

declare sub CollisionObjectLineListSetLine(byval pObj as const CollisionObjectLineList ptr, _

byval nLineIndex as integer, _

byval sx as single, byval sy as single, byval sz as single, _

byval ex as single, byval ey as single, byval ez as single)

declare sub CollisionObjectLineListV3SetLine(byval pObj as const CollisionObjectLineList ptr, _

byval nLineIndex as integer, _

byref v3Start as const TA_Vec3, _

byref v3End as const TA_Vec3)

declare function CollisionObjectLineListGetNumLines(byval pObj as const CollisionObjectLineList ptr) as integer

' ########################

' # CollisionObjectCombo #

' ########################

declare function CollisionObjectComboCreateNew() as CollisionObjectCombo ptr

declare sub CollisionObjectComboRelease(byref pObj as const CollisionObjectCombo ptr)

declare sub CollisionObjectComboInitialise(byval pObj as const CollisionObjectCombo ptr)

declare sub CollisionObjectComboInitialiseAsACube(byval pObj as const CollisionObjectCombo ptr, _

byval centerX as single, byval centerY as single, byval centerZ as single, _

byval size as single)

declare sub CollisionObjectComboV3InitialiseAsACube(byval pObj as const CollisionObjectCombo ptr, _

byref v3Center as const TA_Vec3, _

byval size as single)

declare sub CollisionObjectComboInitialiseAsAnOrientedCube(byval pObj as const CollisionObjectCombo ptr, _

byval cx as single, byval cy as single, byval cz as single, _ ' center

byval size as single, _

byval px as single, byval py as single, byval pz as single, _ ' position

byval pitch as single, byval yaw as single, byval roll as single)

declare sub CollisionObjectComboV3InitialiseAsAnOrientedCube(byval pObj as const CollisionObjectCombo ptr, _

byref v3Center as const TA_Vec3, _

byval size as single, _

byref v3Position as const TA_Vec3, _

byval pitch as single, byval yaw as single, byval roll as single)

declare sub CollisionObjectComboInitialiseAsABox(byval pObj as const CollisionObjectCombo ptr, _

byval centerX as single, byval centerY as single, byval centerZ as single, _

byval extentX as single, byval extentY as single, byval extentZ as single)

declare sub CollisionObjectComboV3InitialiseAsABox(byval pObj as const CollisionObjectCombo ptr, _

byref v3Center as const TA_Vec3, byref v3Dimension as const TA_Vec3)

declare sub CollisionObjectComboAABBInitialiseAsABox(byval pObj as const CollisionObjectCombo ptr, _

byref aabb as const TA_AABB)

declare sub CollisionObjectComboInitialiseAsAnOrientedBox(byval pObj as const CollisionObjectCombo ptr, _

byval cx as single, byval cy as single, byval cz as single, _ ' center

byval w as single, byval h as single, byval d as single, _ ' size

byval px as single, byval py as single, byval pz as single, _ ' position

byval pitch as single, byval yaw as single, byval roll as single)

declare sub CollisionObjectComboV3InitialiseAsAnOrientedBox(byval pObj as const CollisionObjectCombo ptr, _

byref v3Center as const TA_Vec3, _

byref v3Size as const TA_Vec3, _

byref v3Position as const TA_Vec3, _

byval pitch as single, byval yaw as single, byval roll as single)

declare sub CollisionObjectComboAABBInitialiseAsAnOrientedBox(byval pObj as const CollisionObjectCombo ptr, _

byref aabb as const TA_AABB, _ ' center and extend

byref frame as const TA_MFrame) ' rotation and position

declare sub CollisionObjectComboInitialiseAsACapsule(byval pObj as const CollisionObjectCombo ptr, _

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 radius as single)

declare sub CollisionObjectComboV3InitialiseAsACapsule(byval pObj as CollisionObjectCombo ptr, _

byref v3PointA as const TA_Vec3, byref v3PointA as const TA_Vec3, byval radius as single)

declare sub CollisionObjectComboInitialiseAsACylinder(byval pObj as const CollisionObjectCombo ptr, _

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 radius as single)

declare sub CollisionObjectComboV3InitialiseAsACylinder(byval pObj as CollisionObjectCombo ptr, _

byref v3PointA as const TA_Vec3, byref v3PointA as const TA_Vec3, byval radius as single)

declare sub CollisionObjectComboInitialiseAsASphere(byval pObj as const CollisionObjectCombo ptr, _

byval centerX as single, byval centerY as single, byval centerZ as single, _

byval radius as single)

declare sub CollisionObjectComboV3InitialiseAsASphere(byval pObj as const CollisionObjectCombo ptr, _

byref v3Center as const TA_Vec3, byval radius as single)

declare sub CollisionObjectComboAddCollisionObject (byval pA as const CollisionObjectCombo ptr, byval pB as const CollisionObjectSimple ptr)

declare function CollisionObjectComboGetNumCollisionObjects(byval pObj as const CollisionObjectCombo ptr) as integer

declare sub CollisionObjectComboRemoveCollisionObject (byval pObj as const CollisionObjectCombo ptr, byval n as integer)

' ###############

' # CarTemplate #

' ###############

declare function CarTemplateCreateNew() as CarTemplate ptr

declare sub CarTemplateRelease(byref pObj as CarTemplate ptr)

declare sub CarTemplateBeginInitialise(byval pObj as const CarTemplate ptr)

declare sub CarTemplateEndInitialise (byval pObj as const CarTemplate ptr)

declare sub CarTemplateAddCollisionObjectConvex (byval pObj as const CarTemplate ptr, byval pColObj as const CollisionObjectConvex ptr)

declare sub CarTemplateAddCollisionObjectCylinder(byval pObj as const CarTemplate ptr, byval pColObj as const CollisionObjectCylinder ptr)

declare sub CarTemplateAddCollisionObjectCapsule (byval pObj as const CarTemplate ptr, byval pColObj as const CollisionObjectCapsule ptr)

declare sub CarTemplateAddCollisionObjectSphere (byval pObj as const CarTemplate ptr, byval pColObj as const CollisionObjectSphere ptr)

declare sub CarTemplateSetOrientation(byval pObj as const CarTemplate ptr, _

byval forwardX as single, byval forwardY as single, byval forwardZ as single, _

byval upX as single, byval upY as single, byval upZ as single)

declare sub CarTemplateGetForward (byval pObj as const CarTemplate ptr, _

byref forwardX as single, byref forwardY as single, byref forwardZ as single)

declare sub CarTemplateV3GetForward (byval pObj as const CarTemplate ptr, byref v3Forward as TA_Vec3)

declare sub CarTemplateGetUp (byval pObj as const CarTemplate ptr, _

byref upX as single, byref upY as single, byref upZ as single)

declare sub CarTemplateV3GetUp (byval pObj as const CarTemplate ptr, byref v3Up as TA_Vec3)

declare sub CarTemplateSetNumGears(byval pObj as const CarTemplate ptr, byval nGear as integer)

declare function CarTemplateGetNumGears(byval pObj as const CarTemplate ptr) as integer

declare sub CarTemplateSetGearRatio(byval pObj as const CarTemplate ptr, byval nGear as integer, byval ratio as single)

declare function CarTemplateGetGearRatio(byval pObj as const CarTemplate ptr, byval nGear as integer) as single

declare sub CarTemplateSetDifferentialRatio(byval pObj as const CarTemplate ptr,byval ratio as single)

declare function CarTemplateGetDifferentialRatio(byval pObj as const CarTemplate ptr) as single

declare sub CarTemplateSetMass(byval pObj as const CarTemplate ptr, byval mass as single)

declare function CarTemplateGetMass(byval pObj as const CarTemplate ptr) as single

declare sub CarTemplateSetTransmissionEfficiency(byval pObj as const CarTemplate ptr, byval efficiency as single)

declare function CarTemplateGetTransmissionEfficiency(byval pObj as const CarTemplate ptr) as single

declare sub CarTemplateSetTorqueMultiplier(byval pObj as const CarTemplate ptr, byval multiplier as single)

declare function CarTemplateGetTorqueMultiplier(byval pObj as const CarTemplate ptr) as single

declare sub CarTemplateSetAirResistance(byval pObj as const CarTemplate ptr, byval resistance as single)

declare function CarTemplateGetAirResistance(byval pObj as const CarTemplate ptr) as single

declare sub CarTemplateSetDownForce(byval pObj as const CarTemplate ptr, byval force as single)

declare function CarTemplateGetDownForce(byval pObj as const CarTemplate ptr) as single

declare sub CarTemplateSetAntiRollFudge(byval pObj as const CarTemplate ptr, byval fudge as single)

declare function CarTemplateGetAntiRollFudge(byval pObj as const CarTemplate ptr) as single

declare sub CarTemplateAddWheel(byval pObj as const CarTemplate ptr)

' ####################

' # CarTemplateWheel #

' ####################

declare sub CarTemplateWheelClear()

declare sub CarTemplateWheelSetSuspensionTop(byval x as single, byval y as single, byval z as single)

declare sub CarTemplateWheelGetSuspensionTop(byref x as single , byref y as single, byref z as single)

declare sub CarTemplateWheelV3SetSuspensionTop(byref v3Top as const TA_Vec3)

declare sub CarTemplateWheelV3GetSuspensionTop(byref v3Top as TA_Vec3)

declare sub CarTemplateWheelSetSuspensionBottom(byval x as single, byval y as single, byval z as single)

declare sub CarTemplateWheelGetSuspensionBottom(byref x as single, byref y as single, byref z as single)

declare sub CarTemplateWheelV3SetSuspensionBottom(byref v3Bottom as const TA_Vec3)

declare sub CarTemplateWheelV3GetSuspensionBottom(byref v3Bottom as TA_Vec3)

declare sub CarTemplateWheelSetRadius(byval radius as single)

declare function CarTemplateWheelGetRadius() as single

declare sub CarTemplateWheelSetInertia(byval inertia as single)

declare function CarTemplateWheelGetInertia() as single

declare sub CarTemplateWheelSetBrakeTorque(byval torque as single)

declare function CarTemplateWheelGetBrakeTorque() as single

declare sub CarTemplateWheelSetRollResistance(byval resistance as single)

declare function CarTemplateWheelGetRollResistance() as single

declare sub CarTemplateWheelSetSuspensionSpringConstant(byval springconst as single)

declare function CarTemplateWheelGetSuspensionSpringConstant() as single

declare sub CarTemplateWheelSetSuspensionDampingConstant(byval dampingconst as single)

declare function CarTemplateWheelGetSuspensionDampingConstant() as single

declare sub CarTemplateWheelSetSteeringFlag(byval bEnabled as integer)

declare function CarTemplateWheelGetSteeringFlag() as integer

declare sub CarTemplateWheelSetDrivingFlag(byval bEnabled as integer)

declare function CarTemplateWheelGetDrivingFlag() as integer

declare sub CarTemplateWheelSetHandBrakeFlag(byval bEnabled as integer)

declare function CarTemplateWheelGetHandBrakeFlag() as integer

' #################

' # PhysicsObject #

' #################

declare function PhysicsObjectAddedToPhysics(byval pObj as const PhysicsObject ptr) as integer

' ####################

' # DynamicObjectCar #

' ####################

declare function DynamicObjectCarCreateNew() as DynamicObjectCar ptr

declare sub DynamicObjectCarRelease(byref pObj as DynamicObjectCar ptr)

declare sub DynamicObjectCarInitialise(byval pObj as const DynamicObjectCar ptr, byval pTemplate as const CarTemplate ptr)

declare sub DynamicObjectCarClearControls(byval pObj as const DynamicObjectCar ptr)

declare sub DynamicObjectCarUpdateControls(byval pObj as const DynamicObjectCar ptr, _

byval fSteeringAngle as single, _

byval fAccelerator as single, _

byval fBrake as single, _

byval fHandBrake as single, _

byval bSteeringHelp as integer, _

byval fTractionControl as single, _

byval nGear as integer)

declare function DynamicObjectCarGetRPM (byval pObj as const DynamicObjectCar ptr) as single

declare function DynamicObjectCarGetGear (byval pObj as const DynamicObjectCar ptr) as integer

declare function DynamicObjectCarGetNumGears(byval pObj as const DynamicObjectCar ptr) as integer

declare function DynamicObjectCarGetSpeed(byval pObj as const DynamicObjectCar ptr) as single

declare function DynamicObjectCarGetSpeedFromWheels(byval pObj as const DynamicObjectCar ptr) as single

declare function DynamicObjectCarGetSpeedFromVelocity(byval pObj as const DynamicObjectCar ptr) as single

declare sub DynamicObjectCarSetTorqueMultiplier(byval pObj as const DynamicObjectCar ptr, byval fTorqueMultiplier as single)

declare function DynamicObjectCarGetTorqueMultiplier(byval pObj as const DynamicObjectCar ptr) as single

declare sub DynamicObjectCarSetAntiRollFudge(byval pObj as const DynamicObjectCar ptr, byval fAntiRollFudge as single)

declare function DynamicObjectCarGetAntiRollFudge(byval pObj as const DynamicObjectCar ptr) as single

declare sub DynamicObjectCarSetOrientation(byval pObj as const DynamicObjectCar ptr, _

byval forwardX as single, byval forwardY as single, byval forwardZ as single, _

byval upX as single, byval upY as single, byval upZ as single)

declare sub DynamicObjectCarV3SetOrientation(byval pObj as const DynamicObjectCar ptr, _

byref v3Forward as const TA_Vec3, byref v3Up as const TA_Vec3)

declare sub DynamicObjectCarGetForward(byval pObj as const DynamicObjectCar ptr, _

byref forwardX as single, byref forwardY as single, byref forwardZ as single)

declare sub DynamicObjectCarV3GetForward(byval pObj as const DynamicObjectCar ptr, byref v3Forward as TA_Vec3)

declare sub DynamicObjectCarGetUp (byval pObj as const DynamicObjectCar ptr, _

byref upX as single, byref upY as single, byref upZ as single)

declare sub DynamicObjectV3CarGetUp (byval pObj as const DynamicObjectCar ptr, byref v3Up as TA_Vec3)

declare sub DynamicObjectCarGetFrame(byval pObj as const DynamicObjectCar ptr, byref frame as TA_MFrame)

declare function DynamicObjectCarGetNumWheels(byval pObj as const DynamicObjectCar ptr) as integer

' #########################

' # DynamicObjectCarWheel #

' #########################

declare sub DynamicObjectCarWheelGetLocalFrame(byval pObj as const DynamicObjectCar ptr,byval nWheel as integer, byref frame as TA_MFrame)

declare sub DynamicObjectCarWheelGetFrame(byval pObj as const DynamicObjectCar ptr,byval nWheel as integer, byref frame as TA_MFrame)

declare sub DynamicObjectCarWheelGetLocalOpenGLMatrix (byval pObj as const DynamicObjectCar ptr, byval nWheel as integer, byval pMatrix4x4 as const single ptr)

#ifdef USEOPENGL

declare sub DynamicObjectCarWheelMultOpenGLMatrix (byval pObj as const DynamicObjectCar ptr, byval nWheel as integer)

declare sub DynamicObjectCarWheelMultLocalOpenGLMatrix(byval pObj as const DynamicObjectCar ptr, byval nWheel as integer)

#else

#define DynamicObjectCarWheelMultOpenGLMatrix (pObj,n) :

#define DynamicObjectCarWheelMultLocalOpenGLMatrix(pObj,n) :

#endif

declare sub DynamicObjectCarWheelGetLocalRotation (byval pObj as const DynamicObjectCar ptr, byval nWheel as integer, _

byref pitchRad as single, byref yawRad as single, byref rollRad as single)

declare sub DynamicObjectCarWheelGetLocalRotationD(byval pObj as const DynamicObjectCar ptr, byval nWheel as integer, _

byref pitchDeg as single, byref yawDeg as single, byref rollDeg as single)

declare sub DynamicObjectCarWheelGetLocalPosition (byval pObj as const DynamicObjectCar ptr, byval nWheel as integer, _

byref x as single, byref y as single, byref z as single)

declare sub DynamicObjectCarWheelV3GetLocalPosition(byval pObj as const DynamicObjectCar ptr, byref v3Position as TA_Vec3)

declare sub DynamicObjectCarWheelSetRadius(byval pObj as const DynamicObjectCar ptr, byval nWheel as integer, byval radius as single)

declare function DynamicObjectCarWheelGetRadius(byval pObj as const DynamicObjectCar ptr, byval nWheel as integer) as single

declare sub DynamicObjectCarWheelSetInvInertia(byval pObj as const DynamicObjectCar ptr, byval nWheel as integer, byval inertia as single)

declare function DynamicObjectCarWheelGetInvInertia(byval pObj as const DynamicObjectCar ptr, byval nWheel as integer) as single

declare sub DynamicObjectCarWheelSetBrakeTorque(byval pObj as const DynamicObjectCar ptr, byval nWheel as integer, byval torque as single)

declare function DynamicObjectCarWheelGetBrakeTorque(byval pObj as const DynamicObjectCar ptr, byval nWheel as integer) as single

declare sub DynamicObjectCarWheelSetRollResistance(byval pObj as const DynamicObjectCar ptr, byval nWheel as integer, byval resistance as single)

declare function DynamicObjectCarWheelGetRollResistance(byval pObj as const DynamicObjectCar ptr, byval nWheel as integer) as single

declare sub DynamicObjectCarWheelSetSuspensionSpringConstant(byval pObj as const DynamicObjectCar ptr, byval nWheel as integer, byval springconst as single)

declare function DynamicObjectCarWheelGetSuspensionSpringConstant(byval pObj as const DynamicObjectCar ptr, byval nWheel as integer) as single

declare sub DynamicObjectCarWheelSetSuspensionDampingConstant(byval pObj as const DynamicObjectCar ptr, byval nWheel as integer, byval dampingconst as single)

declare function DynamicObjectCarWheelGetSuspensionDampingConstant(byval pObj as const DynamicObjectCar ptr, byval nWheel as integer) as single

declare sub DynamicObjectCarWheelSetSteeringFlag(byval pObj as const DynamicObjectCar ptr, byval nWheel as integer, byval bSteeringFlag as integer)

declare function DynamicObjectCarWheelGetSteeringFlag(byval pObj as const DynamicObjectCar ptr, byval nWheel as integer) as integer

declare sub DynamicObjectCarWheelSetDrivingFlag(byval pObj as const DynamicObjectCar ptr, byval nWheel as integer, byval bDrivingFlag as integer)

declare function DynamicObjectCarWheelGetDrivingFlag(byval pObj as const DynamicObjectCar ptr, byval nWheel as integer) as integer

declare sub DynamicObjectCarWheelSetHandBrakeFlag(byval pObj as const DynamicObjectCar ptr, byval nWheel as integer, byval bHandBrakeFlag as integer)

declare function DynamicObjectCarWheelGetHandBrakeFlag(byval pObj as const DynamicObjectCar ptr, byval nWheel as integer) as integer

declare function DynamicObjectCarWheelGetCollisionFlag(byval pObj as const DynamicObjectCar ptr, byval nWheel as integer) as integer

declare function DynamicObjectCarWheelGetCollisionAttribute(byval pObj as const DynamicObjectCar ptr, byval nWheel as integer) as integer

declare sub DynamicObjectCarWheelSetYaw(byval pObj as const DynamicObjectCar ptr, byval nWheel as integer, byval fYaw as single)

declare function DynamicObjectCarWheelGetYaw(byval pObj as const DynamicObjectCar ptr, byval nWheel as integer) as single

declare sub DynamicObjectCarWheelSetPitch(byval pObj as const DynamicObjectCar ptr, byval nWheel as integer, byval fPitch as single)

declare function DynamicObjectCarWheelGetPitch(byval pObj as const DynamicObjectCar ptr, byval nWheel as integer) as single

declare sub DynamicObjectCarWheelSetPitchVelocity(byval pObj as const DynamicObjectCar ptr, byval nWheel as integer, byval fPitchVelocity as single)

declare function DynamicObjectCarWheelGetPitchVelocity(byval pObj as const DynamicObjectCar ptr, byval nWheel as integer) as single

declare sub DynamicObjectCarWheelSetCamberAngle(byval pObj as const DynamicObjectCar ptr, byval nWheel as integer, byval fCamberAngle as single)

declare function DynamicObjectCarWheelGetCamberAngle(byval pObj as const DynamicObjectCar ptr, byval nWheel as integer) as single

' #########################

' # DynamicObjectTemplate #

' #########################

declare function DynamicObjectTemplateCreateNew() as DynamicObjectTemplate ptr

declare sub DynamicObjectTemplateRelease(byref pObj as DynamicObjectTemplate ptr )

declare sub DynamicObjectTemplateInitialise(byval pObj as const DynamicObject ptr, _

byval pCombo as const CollisionObjectCombo ptr, _

byval cb as UpdateCB)

' #####################

' # DynamicObjectTank #

' #####################

declare function DynamicObjectTankCreateNew() as DynamicObjectTank ptr

declare sub DynamicObjectTankRelease(byref pObj as DynamicObjectTank ptr)

declare sub DynamicObjectTankInitialise(byval pObj as const DynamicObjectTank ptr)

declare sub DynamicObjectTankClearControls(byval pObj as const DynamicObjectTank ptr)

declare sub DynamicObjectTankUpdateControls(byval pObj as const DynamicObjectTank ptr, byval fLeftTred as single, byval fRightTred as single)

' #################

' # DynamicObject #

' #################

declare function DynamicObjectCreateNew() as DynamicObject ptr

declare sub DynamicObjectRelease(byref pObj as const DynamicObject ptr )

declare sub DynamicObjectInitialise(byval pObj as const DynamicObject ptr, byval pComboObj as const CollisionObjectCombo ptr)

declare sub DynamicObjectInitialiseAsACube(byval pObj as const DynamicObject ptr, _

byval centerX as single, byval centerY as single, byval centerZ as single, _

byval size as single)

declare sub DynamicObjectV3InitialiseAsACube(byval pObj as const DynamicObject ptr, byref v3Center as const TA_Vec3, byval size as single)

declare sub DynamicObjectInitialiseAsAnOrientedCube(byval pObj as const DynamicObject ptr, _

byval cx as single, byval cy as single, byval cz as single, _ ' center

byval size as single, _

byval px as single, byval py as single, byval pz as single, _ ' position

byval pitch as single, byval yaw as single, byval roll as single)

declare sub DynamicObjectV3InitialiseAsAnOrientedCube(byval pObj as const DynamicObject ptr, _

byref v3Center as const TA_Vec3, _

byval size as single, _

byref v3Position as const TA_Vec3, _

byval pitch as single, byval yaw as single, byval roll as single)

declare sub DynamicObjectInitialiseAsABox(byval pObj as const DynamicObject ptr, _

byval centerX as single, byval centerY as single, byval centerZ as single, _

byval sizeX as single, byval sizeY as single, byval sizeZ as single)

declare sub DynamicObjectV3InitialiseAsABox(byval pObj as const DynamicObject ptr, _

byref v3Center as const TA_Vec3, _

byref v3Extend as const TA_Vec3)

declare sub DynamicObjectAABBInitialiseAsABox(byval pObj as const DynamicObject ptr, byref aabb as const TA_AABB)

declare sub DynamicObjectInitialiseAsAnOrientedBox(byval pObj as const DynamicObject ptr, _

byval cx as single, byval cy as single, byval cz as single, _ ' center

byval w as single, byval h as single, byval d as single, _ ' size

byval px as single, byval py as single, byval pz as single, _ ' position

byval pitch as single, byval yaw as single, byval roll as single)

declare sub DynamicObjectV3InitialiseAsAnOrientedBox(byval pObj as const DynamicObject ptr, _

byref v3Center as const TA_Vec3, _ ' (most 0,0,0)

byref v3Size as const TA_Vec3, _

byref v3Position as const TA_Vec3, _

byval pitch as single, byval yaw as single, byval roll as single)

declare sub DynamicObjectAABBInitialiseAsAnOrientedBox(byval pObj as const DynamicObject ptr, _

byref aabb as const TA_AABB, _ ' center and extend

byref frame as const TA_MFrame) ' rotation and position

declare sub DynamicObjectInitialiseAsASphere(byval pObj as const DynamicObject ptr, _

byval centerX as single, byval centerY as single, byval centerZ as single, _

byval radius as single)

declare sub DynamicObjectV3InitialiseAsASphere(byval pObj as const DynamicObject ptr, byref v3Center as const TA_Vec3, byval radius as single)

declare sub DynamicObjectInitialiseAsACylinder(byval pObj as const DynamicObject ptr, _

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 radius as single)

declare sub DynamicObjectV3InitialiseAsACylinder(byval pObj as const DynamicObject ptr, _

byref v3PointA as const TA_Vec3, byref v3PointB as const TA_Vec3, byval radius as single)

declare sub DynamicObjectInitialiseAsACapsule (byval pObj as const DynamicObject ptr, _

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 radius as single)

declare sub DynamicObjectV3InitialiseAsACapsule(byval pObj as const DynamicObject ptr, _

byref v3PointA as const TA_Vec3, byref v3PointB as const TA_Vec3, byval radius as single)

declare sub DynamicObjectSetUserData(byval pObj as const DynamicObject ptr, byval pUserData as const any ptr)

declare function DynamicObjectGetUserData(byval pObj as const DynamicObject ptr) as any ptr

' helper only for DEBUG rendering by default all objects are visible

declare sub DynamicObjectSetVisible(byval pObj as const DynamicObject ptr, byval bVisible as integer)

declare function DynamicObjectIsVisible(byval pObj as const DynamicObject ptr) as integer

declare sub DynamicObjectSetMass(byval pObj as const DynamicObject ptr, byval mass as single)

declare function DynamicObjectGetMass(byval pObj as const DynamicObject ptr) as single

declare function DynamicObjectGetInverseMass(byval pObj as const DynamicObject ptr) as single

declare sub DynamicObjectSetCenterOffset(byval pObj as const DynamicObject ptr, byval x as single, byval y as single, byval z as single)

declare sub DynamicObjectGetCenterOffset(byval pObj as const DynamicObject ptr, byref x as single, byref y as single, byref z as single)

declare sub DynamicObjectV3SetCenterOffset(byval pObj as const DynamicObject ptr, byref v3CenterOffset as const TA_Vec3)

declare sub DynamicObjectV3GetCenterOffset(byval pObj as const DynamicObject ptr, byref v3CenterOffset as TA_Vec3)

declare sub DynamicObjectSetPosition(byval pObj as const DynamicObject ptr, byval x as single, byval y as single, byval z as single)

declare sub DynamicObjectGetPosition(byval pObj as const DynamicObject ptr, byref x as single, byref y as single, byref z as single)

declare sub DynamicObjectV3SetPosition(byval pObj as const DynamicObject ptr, byref v3Postion as const TA_Vec3)

declare sub DynamicObjectV3GetPosition(byval pObj as const DynamicObject ptr, byref v3Postion as TA_Vec3)

declare sub DynamicObjectSetRotation(byval pObj as const DynamicObject ptr, byval pitchRad as single, byval yawRad as single, byval rollRad as single)

declare sub DynamicObjectGetRotation(byval pObj as const DynamicObject ptr, byref pitchRad as single, byref yawRad as single, byref rollRad as single)

declare sub DynamicObjectSetRotationD(byval pObj as const DynamicObject ptr, byval pitchDeg as single, byval yawDeg as single, byval rollDeg as single)

declare sub DynamicObjectGetRotationD(byval pObj as const DynamicObject ptr, byref pitchDeg as single, byref yawDeg as single, byref rollDeg as single)

declare sub DynamicObjectSetFriction(byval pObj as const DynamicObject ptr, byval fFriction as single)

declare function DynamicObjectGetFriction(byval pObj as const DynamicObject ptr) as single

' -1 to +1

declare sub DynamicObjectSetRestitution(byval pObj as const DynamicObject ptr, byval fRestitution as single)

declare function DynamicObjectGetRestitution(byval pObj as const DynamicObject ptr) as single

declare sub DynamicObjectSetGravityMult(byval pObj as const DynamicObject ptr, byval fGravityMult as single)

declare function DynamicObjectGetGravityMult(byval pObj as const DynamicObject ptr) as single

declare sub DynamicObjectSetInfiniteMass(byval pObj as const DynamicObject ptr, byval bInfiniteMass as integer)

declare function DynamicObjectIsInfiniteMass (byval pObj as const DynamicObject ptr) as integer

declare sub DynamicObjectSetRotationDisabled(byval pObj as const DynamicObject ptr, byval bRotationDisabled as integer)

declare function DynamicObjectIsRotationDisabled (byval pObj as const DynamicObject ptr) as integer

declare sub DynamicObjectSetMovementDisabled(byval pObj as const DynamicObject ptr, byval bMovementDisabled as integer)

declare function DynamicObjectIsMovementDisabled (byval pObj as const DynamicObject ptr) as integer

declare sub DynamicObjectSetForceFastSolverEnabled(byval pObj as const DynamicObject ptr, byval bFastSolverEnabled as integer)

declare function DynamicObjectIsForceFastSolverEnabled (byval pObj as const DynamicObject ptr) as integer

declare sub DynamicObjectSetAllDampingDisabled(byval pObj as const DynamicObject ptr, byval bAllDampingDisabled as integer)

declare function DynamicObjectIsAllDampingDisabled (byval pObj as const DynamicObject ptr) as integer

declare sub DynamicObjectSetExtraStability(byval pObj as const DynamicObject ptr,byval bExtraStability as integer)

declare function DynamicObjectIsExtraStability (byval pObj as const DynamicObject ptr) as integer

declare sub DynamicObjectSetRigidFrictionDisabled(byval pObj as const DynamicObject ptr, byval bRigidFrictionDisabled as integer)

declare function DynamicObjectIsRigidFrictionDisabled (byval pObj as const DynamicObject ptr) as integer

declare sub DynamicObjectSetCollisionDisabled(byval pObj as const DynamicObject ptr, byval bCollisionDisabled as integer)

declare function DynamicObjectIsCollisionDisabled (byval pObj as const DynamicObject ptr) as integer

declare sub DynamicObjectSetUpdateDisabled(byval pObj as const DynamicObject ptr, byval bUpdateDisabled as integer)

declare function DynamicObjectIsUpdateDisabled (byval pObj as const DynamicObject ptr) as integer

declare sub DynamicObjectSetGhost(byval pObj as const DynamicObject ptr, byval bGhost as integer)

declare function DynamicObjectIsGhost (byval pObj as const DynamicObject ptr) as integer

declare function DynamicObjectIsWorldObject(byval pObj as const DynamicObject ptr) as integer

declare sub DynamicObjectSetRestTimeMultiplier(byval pObj as const DynamicObject ptr, byval fRestTimeMultiplier as single)

declare function DynamicObjectGetRestTimeMultiplier(byval pObj as const DynamicObject ptr) as single

declare function DynamicObjectIsInMovingList(byval pObj as const DynamicObject ptr) as integer

declare sub DynamicObjectSetToMoving (byval pObj as const DynamicObject ptr, byval priority as ePHYSICS_MOVING_PRIORITIES)

declare sub DynamicObjectSetToResting(byval pObj as const DynamicObject ptr)

declare sub DynamicObjectSetLinearVelocity(byval pObj as const DynamicObject ptr, byval x as single, byval y as single, byval z as single)

declare sub DynamicObjectGetLinearVelocity(byval pObj as const DynamicObject ptr, byref x as single, byref y as single, byref z as single)

declare sub DynamicObjectV3SetLinearVelocity(byval pObj as const DynamicObject ptr, byref v3LinearVelocity as const TA_Vec3)

declare sub DynamicObjectV3GetLinearVelocity(byval pObj as const DynamicObject ptr, byref v3LinearVelocity as TA_Vec3)

declare sub DynamicObjectSetAngularVelocity(byval pObj as const DynamicObject ptr, byval x as single, byval y as single, byval z as single)

declare sub DynamicObjectGetAngularVelocity(byval pObj as const DynamicObject ptr, byref x as single, byref y as single, byref z as single)

declare sub DynamicObjectV3SetAngularVelocity(byval pObj as const DynamicObject ptr, byref v3AngularVelocity as const TA_Vec3)

declare sub DynamicObjectV3GetAngularVelocity(byval pObj as const DynamicObject ptr, byref v3AngularVelocity as TA_Vec3)

declare sub DynamicObjectGetVelocityAtWorldPosition(byval pObj as const DynamicObject ptr, _

byval worldX as single, byval worldY as single, byval worldZ as single, _

byref velX as single, byref velY as single, byref velZ as single)

declare sub DynamicObjectV3GetVelocityAtWorldPosition(byval pObj as const DynamicObject ptr, byref v3WorldPos as const TA_Vec3, byref v3Velocity as TA_Vec3)

declare sub DynamicObjectApplyImpulse(byval pObj as const DynamicObject ptr, _

byval impX as single, byval impY as single, byval impZ as single, _

byval worldX as single, byval worldY as single, byval worldZ as single)

declare sub DynamicObjectV3ApplyImpulse(byval pObj as const DynamicObject ptr, byref v3Impulse as const TA_Vec3, byref v3WorldPos as const TA_Vec3)

declare sub DynamicObjectApplyLinearImpulse(byval pObj as const DynamicObject ptr, _

byval impX as single, byval impY as single, byval impZ as single)

declare sub DynamicObjectV3ApplyLinearImpulse(byval pObj as const DynamicObject ptr, byref v3LinearImpulse as const TA_Vec3)

declare sub DynamicObjectApplyAngularImpulse(byval pObj as const DynamicObject ptr, _

byval impX as single, byval impY as single, byval impZ as single)

declare sub DynamicObjectV3ApplyAngularImpulse(byval pObj as const DynamicObject ptr, byref v3AngularImpulse as const TA_Vec3)

' ##############################################

' #´DynamicObject with CollisionObjectLineList #

' ##############################################

declare function DynamicObjectGetNumLineCollisions(byval pObj as const DynamicObject ptr) as integer

declare function DynamicObjectGetLineCollision(byval pObj as const DynamicObject ptr, byval nLineIndex as integer) as LineIntersection ptr

declare function DynamicObjectLineCollisionsGetIntersectionDepth(byval pObj as const DynamicObject ptr, byval nLineIndex as integer) as single

declare function DynamicObjectLineCollisionsGetAttribute(byval pObj as const DynamicObject ptr, byval nLineIndex as integer) as integer

declare sub DynamicObjectLineCollisionsGetPosition(byval pObj as const DynamicObject ptr, byval nLineIndex as integer, byref x as single, byref y as single, byref z as single)

declare sub DynamicObjectLineCollisionsV3GetPosition(byval pObj as const DynamicObject ptr, byval nLineIndex as integer, byref v3Position as TA_Vec3)

' v3WorldPosition = LineCollisionsGetPosition() * DynamicObjectGetFrame()

declare sub DynamicObjectLineCollisionsGetWorldPosition(byval pObj as const DynamicObject ptr, byval nLineIndex as integer, byref x as single, byref y as single, byref z as single)

declare sub DynamicObjectLineCollisionsV3GetWorldPosition(byval pObj as const DynamicObject ptr, byval nLineIndex as integer, byref v3Position as TA_Vec3)

declare sub DynamicObjectLineCollisionsGetNormal(byval pObj as const DynamicObject ptr, byval nLineIndex as integer, byref x as single, byref y as single, byref z as single)

declare sub DynamicObjectLineCollisionsV3GetNormal(byval pObj as const DynamicObject ptr, byval nLineIndex as integer, byref v3Normal as TA_Vec3)

declare function DynamicObjectLineCollisionsGetDynamicObject(byval pObj as const DynamicObject ptr, byval nLineIndex as integer) as DynamicObject ptr

declare function DynamicObjectLineCollisionsGetCollisionObjectType(byval pObj as const DynamicObject ptr, byval nLineIndex as integer) as eCOLLISIONOBJECT_TYPES

declare sub DynamicObjectAdjustLineCollisionFromNextFrame(byval pObj as const DynamicObject ptr, byval nLineIndex as integer)

' #######################

' # DynamicObject Joint #

' #######################

declare function DynamicObjectAddWorldJoint(byval pObj as const DynamicObject ptr) as PhysicsJoint ptr

declare function DynamicObjectAddJoint(byval pObj1 as const DynamicObject ptr, byval pObj2 as const DynamicObject ptr) as PhysicsJoint ptr

declare sub DynamicObjectRemoveJoint(byval pObj as const DynamicObject ptr, byval pJoint as const PhysicsJoint ptr)

declare sub DynamicObjectRemoveAllJoints(byval pObj as const DynamicObject ptr)

' ###########################

' # DynamicObject Usergroup #

' ###########################

declare function DynamicObjectCreateUserGroup(byval pObj as const DynamicObject ptr) as integer

declare sub DynamicObjectSetUserGroup(byval pObj as const DynamicObject ptr, byval nUserGroup as integer)

declare function DynamicObjectGetUserGroup(byval pObj as const DynamicObject ptr) as integer

declare sub DynamicObjectSetUserGroupItemId(byval pObj as const DynamicObject ptr, byval nItemId as integer)

declare function DynamicObjectGetUserGroupItemId(byval pObj as const DynamicObject ptr) as integer

declare sub DynamicObjectDisallowCollisionWithUserGroupItemId(byval pObj as const DynamicObject ptr, byval nItemId as integer)

declare sub DynamicObjectAllowCollisionWithUserGroupItemId(byval pObj as const DynamicObject ptr, byval nItemId as integer)

declare function DynamicObjectIsAllowedToCollideWith(byval pObjA as const DynamicObject ptr, byval pObjB as const DynamicObject ptr) as integer

' ###################################

' # DynamicObject physic simualtion #

' ###################################

' optional for advanced users

' use it inside of the DynamicObjectTemplate UpdateCallback

' step 1. Make sure that force and torque have been cleared.

declare sub DynamicObjectAssertForceAndTorqueCleared(byval pObj as const DynamicObject ptr)

' step 2. Do gravity

declare sub DynamicObjectAccumulateGravity(byval pObj as const DynamicObject ptr)

' step 3. Apply a force to the dynamic object

declare sub DynamicObjectAccumulateForceAndTorque(byval pObj as const DynamicObject ptr, _

byval worldForceX as single, byval worldForceY as single, byval worldForceZ as single, _

byval worldPosX as single, byval worldPosY as single, byval worldPosZ as single)

declare sub DynamicObjectV3AccumulateForceAndTorque(byval pObj as const DynamicObject ptr, _

byref v3WorldForce as const TA_Vec3, _

byref v3WorldPosition as const TA_Vec3)

' step 4. Apply the forces to linear and angular velocity

declare sub DynamicObjectApplyForceAndTorqueToVelocities(byval pObj as const DynamicObject ptr, byval fDt as single)

' step 5. Clear force and torque (kg.m/s2).

declare sub DynamicObjectClearForceAndTorque(byval pObj as const DynamicObject ptr)

' step 6. Update date the next frame of the dynamic object, ready for collision testing.

declare sub DynamicObjectApplyVelocityToNextFrame(byval pObj as const DynamicObject ptr, byval fDt as single)

declare sub DynamicObjectApplyVelocityFromNextFrame(byval pObj as const DynamicObject ptr, byval fDt as single)

' step 7. optional if the DynamicObject used a CollisionObjectLineList

declare sub DynamicObjectClearLineIntersections(byval pObj as const DynamicObject ptr)

' ApplyNextFrame will be called to by Update automatically after the collision response has been done.

declare sub DynamicObjectApplyNextFrame(byval pObj as const DynamicObject ptr)

declare sub DynamicObjectAccumulateLinearForce(byval pObj as const DynamicObject ptr, _

byval worldForceX as single, byval worldForceY as single, byval worldForceZ as single)

declare sub DynamicObjectV3AccumulateLinearForce(byval pObj as const DynamicObject ptr, byref v3WorldForce as const TA_Vec3)

declare sub DynamicObjectSetFindVelocityFromNextFrame(byval pObj as const DynamicObject ptr, byval bEnable as integer)

declare function DynamicObjectGetFindVelocityFromNextFrame(byval pObj as const DynamicObject ptr) as integer

declare sub DynamicObjectUpdateWorldSpaceInertialTensor(byval pObj as const DynamicObject ptr)

declare sub DynamicObjectGetWorldAABB(byval pObj as const DynamicObject ptr, byref aabb as TA_AABB)

declare sub DynamicObjectSetFrame(byval pObj as const DynamicObject ptr, byref frame as const TA_MFrame)

declare sub DynamicObjectSetFrameDirect(byval pObj as const DynamicObject ptr, byref frame as const TA_MFrame)

declare sub DynamicObjectGetFrame(byval pObj as const DynamicObject ptr, byref frame as TA_MFrame)

declare sub DynamicObjectGetNextFrame(byval pObj as const DynamicObject ptr, byref frame as TA_MFrame)

declare sub DynamicObjectGetPreviousFrame(byval pObj as const DynamicObject ptr, byref frame as TA_MFrame)

declare sub DynamicObjectGetGraphicsFrame(byval pObj as const DynamicObject ptr, byref frame as TA_MFrame)

declare sub DynamicObjectGetCenterOfMass (byval pObj as const DynamicObject ptr, byref v3CenterOfMass as TA_Vec3)

declare sub DynamicObjectGetNextCenterOfMass(byval pObj as const DynamicObject ptr, byref v3CenterOfMass as TA_Vec3)

declare sub DynamicObjectGetFrameRotation (byval pObj as const DynamicObject ptr, byref m33 as TA_Mat33)

declare sub DynamicObjectGetFrameRotationV3X(byval pObj as const DynamicObject ptr, byref v3X as TA_Vec3)

declare sub DynamicObjectGetFrameRotationV3Y(byval pObj as const DynamicObject ptr, byref v3Y as TA_Vec3)

declare sub DynamicObjectGetFrameRotationV3Z(byval pObj as const DynamicObject ptr, byref v3Z as TA_Vec3)

declare sub DynamicObjectGetNextFrameRotation (byval pObj as const DynamicObject ptr, byref m33 as TA_Mat33)

declare sub DynamicObjectGetNextFrameRotationV3X(byval pObj as const DynamicObject ptr, byref v3X as TA_Vec3)

declare sub DynamicObjectGetNextFrameRotationV3Y(byval pObj as const DynamicObject ptr, byref v3Y as TA_Vec3)

declare sub DynamicObjectGetNextFrameRotationV3Z(byval pObj as const DynamicObject ptr, byref v3Z as TA_Vec3)

declare sub DynamicObjectGetFrameRotationTransposeAsInverse(byval pObj as const DynamicObject ptr, byref m33 as TA_Mat33)

' #######################

' # DynamicObject Tools #

' #######################

declare sub DynamicObjectGetOpenGLMatrix(byval pObj as const DynamicObject ptr, byval pMatrix4x4 as const single ptr)

declare sub DynamicObjectGetOpenGLFrame (byval pObj as const DynamicObject ptr, byref frame as TA_MFrame)

#ifdef USEOPENGL

declare sub DynamicObjectMultOpenGLMatrix(byval pObj as const DynamicObject ptr)

#else

#define DynamicObjectMultOpenGLMatrix(pObj) :

#endif

' out=in*DynamicObjectGetFrame().Rotation()

declare sub DynamicObjectRotate(byval pObj as const DynamicObject ptr, _

byval inX as single, byval inY as single, byval inZ as single, _

byref outX as single, byref outY as single, byref outZ as single)

declare sub DynamicObjectV3Rotate(byval pObj as const DynamicObject ptr, _

byref v3In as const TA_Vec3, _

byref v3Out as TA_Vec3)

' out=in*DynamicObjectGetFrame().

declare sub DynamicObjectTransform(byval pObj as const DynamicObject ptr, _

byval inX as single, byval inY as single, byval inZ as single, _

byref outX as single, byref outY as single, byref outZ as single)

declare sub DynamicObjectV3Transform(byval pObj as const DynamicObject ptr, _

byref v3Vector as const TA_Vec3, _

byref v3Result as TA_Vec3)

' ################

' # PhysicsJoint #

' ################

' To disable any rotation use the return value of this function as min/max angle param.

declare function JointLimitDisabled() as single

' Call this function to initialise the joint as a Slider.

' The Object will be constrained to slide along the line that connects the points start and end

declare sub PhysicsJointInitialiseSlider(byval pObj as const PhysicsJoint ptr, _

byval x as single, byval y as single, byval z as single, _

byval startX as single, byval startY as single, byval startZ as single, _

byval endX as single, byval endY as single, byval endZ as single)

declare sub PhysicsJointV3InitialiseSlider(byval pObj as const PhysicsJoint ptr, _

byref v3Position as const TA_Vec3, _

byref v3LineStart as const TA_Vec3, _

byref v3LineEnd as const TA_Vec3)

' Call this function to initialise the joint as a hinge.

declare sub PhysicsJointInitialiseHinge(byval pObj as const PhysicsJoint ptr, _

byval x as single, byval y as single, byval z as single, _

byval axisX as single, byval axisY as single, byval axisZ as single, _

byval minAngle as single, byval maxAngle as single)

declare sub PhysicsJointV3InitialiseHinge(byval pObj as const PhysicsJoint ptr, _

byref v3Position as const TA_Vec3, _

byref v3Axis as const TA_Vec3, _

byval minAngle as single, byval maxAngle as single)

' Call this function to initialise this joint as a ball and socket constraint.

declare sub PhysicsJointInitialiseBallAndSocket(byval pObj as const PhysicsJoint ptr, _

byval x as single, byval y as single, byval z as single, _

byval dirX as single, byval dirY as single, byval dirZ as single, _

byval maxAngle as single)

declare sub PhysicsJointV3InitialiseBallAndSocket(byval pObj as const PhysicsJoint ptr, _

byref v3Position as const TA_Vec3, _

byref v3Direction as const TA_Vec3, _

byval maxAngle as single)

' Call this function to initialise the joint as a Limited Ball And Socket constraint.

' This extends LimitedBallAndSocket by adding a twist constraint

declare sub PhysicsJointInitialiseLimitedBallAndSocket(byval pObj as const PhysicsJoint ptr, _

byval x as single, byval y as single, byval z as single, _

byval pitch as single, byval yaw as single, byval roll as single, _

byval maxAngleY as single, byval maxAngleXZ as single)

declare sub PhysicsJointV3InitialiseLimitedBallAndSocket(byval pObj as const PhysicsJoint ptr, _

byref v3Position as const TA_Vec3, _

byval pitch as single, byval yaw as single, byval roll as single, _

byval maxAngleY as single, byval maxAngleXZ as single)

' Call this function to initialise the joint as an Euler Angle Constraint.

' This type of joint, joins two objects at one location, and constrains their relative rotation using minimum and maximum euler angles.

' This provides a flexible method for creating different types of joints however, gimbal lock can sometimes be a problem.

declare sub PhysicsJointInitialiseEulerConstraint(byval pObj as const PhysicsJoint ptr, _

byval x as single, byval y as single, byval z as single, _

byval pitch as single, byval yaw as single, byval roll as single, _

byval minAngleX as single, byval minAngleY as single, byval minAngleZ as single, _

byval maxAngleX as single, byval maxAngleY as single, byval maxAngleZ as single)

declare sub PhysicsJointV3InitialiseEulerConstraint(byval pObj as const PhysicsJoint ptr, _

byref v3Position as const TA_Vec3, _

byval pitch as single, byval yaw as single, byval roll as single, _

byval minAngleX as single, byval minAngleY as single, byval minAngleZ as single, _

byval maxAngleX as single, byval maxAngleY as single, byval maxAngleZ as single)

declare sub PhysicsJointInitialiseSquareSocket(byval pObj as const PhysicsJoint ptr, _

byval x as single, byval y as single, byval z as single, _

byval pitch as single, byval yaw as single, byval roll as single, _

byval minX as single, byval maxX as single, _

byval minY as single, byval maxY as single, _

byval minZ as single, byval maxZ as single)

declare sub PhysicsJointV3InitialiseSquareSocket(byval pObj as const PhysicsJoint ptr, _

byref v3Position as const TA_Vec3, _

byval pitch as single, byval yaw as single, byval roll as single, _

byval minX as single, byval maxX as single, _

byval minY as single, byval maxY as single, _

byval minZ as single, byval maxZ as single)

' Call function to initialise the joint as a Rotation Constraint.

' Rotation is constrained by the max and min euler angles. Position is !!! not !!! constraint.

declare sub PhysicsJointInitialiseRotationConstraint(byval pObj as const PhysicsJoint ptr, _

byval pitch as single, byval yaw as single, byval roll as single, _

byval minAngleX as single, byval minAngleY as single, byval minAngleZ as single, _

byval maxAngleX as single, byval maxAngleY as single, byval maxAngleZ as single)

' Call this function to initialise the joint as a Vector Constraint.

' The rotation away from v3LimitCenterDirection is limited between the two objects.

declare sub PhysicsJointInitialiseVectorConstraint(byval pObj as const PhysicsJoint ptr, _

byval LimitCenterDirX as single, byval LimitCenterDirY as single, byval LimitCenterDirZ as single, _

byval maxAngle as single)

declare sub PhysicsJointV3InitialiseVectorConstraint(byval pObj as const PhysicsJoint ptr, _

byref v3LimitCenterDirection as const TA_Vec3, _

byval maxAngle as single)

' ############################

' # Physics Joint Properties #

' ############################

declare function PhysicsJointGetType(byval pObj as const PhysicsJoint ptr) as ePHYSICS_JOINT_TYPES

declare function PhysicsJointIsObjectASolid(byval pObj as const PhysicsJoint ptr) as integer

declare sub PhysicsJointSetObjectASolid(byval pObj as const PhysicsJoint ptr, byval bObjectASolid as integer)

declare function PhysicsJointIsObjectBSolid(byval pObj as const PhysicsJoint ptr) as integer

declare sub PhysicsJointSetObjectBSolid(byval pObj as const PhysicsJoint ptr, byval bObjectBSolid as integer)

declare sub PhysicsJointSetCollisionDisabledBetweenObjects(byval pObj as const PhysicsJoint ptr, byval bDisabled as integer)

declare function PhysicsJointIsCollisionDisabledBetweenObjects (byval pObj as const PhysicsJoint ptr) as integer

declare sub PhysicsJointSetBreakForce(byval pObj as const PhysicsJoint ptr, byval fBreakForce as single)

declare function PhysicsJointGetBreakForce(byval pObj as const PhysicsJoint ptr) as single

declare sub PhysicsJointSetBreakable(byval pObj as const PhysicsJoint ptr, byval bBreakable as integer)

declare function PhysicsJointIsBreakable (byval pObj as const PhysicsJoint ptr) as integer

declare sub PhysicsJointSetBroken(byval pObj as const PhysicsJoint ptr, byval bBroken as integer)

declare function PhysicsJointIsBroken (byval pObj as const PhysicsJoint ptr) as integer

declare sub PhysicsJointSetUserData(byval pObj as const PhysicsJoint ptr, byval pUserData as const any ptr)

declare function PhysicsJointGetUserData(byval pObj as const PhysicsJoint ptr) as any ptr

declare function PhysicsJointGetObjectA(byval pObj as const PhysicsJoint ptr) as const DynamicObject ptr

declare function PhysicsJointGetObjectB(byval pObj as const PhysicsJoint ptr) as const DynamicObject ptr

declare sub PhysicsJointGetPosOnObjectA(byval pObj as const PhysicsJoint ptr, _

byref x as single, byref y as single, byref z as single)

declare sub PhysicsJointV3GetPosOnObjectA(byval pObj as const PhysicsJoint ptr, _

byref v3Position as TA_Vec3)

declare sub PhysicsJointGetPosOnObjectB(byval pObj as const PhysicsJoint ptr, _

byref x as single, byref y as single, byref z as single)

declare sub PhysicsJointV3GetPosOnObjectB(byval pObj as const PhysicsJoint ptr, _

byref v3Position as TA_Vec3)

declare sub PhysicsJointGetLimitNormalOnObjectA(byval pObj as const PhysicsJoint ptr, _

byref x as single, byref y as single, byref z as single)

declare sub PhysicsJointV3GetLimitNormalOnObjectA(byval pObj as const PhysicsJoint ptr, _

byref v3Normal as TA_Vec3)

declare sub PhysicsJointGetLimitNormalOnObjectB(byval pObj as const PhysicsJoint ptr, _

byref x as single, byref y as single, byref z as single)

declare sub PhysicsJointV3GetLimitNormalOnObjectB(byval pObj as const PhysicsJoint ptr, _

byref v3Normal as TA_Vec3)

declare sub PhysicsJointGetCenterDirectionOnObjectA(byval pObj as const PhysicsJoint ptr, _

byref x as single, byref y as single, byref z as single)

declare sub PhysicsJointV3GetCenterDirectionOnObjectA(byval pObj as const PhysicsJoint ptr, byref v3CenterDir as TA_Vec3)

declare sub PhysicsJointGetCenterDirectionOnObjectB(byval pObj as const PhysicsJoint ptr, _

byref x as single, byref y as single, byref z as single)

declare sub PhysicsJointV3GetCenterDirectionOnObjectB(byval pObj as const PhysicsJoint ptr, _

byref v3CenterDir as TA_Vec3)

declare function PhysicsJointGetMaxAngle(byval pObj as const PhysicsJoint ptr) as single

declare sub PhysicsJointGetJointOrientationA(byval pObj as const PhysicsJoint ptr, _

byref pitch as single, byref yaw as single, byref roll as single)

declare sub PhysicsJointMat33GetJointOrientationA(byval pObj as const PhysicsJoint ptr, byref m33 as TA_Mat33)

declare sub PhysicsJointGetJointOrientationB(byval pObj as const PhysicsJoint ptr, _

byref pitch as single, byref yaw as single, byref roll as single)

declare sub PhysicsJointMat33GetJointOrientationB(byval pObj as const PhysicsJoint ptr, byref m33 as TA_Mat33)

declare sub PhysicsJointGetMinAngles(byval pObj as const PhysicsJoint ptr, _

byref minAngleX as single, byref minAngleY as single, byref minAngleZ as single)

declare sub PhysicsJointGetMaxAngles(byval pObj as const PhysicsJoint ptr, _

byref maxAngleX as single, byref maxAngleY as single, byref maxAngleZ as single)

declare sub PhysicsJointGetSliderPos0(byval pObj as const PhysicsJoint ptr, _

byref x as single, byref y as single, byref z as single)

declare sub PhysicsJointV3GetSliderPos0(byval pObj as const PhysicsJoint ptr, _

byref pos0 as TA_Vec3)

declare sub PhysicsJointGetSliderPos1(byval pObj as const PhysicsJoint ptr, _

byref x as single, byref y as single, byref z as single)

declare sub PhysicsJointV3GetSliderPos1(byval pObj as const PhysicsJoint ptr, _

byref pos1 as TA_Vec3)

' ###########################

' # CollisionObjectAABBMesh #

' ###########################

declare function CollisionObjectAABBMeshCreateNew() as CollisionObjectAABBMesh ptr

declare sub CollisionObjectAABBMeshRelease(byref pObj as CollisionObjectAABBMesh ptr)

declare sub CollisionObjectAABBMeshInitialise(byval pObj as const CollisionObjectAABBMesh ptr,byval nVertices as integer,byval nPolys as integer,byval nIndices as integer)

declare sub CollisionObjectAABBMeshAddVertex(byval pObj as const CollisionObjectAABBMesh ptr,byval x as single,byval y as single,byval z as single)

declare sub CollisionObjectAABBMeshV3AddVertex(byval pObj as const CollisionObjectAABBMesh ptr,byref v3Vertex as const TA_Vec3)

declare sub CollisionObjectAABBMeshAddPolygon(byval pObj as const CollisionObjectAABBMesh ptr,byval nIndices as integer,byval pIndices as const integer ptr,byval surfaceAttributeIndex as integer=DEFAULT_SURFACE_ATTRIBUTE)

declare sub CollisionObjectAABBMeshFinishedAddingGeometry(byval pObj as const CollisionObjectAABBMesh ptr)

declare sub CollisionObjectAABBMeshSetUserData(byval pObj as const CollisionObjectAABBMesh ptr, byval pUserData as const any ptr)

declare function CollisionObjectAABBMeshGetUserData(byval pObj as const CollisionObjectAABBMesh ptr) as any ptr

declare sub CollisionObjectAABBMeshRender(byval pObj as const CollisionObjectAABBMesh ptr)

' ################

' # StaticObject #

' ################

declare function StaticObjectCreateNew() as StaticObject ptr

declare sub StaticObjectRelease(byref pObj as StaticObject ptr)

declare sub StaticObjectInitialise(byval pObj as const StaticObject ptr,byval pMesh as const CollisionObjectAABBMesh ptr)

declare sub StaticObjectSetPosition(byval pObj as const StaticObject ptr,byval x as single,byval y as single,byval z as single)

declare sub StaticObjectV3SetPosition(byval pObj as const StaticObject ptr,byref v3Position as const TA_Vec3)

declare sub StaticObjectGetPosition(byval pObj as const StaticObject ptr, byref x as single, byref y as single, byref z as single)

declare sub StaticObjectV3GetPosition(byval pObj as const StaticObject ptr,byref v3Position as TA_Vec3)

declare sub StaticObjectSetRotation(byval pObj as const StaticObject ptr,byval pitch as single,byval yaw as single,byval roll as single)

declare sub StaticObjectGetRotation(byval pObj as const StaticObject ptr,byref pitch as single,byref yaw as single,byref roll as single)

declare function StaticObjectGetCollisionObject(byval pObj as const StaticObject ptr) as const CollisionObjectAABBMesh ptr

declare function StaticObjectGetDynamicObject(byval pObj as const StaticObject ptr) as const DynamicObject ptr

declare sub StaticObjectSetUserData(byval pObj as const StaticObject ptr, byval pUserData as const any ptr)

declare function StaticObjectGetUserData(byval pObj as const StaticObject ptr) as any ptr

' only in DEBUG mode

declare sub StaticObjectSetVisible(byval pObj as const StaticObject ptr,byval bVisible as integer)

declare function StaticObjectIsVisible(byval pObj as const StaticObject ptr) as integer

declare sub StaticObjectRender(byval pObj as const StaticObject ptr)

' #########

' # Tools #

' #########

declare sub TA_Clamp(byref fValue as single, byval fMin as single, byval fMax as single)

declare sub TA_ClampPosNeg(byref fValue as single, byval fPositive as single)

declare sub TA_ClampIfLessThen(byref fValue as single, byval fMin as single)

declare sub TA_ClampIfGreaterThen(byref fValue as single, byval fMax as single)

declare sub TA_WrapAngle(byref fAngle as single)

declare function TA_FastFloatToInt(byref fValue as single) as integer

declare function TA_FloatIsOk(byval fValue as single) as integer

declare function TA_FastMin(byval a as single, byval b as single) as single

declare function TA_FastMax(byval a as single, byval b as single) as single

declare function TA_Min(byval a as single, byval b as single) as single

declare function TA_Max(byval a as single, byval b as single) as single

declare function TA_CubicInterpolate(byval fPosA as single, byval fPosB as single, _

byval fVelA as single, byval fVelB as single, _

byval fTime as single) as single

declare function TA_CubicInterpolateGradient(byval fPosA as single, byval fPosB as single, _

byval fVelA as single, byval fVelB as single, _

byval fTime as single) as single

declare sub TA_CubicInterpolateVec3(byref v3PosA as const TA_Vec3, byref v3PosB as const TA_Vec3, _

byref v3VelA as const TA_Vec3, byref v3VelB as const TA_Vec3, _

byval fTime as single , byref v3Result as TA_Vec3)

declare sub TA_FindClosestPointOnLineToLine(byref v3A0 as const TA_Vec3, byref v3A1 as const TA_Vec3, _

byref v3B0 as const TA_Vec3, byref v3B1 as const TA_Vec3, _

byref v3ResultPosOnA as TA_Vec3, byref v3ResultPosOnB as TA_Vec3)

declare sub TA_FindClosestPointOnLineToLineUnClamped(byref v3A0 as const TA_Vec3, byref v3A1 as const TA_Vec3, _

byref v3B0 as const TA_Vec3, byref v3B1 as const TA_Vec3, _

byref v3ResultPosOnA as TA_Vec3, byref v3ResultPosOnB as TA_Vec3)

declare sub TA_FindClosestPointOnLine(byref v3LineA as const TA_Vec3, _

byref v3LineB as const TA_Vec3, _

byref v3Point as const TA_Vec3, _

byref v3Result as TA_Vec3)

declare function TA_FindShortestDistanceToLineSqrd(byref v3LineA as const TA_Vec3, _

byref v3LineB as const TA_Vec3, _

byref v3Point as const TA_Vec3) as single

declare function TA_FindShortestDistanceToLine(byref v3LineA as const TA_Vec3, _

byref v3LineB as const TA_Vec3, _

byref v3Point as const TA_Vec3) as single

declare function TA_FindClosestPointOnLineUnClamped(byref v3LineA as const TA_Vec3, _

byref v3LineB as const TA_Vec3, _

byref v3Point as const TA_Vec3, _

byref v3Result as TA_Vec3) as integer

' ########

' # Math #

' ########

declare function TA_Abs(byval nValue as integer) as integer

declare function TA_Fabs(byval fValue as single) as single

declare function TA_Sign(byval fValue as single) as single

declare function TA_SignsEqual(byval fA as single, byval fB as single) as integer

declare function TA_Sqrt(byval fValue as single) as single

declare function TA_ReciprocalSqrt(byval fValue as single) as single

declare function TA_Pow(byval fValue as single, byval fExponent as single) as single

declare function TA_Pow2(byval fX as single ) as single

declare function TA_Sin(byval fAngle as single) as single

declare function TA_Cos(byval fAngle as single) as single

declare sub TA_SinAndCos(byval fAngle as single, byref fSin as single, byref fCos as single)

declare function TA_Tan(byval fAngle as single) as single

declare function TA_ATan2(byval fY as single, byval fX as single) as single

declare function TA_ACos(byval fValue as single) as single

declare function TA_FMod(byval fValue as single, byval fMod as single) as single

declare function TA_Exp(byval fValue as single) as single

declare function TA_Log(byval fValue as single) as single

' ###########

' # TA_Vec3 #

' ###########

' tmp=a : a=b : b=tmp

declare sub Vec3Swap(byref a as TA_Vec3, byref b as TA_Vec3)

' if Vec3IsEqualWithInError(a,b,0.0001) then

declare function Vec3IsEqualWithInError(byref a as const TA_Vec3, byref b as const TA_Vec3,byval fError as single) as integer

' self+=a

declare sub Vec3Add(byref self as TA_Vec3, byref a as const TA_Vec3)

' self=a+b

declare sub Vec3AddFrom(byref self as TA_Vec3, byref a as const TA_Vec3, byref b as const TA_Vec3)

' self-=a

declare sub Vec3Sub(byref self as TA_Vec3, byref a as const TA_Vec3)

' self=a-b

declare sub Vec3SubFrom(byref self as TA_Vec3, byref a as const TA_Vec3, byref b as const TA_Vec3)

' self*=s

declare sub Vec3Mul(byref self as TA_Vec3,byval s as single)

' self=a*s

declare sub Vec3MulFrom(byref self as TA_Vec3, byref a as const TA_Vec3,byval s as single)

' self/=s

declare sub Vec3Div(byref self as TA_Vec3,byval s as single)

' self=a/s

declare sub Vec3DivFrom(byref self as TA_Vec3,byref a as const TA_Vec3,byval s as single)

' = self.Magnitude()

declare function Vec3GetMagnitude(byref self as const TA_Vec3) as single

' = self.MagnitudeSqrd()

declare function Vec3GetMagnitudeSqrd(byref self as const TA_Vec3) as single

' =(a-self).Magnitude()

declare function Vec3GetDistance(byref self as const TA_Vec3, byref a as const TA_Vec3) as single

' =(a-self).MagnitudeSqrd()

declare function Vec3GetDistanceSqrd(byref self as const TA_Vec3, byref a as const TA_Vec3) as single

' =self.dot()

declare function Vec3GetDot(byref self as const TA_Vec3) as single

' =dot(self,a)

declare function Vec3GetDotWith(byref self as const TA_Vec3, byref a as const TA_Vec3) as single

' self.Normalize()

declare sub Vec3Normalise(byref self as TA_Vec3)

' if (self.IsNormalised()) then ...

declare function Vec3IsNormalised(byref self as const TA_Vec3) as integer

' self=a.GetNormal()

declare sub Vec3GetNormal(byref self as TA_Vec3, byref a as const TA_Vec3)

' self=cross(b-a,c-a).GetNormal()

declare sub Vec3FaceNormal(byref self as TA_Vec3, byref a as const TA_Vec3, byref b as const TA_Vec3, byref c as const TA_Vec3)

' self=cross(b-a,c-a)

declare sub Vec3CrossFromEdges(byref self as TA_Vec3, byref a as const TA_Vec3, byref b as const TA_Vec3, byref c as const TA_Vec3)

' self.Cross(a)

declare sub Vec3CrossWith(byref self as TA_Vec3, byref a as const TA_Vec3)

' self=Cross(a,b)

declare sub Vec3CrossFrom(byref self as TA_Vec3, byref a as const TA_Vec3, byref b as const TA_Vec3)

' self*=m33

declare sub Vec3MulMat(byref self as TA_Vec3, byref m as const TA_Mat33)

' self=a*m33

declare sub Vec3MulMatFrom(byref self as TA_Vec3, byref a as const TA_Vec3, byref m as const TA_Mat33)

' self*=frame

declare sub Vec3MulFrame(byref self as TA_Vec3, byref f as const TA_MFrame)

' self=a*frame

declare sub Vec3MulFrameFrom(byref self as TA_Vec3, byref a as const TA_Vec3, byref f as const TA_MFrame)

' self/=m33

declare sub Vec3DivMat(byref self as TA_Vec3, byref m as const TA_Mat33)

' self=a/m33

declare sub Vec3DivMatFrom(byref self as TA_Vec3, byref a as const TA_Vec3, byref m as const TA_Mat33)

' self/=frame

declare sub Vec3DivFrame(byref self as TA_Vec3, byref f as const TA_MFrame)

' self=a/frame

declare sub Vec3DivFrameFrom(byref self as TA_Vec3, byref a as const TA_Vec3, byref f as const TA_MFrame)

' self = v3A*a + v3B*b

declare sub Vec3MulAdd2(byref self as TA_Vec3, _

byref v3A as const TA_Vec3,byval a as single, _

byref v3B as const TA_Vec3,byval b as single)

' self = v3A*a + v3B*b + v3C*c

declare sub Vec3MulAdd3(byref self as TA_Vec3, _

byref v3A as const TA_Vec3,byval a as single, _

byref v3B as const TA_Vec3,byval b as single, _

byref v3C as const TA_Vec3,byval c as single)

' ############

' # TA_Mat33 #

' ############

' tmp=a : a=b : b=tmp

declare sub Mat33Swap(byref a as TA_Mat33, byref b as TA_Mat33)

' self.Identity()

declare sub Mat33Identity(byref self as TA_Mat33)

' self=EulerAngles(rad,rad,rad)

declare sub Mat33InitialiseEulerAngles(byref self as TA_Mat33, byval pitch as single, byval yaw as single, byval roll as single)

' self=EulerAngles(deg,deg,deg)

declare sub Mat33InitialiseEulerAnglesD(byref self as TA_Mat33, byval pitch as single, byval yaw as single, byval roll as single)

' self=Initialise(TA_Vec3,rad)

declare sub Mat33InitialiseAxisAngle(byref self as TA_Mat33, byref axis as const TA_Vec3, byval angle as single)

' self=Initialise(eRotationAxis,rad)

declare sub Mat33InitialiseRotationAxis(byref self as TA_Mat33, byval axis as const eROTATION_AXIS, byval angle as single)

' self=PreRotate(eRotationAxis,rad)

declare sub Mat33PreRotate(byref self as TA_Mat33, byval axis as const eROTATION_AXIS, byval angle as single)

' self=SetToLookAt(position,up)

declare sub Mat33SetToLookAt(byref self as TA_Mat33, byref position as const TA_Vec3, byref up as const TA_Vec3)

' self=SetToLookDownVector(v)

declare sub Mat33SetToLookDownVector(byref self as TA_Mat33, byref v as const TA_Vec3)

' self+=m33

declare sub Mat33Add(byref self as TA_Mat33, byref a as const TA_Mat33)

' self-=m33

declare sub Mat33Sub(byref self as TA_Mat33, byref a as const TA_Mat33)

' self*=s

declare sub Mat33Mul(byref self as TA_Mat33,byval s as single)

' self/=s

declare sub Mat33Div(byref self as TA_Mat33,byval s as single)

' self*=a33

declare sub Mat33MulMat(byref self as TA_Mat33, byref a as const TA_Mat33)

' self=a33*b33

declare sub Mat33MulMatFrom(byref self as TA_Mat33, byref a as const TA_Mat33, byref b as const TA_Mat33)

' self/=a33

declare sub Mat33DivMat(byref self as TA_Mat33, byref a as const TA_Mat33)

' self=a33/b33

declare sub Mat33DivMatFrom(byref self as TA_Mat33, byref a as const TA_Mat33, byref b as const TA_Mat33)

' self.Invert()

declare sub Mat33Invert(byref self as TA_Mat33)

' self=a.GetInverse()

declare sub Mat33GetInerseFrom(byref self as TA_Mat33,byref a as const TA_Mat33)

' self.Interpolate(a,b,t);

declare sub Mat33Interpolate(byref self as TA_Mat33, byref a as const TA_Mat33, byref b as const TA_Mat33,byval t as single)

' self.GetRotationAxisAndMagnitude(v3Axis,fMagnitude)

declare sub Mat33GetRotationAxisAndMagnitude(byref self as const TA_Mat33, byref v3Axis as TA_Vec3, byref fMagnitude as single)

' self=self.GetTransposeAsInverse()

declare sub Mat33GetTransposeAsInverse(byref self as TA_Mat33)

' r=a.GetTransposeAsInverse()

declare sub Mat33GetTransposeAsInverseFrom(byref r as TA_Mat33, byref a as const TA_Mat33)

' #############

' # TA_MFrame #

' #############

' tmp=a: a=b : b=tmp

declare sub MFrameSwap(byref a as TA_MFrame, byref b as TA_MFrame)

' self.Identity()

declare sub MFrameIdentity(byref self as TA_MFrame)

' self.Initialise(rad,rad,rad)

declare sub MFrameInitialiseTA_EulerAngles(byref self as TA_MFrame, byval pitch as single, byval yaw as single, byval roll as single)

' self.Initialise(deg,deg,deg)

declare sub MFrameInitialiseTA_EulerAnglesD(byref self as TA_MFrame, byval pitch as single, byval yaw as single, byval roll as single)

' sef=Initialise(TA_Vec3,rad)

declare sub MFrameInitialiseAxisAngle(byref self as TA_MFrame, byref axis as const TA_Vec3, byval angle as single)

' sef=Initialise(TA_Vec3,deg)

declare sub MFrameInitialiseAxisAngleD(byref self as TA_MFrame, byref axis as const TA_Vec3, byval angle as single)

' sef=Initialise(TA_RotationAxis,rad)

declare sub MFrameInitialiseTA_RotationAxis(byref self as TA_MFrame, byval axis as eROTATION_AXIS, byval angle as single)

' self*=a

declare sub MFrameMul(byref self as TA_MFrame, byref a as const TA_MFrame)

' self=a*b

declare sub MFrameMulFrom(byref self as TA_MFrame, byref a as const TA_MFrame, byref b as const TA_MFrame)

' self/=a

declare sub MFrameDiv(byref self as TA_MFrame, byref a as const TA_MFrame)

' self=a/b

declare sub MFrameDivFrom(byref self as TA_MFrame, byref a as const TA_MFrame, byref b as const TA_MFrame)

' self*=a33

declare sub MFrameMulMat(byref self as TA_MFrame, byref a as const TA_Mat33)

' self=a33*b33

declare sub MFrameMulFromMat(byref self as TA_MFrame, byref a as const TA_MFrame, byref b as const TA_Mat33)

' self.Invert()

declare sub MFrameInvert(byref self as TA_MFrame)

' self=a.GetInverse()

declare sub MFrameInerseFrom(byref self as TA_MFrame, byref a as const TA_MFrame, byref b as const TA_MFrame)

' self.Interpolate(a,b,t);

declare sub MFrameInterpolate(byref self as TA_MFrame, byref a as const TA_MFrame, byref b as const TA_MFrame, byval t as single)

' ###########

' # TA_AABB #

' ###########

' tmp=a : a=b : b=tmp

declare sub AABBSwap(byref a as TA_AABB, byref b as TA_AABB)

' self.Initialise(v3Center,v3Extend)

declare sub AABBInitialise(byref self as TA_AABB, byref v3Center as const TA_Vec3, byref v3Extent as const TA_Vec3)

' self+=a

declare sub AABBAdd(byref self as TA_AABB, byref a as const TA_AABB)

' self=a+b

declare sub AABBAddFrom(byref self as TA_AABB, byref a as const TA_AABB, byref b as const TA_AABB)

' self*=s

declare sub AABBScale(byref self as TA_AABB,byval s as single)

' self=a*s

declare sub AABBScaleFrom(byref self as TA_AABB, byref a as const TA_AABB,byval s as single)

' self*=frame

declare sub AABBRotate(byref self as TA_AABB, byref f as const TA_MFrame)

' self=a*frame

declare sub AABBRotateFrom(byref r as TA_AABB, byref a as const TA_AABB, byref f as const TA_MFrame)

declare sub AABBExpandToFit(byref self as TA_AABB, byref a as const TA_Vec3)

' self.InitialiseToFit2Points(a,b)

declare sub AABBInitialiseToFit2Points(byref self as TA_AABB, byref a as const TA_Vec3, byref b as const TA_Vec3)

' bool=self.Intersecs(a)

declare function AABBIntersecs(byref self as const TA_AABB, byref a as const TA_AABB) as integer

' bool=self.IntersecsPoint(a)

declare function AABBIntersecsPoint(byref self as const TA_AABB, byref a as const TA_Vec3) as integer

' bool=self.IsInside(a)

declare function AABBIsInside(byref self as const TA_AABB, byref a as const TA_AABB) as integer

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Easily create Web Help sites


Data Structures

True Axis Wrapper Data Structures

Physics

PhysicsJoint

StaticObject

DynamicObject

CollisionObjects:

CollisionObjectSphere

CollisionObjectCylinder

CollisionObjectCapsule

CollisionObjectLineList

CollisionObjectConvex

CollisionObjectCombo

CollisionObjectComplex

CollisionObjectAABBMesh

Math:

TA_VEC3

TA_AABB

TA_MAT33

TA_MFrame

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Full featured Help generator


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


PhysicsCreateInstance

Physics

PhysicsCreateInstance Reference

#include "TrueAxis.bi"

Description

The instance of the Physics class is singleton and must be created at first.

  • Functions:
  • declare function PhysicsCreateInstance() as integer

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Easily create PDF Help documents


PhysicsDestroyInstance

Physics

PhysicsDestroyInstance Reference

#include "TrueAxis.bi"

Description

  • Call this function to clean up when the instance of Physics is no longer needed.
  • Any objects still added to the simulation will be automatically removed and released.
  • Functions:
  • declare sub PhysicsDestroyInstance()

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Easy to use tool to create HTML Help files and Help web sites


PhysicsSetWorldDimensions

Physics

PhysicsSetWorldDimensions Reference

#include "TrueAxis.bi"

Description

  • Call this function to set the position and size of the world that the physics simulation will run in.
  • This may affect the speed and memory usage of culling algorithms.
  • The size of the world should be made only as big as necessary. (default are 2000m x 2000m x 2000m)
  • Note:
  • Any changes to this value will not be made effective until a call to :PhysicsSetupSimulation.
  • Note that PhysicsSetupSimulation is automatically called from PhysicsUpdate, :PhysicsAddDynamicObject and :PhysicsAddStaticObject.
  • Calling PhysicsSetupSimulation may result memory reallocation and large processor overhead.
  • Changing this value frequently will result in performance loss.
  • Functions:
  • declare sub PhysicsSetWorldDimensions(byval centerX as single, byval centerY as single, byval centerZ as single, _
  • byval width_ as single, byval height as single, byval depth as single)
  • declare sub PhysicsV3SetWorldDimensions(byref v3Center as const TA_Vec3, byref v3Dimension as const TA_Vec3)
  • declare sub PhysicsAABBSetWorldDimensions(byref aabb as const TA_AABB)

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Easily create Web Help sites


PhysicsGetWorldDimensions

Physics

PhysicsGetWorldDimensions Reference

#include "TrueAxis.bi"

Description

  • Call this function to get the position and size of the world that the physics simulation will run in.
  • see also: PhysicsSetWorldDimensions .
  • Functions:
  • declare sub PhysicsGetWorldDimensions(byref centerX as single, byref centerY as single, byref centerZ as single, _
  • byref width_ as single, byref height as single, byref depth as single)
  • declare sub PhysicsV3GetWorldDimensions(byref v3Center as TA_Vec3, byref v3Dimension as TA_Vec3)
  • declare sub PhysicsAABBGetWorldDimensions(byref aabb as TA_AABB)

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Free Web Help generator


PhysicsSetGravity

Physics

PhysicsSetGravity Reference

#include "TrueAxis.bi"

Description

  • Call this function to set the acceleration due to gravity applied to all objects in the simulation.
  • (default are 0.0 ,8.91, 0.0 )
  • Functions:
  • declare sub PhysicsSetGravity(byval x as single, byval y as single, byval z as single)
  • declare sub PhysicsV3SetGravity(byref v3Gravity as const TA_Vec3)

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Easily create Help documents


PhysicsGetGravity

Physics

PhysicsGetGravity Reference

#include "TrueAxis.bi"

Description

  • Call this function to get the acceleration due to gravity applied to all objects in the simulation.
  • Functions:
  • declare sub PhysicsGetGravity(byref x as single, byref y as single, byref z as single)
  • declare sub PhysicsV3GetGravity(byref v3Gravity as TA_Vec3)

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Full featured multi-format Help generator


PhysicsSetMaxNumCollisions

Physics

PhysicsSetMaxNumCollisions Reference

#include "TrueAxis.bi"

Description

  • Call this function to set the maximum number of collisions allowed at once.
  • Functions:
  • declare sub PhysicsSetMaxNumCollisions(byval n as integer)

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Easy CHM and documentation editor


PhysicsGetMaxNumCollisions

Physics

PhysicsGetMaxNumCollisions Reference

#include "TrueAxis.bi"

Description

  • Call this function to get the maximum number of collisions allowed at once.
  • Functions:
  • declare function PhysicsGetMaxNumCollisions() as integer

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Easily create Help documents


PhysicsSetMaxNumMovingObjects

Physics

PhysicsSetMaxNumMovingObjects Reference

#include "TrueAxis.bi"

Description

  • Call this function to set the maximum number of moving objects allowed at once.
  • Functions:
  • declare sub PhysicsSetMaxNumMovingObjects(byval n as integer)

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Easily create CHM Help documents


PhysicsGetMaxNumMovingObjects

Physics

PhysicsGetMaxNumMovingObjects Reference

#include "TrueAxis.bi"

Description

  • Call this function to get the maximum number of moving objects allowed at once.
  • Functions:
  • declare function PhysicsGetMaxNumMovingObjects() as integer

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Full featured Documentation generator


PhysicsSetSlowSolverMaxNumCollisions

Physics

PhysicsSetSlowSolverMaxNumCollisions Reference

#include "TrueAxis.bi"

Description

  • Call this function to set the number of collisions at which True Axis will swap from using a the slow solver to the, fast solver.
  • see also Physics Solver .
  • Functions:
  • declare sub PhysicsSetSlowSolverMaxNumCollisions(byval n as integer)

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Easily create HTML Help documents


PhysicsGetSlowSolverMaxNumCollisions

Physics

PhysicsGetSlowSolverMaxNumCollisions Reference

#include "TrueAxis.bi"

Description

  • Call this function to get the number of collisions at which True Axis will swap from using a the slow solver to the, fast solver.
  • see also Physics Solver .
  • Functions:
  • declare function PhysicsGetSlowSolverMaxNumCollisions() as integer

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Single source CHM, PDF, DOC and HTML Help creation


PhysicsSetSlowSolverMaxNumObjects

Physics

PhysicsSetSlowSolverMaxNumObjects Reference

#include "TrueAxis.bi"

Description

  • Call this function to set the number of objects at which True Axis will swap from using a the slow solver to the, fast solver.
  • see also Physics Solver .
  • Functions:
  • declare sub PhysicsSetSlowSolverMaxNumObjects(byval n as integer)

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Easily create CHM Help documents


PhysicsGetSlowSolverMaxNumObjects

Physics

PhysicsGetSlowSolverMaxNumObjects Reference

#include "TrueAxis.bi"

Description

  • Call this function to get the number of objects at which True Axis will swap from using a the slow solver to the, fast solver.
  • see also Physics Solver .
  • Functions:
  • declare function PhysicsGetSlowSolverMaxNumObjects() as integer

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Easy CHM and documentation editor


PhysicsSetMaxNumObjectPairs

Physics

PhysicsSetMaxNumObjectPairs Reference

#include "TrueAxis.bi"

Description

  • Call this function to set the maximum number of object pairs.
  • This value controls the amount of memory allocated for object pairs.
  • If this number is too low, efficiency may be impacted and if not enough pairs are available, some collisions may be ignored.
  • If this number is too high, memory is wasted and in some cases, memory cache efficiency may be impacted.
  • Functions:
  • declare sub PhysicsSetMaxNumObjectPairs(byval n as integer)

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Full featured Help generator


PhysicsGetMaxNumObjectPairs

Physics

PhysicsGetMaxNumObjectPairs Reference

#include "TrueAxis.bi"

Description

  • Call this function to get the maximum number of object pairs.
  • see also PhysicsSetMaxNumObjectPairs
  • Functions:
  • declare function PhysicsGetMaxNumObjectPairs() as integer

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Full featured Help generator


PhysicsSetSpacialDivisionType

Physics

PhysicsSetSpacialDivisionType Reference

#include "TrueAxis.bi"

Description

  • Call this function to set the type of spacial sub division used by True Axis.
  • (default are FLAG_DYNAMIC_OCTREE)
  • Functions:
  • declare sub PhysicsSetSpacialDivisionType(byval DivisionType as ePHYSICS_SPACIAL_DIVISION_TYPES )

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Full featured Documentation generator


PhysicsGetSpacialDivisionType

Physics

PhysicsGetSpacialDivisionType Reference

#include "TrueAxis.bi"

Description

  • Call this function to get the type of spacial sub division used by True Axis.
  • Functions:
  • declare function PhysicsGetSpacialDivisionType() as ePHYSICS_SPACIAL_DIVISION_TYPES

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Create HTML Help, DOC, PDF and print manuals from 1 single source


PhysicsSetupSimulation

Physics

PhysicsSetupSimulation Reference

#include "TrueAxis.bi"

Description

  • Initialize the simulation based on the settings:max numbers of Collisions, Objects and ObjectPairs
  • Note:
  • if you call this function with a number of max objects it will set the max number of collsions,objects and pairs for you.
  • Functions:
  • declare sub PhysicsSetupSimulation(byval MaxObjects as integer=0)

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Easy to use tool to create HTML Help files and Help web sites


PhysicsSetMovementPropagationEnabled

Physics

PhysicsSetMovementPropagationEnabled Reference

#include "TrueAxis.bi"

Description

  • Call this function to enable or disable movement propagation.
  • Enable for better performance, disable for better realism.
  • (default is enabled)
  • Note:
  • If you want to stack more objects then the maximum number of moving objects allowed, then you should leave movement propagation enabled.
  • Functions:
  • declare sub PhysicsSetMovementPropagationEnabled(byval bEnabled as integer)

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Free Web Help generator


PhysicsIsMovementPropagationEnabled

Physics

PhysicsIsMovementPropagationEnabled Reference

#include "TrueAxis.bi"

Description

  • Call this function to check if movement propagation is enabled.
  • see also: PhysicsSetMovementPropagationEnabled
  • Functions:
  • declare function PhysicsIsMovementPropagationEnabled() as integer

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Easy to use tool to create HTML Help files and Help web sites


PhysicsUpdate

Physics

PhysicsUpdate Reference

#include "TrueAxis.bi"

Description

  • Call this function to update the physics simulation one frame.
  • The frequency that this function is called at will have an effect on the Physics simulation.
  • In an ideal world, the simulation should be updated at a constant minimum 60 frames per second.
  • However, this is not necessary, the simulation will still run well at lower frame rates.
  • The use of swept collision detection allows the simulation to still perform satisfactorily at frame rats as low as 15 frames per second.
  • Functions:
  • declare sub PhysicsUpdate(byval dt as single=1.0/60.0)

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Easily create HTML Help documents


PhysicsRender

Render

Physics

PhysicsRender Reference

#define TRUEAXISDEBUG

#include "TrueAxis.bi"

Description

  • Call this functions to draw all physics parts.
  • Only if TRUEAXISDEBUG are defined Physics Object's can be rendered via OpenGL .
  • Note:
  • The primitive object rendering are slow and only usefully for debugging or learning.
  • Functions:
  • declare sub PhysicsRender()
  • declare sub PhysicsRenderBoundingBoxes()

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Single source CHM, PDF, DOC and HTML Help creation


PhysicsDynamicObject

  • Physics

Physics Dynamic Object Reference

  • PhysicsAddDynamicObject
  • PhysicsRemoveDynamicObject
  • PhysicsSetDynamicObjectIsMoving
  • PhysicsWakeUpAllIntersectingObjects

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Easily create Web Help sites


PhysicsAddDynamicObject

Physics

PhysicsAddDynamicObject Reference

#include "TrueAxis.bi"

Description

  • Call this function to add a dynamic object to the physics simulation. If the object is already added, this function will have no effect.
  • The parameter bInitiallyMoving specifies the initial state that will be given to the object, moving or at rest.
  • Functions:
  • declare sub PhysicsAddDynamicObject(byval pObj as const DynamicObject ptr, byval bInitiallyMoving as integer=1)

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Free CHM Help documentation generator


PhysicsRemoveDynamicObject

Physics

PhysicsRemoveDynamicObject Reference

#include "TrueAxis.bi"

Description

  • Call this function to remove a dynamic object from the physics simulation. If the object has not been added, this function will have no effect.
  • Functions:
  • declare sub PhysicsRemoveDynamicObject(byval pObj as const DynamicObject ptr)

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Free PDF documentation generator


PhysicsSetDynamicObjectIsMoving

Physics

PhysicsSetDynamicObjectIsMoving Reference

#include "TrueAxis.bi"

Description:

  • Call this function to flag a dynamic object as moving.
  • If a dynamic object is already moving, it will normally already be flagged as moving.
  • This is the same as calling DynamicObjectSetToMoving.
  • Dynamic objects can either be at rest or moving.
  • The physics simulation keeps a list of moving objects.
  • Only moving objects will be updated.
  • If an at rest object is collided with, it will be added to the moving list.
  • When an object comes to rest, it is removed from the moving list.
  • It may be often necessary to manually set object to be moving.
  • If an object is at rest, calling a function such as DynamicObjectApplyImpulse will not have an effect with out calling PhysicSetDynamicObjectIsMoving as well.
  • Calling PhysicsSetDynamicObjectIsMoving each frame will prevent an object from coming to rest.
  • Parameter: Priority
  • Either SET_MOVING_PRIORITY_LOW or SET_MOVING_PRIORITY_HIGH .
  • If set to a low priority and if if there are too many other moving objects, then this object will not be set moving.
  • If set to a high priority and if there are too many other moving objects, then the slowest moving object will be put to sleep and this one activated.
  • The default value is SET_MOVING_PRIORITY_LOW .
  • Functions:
  • declare sub PhysicsSetDynamicObjectIsMoving(byval pObj as const DynamicObject ptr, byval priority as ePHYSICS_MOVING_PRIORITIES = SET_MOVING_PRIORITY_LOW)

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Easily create Web Help sites


PhysicsWakeUpAllIntersectingObjects

Physics

PhysicsWakeUpAllIntersectingObjects Reference

#include "TrueAxis.bi"

Description:

  • Call this function to wake up all objects that intersect with a given bounding box.
  • Functions:
  • declare sub PhysicsWakeUpAllIntersectingObjects(byval centerX as single, byval centerY as single, byval centerZ as single, _
  • byval width as single, byval height as single, byval depth as single)
  • declare sub PhysicsAABBWakeUpAllIntersectingObjects(byref aabb as const TA_AABB)

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Create HTML Help, DOC, PDF and print manuals from 1 single source


PhysicsStaticObject

  • Physics

Physics Static Object Reference

  • PhysicsAddStaticObject
  • PhysicsRemoveStaticObject
  • PhysicsAddStaticGround

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Easy to use tool to create HTML Help files and Help web sites


PhysicsAddStaticObject

Physics

PhysicsAddStaticObject Reference

#include "TrueAxis.bi"

Description

  • Call this function to add a static object to the physics simulation. If the object is already added, this function will have no effect.
  • Functions:
  • declare sub PhysicsAddStaticObject(byval pObj as const StaticObject ptr)

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Easily create Web Help sites


PhysicsRemoveStaticObject

Physics

PhysicsRemoveStaticObject Reference

#include "TrueAxis.bi"

Description

  • Call this function to remove a static object from the physics simulation. If the object has not been added, this function will have no effect.
  • Functions:
  • declare sub PhysicsRemoveStaticObject(byval pObj as const StaticObject ptr)

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Full featured multi-format Help generator


PhysicsAddStaticGround

Physics

PhysicsAddStaticGround Reference

#include "TrueAxis.bi"

Description

  • Call this helper function to add a simple ground on Y position 0.
  • Normally you have to define a collision ground via CollsionObjectAABBMesh .
  • If size are omitted it used the currently defined world X Z - dimension as size.
  • Functions:
  • declare function PhysicsAddStaticGround(byval fSize as single=-1.0) as StaticObject ptr

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Free PDF documentation generator


PhysicsJoint

TA::PhysicsJoint

PhysicsJoint

PhysicsJoint Reference

#include "TrueAxis.bi"

Description:

Holds information relating to physical joints between dynamic objects.

To create a joint, use DynamicObjectAddJoint. All creation and destruction of joints is done in DynamicObject .

After creating a joint it must be initialized using one of the initialization functions:

Any initialization function can be called multiple times on the one joint to change its type or configuration.

The Joint Properties functions are not documented, however, the names match the parameters passed in when initializing a Joint.

  • Note:
  • It is recommended that directly linked objects are not allowed to collided with each other.
  • Avoiding collisions reduces the number of constraints on a system, hence speeding up the simulation.
  • Collisions can also sometimes prevent the joint from acting as designed.
  • Disallowing collisions between joint objects can be done with PhysicsJointSetCollisionDisabledBetweenObjects.
  • Examples:

JointBallAndSocket01.bas JointHinge01.bas JointHinge02.bas JointSlider01.bas JointSlider02.bas

  • Data Structure:
  • type PhysicsJoint
  • ...
  • end type
  • Functions:
  • PhysicsJointInitialiseSlider
  • PhysicsJointInitialiseHinge
  • PhysicsJointInitialiseBallAndSocket
  • PhysicsJointInitialiseLimitedBallAndSocket
  • PhysicsJointInitialiseEulerConstraint
  • PhysicsJointInitialiseSquareSocket
  • PhysicsJointInitialiseRotationConstraint
  • PhysicsJointInitialiseVectorConstraint
  • JointLimitDisabled
  • Physics Joint Properties:
  • PhysicsJointGetType
  • PhysicsJointIsObjectASolid
  • PhysicsJointSetObjectASolid
  • PhysicsJointIsObjectBSolid
  • PhysicsJointSetObjectBSolid
  • PhysicsJointSetCollisionDisabledBetweenObjects
  • PhysicsJointIsCollisionDisabledBetweenObjects
  • PhysicsJointSetBreakForce
  • PhysicsJointGetBreakForce
  • PhysicsJointSetBreakable
  • PhysicsJointIsBreakable
  • PhysicsJointSetBroken
  • PhysicsJointIsBroken
  • PhysicsJointSetUserData
  • PhysicsJointGetUserData
  • PhysicsJointGetObjectA
  • PhysicsJointGetObjectB
  • PhysicsJointGetPosOnObjectA
  • PhysicsJointGetPosOnObjectB
  • PhysicsJointGetLimitNormalOnObjectA
  • PhysicsJointGetLimitNormalOnObjectB
  • PhysicsJointGetCenterDirectionOnObjectA
  • PhysicsJointGetCenterDirectionOnObjectB
  • PhysicsJointGetMaxAngle
  • PhysicsJointGetJointOrientationA
  • PhysicsJointGetJointOrientationB
  • PhysicsJointGetMinAngles
  • PhysicsJointGetMaxAngles
  • PhysicsJointGetSliderPos0
  • PhysicsJointGetSliderPos1

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Free HTML Help documentation generator


PhysicsJointInitialiseSlider

PhysicsJoint

PhysicsJointInitialiseSlider Reference

#include "TrueAxis.bi"

  • declare sub PhysicsJointInitialiseSlider(byval pObj as const PhysicsJoint ptr, _
  • byval x as single, byval y as single, byval z as single, _
  • byval startX as single, byval startY as single, byval startZ as single, _
  • byval endX as single, byval endY as single, byval endZ as single)
  • declare sub PhysicsJointV3InitialiseSlider(byval pObj as const PhysicsJoint ptr, _
  • byref v3Position as const TA_Vec3, _
  • byref v3LineStart as const TA_Vec3, _
  • byref v3LineEnd as const TA_Vec3)
  • Call this function to initialize the joint as a Slider. The Object A will be constrained to slide along the line that connects the points v3LineStart and v3LineEnd.
  • Sliders can be useful for simulating sliding doors and lifts.

Note:

To create a PhysicsJoint, use DynamicObjectAddWorldJoint or DynamicObjectAddJoint.

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Full featured multi-format Help generator


PhysicsJointInitialiseHinge

PhysicsJoint

PhysicsJointInitialiseHinge Reference

#include "TrueAxis.bi"

  • declare sub PhysicsJointInitialiseHinge(byval pObj as const PhysicsJoint ptr, _
  • byval x as single, byval y as single, byval z as single, _
  • byval axisX as single, byval axisY as single, byval axisZ as single, _
  • byval minAngle as single, byval maxAngle as single)
  • declare sub PhysicsJointV3InitialiseHinge(byval pObj as const PhysicsJoint ptr, _
  • byref v3Position as const TA_Vec3, _
  • byref v3Axis as const TA_Vec3, _
  • byval minAngle as single, byval maxAngle as single)
  • Call this function to initialize the joint as a Hinge.

Note:

To create a PhysicsJoint, use DynamicObjectAddWorldJoint or DynamicObjectAddJoint.

To ignore the constraint of minAngle and maxAngle use the value from JointLimitDisabled()

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Easily create HTML Help documents


PhysicsJointInitialiseBallAndSocket

PhysicsJoint

PhysicsJointInitialiseBallAndSocket Reference

#include "TrueAxis.bi"

  • declare sub PhysicsJointInitialiseBallAndSocket(byval pObj as const PhysicsJoint ptr, _
  • byval x as single, byval y as single, byval z as single, _
  • byval dirX as single, byval dirY as single, byval dirZ as single, _
  • byval maxAngle as single)
  • declare sub PhysicsJointV3InitialiseBallAndSocket(byval pObj as const PhysicsJoint ptr, _
  • byref v3Position as const TA_Vec3, _
  • byref v3Direction as const TA_Vec3, _
  • byval maxAngle as single)
  • Call this function to initialize this joint as a ball and socket constraint.

Note:

To create a PhysicsJoint, use DynamicObjectAddWorldJoint or DynamicObjectAddJoint.

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Free CHM Help documentation generator


PhysicsJointInitialiseLimitedBallAndSocket

PhysicsJoint

PhysicsJointInitialiseLimitedBallAndSocket Reference

#include "TrueAxis.bi"

  • declare sub PhysicsJointInitialiseBallAndSocket(byval pObj as const PhysicsJoint ptr, _
  • byval x as single, byval y as single, byval z as single, _
  • byval dirX as single, byval dirY as single, byval dirZ as single, _
  • byval maxAngle as single)
  • declare sub PhysicsJointV3InitialiseBallAndSocket(byval pObj as const PhysicsJoint ptr, _
  • byref v3Position as const TA_Vec3, _
  • byref v3Direction as const TA_Vec3, _
  • byval maxAngle as single)
  • Description:
  • Call this function to initialize this joint as a limited ball and socket constraint.
  • Note:

To create a PhysicsJoint, use DynamicObjectAddWorldJoint or DynamicObjectAddJoint.

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Full featured Help generator


PhysicsJointInitialiseEulerConstraint

PhysicsJoint

PhysicsJointInitialiseEulerConstraint Reference

#include "TrueAxis.bi"

  • declare sub PhysicsJointInitialiseEulerConstraint(byval pObj as const PhysicsJoint ptr, _
  • byval x as single, byval y as single, byval z as single, _
  • byval pitch as single, byval yaw as single, byval roll as single, _
  • byval minAngleX as single, byval minAngleY as single, byval minAngleZ as single, _
  • byval maxAngleX as single, byval maxAngleY as single, byval maxAngleZ as single)
  • declare sub PhysicsJointV3InitialiseEulerConstraint(byval pObj as const PhysicsJoint ptr, _
  • byref v3Position as const TA_Vec3, _
  • byval pitch as single, byval yaw as single, byval roll as single, _
  • byval minAngleX as single, byval minAngleY as single, byval minAngleZ as single, _
  • byval maxAngleX as single, byval maxAngleY as single, byval maxAngleZ as single)
  • Description:
  • Call this function to initialize the joint as an Euler angle Constraint.
  • This type of joint, joins two objects at one location, and constrains their relative rotation using minimum and maximum angles.
  • This provides a flexible method for creating different types of joints however, gimbal lock can sometimes be a problem.
  • Note:

To create a PhysicsJoint, use DynamicObjectAddWorldJoint or DynamicObjectAddJoint.

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Single source CHM, PDF, DOC and HTML Help creation


PhysicsJointInitialiseSquareSocket

PhysicsJoint

PhysicsJointInitialiseSquareSocket Reference

#include "TrueAxis.bi"

  • declare sub PhysicsJointInitialiseSquareSocket(byval pObj as const PhysicsJoint ptr, _
  • byval x as single, byval y as single, byval z as single, _
  • byval pitch as single, byval yaw as single, byval roll as single, _
  • byval minX as single, byval maxX as single, _
  • byval minY as single, byval maxY as single, _
  • byval minZ as single, byval maxZ as single)
  • declare sub PhysicsJointV3InitialiseSquareSocket(byval pObj as const PhysicsJoint ptr, _
  • byref v3Position as const TA_Vec3, _
  • byval pitch as single, byval yaw as single, byval roll as single, _
  • byval minX as single, byval maxX as single, _
  • byval minY as single, byval maxY as single, _
  • byval minZ as single, byval maxZ as single)
  • Description:
  • Call this function to initialize the joint as a Square Socket.
  • A Square Socket is constrained by the shape documented in the diagram below.
  • This type of joint was specifically added for a fast flexible method for doing 'rag doll' to approximate hip and shoulder joints.
  • It may also have other uses.

Joint Constraint Diagram

  • Note:

To create a PhysicsJoint, use DynamicObjectAddWorldJoint or DynamicObjectAddJoint.

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Free PDF documentation generator


PhysicsJointInitialiseRotationConstraint

PhysicsJoint

PhysicsJointInitialiseRotationConstraint Reference

#include "TrueAxis.bi"

  • declare sub PhysicsJointInitialiseRotationConstraint(byval pObj as const PhysicsJoint ptr, _
  • byval pitch as single, byval yaw as single, byval roll as single, _
  • byval minAngleX as single, byval minAngleY as single, byval minAngleZ as single, _
  • byval maxAngleX as single, byval maxAngleY as single, byval maxAngleZ as single)
  • Description:
  • Call function to initialize the joint as a Rotation Constraint.
  • Rotation is constrained by the max and min angles.
  • Position is not constrained.
  • Note:

To create a PhysicsJoint, use DynamicObjectAddWorldJoint or DynamicObjectAddJoint.

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Easily create HTML Help documents


PhysicsJointInitialiseVectorConstraint

PhysicsJoint

PhysicsJointInitialiseVectorConstraint Reference

#include "TrueAxis.bi"

  • declare sub PhysicsJointInitialiseVectorConstraint(byval pObj as const PhysicsJoint ptr, _
  • byval LimitCenterDirX as single, _
  • byval LimitCenterDirY as single, _
  • byval LimitCenterDirZ as single, _
  • byval maxAngle as single)
  • declare sub PhysicsJointV3InitialiseVectorConstraint(byval pObj as const PhysicsJoint ptr, _
  • byref v3LimitCenterDirection as const TA_Vec3, _
  • byval maxAngle as single)
  • Description:
  • Call this function to initialise the joint as a Vector Constraint.
  • The rotation away from v3LimitCenterDirection is limited between the two objects.
  • Note:

To create a PhysicsJoint, use DynamicObjectAddWorldJoint

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Free Web Help generator


JointLimitDisabled

PhysicsJoint

JointLimitDisabled Reference

#include "TrueAxis.bi"

  • declare function JointLimitDisabled() as single
  • Description:
  • To disable any joint rotation use the return value of this function as min/max angle parameter.

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Free HTML Help documentation generator


PhysicsJointProperties

  • Physics

Physics Joint Properties Reference

  • declare function PhysicsJointGetType(byval pObj as const PhysicsJoint ptr) as ePHYSICS_JOINT_TYPES
  • declare function PhysicsJointIsObjectASolid(byval pObj as const PhysicsJoint ptr) as integer
  • declare sub PhysicsJointSetObjectASolid(byval pObj as const PhysicsJoint ptr, byval bObjectASolid as integer)
  • declare function PhysicsJointIsObjectBSolid(byval pObj as const PhysicsJoint ptr) as integer
  • declare sub PhysicsJointSetObjectBSolid(byval pObj as const PhysicsJoint ptr, byval bObjectBSolid as integer)
  • declare sub PhysicsJointSetCollisionDisabledBetweenObjects(byval pObj as const PhysicsJoint ptr, byval bDisabled as integer)
  • declare function PhysicsJointIsCollisionDisabledBetweenObjects (byval pObj as const PhysicsJoint ptr) as integer
  • declare sub PhysicsJointSetBreakForce(byval pObj as const PhysicsJoint ptr, byval fBreakForce as single)
  • declare function PhysicsJointGetBreakForce(byval pObj as const PhysicsJoint ptr) as single
  • declare sub PhysicsJointSetBreakable(byval pObj as const PhysicsJoint ptr, byval bBreakable as integer)
  • declare function PhysicsJointIsBreakable (byval pObj as const PhysicsJoint ptr) as integer
  • declare sub PhysicsJointSetBroken(byval pObj as const PhysicsJoint ptr, byval bBroken as integer)
  • declare function PhysicsJointIsBroken (byval pObj as const PhysicsJoint ptr) as integer
  • declare sub PhysicsJointSetUserData(byval pObj as const PhysicsJoint ptr, byval pUserData as const any ptr)
  • declare function PhysicsJointGetUserData(byval pObj as const PhysicsJoint ptr) as any ptr
  • declare function PhysicsJointGetObjectA(byval pObj as const PhysicsJoint ptr) as const DynamicObject ptr
  • declare function PhysicsJointGetObjectB(byval pObj as const PhysicsJoint ptr) as const DynamicObject ptr
  • declare sub PhysicsJointGetPosOnObjectA(byval pObj as const PhysicsJoint ptr, byref x as single, byref y as single, byref z as single)
  • declare sub PhysicsJointV3GetPosOnObjectA(byval pObj as const PhysicsJoint ptr, byref v3Position as TA_Vec3)
  • declare sub PhysicsJointGetPosOnObjectB(byval pObj as const PhysicsJoint ptr, byref x as single, byref y as single, byref z as single)
  • declare sub PhysicsJointV3GetPosOnObjectB(byval pObj as const PhysicsJoint ptr, byref v3Position as TA_Vec3)
  • declare sub PhysicsJointGetLimitNormalOnObjectA(byval pObj as const PhysicsJoint ptr, byref x as single, byref y as single, byref z as single)
  • declare sub PhysicsJointV3GetLimitNormalOnObjectA(byval pObj as const PhysicsJoint ptr, byref v3Normal as TA_Vec3)
  • declare sub PhysicsJointGetLimitNormalOnObjectB(byval pObj as const PhysicsJoint ptr, byref x as single, byref y as single, byref z as single)
  • declare sub PhysicsJointV3GetLimitNormalOnObjectB(byval pObj as const PhysicsJoint ptr, byref v3Normal as TA_Vec3)
  • declare sub PhysicsJointGetCenterDirectionOnObjectA(byval pObj as const PhysicsJoint ptr, byref x as single, byref y as single, byref z as single)
  • declare sub PhysicsJointV3GetCenterDirectionOnObjectA(byval pObj as const PhysicsJoint ptr, byref v3CenterDir as TA_Vec3)
  • declare sub PhysicsJointGetCenterDirectionOnObjectB(byval pObj as const PhysicsJoint ptr, byref x as single, byref y as single, byref z as single)
  • declare sub PhysicsJointV3GetCenterDirectionOnObjectB(byval pObj as const PhysicsJoint ptr, byref v3CenterDir as TA_Vec3)
  • declare function PhysicsJointGetMaxAngle(byval pObj as const PhysicsJoint ptr) as single
  • declare sub PhysicsJointGetJointOrientationA(byval pObj as const PhysicsJoint ptr, byref pitch as single, byref yaw as single, byref roll as single)
  • declare sub PhysicsJointMat33GetJointOrientationA(byval pObj as const PhysicsJoint ptr, byref m33 as TA_Mat33)
  • declare sub PhysicsJointGetJointOrientationB(byval pObj as const PhysicsJoint ptr, byref pitch as single, byref yaw as single, byref roll as single)
  • declare sub PhysicsJointMat33GetJointOrientationB(byval pObj as const PhysicsJoint ptr, byref m33 as TA_Mat33)
  • declare sub PhysicsJointGetMinAngles(byval pObj as const PhysicsJoint ptr, byref minAngleX as single, byref minAngleY as single, byref minAngleZ as single)
  • declare sub PhysicsJointGetMaxAngles(byval pObj as const PhysicsJoint ptr, byref maxAngleX as single, byref maxAngleY as single, byref maxAngleZ as single)
  • declare sub PhysicsJointGetSliderPos0(byval pObj as const PhysicsJoint ptr, byref x as single, byref y as single, byref z as single)
  • declare sub PhysicsJointV3GetSliderPos0(byval pObj as const PhysicsJoint ptr, byref pos0 as TA_Vec3)
  • declare sub PhysicsJointGetSliderPos1(byval pObj as const PhysicsJoint ptr, byref x as single, byref y as single, byref z as single)
  • declare sub PhysicsJointV3GetSliderPos1(byval pObj as const PhysicsJoint ptr, byref pos1 as TA_Vec3)

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Easily create Web Help sites


PhysicsSurfaceAttribute

PhysicsS urfaceAttribute

PhysicsSurfaceAttribute Reference

#include "TrueAxis.bi"

Description

Implements configurable surface attributes for collision objects.

Surface attributes are used to configure properties such as friction for static objects.

A Static collision object such as CollisionObjectAABBMesh is made up of many polygons each of which can reference to a separate surface attributes. Surface attributes are usually referred to by index and can be retrieved by calling the function PhysicsGetSurfaceAttribute.

  • Functions:
  • 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: Free help authoring environment


Collision

Collision

Collision Reference

#include "TrueAxis.bi"

Description

Stores collision details.

This structure is filled by various collision query functions such as PhysicsTestLineForCollision and PhysicsTestRayForCollision.

  • Functions:

declare function CollisionOccurred() as integer

declare function CollisionIsObjectA() as integer

declare function CollisionGetObjectA() as DynamicObject ptr

declare function CollisionGetAttributeA() as integer

declare function CollisionIsObjectB() as integer

declare function CollisionGetObjectB() as DynamicObject ptr

declare function CollisionGetAttributeB() as integer

declare function CollisionIsJoint() as integer

declare function CollisionGetJoint() as PhysicsJoint ptr

declare sub CollisionGetPosition(byref x as single, byref y as single, byref z as single)

declare sub CollisionV3GetPosition(byref v3Position as TA_Vec3)

declare sub CollisionGetNormal (byref x as single, byref y as single, byref z as single)

declare sub CollisionV3GetNormal(byref v3Normal as TA_Vec3)

declare function CollisionGetFlags() as eCOLLISION_FLAGS

declare function CollisionGetRestitution() as single

declare function CollisionGetImpulse() as single

declare function CollisionGetFrictionCoefficient() as single

declare function CollisionGetTime() as single

declare function CollisionGetIntersectingDepth() as single

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Easily create PDF Help documents


PreCollision

PreCollision

PreCollision Class Reference

#include "TrueAxis.bi"

Description

Stores collision details used by PhysicsSetPreProcessCollisionCallBack.

Data Structure:

  • type PreCollision
  • ...
  • end type
  • Callback:
  • The function provided by the user through this method will be called for each collision that occurs, "BEFORE" its affects are applied to the simulation.
  • By returning false=0, users can choose to ignore a particular collision.
  • Prototype:
  • type PreProcessCollisionCB as function cdecl (byval collision as PreCollision ptr) as ubyte
  • Functions:(used inside of a PreCollsion callback)
  • declare function PreCollisionGetNext(byval pPreCollision as PreCollision ptr) as PreCollision ptr
  • declare function PreCollisionIsObjectA(byval pPreCollision as PreCollision ptr) as integer
  • declare function PreCollisionGetObjectA(byval pPreCollision as PreCollision ptr) as DynamicObject ptr
  • declare function PreCollisionGetAttributeA(byval pPreCollision as PreCollision ptr) as integer
  • declare function PreCollisionIsObjectB(byval pPreCollision as PreCollision ptr) as integer
  • declare function PreCollisionGetObjectB(byval pPreCollision as PreCollision ptr) as DynamicObject ptr
  • declare function PreCollisionGetAttributeB(byval pPreCollision as PreCollision ptr) as integer
  • declare function PreCollisionIsJoint(byval pPreCollision as PreCollision ptr) as integer
  • declare function PreCollisionGetJoint(byval pPreCollision as PreCollision ptr) as PhysicsJoint ptr
  • declare function PreCollisionGetFlags(byval pPreCollision as PreCollision ptr) as integer
  • declare function PreCollisionGetIntersectingDepth(byval pPreCollision as PreCollision ptr) as single
  • declare function PreCollisionGetRestitution(byval pPreCollision as PreCollision ptr) as single
  • declare function PreCollisionGetFrictionCoefficient(byval pPreCollision as PreCollision ptr) as single
  • declare sub PreCollisionGetNormal(byval pPreCollision as PreCollision ptr, byref nx as single, byref ny as single, byref nz as single)
  • declare sub PreCollisionV3GetNormal(byval pPreCollision as PreCollision ptr, byref v3Normal as TA_Vec3)
  • declare sub PreCollisionGetPosition(byval pPreCollision as PreCollision ptr, byref px as single, byref py as single, byref pz as single)
  • declare sub PreCollisionV3GetPosition(byval pPreCollision as PreCollision ptr, byref v3Position as TA_Vec3)

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Full featured Documentation generator


PostCollision

PostCollision

PostCollision Reference

#include "TrueAxis.bi"

Description

Stores collision details used by PhysicsSetPostProcessCollisionCallBack.

Data Structure:

  • type PostCollision
  • ...
  • end type
  • Callback:
  • The function provided by the user through this method will be called for each collision that occurs, "AFTER" its affects have been applied to the simulation.
  • The effect of strength of the collision can be found from PostCollisionGetImpulse.
  • Prototype:
  • type PostProcessCollisionCB as sub cdecl (byval collision as PostCollision ptr)
  • Functions: (used inside a PostCollision callback)
  • declare function PostCollisionGetNext(byval pPostCollision as PostCollision ptr) as PostCollision ptr
  • declare function PostCollisionIsObjectA(byval pPostCollision as PostCollision ptr) as integer
  • declare function PostCollisionGetObjectA(byval pPostCollision as PostCollision ptr) as DynamicObject ptr
  • declare function PostCollisionGetAttributeA(byval pPostCollision as PostCollision ptr) as integer
  • declare function PostCollisionIsObjectB(byval pPostCollision as PostCollision ptr) as integer
  • declare function PostCollisionGetObjectB(byval pPostCollision as PostCollision ptr) as DynamicObject ptr
  • declare function PostCollisionGetAttributeB(byval pPostCollision as PostCollision ptr) as integer
  • declare function PostCollisionIsJoint(byval pPostCollision as PostCollision ptr) as integer
  • declare function PostCollisionGetJoint(byval pPostCollision as PostCollision ptr) as PhysicsJoint ptr
  • declare function PostCollisionGetFlags(byval pPostCollision as PostCollision ptr) as integer
  • declare function PostCollisionGetImpulse(byval pPostCollision as PostCollision ptr) as single
  • declare function PostCollisionGetIntersectingDepth(byval pPostCollision as PostCollision ptr) as single
  • declare sub PostCollisionGetNormal(byval pPostCollision as PostCollision ptr, byref nx as single, byref ny as single, byref nz as single)
  • declare sub PostCollisionV3GetNormal(byval pPostCollision as PostCollision ptr, byref v3Normal as TA_Vec3)
  • declare sub PostCollisionGetPosition(byval pPostCollision as PostCollision ptr, byref px as single, byref py as single, byref pz as single)
  • declare sub PostCollisionV3GetPosition(byval pPostCollision as PostCollision ptr, byref v3Position as TA_Vec3)

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Create HTML Help, DOC, PDF and print manuals from 1 single source


CollisionObject

CollisionObject

CollisionObject Reference

#include "TrueAxis.bi"

Inheritance diagram for CollisionObject:

Description

The base class of all collision objects.

  • Data Structure:
  • type CollisionObject
  • ...
  • end type
  • type CollisionObjectSimple extends CollisionObject
  • type CollisionObjectCombo extends CollisionObject
  • type CollisionObjectComlex extends CollisionObject

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Easily create Help documents


CollisionObjectSimple

CollisionObjectSimple

CollisionObjectSimple Reference

#include "TrueAxis.bi"

Inheritance diagram for CollisionObjectSimple:

Description

A base class for all simple collision objects.

  • A CollisionObjectSimple descripts an CollisionObject by params not polygones.

Collision objects that inherit from CollisionObjectSimple can be add to an object of type CollisionObjectCombo with the function CollisionObjectComboAddCollisionObject. The following classes inherit from CollisionObjectSimple:

  • CollisionObjectConvex
  • CollisionObjectCapsule
  • CollisionObjectCylinder
  • CollisionObjectSphere
  • CollisionObjectLineList

These classes can be used in conjunction with the function CollisionObjectComboAddCollisionObject to build a combo collision object. Combo collision objects are used by DynamicObject .

  • Data Structure:
  • type CollisionObjectSimple extends CollisionObject
  • ...
  • end type

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Free PDF documentation generator


CollisionObjectCapsule

CollisionObjectCapsule

CollisionObjectCapsule Reference

#include "TrueAxis.bi"

Inheritance diagram for CollisionObjectCapsule:

Description:

An capsule implementation of CollisionObjectSimple .

Call the static function CollisionObjectCapsuleCreateNew to create a new instance of this class.

Here a capsule is taken to mean a cylinder with a hemisphere rounding off each end.

Capsule Diagram

A capsule is an implementations of CollisionObjectSimple . Objects of this type can be combined to make a combo collision object. See CollisionObjectComboAddCollisionObject.

  • Data Structure:
  • type CollisionObjectCapsule extends CollisionObjectSimple
  • ...
  • end type
  • Functions:
  • CollisionObjectCapsuleCreateNew
  • CollisionObjectCapsuleRelease
  • CollisionObjectCapsuleInitialise
  • CollisionObjectCapsuleGetPointA
  • CollisionObjectCapsuleGetPointB
  • CollisionObjectCapsuleGetRadius

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Create HTML Help, DOC, PDF and print manuals from 1 single source


CollisionObjectCapsuleCreateNew

CollisionObjectCapsule

CollisionObjectCapsuleCreateNew Reference

#include "TrueAxis.bi"

  • declare function CollisionObjectCapsuleCreateNew () as CollisionObjectCapsule ptr

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Free CHM Help documentation generator


CollisionObjectCapsuleRelease

CollisionObjectCapsule

CollisionObjectCapsuleRelease Reference

#include "TrueAxis.bi"

  • declare sub CollisionObjectCapsuleRelease (byref pObj as const CollisionObjectCapsule ptr)

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Free Web Help generator


CollisionObjectCapsuleInitialise

CollisionObjectCapsule

CollisionObjectCapsuleInitialise Reference

#include "TrueAxis.bi"

  • declare sub CollisionObjectCapsuleInitialise(byval pObj as const CollisionObjectCapsule ptr, _
  • 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 radius as single)
  • declare sub CollisionObjectCapsuleV3Initialise(byval pObj as const CollisionObjectCapsule ptr, _
  • byref PointA as const TA_Vec3, byref PointB as const TA_Vec3, byval radius as single)

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Single source CHM, PDF, DOC and HTML Help creation


CollisionObjectCapsuleGetPointA

CollisionObjectCapsule

CollisionObjectCapsuleGetPointA Reference

#include "TrueAxis.bi"

  • declare sub CollisionObjectCapsuleGetPointA (byval pObj as const CollisionObjectCapsule ptr, _
  • byref startX as single, byref startY as single, byref startZ as single)
  • declare sub CollisionObjectCapsuleV3GetPointA(byval pObj as const CollisionObjectCapsule ptr, byref v3PointA as TA_Vec3)

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Single source CHM, PDF, DOC and HTML Help creation


CollisionObjectCapsuleGetPointB

CollisionObjectCapsule

CollisionObjectCapsuleGetPointB Reference

#include "TrueAxis.bi"

  • declare sub CollisionObjectCapsuleGetPointB (byval pObj as const CollisionObjectCapsule ptr, _
  • byref startX as single, byref startY as single, byref startZ as single)
  • declare sub CollisionObjectCapsuleV3GetPointB(byval pObj as const CollisionObjectCapsule ptr, byref v3PointB as TA_Vec3)

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Easy CHM and documentation editor


CollisionObjectCapsuleGetRadius

CollisionObjectCapsule

CollisionObjectCapsuleGetRadius Reference

#include "TrueAxis.bi"

  • declare function CollisionObjectCapsuleGetRadius (byval pObj as const CollisionObjectCapsule ptr) as single

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Create HTML Help, DOC, PDF and print manuals from 1 single source


CollisionObjectConvex

CollisionObjectConvex

CollisionObjectConvex Reference

#include "TrueAxis.bi"

Inheritance diagram for CollisionObjectConvex:

Description:

A convex object is an implementation of CollisionObjectSimple .

Call the static function CollisionObjectConvexCreateNew to create a new instance of this class.

CollisionObjectConvex is used to represent convex polygon shapes for dynamic objects. The only way to create non-convex objects is to combine multiple convex objects. For speed reasons, this should be avoided unless necessary. Convex objects should also be kept as simple as possible.

A Convex Object Diagram

Objects that implement CollisionObjectSimple can be combined to make a combo collision object. See CollisionObjectComboAddCollisionObject.

  • Data Structure:
  • type CollisionObjectConvex extends CollisionObjectSimple
  • ...
  • end type
  • Functions:
  • CollisionObjectConvexCreateNew
  • CollisionObjectConvexRelease
  • CollisionObjectConvexInitialiseAsACube
  • CollisionObjectConvexInitialiseAsABox
  • CollisionObjectConvexInitialiseFromPointList
  • CollisionObjectConvexTransform

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Full featured Documentation generator


CollisionObjectConvexCreateNew

CollisionObjectConvex

CollisionObjectConvexCreateNew Reference

#include "TrueAxis.bi"

  • declare function CollisionObjectConvexCreateNew () as CollisionObjectConvex ptr

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Free help authoring environment


CollisionObjectConvexRelease

CollisionObjectConvex

CollisionObjectRelease Reference

#include "TrueAxis.bi"

  • declare sub CollisionObjectConvexRelease(byref pObj as CollisionObjectConvex ptr)

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Easy to use tool to create HTML Help files and Help web sites


CollisionObjectConvexInitialiseAsACube

CollisionObjectConvex

CollisionObjectConvexInitialiseAsACube Reference

#include "TrueAxis.bi"

  • declare sub CollisionObjectConvexInitialiseAsACube(byval pObj as const CollisionObjectConvex ptr, _
  • byval centerX as single, byval centerY as single, byval centerZ as single, _
  • byval size as single)
  • declare sub CollisionObjectConvexV3InitialiseAsACube(byval pObj as const CollisionObjectConvex ptr, _
  • byref v3Center as const TA_Vec3, byval size as single)
  • declare sub CollisionObjectConvexInitialiseAsAnOrientedCube(byval pObj as const CollisionObjectConvex ptr, _
  • byval cx as single, byval cy as single, byval cz as single, _ ' center
  • byval size as single, _
  • byval px as single, byval py as single, byval pz as single, _ ' position
  • byval pitch as single, byval yaw as single, byval roll as single)
  • declare sub CollisionObjectConvexV3InitialiseAsAnOrientedCube(byval pObj as const CollisionObjectConvex ptr, _
  • byref v3Center as const TA_Vec3, _
  • byval size as single, _
  • byref v3Position as const TA_Vec3, _
  • byval pitch as single, byval yaw as single, byval roll as single)

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Full featured Documentation generator


CollisionObjectConvexInitialiseAsABox

CollisionObjectConvex

CollisionObjectConvexInitialiseAsABox Reference

#include "TrueAxis.bi"

  • declare sub CollisionObjectConvexV3InitialiseAsABox (byval pObj as const CollisionObjectConvex ptr, _
  • byref v3Center as const TA_Vec3, byref v3Size as const TA_Vec3)
  • declare sub CollisionObjectConvexAABBInitialiseAsABox(byval pObj as const CollisionObjectConvex ptr, _
  • byref aabb as const TA_AABB)
  • declare sub CollisionObjectConvexInitialiseAsAnOrientedBox(byval pObj as const CollisionObjectConvex ptr, _
  • byval cx as single, byval cy as single, byval cz as single, _ ' center
  • byval w as single, byval h as single, byval d as single, _ ' size
  • byval px as single, byval py as single, byval pz as single, _ ' position
  • byval pitch as single, byval yaw as single, byval roll as single)
  • declare sub CollisionObjectConvexV3InitialiseAsAnOrientedBox(byval pObj as const CollisionObjectConvex ptr, _
  • byref v3Center as const TA_Vec3, _
  • byref v3Size as const TA_Vec3, _
  • byref v3Position as const TA_Vec3, _
  • byval pitch as single, byval yaw as single, byval roll as single)
  • declare sub CollisionObjectConvexAABBInitialiseAsAnOrientedBox(byval pObj as const CollisionObjectConvex ptr, _
  • byref aabb as const TA_AABB, _ ' center and extend
  • byref frame as const TA_MFrame) ' rotation and position

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Easily create Web Help sites


CollisionObjectConvexInitialiseFromPointList

CollisionObjectConvex

CollisionObjectConvexInitialiseFromPointList Reference

#include "TrueAxis.bi"

  • declare sub CollisionObjectConvexInitialiseFromPointList(byval pObj as const CollisionObjectConvex ptr, _
  • byval pFloat as single ptr, byval nPoints as integer)
  • declare sub CollisionObjectConvexV3InitialiseFromPointList(byval pObj as const CollisionObjectConvex ptr, _
  • byref pV3 as const TA_Vec3 ptr, byval nPoints as integer)

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Easy CHM and documentation editor


CollisionObjectConvexTransform

CollisionObjectConvex

CollisionObjectConvexTransform Reference

#include "TrueAxis.bi"

  • declare sub CollisionObjectConvexTransform (byval pObj as const CollisionObjectConvex ptr, _
  • byval posX as single, byval posY as single, byval posZ as single, _
  • byval pitchRad as single, byval yawRad as single, byval rollRad as single)
  • declare sub CollisionObjectConvexV3Transform (byval pObj as const CollisionObjectConvex ptr, _
  • byref v3Position as const TA_Vec3, _
  • byval pitchRad as single, byval yawRad as single, byval rollRad as single)
  • declare sub CollisionObjectConvexTransformD(byval pObj as const CollisionObjectConvex ptr, _
  • byval posX as single, byval posY as single, byval posZ as single, _
  • byval pitchDeg as single, byval yawDeg as single, byval rollDeg as single)
  • declare sub CollisionObjectConvexV3TransformD(byval pObj as const CollisionObjectConvex ptr, _
  • byref v3Position as const TA_Vec3, _
  • byval pitchDeg as single, byval yawDeg as single, byval rollDeg as single)

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Full featured Help generator


CollisionObjectCylinder

CollisionObjectCylinder

CollisionObjectCylinder Reference

#include "TrueAxis.bi"

Inheritance diagram for CollisionObjectCylinder:

Description:

An cylinder implementation of CollisionObjectSimple .

Call the static function CollisionObjectCylinderCreateNew to create a new instance of this class.

This class implements a cylinder collision object.

Cylinder Diagram

A cylinder is an implementations of CollisionObjectSimple . Objects of this type can be combined to make a combo collision object. See CollisionObjectComboAddCollisionObject.

  • Data Structure:
  • type CollisionObjectCylinder extends CollisionObjectSimple
  • ...
  • end type
  • Functions:
  • CollisionObjectCylinderCreateNew
  • CollisionObjectCylinderRelease
  • CollisionObjectCylinderInitialise
  • CollisionObjectCylinderGetPointA
  • CollisionObjectCylinderGetPointB
  • CollisionObjectCylinderGetRadius

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Easily create Web Help sites


CollisionObjectCylinderCreateNew

CollisionObjectCylinder

CollisionObjectCylinderCreateNew Reference

#include "TrueAxis.bi"

  • declare function CollisionObjectCylinderCreateNew () as CollisionObjectCylinder ptr

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Create HTML Help, DOC, PDF and print manuals from 1 single source


CollisionObjectCylinderRelease

CollisionObjectCylinder

CollisionObjectCylinderRelease Reference

#include "TrueAxis.bi"

  • declare sub CollisionObjectCylinderRelease (byref pObj as CollisionObjectCylinder ptr)

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Free PDF documentation generator


CollisionObjectCylinderInitialise

CollisionObjectCylinder

CollisionObjectCylinderInitialise Reference

#include "TrueAxis.bi"

  • declare sub CollisionObjectCylinderInitialise(byval pObj as const CollisionObjectCylinder ptr, _
  • 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 radius as single)
  • declare sub CollisionObjectCylinderV3Initialise(byval pObj as const CollisionObjectCylinder ptr, _
  • byref PointA as const TA_Vec3,byref PointB as const TA_Vec3,byref radius as single)

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Full featured Documentation generator


CollisionObjectCylinderGetPointA

CollisionObjectCylinder

CollisionObjectCylinderGetPointA Reference

#include "TrueAxis.bi"

  • declare sub CollisionObjectCylinderGetPointA (byval pObj as const CollisionObjectCylinder ptr, _
  • byref startX as single, byref startY as single, byref startZ as single)
  • declare sub CollisionObjectCylinderV3GetPointA(byval pObj as const CollisionObjectCylinder ptr, byref v3PointA as TA_Vec3)

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Full featured Help generator


CollisionObjectCylinderGetPointB

CollisionObjectCylinder

CollisionObjectCylinderGetPointB Reference

#include "TrueAxis.bi"

  • declare sub CollisionObjectCylinderGetPointB (byval pObj as const CollisionObjectCylinder ptr, _
  • byref startX as single, byref startY as single, byref startZ as single)
  • declare sub CollisionObjectCylinderV3GetPointB(byval pObj as const CollisionObjectCylinder ptr, byref v3PointB as TA_Vec3)

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Free HTML Help documentation generator


CollisionObjectCylinderGetRadius

CollisionObjectCylinder

CollisionObjectCylinderGetRadius Reference

#include "TrueAxis.bi"

  • declare function CollisionObjectCylinderGetRadius (byval pObj as const CollisionObjectCylinder ptr) as single

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Free help authoring environment


CollisionObjectLineList

CollisionObjectLineList

CollisionObjectLineList Reference

#include "TrueAxis.bi"

Inheritance diagram for CollisionObjectLineList:

Description:

An implementation of CollisionObjectSimple .

Call the function CollisionObjectLineListCreateNew to create a new instance of this class.

A CollisionObjectLineList represents a list of line segments. It provides a faster alternative to PhysicsTestLineForCollision in the case where a there are a group of short lines that are attached to a dynamic object. This object type was added specifically to represent ground contact points for car wheels in DynamicObjectCar but may be also useful in other situations so has been made available to the end user.

Information about collisions that occurred during the last call to the function PhysicsUpdate can be retrieved using the functions DynamicObjectGetNumLineCollisions () and DynamicObjectGetLineCollision () . Collisions with CollisionObjectLineList have no effect on the physics response of a DynamicObject .

Objects that implement CollisionObjectSimple can be combined to make a combo collision object. See CollisionObjectComboAddCollisionObject. Unlike other objects that inherit from CollisionObjectSimple , a CollisionObjectCombo is only allowed to contain one CollisionObjectLineList.

  • Data Structure:
  • type CollisionObjectLineList extends CollisionObjectSimple
  • ...
  • end type
  • Functions:
  • CollisionObjectLineListCreateNew
  • CollisionObjectLineListRelease
  • CollisionObjectLineListInitialise
  • CollisionObjectLineListSetLine
  • CollisionObjectLineListGetNumLines

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Full featured multi-format Help generator


CollisionObjectLineListCreateNew

CollisionObjectLineList

CollisionObjectLineListCreateNew Reference

#include "TrueAxis.bi"

  • declare function CollisionObjectLineListCreateNew() as CollisionObjectLineList ptr

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Full featured Help generator


CollisionObjectLineListRelease

CollisionObjectLineList

CollisionObjectLineListRelease Reference

#include "TrueAxis.bi"

  • declare sub CollisionObjectLineListRelease(byref co as CollisionObjectLineList ptr)

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Free Web Help generator


CollisionObjectLineListInitialise

CollisionObjectLineList

CollisionObjectLineListInitialise Reference

#include "TrueAxis.bi"

  • ' pFloat points to a liat of x,y,z coords 6 for each line (startX,startY,startZ, endX,endY,endZ)
  • declare sub CollisionObjectLineListInitialise (byval pObj as const CollisionObjectLineList ptr, _
  • byval pFloat as const single ptr, byval nLines as integer)
  • ' pV3 points to a list of vertices 2 vertex for each line (v3Start,v3End)
  • declare sub CollisionObjectLineListV3Initialise(byval pObj as const CollisionObjectLineList ptr, _
  • byval pV3 as const TA_Vec3 ptr, byval nLines as integer)

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Free Web Help generator


CollisionObjectLineListSetLine

CollisionObjectLineList

CollisionObjectLineListSetLine Reference

#include "TrueAxis.bi"

  • declare sub CollisionObjectLineListSetLine(byval pObj as const CollisionObjectLineList ptr, _
  • byval nLineIndex as integer, _
  • byval sx as single, byval sy as single, byval sz as single, _
  • byval ex as single, byval ey as single, byval ez as single)
  • declare sub CollisionObjectLineListV3SetLine(byval pObj as const CollisionObjectLineList ptr, _
  • byval nLineIndex as integer, _
  • byref v3Start as const TA_Vec3, _
  • byref v3End as const TA_Vec3)

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Full featured multi-format Help generator


CollisionObjectLineListGetNumLines

CollisionObjectLineList

CollisionObjectLineListGetNumLines Reference

#include "TrueAxis.bi"

  • declare function CollisionObjectLineListGetNumLines(byval pObj as const CollisionObjectLineList ptr) as integer

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Full featured Documentation generator


CollisionObjectSphere

CollisionObjectSphere

CollisionObjectSphere Reference

#include "TrueAxis.bi"

Inheritance diagram for CollisionObjectSphere:

Description:

A sphere implementation of CollisionObjectSimple .

Call the static function CollisionObjectSphereCreateNew to create a new instance of this class.

This class implements a sphere collision object.

Sphere Diagram

A sphere is an implementations of CollisionObjectSimple . Objects of this type can be combined to make a combo collision object. See CollisionObjectComboAddCollisionObject.

  • Data Structure:
  • type CollisionObjectSphere extends CollisionObjectSimple
  • ...
  • end type
  • Functions:
  • CollisionObjectSphereCreateNew
  • CollisionObjectSphereRelease
  • CollisionObjectSphereInitialise
  • CollisionObjectSphereGetPoint
  • CollisionObjectSphereGetRadius

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Easily create HTML Help documents


CollisionObjectSphereCreateNew

CollisionObjectSphere

CollisionObjecSphereCreateNew Reference

#include "TrueAxis.bi"

  • declare function CollisionObjectSphereCreateNew () as CollisionObjectSphere ptr

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Full featured multi-format Help generator


CollisionObjectSphereRelease

CollisionObjectSphere

CollisionObjectSphereRelease Reference

#include "TrueAxis.bi"

  • declare sub CollisionObjectSphereRelease (byref pObj as CollisionObjectSphere ptr)

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Full featured Documentation generator


CollisionObjectSphereInitialise

CollisionObjectSphere

CollisionObjectSphereInitialise Reference

#include "TrueAxis.bi"

  • declare sub CollisionObjectSphereInitialise(byval pObj as const CollisionObjectSphere ptr, _
  • byval centerX as single, byval centerY as single, byval centerZ as single, _
  • byval radius as single)
  • declare sub CollisionObjectSphereV3Initialise(byval pObj as const CollisionObjectSphere ptr, _
  • byref v3Center as const TA_Vec3, byval radius as single)

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Full featured multi-format Help generator


CollisionObjectSphereGetPoint

CollisionObjectSphere

CollisionObjectSphereGetPoint Reference

#include "TrueAxis.bi"

  • declare sub CollisionObjectSphereGetPoint (byval pObj as const CollisionObjectSphere ptr, _
  • byref centerX as single, byref centerY as single, byref centerZ as single)
  • declare sub CollisionObjectSphereV3GetPoint (byval pObj as const CollisionObjectSphere ptr, byref v3Point as TA_Vec3)

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Free help authoring environment


CollisionObjectSphereGetRadius

CollisionObjectSphere

CollisionObjectSphereGetRadius Reference

#include "TrueAxis.bi"

  • declare function CollisionObjectSphereGetRadius (byval pObj as const CollisionObjectSphere ptr) as single

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Free Web Help generator


CollisionObjectCombo

CollisionObjectCombo

CollisionObjectCombo Reference

#include "TrueAxis.bi"

Inheritance diagram for CollisionObjectCombo:

Description:

Provides the collision representation for DynamicObject .

Call the static function : CollisionObjectComboCreateNew to create a new instance of this class.

All dynamic objects contain a collision object of type CollisionObjectCombo . This can be retrieved by the function DynamicObjectGetCollisionObject. These objects are meant to be simple and small to allow for fast collision testing. They are not designed to be more than a few meters big.

A combo collision object is built with a list of collision objects of type CollisionObjectSimple . These can be any combination of:

  • CollisionObjectConvex
  • CollisionObjectCapsule
  • CollisionObjectCylinder
  • CollisionObjectSphere
  • CollisionObjectLineList

To make a concave polygon collision object it is necessary to combine multiple convex objects.

  • Data Structure:
  • type CollisionObjectCombo extends CollisionObject
  • ...
  • end type
  • Functions:
  • CollisionObjectComboCreateNew
  • CollisionObjectComboRelease
  • CollisionObjectComboInitialise
  • CollisionObjectComboInitialiseAsACube
  • CollisionObjectComboInitialiseAsABox
  • CollisionObjectComboInitialiseAsACapsule
  • CollisionObjectComboInitialiseAsACylinder
  • CollisionObjectComboInitialiseAsASphere
  • CollisionObjectComboAddCollisionObject
  • CollisionObjectComboGetNumCollisionObjects
  • CollisionObjectComboRemoveCollisionObject

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Free help authoring environment


CollisionObjectComboCreateNew

CollisionObjectCombo

CollisionObjectComboCreateNew Reference

#include "TrueAxis.bi"

  • declare function CollisionObjectComboCreateNew() as CollisionObjectCombo ptr

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Full featured Documentation generator


CollisionObjectComboRelease

CollisionObjectCombo

CollisionObjectComboRelease Reference

#include "TrueAxis.bi"

  • declare sub CollisionObjectComboRelease(byref pObj as const CollisionObjectCombo ptr)

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Easy CHM and documentation editor


CollisionObjectComboInitialise

CollisionObjectCombo

CollisionObjectComboInitialise Reference

#include "TrueAxis.bi"

  • declare sub CollisionObjectComboInitialise(byval pObj as const CollisionObjectCombo ptr)

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Free PDF documentation generator


CollisionObjectComboInitialiseAsACube

CollisionObjectCombo

CollisionObjectComboAsACube Reference

#include "TrueAxis.bi"

  • declare sub CollisionObjectComboInitialiseAsACube(byval pObj as const CollisionObjectCombo ptr, _
  • byval centerX as single, byval centerY as single, byval centerZ as single, _
  • byval size as single)
  • declare sub CollisionObjectComboV3InitialiseAsACube(byval pObj as const CollisionObjectCombo ptr, _
  • byref v3Center as const TA_Vec3, _
  • byval size as single)
  • declare sub CollisionObjectComboInitialiseAsAnOrientedCube(byval pObj as const CollisionObjectCombo ptr, _
  • byval cx as single, byval cy as single, byval cz as single, _ ' center
  • byval size as single, _
  • byval px as single, byval py as single, byval pz as single, _ ' position
  • byval pitch as single, byval yaw as single, byval roll as single)
  • declare sub CollisionObjectComboV3InitialiseAsAnOrientedCube(byval pObj as const CollisionObjectCombo ptr, _
  • byref v3Center as const TA_Vec3, _
  • byval size as single, _
  • byref v3Position as const TA_Vec3, _
  • byval pitch as single, byval yaw as single, byval roll as single)

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Free CHM Help documentation generator


CollisionObjectComboInitialiseAsABox

CollisionObjectCombo

CollisionObjectComboAsABox Reference

#include "TrueAxis.bi"

  • declare sub CollisionObjectComboInitialiseAsABox(byval pObj as const CollisionObjectCombo ptr, _
  • byval centerX as single, byval centerY as single, byval centerZ as single, _
  • byval extentX as single, byval extentY as single, byval extentZ as single)
  • declare sub CollisionObjectComboV3InitialiseAsABox(byval pObj as const CollisionObjectCombo ptr, _
  • byref v3Center as const TA_Vec3, byref v3Dimension as const TA_Vec3)
  • declare sub CollisionObjectComboAABBInitialiseAsABox(byval pObj as const CollisionObjectCombo ptr, _
  • byref aabb as const TA_AABB)
  • declare sub CollisionObjectComboInitialiseAsAnOrientedBox(byval pObj as const CollisionObjectCombo ptr, _
  • byval cx as single, byval cy as single, byval cz as single, _ ' center
  • byval w as single, byval h as single, byval d as single, _ ' size
  • byval px as single, byval py as single, byval pz as single, _ ' position
  • byval pitch as single, byval yaw as single, byval roll as single)
  • declare sub CollisionObjectComboV3InitialiseAsAnOrientedBox(byval pObj as const CollisionObjectCombo ptr, _
  • byref v3Center as const TA_Vec3, _
  • byref v3Size as const TA_Vec3, _
  • byref v3Position as const TA_Vec3, _
  • byval pitch as single, byval yaw as single, byval roll as single)
  • declare sub CollisionObjectComboAABBInitialiseAsAnOrientedBox(byval pObj as const CollisionObjectCombo ptr, _
  • byref aabb as const TA_AABB, _ ' center and extend
  • byref frame as const TA_MFrame) ' rotation and position

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Easily create CHM Help documents


CollisionObjectComboInitialiseAsACapsule

CollisionObjectCombo

CollisionObjectComboAsACapsule Reference

#include "TrueAxis.bi"

  • declare sub CollisionObjectComboInitialiseAsACapsule(byval pObj as const CollisionObjectCombo ptr, _
  • 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 radius as single)
  • declare sub CollisionObjectComboV3InitialiseAsACapsule(byval pObj as CollisionObjectCombo ptr, _
  • byref v3PointA as const TA_Vec3, byref v3PointA as const TA_Vec3, byval radius as single)

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Easy to use tool to create HTML Help files and Help web sites


CollisionObjectComboInitialiseAsACylinder

CollisionObjectCombo

CollisionObjectComboAsACylinder Reference

#include "TrueAxis.bi"

  • declare sub CollisionObjectComboInitialiseAsACylinder(byval pObj as const CollisionObjectCombo ptr, _
  • 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 radius as single)
  • declare sub CollisionObjectComboV3InitialiseAsACylinder(byval pObj as CollisionObjectCombo ptr, _
  • byref v3PointA as const TA_Vec3, byref v3PointA as const TA_Vec3, byval radius as single)

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Easily create HTML Help documents


CollisionObjectComboInitialiseAsASphere

CollisionObjectCombo

CollisionObjectComboAsASphere Reference

#include "TrueAxis.bi"

  • declare sub CollisionObjectComboInitialiseAsASphere(byval pObj as const CollisionObjectCombo ptr, _
  • byval centerX as single, byval centerY as single, byval centerZ as single, _
  • byval radius as single)
  • declare sub CollisionObjectComboV3InitialiseAsASphere(byval pObj as const CollisionObjectCombo ptr, _
  • byref v3Center as const TA_Vec3, byval radius as single)

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Easily create CHM Help documents


CollisionObjectComboAddCollisionObject

CollisionObjectCombo

CollisionObjectComboAddCollisionObject Reference

#include "TrueAxis.bi"

  • declare sub CollisionObjectComboAddCollisionObject (byval pA as const CollisionObjectCombo ptr, byval pB as const CollisionObjectSimple ptr)

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Free HTML Help documentation generator


CollisionObjectComboGetNumCollisionObjects

CollisionObjectCombo

CollisionObjectComboGetNumCollisionObjects Reference

#include "TrueAxis.bi"

  • declare function CollisionObjectComboGetNumCollisionObjects(byval pObj as const CollisionObjectCombo ptr) as integer

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Easily create PDF Help documents


CollisionObjectComboRemoveCollisionObject

CollisionObjectCombo

CollisionObjectComboRemoveCollisionObject Reference

#include "TrueAxis.bi"

  • declare sub CollisionObjectComboRemoveCollisionObject (byval pObj as const CollisionObjectCombo ptr, byval n as integer)

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Free Web Help generator


CollisionObjectComplex

CollisionObjectComplex

CollisionObjectComplex Reference

#include "TrueAxis.bi"

Inheritance diagram for CollisionObjectComplex:

Description

Provides an representation of large static arbitrary meshes.

All static objects contain a CollisionObjectComplex. Not to be confused with CollisionObjectConvex .

CollisionObjectComplex is a virtual base class. CollisionObjectAABBMesh provides an implementation.

  • Data Structure:
  • type CollisionObjectComplex extends CollisionObject
  • ...
  • end type

see CollisionObjectAABBMesh

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Easy CHM and documentation editor


CollisionObjectAABBMesh

: CollisionObjectAABBMesh

CollisionObjectAABBMesh Reference

#include "TrueAxis.bi"

Inheritance diagram for CollisionObjectAABBMesh:

Description:

An implementation of CollisionObjectComplex .

Call the static function CollisionObjectAABBMeshCreateNew to create a new instance of this class.

This class provides a standard implementation of CollisionObjectComplex using an Axis Aligned Bounding Box Tree. It has an O(log n) performance, and takes up O(n) space.

To build a CollisionObjectAABBMesh, the user must first call Initialise, followed by calling AddVertex and AddPolygon to specify the geometry. Finally, the user must call FinishedAddingGeometry to complete initialisation.

An CollisionObjectAABBMesh can be added to the physics simulation using a StaticObject or a DynamicObject .

  • Note:
  • A CollisionObjectAABBMesh cannot collide with another CollisionObjectAABBMesh. It can only collide with collision types that derive from CollisionObjectSimple .
  • Data Structure:
  • type CollisionObjectAABBMesh extends CollisionObjectComplex
  • ...
  • end type
  • Functions:
  • CollisionObjectAABBMeshCreateNew
  • CollisionObjectAABBMeshRelease
  • CollisionObjectAABBMeshInitialise
  • CollisionObjectAABBMeshAddVertex
  • CollisionObjectAABBMeshAddPolygon
  • CollisionObjectAABBMeshFinishedAddingGeometry
  • CollisionObjectAABBMeshSetUserData
  • CollisionObjectAABBMeshGetUserData
  • CollisionObjectAABBMeshRender

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Single source CHM, PDF, DOC and HTML Help creation


CollisionObjectAABBMeshCreateNew

CollisionObjectAABBMesh

CollisionObjecAABBMeshCreateNew Reference

#include "TrueAxis.bi"

  • declare function CollisionObjectAABBMeshCreateNew() as CollisionObjectAABBMesh ptr

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Free Web Help generator


CollisionObjectAABBMeshRelease

CollisionObjectAABBMesh

CollisionObjecAABBMeshRelease Reference

#include "TrueAxis.bi"

  • declare sub CollisionObjectAABBMeshRelease(byref pObj as CollisionObjectAABBMesh ptr)

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Free CHM Help documentation generator


CollisionObjectAABBMeshInitialise

CollisionObjectAABBMesh

CollisionObjectAABBMeshInitialise Reference

#include "TrueAxis.bi"

  • declare sub CollisionObjectAABBMeshInitialise(byval pObj as const CollisionObjectAABBMesh ptr,byval nVertices as integer,byval nPolys as integer,byval nIndices as integer)

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Easily create Web Help sites


CollisionObjectAABBMeshAddVertex

CollisionObjectAABBMesh

CollisionObjectAABBMeshAddVertex Reference

#include "TrueAxis.bi"

  • declare sub CollisionObjectAABBMeshAddVertex(byval pObj as const CollisionObjectAABBMesh ptr,byval x as single,byval y as single,byval z as single)
  • declare sub CollisionObjectAABBMeshV3AddVertex(byval pObj as const CollisionObjectAABBMesh ptr,byref v3Vertex as const TA_Vec3)

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Free help authoring environment


CollisionObjectAABBMeshAddPolygon

CollisionObjectAABBMesh

CollisionObjectAABBMeshAddPolygon Reference

#include "TrueAxis.bi"

  • declare sub CollisionObjectAABBMeshAddPolygon(byval pObj as const CollisionObjectAABBMesh ptr,byval nIndices as integer,byval pIndices as const integer ptr,byval surfaceAttributeIndex as integer=DEFAULT_SURFACE_ATTRIBUTE)

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Free Web Help generator


CollisionObjectAABBMeshFinishedAddingGeometry

CollisionObjectAABBMesh

CollisionObjectAABBMeshFinishedAddingGeometry

#include "TrueAxis.bi"

  • declare sub CollisionObjectAABBMeshFinishedAddingGeometry(byval pObj as const CollisionObjectAABBMesh ptr)

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Easy CHM and documentation editor


CollisionObjectAABBMeshSetUserData

CollisionObjectAABBMesh

CollisionObjectAABBMeshSetUserData

#include "TrueAxis.bi"

  • declare sub CollisionObjectAABBMeshSetUserData(byval pObj as const CollisionObjectAABBMesh ptr, byval pUserData as const any ptr)

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Full featured multi-format Help generator


CollisionObjectAABBMeshGetUserData

CollisionObjectAABBMesh

CollisionObjectAABBMeshGetUserData

#include "TrueAxis.bi"

  • declare function CollisionObjectAABBMeshGetUserData(byval pObj as const CollisionObjectAABBMesh ptr) as any ptr

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Easily create Help documents


CollisionObjectAABBMeshRender

CollisionObjectAABBMesh

CollisionObjectAABBMeshRender

#include "TrueAxis.bi"

  • ' !!! DEBUG mode only !!!
  • declare sub CollisionObjectAABBMeshRender(byval pObj as const CollisionObjectAABBMesh ptr)

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Free PDF documentation generator


PhysicsObject

TA::PhysicsObject

PhysicsObject

PhysicsObject Reference

#include "TrueAxis.bi"

Inheritance diagram for PhysicsObject:

Description

A virtual base class for all object types that can be added to the physics simulation.

StaticObject and DynamicObject are both inherited from this class. Physics provides the functions PhysicsAddDynamicObject and PhysicsAddStaticObject for adding these objects to the simulation. The function PhysicsObjectAddedToPhysics can be used to determine the objects current state.

Data Structure:

  • type PhysicsObject
  • ...
  • end type
  • type StaticObject extends PhysicsObject
  • type DynamicObject extends PhysicsObject
  • type DynamicObjectCar extends DynamicObject
  • Functions:
  • declare function PhysicsObjectAddedToPhysics(byval pObj as const PhysicsObject ptr) as integer

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Easy CHM and documentation editor


DynamicObject

DynamicObject

DynamicObject Reference

#include "TrueAxis.bi"

Inheritance diagram for DynamicObject:

Description

Implements interactive objects in the physics simulation.

Call the function DynamicObjectCreateNew to create a new instance of this class.

All objects that need to react to physical forces should use this class in the simulation. DynamicObject inherits from PhysicsObject .

Initialising with CollisionObjectCombo allows for more complex collision objects. It also allows multiple dynamic objects to share the same collision objects to help reduce memory usage. The other initialisers are provided mostly for rapid prototyping purposes.

After the object has been initialised, various functions such as DynamicObjectSetMass can be used to set the objects properties.

Dynamics objects can be added and removed from the physics simulation by use of the functions PhysicsAddDynamicObject and PhysicsRemoveDynamicObject. The function DynamicObjectAddedToPhysics can be used to determine the current state.

  • Data Structure:
  • type DynamicObject extends PhysicsObject
  • ...
  • end type
  • Functions:
  • declare function DynamicObjectCreateNew() as DynamicObject ptr
  • declare sub DynamicObjectRelease(byref pObj as const DynamicObject ptr )
  • declare sub DynamicObjectInitialise(byval pObj as const DynamicObject ptr, byval pComboObj as const CollisionObjectCombo ptr)
  • declare sub DynamicObjectInitialiseAsACube(byval pObj as const DynamicObject ptr, _
  • byval centerX as single, byval centerY as single, byval centerZ as single, _
  • byval size as single)
  • declare sub DynamicObjectV3InitialiseAsACube(byval pObj as const DynamicObject ptr, byref v3Center as const TA_Vec3, byval size as single)
  • declare sub DynamicObjectInitialiseAsAnOrientedCube(byval pObj as const DynamicObject ptr, _
  • byval cx as single, byval cy as single, byval cz as single, _ ' center
  • byval size as single, _
  • byval px as single, byval py as single, byval pz as single, _ ' position
  • byval pitch as single, byval yaw as single, byval roll as single)
  • declare sub DynamicObjectV3InitialiseAsAnOrientedCube(byval pObj as const DynamicObject ptr, _
  • byref v3Center as const TA_Vec3, _
  • byval size as single, _
  • byref v3Position as const TA_Vec3, _
  • byval pitch as single, byval yaw as single, byval roll as single)
  • declare sub DynamicObjectInitialiseAsABox(byval pObj as const DynamicObject ptr, _
  • byval centerX as single, byval centerY as single, byval centerZ as single, _
  • byval sizeX as single, byval sizeY as single, byval sizeZ as single)
  • declare sub DynamicObjectV3InitialiseAsABox(byval pObj as const DynamicObject ptr, _
  • byref v3Center as const TA_Vec3, _
  • byref v3Extend as const TA_Vec3)
  • declare sub DynamicObjectAABBInitialiseAsABox(byval pObj as const DynamicObject ptr, byref aabb as const TA_AABB)
  • declare sub DynamicObjectInitialiseAsAnOrientedBox(byval pObj as const DynamicObject ptr, _
  • byval cx as single, byval cy as single, byval cz as single, _ ' center
  • byval w as single, byval h as single, byval d as single, _ ' size
  • byval px as single, byval py as single, byval pz as single, _ ' position
  • byval pitch as single, byval yaw as single, byval roll as single)
  • declare sub DynamicObjectV3InitialiseAsAnOrientedBox(byval pObj as const DynamicObject ptr, _
  • byref v3Center as const TA_Vec3, _ ' (most 0,0,0)
  • byref v3Size as const TA_Vec3, _
  • byref v3Position as const TA_Vec3, _
  • byval pitch as single, byval yaw as single, byval roll as single)
  • declare sub DynamicObjectAABBInitialiseAsAnOrientedBox(byval pObj as const DynamicObject ptr, _
  • byref aabb as const TA_AABB, _ ' center and extend
  • byref frame as const TA_MFrame) ' rotation and position
  • declare sub DynamicObjectInitialiseAsASphere(byval pObj as const DynamicObject ptr, _
  • byval centerX as single, byval centerY as single, byval centerZ as single, _
  • byval radius as single)
  • declare sub DynamicObjectV3InitialiseAsASphere(byval pObj as const DynamicObject ptr, byref v3Center as const TA_Vec3, byval radius as single)
  • declare sub DynamicObjectInitialiseAsACylinder(byval pObj as const DynamicObject ptr, _
  • 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 radius as single)
  • declare sub DynamicObjectV3InitialiseAsACylinder(byval pObj as const DynamicObject ptr, _
  • byref v3PointA as const TA_Vec3, byref v3PointB as const TA_Vec3, byval radius as single)
  • declare sub DynamicObjectInitialiseAsACapsule (byval pObj as const DynamicObject ptr, _
  • 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 radius as single)
  • declare sub DynamicObjectV3InitialiseAsACapsule(byval pObj as const DynamicObject ptr, _
  • byref v3PointA as const TA_Vec3, byref v3PointB as const TA_Vec3, byval radius as single)
  • declare sub DynamicObjectSetUserData(byval pObj as const DynamicObject ptr, byval pUserData as const any ptr)
  • declare function DynamicObjectGetUserData(byval pObj as const DynamicObject ptr) as any ptr
  • ' helper only for DEBUG rendering by default all objects are visible
  • declare sub DynamicObjectSetVisible(byval pObj as const DynamicObject ptr, byval bVisible as integer)
  • declare function DynamicObjectIsVisible(byval pObj as const DynamicObject ptr) as integer
  • declare sub DynamicObjectSetMass(byval pObj as const DynamicObject ptr, byval mass as single)
  • declare function DynamicObjectGetMass(byval pObj as const DynamicObject ptr) as single
  • declare function DynamicObjectGetInverseMass(byval pObj as const DynamicObject ptr) as single
  • declare sub DynamicObjectSetCenterOffset(byval pObj as const DynamicObject ptr, byval x as single, byval y as single, byval z as single)
  • declare sub DynamicObjectGetCenterOffset(byval pObj as const DynamicObject ptr, byref x as single, byref y as single, byref z as single)
  • declare sub DynamicObjectV3SetCenterOffset(byval pObj as const DynamicObject ptr, byref v3CenterOffset as const TA_Vec3)
  • declare sub DynamicObjectV3GetCenterOffset(byval pObj as const DynamicObject ptr, byref v3CenterOffset as TA_Vec3)
  • declare sub DynamicObjectSetPosition(byval pObj as const DynamicObject ptr, byval x as single, byval y as single, byval z as single)
  • declare sub DynamicObjectGetPosition(byval pObj as const DynamicObject ptr, byref x as single, byref y as single, byref z as single)
  • declare sub DynamicObjectV3SetPosition(byval pObj as const DynamicObject ptr, byref v3Postion as const TA_Vec3)
  • declare sub DynamicObjectV3GetPosition(byval pObj as const DynamicObject ptr, byref v3Postion as TA_Vec3)
  • declare sub DynamicObjectSetRotation(byval pObj as const DynamicObject ptr, byval pitchRad as single, byval yawRad as single, byval rollRad as single)
  • declare sub DynamicObjectGetRotation(byval pObj as const DynamicObject ptr, byref pitchRad as single, byref yawRad as single, byref rollRad as single)
  • declare sub DynamicObjectSetRotationD(byval pObj as const DynamicObject ptr, byval pitchDeg as single, byval yawDeg as single, byval rollDeg as single)
  • declare sub DynamicObjectGetRotationD(byval pObj as const DynamicObject ptr, byref pitchDeg as single, byref yawDeg as single, byref rollDeg as single)
  • declare sub DynamicObjectSetFriction(byval pObj as const DynamicObject ptr, byval fFriction as single)
  • declare function DynamicObjectGetFriction(byval pObj as const DynamicObject ptr) as single
  • ' -1 to +1
  • declare sub DynamicObjectSetRestitution(byval pObj as const DynamicObject ptr, byval fRestitution as single)
  • declare function DynamicObjectGetRestitution(byval pObj as const DynamicObject ptr) as single
  • declare sub DynamicObjectSetGravityMult(byval pObj as const DynamicObject ptr, byval fGravityMult as single)
  • declare function DynamicObjectGetGravityMult(byval pObj as const DynamicObject ptr) as single
  • declare sub DynamicObjectSetInfiniteMass(byval pObj as const DynamicObject ptr, byval bInfiniteMass as integer)
  • declare function DynamicObjectIsInfiniteMass (byval pObj as const DynamicObject ptr) as integer
  • declare sub DynamicObjectSetRotationDisabled(byval pObj as const DynamicObject ptr, byval bRotationDisabled as integer)
  • declare function DynamicObjectIsRotationDisabled (byval pObj as const DynamicObject ptr) as integer
  • declare sub DynamicObjectSetMovementDisabled(byval pObj as const DynamicObject ptr, byval bMovementDisabled as integer)
  • declare function DynamicObjectIsMovementDisabled (byval pObj as const DynamicObject ptr) as integer
  • declare sub DynamicObjectSetForceFastSolverEnabled(byval pObj as const DynamicObject ptr, byval bFastSolverEnabled as integer)
  • declare function DynamicObjectIsForceFastSolverEnabled (byval pObj as const DynamicObject ptr) as integer
  • declare sub DynamicObjectSetAllDampingDisabled(byval pObj as const DynamicObject ptr, byval bAllDampingDisabled as integer)
  • declare function DynamicObjectIsAllDampingDisabled (byval pObj as const DynamicObject ptr) as integer
  • declare sub DynamicObjectSetExtraStability(byval pObj as const DynamicObject ptr,byval bExtraStability as integer)
  • declare function DynamicObjectIsExtraStability (byval pObj as const DynamicObject ptr) as integer
  • declare sub DynamicObjectSetRigidFrictionDisabled(byval pObj as const DynamicObject ptr, byval bRigidFrictionDisabled as integer)
  • declare function DynamicObjectIsRigidFrictionDisabled (byval pObj as const DynamicObject ptr) as integer
  • declare sub DynamicObjectSetCollisionDisabled(byval pObj as const DynamicObject ptr, byval bCollisionDisabled as integer)
  • declare function DynamicObjectIsCollisionDisabled (byval pObj as const DynamicObject ptr) as integer
  • declare sub DynamicObjectSetUpdateDisabled(byval pObj as const DynamicObject ptr, byval bUpdateDisabled as integer)
  • declare function DynamicObjectIsUpdateDisabled (byval pObj as const DynamicObject ptr) as integer
  • declare sub DynamicObjectSetGhost(byval pObj as const DynamicObject ptr, byval bGhost as integer)
  • declare function DynamicObjectIsGhost (byval pObj as const DynamicObject ptr) as integer
  • declare function DynamicObjectIsWorldObject(byval pObj as const DynamicObject ptr) as integer
  • declare sub DynamicObjectSetRestTimeMultiplier(byval pObj as const DynamicObject ptr, byval fRestTimeMultiplier as single)
  • declare function DynamicObjectGetRestTimeMultiplier(byval pObj as const DynamicObject ptr) as single
  • declare function DynamicObjectIsInMovingList(byval pObj as const DynamicObject ptr) as integer
  • declare sub DynamicObjectSetToMoving (byval pObj as const DynamicObject ptr, byval priority as ePHYSICS_MOVING_PRIORITIES)
  • declare sub DynamicObjectSetToResting(byval pObj as const DynamicObject ptr)
  • declare sub DynamicObjectSetLinearVelocity(byval pObj as const DynamicObject ptr, byval x as single, byval y as single, byval z as single)
  • declare sub DynamicObjectGetLinearVelocity(byval pObj as const DynamicObject ptr, byref x as single, byref y as single, byref z as single)
  • declare sub DynamicObjectV3SetLinearVelocity(byval pObj as const DynamicObject ptr, byref v3LinearVelocity as const TA_Vec3)
  • declare sub DynamicObjectV3GetLinearVelocity(byval pObj as const DynamicObject ptr, byref v3LinearVelocity as TA_Vec3)
  • declare sub DynamicObjectSetAngularVelocity(byval pObj as const DynamicObject ptr, byval x as single, byval y as single, byval z as single)
  • declare sub DynamicObjectGetAngularVelocity(byval pObj as const DynamicObject ptr, byref x as single, byref y as single, byref z as single)
  • declare sub DynamicObjectV3SetAngularVelocity(byval pObj as const DynamicObject ptr, byref v3AngularVelocity as const TA_Vec3)
  • declare sub DynamicObjectV3GetAngularVelocity(byval pObj as const DynamicObject ptr, byref v3AngularVelocity as TA_Vec3)
  • declare sub DynamicObjectGetVelocityAtWorldPosition(byval pObj as const DynamicObject ptr, _
  • byval worldX as single, byval worldY as single, byval worldZ as single, _
  • byref velX as single, byref velY as single, byref velZ as single)
  • declare sub DynamicObjectV3GetVelocityAtWorldPosition(byval pObj as const DynamicObject ptr, byref v3WorldPos as const TA_Vec3, byref v3Velocity as TA_Vec3)
  • declare sub DynamicObjectApplyImpulse(byval pObj as const DynamicObject ptr, _
  • byval impX as single, byval impY as single, byval impZ as single, _
  • byval worldX as single, byval worldY as single, byval worldZ as single)
  • declare sub DynamicObjectV3ApplyImpulse(byval pObj as const DynamicObject ptr, byref v3Impulse as const TA_Vec3, byref v3WorldPos as const TA_Vec3)
  • declare sub DynamicObjectApplyLinearImpulse(byval pObj as const DynamicObject ptr, _
  • byval impX as single, byval impY as single, byval impZ as single)
  • declare sub DynamicObjectV3ApplyLinearImpulse(byval pObj as const DynamicObject ptr, byref v3LinearImpulse as const TA_Vec3)
  • declare sub DynamicObjectApplyAngularImpulse(byval pObj as const DynamicObject ptr, _
  • byval impX as single, byval impY as single, byval impZ as single)
  • declare sub DynamicObjectV3ApplyAngularImpulse(byval pObj as const DynamicObject ptr, byref v3AngularImpulse as const TA_Vec3)
  • DynamicObject with CollisionObjectLineList
  • declare function DynamicObjectGetNumLineCollisions(byval pObj as const DynamicObject ptr) as integer
  • declare function DynamicObjectGetLineCollision(byval pObj as const DynamicObject ptr, byval nLineIndex as integer) as LineIntersection ptr
  • declare function DynamicObjectLineCollisionsGetIntersectionDepth(byval pObj as const DynamicObject ptr, byval nLineIndex as integer) as single
  • declare function DynamicObjectLineCollisionsGetAttribute(byval pObj as const DynamicObject ptr, byval nLineIndex as integer) as integer
  • declare sub DynamicObjectLineCollisionsGetPosition(byval pObj as const DynamicObject ptr, byval nLineIndex as integer, byref x as single, byref y as single, byref z as single)
  • declare sub DynamicObjectLineCollisionsV3GetPosition(byval pObj as const DynamicObject ptr, byval nLineIndex as integer, byref v3Position as TA_Vec3)
  • ' v3WorldPosition = LineCollisionsGetPosition() * DynamicObjectGetFrame()
  • declare sub DynamicObjectLineCollisionsGetWorldPosition(byval pObj as const DynamicObject ptr, byval nLineIndex as integer, byref x as single, byref y as single, byref z as single)
  • declare sub DynamicObjectLineCollisionsV3GetWorldPosition(byval pObj as const DynamicObject ptr, byval nLineIndex as integer, byref v3Position as TA_Vec3)
  • declare sub DynamicObjectLineCollisionsGetNormal(byval pObj as const DynamicObject ptr, byval nLineIndex as integer, byref x as single, byref y as single, byref z as single)
  • declare sub DynamicObjectLineCollisionsV3GetNormal(byval pObj as const DynamicObject ptr, byval nLineIndex as integer, byref v3Normal as TA_Vec3)
  • declare function DynamicObjectLineCollisionsGetDynamicObject(byval pObj as const DynamicObject ptr, byval nLineIndex as integer) as DynamicObject ptr
  • declare function DynamicObjectLineCollisionsGetCollisionObjectType(byval pObj as const DynamicObject ptr, byval nLineIndex as integer) as eCOLLISIONOBJECT_TYPES
  • declare sub DynamicObjectAdjustLineCollisionFromNextFrame(byval pObj as const DynamicObject ptr, byval nLineIndex as integer)
  • DynamicObject Joint
  • declare function DynamicObjectAddWorldJoint(byval pObj as const DynamicObject ptr) as PhysicsJoint ptr
  • declare function DynamicObjectAddJoint(byval pObj1 as const DynamicObject ptr, byval pObj2 as const DynamicObject ptr) as PhysicsJoint ptr
  • declare sub DynamicObjectRemoveJoint(byval pObj as const DynamicObject ptr, byval pJoint as const PhysicsJoint ptr)
  • declare sub DynamicObjectRemoveAllJoints(byval pObj as const DynamicObject ptr)
  • DynamicObject Usergroup
  • declare function DynamicObjectCreateUserGroup(byval pObj as const DynamicObject ptr) as integer
  • declare sub DynamicObjectSetUserGroup(byval pObj as const DynamicObject ptr, byval nUserGroup as integer)
  • declare function DynamicObjectGetUserGroup(byval pObj as const DynamicObject ptr) as integer
  • declare sub DynamicObjectSetUserGroupItemId(byval pObj as const DynamicObject ptr, byval nItemId as integer)
  • declare function DynamicObjectGetUserGroupItemId(byval pObj as const DynamicObject ptr) as integer
  • declare sub DynamicObjectDisallowCollisionWithUserGroupItemId(byval pObj as const DynamicObject ptr, byval nItemId as integer)
  • declare sub DynamicObjectAllowCollisionWithUserGroupItemId(byval pObj as const DynamicObject ptr, byval nItemId as integer)
  • declare function DynamicObjectIsAllowedToCollideWith(byval pObjA as const DynamicObject ptr, byval pObjB as const DynamicObject ptr) as integer
  • DynamicObject physic simualtion
  • ' optional for advanced users
  • ' use it inside of the DynamicObjectTemplate UpdateCallback
  • ' step 1. Make sure that force and torque have been cleared.
  • declare sub DynamicObjectAssertForceAndTorqueCleared(byval pObj as const DynamicObject ptr)
  • ' step 2. Do gravity
  • declare sub DynamicObjectAccumulateGravity(byval pObj as const DynamicObject ptr)
  • ' step 3. Apply a force to the dynamic object
  • declare sub DynamicObjectAccumulateForceAndTorque(byval pObj as const DynamicObject ptr, _
  • byval worldForceX as single, byval worldForceY as single, byval worldForceZ as single, _
  • byval worldPosX as single, byval worldPosY as single, byval worldPosZ as single)
  • declare sub DynamicObjectV3AccumulateForceAndTorque(byval pObj as const DynamicObject ptr, _
  • byref v3WorldForce as const TA_Vec3, _
  • byref v3WorldPosition as const TA_Vec3)
  • ' step 4. Apply the forces to linear and angular velocity
  • declare sub DynamicObjectApplyForceAndTorqueToVelocities(byval pObj as const DynamicObject ptr, byval fDt as single)
  • ' step 5. Clear force and torque (kg.m/s2).
  • declare sub DynamicObjectClearForceAndTorque(byval pObj as const DynamicObject ptr)
  • ' step 6. Update date the next frame of the dynamic object, ready for collision testing.
  • declare sub DynamicObjectApplyVelocityToNextFrame(byval pObj as const DynamicObject ptr, byval fDt as single)
  • declare sub DynamicObjectApplyVelocityFromNextFrame(byval pObj as const DynamicObject ptr, byval fDt as single)
  • ' step 7. optional if the DynamicObject used a CollisionObjectLineList
  • declare sub DynamicObjectClearLineIntersections(byval pObj as const DynamicObject ptr)
  • ' ApplyNextFrame will be called to by Update automatically after the collision response has been done.
  • declare sub DynamicObjectApplyNextFrame(byval pObj as const DynamicObject ptr)
  • declare sub DynamicObjectAccumulateLinearForce(byval pObj as const DynamicObject ptr, _
  • byval worldForceX as single, byval worldForceY as single, byval worldForceZ as single)
  • declare sub DynamicObjectV3AccumulateLinearForce(byval pObj as const DynamicObject ptr, byref v3WorldForce as const TA_Vec3)
  • declare sub DynamicObjectSetFindVelocityFromNextFrame(byval pObj as const DynamicObject ptr, byval bEnable as integer)
  • declare function DynamicObjectGetFindVelocityFromNextFrame(byval pObj as const DynamicObject ptr) as integer
  • declare sub DynamicObjectUpdateWorldSpaceInertialTensor(byval pObj as const DynamicObject ptr)
  • declare sub DynamicObjectGetWorldAABB(byval pObj as const DynamicObject ptr, byref aabb as TA_AABB)
  • declare sub DynamicObjectSetFrame(byval pObj as const DynamicObject ptr, byref frame as const TA_MFrame)
  • declare sub DynamicObjectSetFrameDirect(byval pObj as const DynamicObject ptr, byref frame as const TA_MFrame)
  • declare sub DynamicObjectGetFrame(byval pObj as const DynamicObject ptr, byref frame as TA_MFrame)
  • declare sub DynamicObjectGetNextFrame(byval pObj as const DynamicObject ptr, byref frame as TA_MFrame)
  • declare sub DynamicObjectGetPreviousFrame(byval pObj as const DynamicObject ptr, byref frame as TA_MFrame)
  • declare sub DynamicObjectGetGraphicsFrame(byval pObj as const DynamicObject ptr, byref frame as TA_MFrame)
  • declare sub DynamicObjectGetCenterOfMass (byval pObj as const DynamicObject ptr, byref v3CenterOfMass as TA_Vec3)
  • declare sub DynamicObjectGetNextCenterOfMass(byval pObj as const DynamicObject ptr, byref v3CenterOfMass as TA_Vec3)
  • declare sub DynamicObjectGetFrameRotation (byval pObj as const DynamicObject ptr, byref m33 as TA_Mat33)
  • declare sub DynamicObjectGetFrameRotationV3X(byval pObj as const DynamicObject ptr, byref v3X as TA_Vec3)
  • declare sub DynamicObjectGetFrameRotationV3Y(byval pObj as const DynamicObject ptr, byref v3Y as TA_Vec3)
  • declare sub DynamicObjectGetFrameRotationV3Z(byval pObj as const DynamicObject ptr, byref v3Z as TA_Vec3)
  • declare sub DynamicObjectGetNextFrameRotation (byval pObj as const DynamicObject ptr, byref m33 as TA_Mat33)
  • declare sub DynamicObjectGetNextFrameRotationV3X(byval pObj as const DynamicObject ptr, byref v3X as TA_Vec3)
  • declare sub DynamicObjectGetNextFrameRotationV3Y(byval pObj as const DynamicObject ptr, byref v3Y as TA_Vec3)
  • declare sub DynamicObjectGetNextFrameRotationV3Z(byval pObj as const DynamicObject ptr, byref v3Z as TA_Vec3)
  • declare sub DynamicObjectGetFrameRotationTransposeAsInverse(byval pObj as const DynamicObject ptr, byref m33 as TA_Mat33)
  • DynamicObject Tools
  • declare sub DynamicObjectGetOpenGLMatrix(byval pObj as const DynamicObject ptr, byval pMatrix4x4 as const single ptr)
  • declare sub DynamicObjectGetOpenGLFrame (byval pObj as const DynamicObject ptr, byref frame as TA_MFrame)
  • #ifdef USEOPENGL
  • declare sub DynamicObjectMultOpenGLMatrix(byval pObj as const DynamicObject ptr)
  • #else
  • #define DynamicObjectMultOpenGLMatrix(pObj) :
  • #endif
  • ' out=in*DynamicObjectGetFrame().Rotation()
  • declare sub DynamicObjectRotate(byval pObj as const DynamicObject ptr, _
  • byval inX as single, byval inY as single, byval inZ as single, _
  • byref outX as single, byref outY as single, byref outZ as single)
  • declare sub DynamicObjectV3Rotate(byval pObj as const DynamicObject ptr, _
  • byref v3In as const TA_Vec3, _
  • byref v3Out as TA_Vec3)
  • ' out=in*DynamicObjectGetFrame().
  • declare sub DynamicObjectTransform(byval pObj as const DynamicObject ptr, _
  • byval inX as single, byval inY as single, byval inZ as single, _
  • byref outX as single, byref outY as single, byref outZ as single)
  • declare sub DynamicObjectV3Transform(byval pObj as const DynamicObject ptr, _
  • byref v3Vector as const TA_Vec3, _
  • byref v3Result as TA_Vec3)

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Easily create Help documents


DynamicObjectCar

DynamicObjectCar

DynamicObjectCar Reference

#include "TrueAxis.bi"

Inheritance diagram for DynamicObjectCar:

Description

A car implementation of DynamicObject .

Call the static function DynamicObjectCreateNew to create a new instance of this class.

This class provides a simple implementation of vehicle simulation. Depending on how the parameters are set up, a DynamicObjectCar can either provide a realistic feeling simulation or an easy to drive 'arcady' feel. An interface is also provided for advanced users to replace tire force and engine torque calculations for more control over the simulation.

The default parameters are set so that the a car should handle reasonably well before the user starts changing parameters. Things such as wheel positions and car weight and shape can have a large impact. It is recommend the user uses the driving demo code from the True Axis Physics Demos as a starting point for tuning car handling.

A DynamicObjectCar must be initialised using a CarTemplate object.

  • Data Structure:
  • type DynamicObjectCar extends DynamicObject
  • ...
  • end type
  • Functions:
  • declare function DynamicObjectCarCreateNew() as DynamicObjectCar ptr
  • declare sub DynamicObjectCarRelease(byref pObj as DynamicObjectCar ptr)
  • declare sub DynamicObjectCarInitialise(byval pObj as const DynamicObjectCar ptr, byval pTemplate as const CarTemplate ptr)
  • declare sub DynamicObjectCarClearControls(byval pObj as const DynamicObjectCar ptr)
  • declare sub DynamicObjectCarUpdateControls(byval pObj as const DynamicObjectCar ptr, _
  • byval fSteeringAngle as single, _
  • byval fAccelerator as single, _
  • byval fBrake as single, _
  • byval fHandBrake as single, _
  • byval bSteeringHelp as integer, _
  • byval fTractionControl as single, _
  • byval nGear as integer)
  • declare function DynamicObjectCarGetRPM (byval pObj as const DynamicObjectCar ptr) as single
  • declare function DynamicObjectCarGetGear (byval pObj as const DynamicObjectCar ptr) as integer
  • declare function DynamicObjectCarGetNumGears(byval pObj as const DynamicObjectCar ptr) as integer
  • declare function DynamicObjectCarGetSpeed(byval pObj as const DynamicObjectCar ptr) as single
  • declare function DynamicObjectCarGetSpeedFromWheels(byval pObj as const DynamicObjectCar ptr) as single
  • declare function DynamicObjectCarGetSpeedFromVelocity(byval pObj as const DynamicObjectCar ptr) as single
  • declare sub DynamicObjectCarSetTorqueMultiplier(byval pObj as const DynamicObjectCar ptr, byval fTorqueMultiplier as single)
  • declare function DynamicObjectCarGetTorqueMultiplier(byval pObj as const DynamicObjectCar ptr) as single
  • declare sub DynamicObjectCarSetAntiRollFudge(byval pObj as const DynamicObjectCar ptr, byval fAntiRollFudge as single)
  • declare function DynamicObjectCarGetAntiRollFudge(byval pObj as const DynamicObjectCar ptr) as single
  • declare sub DynamicObjectCarSetOrientation(byval pObj as const DynamicObjectCar ptr, _
  • byval forwardX as single, byval forwardY as single, byval forwardZ as single, _
  • byval upX as single, byval upY as single, byval upZ as single)
  • declare sub DynamicObjectCarV3SetOrientation(byval pObj as const DynamicObjectCar ptr, _
  • byref v3Forward as const TA_Vec3, byref v3Up as const TA_Vec3)
  • declare sub DynamicObjectCarGetForward(byval pObj as const DynamicObjectCar ptr, _
  • byref forwardX as single, byref forwardY as single, byref forwardZ as single)
  • declare sub DynamicObjectCarV3GetForward(byval pObj as const DynamicObjectCar ptr, byref v3Forward as TA_Vec3)
  • declare sub DynamicObjectCarGetUp (byval pObj as const DynamicObjectCar ptr, _
  • byref upX as single, byref upY as single, byref upZ as single)
  • declare sub DynamicObjectV3CarGetUp (byval pObj as const DynamicObjectCar ptr, byref v3Up as TA_Vec3)
  • declare sub DynamicObjectCarGetFrame(byval pObj as const DynamicObjectCar ptr, byref frame as TA_MFrame)
  • declare function DynamicObjectCarGetNumWheels(byval pObj as const DynamicObjectCar ptr) as integer

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Free help authoring environment


CarTemplate

TA_: CarTemplate

CarTemplate Type Reference

#include "TrueAxis.bi"

Detailed Description:

Defines the properties needed initialize a DynamicObjectCar object.

A CarTemplate is used to describe the properties of a DynamicObjectCar . A CarTemplate must be passed to the function DynamicObjectCarInitialise when initializing a DynamicObjectCar .Multiple DynamicObjectCar objects may be initialized from the same template.

When creating a new car template, CarTemplateBeginInitialise must be called before setting any properties and CarTemplateEndInitialise must be called when done.

.

  • Examples:
  • DynamicObjectCar01.bas

Data Structure:

type CarTemplate

...

end type

Functions:

declare function CarTemplateCreateNew() as CarTemplate ptr

declare sub CarTemplateRelease(byref pObj as CarTemplate ptr)

declare sub CarTemplateBeginInitialise(byval pObj as const CarTemplate ptr)

declare sub CarTemplateEndInitialise (byval pObj as const CarTemplate ptr)

declare sub CarTemplateAddCollisionObjectConvex (byval pObj as const CarTemplate ptr, byval pColObj as const CollisionObjectConvex ptr)

declare sub CarTemplateAddCollisionObjectCylinder(byval pObj as const CarTemplate ptr, byval pColObj as const CollisionObjectCylinder ptr)

declare sub CarTemplateAddCollisionObjectCapsule (byval pObj as const CarTemplate ptr, byval pColObj as const CollisionObjectCapsule ptr)

declare sub CarTemplateAddCollisionObjectSphere (byval pObj as const CarTemplate ptr, byval pColObj as const CollisionObjectSphere ptr)

declare sub CarTemplateSetOrientation(byval pObj as const CarTemplate ptr, _

byval forwardX as single, byval forwardY as single, byval forwardZ as single, _

byval upX as single, byval upY as single, byval upZ as single)

declare sub CarTemplateGetForward (byval pObj as const CarTemplate ptr, _

byref forwardX as single, byref forwardY as single, byref forwardZ as single)

declare sub CarTemplateV3GetForward (byval pObj as const CarTemplate ptr, byref v3Forward as TA_Vec3)

declare sub CarTemplateGetUp (byval pObj as const CarTemplate ptr, _

byref upX as single, byref upY as single, byref upZ as single)

declare sub CarTemplateV3GetUp (byval pObj as const CarTemplate ptr, byref v3Up as TA_Vec3)

declare sub CarTemplateSetNumGears(byval pObj as const CarTemplate ptr, byval nGear as integer)

declare function CarTemplateGetNumGears(byval pObj as const CarTemplate ptr) as integer

declare sub CarTemplateSetGearRatio(byval pObj as const CarTemplate ptr, byval nGear as integer, byval ratio as single)

declare function CarTemplateGetGearRatio(byval pObj as const CarTemplate ptr, byval nGear as integer) as single

declare sub CarTemplateSetDifferentialRatio(byval pObj as const CarTemplate ptr,byval ratio as single)

declare function CarTemplateGetDifferentialRatio(byval pObj as const CarTemplate ptr) as single

declare sub CarTemplateSetMass(byval pObj as const CarTemplate ptr, byval mass as single)

declare function CarTemplateGetMass(byval pObj as const CarTemplate ptr) as single

declare sub CarTemplateSetTransmissionEfficiency(byval pObj as const CarTemplate ptr, byval efficiency as single)

declare function CarTemplateGetTransmissionEfficiency(byval pObj as const CarTemplate ptr) as single

declare sub CarTemplateSetTorqueMultiplier(byval pObj as const CarTemplate ptr, byval multiplier as single)

declare function CarTemplateGetTorqueMultiplier(byval pObj as const CarTemplate ptr) as single

declare sub CarTemplateSetAirResistance(byval pObj as const CarTemplate ptr, byval resistance as single)

declare function CarTemplateGetAirResistance(byval pObj as const CarTemplate ptr) as single

declare sub CarTemplateSetDownForce(byval pObj as const CarTemplate ptr, byval force as single)

declare function CarTemplateGetDownForce(byval pObj as const CarTemplate ptr) as single

declare sub CarTemplateSetAntiRollFudge(byval pObj as const CarTemplate ptr, byval fudge as single)

declare function CarTemplateGetAntiRollFudge(byval pObj as const CarTemplate ptr) as single

declare sub CarTemplateAddWheel(byval pObj as const CarTemplate ptr)

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Easily create Help documents


CarTemplateWheel

: CarTemplate Wheel

CarTemplateWheel Reference

#include "TrueAxis.bi"

Description

Describes a wheel in a car template.

  • Functions:

declare sub CarTemplateWheelClear()

declare sub CarTemplateWheelSetSuspensionTop(byval x as single, byval y as single, byval z as single)

declare sub CarTemplateWheelGetSuspensionTop(byref x as single , byref y as single, byref z as single)

declare sub CarTemplateWheelV3SetSuspensionTop(byref v3Top as const TA_Vec3)

declare sub CarTemplateWheelV3GetSuspensionTop(byref v3Top as TA_Vec3)

declare sub CarTemplateWheelSetSuspensionBottom(byval x as single, byval y as single, byval z as single)

declare sub CarTemplateWheelGetSuspensionBottom(byref x as single, byref y as single, byref z as single)

declare sub CarTemplateWheelV3SetSuspensionBottom(byref v3Bottom as const TA_Vec3)

declare sub CarTemplateWheelV3GetSuspensionBottom(byref v3Bottom as TA_Vec3)

declare sub CarTemplateWheelSetRadius(byval radius as single)

declare function CarTemplateWheelGetRadius() as single

declare sub CarTemplateWheelSetInertia(byval inertia as single)

declare function CarTemplateWheelGetInertia() as single

declare sub CarTemplateWheelSetBrakeTorque(byval torque as single)

declare function CarTemplateWheelGetBrakeTorque() as single

declare sub CarTemplateWheelSetRollResistance(byval resistance as single)

declare function CarTemplateWheelGetRollResistance() as single

declare sub CarTemplateWheelSetSuspensionSpringConstant(byval springconst as single)

declare function CarTemplateWheelGetSuspensionSpringConstant() as single

declare sub CarTemplateWheelSetSuspensionDampingConstant(byval dampingconst as single)

declare function CarTemplateWheelGetSuspensionDampingConstant() as single

declare sub CarTemplateWheelSetSteeringFlag(byval bEnabled as integer)

declare function CarTemplateWheelGetSteeringFlag() as integer

declare sub CarTemplateWheelSetDrivingFlag(byval bEnabled as integer)

declare function CarTemplateWheelGetDrivingFlag() as integer

declare sub CarTemplateWheelSetHandBrakeFlag(byval bEnabled as integer)

declare function CarTemplateWheelGetHandBrakeFlag() as integer

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Easy to use tool to create HTML Help files and Help web sites


DynamicObjectCarWheel

TA::DynamicObjectCar::Wheel

DynamicObjectCar Wheel

DynamicObjectCarWheel Reference

#include "TrueAxis.bi"

Description

Contains the state and properties of a car's wheels.

Functions:

declare sub DynamicObjectCarWheelGetLocalFrame(byval pObj as const DynamicObjectCar ptr,byval nWheel as integer, byref frame as TA_MFrame)

declare sub DynamicObjectCarWheelGetFrame(byval pObj as const DynamicObjectCar ptr,byval nWheel as integer, byref frame as TA_MFrame)

declare sub DynamicObjectCarWheelGetLocalOpenGLMatrix (byval pObj as const DynamicObjectCar ptr, byval nWheel as integer, byval pMatrix4x4 as const single ptr)

#ifdef USEOPENGL

declare sub DynamicObjectCarWheelMultOpenGLMatrix (byval pObj as const DynamicObjectCar ptr, byval nWheel as integer)

declare sub DynamicObjectCarWheelMultLocalOpenGLMatrix(byval pObj as const DynamicObjectCar ptr, byval nWheel as integer)

#else

#define DynamicObjectCarWheelMultOpenGLMatrix (pObj,n) :

#define DynamicObjectCarWheelMultLocalOpenGLMatrix(pObj,n) :

#endif

declare sub DynamicObjectCarWheelGetLocalRotation (byval pObj as const DynamicObjectCar ptr, byval nWheel as integer, _

byref pitchRad as single, byref yawRad as single, byref rollRad as single)

declare sub DynamicObjectCarWheelGetLocalRotationD(byval pObj as const DynamicObjectCar ptr, byval nWheel as integer, _

byref pitchDeg as single, byref yawDeg as single, byref rollDeg as single)

declare sub DynamicObjectCarWheelGetLocalPosition (byval pObj as const DynamicObjectCar ptr, byval nWheel as integer, _

byref x as single, byref y as single, byref z as single)

declare sub DynamicObjectCarWheelV3GetLocalPosition(byval pObj as const DynamicObjectCar ptr, byref v3Position as TA_Vec3)

declare sub DynamicObjectCarWheelSetRadius(byval pObj as const DynamicObjectCar ptr, byval nWheel as integer, byval radius as single)

declare function DynamicObjectCarWheelGetRadius(byval pObj as const DynamicObjectCar ptr, byval nWheel as integer) as single

declare sub DynamicObjectCarWheelSetInvInertia(byval pObj as const DynamicObjectCar ptr, byval nWheel as integer, byval inertia as single)

declare function DynamicObjectCarWheelGetInvInertia(byval pObj as const DynamicObjectCar ptr, byval nWheel as integer) as single

declare sub DynamicObjectCarWheelSetBrakeTorque(byval pObj as const DynamicObjectCar ptr, byval nWheel as integer, byval torque as single)

declare function DynamicObjectCarWheelGetBrakeTorque(byval pObj as const DynamicObjectCar ptr, byval nWheel as integer) as single

declare sub DynamicObjectCarWheelSetRollResistance(byval pObj as const DynamicObjectCar ptr, byval nWheel as integer, byval resistance as single)

declare function DynamicObjectCarWheelGetRollResistance(byval pObj as const DynamicObjectCar ptr, byval nWheel as integer) as single

declare sub DynamicObjectCarWheelSetSuspensionSpringConstant(byval pObj as const DynamicObjectCar ptr, byval nWheel as integer, byval springconst as single)

declare function DynamicObjectCarWheelGetSuspensionSpringConstant(byval pObj as const DynamicObjectCar ptr, byval nWheel as integer) as single

declare sub DynamicObjectCarWheelSetSuspensionDampingConstant(byval pObj as const DynamicObjectCar ptr, byval nWheel as integer, byval dampingconst as single)

declare function DynamicObjectCarWheelGetSuspensionDampingConstant(byval pObj as const DynamicObjectCar ptr, byval nWheel as integer) as single

declare sub DynamicObjectCarWheelSetSteeringFlag(byval pObj as const DynamicObjectCar ptr, byval nWheel as integer, byval bSteeringFlag as integer)

declare function DynamicObjectCarWheelGetSteeringFlag(byval pObj as const DynamicObjectCar ptr, byval nWheel as integer) as integer

declare sub DynamicObjectCarWheelSetDrivingFlag(byval pObj as const DynamicObjectCar ptr, byval nWheel as integer, byval bDrivingFlag as integer)

declare function DynamicObjectCarWheelGetDrivingFlag(byval pObj as const DynamicObjectCar ptr, byval nWheel as integer) as integer

declare sub DynamicObjectCarWheelSetHandBrakeFlag(byval pObj as const DynamicObjectCar ptr, byval nWheel as integer, byval bHandBrakeFlag as integer)

declare function DynamicObjectCarWheelGetHandBrakeFlag(byval pObj as const DynamicObjectCar ptr, byval nWheel as integer) as integer

declare function DynamicObjectCarWheelGetCollisionFlag(byval pObj as const DynamicObjectCar ptr, byval nWheel as integer) as integer

declare function DynamicObjectCarWheelGetCollisionAttribute(byval pObj as const DynamicObjectCar ptr, byval nWheel as integer) as integer

declare sub DynamicObjectCarWheelSetYaw(byval pObj as const DynamicObjectCar ptr, byval nWheel as integer, byval fYaw as single)

declare function DynamicObjectCarWheelGetYaw(byval pObj as const DynamicObjectCar ptr, byval nWheel as integer) as single

declare sub DynamicObjectCarWheelSetPitch(byval pObj as const DynamicObjectCar ptr, byval nWheel as integer, byval fPitch as single)

declare function DynamicObjectCarWheelGetPitch(byval pObj as const DynamicObjectCar ptr, byval nWheel as integer) as single

declare sub DynamicObjectCarWheelSetPitchVelocity(byval pObj as const DynamicObjectCar ptr, byval nWheel as integer, byval fPitchVelocity as single)

declare function DynamicObjectCarWheelGetPitchVelocity(byval pObj as const DynamicObjectCar ptr, byval nWheel as integer) as single

declare sub DynamicObjectCarWheelSetCamberAngle(byval pObj as const DynamicObjectCar ptr, byval nWheel as integer, byval fCamberAngle as single)

declare function DynamicObjectCarWheelGetCamberAngle(byval pObj as const DynamicObjectCar ptr, byval nWheel as integer) as single

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Easy to use tool to create HTML Help files and Help web sites


DynamicObjectLineIntersection

TA::DynamicObject::LineIntersection

DynamicObject LineIntersection

DynamicObjectLineIntersection Reference

#include "TrueAxis.bi"

Description

This structure contains information about a line collision that has occurred.

This structure is returned by the function DynamicObjectGetLineCollision () .

  • If a CollisionObjectLineList collided with any object this structure descripts a line collision.

Data Structure:

  • If a CollisionObjectLineList collided with any object this structure descripts a line collision.
  • type LineIntersection
  • as single fIntersectingDepth
  • as DynamicObject ptr pDynamicObject
  • as CollisionObject ptr pCollisionObject
  • as integer nSurfaceAttribute
  • as TA_Vec3 v3Position
  • as TA_Vec3 v3Normal
  • end type
  • Functions:
  • declare function DynamicObjectGetLineCollision(byval pObj as const DynamicObject ptr, byval nLineIndex as integer) as LineIntersection ptr

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Easily create Help documents


StaticObject

StaticObject

StaticObject Class Reference

#include "TrueAxis.bi"

Inheritance diagram for StaticObject:

Description

An container for large static arbitrary polygon meshes.

Call the static function StaticObjectCreateNew to create a new instance of this class.

Static objects are designed to represent large arbitrary meshes in the physics simulation. Any object that remains static, doesn't need to react to collisions but that other objects need to collide with, should be part of a static object.

Static objects must be initialised with an object that inherits from CollisionObjectComplex . The the class CollisionObjectAABBMesh provides an implementation of CollisionObjectComplex . It is also possible to override CollisionObjectComplex , allowing the user to provide their own high level collision testing. See StaticObjectInitialise for more details.

Static objects can be added and removed from the physics simulation by calling the functions PhysicsAddStaticObject and PhysicsRemoveStaticObject.

  • Note:
  • It is desirable to have only a small number of static objects, rather that many small static objects. The True Axis PhysicsWrapper is not optimised for many static objects. For example, if simulating a city environment, it would be best if all the buildings, roads and other static scenery where represented by one static object.
  • Data Structure:
  • type StaticObject extends PhysicsObject
  • ...
  • end type
  • Functions:
  • declare function StaticObjectCreateNew() as StaticObject ptr
  • declare sub StaticObjectRelease(byref pObj as StaticObject ptr)
  • declare sub StaticObjectInitialise(byval pObj as const StaticObject ptr,byval pMesh as const CollisionObjectAABBMesh ptr)
  • declare sub StaticObjectSetPosition(byval pObj as const StaticObject ptr,byval x as single,byval y as single,byval z as single)
  • declare sub StaticObjectV3SetPosition(byval pObj as const StaticObject ptr,byref v3Position as const TA_Vec3)
  • declare sub StaticObjectGetPosition(byval pObj as const StaticObject ptr, byref x as single, byref y as single, byref z as single)
  • declare sub StaticObjectV3GetPosition(byval pObj as const StaticObject ptr,byref v3Position as TA_Vec3)
  • declare sub StaticObjectSetRotation(byval pObj as const StaticObject ptr,byval pitch as single,byval yaw as single,byval roll as single)
  • declare sub StaticObjectGetRotation(byval pObj as const StaticObject ptr,byref pitch as single,byref yaw as single,byref roll as single)
  • declare function StaticObjectGetCollisionObject(byval pObj as const StaticObject ptr) as const CollisionObjectAABBMesh ptr
  • declare function StaticObjectGetDynamicObject(byval pObj as const StaticObject ptr) as const DynamicObject ptr
  • declare sub StaticObjectSetUserData(byval pObj as const StaticObject ptr, byval pUserData as const any ptr)
  • declare function StaticObjectGetUserData(byval pObj as const StaticObject ptr) as any ptr
  • declare sub StaticObjectSetVisible(byval pObj as const StaticObject ptr,byval bVisible as integer)
  • declare function StaticObjectIsVisible(byval pObj as const StaticObject ptr) as integer
  • declare sub StaticObjectRender(byval pObj as const StaticObject ptr)

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Easily create CHM Help documents


Math

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Free CHM Help documentation generator


TA_Vec3

TA::Vec3

TA_ Vec3

TA_Vec3 Reference

#include "TrueAxis.bi"

Description

A 3 dimensional vector.

Data Structure:

  • type TA_Vec3
  • as single x,y,z,pad
  • end type
  • Functions:
  • declare sub Vec3Swap(byref a as TA_Vec3, byref b as TA_Vec3)
  • declare function Vec3IsEqualWithInError(byref a as const TA_Vec3, byref b as const TA_Vec3,byval fError as single) as integer
  • declare sub Vec3Add(byref self as TA_Vec3, byref a as const TA_Vec3)
  • declare sub Vec3AddFrom(byref self as TA_Vec3, byref a as const TA_Vec3, byref b as const TA_Vec3)
  • declare sub Vec3Sub(byref self as TA_Vec3, byref a as const TA_Vec3)
  • declare sub Vec3SubFrom(byref self as TA_Vec3, byref a as const TA_Vec3, byref b as const TA_Vec3)
  • declare sub Vec3Mul(byref self as TA_Vec3,byval s as single)
  • declare sub Vec3MulFrom(byref self as TA_Vec3, byref a as const TA_Vec3,byval s as single)
  • declare sub Vec3Div(byref self as TA_Vec3,byval s as single)
  • declare sub Vec3DivFrom(byref self as TA_Vec3,byref a as const TA_Vec3,byval s as single)
  • declare function Vec3GetMagnitude(byref self as const TA_Vec3) as single
  • declare function Vec3GetMagnitudeSqrd(byref self as const TA_Vec3) as single
  • declare function Vec3GetDistance(byref self as const TA_Vec3, byref a as const TA_Vec3) as single
  • declare function Vec3GetDistanceSqrd(byref self as const TA_Vec3, byref a as const TA_Vec3) as single
  • declare function Vec3GetDot(byref self as const TA_Vec3) as single
  • declare function Vec3GetDotWith(byref self as const TA_Vec3, byref a as const TA_Vec3) as single
  • declare sub Vec3Normalise(byref self as TA_Vec3)
  • declare function Vec3IsNormalised(byref self as const TA_Vec3) as integer
  • declare sub Vec3GetNormal(byref self as TA_Vec3, byref a as const TA_Vec3)
  • declare sub Vec3FaceNormal(byref self as TA_Vec3, byref a as const TA_Vec3, byref b as const TA_Vec3, byref c as const TA_Vec3)
  • declare sub Vec3CrossFromEdges(byref self as TA_Vec3, byref a as const TA_Vec3, byref b as const TA_Vec3, byref c as const TA_Vec3)
  • declare sub Vec3CrossWith(byref self as TA_Vec3, byref a as const TA_Vec3)
  • declare sub Vec3CrossFrom(byref self as TA_Vec3, byref a as const TA_Vec3, byref b as const TA_Vec3)
  • declare sub Vec3MulMat(byref self as TA_Vec3, byref m as const TA_Mat33)
  • declare sub Vec3MulMatFrom(byref self as TA_Vec3, byref a as const TA_Vec3, byref m as const TA_Mat33)
  • declare sub Vec3MulFrame(byref self as TA_Vec3, byref f as const TA_MFrame)
  • declare sub Vec3MulFrameFrom(byref self as TA_Vec3, byref a as const TA_Vec3, byref f as const TA_MFrame)
  • declare sub Vec3DivMat(byref self as TA_Vec3, byref m as const TA_Mat33)
  • declare sub Vec3DivMatFrom(byref self as TA_Vec3, byref a as const TA_Vec3, byref m as const TA_Mat33)
  • declare sub Vec3DivFrame(byref self as TA_Vec3, byref f as const TA_MFrame)
  • declare sub Vec3DivFrameFrom(byref self as TA_Vec3, byref a as const TA_Vec3, byref f as const TA_MFrame)
  • declare sub Vec3MulAdd2(byref self as TA_Vec3, _
  • byref v3A as const TA_Vec3,byval a as single, _
  • byref v3B as const TA_Vec3,byval b as single)
  • declare sub Vec3MulAdd3(byref self as TA_Vec3, _
  • byref v3A as const TA_Vec3,byval a as single, _
  • byref v3B as const TA_Vec3,byval b as single, _
  • byref v3C as const TA_Vec3,byval c as single)

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Create HTML Help, DOC, PDF and print manuals from 1 single source


TA_AABB

TA_AABB

TA_AABB Reference

#include "TrueAxis.bi"

Description

An axis aligned bounding box.

  • Data Structure:
  • type TA_AABB
  • as TA_Vec3 v3Center
  • as TA_Vec3 v3Extent
  • end type
  • Functions:

declare sub AABBSwap(byref a as TA_AABB, byref b as TA_AABB)

declare sub AABBInitialise(byref self as TA_AABB, byref v3Center as const TA_Vec3, byref v3Extent as const TA_Vec3)

declare sub AABBAdd(byref self as TA_AABB, byref a as const TA_AABB)

declare sub AABBAddFrom(byref self as TA_AABB, byref a as const TA_AABB, byref b as const TA_AABB)

declare sub AABBScale(byref self as TA_AABB,byval s as single)

declare sub AABBScaleFrom(byref self as TA_AABB, byref a as const TA_AABB,byval s as single)

declare sub AABBRotate(byref self as TA_AABB, byref f as const TA_MFrame)

declare sub AABBRotateFrom(byref r as TA_AABB, byref a as const TA_AABB, byref f as const TA_MFrame)

declare sub AABBExpandToFit(byref self as TA_AABB, byref a as const TA_Vec3)

declare sub AABBInitialiseToFit2Points(byref self as TA_AABB, byref a as const TA_Vec3, byref b as const TA_Vec3)

declare function AABBIntersecs(byref self as const TA_AABB, byref a as const TA_AABB) as integer

declare function AABBIntersecsPoint(byref self as const TA_AABB, byref a as const TA_Vec3) as integer

declare function AABBIsInside(byref self as const TA_AABB, byref a as const TA_AABB) as integer

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Free HTML Help documentation generator


TA_Mat33

TA::Mat33

TA_ Mat33

TA_Mat33 Reference

#include "TrueAxis.bi"

Description

A 3 by 3 matrix.

Not fully documented. Prior knowledge of vector and matrix maths is assumed. It is left to the user to work out what the functions do from there names, parameters and return values.

Data Structure:

type TA_Mat33

as TA_Vec3 v3X

as TA_Vec3 v3Y

as TA_Vec3 v3Z

end type

  • Functions:

declare sub Mat33Swap(byref a as TA_Mat33, byref b as TA_Mat33)

declare sub Mat33Identity(byref self as TA_Mat33)

declare sub Mat33InitialiseEulerAngles(byref self as TA_Mat33, byval pitch as single, byval yaw as single, byval roll as single)

declare sub Mat33InitialiseEulerAnglesD(byref self as TA_Mat33, byval pitch as single, byval yaw as single, byval roll as single)

declare sub Mat33InitialiseAxisAngle(byref self as TA_Mat33, byref axis as const TA_Vec3, byval angle as single)

declare sub Mat33InitialiseRotationAxis(byref self as TA_Mat33, byval axis as const eROTATION_AXIS, byval angle as single)

declare sub Mat33PreRotate(byref self as TA_Mat33, byval axis as const eROTATION_AXIS, byval angle as single)

declare sub Mat33SetToLookAt(byref self as TA_Mat33, byref position as const TA_Vec3, byref up as const TA_Vec3)

declare sub Mat33SetToLookDownVector(byref self as TA_Mat33, byref v as const TA_Vec3)

declare sub Mat33Add(byref self as TA_Mat33, byref a as const TA_Mat33)

declare sub Mat33Sub(byref self as TA_Mat33, byref a as const TA_Mat33)

declare sub Mat33Mul(byref self as TA_Mat33,byval s as single)

declare sub Mat33Div(byref self as TA_Mat33,byval s as single)

declare sub Mat33MulMat(byref self as TA_Mat33, byref a as const TA_Mat33)

declare sub Mat33MulMatFrom(byref self as TA_Mat33, byref a as const TA_Mat33, byref b as const TA_Mat33)

declare sub Mat33DivMat(byref self as TA_Mat33, byref a as const TA_Mat33)

declare sub Mat33DivMatFrom(byref self as TA_Mat33, byref a as const TA_Mat33, byref b as const TA_Mat33)

declare sub Mat33Invert(byref self as TA_Mat33)

declare sub Mat33GetInerseFrom(byref self as TA_Mat33,byref a as const TA_Mat33)

declare sub Mat33Interpolate(byref self as TA_Mat33, byref a as const TA_Mat33, byref b as const TA_Mat33,byval t as single)

declare sub Mat33GetRotationAxisAndMagnitude(byref self as const TA_Mat33, byref v3Axis as TA_Vec3, byref fMagnitude as single)

declare sub Mat33GetTransposeAsInverse(byref self as TA_Mat33)

declare sub Mat33GetTransposeAsInverseFrom(byref r as TA_Mat33, byref a as const TA_Mat33)

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Free Web Help generator


TA_MFrame

TA::MFrame

TA_ MFrame

TA_MFrame Reference

#include "TrueAxis.bi"

Description

The Math Frame descript's Position and orientation.

It is assumed that the user has prior knowledge of vector and matrix math It is left to the user to work out what the functions do from there names, parameters and return values.

Data Structure:

  • type TA_MFrame
  • as TA_Mat33 m33Rotation
  • as TA_Vec3 v3Translation
  • end type
  • Functions:
  • declare sub MFrameSwap(byref a as TA_MFrame, byref b as TA_MFrame)
  • declare sub MFrameIdentity(byref self as TA_MFrame)
  • declare sub MFrameInitialiseTA_EulerAngles(byref self as TA_MFrame, byval pitch as single, byval yaw as single, byval roll as single)
  • declare sub MFrameInitialiseEulerAnglesD(byref self as TA_MFrame, byval pitch as single, byval yaw as single, byval roll as single)
  • declare sub MFrameInitialiseAxisAngle(byref self as TA_MFrame, byref axis as const TA_Vec3 , byval angle as single)
  • declare sub MFrameInitialiseAxisAngleD(byref self as TA_MFrame, byref axis as const TA_Vec3, byval angle as single)
  • declare sub MFrameInitialiseRotationAxis(byref self as TA_MFrame, byval axis as eROTATION_AXIS, byval angle as single)
  • declare sub MFrameMul(byref self as TA_MFrame, byref a as const TA_MFrame)
  • declare sub MFrameMulFrom(byref self as TA_MFrame, byref a as const TA_MFrame, byref b as const TA_MFrame)
  • declare sub MFrameDiv(byref self as TA_MFrame, byref a as const TA_MFrame)
  • declare sub MFrameDivFrom(byref self as TA_MFrame, byref a as const TA_MFrame, byref b as const TA_MFrame)
  • declare sub MFrameMulMat(byref self as TA_MFrame, byref a as const TA_Mat33)
  • declare sub MFrameMulFromMat(byref self as TA_MFrame, byref a as const TA_MFrame, byref b as const TA_Mat33)
  • declare sub MFrameInvert(byref self as TA_MFrame)
  • declare sub MFrameInerseFrom(byref self as TA_MFrame, byref a as const TA_MFrame, byref b as const TA_MFrame)
  • declare sub MFrameInterpolate(byref self as TA_MFrame, byref a as const TA_MFrame, byref b as const TA_MFrame, byval t as single)

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Free HTML Help documentation generator


miscellaneous

Miscellaneous math

Miscellaneous Math Reference

#include "TrueAxis.bi"

Description: not documented ATM.

declare function TA_Abs(byval nValue as integer) as integer

declare function TA_Fabs(byval fValue as single) as single

declare function TA_Sign(byval fValue as single) as single

declare function TA_SignsEqual(byval fA as single, byval fB as single) as integer

declare function TA_Sqrt(byval fValue as single) as single

declare function TA_ReciprocalSqrt(byval fValue as single) as single

declare function TA_Pow(byval fValue as single, byval fExponent as single) as single

declare function TA_Pow2(byval fX as single ) as single

declare function TA_Sin(byval fAngle as single) as single

declare function TA_Cos(byval fAngle as single) as single

declare sub TA_SinAndCos(byval fAngle as single, byref fSin as single, byref fCos as single)

declare function TA_Tan(byval fAngle as single) as single

declare function TA_ATan2(byval fY as single, byval fX as single) as single

declare function TA_ACos(byval fValue as single) as single

declare function TA_FMod(byval fValue as single, byval fMod as single) as single

declare function TA_Exp(byval fValue as single) as single

declare function TA_Log(byval fValue as single) as single

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Full featured Documentation generator


Enums

True Axis Wrapper Enum's

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Full featured Documentation generator


ePHYSICS_FLAGS

ePHYSICS_FLAGS

ePHYSICS_FLAGS Reference

#include "TrueAxis.bi"

Description

not documented ATM. used by PhysicsTestRayCollision and PhysicsTestLineCollision.

  • Data Structure:
  • enum ePHYSICS_FLAGS
  • DYNAMIC_OBJECTS = 1
  • STATIC_OBJECTS = 2
  • ALL_OBJECTS = DYNAMIC_OBJECTS or STATIC_OBJECTS
  • GHOST_OBJECTS = 8
  • end enum

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Easily create Help documents


eCOLLISION_FLAGS

eCOLLISION_FLAGS

eCOLLISION_FLAGS Reference

#include "TrueAxis.bi"

Description

not documented ATM. used by PhysicsTestRayForCollision, PhysicsV3TestRayForCollision and PhysicsTestLineForCollision.

  • Data Structure:
  • ' flags marked as "*" are usable after a collision the most important flag are FLAG_COLLISION_OCCURRED
  • enum eCOLLISION_FLAGS
  • FLAG_CONSTRAIN_IN_BOTH_DIRECTIONS = &H000001
  • FLAG_FRICTION = &H000002 ' *
  • FLAG_FRICTION_GENERATING_IMPULSE = &H000004
  • FLAG_NO_FRICTION = &H000008 ' *
  • FLAG_JOINT = &H000010 ' *
  • FLAG_JOINT_LIMIT = &H000020 ' *
  • FLAG_COLLISION_OCCURRED = &H000040 ' *
  • FLAG_DISABLE_PUSHOUT = &H000080
  • FLAG_FRICTION_GENERATING_IMPULSE2 = &H000100
  • FLAG_MARKED = &H000200
  • FLAG_RESTITUTION_CALCULATED = &H000400
  • FLAG_OBJECTA_SOLID = &H001000
  • FLAG_OBJECTB_SOLID = &H002000
  • FLAG_NEW_COLLISION = &H004000
  • FLAG_ROTATION_CONSTRAINT = &H008000 ' *
  • FLAG_OBJECTB_INFINITE_MASS = &H010000
  • FLAG_DEPTH_CALCULATED_FROM_TIME = &H020000
  • FLAG_USE_PUSH_OUT_MODIFIER = &H040000
  • FLAG_OBJECTA_SOLID_INTERNAL = &H080000
  • FLAG_OBJECTB_SOLID_INTERNAL = &H100000
  • end enum

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Free PDF documentation generator


ePHYSICS_MOVING_PRIORITIES

ePHYSICS_MOVING_PRIORITIES

ePHYSICS_MOVING_PRIORITIES Reference

#include "TrueAxis.bi"

Description

not documented ATM. used by PhysicsSetDynamicObjectIsMoving.

  • Data Structure:
  • enum ePHYSICS_MOVING_PRIORITIES
  • SET_MOVING_PRIORITY_LOW = 0
  • SET_MOVING_PRIORITY_HIGH = 1
  • end enum

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Single source CHM, PDF, DOC and HTML Help creation


ePHYSICS_SPACIAL_DIVISION_TYPES

ePHYSICS_SPACIAL_DIVISION_TYPES

ePHYSICS_SPACIAL_DIVISION_TYPES Reference

#include "TrueAxis.bi"

Description

not documented ATM. used by Physics SetSpacialDivisionType GetSpacialDivisionType.

  • Data Structure:
  • enum ePHYSICS_SPACIAL_DIVISION_TYPES
  • FLAG_XY_COLLISION_GRID = &H020
  • FLAG_XZ_COLLISION_GRID = &H040
  • FLAG_YZ_COLLISION_GRID = &H060
  • FLAG_DYNAMIC_OCTREE = &H080
  • FLAG_CTREE = &H100
  • end enum

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Free HTML Help documentation generator


ePHYSICS_JOINT_TYPES

ePHYSICS_JOINT_TYPES

ePHYSICS_JOINT_TYPES Reference

#include "TrueAxis.bi"

Description

not documented ATM. used by PhysicsJointGetType.

  • Data Structure:
  • enum ePHYSICS_JOINT_TYPES
  • BALL_AND_SOCKET = 0
  • LIMITED_BALL_AND_SOCKET
  • SQUARE_SOCKET
  • EULER_ANGLE_CONSTRAINT
  • LINEAR_SLIDER
  • ROTATION_CONSTRAINT
  • VECTOR_CONSTRAINT
  • end enum

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Free CHM Help documentation generator


eCOLLISIONOBJECT_TYPES

eCOLLISIONOBJECT_TYPES

eCOLLISIONOBJECT_TYPES Reference

#include "TrueAxis.bi"

Description

not documented ATM. used by CollisionObjectGetCollisionObjectType.

  • Data Structure:
  • enum eCOLLISIONOBJECT_TYPES
  • TYPE_CONVEX = 0
  • TYPE_LINE_LIST
  • TYPE_CAPSULE
  • TYPE_SPHERE
  • TYPE_CYLINDER
  • TYPE_COMPLEX
  • TYPE_CACHED_POLY_DATA
  • TYPE_COMBO
  • end enum

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Easy CHM and documentation editor


eROTATION_AXIS

eROTATION_AXIS

eROTATION_AXIS Reference

#include "TrueAxis.bi"

Description

not documented ATM. used by Mat33InitialiseRotationAxis, Mat33PreRotate and .

  • Data Structure:
  • enum eROTATION_AXIS
  • ROTATION_AXIS_X = 0
  • ROTATION_AXIS_Y
  • ROTATION_AXIS_Z
  • end enum

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Easy to use tool to create HTML Help files and Help web sites


Examples

True Axis Wrapper Examples

Here is a list of all examples:

  • Beginr01.bas
  • Beginr02.bas
  • CallbackMovingResting01.bas
  • CollisionObjectCombo01.bas
  • DynamicObjectCar01.bas
  • DynamicObjectCar02.bas
  • DynamicObjectSetRestitution01.bas
  • DynamicObjectTemplate.bas
  • DynamicObjectTemplateTank.bas
  • JointBallAndSocket01.bas
  • JointHinge01.bas
  • JointHinge02.bas
  • JointSlider01.bas
  • JointSlider02.bas

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Easily create CHM Help documents


Begin01.bas

CarTemplateExample.cpp

Begin01.bas

Example: Begin01.bas

Example of creating a Instance of the TrueAxis Physics class.

#include once "InitGL.bi"

#define TRUEAXISDEBUG ' "optional" enable debug rendering and error report in file "debug.txt"

#include once "TrueAxis.bi"

InitGL()

PhysicsCreateInstance()

' create a dynamic box (1m x 3m x 0.2m)

dim as DynamicObject ptr box = DynamicObjectCreateNew()

DynamicObjectInitialiseAsABox(box,0,0,0, 1,3,0.2)

DynamicObjectSetPosition(box,0,10,0)

DynamicObjectSetRotationD(box,0,0,15) ' pitch, yaw, roll in "D"egree

' add the box to the simulation

PhysicsAddDynamicObject box

' create a static XZ plane Y=0 (5m x 5m)

PhysicsAddStaticGround(5)

dim as integer frames

dim as KeyCodes key

' render and simulation loop

while key<>K_ESCAPE andalso key<>K_WINDOW_CLOSE

key=GetKeyCode()

' one step in simulation (75Hz.)

PhysicsUpdate(1.0/75.0)

' render every third physics frame (25Hz.)

if frames mod 3=0 then

glClear GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT

glLoadIdentity

glTranslatef 0,-2,-15

' draw all objects (only in debug mode)

PhysicsRender()

' sometimes usefull also

PhysicsRenderBoundingBoxes()

flip

end if

Sleep(10) ' time sharing

frames+=1

wend

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Easy CHM and documentation editor


Begin02.bas

CarTemplateExample.cpp

Begin02.bas

Example: Begin02.bas

Example of cube, box, sphere, cylinder and capsule.

#include once "InitGL.bi"

#define TRUEAXISDEBUG ' "optional" enable debug rendering and report in file "debug.txt"

#include once "TrueAxis.bi"

InitGL()

PhysicsCreateInstance()

' create a static ground plane

PhysicsAddStaticGround()

' create sone dynamic objects

' create a dynamic cube

dim as DynamicObject ptr cube = DynamicObjectCreateNew()

DynamicObjectInitialiseAsACube(cube,0,0,0, 2)

DynamicObjectSetPosition(cube,0,20,0)

DynamicObjectSetRotationD(cube,15,20,30)

' create a dynamic box

dim as DynamicObject ptr box = DynamicObjectCreateNew()

DynamicObjectInitialiseAsABox(box,0,0,0, 8,0.2,10)

DynamicObjectSetPosition(box,0,25,0)

' create a dynamic sphere

dim as DynamicObject ptr sphere = DynamicObjectCreateNew()

DynamicObjectInitialiseAsASphere(sphere,-2,0,0, 1)

DynamicObjectSetPosition(sphere,0,30,0)

' create a dynamic cylinder

dim as DynamicObject ptr cylinder = DynamicObjectCreateNew()

DynamicObjectInitialiseAsACylinder(cylinder, 0,-1,0, 0,1,0, 1)

DynamicObjectSetPosition(cylinder,0,35,0)

' create a dynamic capsule

dim as DynamicObject ptr capsule = DynamicObjectCreateNew()

DynamicObjectInitialiseAsACapsule(capsule, 0,-1,0, 0,1,0, 1)

DynamicObjectSetPosition(capsule,0,40,0)

' add the objects to the simulation

PhysicsAddDynamicObject cube

PhysicsAddDynamicObject box

PhysicsAddDynamicObject sphere

PhysicsAddDynamicObject cylinder

PhysicsAddDynamicObject capsule

' render and simualtion loop

dim as integer frames

while inkey=""

' one step in simulation

PhysicsUpdate(1.0/75.0)

if frames mod 3=0 then

glClear GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT

glLoadIdentity

glTranslatef 0,-5,-25

' draw all objects (only in debug mode)

PhysicsRender()

flip

end if

Sleep(10)

frames+=1

wend

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Easily create Help documents


CallbackMovingResting01.bas

CallbackMovingResting01.bas

Example: CallbackMovingResting01.bas

Example of setting up a DynamicObjectCar.

' "optional" enable debug rendering and error report in file "debug.txt"

#define TRUEAXISDEBUG

#include once "TrueAxis.bi"

#include once "InitGL.bi"

InitGL()

PhysicsCreateInstance()

sub RestingCB cdecl (self as DynamicObject ptr, pCallBackData as any ptr)

dim as TA_Vec3 v3Position : DynamicObjectV3GetPosition self,v3Position

dim as zstring ptr pName = DynamicObjectGetUserData(self)

open err for output as #99:print #99,"Resting CallBack: " & *pName & " resting at " & v3Position : close #99

end sub

sub MovingCB cdecl (self as DynamicObject ptr, pCallBackData as any ptr)

dim as zstring ptr pName = DynamicObjectGetUserData(self)

open err for output as #99:print #99,"Moving CallBack: " & *pName:close #99

end sub

' set OnRestingCallBack and OnMovingCallBack

PhysicsSetOnRestingCallBack @RestingCB,0

PhysicsSetOnMovingCallBack @MovingCB,0

' create a static ground plane

PhysicsAddStaticGround()

' create a dynamic cube and add it to the simulation

dim as DynamicObject ptr cube = DynamicObjectCreateNew()

DynamicObjectInitialiseAsACube cube,0,0,0, 2

DynamicObjectSetUserData cube,@"cube"

DynamicObjectSetPosition cube,0,20,0

DynamicObjectSetRotationD cube,15,20,30

PhysicsAddDynamicObject cube

' create a dynamic box and add it to the simulation

dim as DynamicObject ptr box = DynamicObjectCreateNew()

DynamicObjectInitialiseAsABox box,0,0,0, 8,0.2,10

DynamicObjectSetUserData box,@"box"

DynamicObjectSetPosition box,0,25,0

PhysicsAddDynamicObject box

' create a dynamic sphere and add it to the simulation

dim as DynamicObject ptr sphere = DynamicObjectCreateNew()

DynamicObjectInitialiseAsASphere sphere,-2,0,0, 1

DynamicObjectSetUserData sphere,@"sphere"

DynamicObjectSetPosition sphere,0,30,0

PhysicsAddDynamicObject sphere

' create a dynamic cylinder and add it to the simulation

dim as DynamicObject ptr cylinder = DynamicObjectCreateNew()

DynamicObjectInitialiseAsACylinder cylinder, 0,-1,0, 0,1,0, 1

DynamicObjectSetUserData cylinder,@"cylinder"

DynamicObjectSetPosition cylinder,0,35,0

PhysicsAddDynamicObject cylinder

' create a dynamic capsule and add it to the simulation

dim as DynamicObject ptr capsule = DynamicObjectCreateNew()

DynamicObjectInitialiseAsACapsule capsule, 0,-1,0, 0,1,0, 1

DynamicObjectSetUserData capsule,@"capsule"

DynamicObjectSetPosition capsule,0,40,0

PhysicsAddDynamicObject capsule

' render and simualtion loop

dim as integer frames

while inkey=""

' one step in simulation

PhysicsUpdate(1.0/75.0)

if frames mod 3=0 then

glClear GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT

glLoadIdentity

glTranslatef 0,-5,-100

' draw all objects (only in debug mode)

PhysicsRender()

flip

end if

sleep(10)

frames+=1

wend

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Easily create Help documents


DynamicObjectCar01.bas

DynamicObjectCar01.bas

Example: DynamicObjectCar01.bas

Example of setting up a DynamicObjectCar.

#include once "InitGL.bi"

#define TRUEAXISDEBUG ' "optional" enable debug rendering and report any problems in file "debug.txt"

#include once "TrueAxis.bi"

sub _TrueAxisInit_ constructor

InitGL()

PhysicsCreateInstance()

end sub

sub _TrueAxisExit_ destructor

PhysicsDestroyInstance()

end sub

function CreateOpenGLWheel() as integer

const as single M_PI = atn(1)*4

const as integer SEGMENTS = 15

const as single US = (M_PI*2) / SEGMENTS

const as single VS = M_PI / SEGMENTS

const NPOINTS = (SEGMENTS + 1) * (SEGMENTS + 1)

static as integer wheel

dim A(2) as single

dim B(2) as single

dim P(NPOINTS*3-1) as single

dim UW as single

for i as integer=0 to SEGMENTS

P(i*2+0)=cos(UW)*0.5 ' x

P(i*2+1)=sin(UW)*0.5 ' z

UW=UW+US

next

if wheel then return wheel

wheel=glGenLists(1)

glNewList (wheel, GL_COMPILE)

glRotatef(90,0,0,1)

glBegin(GL_TRIANGLE_FAN)

glColor3f(0,0,0):glNormal3f(0,1,0):glVertex3f(0,0.5,0) ' center

for i as integer=SEGMENTS to 0 step-1

if (i and 4) then

glColor3f(0,0,0)

else

glColor3f(0.5,0.5,0.5)

end if

glVertex3f(P(i*2+0),0.5,P(i*2+1))

next

glEnd()

glBegin(GL_TRIANGLE_FAN)

glColor3f(0,0,0):glNormal3f(0,-1,0):glVertex3f(0,-0.5,0) ' center

for i as integer=0 to SEGMENTS

if (i and 4) then

glColor3f(0,0,0)

else

glColor3f(0.5,0.5,0.5)

end if

glVertex3f(P(i*2+0),-0.5,P(i*2+1))

next

glEnd()

glBegin(GL_TRIANGLE_STRIP)

glColor3f(0,0,0)

for i as integer=0 to SEGMENTS

dim as integer j=i+1 :j=j mod SEGMENTS

glVertex3f(P(i*2+0),-0.5,P(i*2+1))

glVertex3f(P(i*2+0), 0.5,P(i*2+1))

next

glEnd()

glEndList()

return wheel

End function

const as single fWheelSize = 0.6

const as single fWheelWidth = 0.3

const as single bWheelSize = 0.6

const as single bWheelWidth = 0.4

function CreateSimpleCar(carwidth as single=2,carheight as single=1.2,carlength as single=4) as DynamicObjectCar ptr

' create a car from CarTemplate

dim as CarTemplate ptr CarDesc = CarTemplateCreateNew()

CarTemplateBeginInitialise(CarDesc)

' add car CollisionObject (a simple box in this case)

dim as CollisionObjectConvex ptr Convex = CollisionObjectConvexCreateNew()

CollisionObjectConvexInitialiseAsABox Convex,0,CarHeight/4,0,CarWidth,CarHeight,CarLength

CarTemplateAddCollisionObjectConvex CarDesc,Convex

' we no longer need the collision box here.

CollisionObjectConvexRelease Convex

' add wheels

' steering front wheels

const as single fWheelTop = 0

const as single fWheelBottom = -0.7

dim as single fWheelXPos = (CarWidth -fWheelWidth/2)/2

dim as single fWheelZPos = (CarLength-fWheelSize )/2

' rear wheels

const as single bWheelTop = 0

const as single bWheelBottom = -0.7

dim as single bWheelXPos = (CarWidth -fWheelWidth/2)/2

dim as single bWheelZPos = -(CarLength-fWheelSize )/2

' front steering wheels

CarTemplateWheelSetRadius fWheelSize/2 ' radius

CarTemplateWheelSetSteeringFlag 1

CarTemplateWheelSetSuspensionTop fWheelXPos,fWheelTop ,fWheelZPos

CarTemplateWheelSetSuspensionBottom fWheelXPos,fWheelBottom,fWheelZPos

CarTemplateAddWheel CarDesc

CarTemplateWheelSetSuspensionTop -fWheelXPos,fWheelTop, fWheelZPos

CarTemplateWheelSetSuspensionBottom -fWheelXPos,fWheelBottom,fWheelZPos

CarTemplateAddWheel CarDesc

' back driving wheels

CarTemplateWheelSetRadius bWheelSize/2 ' radius

CarTemplateWheelSetSteeringFlag 0

CarTemplateWheelSetDrivingFlag 1

if 1 then ' 6 wheel vehicle

for i as integer=1 to 1

CarTemplateWheelSetSuspensionTop bWheelXPos,bWheelTop ,bWheelZPos+(bWheelSize+0.1)*i

CarTemplateWheelSetSuspensionBottom bWheelXPos,bWheelBottom,bWheelZPos+(bWheelSize+0.1)*i

CarTemplateAddWheel CarDesc

CarTemplateWheelSetSuspensionTop -bWheelXPos,bWheelTop ,bWheelZPos+(bWheelSize+0.1)*i

CarTemplateWheelSetSuspensionBottom -bWheelXPos,bWheelBottom,bWheelZPos+(bWheelSize+0.1)*i

CarTemplateAddWheel CarDesc

next

end if

' Rear wheels

CarTemplateWheelSetSuspensionTop bWheelXPos,bWheelTop ,bWheelZPos

CarTemplateWheelSetSuspensionBottom bWheelXPos,bWheelBottom,bWheelZPos

CarTemplateAddWheel CarDesc

CarTemplateWheelSetSuspensionTop -bWheelXPos,bWheelTop ,bWheelZPos

CarTemplateWheelSetSuspensionBottom -bWheelXPos,bWheelBottom,bWheelZPos

CarTemplateAddWheel CarDesc

CarTemplateEndInitialise CarDesc

' create a DynamicObjectCar from our CarTemplate

dim as DynamicObjectCar ptr NewCar = DynamicObjectCarCreateNew()

DynamicObjectCarInitialise NewCar,CarDesc

' we no longer need a reference to the CarTemplate here.

CarTemplateRelease CarDesc

return NewCar

end function

'

' main

'

' create a car

dim as DynamicObjectCar ptr car = CreateSimpleCar()

DynamicObjectSetCenterOffset car,0,-0.75,0

DynamicObjectSetPosition Car,-15,2,0

' add the car to the physics simulation

PhysicsAddDynamicObject Car

' create a static ground XZ plane (25 m x 25 m)

PhysicsAddStaticGround(25)

' car controls

dim as single Steer=.25,Accel=0.5,Brake,HandBrake,TractionControl=1

dim as integer bSteeringHelp,nGear=2 ' -1=auto shift 0=reverse 1=neutral 2=first gear 3=second 4=third ...

dim as integer WheelList = CreateOpenGLWheel()

dim as single x,y,z

' render and simualtion loop

dim as integer frames

while inkey=""

' update car controls

DynamicObjectCarUpdateControls Car,Steer,Accel,Brake,HandBrake,bSteeringHelp,TractionControl,nGear

' one step in simulation

PhysicsUpdate(1.0/75.0)

if frames mod 3 then

WindowTitle "gfx frame " & frames\3

glClear GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT

glLoadIdentity

DynamicObjectGetPosition Car,x,y,z

LookAT 0,15,45, x,y,z, 0,1,0

' render all objects (only in debug mode)

PhysicsRender()

'PhysicsRenderBoundingBoxes()

' render the wheels

glPushMatrix()

DynamicObjectMultOpenGLMatrix(car)

for i as integer=0 to DynamicObjectCarGetNumWheels(car)-1

glPushMatrix()

DynamicObjectCarWheelMultLocalOpenGLMatrix(car,i)

' front or rear wheels

if i<2 then

glScalef(fWheelWidth,fWheelSize,fWheelSize)

else

glScalef(bWheelWidth,bWheelSize,bWheelSize)

end if

glCallList(WheelList)

glPopMatrix()

next

glPopMatrix()

flip

end if

Sleep(10)

frames+=1

wend

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Easily create Help documents


DynamicObjectCar02.bas

DynamicObjectCar02.bas

Example: DynamicObjectCar02.bas

Example of setting up a DynamicObjectCar's.

#include once "InitGL.bi"

#define TRUEAXISDEBUG

#include once "TrueAxis.bi"

#include once "SandBox.bi"

sub _AppInit_ constructor

InitGL

PhysicsCreateInstance

InitSandBox 30

end sub

sub _AppExit_ destructor

PhysicsDestroyInstance

end sub

function CreateOpenGLWheel() as integer

const as single M_PI = atn(1)*4

const as integer SEGMENTS = 15

const as single US = (M_PI*2) / SEGMENTS

const as single VS = M_PI / SEGMENTS

const NPOINTS = (SEGMENTS + 1) * (SEGMENTS + 1)

static as integer wheel=0

dim A(2) as single

dim B(2) as single

dim P(NPOINTS*3-1) as single

dim UW as single

if wheel then return wheel

for i as integer=0 to SEGMENTS

P(i*2+0)=cos(UW)*0.5 ' x

P(i*2+1)=sin(UW)*0.5 ' z

UW=UW+US

next

wheel=glGenLists(1)

glNewList (wheel, GL_COMPILE)

glRotatef(90,0,0,1)

glBegin(GL_TRIANGLE_FAN)

glColor3f(0,0,0):glNormal3f(0,1,0):glVertex3f(0,0.5,0) ' center

for i as integer=SEGMENTS to 0 step-1

if (i and 4) then

glColor3f(0,0,0)

else

glColor3f(0.5,0.5,0.5)

end if

glVertex3f(P(i*2+0),0.5,P(i*2+1))

next

glEnd()

glBegin(GL_TRIANGLE_FAN)

glColor3f(0,0,0):glNormal3f(0,-1,0):glVertex3f(0,-0.5,0) ' center

for i as integer=0 to SEGMENTS

if (i and 4) then

glColor3f(0,0,0)

else

glColor3f(0.5,0.5,0.5)

end if

glVertex3f(P(i*2+0),-0.5,P(i*2+1))

next

glEnd()

glBegin(GL_TRIANGLE_STRIP)

glColor3f(0,0,0)

for i as integer=0 to SEGMENTS

dim as integer j=i+1 :j=j mod SEGMENTS

glVertex3f(P(i*2+0),-0.5,P(i*2+1))

glVertex3f(P(i*2+0), 0.5,P(i*2+1))

next

glEnd()

glEndList()

return wheel

End function

const as single fWheelSize = 0.6

const as single fWheelWidth = 0.3

const as single bWheelSize = 0.6

const as single bWheelWidth = 0.4

function CreateSimpleCar(carwidth as single=2,carheight as single=1.0,carlength as single=4) as DynamicObjectCar ptr

' create a car from CarTemplate

dim as CarTemplate ptr CarDesc = CarTemplateCreateNew()

CarTemplateBeginInitialise(CarDesc)

' add car CollisionObject (a simple box in this case)

dim as CollisionObjectConvex ptr Convex = CollisionObjectConvexCreateNew()

CollisionObjectConvexInitialiseAsABox Convex,0,CarHeight/4,0,CarWidth,CarHeight,CarLength

CarTemplateAddCollisionObjectConvex CarDesc,Convex

' we no longer need the collision box here.

CollisionObjectConvexRelease Convex

' add wheels

' steering front wheels

const as single fWheelTop = 0

const as single fWheelBottom = -.8

dim as single fWheelXPos = (CarWidth -fWheelWidth/2)/2

dim as single fWheelZPos = (CarLength-fWheelSize*2 )/2

' rear wheels

const as single bWheelTop = 0

const as single bWheelBottom = -0.8

dim as single bWheelXPos = (CarWidth -fWheelWidth/2)/2

dim as single bWheelZPos = -(CarLength-fWheelSize*2 )/2

' front steering wheels

CarTemplateWheelSetRadius fWheelSize/2 ' radius

CarTemplateWheelSetSteeringFlag 1

CarTemplateWheelSetDrivingFlag 1

CarTemplateWheelSetSuspensionTop fWheelXPos,fWheelTop ,fWheelZPos

CarTemplateWheelSetSuspensionBottom fWheelXPos,fWheelBottom,fWheelZPos

CarTemplateAddWheel CarDesc

CarTemplateWheelSetSuspensionTop -fWheelXPos,fWheelTop, fWheelZPos

CarTemplateWheelSetSuspensionBottom -fWheelXPos,fWheelBottom,fWheelZPos

CarTemplateAddWheel CarDesc

' back driving wheels

CarTemplateWheelSetRadius bWheelSize/2

CarTemplateWheelSetSteeringFlag 0

CarTemplateWheelSetDrivingFlag 1

' Rear wheels

CarTemplateWheelSetSuspensionTop bWheelXPos,bWheelTop ,bWheelZPos

CarTemplateWheelSetSuspensionBottom bWheelXPos,bWheelBottom,bWheelZPos

CarTemplateAddWheel CarDesc

CarTemplateWheelSetSuspensionTop -bWheelXPos,bWheelTop ,bWheelZPos

CarTemplateWheelSetSuspensionBottom -bWheelXPos,bWheelBottom,bWheelZPos

CarTemplateAddWheel CarDesc

CarTemplateEndInitialise CarDesc

' create a DynamicObjectCar from our CarTemplate

dim as DynamicObjectCar ptr NewCar = DynamicObjectCarCreateNew()

DynamicObjectCarInitialise NewCar,CarDesc

' we no longer need a reference to the CarTemplate here.

CarTemplateRelease CarDesc

return NewCar

end function

'

' main

'

' create a static ground plane

PhysicsAddStaticGround

const NCARS = 100

dim as DynamicObjectCar ptr cars(NCARS-1)

' create some cars

for i as integer = 0 to NCARS-1

cars(i) = CreateSimpleCar()

DynamicObjectSetCenterOffset cars(i),0,-0.5,0

' get random position

dim as single x=rnd*SandBoxSize()/2,y=0,z=rnd*SandBoxSize()/2

if PhysicsTestLineForCollision(x,100,z, x,-100,z) then

CollisionGetPosition x,y,z

end if

DynamicObjectSetPosition cars(i),x,y+1,z

' add the car to the physics simulation

PhysicsAddDynamicObject cars(i)

next

' car controls

dim as single Steer=-.05,Accel=.75,Brake,HandBrake,TractionControl=1

dim as integer bSteeringHelp=0,nGear=-1 ' -1=auto shift 0=reverse 1=neutral 2=first gear 3=second 4=third ...

dim as integer WheelList = CreateOpenGLWheel()

dim as single camx,camy,camz,cx,cy,cz,carx,cary,carz

dim as integer bChangeSteering=1

' update car controls

for i as integer=0 to NCARS-1

DynamicObjectCarUpdateControls Cars(i),Steer,Accel,Brake,HandBrake,bSteeringHelp,TractionControl,nGear

next

' render and simualtion loop

dim as integer carcam=NCARS\2

dim as integer frames

while inkey=""

' one step in simulation

PhysicsUpdate(1.0/75.0)

if frames mod 3 then

glClear GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT

glLoadIdentity

' look target

DynamicObjectGetPosition cars(carcam), carx,cary,carz

' look source x and z

DynamicObjectTransform cars(carcam),0,8,-25, cx,cy,cz

' look source y

if PhysicsTestLineForCollision(cx,100,cz, cx,-100,cz,STATIC_OBJECTS) then

CollisionGetPosition cx,cy,cz : cy+=5

end if

camx+=(cx-camx)*0.02

camy+=(cy-camy)*0.5

camz+=(cz-camz)*0.02

if PhysicsTestLineForCollision(camx,100,camz, camx,-100,camz,STATIC_OBJECTS) then

CollisionGetPosition camx,camy,camz : camy+=5

end if

LookAT camx,camy,camz, _

carx,cary,carz, _

0, 1, 0

' render all objects (only in debug mode)

PhysicsRender()

'PhysicsRenderBoundingBoxes()

for i as integer=0 to NCARS-1

' render the wheels

glPushMatrix()

DynamicObjectMultOpenGLMatrix(cars(i))

for w as integer=0 to DynamicObjectCarGetNumWheels(cars(i))-1

glPushMatrix()

DynamicObjectCarWheelMultLocalOpenGLMatrix(cars(i),w)

' front or rear wheels

if w<2 then

glScalef(fWheelWidth,fWheelSize,fWheelSize)

else

glScalef(bWheelWidth,bWheelSize,bWheelSize)

end if

glCallList(WheelList)

glPopMatrix()

next

glPopMatrix()

next

flip

end if

Sleep(10)

frames+=1

if frames mod 1000=0 then

carcam=(carcam+1) mod NCARS

end if

wend

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Easily create HTML Help documents


CollisionObjectCombo01.bas

CollisionObjectCombo01.bas

Example: CollisionObjectCombo01.bas

Example of CollisionObjectCombo

#include once "InitGL.bi"

#define TRUEAXISDEBUG ' "optional" enable debug rendering and report any problems in file "debug.txt"

#include once "TrueAxis.bi"

sub _TrueAxisInit_ constructor

InitGL()

PhysicsCreateInstance()

end sub

sub _TrueAxisExit_ destructor

PhysicsDestroyInstance()

end sub

const NOBJECTS = 100

PhysicsSetupSimulation(NOBJECTS*4)

dim as DynamicObject ptr o(NOBJECTS-1)

for i as integer = 0 to NOBJECTS-1

o(i) = DynamicObjectCreateNew()

dim as CollisionObjectCombo ptr combo=CollisionObjectComboCreateNew()

CollisionObjectComboInitialise combo

dim as CollisionObjectConvex ptr cube=CollisionObjectConvexCreateNew()

CollisionObjectConvexInitialiseAsACube cube,0,0,0, 1

CollisionObjectComboAddCollisionObject combo,cube

CollisionObjectConvexRelease cube

dim as CollisionObjectSphere ptr sphere=CollisionObjectSphereCreateNew()

CollisionObjectSphereInitialise sphere, -2,0,0, 0.5

CollisionObjectComboAddCollisionObject combo,sphere

CollisionObjectSphereRelease sphere

dim as CollisionObjectCylinder ptr cylinder=CollisionObjectCylinderCreateNew()

CollisionObjectCylinderInitialise cylinder, 2,.5,0, 2,-.5,0, 0.5

CollisionObjectComboAddCollisionObject combo,cylinder

CollisionObjectCylinderRelease cylinder

DynamicObjectInitialise o(i),combo

CollisionObjectComboRelease combo

PhysicsAddDynamicObject o(i)

DynamicObjectSetPosition(o(i),0,.5+i*1.5,0)

DynamicObjectSetRotationD(o(i),0,i*3.6,0)

next

' create a static ground plane

dim as StaticObject ptr ground = PhysicsAddStaticGround()

' render and simualtion loop

dim as integer frames

while inkey=""

' one step in simulation

PhysicsUpdate(1.0/75.0)

if frames mod 3=0 then

glClear GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT

glLoadIdentity

glTranslatef 0,-15,-80

' render all objects (only in debug mode)

PhysicsRender()

'PhysicsRenderBoundingBoxes()

flip

end if

sleep(10)

frames+=1

wend

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Free PDF documentation generator


DynamicObjectSetRestitution01.bas

DynamicObjectSetRestitution01.bas

Example: DynamicObjectSetRestitution01.bas

Test of DynamicObjectSetRestitution

' test of: DynamicObjectSetRestitution

#include once "InitGL.bi"

#define TRUEAXISDEBUG ' "optional" enable debug rendering and error report in file "debug.txt"

#include once "TrueAxis.bi"

sub _TrueAxisInit_ constructor

InitGL()

PhysicsCreateInstance()

end sub

sub _TrueAxisExit_ destructor

PhysicsDestroyInstance()

end sub

const NCUBES=10

' create a dynamic cube

dim as DynamicObject ptr cubes(NCUBES-1)

for i as integer=0 to NCUBES-1

cubes(i) = DynamicObjectCreateNew()

DynamicObjectInitialiseAsACube(cubes(i),0,0,0, 1)

DynamicObjectSetPosition(cubes(i),-10+i*2,20,0)

DynamicObjectSetRestitution(cubes(i),-0.4+i*0.1333)

PhysicsAddDynamicObject cubes(i)

next

' create a static ground (25m x 25m)

PhysicsAddStaticGround(25)

' render and simulation loop

dim as integer frames

while inkey=""

' one step in simulation

PhysicsUpdate(1.0/75.0)

if frames mod 3=0 then

glClear GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT

glLoadIdentity

glTranslatef 0,-3,-20

' draw all objects (only in debug mode)

PhysicsRender()

flip

end if

Sleep(10)

frames+=1

wend

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Easy CHM and documentation editor


Related Pages

True Axis Wrapper Related Pages

Here is a list of all related documentation pages:

  • How to use the True Axis Wrapper
  • Units
  • Glossary
  • Physics solvers
  • Commands

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Full featured Documentation generator


How to use the True Axis Physics SDK

How to use the True Axis Wrapper

How to create a new physics simulation.

  • Creating and managing a physics simulation is done though the class Physics .

How to add objects to the simulation.

  • See StaticObject and DynamicObject for information on how to create and add objects to the physics simulation. These objects must be added to the simulation using the class Physics . DynamicObject should be used for all physically interactive objects. StaticObject is provided for the representation of the static scenery. (StaticObject now just wraps dynamic object. All static object functionality is now provided through dynamic object.)

How to create collision geometry.

  • Collision objects can be spit into two groups:
  • Dynamic object collision geometry.
    An DynamicObject can be created with a collision object of type CollisionObjectCombo . Combo objects can be create with any combination of objects inheriting from CollisionObjectSimple :
  • CollisionObjectConvex
  • CollisionObjectCapsule
  • CollisionObjectCylinder
  • CollisionObjectSphere
  • CollisionObjectLineList

See the class documentation of these types for information on how to use them.

  • Static object collision geometry.
    An StaticObject can be created with a collision object that implement the type CollisionObjectComplex . see at class CollisionObjectAABBMesh .

Static objects can collide with dynamic objects but not other static objects. Dynamic objects can collide with both other dynamic objects and static objects. All collision objects inherit from CollisionObject .

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Free Web Help generator


Units

Units

A list of units used by the True Axis Wrapper for different properties.

  • Distance:
  • meters (m).
  • Mass:
  • kilograms (kg).
  • Time:
  • seconds (s).
  • Velocity:
  • meters per seconds squared (m/s).
  • Acceleration:
  • meters per seconds squared (m/s2).
  • Impulse:
  • kilogram meters per second (kg.m/s).
  • Force:
  • kilogram meters per second squared (kg.m/s2) or newtons (N).
  • Rotational inertia:
  • kilogram meters squared (kg. m2).
  • Torque:
  • newton meters (N.m).

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Easily create PDF Help documents


Glossary

Glossary

  • Angular velocity:
  • Angular velocity gives the rate of change for an object orientation. In the True Axis Physics Wrapper, angular velocity is usually represented by an TA_Vec3 . The direction of the vector gives the axis of rotation. The magnitude of the vector gives the rate of rotation in radians per second (rad/s).
  • Collision grid:
  • The True Axis Physics Wrapper can use either a collision grid , an octree or a ctree to find potential collisions between a large number of moving objects.

The True Axis Physics Wrapper uses the term collision grid to describe a 2D grid used to separate space. Objects are placed into grid segments based on there location. When an object is moved, only near by grid segments need to be checked for other objects that could cause a collision. This way, the simulation can easily cope with thousands of dynamic objects. A collision grid has the advantage of being very fast for level layouts that can be represented well by a 2D map.

Sometimes, a 2D grid may not do a good job of dividing the world. The collision grid solution has problems with dynamic objects that are larger than a grid segment. The collision grid copes best with a world containing evenly distributed objects. Large sparse areas with small pockets of tightly packet objects are less ideal. A 2D grid may not work well with a highly 3D environment. The octree and ctree methods provides an alternative solution that avoids these problems.

  • CTree:
  • The True Axis Physics Wrapper can use either a collision grid , an octree or a ctree to find potential collisions between a large number of moving objects.

A ctree is a spacial division structure. It is a new type of spacial division structure developed by True Axis. It is basically a modified version of an octree . It is called a c-tree because it was an attempt to make a compressed octree. In sparce environments, Octrees may contain a lot of nodes that only contain one Child. In CTree removes all these nodes by adding extra information to each node to specify its world location.

CTrees have the advantage of being more efficient in sparce environments then an octree . Also, the number of maximum internal nodes required for a ctree is equal to the number of objects minus one. This means that memory usage is predictable. Unlike octrees and collision grids, the user does not need to specify the amount of memory required.

CTrees may be more efficient in some situations then octrees. Some experimentation by the user may be necessary to find which suits them better.

  • Fast solver:
  • True Axis has two solvers for calculating physics response the slow solver and the fast solver. See Solvers
  • Impulse:
  • An impulse is similar to a force, but where a force has an effect over time, an impulse is instantaneous. The units are in kg.m/s. The True Axis Physics Wrapper deals mostly with impulses rather than forces.
  • Inertia tensor:
  • As used in the True Axis Physics Wrapper, an inertia tensor is a 3 by 3 matrix representation of rotational inertia. The inertia tensor of an object affects how that object's angular velocity responds to forces and impulses. The value controls how the collision response of a cube is different to that of a long thin pole.

The relationship between the inertia tensor and angular velocity is equivalent to the relationship between mass and linear velocity . The inertia tensor however, rotates with the object, where as mass is not affected by rotation.

  • Linear velocity:
  • Linear velocity gives the rate and direction of movement for an object's center of mass. In the True Axis Physics Wrapper, linear velocity is usually represented by an TA_Vec3 . The magnitude of the vector gives the objects speed in meters per second (m/s).
  • Movement propagation:
  • Movement propagation is the name give to the method that the True Axis Physics Wrapper uses to manage the number of moving and resting objects. A list of moving objects is kept to save processing power. Only objects in this moving list are updated and tested for collisions. With movement propagation, objects are only added to the moving list when there is a high probability of movement due to an external collision.

By default, movement propagation is enabled. However, if movement propagation is disabled, then, if one object in a group of touching objects is moving, then the entire group will be added to the moving list. This will typically result in a large number objects in the moving list that that are not actually moving. This is because, although an object is set to moving, the sum of forces applied to it may not be enough to actually move it.

If movement propagation is on, only touching objects that have a high probability of being affected by moving objects are added to the moving list. This means that the number of moving objects can be kept much lower and larger numbers of touching objects can be handled more effectively. The cost of this is that movement propagation may occasionally cause some unrealistic results.

Movement propagation is most useful when the number of touching objects is far greater then the maximum number of moving objects. In this case, if movement propagation is off, the max number of moving objects will be met, after which point, the simulation will start to fail. With movement propagation on, this situation is handled more gracefully. Only the fastest moving objects and objects with the strongest collisions are added and kept in the moving list.

  • Octree:
  • The True Axis Physics Wrapper can use either a collision grid , an octree or a ctree to find potential collisions between a large number of moving objects.

An octree is a spacial division structure. Each node in the tree is represented by a cube. A nodes children are created by dividing the cube into eight equally sized pieces.

The octree implementation has a number of advantages over the collision grid implementation, but the collision grid method may often be faster. See collision grid for more information.

  • Reference Counting:
  • Reference counting if often used on objects in the True Axis Physics Wrapper. Reference counting allows multiple references to be taken to a pointer and automatically cleans up when the last reference is released.

After a reference counted object is created it will have a reference count of one. AddRef() and Release() can be called to increment and decrement the reference count. If the reference count is zero after a call to Release() the object will be automatically deleted. Reference counted objects should only be created using new.

  • Slow solver:
  • True Axis has two solvers for calculating physics response the slow solver and the fast solver. See Solvers
  • Swept collision testing:
  • Most collision detection implementations are only capable of testing if two objects are currently intersecting. An object is moved to its new position than at which point it may be intersecting something or have totally moved through something. The faster an object moves, the more problematic this method becomes. One solution is to decrease the time number of time steps for fast moving objects but this can be slow.

The True Axis Physics Wrapper performs swept collision testing. By this we mean that all collision that occur during an objects movement can be found. As an approximation of reality, the True Axis Physics Wrapper finds all of the collisions that will occur in a time step and applies them all at ones. Multiple collisions passes are performed in a single time step to help cope with sudden velocity changes due to collisions. A single pass of this method of collision testing is slower than intersection testing but less passes are needed for accuracy so it can be potentially faster overall. Because swept collision testing is not need when object are moving slowly, it is turned off in these cases to improve execution speed.

The end result of the use of swept collision testing is that the True Axis Physics Wrapper copes well with very fast moving objects where other simulations have problems or even fail totally.

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Easily create PDF Help documents


Physics solvers

Physics solvers

The True Axis Physics Wrapper has two different of calculating the forces that result from collisions. These are referred to as the fast solver and the slow solver.

  • Slow Solver
  • The slow solver uses a complex method for calculating the response to collisions involving groups of objects. The method is balanced between realism and speed. It attempts to uphold Newtons laws of motion so that objects would approximately behave as they in the real world. Although this method is fast for a small number of objects and collisions it does not scale up efficiently. It becomes impractically slow and memory hungry for real time physics when approaching 100s of objects with 1000s of collisions between them. Although it provides an accurate response in most situations, it can sometimes be unpredictably unstable. In these cases, the True Axis Physics SDK falls back to the fast solver.

For those with further interest, the slow solver is extended from Dantzig’s algorithm. It differers from many other implementations and literature by being impulse based rather then force based.

  • Fast Solver
  • The fast solver is designed with the goal of speed and uses "smoke and mirror" tricks rather then approximating real world physics to achieve this. By not aiming to provide a physically accurate response in all situations, the fast solver is can use algorithms that produce results that appear real to the naked eye in most situations, yet are efficient and scalable. The fast solver can handle 1000s of collisions at once comfortably in real time.

For those with further interest, the fast solver uses collision ordering and shock propagation methods.

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Create HTML Help, DOC, PDF and print manuals from 1 single source


Commands

List of all True Axis Wrapper Commands

AABBAdd

AABBAddFrom

AABBExpandToFit

AABBInitialise

AABBInitialiseToFit2Points

AABBIntersecs

AABBIntersecsPoint

AABBIsInside

AABBRotate

AABBRotateFrom

AABBScale

AABBScaleFrom

AABBSwap

CarTemplateAddCollisionObjectCapsule

CarTemplateAddCollisionObjectConvex

CarTemplateAddCollisionObjectCylinder

CarTemplateAddCollisionObjectSphere

CarTemplateAddWheel

CarTemplateBeginInitialise

CarTemplateCreateNew

CarTemplateEndInitialise

CarTemplateGetAirResistance

CarTemplateGetAntiRollFudge

CarTemplateGetDifferentialRatio

CarTemplateGetDownForce

CarTemplateGetForward

CarTemplateGetGearRatio

CarTemplateGetMass

CarTemplateGetNumGears

CarTemplateGetTorqueMultiplier

CarTemplateGetTransmissionEfficiency

CarTemplateGetUp

CarTemplateRelease

CarTemplateSetAirResistance

CarTemplateSetAntiRollFudge

CarTemplateSetDifferentialRatio

CarTemplateSetDownForce

CarTemplateSetGearRatio

CarTemplateSetMass

CarTemplateSetNumGears

CarTemplateSetOrientation

CarTemplateSetTorqueMultiplier

CarTemplateSetTransmissionEfficiency

CarTemplateV3GetForward

CarTemplateV3GetUp

CarTemplateV3SetOrientation

CarTemplateWheelClear

CarTemplateWheelGetBrakeTorque

CarTemplateWheelGetDrivingFlag

CarTemplateWheelGetHandBrakeFlag

CarTemplateWheelGetInertia

CarTemplateWheelGetRadius

CarTemplateWheelGetRollResistance

CarTemplateWheelGetSteeringFlag

CarTemplateWheelGetSuspensionBottom

CarTemplateWheelGetSuspensionDampingConstant

CarTemplateWheelGetSuspensionSpringConstant

CarTemplateWheelGetSuspensionTop

CarTemplateWheelSetBrakeTorque

CarTemplateWheelSetDrivingFlag

CarTemplateWheelSetHandBrakeFlag

CarTemplateWheelSetInertia

CarTemplateWheelSetRadius

CarTemplateWheelSetRollResistance

CarTemplateWheelSetSteeringFlag

CarTemplateWheelSetSuspensionBottom

CarTemplateWheelSetSuspensionDampingConstant

CarTemplateWheelSetSuspensionSpringConstant

CarTemplateWheelSetSuspensionTop

CarTemplateWheelV3GetSuspensionBottom

CarTemplateWheelV3GetSuspensionTop

CarTemplateWheelV3SetSuspensionBottom

CarTemplateWheelV3SetSuspensionTop

CollisionOccurred

CollisionGetAttributeA

CollisionGetAttributeB

CollisionGetFlags

CollisionGetFrictionCoefficient

CollisionGetImpulse

CollisionGetIntersectingDepth

CollisionGetJoint

CollisionGetNormal

CollisionGetObjectA

CollisionGetObjectB

CollisionGetPosition

CollisionGetRestitution

CollisionGetTime

CollisionIsJoint

CollisionIsObjectA

CollisionIsObjectB

CollisionObjectAABBMeshAddPolygon

CollisionObjectAABBMeshAddVertex

CollisionObjectAABBMeshCreateNew

CollisionObjectAABBMeshFinishedAddingGeometry

CollisionObjectAABBMeshGetUserData

CollisionObjectAABBMeshInitialise

CollisionObjectAABBMeshRelease

CollisionObjectAABBMeshRender

CollisionObjectAABBMeshSetUserData

CollisionObjectAABBMeshV3AddVertex

CollisionObjectCapsuleCreateNew

CollisionObjectCapsuleGetPointA

CollisionObjectCapsuleGetPointB

CollisionObjectCapsuleGetRadius

CollisionObjectCapsuleInitialise

CollisionObjectCapsuleRelease

CollisionObjectCapsuleV3GetPointA

CollisionObjectCapsuleV3GetPointB

CollisionObjectCapsuleV3Initialise

CollisionObjectComboAABBInitialiseAsABox

CollisionObjectComboAABBInitialiseAsAnOrientedBox

CollisionObjectComboAddCollisionObject

CollisionObjectComboCreateNew

CollisionObjectComboGetNumCollisionObjects

CollisionObjectComboInitialise

CollisionObjectComboInitialiseAsABox

CollisionObjectComboInitialiseAsACapsule

CollisionObjectComboInitialiseAsACube

CollisionObjectComboInitialiseAsACylinder

CollisionObjectComboInitialiseAsASphere

CollisionObjectComboInitialiseAsAnOrientedBox

CollisionObjectComboInitialiseAsAnOrientedCube

CollisionObjectComboRelease

CollisionObjectComboRemoveCollisionObject

CollisionObjectComboV3InitialiseAsABox

CollisionObjectComboV3InitialiseAsACapsule

CollisionObjectComboV3InitialiseAsACube

CollisionObjectComboV3InitialiseAsACylinder

CollisionObjectComboV3InitialiseAsASphere

CollisionObjectComboV3InitialiseAsAnOrientedBox

CollisionObjectComboV3InitialiseAsAnOrientedCube

CollisionObjectConvexAABBInitialiseAsABox

CollisionObjectConvexAABBInitialiseAsAnOrientedBox

CollisionObjectConvexCreateNew

CollisionObjectConvexInitialiseAsABox

CollisionObjectConvexInitialiseAsACube

CollisionObjectConvexInitialiseAsAnOrientedBox

CollisionObjectConvexInitialiseAsAnOrientedCube

CollisionObjectConvexInitialiseFromPointList

CollisionObjectConvexRelease

CollisionObjectConvexTransform

CollisionObjectConvexTransformD

CollisionObjectConvexV3InitialiseAsABox

CollisionObjectConvexV3InitialiseAsACube

CollisionObjectConvexV3InitialiseAsAnOrientedBox

CollisionObjectConvexV3InitialiseAsAnOrientedCube

CollisionObjectConvexV3InitialiseFromPointList

CollisionObjectV3ConvexTransform

CollisionObjectV3ConvexTransformD

CollisionObjectCylinderCreateNew

CollisionObjectCylinderGetPointA

CollisionObjectCylinderGetPointB

CollisionObjectCylinderGetRadius

CollisionObjectCylinderInitialise

CollisionObjectCylinderRelease

CollisionObjectCylinderV3GetPointA

CollisionObjectCylinderV3GetPointB

CollisionObjectCylinderV3Initialise

CollisionObjectGetCollisionObjectType

CollisionObjectLineListCreateNew

CollisionObjectLineListGetNumLines

CollisionObjectLineListInitialise

CollisionObjectLineListRelease

CollisionObjectLineListSetLine

CollisionObjectLineListV3Initialise

CollisionObjectLineListV3SetLine

CollisionObjectSphereCreateNew

CollisionObjectSphereGetPoint

CollisionObjectSphereGetRadius

CollisionObjectSphereInitialise

CollisionObjectSphereRelease

CollisionObjectSphereV3GetPoint

CollisionObjectSphereV3Initialise

CollisionV3GetNormal

CollisionV3GetPosition

DynamicObjectAABBInitialiseAsABox

DynamicObjectAABBInitialiseAsAnOrientedBox

DynamicObjectAccumulateForceAndTorque

DynamicObjectAccumulateGravity

DynamicObjectAccumulateLinearForce

DynamicObjectAddJoint

DynamicObjectAddWorldJoint

DynamicObjectAdjustLineCollisionFromNextFrame

DynamicObjectAllowCollisionWithUserGroupItemId

DynamicObjectApplyAngularImpulse

DynamicObjectApplyForceAndTorqueToVelocities

DynamicObjectApplyImpulse

DynamicObjectApplyLinearImpulse

DynamicObjectApplyNextFrame

DynamicObjectApplyVelocityFromNextFrame

DynamicObjectApplyVelocityToNextFrame

DynamicObjectAssertForceAndTorqueCleared

DynamicObjectCarClearControls

DynamicObjectCarCreateNew

DynamicObjectCarGetAntiRollFudge

DynamicObjectCarGetForward

DynamicObjectCarGetFrame

DynamicObjectCarGetGear

DynamicObjectCarGetNumGears

DynamicObjectCarGetNumWheels

DynamicObjectCarGetRPM

DynamicObjectCarGetSpeed

DynamicObjectCarGetSpeedFromVelocity

DynamicObjectCarGetSpeedFromWheels

DynamicObjectCarGetTorqueMultiplier

DynamicObjectCarGetUp

DynamicObjectCarInitialise

DynamicObjectCarRelease

DynamicObjectCarSetAntiRollFudge

DynamicObjectCarSetOrientation

DynamicObjectCarSetTorqueMultiplier

DynamicObjectCarUpdateControls

DynamicObjectCarV3GetForward

DynamicObjectCarV3GetUp

DynamicObjectCarV3SetOrientation

DynamicObjectCarWheelGetBrakeTorque

DynamicObjectCarWheelGetCamberAngle

DynamicObjectCarWheelGetCollisionAttribute

DynamicObjectCarWheelGetCollisionFlag

DynamicObjectCarWheelGetDrivingFlag

DynamicObjectCarWheelGetFrame

DynamicObjectCarWheelGetHandBrakeFlag

DynamicObjectCarWheelGetInvInertia

DynamicObjectCarWheelGetLocalFrame

DynamicObjectCarWheelGetLocalOpenGLFrame

DynamicObjectCarWheelGetLocalOpenGLMatrix

DynamicObjectCarWheelGetLocalPosition

DynamicObjectCarWheelGetLocalRotation

DynamicObjectCarWheelGetLocalRotationD

DynamicObjectCarWheelGetPitch

DynamicObjectCarWheelGetPitchVelocity

DynamicObjectCarWheelGetRadius

DynamicObjectCarWheelGetRollResistance

DynamicObjectCarWheelGetSteeringFlag

DynamicObjectCarWheelGetSuspensionDampingConstant

DynamicObjectCarWheelGetSuspensionSpringConstant

DynamicObjectCarWheelGetYaw

DynamicObjectCarWheelMultLocalOpenGLMatrix

DynamicObjectCarWheelMultOpenGLMatrix

DynamicObjectCarWheelSetBrakeTorque

DynamicObjectCarWheelSetCamberAngle

DynamicObjectCarWheelSetDrivingFlag

DynamicObjectCarWheelSetHandBrakeFlag

DynamicObjectCarWheelSetInvInertia

DynamicObjectCarWheelSetPitch

DynamicObjectCarWheelSetPitchVelocity

DynamicObjectCarWheelSetRadius

DynamicObjectCarWheelSetRollResistance

DynamicObjectCarWheelSetSteeringFlag

DynamicObjectCarWheelSetSuspensionDampingConstant

DynamicObjectCarWheelSetSuspensionSpringConstant

DynamicObjectCarWheelSetYaw

DynamicObjectCarWheelV3GetLocalPosition

DynamicObjectClearForceAndTorque

DynamicObjectClearLineIntersections

DynamicObjectCreateNew

DynamicObjectCreateUserGroup

DynamicObjectDisallowCollisionWithUserGroupItemId

DynamicObjectGetAngularVelocity

DynamicObjectGetCenterOfMass

DynamicObjectGetCenterOffset

DynamicObjectGetFindVelocityFromNextFrame

DynamicObjectGetFrame

DynamicObjectGetFrameRotation

DynamicObjectGetFrameRotationTransposeAsInverse

DynamicObjectGetFrameRotationV3X

DynamicObjectGetFrameRotationV3Y

DynamicObjectGetFrameRotationV3Z

DynamicObjectGetFriction

DynamicObjectGetGraphicsFrame

DynamicObjectGetGravityMult

DynamicObjectGetInverseMass

DynamicObjectGetLineCollision

DynamicObjectGetLinearVelocity

DynamicObjectGetMass

DynamicObjectGetNextCenterOfMass

DynamicObjectGetNextFrame

DynamicObjectGetNextFrameRotation

DynamicObjectGetNextFrameRotationV3X

DynamicObjectGetNextFrameRotationV3Y

DynamicObjectGetNextFrameRotationV3Z

DynamicObjectGetNumLineCollisions

DynamicObjectGetOpenGLFrame

DynamicObjectGetOpenGLMatrix

DynamicObjectGetPosition

DynamicObjectGetPreviousFrame

DynamicObjectGetRestTimeMultiplier

DynamicObjectGetRestitution

DynamicObjectGetRotation

DynamicObjectGetRotationD

DynamicObjectGetUserData

DynamicObjectGetUserGroup

DynamicObjectGetUserGroupItemId

DynamicObjectGetVelocityAtWorldPosition

DynamicObjectGetWorldAABB

DynamicObjectInitialise

DynamicObjectInitialiseAsABox

DynamicObjectInitialiseAsACapsule

DynamicObjectInitialiseAsACube

DynamicObjectInitialiseAsACylinder

DynamicObjectInitialiseAsASphere

DynamicObjectInitialiseAsAnOrientedBox

DynamicObjectInitialiseAsAnOrientedCube

DynamicObjectIsAllDampingDisabled

DynamicObjectIsAllowedToCollideWith

DynamicObjectIsCollisionDisabled

DynamicObjectIsExtraStability

DynamicObjectIsForceFastSolverEnabled

DynamicObjectIsGhost

DynamicObjectIsInMovingList

DynamicObjectIsInfiniteMass

DynamicObjectIsMovementDisabled

DynamicObjectIsRigidFrictionDisabled

DynamicObjectIsRotationDisabled

DynamicObjectIsUpdateDisabled

DynamicObjectIsVisible

DynamicObjectIsWorldObject

DynamicObjectLineCollisionsGetAttribute

DynamicObjectLineCollisionsGetCollisionObject

DynamicObjectLineCollisionsGetCollisionObjectType

DynamicObjectLineCollisionsGetDynamicObject

DynamicObjectLineCollisionsGetIntersectionDepth

DynamicObjectLineCollisionsGetNormal

DynamicObjectLineCollisionsGetPosition

DynamicObjectLineCollisionsGetWorldPosition

DynamicObjectLineCollisionsV3GetNormal

DynamicObjectLineCollisionsV3GetPosition

DynamicObjectLineCollisionsV3GetWorldPosition

DynamicObjectMultOpenGLMatrix

DynamicObjectRelease

DynamicObjectRemoveAllJoints

DynamicObjectRemoveJoint

DynamicObjectRotate

DynamicObjectSetAllDampingDisabled

DynamicObjectSetAngularVelocity

DynamicObjectSetCenterOffset

DynamicObjectSetCollisionDisabled

DynamicObjectSetExtraStability

DynamicObjectSetFindVelocityFromNextFrame

DynamicObjectSetForceFastSolverEnabled

DynamicObjectSetFrame

DynamicObjectSetFrameDirect

DynamicObjectSetFriction

DynamicObjectSetGhost

DynamicObjectSetGravityMult

DynamicObjectSetInfiniteMass

DynamicObjectSetLinearVelocity

DynamicObjectSetMass

DynamicObjectSetMovementDisabled

DynamicObjectSetPosition

DynamicObjectSetRestTimeMultiplier

DynamicObjectSetRestitution

DynamicObjectSetRigidFrictionDisabled

DynamicObjectSetRotation

DynamicObjectSetRotationD

DynamicObjectSetRotationDisabled

DynamicObjectSetToMoving

DynamicObjectSetToResting

DynamicObjectSetUpdateDisabled

DynamicObjectSetUserData

DynamicObjectSetUserGroup

DynamicObjectSetUserGroupItemId

DynamicObjectSetVisible

DynamicObjectTankClearControls

DynamicObjectTankCreateNew

DynamicObjectTankInitialise

DynamicObjectTankRelease

DynamicObjectTankUpdateControls

DynamicObjectTemplateCreateNew

DynamicObjectTemplateInitialise

DynamicObjectTemplateRelease

DynamicObjectTransform

DynamicObjectUpdate

DynamicObjectUpdateWorldSpaceInertialTensor

DynamicObjectV3AccumulateForceAndTorque

DynamicObjectV3AccumulateLinearForce

DynamicObjectV3ApplyAngularImpulse

DynamicObjectV3ApplyImpulse

DynamicObjectV3ApplyLinearImpulse

DynamicObjectV3GetAngularVelocity

DynamicObjectV3GetCenterOffset

DynamicObjectV3GetLinearVelocity

DynamicObjectV3GetPosition

DynamicObjectV3GetVelocityAtWorldPosition

DynamicObjectV3InitialiseAsABox

DynamicObjectV3InitialiseAsACapsule

DynamicObjectV3InitialiseAsACube

DynamicObjectV3InitialiseAsACylinder

DynamicObjectV3InitialiseAsASphere

DynamicObjectV3InitialiseAsAnOrientedBox

DynamicObjectV3InitialiseAsAnOrientedCube

DynamicObjectV3Rotate

DynamicObjectV3SetAngularVelocity

DynamicObjectV3SetCenterOffset

DynamicObjectV3SetLinearVelocity

DynamicObjectV3SetPosition

DynamicObjectV3Transform

MFrameDiv

MFrameDivFrom

MFrameIdentity

MFrameInitialiseAxisAngle

MFrameInitialiseAxisAngleD

MFrameInitialiseEulerAngles

MFrameInitialiseEulerAnglesD

MFrameInitialiseRotationAxis

MFrameInterpolate

MFrameInverseFrom

MFrameInvert

MFrameMul

MFrameMulFrom

MFrameMulMat

MFrameMulMatFrom

MFrameSwap

Mat33Add

Mat33Div

Mat33DivMat

Mat33DivMatFrom

Mat33GetInverseFrom

Mat33GetRotationAxisAndMagnitude

Mat33GetTransposeAsInverse

Mat33GetTransposeAsInverseFrom

Mat33Identity

Mat33InitialiseAxisAngle

Mat33InitialiseEulerAngles

Mat33InitialiseEulerAnglesD

Mat33InitialiseRotationAxis

Mat33Interpolate

Mat33Invert

Mat33Mul

Mat33MulMat

Mat33MulMatFrom

Mat33PreRotate

Mat33SetToLoockDownVector

Mat33SetToLookAt

Mat33Sub

Mat33Swap

PhysicsAABBForAllIntersectingObjects

PhysicsAABBGetWorldDimensions

PhysicsAABBSetWorldDimensions

PhysicsAABBWakeUpAllIntersectingObjects

PhysicsAddDynamicObject

PhysicsAddStaticGround

PhysicsAddStaticObject

PhysicsAddSurfaceAttribute

PhysicsCreateInstance

PhysicsDestroyInstance

PhysicsForAllIntersectingObjects

PhysicsGetGravity

PhysicsGetMaxNumCollisions

PhysicsGetMaxNumMovingObjects

PhysicsGetMaxNumObjectPairs

PhysicsGetNumSurfaceAttributes

PhysicsGetSlowSolverMaxNumCollisions

PhysicsGetSlowSolverMaxNumObjects

PhysicsGetSpacialDivisionType

PhysicsGetWorldDimensions

PhysicsIsMovementPropagationEnabled

JointLimitDisabled

PhysicsJointGetBreakForce

PhysicsJointGetCenterDirectionOnObjectA

PhysicsJointGetCenterDirectionOnObjectB

PhysicsJointGetJointOrientationA

PhysicsJointGetJointOrientationB

PhysicsJointGetLimitNormalOnObjectA

PhysicsJointGetLimitNormalOnObjectB

PhysicsJointGetMaxAngle

PhysicsJointGetMaxAngles

PhysicsJointGetMinAngles

PhysicsJointGetObjectA

PhysicsJointGetObjectB

PhysicsJointGetPosOnObjectA

PhysicsJointGetPosOnObjectB

PhysicsJointGetSliderPos0

PhysicsJointGetSliderPos1

PhysicsJointGetType

PhysicsJointGetUserData

PhysicsJointInitialiseBallAndSocket

PhysicsJointInitialiseEulerConstraint

PhysicsJointInitialiseHinge

PhysicsJointInitialiseLimitedBallAndSocket

PhysicsJointInitialiseRotationConstraint

PhysicsJointInitialiseSlider

PhysicsJointInitialiseSquareSocket

PhysicsJointInitialiseVectorConstraint

PhysicsJointIsBreakable

PhysicsJointIsBroken

PhysicsJointIsCollisionDisabledBetweenObjects

PhysicsJointIsObjectASolid

PhysicsJointIsObjectBSolid

PhysicsJointMat33GetJointOrientationA

PhysicsJointMat33GetJointOrientationB

PhysicsJointSetBreakForce

PhysicsJointSetBreakable

PhysicsJointSetBroken

PhysicsJointSetCollisionDisabledBetweenObjects

PhysicsJointSetObjectASolid

PhysicsJointSetObjectBSolid

PhysicsJointSetUserData

PhysicsJointV3GetCenterDirectionOnObjectA

PhysicsJointV3GetCenterDirectionOnObjectB

PhysicsJointV3GetLimitNormalOnObjectA

PhysicsJointV3GetLimitNormalOnObjectB

PhysicsJointV3GetPosOnObjectA

PhysicsJointV3GetPosOnObjectB

PhysicsJointV3GetSliderPos0

PhysicsJointV3GetSliderPos1

PhysicsJointV3InitialiseBallAndSocket

PhysicsJointV3InitialiseEulerConstraint

PhysicsJointV3InitialiseHinge

PhysicsJointV3InitialiseLimitedBallAndSocket

PhysicsJointV3InitialiseSlider

PhysicsJointV3InitialiseSquareSocket

PhysicsJointV3InitialiseVectorConstraint

PhysicsObjectAddedToPhysics

PhysicsPostCollisionGetNext

PhysicsRemoveDynamicObject

PhysicsRemoveStaticObject

PhysicsRemoveSurfaceAttribute

PhysicsRender

PhysicsRenderBoundingBoxes

PhysicsSetDynamicObjectIsMoving

PhysicsSetDynamicVsDynamicCollisionTestCallBack

PhysicsSetGravity

PhysicsSetMaxNumCollisions

PhysicsSetMaxNumMovingObjects

PhysicsSetMaxNumObjectPairs

PhysicsSetMovementPropagationEnabled

PhysicsSetOnBrokenJointCallBack

PhysicsSetOnMovingCallBack

PhysicsSetOnRestingCallBack

PhysicsSetPostProcessCollisionCallBack

PhysicsSetPreProcessCollisionCallBack

PhysicsSetSlowSolverMaxNumCollisions

PhysicsSetSlowSolverMaxNumObjects

PhysicsSetSpacialDivisionType

PhysicsSetWorldDimensions

PhysicsSetupSimulation

PhysicsTestLineForCollision

PhysicsTestRayForCollision

PhysicsUpdate

PhysicsV3ForAllIntersectingObjects

PhysicsV3GetGravity

PhysicsV3GetWorldDimensions

PhysicsV3SetGravity

PhysicsV3SetWorldDimensions

PhysicsV3TestLineForCollision

PhysicsV3TestRayForCollision

PhysicsV3WakeUpAllIntersectingObjects

PhysicsWakeUpAllIntersectingObjects

PostCollisionGetAttributeA

PostCollisionGetAttributeB

PostCollisionGetFlags

PostCollisionGetImpulse

PostCollisionGetIntersectingDepth

PostCollisionGetJoint

PostCollisionGetNormal

PostCollisionGetObjectA

PostCollisionGetObjectB

PostCollisionGetPosition

PostCollisionIsJoint

PostCollisionIsObjectA

PostCollisionIsObjectB

PostCollisionV3GetNormal

PostCollisionV3GetPosition

PreCollisionGetAttributeA

PreCollisionGetAttributeB

PreCollisionGetFlags

PreCollisionGetFrictionCoefficient

PreCollisionGetIntersectingDepth

PreCollisionGetJoint

PreCollisionGetNext

PreCollisionGetNormal

PreCollisionGetObjectA

PreCollisionGetObjectB

PreCollisionGetPosition

PreCollisionGetRestitution

PreCollisionIsJoint

PreCollisionIsObjectA

PreCollisionIsObjectB

PreCollisionV3GetNormal

PreCollisionV3GetPosition

StaticObjectCreateNew

StaticObjectGetCollisionObject

StaticObjectGetDynamicObject

StaticObjectGetPosition

StaticObjectGetRotation

StaticObjectGetUserData

StaticObjectInitialise

StaticObjectIsVisible

StaticObjectRelease

StaticObjectRender

StaticObjectSetPosition

StaticObjectSetRotation

StaticObjectSetUserData

StaticObjectSetVisible

StaticObjectV3GetPosition

StaticObjectV3SetPosition

SurfaceAttributeGetCollisionFriction

SurfaceAttributeGetRestitution

SurfaceAttributeGetUserData

SurfaceAttributeSetCollisionFriction

SurfaceAttributeSetRestitution

SurfaceAttributeSetUserData

TA_ACos

TA_ATan2

TA_Abs

TA_Clamp

TA_ClampIfGreaterThen

TA_ClampIfLessThen

TA_ClampPosNeg

TA_Cos

TA_CubicInterpolate

TA_CubicInterpolateGradient

TA_CubicInterpolateVec3

TA_Exp

TA_FMod

TA_Fabs

TA_FastFloatToInt

TA_FastMax

TA_FastMin

TA_FindClosestPointOnLine

TA_FindClosestPointOnLineToLine

TA_FindClosestPointOnLineToLineUnClamped

TA_FindClosestPointOnLineUnClamped

TA_FindShortestDistanceToLine

TA_FindShortestDistanceToLineSqrd

TA_FloatIsOk

TA_Log

TA_Max

TA_Min

TA_Pow

TA_Pow2

TA_ReciprocalSqrt

TA_Sign

TA_SignsEqual

TA_Sin

TA_SinAndCos

TA_Sqrt

TA_Tan

TA_WrapAngle

Vec3Add

Vec3AddFrom

Vec3CrossFrom

Vec3CrossFromEdges

Vec3CrossWith

Vec3Div

Vec3DivFrame

Vec3DivFrameFrom

Vec3DivFrom

Vec3DivMat

Vec3DivMatFrom

Vec3FaceNormal

Vec3GetDistance

Vec3GetDistanceSqrd

Vec3GetDot

Vec3GetDotWith

Vec3GetMagnitude

Vec3GetMagnitudeSqrd

Vec3GetNormal

Vec3IsEqualWithInError

Vec3IsNormalised

Vec3Mul

Vec3MulAdd2

Vec3MulAdd3

Vec3MulFrame

Vec3MulFrameFrom

Vec3MulFrom

Vec3MulMat

Vec3MulMatFrom

Vec3Normalise

Vec3Sub

Vec3SubFrom

Vec3Swap

Copyright © 2015

Created with the Freeware Edition of HelpNDoc: Easily create Help documents