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

From Reallusion Wiki!
Jump to: navigation, search
(Created page with "{{TOC}} {{Parent|IC_Python_API:RL_Python_Modules|Modules}} == Detailed Description == This class represent the 3D vector. == Member Functions == === AlmostTheSame === <sy...")
 
m
Line 1: Line 1:
 
{{TOC}}
 
{{TOC}}
 
{{Parent|IC_Python_API:RL_Python_Modules|Modules}}
 
{{Parent|IC_Python_API:RL_Python_Modules|Modules}}
 
 
== Detailed Description ==
 
== Detailed Description ==
 
 
This class represent the 3D vector.
 
This class represent the 3D vector.
 +
==Member Functions==
  
== Member Functions ==
+
===AlmostTheSame===
 
+
=== AlmostTheSame ===
+
 
+
 
<syntaxhighlight lang="Python">
 
<syntaxhighlight lang="Python">
 
RLPy.RVector3.AlmostTheSame ( self, vV )
 
RLPy.RVector3.AlmostTheSame ( self, vV )
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
:Determine the two vectors are the same with tolerance.
 +
====Returns====
 +
Returns true if the vector is almost the same - bool
  
Determine the two vectors are the same with tolerance.
+
-----
 
+
===AlmostZero===
==== Returns ====
+
 
+
true if the vector is almost the same - bool
+
 
+
=== AlmostZero ===
+
 
+
 
<syntaxhighlight lang="Python">
 
<syntaxhighlight lang="Python">
 
RLPy.RVector3.AlmostZero ( self)
 
RLPy.RVector3.AlmostZero ( self)
 
</syntaxhighlight>
 
</syntaxhighlight>
 
+
:Determine the vector is zero vector.
Determine the vector is zero vector.
+
====Returns====
 
+
Returns true if the vector is zero vector - bool
==== Returns ====
+
-----
 
+
===Cross===
true if the vector is zero vector - bool
+
 
+
=== Cross ===
+
 
+
 
<syntaxhighlight lang="Python">
 
<syntaxhighlight lang="Python">
 
RLPy.RVector3.Cross ( self, vV )
 
RLPy.RVector3.Cross ( self, vV )
 
</syntaxhighlight>
 
</syntaxhighlight>
 
+
:Calculate cross production of the two vectors.
Calculate cross production of the two vectors.
+
====Parameters====
 
+
:vV[IN] The vector - RLPy.RVector3
==== Parameters ====
+
====Returns====
 
+
vV[IN] The vector - RLPy.RVector3
+
 
+
==== Returns ====
+
 
+
 
New vector which is the cross product of the two vectors - RLPy.RVector3
 
New vector which is the cross product of the two vectors - RLPy.RVector3
 
+
-----
=== Distance ===
+
===Distance===
 
+
 
<syntaxhighlight lang="Python">
 
<syntaxhighlight lang="Python">
 
RLPy.RVector3.Distance ( self, vV )
 
RLPy.RVector3.Distance ( self, vV )
 
</syntaxhighlight>
 
</syntaxhighlight>
 
+
:Distance of the two vectors.
Distance of the two vectors.
+
====Parameters====
 
+
:vV[IN] The vector - RLPy.RVector3
==== Parameters ====
+
====Returns====
 
+
Returns the distance - float
vV[IN] The vector - RLPy.RVector3
+
-----
 
+
===Dot===
==== Returns ====
+
 
+
the distance - float
+
 
+
=== Dot ===
+
 
+
 
<syntaxhighlight lang="Python">
 
<syntaxhighlight lang="Python">
 
RLPy.RVector3.Dot ( self, vV )
 
RLPy.RVector3.Dot ( self, vV )
 
</syntaxhighlight>
 
</syntaxhighlight>
 
+
:Calculate dot production of the two vectors.
Calculate dot production of the two vectors.
+
====Parameters====
 
+
:vV[IN] The vector - RLPy.RVector3
==== Parameters ====
+
====Returns====
 
+
Returns the value of the dot production - float
vV[IN] The vector - RLPy.RVector3
+
-----
 
+
===Interpolate===
==== Returns ====
+
 
+
the value of the dot production - float
+
 
+
=== Interpolate ===
+
 
+
 
<syntaxhighlight lang="Python">
 
<syntaxhighlight lang="Python">
 
RLPy.RVector3.Interpolate ( self, vRatio, vV )
 
RLPy.RVector3.Interpolate ( self, vRatio, vV )
 
