189 explicit CVarColor(
int componentsCount,
double value = 0);
277 for (
int i = 0; i < elementsCount; ++i){
280 if ((component < 0) || (component > 1)){
335 for (
int i = 0; i < elementsCount; ++i){
349 for (
int i = 0; i < elementsCount; ++i){
Generic color implementation with variable number of color components.
const CVarColor & operator-=(const CVarColor &color)
CVarColor operator+(const CVarColor &color) const
bool IsSimilar(const CVarColor &color, double tolerance=I_BIG_EPSILON) const
Allows to compare two colors with tolerance.
imath::CVarVector BaseClass
CVarColor(const imath::TVector< Size > &vector)
Template conversion constructor.
const CVarColor & operator*=(const CVarColor &color)
void GetNormalized(CVarColor &result) const
Get normalized color.
bool IsNormalized() const
Check if this color value is normalized.
void Normalize()
Make this color to be normalized.
CVarColor & operator=(const CVarColor &color)
CVarColor operator/(const CVarColor &color) const
CVarColor(const CVarColor &color)
Copy constructor.
CVarColor()
Default constructor.
const CVarColor & operator/=(const CVarColor &color)
void GetRounded(const imath::IDoubleManip &manipulator, CVarColor &result)
Get color after components value rounding with specified precision.
CVarColor operator*(const CVarColor &color) const
bool IsRoundedEqual(const CVarColor &color, const imath::IDoubleManip &manipulator) const
Check if two values are equal after rounding.
virtual bool Serialize(iser::IArchive &archive) override
Load or store state of this object as a archive stream.
CVarColor(int componentsCount, double value=0)
Constructor with explicit initialization of number of elements.
const CVarColor & operator+=(const CVarColor &color)
Implementation of variable-size mathematical vector with double precision elements.
CVarVector & operator*=(double scalar)
CVarVector operator-() const
double GetElement(int index) const
Get element at specified index.
double GetDistance(const CVarVector &vector) const
Return distance between two vectors.
CVarVector & operator/=(double scalar)
int GetElementsCount() const
Get number of elements.
void SetElement(int index, double value)
Set element at specified index.
Interface for all manipulation using values represent as double.
Implementation of fixed-size mathematical vector with specified type of elements.
Represents an input/output persistence archive for object serialization.
Common class for all classes which objects can be archived or restored from archive.
static const double I_BIG_EPSILON
Contains color management classes.