xoreos  0.0.5
Public Member Functions | Public Attributes | List of all members
Graphics::ImageDecoder::MipMap Struct Reference

A mip map. More...

#include <decoder.h>

Collaboration diagram for Graphics::ImageDecoder::MipMap:
Collaboration graph
[legend]

Public Member Functions

 MipMap (const ImageDecoder *i=0)
 
 MipMap (const MipMap &mipMap, const ImageDecoder *i=0)
 
 ~MipMap ()
 
void swap (MipMap &right)
 
void getPixel (int x, int y, float &r, float &g, float &b, float &a) const
 Get the color values of the pixel at this position. More...
 
void getPixel (int n, float &r, float &g, float &b, float &a) const
 Get the color values of the pixel at this index. More...
 
void setPixel (int x, int y, float r, float g, float b, float a)
 Set the color values of the pixel at this position. More...
 
void setPixel (int n, float r, float g, float b, float a)
 Set the color values of the pixel at this index. More...
 

Public Attributes

int width
 The mip map's width. More...
 
int height
 The mip map's height. More...
 
uint32 size
 The mip map's size in bytes. More...
 
Common::ScopedArray< bytedata
 The mip map's data. More...
 
const ImageDecoderimage
 The image the mip map belongs to. More...
 

Detailed Description

A mip map.

Definition at line 51 of file decoder.h.

Constructor & Destructor Documentation

◆ MipMap() [1/2]

Graphics::ImageDecoder::MipMap::MipMap ( const ImageDecoder i = 0)

Definition at line 41 of file decoder.cpp.

◆ MipMap() [2/2]

Graphics::ImageDecoder::MipMap::MipMap ( const MipMap mipMap,
const ImageDecoder i = 0 
)

Definition at line 44 of file decoder.cpp.

References data, Common::ScopedPtrBase< T, Deallocator >::get(), Common::ScopedPtrBase< T, Deallocator >::reset(), and size.

Here is the call graph for this function:

◆ ~MipMap()

Graphics::ImageDecoder::MipMap::~MipMap ( )

Definition at line 52 of file decoder.cpp.

Member Function Documentation

◆ getPixel() [1/2]

void Graphics::ImageDecoder::MipMap::getPixel ( int  x,
int  y,
float &  r,
float &  g,
float &  b,
float &  a 
) const

Get the color values of the pixel at this position.

Definition at line 64 of file decoder.cpp.

Referenced by Graphics::Aurora::ModelNode_NWN2::createTint().

Here is the caller graph for this function:

◆ getPixel() [2/2]

void Graphics::ImageDecoder::MipMap::getPixel ( int  n,
float &  r,
float &  g,
float &  b,
float &  a 
) const

Get the color values of the pixel at this index.

Definition at line 68 of file decoder.cpp.

References Graphics::kPixelFormatBGR, Graphics::kPixelFormatBGRA, Graphics::kPixelFormatRGB, and Graphics::kPixelFormatRGBA.

◆ setPixel() [1/2]

void Graphics::ImageDecoder::MipMap::setPixel ( int  x,
int  y,
float  r,
float  g,
float  b,
float  a 
)

Set the color values of the pixel at this position.

Definition at line 97 of file decoder.cpp.

Referenced by Graphics::Aurora::ModelNode_NWN2::createTint().

Here is the caller graph for this function:

◆ setPixel() [2/2]

void Graphics::ImageDecoder::MipMap::setPixel ( int  n,
float  r,
float  g,
float  b,
float  a 
)

Set the color values of the pixel at this index.

Definition at line 101 of file decoder.cpp.

References CLIP(), Graphics::kPixelFormatBGR, Graphics::kPixelFormatBGRA, Graphics::kPixelFormatRGB, and Graphics::kPixelFormatRGBA.

Here is the call graph for this function:

◆ swap()

void Graphics::ImageDecoder::MipMap::swap ( MipMap right)

Definition at line 55 of file decoder.cpp.

References data, height, image, size, SWAP(), and width.

Referenced by Graphics::ImageDecoder::decompress().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ data

Common::ScopedArray<byte> Graphics::ImageDecoder::MipMap::data

◆ height

int Graphics::ImageDecoder::MipMap::height

◆ image

const ImageDecoder* Graphics::ImageDecoder::MipMap::image

The image the mip map belongs to.

Definition at line 58 of file decoder.h.

Referenced by swap().

◆ size

uint32 Graphics::ImageDecoder::MipMap::size

◆ width

int Graphics::ImageDecoder::MipMap::width

The documentation for this struct was generated from the following files: