template<class T>
class Geo::GeoGenericTexture
A really simple texture where all elements are T.
Functions
Name | Description |
---|---|
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 | ||||
---|---|---|---|---|
|
void Geo::GeoGenericTexture< T >::AddRef
...
public: void AddRef()
...
Increments the reference count.
Anchor | ||||
---|---|---|---|---|
|
void Geo::GeoGenericTexture< T >::Clear
...
public: void Clear
(
const T & value
)
...
Clears the entire texture to the given value.
Anchor | ||||
---|---|---|---|---|
|
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 | ||||
---|---|---|---|---|
|
s32 Geo::GeoGenericTexture< T >::GetHeight
...
public: s32 GetHeight()
...
Gets the width/height of this texture.
Anchor | ||||
---|---|---|---|---|
|
T* Geo::GeoGenericTexture< T >::GetPixels
...
public: T * GetPixels()
...
Raw access to the pixel data.
Anchor | ||||
---|---|---|---|---|
|
s32 Geo::GeoGenericTexture< T >::GetWidth
...
public: s32 GetWidth()
...
Gets the width/height of this texture.
Anchor | ||||
---|---|---|---|---|
|
void Geo::GeoGenericTexture< T >::Release
...
public: void Release()
...
Decrements the reference count, and destroys this object if it has reached zero.
Anchor | ||||
---|---|---|---|---|
|
T Geo::GeoGenericTexture< T >::Sample
...
public: T Sample
(
s32 x,
s32 y
)
...
Read from the texture at the given location.
Anchor | ||||
---|---|---|---|---|
|
static GeoGenericTexture* Geo::GeoGenericTexture< T >::SerialiseFrom
...
public: GeoGenericTexture * SerialiseFrom
(
FILE * fd
)
...
Creates a texure by loading it from the given file.
Anchor | ||||
---|---|---|---|---|
|
bool Geo::GeoGenericTexture< T >::SerialiseTo
...
public: bool SerialiseTo
(
FILE * fd
)
...
Saves this texture to the given file.
Anchor | ||||
---|---|---|---|---|
|
void Geo::GeoGenericTexture< T >::SetSample
...
public: void SetSample
(
s32 x,
s32 y,
const T & value
)
...
Sets the value at the given location.