H3D API  2.4.1
Public Member Functions | List of all members
H3D::SFieldClass Class Referenceabstract

Base class for all fields created with the SField template. More...

#include <H3D/SField.h>

Inheritance diagram for H3D::SFieldClass:
Inheritance graph

Public Member Functions

virtual ~SFieldClass ()
 Virtual destructor.
 
virtual int setValueFromVoidPtr (void *data, unsigned int size, int id=0)
 
virtual int getValueAsVoidPtr (void *data, 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 sfield encapsulates.
 
virtual int setValueFromVoidPtr (const void *data, 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...
 

Detailed Description

Base class for all fields created with the SField template.

Member Function Documentation

◆ getValueAsVoidPtr()

virtual int H3D::SFieldClass::getValueAsVoidPtr ( void *  data,
unsigned int  size,
int  id = 0 
)
pure virtual

Get the value of the data copied into a memory buffer.

Parameters
dataBuffer to copy the data into.
sizeThe size of the buffer.
idId of the node calling this function. Used to check access type.
Returns
If successful: The number of bytes that was copied into the Otherwise -1.

Implemented in H3D::SField< Type >, H3D::SField< Matrix3d >, H3D::SField< RGBA >, H3D::SField< RGB >, H3D::SField< Matrix4d >, H3D::SField< H3DFloat >, H3D::SField< string >, H3D::SField< Matrix3f >, H3D::SField< Matrix4f >, H3D::SField< Vec2f >, H3D::SField< Vec3f >, H3D::SField< Vec4f >, H3D::SField< Vec2d >, H3D::SField< H3DDouble >, H3D::SField< bool >, H3D::SField< Vec3d >, H3D::SField< Vec4d >, H3D::SField< Quaternion >, H3D::SField< H3DInt32 >, and H3D::SField< Rotation >.

◆ setValueFromVoidPtr() [1/2]

virtual int H3D::SFieldClass::setValueFromVoidPtr ( const void *  data,
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
dataA pointer to the data.
sizeThe size in bytes of the value stored in data.
idId of the node calling this function. Used to check access type.
Returns
0 if successful, -1 otherwise.

Implemented in H3D::SField< Type >, H3D::SField< Matrix3d >, H3D::SField< RGBA >, H3D::SField< RGB >, H3D::SField< Matrix4d >, H3D::SField< H3DFloat >, H3D::SField< string >, H3D::SField< Matrix3f >, H3D::SField< Matrix4f >, H3D::SField< Vec2f >, H3D::SField< Vec3f >, H3D::SField< Vec4f >, H3D::SField< Vec2d >, H3D::SField< H3DDouble >, H3D::SField< bool >, H3D::SField< Vec3d >, H3D::SField< Vec4d >, H3D::SField< Quaternion >, H3D::SField< H3DInt32 >, and H3D::SField< Rotation >.

◆ setValueFromVoidPtr() [2/2]

virtual int H3D::SFieldClass::setValueFromVoidPtr ( void *  data,
unsigned int  size,
int  id = 0 
)
inlinevirtual
Deprecated:
Use the version of this function which takes const void *

The documentation for this class was generated from the following file: