Type conversion functions for buffers
More...
#include <Inventor/algorithms/SoConversion.h>
Public Member Functions | |
| SoConversion () | |
| SoConversion constructor. | |
| virtual int | convert (SoBufferObject *sourceBufferObject, const SbDataType src_type, SoBufferObject *targetBufferObject, const SbDataType dst_type, const size_t size) |
| Convert the data in a buffer object from one data type to another one. | |
| int | convert (SoCpuBufferObject *sourceBufferObject, const SbDataType src_type, SoCpuBufferObject *targetBufferObject, const SbDataType dst_type, const size_t size) |
| Convert the data in a buffer object from one data type to another one. | |
| virtual int | convertFloatToRGBA (SoBufferObject *sourceBufferObject, SoBufferObject *targetBufferObject, const size_t size, const float dataMin, const float dataMax) |
| Convert FLOAT data stored in a buffer to (grayscale) RGBA data. | |
| int | convertFloatToRGBA (SoCpuBufferObject *sourceBufferObject, SoCpuBufferObject *targetBufferObject, const size_t size, const float dataMin, const float dataMax) |
| Convert FLOAT data stored in a buffer to RGBA data. | |
Type conversion functions for buffers
This module provides data type conversions, like bytes to floats...
Examples:
SoAlgorithms, SoArithmetic, SoConvolution, SoDataExtract, SoSeismic
Definition at line 65 of file SoConversion.h.
| SoConversion::SoConversion | ( | ) |
SoConversion constructor.
|
virtual |
Convert the data in a buffer object from one data type to another one.
Notes: The destination buffer and the source buffers can be same.
Limitations: This function only supports FLOAT and UNSIGNED_BYTE for dst_type.
| sourceBufferObject | The source buffer object. |
| src_type | The type of the data in the source buffer object. |
| targetBufferObject | The destination buffer object. |
| dst_type | The destination type. |
| size | The number of elements in the source buffer object to convert. |
| int SoConversion::convert | ( | SoCpuBufferObject * | sourceBufferObject, |
| const SbDataType | src_type, | ||
| SoCpuBufferObject * | targetBufferObject, | ||
| const SbDataType | dst_type, | ||
| const size_t | size | ||
| ) |
Convert the data in a buffer object from one data type to another one.
Fast implementation for CPU buffers.
|
virtual |
Convert FLOAT data stored in a buffer to (grayscale) RGBA data.
| sourceBufferObject | The source buffer object containing the FLOAT data. |
| targetBufferObject | The target buffer object. |
| size | The number of FLOAT values to convert. |
| dataMin | The minimum value for the greyscale conversion. |
| dataMax | The maximum value for the greyscale conversion. |
| int SoConversion::convertFloatToRGBA | ( | SoCpuBufferObject * | sourceBufferObject, |
| SoCpuBufferObject * | targetBufferObject, | ||
| const size_t | size, | ||
| const float | dataMin, | ||
| const float | dataMax | ||
| ) |
Convert FLOAT data stored in a buffer to RGBA data.
Fast implementation for CPU buffers.