TOKGEOM_SetPositionAndRotation(Geometry%,X#,Y#,Z#,Pitch#,Yaw#,Roll#)
Parameters:
Geometry% = The geometry's handle
X# = X component of local position
Y# = Y component of local position
Z# = Z component of local position
Pitch# = Geometry's local Pitch
Yaw# = Geometry's local Yaw
Roll# = Geometry's local Roll
Return value:
None
Description:
Sets the local position and rotation of the geometry.
This creates a table by moving box geometries inside the rigid body
i=1
obj(i) = CreateCube()
ScaleEntity obj(i),10,.5,10
rb(i) = TOKRB_Create()
TOKRB_AddBox rb(i),20.0,1.0,20.0
TOKRB_SetPosition rb(i),0,20,0
TOKRB_SetLinearDamping rb(i),0.001
TOKRB_SetAngularDamping rb(i),0.002
TOKRB_SetMass rb(i),2.0
TOKRB_SetBoxInertiaTensor rb(i),20.0,10.0,20.0,2.0
TOKRB_SetSleepingParameter rb(i),0
Addbox obj(i),rb(i),9,-5,9,2,10,2
Addbox obj(i),rb(i),-9,-5,9,2,10,2
Addbox obj(i),rb(i),9,-5,-9,2,10,2
Addbox obj(i),rb(i),-9,-5,-9,2,10,2
TOKRB_UpdateBoundingInfo(RB(i))
toks=toks+1

Function addbox(mesh,RigidBody,x#,y#,z#,Width#,Height#,Depth#,Pitch#=0,Yaw#=0,Roll#=0,alpha=1)
TOKGEOM_SetPositionAndRotation TOKRB_AddBox(RigidBody,Width#,Height#,Depth#),x#,y#,z#,Pitch#,Yaw#,Roll#
c=CreateCube(mesh)
ScaleEntity c,Width#/2,Height#/2,Depth#/2,1
PositionEntity c,x#,y#,z#,1
RotateEntity c,Pitch#,Yaw#,Roll#,1
End Function



Documentation generated by Cod2Doc on 20 Jun 2004.