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

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

#include <DefinitionWriter.h>

Inheritance diagram for dna::DefinitionWriter:
Inheritance graph
Collaboration diagram for dna::DefinitionWriter:
Collaboration graph

Public Member Functions

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

Protected Member Functions

virtual ~DefinitionWriter ()
 
- Protected Member Functions inherited from dna::DescriptorWriter
virtual ~DescriptorWriter ()
 

Detailed Description

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

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

Constructor & Destructor Documentation

◆ ~DefinitionWriter()

dna::DefinitionWriter::~DefinitionWriter ( )
protectedvirtualdefault

Member Function Documentation

◆ clearAnimatedMapIndices()

virtual void dna::DefinitionWriter::clearAnimatedMapIndices ( )
pure virtual

◆ clearAnimatedMapNames()

virtual void dna::DefinitionWriter::clearAnimatedMapNames ( )
pure virtual

◆ clearBlendShapeChannelIndices()

virtual void dna::DefinitionWriter::clearBlendShapeChannelIndices ( )
pure virtual

Delete all stored blend shape channel indices.

Implemented in dna::WriterImpl< BinaryStreamWriter >, dna::WriterImpl< JSONStreamWriter >, and dnac::WriterImpl< dna::Writer >.

Referenced by dna::copyDefinition().

◆ clearBlendShapeChannelNames()

virtual void dna::DefinitionWriter::clearBlendShapeChannelNames ( )
pure virtual

Delete all stored blend shape channel names.

Implemented in dna::WriterImpl< BinaryStreamWriter >, dna::WriterImpl< JSONStreamWriter >, and dnac::WriterImpl< dna::Writer >.

Referenced by dna::copyDefinition().

◆ clearGUIControlNames()

virtual void dna::DefinitionWriter::clearGUIControlNames ( )
pure virtual

◆ clearJointIndices()

virtual void dna::DefinitionWriter::clearJointIndices ( )
pure virtual

◆ clearJointNames()

virtual void dna::DefinitionWriter::clearJointNames ( )
pure virtual

◆ clearLODAnimatedMapMappings()

virtual void dna::DefinitionWriter::clearLODAnimatedMapMappings ( )
pure virtual

Delete all stored LOD to animated map list index mapping entries.

Implemented in dna::WriterImpl< BinaryStreamWriter >, dna::WriterImpl< JSONStreamWriter >, and dnac::WriterImpl< dna::Writer >.

Referenced by dna::copyDefinition().

◆ clearLODBlendShapeChannelMappings()

virtual void dna::DefinitionWriter::clearLODBlendShapeChannelMappings ( )
pure virtual

Delete all stored LOD to blend shape channel list index mapping entries.

Implemented in dna::WriterImpl< BinaryStreamWriter >, dna::WriterImpl< JSONStreamWriter >, and dnac::WriterImpl< dna::Writer >.

Referenced by dna::copyDefinition().

◆ clearLODJointMappings()

virtual void dna::DefinitionWriter::clearLODJointMappings ( )
pure virtual

Delete all stored LOD to joint list index mapping entries.

Implemented in dna::WriterImpl< BinaryStreamWriter >, dna::WriterImpl< JSONStreamWriter >, and dnac::WriterImpl< dna::Writer >.

Referenced by dna::copyDefinition().

◆ clearLODMeshMappings()

virtual void dna::DefinitionWriter::clearLODMeshMappings ( )
pure virtual

Delete all stored LOD to mesh list index mapping entries.

Implemented in dna::WriterImpl< BinaryStreamWriter >, dna::WriterImpl< JSONStreamWriter >, and dnac::WriterImpl< dna::Writer >.

Referenced by dna::copyDefinition().

◆ clearMeshBlendShapeChannelMappings()

virtual void dna::DefinitionWriter::clearMeshBlendShapeChannelMappings ( )
pure virtual

Delete all stored mesh to blend shape channel mapping entries.

Implemented in dna::WriterImpl< BinaryStreamWriter >, dna::WriterImpl< JSONStreamWriter >, and dnac::WriterImpl< dna::Writer >.

Referenced by dna::copyDefinition().

◆ clearMeshIndices()

virtual void dna::DefinitionWriter::clearMeshIndices ( )
pure virtual

◆ clearMeshNames()

virtual void dna::DefinitionWriter::clearMeshNames ( )
pure virtual

◆ clearRawControlNames()

virtual void dna::DefinitionWriter::clearRawControlNames ( )
pure virtual

◆ setAnimatedMapIndices()

virtual void dna::DefinitionWriter::setAnimatedMapIndices ( std::uint16_t  index,
const std::uint16_t *  animatedMapIndices,
std::uint16_t  count 
)
pure virtual

Store a list of animated map name indices onto a specified index.

Parameters
indexA position in a zero-indexed array where animated map name indices are stored.
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.
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.
Parameters
animatedMapIndicesThe source address from which the animated map name indices are to be copied.
Note
These indices can be used to access animated map names through DefinitionReader::getAnimatedMapName.
Parameters
countThe number of animated map name indices to copy.

Implemented in dna::WriterImpl< BinaryStreamWriter >, dna::WriterImpl< JSONStreamWriter >, and dnac::WriterImpl< dna::Writer >.

Referenced by dna::copyDefinition().

◆ setAnimatedMapName()

virtual void dna::DefinitionWriter::setAnimatedMapName ( std::uint16_t  index,
const char *  name 
)
pure virtual

Name of the specified animated map.

Parameters
indexA name's position in the zero-indexed array of animated map names.
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.
Parameters
nameA null-terminated string.
Note
The passed in name is copied, which will involve an additional allocation.

Implemented in dna::WriterImpl< BinaryStreamWriter >, dna::WriterImpl< JSONStreamWriter >, and dnac::WriterImpl< dna::Writer >.

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

◆ setBlendShapeChannelIndices()

virtual void dna::DefinitionWriter::setBlendShapeChannelIndices ( std::uint16_t  index,
const std::uint16_t *  blendShapeChannelIndices,
std::uint16_t  count 
)
pure virtual

Store a list of blend shape channel name indices onto a specified index.

Parameters
indexA position in a zero-indexed array where blend shape channel name indices are stored.
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.
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.
Parameters
blendShapeChannelIndicesThe source address from which the blend shape channel name indices are to be copied.
Note
These indices can be used to access blend shape channel names through DefinitionReader::getBlendShapeChannelName.
Parameters
countThe number of blend shape channel name indices to copy.

Implemented in dna::WriterImpl< BinaryStreamWriter >, dna::WriterImpl< JSONStreamWriter >, and dnac::WriterImpl< dna::Writer >.

Referenced by dna::copyDefinition().

◆ setBlendShapeChannelName()

virtual void dna::DefinitionWriter::setBlendShapeChannelName ( std::uint16_t  index,
const char *  name 
)
pure virtual

Name of the specified blend shape channel.

Parameters
indexA name's position in the zero-indexed array of blend shape channel names.
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.
Parameters
nameA null-terminated string.
Note
The passed in name is copied, which will involve an additional allocation.

Implemented in dna::WriterImpl< BinaryStreamWriter >, dna::WriterImpl< JSONStreamWriter >, and dnac::WriterImpl< dna::Writer >.

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

◆ setGUIControlName()

virtual void dna::DefinitionWriter::setGUIControlName ( std::uint16_t  index,
const char *  name 
)
pure virtual

Name of the specified GUI control.

Parameters
indexA name's position in the zero-indexed array of GUI control names.
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.
Parameters
nameA null-terminated string.
Note
The passed in name is copied, which will involve an additional allocation.

Implemented in dna::WriterImpl< BinaryStreamWriter >, dna::WriterImpl< JSONStreamWriter >, and dnac::WriterImpl< dna::Writer >.

Referenced by dna::copyDefinition().

◆ setJointHierarchy()

