DNA Calib 1.1
Project brief
Classes | Public Member Functions | Static Public Attributes | Private Attributes | List of all members
dnac::SetBlendShapeTargetDeltasCommand Class Reference

SetBlendShapeTargetDeltasCommand is used to change blend shape target deltas. More...

#include <SetBlendShapeTargetDeltasCommand.h>

Inheritance diagram for dnac::SetBlendShapeTargetDeltasCommand:
Inheritance graph
Collaboration diagram for dnac::SetBlendShapeTargetDeltasCommand:
Collaboration graph

Classes

class  Impl
 

Public Member Functions

DNACAPI SetBlendShapeTargetDeltasCommand (MemoryResource *memRes=nullptr)
 
DNACAPI SetBlendShapeTargetDeltasCommand (std::uint16_t meshIndex, std::uint16_t blendShapeTargetIndex, ConstArrayView< Vector3 > deltas, ConstArrayView< std::uint32_t > vertexIndices, VectorOperation operation, MemoryResource *memRes=nullptr)
 
DNACAPI SetBlendShapeTargetDeltasCommand (std::uint16_t meshIndex, std::uint16_t blendShapeTargetIndex, ConstArrayView< float > xs, ConstArrayView< float > ys, ConstArrayView< float > zs, ConstArrayView< std::uint32_t > vertexIndices, VectorOperation operation, MemoryResource *memRes=nullptr)
 
DNACAPI SetBlendShapeTargetDeltasCommand (std::uint16_t meshIndex, std::uint16_t blendShapeTargetIndex, ConstArrayView< Vector3 > deltas, ConstArrayView< std::uint32_t > vertexIndices, ConstArrayView< float > masks, VectorOperation operation, MemoryResource *memRes=nullptr)
 
DNACAPI SetBlendShapeTargetDeltasCommand (std::uint16_t meshIndex, std::uint16_t blendShapeTargetIndex, ConstArrayView< float > xs, ConstArrayView< float > ys, ConstArrayView< float > zs, ConstArrayView< std::uint32_t > vertexIndices, ConstArrayView< float > masks, VectorOperation operation, MemoryResource *memRes=nullptr)
 
DNACAPI ~SetBlendShapeTargetDeltasCommand ()
 
 SetBlendShapeTargetDeltasCommand (const SetBlendShapeTargetDeltasCommand &)=delete
 
SetBlendShapeTargetDeltasCommandoperator= (const SetBlendShapeTargetDeltasCommand &)=delete
 
DNACAPI SetBlendShapeTargetDeltasCommand (SetBlendShapeTargetDeltasCommand &&)
 
DNACAPI SetBlendShapeTargetDeltasCommandoperator= (SetBlendShapeTargetDeltasCommand &&)
 
DNACAPI void setMeshIndex (std::uint16_t meshIndex)
 Method for setting the index of the mesh whose blend shape target to change. More...
 
DNACAPI void setBlendShapeTargetIndex (std::uint16_t blendShapeTargetIndex)
 Method for setting the index of the blend shape target to change. More...
 
DNACAPI void setDeltas (ConstArrayView< Vector3 > deltas)
 Method for setting the values used to calculate new deltas for blend shape target. More...
 
DNACAPI void setDeltas (ConstArrayView< float > xs, ConstArrayView< float > ys, ConstArrayView< float > zs)
 Method for setting the values used to calculate new deltas for blend shape target. More...
 
DNACAPI void setVertexIndices (ConstArrayView< std::uint32_t > vertexIndices)
 Method for setting the vertex indices that correspond to new deltas. More...
 
DNACAPI void setMasks (ConstArrayView< float > masks)
 Method for setting masks used to calculate new deltas for blend shape target. More...
 
DNACAPI void setOperation (VectorOperation operation)
 Method for setting the type of operation used to calculate new deltas for blend shape target. More...
 
DNACAPI void run (DNACalibDNAReader *output) override
 
- Public Member Functions inherited from dnac::Command
virtual ~Command ()
 
virtual void run (DNACalibDNAReader *output)=0
 

Static Public Attributes

static DNACAPI const sc::StatusCode VertexIndicesOutOfBoundsError {3101, "%s"}
 
static DNACAPI const sc::StatusCode NoVertexIndicesSetError {3102, "%s"}
 
static DNACAPI const sc::StatusCode DeltasVertexIndicesCountMismatch {3103, "%s"}
 
static DNACAPI const sc::StatusCode DeltasMasksCountMismatch {3104, "%s"}
 

Private Attributes

ScopedPtr< ImplpImpl
 

Detailed Description

SetBlendShapeTargetDeltasCommand is used to change blend shape target deltas.

Constructor & Destructor Documentation

◆ SetBlendShapeTargetDeltasCommand() [1/7]

dnac::SetBlendShapeTargetDeltasCommand::SetBlendShapeTargetDeltasCommand ( MemoryResource memRes = nullptr)
explicit
210 : pImpl{makeScoped<Impl>(memRes)} {
211}
ScopedPtr< Impl > pImpl
Definition: SetBlendShapeTargetDeltasCommand.h:133

◆ SetBlendShapeTargetDeltasCommand() [2/7]

dnac::SetBlendShapeTargetDeltasCommand::SetBlendShapeTargetDeltasCommand ( std::uint16_t  meshIndex,
std::uint16_t  blendShapeTargetIndex,
ConstArrayView< Vector3 deltas,
ConstArrayView< std::uint32_t >  vertexIndices,
VectorOperation  operation,
MemoryResource memRes = nullptr 
)
218 :
219 pImpl{makeScoped<Impl>(memRes)} {
220
221 pImpl->setMeshIndex(meshIndex);
222 pImpl->setBlendShapeTargetIndex(blendShapeTargetIndex);
223 pImpl->setDeltas(deltas);
224 pImpl->setVertexIndices(vertexIndices);
225 pImpl->setOperation(operation);
226}

References pImpl.

◆ SetBlendShapeTargetDeltasCommand() [3/7]

dnac::SetBlendShapeTargetDeltasCommand::SetBlendShapeTargetDeltasCommand ( std::uint16_t  meshIndex,
std::uint16_t  blendShapeTargetIndex,
ConstArrayView< float >  xs,
ConstArrayView< float >  ys,
ConstArrayView< float >  zs,
ConstArrayView< std::uint32_t >  vertexIndices,
VectorOperation  operation,
MemoryResource memRes = nullptr 
)
235 :
236 pImpl{makeScoped<Impl>(memRes)} {
237
238 pImpl->setMeshIndex(meshIndex);
239 pImpl->setBlendShapeTargetIndex(blendShapeTargetIndex);
240 pImpl->setDeltas(xs, ys, zs);
241 pImpl->setVertexIndices(vertexIndices);
242 pImpl->setOperation(operation);
243}

References pImpl.

◆ SetBlendShapeTargetDeltasCommand() [4/7]

dnac::SetBlendShapeTargetDeltasCommand::SetBlendShapeTargetDeltasCommand ( std::uint16_t  meshIndex,
std::uint16_t  blendShapeTargetIndex,
ConstArrayView< Vector3 deltas,
ConstArrayView< std::uint32_t >  vertexIndices,
ConstArrayView< float >  masks,
VectorOperation  operation,
MemoryResource memRes = nullptr 
)
251 :
252 pImpl{makeScoped<Impl>(memRes)} {
253
254 pImpl->setMeshIndex(meshIndex);
255 pImpl->setBlendShapeTargetIndex(blendShapeTargetIndex);
256 pImpl->setDeltas(deltas);
257 pImpl->setVertexIndices(vertexIndices);
258 pImpl->setMasks(masks);
259 pImpl->setOperation(operation);
260}

References pImpl.

◆ SetBlendShapeTargetDeltasCommand() [5/7]

dnac::SetBlendShapeTargetDeltasCommand::SetBlendShapeTargetDeltasCommand ( std::uint16_t  meshIndex,
std::uint16_t  blendShapeTargetIndex,
ConstArrayView< float >  xs,
ConstArrayView< float >  ys,
ConstArrayView< float >  zs,
ConstArrayView< std::uint32_t >  vertexIndices,
ConstArrayView< float >  masks,
VectorOperation  operation,
MemoryResource memRes = nullptr 
)
270 :
271 pImpl{makeScoped<Impl>(memRes)} {
272
273 pImpl->setMeshIndex(meshIndex);
274 pImpl->setBlendShapeTargetIndex(blendShapeTargetIndex);
275 pImpl->setDeltas(xs, ys, zs);
276 pImpl->setVertexIndices(vertexIndices);
277 pImpl->setMasks(masks);
278 pImpl->setOperation(operation);
279}

References pImpl.

◆ ~SetBlendShapeTargetDeltasCommand()

dnac::SetBlendShapeTargetDeltasCommand::~SetBlendShapeTargetDeltasCommand ( )
default

◆ SetBlendShapeTargetDeltasCommand() [6/7]

dnac::SetBlendShapeTargetDeltasCommand::SetBlendShapeTargetDeltasCommand ( const SetBlendShapeTargetDeltasCommand )
delete

◆ SetBlendShapeTargetDeltasCommand() [7/7]

dnac::SetBlendShapeTargetDeltasCommand::SetBlendShapeTargetDeltasCommand ( SetBlendShapeTargetDeltasCommand &&  )
default

Member Function Documentation

◆ operator=() [1/2]

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

◆ operator=() [2/2]

SetBlendShapeTargetDeltasCommand & dnac::SetBlendShapeTargetDeltasCommand::operator= ( SetBlendShapeTargetDeltasCommand &&  )
default

◆ run()

void dnac::SetBlendShapeTargetDeltasCommand::run ( DNACalibDNAReader output)
overridevirtual

Implements dnac::Command.

313 {
314 pImpl->run(static_cast<DNACalibDNAReaderImpl*>(output));
315}

References pImpl.

◆ setBlendShapeTargetIndex()

void dnac::SetBlendShapeTargetDeltasCommand::setBlendShapeTargetIndex ( std::uint16_t  blendShapeTargetIndex)

Method for setting the index of the blend shape target to change.

Parameters
blendShapeTargetIndexThe blend shape target index.
289 {
290 pImpl->setBlendShapeTargetIndex(blendShapeTargetIndex);
291}

References pImpl.

◆ setDeltas() [1/2]

void dnac::SetBlendShapeTargetDeltasCommand::setDeltas ( ConstArrayView< float >  xs,
ConstArrayView< float >  ys,
ConstArrayView< float >  zs 
)

Method for setting the values used to calculate new deltas for blend shape target.

Parameters
xsThe X values for each delta.
ysThe Y values for each delta.
zsThe Z values for each delta.
297 {
298 pImpl->setDeltas(xs, ys, zs);
299}

References pImpl.

◆ setDeltas() [2/2]

void dnac::SetBlendShapeTargetDeltasCommand::setDeltas ( ConstArrayView< Vector3 deltas)

Method for setting the values used to calculate new deltas for blend shape target.

Parameters
deltasThe values used in calculation.
293 {
294 pImpl->setDeltas(deltas);
295}

References pImpl.

◆ setMasks()

void dnac::SetBlendShapeTargetDeltasCommand::setMasks ( ConstArrayView< float >  masks)

Method for setting masks used to calculate new deltas for blend shape target.

Note
If no masks are set, default weight value of 1 is used for each delta.
Parameters
masksThe weights for each delta.
305 {
306 pImpl->setMasks(masks);
307}

References pImpl.

◆ setMeshIndex()

void dnac::SetBlendShapeTargetDeltasCommand::setMeshIndex ( std::uint16_t  meshIndex)

Method for setting the index of the mesh whose blend shape target to change.

Parameters
meshIndexThe mesh index.
285 {
286 pImpl->setMeshIndex(meshIndex);
287}

References pImpl.

◆ setOperation()

void dnac::SetBlendShapeTargetDeltasCommand::setOperation ( VectorOperation  operation)

Method for setting the type of operation used to calculate new deltas for blend shape target.

Note
Available operations are: Interpolate, Add, Subtract and Multiply. Each delta is calculated based on the provided operation type in the following way:

Interpolate: $newValue = previousValue * (1 - weight) + setValue * weight$
Add: $newValue = previousValue + (setValue * weight)$
Subtract: $newValue = previousValue - (setValue * weight)$
Multiply: $newValue = previousValue * (setValue * weight)$
setValue is the value from new deltas that were set, and weight is the value from masks array.

Parameters
operationThe operation to use.
309 {
310 pImpl->setOperation(operation);
311}

References pImpl.

◆ setVertexIndices()

void dnac::SetBlendShapeTargetDeltasCommand::setVertexIndices ( ConstArrayView< std::uint32_t >  vertexIndices)

Method for setting the vertex indices that correspond to new deltas.

Parameters
vertexIndicesThe vertexIndices.
301 {
302 pImpl->setVertexIndices(vertexIndices);
303}

References pImpl.

Member Data Documentation

◆ DeltasMasksCountMismatch

const sc::StatusCode dnac::SetBlendShapeTargetDeltasCommand::DeltasMasksCountMismatch {3104, "%s"}
static

◆ DeltasVertexIndicesCountMismatch

const sc::StatusCode dnac::SetBlendShapeTargetDeltasCommand::DeltasVertexIndicesCountMismatch {3103, "%s"}
static

◆ NoVertexIndicesSetError

const sc::StatusCode dnac::SetBlendShapeTargetDeltasCommand::NoVertexIndicesSetError {3102, "%s"}
static

◆ pImpl

ScopedPtr<Impl> dnac::SetBlendShapeTargetDeltasCommand::pImpl
private

◆ VertexIndicesOutOfBoundsError

const sc::StatusCode dnac::SetBlendShapeTargetDeltasCommand::VertexIndicesOutOfBoundsError {3101, "%s"}
static

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