DNA Calib 1.1
Project brief
Classes | Public Member Functions | 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, VectorOperation operation, MemoryResource *memRes=nullptr)
 
DNACAPI SetBlendShapeTargetDeltasCommand (std::uint16_t meshIndex, std::uint16_t blendShapeTargetIndex, ConstArrayView< float > xs, ConstArrayView< float > ys, ConstArrayView< float > zs, VectorOperation operation, MemoryResource *memRes=nullptr)
 
DNACAPI SetBlendShapeTargetDeltasCommand (std::uint16_t meshIndex, std::uint16_t blendShapeTargetIndex, ConstArrayView< Vector3 > deltas, 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< 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 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
 

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
88 : pImpl{makeScoped<Impl>(memRes)} {
89}
ScopedPtr< Impl > pImpl
Definition: SetBlendShapeTargetDeltasCommand.h:116

◆ SetBlendShapeTargetDeltasCommand() [2/7]

dnac::SetBlendShapeTargetDeltasCommand::SetBlendShapeTargetDeltasCommand ( std::uint16_t  meshIndex,
std::uint16_t  blendShapeTargetIndex,
ConstArrayView< Vector3 deltas,
VectorOperation  operation,
MemoryResource memRes = nullptr 
)
95 :
96 pImpl{makeScoped<Impl>(memRes)} {
97
98 pImpl->setMeshIndex(meshIndex);
99 pImpl->setBlendShapeTargetIndex(blendShapeTargetIndex);
100 pImpl->setDeltas(deltas);
101 pImpl->setOperation(operation);
102}

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,
VectorOperation  operation,
MemoryResource memRes = nullptr 
)
110 :
111 pImpl{makeScoped<Impl>(memRes)} {
112
113 pImpl->setMeshIndex(meshIndex);
114 pImpl->setBlendShapeTargetIndex(blendShapeTargetIndex);
115 pImpl->setDeltas(xs, ys, zs);
116 pImpl->setOperation(operation);
117}

References pImpl.

◆ SetBlendShapeTargetDeltasCommand() [4/7]

dnac::SetBlendShapeTargetDeltasCommand::SetBlendShapeTargetDeltasCommand ( std::uint16_t  meshIndex,
std::uint16_t  blendShapeTargetIndex,
ConstArrayView< Vector3 deltas,
ConstArrayView< float >  masks,
VectorOperation  operation,
MemoryResource memRes = nullptr 
)
124 :
125 pImpl{makeScoped<Impl>(memRes)} {
126
127 pImpl->setMeshIndex(meshIndex);
128 pImpl->setBlendShapeTargetIndex(blendShapeTargetIndex);
129 pImpl->setDeltas(deltas);
130 pImpl->setMasks(masks);
131 pImpl->setOperation(operation);
132}

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< float >  masks,
VectorOperation  operation,
MemoryResource memRes = nullptr 
)
141 :
142 pImpl{makeScoped<Impl>(memRes)} {
143
144 pImpl->setMeshIndex(meshIndex);
145 pImpl->setBlendShapeTargetIndex(blendShapeTargetIndex);
146 pImpl->setDeltas(xs, ys, zs);
147 pImpl->setMasks(masks);
148 pImpl->setOperation(operation);
149}

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.

179 {
180 pImpl->run(static_cast<DNACalibDNAReaderImpl*>(output));
181}

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.
159 {
160 pImpl->setBlendShapeTargetIndex(blendShapeTargetIndex);
161}

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.
167 {
168 pImpl->setDeltas(xs, ys, zs);
169}

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.
163 {
164 pImpl->setDeltas(deltas);
165}

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.
171 {
172 pImpl->setMasks(masks);
173}

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.
155 {
156 pImpl->setMeshIndex(meshIndex);
157}

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.
175 {
176 pImpl->setOperation(operation);
177}

References pImpl.

Member Data Documentation

◆ pImpl

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

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