API Reference — dna/layers/JointBehaviorMetadataWriter
class JointBehaviorMetadataWriter : public virtual DefinitionWriter
Configure per-joint internal representation metadata that controls how each joint's translation, rotation, and scale components are evaluated during rig execution.
When to use this
Use this interface when you need to control the internal numeric representation used to evaluate individual joint TRS components at runtime — for example, to switch a joint's rotation from quaternion to Euler for a specific evaluator back-end. This is a write-only interface; pair it with JointBehaviorMetadataReader to read back previously set values.
Example
// writer is a concrete class that inherits from Writer (not from JointBehaviorMetadataWriter directly)
writer->clearJointRepresentations();
// Set each component's representation for joint at index 0
writer->setJointTranslationRepresentation(0, TranslationRepresentation::Vector3);
writer->setJointRotationRepresentation(0, RotationRepresentation::Quaternion);
writer->setJointScaleRepresentation(0, ScaleRepresentation::Vector3);
Parameters
| Name | Type | Description |
|---|---|---|
jointIndex |
std::uint16_t |
required — zero-based index of the target joint; must be less than getJointCount() |
representation |
TranslationRepresentation / RotationRepresentation / ScaleRepresentation |
required — the desired internal representation for the joint's TRS component |
Constraints
jointIndexmust be less than the value returned bygetJointCount(). Passing an out-of-range index is undefined behavior per the@warningon each setter.- Do not inherit directly from
JointBehaviorMetadataWriter. Concrete implementations must inherit fromWriter.
Watch out for
- Implementors must inherit from
Writer, not from this class directly. Inheriting fromJointBehaviorMetadataWriteralone will result in an incomplete implementation that bypasses required Writer lifecycle machinery. - Call
clearJointRepresentations()before re-populating all joint representations to avoid stale entries from a prior configuration.
Description
The representation metadata set through this interface is consumed by the evaluator implementation at rig-evaluation time. The choice of representation (e.g., quaternion vs. Euler for rotation) can affect numerical stability and performance of the downstream joint solver. This class exposes write-only setters; it extends DefinitionWriter and is part of the layered writer hierarchy under Writer.