Class that represents a point in 3D space or a 3D vector. More...
#include <Common.hpp>
Public Member Functions | |
| Point3D () | |
| Constructor without initialising the coordinates. | |
| Point3D (const sal3d_point3d &point) | |
| Constructor. | |
| Point3D (const Point3D &point) | |
| Copy Constructor. | |
| Point3D (float x, float y, float z) | |
| Constructor by values. | |
| const sal3d_point3d & | c_point_3d () const |
| sal3d_point3d & | c_point_3d () |
| Returns a copy of the internal C sal3d_point3d. | |
| const float & | x () const |
| float & | x () |
| const float & | y () const |
| float & | y () |
| const float & | z () const |
| float & | z () |
| float | norm () const |
| The norm of a vector is its length or size. | |
| void | normalize () |
| Normalizes this Point3D vector. | |
| Point3D | vector (const Point3D &destination) const |
| Calculates the Point3D vector from this Point3D to the destination Point3D. | |
| float | dot (const Point3D &rhs) const |
| Performs the dot product within this Point3D vector. | |
| Point3D | cross (const Point3D &rhs) const |
| Performs the cross product within this Point3D vector. | |
| Point3D & | operator= (const Point3D &rhs) |
| Assigns to this Point3D the values of other Point3D. | |
| Point3D | operator* (const float rhs) const |
| Performs a scalar product on this Point3D vector. | |
| Point3D & | operator*= (const float rhs) |
| Performs a scalar product on this Point3D vector and assigns the result to it. | |
| const float & | operator[] (int idx) const |
| Gets a read-only coordinate of the Point3D. | |
| float & | operator[] (int idx) |
| Gets a modifiable coordinate of the Point3D. | |
| bool | operator== (const Point3D &rhs) |
| Checks the equality of this Point3D with another Point3D. | |
Class that represents a point in 3D space or a 3D vector.
| sal3d::Point3D::Point3D | ( | const sal3d_point3d & | point | ) | [inline, explicit] |
Constructor.
| [in] | point | A C representation of a Point3D |
| sal3d::Point3D::Point3D | ( | const Point3D & | point | ) | [inline] |
Copy Constructor.
| [in] | point | A C++ representation of a Point3D |
| sal3d::Point3D::Point3D | ( | float | x, |
| float | y, | ||
| float | z | ||
| ) | [inline] |
| const sal3d_point3d& sal3d::Point3D::c_point_3d | ( | ) | const [inline] |
Referenced by sal3d::Geometric::Plane::alignToZ(), sal3d::Geometric::distanceToPlane(), operator*(), sal3d::Geometric::Plane::Plane(), sal3d::AngularMetric::Config::toPoint3D(), and sal3d::Metric::Config::toPoint3D().
| sal3d_point3d& sal3d::Point3D::c_point_3d | ( | ) | [inline] |
Returns a copy of the internal C sal3d_point3d.
| Point3D sal3d::Point3D::cross | ( | const Point3D & | rhs | ) | const [inline] |
| float sal3d::Point3D::dot | ( | const Point3D & | rhs | ) | const [inline] |
| float sal3d::Point3D::norm | ( | ) | const [inline] |
The norm of a vector is its length or size.
Referenced by normalize().
| Point3D sal3d::Point3D::operator* | ( | const float | rhs | ) | const [inline] |
| Point3D& sal3d::Point3D::operator*= | ( | const float | rhs | ) | [inline] |
| bool sal3d::Point3D::operator== | ( | const Point3D & | rhs | ) | [inline] |
| const float& sal3d::Point3D::operator[] | ( | int | idx | ) | const [inline] |
Gets a read-only coordinate of the Point3D.
| [in] | idx | The coordinate to return. The range is 0..2: 0: x, 1: y, 2: z. |
idx | float& sal3d::Point3D::operator[] | ( | int | idx | ) | [inline] |
Gets a modifiable coordinate of the Point3D.
| [in] | idx | The coordinate to return. The range is 0..2: 0: x, 1: y, 2: z. |
idx | Point3D sal3d::Point3D::vector | ( | const Point3D & | destination | ) | const [inline] |
| const float& sal3d::Point3D::x | ( | ) | const [inline] |
Referenced by sal3d::Movement3D::inverse(), operator*(), operator==(), Point3D(), sal3d::Geometric::Sphere::setCentre(), and sal3d::Geometric::Sphere::Sphere().
| float& sal3d::Point3D::x | ( | ) | [inline] |
| const float& sal3d::Point3D::y | ( | ) | const [inline] |
Referenced by sal3d::Movement3D::inverse(), operator*(), operator==(), Point3D(), sal3d::Geometric::Sphere::setCentre(), and sal3d::Geometric::Sphere::Sphere().
| float& sal3d::Point3D::y | ( | ) | [inline] |
| const float& sal3d::Point3D::z | ( | ) | const [inline] |
Referenced by sal3d::Movement3D::inverse(), operator*(), operator==(), Point3D(), sal3d::Geometric::Sphere::setCentre(), and sal3d::Geometric::Sphere::Sphere().
| float& sal3d::Point3D::z | ( | ) | [inline] |
by
1.7.6.1