XdkWrl: MFColor Class Reference

Home | Hierarchy | Members | Alphabetical | Related Pages

# MFColor Class Reference
[Field Types]

`#include <mfcolor.h>`

Inherits deque.

List of all members.

## Static Public Member Functions
static const char * | typeName ()
static FieldTypeId | typeId ()
## Friends
std::ostream & | operator<< (std::ostream &s, const MFColor &f)

## Detailed Description

A MFColor is a container of SFColor. It is implemented using a STL's deque so you can benefit from its interface. Most common functionnalities you would use are:

       MFColor mf;
       mf.push_back(SFColor(1.0f,0.0f,0.0f));  // Red
       mf.push_front(SFColor(0.0f,1.0f,0.0f)); // Green
       mf[0].setRGB(0.0f,0.0f,1.0f);           // Blue

but since it uses STL principles, you have all useful concepts such as iterator, algorithms, etc...

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 [ ].

## Member Function Documentation

const char * typeName | ( |  | ) | `[inline, static]`

FieldTypeId typeId | ( |  | ) | `[inline, static]`

## Friends And Related Function Documentation

std::ostream& operator<< | ( | std::ostream & | s,
|  | const MFColor & | f |
| ) |  |  | `[friend]`

Generated on 5 Jan 2007 with version 1.5.1. |