Panda3D
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
FltPackedColor Class Reference

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

#include "fltPackedColor.h"

Public Member Functions

bool build_record (FltRecordWriter &writer) const
 
bool extract_record (FltRecordReader &reader)
 
LColor get_color () const
 Returns the four-component color as a LColor, where each component is in the range [0, 1].
 
LRGBColor get_rgb () const
 Returns the three-component color as an LRGBColor (ignoring the alpha component), where each component is in the range [0, 1].
 
void output (std::ostream &out) const
 
void set_color (const LColor &color)
 Sets the color according to the indicated four-component LColor value (including alpha).
 
void set_rgb (const LRGBColor &rgb)
 Sets the color according to the indicated three-component LRGBColor value, and set the alpha to 1.0.
 

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 29 of file fltPackedColor.h.

Constructor & Destructor Documentation

◆ FltPackedColor()

FltPackedColor::FltPackedColor ( )
inline

Definition at line 24 of file fltPackedColor.I.

Member Function Documentation

◆ build_record()

bool FltPackedColor::build_record ( FltRecordWriter & writer) const

Definition at line 44 of file fltPackedColor.cxx.

◆ extract_record()

bool FltPackedColor::extract_record ( FltRecordReader & reader)

Definition at line 29 of file fltPackedColor.cxx.

◆ get_color()

LColor FltPackedColor::get_color ( ) const
inline

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

Definition at line 36 of file fltPackedColor.I.

◆ get_rgb()

LRGBColor FltPackedColor::get_rgb ( ) const
inline

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

Definition at line 45 of file fltPackedColor.I.

◆ output()

void FltPackedColor::output ( std::ostream & out) const

Definition at line 21 of file fltPackedColor.cxx.

◆ set_color()

void FltPackedColor::set_color ( const LColor & color)
inline

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

Definition at line 54 of file fltPackedColor.I.

Referenced by FltLocalVertexPool::build_record().

◆ set_rgb()

void FltPackedColor::set_rgb ( const LRGBColor & rgb)
inline

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

Definition at line 66 of file fltPackedColor.I.

Referenced by FltGeometry::set_rgb(), and FltVertex::set_rgb().

Member Data Documentation

◆ _a

int FltPackedColor::_a

Definition at line 43 of file fltPackedColor.h.

◆ _b

int FltPackedColor::_b

Definition at line 44 of file fltPackedColor.h.

◆ _g

int FltPackedColor::_g

Definition at line 45 of file fltPackedColor.h.

◆ _r

int FltPackedColor::_r

Definition at line 46 of file fltPackedColor.h.


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