GeeXLab
Current version: 0.45.1
>GeeXLab homepage

FurMark
Current version: 1.30.0
>FurMark homepage

GPU Caps Viewer
Current version: 1.55.0.0
>GPU Caps Viewer homepage

GPU Shark
Current version: 0.26.0.0
>GPU Shark homepage


Blogs
>JeGX's HackLab

Geeks3D's Articles
>GPU Memory Speed Demystified

>Multi-Threading Programming Resources

>GeForce and Radeon OpenCL Overview

>How to Get your Multi-core CPU Busy at 100%

>How To Make a VGA Dummy Plug

>Night Vision Post Processing Filter

PhysX FluidMark
Current version: 1.5.4
>FluidMark homepage

TessMark
Current version: 0.3.0
>TessMark homepage

ShaderToyMark
Current version: 0.3.0
>ShaderToyMark homepage
>ShaderToyMark Scores

Demoniak3D
Current Version: 1.23.0
>Demoniak3D
>Download
>Libraries and Plugins
>Demos
>Online Help - Reference Guide
>Codes Samples
 
oZone3D.Net - Demoniak3D Developer Guide


» Back To Index

Demoniak3D/LUA API: Ageia PhysX Engine library

The HYP_Nx_Physics library makes it possible to interact on the objects of the 3d scene through the physical engine functions. The physical engine is the Ageia PhysX Engine (formerly NovodeX). For more information: http://www.ageia.com.

All the functions related to the Ageia PhysX Engine are prefixed with HYP_Nx _ where Nx is the abbreviation of NovodeX.

Within the Ageia PhysX Engine, the objects of the scene are called actors. Therefore, to remain coherent with the Ageia PhysX Engine, the functions that manipulate Hyperion objects will replace the "object" term by "actor".
HYP_Nx_Physics.AddBoxActorToScene
HYP_Nx_Physics.AddForceAtPosToActor
HYP_Nx_Physics.AddForceToActor
HYP_Nx_Physics.AddMeshActorToScene
HYP_Nx_Physics.AddSphereActorToScene
HYP_Nx_Physics.AddTorqueToActor
HYP_Nx_Physics.ForceActorToSleep
HYP_Nx_Physics.GetActorAngularDamping
HYP_Nx_Physics.GetActorAngularVelocity
HYP_Nx_Physics.GetActorCollisionPoint
HYP_Nx_Physics.GetActorCollisionState
HYP_Nx_Physics.GetActorGlobalPosition
HYP_Nx_Physics.GetActorInertiaTensor
HYP_Nx_Physics.GetActorKinematicState
HYP_Nx_Physics.GetActorLinearDamping
HYP_Nx_Physics.GetActorLinearVelocity
HYP_Nx_Physics.GetActorMass
HYP_Nx_Physics.GetActorNumCollisionPoints
HYP_Nx_Physics.GetActorSleepAngularVelocity
HYP_Nx_Physics.GetActorSleepLinearVelocity
HYP_Nx_Physics.GetPhysXEngineVersion
HYP_Nx_Physics.GetSceneGravity
HYP_Nx_Physics.IsActorSleeping
HYP_Nx_Physics.JointAddLimitPlane
HYP_Nx_Physics.JointCreateCylindrical
HYP_Nx_Physics.JointCreateDistance
HYP_Nx_Physics.JointCreateFixed
HYP_Nx_Physics.JointCreateRevolute
HYP_Nx_Physics.JointCreateSpherical
HYP_Nx_Physics.JointDestroy
HYP_Nx_Physics.JointIsBroken
HYP_Nx_Physics.JointPurgeLimitPlanes
HYP_Nx_Physics.JointSetBreakableParams
HYP_Nx_Physics.JointSetGlobalAnchor
HYP_Nx_Physics.JointSetGlobalAxis
HYP_Nx_Physics.JointSetLimitPoint
HYP_Nx_Physics.JointSetMotorParams
HYP_Nx_Physics.JointSetSphericalParams
HYP_Nx_Physics.JointSetSpringParams
HYP_Nx_Physics.MoveActorGlobalOrientation
HYP_Nx_Physics.MoveActorGlobalPosition
HYP_Nx_Physics.RemoveActorFromScene
HYP_Nx_Physics.SetActorInertiaTensor
HYP_Nx_Physics.SetActorKinematicState
HYP_Nx_Physics.SetActorLinearVelocity
HYP_Nx_Physics.SetActorLinearDamping
HYP_Nx_Physics.SetActorAngularVelocity
HYP_Nx_Physics.SetActorAngularDamping
HYP_Nx_Physics.SetActorGlobalPosition
HYP_Nx_Physics.SetActorGlobalOrientation
HYP_Nx_Physics.SetActorGravityState
HYP_Nx_Physics.SetActorMass
HYP_Nx_Physics.SetActorMaxAngularVelocity
HYP_Nx_Physics.SetActorPairFlags
HYP_Nx_Physics.SetActorSleepLinearVelocity
HYP_Nx_Physics.SetActorSleepAngularVelocity
HYP_Nx_Physics.SetPhysicsEnginePauseSimultationState
HYP_Nx_Physics.SetSceneGravity
HYP_Nx_Physics.SetSkinWidthParam
HYP_Nx_Physics.SetTimingParams
HYP_Nx_Physics.WakeUpActor

