X3D Model Documentation: TransformCenterOffsetForRotation.x3d

  1  <?xml version="1.0" encoding="UTF-8"?>
  2  <!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.3//EN" "https://www.web3d.org/specifications/x3d-3.3.dtd">
  3  <X3D profile='Interchange' version='3.3 xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='https://www.web3d.org/specifications/x3d-3.3.xsd'>
  4       <head>
  5            <meta name='titlecontent='TransformCenterOffsetForRotation.x3d'/>
  6            <meta name='descriptioncontent='Use Transform center field to compare original Cylinder (left) to rotation about middle of object (middle Cylinder) to rotation about bottom of object (right Cylinder).'/>
  7            <meta name='creatorcontent='Don Brutzman'/>
  8            <meta name='createdcontent='28 January 2008'/>
  9            <meta name='modifiedcontent='20 October 2019'/>
 10            <meta name='referencecontent='https://X3dGraphics.com'/>
 11            <meta name='referencecontent='https://www.web3d.org/x3d/content/examples/X3dResources.html'/>
 12            <meta name='rightscontent='Copyright Don Brutzman and Leonard Daly 2007'/>
 13            <meta name='subjectcontent='X3D book, X3D graphics, X3D-Edit, http://www.x3dGraphics.com'/>
 14            <meta name='identifiercontent='https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter03Grouping/TransformCenterOffsetForRotation.x3d'/>
 15            <meta name='generatorcontent='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/>
 16            <meta name='licensecontent='../license.html'/>
 17       </head>
<!--

<!-- -->

<!-- to top Index for DEF nodes: FlatBox, TallCylinder
-->
 18       <Scene>
 19            <!-- leftmost cylinder is vertical -->
 20            <WorldInfo title='TransformCenterOffsetForRotation.x3d'/>
 21            <Transform translation='-3.5 0 0'>
 22 
               <!-- Shape TallCylinder is a DEF node that has 2 USE nodes: USE_1, USE_2 -->
               <Shape DEF='TallCylinder'>
 23                      <Cylinder height='4'/>
 24                      <Appearance>
 25                           <Material diffuseColor='0.941176 0.027451 0'/>
 26                      </Appearance>
 27                 </Shape>
 28            </Transform>
 29            <!-- center cylinder rotated -45 degrees about center -->
 30            <Transform rotation='0 0 1 -0.78'>
 31                 <Shape USE='TallCylinder'/>
 32            </Transform>
 33            <!-- rightmost cylinder rotated -45 degrees about base -->
 34            <Transform center='0 -2 0rotation='0 0 1 -0.78translation='3.5 0 0'>
 35                 <Shape USE='TallCylinder'/>
 36            </Transform>
 37 
          <!-- Shape FlatBox is a DEF node that has 1 USE node: USE_1 -->
          <Shape DEF='FlatBox'>
 38                 <Box size='7 0.1 2'/>
 39                 <Appearance>
 40                      <Material diffuseColor='0 0.643137 0.960784'/>
 41                 </Appearance>
 42            </Shape>
 43            <Transform translation='0 -2 0'>
 44                 <Shape USE='FlatBox'/>
 45            </Transform>
 46       </Scene>
 47  </X3D>
<!--

<!-- -->

<!-- to top Index for DEF nodes: FlatBox, TallCylinder
-->
X3D Tooltips element index: Appearance, Box, Cylinder, head, Material, meta, Scene, Shape, Transform, WorldInfo, X3D, accessType and type, XML data types, field types

-->
<!-- Online at
https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter03Grouping/TransformCenterOffsetForRotationIndex.html -->
<!-- Version control at
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter03Grouping/TransformCenterOffsetForRotation.x3d -->

<!-- Color legend: X3D terminology <X3dNode DEF='idName' field='value'/> matches XML terminology <XmlElement DEF='idName' attribute='value'/>
(Light-blue background: event-based behavior node or statement) (Grey background inside box: inserted documentation) (Magenta background: X3D Extensibility)
-->

to top <!-- For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints. -->