DNA Calib 1.1
Project brief
Public Member Functions | Protected Member Functions | List of all members
dna::DefinitionReader Class Referenceabstract

Read-only accessors for DNA attributes that represent the rig's static data. More...

#include <DefinitionReader.h>

Inheritance diagram for dna::DefinitionReader:
Inheritance graph
Collaboration diagram for dna::DefinitionReader:
Collaboration graph

Public Member Functions

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...
 
- Public Member Functions inherited from dna::DescriptorReader
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...
 

Protected Member Functions

virtual ~DefinitionReader ()
 
- Protected Member Functions inherited from dna::DescriptorReader
virtual ~DescriptorReader ()
 

Detailed Description

Read-only accessors for DNA attributes that represent the rig's static data.

Warning
Implementors should inherit from Reader itself and not this class.
See also
Reader

Constructor & Destructor Documentation

◆ ~DefinitionReader()

dna::DefinitionReader::~DefinitionReader ( )
protectedvirtualdefault

Member Function Documentation

◆ getAnimatedMapCount()

virtual std::uint16_t dna::DefinitionReader::getAnimatedMapCount ( ) const
pure virtual

◆ getAnimatedMapIndexListCount()

virtual std::uint16_t dna::DefinitionReader::getAnimatedMapIndexListCount ( ) const
pure virtual

Number of animated map index lists.

Note
This value is useful only in the context of DefinitionWriter.

Implemented in dna::ReaderImpl< BinaryStreamReader >, dna::ReaderImpl< JSONStreamReader >, and dnac::ReaderImpl< DNACalibDNAReader >.

◆ getAnimatedMapIndicesForLOD()

virtual ConstArrayView< std::uint16_t > dna::DefinitionReader::getAnimatedMapIndicesForLOD ( std::uint16_t  lod) const
pure virtual

List of animated map indices for the specified LOD.

Parameters
lodThe level of detail which animated maps are being requested.
Warning
The lod index must be less than the value returned by getLODCount.
Returns
View over the animated map indices.
See also
getLODCount
getAnimatedMapName

Implemented in dna::ReaderImpl< BinaryStreamReader >, dna::ReaderImpl< JSONStreamReader >, and dnac::ReaderImpl< DNACalibDNAReader >.

Referenced by dna::copyDefinition().

◆ getAnimatedMapName()

virtual StringView dna::DefinitionReader::getAnimatedMapName ( std::uint16_t  index) const
pure virtual

Name of the requested animated map.

Parameters
indexA name's position in the zero-indexed array of animated map names.
Warning
The index must be less than the value returned by getAnimatedMapCount.
Returns
View over the animated map name string.
See also
AnimatedMaps

Implemented in dna::ReaderImpl< BinaryStreamReader >, dna::ReaderImpl< JSONStreamReader >, and dnac::ReaderImpl< DNACalibDNAReader >.

Referenced by dna::copyDefinition(), and dnac::RenameAnimatedMapCommand::Impl::getNameByIndex().

◆ getBlendShapeChannelCount()

virtual std::uint16_t dna::DefinitionReader::getBlendShapeChannelCount ( ) const
pure virtual

◆ getBlendShapeChannelIndexListCount()

virtual std::uint16_t dna::DefinitionReader::getBlendShapeChannelIndexListCount ( ) const
pure virtual

Number of blend shape channel index lists.

Note
This value is useful only in the context of DefinitionWriter.

Implemented in dna::ReaderImpl< BinaryStreamReader >, dna::ReaderImpl< JSONStreamReader >, and dnac::ReaderImpl< DNACalibDNAReader >.

◆ getBlendShapeChannelIndicesForLOD()

virtual ConstArrayView< std::uint16_t > dna::DefinitionReader::getBlendShapeChannelIndicesForLOD ( std::uint16_t  lod) const
pure virtual

List of blend shape channel indices for the specified LOD.

Parameters
lodThe level of detail which blend shape channels are being requested.
Warning
The lod index must be less than the value returned by LODExtentReader::getLODCount.
Returns
View over the blend shape channel indices.
Warning
These LOD indices are not interchangeable with the LOD values from BehaviorReader::getBlendShapeChannelLODs.
See also
LODExtentReader::getLODCount
getBlendShapeChannelName

Implemented in dna::ReaderImpl< BinaryStreamReader >, dna::ReaderImpl< JSONStreamReader >, and dnac::ReaderImpl< DNACalibDNAReader >.

Referenced by dna::copyDefinition(), dnac::DenormalizedData< Reader >::populateMeshBlendShapeMappingIndices(), and dna::DenormalizedData< Reader >::populateMeshBlendShapeMappingIndices().

◆ getBlendShapeChannelName()

virtual StringView dna::DefinitionReader::getBlendShapeChannelName ( std::uint16_t  index) const
pure virtual

Name of the requested blend shape channel.

Parameters
indexA name's position in the zero-indexed array of blend shape channel names.
Warning
The index must be less than the value returned by BlendShapeChannelExtentReader::getBlendShapeChannelCount.
Returns
View over the blend shape channel name string.
See also
BlendShapes

Implemented in dna::ReaderImpl< BinaryStreamReader >, dna::ReaderImpl< JSONStreamReader >, and dnac::ReaderImpl< DNACalibDNAReader >.

Referenced by dna::copyDefinition(), and dnac::RenameBlendShapeCommand::Impl::getNameByIndex().

◆ getGUIControlCount()

virtual std::uint16_t dna::DefinitionReader::getGUIControlCount ( ) const
pure virtual

◆ getGUIControlName()

virtual StringView dna::DefinitionReader::getGUIControlName ( std::uint16_t  index) const
pure virtual

Name of the requested GUI control.

Parameters
indexA name's position in the zero-indexed array of GUI control names.
Warning
The index must be less than the value returned by getGUIControlCount.
Returns
View over the GUI control name string.
See also
Controls

Implemented in dna::ReaderImpl< BinaryStreamReader >, dna::ReaderImpl< JSONStreamReader >, and dnac::ReaderImpl< DNACalibDNAReader >.

Referenced by dna::copyDefinition().

◆ getJointCount()

virtual std::uint16_t dna::DefinitionReader::getJointCount ( ) const
pure virtual

◆ getJointIndexListCount()

virtual std::uint16_t dna::DefinitionReader::getJointIndexListCount ( ) const
pure virtual

Number of joint index lists.

Note
This value is useful only in the context of DefinitionWriter.

Implemented in dna::ReaderImpl< BinaryStreamReader >, dna::ReaderImpl< JSONStreamReader >, and dnac::ReaderImpl< DNACalibDNAReader >.

◆ getJointIndicesForLOD()

virtual ConstArrayView< std::uint16_t > dna::DefinitionReader::getJointIndicesForLOD ( std::uint16_t  lod) const
pure virtual

List of joint indices for the specified LOD.

Parameters
lodThe level of detail which joints are being requested.
Warning
The lod index must be less than the value returned by getLODCount.
Returns
View over the joint indices.
See also
getLODCount
getJointName

Implemented in dna::ReaderImpl< BinaryStreamReader >, dna::ReaderImpl< JSONStreamReader >, and dnac::ReaderImpl< DNACalibDNAReader >.

Referenced by dna::copyDefinition().

◆ getJointName()

virtual StringView dna::DefinitionReader::getJointName ( std::uint16_t  index) const
pure virtual

Name of the requested joint.

Parameters
indexA name's position in the zero-indexed array of joint names.
Warning
The index must be less than the value returned by getJointCount.
Returns
View over the joint name string.
See also
Joints

Implemented in dna::ReaderImpl< BinaryStreamReader >, dna::ReaderImpl< JSONStreamReader >, and dnac::ReaderImpl< DNACalibDNAReader >.

Referenced by dna::copyDefinition(), and dnac::RenameJointCommand::Impl::getNameByIndex().

◆ getJointParentIndex()

virtual std::uint16_t dna::DefinitionReader::getJointParentIndex ( std::uint16_t  index) const
pure virtual

Index of the requested joint's parent.

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

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).

Parameters
indexThe joint index which parent is being requested.

Implemented in dna::ReaderImpl< BinaryStreamReader >, dna::ReaderImpl< JSONStreamReader >, and dnac::ReaderImpl< DNACalibDNAReader >.

Referenced by dna::copyDefinition().

◆ getMeshBlendShapeChannelMapping()

virtual MeshBlendShapeChannelMapping dna::DefinitionReader::getMeshBlendShapeChannelMapping ( std::uint16_t  index) const
pure virtual
Parameters
indexA mapping's position in the zero-indexed array of mesh-blend shape channel mappings.
Warning
The index must be less than the value returned by getMeshBlendShapeChannelMappingCount.
Returns
A structure holding the mesh index and the associated blend shape channel index.

