DNA
-
class dna::StreamReader : public dna::Reader
Inheritence diagram for dna::StreamReader:
Collaboration diagram for dna::StreamReader:
Subclassed by dna::BinaryStreamReader, dna::JSONStreamReader
Public Functions
-
~StreamReader() override
-
virtual void read() = 0
read data from stream into internal structures.
Public Static Attributes
-
static const sc::StatusCode SignatureMismatchError = {200, "DNA signature mismatched, expected %.3s, got %.3s"}
-
static const sc::StatusCode VersionMismatchError = {201, "DNA version mismatched, expected %hu.%hu, got %hu.%hu"}
-
static const sc::StatusCode InvalidDataError = {202, "Invalid data in DNA"}
-
~StreamReader() override
-
class dna::Reader : public dna::BehaviorReader, public dna::GeometryReader
Inheritence diagram for dna::Reader:
Collaboration diagram for dna::Reader:
The abstract Reader which its implementations are expected to inherit.
Note
This class combines the various different reader interfaces into a single interface. The artificial separation into multiple interfaces mirrors the DNA file structure that is separated into matching layers under the same names. As these layers can be selectively loaded, it might be convenient to slice-off interfaces which layers were not loaded.
Subclassed by dna::StreamReader, dnac::DNACalibDNAReader
-
class dna::BehaviorReader : public virtual dna::DefinitionReader
Inheritence diagram for dna::BehaviorReader:
Collaboration diagram for dna::BehaviorReader:
Read-only accessors for DNA attributes that define the rig’s evaluation.
See also
Warning
Implementors should inherit from Reader itself and not this class.
Subclassed by dna::Reader
Public Functions
-
virtual ConstArrayView<std::uint16_t> getGUIToRawInputIndices() const = 0
Input indices used for mapping gui to raw controls.
- Returns
View over the array of input indices.
-
virtual ConstArrayView<std::uint16_t> getGUIToRawOutputIndices() const = 0
Output indices used for mapping gui to raw controls.
- Returns
View over the array of output indices.
-
virtual ConstArrayView<float> getGUIToRawFromValues() const = 0
Filter values(lower-bounds) used to decide whether a particular entry should be evaluated or not during gui to raw control mapping.
- Returns
View over the array of filter values.
-
virtual ConstArrayView<float> getGUIToRawToValues() const = 0
Filter values(upper-bounds) used to decide whether a particular entry should be evaluated or not during gui to raw control mapping.
- Returns
View over the array of filter values.
-
virtual ConstArrayView<float> getGUIToRawSlopeValues() const = 0
Computational values(slope/gradient) used for calculating the output value during gui to raw control mapping.
- Returns
View over the array of computational values.
-
virtual ConstArrayView<float> getGUIToRawCutValues() const = 0
Computational values(vertical intercept) used for calculating the output value during gui to raw control mapping.
- Returns
View over the array of computational values.
-
virtual std::uint16_t getPSDCount() const = 0
The number of distinct PSD expressions.
-
virtual ConstArrayView<std::uint16_t> getPSDRowIndices() const = 0
PSD(input) indices.
- Returns
View over the array of PSD indices.
-
virtual ConstArrayView<std::uint16_t> getPSDColumnIndices() const = 0
Control(input) indices.
- Returns
View over the array of control indices.
-
virtual ConstArrayView<float> getPSDValues() const = 0
Weights associated with each PSD row and column pair.
- Returns
View over the array of weights.
-
virtual std::uint16_t getJointRowCount() const = 0
Number of rows in the entire, uncompressed joint matrix.
-
virtual std::uint16_t getJointColumnCount() const = 0
Number of columns in the entire, uncompressed joint matrix.
-
virtual ConstArrayView<std::uint16_t> getJointVariableAttributeIndices(std::uint16_t lod) const = 0
Joint attribute indices (output indices) for the requested LOD.
- Returns
View over the array of joint indices.
-
virtual std::uint16_t getJointGroupCount() const = 0
Number of joint groups present in the entire joint matrix.
-
virtual ConstArrayView<std::uint16_t> getJointGroupLODs(std::uint16_t jointGroupIndex) const = 0
Number of rows per each level of detail for the requested joint group.
Note
Each element’s position represents the level itself, while the value denotes the number of rows within the joint group belonging to that level. e.g.: [12, 9, 3] | | + LOD-2 contains first 3 rows | + LOD-1 contains first 9 rows
LOD-0 contains first 12 rows
Warning
jointGroupIndex must be less than the value returned by getJointGroupCount.
- Parameters
jointGroupIndex – A joint group’s position in the zero-indexed array of joint groups.
- Returns
View over the array of LOD bounds.
-
virtual ConstArrayView<std::uint16_t> getJointGroupInputIndices(std::uint16_t jointGroupIndex) const = 0
Column indices that the requested joint group contains.
Note
The column indices point into the entire, uncompressed joint matrix.
Warning
jointGroupIndex must be less than the value returned by getJointGroupCount.
- Parameters
jointGroupIndex – A joint group’s position in the zero-indexed array of joint groups.
- Returns
View over the array of column indices.
-
virtual ConstArrayView<std::uint16_t> getJointGroupOutputIndices(std::uint16_t jointGroupIndex) const = 0
Row indices that the requested joint group contains.
Note
The row indices point into the entire, uncompressed joint matrix.
Warning
jointGroupIndex must be less than the value returned by getJointGroupCount.
- Parameters
jointGroupIndex – A joint group’s position in the zero-indexed array of joint groups.
- Returns
View over the array of row indices.
-
virtual ConstArrayView<float> getJointGroupValues(std::uint16_t jointGroupIndex) const = 0
Values that the requested joint group contains.
Warning
jointGroupIndex must be less than the value returned by getJointGroupCount.
- Parameters
jointGroupIndex – A joint group’s position in the zero-indexed array of joint groups.
- Returns
View over the array of values.
-
virtual ConstArrayView<std::uint16_t> getJointGroupJointIndices(std::uint16_t jointGroupIndex) const = 0
Joint indices that the requested joint group contains.
See also
Note
These joint indices can be used to get the joint names through DefinitionReader::getJointName.
Warning
jointGroupIndex must be less than the value returned by getJointGroupCount.
- Parameters
jointGroupIndex – A joint group’s position in the zero-indexed array of joint groups.
- Returns
View over the array of joint indices.
-
virtual ConstArrayView<std::uint16_t> getBlendShapeChannelLODs() const = 0
Input index count per each level of detail for blend shape channels.
Note
Each element’s position represents the level itself (e.g. [0,1,2,3,4,5] Value 0 is LOD with highest of details, value 5 is LOD with lowest details), while the value denotes the number of input indices belonging to that level.
Warning
These LOD values are not interchangeable with the LOD indices from DefinitionReader::getBlendShapeChannelIndicesForLOD.
- Returns
View over the array of LOD bounds.
-
virtual ConstArrayView<std::uint16_t> getBlendShapeChannelInputIndices() const = 0
Input indices used to index into the input vector.
- Returns
View over the array of input indices.
-
virtual ConstArrayView<std::uint16_t> getBlendShapeChannelOutputIndices() const = 0
Output indices specify the positions of blend shape channel output values.
- Returns
View over the array of output indices.
-
virtual ConstArrayView<std::uint16_t> getAnimatedMapLODs() const = 0
Row count per each level of detail for animated maps.
Note
Each element’s position represents the level itself (e.g. [0,1,2,3,4,5] Value 0 is LOD with highest of details, value 5 is LOD with lowest details), while the value denotes the number of rows (within the conditional table), belonging to that level.
- Returns
View over the array of LOD bounds.
-
virtual ConstArrayView<std::uint16_t> getAnimatedMapInputIndices() const = 0
Input indices used to index into the array of input values.
- Returns
View over the array of input indices.
-
virtual ConstArrayView<std::uint16_t> getAnimatedMapOutputIndices() const = 0
Output indices that specify the computed output value’s position.
- Returns
View over the array of output indices.
-
virtual ConstArrayView<float> getAnimatedMapFromValues() const = 0
Filter values(lower-bounds) used to decide whether a particular entry should be evaluated or not.
- Returns
View over the array of filter values.
-
virtual ConstArrayView<float> getAnimatedMapToValues() const = 0
Filter values(upper-bounds) used to decide whether a particular entry should be evaluated or not.
- Returns
View over the array of filter values.
-
virtual ConstArrayView<float> getAnimatedMapSlopeValues() const = 0
Computational values(slope/gradient) used for calculating the output value.
- Returns
View over the array of computational values.
-
virtual ConstArrayView<float> getAnimatedMapCutValues() const = 0
Computational values(vertical intercept) used for calculating the output value.
- Returns
View over the array of computational values.
Protected Functions
-
virtual ~BehaviorReader()
-
virtual ConstArrayView<std::uint16_t> getGUIToRawInputIndices() const = 0
-
class dna::GeometryReader : public virtual dna::DefinitionReader
Inheritence diagram for dna::GeometryReader:
Collaboration diagram for dna::GeometryReader:
Read-only accessors to the geometry data associated with a rig.
Warning
Implementors should inherit from Reader itself and not this class.
Subclassed by dna::Reader
Public Functions
-
virtual std::uint32_t getVertexPositionCount(std::uint16_t meshIndex) const = 0
Number of vertex positions in the entire mesh.
Warning
meshIndex must be less than the value returned by getMeshCount.
- Parameters
meshIndex – A mesh’s position in the zero-indexed array of meshes.
-
virtual Position getVertexPosition(std::uint16_t meshIndex, std::uint32_t vertexIndex) const = 0
Note
The vertices are sorted by the vertex ID.
Warning
meshIndex must be less than the value returned by getMeshCount.
Warning
vertexIndex must be less than the value returned by getVertexPositionCount.
- Parameters
meshIndex – A mesh’s position in the zero-indexed array of meshes.
vertexIndex – The index of the vertex position in the zero-indexed array of vertex positions.
- Returns
The vertex position.
-
virtual ConstArrayView<float> getVertexPositionXs(std::uint16_t meshIndex) const = 0
List of all vertex position X values for the referenced mesh.
See also
Note
This is an advanced API for performance critical access, for more convenient usage see getVertexPosition.
Warning
meshIndex must be less than the value returned by getMeshCount.
- Parameters
meshIndex – A mesh’s position in the zero-indexed array of meshes.
- Returns
View over all X values.
-
virtual ConstArrayView<float> getVertexPositionYs(std::uint16_t meshIndex) const = 0
List of all vertex position Y values for the referenced mesh.
See also
Note
This is an advanced API for performance critical access, for more convenient usage see getVertexPosition.
Warning
meshIndex must be less than the value returned by getMeshCount.
- Parameters
meshIndex – A mesh’s position in the zero-indexed array of meshes.
- Returns
View over all Y values.
-
virtual ConstArrayView<float> getVertexPositionZs(std::uint16_t meshIndex) const = 0
List of all vertex position Z values for the referenced mesh.
See also
Note
This is an advanced API for performance critical access, for more convenient usage see getVertexPosition.
Warning
meshIndex must be less than the value returned by getMeshCount.
- Parameters
meshIndex – A mesh’s position in the zero-indexed array of meshes.
- Returns
View over all Z values.
-
virtual std::uint32_t getVertexTextureCoordinateCount(std::uint16_t meshIndex) const = 0
Number of texture coordinates in the entire mesh.
Warning
meshIndex must be less than the value returned by getMeshCount.
- Parameters
meshIndex – A mesh’s position in the zero-indexed array of meshes.
-
virtual TextureCoordinate getVertexTextureCoordinate(std::uint16_t meshIndex, std::uint32_t textureCoordinateIndex) const = 0
Warning
meshIndex must be less than the value returned by getMeshCount.
Warning
textureCoordinateIndex must be less than the value returned by getVertexTextureCoordinateCount.
- Parameters
meshIndex – A mesh’s position in the zero-indexed array of meshes.
textureCoordinateIndex – The index of the texture coordinate in the zero-indexed array of texture coordinates.
- Returns
The texture coordinate.
-
virtual ConstArrayView<float> getVertexTextureCoordinateUs(std::uint16_t meshIndex) const = 0
List of all texture coordinate U values for the referenced mesh.
See also
Note
This is an advanced API for performance critical access, for more convenient usage see getVertexTextureCoordinate.
Warning
meshIndex must be less than the value returned by getMeshCount.
- Parameters
meshIndex – A mesh’s position in the zero-indexed array of meshes.
- Returns
View over all U values.
-
virtual ConstArrayView<float> getVertexTextureCoordinateVs(std::uint16_t meshIndex) const = 0
List of all texture coordinate V values for the referenced mesh.
See also
Note
This is an advanced API for performance critical access, for more convenient usage see getVertexTextureCoordinate.
Warning
meshIndex must be less than the value returned by getMeshCount.
- Parameters
meshIndex – A mesh’s position in the zero-indexed array of meshes.
- Returns
View over all V values.
-
virtual std::uint32_t getVertexNormalCount(std::uint16_t meshIndex) const = 0
Number of vertex normals in the entire mesh.
Warning
meshIndex must be less than the value returned by getMeshCount.
- Parameters
meshIndex – A mesh’s position in the zero-indexed array of meshes.
-
virtual Normal getVertexNormal(std::uint16_t meshIndex, std::uint32_t normalIndex) const = 0
Warning
meshIndex must be less than the value returned by getMeshCount.
Warning
normalIndex must be less than the value returned by getVertexNormalCount.
- Parameters
meshIndex – A mesh’s position in the zero-indexed array of meshes.
normalIndex – The index of the vertex normal in the zero-indexed array of vertex normals.
- Returns
The vertex normal.
-
virtual ConstArrayView<float> getVertexNormalXs(std::uint16_t meshIndex) const = 0
List of all normal X values for the referenced mesh.
See also
Note
This is an advanced API for performance critical access, for more convenient usage see getVertexNormal.
Warning
meshIndex must be less than the value returned by getMeshCount.
- Parameters
meshIndex – A mesh’s position in the zero-indexed array of meshes.
- Returns
View over all X values.
-
virtual ConstArrayView<float> getVertexNormalYs(std::uint16_t meshIndex) const = 0
List of all normal Y value for the referenced meshs.
See also
Note
This is an advanced API for performance critical access, for more convenient usage see getVertexNormal.
Warning
meshIndex must be less than the value returned by getMeshCount.
- Parameters
meshIndex – A mesh’s position in the zero-indexed array of meshes.
- Returns
View over all Y values.
-
virtual ConstArrayView<float> getVertexNormalZs(std::uint16_t meshIndex) const = 0
List of all normal Z values for the referenced mesh.
See also
Note
This is an advanced API for performance critical access, for more convenient usage see getVertexNormal.
Warning
meshIndex must be less than the value returned by getMeshCount.
- Parameters
meshIndex – A mesh’s position in the zero-indexed array of meshes.
- Returns
View over all Z values.
-
virtual std::uint32_t getVertexLayoutCount(std::uint16_t meshIndex) const = 0
Number of vertex layouts in the entire mesh.
Note
A vertex layout is a collection of vertex attributes.
Warning
meshIndex must be less than the value returned by getMeshCount.
- Parameters
meshIndex – A mesh’s position in the zero-indexed array of meshes.
-
virtual VertexLayout getVertexLayout(std::uint16_t meshIndex, std::uint32_t layoutIndex) const = 0
Vertex layouts contain only attribute indices which can be used to query the actual attributes, such as positions, texture coordinates and normals, which are associated with the vertex.
See also
See also
See also
Note
The indices from a layout are usable with the above defined APIs.
Warning
meshIndex must be less than the value returned by getMeshCount.
Warning
layoutIndex must be less than the value returned by getVertexLayoutCount.
- Parameters
meshIndex – A mesh’s position in the zero-indexed array of meshes.
layoutIndex – The index of the layout in the zero-indexed array of vertex layouts.
-
virtual ConstArrayView<std::uint32_t> getVertexLayoutPositionIndices(std::uint16_t meshIndex) const = 0
Position indices for each vertex of the referenced mesh.
See also
Note
This is an advanced API for performance critical access, for more convenient usage see getVertexLayout.
Warning
meshIndex must be less than the value returned by getMeshCount.
- Parameters
meshIndex – A mesh’s position in the zero-indexed array of meshes.
- Returns
View over all vertex position indices values.
-
virtual ConstArrayView<std::uint32_t> getVertexLayoutTextureCoordinateIndices(std::uint16_t meshIndex) const = 0
Texture coordinate indices for each vertex of the referenced mesh.
See also
Note
This is an advanced API for performance critical access, for more convenient usage see getVertexLayout.
Warning
meshIndex must be less than the value returned by getMeshCount.
- Parameters
meshIndex – A mesh’s position in the zero-indexed array of meshes.
- Returns
View over all vertex texture coordinate indices.
-
virtual ConstArrayView<std::uint32_t> getVertexLayoutNormalIndices(std::uint16_t meshIndex) const = 0
Normal indices for each vertex of the referenced mesh.
See also
Note
This is an advanced API for performance critical access, for more convenient usage see getVertexLayout.
Warning
meshIndex must be less than the value returned by getMeshCount.
- Parameters
meshIndex – A mesh’s position in the zero-indexed array of meshes.
- Returns
View over all vertex normal indices.
-
virtual std::uint32_t getFaceCount(std::uint16_t meshIndex) const = 0
Number of faces that belong to the specified mesh.
Warning
meshIndex must be less than the value returned by getMeshCount.
- Parameters
meshIndex – A mesh’s position in the zero-indexed array of meshes.
-
virtual ConstArrayView<std::uint32_t> getFaceVertexLayoutIndices(std::uint16_t meshIndex, std::uint32_t faceIndex) const = 0
List of vertex layout indices the belong to a face on the specified mesh.
See also
Warning
meshIndex must be less than the value returned by getMeshCount.
Warning
faceIndex must be less than the value returned by getFaceCount.
- Parameters
meshIndex – A mesh’s position in the zero-indexed array of meshes.
faceIndex – A face’s position in the zero-indexed array of faces that belong to the above referenced mesh.
- Returns
View over the list of vertex layout indices.
-
virtual std::uint16_t getMaximumInfluencePerVertex(std::uint16_t meshIndex) const = 0
The maximum number of joints that may influence any single vertex.
Warning
meshIndex must be less than the value returned by getMeshCount.
- Parameters
meshIndex – A mesh’s position in the zero-indexed array of meshes.
-
virtual std::uint32_t getSkinWeightsCount(std::uint16_t meshIndex) const = 0
Number of skin weights associated with the specified mesh.
Warning
meshIndex must be less than the value returned by getMeshCount.
- Parameters
meshIndex – A mesh’s position in the zero-indexed array of meshes.
-
virtual ConstArrayView<float> getSkinWeightsValues(std::uint16_t meshIndex, std::uint32_t vertexIndex) const = 0
List of skin weights influencing the requested vertex.
Warning
meshIndex must be less than the value returned by getMeshCount.
Warning
vertexIndex must be less than the value returned by getVertexPositionCount.
- Parameters
meshIndex – A mesh’s position in the zero-indexed array of meshes.
vertexIndex – A position in the zero-indexed array of vertices.
- Returns
View over the list of skin weights.
-
virtual ConstArrayView<std::uint16_t> getSkinWeightsJointIndices(std::uint16_t meshIndex, std::uint32_t vertexIndex) const = 0
List of joint indices associated with each skin weight for the specified vertex.
Note
The joint indices are stored in the same order as the weights they are associated with.
Warning
meshIndex must be less than the value returned by getMeshCount.
Warning
vertexIndex must be less than the value returned by getVertexPositionCount.
- Parameters
meshIndex – A mesh’s position in the zero-indexed array of meshes.
vertexIndex – A position in the zero-indexed array of vertices.
- Returns
View over the list of joint indices.
-
virtual std::uint16_t getBlendShapeTargetCount(std::uint16_t meshIndex) const = 0
Number of blend shapes that belong to the specified mesh.
Warning
meshIndex must be less than the value returned by getMeshCount.
- Parameters
meshIndex – A mesh’s position in the zero-indexed array of meshes.
-
virtual std::uint16_t getBlendShapeChannelIndex(std::uint16_t meshIndex, std::uint16_t blendShapeTargetIndex) const = 0
The matching blend shape channel index of the requested blend shape target.
Warning
meshIndex must be less than the value returned by getMeshCount.
Warning
blendShapeTargetIndex must be less than the value returned by getBlendShapeTargetCount.
- Parameters
meshIndex – A mesh’s position in the zero-indexed array of meshes.
blendShapeTargetIndex – A position in the zero-indexed array of blend shape targets within the specified mesh.
-
virtual std::uint32_t getBlendShapeTargetDeltaCount(std::uint16_t meshIndex, std::uint16_t blendShapeTargetIndex) const = 0
Number of deltas that belong to the specified blend shape.
Warning
meshIndex must be less than the value returned by getMeshCount.
Warning
blendShapeTargetIndex must be less than the value returned by getBlendShapeTargetCount.
- Parameters
meshIndex – A mesh’s position in the zero-indexed array of meshes.
blendShapeTargetIndex – A position in the zero-indexed array of blend shape targets within the specified mesh.
-
virtual Delta getBlendShapeTargetDelta(std::uint16_t meshIndex, std::uint16_t blendShapeTargetIndex, std::uint32_t deltaIndex) const = 0
List of deltas for each affected vertex.
Warning
meshIndex must be less than the value returned by getMeshCount.
Warning
blendShapeTargetIndex must be less than the value returned by getBlendShapeTargetCount.
Warning
deltaIndex must be less than the value returned by getBlendShapeTargetDeltaCount.
- Parameters
meshIndex – A mesh’s position in the zero-indexed array of meshes.
blendShapeTargetIndex – A position in the zero-indexed array of blend shape targets within the specified mesh.
deltaIndex – A position in the zero-indexed array of blend shapes deltas.
-
virtual ConstArrayView<float> getBlendShapeTargetDeltaXs(std::uint16_t meshIndex, std::uint16_t blendShapeTargetIndex) const = 0
List of all delta X values for the referenced blend shape target.
See also
Note
This is an advanced API for performance critical access, for more convenient usage see getBlendShapeTargetDelta.
Warning
meshIndex must be less than the value returned by getMeshCount.
Warning
blendShapeTargetIndex must be less than the value returned by getBlendShapeTargetCount.
- Parameters
meshIndex – A mesh’s position in the zero-indexed array of meshes.
blendShapeTargetIndex – A position in the zero-indexed array of blend shape targets within the specified mesh.
- Returns
View over all X values.
-
virtual ConstArrayView<float> getBlendShapeTargetDeltaYs(std::uint16_t meshIndex, std::uint16_t blendShapeTargetIndex) const = 0
List of all delta Y values for the referenced blend shape target.
See also
Note
This is an advanced API for performance critical access, for more convenient usage see getBlendShapeTargetDelta.
Warning
meshIndex must be less than the value returned by getMeshCount.
Warning
blendShapeTargetIndex must be less than the value returned by getBlendShapeTargetCount.
- Parameters
meshIndex – A mesh’s position in the zero-indexed array of meshes.
blendShapeTargetIndex – A position in the zero-indexed array of blend shape targets within the specified mesh.
- Returns
View over all Y values.
-
virtual ConstArrayView<float> getBlendShapeTargetDeltaZs(std::uint16_t meshIndex, std::uint16_t blendShapeTargetIndex) const = 0
List of all delta Z values for the referenced blend shape target.
See also
Note
This is an advanced API for performance critical access, for more convenient usage see getBlendShapeTargetDelta.
Warning
meshIndex must be less than the value returned by getMeshCount.
Warning
blendShapeTargetIndex must be less than the value returned by getBlendShapeTargetCount.
- Parameters
meshIndex – A mesh’s position in the zero-indexed array of meshes.
blendShapeTargetIndex – A position in the zero-indexed array of blend shape targets within the specified mesh.
- Returns
View over all Z values.
-
virtual ConstArrayView<std::uint32_t> getBlendShapeTargetVertexIndices(std::uint16_t meshIndex, std::uint16_t blendShapeTargetIndex) const = 0
Vertex position indices affected by the referenced blend shape target.
See also
Note
The vertex position indices are stored in the same order as the deltas they are associated with. These indices can be used to query the associated vertices themselves through getVertexPosition.
Warning
meshIndex must be less than the value returned by getMeshCount.
Warning
blendShapeTargetIndex must be less than the value returned by getBlendShapeTargetCount.
- Parameters
meshIndex – A mesh’s position in the zero-indexed array of meshes.
blendShapeTargetIndex – A position in the zero-indexed array of blend shape targets within the specified mesh.
- Returns
View over the list of vertex position indices.
Protected Functions
-
virtual ~GeometryReader()
-
virtual std::uint32_t getVertexPositionCount(std::uint16_t meshIndex) const = 0
-
class dna::DefinitionReader : public dna::DescriptorReader
Inheritence diagram for dna::DefinitionReader:
Collaboration diagram for dna::DefinitionReader:
Read-only accessors for DNA attributes that represent the rig’s static data.
See also
Warning
Implementors should inherit from Reader itself and not this class.
Subclassed by dna::BehaviorReader, dna::GeometryReader
Public Functions
-
virtual std::uint16_t getGUIControlCount() const = 0
-
virtual StringView getGUIControlName(std::uint16_t index) const = 0
Name of the requested GUI control.
Warning
The index must be less than the value returned by getGUIControlCount.
- Parameters
index – A name’s position in the zero-indexed array of GUI control names.
- Returns
View over the GUI control name string.
-
virtual std::uint16_t getRawControlCount() const = 0
-
virtual StringView getRawControlName(std::uint16_t index) const = 0
Name of the requested raw control.
Warning
The index must be less than the value returned by getRawControlCount.
- Parameters
index – A name’s position in the zero-indexed array of raw control names.
- Returns
View over the control name string.
-
virtual std::uint16_t getJointCount() const = 0
-
virtual StringView getJointName(std::uint16_t index) const = 0
Name of the requested joint.
Warning
The index must be less than the value returned by getJointCount.
- Parameters
index – A name’s position in the zero-indexed array of joint names.
- Returns
View over the joint name string.
-
virtual std::uint16_t getJointIndexListCount() const = 0
Number of joint index lists.
Note
This value is useful only in the context of DefinitionWriter.
-
virtual ConstArrayView<std::uint16_t> getJointIndicesForLOD(std::uint16_t lod) const = 0
List of joint indices for the specified LOD.
See also
See also
Warning
The lod index must be less than the value returned by getLODCount.
- Parameters
lod – The level of detail which joints are being requested.
- Returns
View over the joint indices.
-
virtual std::uint16_t getJointParentIndex(std::uint16_t index) const = 0
Index of the requested joint’s parent.
Requesting the parent index of joint 5 (joint name: F) would return 4 (joint name: E). Requesting the parent index of the root joint: 0 (joint name: A) would return the same index 0. An out of bounds request (an index greater than the number of joints returns UINT16_MAX).
Note
The joint hierarchy may be traversed and reconstructed using this function. Example: Joint names: [A, B, C, D, E, F, G, H, I] Hierarchy: [0, 0, 0, 1, 1, 4, 2, 6, 2] Describes the following hierarchy: A
B | + D | + E | + F
C
G | + H
I
- Parameters
index – The joint index which parent is being requested.
-
virtual std::uint16_t getBlendShapeChannelCount() const = 0
-
virtual StringView getBlendShapeChannelName(std::uint16_t index) const = 0
Name of the requested blend shape channel.
Warning
The index must be less than the value returned by BlendShapeChannelExtentReader::getBlendShapeChannelCount.
- Parameters
index – A name’s position in the zero-indexed array of blend shape channel names.
- Returns
View over the blend shape channel name string.
-
virtual std::uint16_t getBlendShapeChannelIndexListCount() const = 0
Number of blend shape channel index lists.
Note
This value is useful only in the context of DefinitionWriter.
-
virtual ConstArrayView<std::uint16_t> getBlendShapeChannelIndicesForLOD(std::uint16_t lod) const = 0
List of blend shape channel indices for the specified LOD.
See also
See also
Warning
The lod index must be less than the value returned by getLODCount.
Warning
These LOD indices are not interchangeable with the LOD values from BehaviorReader::getBlendShapeChannelLODs.
- Parameters
lod – The level of detail which blend shape channels are being requested.
- Returns
View over the blend shape channel indices.
-
virtual std::uint16_t getAnimatedMapCount() const = 0
-
virtual StringView getAnimatedMapName(std::uint16_t index) const = 0
Name of the requested animated map.
Warning
The index must be less than the value returned by getAnimatedMapCount.
- Parameters
index – A name’s position in the zero-indexed array of animated map names.
- Returns
View over the animated map name string.
-
virtual std::uint16_t getAnimatedMapIndexListCount() const = 0
Number of animated map index lists.
Note
This value is useful only in the context of DefinitionWriter.
-
virtual ConstArrayView<std::uint16_t> getAnimatedMapIndicesForLOD(std::uint16_t lod) const = 0
List of animated map indices for the specified LOD.
See also
See also
Warning
The lod index must be less than the value returned by getLODCount.
- Parameters
lod – The level of detail which animated maps are being requested.
- Returns
View over the animated map indices.
-
virtual std::uint16_t getMeshCount() const = 0
-
virtual StringView getMeshName(std::uint16_t index) const = 0
Name of the requested mesh.
Warning
The index must be less than the value returned by getMeshCount.
- Parameters
index – A name’s position in the zero-indexed array of mesh names.
- Returns
View over the mesh name string.
-
virtual std::uint16_t getMeshIndexListCount() const = 0
Number of mesh index lists.
Note
This value is useful only in the context of DefinitionWriter.
-
virtual ConstArrayView<std::uint16_t> getMeshIndicesForLOD(std::uint16_t lod) const = 0
List of mesh indices for the specified LOD.
See also
See also
Warning
The lod index must be less than the value returned by getLODCount.
- Parameters
lod – The level of detail which meshes are being requested.
- Returns
View over the mesh indices.
-
virtual std::uint16_t getMeshBlendShapeChannelMappingCount() const = 0
Number of mesh-blend shape channel mapping items.
-
virtual MeshBlendShapeChannelMapping getMeshBlendShapeChannelMapping(std::uint16_t index) const = 0
Warning
The index must be less than the value returned by getMeshBlendShapeChannelMappingCount.
- Parameters
index – A mapping’s position in the zero-indexed array of mesh-blend shape channel mappings.
- Returns
A structure holding the mesh index and the associated blend shape channel index.
-
virtual ConstArrayView<std::uint16_t> getMeshBlendShapeChannelMappingIndicesForLOD(std::uint16_t lod) const = 0
List of mesh-blend shape channel mapping indices for the specified LOD.
See also
See also
Note
The indices from this list can be used with the getMeshBlendShapeChannelMapping API to retrieve individual mapping items.
Warning
The lod index must be less than the value returned by getLODCount.
- Parameters
lod – The level of detail which meshes are being requested.
- Returns
View over the mesh blend shape channel mapping indices.
-
virtual Vector3 getNeutralJointTranslation(std::uint16_t index) const = 0
Warning
The index must be less than the value returned by getJointCount.
- Parameters
index – A joint’s position in the zero-indexed array of joint translations.
- Returns
The joint’s translation (x, y, z).
-
virtual ConstArrayView<float> getNeutralJointTranslationXs() const = 0
List of all translation X values.
See also
Note
This is an advanced API for performance critical access, for more convenient usage see getNeutralJointTranslation.
- Returns
View over all X values.
-
virtual ConstArrayView<float> getNeutralJointTranslationYs() const = 0
List of all translation Y values.
See also
Note
This is an advanced API for performance critical access, for more convenient usage see getNeutralJointTranslation.
- Returns
View over all Y values.
-
virtual ConstArrayView<float> getNeutralJointTranslationZs() const = 0
List of all translation Z values.
See also
Note
This is an advanced API for performance critical access, for more convenient usage see getNeutralJointTranslation.
- Returns
View over all Z values.
-
virtual Vector3 getNeutralJointRotation(std::uint16_t index) const = 0
Warning
The index must be less than the value returned by getJointCount.
- Parameters
index – A joint’s position in the zero-indexed array of joint rotations.
- Returns
The joint’s rotation (x, y, z).
-
virtual ConstArrayView<float> getNeutralJointRotationXs() const = 0
List of all rotation X values.
See also
Note
This is an advanced API for performance critical access, for more convenient usage see getNeutralJointRotation.
- Returns
View over all X values.
-
virtual ConstArrayView<float> getNeutralJointRotationYs() const = 0
List of all rotation Y values.
See also
Note
This is an advanced API for performance critical access, for more convenient usage see getNeutralJointRotation.
- Returns
View over all Y values.
-
virtual ConstArrayView<float> getNeutralJointRotationZs() const = 0
List of all rotation Z values.
See also
Note
This is an advanced API for performance critical access, for more convenient usage see getNeutralJointRotation.
- Returns
View over all Z values.
Protected Functions
-
virtual ~DefinitionReader()
-
virtual std::uint16_t getGUIControlCount() const = 0
-
class dna::DescriptorReader
Inheritence diagram for dna::DescriptorReader:
Collaboration diagram for dna::DescriptorReader:
Read-only accessors for various metadata about the character and the rig.
See also
Warning
Implementors should inherit from Reader itself and not this class.
Subclassed by dna::DefinitionReader
Public Functions
-
virtual StringView getName() const = 0
-
virtual Archetype getArchetype() const = 0
-
virtual Gender getGender() const = 0
-
virtual std::uint16_t getAge() const = 0
-
virtual std::uint32_t getMetaDataCount() const = 0
-
virtual StringView getMetaDataKey(std::uint32_t index) const = 0
Warning
The index must be less than the value returned by getMetaDataCount.
- Parameters
index – A position in the zero-indexed array of key-value pairs.
- Returns
View over the key name string.
-
virtual StringView getMetaDataValue(const char *key) const = 0
Stored metadata value associated with the given key.
Note
If no value is associated with the given key, the returned view will contain nullptr and will have a size of 0.
Warning
The key must be null-terminated.
- Parameters
key – A unique-known key that has a value associated to it.
- Returns
View over the metadata value string.
-
virtual TranslationUnit getTranslationUnit() const = 0
-
virtual RotationUnit getRotationUnit() const = 0
-
virtual CoordinateSystem getCoordinateSystem() const = 0
-
virtual std::uint16_t getLODCount() const = 0
Available levels of detail (e.g. 6 which means the following levels are available: [0,1,2,3,4,5], where 0 is the LOD with the highest details, and 5 is the LOD with lowest details).
-
virtual std::uint16_t getDBMaxLOD() const = 0
The maximum level of detail stored in the DNA data for this character.
Note
The value is relative to LOD-0 from the database.
-
virtual StringView getDBComplexity() const = 0
Name of the input control interface used to drive this character rig.
Note
This parameter denotes the character’s input control complexity.
-
virtual StringView getDBName() const = 0
Name of the database from which the character originates.
Note
All characters from the same database must have the same Definition, but may have different complexity or LOD.
Protected Functions
-
virtual ~DescriptorReader()
-
virtual StringView getName() const = 0
-
template<class TReaderBase>
class dna::ReaderImpl : public TReaderBase, public virtual dna::BaseImpl Inheritence diagram for dna::ReaderImpl:
Collaboration diagram for dna::ReaderImpl:
Public Functions
-
inline explicit ReaderImpl(MemoryResource *memRes_)
-
inline StringView getName() const override
-
inline Archetype getArchetype() const override
-
inline Gender getGender() const override
-
inline std::uint16_t getAge() const override
-
inline std::uint32_t getMetaDataCount() const override
-
inline StringView getMetaDataKey(std::uint32_t index) const override
-
inline StringView getMetaDataValue(const char *key) const override
-
inline TranslationUnit getTranslationUnit() const override
-
inline RotationUnit getRotationUnit() const override
-
inline CoordinateSystem getCoordinateSystem() const override
-
inline std::uint16_t getLODCount() const override
-
inline std::uint16_t getDBMaxLOD() const override
-
inline StringView getDBComplexity() const override
-
inline StringView getDBName() const override
-
inline std::uint16_t getGUIControlCount() const override
-
inline StringView getGUIControlName(std::uint16_t index) const override
-
inline std::uint16_t getRawControlCount() const override
-
inline StringView getRawControlName(std::uint16_t index) const override
-
inline std::uint16_t getJointCount() const override
-
inline StringView getJointName(std::uint16_t index) const override
-
inline std::uint16_t getJointIndexListCount() const override
-
inline ConstArrayView<std::uint16_t> getJointIndicesForLOD(std::uint16_t lod) const override
-
inline std::uint16_t getJointParentIndex(std::uint16_t index) const override
-
inline std::uint16_t getBlendShapeChannelCount() const override
-
inline StringView getBlendShapeChannelName(std::uint16_t index) const override
-
inline std::uint16_t getBlendShapeChannelIndexListCount() const override
-
inline ConstArrayView<std::uint16_t> getBlendShapeChannelIndicesForLOD(std::uint16_t lod) const override
-
inline std::uint16_t getAnimatedMapCount() const override
-
inline StringView getAnimatedMapName(std::uint16_t index) const override
-
inline std::uint16_t getAnimatedMapIndexListCount() const override
-
inline ConstArrayView<std::uint16_t> getAnimatedMapIndicesForLOD(std::uint16_t lod) const override
-
inline std::uint16_t getMeshCount() const override
-
inline StringView getMeshName(std::uint16_t index) const override
-
inline std::uint16_t getMeshIndexListCount() const override
-
inline ConstArrayView<std::uint16_t> getMeshIndicesForLOD(std::uint16_t lod) const override
-
inline std::uint16_t getMeshBlendShapeChannelMappingCount() const override
-
inline MeshBlendShapeChannelMapping getMeshBlendShapeChannelMapping(std::uint16_t index) const override
-
inline ConstArrayView<std::uint16_t> getMeshBlendShapeChannelMappingIndicesForLOD(std::uint16_t lod) const override
-
inline Vector3 getNeutralJointTranslation(std::uint16_t index) const override
-
inline ConstArrayView<float> getNeutralJointTranslationXs() const override
-
inline ConstArrayView<float> getNeutralJointTranslationYs() const override
-
inline ConstArrayView<float> getNeutralJointTranslationZs() const override
-
inline Vector3 getNeutralJointRotation(std::uint16_t index) const override
-
inline ConstArrayView<float> getNeutralJointRotationXs() const override
-
inline ConstArrayView<float> getNeutralJointRotationYs() const override
-
inline ConstArrayView<float> getNeutralJointRotationZs() const override
-
inline ConstArrayView<std::uint16_t> getGUIToRawInputIndices() const override
-
inline ConstArrayView<std::uint16_t> getGUIToRawOutputIndices() const override
-
inline ConstArrayView<float> getGUIToRawFromValues() const override
-
inline ConstArrayView<float> getGUIToRawToValues() const override
-
inline ConstArrayView<float> getGUIToRawSlopeValues() const override
-
inline ConstArrayView<float> getGUIToRawCutValues() const override
-
inline std::uint16_t getPSDCount() const override
-
inline ConstArrayView<std::uint16_t> getPSDRowIndices() const override
-
inline ConstArrayView<std::uint16_t> getPSDColumnIndices() const override
-
inline ConstArrayView<float> getPSDValues() const override
-
inline std::uint16_t getJointRowCount() const override
-
inline std::uint16_t getJointColumnCount() const override
-
inline ConstArrayView<std::uint16_t> getJointVariableAttributeIndices(std::uint16_t lod) const override
-
inline std::uint16_t getJointGroupCount() const override
-
inline ConstArrayView<std::uint16_t> getJointGroupLODs(std::uint16_t jointGroupIndex) const override
-
inline ConstArrayView<std::uint16_t> getJointGroupInputIndices(std::uint16_t jointGroupIndex) const override
-
inline ConstArrayView<std::uint16_t> getJointGroupOutputIndices(std::uint16_t jointGroupIndex) const override
-
inline ConstArrayView<float> getJointGroupValues(std::uint16_t jointGroupIndex) const override
-
inline ConstArrayView<std::uint16_t> getJointGroupJointIndices(std::uint16_t jointGroupIndex) const override
-
inline ConstArrayView<std::uint16_t> getBlendShapeChannelLODs() const override
-
inline ConstArrayView<std::uint16_t> getBlendShapeChannelOutputIndices() const override
-
inline ConstArrayView<std::uint16_t> getBlendShapeChannelInputIndices() const override
-
inline ConstArrayView<std::uint16_t> getAnimatedMapLODs() const override
-
inline ConstArrayView<std::uint16_t> getAnimatedMapInputIndices() const override
-
inline ConstArrayView<std::uint16_t> getAnimatedMapOutputIndices() const override
-
inline ConstArrayView<float> getAnimatedMapFromValues() const override
-
inline ConstArrayView<float> getAnimatedMapToValues() const override
-
inline ConstArrayView<float> getAnimatedMapSlopeValues() const override
-
inline ConstArrayView<float> getAnimatedMapCutValues() const override
-
inline std::uint32_t getVertexPositionCount(std::uint16_t meshIndex) const override
-
inline Position getVertexPosition(std::uint16_t meshIndex, std::uint32_t vertexIndex) const override
-
inline ConstArrayView<float> getVertexPositionXs(std::uint16_t meshIndex) const override
-
inline ConstArrayView<float> getVertexPositionYs(std::uint16_t meshIndex) const override
-
inline ConstArrayView<float> getVertexPositionZs(std::uint16_t meshIndex) const override
-
inline std::uint32_t getVertexTextureCoordinateCount(std::uint16_t meshIndex) const override
-
inline TextureCoordinate getVertexTextureCoordinate(std::uint16_t meshIndex, std::uint32_t textureCoordinateIndex) const override
-
inline ConstArrayView<float> getVertexTextureCoordinateUs(std::uint16_t meshIndex) const override
-
inline ConstArrayView<float> getVertexTextureCoordinateVs(std::uint16_t meshIndex) const override
-
inline std::uint32_t getVertexNormalCount(std::uint16_t meshIndex) const override
-
inline Normal getVertexNormal(std::uint16_t meshIndex, std::uint32_t normalIndex) const override
-
inline ConstArrayView<float> getVertexNormalXs(std::uint16_t meshIndex) const override
-
inline ConstArrayView<float> getVertexNormalYs(std::uint16_t meshIndex) const override
-
inline ConstArrayView<float> getVertexNormalZs(std::uint16_t meshIndex) const override
-
inline std::uint32_t getFaceCount(std::uint16_t meshIndex) const override
-
inline ConstArrayView<std::uint32_t> getFaceVertexLayoutIndices(std::uint16_t meshIndex, std::uint32_t faceIndex) const override
-
inline std::uint32_t getVertexLayoutCount(std::uint16_t meshIndex) const override
-
inline VertexLayout getVertexLayout(std::uint16_t meshIndex, std::uint32_t layoutIndex) const override
-
inline ConstArrayView<std::uint32_t> getVertexLayoutPositionIndices(std::uint16_t meshIndex) const override
-
inline ConstArrayView<std::uint32_t> getVertexLayoutTextureCoordinateIndices(std::uint16_t meshIndex) const override
-
inline ConstArrayView<std::uint32_t> getVertexLayoutNormalIndices(std::uint16_t meshIndex) const override
-
inline std::uint16_t getMaximumInfluencePerVertex(std::uint16_t meshIndex) const override
-
inline std::uint32_t getSkinWeightsCount(std::uint16_t meshIndex) const override
-
inline ConstArrayView<float> getSkinWeightsValues(std::uint16_t meshIndex, std::uint32_t vertexIndex) const override
-
inline ConstArrayView<std::uint16_t> getSkinWeightsJointIndices(std::uint16_t meshIndex, std::uint32_t vertexIndex) const override
-
inline std::uint16_t getBlendShapeTargetCount(std::uint16_t meshIndex) const override
-
inline std::uint16_t getBlendShapeChannelIndex(std::uint16_t meshIndex, std::uint16_t blendShapeTargetIndex) const override
-
inline std::uint32_t getBlendShapeTargetDeltaCount(std::uint16_t meshIndex, std::uint16_t blendShapeTargetIndex) const override
-
inline Delta getBlendShapeTargetDelta(std::uint16_t meshIndex, std::uint16_t blendShapeTargetIndex, std::uint32_t deltaIndex) const override
-
inline ConstArrayView<float> getBlendShapeTargetDeltaXs(std::uint16_t meshIndex, std::uint16_t blendShapeTargetIndex) const override
-
inline ConstArrayView<float> getBlendShapeTargetDeltaYs(std::uint16_t meshIndex, std::uint16_t blendShapeTargetIndex) const override
-
inline ConstArrayView<float> getBlendShapeTargetDeltaZs(std::uint16_t meshIndex, std::uint16_t blendShapeTargetIndex) const override
-
inline ConstArrayView<std::uint32_t> getBlendShapeTargetVertexIndices(std::uint16_t meshIndex, std::uint16_t blendShapeTargetIndex) const override
Protected Attributes
-
mutable DenormalizedData<TReaderBase> cache
-
inline explicit ReaderImpl(MemoryResource *memRes_)
Warning
doxygenclass: Cannot find class “dna::StreamReaderImpl” in doxygen xml output for project “dnacalib” from directory: C:/source/MetaHuman-DNA-Calibration_clean/docs/sphinx/source/../../../docs/doxygen/build/xml/
-
class dna::StreamWriter : public dna::Writer
Inheritence diagram for dna::StreamWriter:
Collaboration diagram for dna::StreamWriter:
Subclassed by dna::BinaryStreamWriter, dna::JSONStreamWriter
-
class dna::Writer : public dna::BehaviorWriter, public dna::GeometryWriter
Inheritence diagram for dna::Writer:
Collaboration diagram for dna::Writer:
The abstract Writer which its implementations are expected to inherit.
Note
This class combines the various different writer interfaces into a single interface. The artificial separation into multiple interfaces in this case just mirrors the structure of the Reader hierarchy, as it’s not possible to selectively write only specific layers.
Subclassed by dnac::WriterImpl< dna::Writer >, dna::StreamWriter
Public Functions
-
~Writer() override
-
void setFrom(const Reader *source, DataLayer layer = DataLayer::All, MemoryResource *memRes = nullptr)
Initialize the Writer from the given Reader.
Note
This function copies all the data from the given Reader into the Writer instance, by calling each getter function of the Reader, and passing the return values to the matching setter functions in the Writer. It is implemented in the abstract class itself to provide the functionality for all DNA Writers.
- Parameters
source – The source DNA Reader from which the data needs to be copied.
layer – Limit which layers should be taken over from the given source reader.
memRes – Optional memory resource to use for temporary allocations during copying.
-
~Writer() override
-
class dna::BehaviorWriter : public virtual dna::DefinitionWriter
Inheritence diagram for dna::BehaviorWriter:
Collaboration diagram for dna::BehaviorWriter:
Write-only accessors for DNA attributes that define the rig’s evaluation.
See also
Warning
Implementors should inherit from Writer itself and not this class.
Subclassed by dna::Writer
Public Functions
-
virtual void setGUIToRawInputIndices(const std::uint16_t *inputIndices, std::uint16_t count) = 0
Input indices used for mapping gui to raw controls.
- Parameters
inputIndices – The source address from which the input indices are to be copied.
count – The number of input indices to copy.
-
virtual void setGUIToRawOutputIndices(const std::uint16_t *outputIndices, std::uint16_t count) = 0
Output indices used for mapping gui to raw controls.
- Parameters
outputIndices – The source address from which the output indices are to be copied.
count – The number of output indices to copy.
-
virtual void setGUIToRawFromValues(const float *fromValues, std::uint16_t count) = 0
Filter values(lower-bounds) used to decide whether a particular entry should be evaluated or not during gui to raw control mapping.
- Parameters
fromValues – The source address from which the filter values are to be copied.
count – The number of filter values to copy.
-
virtual void setGUIToRawToValues(const float *toValues, std::uint16_t count) = 0
Filter values(upper-bounds) used to decide whether a particular entry should be evaluated or not during gui to raw control mapping.
- Parameters
toValues – The source address from which the filter values are to be copied.
count – The number of filter values to copy.
-
virtual void setGUIToRawSlopeValues(const float *slopeValues, std::uint16_t count) = 0
Computational values(slope/gradient) used for calculating the output value during gui to raw control mapping.
- Parameters
slopeValues – The source address from which the computational values are to be copied.
count – The number of computational values to copy.
-
virtual void setGUIToRawCutValues(const float *cutValues, std::uint16_t count) = 0
Computational values(vertical intercept) used for calculating the output value during gui to raw control mapping.
- Parameters
cutValues – The source address from which the computational values are to be copied.
count – The number of computational values to copy.
-
virtual void setPSDCount(std::uint16_t count) = 0
The number of distinct PSD expressions.
-
virtual void setPSDRowIndices(const std::uint16_t *rowIndices, std::uint16_t count) = 0
PSD(input) indices which will become the rows of the PSD matrix.
- Parameters
rowIndices – The source address from which the PSD indices are to be copied.
count – The number of PSD indices to copy.
-
virtual void setPSDColumnIndices(const std::uint16_t *columnIndices, std::uint16_t count) = 0
Control(input) indices which will become the columns of the PSD matrix.
- Parameters
columnIndices – The source address from which the control indices are to be copied.
count – The number of control indices to copy.
-
virtual void setPSDValues(const float *weights, std::uint16_t count) = 0
Weights associated with each PSD row and column pair.
- Parameters
weights – The source address from which the weight values are to be copied.
count – The number of weight values to copy.
-
virtual void setJointRowCount(std::uint16_t rowCount) = 0
Number of rows in the entire, uncompressed joint matrix.
-
virtual void setJointColumnCount(std::uint16_t columnCount) = 0
Number of columns in the entire, uncompressed joint matrix.
-
virtual void clearJointGroups() = 0
Delete all joint groups.
-
virtual void deleteJointGroup(std::uint16_t jointGroupIndex) = 0
Delete the specified joint group.
Warning
jointGroupIndex must be less than the value returned by getJointGroupCount.
- Parameters
jointGroupIndex – A joint group’s position in the zero-indexed array of joint groups.
-
virtual void setJointGroupLODs(std::uint16_t jointGroupIndex, const std::uint16_t *lods, std::uint16_t count) = 0
Number of rows per each level of detail for the specified joint group.
Note
Each element’s position represents the level itself, while the value denotes the number of rows within the joint group belonging to that level. e.g.: [12, 9, 3] | | + LOD-2 contains first 3 rows | + LOD-1 contains first 9 rows
LOD-0 contains first 12 rows
Note
The joint group storage will be implicitly resized (if needed) to provide storage for the number of joint groups that is inferred from the specified index.
- Parameters
jointGroupIndex – A joint group’s position in the zero-indexed array of joint groups.
lods – The source address from which the lod bounds are to be copied.
count – The number of lod bounds to copy.
-
virtual void setJointGroupInputIndices(std::uint16_t jointGroupIndex, const std::uint16_t *inputIndices, std::uint16_t count) = 0
Column indices that the specified joint group contains.
Note
The column indices point into the entire, uncompressed joint matrix.
Note
The joint group storage will be implicitly resized (if needed) to provide storage for the number of joint groups that is inferred from the specified index.
- Parameters
jointGroupIndex – A joint group’s position in the zero-indexed array of joint groups.
inputIndices – The source address from which the column indices are to be copied.
count – The number of column indices to copy.
-
virtual void setJointGroupOutputIndices(std::uint16_t jointGroupIndex, const std::uint16_t *outputIndices, std::uint16_t count) = 0
Row indices that the specified joint group contains.
Note
The row indices point into the entire, uncompressed joint matrix.
Note
The joint group storage will be implicitly resized (if needed) to provide storage for the number of joint groups that is inferred from the specified index.
- Parameters
jointGroupIndex – A joint group’s position in the zero-indexed array of joint groups.
outputIndices – The source address from which the row indices are to be copied.
count – The number of row indices to copy.
-
virtual void setJointGroupValues(std::uint16_t jointGroupIndex, const float *values, std::uint32_t count) = 0
Values that the specified joint group contains.
Note
The joint group storage will be implicitly resized (if needed) to provide storage for the number of joint groups that is inferred from the specified index.
- Parameters
jointGroupIndex – A joint group’s position in the zero-indexed array of joint groups.
values – The source address from which the values are to be copied.
count – The number of values to copy.
-
virtual void setJointGroupJointIndices(std::uint16_t jointGroupIndex, const std::uint16_t *jointIndices, std::uint16_t count) = 0
Joint indices that the specified joint group contains.
Note
The joint group storage will be implicitly resized (if needed) to provide storage for the number of joint groups that is inferred from the specified index.
- Parameters
jointGroupIndex – A joint group’s position in the zero-indexed array of joint groups.
jointIndices – The source address from which the joint indices are to be copied.
count – The number of joint indices to copy.
-
virtual void setBlendShapeChannelLODs(const std::uint16_t *lods, std::uint16_t count) = 0
Input index count per each level of detail for blend shapes.
Note
Each element’s position represents the level itself (e.g. [0,1,2,3,4,5] Value 0 is LOD with highest of details, value 5 is LOD with lowest details), while the value denotes the number of input indices belonging to that level.
Warning
The LOD values set here are not interchangeable with the LOD indices set in DefinitionWriter::setBlendShapeNameIndices and DefinitionWriter::setLODBlendShapeMapping
- Parameters
lods – The source address from which the lod bounds are to be copied.
count – The number of lod bounds to copy.
-
virtual void setBlendShapeChannelInputIndices(const std::uint16_t *inputIndices, std::uint16_t count) = 0
Input indices used to index into the input vector.
- Parameters
inputIndices – The source address from which the input indices are to be copied.
count – The number of input indices to copy.
-
virtual void setBlendShapeChannelOutputIndices(const std::uint16_t *outputIndices, std::uint16_t count) = 0
Output indices specify the positions of blend shape output values.
- Parameters
outputIndices – The source address from which the output indices are to be copied.
count – The number of output indices to copy.
-
virtual void setAnimatedMapLODs(const std::uint16_t *lods, std::uint16_t count) = 0
Row count per each level of detail for animated maps.
Note
Each element’s position represents the level itself (e.g. [0,1,2,3,4,5] Value 0 is LOD with highest of details, value 5 is LOD with lowest details), while the value denotes the number of rows (within the conditional table), belonging to that level.
- Parameters
lods – The source address from which the lod bounds are to be copied.
count – The number of lod bounds to copy.
-
virtual void setAnimatedMapInputIndices(const std::uint16_t *inputIndices, std::uint16_t count) = 0
Input indices used to index into the array of input values.
- Parameters
inputIndices – The source address from which the input indices are to be copied.
count – The number of input indices to copy.
-
virtual void setAnimatedMapOutputIndices(const std::uint16_t *outputIndices, std::uint16_t count) = 0
Output indices that specify the computed output value’s position.
- Parameters
outputIndices – The source address from which the output indices are to be copied.
count – The number of output indices to copy.
-
virtual void setAnimatedMapFromValues(const float *fromValues, std::uint16_t count) = 0
Filter values(lower-bounds) used to decide whether a particular entry should be evaluated or not.
- Parameters
fromValues – The source address from which the filter values are to be copied.
count – The number of filter values to copy.
-
virtual void setAnimatedMapToValues(const float *toValues, std::uint16_t count) = 0
Filter values(upper-bounds) used to decide whether a particular entry should be evaluated or not.
- Parameters
toValues – The source address from which the filter values are to be copied.
count – The number of filter values to copy.
-
virtual void setAnimatedMapSlopeValues(const float *slopeValues, std::uint16_t count) = 0
Computational values(slope/gradient) used for calculating the output value.
- Parameters
slopeValues – The source address from which the computational values are to be copied.
count – The number of computational values to copy.
-
virtual void setAnimatedMapCutValues(const float *cutValues, std::uint16_t count) = 0
Computational values(vertical intercept) used for calculating the output value.
- Parameters
cutValues – The source address from which the computational values are to be copied.
count – The number of computational values to copy.
Protected Functions
-
virtual ~BehaviorWriter()
-
virtual void setGUIToRawInputIndices(const std::uint16_t *inputIndices, std::uint16_t count) = 0
-
class dna::GeometryWriter : public virtual dna::DefinitionWriter
Inheritence diagram for dna::GeometryWriter:
Collaboration diagram for dna::GeometryWriter:
Write-only accessors for the geometry data associated with a rig.
See also
Warning
Implementors should inherit from Writer itself and not this class.
Subclassed by dna::Writer
Public Functions
-
virtual void clearMeshes() = 0
Delete all meshes.
-
virtual void deleteMesh(std::uint16_t meshIndex) = 0
Delete the specified mesh.
Warning
meshIndex must be less than the value returned by getMeshCount.
- Parameters
meshIndex – A mesh’s position in the zero-indexed array of meshes.
-
virtual void setVertexPositions(std::uint16_t meshIndex, const Position *positions, std::uint32_t count) = 0
List of vertex positions.
Note
The mesh storage will be implicitly resized (if needed) to provide storage for the number of meshes that is inferred from the specified index.
- Parameters
meshIndex – A mesh’s position in the zero-indexed array of meshes.
positions – The source address from which the vertex positions are to be copied.
count – The number of vertex positions to copy.
-
virtual void setVertexTextureCoordinates(std::uint16_t meshIndex, const TextureCoordinate *textureCoordinates, std::uint32_t count) = 0
List of vertex texture coordinates.
Note
The mesh storage will be implicitly resized (if needed) to provide storage for the number of meshes that is inferred from the specified index.
- Parameters
meshIndex – A mesh’s position in the zero-indexed array of meshes.
textureCoordinates – The source address from which the texture coordinates are to be copied.
count – The number of texture coordinates to copy.
-
virtual void setVertexNormals(std::uint16_t meshIndex, const Normal *normals, std::uint32_t count) = 0
List of vertex normals.
Note
The mesh storage will be implicitly resized (if needed) to provide storage for the number of meshes that is inferred from the specified index.
- Parameters
meshIndex – A mesh’s position in the zero-indexed array of meshes.
normals – The source address from which the normals are to be copied.
count – The number of normals to copy.
-
virtual void setVertexLayouts(std::uint16_t meshIndex, const VertexLayout *layouts, std::uint32_t count) = 0
List of vertex layouts the belong to the specified mesh.
Note
The mesh storage will be implicitly resized (if needed) to provide storage for the number of meshes that is inferred from the specified index.
- Parameters
meshIndex – A mesh’s position in the zero-indexed array of meshes.
layouts – The source address from which the layouts are to be copied.
count – The number of layouts to copy.
-
virtual void clearFaceVertexLayoutIndices(std::uint16_t meshIndex) = 0
Delete all lists of vertex layout indices for the specified mesh.
Warning
meshIndex must be less than the value returned by getMeshCount.
- Parameters
meshIndex – A mesh’s position in the zero-indexed array of meshes.
-
virtual void setFaceVertexLayoutIndices(std::uint16_t meshIndex, std::uint32_t faceIndex, const std::uint32_t *layoutIndices, std::uint32_t count) = 0
Vertex layout indices that belong to the specified face.
Note
The layout indices point into the array that is set through setVertexLayouts
Note
Both the mesh storage itself and it’s face storage will be implicitly resized (if needed) to provide storage for the number of meshes and/or faces that are inferred from the specified indexes.
- Parameters
meshIndex – A mesh’s position in the zero-indexed array of meshes.
faceIndex – A face’s position in the zero-indexed array of faces that belong to the above referenced mesh.
layoutIndices – The source address from which the layout indices are to be copied.
count – The number of vertices to copy.
-
virtual void setMaximumInfluencePerVertex(std::uint16_t meshIndex, std::uint16_t maxInfluenceCount) = 0
- Parameters
meshIndex – A mesh’s position in the zero-indexed array of meshes.
maxInfluenceCount – The maximum number of joints that may influence any single vertex.
-
virtual void clearSkinWeights(std::uint16_t meshIndex) = 0
Delete all skin weights for the specified mesh.
Warning
meshIndex must be less than the value returned by getMeshCount.
- Parameters
meshIndex – A mesh’s position in the zero-indexed array of meshes.
-
virtual void setSkinWeightsValues(std::uint16_t meshIndex, std::uint32_t vertexIndex, const float *weights, std::uint16_t count) = 0
List of skin weights influencing the referenced vertex.
Note
Both the mesh storage itself and it’s skin weight storage will be implicitly resized (if needed) to provide storage for the number of meshes and/or skin-weight lists that are inferred from the specified indexes.
Warning
The sum of weights must add up to 1.
- Parameters
meshIndex – A mesh’s position in the zero-indexed array of meshes.
vertexIndex – A position in the zero-indexed array of vertex positions.
weights – The source address from which the weights are to be copied.
count – The number of weights to copy.
-
virtual void setSkinWeightsJointIndices(std::uint16_t meshIndex, std::uint32_t vertexIndex, const std::uint16_t *jointIndices, std::uint16_t count) = 0
List of joint indices associated with each skin weight for the specified vertex.
Note
Both the mesh storage itself and it’s joint index list storage will be implicitly resized (if needed) to provide storage for the number of meshes and/or joint index lists that are inferred from the specified indexes.
Warning
The joint indices must be stored in the same order as the weights they are associated with.
- Parameters
meshIndex – A mesh’s position in the zero-indexed array of meshes.
vertexIndex – A position in the zero-indexed array of vertex positions.
jointIndices – The source address from which the joint indices are to be copied.
count – The number of joint indices to copy.
-
virtual void clearBlendShapeTargets(std::uint16_t meshIndex) = 0
Delete all blend shape targets for the specified mesh.
Warning
meshIndex must be less than the value returned by getMeshCount.
- Parameters
meshIndex – A mesh’s position in the zero-indexed array of meshes.
-
virtual void setBlendShapeChannelIndex(std::uint16_t meshIndex, std::uint16_t blendShapeTargetIndex, std::uint16_t blendShapeChannelIndex) = 0
The matching blend shape channel index of the specified blend shape target.
Note
Associate the mesh-local blend shape target index with the absolute blend shape channel index as found in the Definition layer.
Note
Both the mesh storage itself and it’s blend shape target storage will be implicitly resized (if needed) to provide storage for the number of meshes and/or blend shape targets that are inferred from the specified indexes.
- Parameters
meshIndex – A mesh’s position in the zero-indexed array of meshes.
blendShapeTargetIndex – A position in the zero-indexed array of blend shape targets within the specified mesh.
blendShapeChannelIndex – The index of the specified blend shape channel in the Definition layer.
-
virtual void setBlendShapeTargetDeltas(std::uint16_t meshIndex, std::uint16_t blendShapeTargetIndex, const Delta *deltas, std::uint32_t count) = 0
List of deltas for each affected vertex.
Note
Both the mesh storage itself and it’s blend shape target storage will be implicitly resized (if needed) to provide storage for the number of meshes and/or blend shape targets that are inferred from the specified indexes.
- Parameters
meshIndex – A mesh’s position in the zero-indexed array of meshes.
blendShapeTargetIndex – A position in the zero-indexed array of blend shape targets within the specified mesh.
deltas – The source address from which the blend shape target deltas are to be copied.
count – The number of blend shape target deltas to copy.
-
virtual void setBlendShapeTargetVertexIndices(std::uint16_t meshIndex, std::uint16_t blendShapeTargetIndex, const std::uint32_t *vertexIndices, std::uint32_t count) = 0
Vertex position indices affected by the specified blend shape target.
Note
Both the mesh storage itself and it’s blend shape target storage will be implicitly resized (if needed) to provide storage for the number of meshes and/or blend shape targets that are inferred from the specified indexes.
Warning
The vertex position indices must be stored in the same order as the deltas they are associated with.
- Parameters
meshIndex – A mesh’s position in the zero-indexed array of meshes.
blendShapeTargetIndex – A position in the zero-indexed array of blend shape targets within the specified mesh.
vertexIndices – The source address from which the vertex position indices are to be copied.
count – The number of vertex position indices to copy.
Protected Functions
-
virtual ~GeometryWriter()
-
virtual void clearMeshes() = 0
-
class dna::DefinitionWriter : public dna::DescriptorWriter
Inheritence diagram for dna::DefinitionWriter:
Collaboration diagram for dna::DefinitionWriter:
Write-only accessors for DNA attributes that represent the rig’s static data.
See also
Warning
Implementors should inherit from Writer itself and not this class.
Subclassed by dna::BehaviorWriter, dna::GeometryWriter
Public Functions
-
virtual void clearGUIControlNames() = 0
Delete all stored GUI control names.
-
virtual void setGUIControlName(std::uint16_t index, const char *name) = 0
Name of the specified GUI control.
Note
The control name storage will be implicitly resized (if needed) to provide storage for the number of names that is inferred from the specified index.
Note
The passed in name is copied, which will involve an additional allocation.
- Parameters
index – A name’s position in the zero-indexed array of GUI control names.
name – A null-terminated string.
-
virtual void clearRawControlNames() = 0
Delete all stored raw control names.
-
virtual void setRawControlName(std::uint16_t index, const char *name) = 0
Name of the specified raw control.
Note
The control name storage will be implicitly resized (if needed) to provide storage for the number of names that is inferred from the specified index.
Note
The passed in name is copied, which will involve an additional allocation.
- Parameters
index – A name’s position in the zero-indexed array of raw control names.
name – A null-terminated string.
-
virtual void clearJointNames() = 0
Delete all stored joint names.
-
virtual void setJointName(std::uint16_t index, const char *name) = 0
Name of the specified joint.
Note
The joint name storage will be implicitly resized (if needed) to provide storage for the number of names that is inferred from the specified index.
Note
The passed in name is copied, which will involve an additional allocation.
- Parameters
index – A name’s position in the zero-indexed array of joint names.
name – A null-terminated string.
-
virtual void clearJointIndices() = 0
Delete all stored joint indices.
-
virtual void setJointIndices(std::uint16_t index, const std::uint16_t *jointIndices, std::uint16_t count) = 0
Store a list of joint indices onto a specified index.
Note
The index denotes the position of an entire joint index list, not the position of it’s individual elements, i.e. the row index in a 2D matrix of joint indices.
Note
The joint index storage will be implicitly resized (if needed) to provide storage for the number of joint indices that is inferred from the specified index.
Note
These indices can be used to access joint names through DefinitionReader::getJointName.
- Parameters
index – A position in a zero-indexed array where joint indices are stored.
jointIndices – The source address from which the joint indices are to be copied.
count – The number of joint indices to copy.
-
virtual void clearLODJointMappings() = 0
Delete all stored LOD to joint list index mapping entries.
-
virtual void setLODJointMapping(std::uint16_t lod, std::uint16_t index) = 0
Set which joints belong to which level of detail.
See also
- Parameters
lod – The actual level of detail to which the joints are being associated.
index – The index onto which joints indices were assigned using setJointIndices.
-
virtual void clearBlendShapeChannelNames() = 0
Delete all stored blend shape channel names.
-
virtual void setBlendShapeChannelName(std::uint16_t index, const char *name) = 0
Name of the specified blend shape channel.
Note
The blend shape channel name storage will be implicitly resized (if needed) to provide storage for the number of names that is inferred from the specified index.
Note
The passed in name is copied, which will involve an additional allocation.
- Parameters
index – A name’s position in the zero-indexed array of blend shape channel names.
name – A null-terminated string.
-
virtual void clearBlendShapeChannelIndices() = 0
Delete all stored blend shape channel indices.
-
virtual void setBlendShapeChannelIndices(std::uint16_t index, const std::uint16_t *blendShapeChannelIndices, std::uint16_t count) = 0
Store a list of blend shape channel name indices onto a specified index.
Note
The index denotes the position of an entire blend shape channel index list, not the position of it’s individual elements, i.e. the row index in a 2D matrix of blend shape channel indices.
Note
The blend shape channel index storage will be implicitly resized (if needed) to provide storage for the number of blend shape channel name indices that is inferred from the specified index.
Note
These indices can be used to access blend shape channel names through DefinitionReader::getBlendShapeChannelName.
- Parameters
index – A position in a zero-indexed array where blend shape channel name indices are stored.
blendShapeChannelIndices – The source address from which the blend shape channel name indices are to be copied.
count – The number of blend shape channel name indices to copy.
-
virtual void clearLODBlendShapeChannelMappings() = 0
Delete all stored LOD to blend shape channel list index mapping entries.
-
virtual void setLODBlendShapeChannelMapping(std::uint16_t lod, std::uint16_t index) = 0
Set which blend shape channels belong to which level of detail.
See also
Warning
The LOD indices set here are not interchangeable with the LOD values set in BehaviorWriter::setBlendShapeChannelLODs.
- Parameters
lod – The actual level of detail to which the blend shape channels are being associated.
index – The index onto which blend shape channel name indices were assigned using setBlendShapeChannelIndices.
-
virtual void clearAnimatedMapNames() = 0
Delete all stored animated map names.
-
virtual void setAnimatedMapName(std::uint16_t index, const char *name) = 0
Name of the specified animated map.
Note
The animated map name storage will be implicitly resized (if needed) to provide storage for the number of names that is inferred from the specified index.
Note
The passed in name is copied, which will involve an additional allocation.
- Parameters
index – A name’s position in the zero-indexed array of animated map names.
name – A null-terminated string.
-
virtual void clearAnimatedMapIndices() = 0
Delete all stored animated map indices.
-
virtual void setAnimatedMapIndices(std::uint16_t index, const std::uint16_t *animatedMapIndices, std::uint16_t count) = 0
Store a list of animated map name indices onto a specified index.
Note
The index denotes the position of an entire animated map index list, not the position of it’s individual elements, i.e. the row index in a 2D matrix of animated map indices.
Note
The animated map index storage will be implicitly resized (if needed) to provide storage for the number of animated map name indices that is inferred from the specified index.
Note
These indices can be used to access animated map names through DefinitionReader::getAnimatedMapName.
- Parameters
index – A position in a zero-indexed array where animated map name indices are stored.
animatedMapIndices – The source address from which the animated map name indices are to be copied.
count – The number of animated map name indices to copy.
-
virtual void clearLODAnimatedMapMappings() = 0
Delete all stored LOD to animated map list index mapping entries.
-
virtual void setLODAnimatedMapMapping(std::uint16_t lod, std::uint16_t index) = 0
Set which animated maps belong to which level of detail.
See also
- Parameters
lod – The actual level of detail to which the animated maps are being associated.
index – The index onto which animated map indices were assigned using setAnimatedMapIndices.
-
virtual void clearMeshNames() = 0
Delete all stored mesh names.
-
virtual void setMeshName(std::uint16_t index, const char *name) = 0
Name of the specified mesh.
Note
The mesh name storage will be implicitly resized (if needed) to provide storage for the number of names that is inferred from the specified index.
Note
The passed in name is copied, which will involve an additional allocation.
- Parameters
index – A name’s position in the zero-indexed array of mesh names.
name – A null-terminated string.
-
virtual void clearMeshIndices() = 0
Delete all stored mesh indices.
-
virtual void setMeshIndices(std::uint16_t index, const std::uint16_t *meshIndices, std::uint16_t count) = 0
Store a list of mesh name indices onto a specified index.
Note
The index denotes the position of an entire mesh index list, not the position of it’s individual elements, i.e. the row index in a 2D matrix of mesh indices.
Note
The mesh index storage will be implicitly resized (if needed) to provide storage for the number of mesh name indices that is inferred from the specified index.
Note
These indices can be used to access mesh names through DefinitionReader::getMeshName.
- Parameters
index – A position in a zero-indexed array where mesh name indices are stored.
meshIndices – The source address from which the mesh name indices are to be copied.
count – The number of mesh name indices to copy.
-
virtual void clearLODMeshMappings() = 0
Delete all stored LOD to mesh list index mapping entries.
-
virtual void setLODMeshMapping(std::uint16_t lod, std::uint16_t index) = 0
Set which meshes belong to which level of detail.
See also
- Parameters
lod – The actual level of detail to which the meshes are being associated.
index – The index onto which mesh indices were assigned using setMeshIndices.
-
virtual void clearMeshBlendShapeChannelMappings() = 0
Delete all stored mesh to blend shape channel mapping entries.
-
virtual void setMeshBlendShapeChannelMapping(std::uint32_t index, std::uint16_t meshIndex, std::uint16_t blendShapeChannelIndex) = 0
Associate a blend shape channel with it’s mesh.
- Parameters
index – A mapping’s position in the zero-indexed array of mesh-blend shape channel mappings.
meshIndex – A mesh’s position in the zero-indexed array of mesh names.
blendShapeChannelIndex – A blend shape channel’s position in the zero-indexed array of blend shape channel names.
-
virtual void setJointHierarchy(const std::uint16_t *jointIndices, std::uint16_t count) = 0
A simple array describing the parent-child relationships between joints.
Note
Example: Joint names: [A, B, C, D, E, F, G, H] Hierarchy: [0, 0, 0, 1, 1, 4, 2, 2] Describes the following hierarchy: A
B | + D | + E | + F
C
G
H
Note
These indices can be used to access joint names through DefinitionReader::getJointName.
- Parameters
jointIndices – The source address from which the joint indices are to be copied.
count – The number of joint indices to copy.
-
virtual void setNeutralJointTranslations(const Vector3 *translations, std::uint16_t count) = 0
- Parameters
translations – The source address from which the translations are to be copied.
count – The number of translation values to copy.
-
virtual void setNeutralJointRotations(const Vector3 *rotations, std::uint16_t count) = 0
- Parameters
rotations – The source address from which the rotations are to be copied.
count – The number of rotation values to copy.
Protected Functions
-
virtual ~DefinitionWriter()
-
virtual void clearGUIControlNames() = 0
-
class dna::DescriptorWriter
Inheritence diagram for dna::DescriptorWriter:
Collaboration diagram for dna::DescriptorWriter:
Write-only accessors to various metadata about the character and the rig.
See also
Warning
Implementors should inherit from Writer itself and not this class.
Subclassed by dna::DefinitionWriter
Public Functions
-
virtual void setName(const char *name) = 0
Note
The passed in name is copied, which will involve an allocation.
- Parameters
name – A null-terminated string.
-
virtual void setArchetype(Archetype archetype) = 0
-
virtual void setGender(Gender gender) = 0
-
virtual void setAge(std::uint16_t age) = 0
-
virtual void clearMetaData() = 0
Empties the metadata storage, delete all key-value pairs.
-
virtual void setMetaData(const char *key, const char *value) = 0
Associate the metadata value with the given key.
Note
Consecutive calls using the same key will overwrite any existing data.
Note
Passing nullptr as the value argument will cause the associated key to be deleted.
- Parameters
key – A unique, null-terminated key, to which the given value will be assigned.
value – A null-terminated, metadata value, which is to be assigned to the given key.
-
virtual void setTranslationUnit(TranslationUnit unit) = 0
-
virtual void setRotationUnit(RotationUnit unit) = 0
-
virtual void setCoordinateSystem(CoordinateSystem system) = 0
-
virtual void setLODCount(std::uint16_t lodCount) = 0
Available levels of detail (e.g. 6 which means the following levels are available: [0,1,2,3,4,5], where 0 is the LOD with the highest details, and 5 is the LOD with lowest details).
- Parameters
lodCount – The number of levels available.
-
virtual void setDBMaxLOD(std::uint16_t lod) = 0
The maximum level of detail stored in the DNA data for this character.
-
virtual void setDBComplexity(const char *name) = 0
Name of the input control interface used to drive this character rig.
Note
The passed in name is copied, which will involve an additional allocation.
- Parameters
name – A null-terminated string.
-
virtual void setDBName(const char *name) = 0
Name of the database from which the character originates.
Note
The passed in name is copied, which will involve an additional allocation.
- Parameters
name – A null-terminated string.
Protected Functions
-
virtual ~DescriptorWriter()
-
virtual void setName(const char *name) = 0
-
template<class TWriterBase>
class dna::WriterImpl : public TWriterBase, public virtual dna::BaseImpl Inheritence diagram for dna::WriterImpl:
Collaboration diagram for dna::WriterImpl:
Public Functions
-
explicit WriterImpl(MemoryResource *memRes_)
-
inline void setName(const char *name) override
-
inline void setArchetype(Archetype archetype) override
-
inline void setGender(Gender gender) override
-
inline void setAge(std::uint16_t age) override
-
inline void clearMetaData() override
-
inline void setMetaData(const char *key, const char *value) override
-
inline void setTranslationUnit(TranslationUnit unit) override
-
inline void setRotationUnit(RotationUnit unit) override
-
inline void setCoordinateSystem(CoordinateSystem system) override
-
inline void setLODCount(std::uint16_t lodCount) override
-
inline void setDBMaxLOD(std::uint16_t lod) override
-
inline void setDBComplexity(const char *name) override
-
inline void setDBName(const char *name) override
-
inline void clearGUIControlNames() override
-
inline void setGUIControlName(std::uint16_t index, const char *name) override
-
inline void clearRawControlNames() override
-
inline void setRawControlName(std::uint16_t index, const char *name) override
-
inline void clearJointNames() override
-
inline void setJointName(std::uint16_t index, const char *name) override
-
inline void clearJointIndices() override
-
inline void setJointIndices(std::uint16_t index, const std::uint16_t *jointIndices, std::uint16_t count) override
-
inline void clearLODJointMappings() override
-
inline void setLODJointMapping(std::uint16_t lod, std::uint16_t index) override
-
inline void clearBlendShapeChannelNames() override
-
inline void setJointHierarchy(const std::uint16_t *jointIndices, std::uint16_t count) override
-
inline void setBlendShapeChannelName(std::uint16_t index, const char *name) override
-
inline void clearBlendShapeChannelIndices() override
-
inline void setBlendShapeChannelIndices(std::uint16_t index, const std::uint16_t *blendShapeChannelIndices, std::uint16_t count) override
-
inline void clearLODBlendShapeChannelMappings() override
-
inline void setLODBlendShapeChannelMapping(std::uint16_t lod, std::uint16_t index) override
-
inline void clearAnimatedMapNames() override
-
inline void setAnimatedMapName(std::uint16_t index, const char *name) override
-
inline void clearAnimatedMapIndices() override
-
inline void setAnimatedMapIndices(std::uint16_t index, const std::uint16_t *animatedMapIndices, std::uint16_t count) override
-
inline void clearLODAnimatedMapMappings() override
-
inline void setLODAnimatedMapMapping(std::uint16_t lod, std::uint16_t index) override
-
inline void clearMeshNames() override
-
inline void setMeshName(std::uint16_t index, const char *name) override
-
inline void clearMeshIndices() override
-
inline void setMeshIndices(std::uint16_t index, const std::uint16_t *meshIndices, std::uint16_t count) override
-
inline void clearLODMeshMappings() override
-
inline void setLODMeshMapping(std::uint16_t lod, std::uint16_t index) override
-
inline void clearMeshBlendShapeChannelMappings() override
-
inline void setMeshBlendShapeChannelMapping(std::uint32_t index, std::uint16_t meshIndex, std::uint16_t blendShapeChannelIndex) override
-
inline void setNeutralJointTranslations(const Vector3 *translations, std::uint16_t count) override
-
inline void setNeutralJointRotations(const Vector3 *rotations, std::uint16_t count) override
-
inline void setGUIToRawInputIndices(const std::uint16_t *inputIndices, std::uint16_t count) override
-
inline void setGUIToRawOutputIndices(const std::uint16_t *outputIndices, std::uint16_t count) override
-
inline void setGUIToRawFromValues(const float *fromValues, std::uint16_t count) override
-
inline void setGUIToRawToValues(const float *toValues, std::uint16_t count) override
-
inline void setGUIToRawSlopeValues(const float *slopeValues, std::uint16_t count) override
-
inline void setGUIToRawCutValues(const float *cutValues, std::uint16_t count) override
-
inline void setPSDCount(std::uint16_t count) override
-
inline void setPSDRowIndices(const std::uint16_t *rowIndices, std::uint16_t count) override
-
inline void setPSDColumnIndices(const std::uint16_t *columnIndices, std::uint16_t count) override
-
inline void setPSDValues(const float *weights, std::uint16_t count) override
-
inline void setJointRowCount(std::uint16_t rowCount) override
-
inline void setJointColumnCount(std::uint16_t columnCount) override
-
inline void clearJointGroups() override
-
inline void deleteJointGroup(std::uint16_t jointGroupIndex) override
-
inline void setJointGroupLODs(std::uint16_t jointGroupIndex, const std::uint16_t *lods, std::uint16_t count) override
-
inline void setJointGroupInputIndices(std::uint16_t jointGroupIndex, const std::uint16_t *inputIndices, std::uint16_t count) override
-
inline void setJointGroupOutputIndices(std::uint16_t jointGroupIndex, const std::uint16_t *outputIndices, std::uint16_t count) override
-
inline void setJointGroupValues(std::uint16_t jointGroupIndex, const float *values, std::uint32_t count) override
-
inline void setJointGroupJointIndices(std::uint16_t jointGroupIndex, const std::uint16_t *jointIndices, std::uint16_t count) override
-
inline void setBlendShapeChannelLODs(const std::uint16_t *lods, std::uint16_t count) override
-
inline void setBlendShapeChannelInputIndices(const std::uint16_t *inputIndices, std::uint16_t count) override
-
inline void setBlendShapeChannelOutputIndices(const std::uint16_t *outputIndices, std::uint16_t count) override
-
inline void setAnimatedMapLODs(const std::uint16_t *lods, std::uint16_t count) override
-
inline void setAnimatedMapInputIndices(const std::uint16_t *inputIndices, std::uint16_t count) override
-
inline void setAnimatedMapOutputIndices(const std::uint16_t *outputIndices, std::uint16_t count) override
-
inline void setAnimatedMapFromValues(const float *fromValues, std::uint16_t count) override
-
inline void setAnimatedMapToValues(const float *toValues, std::uint16_t count) override
-
inline void setAnimatedMapSlopeValues(const float *slopeValues, std::uint16_t count) override
-
inline void setAnimatedMapCutValues(const float *cutValues, std::uint16_t count) override
-
inline void clearMeshes() override
-
inline void deleteMesh(std::uint16_t meshIndex) override
-
inline void setVertexPositions(std::uint16_t meshIndex, const Position *positions, std::uint32_t count) override
-
inline void setVertexTextureCoordinates(std::uint16_t meshIndex, const TextureCoordinate *textureCoordinates, std::uint32_t count) override
-
inline void setVertexNormals(std::uint16_t meshIndex, const Normal *normals, std::uint32_t count) override
-
inline void setVertexLayouts(std::uint16_t meshIndex, const VertexLayout *layouts, std::uint32_t count) override
-
inline void clearFaceVertexLayoutIndices(std::uint16_t meshIndex) override
-
inline void setFaceVertexLayoutIndices(std::uint16_t meshIndex, std::uint32_t faceIndex, const std::uint32_t *layoutIndices, std::uint32_t count) override
-
inline void setMaximumInfluencePerVertex(std::uint16_t meshIndex, std::uint16_t maxInfluenceCount) override
-
inline void clearSkinWeights(std::uint16_t meshIndex) override
-
inline void setSkinWeightsValues(std::uint16_t meshIndex, std::uint32_t vertexIndex, const float *weights, std::uint16_t count) override
-
inline void setSkinWeightsJointIndices(std::uint16_t meshIndex, std::uint32_t vertexIndex, const std::uint16_t *jointIndices, std::uint16_t count) override
-
inline void clearBlendShapeTargets(std::uint16_t meshIndex) override
-
inline void setBlendShapeChannelIndex(std::uint16_t meshIndex, std::uint16_t blendShapeTargetIndex, std::uint16_t blendShapeChannelIndex) override
-
inline void setBlendShapeTargetDeltas(std::uint16_t meshIndex, std::uint16_t blendShapeTargetIndex, const Delta *deltas, std::uint32_t count) override
-
inline void setBlendShapeTargetVertexIndices(std::uint16_t meshIndex, std::uint16_t blendShapeTargetIndex, const std::uint32_t *vertexIndices, std::uint32_t count) override
-
explicit WriterImpl(MemoryResource *memRes_)
Warning
doxygenclass: Cannot find class “dna::StreamWriterImpl” in doxygen xml output for project “dnacalib” from directory: C:/source/MetaHuman-DNA-Calibration_clean/docs/sphinx/source/../../../docs/doxygen/build/xml/
-
class dna::StringView : public trust::ArrayView<char>
Inheritence diagram for dna::StringView:
Collaboration diagram for dna::StringView:
Public Types
-
using Base = trust::ConstArrayView<char>
Public Functions
-
inline const char *c_str() const
-
inline operator const char*() const
-
inline const char *operator*() const
-
ArrayView() = default
-
inline ArrayView(pointer src, size_type size)
-
inline ArrayView(std::nullptr_t, size_type)
Private Functions
-
inline const char *dataOrEmpty() const
-
using Base = trust::ConstArrayView<char>
-
class dna::BaseImpl
Inheritence diagram for dna::BaseImpl:
Collaboration diagram for dna::BaseImpl:
Subclassed by dna::ReaderImpl< BinaryStreamReader >, dna::ReaderImpl< JSONStreamReader >, dna::WriterImpl< BinaryStreamWriter >, dna::WriterImpl< JSONStreamWriter >, dna::ReaderImpl< TReaderBase >, dna::WriterImpl< TWriterBase >
Public Functions
-
inline MemoryResource *getMemoryResource()
-
inline MemoryResource *getMemoryResource()
-
class dna::LODConstraint
Collaboration diagram for dna::LODConstraint:
Public Functions
-
LODConstraint(std::uint16_t maxLOD, std::uint16_t minLOD, MemoryResource *memRes)
-
LODConstraint(ConstArrayView<std::uint16_t> lods, MemoryResource *memRes)
-
bool hasImpactOn(std::uint16_t lodCount) const
-
std::uint16_t getMaxLOD() const
-
std::uint16_t getMinLOD() const
-
std::uint16_t getLODCount() const
-
void clampTo(std::uint16_t lodCount)
-
void applyTo(Vector<std::uint16_t> &unconstrainedLODs) const
-
void applyTo(DynArray<std::uint16_t> &unconstrainedLODs) const
Private Members
-
Vector<std::uint16_t> lods
-
LODConstraint(std::uint16_t maxLOD, std::uint16_t minLOD, MemoryResource *memRes)
-
class dna::LODMapping
Inheritence diagram for dna::LODMapping:
Collaboration diagram for dna::LODMapping:
Subclassed by dna::RawLODMapping
Public Functions
-
explicit LODMapping(MemoryResource *memRes_)
-
std::uint16_t getLODCount() const
-
void resetIndices()
-
void resetLODs()
-
void reset()
-
void setLODCount(std::uint16_t lodCount)
-
void discardLODs(const LODConstraint &lodConstraint)
-
ConstArrayView<std::uint16_t> getIndices(std::uint16_t lod) const
-
std::uint16_t getIndexListCount() const
-
void clearIndices(std::uint16_t index)
-
void addIndices(std::uint16_t index, const std::uint16_t *source, std::uint16_t count)
-
void associateLODWithIndices(std::uint16_t lod, std::uint16_t index)
-
void mapIndices(std::function<std::uint16_t(std::uint16_t)> mapper)
-
void filterIndices(std::function<bool(std::uint16_t)> filterer)
-
UnorderedSet<std::uint16_t> getCombinedDistinctIndices(MemoryResource *memRes) const
Private Functions
-
void cleanupIndices()
-
explicit LODMapping(MemoryResource *memRes_)
-
class dna::AnimatedMapFilter
Inheritence diagram for dna::AnimatedMapFilter:
Collaboration diagram for dna::AnimatedMapFilter:
Subclassed by dna::FilteredInputArchive
-
class dna::BlendShapeFilter
Inheritence diagram for dna::BlendShapeFilter:
Collaboration diagram for dna::BlendShapeFilter:
Subclassed by dna::FilteredInputArchive
-
class dna::JointFilter
Inheritence diagram for dna::JointFilter:
Collaboration diagram for dna::JointFilter:
Subclassed by dna::FilteredInputArchive
Public Functions
-
explicit JointFilter(MemoryResource *memRes_)
-
void configure(std::uint16_t jointCount, UnorderedSet<std::uint16_t> allowedJointIndices, Option option_ = Option::All)
-
void apply(RawDefinition &dest)
-
void apply(RawBehavior &dest)
-
void apply(RawVertexSkinWeights &dest)
-
bool passes(std::uint16_t index) const
-
std::uint16_t remapped(std::uint16_t oldIndex) const
-
std::uint16_t maxRemappedIndex() const
-
explicit JointFilter(MemoryResource *memRes_)
-
class dna::MeshFilter
Inheritence diagram for dna::MeshFilter:
Collaboration diagram for dna::MeshFilter:
Subclassed by dna::FilteredInputArchive
-
class dna::FilteredInputArchive : public dna::AnimatedMapFilter, public dna::BlendShapeFilter, public dna::JointFilter, public dna::MeshFilter, public terse::ExtendableBinaryInputArchive<FilteredInputArchive, BoundedIOStream, std::uint32_t, std::uint32_t, terse::Endianness::Network>
Inheritence diagram for dna::FilteredInputArchive:
Collaboration diagram for dna::FilteredInputArchive:
Public Functions
-
FilteredInputArchive(BoundedIOStream *stream_, DataLayer layer_, std::uint16_t maxLOD_, std::uint16_t minLOD_, MemoryResource *memRes_)
-
FilteredInputArchive(BoundedIOStream *stream_, DataLayer layer_, ConstArrayView<std::uint16_t> lods_, MemoryResource *memRes_)
Private Types
-
using BaseArchive = terse::ExtendableBinaryInputArchive<FilteredInputArchive, BoundedIOStream, std::uint32_t, std::uint32_t, terse::Endianness::Network>
Private Functions
-
void process(RawDescriptor &dest)
-
void process(RawDefinition &dest)
-
void process(RawBehavior &dest)
-
void process(RawJoints &dest)
-
void process(RawBlendShapeChannels &dest)
-
void process(RawAnimatedMaps &dest)
-
void process(RawGeometry &dest)
-
void process(RawMesh &dest)
-
void process(RawVertexSkinWeights &dest)
-
template<typename TContainer>
void processSubset(TContainer &dest, std::size_t offset, std::size_t size)
-
FilteredInputArchive(BoundedIOStream *stream_, DataLayer layer_, std::uint16_t maxLOD_, std::uint16_t minLOD_, MemoryResource *memRes_)