Home Hierarchy Members Alphabetical Related Pages

SFColor Class Reference
[Field Types]

#include <sfcolor.h>

List of all members.

Public Member Functions

 SFColor ()
 SFColor (const float *c)
 SFColor (const float r, const float g, const float b)
SFColoroperator= (const SFColor &c)
 operator const float * () const
float red () const
float green () const
float blue () const
void setRGB (const float r, const float g, const float b)
void setRed (const float)
void setGreen (const float)
void setBlue (const float)
bool operator== (const SFColor &c) const

Static Public Member Functions

static const char * typeName ()
static FieldTypeId typeId ()

Friends

std::ostream & operator<< (std::ostream &s, const SFColor &f)


Detailed Description

Represents a RGB color value. Below is included the documentation for this field type from the ISO standard.

+ 5.3 SFColor and MFColor

The SFColor field or event specifies one RGB (red-green-blue) colour triple. MFColor specifies zero or more RGB triples. Each colour is written to the VRML file as an RGB triple of floating point numbers in ISO C floating point format (see 2.[ISOC]) in the range 0.0 to 1.0. For example:

    fooColor [ 1.0 0. 0.0, 0 1 0, 0 0 1 ]

is an MFColor field, fooColor, containing the three primary colours red, green, and blue.

The initial value of an SFColor eventOut is (0 0 0). The initial value of an MFColor eventOut is [ ].

--- VRML separator bar ---


Constructor & Destructor Documentation

SFColor (  )  [inline]

SFColor ( const float *  c  )  [inline]

SFColor ( const float  r,
const float  g,
const float  b 
) [inline]


Member Function Documentation

SFColor & operator= ( const SFColor c  )  [inline]

operator const float * (  )  const [inline]

float red (  )  const [inline]

float green (  )  const [inline]

float blue (  )  const [inline]

void setRGB ( const float  r,
const float  g,
const float  b 
) [inline]

void setRed ( const   float  )  [inline]

void setGreen ( const   float  )  [inline]

void setBlue ( const   float  )  [inline]

const char * typeName (  )  [inline, static]

FieldTypeId typeId (  )  [inline, static]

bool operator== ( const SFColor c  )  const [inline]


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  s,
const SFColor f 
) [friend]


Generated on 5 Jan 2007 with doxygen version 1.5.1. Valid HTML 4.0! Valid CSS!