</syntaxhighlight>
 
</syntaxhighlight>
 
+
:Interpolate of the two vectors.
Interpolate of the two vectors.
+
====Parameters====
 
+
:vRatio[IN] ratio value - float
==== Parameters ====
+
:vV[IN] The vector - RLPy.RVector3
 
+
====Returns====
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
 
New vector which is the cross product of the two vectors - RLPy.RVector3
 
+
-----
=== Inverse ===
+
===Inverse===
 
+
 
<syntaxhighlight lang="Python">
 
<syntaxhighlight lang="Python">
 
RLPy.RVector3.Inverse ( self)
 
RLPy.RVector3.Inverse ( self)
 
</syntaxhighlight>
 
</syntaxhighlight>
 
+
:Inverse this vector.
Inverse this vector.
+
====Returns====
 
+
Returns the inversed vector - RLPy.RVector3
==== Returns ====
+
-----
 
+
===Length===
the inversed vector - RLPy.RVector3
+
 
+
=== Length ===
+
 
+
 
<syntaxhighlight lang="Python">
 
<syntaxhighlight lang="Python">
 
RLPy.RVector3.Length ( self)
 
RLPy.RVector3.Length ( self)
 
</syntaxhighlight>
 
</syntaxhighlight>
 
+
:Length of the vector.
Length of the vector.
+
====Returns====
 
+
Returns the length of this vector - float
==== Returns ====
+
-----
 
+
===Normalize===
the length of this vector - float
+
 
+
=== Normalize ===
+
 
+
 
<syntaxhighlight lang="Python">
 
<syntaxhighlight lang="Python">
 
RLPy.RVector3.Normalize ( self)
 
RLPy.RVector3.Normalize ( self)
 
</syntaxhighlight>
 
</syntaxhighlight>
 
+
:Normalizes this vector.
Normalizes this vector.
+
====Returns====
 
+
Returns the normalized vector - float
==== Returns ====
+
-----
 
+
===SetX===
the normalized vector - float
+
 
+
=== SetX ===
+
 
+
 
<syntaxhighlight lang="Python">
 
<syntaxhighlight lang="Python">
 
RLPy.RVector3.SetX ( self, tX )
 
RLPy.RVector3.SetX ( self, tX )
 
</syntaxhighlight>
 
</syntaxhighlight>
 
+
:Set the value of the x-axis.
Set the value of the x-axis.
+
====Parameters====
 
+
:tX[IN] the value of the x-axis - float
==== Parameters ====
+
-----
 
+
===SetXYZ===
tX[IN] the value of the x-axis - float
+
 
+
=== SetXYZ ===
+
 
+
 
<syntaxhighlight lang="Python">
 
<syntaxhighlight lang="Python">
 
RLPy.RVector3.SetXYZ ( self, tX, tY, tZ )
 
RLPy.RVector3.SetXYZ ( self, tX, tY, tZ )
 
</syntaxhighlight>
 
</syntaxhighlight>
 
+
:Set the value of the all axes.
Set the value of the all axes.
+
====Parameters====
 
+
:tX[IN] the value of the x-axis - float
==== Parameters ====
+
:tY[IN] the value of the y-axis - float
 
+
:tZ[IN] the value of the z-axis - float
tX[IN] the value of the x-axis - float
+
-----
tY[IN] the value of the y-axis - float
+
===SetY===
tZ[IN] the value of the z-axis - float
+
 
+
=== SetY ===
+
 
+
 
<syntaxhighlight lang="Python">
 
<syntaxhighlight lang="Python">
 
RLPy.RVector3.SetY ( self, tY )
 
RLPy.RVector3.SetY ( self, tY )
 
</syntaxhighlight>
 
</syntaxhighlight>
 
+
:Set the value of the y-axis.
Set the value of the y-axis.
+
====Parameters====
 
+
:tX[IN] the value of the y-axis.
==== Parameters ====
+
-----
 
+
===SetZ===
tX[IN] the value of the y-axis.
+
 
+
=== SetZ ===
+
 
+
 
<syntaxhighlight lang="Python">
 
<syntaxhighlight lang="Python">
 
RLPy.RVector3.SetZ ( self, tZ )
 
RLPy.RVector3.SetZ ( self, tZ )
 
</syntaxhighlight>
 
</syntaxhighlight>
 
+
:Set the value of the z-axis.
Set the value of the z-axis.
+
====Parameters====
 
