DNA Calib 1.1
Project brief
Public Member Functions | Private Attributes | Static Private Attributes | List of all members
dna::BinaryStreamReaderImpl Class Reference

#include <BinaryStreamReaderImpl.h>

Inheritance diagram for dna::BinaryStreamReaderImpl:
Inheritance graph
Collaboration diagram for dna::BinaryStreamReaderImpl:
Collaboration graph

Public Member Functions

 BinaryStreamReaderImpl (BoundedIOStream *stream_, DataLayer layer_, std::uint16_t maxLOD_, std::uint16_t minLOD_, MemoryResource *memRes_)
 
 BinaryStreamReaderImpl (BoundedIOStream *stream_, DataLayer layer_, ConstArrayView< std::uint16_t > lods, MemoryResource *memRes_)
 
void unload (DataLayer layer) override
 Unload all data of the specified layer and all layers dependent on it. More...
 
void read () override
 read data from stream into internal structures. More...
 
bool isLODConstrained () const
 
- Public Member Functions inherited from dna::ReaderImpl< BinaryStreamReader >
 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
 
- Public Member Functions inherited from dna::BinaryStreamReader
 ~BinaryStreamReader () override
 
- Public Member Functions inherited from dna::StreamReader
 ~StreamReader () override
 
virtual void read ()=0
 read data from stream into internal structures. More...
 
- 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 dna::BaseImpl
MemoryResourcegetMemoryResource ()
 

Private Attributes

BoundedIOStreamstream
 
FilteredInputArchive archive
 
bool lodConstrained
 

Static Private Attributes

static sc::StatusProvider status {SignatureMismatchError, VersionMismatchError, InvalidDataError}
 

Additional Inherited Members

- Static Public Member Functions inherited from dna::BinaryStreamReader
static BinaryStreamReadercreate (BoundedIOStream *stream, DataLayer layer=DataLayer::All, std::uint16_t maxLOD=0u, MemoryResource *memRes=nullptr)
 Factory method for creation of BinaryStreamReader. More...
 
static BinaryStreamReadercreate (BoundedIOStream *stream, DataLayer layer, std::uint16_t maxLOD, std::uint16_t minLOD, MemoryResource *memRes=nullptr)
 Factory method for creation of BinaryStreamReader. More...
 
static BinaryStreamReadercreate (BoundedIOStream *stream, DataLayer layer, std::uint16_t *lods, std::uint16_t lodCount, MemoryResource *memRes=nullptr)
 Factory method for creation of BinaryStreamReader. More...
 
static void destroy (BinaryStreamReader *instance)
 Method for freeing a BinaryStreamReader instance. More...
 
- Static Public Attributes inherited from dna::StreamReader
static const sc::StatusCode SignatureMismatchError {200, "DNA signature mismatched, expected %.3s, got %.3s"}
 
static const sc::StatusCode VersionMismatchError {201, "DNA version mismatched, expected %hu.%hu, got %hu.%hu"}
 
static const sc::StatusCode InvalidDataError {202, "Invalid data in DNA"}
 
- 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 dna::BaseImpl
 BaseImpl (MemoryResource *memRes_)
 
 ~BaseImpl ()=default
 
 BaseImpl (const BaseImpl &)=delete
 
BaseImploperator= (const BaseImpl &)=delete
 
 BaseImpl (BaseImpl &&rhs)=delete
 
BaseImploperator= (BaseImpl &&)=delete
 
- Protected Attributes inherited from dna::ReaderImpl< BinaryStreamReader >
DenormalizedData< BinaryStreamReadercache
 
- Protected Attributes inherited from dna::BaseImpl
MemoryResourcememRes
 
DNA dna
 

Constructor & Destructor Documentation

◆ BinaryStreamReaderImpl() [1/2]

dna::BinaryStreamReaderImpl::BinaryStreamReaderImpl ( BoundedIOStream stream_,
DataLayer  layer_,
std::uint16_t  maxLOD_,
std::uint16_t  minLOD_,
MemoryResource memRes_ 
)
72 :
73 BaseImpl{memRes_},
74 ReaderImpl{memRes_},
75 stream{stream_},
76 archive{stream_, layer_, maxLOD_, minLOD_, memRes_},
77 lodConstrained{(maxLOD_ != LODLimits::max()) || (minLOD_ != LODLimits::min())} {
78}
BaseImpl(MemoryResource *memRes_)
Definition: dna/BaseImpl.h:12
BoundedIOStream * stream
Definition: BinaryStreamReaderImpl.h:33
bool lodConstrained
Definition: BinaryStreamReaderImpl.h:35
FilteredInputArchive archive
Definition: BinaryStreamReaderImpl.h:34
ReaderImpl(MemoryResource *memRes_)
Definition: dna/ReaderImpl.h:161
static constexpr std::uint16_t max()
Definition: Limits.h:10
static constexpr std::uint16_t min()
Definition: Limits.h:14

