Versions Compared

Key

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

class Geo::GeoV128Texture

    └>Geo::GeoRefCount

A really simple texture where all elements are float vectors.

Functions

NameDescription
~GeoRefCount()

Virtual destructor required to make sure that the concrete class destructor gets called.

AddRef()

Increments the reference count and return new value.

ClearToValue(v128)

Clear all pixels in this texture to the given value.

CopyUnscaled(GeoV128Texture *, GeoV128Texture *, GeoRect, GeoRect)

Copy a block from one texture to a different texture.

CopyUnscaledFromBuffer(v128 *, u32, GeoV128Texture *, GeoRect, GeoRect)

Copies from a buffer of V128s with given pitch, rather than a texture.

CopyUnscaledWithDestinationMask(GeoV128Texture *, GeoV128Texture *, GeoRect, GeoRect, GeoV128Texture *)

Copy a block from one texture to a different texture, with a mask specified in the destination texture space.

CopyUnscaledWithSourceMask(GeoV128Texture *, GeoV128Texture *, GeoRect, GeoRect, GeoV128Texture *)

Copy a block from one texture to a different texture, with a mask specified in the source texture space.

Create(s32, s32)

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

DeserialiseFrom(FILE *)

Serialise in and out.

Downsample(GeoV128Texture *)

Dest is half the size of source. Takes the average of the four values.

DrawRect(s32, s32, s32, s32, v128)

For debugging purposes.

Exists(s32, s32)

Return true if [x,y] is contained with the image.

GeoRefCount()

Default constructor. The reference count is initially zero.

GetHeight()

Return the height of this image.

GetPixels()

Return a raw pointer to the start of the pixel array.

GetPixels()

Return a const raw pointer to the start of the pixel array.

GetWidth()

Return the width of this image.

IsValid()

Checks if this texture has valid data.

MaskedIn(s32, s32)

Return true if (x, y) is in bounds for this texture, and the value of the x component is positive.

MultiplyBy(v128)

Multiply all pixels in this texture by the given value.

OutputToPFM(const char *)

Output for debugging purposes.

Release()

Decrements the reference count, deleting the object if it reaches zero.

Sample(s32, s32)

Return the Sample at position [x,y].

SerialiseTo(FILE *)

Serialise in and out.

SetSample(s32, s32, v128)

For debugging purposes.

Variables

NameDescription
s32 m_RefCount

The reference count, once it reaches zero the object deletes itself.


Anchor
a9af10d210d8dee5f975c23c0be4c7b63
a9af10d210d8dee5f975c23c0be4c7b63

virtual Geo::GeoRefCount::~GeoRefCount

...

public: virtual ~GeoRefCount()

...

Virtual destructor required to make sure that the concrete class destructor gets called.


Anchor
a8d0095fb588cfcd18249fa0e48cc53d3
a8d0095fb588cfcd18249fa0e48cc53d3

s32 Geo::GeoRefCount::AddRef

...

public: s32 AddRef()

...

Increments the reference count and return new value.

Returns

New value of reference count.


Anchor
ab8ee51ae4a0ad745959350b0d2cd31eb
ab8ee51ae4a0ad745959350b0d2cd31eb

void Geo::GeoV128Texture::ClearToValue

...

public: void ClearToValue
(
    v128 v
)

...

Clear all pixels in this texture to the given value.


Anchor
ac3ab7404ed49ac30519b20328ecb4996
ac3ab7404ed49ac30519b20328ecb4996

static bool Geo::GeoV128Texture::CopyUnscaled

...

public: bool CopyUnscaled
(
    GeoV128Texture * source,
    GeoV128Texture * target,
    GeoRect sourceBB,
    GeoRect targetBB
)

...

Copy a block from one texture to a different texture.

It expects a one to one correspondence between the pixels in each bounding box - no scaling is applied and it will return false if this isn't met. All parameters must be valid.


Anchor
af0968d2dde33492d3096188aeb39a05c
af0968d2dde33492d3096188aeb39a05c

static bool Geo::GeoV128Texture::CopyUnscaledFromBuffer

...

public: bool CopyUnscaledFromBuffer
(
    v128 * source,
    u32 sourcePitch,
    GeoV128Texture * target,
    GeoRect sourceBB,
    GeoRect targetBB
)

...

Copies from a buffer of V128s with given pitch, rather than a texture.

Otherwise the same as CopyUnscaled


Anchor
a2f7969f67bb2d337d24fd95de038fed3
a2f7969f67bb2d337d24fd95de038fed3

static bool Geo::GeoV128Texture::CopyUnscaledWithDestinationMask

...

public: bool CopyUnscaledWithDestinationMask
(
    GeoV128Texture * source,
    GeoV128Texture * target,
    GeoRect sourceBB,
    GeoRect targetBB,
    GeoV128Texture * mask
)

...

Copy a block from one texture to a different texture, with a mask specified in the destination texture space.

Same as CopyUnscaled but only copies where the mask is non-zero in the X co-ord.


Anchor
a158b144e2e00b3225e6a246980b30e31
a158b144e2e00b3225e6a246980b30e31

static bool Geo::GeoV128Texture::CopyUnscaledWithSourceMask

...

public: bool CopyUnscaledWithSourceMask
(
    GeoV128Texture * source,
    GeoV128Texture * target,
    GeoRect sourceBB,
    GeoRect targetBB,
    GeoV128Texture * mask
)

