Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

template<typename>
class Enlighten::GenericColourBuffer

Generic class to store an array of values for a given system.

The type of values stored is determined by the 'C' template parameter. Unlike the IncidentLightingBuffer and InputLightingBuffer, this class does not support run-time selection of format precision. This class requires that the 'C' type define an ExpandedType. This allows having a compressed format that expands to a v128 or possibly just a single float. The compressed format is expanded on read and compressed on write although that logic belongs in the 'C' object.

Classes

Typedefs

NameDescription
C ColourType

Colour type.

ConstIterator< ColourType > ConstIteratorType

Const Iterator type.

Iterator< ColourType > IteratorType

Iterator type.

Variables

NameDescription
Geo::u32 m_NumValues

Number of clusters.

Geo::GeoGuid m_ObjectId

Id of the system/cube map that these lighting values apply to.

Geo::u32 m_Padding[2]

Unused padding. Explicitly declared so can be zero-initialised.

Geo::s32 m_PayloadOffset

Byte offset from beginning of the header to the colour data.

Functions

NameDescription
Begin()

Return a const iterator at the beginning of this buffer.

Begin()

Return an iterator at the beginning of this buffer.

ByteSwapMembers()

Endian swap the members of the header.

ByteSwapPayload(Geo::EConvertEndianMode)

Endian swap the buffer contents.

CalculateBufferSize(Geo::s32)

Returns the size of the buffer in bytes.

Clear()

Reset the contents of this buffer to zero/black.

ConvertEndian(Geo::EConvertEndianMode)

Endian swap the buffer.

Copy(const GenericColourBuffer< ColourType > &)

Copy values from another buffer.

Create(Geo::GeoGuid, Geo::s32, void *)

Creates a buffer in memory.

Create(void *, const GenericColourBuffer &)

Creates a copy in memory.

End()

Return a const iterator at the end of this buffer.

End()

Return an iterator at the end of this buffer.

GenericColourBuffer(Geo::GeoGuid, Geo::s32, Geo::s32)

Main constructor.

GenericColourBuffer(const GenericColourBuffer &)

Copy constructor.

GetNumValues()

Returns the number of values in this buffer.

GetSize()

Returns the size of this buffer in bytes.

GetSystemId()

Returns the guid of the system that this buffer correlates to.


Anchor
a116d5df12b20a3cccf79388c3deccf67
a116d5df12b20a3cccf79388c3deccf67

ConstIteratorType Enlighten::GenericColourBuffer< C >::Begin

...

public: ConstIteratorType Begin() const

...

Return a const iterator at the beginning of this buffer.


Anchor
a14922bf85d50b80144312acd087171f6
a14922bf85d50b80144312acd087171f6

IteratorType Enlighten::GenericColourBuffer< C >::Begin

...

public: IteratorType Begin()

...

Return an iterator at the beginning of this buffer.


Anchor
a5161114444b3241242fff60ee92c2d83
a5161114444b3241242fff60ee92c2d83

void Enlighten::GenericColourBuffer< ColourType >::ByteSwapMembers

...

protected: void ByteSwapMembers()

...

Endian swap the members of the header.


Anchor
a1fb21eb1d7b1692018648a65b60b7841
a1fb21eb1d7b1692018648a65b60b7841

void Enlighten::GenericColourBuffer< ColourType >::ByteSwapPayload

...

protected: void ByteSwapPayload
(
    Geo::EConvertEndianMode mode
)

...

Endian swap the buffer contents.


Anchor
acbc90f2d4237fa80ffa50dd22b638d78
acbc90f2d4237fa80ffa50dd22b638d78

Geo::u32 Enlighten::GenericColourBuffer< ColourType >::CalculateBufferSize

...

public: Geo::u32 CalculateBufferSize
(
    Geo::s32 numValues
)

...

Returns the size of the buffer in bytes.


