Layout for node attributes sampled at signed ancestor/current/descendant offsets.
More...
#include <AttributeNames.hpp>
|
| static NodeAttributeSampleLayout | create (int samplingRadius, const std::vector< Attribute > &attributes) |
| | Builds the canonical dense layout for offsets in [-samplingRadius, samplingRadius].
|
| static std::string | toString (NodeAttributeSampleKey sampleKey) |
| | Returns a human-readable label for a composite key.
|
| static std::string | toString (Attribute attribute, int sampleOffset) |
| | Returns a serialized label for an attribute at a sample offset.
|
Layout for node attributes sampled at signed ancestor/current/descendant offsets.
The layout is node-major: for a given node, all requested sample positions are stored contiguously. NUM_ATTRIBUTES therefore counts the number of (attribute, sampleOffset) entries associated with each node.
Definition at line 32 of file AttributeNames.hpp.
◆ NodeAttributeSampleLayout()
| mmcfilters::NodeAttributeSampleLayout::NodeAttributeSampleLayout |
( |
std::unordered_map< NodeAttributeSampleKey, int > && | map | ) |
|
|
inline |
Constructs a layout from an already validated offset map.
The constructor takes ownership of map and derives the per-node stride from its final size.
- Parameters
-
| map | Mapping used to initialize the layout. |
Definition at line 48 of file AttributeNames.hpp.
◆ create()
| NodeAttributeSampleLayout mmcfilters::NodeAttributeSampleLayout::create |
( |
int | samplingRadius, |
|
|
const std::vector< Attribute > & | attributes ) |
|
inlinestaticnodiscard |
Builds the canonical dense layout for offsets in [-samplingRadius, samplingRadius].
- Parameters
-
| samplingRadius | Maximum ancestor/descendant sample offset. |
| attributes | Attributes requested by the operation. |
- Returns
- The resulting canonical dense sampled layout.
Definition at line 58 of file AttributeNames.hpp.
◆ getIndex() [1/2]
| int mmcfilters::NodeAttributeSampleLayout::getIndex |
( |
Attribute | attribute, |
|
|
int | sampleOffset ) const |
|
inlinenodiscard |
Returns the per-node offset associated with (attribute, sampleOffset).
- Parameters
-
| attribute | Attribute requested by the operation. |
| sampleOffset | Signed sample coordinate. |
- Returns
- The per-node offset associated with the key.
Definition at line 79 of file AttributeNames.hpp.
◆ getIndex() [2/2]
Returns the per-node offset associated with a composite sample key.
- Parameters
-
| sampleKey | Composite sampled-attribute key. |
- Returns
- The per-node offset associated with the key.
Definition at line 89 of file AttributeNames.hpp.
◆ linearIndex() [1/2]
| int mmcfilters::NodeAttributeSampleLayout::linearIndex |
( |
int | nodeIndex, |
|
|
Attribute | attribute, |
|
|
int | sampleOffset ) const |
|
inlinenodiscard |
Returns the linear index in the flat buffer for a given node and sampled attribute.
- Parameters
-
| nodeIndex | Index. |
| attribute | Attribute requested by the operation. |
| sampleOffset | Signed sample coordinate. |
- Returns
- The linear index in the flat buffer.
Definition at line 100 of file AttributeNames.hpp.
◆ linearIndex() [2/2]
| int mmcfilters::NodeAttributeSampleLayout::linearIndex |
( |
int | nodeIndex, |
|
|
NodeAttributeSampleKey | sampleKey ) const |
|
inlinenodiscard |
Convenience overload taking a NodeAttributeSampleKey.
- Parameters
-
| nodeIndex | Index. |
| sampleKey | Composite sampled-attribute key. |
- Returns
- Value returned by the convenience overload.
Definition at line 111 of file AttributeNames.hpp.
◆ toString() [1/2]
| std::string mmcfilters::NodeAttributeSampleLayout::toString |
( |
Attribute | attribute, |
|
|
int | sampleOffset ) |
|
inlinestaticnodiscard |
Returns a serialized label for an attribute at a sample offset.
- Parameters
-
| attribute | Attribute requested by the operation. |
| sampleOffset | Signed sample coordinate. |
- Returns
- The canonical serialized label.
Definition at line 132 of file AttributeNames.hpp.
◆ toString() [2/2]
Returns a human-readable label for a composite key.
- Parameters
-
| sampleKey | Composite sampled-attribute key. |
- Returns
- A human-readable label for a composite key.
Definition at line 121 of file AttributeNames.hpp.
◆ indexMap
Maps each (attribute, sampleOffset) key to its per-node offset.
Definition at line 35 of file AttributeNames.hpp.
◆ NUM_ATTRIBUTES
| const int mmcfilters::NodeAttributeSampleLayout::NUM_ATTRIBUTES |
The documentation for this class was generated from the following file: