maxon.Vec3

Description

A vector consisting of three components X, Y and Z.

Inheritance diagram

Inheritance

Parent Class:

Children Classes:

Attributes

maxon.Vec3.STRIDE

maxon.Vec3.x

(float) the x component

maxon.Vec3.y

(float) the y component

maxon.Vec3.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’.

GetLength()

Retrieves the length of the vector.

GetMax()

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

GetMin()

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

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])

Initialize self.

Methods Definition

Vec3.Clamp01()

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

Returns

The vector clamped.

Return type

maxon.Vec3

Vec3.GetAverage()

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

Returns

the average value.

Return type

float

Vec3.GetLength()

Retrieves the length of the vector.

Returns

Vector length.

Return type

float

Vec3.GetMax()

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

Returns

The maximum value.

Returns

float

Vec3.GetMin()

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

Returns

The minimum value.

Returns

float

Vec3.GetSquaredLength()

Retrieves the squared length of the vector.

Returns

Vector squared length.

Return type

float

Vec3.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

Vec3.IsZero()

Checks if each component is zero.

Returns

True if all component is zero.

Return type

bool

Vec3.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

Vec3.SetZero()

Sets all components to zero.

Vec3.__init__(x=None, y=None, z=None)

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