Expand description
Geometry attributes access and iterators
Geometry attributes of different types are represented as trait objects and need to be downcast to concrete types
use hapi_rs::session::new_in_process;
use hapi_rs::geometry::*;
use hapi_rs::attribute::*;
let session = new_in_process(None).unwrap();
let lib = session.load_asset_file("otls/hapi_geo.hda").unwrap();
let node = lib.try_create_first().unwrap();
let geo = node.geometry().unwrap().unwrap();
geo.node.cook_blocking().unwrap();
let attr_p = geo.get_attribute(0, AttributeOwner::Point, "P").unwrap().expect("P exists");
let attr_p = attr_p.downcast::<NumericAttr<f32>>().unwrap();
attr_p.get(0).expect("read_attribute");
Structs§
- ArrayIter 
- Returned by DataArray::iter
- ArrayIter Mut 
- Returned by DataArray::iter_mut
- Attribute
- AttributeInfo 
- DataArray 
- Groups data and sizes arrays for working with geometry attributes.
See crate::attribute::NumericArrayAttr::get.
- DictionaryArray Attr 
- DictionaryAttr 
- MultiArray Iter 
- NumericArray Attr 
- NumericAttr 
- StringArray Attr 
- StringAttr 
- StringMulti Array 
- Represents multi-array string data. Used as storage for string and dictionary array attributes.
Each element of this array is itself a StringArray