<?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.ghost" module="jit" category="Jitter Physics">
	<digest>
		A collision sensor and forcefield
	</digest>
	<description>
		The <o>jit.phys.ghost</o> object represents a sensor area defined by a basic collision shape in a physics world. The collision shape is either one of several simple shapes. Additionally a force field can be enabled to act on colliding objects. The direction vector of the force field can be either in world coordinates, or relative to the <o>jit.phys.ghost</o> object.
	</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>
				ghost collision dict
			</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 ghost forces and output collision dict
			</digest>
			<description>
				TEXT_HERE
			</description>
		</method>
		<method name="central_impulse">
			<arglist>
				<arg name="amount" type="float" />
			</arglist>
			<digest>
				Apply an impulse
			</digest>
			<description>
				Apply an impulse (instantaneous force) to the colliding rigid bodies using the vector from the ghost object center to the rigid body center, scaled by <ar>amount</ar>. If <ar>amount</ar> is positive, bodies shoot away from the ghost center, if negative they are pulled into the ghost center. Impulse strength is inversely proportional to the distance between objects.
			</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 colliding 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="reset">
			<arglist />
			<digest>
				Clear all forces
			</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
			</digest>
			<description>
				Apply a torque impulse (instantaneous angular force) to the colliding rigid bodies using a worldspace vector described by <ar>x</ar>, <ar>y</ar>, <ar>z</ar>.
			</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="central_exp" get="1" set="1" type="float" size="1">
			<digest>
				Adjust the exponential scaling of distance curve
			</digest>
			<description>
				Adjust the exponent of the central force scaling curve if <at>central_mode</at> is <ar>decrease</ar> or <ar>increase</ar>. The default of 1 gives a linear curve, greater than one exponential, and less than one logarithmic.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Central Exp" />
			</attributelist>
		</attribute>
		<attribute name="central_force" get="1" set="1" type="float" size="1">
			<digest>
				Apply a central force
			</digest>
			<description>
				TEXT_HERE
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Central Force" />
			</attributelist>
		</attribute>
		<attribute name="central_mode" get="1" set="1" type="symbol" size="1">
			<digest>
				Specifies how distance affects central force
			</digest>
			<description>
				Specifies how rigid body distance from center affects the central force when enabled by <at>central_force</at> (default = decrease).
			</description>
			<attributelist>
				<attribute name="enumvals" get="1" set="1" type="atom" size="3">
					<enumlist>
						<enum name="constant">
							<digest>
								Distance has no effect on central force
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="decrease">
							<digest>
								Central force decreases with distance
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="increase">
							<digest>
								Central force increases with distance
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
					</enumlist>
				</attribute>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Central Mode" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="enum" />
			</attributelist>
		</attribute>
		<attribute name="collision_mode" get="1" set="1" type="symbol" size="1">
			<digest>
				Specifies the format of the collisions dictionary
			</digest>
			<description>
				Specifies the format of the collisions dictionary (default = simple)
			</description>
			<attributelist>
				<attribute name="enumvals" get="1" set="1" type="atom" size="2">
					<enumlist>
						<enum name="simple">
							<digest>
								Report contact point positions and normals average
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="complete">
							<digest>
								All contact point position and normals reported
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
					</enumlist>
				</attribute>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Collision Mode" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="enum" />
			</attributelist>
		</attribute>
		<attribute name="collisions" get="1" set="1" type="int" size="1">
			<digest>
				Collision reporting enable
			</digest>
			<description>
				Enables and disables collision dictionary reporting out the first 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="enable" get="1" set="1" type="int" size="1">
			<digest>
				Enable simulation
			</digest>
			<description>
				Enable this ghost object 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="filters" get="1" set="1" type="symbol" size="10">
			<digest>
				List of colliding objects
			</digest>
			<description>
				The list of names that determine colliding objects for this ghost object; Valid attributes are <ar>all</ar> and <ar>default</ar>. Additional valid attributes are defined by the colliding objects'<at>filterclass</at> attribute.
			</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 colliding rigid bodies using the vector from the ghost object center to the rigid body center, scaled by <ar>amount</ar>. If <ar>amount</ar> is positive, bodies shoot away from the ghost center, if negative they are pulled into the ghost center.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Force" />
			</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>
				Ghost object position
			</digest>
			<description>
				Ghost object 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>
				Ghost object orientation as quaternion
			</digest>
			<description>
				Ghost object 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="rotate" get="1" set="1" type="float" size="4">
			<digest>
				Ghost object orientation as angle-axis
			</digest>
			<description>
				Ghost object 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>
				Ghost object orientation as Euler angles
			</digest>
			<description>
				Ghost object 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>
				Ghost object scaling factor
			</digest>
			<description>
				The Ghost object scaling factor in the form x y z (default = 1. 1. 1.). Cannot be applied to <m>concave</m> shapes.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Scale" />
			</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>
								TEXT_HERE
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="concave">
							<digest>
								TEXT_HERE
							</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="torque" get="1" set="1" type="float" size="3">
			<digest>
				Apply torque
			</digest>
			<description>
				Apply a torque (angular force) to the colliding 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 ghost object is bound to
			</digest>
			<description>
				The name of a <o>jit.phys.world</o> context this ghost object 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 collision sensor and forcefield" img="jit.phys.ghost.png" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="jit.phys.world" />
		<seealso name="jit.phys.body" />
		<seealso name="jit.phys.multiple" />
		<seealso name="jit.phys.picker" />
		<seealso name="jit.gl.physdraw" />
	</seealsolist>
</c74object>
