Difference between revisions of "IC Python API:RLPy RVector3"
From Reallusion Wiki!
Chuck (RL) (Talk | contribs) m |
Chuck (RL) (Talk | contribs) m |
||
Line 9: | Line 9: | ||
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 | |
− | + | ||
----- | ----- | ||
===AlmostZero=== | ===AlmostZero=== | ||
Line 18: | Line 17: | ||
RLPy.RVector3.AlmostZero ( self) | RLPy.RVector3.AlmostZero ( self) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | + | Determine the vector is zero vector. | |
====Returns==== | ====Returns==== | ||
− | + | : true if the vector is zero vector - bool | |
----- | ----- | ||
===Cross=== | ===Cross=== | ||
Line 26: | Line 25: | ||
RLPy.RVector3.Cross ( self, vV ) | RLPy.RVector3.Cross ( self, vV ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | + | Calculate cross production of the two vectors. | |
====Parameters==== | ====Parameters==== | ||
:vV[IN] The vector - RLPy.RVector3 | :vV[IN] The vector - RLPy.RVector3 | ||
====Returns==== | ====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=== | ||
Line 36: | Line 35: | ||
RLPy.RVector3.Distance ( self, vV ) | RLPy.RVector3.Distance ( self, vV ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | + | Distance of the two vectors. | |
====Parameters==== | ====Parameters==== | ||
:vV[IN] The vector - RLPy.RVector3 | :vV[IN] The vector - RLPy.RVector3 | ||
====Returns==== | ====Returns==== | ||
− | + | : the distance - float | |
----- | ----- | ||
===Dot=== | ===Dot=== | ||
Line 46: | Line 45: | ||
RLPy.RVector3.Dot ( self, vV ) | RLPy.RVector3.Dot ( self, vV ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | + | Calculate dot production of the two vectors. | |
====Parameters==== | ====Parameters==== | ||
:vV[IN] The vector - RLPy.RVector3 | :vV[IN] The vector - RLPy.RVector3 | ||
====Returns==== | ====Returns==== | ||
− | + | : the value of the dot production - float | |
----- | ----- | ||
===Interpolate=== | ===Interpolate=== | ||
Line 56: | Line 55: | ||
RLPy.RVector3.Interpolate ( self, vRatio, vV ) | RLPy.RVector3.Interpolate ( self, vRatio, vV ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | + | Interpolate of the two vectors. | |
====Parameters==== | ====Parameters==== | ||
:vRatio[IN] ratio value - float | :vRatio[IN] ratio value - float | ||
:vV[IN] The vector - RLPy.RVector3 | :vV[IN] The vector - RLPy.RVector3 | ||
====Returns==== | ====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=== | ||
Line 67: | Line 66: | ||
RLPy.RVector3.Inverse ( self) | RLPy.RVector3.Inverse ( self) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | + | Inverse this vector. | |
====Returns==== | ====Returns==== | ||
− | + | : the inversed vector - RLPy.RVector3 | |
----- | ----- | ||
===Length=== | ===Length=== | ||
Line 75: | Line 74: | ||
RLPy.RVector3.Length ( self) | RLPy.RVector3.Length ( self) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | + | Length of the vector. | |
====Returns==== | ====Returns==== | ||
− | + | : the length of this vector - float | |
----- | ----- | ||
===Normalize=== | ===Normalize=== | ||
Line 83: | Line 82: | ||
RLPy.RVector3.Normalize ( self) | RLPy.RVector3.Normalize ( self) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | + | Normalizes this vector. | |
====Returns==== | ====Returns==== | ||
− | + | : the normalized vector - float | |
----- | ----- | ||
===SetX=== | ===SetX=== | ||
Line 91: | Line 90: | ||
RLPy.RVector3.SetX ( self, tX ) | RLPy.RVector3.SetX ( self, tX ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | + | Set the value of the x-axis. | |
====Parameters==== | ====Parameters==== | ||
:tX[IN] the value of the x-axis - float | :tX[IN] the value of the x-axis - float | ||
Line 99: | Line 98: | ||
RLPy.RVector3.SetXYZ ( self, tX, tY, tZ ) | RLPy.RVector3.SetXYZ ( self, tX, tY, tZ ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | + | Set the value of the all axes. | |
====Parameters==== | ====Parameters==== | ||
:tX[IN] the value of the x-axis - float | :tX[IN] the value of the x-axis - float | ||
Line 109: | Line 108: | ||
RLPy.RVector3.SetY ( self, tY ) | RLPy.RVector3.SetY ( self, tY ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | + | Set the value of the y-axis. | |
====Parameters==== | ====Parameters==== | ||
:tX[IN] the value of the y-axis. | :tX[IN] the value of the y-axis. | ||
Line 117: | Line 116: | ||
RLPy.RVector3.SetZ ( self, tZ ) | RLPy.RVector3.SetZ ( self, tZ ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | + | Set the value of the z-axis. | |
====Parameters==== | ====Parameters==== | ||
:tX[IN] the value of the z-axis. | :tX[IN] the value of the z-axis. | ||
Line 125: | Line 124: | ||
RLPy.RVector3.SquaredDistance ( self, vV ) | RLPy.RVector3.SquaredDistance ( self, vV ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | + | Squared distance of the two vectors. | |
====Parameters==== | ====Parameters==== | ||
:vV[IN] The vector - RLPy.RVector3 | :vV[IN] The vector - RLPy.RVector3 | ||
====Returns==== | ====Returns==== | ||
− | + | : the Squared distance - float | |
----- | ----- | ||
===SquaredLength=== | ===SquaredLength=== | ||
Line 135: | Line 134: | ||
RLPy.RVector3.SquaredLength ( self) | RLPy.RVector3.SquaredLength ( self) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | + | Squared length of the vector. | |
====Returns==== | ====Returns==== | ||
− | + | : the squared length of this vector - float | |
----- | ----- | ||
===X=== | ===X=== | ||
Line 143: | Line 142: | ||
RLPy.RVector3.X ( self, args ) | RLPy.RVector3.X ( self, args ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | + | Get the value of the x-axis. | |
====Returns==== | ====Returns==== | ||
− | + | : the value of the x-axis - float | |
----- | ----- | ||
===XY=== | ===XY=== | ||
Line 151: | Line 150: | ||
RLPy.RVector3.XY ( self) | RLPy.RVector3.XY ( self) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | + | Get the element of the 2D vector. | |
====Returns==== | ====Returns==== | ||
− | Return the 2D vector - RLPy.RVector2 | + | :Return the 2D vector - RLPy.RVector2 |
----- | ----- | ||
===Y=== | ===Y=== | ||
Line 159: | Line 158: | ||
RLPy.RVector3.Y ( self, args ) | RLPy.RVector3.Y ( self, args ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | + | Get the value of the y-axis. | |
====Returns==== | ====Returns==== | ||
− | + | : the value of the y-axis - float | |
----- | ----- | ||
===Z=== | ===Z=== | ||
Line 167: | Line 166: | ||
RLPy.RVector3.Z ( self, args ) | RLPy.RVector3.Z ( self, args ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | + | Get the value of the z-axis. | |
====Returns==== | ====Returns==== | ||
− | + | : the value of the z-axis - float |
Revision as of 03:03, 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