Difference between revisions of "IC Python API:RLPy RVector3"

From Reallusion Wiki!
Jump to: navigation, search
m
m
Line 11: Line 11:
 
Determine the two vectors are the same with tolerance.
 
Determine the two vectors are the same with tolerance.
 
====Returns====
 
====Returns====
: true if the vector is almost the same - bool
+
:True if the vector is almost the same - bool
 
-----
 
-----
 
===AlmostZero===
 
===AlmostZero===
Line 19: Line 19:
 
Determine the vector is zero vector.
 
Determine the vector is zero vector.
 
====Returns====
 
====Returns====
: true if the vector is zero vector - bool
+
:True if the vector is zero vector - bool
 
-----
 
-----
 
===Cross===
 
===Cross===
Line 39: Line 39:
 
:vV[IN] The vector - RLPy.RVector3
 
:vV[IN] The vector - RLPy.RVector3
 
====Returns====
 
====Returns====
: the distance - float
+
:The distance - float
 
-----
 
-----
 
===Dot===
 
===Dot===
Line 49: Line 49:
 
:vV[IN] The vector - RLPy.RVector3
 
:vV[IN] The vector - RLPy.RVector3
 
====Returns====
 
====Returns====
: the value of the dot production - float
+
:The value of the dot production - float
 
-----
 
-----
 
===Interpolate===
 
===Interpolate===
Line 68: Line 68:
 
Inverse this vector.
 
Inverse this vector.
 
====Returns====
 
====Returns====
: the inversed vector - RLPy.RVector3
+
:The inversed vector - RLPy.RVector3
 
-----
 
-----
 
===Length===
 
===Length===
Line 76: Line 76:
 
Length of the vector.
 
Length of the vector.
 
====Returns====
 
====Returns====
: the length of this vector - float
+
:The length of this vector - float
 
-----
 
-----
 
===Normalize===
 
===Normalize===
Line 84: Line 84:
 
Normalizes this vector.
 
Normalizes this vector.
 
====Returns====
 
====Returns====
: the normalized vector - float
+
:The normalized vector - float
 
-----
 
-----
 
===SetX===
 
===SetX===
Line 128: Line 128:
 
:vV[IN] The vector - RLPy.RVector3
 
:vV[IN] The vector - RLPy.RVector3
 
====Returns====
 
====Returns====
: the Squared distance - float
+
:The Squared distance - float
 
-----
 
-----
 
===SquaredLength===
 
===SquaredLength===
Line 136: Line 136:
 
Squared length of the vector.
 
Squared length of the vector.
 
====Returns====
 
====Returns====
: the squared length of this vector - float
+
:The squared length of this vector - float
 
-----
 
-----
 
===X===
 
===X===
Line 144: Line 144:
 
Get the value of the x-axis.
 
Get the value of the x-axis.
 
====Returns====
 
====Returns====
: the value of the x-axis - float
+
:The value of the x-axis - float
 
-----
 
-----
 
===XY===
 
===XY===
Line 160: Line 160:
 
Get the value of the y-axis.
 
Get the value of the y-axis.
 
====Returns====
 
====Returns====
: the value of the y-axis - float
+
:The value of the y-axis - float
 
-----
 
-----
 
===Z===
 
===Z===
Line 168: Line 168:
 
Get the value of the z-axis.
 
Get the value of the z-axis.
 
====Returns====
 
====Returns====
: the value of the z-axis - float
+
:The value of the z-axis - float

Revision as of 04:06, 25 March 2019

Main article: Modules.

Detailed Description

This class represent the 3D vector.

Member Functions

AlmostTheSame

RLPy.RVector3.AlmostTheSame ( self, vV )

Determine the two vectors are the same with tolerance.

Returns

True if the vector is almost the same - bool

AlmostZero

RLPy.RVector3.AlmostZero ( self)

Determine the vector is zero vector.

Returns

True if the vector is zero vector - bool

Cross

RLPy.RVector3.Cross ( self, vV )

Calculate cross production of the two vectors.

Parameters

vV[IN] The vector - RLPy.RVector3

Returns

New vector which is the cross product of the two vectors - RLPy.RVector3

Distance

RLPy.RVector3.Distance ( self, vV )

Distance of the two vectors.

Parameters

vV[IN] The vector - RLPy.RVector3

Returns

The distance - float

Dot

RLPy.RVector3.Dot ( self, vV )

Calculate dot production of the two vectors.

Parameters

vV[IN] The vector - RLPy.RVector3

Returns

The value of the dot production - float

Interpolate

RLPy.RVector3.Interpolate ( self, vRatio, vV )

Interpolate of the two vectors.

Parameters

vRatio[IN] ratio value - float
vV[IN] The vector - RLPy.RVector3

Returns

New vector which is the cross product of the two vectors - RLPy.RVector3

Inverse

RLPy.RVector3.Inverse ( self)

Inverse this vector.

Returns

The inversed vector - RLPy.RVector3

Length

RLPy.RVector3.Length ( self)

Length of the vector.

Returns

The length of this vector - float

Normalize

RLPy.RVector3.Normalize ( self)

Normalizes this vector.

Returns

The normalized vector - float

SetX

RLPy.RVector3.SetX ( self, tX )

Set the value of the x-axis.

Parameters

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

SetXYZ

RLPy.RVector3.SetXYZ ( self, tX, tY, tZ )

Set the value of the all axes.

Parameters

tX[IN] the value of the x-axis - float
tY[IN] the value of the y-axis - float
tZ[IN] the value of the z-axis - float

SetY

RLPy.RVector3.SetY ( self, tY )

Set the value of the y-axis.

Parameters

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

SetZ

RLPy.RVector3.SetZ ( self, tZ )

Set the value of the z-axis.

Parameters

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

SquaredDistance

RLPy.RVector3.SquaredDistance ( self, vV )

Squared distance of the two vectors.

Parameters

vV[IN] The vector - RLPy.RVector3

Returns

The Squared distance - float

SquaredLength

RLPy.RVector3.SquaredLength ( self)

Squared length of the vector.

Returns

The squared length of this vector - float

X

RLPy.RVector3.X ( self, args )

Get the value of the x-axis.

Returns

The value of the x-axis - float

XY

RLPy.RVector3.XY ( self)

Get the element of the 2D vector.

Returns

Return the 2D vector - RLPy.RVector2

Y

RLPy.RVector3.Y ( self, args )

Get the value of the y-axis.

Returns

The value of the y-axis - float

Z

RLPy.RVector3.Z ( self, args )

Get the value of the z-axis.

Returns

The value of the z-axis - float