3D free-vector value type. Mirrors occtl_vector3_t.
More...
#include <geom.hpp>
|
|
| Vector3 () noexcept |
| | Default-constructs the zero vector.
|
| |
|
| Vector3 (const double theX, const double theY, const double theZ) noexcept |
| | Constructs from explicit components.
|
| |
|
| Vector3 (const occtl_vector3_t &theC) noexcept |
| | Wraps an existing C value type (zero-cost).
|
| |
|
const occtl_vector3_t & | c_type () const noexcept |
| | Borrows-it view of the underlying C value type.
|
| |
|
double | x () const noexcept |
| | X component.
|
| |
|
double | y () const noexcept |
| | Y component.
|
| |
|
double | z () const noexcept |
| | Z component.
|
| |
|
double | dot (const Vector3 &theOther) const noexcept |
| | Dot product with another vector. Never throws.
|
| |
|
Vector3 | cross (const Vector3 &theOther) const noexcept |
| | Cross product with another vector. Never throws.
|
| |
|
double | magnitude () const noexcept |
| | Euclidean length. Never throws.
|
| |
| Vector3 | normalized () const |
| | Returns this vector normalised to unit length.
|
| |
|
Vector3 | operator+ (const Vector3 &theOther) const noexcept |
| | Component-wise sum.
|
| |
|
Vector3 | operator- (const Vector3 &theOther) const noexcept |
| | Component-wise difference.
|
| |
|
Vector3 | operator* (const double theS) const noexcept |
| | Scalar multiplication.
|
| |
|
Vector3 | reversed () const noexcept |
| | Returns this vector negated.
|
| |
| double | angle (const Vector3 &theOther) const |
| | Angle in radians between this and theOther, in [0, π].
|
| |
3D free-vector value type. Mirrors occtl_vector3_t.
◆ angle()
| double occtl::Vector3::angle |
( |
const Vector3 & |
theOther | ) |
const |
|
inline |
Angle in radians between this and theOther, in [0, π].
- Exceptions
-
| Error | with code OCCTL_GEOMETRY_INVALID when either vector has zero length. |
◆ normalized()
| Vector3 occtl::Vector3::normalized |
( |
| ) |
const |
|
inline |
Returns this vector normalised to unit length.
- Exceptions
-
| Error | with code OCCTL_GEOMETRY_INVALID when this vector has zero length. |
The documentation for this struct was generated from the following file: