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

const char * typeName ()
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

float blue  )  const [inline]
 

float green  )  const [inline]
 

operator const float *  )  const [inline]
 

SFColor & operator= const SFColor c  )  [inline]
 

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

float red  )  const [inline]
 

void setBlue const   float  )  [inline]
 

void setGreen const   float  )  [inline]
 

void setRed const   float  )  [inline]
 

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

FieldTypeId typeId  )  [inline, static]
 

const char * typeName  )  [inline, static]
 


Friends And Related Function Documentation

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


Generated on 24 Feb 2005 with doxygen version 1.3.9.1. Valid HTML 4.0! Valid CSS!