Contact

Element Information

Model

Attributes

QName Type Fixed Default Use Inheritable Annotation
DEF xs:ID optional
USE xs:IDREF optional
appliedParameters MFString "BOUNCE" optional
array of appliedParametersValues. Note that strict validation of appliedParameters enumeration values does not occur via schema since MFString allows any value in any order.
bounce restriction of SFFloat 0 optional
class xs:NMTOKENS optional
contactNormal SFVec3f 0 1 0 optional
containerField xs:NMTOKEN contacts optional
depth SFFloat 0 optional
frictionCoefficients SFVec2f 0 0 optional
frictionDirection SFVec3f 0 1 0 optional
minBounceSpeed restriction of SFFloat 0 optional
position SFVec3f 0 0 0 optional
slipCoefficients SFVec2f 0 0 optional
softnessConstantForceMix restriction of SFFloat 0.0001 optional
softnessErrorCorrection restriction of SFFloat 0.8 optional
surfaceSpeed SFVec2f 0 0 optional

Used By

Source

<xs:element name="Contact">
  <xs:annotation>
    <xs:appinfo>
      <xs:attribute name="appliedParameters" type="appliedParametersValues">
        <xs:annotation>
          <xs:documentation>Multiple optional values, but cannot be extended.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:element name="body1" type="SFNode" fixed="inputOutputField" default="RigidBody"/>
      <xs:element name="body2" type="SFNode" fixed="inputOutputField" default="RigidBody"/>
      <xs:element name="geometry1" type="SFNode" fixed="inputOutputField" default="X3DNBodyCollidableNode"/>
      <xs:element name="geometry2" type="SFNode" fixed="inputOutputField" default="X3DNBodyCollidableNode"/>
      <xs:attribute name="componentName" type="xs:NMTOKEN" fixed="RigidBodyPhysics"/>
      <xs:attribute name="componentLevel" type="xs:positiveInteger" fixed="2"/>
    </xs:appinfo>
    <xs:documentation source="http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/rigid_physics.html#Contact"/>
  </xs:annotation>
  <xs:complexType>
    <xs:complexContent>
      <xs:extension base="X3DNode">
        <xs:sequence>
          <!-- TODO refactor, follow pattern show below for geometry1/geometry2 so that RigidBody nodes might be replaced with ProtoInstance -->
          <xs:sequence minOccurs="0">
            <xs:element ref="RigidBody">
              <xs:annotation>
                <xs:documentation>body1</xs:documentation>
              </xs:annotation>
            </xs:element>
            <xs:element ref="RigidBody" minOccurs="0">
              <xs:annotation>
                <xs:documentation>body2</xs:documentation>
              </xs:annotation>
            </xs:element>
          </xs:sequence>
          <!-- TODO:  content model indeterminism problem -->
          <!--
						<xs:sequence>
										<xs:element ref="RigidBody">
														<xs:annotation>
																<xs:documentation>body1</xs:documentation>
														</xs:annotation>
										</xs:element>
										<xs:element ref="RigidBody" minOccurs="0">
														<xs:annotation>
																<xs:documentation>body2</xs:documentation>
														</xs:annotation>
										</xs:element>
										<xs:choice minOccurs="0">
														<xs:sequence>
																<xs:element ref="CollidableOffset">
																				<xs:annotation>
																								<xs:documentation>geometry1</xs:documentation>
																				</xs:annotation>
																</xs:element>
																<xs:element ref="CollidableShape" minOccurs="0">
																				<xs:annotation>
																								<xs:documentation>geometry2</xs:documentation>
																				</xs:annotation>
																</xs:element>
														</xs:sequence>
														<xs:sequence minOccurs="0">
																<xs:element ref="CollidableShape">
																				<xs:annotation>
																								<xs:documentation>geometry1</xs:documentation>
																				</xs:annotation>
																</xs:element>
																<xs:element ref="CollidableOffset" minOccurs="0">
																				<xs:annotation>
																								<xs:documentation>geometry2</xs:documentation>
																				</xs:annotation>
																</xs:element>
														</xs:sequence>
										</xs:choice>
										<xs:sequence minOccurs="0" maxOccurs="4">
														<xs:element ref="ProtoInstance">
	<xs:annotation>
			<xs:documentation>Appropriately typed substitution node</xs:documentation>
	</xs:annotation>
