IC Python API:RLPy RVector4

From Reallusion Wiki!
Revision as of 22:56, 27 March 2019 by Chuck (RL) (Talk | contribs) (Created page with "{{TOC}} {{Parent|IC_Python_API:RL_Python_Modules|Modules}} ==Detailed Description== This class represent the 4D vector. ==Operators== This class supports the following operato...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Main article: Modules.

Detailed Description

This class represent the 4D vector.

Operators

This class supports the following operators:

Member Operation Syntax Description Example
__add__ Addition a + b Adds values on either side of the operator. a + b = 30
__sub__ Subtraction a - b Subtracts right hand operand from left hand operand. a – b = -10
__mul__ Multiplication a * b Multiplies values on either side of the operator. a * b = 200
__truediv__ Division a / b Divides left hand operand by right hand operand. b / a = 2
__eq__ Equality a == b If the values of two operands are equal, then the condition becomes true. (a == b) is not true.
__ne__ Difference a != b If values of two operands are not equal, then condition becomes true. (a != b) is true.
__gt__ Greater Than a > b If the value of left operand is greater than the value of right operand, then condition becomes true. (a > b) is not true.
__lt__ Less Than a < b If the value of left operand is less than the value of right operand, then condition becomes true. (a < b) is true.
__ge__ Greater Than or Equal a >= b If the value of left operand is greater than or equal to the value of right operand, then condition becomes true. (a >= b) is not true.
__le__ Less or Equal a <= b If the value of left operand is less than or equal to the value of right operand, then condition becomes true. (a <= b) is true.
__iadd__ Addition (Inplace) a += b It adds right operand to the left operand and assign the result to left operand. c += a is equivalent to c = c + a
__isub__ Subtraction (Inplace) a -= b It subtracts right operand from the left operand and assign the result to left operand. c -= a is equivalent to c = c - a
__imul__ Multiply (Inplace) a *= b It multiplies right operand with the left operand and assign the result to left operand. c *= a is equivalent to c = c * a
__itruediv__ Divide (Inplace) a /= b It divides left operand with the right operand and assign the result to left operand. c /= a is equivalent to c = c / ac /= a is equivalent to c = c / a

Member Functions

Dot

RLPy.RVector4.Dot ( self, vV )

Calculate dot production of the two vectors.

Parameters

vV [IN] The vector - RLPy.RVector4

Returns

The value of the dot production - float

Inverse

RLPy.RVector4.Inverse ( self )

Inverse this vector.

Returns

The inversed vector - RLPy.RVector4

Length

RLPy.RVector4.Length ( self )

Length of the vector.

Returns

The length of this vector - float

Normalize

RLPy.RVector4.Normalize ( self )

Normalizes this vector.

Returns

The normalized vector - float

SetW

RLPy.RVector4.SetW ( self, tW )

Set the value of the w.

Parameters

tX [IN] the value of the w.


SetX

RLPy.RVector4.SetX ( self, tX )

Set the value of the x-axis.

Parameters

tX [IN] the value of the x-axis - float


SetY

RLPy.RVector4.SetY ( self, tY )

Set the value of the y-axis.

Parameters

tX [IN] the value of the y-axis.


SetZ

RLPy.RVector4.SetZ ( self, tZ )

Set the value of the z-axis.

Parameters

tX [IN] the value of the z-axis.


SquaredLength

RLPy.RVector4.SquaredLength ( self )

Squared length of the vector.

Returns

The squared length of this vector - float

W

RLPy.RVector4.W ( self, args )

Get the value of the w.

Returns

The value of the w - float

X

RLPy.RVector4.X ( self, args )

Get the value of the x-axis.

Returns

The value of the x-axis - float

XY

RLPy.RVector4.XY ( self )

Get the element of the 2D vector.

Returns

Return the 2D vector - RLPy.RVector2

XYZ

RLPy.RVector4.XYZ ( self )

Get the element of the 3D vector.

Returns

Return the 3D vector - RLPy.RVector3

Y

RLPy.RVector4.Y ( self, args )

Get the value of the y-axis.

Returns

The value of the y-axis - float

Z

RLPy.RVector4.Z ( self, args )

Get the value of the z-axis.

Returns

The value of the z-axis - float