Eaagles::Basic::LcHsv Class Reference

Inherits Eaagles::Basic::LcColor.

Inherited by Eaagles::Basic::LcHsva.

Inheritance diagram for Eaagles::Basic::LcHsv:

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

Collaboration graph
[legend]
List of all members.

Public Types

enum  { HUE, SATURATION, VALUE }

Public Member Functions

 LcHsv (const LCreal h, const LCreal s, const LCreal v)
 LcHsv ()
LCreal hue () const
LCreal saturation () const
LCreal value () const
void getHSV (osg::Vec3 &vec) const
bool setHSV (const osg::Vec3 &vec)
virtual bool setHue (LcNumber *const msg)
virtual bool setSaturation (LcNumber *const msg)
virtual bool setValue (LcNumber *const msg)
virtual bool setAlpha (LcNumber *const msg)

Static Public Member Functions

static void hsv2rgb (osg::Vec4 &rgb, const osg::Vec4 &hsv)
static void hsv2rgb (osg::Vec3 &rgb, const osg::Vec3 &hsv)
static void rgb2hsv (osg::Vec4 &hsv, const osg::Vec4 &rgb)
static void rgb2hsv (osg::Vec3 &hsv, const osg::Vec3 &rgb)

Protected Member Functions

void getHSVA (osg::Vec4 &hsva) const
bool setHSVA (const osg::Vec4 &vec)

Protected Attributes

osg::Vec4 hsv

Detailed Description

1. hue (Number) Set the hue component (0.0 to 360.0) 2. saturation (Number) Set the saturation component (0.0 to 1.0) 3. value (Number) Set the value 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 HSVA color vector.


Member Enumeration Documentation

anonymous enum

Enumerated: { HUE, SATURATION, VALUE, ALPHA }Used to index the HSV color vectors. Components of HSV color.

Enumerator:
HUE 
SATURATION 
VALUE 


Constructor & Destructor Documentation

Eaagles::Basic::LcHsv::LcHsv ( const LCreal  h,
const LCreal  s,
const LCreal  v 
)

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

Eaagles::Basic::LcHsv::LcHsv (  ) 


Member Function Documentation

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

Returns the Hue value (0.0 to 360.0) (see Hsv.h).

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

Returns the Saturation: 0.0 (white) to 1.0 (pure color).

LCreal Eaagles::Basic::LcHsv::value (  )  const

Value: 0.0 (black) to 1.0 (full).

void Eaagles::Basic::LcHsv::getHSV ( osg::Vec3 &  vec  )  const

Returns the HSV components in a vector.

bool Eaagles::Basic::LcHsv::setHSV ( const osg::Vec3 &  vec  ) 

Sets the hsv vector.

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

Sets the hue (see Hsv.h).

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

Sets the saturation (see Hsv.h).

bool Eaagles::Basic::LcHsv::setValue ( LcNumber *const  msg  )  [virtual]

Sets the value (see Hsv.h).

bool Eaagles::Basic::LcHsv::setAlpha ( LcNumber *const  msg  )  [virtual]

sets the alpha value

void Eaagles::Basic::LcHsv::hsv2rgb ( osg::Vec4 &  rgb,
const osg::Vec4 &  hsv 
) [static]

Converts an HSVA color vector to a RGBA color vector.

void Eaagles::Basic::LcHsv::hsv2rgb ( osg::Vec3 &  rgb,
const osg::Vec3 &  hsv 
) [static]

Converts an HSV color vector to a RGB color vector.

void Eaagles::Basic::LcHsv::rgb2hsv ( osg::Vec4 &  hsv,
const osg::Vec4 &  rgb 
) [static]

Converts a RGBA color vector to a HSVA color vector.

void Eaagles::Basic::LcHsv::rgb2hsv ( osg::Vec3 &  hsv,
const osg::Vec3 &  rgb 
) [static]

Converts a RGB color vector to a HSV color vector.

void Eaagles::Basic::LcHsv::getHSVA ( osg::Vec4 &  hsva  )  const [protected]

Reimplemented in Eaagles::Basic::LcHsva.

bool Eaagles::Basic::LcHsv::setHSVA ( const osg::Vec4 &  vec  )  [protected]

Reimplemented in Eaagles::Basic::LcHsva.


Member Data Documentation

osg::Vec4 Eaagles::Basic::LcHsv::hsv [protected]


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