</xs:element>
										</xs:sequence>
						</xs:sequence>
						<xs:sequence>
										<xs:element ref="CollidableOffset">
														<xs:annotation>
																<xs:documentation>geometry1</xs:documentation>
														</xs:annotation>
										</xs:element>
										<xs:element ref="CollidableShape" minOccurs="0">
														<xs:annotation>
																<xs:documentation>geometry2</xs:documentation>
														</xs:annotation>
										</xs:element>
										<xs:sequence minOccurs="0">
														<xs:element ref="RigidBody">
																<xs:annotation>
																				<xs:documentation>body1</xs:documentation>
																</xs:annotation>
														</xs:element>
														<xs:element ref="RigidBody" minOccurs="0">
																<xs:annotation>
																				<xs:documentation>body2</xs:documentation>
																</xs:annotation>
														</xs:element>
										</xs:sequence>
										<xs:sequence minOccurs="0" maxOccurs="4">
														<xs:element ref="ProtoInstance">
	<xs:annotation>
			<xs:documentation>Appropriately typed substitution node</xs:documentation>
	</xs:annotation>
</xs:element>
										</xs:sequence>
						</xs:sequence>
						<xs:sequence>
										<xs:element ref="CollidableOffset">
														<xs:annotation>
																<xs:documentation>geometry1</xs:documentation>
														</xs:annotation>
										</xs:element>
										<xs:sequence minOccurs="0">
														<xs:element ref="RigidBody">
																<xs:annotation>
																				<xs:documentation>body1</xs:documentation>
																</xs:annotation>
														</xs:element>
														<xs:element ref="RigidBody" minOccurs="0">
																<xs:annotation>
																				<xs:documentation>body2</xs:documentation>
																</xs:annotation>
														</xs:element>
										</xs:sequence>
										<xs:element ref="CollidableShape" minOccurs="0">
														<xs:annotation>
																<xs:documentation>geometry2</xs:documentation>
														</xs:annotation>
										</xs:element>
										<xs:sequence minOccurs="0" maxOccurs="4">
														<xs:element ref="ProtoInstance">
	<xs:annotation>
			<xs:documentation>Appropriately typed substitution node</xs:documentation>
	</xs:annotation>
</xs:element>
										</xs:sequence>
						</xs:sequence>
						<xs:sequence>
										<xs:element ref="CollidableShape">
														<xs:annotation>
																<xs:documentation>geometry1</xs:documentation>
														</xs:annotation>
										</xs:element>
										<xs:element ref="CollidableOffset" minOccurs="0">
														<xs:annotation>
																<xs:documentation>geometry2</xs:documentation>
														</xs:annotation>
										</xs:element>
										<xs:sequence minOccurs="0">
														<xs:element ref="RigidBody">
																<xs:annotation>
																				<xs:documentation>body1</xs:documentation>
																</xs:annotation>
														</xs:element>
														<xs:element ref="RigidBody" minOccurs="0">
																<xs:annotation>
																				<xs:documentation>body2</xs:documentation>
																</xs:annotation>
														</xs:element>
										</xs:sequence>
										<xs:sequence minOccurs="0" maxOccurs="4">
														<xs:element ref="ProtoInstance">
	<xs:annotation>
			<xs:documentation>Appropriately typed substitution node</xs:documentation>
	</xs:annotation>
</xs:element>
										</xs:sequence>
						</xs:sequence>
						<xs:sequence>
										<xs:element ref="CollidableShape">
														<xs:annotation>
																<xs:documentation>geometry2</xs:documentation>
														</xs:annotation>
										</xs:element>
										<xs:sequence minOccurs="0">
														<xs:element ref="RigidBody">
																<xs:annotation>
																				<xs:documentation>body1</xs:documentation>
																</xs:annotation>
														</xs:element>
														<xs:element ref="RigidBody" minOccurs="0">
																<xs:annotation>
																				<xs:documentation>body2</xs:documentation>
																</xs:annotation>
														</xs:element>
										</xs:sequence>
										<xs:element ref="CollidableOffset" minOccurs="0">
														<xs:annotation>
																<xs:documentation>geometry1</xs:documentation>
														</xs:annotation>
										</xs:element>
										<xs:sequence minOccurs="0" maxOccurs="4">
														<xs:element ref="ProtoInstance">
	<xs:annotation>
			<xs:documentation>Appropriately typed substitution node</xs:documentation>
	</xs:annotation>
