Enzo
Loading...
Searching...
No Matches
enzo::script::MeshAttributeReader Class Reference

A mesh's attributes by name, with a read handle for each. More...

#include <MeshAttributeReader.h>

Public Member Functions

 MeshAttributeReader (const geo::Mesh &mesh)
 
bool hasElement (attr::AttributeOwner owner, intT index) const
 Returns whether an owner has an element at an index.
 
const ScriptAttribute * getAttribute (attr::AttributeOwner owner, std::string_view name) const
 Returns the attribute with a name on an owner.
 

Detailed Description

A mesh's attributes by name, with a read handle for each.

const MeshAttributeReader reader(mesh);
const ScriptAttribute* height = reader.getAttribute(attr::AttributeOwner::POINT, "height");
A mesh's attributes by name, with a read handle for each.
Definition MeshAttributeReader.h:42
An attribute of the mesh that a script reads by name.
Definition MeshAttributeReader.h:25
Note
The mesh needs to be defragmented, so an element's index is its offset.

Member Function Documentation

◆ getAttribute()

const ScriptAttribute * enzo::script::MeshAttributeReader::getAttribute ( attr::AttributeOwner owner,
std::string_view name ) const

Returns the attribute with a name on an owner.

Returns
The attribute, or null when the owner has none with that name.

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