maxon.Vec4

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.Vec4.STRIDE
maxon.Vec4.w (float) the w component
maxon.Vec4.x (float) the x component
maxon.Vec4.y (float) the y component
maxon.Vec4.z (float) the z component

Methods Signature

Clamp01() Returns a vector that is clamped to the range [0.0 ..
GetAverage() Calculates the average value of ‘x’, ‘y’, ‘z’ and ‘w’.
GetLength() Retrieves the length of the vector.
GetMax() Returns the maximum of ‘x’, ‘y’, ‘z’ and ‘w’.
GetMin() Return the minimum of ‘x’, ‘y’, ‘z’ and ‘w’.
GetSquaredLength() Retrieves the squared length of the vector.
IsEqual(other[, epsilon]) Tests component-wise if the difference is no bigger than ‘epsilon’.
IsZero() Checks if each component is zero.
LessThanOrEqual(v) Checks if each component are less or equal to v
SetZero() Sets all components to zero.
__init__([x, y, z, w]) x.__init__(…) initializes x; see help(type(x)) for signature

Methods Definition

Vec4.Clamp01()

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

Returns:The vector clamped.
Return type:maxon.Vec4
Vec4.GetAverage()

Calculates the average value of ‘x’, ‘y’, ‘z’ and ‘w’.

Returns:the average value.
Return type:float
Vec4.GetLength()

Retrieves the length of the vector.

Returns:Vector length.
Return type:float
Vec4.GetMax()

Returns the maximum of ‘x’, ‘y’, ‘z’ and ‘w’.

Returns:The maximum value.
Returns:float
Vec4.GetMin()

Return the minimum of ‘x’, ‘y’, ‘z’ and ‘w’.

Returns:The minimum value.
Returns:float
Vec4.GetSquaredLength()

Retrieves the squared length of the vector.

Returns:Vector squared length.
Return type:float
Vec4.IsEqual(other, epsilon=0.01)

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

Parameters:
  • other (maxon.Vec3) – The other color to compare with.
  • epsilon (float) – The tolerance value.
Returns:

True if both color are identical.

Return type:

bool

Vec4.IsZero()

Checks if each component is zero.

Returns:True if all component is zero.
Return type:bool
Vec4.LessThanOrEqual(v)

Checks if each component are less or equal to v

Parameters:v – The maximum value to checks for.
Returns:True if all components are less or equals to the passed value.
Return type:bool
Vec4.SetZero()

Sets all components to zero.

Vec4.__init__(x=None, y=None, z=None, w=None)

x.__init__(…) initializes x; see help(type(x)) for signature