◆ BinaryStreamReaderImpl() [2/2]

dna::BinaryStreamReaderImpl::BinaryStreamReaderImpl ( BoundedIOStream stream_,
DataLayer  layer_,
ConstArrayView< std::uint16_t >  lods,
MemoryResource memRes_ 
)
83 :
84 BaseImpl{memRes_},
85 ReaderImpl{memRes_},
86 stream{stream_},
87 archive{stream_, layer_, lods_, memRes_},
88 lodConstrained{true} {
89}

Member Function Documentation

◆ isLODConstrained()

bool dna::BinaryStreamReaderImpl::isLODConstrained ( ) const
91 {
92 return lodConstrained;
93}

References lodConstrained.

◆ read()

void dna::BinaryStreamReaderImpl::read ( )
overridevirtual

read data from stream into internal structures.

Implements dna::StreamReader.

111 {
112 // Due to possible usage of custom stream implementations, the status actually must be cleared at this point
113 // as external streams do not have access to the status reset API
114 status.reset();
115
117 if (!sc::Status::isOk()) {
118 return;
119 }
120
121 archive >> dna;
122 if (!sc::Status::isOk()) {
123 return;
124 }
125
126 if (!dna.signature.matches()) {
127 status.set(SignatureMismatchError, dna.signature.value.expected.data(), dna.signature.value.got.data());
128 return;
129 }
130 if (!dna.version.matches()) {
132 dna.version.generation.expected,
133 dna.version.version.expected,
134 dna.version.generation.got,
135 dna.version.version.got);
136 return;
137 }
138}
DNA dna
Definition: dna/BaseImpl.h:32
static sc::StatusProvider status
Definition: BinaryStreamReaderImpl.h:31
static const sc::StatusCode VersionMismatchError
Definition: StreamReader.h:15
static const sc::StatusCode SignatureMismatchError
Definition: StreamReader.h:14
static void set(StatusCode status)
Definition: Provider.cpp:33
static void reset()
Definition: Provider.cpp:21
static bool isOk()
Definition: Status.cpp:13
Definition: StreamScope.h:11
Definition: BinaryStreamReader.h:10

References archive, dna::BaseImpl::dna, sc::Status::isOk(), sc::StatusProvider::reset(), sc::StatusProvider::set(), dna::StreamReader::SignatureMismatchError, status, stream, and dna::StreamReader::VersionMismatchError.

◆ unload()

void dna::BinaryStreamReaderImpl::unload ( DataLayer  layer)
overridevirtual

Unload all data of the specified layer and all layers dependent on it.

Parameters
layerLayer which data should be unloaded.

Implements dna::Reader.

95 {
96 if ((layer == DataLayer::All) ||
98 (layer == DataLayer::Descriptor)) {
99 dna = DNA{memRes};
100 } else if ((layer == DataLayer::Geometry) || (layer == DataLayer::GeometryWithoutBlendShapes)) {
101 dna.unloadGeometry();
102 } else if (layer == DataLayer::Behavior) {
103 dna.unloadBehavior();
104 } else if (layer == DataLayer::Definition) {
105 dna.unloadGeometry();
106 dna.unloadBehavior();
107 dna.unloadDefinition();
108 }
109}
MemoryResource * memRes
Definition: dna/BaseImpl.h:31
@ GeometryWithoutBlendShapes

References dna::All, dna::AllWithoutBlendShapes, dna::Behavior, dna::Definition, dna::Descriptor, dna::Geometry, dna::GeometryWithoutBlendShapes, and dna::BaseImpl::memRes.

Member Data Documentation

◆ archive

FilteredInputArchive dna::BinaryStreamReaderImpl::archive
private

Referenced by read().

◆ lodConstrained

bool dna::BinaryStreamReaderImpl::lodConstrained
private

Referenced by isLODConstrained().

◆ status

sc::StatusProvider dna::BinaryStreamReaderImpl::status {SignatureMismatchError, VersionMismatchError, InvalidDataError}
staticprivate

Referenced by read().

◆ stream

BoundedIOStream* dna::BinaryStreamReaderImpl::stream
private

Referenced by read().


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