olp-cpp-sdk  1.22.0
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. More...
 
 Vector3 (T const &s)
 Creates a Vector3 instance. More...
 
Vector3< T > operator* (T const &s) const
 Multiplies each vector component by a number. More...
 
Vector3< T > operator- () const
 Negates the vector.
 
Vector3< T > operator- (Vector3< T > const &v) const
 Subtracts one vector from another. More...
 
Vector3< T > operator+ (Vector3< T > const &v) const
 Adds corresponding components of two vectors. More...
 
Vector3< bool > LessThan (Vector3< T > const &v) const
 Checks whether the parameters of one vector are less than the parameters of the other vector. More...
 

Public Attributes

x
 The X component of the vector.
 
y
 The Y component of the vector.
 
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 ( a,
b,
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: