3DCoat Python API
The 3DCoat Python API documentation.
Loading...
Searching...
No Matches
coat.vec2 Class Reference

Public Member Functions

 __init__ (self)
 
any __init__ (self, float S)
 
 __init__ (self, float X, float Y)
 
 __init__ (self, vec2 v)
 
 Copy (self, float Src)
 
 SetZero (self)
 
 SetOne (self)
 
 Set (self, float S)
 
 Set (self, float X, float Y)
 
float __getitem__ (self, int index)
 
float __setitem__ (self, int index)
 
vec2 __neg__ (self)
 
vec2 __iadd__ (self, vec2 _0)
 
vec2 __isub__ (self, vec2 _0)
 
vec2 __imul__ (self, vec2 _0)
 
vec2 __imul__ (self, float _0)
 
vec2 __itruediv__ (self, vec2 _0)
 
vec2 __itruediv__ (self, float _0)
 
 Transform (self, mat3 _0)
 
 __imul__ (self, mat3 _0)
 
 TransformCoordinate (self, mat4 _0)
 
 TransformNormal (self, mat4 _0)
 (x, y, 0, 1), projects the result back into w = 1
 
vec2 __add__ (self, vec2 _0)
 
vec2 __sub__ (self, vec2 _0)
 
vec2 __mul__ (self, vec2 _0)
 
vec2 __mul__ (self, float _0)
 
vec2 __truediv__ (self, vec2 _0)
 
vec2 __truediv__ (self, float _0)
 
vec2 __mul__ (self, mat3 _0)
 
bool __eq__ (self, vec2 _0)
 
bool __ne__ (self, vec2 _0)
 
float Length (self)
 
float LengthSq (self)
 
float Normalize (self)
 
float NormalizeSafe (self, vec2 Fallback)
 
bool IsValid (self)
 
bool IsNormalized (self, float Eps)
 
bool IsZero (self, float Eps)
 
vec2 ToRound (self)
 
float distance2 (self, vec2 _0)
 
float distance (self, vec2 _0)
 
float DistanceToLineSegSq (self, vec2 A, vec2 B, float pScale=None)
 
int GetDimension (self)
 
float ToFloatPtr (self)
 
float ToFloatPtr (self)
 
 ToPolar (self, float Radius, float Angle)
 
float ToBaryCentric (self, vec2 t0, vec2 t1, vec2 t2, float u, float v)
 
bool IsInsideTri (self, vec2 t0, vec2 t1, vec2 t2)
 
vec2 ToNormal (self)
 
vec2 ToPerpCw (self)
 
vec2 ToPerpCcw (self)
 
 AddWithWeight (self, vec2 src, float weight)
 for compatibility with OpenSubdiv ////
 
 SetPosition (self, float aX, float aY)
 
float GetPosition (self)
 

Static Public Member Functions

bool Equals (vec2 _0, vec2 _1, float Eps)
 
vec2 Round (vec2 _0)
 
vec2 Abs (vec2 _0)
 
vec2 Fract (vec2 _0)
 
float Angle (vec2 _0, vec2 _1)
 
float AreaSigned (vec2 t0, vec2 t1, vec2 t2)
 
float Ccw (vec2 _0, vec2 _1)
 
vec2 Clamp (vec2 Value, vec2 Lo, vec2 Hi)
 
float Distance (vec2 _0, vec2 _1)
 
float DistanceSq (vec2 _0, vec2 _1)
 
float Dot (vec2 _0, vec2 _1)
 
vec2 Lerp (vec2 _0, vec2 _1, float _2)
 
vec2 Lerp05 (vec2 _0, vec2 _1)
 
vec2 Max (vec2 _0, vec2 _1)
 
vec2 Min (vec2 _0, vec2 _1)
 
vec2 PerpCw (vec2 _0)
 
vec2 PerpCcw (vec2 _0)
 
vec2 Reflect (vec2 RayDir, vec2 Normal)
 
vec2 Refract (vec2 RayDir, vec2 Normal, float Eta)
 
vec2 Truncate (vec2 u, float MaxLength)
 
vec2 RandRange1 ()
 
vec2 RandNormal ()
 
vec2 Rand (vec2 Lo, vec2 Hi)
 
bool SegIntersection (vec2 L0, vec2 L1, vec2 R0, vec2 R1, float l=None, float r=None)
 
vec2 FromBaryCentric (vec2 t0, vec2 t1, vec2 t2, float u, float v)
 
vec2 FromPolar (float Radius, float Angle)
 

Constructor & Destructor Documentation

◆ __init__() [1/4]

coat.vec2.__init__ ( self)

◆ __init__() [2/4]

any coat.vec2.__init__ ( self,
float S )

◆ __init__() [3/4]

coat.vec2.__init__ ( self,
float X,
float Y )

◆ __init__() [4/4]

coat.vec2.__init__ ( self,
vec2 v )

Member Function Documentation

◆ __add__()

vec2 coat.vec2.__add__ ( self,
vec2 _0 )

◆ __eq__()

bool coat.vec2.__eq__ ( self,
vec2 _0 )

◆ __getitem__()

float coat.vec2.__getitem__ ( self,
int index )

◆ __iadd__()

vec2 coat.vec2.__iadd__ ( self,
vec2 _0 )

◆ __imul__() [1/3]

vec2 coat.vec2.__imul__ ( self,
float _0 )

◆ __imul__() [2/3]

coat.vec2.__imul__ ( self,
mat3 _0 )

◆ __imul__() [3/3]

vec2 coat.vec2.__imul__ ( self,
vec2 _0 )

◆ __isub__()

vec2 coat.vec2.__isub__ ( self,
vec2 _0 )

◆ __itruediv__() [1/2]

vec2 coat.vec2.__itruediv__ ( self,
float _0 )

◆ __itruediv__() [2/2]

vec2 coat.vec2.__itruediv__ ( self,
vec2 _0 )

◆ __mul__() [1/3]

vec2 coat.vec2.__mul__ ( self,
float _0 )

◆ __mul__() [2/3]

vec2 coat.vec2.__mul__ ( self,
mat3 _0 )

◆ __mul__() [3/3]

vec2 coat.vec2.__mul__ ( self,
vec2 _0 )

◆ __ne__()

bool coat.vec2.__ne__ ( self,
vec2 _0 )

◆ __neg__()

vec2 coat.vec2.__neg__ ( self)

◆ __setitem__()

float coat.vec2.__setitem__ ( self,
int index )

◆ __sub__()

vec2 coat.vec2.__sub__ ( self,
vec2 _0 )

◆ __truediv__() [1/2]

vec2 coat.vec2.__truediv__ ( self,
float _0 )

◆ __truediv__() [2/2]

vec2 coat.vec2.__truediv__ ( self,
vec2 _0 )

◆ Abs()

vec2 coat.vec2.Abs ( vec2 _0)
static

◆ AddWithWeight()

coat.vec2.AddWithWeight ( self,
vec2 src,
float weight )

for compatibility with OpenSubdiv ////

◆ Angle()

float coat.vec2.Angle ( vec2 _0,
vec2 _1 )
static

◆ AreaSigned()

float coat.vec2.AreaSigned ( vec2 t0,
vec2 t1,
vec2 t2 )
static

◆ Ccw()

float coat.vec2.Ccw ( vec2 _0,
vec2 _1 )
static

◆ Clamp()

vec2 coat.vec2.Clamp ( vec2 Value,
vec2 Lo,
vec2 Hi )
static

◆ Copy()

coat.vec2.Copy ( self,
float Src )

◆ Distance()

float coat.vec2.Distance ( vec2 _0,
vec2 _1 )
static

◆ distance()

float coat.vec2.distance ( self,
vec2 _0 )

◆ distance2()

float coat.vec2.distance2 ( self,
vec2 _0 )

◆ DistanceSq()

float coat.vec2.DistanceSq ( vec2 _0,
vec2 _1 )
static

◆ DistanceToLineSegSq()

float coat.vec2.DistanceToLineSegSq ( self,
vec2 A,
vec2 B,
float pScale = None )

◆ Dot()

float coat.vec2.Dot ( vec2 _0,
vec2 _1 )
static

◆ Equals()

bool coat.vec2.Equals ( vec2 _0,
vec2 _1,
float Eps )
static

◆ Fract()

vec2 coat.vec2.Fract ( vec2 _0)
static

◆ FromBaryCentric()

vec2 coat.vec2.FromBaryCentric ( vec2 t0,
vec2 t1,
vec2 t2,
float u,
float v )
static

◆ FromPolar()

vec2 coat.vec2.FromPolar ( float Radius,
float Angle )
static

◆ GetDimension()

int coat.vec2.GetDimension ( self)

◆ GetPosition()

float coat.vec2.GetPosition ( self)

◆ IsInsideTri()

bool coat.vec2.IsInsideTri ( self,
vec2 t0,
vec2 t1,
vec2 t2 )

◆ IsNormalized()

bool coat.vec2.IsNormalized ( self,
float Eps )

◆ IsValid()

bool coat.vec2.IsValid ( self)

◆ IsZero()

bool coat.vec2.IsZero ( self,
float Eps )

◆ Length()

float coat.vec2.Length ( self)

◆ LengthSq()

float coat.vec2.LengthSq ( self)

◆ Lerp()

vec2 coat.vec2.Lerp ( vec2 _0,
vec2 _1,
float _2 )
static

◆ Lerp05()

vec2 coat.vec2.Lerp05 ( vec2 _0,
vec2 _1 )
static

◆ Max()

vec2 coat.vec2.Max ( vec2 _0,
vec2 _1 )
static

◆ Min()

vec2 coat.vec2.Min ( vec2 _0,
vec2 _1 )
static

◆ Normalize()

float coat.vec2.Normalize ( self)

◆ NormalizeSafe()

float coat.vec2.NormalizeSafe ( self,
vec2 Fallback )

◆ PerpCcw()

vec2 coat.vec2.PerpCcw ( vec2 _0)
static

◆ PerpCw()

vec2 coat.vec2.PerpCw ( vec2 _0)
static

◆ Rand()

vec2 coat.vec2.Rand ( vec2 Lo,
vec2 Hi )
static

◆ RandNormal()

vec2 coat.vec2.RandNormal ( )
static

◆ RandRange1()

vec2 coat.vec2.RandRange1 ( )
static

◆ Reflect()

vec2 coat.vec2.Reflect ( vec2 RayDir,
vec2 Normal )
static

◆ Refract()

vec2 coat.vec2.Refract ( vec2 RayDir,
vec2 Normal,
float Eta )
static

◆ Round()

vec2 coat.vec2.Round ( vec2 _0)
static

◆ SegIntersection()

bool coat.vec2.SegIntersection ( vec2 L0,
vec2 L1,
vec2 R0,
vec2 R1,
float l = None,
float r = None )
static

◆ Set() [1/2]

coat.vec2.Set ( self,
float S )

◆ Set() [2/2]

coat.vec2.Set ( self,
float X,
float Y )

◆ SetOne()

coat.vec2.SetOne ( self)

◆ SetPosition()

coat.vec2.SetPosition ( self,
float aX,
float aY )

◆ SetZero()

coat.vec2.SetZero ( self)

◆ ToBaryCentric()

float coat.vec2.ToBaryCentric ( self,
vec2 t0,
vec2 t1,
vec2 t2,
float u,
float v )

◆ ToFloatPtr() [1/2]

float coat.vec2.ToFloatPtr ( self)

◆ ToFloatPtr() [2/2]

float coat.vec2.ToFloatPtr ( self)

◆ ToNormal()

vec2 coat.vec2.ToNormal ( self)

◆ ToPerpCcw()

vec2 coat.vec2.ToPerpCcw ( self)

◆ ToPerpCw()

vec2 coat.vec2.ToPerpCw ( self)

◆ ToPolar()

coat.vec2.ToPolar ( self,
float Radius,
float Angle )

◆ ToRound()

vec2 coat.vec2.ToRound ( self)

◆ Transform()

coat.vec2.Transform ( self,
mat3 _0 )

◆ TransformCoordinate()

coat.vec2.TransformCoordinate ( self,
mat4 _0 )

◆ TransformNormal()

coat.vec2.TransformNormal ( self,
mat4 _0 )

(x, y, 0, 1), projects the result back into w = 1

◆ Truncate()

vec2 coat.vec2.Truncate ( vec2 u,
float MaxLength )
static

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