3d position coordinates
More...
#include <angelcad.h>
3d position coordinates
a pos3d is a position in 3d space. It is used with 3d objects.
◆ pos3d() [1/2]
pos3d::pos3d |
( |
const pos3d@ |
other | ) |
|
Construct position as copy of other position.
- Parameters
-
◆ pos3d() [2/2]
pos3d::pos3d |
( |
double |
x, |
|
|
double |
y, |
|
|
double |
z |
|
) |
| |
Create 3d position from x,y and z coordinates.
- Parameters
-
x | double, x coordinate
|
y | double, y coordinate
|
z | double, z coordinate |
◆ dist()
double pos3d::dist |
( |
const pos3d@ |
pos | ) |
const |
distance from other position
- Parameters
-
pos | pos3d@, other position
|
- Returns
- double, distance from pos
◆ opAdd() [1/2]
Add 2 positions, return new position: p = p1 + p2.
- Parameters
-
- Returns
- pos3d@
◆ opAdd() [2/2]
Add position and vector, return new position: p = p1 + v1.
- Parameters
-
- Returns
- pos3d@
◆ opAdd_r()
Add vector and position, return new position: p = v1 + p1.
- Parameters
-
- Returns
- pos3d@
◆ opMul()
pos3d@ pos3d::opMul |
( |
double |
f1 | ) |
|
Multiply position by factor, return new position: p = p1 * f1.
- Parameters
-
- Returns
- pos3d@
◆ opMul_r()
pos3d@ pos3d::opMul_r |
( |
double |
f1 | ) |
|
Multiply position by factor, return new position: p = f1 * p1.
- Parameters
-
- Returns
- pos3d@
◆ opSub()
Subtract vector from position, return new position: p = p1 - v1.
- Parameters
-
- Returns
- pos3d@
◆ x()
double pos3d::x |
( |
| ) |
const |
x coordinate
- Returns
- double, x coordinate
◆ y()
double pos3d::y |
( |
| ) |
const |
y coordinate
- Returns
- double, y coordinate
◆ z()
double pos3d::z |
( |
| ) |
const |
z coordinate
- Returns
- double, z coordinate
The documentation for this class was generated from the following file: