raylib-cpp
C++ object-oriented wrapper library for raylib.
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
raylib::Vector4 Class Reference

Vector4 type. More...

#include <Vector4.hpp>

Public Member Functions

 Vector4 (::Color color)
 
constexpr Vector4 (::Rectangle rectangle)
 
constexpr Vector4 (const ::Vector4 &vec)
 
constexpr Vector4 (float x)
 
constexpr Vector4 (float x, float y)
 
constexpr Vector4 (float x, float y, float z)
 
constexpr Vector4 (float x, float y, float z, float w)
 
Color ColorFromNormalized () const
 
float GetW () const
 Retrieves the w value for the object.
 
float GetX () const
 Retrieves the x value for the object.
 
float GetY () const
 Retrieves the y value for the object.
 
float GetZ () const
 Retrieves the z value for the object.
 
Vector4 Invert () const
 
float Length () const
 
Vector4 Lerp (const ::Vector4 &vector4, float amount) const
 
Vector4 Multiply (const ::Vector4 &vector4) const
 
Vector4 Nlerp (const ::Vector4 &vector4, float amount) const
 
Vector4 Normalize () const
 
 operator Color () const
 
 operator std::string () const
 
constexpr bool operator!= (const ::Vector4 &other) const
 
Vector4 operator* (const ::Vector4 &vector4) const
 
constexpr operator::Rectangle () const
 
Vector4operator= (const ::Vector4 &vector4)
 
constexpr bool operator== (const ::Vector4 &other) const
 
void SetW (float value)
 Sets the w value for the object.
 
void SetX (float value)
 Sets the x value for the object.
 
void SetY (float value)
 Sets the y value for the object.
 
void SetZ (float value)
 Sets the z value for the object.
 
Vector4 Slerp (const ::Vector4 &vector4, float amount) const
 
std::pair< Vector3, float > ToAxisAngle () const
 Get the rotation angle and axis for a given quaternion.
 
void ToAxisAngle (::Vector3 *outAxis, float *outAngle) const
 
Vector3 ToEuler () const
 
Matrix ToMatrix () const
 
constexpr ::Rectangle ToRectangle () const
 
std::string ToString () const
 
Vector4 Transform (const ::Matrix &matrix) const
 

Static Public Member Functions

static Vector4 FromAxisAngle (const ::Vector3 &axis, const float angle)
 
static Vector4 FromEuler (const ::Vector3 &vector3)
 
static Vector4 FromEuler (const float pitch, const float yaw, const float roll)
 
static Vector4 FromMatrix (const ::Matrix &matrix)
 
static Vector4 FromVector3ToVector3 (const ::Vector3 &from, const ::Vector3 &to)
 
static Vector4 Identity ()
 

Protected Member Functions

void set (const ::Vector4 &vec4)
 

Detailed Description

Vector4 type.

Definition at line 19 of file Vector4.hpp.

Constructor & Destructor Documentation

◆ Vector4() [1/8]

constexpr raylib::Vector4::Vector4 ( const ::Vector4 &  vec)
inlineconstexpr

Definition at line 21 of file Vector4.hpp.

◆ Vector4() [2/8]

constexpr raylib::Vector4::Vector4 ( float  x,
float  y,
float  z,
float  w 
)
inlineconstexpr

Definition at line 23 of file Vector4.hpp.

◆ Vector4() [3/8]

constexpr raylib::Vector4::Vector4 ( float  x,
float  y,
float  z 
)
inlineconstexpr

Definition at line 24 of file Vector4.hpp.

◆ Vector4() [4/8]

constexpr raylib::Vector4::Vector4 ( float  x,
float  y 
)
inlineconstexpr

Definition at line 25 of file Vector4.hpp.

◆ Vector4() [5/8]

constexpr raylib::Vector4::Vector4 ( float  x)
inlineconstexpr

Definition at line 26 of file Vector4.hpp.

◆ Vector4() [6/8]

constexpr raylib::Vector4::Vector4 ( )
inlineconstexpr

Definition at line 27 of file Vector4.hpp.

◆ Vector4() [7/8]

constexpr raylib::Vector4::Vector4 ( ::Rectangle  rectangle)
inlineconstexpr

Definition at line 28 of file Vector4.hpp.

◆ Vector4() [8/8]

raylib::Vector4::Vector4 ( ::Color  color)
inline

Definition at line 30 of file Vector4.hpp.

Member Function Documentation

◆ ColorFromNormalized()

Color raylib::Vector4::ColorFromNormalized ( ) const
inline

Definition at line 113 of file Vector4.hpp.

◆ FromAxisAngle()

static Vector4 raylib::Vector4::FromAxisAngle ( const ::Vector3 &  axis,
const float  angle 
)
inlinestatic

Definition at line 98 of file Vector4.hpp.

◆ FromEuler() [1/2]

static Vector4 raylib::Vector4::FromEuler ( const ::Vector3 &  vector3)
inlinestatic

Definition at line 106 of file Vector4.hpp.

◆ FromEuler() [2/2]

static Vector4 raylib::Vector4::FromEuler ( const float  pitch,
const float  yaw,
const float  roll 
)
inlinestatic

Definition at line 102 of file Vector4.hpp.

◆ FromMatrix()

static Vector4 raylib::Vector4::FromMatrix ( const ::Matrix &  matrix)
inlinestatic

Definition at line 96 of file Vector4.hpp.

◆ FromVector3ToVector3()

static Vector4 raylib::Vector4::FromVector3ToVector3 ( const ::Vector3 &  from,
const ::Vector3 &  to 
)
inlinestatic

Definition at line 92 of file Vector4.hpp.

◆ GetW()

float raylib::Vector4::GetW ( ) const
inline

Retrieves the w value for the object.

Returns
The w value of the object.

Definition at line 35 of file Vector4.hpp.

◆ GetX()

float raylib::Vector4::GetX ( ) const
inline

Retrieves the x value for the object.

Returns
The x value of the object.

Definition at line 32 of file Vector4.hpp.

◆ GetY()

float raylib::Vector4::GetY ( ) const
inline

Retrieves the y value for the object.

Returns
The y value of the object.

Definition at line 33 of file Vector4.hpp.

◆ GetZ()

float raylib::Vector4::GetZ ( ) const
inline

Retrieves the z value for the object.

Returns
The z value of the object.

Definition at line 34 of file Vector4.hpp.

◆ Identity()

static Vector4 raylib::Vector4::Identity ( )
inlinestatic

Definition at line 90 of file Vector4.hpp.

◆ Invert()

Vector4 raylib::Vector4::Invert ( ) const
inline

Definition at line 73 of file Vector4.hpp.

◆ Length()

float raylib::Vector4::Length ( ) const
inline

Definition at line 69 of file Vector4.hpp.

◆ Lerp()

Vector4 raylib::Vector4::Lerp ( const ::Vector4 &  vector4,
float  amount 
) const
inline

Definition at line 61 of file Vector4.hpp.

◆ Multiply()

Vector4 raylib::Vector4::Multiply ( const ::Vector4 &  vector4) const
inline

Definition at line 57 of file Vector4.hpp.

◆ Nlerp()

Vector4 raylib::Vector4::Nlerp ( const ::Vector4 &  vector4,
float  amount 
) const
inline

Definition at line 63 of file Vector4.hpp.

◆ Normalize()

Vector4 raylib::Vector4::Normalize ( ) const
inline

Definition at line 71 of file Vector4.hpp.

◆ operator Color()

raylib::Vector4::operator Color ( ) const
inline

Definition at line 115 of file Vector4.hpp.

◆ operator std::string()

raylib::Vector4::operator std::string ( ) const
inline

Definition at line 54 of file Vector4.hpp.

◆ operator!=()

constexpr bool raylib::Vector4::operator!= ( const ::Vector4 &  other) const
inlineconstexpr

Definition at line 46 of file Vector4.hpp.

◆ operator*()

Vector4 raylib::Vector4::operator* ( const ::Vector4 &  vector4) const
inline

Definition at line 59 of file Vector4.hpp.

◆ operator::Rectangle()

constexpr raylib::Vector4::operator::Rectangle ( ) const
inlineconstexpr

Definition at line 50 of file Vector4.hpp.

◆ operator=()

Vector4 & raylib::Vector4::operator= ( const ::Vector4 &  vector4)
inline

Definition at line 37 of file Vector4.hpp.

◆ operator==()

constexpr bool raylib::Vector4::operator== ( const ::Vector4 &  other) const
inlineconstexpr

Definition at line 42 of file Vector4.hpp.

◆ set()

void raylib::Vector4::set ( const ::Vector4 &  vec4)
inlineprotected

Definition at line 117 of file Vector4.hpp.

◆ SetW()

void raylib::Vector4::SetW ( float  value)
inline

Sets the w value for the object.

Parameters
valueThe value of which to set w to.

Definition at line 35 of file Vector4.hpp.

◆ SetX()

void raylib::Vector4::SetX ( float  value)
inline

Sets the x value for the object.

Parameters
valueThe value of which to set x to.

Definition at line 32 of file Vector4.hpp.

◆ SetY()

void raylib::Vector4::SetY ( float  value)
inline

Sets the y value for the object.

Parameters
valueThe value of which to set y to.

Definition at line 33 of file Vector4.hpp.

◆ SetZ()

void raylib::Vector4::SetZ ( float  value)
inline

Sets the z value for the object.

Parameters
valueThe value of which to set z to.

Definition at line 34 of file Vector4.hpp.

◆ Slerp()

Vector4 raylib::Vector4::Slerp ( const ::Vector4 &  vector4,
float  amount 
) const
inline

Definition at line 65 of file Vector4.hpp.

◆ ToAxisAngle() [1/2]

std::pair< Vector3, float > raylib::Vector4::ToAxisAngle ( ) const
inline

Get the rotation angle and axis for a given quaternion.

Definition at line 80 of file Vector4.hpp.

◆ ToAxisAngle() [2/2]

void raylib::Vector4::ToAxisAngle ( ::Vector3 *  outAxis,
float *  outAngle 
) const
inline

Definition at line 75 of file Vector4.hpp.

◆ ToEuler()

Vector3 raylib::Vector4::ToEuler ( ) const
inline

Definition at line 110 of file Vector4.hpp.

◆ ToMatrix()

Matrix raylib::Vector4::ToMatrix ( ) const
inline

Definition at line 67 of file Vector4.hpp.

◆ ToRectangle()

constexpr ::Rectangle raylib::Vector4::ToRectangle ( ) const
inlineconstexpr

Definition at line 48 of file Vector4.hpp.

◆ ToString()

std::string raylib::Vector4::ToString ( ) const
inline

Definition at line 52 of file Vector4.hpp.

◆ Transform()

Vector4 raylib::Vector4::Transform ( const ::Matrix &  matrix) const
inline

Definition at line 88 of file Vector4.hpp.