A structure containing the information for a single attribute.
Each attribute has a name and a type. The tag points to a miUserdata blob that contains a flat array of xsimrPointCloudData::nb_particles attribute values.
miTRUE
, then
all the attribute entries are the same value and therefore only the
first attribute entry is valid to conserve space.miScalar getSizeAtIndex( siParticleAttribute *attr, miUint pid, miUint index ) { miUserdata *data_ptr; miScalar *size_ptr; miScalar result; if( index >= attr->count ) index = attr->count - 1; data_ptr = (miUserdata *)mi_db_access( attr->tag ); size_ptr = (miScalar *)&data_ptr->parameters[ 0 ]; if( attr->constant ) result = size_ptr[ 0 ]; else result = size_ptr[ pid * attr->count + index ]; mi_db_unpin( attr_size->tag ); return( result ); }
#include <xsi_miuserdata_defs.h>
Public Attributes |
|
miTag | name |
xsimrAttributeType | type |
miBoolean | constant |
miUint | size |
miTag | offsets |
miTag | data |
miTag | blob_type |
miTag name |
The name of the attribute. The name is case-insensitive.