DNA Calib 1.1
Project brief
Public Member Functions | List of all members
dnac::DNACalibDNAReaderImpl Class Reference

#include <DNACalibDNAReaderImpl.h>

Inheritance diagram for dnac::DNACalibDNAReaderImpl:
Inheritance graph
Collaboration diagram for dnac::DNACalibDNAReaderImpl:
Collaboration graph

Public Member Functions

 DNACalibDNAReaderImpl (MemoryResource *memRes_)
 
virtual ~DNACalibDNAReaderImpl ()
 
 DNACalibDNAReaderImpl (const DNACalibDNAReaderImpl &)=delete
 
DNACalibDNAReaderImploperator= (const DNACalibDNAReaderImpl &)=delete
 
 DNACalibDNAReaderImpl (DNACalibDNAReaderImpl &&)=delete
 
DNACalibDNAReaderImploperator= (DNACalibDNAReaderImpl &&)=delete
 
void setLODCount (std::uint16_t lodCount)
 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). More...
 
void setNeutralJointTranslations (ConstArrayView< float > xs, ConstArrayView< float > ys, ConstArrayView< float > zs)
 
void setNeutralJointTranslations (RawVector3Vector &&translations)
 
void setNeutralJointTranslation (std::uint16_t index, const Vector3 &translation)
 
void setNeutralJointRotations (ConstArrayView< float > xs, ConstArrayView< float > ys, ConstArrayView< float > zs)
 
void setNeutralJointRotations (RawVector3Vector &&rotations)
 
void setNeutralJointRotation (std::uint16_t index, const Vector3 &rotation)
 
void setJointGroupValues (std::uint16_t jointGroupIndex, AlignedDynArray< float > &&values)
 
void setVertexPositions (std::uint16_t meshIndex, ConstArrayView< float > xs, ConstArrayView< float > ys, ConstArrayView< float > zs)
 
void setVertexPositions (std::uint16_t meshIndex, RawVector3Vector &&positions)
 
void setBlendShapeTargetDeltas (std::uint16_t meshIndex, std::uint16_t blendShapeTargetIndex, ConstArrayView< float > xs, ConstArrayView< float > ys, ConstArrayView< float > zs)
 
void setBlendShapeTargetDeltas (std::uint16_t meshIndex, std::uint16_t blendShapeTargetIndex, RawVector3Vector &&deltas)
 
void setBlendShapeTargetVertexIndices (std::uint16_t meshIndex, std::uint16_t blendShapeTargetIndex, ConstArrayView< std::uint32_t > vertexIndices)
 
void pruneBlendShapeTargets (float threshold)
 
void removeMeshes (ConstArrayView< std::uint16_t > meshIndices)
 
void removeJoints (ConstArrayView< std::uint16_t > jointIndices)
 
void removeJointAnimations (ConstArrayView< std::uint16_t > jointIndex)
 
void removeBlendShapes (ConstArrayView< std::uint16_t > blendShapeIndices)
 
void removeAnimatedMaps (ConstArrayView< std::uint16_t > animatedMapIndices)
 
- Public Member Functions inherited from dnac::ReaderImpl< DNACalibDNAReader >
 ReaderImpl (MemoryResource *memRes_)
 
StringView getName () const override
 
Archetype getArchetype () const override
 
Gender getGender () const override
 
std::uint16_t getAge () const override
 
std::uint32_t getMetaDataCount () const override
 
StringView getMetaDataKey (std::uint32_t index) const override
 
StringView getMetaDataValue (const char *key) const override
 
TranslationUnit getTranslationUnit () const override
 
RotationUnit getRotationUnit () const override
 
CoordinateSystem getCoordinateSystem () const override
 
std::uint16_t getLODCount () const override
 
std::uint16_t getDBMaxLOD () const override
 
StringView getDBComplexity () const override
 
StringView getDBName () const override
 
std::uint16_t getGUIControlCount () const override
 
StringView getGUIControlName (std::uint16_t index) const override
 
std::uint16_t getRawControlCount () const override
 
StringView getRawControlName (std::uint16_t index) const override
 
std::uint16_t getJointCount () const override
 
StringView getJointName (std::uint16_t index) const override
 
std::uint16_t getJointIndexListCount () const override
 
ConstArrayView< std::uint16_t > getJointIndicesForLOD (std::uint16_t lod) const override
 
std::uint16_t getJointParentIndex (std::uint16_t index) const override
 
std::uint16_t getBlendShapeChannelCount () const override
 
StringView getBlendShapeChannelName (std::uint16_t index) const override
 
std::uint16_t getBlendShapeChannelIndexListCount () const override
 
ConstArrayView< std::uint16_t > getBlendShapeChannelIndicesForLOD (std::uint16_t lod) const override
 
std::uint16_t getAnimatedMapCount () const override
 
StringView getAnimatedMapName (std::uint16_t index) const override
 
std::uint16_t getAnimatedMapIndexListCount () const override
 
ConstArrayView< std::uint16_t > getAnimatedMapIndicesForLOD (std::uint16_t lod) const override
 
std::uint16_t getMeshCount () const override
 
StringView getMeshName (std::uint16_t index) const override
 
std::uint16_t getMeshIndexListCount () const override
 
ConstArrayView< std::uint16_t > getMeshIndicesForLOD (std::uint16_t lod) const override
 
std::uint16_t getMeshBlendShapeChannelMappingCount () const override
 
MeshBlendShapeChannelMapping getMeshBlendShapeChannelMapping (std::uint16_t index) const override
 
ConstArrayView< std::uint16_t > getMeshBlendShapeChannelMappingIndicesForLOD (std::uint16_t lod) const override
 
Vector3 getNeutralJointTranslation (std::uint16_t index) const override
 
ConstArrayView< float > getNeutralJointTranslationXs () const override
 
ConstArrayView< float > getNeutralJointTranslationYs () const override
 
ConstArrayView< float > getNeutralJointTranslationZs () const override
 
Vector3 getNeutralJointRotation (std::uint16_t index) const override
 
ConstArrayView< float > getNeutralJointRotationXs () const override
 
ConstArrayView< float > getNeutralJointRotationYs () const override
 
ConstArrayView< float > getNeutralJointRotationZs () const override
 
ConstArrayView< std::uint16_t > getGUIToRawInputIndices () const override
 
ConstArrayView< std::uint16_t > getGUIToRawOutputIndices () const override
 
ConstArrayView< float > getGUIToRawFromValues () const override
 
ConstArrayView< float > getGUIToRawToValues () const override
 
ConstArrayView< float > getGUIToRawSlopeValues () const override
 
ConstArrayView< float > getGUIToRawCutValues () const override
 
std::uint16_t getPSDCount () const override
 
ConstArrayView< std::uint16_t > getPSDRowIndices () const override
 
ConstArrayView< std::uint16_t > getPSDColumnIndices () const override
 
ConstArrayView< float > getPSDValues () const override
 
std::uint16_t getJointRowCount () const override
 
std::uint16_t getJointColumnCount () const override
 
ConstArrayView< std::uint16_t > getJointVariableAttributeIndices (std::uint16_t lod) const override
 
std::uint16_t getJointGroupCount () const override
 
ConstArrayView< std::uint16_t > getJointGroupLODs (std::uint16_t jointGroupIndex) const override
 
ConstArrayView< std::uint16_t > getJointGroupInputIndices (std::uint16_t jointGroupIndex) const override
 
ConstArrayView< std::uint16_t > getJointGroupOutputIndices (std::uint16_t jointGroupIndex) const override
 
ConstArrayView< float > getJointGroupValues (std::uint16_t jointGroupIndex) const override
 
ConstArrayView< std::uint16_t > getJointGroupJointIndices (std::uint16_t jointGroupIndex) const override
 
ConstArrayView< std::uint16_t > getBlendShapeChannelLODs () const override
 
ConstArrayView< std::uint16_t > getBlendShapeChannelOutputIndices () const override
 
ConstArrayView< std::uint16_t > getBlendShapeChannelInputIndices () const override
 
ConstArrayView< std::uint16_t > getAnimatedMapLODs () const override
 
ConstArrayView< std::uint16_t > getAnimatedMapInputIndices () const override
 
ConstArrayView< std::uint16_t > getAnimatedMapOutputIndices () const override
 
ConstArrayView< float > getAnimatedMapFromValues () const override
 
ConstArrayView< float > getAnimatedMapToValues () const override
 
ConstArrayView< float > getAnimatedMapSlopeValues () const override
 
ConstArrayView< float > getAnimatedMapCutValues () const override
 
std::uint32_t getVertexPositionCount (std::uint16_t meshIndex) const override
 
Position getVertexPosition (std::uint16_t meshIndex, std::uint32_t vertexIndex) const override
 
ConstArrayView< float > getVertexPositionXs (std::uint16_t meshIndex) const override
 
ConstArrayView< float > getVertexPositionYs (std::uint16_t meshIndex) const override
 
ConstArrayView< float > getVertexPositionZs (std::uint16_t meshIndex) const override
 
std::uint32_t getVertexTextureCoordinateCount (std::uint16_t meshIndex) const override
 
TextureCoordinate getVertexTextureCoordinate (std::uint16_t meshIndex, std::uint32_t textureCoordinateIndex) const override
 
ConstArrayView< float > getVertexTextureCoordinateUs (std::uint16_t meshIndex) const override
 
ConstArrayView< float > getVertexTextureCoordinateVs (std::uint16_t meshIndex) const override
 
std::uint32_t getVertexNormalCount (std::uint16_t meshIndex) const override
 
Normal getVertexNormal (std::uint16_t meshIndex, std::uint32_t normalIndex) const override
 
ConstArrayView< float > getVertexNormalXs (std::uint16_t meshIndex) const override
 
ConstArrayView< float > getVertexNormalYs (std::uint16_t meshIndex) const override
 
ConstArrayView< float > getVertexNormalZs (std::uint16_t meshIndex) const override
 
std::uint32_t getFaceCount (std::uint16_t meshIndex) const override
 
ConstArrayView< std::uint32_t > getFaceVertexLayoutIndices (std::uint16_t meshIndex, std::uint32_t faceIndex) const override
 
std::uint32_t getVertexLayoutCount (std::uint16_t meshIndex) const override
 
VertexLayout getVertexLayout (std::uint16_t meshIndex, std::uint32_t layoutIndex) const override
 
ConstArrayView< std::uint32_t > getVertexLayoutPositionIndices (std::uint16_t meshIndex) const override
 
ConstArrayView< std::uint32_t > getVertexLayoutTextureCoordinateIndices (std::uint16_t meshIndex) const override
 
ConstArrayView< std::uint32_t > getVertexLayoutNormalIndices (std::uint16_t meshIndex) const override
 
std::uint16_t getMaximumInfluencePerVertex (std::uint16_t meshIndex) const override
 
std::uint32_t getSkinWeightsCount (std::uint16_t meshIndex) const override
 
ConstArrayView< float > getSkinWeightsValues (std::uint16_t meshIndex, std::uint32_t vertexIndex) const override
 
ConstArrayView< std::uint16_t > getSkinWeightsJointIndices (std::uint16_t meshIndex, std::uint32_t vertexIndex) const override
 
std::uint16_t getBlendShapeTargetCount (std::uint16_t meshIndex) const override
 
std::uint16_t getBlendShapeChannelIndex (std::uint16_t meshIndex, std::uint16_t blendShapeTargetIndex) const override
 
std::uint32_t getBlendShapeTargetDeltaCount (std::uint16_t meshIndex, std::uint16_t blendShapeTargetIndex) const override
 
Delta getBlendShapeTargetDelta (std::uint16_t meshIndex, std::uint16_t blendShapeTargetIndex, std::uint32_t deltaIndex) const override
 
ConstArrayView< float > getBlendShapeTargetDeltaXs (std::uint16_t meshIndex, std::uint16_t blendShapeTargetIndex) const override
 
ConstArrayView< float > getBlendShapeTargetDeltaYs (std::uint16_t meshIndex, std::uint16_t blendShapeTargetIndex) const override
 
ConstArrayView< float > getBlendShapeTargetDeltaZs (std::uint16_t meshIndex, std::uint16_t blendShapeTargetIndex) const override
 
ConstArrayView< std::uint32_t > getBlendShapeTargetVertexIndices (std::uint16_t meshIndex, std::uint16_t blendShapeTargetIndex) const override
 
void unload (DataLayer layer) override
 
- Public Member Functions inherited from dna::Reader
 ~Reader () override
 
virtual void unload (DataLayer layer)=0
 Unload all data of the specified layer and all layers dependent on it. More...
 
virtual ConstArrayView< std::uint16_t > getGUIToRawInputIndices () const =0
 Input indices used for mapping gui to raw controls. More...
 
virtual ConstArrayView< std::uint16_t > getGUIToRawOutputIndices () const =0
 Output indices used for mapping gui to raw controls. More...
 
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. More...
 
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. More...
 
virtual ConstArrayView< float > getGUIToRawSlopeValues () const =0
 Computational values(slope/gradient) used for calculating the output value during gui to raw control mapping. More...
 
virtual ConstArrayView< float > getGUIToRawCutValues () const =0
 Computational values(vertical intercept) used for calculating the output value during gui to raw control mapping. More...
 
virtual std::uint16_t getPSDCount () const =0
 The number of distinct PSD expressions. More...
 
virtual ConstArrayView< std::uint16_t > getPSDRowIndices () const =0
 PSD(input) indices. More...
 
virtual ConstArrayView< std::uint16_t > getPSDColumnIndices () const =0
 Control(input) indices. More...
 
virtual ConstArrayView< float > getPSDValues () const =0
 Weights associated with each PSD row and column pair. More...
 
virtual std::uint16_t getJointRowCount () const =0
 Number of rows in the entire, uncompressed joint matrix. More...
 
virtual std::uint16_t getJointColumnCount () const =0
 Number of columns in the entire, uncompressed joint matrix. More...
 
virtual ConstArrayView< std::uint16_t > getJointVariableAttributeIndices (std::uint16_t lod) const =0
 Joint attribute indices (output indices) for the requested LOD. More...
 
virtual std::uint16_t getJointGroupCount () const =0
 Number of joint groups present in the entire joint matrix. More...
 
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. More...
 
virtual ConstArrayView< std::uint16_t > getJointGroupInputIndices (std::uint16_t jointGroupIndex) const =0
 Column indices that the requested joint group contains. More...
 
virtual ConstArrayView< std::uint16_t > getJointGroupOutputIndices (std::uint16_t jointGroupIndex) const =0
 Row indices that the requested joint group contains. More...
 
virtual ConstArrayView< float > getJointGroupValues (std::uint16_t jointGroupIndex) const =0
 Values that the requested joint group contains. More...
 
virtual ConstArrayView< std::uint16_t > getJointGroupJointIndices (std::uint16_t jointGroupIndex) const =0
 Joint indices that the requested joint group contains. More...
 
virtual ConstArrayView< std::uint16_t > getBlendShapeChannelLODs () const =0
 Input index count per each level of detail for blend shape channels. More...
 
virtual ConstArrayView< std::uint16_t > getBlendShapeChannelInputIndices () const =0
 Input indices used to index into the input vector. More...
 
virtual ConstArrayView< std::uint16_t > getBlendShapeChannelOutputIndices () const =0
 Output indices specify the positions of blend shape channel output values. More...
 
virtual ConstArrayView< std::uint16_t > getAnimatedMapLODs () const =0
 Row count per each level of detail for animated maps. More...
 
virtual ConstArrayView< std::uint16_t > getAnimatedMapInputIndices () const =0
 Input indices used to index into the array of input values. More...
 
virtual ConstArrayView< std::uint16_t > getAnimatedMapOutputIndices () const =0
 Output indices that specify the computed output value's position. More...
 
virtual ConstArrayView< float > getAnimatedMapFromValues () const =0
 Filter values(lower-bounds) used to decide whether a particular entry should be evaluated or not. More...
 
