TOKRB_AddCylinder(RigidBody%,Diameter#,Height#)
Parameters:
RigidBody% = Rigid Body handle
Diameter# = Diameter of cylinder as well as the spheres on either end
Height# = Height of the cylinder portion
Return value:
Cylinder geometry's Handle For later modification.
Description:
Adds a cylinder geometry to a Rigid Body. IMPORTANT NOTE: Cylinders are really not cylinders. Instead, they are capsules in which height from point to point is height+diameter.
A function that creates a cylinder along with a graphical representation.
Function addcylinder(mesh,RigidBody,x#,y#,z#,Diameter#,Height#,Pitch#=0,Yaw#=0,Roll#=0,alpha=1)
TOKGEOM_SetPositionAndRotation TOKRB_AddCylinder(RigidBody,Diameter#,Height#),x#,y#,z#,Pitch#,Yaw#,Roll#
c=CreateCylinder(8,True,mesh)
ScaleEntity c,Diameter#/2,Height#/2,Diameter#/2,1
sp1=CreateSphere(8,c)
ScaleEntity sp1,Diameter#/2,Diameter#/2,Diameter#/2,1
PositionEntity sp1,0,Height#/2,0,1
sp2=CreateSphere(8,c)
ScaleEntity sp2,Diameter#/2,Diameter#/2,Diameter#/2,1
PositionEntity sp2,0,Height#/-2,0,1
PositionEntity c,x#,y#,z#,1
RotateEntity c,Pitch#,Yaw#,Roll#,1
End Function



Documentation generated by Cod2Doc on 20 Jun 2004.