LLColor4 Class Reference

#include <v4color.h>

Collaboration diagram for LLColor4:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 LLColor4 ()
 LLColor4 (F32 r, F32 g, F32 b)
 LLColor4 (F32 r, F32 g, F32 b, F32 a)
 LLColor4 (U32 clr)
 LLColor4 (const F32 *vec)
 LLColor4 (const LLColor3 &vec, F32 a=1.f)
 LLColor4 (const LLSD &sd)
 LLColor4 (const LLColor4U &color4u)
 LLColor4 (const LLVector4 &vector4)
LLSD getValue () const
void setValue (const LLSD &sd)
void calcHSL (F32 *hue, F32 *saturation, F32 *luminance) const
const LLColor4setToBlack ()
const LLColor4setToWhite ()
const LLColor4setVec (F32 r, F32 g, F32 b, F32 a)
const LLColor4setVec (F32 r, F32 g, F32 b)
const LLColor4setVec (const LLColor4 &vec)
const LLColor4setVec (const LLColor3 &vec)
const LLColor4setVec (const LLColor3 &vec, F32 a)
const LLColor4setVec (const F32 *vec)
const LLColor4setVec (const LLColor4U &color4u)
const LLColor4setAlpha (F32 a)
F32 magVec () const
F32 magVecSquared () const
F32 normVec ()
BOOL isOpaque ()
F32 operator[] (int idx) const
F32operator[] (int idx)
const LLColor4operator= (const LLColor3 &a)
const LLColor4operator= (const LLSD &sd)
 operator const LLColor4U () const
void clamp ()

Static Public Member Functions

static BOOL parseColor (const char *buf, LLColor4 *color)
static BOOL parseColor4 (const char *buf, LLColor4 *color)

Public Attributes

F32 mV [LENGTHOFCOLOR4]

Static Public Attributes

static LLColor4 red
static LLColor4 green
static LLColor4 blue
static LLColor4 black
static LLColor4 white
static LLColor4 yellow
static LLColor4 magenta
static LLColor4 cyan
static LLColor4 smoke
static LLColor4 grey
static LLColor4 orange
static LLColor4 purple
static LLColor4 pink
static LLColor4 transparent
static LLColor4 grey1
static LLColor4 grey2
static LLColor4 grey3
static LLColor4 grey4
static LLColor4 red1
static LLColor4 red2
static LLColor4 red3
static LLColor4 red4
static LLColor4 red5
static LLColor4 green1
static LLColor4 green2
static LLColor4 green3
static LLColor4 green4
static LLColor4 green5
static LLColor4 green6
static LLColor4 blue1
static LLColor4 blue2
static LLColor4 blue3
static LLColor4 blue4
static LLColor4 blue5
static LLColor4 blue6
static LLColor4 yellow1
static LLColor4 yellow2
static LLColor4 yellow3
static LLColor4 yellow4
static LLColor4 yellow5
static LLColor4 yellow6
static LLColor4 yellow7
static LLColor4 yellow8
static LLColor4 yellow9
static LLColor4 orange1
static LLColor4 orange2
static LLColor4 orange3
static LLColor4 orange4
static LLColor4 orange5
static LLColor4 orange6
static LLColor4 magenta1
static LLColor4 magenta2
static LLColor4 magenta3
static LLColor4 magenta4
static LLColor4 purple1
static LLColor4 purple2
static LLColor4 purple3
static LLColor4 purple4
static LLColor4 purple5
static LLColor4 purple6
static LLColor4 pink1
static LLColor4 pink2
static LLColor4 cyan1
static LLColor4 cyan2
static LLColor4 cyan3
static LLColor4 cyan4
static LLColor4 cyan5
static LLColor4 cyan6

Friends

