Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

FltPackedColor Class Reference

A packed color record, A, B, G, R. More...

#include <fltPackedColor.h>

List of all members.

Public Member Functions

 FltPackedColor ()
Colorf get_color () const
 Returns the four-component color as a Colorf, where each component is in the range [0, 1].

RGBColorf get_rgb () const
 Returns the three-component color as an RGBColorf (ignoring the alpha component), where each component is in the range [0, 1].

void set_color (const Colorf &color)
 Sets the color according to the indicated four-component Colorf value (including alpha).

void set_rgb (const RGBColorf &rgb)
 Sets the color according to the indicated three-component RGBColorf value, and set the alpha to 1.0.

void output (ostream &out) const
bool extract_record (FltRecordReader &reader)
bool build_record (FltRecordWriter &writer) const

Public Attributes

int _a
int _b
int _g
int _r


Detailed Description

A packed color record, A, B, G, R.

This appears, for instance, within a face bead.

Definition at line 42 of file fltPackedColor.h.


Constructor & Destructor Documentation

FltPackedColor::FltPackedColor  )  [inline]
 

Definition at line 37 of file fltPackedColor.I.


Member Function Documentation

bool FltPackedColor::build_record FltRecordWriter writer  )  const
 

Definition at line 65 of file fltPackedColor.cxx.

bool FltPackedColor::extract_record FltRecordReader reader  ) 
 

Definition at line 46 of file fltPackedColor.cxx.

Referenced by FltLocalVertexPool::FltLocalVertexPool().

Colorf FltPackedColor::get_color void   )  const [inline]
 

Returns the four-component color as a Colorf, where each component is in the range [0, 1].

Definition at line 55 of file fltPackedColor.I.

References _b, _g, _r, INLINE, and RGBColorf.

RGBColorf FltPackedColor::get_rgb  )  const [inline]
 

Returns the three-component color as an RGBColorf (ignoring the alpha component), where each component is in the range [0, 1].

Definition at line 72 of file fltPackedColor.I.

References _a, and _b.

void FltPackedColor::output ostream &  out  )  const
 

Definition at line 34 of file fltPackedColor.cxx.

References _a, _b, _g, _r, DatagramIterator::get_uint8(), and reader().

void FltPackedColor::set_color const Colorf color  )  [inline]
 

Sets the color according to the indicated four-component Colorf value (including alpha).

Definition at line 87 of file fltPackedColor.I.

References _a, and _b.

void FltPackedColor::set_rgb const RGBColorf rgb  )  [inline]
 

Sets the color according to the indicated three-component RGBColorf value, and set the alpha to 1.0.

Definition at line 107 of file fltPackedColor.I.


Member Data Documentation

int FltPackedColor::_a
 

Definition at line 56 of file fltPackedColor.h.

Referenced by get_rgb(), output(), and set_color().

int FltPackedColor::_b
 

Definition at line 57 of file fltPackedColor.h.

Referenced by get_color(), get_rgb(), FltHeader::get_rgb(), FltHeader::has_color_name(), output(), and set_color().

int FltPackedColor::_g
 

Definition at line 58 of file fltPackedColor.h.

Referenced by get_color(), FltHeader::get_rgb(), FltHeader::has_color_name(), and output().

int FltPackedColor::_r
 

Definition at line 59 of file fltPackedColor.h.

Referenced by get_color(), FltHeader::get_rgb(), FltHeader::has_color_name(), and output().


The documentation for this class was generated from the following files:
Generated on Fri May 2 03:26:53 2003 for Panda-Tool by doxygen1.3