Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

toxic::Color3 Class Reference

This is the color format used internally. More...

#include <color3.h>

List of all members.

Public Member Functions

 Color3 ()
 Color3 (sheep::Real r)
 Color3 (const Color3 &c)
 Color3 (sheep::Real r, sheep::Real g, sheep::Real b)
void ConvertToRGBE (sheep::uint8 *r, sheep::uint8 *g, sheep::uint8 *b, sheep::uint8 *e) const
void SetToBlack ()
bool IsBlack () const
sheep::Real Average () const
 Computes (R+G+B)/3.

sheep::Real Luminance () const
 Computes luminance from linear RGB values according to CIE Rec. 709 standard.


Static Public Member Functions

Color3 ConvertFromRGBE (sheep::uint8 r, sheep::uint8 g, sheep::uint8 b, sheep::uint8 e)

Public Attributes

sheep::Real m_r
sheep::Real m_g
sheep::Real m_b


Detailed Description

This is the color format used internally.

Definition at line 36 of file color3.h.


Constructor & Destructor Documentation

Color3::Color3  )  [inline]
 

Definition at line 111 of file color3.h.

Color3::Color3 sheep::Real  r  )  [inline, explicit]
 

Definition at line 114 of file color3.h.

Color3::Color3 const Color3 c  )  [inline]
 

Definition at line 120 of file color3.h.

Color3::Color3 sheep::Real  r,
sheep::Real  g,
sheep::Real  b
[inline]
 

Definition at line 126 of file color3.h.


Member Function Documentation

sheep::Real Color3::Average  )  const [inline]
 

Computes (R+G+B)/3.

Definition at line 179 of file color3.h.

Referenced by toxic::PhotonMap::BuildPhotonDirectionHistogram(), toxic::Renderer::trace(), and toxic::GlobalPhotonTracer::trace_photon().

Color3 Color3::ConvertFromRGBE sheep::uint8  r,
sheep::uint8  g,
sheep::uint8  b,
sheep::uint8  e
[inline, static]
 

Conversion from Greg Ward's shared-exponent RGB-format. http://www.graphics.cornell.edu/online/formats/rgbe/

Definition at line 132 of file color3.h.

void Color3::ConvertToRGBE sheep::uint8 *  r,
sheep::uint8 *  g,
sheep::uint8 *  b,
sheep::uint8 *  e
const [inline]
 

Conversion to Greg Ward's shared-exponent RGB-format. http://www.graphics.cornell.edu/online/formats/rgbe/

Definition at line 145 of file color3.h.

bool Color3::IsBlack  )  const [inline]
 

Definition at line 173 of file color3.h.

Referenced by toxic::Renderer::compute_direct_illumination(), toxic::Renderer::compute_specular_reflections(), and toxic::SceneBuilder::object_builder().

sheep::Real Color3::Luminance  )  const [inline]
 

Computes luminance from linear RGB values according to CIE Rec. 709 standard.

Definition at line 185 of file color3.h.

Referenced by contrast().

void Color3::SetToBlack  )  [inline]
 

Definition at line 168 of file color3.h.


Member Data Documentation

sheep::Real toxic::Color3::m_b
 

Definition at line 38 of file color3.h.

Referenced by toxic::Framebuffer::Clear(), operator *(), operator *=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), toxic::SceneBuilder::parse_color3(), and toxic::MeshBuilder::SetDiffuseColor().

sheep::Real toxic::Color3::m_g
 

Definition at line 38 of file color3.h.

Referenced by toxic::Framebuffer::Clear(), operator *(), operator *=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), toxic::SceneBuilder::parse_color3(), and toxic::MeshBuilder::SetDiffuseColor().

sheep::Real toxic::Color3::m_r
 

Definition at line 38 of file color3.h.

Referenced by toxic::Framebuffer::Clear(), operator *(), operator *=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), toxic::SceneBuilder::parse_color3(), and toxic::MeshBuilder::SetDiffuseColor().


The documentation for this class was generated from the following files:
Generated on Tue May 11 01:31:57 2004 for toxic by doxygen 1.3.6