<?xml version="1.0" encoding="utf-8" standalone="yes"?>

<?xml-stylesheet href="./_c74_ref.xsl" type="text/xsl"?>

<!--This is an automatically generated file. DO NOT EDIT THIS FILE DIRECTLY. Rather, use the _ref.xml files found in the 'edits' folder.-->
<c74object name="jit.phys.body" module="jit" category="Jitter Physics">
	<digest>
		A rigid body and collision shape
	</digest>
	<description>
		The <o>jit.phys.body</o> object represents a rigid body and collision shape in a physics simulation. The collision shape is either one of several simple shapes, a compound shape (combination of simple shapes), or defined by a matrix of vertices.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			Jitter
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="INLET_TYPE">
			<digest>
				messages in
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="INLET_TYPE">
			<digest>
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="OUTLET_TYPE">
			<digest>
				connect to bind objects or position/quat values
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="1" type="OUTLET_TYPE">
			<digest>
				dumpout
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--MESSAGES-->
	<methodlist>
		<method name="bang">
			<arglist />
			<digest>
				Update the body
			</digest>
			<description>
				Update the body forces and matrix inputs, and output <at>position</at> and <at>quat</at> values.
			</description>
		</method>
		<method name="addchild">
			<arglist>
				<arg name="shape" type="symbol" />
				<arg name="x" optional="1" type="float" />
				<arg name="y" optional="1" type="float" />
				<arg name="z" optional="1" type="float" />
				<arg name="quat-x" optional="1" type="float" />
				<arg name="quat-y" optional="1" type="float" />
				<arg name="quat-z" optional="1" type="float" />
				<arg name="quat-w" optional="1" type="float" />
				<arg name="scale-x" optional="1" type="float" />
				<arg name="scale-y" optional="1" type="float" />
				<arg name="scale-z" optional="1" type="float" />
			</arglist>
			<digest>
				Add child shape to compound body
			</digest>
			<description>
				Add to a compound body a child <ar>shape</ar>. Optional args are position x/y/z, quaternion x/y/z/w and scale x/y/z.
			</description>
		</method>
		<method name="getchild_dict">
			<arglist />
			<digest>
				Send compound shape description as dictionary
			</digest>
			<description>
				Send a dictionary description of the compound body child shapes out the dumpout.
			</description>
		</method>
		<method name="impulse">
			<arglist>
				<arg name="x" type="float" />
				<arg name="y" type="float" />
				<arg name="z" type="float" />
				<arg name="relative-x" optional="1" type="float" />
				<arg name="relative-y" optional="1" type="float" />
				<arg name="relative-z" optional="1" type="float" />
			</arglist>
			<digest>
				Apply an impulse
			</digest>
			<description>
				Apply an impulse (instantaneous force) to the rigid body using a worldspace vector described by <ar>x</ar>, <ar>y</ar>, <ar>z</ar>. If <at>forces_relative</at> is enabled, the vector is converted to object space. Optional args <ar>relative-x</ar>, <ar>relative-y</ar>, <ar>relative-z</ar> describe a relative position on the body where the force is applied, otherwise it's a central force.
			</description>
		</method>
		<method name="removechild">
			<arglist>
				<arg name="index" type="int" />
			</arglist>
			<digest>
				Remove child shape
			</digest>
			<description>
				Remove the child shape at <ar>index</ar> from a compound body.
			</description>
		</method>
		<method name="removechildren">
			<arglist />
			<digest>
				Remove all child shapes
			</digest>
			<description>
				Remove all child shapes from a compound body.
			</description>
		</method>
		<method name="reset">
			<arglist />
			<digest>
				Reset body properties
			</digest>
			<description>
				Reset body properties <at>position</at>, and <at>quat</at>, and zero all forces.
			</description>
		</method>
		<method name="setchild_position">
			<arglist>
				<arg name="index" type="int" />
				<arg name="x" type="float" />
				<arg name="y" type="float" />
				<arg name="z" type="float" />
			</arglist>
			<digest>
				Set child shape position
			</digest>
			<description>
				Set the position of child shape at <ar>index</ar> of a compound body.
			</description>
		</method>
		<method name="setchild_quat">
			<arglist>
				<arg name="index" type="int" />
				<arg name="x" type="float" />
				<arg name="y" type="float" />
				<arg name="z" type="float" />
				<arg name="w" type="float" />
			</arglist>
			<digest>
				Set child shape quaternion
			</digest>
			<description>
				Set the quaternion of child shape at <ar>index</ar> of a compound body.
			</description>
		</method>
		<method name="setchild_scale">
			<arglist>
				<arg name="index" type="int" />
				<arg name="x" type="float" />
				<arg name="y" type="float" />
				<arg name="z" type="float" />
			</arglist>
			<digest>
				Set child shape scale
			</digest>
			<description>
				Set the scaling factor of child shape at <ar>index</ar> of a compound body.
			</description>
		</method>
		<method name="setchild_shape">
			<arglist>
				<arg name="index" type="int" />
				<arg name="shape" type="symbol" />
			</arglist>
			<digest>
				Set child shape
			</digest>
			<description>
				Set the shape of child at <ar>index</ar> of a compound body.
			</description>
		</method>
		<method name="setresetstate">
			<arglist />
			<digest>
				Set the reset attributes to their current state
			</digest>
			<description>
				Set the <at>resetpos</at> and <at>resetquat</at> attributes to their current state.
			</description>
		</method>
		<method name="torque_impulse">
			<arglist>
				<arg name="x" type="float" />
				<arg name="y" type="float" />
				<arg name="z" type="float" />
			</arglist>
			<digest>
				Apply a torque impulse
			</digest>
			<description>
				Apply a torque impulse (instantaneous angular force) to the rigid body using a worldspace vector described by <ar>x</ar>, <ar>y</ar>, <ar>z</ar>. If <at>forces_relative</at> is enabled, the vector is converted to object space.
			</description>
		</method>
	</methodlist>
	<jittermethodlist>
		<jittermethod name="exportattrs" />
		<jittermethod name="exportsummary" />
		<jittermethod name="getattributes" />
		<jittermethod name="getstate" />
		<jittermethod name="jit_matrix" />
		<jittermethod name="importattrs" />
		<jittermethod name="summary" />
	</jittermethodlist>
	<!--ATTRIBUTES-->
	<attributelist>
		<attribute name="anim" get="1" set="1" type="symbol" size="1">
			<digest>
				Name of parent jit.anim.node object
			</digest>
			<description>
				The name of a <o>jit.anim.node</o> object to receive transform updates from.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Anim" />
			</attributelist>
		</attribute>
		<attribute name="collisions" get="1" set="1" type="int" size="1">
			<digest>
				Collision reporting enable
			</digest>
			<description>
				Enables and disables collision reporting out the second (dumpout) outlet.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Collisions" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="onoff" />
			</attributelist>
		</attribute>
		<attribute name="damping" get="1" set="1" type="float" size="2">
			<digest>
				Linear and angular damping
			</digest>
			<description>
				Set the linear and angular damping applied to a body in the range 0. to 1. (default 0.2 0.2). Damping can be used to simulate air resistance.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Damping" />
			</attributelist>
		</attribute>
		<attribute name="enable" get="1" set="1" type="int" size="1">
			<digest>
				Enable simulation
			</digest>
			<description>
				Enable this body in the physics simulation (default = 1).
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Enable" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="onoff" />
			</attributelist>
		</attribute>
		<attribute name="enable_sleep" get="1" set="1" type="int" size="1">
			<digest>
				Enable sleeping
			</digest>
			<description>
				Enable sleeping on this body, causing deactivation when linear and angular velocity are 0 (default = 0).
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Enable Sleep" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="onoff" />
			</attributelist>
		</attribute>
		<attribute name="filterclass" get="1" set="1" type="symbol" size="1">
			<digest>
				Name of this object's collision filter-class.
			</digest>
			<description>
				Set the name of this object's collision filter-class (default = default). Other objects must specify the <ar>filterclass</ar> name in their <ar>filters</ar> list to enable collisions with this object. Maximum allowed unique names is 10.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Filter Class" />
			</attributelist>
		</attribute>
		<attribute name="filters" get="1" set="1" type="symbol" size="10">
			<digest>
				List of filterclass names this object collides with
			</digest>
			<description>
				Specify a list of <at>filterclass</at> names to enable collisions with (default = all). Possible values include <ar>all</ar>, <ar>worldbox</ar>, and <ar>default</ar>. Additional values include any user-specified <at>filterclass</at> names (maximum allowed = 10).
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Filters" />
			</attributelist>
		</attribute>
		<attribute name="force" get="1" set="1" type="float" size="3">
			<digest>
				Apply force
			</digest>
			<description>
				Apply a force to the rigid body using a 3D worldspace vector (default = 0 0 0). If <at>forces_relative</at> is enabled,	the vector is converted to object space.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Force" />
			</attributelist>
		</attribute>
		<attribute name="forces_relative" get="1" set="1" type="int" size="1">
			<digest>
				Forces relative flag
			</digest>
			<description>
				Forces relative flag will cause all forces to be converted to object space before applying (default = 0).
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Forces Relative" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="onoff" />
			</attributelist>
		</attribute>
		<attribute name="friction" get="1" set="1" type="float" size="1">
			<digest>
				Friction amount
			</digest>
			<description>
				The friction amount (opposite force) (default = 0.5). Applied when the body is in contact with another body that has friction.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Friction" />
			</attributelist>
		</attribute>
		<attribute name="kinematic" get="1" set="1" type="int" size="1">
			<digest>
				Kinematic flag to remove dynamics on body
			</digest>
			<description>
				Kinematic flag (default = 0). Use this mode to disable dynamics on the body, maintain collisions with other bodies in the world, and animate using <at>position</at> and <at>quat</at> attributes. This allows for a user-animated rigid-body.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Kinematic" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="onoff" />
			</attributelist>
		</attribute>
		<attribute name="local_scaling" get="1" set="1" type="int" size="1">
			<digest>
				Local scaling flag
			</digest>
			<description>
				Local scaling flag (default = 0). When enabled, the <at>scale</at> attribute will apply a local scaling transform to the collision shape. When disabled, the rigid-body is removed and re-added to the physics world for every <at>scale</at> modification.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Local Scaling" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="onoff" />
			</attributelist>
		</attribute>
		<attribute name="mass" get="1" set="1" type="float" size="1">
			<digest>
				Body mass
			</digest>
			<description>
				Body mass (default = 1.). When set to 0. body dynamics are disabled, however collisions remain active.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Mass" />
			</attributelist>
		</attribute>
		<attribute name="name" get="1" set="1" type="symbol" size="1">
			<digest>
				Instance name
			</digest>
			<description>
				Specifies the name of the instance (default = UID).
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Name" />
			</attributelist>
		</attribute>
		<attribute name="position" get="1" set="1" type="float" size="3">
			<digest>
				Body position
			</digest>
			<description>
				Body position in worldspace in the form x y z (default = 0. 0. 0.).
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Position" />
			</attributelist>
		</attribute>
		<attribute name="quat" get="1" set="1" type="float" size="4">
			<digest>
				Body orientation as quaternion
			</digest>
			<description>
				Body orientation as a quaternion in the form x y z w (default = 0. 0. 0. 1.).
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Quat" />
			</attributelist>
		</attribute>
		<attribute name="reduce_hull" get="1" set="1" type="int" size="1">
			<digest>
				Reduce convex hull flag
			</digest>
			<description>
				Enable automatic vertex reduction when body <at>shape</at> attribute is set to <m>convexhull</m> (default = 1).
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Reduce Hull" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="onoff" />
			</attributelist>
		</attribute>
		<attribute name="resetpos" get="1" set="1" type="float" size="3">
			<digest>
				Body reset position
			</digest>
			<description>
				Body reset position in the form x y z (default = 0. 0. 0.). This is the worldspace position the body will return to upon receiving the <m>reset</m> message.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Reset Pos" />
			</attributelist>
		</attribute>
		<attribute name="resetquat" get="1" set="1" type="float" size="4">
			<digest>
				Body reset orientation
			</digest>
			<description>
				Body reset orientation as a quaternion in the form x y z w (default = 0. 0. 0. 1.). This is the orientation	the body will return to upon receiving the <m>reset</m> message.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Reset Quat" />
			</attributelist>
		</attribute>
		<attribute name="restitution" get="1" set="1" type="float" size="1">
			<digest>
				Restitution value
			</digest>
			<description>
				Restitution value, or bounciness (default = 0.1). The proportion of kinetic energy preserved on impact with other rigid bodies.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Restitution" />
			</attributelist>
		</attribute>
		<attribute name="rolling_friction" get="1" set="1" type="float" size="1">
			<digest>
				Rolling friction amount
			</digest>
			<description>
				The rolling friction amount (opposite force for a rolling object) (default = 0.0). Applied when the body is in contact with another body that has friction.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Rolling Friction" />
			</attributelist>
		</attribute>
		<attribute name="rotate" get="1" set="1" type="float" size="4">
			<digest>
				Body orientation as angle-axis
			</digest>
			<description>
				Body orientation as angle-axis in the form angle(in degrees) x y z (default = 0. 0. 0. 1.).
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Rotate" />
			</attributelist>
		</attribute>
		<attribute name="rotate_order" get="1" set="1" type="symbol" size="1">
			<digest>
				Rotate Order
			</digest>
			<description>
				TEXT_HERE
			</description>
			<attributelist>
				<attribute name="enumvals" get="1" set="1" type="atom" size="7">
					<enumlist>
						<enum name="auto">
							<digest>
								TEXT_HERE
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="xyz">
							<digest>
								TEXT_HERE
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="xzy">
							<digest>
								TEXT_HERE
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="yxz">
							<digest>
								TEXT_HERE
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="yzx">
							<digest>
								TEXT_HERE
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="zxy">
							<digest>
								TEXT_HERE
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="zyx">
							<digest>
								TEXT_HERE
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
					</enumlist>
				</attribute>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Rotate Order" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="enum" />
			</attributelist>
		</attribute>
		<attribute name="rotatexyz" get="1" set="1" type="float" size="3">
			<digest>
				Body orientation as Euler angles
			</digest>
			<description>
				Body orientation as Euler angles (in degrees) in the form x y z (default = 0. 0. 0.).
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Rotate XYZ" />
			</attributelist>
		</attribute>
		<attribute name="scale" get="1" set="1" type="float" size="3">
			<digest>
				Body scaling factor
			</digest>
			<description>
				The body scaling factor in the form x y z (default = 1. 1. 1.).
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Scale" />
			</attributelist>
		</attribute>
		<attribute name="send_scale" get="1" set="1" type="int" size="1">
			<digest>
				Send scale flag
			</digest>
			<description>
				Send scale flag (default = 1). When enabled, scale values will be sent to bound objects.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Send Scale" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="onoff" />
			</attributelist>
		</attribute>
		<attribute name="shape" get="1" set="1" type="symbol" size="1">
			<digest>
				Collision shape type
			</digest>
			<description>
				Collision shape type (default = sphere).
			</description>
			<attributelist>
				<attribute name="enumvals" get="1" set="1" type="atom" size="9">
					<enumlist>
						<enum name="sphere">
							<digest>
								TEXT_HERE
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="cube">
							<digest>
								TEXT_HERE
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="capsule">
							<digest>
								TEXT_HERE
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="cone">
							<digest>
								TEXT_HERE
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="cylinder">
							<digest>
								TEXT_HERE
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="convexhull">
							<digest>
								Requires a matrix of vertices. A convex hull is generated that encloses the vertices.
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="concave">
							<digest>
								Requires a matrix of vertices. A concave shape is generated, allowing for hollows in the mesh shape
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="compound">
							<digest>
								Composite of simple shapes
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="dynamicmesh">
							<digest>
								Requires a matrix of vertices. Handles dynamically changing mesh shapes and requires a non-moving rigid body.
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
					</enumlist>
				</attribute>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Shape" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="enum" />
			</attributelist>
		</attribute>
		<attribute name="targetname" get="1" set="1" type="symbol" size="1">
			<digest>
				Target object name
			</digest>
			<description>
				The name of a target object, either an OpenGL object or a <o>jit.anim.node</o>. This object will receive <at>position</at>, <at>quat</at>, and possibly <at>scale</at> values.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Target Name" />
			</attributelist>
		</attribute>
		<attribute name="torque" get="1" set="1" type="float" size="3">
			<digest>
				Apply torque
			</digest>
			<description>
				Apply a torque (angular force) to the rigid body using a 3D worldspace vector (default = 0 0 0).
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Torque" />
			</attributelist>
		</attribute>
		<attribute name="total_force" get="1" set="0" type="float" size="3">
			<digest>
				The current total force
			</digest>
			<description>
				The total force currently applied to the rigid-body.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Total Force" />
			</attributelist>
		</attribute>
		<attribute name="total_torque" get="1" set="0" type="float" size="3">
			<digest>
				The current total torque
			</digest>
			<description>
				The total torque currently applied to the rigid-body.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Total Torque" />
			</attributelist>
		</attribute>
		<attribute name="velocity" get="1" set="1" type="float" size="3">
			<digest>
				The current rigid-body velocity
			</digest>
			<description>
				The current rigid-body velocity in units per second (default = 0 0 0).
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Velocity" />
			</attributelist>
		</attribute>
		<attribute name="velocity_ang" get="1" set="1" type="float" size="3">
			<digest>
				The current rigid-body angular velocity
			</digest>
			<description>
				The current rigid-body angular velocity in radians per second (default = 0 0 0).
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Velocity Ang" />
			</attributelist>
		</attribute>
		<attribute name="worldname" get="1" set="1" type="symbol" size="1">
			<digest>
				Name of the context the body is bound to
			</digest>
			<description>
				The name of a <o>jit.phys.world</o> context this body is bound to.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="World Name" />
			</attributelist>
		</attribute>
	</attributelist>
	<jitterattributelist />
	<!--EXAMPLE-->
	<examplelist>
		<example caption="A rigid body and collision shape" img="jit.phys.body.png" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="jit.phys.world" />
		<seealso name="jit.phys.multiple" />
		<seealso name="jit.phys.picker" />
		<seealso name="jit.gl.physdraw" />
		<seealso name="jit.gl.gridshape" />
	</seealsolist>
	<discussion>
		Shapes defined by a mesh of vertices include <ar>convexhull</ar>, <ar>concave</ar>, and <ar>dynamicmesh</ar>. Each of these shapes require a 3 plane, float32, 1D or 2D matrix passed in. If the vertex matrix is 1D it's interpreted as a triangle mesh, if 2D it's interpreted as a tri_grid mesh.
	</discussion>
</c74object>