AddBoxActorToScene

AddBoxActorToScene makes it possible to add an actor, whose including volume is a box, to the scene of the physical engine.
Syntax
HYP_Nx_Physics.AddBoxActorToScene( name|id, actor_type, density, mass );
  • name - [STR127] - name of the object as specified in the XML script by the "name" attribute.
  • id - [INTEGER] - identifier of the object resulting for example from a cloning function.
  • actor_type - [INTEGER] - actor type:
    • ACTOR_STATIC: 1
    • ACTOR_DYNAMIC: 2
    • ACTOR_KINEMATIC: 4
  • density - [REAL] - volumic density - default value: 10.0.
  • mass - [REAL] - mass - default value: 0.0.
Note about mass and density (from the SDK):
"A dynamic actor with solid shapes must have either:
  • A non-zero mass, zero density and no inertia tensor (the tensor will be computed based on the mass)
  • Zero mass, non-zero density and no inertia tensor (mass and tensor will be computed based on density)
  • Zero density, but specified mass and inertia tensor
otherwise the actor will not be created."

AddForceToActor

AddForceToActor makes it possible to apply a force (linear movement) to an object.
Syntax
HYP_Nx_Physics.AddForceToActor( name | id, x, y, z );
  • name - [STR127] - name of the object as specified in the XML script by the "name" attribute.
  • id - [INTEGER] - identifier of the object resulting for example from a cloning function.
  • x - [REAL] - X coordinate of the force vector.
  • y - [REAL] - Y coordinate of the force vector.
  • z - [REAL] - Z coordinate of the force vector.

AddSphereActorToScene

AddSphereActorToScene makes it possible to add an actor, whose including volume is a sphere, to the scene of the physical engine.
Syntax
HYP_Nx_Physics.AddSphereActorToScene( name|id, actor_type, density, mass );
  • name - [STR127] - name of the object as specified in the XML script by the "name" attribute.
  • id - [INTEGER] - identifier of the object resulting for example from a cloning function.
  • actor_type - [INTEGER] - actor type:
    • ACTOR_STATIC: 1
    • ACTOR_DYNAMIC: 2
    • ACTOR_KINEMATIC: 4
  • density - [REAL] - volumic density - default value: 10.0.
  • mass - [REAL] - mass - default value: 0.0.
Note about mass and density (from the SDK):
"A dynamic actor with solid shapes must have either:
  • A non-zero mass, zero density and no inertia tensor (the tensor will be computed based on the mass)
  • Zero mass, non-zero density and no inertia tensor (mass and tensor will be computed based on density)
  • Zero density, but specified mass and inertia tensor
otherwise the actor will not be created."

AddTorqueToActor

AddTorqueToActor makes it possible to apply a torque (rotational movement) to an object.
Syntax
HYP_Nx_Physics.AddTorqueToActor( name | id, x, y, z );
  • name - [STR127] - name of the object as specified in the XML script by the "name" attribute.
  • id - [INTEGER] - identifier of the object resulting for example from a cloning function.
  • x - [REAL] - X coordinate of the torque vector.
  • y - [REAL] - Y coordinate of the torque vector.
  • z - [REAL] - Z coordinate of the torque vector.

ForceActorToSleep

ForceActorToSleep forces an actor to enter into hibernation.
Syntax
HYP_Nx_Physics.ForceActorToSleep( name | id );
  • name - [STR127] - name of the object as specified in the XML script by the "name" attribute.
  • id - [INTEGER] - identifier of the object resulting for example from a cloning function.

GetActorAngularDamping

GetActorAngularDamping allows to get the damping factor of the object's angular velocity.
Syntax
d = HYP_Nx_Physics.GetActorAngularDamping( name | id );
  • name - [STR127] - name of the object as specified in the XML script by the "name" attribute.
  • id - [INTEGER] - identifier of the object resulting for example from a cloning function.
  • d - [REAL] - damping factor.

