Eaagles::Basic::LcHls Class Reference

Inherits Eaagles::Basic::LcColor.

Inheritance diagram for Eaagles::Basic::LcHls:

Inheritance graph
[legend]
Collaboration diagram for Eaagles::Basic::LcHls:

Collaboration graph
[legend]
List of all members.

Public Types

enum  { HUE, LIGHTNESS, SATURATION }

Public Member Functions

 LcHls (const LCreal h, const LCreal l, const LCreal s)
 LcHls ()
LCreal hue () const
LCreal lightness () const
LCreal saturation () const
void getHLS (osg::Vec3 &hls) const
virtual bool setHue (LcNumber *const msg)
virtual bool setLightness (LcNumber *const msg)
virtual bool setSaturation (LcNumber *const msg)

Static Public Member Functions

static void hls2rgb (osg::Vec4 &rgb, const osg::Vec3 &hls)
static void rgb2hls (osg::Vec3 &hls, const osg::Vec4 &rgb)

Protected Attributes

osg::Vec3 hls

Static Private Member Functions

static LCreal value (LCreal n1, LCreal n2, LCreal hue)

Detailed Description

Defines a color by Hue, Saturation and Lightness.
    Form name: hls
    Slots:
       1. hue         (Number)  hue component (0.0 to 360.0)
       2. saturation  (Number)  saturation component (0.0 to 1.0)
       3. lightness   (Number)  lightness component (0.0 to 1.0)

    Note:  The operators osg::Vec3*() and osg::Vec4*(), (inherited from LcColor)
           return a const pointer to the RGBA color vector and not the
           HLS color vector.


Member Enumeration Documentation

anonymous enum

Enumerated: { HUE, LIGHTNESS, SATURATION } Used to index the HLS color vectors. Components of HLS color.

Enumerator:
HUE 
LIGHTNESS 
SATURATION 


Constructor & Destructor Documentation

Eaagles::Basic::LcHls::LcHls ( const LCreal  h,
const LCreal  l,
const LCreal  s 
)

Special constuctor that initializes the object to h, l, and s.

Eaagles::Basic::LcHls::LcHls (  ) 


Member Function Documentation

LCreal Eaagles::Basic::LcHls::hue (  )  const

Data access routine. Returns the hue component.

LCreal Eaagles::Basic::LcHls::lightness (  )  const

Data access routine. Returns the lightness component.

LCreal Eaagles::Basic::LcHls::saturation (  )  const

Data access routine. Returns the saturation component.

void Eaagles::Basic::LcHls::getHLS ( osg::Vec3 &  hls  )  const

Returns the HLS components in a vector.

bool Eaagles::Basic::LcHls::setHue ( LcNumber *const  msg  )  [virtual]

Sets the hue component.

bool Eaagles::Basic::LcHls::setLightness ( LcNumber *const  msg  )  [virtual]

Sets the lightness component.

bool Eaagles::Basic::LcHls::setSaturation ( LcNumber *const  msg  )  [virtual]

Sets the saturation component.

void Eaagles::Basic::LcHls::hls2rgb ( osg::Vec4 &  rgb,
const osg::Vec3 &  hls 
) [static]

Static function to convert HLS colors to RGB.

void Eaagles::Basic::LcHls::rgb2hls ( osg::Vec3 &  hls,
const osg::Vec4 &  rgb 
) [static]

Static function to convert RGB colors to HLS.

LCreal Eaagles::Basic::LcHls::value ( LCreal  n1,
LCreal  n2,
LCreal  hue 
) [static, private]


Member Data Documentation

osg::Vec3 Eaagles::Basic::LcHls::hls [protected]


Generated on Tue Dec 19 16:26:11 2006 for Eaagles by  doxygen 1.5.0