LLColor4U Class Reference

#include <v4coloru.h>

Collaboration diagram for LLColor4U:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LLColor4U ()
 LLColor4U (U8 r, U8 g, U8 b)
 LLColor4U (U8 r, U8 g, U8 b, U8 a)
 LLColor4U (const U8 *vec)
 LLColor4U (const LLSD &sd)
void setValue (const LLSD &sd)
const LLColor4U & operator= (const LLSD &sd)
LLSD getValue () const
const LLColor4U & setToBlack ()
const LLColor4U & setToWhite ()
const LLColor4U & setVec (U8 r, U8 g, U8 b, U8 a)
const LLColor4U & setVec (U8 r, U8 g, U8 b)
const LLColor4U & setVec (const LLColor4U &vec)
const LLColor4U & setVec (const U8 *vec)
const LLColor4U & setAlpha (U8 a)
F32 magVec () const
F32 magVecSquared () const
LLColor4U addClampMax (const LLColor4U &color)
LLColor4U multAll (const F32 k)
const LLColor4U & combine ()
void setVecScaleClamp (const LLColor3 &color)
void setVecScaleClamp (const LLColor4 &color)

Static Public Member Functions

static BOOL parseColor4U (const char *buf, LLColor4U *value)

Public Attributes

union {
   U8   mV [LENGTHOFCOLOR4U]
   U32   mAll
   LLColor4 *   mSources
   LLColor4U *   mSourcesU
}; 

Static Public Attributes

static LLColor4U white
static LLColor4U black
static LLColor4U red
static LLColor4U green
static LLColor4U blue

Friends

std::ostream & operator<< (std::ostream &s, const LLColor4U &a)
LLColor4U operator+ (const LLColor4U &a, const LLColor4U &b)
LLColor4U operator- (const LLColor4U &a, const LLColor4U &b)
LLColor4U operator * (const LLColor4U &a, const LLColor4U &b)
bool operator== (const LLColor4U &a, const LLColor4U &b)
bool operator!= (const LLColor4U &a, const LLColor4U &b)
const LLColor4U & operator+= (LLColor4U &a, const LLColor4U &b)
const LLColor4U & operator-= (LLColor4U &a, const LLColor4U &b)
const LLColor4U & operator *= (LLColor4U &a, U8 k)
const LLColor4U & operator%= (LLColor4U &a, U8 k)

Detailed Description

Definition at line 51 of file v4coloru.h.


Constructor & Destructor Documentation

LLColor4U::LLColor4U (  )  [inline]

Definition at line 145 of file v4coloru.h.

References mV, VW, VX, VY, and VZ.

Referenced by addClampMax(), and multAll().

LLColor4U::LLColor4U ( U8  r,
U8  g,
U8  b 
) [inline]

Definition at line 153 of file v4coloru.h.

References mV, VW, VX, VY, and VZ.

LLColor4U::LLColor4U ( U8  r,
U8  g,
U8  b,
U8  a 
) [inline]

Definition at line 161 of file v4coloru.h.

References mV, VW, VX, VY, and VZ.

LLColor4U::LLColor4U ( const U8 *  vec  )  [inline]

Definition at line 169 of file v4coloru.h.

References mV, VW, VX, VY, and VZ.

LLColor4U::LLColor4U ( const LLSD &  sd  )  [inline]

Definition at line 68 of file v4coloru.h.

References tut::sd(), and setValue().


Member Function Documentation

LLColor4U LLColor4U::addClampMax ( const LLColor4U &  color  )  [inline]

Definition at line 298 of file v4coloru.h.

References LLColor4U(), llmin(), mV, S32, VW, VX, VY, and VZ.

const LLColor4U& LLColor4U::combine (  ) 

LLSD LLColor4U::getValue (  )  const [inline]

Definition at line 87 of file v4coloru.h.

References mV.

Referenced by LLControlGroup::declareColor4U(), LLControlGroup::loadFromFile(), LLControlGroup::loadFromFileLegacy(), LLFloaterSettingsDebug::onCommitSettings(), and LLControlGroup::setColor4U().

F32 LLColor4U::magVec (  )  const [inline]

Definition at line 261 of file v4coloru.h.

References fsqrtf, mV, VX, VY, and VZ.

Referenced by distVec().

F32 LLColor4U::magVecSquared (  )  const [inline]

Definition at line 266 of file v4coloru.h.

References mV, VX, VY, and VZ.

Referenced by distVec_squared().

LLColor4U LLColor4U::multAll ( const F32  k  )  [inline]

Definition at line 306 of file v4coloru.h.

References LLColor4U(), llround(), mV, VW, VX, VY, and VZ.

const LLColor4U& LLColor4U::operator= ( const LLSD &  sd  )  [inline]

Definition at line 81 of file v4coloru.h.

References tut::sd(), and setValue().

BOOL LLColor4U::parseColor4U ( const char *  buf,
LLColor4U *  value 
) [static]

Definition at line 96 of file v4coloru.cpp.

References count, FALSE, i, NULL, S32, setVec(), TRUE, U8_MAX, and v.

Referenced by LLXmlTreeNode::getFastAttributeColor4U().

const LLColor4U & LLColor4U::setAlpha ( U8  a  )  [inline]

Definition at line 252 of file v4coloru.h.

References mV, and VW.

Referenced by LLVOSky::calculateColors().

const LLColor4U & LLColor4U::setToBlack (  )  [inline]

Definition at line 184 of file v4coloru.h.

References mV, VW, VX, VY, and VZ.

const LLColor4U & LLColor4U::setToWhite (  )  [inline]

Definition at line 193 of file v4coloru.h.

References mV, VW, VX, VY, and VZ.

void LLColor4U::setValue ( const LLSD &  sd  )  [inline]

Definition at line 73 of file v4coloru.h.

References mV, and tut::sd().

Referenced by LLColor4U(), operator=(), and LLFloaterSettingsDebug::updateControl().

const LLColor4U & LLColor4U::setVec ( const U8 *  vec  )  [inline]

Definition at line 243 of file v4coloru.h.

References mV, VW, VX, VY, and VZ.

const LLColor4U & LLColor4U::setVec ( const LLColor4U &  vec  )  [inline]

Definition at line 223 of file v4coloru.h.

References mV, VW, VX, VY, and VZ.

const LLColor4U & LLColor4U::setVec ( U8  r,
U8  g,
U8  b 
) [inline]

Definition at line 202 of file v4coloru.h.

References mV, VX, VY, and VZ.

const LLColor4U & LLColor4U::setVec ( U8  r,
U8  g,
U8  b,
U8  a 
) [inline]

Definition at line 214 of file v4coloru.h.

References mV.

Referenced by LLControlGroup::loadFromFileLegacy(), LLPartData::pack(), LLPrimitive::packTEMessage(), and parseColor4U().

void LLColor4U::setVecScaleClamp ( const LLColor4 &  color  )  [inline]

Definition at line 419 of file v4coloru.h.

References a, b, f, g, llmax(), llround(), mV, LLColor4::mV, r, and S32.

void LLColor4U::setVecScaleClamp ( const LLColor3 &  color  )  [inline]

Definition at line 474 of file v4coloru.h.

References b, f, g, llmax(), llround(), mV, LLColor3::mV, r, and S32.

Referenced by LLVOSurfacePatch::calcColor(), and LLFloaterSettingsDebug::onCommitSettings().


Friends And Related Function Documentation

LLColor4U operator * ( const LLColor4U &  a,
const LLColor4U &  b 
) [friend]

Definition at line 289 of file v4coloru.h.

const LLColor4U& operator *= ( LLColor4U &  a,
U8  k 
) [friend]

Definition at line 391 of file v4coloru.h.

bool operator!= ( const LLColor4U &  a,
const LLColor4U &  b 
) [friend]

Definition at line 365 of file v4coloru.h.

const LLColor4U& operator%= ( LLColor4U &  a,
U8  k 
) [friend]

Definition at line 400 of file v4coloru.h.

