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

Write-only accessors for the geometry data associated with a rig. More...

#include <GeometryWriter.h>

Inheritance diagram for dna::GeometryWriter:
Inheritance graph
Collaboration diagram for dna::GeometryWriter:
Collaboration graph

Public Member Functions

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...
 
- Public Member Functions inherited from dna::DefinitionWriter
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 ~GeometryWriter ()
 
- Protected Member Functions inherited from dna::DefinitionWriter
virtual ~DefinitionWriter ()
 
- Protected Member Functions inherited from dna::DescriptorWriter
virtual ~DescriptorWriter ()
 

Detailed Description

Write-only accessors for the geometry data associated with a rig.

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

Constructor & Destructor Documentation

◆ ~GeometryWriter()

dna::GeometryWriter::~GeometryWriter ( )
protectedvirtualdefault

Member Function Documentation

◆ clearBlendShapeTargets()

virtual void dna::GeometryWriter::clearBlendShapeTargets ( std::uint16_t  meshIndex)
pure virtual

Delete all blend shape targets for the specified mesh.

Parameters
meshIndexA mesh's position in the zero-indexed array of meshes.
Warning
meshIndex must be less than the value returned by getMeshCount.

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

◆ clearFaceVertexLayoutIndices()

virtual void dna::GeometryWriter::clearFaceVertexLayoutIndices ( std::uint16_t  meshIndex)
pure virtual

Delete all lists of vertex layout indices for the specified mesh.

Parameters
meshIndexA mesh's position in the zero-indexed array of meshes.
Warning
meshIndex must be less than the value returned by getMeshCount.

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

◆ clearMeshes()

virtual void dna::GeometryWriter::clearMeshes ( )
pure virtual

◆ clearSkinWeights()

virtual void dna::GeometryWriter::clearSkinWeights ( std::uint16_t  meshIndex)
pure virtual

Delete all skin weights for the specified mesh.

Parameters
meshIndexA mesh's position in the zero-indexed array of meshes.
Warning
meshIndex must be less than the value returned by getMeshCount.

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

◆ deleteMesh()

virtual void dna::GeometryWriter::deleteMesh ( std::uint16_t  meshIndex)
pure virtual

Delete the specified mesh.

Parameters
meshIndexA mesh's position in the zero-indexed array of meshes.
Warning
meshIndex must be less than the value returned by getMeshCount.

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

◆ setBlendShapeChannelIndex()

virtual void dna::GeometryWriter::setBlendShapeChannelIndex ( std::uint16_t  meshIndex,
std::uint16_t  blendShapeTargetIndex,
std::uint16_t  blendShapeChannelIndex 
)
pure virtual

The matching blend shape channel index of the specified blend shape target.

Note
Associate the mesh-local blend shape target index with the absolute blend shape channel index as found in the Definition layer.
Parameters
meshIndexA mesh's position in the zero-indexed array of meshes.
blendShapeTargetIndexA position in the zero-indexed array of blend shape targets within the specified mesh.
blendShapeChannelIndexThe index of the specified blend shape channel in the Definition layer.
Note
Both the mesh storage itself and it's blend shape target storage will be implicitly resized (if needed) to provide storage for the number of meshes and/or blend shape targets that are inferred from the specified indexes.

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

Referenced by dna::copyBlendShapeTargets().

◆ setBlendShapeTargetDeltas()

virtual void dna::GeometryWriter::setBlendShapeTargetDeltas ( std::uint16_t  meshIndex,
std::uint16_t  blendShapeTargetIndex,
const Delta deltas,
std::uint32_t  count 
)
pure virtual

List of deltas for each affected vertex.

Parameters
meshIndexA mesh's position in the zero-indexed array of meshes.
blendShapeTargetIndexA position in the zero-indexed array of blend shape targets within the specified mesh.
deltasThe source address from which the blend shape target deltas are to be copied.
countThe number of blend shape target deltas to copy.
Note
Both the mesh storage itself and it's blend shape target storage will be implicitly resized (if needed) to provide storage for the number of meshes and/or blend shape targets that are inferred from the specified indexes.

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

Referenced by dna::copyBlendShapeTargets().

◆ setBlendShapeTargetVertexIndices()

virtual void dna::GeometryWriter::setBlendShapeTargetVertexIndices ( std::uint16_t  meshIndex,
std::uint16_t  blendShapeTargetIndex,
const std::uint32_t *  vertexIndices,
std::uint32_t  count 
)
pure virtual

Vertex position indices affected by the specified blend shape target.

Parameters
meshIndexA mesh's position in the zero-indexed array of meshes.
blendShapeTargetIndexA position in the zero-indexed array of blend shape targets within the specified mesh.
vertexIndicesThe source address from which the vertex position indices are to be copied.
countThe number of vertex position indices to copy.
Note
Both the mesh storage itself and it's blend shape target storage will be implicitly resized (if needed) to provide storage for the number of meshes and/or blend shape targets that are inferred from the specified indexes.
Warning
The vertex position indices must be stored in the same order as the deltas they are associated with.

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

Referenced by dna::copyBlendShapeTargets().

◆ setFaceVertexLayoutIndices()