Anchor
ae370297e9dabfcaca29858cc1ecd17a2
ae370297e9dabfcaca29858cc1ecd17a2

void Enlighten::GenericColourBuffer< ColourType >::Clear

...

public: void Clear()

...

Reset the contents of this buffer to zero/black.


Anchor
ae952acbca49e15b49c85ccacb34526e3
ae952acbca49e15b49c85ccacb34526e3

void Enlighten::GenericColourBuffer< ColourType >::ConvertEndian

...

public: void ConvertEndian
(
    Geo::EConvertEndianMode mode
)

...

Endian swap the buffer.


Anchor
ac4353f59c6ef9a59ab89e0b6225539ad
ac4353f59c6ef9a59ab89e0b6225539ad

bool Enlighten::GenericColourBuffer< ColourType >::Copy

...

public: bool Copy
(
    const GenericColourBuffer< ColourType > & source
)

...

Copy values from another buffer.


Anchor
a870e7b1c3da794e63f04bbfb0bb5327f
a870e7b1c3da794e63f04bbfb0bb5327f

GenericColourBuffer< ColourType > * Enlighten::GenericColourBuffer< ColourType >::Create

...

public: GenericColourBuffer * Create
(
    Geo::GeoGuid objectId,
    Geo::s32 numValues,
    void * memory
)

...

Creates a buffer in memory.


Anchor
a3532f15dd4d9a990a759ee969fb1ab08
a3532f15dd4d9a990a759ee969fb1ab08

GenericColourBuffer< ColourType > * Enlighten::GenericColourBuffer< ColourType >::Create

...

public: GenericColourBuffer * Create
(
    void * memory,
    const GenericColourBuffer & source
)

...

Creates a copy in memory.


Anchor
a6a8463d308c6fb5bb88490bfec4f8b29
a6a8463d308c6fb5bb88490bfec4f8b29

ConstIteratorType Enlighten::GenericColourBuffer< C >::End

...

public: ConstIteratorType End() const

...

Return a const iterator at the end of this buffer.


Anchor
ab0863a3b7f66adc29d3b3564e2680da8
ab0863a3b7f66adc29d3b3564e2680da8

IteratorType Enlighten::GenericColourBuffer< C >::End

...

public: IteratorType End()

...

Return an iterator at the end of this buffer.


Anchor
ac29ba5670df87a048e62dc1b5dd9cebe
ac29ba5670df87a048e62dc1b5dd9cebe

Enlighten::GenericColourBuffer< ColourType >::GenericColourBuffer

...

protected: GenericColourBuffer
(
    Geo::GeoGuid objectId,
    Geo::s32 numValues,
    Geo::s32 payloadOffset
)

...

Main constructor.


Anchor
a01a60560c1d66a5bd25b5e29ee3cf468
a01a60560c1d66a5bd25b5e29ee3cf468

Enlighten::GenericColourBuffer< ColourType >::GenericColourBuffer

...

protected: GenericColourBuffer
(
    const GenericColourBuffer & source
)

...

Copy constructor.


Anchor
ac984b10695a20e712ef18aec2693278c
ac984b10695a20e712ef18aec2693278c

Geo::u32 Enlighten::GenericColourBuffer< C >::GetNumValues

...

public: Geo::u32 GetNumValues() const

...

Returns the number of values in this buffer.


Anchor
af65bc5fb5e02ac7ffad01fccee14de2f
af65bc5fb5e02ac7ffad01fccee14de2f

size_t Enlighten::GenericColourBuffer< C >::GetSize

...

public: size_t GetSize() const

...

Returns the size of this buffer in bytes.


Anchor
a80b9054b106b15fdf62cdd630f963ff2
a80b9054b106b15fdf62cdd630f963ff2

Geo::GeoGuid Enlighten::GenericColourBuffer< C >::GetSystemId

...

public: Geo::GeoGuid GetSystemId() const

...

Returns the guid of the system that this buffer correlates to.