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 |
82 :
pImpl{makeScoped<Impl>(memRes)} {
83}
ScopedPtr< Impl > pImpl
Definition: SetVertexPositionsCommand.h:107
◆ SetVertexPositionsCommand() [2/7]
88 :
89 pImpl{makeScoped<Impl>(memRes)} {
90
91 pImpl->setMeshIndex(meshIndex);
92 pImpl->setPositions(positions);
93 pImpl->setOperation(operation);
94}
References pImpl.
◆ SetVertexPositionsCommand() [3/7]
101 :
102 pImpl{makeScoped<Impl>(memRes)} {
103
104 pImpl->setMeshIndex(meshIndex);
105 pImpl->setPositions(xs, ys, zs);
106 pImpl->setOperation(operation);
107}
References pImpl.
◆ SetVertexPositionsCommand() [4/7]
113 :
114 pImpl{makeScoped<Impl>(memRes)} {
115
116 pImpl->setMeshIndex(meshIndex);
117 pImpl->setPositions(positions);
118 pImpl->setMasks(masks);
119 pImpl->setOperation(operation);
120}
References pImpl.
◆ SetVertexPositionsCommand() [5/7]
128 :
129 pImpl{makeScoped<Impl>(memRes)} {
130
131 pImpl->setMeshIndex(meshIndex);
132 pImpl->setPositions(xs, ys, zs);
133 pImpl->setMasks(masks);
134 pImpl->setOperation(operation);
135}
References pImpl.
◆ ~SetVertexPositionsCommand()
dnac::SetVertexPositionsCommand::~SetVertexPositionsCommand |
( |
| ) |
|
|
default |
◆ SetVertexPositionsCommand() [6/7]
◆ SetVertexPositionsCommand() [7/7]
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ run()
Implements dnac::Command.
161 {
162 pImpl->run(
static_cast<DNACalibDNAReaderImpl*
>(output));
163}
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. |
153 {
154 pImpl->setMasks(masks);
155}
References pImpl.
◆ setMeshIndex()
void dnac::SetVertexPositionsCommand::setMeshIndex |
( |
std::uint16_t |
meshIndex | ) |
|
Method for setting the index of the mesh to change.
- Parameters
-
141 {
142 pImpl->setMeshIndex(meshIndex);
143}
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. |
157 {
158 pImpl->setOperation(operation);
159}
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. |
149 {
150 pImpl->setPositions(xs, ys, zs);
151}
References pImpl.
◆ setPositions() [2/2]
Method for setting the vertex positions used to calculate new values.
- Parameters
-
positions | The vertex positions. |
145 {
146 pImpl->setPositions(positions);
147}
References pImpl.
◆ pImpl
The documentation for this class was generated from the following files: