PixelLightAPI
.
|
Chunk of data - one may also call it BLOB (binary large object) More...
#include <Chunk.h>
Public Types | |
enum | ESemantic { Unknown = 0, Position = 1, Rotation = 2, Scale = 3 } |
Semantic. More... | |
enum | EElementType { Int8 = 0, Int16 = 1, Int32 = 2, UInt8 = 3, UInt16 = 4, UInt32 = 5, Float = 6, Double = 7 } |
Element type. More... | |
Public Member Functions | |
PLCORE_API | Chunk () |
Constructor. | |
virtual PLCORE_API | ~Chunk () |
Destructor. | |
ESemantic | GetSemantic () const |
Returns the semantic. | |
void | SetSemantic (ESemantic nSemantic) |
Sets the semantic. | |
PLCORE_API bool | Allocate (EElementType nElementType, uint32 nNumOfComponentsPerElement, uint32 nNumOfElements) |
Allocates the chunk. | |
uint8 * | GetData () |
Returns the chunk data. | |
const uint8 * | GetData () const |
Returns the chunk data. | |
uint8 * | GetElementComponentData (uint32 nElement, uint32 nComponent) |
Returns the chunk element component data. | |
const uint8 * | GetElementComponentData (uint32 nElement, uint32 nComponent) const |
Returns the chunk element component data. | |
PLCORE_API void | Clear () |
Clears the chunk. | |
EElementType | GetElementType () const |
Returns the element type. | |
uint32 | GetNumOfComponentsPerElement () const |
Returns the number of components per element. | |
uint32 | GetNumOfElements () const |
Returns the number of elements. | |
PLCORE_API uint32 | GetNumOfBytesPerElementComponent () const |
Returns the number of bytes per component of an element. | |
uint32 | GetNumOfBytesPerElement () const |
Returns the number of bytes per element. | |
uint32 | GetTotalNumOfBytes () const |
Returns the total number of bytes of the chunk data. | |
uint32 | GetTotalNumOfComponents () const |
Returns the total number of components (all elements summed up) within the chunk. | |
virtual PLCORE_API bool | Unload () override |
Unloads the loadable. | |
virtual PLCORE_API String | GetLoadableTypeName () const override |
Returns the loadable type name. |
Chunk of data - one may also call it BLOB (binary large object)
Element type.
PLCORE_API PLCore::Chunk::Chunk | ( | ) |
virtual PLCORE_API PLCore::Chunk::~Chunk | ( | ) | [virtual] |
Destructor.
Chunk::ESemantic PLCore::Chunk::GetSemantic | ( | ) | const [inline] |
Returns the semantic.
void PLCore::Chunk::SetSemantic | ( | ESemantic | nSemantic | ) | [inline] |
Sets the semantic.
[in] | nSemantic | The semantic |
PLCORE_API bool PLCore::Chunk::Allocate | ( | EElementType | nElementType, |
uint32 | nNumOfComponentsPerElement, | ||
uint32 | nNumOfElements | ||
) |
Allocates the chunk.
[in] | nElementType | The element type |
[in] | nNumOfComponentsPerElement | The number of components per element |
[in] | nNumOfElements | The number of elements |
uint8 * PLCore::Chunk::GetData | ( | ) | [inline] |
Returns the chunk data.
const uint8 * PLCore::Chunk::GetData | ( | ) | const [inline] |
Returns the chunk data.
uint8 * PLCore::Chunk::GetElementComponentData | ( | uint32 | nElement, |
uint32 | nComponent | ||
) | [inline] |
Returns the chunk element component data.
[in] | nElement | Element index to return the component data from (0 - GetNumOfElements()-1), must be valid! |
[in] | nComponent | Index of the element component to data from (0 - GetNumOfComponentsPerElement()-1), must be valid! |
const uint8 * PLCore::Chunk::GetElementComponentData | ( | uint32 | nElement, |
uint32 | nComponent | ||
) | const [inline] |
Returns the chunk element component data.
[in] | nElement | Element index to return the component data from (0 - GetNumOfElements()-1), must be valid! |
[in] | nComponent | Index of the element component to data from (0 - GetNumOfComponentsPerElement()-1), must be valid! |
PLCORE_API void PLCore::Chunk::Clear | ( | ) |
Clears the chunk.
Chunk::EElementType PLCore::Chunk::GetElementType | ( | ) | const [inline] |
Returns the element type.
uint32 PLCore::Chunk::GetNumOfComponentsPerElement | ( | ) | const [inline] |
Returns the number of components per element.
uint32 PLCore::Chunk::GetNumOfElements | ( | ) | const [inline] |
Returns the number of elements.
PLCORE_API uint32 PLCore::Chunk::GetNumOfBytesPerElementComponent | ( | ) | const |
Returns the number of bytes per component of an element.
uint32 PLCore::Chunk::GetNumOfBytesPerElement | ( | ) | const [inline] |
Returns the number of bytes per element.
uint32 PLCore::Chunk::GetTotalNumOfBytes | ( | ) | const [inline] |
Returns the total number of bytes of the chunk data.
uint32 PLCore::Chunk::GetTotalNumOfComponents | ( | ) | const [inline] |
Returns the total number of components (all elements summed up) within the chunk.
virtual PLCORE_API bool PLCore::Chunk::Unload | ( | ) | [override, virtual] |
Unloads the loadable.
Reimplemented from PLCore::Loadable.
virtual PLCORE_API String PLCore::Chunk::GetLoadableTypeName | ( | ) | const [override, virtual] |
|