virtual ConstArrayView< float > getAnimatedMapToValues () const =0
 Filter values(upper-bounds) used to decide whether a particular entry should be evaluated or not. More...
 
virtual ConstArrayView< float > getAnimatedMapSlopeValues () const =0
 Computational values(slope/gradient) used for calculating the output value. More...
 
virtual ConstArrayView< float > getAnimatedMapCutValues () const =0
 Computational values(vertical intercept) used for calculating the output value. More...
 
virtual std::uint16_t getGUIControlCount () const =0
 
virtual StringView getGUIControlName (std::uint16_t index) const =0
 Name of the requested GUI control. More...
 
virtual std::uint16_t getRawControlCount () const =0
 
virtual StringView getRawControlName (std::uint16_t index) const =0
 Name of the requested raw control. More...
 
virtual std::uint16_t getJointCount () const =0
 
virtual StringView getJointName (std::uint16_t index) const =0
 Name of the requested joint. More...
 
virtual std::uint16_t getJointIndexListCount () const =0
 Number of joint index lists. More...
 
virtual ConstArrayView< std::uint16_t > getJointIndicesForLOD (std::uint16_t lod) const =0
 List of joint indices for the specified LOD. More...
 
virtual std::uint16_t getJointParentIndex (std::uint16_t index) const =0
 Index of the requested joint's parent. More...
 
virtual std::uint16_t getBlendShapeChannelCount () const =0
 
virtual StringView getBlendShapeChannelName (std::uint16_t index) const =0
 Name of the requested blend shape channel. More...
 
virtual std::uint16_t getBlendShapeChannelIndexListCount () const =0
 Number of blend shape channel index lists. More...
 
virtual ConstArrayView< std::uint16_t > getBlendShapeChannelIndicesForLOD (std::uint16_t lod) const =0
 List of blend shape channel indices for the specified LOD. More...
 
virtual std::uint16_t getAnimatedMapCount () const =0
 
virtual StringView getAnimatedMapName (std::uint16_t index) const =0
 Name of the requested animated map. More...
 
virtual std::uint16_t getAnimatedMapIndexListCount () const =0
 Number of animated map index lists. More...
 
virtual ConstArrayView< std::uint16_t > getAnimatedMapIndicesForLOD (std::uint16_t lod) const =0
 List of animated map indices for the specified LOD. More...
 
virtual std::uint16_t getMeshCount () const =0
 
virtual StringView getMeshName (std::uint16_t index) const =0
 Name of the requested mesh. More...
 
virtual std::uint16_t getMeshIndexListCount () const =0
 Number of mesh index lists. More...
 
virtual ConstArrayView< std::uint16_t > getMeshIndicesForLOD (std::uint16_t lod) const =0
 List of mesh indices for the specified LOD. More...
 
virtual std::uint16_t getMeshBlendShapeChannelMappingCount () const =0
 Number of mesh-blend shape channel mapping items. More...
 
virtual MeshBlendShapeChannelMapping getMeshBlendShapeChannelMapping (std::uint16_t index) const =0
 
virtual ConstArrayView< std::uint16_t > getMeshBlendShapeChannelMappingIndicesForLOD (std::uint16_t lod) const =0
 List of mesh-blend shape channel mapping indices for the specified LOD. More...
 
virtual Vector3 getNeutralJointTranslation (std::uint16_t index) const =0
 
virtual ConstArrayView< float > getNeutralJointTranslationXs () const =0
 List of all translation X values. More...
 
virtual ConstArrayView< float > getNeutralJointTranslationYs () const =0
 List of all translation Y values. More...
 
virtual ConstArrayView< float > getNeutralJointTranslationZs () const =0
 List of all translation Z values. More...
 
virtual Vector3 getNeutralJointRotation (std::uint16_t index) const =0
 
virtual ConstArrayView< float > getNeutralJointRotationXs () const =0
 List of all rotation X values. More...
 
virtual ConstArrayView< float > getNeutralJointRotationYs () const =0
 List of all rotation Y values. More...
 
virtual ConstArrayView< float > getNeutralJointRotationZs () const =0
 List of all rotation Z values. More...
 
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
 
virtual StringView getMetaDataValue (const char *key) const =0
 Stored metadata value associated with the given key. More...
 
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). More...
 
virtual std::uint16_t getDBMaxLOD () const =0
 The maximum level of detail stored in the DNA data for this character. More...
 
virtual StringView getDBComplexity () const =0
 Name of the input control interface used to drive this character rig. More...
 
virtual StringView getDBName () const =0
 Name of the database from which the character originates. More...
 
virtual std::uint32_t getVertexPositionCount (std::uint16_t meshIndex) const =0
 Number of vertex positions in the entire mesh. More...
 
virtual Position getVertexPosition (std::uint16_t meshIndex, std::uint32_t vertexIndex) const =0
 
virtual ConstArrayView< float > getVertexPositionXs (std::uint16_t meshIndex) const =0
 List of all vertex position X values for the referenced mesh. More...
 
virtual ConstArrayView< float > getVertexPositionYs (std::uint16_t meshIndex) const =0
 List of all vertex position Y values for the referenced mesh. More...
 
virtual ConstArrayView< float > getVertexPositionZs (std::uint16_t meshIndex) const =0
 List of all vertex position Z values for the referenced mesh. More...
 
virtual std::uint32_t getVertexTextureCoordinateCount (std::uint16_t meshIndex) const =0
 Number of texture coordinates in the entire mesh. More...
 
virtual TextureCoordinate getVertexTextureCoordinate (std::uint16_t meshIndex, std::uint32_t textureCoordinateIndex) const =0
 
virtual ConstArrayView< float > getVertexTextureCoordinateUs (std::uint16_t meshIndex) const =0
 List of all texture coordinate U values for the referenced mesh. More...
 
virtual ConstArrayView< float > getVertexTextureCoordinateVs (std::uint16_t meshIndex) const =0
 List of all texture coordinate V values for the referenced mesh. More...
 
virtual std::uint32_t getVertexNormalCount (std::uint16_t meshIndex) const =0
 Number of vertex normals in the entire mesh. More...
 
virtual Normal getVertexNormal (std::uint16_t meshIndex, std::uint32_t normalIndex) const =0
 
virtual ConstArrayView< float > getVertexNormalXs (std::uint16_t meshIndex) const =0
 List of all normal X values for the referenced mesh. More...
 
virtual ConstArrayView< float > getVertexNormalYs (std::uint16_t meshIndex) const =0
 List of all normal Y value for the referenced meshs. More...
 
virtual ConstArrayView< float > getVertexNormalZs (std::uint16_t meshIndex) const =0
 List of all normal Z values for the referenced mesh. More...
 
virtual std::uint32_t getVertexLayoutCount (std::uint16_t meshIndex) const =0
 Number of vertex layouts in the entire mesh. More...
 
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. More...
 
virtual ConstArrayView< std::uint32_t > getVertexLayoutPositionIndices (std::uint16_t meshIndex) const =0
 Position indices for each vertex of the referenced mesh. More...
 
virtual ConstArrayView< std::uint32_t > getVertexLayoutTextureCoordinateIndices (std::uint16_t meshIndex) const =0
 Texture coordinate indices for each vertex of the referenced mesh. More...
 
virtual ConstArrayView< std::uint32_t > getVertexLayoutNormalIndices (std::uint16_t meshIndex) const =0
 Normal indices for each vertex of the referenced mesh. More...
 
virtual std::uint32_t getFaceCount (std::uint16_t meshIndex) const =0
 Number of faces that belong to the specified mesh. More...
 
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. More...
 
virtual std::uint16_t getMaximumInfluencePerVertex (std::uint16_t meshIndex) const =0
 The maximum number of joints that may influence any single vertex. More...
 
virtual std::uint32_t getSkinWeightsCount (std::uint16_t meshIndex) const =0
 Number of skin weights associated with the specified mesh. More...
 
