Versions Compared

Key

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

template<class T>
class Geo::GeoGenericTexture

A really simple texture where all elements are T.

Functions

NameDescription
AddRef()

Increments the reference count.

Clear(const T &)

Clears the entire texture to the given value.

Create(s32, s32)

Create gives you back an uninitialise (values undefined!) texture of the appropriate size with a ref count of 1.

GetHeight()

Gets the width/height of this texture.

GetPixels()

Raw access to the pixel data.

GetWidth()

Gets the width/height of this texture.

Release()

Decrements the reference count, and destroys this object if it has reached zero.

Sample(s32, s32)

Read from the texture at the given location.

SerialiseFrom(FILE *)

Creates a texure by loading it from the given file.

SerialiseTo(FILE *)

Saves this texture to the given file.

SetSample(s32, s32, const T &)

Sets the value at the given location.


Anchor
ac681e0f0b5fd966440a72579fa542327
ac681e0f0b5fd966440a72579fa542327

void Geo::GeoGenericTexture< T >::AddRef

...

public: void AddRef()

...

Increments the reference count.


Anchor
aa2c1ebafd1b59fbccb8bbd7779f5cf19
aa2c1ebafd1b59fbccb8bbd7779f5cf19

void Geo::GeoGenericTexture< T >::Clear

...

public: void Clear
(
    const T & value
)

...

Clears the entire texture to the given value.


Anchor
a0d634b7f4335d0c80011e41a027ac491
a0d634b7f4335d0c80011e41a027ac491

static GeoGenericTexture* Geo::GeoGenericTexture< T >::Create

...

public: GeoGenericTexture * Create
(
    s32 w,
    s32 h
)

...

Create gives you back an uninitialise (values undefined!) texture of the appropriate size with a ref count of 1.

So no need to AddRef it immediately.


Anchor
a3ad1197698f5a6d2d4255a9c2fceb704
a3ad1197698f5a6d2d4255a9c2fceb704

s32 Geo::GeoGenericTexture< T >::GetHeight

...

public: s32 GetHeight()

...

Gets the width/height of this texture.


Anchor
a70935a679f19fa70b5369790d06fd429
a70935a679f19fa70b5369790d06fd429

T* Geo::GeoGenericTexture< T >::GetPixels

...

public: T * GetPixels()

...

Raw access to the pixel data.


Anchor
a47587862e838e5010e40d89586d19e9e
a47587862e838e5010e40d89586d19e9e

s32 Geo::GeoGenericTexture< T >::GetWidth

...

public: s32 GetWidth()

...

Gets the width/height of this texture.


Anchor
a5c897cdc123732a9041742e954dce8dd
a5c897cdc123732a9041742e954dce8dd

void Geo::GeoGenericTexture< T >::Release

...

public: void Release()

...

Decrements the reference count, and destroys this object if it has reached zero.


Anchor
aaeba6b823502872473d0d18266d7d2d8
aaeba6b823502872473d0d18266d7d2d8

T Geo::GeoGenericTexture< T >::Sample

...

public: T Sample
(
    s32 x,
    s32 y
)

...

Read from the texture at the given location.


Anchor
a59f45bcc555d1a8cfcdc8b23015c4a32
a59f45bcc555d1a8cfcdc8b23015c4a32

static GeoGenericTexture* Geo::GeoGenericTexture< T >::SerialiseFrom

...

public: GeoGenericTexture * SerialiseFrom
(
    FILE * fd
)

...

Creates a texure by loading it from the given file.


Anchor
a0e106b08a677a4b20c75aea7ea3b2f96
a0e106b08a677a4b20c75aea7ea3b2f96

bool Geo::GeoGenericTexture< T >::SerialiseTo

...

public: bool SerialiseTo
(
    FILE * fd
)

...

Saves this texture to the given file.


Anchor
a3bf68406a987dd437e27d4099e1fc677
a3bf68406a987dd437e27d4099e1fc677

void Geo::GeoGenericTexture< T >::SetSample

...

public: void SetSample
(
    s32 x,
    s32 y,
    const T & value
)

...

Sets the value at the given location.