<?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.multiple" module="jit" category="Jitter Physics">
	<digest>
		Uses matrices to simulate multiple rigid bodies
	</digest>
	<description>
		The <o>jit.phys.multiple</o> object uses several jit.matrix objects to simulate rigid bodies in a physics world. The two outlets connect to the <at>position</at> and <at>rotate</at> matrix inputs of a <o>jit.gl.multiple</o> object allowing for easy visualization of the rigid body shapes.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			Jitter
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="matrix">
			<digest>
				position array
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="matrix">
			<digest>
				scale array
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="OUTLET_TYPE">
			<digest>
				position matrix
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="1" type="OUTLET_TYPE">
			<digest>
				rotate matrix
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="2" type="OUTLET_TYPE">
			<digest>
				dumpout
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--MESSAGES-->
	<methodlist>
		<method name="bang">
			<arglist />
			<digest>
				Update bodies and output matrices
			</digest>
			<description>
				TEXT_HERE
			</description>
		</method>
		<method name="damping_matrix">
			<arglist>
				<arg name="matrix name" type="symbol" />
			</arglist>
			<digest>
				Name of damping matrix
			</digest>
			<description>
				A named matrix to use for the damping parameter if it's in the <ar>physparams</ar> list. Must be a 2-plane float32 matrix.
			</description>
		</method>
		<method name="force_matrix">
			<arglist>
				<arg name="matrix name" type="symbol" />
			</arglist>
			<digest>
				Name of force matrix
			</digest>
			<description>
				A named matrix to use for the force parameter if it's in the <ar>physparams</ar> list. Must be a 3-plane float32 matrix.
			</description>
		</method>
		<method name="friction_matrix">
			<arglist>
				<arg name="matrix name" type="symbol" />
			</arglist>
			<digest>
				Name of friction matrix
			</digest>
			<description>
				A named matrix to use for the friction parameter if it's in the <ar>physparams</ar> list. Must be a 1-plane float32 matrix.
			</description>
		</method>
		<method name="getconstraint_dict">
			<arglist />
			<digest>
				Send modified constraint attributes as a dictionary
			</digest>
			<description>
				Send a dictionary description of the modified constraint attributes 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 to all bodies
			</digest>
			<description>
				Apply an impulse (instantaneous force) to the rigid bodies using a worldspace vector described by <ar>x</ar>, <ar>y</ar>, <ar>z</ar>. 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="mass_matrix">
			<arglist>
				<arg name="matrix name" type="symbol" />
			</arglist>
			<digest>
				Name of mass matrix
			</digest>
			<description>
				A named matrix to use for the mass parameter if it's in the <ar>physparams</ar> list. Must be a 1-plane float32 matrix.
			</description>
		</method>
		<method name="mesh_matrix">
			<arglist>
				<arg name="matrix name" type="symbol" />
			</arglist>
			<digest>
				Name of mesh matrix
			</digest>
			<description>
				A named matrix to use for the mesh parameter if it's in the <ar>physparams</ar> list. Specifies a matrix of vertex values for determining the rigid-body convex hull or concave mesh. Must be a 3-plane float32 matrix.
			</description>
		</method>
		<method name="position_matrix">
			<arglist>
				<arg name="matrix name" type="symbol" />
			</arglist>
			<digest>
				Name of position matrix
			</digest>
			<description>
				A named matrix to use for the position parameter if it's in the <ar>physparams</ar> list. Must be a 3-plane float32 matrix.
			</description>
		</method>
		<method name="reset">
			<arglist />
			<digest>
				Reset instance body properties
			</digest>
			<description>
				Reset all instance body properties <at>position</at>, and <at>quat</at>, and zero all forces.
			</description>
		</method>
		<method name="restitution_matrix">
			<arglist>
				<arg name="matrix name" type="symbol" />
			</arglist>
			<digest>
				Name of restitution matrix
			</digest>
			<description>
				A named matrix to use for the restitution parameter if it's in the <ar>physparams</ar> list. Must be a 1-plane float32 matrix.
			</description>
		</method>
		<method name="rotate_matrix">
			<arglist>
				<arg name="matrix name" type="symbol" />
			</arglist>
			<digest>
				Name of rotate matrix
			</digest>
			<description>
				A named matrix to use for the rotate parameter if it's in the <ar>physparams</ar> list. Must be a 4-plane float32 matrix.
			</description>
		</method>
		<method name="rotatexyz_matrix">
			<arglist>
				<arg name="matrix name" type="symbol" />
			</arglist>
			<digest>
				Name of rotatexyz matrix
			</digest>
			<description>
				A named matrix to use for the rotatexyz parameter if it's in the <ar>physparams</ar> list. Must be a 3-plane float32 matrix.
			</description>
		</method>
		<method name="scale_matrix">
			<arglist>
				<arg name="matrix name" type="symbol" />
			</arglist>
			<digest>
				Name of scale matrix
			</digest>
			<description>
				A named matrix to use for the scale parameter if it's in the <ar>physparams</ar> list. Must be a 3-plane float32 matrix.
			</description>
		</method>
		<method name="sendbody">
			<arglist>
				<arg name="body-name (optional)" type="symbol" />
				<arg name="body-index (optional)" type="list" />
				<arg name="message" type="symbol" />
				<arg name="values" type="list" />
			</arglist>
			<digest>
				Send a body instance a message
			</digest>
			<description>
				Send a body instance a message. If the first arg is a symbol, it's treated as the body instance name. If it's an integer, a list is expected whose length is equal to the number of dimensions of the position-matrix. Possible messages include all values for the <at>physparams</at> attribute (except <ar>mesh</ar>), as well as the <m>impulse</m> and <m>torque_impulse</m> messages.
			</description>
		</method>
		<method name="sendbody_reset">
			<arglist>
				<arg name="body-name (optional)" type="symbol" />
				<arg name="body-index (optional)" type="list" />
				<arg name="message" type="symbol" />
				<arg name="values" type="list" />
			</arglist>
			<digest>
				Send a body instance a message with reset
			</digest>
			<description>
				Send a body instance a message with a reset message. See the <m>sendbody</m> message for more info.
			</description>
		</method>
		<method name="sendconstraint">
			<arglist />
			<digest>
				Send the internal constraints a message
			</digest>
			<description>
				TEXT_HERE
			</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 to all bodies
			</digest>
			<description>
				Apply a torque impulse (instantaneous angular force) to the rigid bodies using a worldspace vector described by <ar>x</ar>, <ar>y</ar>, <ar>z</ar>.
			</description>
		</method>
		<method name="torque_matrix">
			<arglist>
				<arg name="matrix name" type="symbol" />
			</arglist>
			<digest>
				Name of torque matrix
			</digest>
			<description>
				A named matrix to use for the torque parameter if it's in the <ar>physparams</ar> list. Must be a 3-plane float32 matrix.
			</description>
		</method>
	</methodlist>
	<jittermethodlist>
		<jittermethod name="exportattrs" />
		<jittermethod name="exportsummary" />
		<jittermethod name="getattributes" />
		<jittermethod name="getstate" />
		<jittermethod name="importattrs" />
		<jittermethod name="jit_matrix" />
		<jittermethod name="summary" />
	</jittermethodlist>
	<!--ATTRIBUTES-->
	<attributelist>
		<attribute name="constraint" get="1" set="1" type="symbol" size="1">
			<digest>
				Set and enable the internal constraints
			</digest>
			<description>
				Specifies a constraint type to be used for the internal constraint matrix (default=none). When set, constraints are automatically created halfway between each rigid body and its nearest neighbor, along each dimension of the position matrix.
			</description>
			<attributelist>
				<attribute name="enumvals" get="1" set="1" type="atom" size="6">
					<enumlist>
						<enum name="none">
							<digest>
								TEXT_HERE
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="point2point">
							<digest>
								TEXT_HERE
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="hinge">
							<digest>
								TEXT_HERE
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="barslide">
							<digest>
								TEXT_HERE
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="conetwist">
							<digest>
								TEXT_HERE
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="6dof">
							<digest>
								TEXT_HERE
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
					</enumlist>
				</attribute>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Constraint" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="enum" />
			</attributelist>
		</attribute>
		<attribute name="constraint_matrix" get="1" set="1" type="int" size="1">
			<digest>
				Enable reporting of constraint positions as a jit_matrix
			</digest>
			<description>
				Enable reporting of constraint positions as a jit_matrix (default = 0)
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Constraint Matrix" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="onoff" />
			</attributelist>
		</attribute>
		<attribute name="constraintoutname" get="1" set="1" type="symbol" size="1">
			<digest>
				Constraint output matrix name
			</digest>
			<description>
				TEXT_HERE
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Constraint Out Name" />
			</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 bodies 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 all bodies, 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 to all bodies
			</digest>
			<description>
				Apply a force to the rigid bodies 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
			</digest>
			<description>
				Kinematic flag (default = 1). Use this mode to disable dynamics on the bodies, enable collisions, and animate using <at>position</at> and <at>rotate</at> matrices.
			</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="physparams" get="1" set="1" type="symbol" size="11">
			<digest>
				Inlet physics body attributes
			</digest>
			<description>
				The list of physics body attributes corresponding to object inlets that are modifiable by passing in a matrix. Valid attributes are <at>position</at>, <at>rotation</at>, <at>rotatexyz</at>, <at>scale</at>, <at>mass</at>, <at>friction</at>, <at>restitution</at>, <at>damping</at>, <at>force</at>, <at>torque</at>, and <at>mesh</at>.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Phys Params" />
			</attributelist>
		</attribute>
		<attribute name="posoutname" get="1" set="0" type="symbol" size="1">
			<digest>
				Position output matrix name
			</digest>
			<description>
				TEXT_HERE
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Pos Out Name" />
			</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="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="rotoutname" get="1" set="0" type="symbol" size="1">
			<digest>
				Rotate output matrix name
			</digest>
			<description>
				TEXT_HERE
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Rot Out Name" />
			</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="8">
					<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>
								A convex hull is generated that encloses the vertices specified by the <ar>mesh</ar> matrix.
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="concave">
							<digest>
								A concave shape is generated allowing for hollows in the shape, from the vertices specified by the <ar>mesh</ar> matrix.
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="dynamicmesh">
							<digest>
								TEXT_HERE
							</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="shareshape" get="1" set="1" type="int" size="1">
			<digest>
				Enable collision shape sharing
			</digest>
			<description>
				Enable collision shape sharing among body instances (default = 0). When enabled, all rigid body instances will have uniform shape scaling, ignoring the <ar>scale</ar> matrix if present.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Share Shape" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="onoff" />
			</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 bodies 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="worldname" get="1" set="1" type="symbol" size="1">
			<digest>
				Name of the context the bodies are bound to
			</digest>
			<description>
				The name of a <o>jit.phys.world</o> context the rigid bodies are 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="Uses matrices to simulate multiple rigid bodies" img="jit.phys.multiple.png" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="jit.phys.world" />
		<seealso name="jit.phys.body" />
		<seealso name="jit.phys.ghost" />
		<seealso name="jit.phys.picker" />
		<seealso name="jit.gl.physdraw" />
		<seealso name="jit.gl.multiple" />
		<seealso name="jit.gl.gridshape" />
	</seealsolist>
	<discussion>
		Settable parameters include <at>position</at>, <at>rotation</at>, <at>rotatexyz</at>, <at>scale</at>, <at>mass</at>, <at>friction</at>, <at>restitution</at>, <at>damping</at>, <at>force</at>, <at>torque</at>, and <at>mesh</at>. All parameters take float32 matrices. Parameter matrices can be of differing dim sizes, and will wrap to the dimensions of the matrix specified by the dimparam attribute (except for <at>mesh</at>).
	</discussion>
</c74object>