LLColor4U operator+ ( const LLColor4U &  a,
const LLColor4U &  b 
) [friend]

Definition at line 271 of file v4coloru.h.

const LLColor4U& operator+= ( LLColor4U &  a,
const LLColor4U &  b 
) [friend]

Definition at line 373 of file v4coloru.h.

LLColor4U operator- ( const LLColor4U &  a,
const LLColor4U &  b 
) [friend]

Definition at line 280 of file v4coloru.h.

const LLColor4U& operator-= ( LLColor4U &  a,
const LLColor4U &  b 
) [friend]

Definition at line 382 of file v4coloru.h.

std::ostream& operator<< ( std::ostream &  s,
const LLColor4U &  a 
) [friend]

Definition at line 89 of file v4coloru.cpp.

bool operator== ( const LLColor4U &  a,
const LLColor4U &  b 
) [friend]

Definition at line 357 of file v4coloru.h.


Member Data Documentation

union { ... }

LLColor4U LLColor4U::black [static]

Definition at line 133 of file v4coloru.h.

LLColor4U LLColor4U::blue [static]

Definition at line 136 of file v4coloru.h.

LLColor4U LLColor4U::green [static]

Definition at line 135 of file v4coloru.h.

U32 LLColor4U::mAll

Definition at line 58 of file v4coloru.h.

Referenced by LLSkyTex::create(), LLImageRaw::fill(), LLSkyTex::getPixel(), LLNetMap::renderPoint(), and LLSkyTex::setPixel().

LLColor4* LLColor4U::mSources

Definition at line 59 of file v4coloru.h.

LLColor4U* LLColor4U::mSourcesU

Definition at line 60 of file v4coloru.h.

U8 LLColor4U::mV[LENGTHOFCOLOR4U]

Definition at line 57 of file v4coloru.h.

Referenced by addClampMax(), LLViewerParcelOverlay::addPropertyLine(), LLSurface::createWaterTexture(), LLImageRaw::fill(), LLSurface::generateWaterTexture(), LLXMLNode::getAttributeColor4U(), LLFace::getGeometryVolume(), getValue(), LLColor4::LLColor4(), LLColor4U(), LLWorld::LLWorld(), magVec(), magVecSquared(), multAll(), LLFloaterSettingsDebug::onCommitSettings(), LLDataPackerAsciiFile::packColor4U(), LLDataPackerAsciiBuffer::packColor4U(), LLDataPackerBinaryBuffer::packColor4U(), LLHUDEffect::packData(), LLPrimitive::packTEMessage(), LLCubeMap::paintIn(), LLViewerObject::processUpdateMessage(), LLHUDEffectBeam::render(), LLViewerParcelMgr::renderCollisionSegments(), LLFace::renderForSelect(), LLDrawPoolAvatar::renderForSelect(), LLHUDIcon::renderIcon(), LLHUDText::renderText(), setAlpha(), LLFacePool::LLOverrideFaceColor::setColor(), setToBlack(), setToWhite(), setValue(), setVec(), LLColor4::setVec(), setVecScaleClamp(), LLDataPackerAsciiFile::unpackColor4U(), LLDataPackerAsciiBuffer::unpackColor4U(), LLDataPackerBinaryBuffer::unpackColor4U(), LLHUDEffect::unpackData(), LLPrimitive::unpackTEMessage(), LLFloaterSettingsDebug::updateControl(), LLViewerParcelOverlay::updateOverlayTexture(), LLViewerParcelOverlay::updatePropertyLines(), and LLVOAvatar::writeCAL3D().

LLColor4U LLColor4U::red [static]

Definition at line 134 of file v4coloru.h.

LLColor4U LLColor4U::white [static]

Definition at line 132 of file v4coloru.h.

Referenced by LLControlGroup::getColor4U(), LLControlGroup::loadFromFile(), LLControlGroup::loadFromFileLegacy(), and LLVOAvatar::writeCAL3D().


The documentation for this class was generated from the following files:
Generated on Thu Jul 1 06:11:13 2010 for Second Life Viewer by  doxygen 1.4.7