SimpleAttribute

simple realisation of Attribute interface

Constructors

this
this(string Desc, ElemInfo Info, in void[] Data)
this
this(string Desc, in T[] Data)

Members

Variables

_data
void[] _data;
_desc
string _desc;
_info
ElemInfo _info;

Inherited Members

From Attribute

stride
size_t stride [@property getter]
count
size_t count [@property getter]

Examples

1 import des.math.linear;
2 vec2[] data = [ vec2(1,2), vec2(3,4) ];
3 auto a = new SimpleAttribute( "test", data );
4 
5 assert( a.stride == vec2.sizeof );
6 assert( a.info.type == DataType.FLOAT );
7 assert( a.info.comp == 2 );
8 assert( a.data == cast(void[])data );

Meta