C++ API Reference
MIndexMapper Class Reference

Introduced in 2020.0 More...

#include <MIndexMapper.h>

Public Member Functions

 MIndexMapper ()
 Constructs a MIndexMapper.
 
 ~MIndexMapper ()
 Destructor.
 
 MIndexMapper (const MIndexMapper &)
 Constructs a MIndexMapper. More...
 
Index fullCount () const
 This method returns the total number of points of the geometry. More...
 
Index affectCount () const
 This method returns the number of points in a subset of the geometry. More...
 
Index affectToFull (Index aid) const
 This method remaps the affect index of a subset to the full index of the geometry. More...
 
Index fullToAffect (Index vid) const
 This method remaps the full index of the geometry to the affect index of a subset. More...
 
bool isIdentityMap () const
 This method checks whether the index mapper is an identity map which means that the subset is equal to the full geometry. More...
 
MUintArray affectMap () const
 Changed in 2023.0 More...
 

Static Public Attributes

static Index InvalidIndex = std::numeric_limits<unsigned int>::max()
 Introduced in 2022.0 More...
 

Detailed Description

Introduced in 2020.0

2020.0:
Introduced in this version.

Index mapper containing indices of a subset of a geometry

An MIndexMapper maps indices between the full set of a geometry and the subset of indices that is affected by a deformer. If a deformer affects f.e only 1000 verts of a total of 15000 verts then the affectMap will be of size 1000 and contain the indices into the full table of points.

Examples:
basicMorphNode/basicMorphNode.cpp, exampleFalloff/smoothFalloffNode.cpp, exampleFalloff/smoothFalloffNode.h, and simpleDeformerNode/simpleDeformerNode.cpp.

Constructor & Destructor Documentation

MIndexMapper ( const MIndexMapper other)

Constructs a MIndexMapper.

Parameters
[in]otherThe MIndexMapper to copy.

Member Function Documentation

MIndexMapper::Index fullCount ( ) const

This method returns the total number of points of the geometry.

Returns
the number of points of the geometry
MIndexMapper::Index affectCount ( ) const

This method returns the number of points in a subset of the geometry.

Returns
the number of points in the subset of a geometry
Examples:
exampleFalloff/smoothFalloffNode.cpp, and simpleDeformerNode/simpleDeformerNode.cpp.
MIndexMapper::Index affectToFull ( Index  aid) const

This method remaps the affect index of a subset to the full index of the geometry.

Parameters
[in]aidthe index into the affect list we want to remap
Returns
the remapped index or UINT_MAX (invalid) if it does not exist
MIndexMapper::Index fullToAffect ( Index  vid) const

This method remaps the full index of the geometry to the affect index of a subset.

Parameters
[in]vidthe index into the full list we want to remap
Returns
the remapped index or UINT_MAX (invalid) if it does not exist
Examples:
exampleFalloff/smoothFalloffNode.cpp.
bool isIdentityMap ( ) const

This method checks whether the index mapper is an identity map which means that the subset is equal to the full geometry.

Returns
true if it is an identity map
MUintArray affectMap ( ) const

Changed in 2023.0

This method returns the array of indices which are contained in the subset.

2023.0:
return type changed

The indices are indices into the full geometry and the length of the array is equal to affectCount()

Returns
The array of indices in the subset

Member Data Documentation

MIndexMapper::Index InvalidIndex = std::numeric_limits<unsigned int>::max()
static

Introduced in 2022.0

2022.0:
Introduced in this version.
Examples:
exampleFalloff/smoothFalloffNode.cpp.

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