virtual ConstArrayView< float > getSkinWeightsValues (std::uint16_t meshIndex, std::uint32_t vertexIndex) const =0
 List of skin weights influencing the requested vertex. More...
 
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. More...
 
virtual std::uint16_t getBlendShapeTargetCount (std::uint16_t meshIndex) const =0
 Number of blend shapes that belong to the specified mesh. More...
 
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. More...
 
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. More...
 
virtual Delta getBlendShapeTargetDelta (std::uint16_t meshIndex, std::uint16_t blendShapeTargetIndex, std::uint32_t deltaIndex) const =0
 List of deltas for each affected vertex. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
- Public Member Functions inherited from dnac::BaseImpl
MemoryResourcegetMemoryResource ()
 
- Public Member Functions inherited from dnac::WriterImpl< dna::Writer >
 WriterImpl (MemoryResource *memRes_)
 
void setName (const char *name) override
 
void setArchetype (Archetype archetype) override
 
void setGender (Gender gender) override
 
void setAge (std::uint16_t age) override
 
void clearMetaData () override
 
void setMetaData (const char *key, const char *value) override
 
void setTranslationUnit (TranslationUnit unit) override
 
void setRotationUnit (RotationUnit unit) override
 
void setCoordinateSystem (CoordinateSystem system) override
 
void setLODCount (std::uint16_t lodCount) override
 
void setDBMaxLOD (std::uint16_t lod) override
 
void setDBComplexity (const char *name) override
 
void setDBName (const char *name) override
 
void clearGUIControlNames () override
 
void setGUIControlName (std::uint16_t index, const char *name) override
 
void clearRawControlNames () override
 
void setRawControlName (std::uint16_t index, const char *name) override
 
void clearJointNames () override
 
void setJointName (std::uint16_t index, const char *name) override
 
void clearJointIndices () override
 
void setJointIndices (std::uint16_t index, const std::uint16_t *jointIndices, std::uint16_t count) override
 
void clearLODJointMappings () override
 
void setLODJointMapping (std::uint16_t lod, std::uint16_t index) override
 
void clearBlendShapeChannelNames () override
 
void setJointHierarchy (const std::uint16_t *jointIndices, std::uint16_t count) override
 
void setBlendShapeChannelName (std::uint16_t index, const char *name) override
 
void clearBlendShapeChannelIndices () override
 
void setBlendShapeChannelIndices (std::uint16_t index, const std::uint16_t *blendShapeChannelIndices, std::uint16_t count) override
 
void clearLODBlendShapeChannelMappings () override
 
void setLODBlendShapeChannelMapping (std::uint16_t lod, std::uint16_t index) override
 
void clearAnimatedMapNames () override
 
void setAnimatedMapName (std::uint16_t index, const char *name) override
 
void clearAnimatedMapIndices () override
 
void setAnimatedMapIndices (std::uint16_t index, const std::uint16_t *animatedMapIndices, std::uint16_t count) override
 
void clearLODAnimatedMapMappings () override
 
void setLODAnimatedMapMapping (std::uint16_t lod, std::uint16_t index) override
 
void clearMeshNames () override
 
void setMeshName (std::uint16_t index, const char *name) override
 
void clearMeshIndices () override
 
void setMeshIndices (std::uint16_t index, const std::uint16_t *meshIndices, std::uint16_t count) override
 
void clearLODMeshMappings () override
 
void setLODMeshMapping (std::uint16_t lod, std::uint16_t index) override
 
void clearMeshBlendShapeChannelMappings () override
 
void setMeshBlendShapeChannelMapping (std::uint32_t index, std::uint16_t meshIndex, std::uint16_t blendShapeChannelIndex) override
 
void setNeutralJointTranslations (const Vector3 *translations, std::uint16_t count) override
 
void setNeutralJointRotations (const Vector3 *rotations, std::uint16_t count) override
 
void setGUIToRawInputIndices (const std::uint16_t *inputIndices, std::uint16_t count) override
 
void setGUIToRawOutputIndices (const std::uint16_t *outputIndices, std::uint16_t count) override
 
void setGUIToRawFromValues (const float *fromValues, std::uint16_t count) override
 
void setGUIToRawToValues (const float *toValues, std::uint16_t count) override
 
void setGUIToRawSlopeValues (const float *slopeValues, std::uint16_t count) override
 
void setGUIToRawCutValues (const float *cutValues, std::uint16_t count) override
 
void setPSDCount (std::uint16_t count) override
 
void setPSDRowIndices (const std::uint16_t *rowIndices, std::uint16_t count) override
 
void setPSDColumnIndices (const std::uint16_t *columnIndices, std::uint16_t count) override
 
void setPSDValues (const float *weights, std::uint16_t count) override
 
void setJointRowCount (std::uint16_t rowCount) override
 
void setJointColumnCount (std::uint16_t columnCount) override
 
void clearJointGroups () override
 
void deleteJointGroup (std::uint16_t jointGroupIndex) override
 
void setJointGroupLODs (std::uint16_t jointGroupIndex, const std::uint16_t *lods, std::uint16_t count) override
 
void setJointGroupInputIndices (std::uint16_t jointGroupIndex, const std::uint16_t *inputIndices, std::uint16_t count) override
 
void setJointGroupOutputIndices (std::uint16_t jointGroupIndex, const std::uint16_t *outputIndices, std::uint16_t count) override
 
void setJointGroupValues (std::uint16_t jointGroupIndex, const float *values, std::uint32_t count) override
 
void setJointGroupJointIndices (std::uint16_t jointGroupIndex, const std::uint16_t *jointIndices, std::uint16_t count) override
 
void setBlendShapeChannelLODs (const std::uint16_t *lods, std::uint16_t count) override
 
void setBlendShapeChannelInputIndices (const std::uint16_t *inputIndices, std::uint16_t count) override
 
void setBlendShapeChannelOutputIndices (const std::uint16_t *outputIndices, std::uint16_t count) override
 
void setAnimatedMapLODs (const std::uint16_t *lods, std::uint16_t count) override
 
void setAnimatedMapInputIndices (const std::uint16_t *inputIndices, std::uint16_t count) override
 
void setAnimatedMapOutputIndices (const std::uint16_t *outputIndices, std::uint16_t count) override
 
void setAnimatedMapFromValues (const float *fromValues, std::uint16_t count) override
 
void setAnimatedMapToValues (const float *toValues, std::uint16_t count) override
 
void setAnimatedMapSlopeValues (const float *slopeValues, std::uint16_t count) override
 
void setAnimatedMapCutValues (const float *cutValues, std::uint16_t count) override
 
void clearMeshes () override
 
void deleteMesh (std::uint16_t meshIndex) override
 
void setVertexPositions (std::uint16_t meshIndex, const Position *positions, std::uint32_t count) override
 
void setVertexTextureCoordinates (std::uint16_t meshIndex, const TextureCoordinate *textureCoordinates, std::uint32_t count) override
 
void setVertexNormals (std::uint16_t meshIndex, const Normal *normals, std::uint32_t count) override
 
void setVertexLayouts (std::uint16_t meshIndex, const VertexLayout *layouts, std::uint32_t count) override
 
void clearFaceVertexLayoutIndices (std::uint16_t meshIndex) override
 
void setFaceVertexLayoutIndices (std::uint16_t meshIndex, std::uint32_t faceIndex, const std::uint32_t *layoutIndices, std::uint32_t count) override
 
void setMaximumInfluencePerVertex (std::uint16_t meshIndex, std::uint16_t maxInfluenceCount) override
 
void clearSkinWeights (std::uint16_t meshIndex) override
 
void setSkinWeightsValues (std::uint16_t meshIndex, std::uint32_t vertexIndex, const float *weights, std::uint16_t count) override
 
void setSkinWeightsJointIndices (std::uint16_t meshIndex, std::uint32_t vertexIndex, const std::uint16_t *jointIndices, std::uint16_t count) override
 
void clearBlendShapeTargets (std::uint16_t meshIndex) override
 
void setBlendShapeChannelIndex (std::uint16_t meshIndex, std::uint16_t blendShapeTargetIndex, std::uint16_t blendShapeChannelIndex) override
 
void setBlendShapeTargetDeltas (std::uint16_t meshIndex, std::uint16_t blendShapeTargetIndex, const Delta *deltas, std::uint32_t count) override
 
void setBlendShapeTargetVertexIndices (std::uint16_t meshIndex, std::uint16_t blendShapeTargetIndex, const std::uint32_t *vertexIndices, std::uint32_t count) override
 
- Public Member Functions inherited from dna::Writer
 ~Writer () override
 
void setFrom (const Reader *source, DataLayer layer=DataLayer::All, MemoryResource *memRes=nullptr)
 Initialize the Writer from the given Reader. More...
 
virtual void setGUIToRawInputIndices (const std::uint16_t *inputIndices, std::uint16_t count)=0
 Input indices used for mapping gui to raw controls. More...
 
virtual void setGUIToRawOutputIndices (const std::uint16_t *outputIndices, std::uint16_t count)=0
 Output indices used for mapping gui to raw controls. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
virtual void setPSDCount (std::uint16_t count)=0
 The number of distinct PSD expressions. More...
 
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. More...
 
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. More...
 
virtual void setPSDValues (const float *weights, std::uint16_t count)=0
 Weights associated with each PSD row and column pair. More...
 
virtual void setJointRowCount (std::uint16_t rowCount)=0
 Number of rows in the entire, uncompressed joint matrix. More...
 
virtual void setJointColumnCount (std::uint16_t columnCount)=0
 Number of columns in the entire, uncompressed joint matrix. More...
 
virtual void clearJointGroups ()=0
 Delete all joint groups. More...
 
virtual void deleteJointGroup (std::uint16_t jointGroupIndex)=0
 Delete the specified joint group. More...
 
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. More...
 
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. More...
 
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. More...
 
virtual void setJointGroupValues (std::uint16_t jointGroupIndex, const float *values, std::uint32_t count)=0
 Values that the specified joint group contains. More...
 
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. More...
 
virtual void setBlendShapeChannelLODs (const std::uint16_t *lods, std::uint16_t count)=0
 Input index count per each level of detail for blend shapes. More...
 
virtual void setBlendShapeChannelInputIndices (const std::uint16_t *inputIndices, std::uint16_t count)=0
 Input indices used to index into the input vector. More...
 
virtual void setBlendShapeChannelOutputIndices (const std::uint16_t *outputIndices, std::uint16_t count)=0
 Output indices specify the positions of blend shape output values. More...
 
virtual void setAnimatedMapLODs (const std::uint16_t *lods, std::uint16_t count)=0
 Row count per each level of detail for animated maps. More...
 
virtual void setAnimatedMapInputIndices (const std::uint16_t *inputIndices, std::uint16_t count)=0
 Input indices used to index into the array of input values. More...
 
virtual void setAnimatedMapOutputIndices (const std::uint16_t *outputIndices, std::uint16_t count)=0
 Output indices that specify the computed output value's position. More...
 
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. More...
 
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. More...
 
virtual void setAnimatedMapSlopeValues (const float *slopeValues, std::uint16_t count)=0
 Computational values(slope/gradient) used for calculating the output value. More...
 
virtual void setAnimatedMapCutValues (const float *cutValues, std::uint16_t count)=0
 Computational values(vertical intercept) used for calculating the output value. More...
 
virtual void clearGUIControlNames ()=0
 Delete all stored GUI control names. More...
 
virtual void setGUIControlName (std::uint16_t index, const char *name)=0
 Name of the specified GUI control. More...
 
virtual void clearRawControlNames ()=0
 Delete all stored raw control names. More...
 
virtual void setRawControlName (std::uint16_t index, const char *name)=0
 Name of the specified raw control. More...
 
virtual void clearJointNames ()=0
 Delete all stored joint names. More...
 
virtual void setJointName (std::uint16_t index, const char *name)=0
 Name of the specified joint. More...
 
virtual void clearJointIndices ()=0
 Delete all stored joint indices. More...
 
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. More...
 
virtual void clearLODJointMappings ()=0
 Delete all stored LOD to joint list index mapping entries. More...
 
virtual void setLODJointMapping (std::uint16_t lod, std::uint16_t index)=0
 Set which joints belong to which level of detail. More...
 
virtual void clearBlendShapeChannelNames ()=0
 Delete all stored blend shape channel names. More...
 
virtual void setBlendShapeChannelName (std::uint16_t index, const char *name)=0
 Name of the specified blend shape channel. More...
 
virtual void clearBlendShapeChannelIndices ()=0
 Delete all stored blend shape channel indices. More...
 
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. More...
 
virtual void clearLODBlendShapeChannelMappings ()=0
 Delete all stored LOD to blend shape channel list index mapping entries. More...
 
virtual void setLODBlendShapeChannelMapping (std::uint16_t lod, std::uint16_t index)=0
 Set which blend shape channels belong to which level of detail. More...
 
virtual void clearAnimatedMapNames ()=0
 Delete all stored animated map names. More...
 
virtual void setAnimatedMapName (std::uint16_t index, const char *name)=0
 Name of the specified animated map. More...
 
virtual void clearAnimatedMapIndices ()=0
 Delete all stored animated map indices. More...
 
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. More...
 
virtual void clearLODAnimatedMapMappings ()=0
 Delete all stored LOD to animated map list index mapping entries. More...
 
virtual void setLODAnimatedMapMapping (std::uint16_t lod, std::uint16_t index)=0
 Set which animated maps belong to which level of detail. More...
 
virtual void clearMeshNames ()=0
 Delete all stored mesh names. More...
 
virtual void setMeshName (std::uint16_t index, const char *name)=0
 Name of the specified mesh. More...
 
virtual void clearMeshIndices ()=0
 Delete all stored mesh indices. More...
 
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. More...
 
virtual void clearLODMeshMappings ()=0
 Delete all stored LOD to mesh list index mapping entries. More...
 
virtual void setLODMeshMapping (std::uint16_t lod, std::uint16_t index)=0
 Set which meshes belong to which level of detail. More...
 
virtual void clearMeshBlendShapeChannelMappings ()=0
 Delete all stored mesh to blend shape channel mapping entries. More...
 
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. More...
 
virtual void setJointHierarchy (const std::uint16_t *jointIndices, std::uint16_t count)=0
 A simple array describing the parent-child relationships between joints. More...
 
virtual void setNeutralJointTranslations (const Vector3 *translations, std::uint16_t count)=0
 
virtual void setNeutralJointRotations (const Vector3 *rotations, std::uint16_t count)=0
 
- Public Member Functions inherited from dna::DescriptorWriter
virtual void setName (const char *name)=0
 
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. More...
 
virtual void setMetaData (const char *key, const char *value)=0
 Associate the metadata value with the given key. More...
 
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). More...
 
virtual void setDBMaxLOD (std::uint16_t lod)=0
 The maximum level of detail stored in the DNA data for this character. More...
 
virtual void setDBComplexity (const char *name)=0
 Name of the input control interface used to drive this character rig. More...
 
virtual void setDBName (const char *name)=0
 Name of the database from which the character originates. More...
 
- Public Member Functions inherited from dna::GeometryWriter
virtual void clearMeshes ()=0
 Delete all meshes. More...
 
virtual void deleteMesh (std::uint16_t meshIndex)=0
 Delete the specified mesh. More...
 
virtual void setVertexPositions (std::uint16_t meshIndex, const Position *positions, std::uint32_t count)=0
 List of vertex positions. More...
 
virtual void setVertexTextureCoordinates (std::uint16_t meshIndex, const TextureCoordinate *textureCoordinates, std::uint32_t count)=0
 List of vertex texture coordinates. More...
 
virtual void setVertexNormals (std::uint16_t meshIndex, const Normal *normals, std::uint32_t count)=0
 List of vertex normals. More...
 
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. More...
 
virtual void clearFaceVertexLayoutIndices (std::uint16_t meshIndex)=0
 Delete all lists of vertex layout indices for the specified mesh. More...
 
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. More...
 