virtual void dna::DefinitionWriter::setJointHierarchy ( const std::uint16_t *  jointIndices,
std::uint16_t  count 
)
pure virtual

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
Parameters
jointIndicesThe source address from which the joint indices are to be copied.
Note
These indices can be used to access joint names through DefinitionReader::getJointName.
Parameters
countThe number of joint indices to copy.

Implemented in dna::WriterImpl< BinaryStreamWriter >, dna::WriterImpl< JSONStreamWriter >, and dnac::WriterImpl< dna::Writer >.

Referenced by dna::copyDefinition().

◆ setJointIndices()

virtual void dna::DefinitionWriter::setJointIndices ( std::uint16_t  index,
const std::uint16_t *  jointIndices,
std::uint16_t  count 
)
pure virtual

Store a list of joint indices onto a specified index.

Parameters
indexA position in a zero-indexed array where joint indices are stored.
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.
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.
Parameters
jointIndicesThe source address from which the joint indices are to be copied.
Note
These indices can be used to access joint names through DefinitionReader::getJointName.
Parameters
countThe number of joint indices to copy.

Implemented in dna::WriterImpl< BinaryStreamWriter >, dna::WriterImpl< JSONStreamWriter >, and dnac::WriterImpl< dna::Writer >.

Referenced by dna::copyDefinition().

◆ setJointName()

virtual void dna::DefinitionWriter::setJointName ( std::uint16_t  index,
const char *  name 
)
pure virtual

Name of the specified joint.

Parameters
indexA name's position in the zero-indexed array of joint names.
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.
Parameters
nameA null-terminated string.
Note
The passed in name is copied, which will involve an additional allocation.

Implemented in dna::WriterImpl< BinaryStreamWriter >, dna::WriterImpl< JSONStreamWriter >, and dnac::WriterImpl< dna::Writer >.

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

◆ setLODAnimatedMapMapping()

virtual void dna::DefinitionWriter::setLODAnimatedMapMapping ( std::uint16_t  lod,
std::uint16_t  index 
)
pure virtual

Set which animated maps belong to which level of detail.

Parameters
lodThe actual level of detail to which the animated maps are being associated.
indexThe index onto which animated map indices were assigned using setAnimatedMapIndices.
See also
setAnimatedMapIndices

Implemented in dna::WriterImpl< BinaryStreamWriter >, dna::WriterImpl< JSONStreamWriter >, and dnac::WriterImpl< dna::Writer >.

Referenced by dna::copyDefinition().

◆ setLODBlendShapeChannelMapping()

virtual void dna::DefinitionWriter::setLODBlendShapeChannelMapping ( std::uint16_t  lod,
std::uint16_t  index 
)
pure virtual

Set which blend shape channels belong to which level of detail.

Parameters
lodThe actual level of detail to which the blend shape channels are being associated.
indexThe index onto which blend shape channel name indices were assigned using setBlendShapeChannelIndices.
Warning
The LOD indices set here are not interchangeable with the LOD values set in BehaviorWriter::setBlendShapeChannelLODs.
See also
setBlendShapeChannelIndices

Implemented in dna::WriterImpl< BinaryStreamWriter >, dna::WriterImpl< JSONStreamWriter >, and dnac::WriterImpl< dna::Writer >.

Referenced by dna::copyDefinition().

◆ setLODJointMapping()

virtual void dna::DefinitionWriter::setLODJointMapping ( std::uint16_t  lod,
std::uint16_t  index 
)
pure virtual

Set which joints belong to which level of detail.

Parameters
lodThe actual level of detail to which the joints are being associated.
indexThe index onto which joints indices were assigned using setJointIndices.
See also
setJointIndices

Implemented in dna::WriterImpl< BinaryStreamWriter >, dna::WriterImpl< JSONStreamWriter >, and dnac::WriterImpl< dna::Writer >.

Referenced by dna::copyDefinition().

◆ setLODMeshMapping()

virtual void dna::DefinitionWriter::setLODMeshMapping ( std::uint16_t  lod,
std::uint16_t  index 
)
pure virtual

Set which meshes belong to which level of detail.

