API Reference — dna
75 entries across 38 modules.
By Task
Binary DNA stream I/O
Read and write DNA rig data in the compact binary format, with control over which layers and detail levels to load
| 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. |
| 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. |
JSON DNA stream I/O
Read and write DNA rig data in human-readable JSON format, with support for format conversion
| API | Module | Summary |
|---|---|---|
| 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. |
Load and save configuration
Configure coordinate systems, units, data layers, and transform policies for DNA I/O operations
| API | Module | Summary |
|---|---|---|
| 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. |
| 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. |
Abstract DNA reader interface
Unified and stream-based interfaces for reading complete DNA documents and individual layers
| API | Module | Summary |
|---|---|---|
| Reader | Reader | Aggregate reader interface combining every DNA layer's reader interface into one type. |
| Reader | Writer | A forward-declared reader type that Writer::setFrom accepts as the source when copying an entire DNA document into a writer. |
| StreamReader | StreamReader | Extends Reader with the ability to actually pull rig data from a stream into internal structures. |
Abstract DNA writer interface
Unified and stream-based interfaces for writing complete DNA documents and individual layers
| API | Module | Summary |
|---|---|---|
| StreamWriter | StreamWriter | Abstract base defining the interface for writing DNA data to an output stream. Obtain a concrete instance via BinaryStreamWriter or JSONStreamWriter rather than subclassing directly. |
| Writer | Writer | Abstract unified write interface for all DNA data layers. Use this as the base type when you need to write a complete DNA asset — it combines geometry, behavior, machine-learned behavior, RBF, joint metadata, and twist/swing writing into a single entry point. |
Behavioral layer read and write
Access and modify behavior data including GUI-to-control mappings, PSD expressions, and joint matrices
| API | Module | Summary |
|---|---|---|
| BehaviorReader | BehaviorReader | Access the behavioral data layer of a DNA file — GUI-to-raw control mappings, PSD expressions, and joint matrix structure — in read-only mode. |
| BehaviorWriter | BehaviorWriter | Write rig evaluation behavior data into a DNA asset — GUI-to-raw control mapping, PSD expressions, joint group matrices, blend shape channels, and animated maps. Do not subclass this directly; inherit from Writer instead. |
Definition layer read and write
Access and modify static rig definition data including controls, joints, blend shapes, and mesh metadata
| API | Module | Summary |
|---|---|---|
| DefinitionReader | DefinitionReader | Read-only interface to the rig's static definition data — controls, joints, blend shape channels, animated maps, meshes, and neutral joint transforms. |
| DefinitionWriter | DefinitionWriter | Write static rig definition data — control names, joint hierarchy, blend shape channels, animated maps, and meshes — into a DNA asset. Implement via Writer, not directly from this class. |
| MeshBlendShapeChannelMapping | DefinitionReader | Maps a blend shape channel to its owning mesh by pairing a mesh index with a blend shape channel index. |
Character and rig metadata
Query and configure character identity, demographic archetype, rig version, and file format information
| API | Module | Summary |
|---|---|---|
| Archetype | Descriptor | Classifies a character's demographic archetype for DNA rig selection. |
| DescriptorReader | DescriptorReader | Query character identity, rig configuration, coordinate conventions, LOD range, and database provenance from a loaded DNA asset. |
| DescriptorWriter | DescriptorWriter | Write character and rig metadata — identity, coordinate conventions, LOD range, and database provenance — into a DNA asset. |
| Gender | Descriptor | Specifies the gender of a character for DNA rig selection. |
| HeaderReader | HeaderReader | Read the file format generation and version numbers from a DNA rig's header block. |
| HeaderWriter | HeaderWriter | Set the file format generation and version fields in a rig's DNA header during a write pass. |
| VersionInfo | VersionInfo | Query the version of the DNA library that the current binary was built against. |
Mesh geometry
Access and modify vertex positions, normals, texture coordinates, and mesh structure
| API | Module | Summary |
|---|---|---|
| Delta | Geometry | Semantic alias for Vector3 that marks a value as a blend-shape displacement rather than a position or direction. |
| GeometryReader | GeometryReader | Access all geometry data — vertex positions, texture coordinates, and related mesh data — for a rig's meshes. This is the read-only side of the geometry layer; pair it with GeometryWriter when you need to modify mesh data. |
| GeometryWriter | GeometryWriter | Write geometry data (meshes, vertex positions, normals, texture coordinates, and layouts) into a rig DNA structure. |
| Normal | Geometry | Semantic alias for Vector3 that marks a value as a surface normal direction rather than a position or displacement. |
| Position | Geometry | Semantic alias for Vector3 that marks a value as a spatial position rather than a direction or displacement. |
| TextureCoordinate | Geometry | A UV pair that locates a point in 2D texture space for a mesh vertex. |
| VertexLayout | Geometry | Index triple that assembles a logical mesh vertex from three separate attribute arrays — position, texture coordinate, and normal. |
Joint transform representations
Query and configure how joint rotations, scales, and translations are encoded in the DNA file
| API | Module | Summary |
|---|---|---|
| JointBehaviorMetadataReader | JointBehaviorMetadataReader | Query the internal representation hints that govern how each joint's translation, rotation, and scale components are evaluated during rig execution. |
| JointBehaviorMetadataWriter | JointBehaviorMetadataWriter | Configure per-joint internal representation metadata that controls how each joint's translation, rotation, and scale components are evaluated during rig execution. |
| RotationRepresentation | JointBehaviorMetadata | Identifies whether joint rotation data is stored as Euler angles or as a quaternion in a DNA file. |
| ScaleRepresentation | JointBehaviorMetadata | Identifies the storage format used for joint scale data in a DNA file. |
| TranslationRepresentation | JointBehaviorMetadata | Identifies the storage format used for joint translation data in a DNA file. |
Pose and deformation behaviors
Configure and access radial basis function poses, machine-learned neural networks, and twist-swing transformations
| API | Module | Summary |
|---|---|---|
| ActivationFunction | MachineLearnedBehavior | Specify the nonlinear activation function applied at each neuron layer in a machine-learned rig behavior network. |
| AutomaticRadius | RBFBehavior | Toggles whether an RBF target's radius of influence is computed automatically rather than set explicitly. |
| 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. |
| 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. |
| TwistAxis | Twist | Identifies which local axis (X, Y, or Z) a twist or swing transformation is measured around. |
| 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. |
Foundation types
Basic mathematical and utility types used throughout the DNA API
| API | Module | Summary |
|---|---|---|
| Vector3 | Vector3 | A plain 3-component float vector (x, y, z) with the standard set of component-wise arithmetic operators. |