GetActorAngularVelocity

GetActorAngularVelocity makes it possible to get the angular velocity of an object.
Syntax
x, y, z = HYP_Nx_Physics.GetActorAngularVelocity( name | id );
  • name - [STR127] - name of the object as specified in the XML script by the "name" attribute.
  • id - [INTEGER] - identifier of the object resulting for example from a cloning function.
  • x - [REAL] - X coordinate of the speed vector.
  • y - [REAL] - Y coordinate of the speed vector.
  • z - [REAL] - Z coordinate of the speed vector.

GetActorCollisionState

GetActorCollisionState makes it possible to know for the current frame if an actor has collided.
Syntax
state = HYP_Nx_Physics.GetActorCollisionState( name | id );
  • name - [STR127] - name of the object as specified in the XML script by the "name" attribute.
  • id - [INTEGER] - identifier of the object resulting for example from a cloning function.
  • state - [BOOLEAN] - collision state - 1: collision - 0: no collision.

GetActorGlobalPosition

GetActorGlobalPosition makes it possible to get the absolute position of an object.
Syntax
x, y, z = HYP_Nx_Physics.GetActorGlobalPosition( name | id );
  • name - [STR127] - name of the object as specified in the XML script by the "name" attribute.
  • id - [INTEGER] - identifier of the object resulting for example from a cloning function.
  • x - [REAL] - X coordinate of the position.
  • y - [REAL] - Y coordinate of the position.
  • z - [REAL] - Z coordinate of the position.

GetActorKinematicState

GetActorKinematicState allows to know the kinematic state of an actor.
Syntax
state = HYP_Nx_Physics.GetActorKinematicState( name | id );
  • name - [STR127] - name of the object as specified in the XML script by the "name" attribute.
  • id - [INTEGER] - identifier of the object resulting for example from a cloning function.
  • state - [BOOLEAN] - kinematic state - 1: true - 0: false.

GetActorLinearDamping

GetActorLinearDamping makes it possible to get the damping factor of the object's linear velocity.
Syntax
d = HYP_Nx_Physics.GetActorLinearDamping( name | id );
  • name - [STR127] - name of the object as specified in the XML script by the name attribute.
  • id - [INTEGER] - identifier of the object resulting for example from a cloning function.
  • d - [REAL] - damping factor.

GetActorLinearVelocity

GetActorLinearVelocity makes it possible to get the linear velocity of an object.
Syntax
x, y, z = HYP_Nx_Physics.GetActorLinearVelocity( name | id );
  • name - [STR127] - name of the object as specified in the XML script by the "name" attribute.
  • id - [INTEGER] - identifier of the object resulting for example from a cloning function.
  • x - [REAL] - X coordinate of the speed vector.
  • y - [REAL] - Y coordinate of the speed vector.
  • z - [REAL] - Z coordinate of the speed vector.

GetActorMass

GetActorMass makes it possible to get the mass of an object.
Syntax
m = HYP_Nx_Physics.GetActorMass( name | id );
  • name - [STR127] - name of the object as specified in the XML script by the "name" attribute.
  • id - [INTEGER] - identifier of the object resulting for example from a cloning function.
  • m - [REAL] - mass.

GetActorSleepAngularVelocity

GetActorSleepAngularVelocity allows to get the linear velocity sleeping threshold of an object.
Syntax
threshold = HYP_Nx_Physics.GetActorSleepAngularVelocity( name | id );
  • name - [STR127] - name of the object as specified in the XML script by the "name" attribute.
  • id - [INTEGER] - identifier of the object resulting for example from a cloning function.
  • threshold - [REAL] - threshold.

GetActorSleepLinearVelocity

GetActorSleepLinearVelocity makes it possible to get the linear velocity sleeping threshold of an object.
Syntax
threshold = HYP_Nx_Physics.GetActorSleepLinearVelocity( name | id );
  • name - [STR127] - name of the object as specified in the XML script by the "name" attribute.
  • id - [INTEGER] - identifier of the object resulting for example from a cloning function.
  • threshold - [REAL] - threshold.

GetSceneGravity

GetSceneGravity makes it possible to get the gravity vector of the scene.
Syntax
x, y, z = HYP_Nx_Physics.GetSceneGravity();
  • x - [REAL] - X coordinate of the gravity vector.
  • y - [REAL] - X coordinate of the gravity vector.
  • z - [REAL] - X coordinate of the gravity vector.

IsActorSleeping