Parameters
lodThe actual level of detail to which the meshes are being associated.
indexThe index onto which mesh indices were assigned using setMeshIndices.
See also
setMeshIndices

Implemented in dna::WriterImpl< BinaryStreamWriter >, dna::WriterImpl< JSONStreamWriter >, and dnac::WriterImpl< dna::Writer >.

Referenced by dna::copyDefinition().

◆ setMeshBlendShapeChannelMapping()

virtual void dna::DefinitionWriter::setMeshBlendShapeChannelMapping ( std::uint32_t  index,
std::uint16_t  meshIndex,
std::uint16_t  blendShapeChannelIndex 
)
pure virtual

Associate a blend shape channel with it's mesh.

Parameters
indexA mapping's position in the zero-indexed array of mesh-blend shape channel mappings.
meshIndexA mesh's position in the zero-indexed array of mesh names.
blendShapeChannelIndexA blend shape channel's position in the zero-indexed array of blend shape channel names.

Implemented in dna::WriterImpl< BinaryStreamWriter >, dna::WriterImpl< JSONStreamWriter >, and dnac::WriterImpl< dna::Writer >.

Referenced by dna::copyDefinition().

◆ setMeshIndices()

virtual void dna::DefinitionWriter::setMeshIndices ( std::uint16_t  index,
const std::uint16_t *  meshIndices,
std::uint16_t  count 
)
pure virtual

Store a list of mesh name indices onto a specified index.

Parameters
indexA position in a zero-indexed array where mesh name indices are stored.
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.
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.
Parameters
meshIndicesThe source address from which the mesh name indices are to be copied.
Note
These indices can be used to access mesh names through DefinitionReader::getMeshName.
Parameters
countThe number of mesh name indices to copy.

Implemented in dna::WriterImpl< BinaryStreamWriter >, dna::WriterImpl< JSONStreamWriter >, and dnac::WriterImpl< dna::Writer >.

Referenced by dna::copyDefinition().

◆ setMeshName()

virtual void dna::DefinitionWriter::setMeshName ( std::uint16_t  index,
const char *  name 
)
pure virtual

Name of the specified mesh.

Parameters
indexA name's position in the zero-indexed array of mesh names.
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.
Parameters
nameA null-terminated string.
Note
The passed in name is copied, which will involve an additional allocation.

Implemented in dna::WriterImpl< BinaryStreamWriter >, dna::WriterImpl< JSONStreamWriter >, and dnac::WriterImpl< dna::Writer >.

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

◆ setNeutralJointRotations()

virtual void dna::DefinitionWriter::setNeutralJointRotations ( const Vector3 rotations,
std::uint16_t  count 
)
pure virtual
Parameters
rotationsThe source address from which the rotations are to be copied.
countThe number of rotation values to copy.

Implemented in dna::WriterImpl< BinaryStreamWriter >, dna::WriterImpl< JSONStreamWriter >, and dnac::WriterImpl< dna::Writer >.

Referenced by dna::copyDefinition().

◆ setNeutralJointTranslations()

virtual void dna::DefinitionWriter::setNeutralJointTranslations ( const Vector3 translations,
std::uint16_t  count 
)
pure virtual
Parameters
translationsThe source address from which the translations are to be copied.
countThe number of translation values to copy.

Implemented in dna::WriterImpl< BinaryStreamWriter >, dna::WriterImpl< JSONStreamWriter >, and dnac::WriterImpl< dna::Writer >.

Referenced by dna::copyDefinition().

◆ setRawControlName()

virtual void dna::DefinitionWriter::setRawControlName ( std::uint16_t  index,
const char *  name 
)
pure virtual

Name of the specified raw control.

Parameters
indexA name's position in the zero-indexed array of raw control names.
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.
Parameters
nameA null-terminated string.
Note
The passed in name is copied, which will involve an additional allocation.

Implemented in dna::WriterImpl< BinaryStreamWriter >, dna::WriterImpl< JSONStreamWriter >, and dnac::WriterImpl< dna::Writer >.

Referenced by dna::copyDefinition().


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