API Reference — dna
75 entries across 38 modules.
By Task
Stream I/O configuration
Read and write DNA rig data in binary or JSON format
| API | Module | Summary |
|---|---|---|
| BinaryStreamReader | BinaryStreamReader | Reads DNA rig data from a binary stream, with factory methods that let callers control which data layers and levels of detail get loaded. |
| BinaryStreamReader | BinaryStreamWriter | A forward-declared reader type that BinaryStreamWriter accepts as a data source when copying DNA content between streams. |
| BinaryStreamReader | JSONStreamWriter | Forward-declared peer type used as a data source when copying binary DNA data into a JSONStreamWriter via setFrom. |
| BinaryStreamWriter | BinaryStreamWriter | Write DNA rig data to a binary stream, and optionally populate it directly from an existing BinaryStreamReader or JSONStreamReader instance. |
| Configuration | Configuration | Bundles all the load-time options for reading a DNA file — which layers, which LODs, and which coordinate/unit conventions to apply. |
| CoordinateSystem | Configuration | Alias for tdm::coord_sys, describing the axis directions for all coordinate axes. |
| CoordinateSystemTransformPolicy | Configuration | Controls whether loaded rig data is converted into a destination coordinate system or left as authored. |
| DataLayer | Configuration | Bitmask enum identifying the loadable layers of a DNA rig, from the lightweight Descriptor up through All. |
| Direction | Configuration | Alias for tdm::axis_dir, representing a signed direction along a coordinate axis. |
| FaceWindingOrder | Configuration | Face vertex winding order of the geometry data, viewed along the outward surface normal. |
| JSONStreamReader | BinaryStreamWriter | A forward-declared reader type that BinaryStreamWriter accepts as a data source when the build supports JSON, letting a writer be populated from JSON-formatted DNA data. |
| JSONStreamReader | JSONStreamReader | Read DNA rig data from a stream that holds the human-readable JSON representation instead of the compact binary format. |
| JSONStreamReader | JSONStreamWriter | Forward-declared peer type used as a data source when copying JSON DNA data into a JSONStreamWriter via setFrom. |
| JSONStreamWriter | JSONStreamWriter | Write DNA rig data out as human-readable JSON, and optionally populate it directly from an existing BinaryStreamReader or JSONStreamReader. |
| RotationDirection | Configuration | Alias for tdm::rot_dir, representing the sign of rotation (positive/negative) about an axis. |
| RotationSequence | Configuration | Alias for tdm::rot_seq, representing the order in which axis rotations are composed (e.g. XYZ). |
| RotationSign | Configuration | Alias for tdm::rot_sign, a per-axis triple of RotationDirection values specifying the sign convention for rotation on each axis. |
| RotationUnit | Configuration | Unit of measurement (degrees or radians) used for rotation values in the rig. |
| TranslationUnit | Configuration | Unit of measurement (centimeters or meters) used for translation values in the rig. |
| UnknownLayerPolicy | Configuration | Controls whether layers the reader/writer doesn't recognize are kept or discarded. |
Generic reader and writer
Aggregate interfaces for reading and writing all DNA layers, and base types for format-specific implementations
| API | Module | Summary |
|---|---|---|
| Reader | Reader | Aggregate reader interface combining every DNA layer's reader interface into one type. |
| Reader | Writer | Forward declaration of the DNA Reader type, used by Writer::setFrom as the source to copy data from. |
| StreamReader | StreamReader | Extends Reader with the ability to actually pull rig data from a stream into internal structures. |
| StreamWriter | StreamWriter | Persist a DNA populated in memory to a stream by calling a single write() method. |
| Writer | Writer | Write every DNA layer through one interface, and clone an existing Reader into it with setFrom. |
Instance creation helpers
Factory template specializations for the pma framework to construct and destroy stream readers and writers
| API | Module | Summary |
|---|---|---|
| DefaultInstanceCreator | BinaryStreamReader | A pma framework specialization that tells the generic instance-creation machinery how to construct a BinaryStreamReader by default. |
| DefaultInstanceCreator | BinaryStreamWriter | Template specialization that tells generic pma factory code to use BinaryStreamWriter::create when constructing instances of this type. |
| DefaultInstanceCreator | JSONStreamReader | Template specialization that tells generic pma factory code to use JSONStreamReader::create when constructing instances of this type. |
| DefaultInstanceCreator | JSONStreamWriter | Template specialization that tells generic pma factory code to use JSONStreamWriter::create when constructing instances of this type. |
| DefaultInstanceDestroyer | BinaryStreamReader | A pma framework specialization that tells the generic instance-destruction machinery how to release a BinaryStreamReader created via the factory pattern. |
| DefaultInstanceDestroyer | BinaryStreamWriter | Template specialization that tells generic pma factory code to use BinaryStreamWriter::destroy when releasing instances of this type. |
| DefaultInstanceDestroyer | JSONStreamReader | Template specialization that tells generic pma factory code to use JSONStreamReader::destroy when releasing instances of this type. |
| DefaultInstanceDestroyer | JSONStreamWriter | Template specialization that tells generic pma factory code to use JSONStreamWriter::destroy when releasing instances of this type. |
Layer readers and writers
Interfaces for reading and writing specific DNA layers like behavior and definition data
| API | Module | Summary |
|---|---|---|
| BehaviorReader | BehaviorReader | Read the DNA attributes that define how the rig evaluates: GUI-to-raw control mapping, PSD expressions and joint matrices. |
| BehaviorWriter | BehaviorWriter | Write the DNA attributes that define how the rig evaluates: GUI-to-raw control mapping and PSD expressions. |
| DefinitionReader | DefinitionReader | Read the rig's static data: GUI and raw control names, joint names, per-LOD joint indices and the joint hierarchy. |
| DefinitionWriter | DefinitionWriter | Write the rig's static data: GUI and raw control names, joint names and joint index lists. |
| MeshBlendShapeChannelMapping | DefinitionReader | Mapping that associates a blend shape channel with its mesh. |
Character metadata
Read and write character and rig information such as name, archetype, gender, age, and file format version
| API | Module | Summary |
|---|---|---|
| Archetype | Descriptor | Character archetype stored in the DNA descriptor. |
| DescriptorReader | DescriptorReader | Read metadata about the character and the rig: name, archetype, gender, age, key-value metadata, coordinate conventions, LOD count and database info. |
| DescriptorWriter | DescriptorWriter | Write metadata about the character and the rig: name, archetype, gender, age, key-value metadata, coordinate conventions, LOD count and database info. |
| Gender | Descriptor | Character gender stored in the DNA descriptor. |
| HeaderReader | HeaderReader | Read the file format generation and version of a rig's DNA data. |
| HeaderWriter | HeaderWriter | Set the file format generation and version of a rig's DNA data. |
| VersionInfo | VersionInfo | Query the version of the DNA library that the current binary was built against. |
Geometry data
Read and write mesh vertex positions, normals, texture coordinates, and vertex layouts
| API | Module | Summary |
|---|---|---|
| Delta | Geometry | Type alias for Vector3 that represents a per-vertex offset. |
| GeometryReader | GeometryReader | Read vertex data (positions and texture coordinates) of the meshes in a rig, without modifying it. |
| GeometryWriter | GeometryWriter | Write mesh geometry (vertex positions, texture coordinates, normals and layouts) into a rig. Write-only counterpart of the geometry reader. |
| Normal | Geometry | Type alias for Vector3 that represents a vertex normal. |
| Position | Geometry | Type alias for Vector3 that represents a vertex position. |
| TextureCoordinate | Geometry | A 2D UV coordinate for a vertex. |
| Vector3 | Vector3 | A plain 3-component float vector (x, y, z) with the standard set of component-wise arithmetic operators. |
| VertexLayout | Geometry | Describes one vertex as a set of indices into the position, texture coordinate and normal arrays. |
Joint transform metadata
Read and write how each joint's translation, rotation, and scale are represented at runtime
| API | Module | Summary |
|---|---|---|
| JointBehaviorMetadataReader | JointBehaviorMetadataReader | Read how each joint's translation, rotation and scale are represented internally when the rig is evaluated at runtime. |
| JointBehaviorMetadataWriter | JointBehaviorMetadataWriter | Set how each joint's translation, rotation and scale are represented internally when the rig is evaluated at runtime. |
| RotationRepresentation | JointBehaviorMetadata | Describes how a joint's rotation values are represented. |
| ScaleRepresentation | JointBehaviorMetadata | Describes how a joint's scale values are represented. |
| TranslationRepresentation | JointBehaviorMetadata | Describes how a joint's translation values are represented. |
| TwistAxis | Twist | Identifies which local axis (X, Y, or Z) a twist or swing transformation is measured around. |
Machine learned behavior
Read and write neural network configuration, operations, and which networks drive mesh regions
| API | Module | Summary |
|---|---|---|
| ActivationFunction | MachineLearnedBehavior | Enumerates the activation functions available for machine learned behavior. |
| MachineLearnedBehaviorExtReader | MachineLearnedBehaviorExtReader | Read-only accessors to the neural network extension data associated with a rig — the per-model operation graph (operation sets, operation types, static parameters, and dependency indices) that MachineLearnedBehaviorReader itself does not expose. |
| MachineLearnedBehaviorExtWriter | MachineLearnedBehaviorExtWriter | Write-only accessors for the operation instance data associated with a rig — building up the same per-model operation graph that MachineLearnedBehaviorExtReader exposes for reading. |
| MachineLearnedBehaviorOperationType | MachineLearnedBehaviorExt | Enumerates the kind of computation a single ML operation performs within a neural network layer. |
| MachineLearnedBehaviorParameterKey | MachineLearnedBehaviorExt | Enumerates the static parameter keys an ML operation can reference, covering joint transform types, coordinate axes, rotation signs, and rotation sequence. |
| MachineLearnedBehaviorReader | MachineLearnedBehaviorReader | Read-only accessors to the neural network data associated with a rig — ML control names, neural network counts, which networks are active at each LOD, and which networks drive which mesh region. |
| MachineLearnedBehaviorWriter | MachineLearnedBehaviorWriter | Write-only accessors for the neural network data associated with a rig — defining ML control names, the neural-network index lists, which networks run at each LOD, and mesh-region associations. |
RBF pose solving
Read and write radial basis function pose targets, distance methods, and solver configuration
| API | Module | Summary |
|---|---|---|
| AutomaticRadius | RBFBehavior | Toggles whether an RBF target's radius of influence is computed automatically rather than set explicitly. |
| RBFBehaviorReader | RBFBehaviorReader | Read-only accessors to the RBF (radial basis function) pose data associated with a rig — pose names, their driven joint/blend-shape/animated-map outputs, output values, scale, and the controls that feed them. |
| RBFBehaviorWriter | RBFBehaviorWriter | Write-only accessors for the RBF pose data associated with a rig — pose names, scale, control names, and the input/output control indices that connect poses to the rest of the rig. |
| RBFDistanceMethod | RBFBehavior | Selects how the distance between an input and an RBF pose target is measured. |
| RBFFunctionType | RBFBehavior | Selects the radial falloff function applied to distance when computing an RBF target's contribution weight. |
| RBFNormalizeMethod | RBFBehavior | Selects when contribution weights from an RBF solve are normalized to sum to a consistent total. |
| RBFSolverType | RBFBehavior | Selects the algorithm used to combine RBF (radial basis function) pose target contributions into a final weight. |
Twist and swing deformation
Read and write twist and swing joint transformations that follow primary joint rotations
| API | Module | Summary |
|---|---|---|
| TwistSwingBehaviorReader | TwistSwingBehaviorReader | Read-only accessors to the swing and twist data associated with a rig — which joint rotations drive twist/swing transformations, which joints they output to, and the blend weights applied. |
| TwistSwingBehaviorWriter | TwistSwingBehaviorWriter | Write-only accessors to the swing and twist data associated with a rig — defining twist/swing parameter groups, their axis, driver control indices, driven joints, and blend weights. |