IsActorSleeping gets the hibernation state of an actor.
Syntax
state = HYP_Nx_Physics.IsActorSleeping( name | id );
  • name - [STR127] - name of the object as specified in the XML script by the "name" attribute.
  • id - [INTEGER] - identifier of the object resulting for example from a cloning function.
  • state - [INTEGER] - 1: the actor sleeps - 0: the actor is awaked.

RemoveActorFromScene

RemoveActorFromScene makes it possible to withdraw an actor from the physical engine scene.
Syntax
HYP_Nx_Physics.RemoveActorFromScene( name | id );
  • name - [STR127] - name of the object as specified in the XML script by the "name" attribute.
  • id - [INTEGER] - identifier of the object resulting for example from a cloning function.

SetActorAngularDamping

SetActorAngularDamping makes it possible to change the damping factor of the object's angular velocity. This factor corresponds to the various energy losses which decrease the speed.
Syntax
HYP_Nx_Physics.SetActorAngularDamping( name | id, d );
  • name - [STR127] - name of the object as specified in the XML script by the "name" attribute.
  • id - [INTEGER] - identifier of the object resulting for example from a cloning function.
  • d - [REAL] - damping factor.

SetActorAngularVelocity

SetActorAngularVelocity makes it possible to change the angular velocity of an object.
Syntax
HYP_Nx_Physics.SetActorAngularVelocity( name | id, x, y, z );
  • name - [STR127] - name of the object as specified in the XML script by the "name" attribute.
  • id - [INTEGER] - identifier of the object resulting for example from a cloning function.
  • x - [REAL] - X coordinate of the speed vector.
  • y - [REAL] - Y coordinate of the speed vector.
  • z - [REAL] - Z coordinate of the speed vector.

SetActorGlobalOrientation

SetActorGlobalOrientation allows to change the absolute orientation of an object.
Syntax
HYP_Nx_Physics.SetActorGlobalOrientation( name | id, angle, x, y, z );
  • name - [STR127] - name of the object as specified in the XML script by the "name" attribute.
  • id - [INTEGER] - identifier of the object resulting for example from a cloning function.
  • angle - [REAL] - rotation angle around the axis defined by X, Y and Z.
  • x - [REAL] - X coordinate of the rotation axis.
  • y - [REAL] - Y coordinate of the rotation axis.
  • z - [REAL] - Z coordinate of the rotation axis.

SetActorGlobalPosition

SetActorGlobalPosition makes it possible to change the absolute position (compared to the reference mark of the world) of an object.
Syntax
HYP_Nx_Physics.SetActorGlobalPosition( name | id, x, y, z );
  • name - [STR127] - name of the object as specified in the XML script by the "name" attribute.
  • id - [INTEGER] - identifier of the object resulting for example from a cloning function.
  • x - [REAL] - X coordinate of the position.
  • y - [REAL] - Y coordinate of the position.
  • z - [REAL] - Z coordinate of the position.

SetActorInertiaTensor

SetActorInertiaTensor makes it possible to specify the inertia tensor of an object.
Syntax
HYP_Nx_Physics.AddTorqueToActor( name | id, x, y, z );
  • name - [STR127] - name of the object as specified in the XML script by the "name" attribute.
  • id - [INTEGER] - identifier of the object resulting for example from a cloning function.
  • x - [REAL] - X coordinate of the torque vector.
  • y - [REAL] - Y coordinate of the torque vector.
  • z - [REAL] - Z coordinate of the torque vector.

SetActorKinematicState

SetActorKinematicState makes it possible to set an actor from the dynamic state into a kinematic state and vice versa. A kinematic actor can apply forces to dynamic actors. On the other hand, a dynamic actor cannot apply a force to a kinematic actor. A kinematic actor is useful for example to simulate a person who acts with her environment but which does not undergo external forces (kind of First Person Shooter).
Syntax
HYP_Nx_Physics.SetActorKinematicState( name | id, state );
  • name - [STR127] - name of the object as specified in the XML script by the "name" attribute.
  • id - [INTEGER] - identifier of the object resulting for example from a cloning function.
  • state - [BOOLEAN] - collision state - 1: collision - 0: no collision.

SetActorLinearDamping

SetActorLinearDamping makes it possible to change the damping factor of the object's linear velocity. This factor corresponds to the various energy losses which decrease the speed.
Syntax
HYP_Nx_.SetActorLinearDamping( name | id, d );
  • name - [STR127] - name of the object as specified in the XML script by the "name" attribute.
  • id - [INTEGER] - identifier of the object resulting for example from a cloning function.
  • d - [REAL] - damping factor.

SetActorLinearVelocity

