SetVertexPositionsCommand is used to change vertex positions values.
More...
#include <SetVertexPositionsCommand.h>
|
DNACAPI | SetVertexPositionsCommand (MemoryResource *memRes=nullptr) |
|
DNACAPI | SetVertexPositionsCommand (std::uint16_t meshIndex, ConstArrayView< Vector3 > positions, VectorOperation operation, MemoryResource *memRes=nullptr) |
|
DNACAPI | SetVertexPositionsCommand (std::uint16_t meshIndex, ConstArrayView< float > xs, ConstArrayView< float > ys, ConstArrayView< float > zs, VectorOperation operation, MemoryResource *memRes=nullptr) |
|
DNACAPI | SetVertexPositionsCommand (std::uint16_t meshIndex, ConstArrayView< Vector3 > positions, ConstArrayView< float > masks, VectorOperation operation, MemoryResource *memRes=nullptr) |
|
DNACAPI | SetVertexPositionsCommand (std::uint16_t meshIndex, ConstArrayView< float > xs, ConstArrayView< float > ys, ConstArrayView< float > zs, ConstArrayView< float > masks, VectorOperation operation, MemoryResource *memRes=nullptr) |
|
DNACAPI | ~SetVertexPositionsCommand () |
|
| SetVertexPositionsCommand (const SetVertexPositionsCommand &)=delete |
|
SetVertexPositionsCommand & | operator= (const SetVertexPositionsCommand &)=delete |
|
DNACAPI | SetVertexPositionsCommand (SetVertexPositionsCommand &&) |
|
DNACAPI SetVertexPositionsCommand & | operator= (SetVertexPositionsCommand &&) |
|
DNACAPI void | setMeshIndex (std::uint16_t meshIndex) |
| Method for setting the index of the mesh to change. More...
|
|
DNACAPI void | setPositions (ConstArrayView< Vector3 > positions) |
| Method for setting the vertex positions used to calculate new values. More...
|
|
DNACAPI void | setPositions (ConstArrayView< float > xs, ConstArrayView< float > ys, ConstArrayView< float > zs) |
| Method for setting the vertex positions used to calculate new values. More...
|
|
DNACAPI void | setMasks (ConstArrayView< float > masks) |
| Method for setting vertex masks used to calculate new vertex position values. More...
|
|
DNACAPI void | setOperation (VectorOperation operation) |
| Method for setting the type of operation used to calculate new vertex position values. More...
|
|
DNACAPI void | run (DNACalibDNAReader *output) override |
|
Public Member Functions inherited from dnac::Command |
virtual | ~Command () |
|
virtual void | run (DNACalibDNAReader *output)=0 |
|
SetVertexPositionsCommand is used to change vertex positions values.
◆ SetVertexPositionsCommand() [1/7]
dnac::SetVertexPositionsCommand::SetVertexPositionsCommand |
( |
MemoryResource * |
memRes = nullptr | ) |
|
|
explicit |
105 :
pImpl{makeScoped<Impl>(memRes)} {
106}
ScopedPtr< Impl > pImpl
Definition: SetVertexPositionsCommand.h:110
◆ SetVertexPositionsCommand() [2/7]
111 :
112 pImpl{makeScoped<Impl>(memRes)} {
113
114 pImpl->setMeshIndex(meshIndex);
115 pImpl->setPositions(positions);
116 pImpl->setOperation(operation);
117}
References pImpl.
◆ SetVertexPositionsCommand() [3/7]
124 :
125 pImpl{makeScoped<Impl>(memRes)} {
126
127 pImpl->setMeshIndex(meshIndex);
128 pImpl->setPositions(xs, ys, zs);
129 pImpl->setOperation(operation);
130}
References pImpl.
◆ SetVertexPositionsCommand() [4/7]
136 :
137 pImpl{makeScoped<Impl>(memRes)} {
138
139 pImpl->setMeshIndex(meshIndex);
140 pImpl->setPositions(positions);
141 pImpl->setMasks(masks);
142 pImpl->setOperation(operation);
143}
References pImpl.
◆ SetVertexPositionsCommand() [5/7]
151 :
152 pImpl{makeScoped<Impl>(memRes)} {
153
154 pImpl->setMeshIndex(meshIndex);
155 pImpl->setPositions(xs, ys, zs);
156 pImpl->setMasks(masks);
157 pImpl->setOperation(operation);
158}
References pImpl.
◆ ~SetVertexPositionsCommand()
dnac::SetVertexPositionsCommand::~SetVertexPositionsCommand |
( |
| ) |
|
|
default |
◆ SetVertexPositionsCommand() [6/7]
◆ SetVertexPositionsCommand() [7/7]
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ run()
Implements dnac::Command.
184 {
185 pImpl->run(
static_cast<DNACalibDNAReaderImpl*
>(output));
186}
References pImpl.
◆ setMasks()
void dnac::SetVertexPositionsCommand::setMasks |
( |
ConstArrayView< float > |
masks | ) |
|
Method for setting vertex masks used to calculate new vertex position values.
- Note
- If no masks are set, default weight value of 1 is used for each vertex.
- Parameters
-
masks | The weights for each vertex. |
176 {
177 pImpl->setMasks(masks);
178}
References pImpl.
◆ setMeshIndex()
void dnac::SetVertexPositionsCommand::setMeshIndex |
( |
std::uint16_t |
meshIndex | ) |
|
Method for setting the index of the mesh to change.
- Parameters
-
164 {
165 pImpl->setMeshIndex(meshIndex);
166}
References pImpl.
◆ setOperation()
void dnac::SetVertexPositionsCommand::setOperation |
( |
VectorOperation |
operation | ) |
|
Method for setting the type of operation used to calculate new vertex position values.
- Note
- Available operations are: Interpolate, Add, Subtract and Multiply. Each position is calculated based on the provided operation type in the following way:
Interpolate: 
Add: 
Subtract: 
Multiply: 
setValue is the value from new positions that were set, and weight is the value from masks array.
- Parameters
-
operation | The operation to use. |
180 {
181 pImpl->setOperation(operation);
182}
References pImpl.
◆ setPositions() [1/2]
Method for setting the vertex positions used to calculate new values.
- Parameters
-
xs | The X coordinates for each vertex. |
ys | The Y coordinates for each vertex. |
zs | The Z coordinates for each vertex. |
172 {
173 pImpl->setPositions(xs, ys, zs);
174}
References pImpl.
◆ setPositions() [2/2]
Method for setting the vertex positions used to calculate new values.
- Parameters
-
positions | The vertex positions. |
168 {
169 pImpl->setPositions(positions);
170}
References pImpl.
◆ pImpl
◆ PositionsMasksCountMismatch
const sc::StatusCode dnac::SetVertexPositionsCommand::PositionsMasksCountMismatch {3201, "%s"} |
|
static |
The documentation for this class was generated from the following files: