3DCoat Core API
The 3DCoat API documentation.
Loading...
Searching...
No Matches
cVec4 Class Reference

The 4D-vector, refer it as coat::vec4 in the Core API. More...

#include <cVec4.h>

Public Member Functions

 cVec4 (const float S)
 
 cVec4 (const float X, const float Y, const float Z, const float W)
 
 cVec4 (const cVec2 &XY, const float Z, const float W)
 
 cVec4 (const cVec2 &XY, const cVec2 &ZW)
 
 cVec4 (const cVec3 &XYZ, const float W)
 
 cVec4 (const cVec4 &v)
 
void SetZero ()
 
void Set (const float S)
 
void Set (const float X, const float Y, const float Z, const float W)
 
void Set (const cVec2 &XY, const float Z, const float W)
 
void Set (const cVec2 &XY, const cVec2 &ZW)
 
void Set (const cVec3 &XYZ, const float W)
 
void Copy (const float *pSrc)
 
float & operator[] (const int index)
 
float operator[] (const int index) const
 
const cVec4 operator- () const
 
cVec4operator+= (const cVec4 &)
 
cVec4operator-= (const cVec4 &)
 
cVec4operator*= (const cVec4 &)
 
cVec4operator*= (const float)
 
cVec4operator/= (const cVec4 &)
 
cVec4operator/= (const float)
 
void Transform (const cMat4 &)
 
void operator*= (const cMat4 &)
 
const cVec4operator= (const cVec3 &)
 
const cVec4 operator+ (const cVec4 &) const
 
const cVec4 operator- (const cVec4 &) const
 
const cVec4 operator* (const cVec4 &) const
 
const cVec4 operator* (const float) const
 
const cVec4 operator/ (const cVec4 &) const
 
const cVec4 operator/ (const float) const
 
const cVec4 operator* (const cMat4 &) const
 
bool operator== (const cVec4 &) const
 
bool operator!= (const cVec4 &) const
 
float Length () const
 
float LengthSq () const
 
float Normalize ()
 
float NormalizeSafe (const cVec4 &Fallback=cVec4::AxisW)
 
bool IsNormalized (const float Eps=cMath::Epsilon) const
 
bool IsZero (const float Eps=cMath::Epsilon) const
 
std::tuple< float, float, float, float > __getstate__ ()
 
void __setstate__ (const std::tuple< float, float, float, float > &state)
 
const std::string __repr__ () const
 
const float * ToFloatPtr () const
 
float * ToFloatPtr ()
 
const cVec2ToVec2 () const
 
cVec2ToVec2 ()
 
const cVec3ToVec3 () const
 
cVec3ToVec3 ()
 
int GetDimension () const
 
const cStr ToString (const int Prec=2) const
 
void Clear (void *=0)
 
void AddWithWeight (cVec4 const &src, float weight)
 
void SetPosition (float aX, float aY, float aZ, float aW)
 
const float * GetPosition () const
 

Static Public Member Functions

static const cVec4 Transform (const cVec4 &, const cMat4 &)
 
static bool Equals (const cVec4 &, const cVec4 &, const float Eps=cMath::Epsilon)
 
static const cVec4 Abs (const cVec4 &)
 
static float Dot (const cVec4 &, const cVec4 &)
 
static float Length (const cVec4 &)
 
static float LengthSq (const cVec4 &)
 
static const cVec4 Lerp (const cVec4 &, const cVec4 &, const float)
 
static const cVec4 Max (const cVec4 &, const cVec4 &)
 
static const cVec4 Min (const cVec4 &, const cVec4 &)
 
static const cVec4 Normalize (const cVec4 &)
 

Public Attributes

float x
 
float y
 
float z
 
float w
 

Static Public Attributes

static const cVec4 Zero
 
static const cVec4 One
 
static const cVec4 Infinity
 
static const cVec4 AxisX
 
static const cVec4 AxisY
 
static const cVec4 AxisZ
 
static const cVec4 AxisW
 
static const cVec4 AxisNegX
 
static const cVec4 AxisNegY
 
static const cVec4 AxisNegZ
 
static const cVec4 AxisNegW
 

Friends

const cVec4 operator* (const float s, const cVec4 &u)
 
const cVec4 operator/ (const float s, const cVec4 &u)
 

Detailed Description

The 4D-vector, refer it as coat::vec4 in the Core API.


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