maxon.Col3

Description

General maxon.Data class.
An object of this class can store every type of data as long as that type has been registered (see maxon.DataType).

Inheritance diagram

Inheritance

Parent Class:

Children Classes:

Attributes

maxon.Col3.STRIDE

maxon.Col3.b

The blue component

maxon.Col3.g

The green component

maxon.Col3.r

The red component

Methods Signature

Clamp01()

Returns a vector that is clamped to the range [0.0 .

GetAverage()

Calculates the average value of ‘r’, ‘g’, ‘b’.

GetMax()

Returns the maximum of ‘r’, ‘g’, ‘b’.

GetMin()

Return the minimum of ‘r’, ‘g’, ‘b’.

IsEqual(other[, epsilon])

Tests component-wise if the difference is no bigger than ‘epsilon’.

IsZero()

Checks if each component is zero.

SetZero()

Sets all components to zero.

__init__([r, g, b])

Initialize self.

Methods Definition

Col3.Clamp01()

Returns a vector that is clamped to the range [0.0 .. 1.0].

Returns

The color clamped.

Return type

maxon.Col3

Col3.GetAverage()

Calculates the average value of ‘r’, ‘g’, ‘b’.

Returns

the average value.

Return type

float

Col3.GetMax()

Returns the maximum of ‘r’, ‘g’, ‘b’.

Returns

The maximum value.

Returns

float

Col3.GetMin()

Return the minimum of ‘r’, ‘g’, ‘b’.

Returns

The minimum value.

Returns

float

Col3.IsEqual(other, epsilon=0.01)

Tests component-wise if the difference is no bigger than ‘epsilon’.

Parameters
  • other (maxon.Col3) – The other color to compare with.

  • epsilon (float) – The tolerance value.

Returns

True if both color are identical.

Return type

bool

Col3.IsZero()

Checks if each component is zero.

Returns

True if all component is zero.

Return type

bool

Col3.SetZero()

Sets all components to zero.

Col3.__init__(r=None, g=None, b=None)

Initialize self. See help(type(self)) for accurate signature.