std::ostream & operator<< (std::ostream &s, const LLColor4 &a)
LLColor4 operator+ (const LLColor4 &a, const LLColor4 &b)
LLColor4 operator- (const LLColor4 &a, const LLColor4 &b)
LLColor4 operator* (const LLColor4 &a, const LLColor4 &b)
LLColor4 operator* (const LLColor4 &a, F32 k)
LLColor4 operator* (F32 k, const LLColor4 &a)
LLColor4 operator% (const LLColor4 &a, F32 k)
LLColor4 operator% (F32 k, const LLColor4 &a)
bool operator== (const LLColor4 &a, const LLColor4 &b)
bool operator!= (const LLColor4 &a, const LLColor4 &b)
bool operator== (const LLColor4 &a, const LLColor3 &b)
bool operator!= (const LLColor4 &a, const LLColor3 &b)
const LLColor4operator+= (LLColor4 &a, const LLColor4 &b)
const LLColor4operator-= (LLColor4 &a, const LLColor4 &b)
const LLColor4operator*= (LLColor4 &a, F32 k)
const LLColor4operator%= (LLColor4 &a, F32 k)
const LLColor4operator*= (LLColor4 &a, const LLColor4 &b)


Detailed Description

Definition at line 50 of file v4color.h.


Constructor & Destructor Documentation

LLColor4::LLColor4 ( void   )  [inline]

Definition at line 228 of file v4color.h.

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

Referenced by lerp(), operator%(), operator*(), operator+(), and operator-().

Here is the caller graph for this function:

LLColor4::LLColor4 ( F32  r,
F32  g,
F32  b 
) [inline]

Definition at line 241 of file v4color.h.

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

LLColor4::LLColor4 ( F32  r,
F32  g,
F32  b,
F32  a 
) [inline]

Definition at line 249 of file v4color.h.

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

LLColor4::LLColor4 ( U32  clr  )  [inline]

Definition at line 257 of file v4color.h.

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

LLColor4::LLColor4 ( const F32 vec  )  [inline]

Definition at line 266 of file v4color.h.

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

LLColor4::LLColor4 ( const LLColor3 vec,
F32  a = 1.f 
)

Definition at line 139 of file v4color.cpp.

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

LLColor4::LLColor4 ( const LLSD sd  )  [inline]

Definition at line 236 of file v4color.h.

LLColor4::LLColor4 ( const LLColor4U color4u  )  [explicit]

Definition at line 147 of file v4color.cpp.

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

LLColor4::LLColor4 ( const LLVector4 vector4  )  [explicit]

Definition at line 156 of file v4color.cpp.

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


Member Function Documentation

LLSD LLColor4::getValue (  )  const [inline]

void LLColor4::setValue ( const LLSD sd  )  [inline]

Definition at line 74 of file v4color.h.

References mV.

Referenced by LLFloaterSettingsDebug::updateControl().

Here is the caller graph for this function:

void LLColor4::calcHSL ( F32 hue,
F32 saturation,
F32 luminance 
) const

Definition at line 239 of file v4color.cpp.

References H, mV, VBLUE, VGREEN, and VRED.

Referenced by LLFloaterColorPicker::getComplimentaryColor(), and LLFontGL::render().

Here is the caller graph for this function:

const LLColor4 & LLColor4::setToBlack ( void   )  [inline]

Definition at line 274 of file v4color.h.

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

Referenced by LLSkyTex::initEmpty().

Here is the caller graph for this function:

const LLColor4 & LLColor4::setToWhite ( void   )  [inline]

Definition at line 283 of file v4color.h.

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

Referenced by LLTexLayer::findNetColor(), get_text_color(), and LLLightParams::LLLightParams().

Here is the caller graph for this function:

const LLColor4 & LLColor4::setVec ( F32  r,
F32  g,
F32  b,
F32  a 
) [inline]

const LLColor4 & LLColor4::setVec ( F32  r,
F32  g,
F32  b 
) [inline]

Definition at line 292 of file v4color.h.

References mV, VX, VY, and VZ.

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

Definition at line 313 of file v4color.h.

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

const LLColor4 & LLColor4::setVec ( const LLColor3 vec  ) 