virtual void dna::GeometryWriter::setFaceVertexLayoutIndices ( std::uint16_t  meshIndex,
std::uint32_t  faceIndex,
const std::uint32_t *  layoutIndices,
std::uint32_t  count 
)
pure virtual

Vertex layout indices that belong to the specified face.

Parameters
meshIndexA mesh's position in the zero-indexed array of meshes.
faceIndexA face's position in the zero-indexed array of faces that belong to the above referenced mesh.
layoutIndicesThe source address from which the layout indices are to be copied.
Note
The layout indices point into the array that is set through setVertexLayouts
Parameters
countThe number of vertices to copy.
Note
Both the mesh storage itself and it's face storage will be implicitly resized (if needed) to provide storage for the number of meshes and/or faces that are inferred from the specified indexes.

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

Referenced by dna::copyGeometry().

◆ setMaximumInfluencePerVertex()

virtual void dna::GeometryWriter::setMaximumInfluencePerVertex ( std::uint16_t  meshIndex,
std::uint16_t  maxInfluenceCount 
)
pure virtual
Parameters
meshIndexA mesh's position in the zero-indexed array of meshes.
maxInfluenceCountThe maximum number of joints that may influence any single vertex.

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

Referenced by dna::copyGeometry().

◆ setSkinWeightsJointIndices()

virtual void dna::GeometryWriter::setSkinWeightsJointIndices ( std::uint16_t  meshIndex,
std::uint32_t  vertexIndex,
const std::uint16_t *  jointIndices,
std::uint16_t  count 
)
pure virtual

List of joint indices associated with each skin weight for the specified vertex.

Parameters
meshIndexA mesh's position in the zero-indexed array of meshes.
vertexIndexA position in the zero-indexed array of vertex positions.
jointIndicesThe source address from which the joint indices are to be copied.
countThe number of joint indices to copy.
Note
Both the mesh storage itself and it's joint index list storage will be implicitly resized (if needed) to provide storage for the number of meshes and/or joint index lists that are inferred from the specified indexes.
Warning
The joint indices must be stored in the same order as the weights they are associated with.

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

Referenced by dna::copyGeometry().

◆ setSkinWeightsValues()

virtual void dna::GeometryWriter::setSkinWeightsValues ( std::uint16_t  meshIndex,
std::uint32_t  vertexIndex,
const float *  weights,
std::uint16_t  count 
)
pure virtual

List of skin weights influencing the referenced vertex.

Parameters
meshIndexA mesh's position in the zero-indexed array of meshes.
vertexIndexA position in the zero-indexed array of vertex positions.
weightsThe source address from which the weights are to be copied.
countThe number of weights to copy.
Note
Both the mesh storage itself and it's skin weight storage will be implicitly resized (if needed) to provide storage for the number of meshes and/or skin-weight lists that are inferred from the specified indexes.
Warning
The sum of weights must add up to 1.

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

Referenced by dna::copyGeometry().

◆ setVertexLayouts()

virtual void dna::GeometryWriter::setVertexLayouts ( std::uint16_t  meshIndex,
const VertexLayout layouts,
std::uint32_t  count 
)
pure virtual

List of vertex layouts the belong to the specified mesh.

Parameters
meshIndexA mesh's position in the zero-indexed array of meshes.
layoutsThe source address from which the layouts are to be copied.
countThe number of layouts to copy.
Note
The mesh storage will be implicitly resized (if needed) to provide storage for the number of meshes that is inferred from the specified index.

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

Referenced by dna::copyGeometry().

◆ setVertexNormals()

virtual void dna::GeometryWriter::setVertexNormals ( std::uint16_t  meshIndex,
const Normal normals,
std::uint32_t  count 
)
pure virtual

List of vertex normals.

Parameters
meshIndexA mesh's position in the zero-indexed array of meshes.
normalsThe source address from which the normals are to be copied.
countThe number of normals to copy.
Note
The mesh storage will be implicitly resized (if needed) to provide storage for the number of meshes that is inferred from the specified index.

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

Referenced by dna::copyGeometry().

◆ setVertexPositions()

virtual void dna::GeometryWriter::setVertexPositions ( std::uint16_t  meshIndex,
const Position positions,
std::uint32_t  count 
)
pure virtual

List of vertex positions.

Parameters
meshIndexA mesh's position in the zero-indexed array of meshes.
positionsThe source address from which the vertex positions are to be copied.
countThe number of vertex positions to copy.
Note
The mesh storage will be implicitly resized (if needed) to provide storage for the number of meshes that is inferred from the specified index.

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

Referenced by dna::copyGeometry().

◆ setVertexTextureCoordinates()

virtual void dna::GeometryWriter::setVertexTextureCoordinates ( std::uint16_t  meshIndex,
const TextureCoordinate textureCoordinates,
std::uint32_t  count 
)
pure virtual

List of vertex texture coordinates.

Parameters
meshIndexA mesh's position in the zero-indexed array of meshes.
textureCoordinatesThe source address from which the texture coordinates are to be copied.
countThe number of texture coordinates to copy.
Note
The mesh storage will be implicitly resized (if needed) to provide storage for the number of meshes that is inferred from the specified index.

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

Referenced by dna::copyGeometry().


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