olp-cpp-sdk 1.24.0
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
olp::math::Vector3< T > Struct Template Reference

Represents 3D vectors and points. More...

#include <Vector.h>

Public Member Functions

 Vector3 (T a, T b, T c)
 Creates a Vector3 instance with the given X, Y, and Z components.
 
 Vector3 (T const &s)
 Creates a Vector3 instance.
 
Vector3< Toperator* (T const &s) const
 Multiplies each vector component by a number.
 
Vector3< Toperator- () const
 Negates the vector.
 
Vector3< Toperator- (Vector3< T > const &v) const
 Subtracts one vector from another.
 
Vector3< Toperator+ (Vector3< T > const &v) const
 Adds corresponding components of two vectors.
 
Vector3< boolLessThan (Vector3< T > const &v) const
 Checks whether the parameters of one vector are less than the parameters of the other vector.
 

Public Attributes

T x
 The X component of the vector.
 
T y
 The Y component of the vector.
 
T z
 The Z component of the vector.
 

Detailed Description

template<typename T>
struct olp::math::Vector3< T >

Represents 3D vectors and points.

Constructor & Destructor Documentation

◆ Vector3() [1/2]

template<typename T >
olp::math::Vector3< T >::Vector3 ( T  a,
T  b,
T  c 
)
inline

Creates a Vector3 instance with the given X, Y, and Z components.

Parameters
aThe X component of the vector.
bThe Y component of the vector.
cThe Z component of the vector.

◆ Vector3() [2/2]

template<typename T >
olp::math::Vector3< T >::Vector3 ( T const s)
inlineexplicit

Creates a Vector3 instance.

Parameters
sThe constant to initialize the vector components.

Member Function Documentation

◆ LessThan()

template<typename T >
Vector3< bool > olp::math::Vector3< T >::LessThan ( Vector3< T > const v) const
inline

Checks whether the parameters of one vector are less than the parameters of the other vector.

Parameters
vThe vector to compare to.

◆ operator*()

template<typename T >
Vector3< T > olp::math::Vector3< T >::operator* ( T const s) const
inline

Multiplies each vector component by a number.

Parameters
sThe number to multiply by.

◆ operator+()

template<typename T >
Vector3< T > olp::math::Vector3< T >::operator+ ( Vector3< T > const v) const
inline

Adds corresponding components of two vectors.

Parameters
vThe vector to add.

◆ operator-()

template<typename T >
Vector3< T > olp::math::Vector3< T >::operator- ( Vector3< T > const v) const
inline

Subtracts one vector from another.

Parameters
vThe vector to substruct from.

The documentation for this struct was generated from the following files: