True Axis Physics SDK 1.2.0.1 Beta Documentation
www.trueaxis.com

void TA::Physics::SetSpacialDivisionType (
SpacialDivisionType   eSpacialDivisionType  )
 

Call this function to set the type of spacial sub division used by the True Axis Physics SDK. Valid values are:

  • TA::Physics::SPACIAL_DIVISION_TYPE_DYNAMIC_OCTREE
  • TA::Physics::SPACIAL_DIVISION_TYPE_XY_COLLISION_GRID
  • TA::Physics::SPACIAL_DIVISION_TYPE_XZ_COLLISION_GRID
  • TA::Physics::SPACIAL_DIVISION_TYPE_YZ_COLLISION_GRID.

The True Axis Physics SDK uses spacial division data structures to speed up collision testing between large numbers of dynamic objects.

  • TA::Physics::SPACIAL_DIVISION_TYPE_XY_COLLISION_GRID
  • TA::Physics::SPACIAL_DIVISION_TYPE_XZ_COLLISION_GRID
  • TA::Physics::SPACIAL_DIVISION_TYPE_YZ_COLLISION_GRID. Specifies a collision grid and the plane it will lay in. See collision grid for more information. Is is most often best to use a horizontal collision grid. So if Y is up, FLAG_XZ_COLLISION_GRID, is probably best.
  • TA::Physics::SPACIAL_DIVISION_TYPE_DYNAMIC_OCTREE Specifies that a dynamic octree should be used. Dynamic octrees are more flexible than collision grids. Octrees better fit worlds that are highly 3D or are very unevenly distributed with objects. The octree implementation also better handles large size ranges in dynamic objects. Whether a collision grid or an octree is faster or better is dependant on the world being simulated.

The default value is TA::Physics::SPACIAL_DIVISION_TYPE_DYNAMIC_OCTREE.

Parameters:
eSpacialDivisionType
The new spacial division type.
See also:
TA::Physics::GetSpacialDivisionType,
TA::SetSpacialDivisionMinSize and
TA::SetSpacialDivisionMaxMemory.
Note:
Any changes to this value will not be made effective until a call to TA::Physics::SetupSimulation. Note that SetupSimulation is automatically called from TA::Physics::Update, TA::Physics::AddDynamicObject and TA::Physics::AddStaticObject. Calling TA::Physics::SetupSimulation may result memory reallocation and large processor overhead. Changing this value frequently will result in performance loss.



© Copyright 2004-2006 TRUE AXIS PTY LTD Australia. All rights reserved.