Creation of a coordinate reference. More...
Public Member Functions | |
GO2SXYZ () | |
Create an 'empty' reference at coordinates (0,0,0) | |
GO2SXYZ (GO2SEnum::GO2SAxis axis) | |
Creation of a reference on an axis direction. | |
GO2SXYZ (Number x, Number y, Number z) | |
Creation of a reference at given coordinates. | |
void | Add (GO2SXYZ other) |
Add a vector XYZ to the object. | |
GO2SXYZ | Added (GO2SXYZ other) |
GO2SXYZ | CrossProduct (GO2SXYZ other) |
Number | Distance (GO2SXYZ other) |
Number | Distance2D (GO2SXYZ other) |
Number | DotProduct (GO2SXYZ other) |
Boolean | IsPolar () |
void | Normalize () |
Normalize a vector XYZ. | |
GO2SXYZ | Normalized () |
GO2SXYZ | Perpendicular () |
void | Scale (Number v) |
Scale a vector XYZ. | |
GO2SXYZ | Scaled (Number v) |
GO2SEnum::GO2SError | SetPolarPosition (Number radius, Number angle, Number altitude=0) |
GO2SEnum::GO2SError | SetPolarRelativeTo (GO2SXYZ point, Number radius, Number angle, Number altitude=0) |
GO2SEnum::GO2SError | SetPosition (Number x, Number y, Number z) |
GO2SEnum::GO2SError | SetRelativeTo (GO2SXYZ point, Number vx, Number vy, Number altitude=0) |
void | Subtract (GO2SXYZ other) |
Subtract a vector XYZ. | |
GO2SXYZ | Subtracted (GO2SXYZ other) |
String | toString () |
Number | X () |
Number | Y () |
Number | Z () |
Public Member Functions inherited from GO2SReference | |
GO2SGeometry | GetGeometry () |
Boolean | IsOnEdge () |
Boolean | IsOnFace () |
Boolean | IsOnGeometry () |
Creation of a coordinate reference.
A coordinate reference is a XYZ container to manage coordinates or vectors. It is also a 'smart container' for XYZ coordinates by storing construction history. For exemple, if initialized with GO2SGeometry::GetFirstPoint, the coordinates will keep anchored to the first point of the geometry if updated
|
inline |
Creation of a reference at given coordinates.
[in] | x | x coordinate |
[in] | y | y coordinate |
[in] | z | z coordinate |
GO2SXYZ::GO2SXYZ | ( | GO2SEnum::GO2SAxis | axis | ) |
Creation of a reference on an axis direction.
[in] | axis | axis |
|
inline |
Add a vector XYZ to the object.
[in] | other | other vector to add |
[in] | other | other vector to add |
[in] | other | other vector |
Number GO2SXYZ::Distance | ( | GO2SXYZ | other | ) |
Number GO2SXYZ::Distance2D | ( | GO2SXYZ | other | ) |
|
inline |
[in] | other | other vector |
|
inline |
Get if the reference is polar
|
inline |
|
inline |
|
inline |
Scale a vector XYZ.
[in] | v | scale factor |
|
inline |
[in] | v | scale factor |
GO2SEnum::GO2SError GO2SXYZ::SetPolarPosition | ( | Number | radius, |
Number | angle, | ||
Number | altitude = 0 ) |
Create a reference at given polar coordinates
[in] | radius | the radius in mm |
[in] | angle | an angle in degree |
[in] | altitude | the altitude of the point |
GO2SEnum::GO2SError GO2SXYZ::SetPolarRelativeTo | ( | GO2SXYZ | point, |
Number | radius, | ||
Number | angle, | ||
Number | altitude = 0 ) |
Create a reference relative to another with polar coordinates
[in] | point | the point on which the new point will be relative |
[in] | radius | the radius in mm |
[in] | angle | an angle in degree |
[in] | altitude | the altitude of the point |
GO2SEnum::GO2SError GO2SXYZ::SetPosition | ( | Number | x, |
Number | y, | ||
Number | z ) |
Create a reference at given coordinates
[in] | x | x coordinate |
[in] | y | y coordinate |
[in] | z | z coordinate |
GO2SEnum::GO2SError GO2SXYZ::SetRelativeTo | ( | GO2SXYZ | point, |
Number | vx, | ||
Number | vy, | ||
Number | altitude = 0 ) |
Set a reference relative to another point
[in] | point | the point |
[in] | vx | distance in x-axis of the point |
[in] | vy | distance in y-axis of the point |
[in] | altitude | the altitude of the point |
|
inline |
Subtract a vector XYZ.
[in] | other | other vector to subtract |
[in] | other | other vector to subtract |
String GO2SXYZ::toString | ( | ) |
Convert a GO2SXYZ to a string (for debugging purpose using console.log)
|
inline |
|
inline |
|
inline |