HAnimSegment
Overview
HAnimSegment node contains Shape geometry for each body segment, providing a visual representation of the skeleton segment. Parent/child translation and rotation relationships are defined in ancestor/descendant HAnimSegment nodes. HAnimSegment contains Coordinate or CoordinateDouble with containerField='coord',
HAnimDisplacer with containerField='displacers'
and Shape or grouping nodes with containerField='children'.
The HAnimSegment node belongs to the HAnim component and requires at least level 1, its default container field is children. It is available from X3D version 3.0 or higher.
Hierarchy
1
2
3
4
+ X3DNode
+ X3DChildNode
+ X3DGroupingNode
+ HAnimSegment
Fields
SFNode [in, out] metadata NULL [X3DMetadataObject]
Information about this node can be contained in a MetadataBoolean, MetadataDouble, MetadataFloat, MetadataInteger, MetadataString or MetadataSet node.
Hint
SFString [in, out] description “”
Author-provided prose that describes intended purpose of this node.
Hint
- Many XML tools substitute XML character references for special characters automatically if needed within an attribute value (such as & for & ampersand character, or " for “ quotation-mark character).
SFString [in, out] name “”
Unique name attribute must be defined so that HAnimSegment node can be identified at run time for animation purposes.
Hints
- For arbitrary humanoids, HAnimSegment name can describe geometry between parent HAnimJoint and sibling HAnimJoint nodes (for example LeftHip_to_LeftKnee).
- HAnim Specification part 1, Humanoid Joint-Segment Hierarchy
- Well-defined names can simplify design and debugging through improved author understanding.
- X3D Scene Authoring Hints, Naming Conventions
- HAnim2 Names HAnim1 Alias Tables
- Candidate names found in the HAnim Specification are sacrum, pelvis, l_thigh, l_calf, l_talus, l_navicular, l_cuneiform_1, l_metatarsal_1, l_tarsal_proximal_phalanx_1, l_tarsal_distal_phalanx_1, l_cuneiform_2, l_metatarsal_2, l_tarsal_proximal_phalanx_2, l_tarsal_middle_phalanx_2, l_tarsal_distal_phalanx_2, l_cuneiform_3, l_metatarsal_3, l_tarsal_proximal_phalanx_3, l_tarsal_middle_phalanx_3, l_tarsal_distal_phalanx_3, l_calcaneus, l_cuboid, l_metatarsal_4, l_tarsal_proximal_phalanx_4, l_tarsal_middle_phalanx_4, l_tarsal_distal_phalanx_4, l_metatarsal_5, l_tarsal_proximal_phalanx_5, l_tarsal_middle_phalanx_5, l_tarsal_distal_phalanx_5, r_thigh, r_calf, r_talus, r_navicular, r_cuneiform_1, r_metatarsal_1, r_tarsal_proximal_phalanx_1, r_tarsal_distal_phalanx_1, r_cuneiform_2, r_metatarsal_2, r_tarsal_proximal_phalanx_2, r_tarsal_middle_phalanx_2, r_tarsal_distal_phalanx_2, r_cuneiform_3, r_metatarsal_3, r_tarsal_proximal_phalanx_3, r_tarsal_middle_phalanx_3, r_tarsal_distal_phalanx_3, r_calcaneus, r_cuboid, r_metatarsal_4, r_tarsal_proximal_phalanx_4, r_tarsal_middle_phalanx_4, r_tarsal_distal_phalanx_4, r_metatarsal_5, r_tarsal_proximal_phalanx_5, r_tarsal_middle_phalanx_5, r_tarsal_distal_phalanx_5, l5, l4, l3, l2, l1, t12, t11, t10, t9, t8, t7, t6, t5, t4, t3, t2, t1, c7, c6, c5, c4, c3, c2, c1, skull, l_eyelid, r_eyelid, l_eyeball, r_eyeball, l_eyebrow, r_eyebrow, jaw, l_clavicle, l_scapula, l_upperarm, l_forearm, l_carpal, l_trapezium, l_metacarpal_1, l_carpal_proximal_phalanx_1, l_carpal_distal_phalanx_1, l_trapezoid, l_metacarpal_2, l_carpal_proximal_phalanx_2, l_carpal_middle_phalanx_2, l_carpal_distal_phalanx_2, l_capitate, l_metacarpal_3, l_carpal_proximal_phalanx_3, l_carpal_middle_phalanx_3, l_carpal_distal_phalanx_3, l_hamate, l_metacarpal_4, l_carpal_proximal_phalanx_4, l_carpal_middle_phalanx_4, l_carpal_distal_phalanx_4, l_metacarpal_5, l_carpal_proximal_phalanx_5, l_carpal_middle_phalanx_5, l_carpal_distal_phalanx_5, r_clavicle, r_scapula, r_upperarm, r_forearm, r_carpal, r_trapezium, r_metacarpal_1, r_carpal_proximal_phalanx_1, r_carpal_distal_phalanx_1, r_trapezoid, r_metacarpal_2, r_carpal_proximal_phalanx_2, r_carpal_middle_phalanx_2, r_carpal_distal_phalanx_2, r_capitate, r_metacarpal_3, r_carpal_proximal_phalanx_3, r_carpal_middle_phalanx_3, r_carpal_distal_phalanx_3, r_hamate, r_metacarpal_4, r_carpal_proximal_phalanx_4, r_carpal_middle_phalanx_4, r_carpal_distal_phalanx_4, r_metacarpal_5, r_carpal_proximal_phalanx_5, r_carpal_middle_phalanx_5, r_carpal_distal_phalanx_5
Warnings
- name prefix must match ancestor HAnimHumanoid name followed by underscore character, if more than one humanoid appears within a scene file. For example, ‘Nancy_’ prepended before location name.
- name field is not included if this instance is a USE node, in order to avoid potential mismatches. Examples: sacrum pelvis l_thigh l_calf etc. as listed in HAnim Specification.
SFFloat [in, out] mass 0 [0,∞)
Total mass of the segment, 0 if not available, defined in mass base units (default is kilograms).
Hints
SFVec3f [in, out] centerOfMass 0 0 0 (-∞,∞)
Location within segment of center of mass.
MFFloat [in, out] momentsOfInertia [ 0, 0, 0, 0, 0, 0, 0, 0, 0 ] [0,∞)
3x3 moments of inertia matrix. default: 0 0 0 0 0 0 0 0 0.
MFNode [in, out] displacers [ ] [HAnimDisplacer]
The displacers field stores HAnimDisplacer objects for a particular HAnimSegment object.
Warning
- Index values for HAnimHumanoid skin IndexedFaceSet, skinCoord and skinNormal nodes must all be consistently defined together with HAnimJoint HAnimSegment and HAnimDisplacer nodes for proper skin animation.
SFNode [in, out] coord NULL [X3DCoordinateNode]
The coord field is used for HAnimSegment objects that have deformable meshes and shall contain coordinates referenced from the IndexedFaceSet for the paarent HAnimSegment object. The coordinates are given the same name as the HAnim Segment object, but with “_coords” appended to the name (for example, “skull_coords”).
Warning
- Index values for HAnimHumanoid skin IndexedFaceSet, skinCoord and skinNormal nodes must all be consistently defined together with HAnimJoint HAnimSegment and HAnimDisplacer nodes for proper skin animation.
SFBool [in, out] visible TRUE
Whether or not renderable content within this node is visually displayed.
Hints
- The visible field has no effect on animation behaviors, event passing or other non-visual characteristics.
- Content must be visible to be collidable and to be pickable.
SFBool [in, out] bboxDisplay FALSE
Whether to display bounding box for associated geometry, aligned with world coordinates.
Hint
- The bounding box is displayed regardless of whether contained content is visible.
SFVec3f [ ] bboxSize -1 -1 -1 [0,∞) or −1 −1 −1
Bounding box size is usually omitted, and can easily be calculated automatically by an X3D player at scene-loading time with minimal computational cost. Bounding box size can also be defined as an optional authoring hint that suggests an optimization or constraint.
Hints
- Can be useful for collision computations or inverse-kinematics (IK) engines.
- Precomputation and inclusion of bounding box information can speed up the initialization of large detailed models, with a corresponding cost of increased file size.
- X3D Architecture, 10.2.2 Bounding boxes
- X3D Architecture, 10.3.1 X3DBoundedObject
SFVec3f [ ] bboxCenter 0 0 0 (-∞,∞)
Bounding box center accompanies bboxSize and provides an optional hint for bounding box position offset from origin of local coordinate system.
Hints
- Precomputation and inclusion of bounding box information can speed up the initialization of large detailed models, with a corresponding cost of increased file size.
- X3D Architecture, 10.2.2 Bounding boxes
- X3D Architecture, 10.3.1 X3DBoundedObject
MFNode [in] addChildren
Input field addChildren.
MFNode [in] removeChildren
Input field removeChildren.
MFNode [in, out] children [ ] [X3DChildNode]
Grouping nodes contain an ordered list of children nodes.
Hints
- Each grouping node defines a coordinate space for its children, relative to the coordinate space of its parent node. Thus transformations accumulate down the scene graph hierarchy.
- Place any geometry for parent HAnimJoint within a child Transform having the same translation value as the parent HAnimJoint center value.
- InputOnly MFNode addChildren field can append new X3DChildNode nodes via a ROUTE connection, duplicate input nodes (i.e. matching DEF, USE values) are ignored.
- InputOnly MFNode removeChildren field can remove nodes from the children list, unrecognized input nodes (i.e. nonmatching DEF, USE values) are ignored.
- X3D Architecture 10.2.1 Grouping and children node types
Advice
Hints
- HAnimSegment displays geometry between parent HAnimJoint and sibling HAnimJoint nodes.
- HAnim Specification
- HAnim Specification part 1, Segment
- X3D for Advanced Modeling (X3D4AM) slideset
Warnings
- Requires X3D
profile='Full'
or else include<component name='HAnim' level='1'/>
- For X3D3 HAnim1, previous spelling of component name was ‘H-Anim’ (including hyphen).
- The number of contained <HAnimSegment USE=’*’
containerField='segments'/>
nodes at top level of HAnimHumanoid needs to match the number of corresponding HAnimJoint node instances found within the preceding skeleton hierarchy.