<?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.hinge" module="jit" category="Jitter Physics">
	<digest>
		A hinge constraint in a physics world
	</digest>
	<description>
		The <o>jit.phys.hinge</o> object restricts two additional angular degrees of freedom so an attached <o>jit.phys.body</o> object can only rotate around the hinge axis. This can be useful to represent doors or wheels rotating around one axis. Limits and Motor forces can be specified for the hinge. If only a single body is bound, it is constrained to a point in world space.
	</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 jit.phys.body 1
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="1" type="OUTLET_TYPE">
			<digest>
				connect to jit.phys.body 2
			</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="reset">
			<arglist />
			<digest>
				Return attached objects to original position and remove forces
			</digest>
			<description>
				Removes any current forces and returns the attached objects to their original position.
			</description>
		</method>
	</methodlist>
	<jittermethodlist>
		<jittermethod name="exportattrs" />
		<jittermethod name="exportsummary" />
		<jittermethod name="getattributes" />
		<jittermethod name="getstate" />
		<jittermethod name="importattrs" />
		<jittermethod name="summary" />
	</jittermethodlist>
	<!--ATTRIBUTES-->
	<attributelist>
		<attribute name="bias" get="1" set="1" type="float" size="1">
			<digest>
				Degree of strictness for position error correction
			</digest>
			<description>
				Magnitude of the limit's position correction (default = 0.3). This attribute sets how strictly the position error is corrected. For most cases, the value should not be greater than 1.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Bias" />
			</attributelist>
		</attribute>
		<attribute name="body1" get="1" set="1" type="symbol" size="1">
			<digest>
				First body to constrain
			</digest>
			<description>
				The name of the first <o>jit.phys.body</o> to constrain.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Body1" />
			</attributelist>
		</attribute>
		<attribute name="body2" get="1" set="1" type="symbol" size="1">
			<digest>
				Second body to constrain
			</digest>
			<description>
				The name of the second <o>jit.phys.body</o> to constrain.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Body2" />
			</attributelist>
		</attribute>
		<attribute name="collisions" get="1" set="1" type="int" size="1">
			<digest>
				Collision enable
			</digest>
			<description>
				Enables collisions between attached bodies (default = 0.).
			</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 constraint 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="hingeangle" get="1" set="0" type="float" size="1">
			<digest>
				Hinge angle
			</digest>
			<description>
				The angle, in degrees, between constrained bodies around the hinge axis (default = 0).
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Hinge Angle" />
			</attributelist>
		</attribute>
		<attribute name="lowerlimit" get="1" set="1" type="float" size="1">
			<digest>
				Lower limit of allowed rotation
			</digest>
			<description>
				The lower limit, in degrees, of allowed rotation around the hinge axis (default = 1). If lowerlimit is greater than upper limit, no limits are applied to the constraint.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Lower Limit" />
			</attributelist>
		</attribute>
		<attribute name="motorstrength" get="1" set="1" type="float" size="1">
			<digest>
				Maximum motor impulse
			</digest>
			<description>
				The maximum motor impulse (default 1.).
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Motor Strength" />
			</attributelist>
		</attribute>
		<attribute name="motortarget" get="1" set="1" type="float" size="1">
			<digest>
				Angle (degrees) around hinge axis
			</digest>
			<description>
				Angle around hinge axis, in degrees, the motor is targeting (default = 0).
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Motor Target" />
			</attributelist>
		</attribute>
		<attribute name="motorvelocity" get="1" set="1" type="float" size="1">
			<digest>
				Motor enable/velocity
			</digest>
			<description>
				Enables motor and specifies velocity desired in degrees per second (default = 0).
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Motor Velocity" />
			</attributelist>
		</attribute>
		<attribute name="position1" get="1" set="1" type="float" size="3">
			<digest>
				Pivot point of body1 as a 3D vector
			</digest>
			<description>
				The pivot point of body1 as a 3D vector relative to the body1 center of mass (default = 0 0 0).
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Position1" />
			</attributelist>
		</attribute>
		<attribute name="position2" get="1" set="1" type="float" size="3">
			<digest>
				Pivot point of body2 as a 3D vector
			</digest>
			<description>
				The pivot point of body2 as a 3D vector relative to the body2 center of mass (default = 0 0 0). If body2 is blank, this is the worldspace position of the constraint.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Position2" />
			</attributelist>
		</attribute>
		<attribute name="quat1" get="1" set="1" type="float" size="4">
			<digest>
				Quaternion orientation of body1 relative to the hinge constraint
			</digest>
			<description>
				The quaternion orientation of body1 relative to the hinge constraint (default = 0 0 0 1). Default value sets hinge axis to z axis.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Quat1" />
			</attributelist>
		</attribute>
		<attribute name="quat2" get="1" set="1" type="float" size="4">
			<digest>
				Quaternion orientation of body2 relative to the hinge constraint
			</digest>
			<description>
				The quaternion orientation of body2 relative to the hinge constraint (default = 0 0 0 1). Default value sets hinge axis to z axis. If body2 is blank, this is the worldspace orientation of the constraint.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Quat2" />
			</attributelist>
		</attribute>
		<attribute name="relaxation" get="1" set="1" type="float" size="1">
			<digest>
				Rate that velocity errors are corrected by limits
			</digest>
			<description>
				The rate at which velocity errors are corrected by limits, effectively the strength of the limits (default = 1.0) . Lower values specify weaker limits. For most cases, the relaxation value should not be greater than 1.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Relaxation" />
			</attributelist>
		</attribute>
		<attribute name="rotate1" get="1" set="1" type="float" size="4">
			<digest>
				Rotation of body1 relative to the constraint
			</digest>
			<description>
				Rotation of body1 relative to the constraint (default = 0 0 0 1). Default value sets hinge axis to z axis.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Rotate1" />
			</attributelist>
		</attribute>
		<attribute name="rotate2" get="1" set="1" type="float" size="4">
			<digest>
				Rotation of body2 relative to the constraint
			</digest>
			<description>
				Rotation of body2 relative to the constraint (default = 0 0 0 1). Default value sets hinge axis to z axis. If body2 is blank, this is the worldspace orientation of the constraint.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Rotate2" />
			</attributelist>
		</attribute>
		<attribute name="rotatexyz1" get="1" set="1" type="float" size="3">
			<digest>
				Euler rotation of body1 relative to the constraint
			</digest>
			<description>
				Euler rotation of body1 relative to the constraint (default = 0 0 0). Default value sets hinge axis to z axis.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Rotate XYZ 1" />
			</attributelist>
		</attribute>
		<attribute name="rotatexyz2" get="1" set="1" type="float" size="3">
			<digest>
				Euler rotation of body2 relative to the constraint
			</digest>
			<description>
				Euler rotation of body2 relative to the constraint (default = 0 0 0). Default value sets hinge axis to z axis. If body2 is blank, this is the worldspace orientation of the constraint.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Rotate XYZ 2" />
			</attributelist>
		</attribute>
		<attribute name="strength" get="1" set="1" type="float" size="1">
			<digest>
				Constraint strength value
			</digest>
			<description>
				Set the constraint strength (default = 0.2). Determines what proportion of the joint error will be fixed each simulation step. Values between 0.1 and 0.8 are recommended.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Strength" />
			</attributelist>
		</attribute>
		<attribute name="stretch" get="1" set="1" type="float" size="1">
			<digest>
				Constraint stretch value
			</digest>
			<description>
				Set the constraint stretch (default = 0.0). Setting to a positive value allows forces acting on rigid bodies to violate the constraint by an amount proportional to the stretch value.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Stretch" />
			</attributelist>
		</attribute>
		<attribute name="upperlimit" get="1" set="1" type="float" size="1">
			<digest>
				Upper limit of allowed rotation
			</digest>
			<description>
				The upper limit, in degrees, of allowed rotation around the hinge axis (default = -1). If <at>lowerlimit</at> is greater than upper limit, no limits are applied to the constraint.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Upper Limit" />
			</attributelist>
		</attribute>
		<attribute name="worldname" get="1" set="1" type="symbol" size="1">
			<digest>
				Name of the context the constraint is bound to
			</digest>
			<description>
				The name of a <o>jit.phys.world</o> context this constraint is bound to.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="World Name" />
			</attributelist>
		</attribute>
		<attribute name="worldpos" get="1" set="0" type="float" size="3">
			<digest>
				The derived world position
			</digest>
			<description>
				The derived constraint world position (default = 0 0 0)
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="World Pos" />
			</attributelist>
		</attribute>
		<attribute name="worldquat" get="1" set="0" type="float" size="4">
			<digest>
				The derived world quaternion
			</digest>
			<description>
				The derived constraint world quaternion (default = 0 0 0 1)
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="World Quat" />
			</attributelist>
		</attribute>
	</attributelist>
	<jitterattributelist />
	<!--EXAMPLE-->
	<examplelist>
		<example caption="A hinge constraint in a physics world" img="jit.phys.hinge.png" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="jit.phys.world" />
		<seealso name="jit.phys.body" />
		<seealso name="jit.phys.barslide" />
		<seealso name="jit.phys.conetwist" />
		<seealso name="jit.phys.point2point" />
		<seealso name="jit.phys.6dof" />
	</seealsolist>
</c74object>