SetActorLinearVelocity makes it possible to change the linear velocity of an object.
Syntax
HYP_Nx_Physics.SetActorLinearVelocity( name | id, x, y, z );
  • name - [STR127] - name of the object as specified in the XML script by the "name" attribute.
  • id - [INTEGER] - identifier of the object resulting for example from a cloning function.
  • x - [REAL] - X coordinate of the speed vector.
  • y - [REAL] - Y coordinate of the speed vector.
  • z - [REAL] - Z coordinate of the speed vector.

SetActorMass

SetActorMass makes it possible to change the mass of an object.
Syntax
HYP_Nx_Physics.SetActorMass( name | id, m );
  • name - [STR127] - name of the object as specified in the XML script by the "name" attribute.
  • id - [INTEGER] - identifier of the object resulting for example from a cloning function.
  • m - [REAL] - mass.

SetActorSleepAngularVelocity

SetActorSleepAngularVelocity makes it possible to change the angular velocity sleeping threshold of an object. When the speed becomes smaller than this threshold, the actor (or object) is not taken any more into account in the physical engine what has for principal effect to save resources of calculation. Once put in hibernation, an actor can be awaked by the physical engine (in the event of collision for example) or by call of the function HYP_Nx_WakeUpActor().
Syntax
HYP_Nx_Physics.SetActorSleepAngularVelocity( name | id, threshold );
  • name - [STR127] - name of the object as specified in the XML script by the "name" attribute.
  • id - [INTEGER] - identifier of the object resulting for example from a cloning function.
  • threshold - [REAL] - threshold.

SetActorSleepLinearVelocity

SetActorSleepLinearVelocity makes it possible to change the object's linear velocity sleeping threshold. When the speed of the object becomes smaller than this threshold, the actor (or object) is not anymore taken into account in the physical engine which results in calculation resources saving. Once it hibernates, an actor can be awaked by the physical engine (when a collision occurs for example) or by calling the HYP_Nx_WakeUpActor() function.
Syntax
HYP_Nx_Physics.SetActorSleepLinearVelocity( name | id, threshold );
  • name - [STR127] - name of the object as specified in the XML script by the "name" attribute.
  • id - [INTEGER] - identifier of the object resulting for example from a cloning function.
  • threshold - [REAL] - threshold.

SetPhysicsEnginePauseSimultationState

SetPhysicsEnginePauseSimultationState makes it possible to put in pause (or to suspend) the physical simulation. This is useful for example to accurately analyze the collision progress.
Syntax
HYP_Nx_Physics.SetPhysicsEnginePauseSimultationState( state );
  • state - [BOOLEAN] - 1: pause - 0: no pause.

SetSceneGravity

SetSceneGravity allows to change the gravity vector of the scene. By default, the gravity of the scene is set to <0.0, -9.81, 0.0> which corresponds to earth's gravity.
Syntax
HYP_Nx_Physics.SetSceneGravity( x, y, z );
  • x - [REAL] - X coordinate of the gravity vector.
  • y - [REAL] - X coordinate of the gravity vector.
  • z - [REAL] - X coordinate of the gravity vector.

HYP_Nx_WakeUpActor

HYP_Nx_WakeUpActor wakes up an actor.
Syntax
HYP_Nx_Physics.WakeUpActor( name | id );
  • name - [STR127] - name of the object as specified in the XML script by the "name" attribute.
  • id - [INTEGER] - identifier of the object resulting for example from a cloning function.

SetSkinWidthParam

SetSkinWidthParam specifies by how much shapes can interpenetrate. Two shapes will interpenetrate by the sum of their skin widths. This means that their graphical representations should be adjusted so that they just touch when the shapes are interpenetrating. The default skin width is the NX_SKIN_WIDTH SDK parameter. This is used if the skinWidth is set to -1 (which is the default).
Syntax
HYP_Nx_Physics.SetSkinWidthParam( skinWidth );
  • skinWidth - [REAL] - skin width

SetActorMaxAngularVelocity

SetActorMaxAngularVelocity lets you set the maximum angular velocity permitted for this actor. Because for various internal computations, very quickly rotating actors introduce error into the simulation, which leads to undesired results
Syntax
HYP_Nx_Physics.SetActorMaxAngularVelocity( name|id, maxAngVel );
  • id - [INTEGER] - object/actor numerical identifier.
  • name - [STR127] - object/actor name.
  • maxAngVel - [REAL] - skin width

MoveActorGlobalPosition

MoveActorGlobalPosition call serves to move kinematically controlled dynamic actors through the game world.
Syntax
HYP_Nx_Physics.MoveActorGlobalPosition( name|id, x, y, z );
  • id - [INTEGER] - object/actor numerical identifier.
  • name - [STR127] - object/actor name.
  • x, y, z - [REAL] - the desired position for the kinematic actor, in the global frame