virtual void setMaximumInfluencePerVertex (std::uint16_t meshIndex, std::uint16_t maxInfluenceCount)=0
 
virtual void clearSkinWeights (std::uint16_t meshIndex)=0
 Delete all skin weights for the specified mesh. More...
 
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. More...
 
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. More...
 
virtual void clearBlendShapeTargets (std::uint16_t meshIndex)=0
 Delete all blend shape targets for the specified mesh. More...
 
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. More...
 
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. More...
 
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. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from dnac::DNACalibDNAReader
static DNACalibDNAReadercreate (MemoryResource *memRes=nullptr)
 
static DNACalibDNAReadercreate (const dna::Reader *reader, MemoryResource *memRes=nullptr)
 
static void destroy (DNACalibDNAReader *instance)
 
- Protected Member Functions inherited from dnac::DNACalibDNAReader
virtual ~DNACalibDNAReader ()
 
- Protected Member Functions inherited from dna::BehaviorReader
virtual ~BehaviorReader ()
 
- Protected Member Functions inherited from dna::DefinitionReader
virtual ~DefinitionReader ()
 
- Protected Member Functions inherited from dna::DescriptorReader
virtual ~DescriptorReader ()
 
- Protected Member Functions inherited from dna::GeometryReader
virtual ~GeometryReader ()
 
- Protected Member Functions inherited from dnac::BaseImpl
 BaseImpl (MemoryResource *memRes_)
 
 ~BaseImpl ()=default
 
 BaseImpl (const BaseImpl &)=delete
 
BaseImploperator= (const BaseImpl &)=delete
 
 BaseImpl (BaseImpl &&rhs)=delete
 
BaseImploperator= (BaseImpl &&)=delete
 
- Protected Member Functions inherited from dna::BehaviorWriter
virtual ~BehaviorWriter ()
 
- Protected Member Functions inherited from dna::DefinitionWriter
virtual ~DefinitionWriter ()
 
- Protected Member Functions inherited from dna::DescriptorWriter
virtual ~DescriptorWriter ()
 
- Protected Member Functions inherited from dna::GeometryWriter
virtual ~GeometryWriter ()
 
- Protected Attributes inherited from dnac::ReaderImpl< DNACalibDNAReader >
DenormalizedData< DNACalibDNAReadercache
 
- Protected Attributes inherited from dnac::BaseImpl
MemoryResourcememRes
 
DNA dna
 

Constructor & Destructor Documentation

◆ DNACalibDNAReaderImpl() [1/3]

dnac::DNACalibDNAReaderImpl::DNACalibDNAReaderImpl ( MemoryResource memRes_)
explicit
36 :
37 BaseImpl{memRes_},
38 ReaderImpl{memRes_},
39 WriterImpl{memRes_} {
40}
BaseImpl(MemoryResource *memRes_)
Definition: dnacalib/dna/BaseImpl.h:12
ReaderImpl(MemoryResource *memRes_)
Definition: dnacalib/dna/ReaderImpl.h:176
WriterImpl(MemoryResource *memRes_)
Definition: dnacalib/dna/WriterImpl.h:166

◆ ~DNACalibDNAReaderImpl()

dnac::DNACalibDNAReaderImpl::~DNACalibDNAReaderImpl ( )
virtualdefault

◆ DNACalibDNAReaderImpl() [2/3]

dnac::DNACalibDNAReaderImpl::DNACalibDNAReaderImpl ( const DNACalibDNAReaderImpl )
delete

◆ DNACalibDNAReaderImpl() [3/3]

dnac::DNACalibDNAReaderImpl::DNACalibDNAReaderImpl ( DNACalibDNAReaderImpl &&  )
delete

Member Function Documentation

◆ operator=() [1/2]

DNACalibDNAReaderImpl & dnac::DNACalibDNAReaderImpl::operator= ( const DNACalibDNAReaderImpl )
delete

◆ operator=() [2/2]

DNACalibDNAReaderImpl & dnac::DNACalibDNAReaderImpl::operator= ( DNACalibDNAReaderImpl &&  )
delete

◆ pruneBlendShapeTargets()

void dnac::DNACalibDNAReaderImpl::pruneBlendShapeTargets ( float  threshold)
140 {
141 const float threshold2 = threshold * threshold;
142 for (auto& mesh : dna.geometry.meshes) {
143 for (auto& bst : mesh.blendShapeTargets) {
144 std::size_t di{};
145 for (std::size_t si{}; si < bst.deltas.size(); ++si) {
146 const float magnitude2 = (bst.deltas.xs[si] * bst.deltas.xs[si]) +
147 (bst.deltas.ys[si] * bst.deltas.ys[si]) +
148 (bst.deltas.zs[si] * bst.deltas.zs[si]);
149 if (magnitude2 > threshold2) {
150 bst.deltas.xs[di] = bst.deltas.xs[si];
151 bst.deltas.ys[di] = bst.deltas.ys[si];
152 bst.deltas.zs[di] = bst.deltas.zs[si];
153 bst.vertexIndices[di] = bst.vertexIndices[si];
154 ++di;
155 }
156 }
157 bst.deltas.resize(di);
158 bst.vertexIndices.resize(di);
159 }
160 }
161}
Definition: BinaryStreamReader.h:10

Referenced by dnac::PruneBlendShapeTargetsCommand::Impl::run().

◆ removeAnimatedMaps()

void dnac::DNACalibDNAReaderImpl::removeAnimatedMaps ( ConstArrayView< std::uint16_t >  animatedMapIndices)
262 {
263 // Keep track of animated map indices per LOD before filtering and remapping
264 Matrix<std::uint16_t> lodIndices{dna.definition.lodAnimatedMapMapping.getLODCount(), Vector<std::uint16_t>{memRes}, memRes};
265 for (std::uint16_t lodIndex = 0; lodIndex < static_cast<std::uint16_t>(lodIndices.size()); ++lodIndex) {
266 const auto& indices = dna.definition.lodAnimatedMapMapping.getIndices(lodIndex);
267 lodIndices[lodIndex].assign(indices.begin(), indices.end());
268 }
269 // Filter and remap animated map names and indices
270 dna.definition.lodAnimatedMapMapping.filterIndices([animatedMapIndices](std::uint16_t value) {
271 return (!extd::contains(animatedMapIndices, value));
272 });
273
274 // Collect all distinct element position indices that are referenced by the present LODs
275 UnorderedSet<std::uint16_t> allowedAnimatedMapIndices =
276 dna.definition.lodAnimatedMapMapping.getCombinedDistinctIndices(memRes);
277
278 AnimatedMapFilter animatedMapFilter{memRes};
279 animatedMapFilter.configure(static_cast<std::uint16_t>(dna.definition.animatedMapNames.size()),
280 std::move(allowedAnimatedMapIndices), std::move(lodIndices));
281 animatedMapFilter.apply(dna.definition);
282 animatedMapFilter.apply(dna.behavior);
283}
MemoryResource * memRes
Definition: dnacalib/dna/BaseImpl.h:31
bool contains(TInputIterator first, TInputIterator last, const T &value)
Definition: utils/Extd.h:40

References extd::contains(), and dnac::BaseImpl::memRes.

Referenced by dnac::RemoveAnimatedMapCommand::Impl::run().

◆ removeBlendShapes()

