|
virtual | ~MFieldClass () |
| Virtual destructor.
|
|
virtual int | setValueFromVoidPtr (void *data, unsigned int nr_elements, unsigned int size, int id=0) |
|
virtual int | getValueAsVoidPtr (void *data, unsigned int &nr_elements, unsigned int size, int id=0)=0 |
| Get the value of the data copied into a memory buffer. More...
|
|
virtual unsigned int | valueTypeSize ()=0 |
| Returns the size in bytes of the value type the mfield encapsulates.
|
|
virtual unsigned int | size ()=0 |
| Returns the number of values that is stored in the mfield.
|
|
virtual int | setValueFromVoidPtr (const void *data, unsigned int nr_elements, unsigned int size, int id=0)=0 |
| Set the value of the field given a pointer to where the value of the field is. More...
|
|
Base class for all fields created with the MField template.
virtual int H3D::MFieldClass::getValueAsVoidPtr |
( |
void * |
data, |
|
|
unsigned int & |
nr_elements, |
|
|
unsigned int |
size, |
|
|
int |
id = 0 |
|
) |
| |
|
pure virtual |
Get the value of the data copied into a memory buffer.
- Parameters
-
data | Buffer to copy the data into. |
nr_elements | This parameter will be set to the nr of values in the mfield. |
size | The size of the buffer. |
id | The id of the node that owns the field. |
- Returns
- If successful: The number of bytes that was copied into the Otherwise -1.
Implemented in H3D::MFieldBase< Type, VectorClass, BaseField >, H3D::MFieldBase< Vec3f, std::vector< Vec3f >, ParsableMField >, H3D::MFieldBase< Vec3d, std::vector< Vec3d >, ParsableMField >, H3D::MFieldBase< Type, std::vector< Type >, ParsableMField >, H3D::MFieldBase< string, std::vector< string >, ParsableMField >, H3D::MFieldBase< Quaternion, std::vector< Quaternion >, ParsableMField >, H3D::MFieldBase< RGBA, std::vector< RGBA >, ParsableMField >, H3D::MFieldBase< bool, std::vector< bool >, ParsableMField >, H3D::MFieldBase< Matrix4f, std::vector< Matrix4f >, ParsableMField >, H3D::MFieldBase< RefClass *, FieldInternals::MFNodeAutoRefVector< RefClass >, Field >, H3D::MFieldBase< Node *, FieldInternals::MFNodeAutoRefVector< Node >, Field >, H3D::MFieldBase< Matrix4d, std::vector< Matrix4d >, ParsableMField >, H3D::MFieldBase< Matrix3d, std::vector< Matrix3d >, ParsableMField >, H3D::MFieldBase< Vec4f, std::vector< Vec4f >, ParsableMField >, H3D::MFieldBase< Vec4d, std::vector< Vec4d >, ParsableMField >, H3D::MFieldBase< Vec2f, std::vector< Vec2f >, ParsableMField >, H3D::MFieldBase< Vec2d, std::vector< Vec2d >, ParsableMField >, H3D::MFieldBase< Rotation, std::vector< Rotation >, ParsableMField >, H3D::MFieldBase< RGB, std::vector< RGB >, ParsableMField >, H3D::MFieldBase< H3DFloat, std::vector< H3DFloat >, ParsableMField >, H3D::MFieldBase< Matrix3f, std::vector< Matrix3f >, ParsableMField >, H3D::MFieldBase< H3DInt32, std::vector< H3DInt32 >, ParsableMField >, and H3D::MFieldBase< H3DDouble, std::vector< H3DDouble >, ParsableMField >.
virtual int H3D::MFieldClass::setValueFromVoidPtr |
( |
const void * |
data, |
|
|
unsigned int |
nr_elements, |
|
|
unsigned int |
size, |
|
|
int |
id = 0 |
|
) |
| |
|
pure virtual |
Set the value of the field given a pointer to where the value of the field is.
- Parameters
-
data | A pointer to the data. |
nr_elements | The number of values in the mfield. |
size | The size in bytes of the each value stored in the data. |
id | The id of the node that owns the field. |
- Returns
- 0 if successful, -1 otherwise.
Implemented in H3D::MFieldBase< Type, VectorClass, BaseField >, H3D::MFieldBase< Vec3f, std::vector< Vec3f >, ParsableMField >, H3D::MFieldBase< Vec3d, std::vector< Vec3d >, ParsableMField >, H3D::MFieldBase< Type, std::vector< Type >, ParsableMField >, H3D::MFieldBase< string, std::vector< string >, ParsableMField >, H3D::MFieldBase< Quaternion, std::vector< Quaternion >, ParsableMField >, H3D::MFieldBase< RGBA, std::vector< RGBA >, ParsableMField >, H3D::MFieldBase< bool, std::vector< bool >, ParsableMField >, H3D::MFieldBase< Matrix4f, std::vector< Matrix4f >, ParsableMField >, H3D::MFieldBase< RefClass *, FieldInternals::MFNodeAutoRefVector< RefClass >, Field >, H3D::MFieldBase< Node *, FieldInternals::MFNodeAutoRefVector< Node >, Field >, H3D::MFieldBase< Matrix4d, std::vector< Matrix4d >, ParsableMField >, H3D::MFieldBase< Matrix3d, std::vector< Matrix3d >, ParsableMField >, H3D::MFieldBase< Vec4f, std::vector< Vec4f >, ParsableMField >, H3D::MFieldBase< Vec4d, std::vector< Vec4d >, ParsableMField >, H3D::MFieldBase< Vec2f, std::vector< Vec2f >, ParsableMField >, H3D::MFieldBase< Vec2d, std::vector< Vec2d >, ParsableMField >, H3D::MFieldBase< Rotation, std::vector< Rotation >, ParsableMField >, H3D::MFieldBase< RGB, std::vector< RGB >, ParsableMField >, H3D::MFieldBase< H3DFloat, std::vector< H3DFloat >, ParsableMField >, H3D::MFieldBase< Matrix3f, std::vector< Matrix3f >, ParsableMField >, H3D::MFieldBase< H3DInt32, std::vector< H3DInt32 >, ParsableMField >, and H3D::MFieldBase< H3DDouble, std::vector< H3DDouble >, ParsableMField >.