Implemented in dna::ReaderImpl< BinaryStreamReader >, dna::ReaderImpl< JSONStreamReader >, and dnac::ReaderImpl< DNACalibDNAReader >.

Referenced by dna::copyDefinition(), dnac::DenormalizedData< Reader >::populateMeshBlendShapeMappingIndices(), and dna::DenormalizedData< Reader >::populateMeshBlendShapeMappingIndices().

◆ getMeshBlendShapeChannelMappingCount()

virtual std::uint16_t dna::DefinitionReader::getMeshBlendShapeChannelMappingCount ( ) const
pure virtual

◆ getMeshBlendShapeChannelMappingIndicesForLOD()

virtual ConstArrayView< std::uint16_t > dna::DefinitionReader::getMeshBlendShapeChannelMappingIndicesForLOD ( std::uint16_t  lod) const
pure virtual

List of mesh-blend shape channel mapping indices for the specified LOD.

Note
The indices from this list can be used with the getMeshBlendShapeChannelMapping API to retrieve individual mapping items.
Parameters
lodThe level of detail which meshes are being requested.
Warning
The lod index must be less than the value returned by getLODCount.
Returns
View over the mesh blend shape channel mapping indices.
See also
getLODCount
getMeshBlendShapeChannelMapping

Implemented in dna::ReaderImpl< BinaryStreamReader >, dna::ReaderImpl< JSONStreamReader >, and dnac::ReaderImpl< DNACalibDNAReader >.

◆ getMeshCount()

virtual std::uint16_t dna::DefinitionReader::getMeshCount ( ) const
pure virtual

◆ getMeshIndexListCount()

virtual std::uint16_t dna::DefinitionReader::getMeshIndexListCount ( ) const
pure virtual

Number of mesh index lists.

Note
This value is useful only in the context of DefinitionWriter.

Implemented in dna::ReaderImpl< BinaryStreamReader >, dna::ReaderImpl< JSONStreamReader >, and dnac::ReaderImpl< DNACalibDNAReader >.

◆ getMeshIndicesForLOD()

virtual ConstArrayView< std::uint16_t > dna::DefinitionReader::getMeshIndicesForLOD ( std::uint16_t  lod) const
pure virtual

List of mesh indices for the specified LOD.

Parameters
lodThe level of detail which meshes are being requested.
Warning
The lod index must be less than the value returned by getLODCount.
Returns
View over the mesh indices.
See also
getLODCount
getMeshName

Implemented in dna::ReaderImpl< BinaryStreamReader >, dna::ReaderImpl< JSONStreamReader >, and dnac::ReaderImpl< DNACalibDNAReader >.

Referenced by dna::copyDefinition(), dnac::DenormalizedData< Reader >::populateMeshBlendShapeMappingIndices(), and dna::DenormalizedData< Reader >::populateMeshBlendShapeMappingIndices().

◆ getMeshName()

virtual StringView dna::DefinitionReader::getMeshName ( std::uint16_t  index) const
pure virtual

Name of the requested mesh.

Parameters
indexA name's position in the zero-indexed array of mesh names.
Warning
The index must be less than the value returned by getMeshCount.
Returns
View over the mesh name string.

Implemented in dna::ReaderImpl< BinaryStreamReader >, dna::ReaderImpl< JSONStreamReader >, and dnac::ReaderImpl< DNACalibDNAReader >.

Referenced by dna::copyDefinition(), and dnac::RenameMeshCommand::Impl::getNameByIndex().

◆ getNeutralJointRotation()

virtual Vector3 dna::DefinitionReader::getNeutralJointRotation ( std::uint16_t  index) const
pure virtual
Parameters
indexA joint's position in the zero-indexed array of joint rotations.
Warning
The index must be less than the value returned by getJointCount.
Returns
The joint's rotation (x, y, z).

Implemented in dna::ReaderImpl< BinaryStreamReader >, dna::ReaderImpl< JSONStreamReader >, and dnac::ReaderImpl< DNACalibDNAReader >.

Referenced by dna::copyDefinition().

◆ getNeutralJointRotationXs()

virtual ConstArrayView< float > dna::DefinitionReader::getNeutralJointRotationXs ( ) const
pure virtual

List of all rotation X values.

Note
This is an advanced API for performance critical access, for more convenient usage see getNeutralJointRotation.
Returns
View over all X values.
See also
getNeutralJointRotation

Implemented in dna::ReaderImpl< BinaryStreamReader >, dna::ReaderImpl< JSONStreamReader >, and dnac::ReaderImpl< DNACalibDNAReader >.

◆ getNeutralJointRotationYs()

virtual ConstArrayView< float > dna::DefinitionReader::getNeutralJointRotationYs ( ) const
pure virtual

List of all rotation Y values.

Note
This is an advanced API for performance critical access, for more convenient usage see getNeutralJointRotation.
Returns
View over all Y values.
See also
getNeutralJointRotation

Implemented in dna::ReaderImpl< BinaryStreamReader >, dna::ReaderImpl< JSONStreamReader >, and dnac::ReaderImpl< DNACalibDNAReader >.

◆ getNeutralJointRotationZs()

virtual ConstArrayView< float > dna::DefinitionReader::getNeutralJointRotationZs ( ) const
pure virtual

List of all rotation Z values.

Note
This is an advanced API for performance critical access, for more convenient usage see getNeutralJointRotation.
Returns
View over all Z values.
See also
getNeutralJointRotation

Implemented in dna::ReaderImpl< BinaryStreamReader >, dna::ReaderImpl< JSONStreamReader >, and dnac::ReaderImpl< DNACalibDNAReader >.

◆ getNeutralJointTranslation()

virtual Vector3 dna::DefinitionReader::getNeutralJointTranslation ( std::uint16_t  index) const
pure virtual
Parameters
indexA joint's position in the zero-indexed array of joint translations.
Warning
The index must be less than the value returned by getJointCount.
Returns
The joint's translation (x, y, z).

Implemented in dna::ReaderImpl< BinaryStreamReader >, dna::ReaderImpl< JSONStreamReader >, and dnac::ReaderImpl< DNACalibDNAReader >.

Referenced by dna::copyDefinition().

◆ getNeutralJointTranslationXs()

virtual ConstArrayView< float > dna::DefinitionReader::getNeutralJointTranslationXs ( ) const
pure virtual

List of all translation X values.

Note
This is an advanced API for performance critical access, for more convenient usage see getNeutralJointTranslation.
Returns
View over all X values.
See also
getNeutralJointTranslation

Implemented in dna::ReaderImpl< BinaryStreamReader >, dna::ReaderImpl< JSONStreamReader >, and dnac::ReaderImpl< DNACalibDNAReader >.

◆ getNeutralJointTranslationYs()

virtual ConstArrayView< float > dna::DefinitionReader::getNeutralJointTranslationYs ( ) const
pure virtual

List of all translation Y values.

Note
This is an advanced API for performance critical access, for more convenient usage see getNeutralJointTranslation.
Returns
View over all Y values.
See also
getNeutralJointTranslation

Implemented in dna::ReaderImpl< BinaryStreamReader >, dna::ReaderImpl< JSONStreamReader >, and dnac::ReaderImpl< DNACalibDNAReader >.

◆ getNeutralJointTranslationZs()

virtual ConstArrayView< float > dna::DefinitionReader::getNeutralJointTranslationZs ( ) const
pure virtual

List of all translation Z values.

Note
This is an advanced API for performance critical access, for more convenient usage see getNeutralJointTranslation.
Returns
View over all Z values.
See also
getNeutralJointTranslation

Implemented in dna::ReaderImpl< BinaryStreamReader >, dna::ReaderImpl< JSONStreamReader >, and dnac::ReaderImpl< DNACalibDNAReader >.

◆ getRawControlCount()

virtual std::uint16_t dna::DefinitionReader::getRawControlCount ( ) const
pure virtual

◆ getRawControlName()

virtual StringView dna::DefinitionReader::getRawControlName ( std::uint16_t  index) const
pure virtual

Name of the requested raw control.

Parameters
indexA name's position in the zero-indexed array of raw control names.
Warning
The index must be less than the value returned by getRawControlCount.
Returns
View over the control name string.
See also
Controls

Implemented in dna::ReaderImpl< BinaryStreamReader >, dna::ReaderImpl< JSONStreamReader >, and dnac::ReaderImpl< DNACalibDNAReader >.

Referenced by dna::copyDefinition().


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