Provides functionality in the area of the relationship between the simulation and the physical engine.
SimiGon has developed infrastructure that intergrates with the NVidia PhysX physics engine. Several objects in the SIMbox base content use this mechanism and are simulated in the physics engine. When one of these objects is loaded, the simulation creates a single physical scene that contains the physical world. The physical simulation runs in parallel with the SIMbox simulation. Use the physics SDK to access the current physical scene, and the physical objects ("actors"), allowing you to get data from the different objects and to change their physical properties. Work with the physical objects and the physical scene using the PhysX physicsengine SDK. The PhysX SDK headers are supplies in the Physics SDK install. Access the physics SDK using the namespace SimApi::Physics. The SDK doesn't wrap the PhysX physics engine SDK. It offers functionality in the area of the relationship between the simulation objects and the physical engine actors. The simulation wraps the physX scene in a singleton class, assuring that only one physical scene is created. Every actor in the PhysX scene holds user-data with the entity name and the ID that it is connected to in the Simbox simulation. Based on the xml file that defines its physical properties, each simulation object can have one or more PhysX scene actors (for example, a Hummer will have the body + 4 Wheels - 5 actors).
Requires that you include sdk.Physics.h
Requires that you define NOMINMAX in the StdAfx.h of the using module, since the PhysX engine implements the min and max functions.
Public Class Members
|GetActorFromEntity||Overloaded. Additional information is available.|
|GetActorEntityNameAndId||Overloaded. Additional information is available.|
|GetPhysicsScene||Returns a pointer to the current physical scene. If none exists, creates one.|
|IsSceneNull||Checks if no physical scene was created in the simulation.|
|GetPhysicsSDK||Returns a pointer the PhysX SDK|
|ReleasePhysicsScene||Releases the physical scene|
|AddContactReport||Registers a contact-report-class instance in the PhysX scene, so each contact that occurs will call the OnContact callback in the supplied class instance.|
|RemoveContantReport||Removes a contact report class instance from the contact notifications list|
|GetTerrainMaterialIndex||Returns the material index IDs for the terrain actor|
|GetClosestHitPoint||Finds the closest hit point from a defined position, in a defined direction|
|GetClosestHitPointSpecificObjectType||Finds the closest hit point from a defined position, in a defined direction, on a defined simulation object type|
|GetClosestHitPointIgnoreSpecificObjectType||Finds the closest hit point from a defined position, in a defined direction, ignoring a defined simulation object type|