![]() |
Cyclone 3DR Script
from Technodigit, part of Hexagon. Copyright 1997-2024.
|
Allow the use of the mathematical vector object. More...
Public Member Functions | |
| SVector | Add (SVector vector) |
| Calculate the sum of the current vector and another vector. More... | |
| ApplyTransformation (SMatrix matrix) | |
| Apply a geometric transformation to the current SVector by making a product with the given matrix. More... | |
| SVector | Div (number divValue) |
| Calculate the division of a vector by a scalar. More... | |
| boolean | Equals (SVector vectToCompare) |
| Test if two vectors are equal or not. More... | |
| number | GetLength () |
| Get the length of the SVector. More... | |
| SVector | GetNormalized () |
| Normalize a copy of the current vector. More... | |
| number | GetX () |
| Get the X coordinate value. More... | |
| number | GetY () |
| Get the Y coordinate value. More... | |
| number | GetZ () |
| Get the Z coordinate value. More... | |
| boolean | IsNull () |
| Return if the vector is null (0, 0, 0) or not. More... | |
| SVector | Mult (number multValue) |
| Calculate the multiplication of a vector by a scalar. More... | |
| Normalize () | |
| Modify the 3D vector to have its norm equal to 1. More... | |
| Opposite () | |
| Modify the SVector to have its opposite. More... | |
| SetX (number x) | |
| Set the X coordinate. More... | |
| SetY (number y) | |
| Set the Y coordinate. More... | |
| SetZ (number z) | |
| Set the Z coordinate. More... | |
| SVector | Sub (SVector vector) |
| Calculate the subtraction of the current vector and another vector. More... | |
| SVector () | |
| Empty constructor. More... | |
| SVector (number x, number y, number z) | |
| Constructor from X, Y, Z coordinates. More... | |
| SVector (SPoint endPt) | |
| Constructor from one point. The result is the vector between the origin (0,0,0) and the point 'endPt'. More... | |
| SVector (SPoint startPt, SPoint endPt) | |
| Constructor which initializes the vector between a starting point and an ending point.In other words the vector is initialized to 'endPt'-'startPt'. More... | |
| SVector (SVector other) | |
| Constructor by copy from other vector. More... | |
| string | toString () |
| Get the type of the variable. More... | |
| string | ValuesToString () |
| Get a string representation of the vector. More... | |
Static Public Member Functions | |
| static number | Angle (SVector vector1, SVector vector2) |
| Compute the angle in degrees between two 3D vectors. More... | |
| static SVector | Cross (SVector v1, SVector v2) |
| Make the 3D vectorial product of two 3D vectors (cross product). More... | |
| static number | Dot (SVector v1, SVector v2) |
| Make the scalar product of two 3D vectors (dot product). More... | |
| static SVector | New () |
| Empty constructor. More... | |
| static SVector | New (number x, number y, number z) |
| Constructor from X, Y, Z coordinates. More... | |
| static SVector | New (SPoint endPt) |
| Constructor from one point. The result is the vector between the origin (0,0,0) and the point 'endPt'. More... | |
| static SVector | New (SPoint startPt, SPoint endPt) |
| Constructor which initializes the vector between a starting point and an ending point.In other words the vector is initialized to 'endPt'-'startPt'. More... | |
| static SVector | New (SVector other) |
| Constructor by copy from other vector. More... | |
Allow the use of the mathematical vector object.
| SVector::SVector | ( | ) |
Empty constructor.
| SVector::SVector | ( | SVector | other | ) |
| SVector::SVector | ( | number | x, |
| number | y, | ||
| number | z | ||
| ) |
Constructor from X, Y, Z coordinates.
| x | (number) The X coordinate |
| y | (number) The Y coordinate |
| z | (number) The Z coordinate |
| SVector::SVector | ( | SPoint | endPt | ) |
Calculate the sum of the current vector and another vector.
Compute the angle in degrees between two 3D vectors.
| vector1 | (SVector) The first vector to compute angle with. |
| vector2 | (SVector) The second vector to compute angle with. |
| SVector::ApplyTransformation | ( | SMatrix | matrix | ) |
| SVector SVector::Div | ( | number | divValue | ) |
Calculate the division of a vector by a scalar.
| divValue | (number) The value used for the division |
| boolean SVector::Equals | ( | SVector | vectToCompare | ) |
| number SVector::GetLength | ( | ) |
Get the length of the SVector.
| SVector SVector::GetNormalized | ( | ) |
| number SVector::GetX | ( | ) |
Get the X coordinate value.
| number SVector::GetY | ( | ) |
Get the Y coordinate value.
| number SVector::GetZ | ( | ) |
Get the Z coordinate value.
| boolean SVector::IsNull | ( | ) |
Return if the vector is null (0, 0, 0) or not.
| SVector SVector::Mult | ( | number | multValue | ) |
Calculate the multiplication of a vector by a scalar.
| multValue | (number) The value used for the multiplication |
|
static |
| SVector::Normalize | ( | ) |
Modify the 3D vector to have its norm equal to 1.
| SVector::Opposite | ( | ) |
Modify the SVector to have its opposite.
| SVector::SetX | ( | number | x | ) |
Set the X coordinate.
| x | (number) The value to set. |
| SVector::SetY | ( | number | y | ) |
Set the Y coordinate.
| y | (number) The value to set. |
| SVector::SetZ | ( | number | z | ) |
Set the Z coordinate.
| z | (number) The value to set. |
Calculate the subtraction of the current vector and another vector.
| string SVector::toString | ( | ) |
Get the type of the variable.
| string SVector::ValuesToString | ( | ) |
Get a string representation of the vector.