Reference/API

PMeshAttributes.AttributesType
attrs = (a= createattribute(...), b= createattribute(...))
attrs = Dict(:a => createattribute(...), :b => createattribute(...))

attrlength(attrs)       # get length (number of elements) of attributes
attrdict(attrs)         # attributes as (new) Dict

hasattr(attrs, name::Symbol)

isenabled(attrs, name::Symbol)   # Is attribute 'name' enabled?
enabled(attrs)          # Dict of all enabled attributes
setenabled!(attrs, (name, ::Bool)[; initialize=true)
setenabled!(attrs, Dict(name => ::Bool)[; initialize=true])

pushattr!(attrs)        # push one default value onto all enabled attributes
resizeattr!(attrs, sz)  # resize all enabled attributes
sizehint!(attrs, sz)    # apply `sizehint!` to attributes
isconsistent(attrs)     # consistency checks

newattrs = clone(attrs) # copy attributes

Dict-like set of named attributes, which all have the same size. This type represents "attribute lists" for vertices, faces, ... of a mesh.

See also Attribute

source