Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

PLPixel24 Class Reference

24 bit pixel class. More...

#include <plpixel24.h>

Collaboration diagram for PLPixel24:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 PLPixel24 ()
 PLPixel24 (PLBYTE r, PLBYTE g, PLBYTE b)
void Set (PLBYTE r, PLBYTE g, PLBYTE b)
void SetR (PLBYTE r)
void SetG (PLBYTE g)
void SetB (PLBYTE b)
PLBYTE GetR () const
PLBYTE GetG () const
PLBYTE GetB () const
PLPixel24 operator= (const PLPixel32 Pix)
 operator PLPixel32 () const
bool operator== (const PLPixel24 &) const
bool operator!= (const PLPixel24 &) const
int BoxDist (const PLPixel24 Pix) const
 Simple and fast 'distance' between two pixels.

Static Public Member Functions

PLPixel24 Blend (int Factor, const PLPixel24 Pix1, const PLPixel24 Pix2)
 Returns a weighed average between two pixels.

Private Attributes

PLBYTE m_Data [3]

Detailed Description

24 bit pixel class.

A pixel in this class contains 8 bits each of red, green and blue. The order of the color components is OS-dependent and defined in config.h. This class is meant to be fast, so all methods are inlined.

Definition at line 22 of file plpixel24.h.


Constructor & Destructor Documentation

PLPixel24::PLPixel24  )  [inline]
 

Definition at line 70 of file plpixel24.h.

Referenced by Blend().

PLPixel24::PLPixel24 PLBYTE  r,
PLBYTE  g,
PLBYTE  b
[inline]
 

Definition at line 75 of file plpixel24.h.

References PLBYTE, and Set().

Here is the call graph for this function:


Member Function Documentation

PLPixel24 PLPixel24::Blend int  Factor,
const PLPixel24  Pix1,
const PLPixel24  Pix2
[inline, static]
 

Returns a weighed average between two pixels.

Factor must be between 0 and 256. Factor=256 means Pix1 is the result, Factor=0 means Pix2 is the result.

Definition at line 133 of file plpixel24.h.

References GetB(), GetG(), GetR(), PLASSERT, and PLPixel24().

Here is the call graph for this function:

int PLPixel24::BoxDist const PLPixel24  Pix  )  const [inline]
 

Simple and fast 'distance' between two pixels.

Just adds the distances between the color components and treats colors equally.

Definition at line 125 of file plpixel24.h.

References linalg::abs(), GetB(), GetG(), and GetR().

Here is the call graph for this function:

PLBYTE PLPixel24::GetB  )  const [inline]
 

Definition at line 119 of file plpixel24.h.

References m_Data, and PLBYTE.

Referenced by Blend(), BoxDist(), operator PLPixel32(), and operator==().

PLBYTE PLPixel24::GetG  )  const [inline]
 

Definition at line 113 of file plpixel24.h.

References m_Data, and PLBYTE.

Referenced by Blend(), BoxDist(), operator PLPixel32(), and operator==().

PLBYTE PLPixel24::GetR  )  const [inline]
 

Definition at line 107 of file plpixel24.h.

References m_Data, and PLBYTE.

Referenced by Blend(), BoxDist(), operator PLPixel32(), and operator==().

PLPixel24::operator PLPixel32  )  const [inline]
 

Definition at line 151 of file plpixel24.h.

References GetB(), GetG(), and GetR().

Here is the call graph for this function:

bool PLPixel24::operator!= const PLPixel24  )  const [inline]
 

Definition at line 161 of file plpixel24.h.

PLPixel24 PLPixel24::operator= const PLPixel32  Pix  )  [inline]
 

Definition at line 142 of file plpixel24.h.

References PLPixel32::GetB(), PLPixel32::GetG(), PLPixel32::GetR(), SetB(), SetG(), and SetR().

Here is the call graph for this function:

bool PLPixel24::operator== const PLPixel24  )  const [inline]
 

Definition at line 156 of file plpixel24.h.

References GetB(), GetG(), and GetR().

Here is the call graph for this function:

void PLPixel24::Set PLBYTE  r,
PLBYTE  g,
PLBYTE  b
[inline]
 

Definition at line 81 of file plpixel24.h.

References m_Data, and PLBYTE.

Referenced by PLPixel24().

void PLPixel24::SetB PLBYTE  b  )  [inline]
 

Definition at line 101 of file plpixel24.h.

References m_Data, and PLBYTE.

Referenced by operator=().

void PLPixel24::SetG PLBYTE  g  )  [inline]
 

Definition at line 95 of file plpixel24.h.

References m_Data, and PLBYTE.

Referenced by operator=().

void PLPixel24::SetR PLBYTE  r  )  [inline]
 

Definition at line 89 of file plpixel24.h.

References m_Data, and PLBYTE.

Referenced by operator=().


Member Data Documentation

PLBYTE PLPixel24::m_Data[3] [private]
 

Definition at line 67 of file plpixel24.h.

Referenced by GetB(), GetG(), GetR(), Set(), SetB(), SetG(), and SetR().


The documentation for this class was generated from the following file:
Generated on Wed Dec 15 21:21:01 2004 for vuVolume by  doxygen 1.3.9.1