Open Inventor Reference
SoMFColor Class Reference

Multiple-value field containing any number of RGB colors stored as three floats. More...

#include <Inventor/fields/SoMFColor.h>

Inheritance diagram for SoMFColor:
SoMField SoField

List of all members.

Public Member Functions

void setValues (int start, int num, const float rgb[][3])
 Additional convenience functions.
void setHSVValues (int start, int num, const float hsv[][3])
 Sets num values starting at index start to the RGB (or HSV) values specified by the given array of floats.
void setValue (const SbVec3f &vec)
 Sets the field to contain one and only one value, the given color (expressed as either RGB or HSV floating point values in the range 0.0 to 1.0), and deletes the second and subsequent values.
void setValue (float r, float g, float b)
void setValue (const float rgb[3])
void setHSVValue (float h, float s, float v)
 Set to one HSV color from 3 floats or array of 3 floats.
void setHSVValue (const float hsv[3])
 Sets the field to contain one and only one value, the given color (expressed as either RGB or HSV floating point values in the range 0.0 to 1.0), and deletes the second and subsequent values.
void set1Value (int index, const SbVec3f &vec)
 Set one of N RGB colors from SbVec3f, 3 floats, or array of 3 floats.
void set1Value (int index, float r, float g, float b)
void set1Value (int index, const float rgb[3])
void set1HSVValue (int index, float h, float s, float v)
 Set1 one of N HSV colors from 3 floats or array of 3 floats.
void set1HSVValue (int index, const float hsv[3])

Static Public Member Functions

static void initClass ()

Detailed Description

A multiple-value field that contains any number of RGB colors, stored as instances of SbColor. Values may be set in either RGB (red, green, blue) or HSV (hue, saturation, value) color spaces.

SoMFColors are written to file as one or more RGB triples of floating point numbers in standard scientific notation. When more than one value is present, all of the values are enclosed in square brackets and separated by commas. For example:

[ 1.0 0.0 0.0, 0 1 0, 0 0 1 ]

represents the three colors red, green, and blue.

See Also
SbColor

Definition at line 88 of file SoMFColor.h.


Member Function Documentation

static void SoMFColor::initClass ( ) [static]

Reimplemented from SoMField.

void SoMFColor::set1HSVValue ( int  index,
float  h,
float  s,
float  v 
)
void SoMFColor::set1HSVValue ( int  index,
const float  hsv[3] 
)
void SoMFColor::set1Value ( int  index,
const float  rgb[3] 
)
void SoMFColor::set1Value ( int  index,
const SbVec3f vec 
)
void SoMFColor::set1Value ( int  index,
float  r,
float  g,
float  b 
)
void SoMFColor::setHSVValue ( float  h,
float  s,
float  v 
)
void SoMFColor::setHSVValue ( const float  hsv[3])
void SoMFColor::setHSVValues ( int  start,
int  num,
const float  hsv[][3] 
)

Each float should be in the range 0.0 to 1.0, and there must be 3*num floats in the array.

void SoMFColor::setValue ( const float  rgb[3])
void SoMFColor::setValue ( float  r,
float  g,
float  b 
)
void SoMFColor::setValue ( const SbVec3f vec)
void SoMFColor::setValues ( int  start,
int  num,
const float  rgb[][3] 
)

Set RGB/HSV values from array of arrays of 3 floats


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