+
:tX[IN] the value of the z-axis.
==== Parameters ====
+
-----
 
+
===SquaredDistance===
tX[IN] the value of the z-axis.
+
 
+
=== SquaredDistance ===
+
 
+
 
<syntaxhighlight lang="Python">
 
<syntaxhighlight lang="Python">
 
RLPy.RVector3.SquaredDistance ( self, vV )
 
RLPy.RVector3.SquaredDistance ( self, vV )
 
</syntaxhighlight>
 
</syntaxhighlight>
 
+
:Squared distance of the two vectors.
Squared distance of the two vectors.
+
====Parameters====
 
+
:vV[IN] The vector - RLPy.RVector3
==== Parameters ====
+
====Returns====
 
+
Returns the Squared distance - float
vV[IN] The vector - RLPy.RVector3
+
-----
 
+
===SquaredLength===
==== Returns ====
+
 
+
the Squared distance - float
+
 
+
=== SquaredLength ===
+
 
+
 
<syntaxhighlight lang="Python">
 
<syntaxhighlight lang="Python">
 
RLPy.RVector3.SquaredLength ( self)
 
RLPy.RVector3.SquaredLength ( self)
 
</syntaxhighlight>
 
</syntaxhighlight>
 
+
:Squared length of the vector.
Squared length of the vector.
+
====Returns====
 
+
Returns the squared length of this vector - float
==== Returns ====
+
-----
 
+
===X===
the squared length of this vector - float
+
 
+
=== X ===
+
 
+
 
<syntaxhighlight lang="Python">
 
<syntaxhighlight lang="Python">
 
RLPy.RVector3.X ( self, args )
 
RLPy.RVector3.X ( self, args )
 
</syntaxhighlight>
 
</syntaxhighlight>
 
+
:Get the value of the x-axis.
Get the value of the x-axis.
+
====Returns====
 
+
Returns the value of the x-axis - float
==== Returns ====
+
-----
 
+
===XY===
the value of the x-axis - float
+
 
+
=== XY ===
+
 
+
 
<syntaxhighlight lang="Python">
 
<syntaxhighlight lang="Python">
 
RLPy.RVector3.XY ( self)
 
RLPy.RVector3.XY ( self)
 
</syntaxhighlight>
 
</syntaxhighlight>
 
+
:Get the element of the 2D vector.
Get the element of the 2D vector.
+
====Returns====
 
+
==== Returns ====
+
 
+
 
Return the 2D vector - RLPy.RVector2
 
Return the 2D vector - RLPy.RVector2
 
+
-----
=== Y ===
+
===Y===
 
+
 
<syntaxhighlight lang="Python">
 
<syntaxhighlight lang="Python">
 
RLPy.RVector3.Y ( self, args )
 
RLPy.RVector3.Y ( self, args )
 
</syntaxhighlight>
 
</syntaxhighlight>
 
+
:Get the value of the y-axis.
Get the value of the y-axis.
+
====Returns====
 
+
Returns the value of the y-axis - float
==== Returns ====
+
-----
 
+
===Z===
the value of the y-axis - float
+
 
+
=== Z ===
+
 
+
 
<syntaxhighlight lang="Python">
 
<syntaxhighlight lang="Python">
 
RLPy.RVector3.Z ( self, args )
 
RLPy.RVector3.Z ( self, args )
 
</syntaxhighlight>
 
</syntaxhighlight>
 
+
:Get the value of the z-axis.
Get the value of the z-axis.
+
====Returns====
 
+
Returns the value of the z-axis - float
==== Returns ====
+
 
+
the value of the z-axis - float
+

Revision as of 03:44, 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

Returns true if the vector is almost the same - bool


AlmostZero

RLPy.RVector3.AlmostZero ( self)
Determine the vector is zero vector.

Returns

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

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

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

Returns the inversed vector - RLPy.RVector3


Length

RLPy.RVector3.Length ( self)
Length of the vector.

Returns

Returns the length of this vector - float


Normalize

RLPy.RVector3.Normalize ( self)
Normalizes this vector.

Returns

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

Returns the Squared distance - float


SquaredLength

RLPy.RVector3.SquaredLength ( self)
Squared length of the vector.

Returns

Returns the squared length of this vector - float


X

RLPy.RVector3.X ( self, args )
Get the value of the x-axis.

Returns

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

Returns the value of the y-axis - float


Z

RLPy.RVector3.Z ( self, args )
Get the value of the z-axis.

Returns

Returns the value of the z-axis - float