MoveActorGlobalOrientation

MoveActorGlobalOrientation call serves to move kinematically controlled dynamic actors through the game world.
Syntax
HYP_Nx_Physics.MoveActorGlobalOrientation( name|id, x, y, z, w );
  • id - [INTEGER] - object/actor numerical identifier.
  • name - [STR127] - object/actor name.
  • x, y, z, w - [REAL] - the desired orientation quaternion for the kinematic actor, in the global frame

AddForceAtPosToActor

AddForceAtPosToActor applies a force (or impulse) defined in the global coordinate frame, acting at a particular point in global coordinates, to the actor.
Syntax
HYP_Nx_Physics.AddForceAtPosToActor( name|id, fx, fy, fz, px, py, pz );
  • id - [INTEGER] - object/actor numerical identifier.
  • name - [STR127] - object/actor name.
  • fx, fy, fz - [REAL] - force/impulse to add, defined in the global frame
  • px, py, pz - [REAL] - position in the global frame to add the force at

SetActorPairFlags

SetActorPairFlags sets the contact pair flags for the given pair of actors. contact pair flags set: (NX_NOTIFY_ON_START_TOUCH | NX_NOTIFY_ON_TOUCH | NX_NOTIFY_ON_END_TOUCH) Useful for collision / contact report.
Syntax
HYP_Nx_Physics.SetActorPairFlags( name1|id1, name2|id2 );
  • id1, id2 - [INTEGER] - object/actor numerical identifier.
  • name1, name2 - [STR127] - object/actor name.

GetActorNumCollisionPoints

GetActorNumCollisionPoints returns the number of contact/collision points for a given actor.
Syntax
n = HYP_Nx_Physics.GetActorNumCollisionPoints( name|id );
  • id - [INTEGER] - object/actor numerical identifier.
  • name - [STR127] - object/actor name.
  • n - [INTEGER] - number of collision points.

GetActorCollisionPoint

GetActorCollisionPoint returns a particular contact/collision point for a given actor.
Syntax
px, py, pz, nx, ny, nz = 
HYP_Nx_Physics.GetActorCollisionPoint( name|id, point_index );
  • id - [INTEGER] - object/actor numerical identifier.
  • name - [STR127] - object/actor name.
  • point_index - [INTEGER] - contact point index. Range:[0 ; HYP_Nx_Physics.GetActorNumCollisionPoints()-1]
  • px, py, pz - [REAL] - position of the contact point
  • nx, ny, nz - [REAL] - normal of the contact point

SetActorGravityState

SetActorGravityState sets the gravity state of an actor.
Syntax
HYP_Nx_Physics.SetActorGravityState( name|id, state );
  • id - [INTEGER] - object/actor numerical identifier.
  • name - [STR127] - object/actor name.
  • state - [INTEGER] - 1 to enable gravity effect or 0 to disable it.

JointDestroy

JointDestroy destroys a joint.
Syntax
HYP_Nx_Physics.JointDestroy( joint_id );
  • joint_id - [INTEGER] - joint numerical identifier.

JointCreateFixed

JointCreateFixed creates a fixed joint.
Syntax
joint_id = HYP_Nx_Physics.JointCreateFixed( a0_name|a0_id, 
a1_name|a1_id );
  • a0_id - [INTEGER] - first object/actor numerical identifier.
  • a1_id - [INTEGER] - second object/actor numerical identifier.
  • a0_name - [STR127] - first object/actor name.
  • a1_name - [STR127] - second object/actor name.
  • joint_id - [INTEGER] - joint numerical identifier.

JointCreateRevolute

JointCreateRevolute creates a revolute joint.
Syntax
joint_id = HYP_Nx_Physics.JointCreateRevolute( a0_name|a0_id, 
a1_name|a1_id, 
do_collision );
  • a0_id - [INTEGER] - first object/actor numerical identifier.
  • a1_id - [INTEGER] - second object/actor numerical identifier.
  • a0_name - [STR127] - first object/actor name.
  • a1_name - [STR127] - second object/actor name.
  • do_collision - [INTEGER] - enables collision between actors (0 or 1).
  • joint_id - [INTEGER] - joint numerical identifier.

JointCreateCylindrical

JointCreateCylindrical creates a cylindrical joint.
Syntax
joint_id = HYP_Nx_Physics.JointCreateCylindrical( a0_name|a0_id, 
a1_name|a1_id, 
do_collision );
  • a0_id - [INTEGER] - first object/actor numerical identifier.
  • a1_id - [INTEGER] - second object/actor numerical identifier.
  • a0_name - [STR127] - first object/actor name.
  • a1_name - [STR127] - second object/actor name.
  • do_collision - [INTEGER] - enables collision between actors (0 or 1).
  • joint_id - [INTEGER] - joint numerical identifier.