void dnac::DNACalibDNAReaderImpl::removeBlendShapes ( ConstArrayView< std::uint16_t >  blendShapeIndices)
234 {
235 // Filter blend shapes from LOD blend shape mapping
236 dna.definition.lodBlendShapeMapping.filterIndices([blendShapeIndices](std::uint16_t value) {
237 return (!extd::contains(blendShapeIndices, value));
238 });
239
240 Vector<std::uint16_t> blendShapeLODs{dna.definition.lodBlendShapeMapping.getLODCount(), 0u, memRes};
241 for (std::uint16_t lodIndex = 0; lodIndex < blendShapeLODs.size(); ++lodIndex) {
242 blendShapeLODs[lodIndex] = static_cast<std::uint16_t>(dna.definition.lodBlendShapeMapping.getIndices(lodIndex).size());
243 }
244
245 UnorderedSet<std::uint16_t> allowedBlendShapeIndices = dna.definition.lodBlendShapeMapping.getCombinedDistinctIndices(memRes);
246 BlendShapeFilter blendShapeFilter{memRes};
247 blendShapeFilter.configure(static_cast<std::uint16_t>(dna.definition.blendShapeChannelNames.size()),
248 std::move(allowedBlendShapeIndices), std::move(blendShapeLODs));
249
250 // Remove blend shape from definition
251 blendShapeFilter.apply(dna.definition);
252
253 // Remove blend shape from behavior
254 blendShapeFilter.apply(dna.behavior);
255
256 // Remove blend shape from geometry
257 for (auto& mesh : dna.geometry.meshes) {
258 blendShapeFilter.apply(mesh);
259 }
260}

References extd::contains(), and dnac::BaseImpl::memRes.

Referenced by dnac::RemoveBlendShapeCommand::Impl::run().

◆ removeJointAnimations()