Definition at line 174 of file v4color.cpp.

References LLColor3::mV, mV, VX, VY, and VZ.

const LLColor4 & LLColor4::setVec ( const LLColor3 vec,
F32  a 
)

Definition at line 186 of file v4color.cpp.

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

const LLColor4 & LLColor4::setVec ( const F32 vec  )  [inline]

Definition at line 323 of file v4color.h.

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

const LLColor4 & LLColor4::setVec ( const LLColor4U color4u  ) 

Definition at line 164 of file v4color.cpp.

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

const LLColor4 & LLColor4::setAlpha ( F32  a  )  [inline]

Definition at line 332 of file v4color.h.

References mV, and VW.

Referenced by LLVOSky::calcAtmospherics(), LLTextureBar::draw(), LLMemoryView::draw(), LLVOAvatar::idleUpdate(), LLHUDText::renderText(), and LLVOSky::updateFog().

Here is the caller graph for this function:

F32 LLColor4::magVec ( void   )  const [inline]

Definition at line 340 of file v4color.h.

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

Referenced by distVec().

Here is the caller graph for this function:

F32 LLColor4::magVecSquared ( void   )  const [inline]

Definition at line 345 of file v4color.h.

References mV, VX, VY, and VZ.

Referenced by distVec_squared().

Here is the caller graph for this function:

F32 LLColor4::normVec ( void   )  [inline]

Definition at line 350 of file v4color.h.

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

BOOL LLColor4::isOpaque (  )  [inline]

Definition at line 101 of file v4color.h.

References mV, and VALPHA.

F32 LLColor4::operator[] ( int  idx  )  const [inline]

Definition at line 103 of file v4color.h.

References mV.

F32& LLColor4::operator[] ( int  idx  )  [inline]

Definition at line 104 of file v4color.h.

References mV.

const LLColor4 & LLColor4::operator= ( const LLColor3 a  ) 

Definition at line 195 of file v4color.cpp.

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

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

Definition at line 556 of file v4color.h.

References mV.

LLColor4::operator const LLColor4U (  )  const

Definition at line 130 of file v4color.cpp.

References llclampb(), llround(), mV, VALPHA, VBLUE, VGREEN, and VRED.

Here is the call graph for this function:

BOOL LLColor4::parseColor ( const char *  buf,
LLColor4 color 
) [static]

BOOL LLColor4::parseColor4 ( const char *  buf,
LLColor4 color 
) [static]

Definition at line 618 of file v4color.cpp.

References FALSE, mV, NULL, S32, setVec(), and TRUE.

Referenced by LLXmlTreeNode::getFastAttributeColor4().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLColor4::clamp (  )  [inline]

Definition at line 519 of file v4color.h.

References mV.

Referenced by LLLightParams::setColor(), and LLPipeline::setupHWLights().

Here is the caller graph for this function:


Friends And Related Function Documentation

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

Definition at line 207 of file v4color.cpp.

LLColor4 operator+ ( const LLColor4 a,
const LLColor4 b 
) [friend]

Definition at line 368 of file v4color.h.

LLColor4 operator- ( const LLColor4 a,
const LLColor4 b 
) [friend]

Definition at line 377 of file v4color.h.

LLColor4 operator* ( const LLColor4 a,
const LLColor4 b 
) [friend]

Definition at line 386 of file v4color.h.

LLColor4 operator* ( const LLColor4 a,
F32  k 
) [friend]

Definition at line 395 of file v4color.h.

LLColor4 operator* ( F32  k,
const LLColor4 a 
) [friend]

Definition at line 405 of file v4color.h.

LLColor4 operator% ( const LLColor4 a,
F32  k 
) [friend]

Definition at line 425 of file v4color.h.

LLColor4 operator% ( F32  k,
const LLColor4 a 
) [friend]

Definition at line 415 of file v4color.h.

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

Definition at line 435 of file v4color.h.

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

Definition at line 443 of file v4color.h.

