SimpleAttribute

simple realisation of Attribute interface

Constructors

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

Members

Properties

data
const(void[]) data [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
desc
string desc [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
info
const(ElemInfo) info [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
manual_stride
size_t manual_stride [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
offset
size_t offset [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

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

Inherited Members

From Attribute

desc
string desc [@property getter]
Undocumented in source.
info
const(ElemInfo) info [@property getter]
Undocumented in source.
manual_stride
size_t manual_stride [@property getter]
Undocumented in source.
offset
size_t offset [@property getter]
Undocumented in source.
data
const(void[]) data [@property getter]
Undocumented in source.
stride
size_t stride [@property getter]
count
size_t count [@property getter]

Examples

import des.math.linear;
vec2[] data = [ vec2(1,2), vec2(3,4) ];
auto a = new SimpleAttribute( "test", data );

assert( a.stride == vec2.sizeof );
assert( a.info.comp == DataType.FLOAT );
assert( a.info.channels == 2 );
assert( a.data == cast(void[])data );

Meta