void dnac::DNACalibDNAReaderImpl::removeJointAnimations ( ConstArrayView< std::uint16_t >  jointIndex)
221 {
222 UnorderedSet<std::uint16_t> allowedJointIndices = dna.definition.lodJointMapping.getCombinedDistinctIndices(memRes);
223 for (const auto jointIndex : jointIndices) {
224 allowedJointIndices.erase(jointIndex);
225 }
226
227 JointFilter jointFilter{memRes};
228 jointFilter.configure(static_cast<std::uint16_t>(dna.definition.jointNames.size()),
229 std::move(allowedJointIndices),
231 jointFilter.apply(dna.behavior);
232}

References dnac::JointFilter::AnimationOnly, and dnac::BaseImpl::memRes.

Referenced by dnac::RemoveJointAnimationCommand::Impl::run().

◆ removeJoints()

void dnac::DNACalibDNAReaderImpl::removeJoints ( ConstArrayView< std::uint16_t >  jointIndices)
184 {
185 // To find joints that are not in any LOD, find the joints that are not in LOD 0 (the current max LOD, at index 0), as it
186 // contains joints from all lower LODs.
187 Vector<std::uint16_t> jointsNotInLOD0{memRes};
188 const auto jointIndicesForLOD0 = dna.definition.lodJointMapping.getIndices(0);
189 for (std::uint16_t idx = 0; idx < dna.definition.jointNames.size(); ++idx) {
190 if (extd::contains(jointIndices, idx)) {
191 // Do not add the joint to remove.
192 continue;
193 }
194 if (std::find(jointIndicesForLOD0.begin(), jointIndicesForLOD0.end(), idx) == jointIndicesForLOD0.end()) {
195 jointsNotInLOD0.push_back(idx);
196 }
197 }
198 // Filter and remap joint names and indices
199 dna.definition.lodJointMapping.filterIndices([jointIndices](std::uint16_t value) {
200 return (!extd::contains(jointIndices, value));
201 });
202 // Collect all distinct element position indices that are referenced by the present LODs
203 UnorderedSet<std::uint16_t> allowedJointIndices = dna.definition.lodJointMapping.getCombinedDistinctIndices(memRes);
204
205 // In order to keep joints that are not in any LOD, add them to the list of joints to keep when filtering.
206 allowedJointIndices.insert(jointsNotInLOD0.begin(), jointsNotInLOD0.end());
207
208 JointFilter jointFilter{memRes};
209 jointFilter.configure(static_cast<std::uint16_t>(dna.definition.jointNames.size()), std::move(allowedJointIndices));
210 jointFilter.apply(dna.definition);
211 // Filter and remap related joint behavior data
212 jointFilter.apply(dna.behavior);
213 // Remove skin weights related to this joint and normalize them
214 for (auto& mesh : dna.geometry.meshes) {
215 for (auto& skinWeights : mesh.skinWeights) {
216 jointFilter.apply(skinWeights);
217 }
218 }
219}

References extd::contains(), and dnac::BaseImpl::memRes.

Referenced by dnac::RemoveJointCommand::Impl::run().

◆ removeMeshes()

void dnac::DNACalibDNAReaderImpl::removeMeshes ( ConstArrayView< std::uint16_t >  meshIndices)
163 {
164 // Filter and remap mesh names and indices
165 dna.definition.lodMeshMapping.filterIndices([meshIndices](std::uint16_t value) {
166 return (!extd::contains(meshIndices, value));
167 });
168
169 // Collect all distinct element position indices that are referenced by the present LODs
170 UnorderedSet<std::uint16_t> allowedMeshIndices = dna.definition.lodMeshMapping.getCombinedDistinctIndices(memRes);
171
172 MeshFilter meshFilter{memRes};
173 meshFilter.configure(static_cast<std::uint16_t>(dna.definition.meshNames.size()), std::move(allowedMeshIndices));
174 meshFilter.apply(dna.definition);
175 // Remove mesh geometry
176 extd::filter(dna.geometry.meshes, [&meshFilter](const RawMesh& /*unused*/, std::size_t index) {
177 return meshFilter.passes(static_cast<std::uint16_t>(index));
178 });
179 // Repopulate cache of (mesh, blend shape) mapping per LOD
181 cache.populate(this);
182}
void reset()
Definition: dnacalib/dna/LODMapping.cpp:40
DenormalizedData< DNACalibDNAReader > cache
Definition: dnacalib/dna/ReaderImpl.h:166
void filter(std::vector< T, Args... > &source, Predicate pred)
Definition: utils/Extd.h:55
void populate(const Reader *source)
Definition: dnacalib/dna/DenormalizedData.h:24
LODMapping meshBlendShapeMappingIndices
Definition: dnacalib/dna/DenormalizedData.h:17

References dnac::ReaderImpl< DNACalibDNAReader >::cache, extd::contains(), extd::filter(), dnac::BaseImpl::memRes, dnac::DenormalizedData< Reader >::meshBlendShapeMappingIndices, dnac::DenormalizedData< Reader >::populate(), and dnac::LODMapping::reset().

Referenced by dnac::RemoveMeshCommand::Impl::run().

◆ setBlendShapeTargetDeltas() [1/2]

void dnac::DNACalibDNAReaderImpl::setBlendShapeTargetDeltas ( std::uint16_t  meshIndex,
std::uint16_t  blendShapeTargetIndex,
ConstArrayView< float >  xs,
ConstArrayView< float >  ys,
ConstArrayView< float >  zs 
)
115 {
116 ensureHasSize(dna.geometry.meshes, meshIndex + 1ul, memRes);
117 ensureHasSize(dna.geometry.meshes[meshIndex].blendShapeTargets, blendShapeTargetIndex + 1ul, memRes);
118 dna.geometry.meshes[meshIndex].blendShapeTargets[blendShapeTargetIndex].deltas.xs.assign(xs.begin(), xs.end());
119 dna.geometry.meshes[meshIndex].blendShapeTargets[blendShapeTargetIndex].deltas.ys.assign(ys.begin(), ys.end());
120 dna.geometry.meshes[meshIndex].blendShapeTargets[blendShapeTargetIndex].deltas.zs.assign(zs.begin(), zs.end());
121}
void ensureHasSize(TContainer &target, std::size_t size, Args &&... args)
Definition: dnacalib/dna/WriterImpl.h:24

References trust::ArrayView< T >::begin(), trust::ArrayView< T >::end(), dnac::ensureHasSize(), and dnac::BaseImpl::memRes.

Referenced by dnac::SetBlendShapeTargetDeltasCommand::Impl::computeBlendShapeTargetDeltas(), dnac::RotateCommand::Impl::rotateBlendShapeTargetDeltas(), and dnac::ScaleCommand::Impl::scaleBlendShapeTargetDeltas().

◆ setBlendShapeTargetDeltas() [2/2]

void dnac::DNACalibDNAReaderImpl::setBlendShapeTargetDeltas ( std::uint16_t  meshIndex,
std::uint16_t  blendShapeTargetIndex,
RawVector3Vector &&  deltas 
)
125 {
126 ensureHasSize(dna.geometry.meshes, meshIndex + 1ul, memRes);
127 ensureHasSize(dna.geometry.meshes[meshIndex].blendShapeTargets, blendShapeTargetIndex + 1ul, memRes);
128 dna.geometry.meshes[meshIndex].blendShapeTargets[blendShapeTargetIndex].deltas = std::move(deltas);
129}

References dnac::ensureHasSize(), and dnac::BaseImpl::memRes.

◆ setBlendShapeTargetVertexIndices()

void dnac::DNACalibDNAReaderImpl::setBlendShapeTargetVertexIndices ( std::uint16_t  meshIndex,
std::uint16_t  blendShapeTargetIndex,
ConstArrayView< std::uint32_t >  vertexIndices 
)
133 {
134 ensureHasSize(dna.geometry.meshes, meshIndex + 1ul, memRes);
135 ensureHasSize(dna.geometry.meshes[meshIndex].blendShapeTargets, blendShapeTargetIndex + 1ul, memRes);
136 dna.geometry.meshes[meshIndex].blendShapeTargets[blendShapeTargetIndex].vertexIndices.assign(vertexIndices.begin(),
137 vertexIndices.end());
138}

References trust::ArrayView< T >::begin(), trust::ArrayView< T >::end(), dnac::ensureHasSize(), and dnac::BaseImpl::memRes.

Referenced by dnac::SetBlendShapeTargetDeltasCommand::Impl::computeBlendShapeTargetDeltas().

◆ setJointGroupValues()

void dnac::DNACalibDNAReaderImpl::setJointGroupValues ( std::uint16_t  jointGroupIndex,
AlignedDynArray< float > &&  values 
)
91 {
92 ensureHasSize(dna.behavior.joints.jointGroups, jointGroupIndex + 1ul, memRes);
93 dna.behavior.joints.jointGroups[jointGroupIndex].values = std::move(values);
94}

References dnac::ensureHasSize(), and dnac::BaseImpl::memRes.

Referenced by dnac::ScaleCommand::Impl::scaleJointBehavior().

◆ setLODCount()

void dnac::DNACalibDNAReaderImpl::setLODCount ( std::uint16_t  lodCount)
virtual

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
lodCountThe number of levels available.

Implements dna::DescriptorWriter.

42 {
43 dna.descriptor.lodCount = lodCount;
44}

◆ setNeutralJointRotation()

void dnac::DNACalibDNAReaderImpl::setNeutralJointRotation ( std::uint16_t  index,
const Vector3 rotation 
)
80 {
81 if (index >= dna.definition.neutralJointTranslations.size()) {
82 dna.definition.neutralJointRotations.xs.resize(index + 1ul, 0.0f);
83 dna.definition.neutralJointRotations.ys.resize(index + 1ul, 0.0f);
84 dna.definition.neutralJointRotations.zs.resize(index + 1ul, 0.0f);
85 }
86 dna.definition.neutralJointRotations.xs[index] = rotation.x;
87 dna.definition.neutralJointRotations.ys[index] = rotation.y;
88 dna.definition.neutralJointRotations.zs[index] = rotation.z;
89}

References dna::Vector3::x, dna::Vector3::y, and dna::Vector3::z.

Referenced by dnac::RotateCommand::Impl::rotateNeutralJoints().

◆ setNeutralJointRotations() [1/2]

void dnac::DNACalibDNAReaderImpl::setNeutralJointRotations ( ConstArrayView< float >  xs,
ConstArrayView< float >  ys,
ConstArrayView< float >  zs 
)
70 {
71 dna.definition.neutralJointRotations.xs.assign(xs.begin(), xs.end());
72 dna.definition.neutralJointRotations.ys.assign(ys.begin(), ys.end());
73 dna.definition.neutralJointRotations.zs.assign(zs.begin(), zs.end());
74}

References trust::ArrayView< T >::begin(), and trust::ArrayView< T >::end().

Referenced by dnac::SetNeutralJointRotationsCommand::Impl::run().

◆ setNeutralJointRotations() [2/2]

void dnac::DNACalibDNAReaderImpl::setNeutralJointRotations ( RawVector3Vector &&  rotations)
76 {
77 dna.definition.neutralJointRotations = std::move(rotations);
78}

◆ setNeutralJointTranslation()

void dnac::DNACalibDNAReaderImpl::setNeutralJointTranslation ( std::uint16_t  index,
const Vector3 translation 
)
58 {
59 if (index >= dna.definition.neutralJointTranslations.size()) {
60 dna.definition.neutralJointTranslations.xs.resize(index + 1ul, 0.0f);
61 dna.definition.neutralJointTranslations.ys.resize(index + 1ul, 0.0f);
62 dna.definition.neutralJointTranslations.zs.resize(index + 1ul, 0.0f);
63 }
64 dna.definition.neutralJointTranslations.xs[index] = translation.x;
65 dna.definition.neutralJointTranslations.ys[index] = translation.y;
66 dna.definition.neutralJointTranslations.zs[index] = translation.z;
67}

References dna::Vector3::x, dna::Vector3::y, and dna::Vector3::z.

Referenced by dnac::RotateCommand::Impl::rotateNeutralJoints(), and dnac::TranslateCommand::Impl::translateNeutralJoints().

◆ setNeutralJointTranslations() [1/2]

void dnac::DNACalibDNAReaderImpl::setNeutralJointTranslations ( ConstArrayView< float >  xs,
ConstArrayView< float >  ys,
ConstArrayView< float >  zs 
)
48 {
49 dna.definition.neutralJointTranslations.xs.assign(xs.begin(), xs.end());
50 dna.definition.neutralJointTranslations.ys.assign(ys.begin(), ys.end());
51 dna.definition.neutralJointTranslations.zs.assign(zs.begin(), zs.end());
52}

References trust::ArrayView< T >::begin(), and trust::ArrayView< T >::end().

Referenced by dnac::SetNeutralJointTranslationsCommand::Impl::run(), and dnac::ScaleCommand::Impl::scaleNeutralJoints().

◆ setNeutralJointTranslations() [2/2]

void dnac::DNACalibDNAReaderImpl::setNeutralJointTranslations ( RawVector3Vector &&  translations)
54 {
55 dna.definition.neutralJointTranslations = std::move(translations);
56}

◆ setVertexPositions() [1/2]

void dnac::DNACalibDNAReaderImpl::setVertexPositions ( std::uint16_t  meshIndex,
ConstArrayView< float >  xs,
ConstArrayView< float >  ys,
ConstArrayView< float >  zs 
)
99 {
100 ensureHasSize(dna.geometry.meshes, meshIndex + 1ul, memRes);
101 dna.geometry.meshes[meshIndex].positions.xs.assign(xs.begin(), xs.end());
102 dna.geometry.meshes[meshIndex].positions.ys.assign(ys.begin(), ys.end());
103 dna.geometry.meshes[meshIndex].positions.zs.assign(zs.begin(), zs.end());
104}

References trust::ArrayView< T >::begin(), trust::ArrayView< T >::end(), dnac::ensureHasSize(), and dnac::BaseImpl::memRes.

Referenced by dnac::SetVertexPositionsCommand::Impl::computeVertexPositions(), dnac::RotateCommand::Impl::rotateVertexPositions(), dnac::CalculateMeshLowerLODsCommand::Impl::run(), dnac::ScaleCommand::Impl::scaleVertexPositions(), and dnac::TranslateCommand::Impl::translateVertexPositions().

◆ setVertexPositions() [2/2]

void dnac::DNACalibDNAReaderImpl::setVertexPositions ( std::uint16_t  meshIndex,
RawVector3Vector &&  positions 
)
106 {
107 ensureHasSize(dna.geometry.meshes, meshIndex + 1ul, memRes);
108 dna.geometry.meshes[meshIndex].positions = std::move(positions);
109}

References dnac::ensureHasSize(), and dnac::BaseImpl::memRes.


The documentation for this class was generated from the following files: