3DCoatScripting  4.8.31β
You can manage 3DСoat features with help of scripting
coat::scripto::Vec2 Class Reference

Class for working with Euclidean vectors in 2D-space. More...

Public Types

typedef comms::cVec< float, 2 > vec2_t
 

Public Member Functions

const About & about () const
 
 operator std::string () const
 
bool operator== (const Vec2 &b) const
 
bool normalized () const
 
bool zero () const
 
Vec2operator() (int i, float value)
 
float operator() (int i) const
 
Vec2x (const float &value)
 
float x () const
 
Vec2y (const float &value)
 
float y () const
 
Vec2 operator- () const
 
Vec2operator+= (const Vec2 &b)
 
Vec2operator-= (const Vec2 &b)
 
Vec2operator*= (const Vec2 &b)
 
Vec2operator*= (const float &k)
 
Vec2operator/= (const Vec2 &b)
 
Vec2operator/= (const float &k)
 
Vec2 operator+ (const Vec2 &b) const
 
Vec2 operator- (const Vec2 &b) const
 
Vec2 operator* (const Vec2 &b) const
 
Vec2 operator* (const float &k) const
 
Vec2 operator/ (const Vec2 &b) const
 
Vec2 operator/ (const float &k) const
 
float angle (const Vec2 &b) const
 
float distance (const Vec2 &b) const
 
float dot (const Vec2 &b) const
 
float length () const
 
float lengthSquared () const
 
Vec2abs ()
 
Vec2 absCopy () const
 
Vec2clamp (float min, float max)
 
Vec2 clampCopy (float min, float max) const
 
Vec2clamp (const Vec2 &min, const Vec2 &max)
 
Vec2 clampCopy (const Vec2 &min, const Vec2 &max) const
 
Vec2lerp (const Vec2 &b, float s)
 
Vec2 lerpCopy (const Vec2 &b, float s) const
 
Vec2max (const Vec2 &b)
 
Vec2 maxCopy (const Vec2 &b) const
 
Vec2min (const Vec2 &b)
 
Vec2 minCopy (const Vec2 &b) const
 
Vec2normalize ()
 
Vec2 normalizeCopy () const
 
Vec2round ()
 
Vec2 roundCopy () const
 
Vec2reflect (const Vec2 &normal)
 
Vec2 reflectCopy (const Vec2 &normal) const
 
Vec2refract (const Vec2 &normal, float eta)
 
Vec2 refractCopy (const Vec2 &normal, float eta) const
 
Vec2slerp (const Vec2 &b, float s)
 
Vec2 slerpCopy (const Vec2 &b, float s) const
 
Vec2transform (const Mat4 &)
 
Vec2 transformCopy (const Mat4 &) const
 
Vec2truncate (float length)
 
Vec2 truncateCopy (float length) const
 

Static Public Attributes

static const Vec2 ONE
 
static const Vec2 ZERO
 

Detailed Description

Class for working with Euclidean vectors in 2D-space.

See Also
Vec3
Since
4.7