bool operator== ( const LLColor4 a,
const LLColor3 b 
) [friend]

Definition at line 213 of file v4color.cpp.

bool operator!= ( const LLColor4 a,
const LLColor3 b 
) [friend]

Definition at line 220 of file v4color.cpp.

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

Definition at line 451 of file v4color.h.

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

Definition at line 460 of file v4color.h.

const LLColor4& operator*= ( LLColor4 a,
F32  k 
) [friend]

Definition at line 469 of file v4color.h.

const LLColor4& operator%= ( LLColor4 a,
F32  k 
) [friend]

Definition at line 487 of file v4color.h.

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

Definition at line 478 of file v4color.h.


Member Data Documentation

Definition at line 53 of file v4color.h.

Referenced by LLView::addColorXML(), calcHSL(), LLVOSky::calcSkyColorInDir(), clamp(), color_max(), LLManipScale::conditionalHighlight(), LLWorldMapView::draw(), LLTextureBar::draw(), LLStatGraph::draw(), LLProgressView::draw(), LLNetMap::draw(), LLHoverView::draw(), LLHorizontalCompass::draw(), LLFolderViewItem::draw(), LLSnapshotLivePreview::draw(), LLFastTimerView::draw(), LLConsole::draw(), LLColorSwatchCtrl::draw(), LLScrollListCtrl::draw(), LLScrollListItem::draw(), LLScrollableContainerView::draw(), LLPieMenu::draw(), LLMenuItemGL::draw(), LLLineEditor::draw(), LLFloater::draw(), LLButton::draw(), draw_shockwave(), LLPieMenu::drawBackground(), LLMenuGL::drawBackground(), LLTextEditor::drawClippedSegment(), LLTextEditor::drawCursor(), LLView::drawDebugRect(), drawDot(), LLFontGL::drawGlyph(), LLScrollListCtrl::drawItems(), LLViewBorder::drawOnePixelLines(), LLJoystickCameraRotate::drawRotatedImage(), LLTextEditor::drawSelectionBackground(), LLViewerJointMesh::drawShape(), LLViewBorder::drawTwoPixelLines(), LLPipeline::enableLights(), LLPipeline::enableLightsAvatarEdit(), LLPipeline::enableLightsFullbright(), LLTexLayer::findNetColor(), LLPipeline::generateWaterReflection(), get_text_color(), LLSprite::getAlpha(), LLXMLNode::getAttributeColor(), LLXMLNode::getAttributeColor4(), LLVOAvatar::getClothesColor(), LLTexGlobalColor::getColor(), LLFocusMgr::getFocusColor(), LLVOVolume::getLightColor(), LLVOVolume::getLightIntensity(), LLTexParamColor::getNetColor(), LLPipeline::getPoolTypeFromTE(), getValue(), LLColorSwatchCtrl::getXML(), LLScrollableContainerView::getXML(), LLMenuGL::getXML(), LLIconCtrl::getXML(), gl_draw_scaled_image_inverted(), gl_draw_scaled_image_with_border(), gl_draw_scaled_rotated_image(), gl_draw_x(), gl_drop_shadow(), gl_line_2d(), gl_rect_2d(), gl_rect_2d_offset_local(), gl_ring(), gl_stippled_line_3d(), gl_triangle_2d(), gl_washer_2d(), gl_washer_segment_2d(), gl_washer_spokes_2d(), LLManipTranslate::highlightIntersection(), LLVOTextBubble::idleUpdate(), isOpaque(), lerp(), ll_color4_from_sd(), ll_sd_from_color4(), LLButton::LLButton(), LLColor3::LLColor3(), LLColor4(), LLGLSSpecular::LLGLSSpecular(), LLSky::LLSky(), LLVOSky::LLVOSky(), magVec(), magVecSquared(), normVec(), LLColorSwatchCtrl::onColorChanged(), LLFloaterColorPicker::onColorSelect(), LLVOAvatar::onGlobalColorChanged(), operator const LLColor4U(), operator!=(), operator%(), operator%=(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-=(), operator<<(), WaterColorControl::operator=(), operator=(), LLColor3::operator=(), operator==(), operator[](), LLDataPackerAsciiFile::packColor4(), LLDataPackerAsciiBuffer::packColor4(), LLDataPackerBinaryBuffer::packColor4(), parseColor(), parseColor4(), LLDrawPoolWater::prerender(), LLVolumeGeometryManager::rebuildGeom(), LLTexLayer::render(), LLDrawPoolWater::render(), LLFontGL::render(), LLTexLayer::renderAlphaMasks(), LLManipTranslate::renderArrow(), LLTracker::renderBeacon(), LLManipScale::renderFaces(), LLVOAvatar::renderFootShadows(), LLFace::renderForSelect(), LLHUDIcon::renderIcon(), LLViewerObjectList::renderObjectBeacons(), LLSelectNode::renderOneSilhouette(), LLToolBrushLand::renderOverlay(), LLDrawPoolWater::renderReflection(), LLFace::renderSelected(), LLFace::renderSetColor(), LLManipTranslate::renderSnapGuides(), LLManipScale::renderSnapGuides(), LLManipRotate::renderSnapGuides(), LLDrawPoolWLSky::renderStars(), LLDrawPoolSky::renderSunHalo(), LLHUDText::renderText(), LLManip::renderTickText(), LLManip::renderTickValue(), LLManipTranslate::renderTranslationHandles(), LLView::saveColorToXML(), LLSelectMgr::selectionSetAlphaOnly(), LLSelectMgr::selectionSetColorOnly(), LLWLParamSet::set(), LLWaterParamSet::set(), LLColorSwatchCtrl::set(), LLSprite::setAlpha(), LLTextureEntry::setAlpha(), setAlpha(), LLVOAvatar::setClothesColor(), LLUndoWearable::setColor(), LLFacePool::LLOverrideFaceColor::setColor(), LLButton::setDisabledImages(), LLPartData::setEndAlpha(), LLButton::setImageDisabled(), LLButton::setImageDisabledSelected(), LLVOVolume::setLightColor(), LLVOVolume::setLightIntensity(), LLColorSwatchCtrl::setOriginal(), LLPartData::setStartAlpha(), setToBlack(), setToWhite(), LLPipeline::setupAvatarLights(), LLPipeline::setupHWLights(), LLManip::setupSnapGuideRenderPass(), setValue(), setVec(), LLColor4U::setVecScaleClamp(), LLDrawPoolWater::shade(), LLColorSwatchCtrl::showPicker(), LLFloaterWater::syncMenu(), LLFloaterEnvSettings::syncMenu(), LLDataPackerAsciiFile::unpackColor4(), LLDataPackerAsciiBuffer::unpackColor4(), LLDataPackerBinaryBuffer::unpackColor4(), LLPrimitive::unpackTEMessage(), LLFloaterSettingsDebug::updateControl(), LLVOSky::updateFog(), LLVOGround::updateGeometry(), LLVOAvatar::updateMeshTextures(), LLVOSky::updateSky(), and vec4to3().

Definition at line 136 of file v4color.h.

Referenced by LLTextureBar::draw(), and parseColor().

Definition at line 140 of file v4color.h.

Referenced by LLTextureBar::draw(), and parseColor().

Definition at line 141 of file v4color.h.

Referenced by LLTextureBar::draw(), and parseColor().

Definition at line 142 of file v4color.h.

Referenced by parseColor().

Definition at line 145 of file v4color.h.

Referenced by LLTextureBar::draw(), and parseColor().

Definition at line 146 of file v4color.h.

Referenced by parseColor().

Definition at line 150 of file v4color.h.

Referenced by parseColor().

Definition at line 151 of file v4color.h.

Referenced by parseColor().

Definition at line 152 of file v4color.h.

Referenced by parseColor().

Definition at line 155 of file v4color.h.

Referenced by parseColor().

Definition at line 156 of file v4color.h.

Referenced by parseColor().

Definition at line 157 of file v4color.h.

Referenced by parseColor().

Definition at line 158 of file v4color.h.

Referenced by parseColor().

Definition at line 159 of file v4color.h.

Referenced by parseColor().

Definition at line 161 of file v4color.h.

Referenced by parseColor(), and pushVertsColorCoded().

Definition at line 162 of file v4color.h.

Referenced by LLTextureBar::draw(), parseColor(), and pushVertsColorCoded().

Definition at line 163 of file v4color.h.

Referenced by parseColor(), and pushVertsColorCoded().

Definition at line 164 of file v4color.h.

Referenced by LLTextureBar::draw(), parseColor(), and pushVertsColorCoded().

Definition at line 165 of file v4color.h.

Referenced by parseColor(), and pushVertsColorCoded().

Definition at line 166 of file v4color.h.

Referenced by parseColor(), and pushVertsColorCoded().

Definition at line 168 of file v4color.h.

Referenced by parseColor().

Definition at line 169 of file v4color.h.

Referenced by parseColor().

Definition at line 170 of file v4color.h.

Referenced by parseColor().

Definition at line 171 of file v4color.h.

Referenced by LLGroupNotifyBox::LLGroupNotifyBox(), and parseColor().

Definition at line 172 of file v4color.h.

Referenced by parseColor().

Definition at line 173 of file v4color.h.

Referenced by parseColor().

Definition at line 175 of file v4color.h.

Referenced by parseColor().

Definition at line 176 of file v4color.h.

Referenced by parseColor().

Definition at line 177 of file v4color.h.

Referenced by parseColor().

Definition at line 178 of file v4color.h.

Referenced by parseColor().

Definition at line 179 of file v4color.h.

Referenced by parseColor().

Definition at line 180 of file v4color.h.

Referenced by parseColor().

Definition at line 181 of file v4color.h.

Definition at line 182 of file v4color.h.

Definition at line 183 of file v4color.h.

Definition at line 185 of file v4color.h.

Referenced by parseColor().

Definition at line 186 of file v4color.h.

Referenced by parseColor().

Definition at line 187 of file v4color.h.

Referenced by parseColor().

Definition at line 188 of file v4color.h.

Referenced by parseColor().

Definition at line 189 of file v4color.h.

Referenced by parseColor().

Definition at line 190 of file v4color.h.

Referenced by parseColor().

Definition at line 192 of file v4color.h.

Referenced by LLTextureBar::draw(), and parseColor().

Definition at line 193 of file v4color.h.

Referenced by parseColor().

Definition at line 194 of file v4color.h.

Referenced by parseColor().

Definition at line 195 of file v4color.h.

Referenced by parseColor().

Definition at line 197 of file v4color.h.

Referenced by parseColor().

Definition at line 198 of file v4color.h.

Referenced by parseColor().

Definition at line 199 of file v4color.h.

Referenced by parseColor().

Definition at line 200 of file v4color.h.

Referenced by parseColor().

Definition at line 201 of file v4color.h.

Referenced by parseColor().

Definition at line 202 of file v4color.h.

Referenced by parseColor().

Definition at line 204 of file v4color.h.

Referenced by LLButton::draw(), and parseColor().

Definition at line 205 of file v4color.h.

Referenced by LLTextureBar::draw(), and parseColor().

Definition at line 207 of file v4color.h.

Referenced by parseColor().

Definition at line 208 of file v4color.h.

Referenced by LLTextureBar::draw(), and parseColor().

Definition at line 209 of file v4color.h.

Referenced by parseColor().

Definition at line 210 of file v4color.h.

Referenced by parseColor().

Definition at line 211 of file v4color.h.

Referenced by parseColor().

Definition at line 212 of file v4color.h.

Referenced by parseColor().


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

Generated on Fri May 16 08:42:55 2008 for SecondLife by  doxygen 1.5.5