...

Copy a block from one texture to a different texture, with a mask specified in the source texture space.

Same as CopyUnscaled but only copies where the mask is non-zero in the X co-ord.


Anchor
a04eae18c56aa88e81935f195ffe09a9b
a04eae18c56aa88e81935f195ffe09a9b

static GeoV128Texture* Geo::GeoV128Texture::Create

...

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

...

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

So no need to AddRef it immediately.


Anchor
a599fa196d38d3bbe16ed9598b890f48f
a599fa196d38d3bbe16ed9598b890f48f

void Geo::GeoV128Texture::DeserialiseFrom

...

public: void DeserialiseFrom
(
    FILE * fp
)

...

Serialise in and out.


Anchor
aac0dd7d8de9b8df4c90167724a63b539
aac0dd7d8de9b8df4c90167724a63b539

void Geo::GeoV128Texture::Downsample

...

public: void Downsample
(
    GeoV128Texture * dest
) const

...

Dest is half the size of source. Takes the average of the four values.


Anchor
ae734fe68cf813f428502e504d821944e
ae734fe68cf813f428502e504d821944e

void Geo::GeoV128Texture::DrawRect

...

public: void DrawRect
(
    s32 x,
    s32 y,
    s32 w,
    s32 h,
    v128 value
)

...

For debugging purposes.


Anchor
a88d855f91ba12ed71846b65677bc079e
a88d855f91ba12ed71846b65677bc079e

bool Geo::GeoV128Texture::Exists

...

public: bool Exists
(
    s32 x,
    s32 y
) const

...

Return true if [x,y] is contained with the image.


Anchor
a99c8112957fc10e563e95dc29cdeb08a
a99c8112957fc10e563e95dc29cdeb08a

Geo::GeoRefCount::GeoRefCount

...

public: GeoRefCount()

...

Default constructor. The reference count is initially zero.


Anchor
aadddceffc6ed74bf9614d21c501d5d6b
aadddceffc6ed74bf9614d21c501d5d6b

s32 Geo::GeoV128Texture::GetHeight

...

public: s32 GetHeight() const

...

Return the height of this image.


Anchor
accb8456db6140e4b2fe034143d45f05d
accb8456db6140e4b2fe034143d45f05d

v128* Geo::GeoV128Texture::GetPixels

...

public: v128 * GetPixels()

...

Return a raw pointer to the start of the pixel array.


Anchor
aa64522a82257bb86cd86c4b38e28090a
aa64522a82257bb86cd86c4b38e28090a

const v128* Geo::GeoV128Texture::GetPixels

...

public: const v128 * GetPixels() const

...

Return a const raw pointer to the start of the pixel array.


Anchor
a1d17e98c3645113b378d802cec9c6718
a1d17e98c3645113b378d802cec9c6718

s32 Geo::GeoV128Texture::GetWidth

...

public: s32 GetWidth() const

...

Return the width of this image.


Anchor
a16441c52c874e0e08f5ebf711a236527
a16441c52c874e0e08f5ebf711a236527

bool Geo::GeoV128Texture::IsValid

...

public: bool IsValid() const

...

Checks if this texture has valid data.


Anchor
acccedc015458c2f95ea73a1fea84cbff
acccedc015458c2f95ea73a1fea84cbff

bool Geo::GeoV128Texture::MaskedIn

...

public: bool MaskedIn
(
    s32 x,
    s32 y
) const

...

Return true if (x, y) is in bounds for this texture, and the value of the x component is positive.


Anchor
a5f6641bf62f7dd5864e6c9f7ce6421bd
a5f6641bf62f7dd5864e6c9f7ce6421bd

void Geo::GeoV128Texture::MultiplyBy

...

public: void MultiplyBy
(
    v128 multiplicand
)

...

Multiply all pixels in this texture by the given value.


Anchor
ad1de2cca887de7eb25bde2286d7b6b3a
ad1de2cca887de7eb25bde2286d7b6b3a

bool Geo::GeoV128Texture::OutputToPFM

...

public: bool OutputToPFM
(
    const char * filename
) const

...

Output for debugging purposes.


Anchor
a1c645a8988542a364c082b58bd2f8e46
a1c645a8988542a364c082b58bd2f8e46

s32 Geo::GeoRefCount::Release

...

public: s32 Release()

...

Decrements the reference count, deleting the object if it reaches zero.

Returns

Returns reference count after decrement. 0 if deleted.


Anchor
ae2adc12ed345ba9a7a43ab5384b4a750
ae2adc12ed345ba9a7a43ab5384b4a750

v128 Geo::GeoV128Texture::Sample

...

public: v128 Sample
(
    s32 x,
    s32 y
) const

...

Return the Sample at position [x,y].


Anchor
a49b2a8593f1fe839a1f5f23b06819b53
a49b2a8593f1fe839a1f5f23b06819b53

bool Geo::GeoV128Texture::SerialiseTo

...

public: bool SerialiseTo
(
    FILE * fp
) const

...

Serialise in and out.


Anchor
aae7d2a0d336c64238705cc0ba60877dd
aae7d2a0d336c64238705cc0ba60877dd

void Geo::GeoV128Texture::SetSample

...

public: void SetSample
(
    s32 x,
    s32 y,
    v128 value
)

...

For debugging purposes.