</xs:element>
										</xs:sequence>
						</xs:sequence>
						-->
          <xs:choice minOccurs="0">
            <xs:sequence>
              <xs:annotation>
                <xs:documentation>geometry1</xs:documentation>
              </xs:annotation>
              <xs:element ref="CollidableOffset"/>
              <xs:choice minOccurs="0">
                <xs:annotation>
                  <xs:documentation>geometry2</xs:documentation>
                </xs:annotation>
                <xs:element ref="CollidableOffset"/>
                <xs:element ref="CollidableShape"/>
                <xs:element ref="ProtoInstance">
                  <xs:annotation>
                    <xs:documentation>Appropriately typed substitution node</xs:documentation>
                  </xs:annotation>
                </xs:element>
              </xs:choice>
            </xs:sequence>
            <xs:sequence>
              <xs:annotation>
                <xs:documentation>geometry1</xs:documentation>
              </xs:annotation>
              <xs:element ref="CollidableShape"/>
              <xs:choice minOccurs="0">
                <xs:annotation>
                  <xs:documentation>geometry2</xs:documentation>
                </xs:annotation>
                <xs:element ref="CollidableOffset"/>
                <xs:element ref="CollidableShape"/>
                <xs:element ref="ProtoInstance">
                  <xs:annotation>
                    <xs:documentation>Appropriately typed substitution node</xs:documentation>
                  </xs:annotation>
                </xs:element>
              </xs:choice>
            </xs:sequence>
            <xs:sequence>
              <xs:annotation>
                <xs:documentation>geometry1</xs:documentation>
              </xs:annotation>
              <xs:element ref="ProtoInstance">
                <xs:annotation>
                  <xs:documentation>Appropriately typed substitution node</xs:documentation>
                </xs:annotation>
              </xs:element>
              <xs:choice minOccurs="0">
                <xs:annotation>
                  <xs:documentation>geometry2</xs:documentation>
                </xs:annotation>
                <xs:element ref="CollidableOffset"/>
                <xs:element ref="CollidableShape"/>
                <xs:element ref="ProtoInstance">
                  <xs:annotation>
                    <xs:documentation>Appropriately typed substitution node</xs:documentation>
                  </xs:annotation>
                </xs:element>
              </xs:choice>
            </xs:sequence>
          </xs:choice>
        </xs:sequence>
        <xs:attribute name="appliedParameters" type="MFString" default=""BOUNCE"">
          <xs:annotation>
            <xs:documentation>array of appliedParametersValues. Note that strict validation of appliedParameters enumeration values does not occur via schema since MFString allows any value in any order.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="bounce" default="0">
          <xs:simpleType>
            <xs:restriction base="SFFloat">
              <xs:minInclusive value="0"/>
              <xs:maxInclusive value="1"/>
            </xs:restriction>
          </xs:simpleType>
        </xs:attribute>
        <xs:attribute name="contactNormal" type="SFVec3f" default="0 1 0"/>
        <xs:attribute name="depth" type="SFFloat" default="0"/>
        <xs:attribute name="frictionCoefficients" type="SFVec2f" default="0 0">
          <xs:annotation>
            <xs:appinfo>
              <xs:minInclusive value="0"/>
            </xs:appinfo>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="frictionDirection" type="SFVec3f" default="0 1 0"/>
        <xs:attribute name="minBounceSpeed" default="0">
          <xs:simpleType>
            <xs:restriction base="SFFloat">
              <xs:minInclusive value="0"/>
            </xs:restriction>
          </xs:simpleType>
        </xs:attribute>
        <xs:attribute name="position" type="SFVec3f" default="0 0 0"/>
        <xs:attribute name="slipCoefficients" type="SFVec2f" default="0 0"/>
        <xs:attribute name="softnessConstantForceMix" default="0.0001">
          <xs:simpleType>
            <xs:restriction base="SFFloat">
              <xs:minInclusive value="0"/>
              <xs:maxInclusive value="1"/>
            </xs:restriction>
          </xs:simpleType>
        </xs:attribute>
        <xs:attribute name="softnessErrorCorrection" default="0.8">
          <xs:simpleType>
            <xs:restriction base="SFFloat">
              <xs:minInclusive value="0"/>
              <xs:maxInclusive value="1"/>
            </xs:restriction>
          </xs:simpleType>
        </xs:attribute>
        <xs:attribute name="surfaceSpeed" type="SFVec2f" default="0 0"/>
        <xs:attribute name="containerField" type="xs:NMTOKEN" default="contacts"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
</xs:element>

Sample