JointCreateSpherical

JointCreateSpherical creates a spherical joint.
Syntax
joint_id = HYP_Nx_Physics.JointCreateSpherical( a0_name|a0_id, 
a1_name|a1_id, 
do_collision );
  • a0_id - [INTEGER] - first object/actor numerical identifier.
  • a1_id - [INTEGER] - second object/actor numerical identifier.
  • a0_name - [STR127] - first object/actor name.
  • a1_name - [STR127] - second object/actor name.
  • do_collision - [INTEGER] - enables collision between actors (0 or 1).
  • joint_id - [INTEGER] - joint numerical identifier.

JointCreateDistance

JointCreateDistance creates a distance joint.
Syntax
joint_id = HYP_Nx_Physics.JointCreateDistance( a0_name|a0_id, 
a1_name|a1_id, 
do_collision,
local_anchor_a0_x, local_anchor_a0_y, local_anchor_a0_z,
local_anchor_a1_x, local_anchor_a1_y, local_anchor_a1_z,
max_dist, min_dist );
  • a0_id - [INTEGER] - first object/actor numerical identifier.
  • a1_id - [INTEGER] - second object/actor numerical identifier.
  • a0_name - [STR127] - first object/actor name.
  • a1_name - [STR127] - second object/actor name.
  • do_collision - [INTEGER] - enables collision between actors (0 or 1).
  • local_anchor_a0_x, local_anchor_a0_y, local_anchor_a0_z - [REAL] - attachment point of joint in first actor space.
  • local_anchor_a1_x, local_anchor_a1_y, local_anchor_a1_z - [REAL] - attachment point of joint in second actor space.
  • max_dist - [REAL] - the maximum rest length of the rope or rod between the two anchor points
  • min_dist - [REAL] - the minimum rest length of the rope or rod between the two anchor points
  • joint_id - [INTEGER] - joint numerical identifier.

JointSetGlobalAnchor

JointSetGlobalAnchor sets the point where the two actors are attached, specified in global coordinates.
Syntax
HYP_Nx_Physics.JointSetGlobalAnchor( joint_id, x, y, z );
  • joint_id - [INTEGER] - joint numerical identifier.
  • x, y, z - [REAL] - point the actors are attached at, specified in the global frame.

JointSetGlobalAxis

JointSetGlobalAxis sets the direction of the joint's primary axis, specified in global coordinates
Syntax
HYP_Nx_Physics.JointSetGlobalAxis( joint_id, x, y, z );
  • joint_id - [INTEGER] - joint numerical identifier.
  • x, y, z - [REAL] - direction of primary axis in the global frame.

JointSetBreakableParams

JointSetBreakableParams sets the maximum force magnitude that the joint is able to withstand without breaking.
Syntax
HYP_Nx_Physics.JointSetBreakableParams( joint_id, max_force, max_torque );
  • joint_id - [INTEGER] - joint numerical identifier.
  • max_force - [REAL] - maximum force the joint can withstand without breaking.
  • max_torque - [REAL] - maximum torque the joint can withstand without breaking.

JointIsBroken

JointIsBroken returns the broken state of a joint.
Syntax
state = HYP_Nx_Physics.JointIsBroken( joint_id );
  • joint_id - [INTEGER] - joint numerical identifier.
  • state - [INTEGER] - if 1, the joint is broken.

JointSetLimitPoint

JointSetLimitPoint sets the limit point. The point is specified in the global coordinate frame. All types of joints may be limited with the same system: You may elect a point attached to one of the two actors to act as the limit point. You may also specify several planes attached to the other actor.
Syntax
HYP_Nx_Physics.JointSetLimitPoint( joint_id, x, y, z );
  • joint_id - [INTEGER] - joint numerical identifier.
  • x, y, z - [REAL] - the limit reference point defined in the global frame

JointAddLimitPlane

JointAddLimitPlane adds a limit plane. Both of the parameters are given in global coordinates. The plane is affixed to the actor that does not have the limit point. The normal of the plane points toward the positive side of the plane, and thus toward the limit point. If the normal points away from the limit point at the time of this call, the limit plane is ignored.
Syntax
HYP_Nx_Physics.JointAddLimitPlane( joint_id, 
nx, ny, nz, 
px, py, pz, 
restitution );
  • joint_id - [INTEGER] - joint numerical identifier.
  • nx, ny, nz - [REAL] - normal for the limit plane in global coordinates
  • px, py, pz - [REAL] - Point in the limit plane in global coordinates
  • restitution - [REAL] - Restitution of the limit plane

JointPurgeLimitPlanes

JointPurgeLimitPlanes deletes all limit planes added to the joint.
Syntax
HYP_Nx_Physics.JointPurgeLimitPlanes( joint_id );
  • joint_id - [INTEGER] - joint numerical identifier.

JointSetMotorParams

JointSetMotorParams describes a joint motor.
Syntax
HYP_Nx_Physics.JointSetMotorParams( joint_id, do_motor
velTarget,
maxForce,
freeSpin );
  • joint_id - [INTEGER] - joint numerical identifier.
  • do_motor - [INTEGER] - enables (1) or disables (0) the joint motor
  • velTarget - [REAL] - the relative velocity the motor is trying to achieve
  • maxForce - [REAL] - The maximum force (or torque) the motor can exert.
  • freeSpin - [INTEGER] - If 1, motor will not brake when it spins faster than velTarget

JointSetSpringParams

JointSetSpringParams describes a joint spring.
Syntax
HYP_Nx_Physics.JointSetSpringParams( joint_id, do_spring
spring,
damper,
targetValue );
  • joint_id - [INTEGER] - joint numerical identifier.
  • do_spring - [INTEGER] - enables (1) or disables (0) the joint spring
  • spring - [REAL] - spring coefficient
  • damper - [REAL] - damper coefficient
  • targetValue - [REAL] - target value (angle/position) of spring where the spring force is zero

JointSetSphericalParams

JointSetSphericalParams describes a joint spring.
Syntax
HYP_Nx_Physics.JointSetSphericalParams( joint_id,
is_swing_limit_enabled,
swingLimit_value,
is_twist_limit_enabled,
twist_limit_low_value,
twist_limit_high_value );
  • joint_id - [INTEGER] - joint numerical identifier.
  • is_swing_limit_enabled - [INTEGER] - enables (1) or disables (0) swing limit
  • swingLimit_value - [REAL] - The angle / position beyond which the limit is active
  • is_twist_limit_enabled - [INTEGER] - enables (1) or disables (0) twist limit
  • twist_limit_low_value - [REAL] - twist low limit
  • twist_limit_high_value - [REAL] - twist high limit

GetPhysXEngineVersion

GetPhysXEngineVersion returns the PhysX engine version.
Syntax
major, minor, patch = HYP_Nx_Physics.GetPhysXEngineVersion();
  • major - [INTEGER] - major version.
  • minor - [INTEGER] - minor version.
  • patch - [INTEGER] - patch version.

SetTimingParams

SetTimingParams sets simulation timing parameters .
Syntax
HYP_Nx_Physics.SetTimingParams(max_time_step, 
max_iter, 
is_timestep_fixed, 
timestep_to_use);
  • max_time_step - [REAL] - Maximum size of a substep - .
  • max_iter - [INTEGER] - Maximum number of iterations to divide a timestep into.
  • is_timestep_fixed - [INTEGER] - use(1) or not use(0) a fixed time step.
  • timestep_to_use - [REAL] - time step to use when is_timestep_fixed=1.

AddMeshActorToScene

AddMeshActorToScene makes it possible to add a mesh actor to the scene of the physical engine.
Syntax
HYP_Nx_Physics.AddMeshActorToScene( name|id, actor_type, density, mass );
  • name - [STR127] - name of the object as specified in the XML script by the "name" attribute.
  • id - [INTEGER] - identifier of the object resulting for example from a cloning function.
  • actor_type - [INTEGER] - actor type:
    • ACTOR_STATIC: 1
    • ACTOR_DYNAMIC: 2
    • ACTOR_KINEMATIC: 4
  • density - [REAL] - volumic density - default value: 10.0.
  • mass - [REAL] - mass - default value: 0.0.
Note about mass and density (from the SDK):
"A dynamic actor with solid shapes must have either:
  • A non-zero mass, zero density and no inertia tensor (the tensor will be computed based on the mass)
  • Zero mass, non-zero density and no inertia tensor (mass and tensor will be computed based on density)
  • Zero density, but specified mass and inertia tensor
otherwise the actor will not be created."


GeeXLab demos


GLSL - Mesh exploder


PhysX 3 cloth demo


Normal visualizer with GS


Compute Shaders test on Radeon


Raymarching in GLSL



Misc
>Texture DataPack #1
>Asus Silent Knight CPU Cooler
Page generated in 0.0021841526031494 seconds.