man SoMFColor () - multiple-value field containing any number of RGB colors stored as three floats

NAME

SoMFColor - multiple-value field containing any number of RGB colors stored as three floats

INHERITS FROM

SoField > SoMField > SoMFColor

SYNOPSIS

Methods from class SoMFColor: c } c } setValues(int start, int num, const float rgb[][3])

c } c } setHSVValues(int start, int num, const float hsv[][3])

c } c } setValue(const SbVec3f &vec)

c } c } setValue(float red, float green, float blue)

c } c } setHSVValue(float hue, float saturation, float value)

c } c } setValue(const float rgb[3])

c } c } setHSVValue(const float hsv[3])

c } c } set1Value(index, const SbVec3f &vec)

c } c } set1Value(index, float r, float g, float b)

c } c } set1HSVValue(index, float h, float s, float v)

c } c } set1Value(index, const float rgb[3])

c } c } set1HSVValue(index, const float hsv[3])

c } c } getClassTypeId()

c } c } getTypeId() const

c } c } operator [](int i) const

c } c } getValues(int start) const

c } c } find(const SbColor & targetValue, SbBool addIfNotFound = FALSE)

c } c } setValues(int start, int num, const SbColor *newValues)

c } c } set1Value(int index, const SbColor & newValue)

c } c } operator =(const SbColor & newValue)

c } c } setValue(const SbColor & newValue)

c } c } operator ==(const SoMFColor &f) const

c } c } operator !=(const SoMFColor &f) const

c } c } startEditing()

c } c } finishEditing() Methods from class SoMField: c } c } getNum() const

c } c } setNum(int num)

c } c } deleteValues(int start, int num = -1)

c } c } insertSpace(int start, int num)

c } c } set1(int index, const char *valueString)

c } c } get1(int index, SbString &valueString) Methods from class SoField: c } c } setIgnored(SbBool ignore)

c } c } isIgnored() const

c } c } isDefault() const

c } c } isOfType(SoType type) const

c } c } set(const char *valueString)

c } c } get(SbString &valueString)

c } c } touch()

c } c } connectFrom(SoField *fromField)

c } c } connectFrom(SoEngineOutput *fromEngine)

c } c } disconnect()

c } c } isConnected() const

c } c } isConnectedFromField() const

c } c } getConnectedField(SoField *&writingField) const

c } c } isConnectedFromEngine() const

c } c } getConnectedEngine(SoEngineOutput *&engineOutput) const

c } c } enableConnection(SbBool flag)

c } c } isConnectionEnabled() const

c } c } getForwardConnections(SoFieldList &list) const

c } c } getContainer() const

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.

METHODS

c } c } setValues(int start, int num, const float rgb[][3])

c } c } 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. Each float should be in the range 0.0 to 1.0, and there must be 3*num floats in the array. c } c } setValue(const SbVec3f &vec)

c } c } setValue(float red, float green, float blue)

c } c } setHSVValue(float hue, float saturation, float value)

c } c } setValue(const float rgb[3])

c } c } 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. c } c } set1Value(index, const SbVec3f &vec)

c } c } set1Value(index, float r, float g, float b)

c } c } set1HSVValue(index, float h, float s, float v)

c } c } set1Value(index, const float rgb[3])

c } c } set1HSVValue(index, const float hsv[3])

Sets one value in the array to the given color. The array will be expanded and filled with zeroes as necessary. c } c } getClassTypeId()

c } c } getTypeId() const

Returns the type for this class or a particular object of this class. c } c } operator [](int i) const

Returns the i'th value of the field. Indexing past the end of the field (passing in i greater than getNum()) will return garbage. c } c } getValues(int start) const

Returns a pointer into the array of values in the field, starting at index start. The values are read-only; see the startEditing()/finishEditing() methods for a way of modifying values in place. c } c } find(const SbColor & targetValue, SbBool addIfNotFound = FALSE)

Finds the given value in the array and returns the index of that value in the array. If the value is not found, -1 is returned. If addIfNotFound is set, then targetValue is added to the end of the array (but -1 is still returned). c } c } setValues(int start, int num, const SbColor *newValues)

Sets num values starting at index start to the values in newValues. The array will be automatically be made larger to accomodate the new values, if necessary. c } c } set1Value(int index, const SbColor & newValue)

Sets the index'th value in the array to newValue. The array will be automatically expanded, if necessary. c } c } operator =(const SbColor & newValue)

c } c } setValue(const SbColor & newValue)

Sets the first value in the array to newValue, and deletes the second and subsequent values. c } c } operator ==(const SoMFColor &f) const

c } c } operator !=(const SoMFColor &f) const

Returns TRUE if all of the values of this field equal (do not equal) those of the given field. If the fields are different types FALSE will always be returned (even if one field is an SoMFFloat with one value of 1.0 and the other is an SoMFInt with a value of 1, for example). c } c } startEditing()

c } c } finishEditing()

startEditing() returns a pointer to the internally-maintained array that can be modified. The values in the array may be changed, but values cannot be added or removed. It is illegal to call any other editing methods between startEditing() and finishEditing() (e.g. set1Value(), setValue(), etc). Fields, engines or sensors connected to this field and sensors are not notified that this field has changed until finishEditing() is called. Calling finishEditing() always sets the isDefault() flag to FALSE and informs engines and sensors that the field changed, even if none of the values actually were changed.

SEE ALSO

SbColor