CImage Class Reference
[Utility classes]

This class represents an image. More...

#include <CImage.h>

List of all members.

Public Member Functions

 CImage (int w=-1, int h=-1)
 This is the CImage simple constructor.
 ~CImage ()
 This is the CImage simple destructor.
float & operator() (unsigned int i, unsigned int j, unsigned int k)
 This operator returns a reference to the color component corresponding to the coordinates.
const float & operator() (unsigned int i, unsigned int j, unsigned int k) const
 This operator returns a constant reference to the color component corresponding to the coordinates.
void Allocate (int w, int h)
 This function allocates an array of pixels of the desired size.
int WriteBmpFile (const std::string &FileName) const
 This function writes the CImage data to an image file.

Private Attributes

float * m_pPixels
int m_Width
int m_Height


Detailed Description

This class represents an image.

It holds an array containing the color of each pixel of an image.

Definition at line 21 of file CImage.h.


Constructor & Destructor Documentation

CImage::CImage ( int  w = -1,
int  h = -1 
) [inline]

This is the CImage simple constructor.

Definition at line 27 of file CImage.h.

References m_Height, m_pPixels, and m_Width.

CImage::~CImage (  )  [inline]

This is the CImage simple destructor.

Definition at line 46 of file CImage.h.

References m_pPixels.


Member Function Documentation

float& CImage::operator() ( unsigned int  i,
unsigned int  j,
unsigned int  k 
) [inline]

This operator returns a reference to the color component corresponding to the coordinates.

Definition at line 56 of file CImage.h.

References m_Height, m_pPixels, and m_Width.

const float& CImage::operator() ( unsigned int  i,
unsigned int  j,
unsigned int  k 
) const [inline]

This operator returns a constant reference to the color component corresponding to the coordinates.

Definition at line 67 of file CImage.h.

References m_Height, m_pPixels, and m_Width.

void CImage::Allocate ( int  w,
int  h 
) [inline]

This function allocates an array of pixels of the desired size.

Definition at line 78 of file CImage.h.

References m_Height, m_pPixels, and m_Width.


Member Data Documentation

float* CImage::m_pPixels [private]

Definition at line 94 of file CImage.h.

Referenced by Allocate(), CImage(), operator()(), and ~CImage().

int CImage::m_Width [private]

Array to the pixels data.

Definition at line 95 of file CImage.h.

Referenced by Allocate(), CImage(), operator()(), and WriteBmpFile().

int CImage::m_Height [private]

Width of the image.

Definition at line 96 of file CImage.h.

Referenced by Allocate(), CImage(), operator()(), and WriteBmpFile().


The documentation for this class was generated from the following files:
Generated on Fri Dec 5 03:20:33 2008 for Mathematical Ray-tracer by  doxygen 1.5.4