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

Public Member Functions

 __init__ (self)
 
any __init__ (self, float S)
 
 __init__ (self, float X, float Y, float Z)
 
 __init__ (self, vec2 XY, float Z)
 
 __init__ (self, any v)
 
 __init__ (self, vec3 v)
 
 Copy (self, float Src)
 
 SetZero (self)
 
 SetOne (self)
 
 SetRandRange1 (self)
 
 Set (self, float S)
 
 Set (self, float X, float Y, float Z)
 
 Set (self, vec2 XY, float Z)
 
float __setitem__ (self, int Index)
 
float __getitem__ (self, int Index)
 
vec3 __neg__ (self)
 
vec3 __iadd__ (self, vec3 _0)
 
vec3 __isub__ (self, vec3 _0)
 
vec3 __imul__ (self, vec3 _0)
 
vec3 __imul__ (self, float _0)
 
vec3 __itruediv__ (self, vec3 _0)
 
vec3 __itruediv__ (self, float _0)
 
 TransformCoordinate (self, mat4 _0)
 
 TransformNormal (self, mat4 _0)
 
 TransformNormalTransposed (self, mat4 _0)
 
 Transform (self, mat3 _0)
 
vec3 __imul__ (self, mat3 _0)
 
 Rotate (self, quat _0)
 
 __imul__ (self, quat _0)
 
 Rotate (self, rotation _0)
 
 __imul__ (self, rotation _0)
 
vec3 __assign__ (self, vec4 _0)
 
float distance (self, vec3 u)
 
float distanceSq (self, vec3 u)
 
float dot (self, vec3 u)
 
 cross (self, vec3 u, vec3 v)
 
 AddWithWeight (self, vec3 src, float weight)
 
 SetPosition (self, float aX, float aY, float aZ)
 
float GetPosition (self)
 
vec3 __add__ (self, vec3 _0)
 
vec3 __sub__ (self, vec3 _0)
 
vec3 __mul__ (self, vec3 _0)
 
vec3 __mul__ (self, float _0)
 
vec3 __truediv__ (self, vec3 _0)
 
vec3 __truediv__ (self, float _0)
 
vec3 __mul__ (self, mat3 _0)
 
vec3 __mul__ (self, quat _0)
 
vec3 __mul__ (self, rotation _0)
 
bool __eq__ (self, vec3 _0)
 
bool __ne__ (self, vec3 _0)
 
float Length (self)
 
float Length2 (self)
 
float LengthSq (self)
 
float LengthM (self)
 
float Normalize (self)
 Manhattan distance.
 
float Normalize2 (self)
 
float NormalizeSafe (self, vec3 Fallback=3)
 
bool FixDegenerateNormal (self)
 
bool FixDenormals (self)
 
bool IsValid (self)
 
bool IsNormalized (self, float Eps)
 
bool IsZero (self, float Eps)
 
 Round (self)
 
 SetCross (self, vec3 _0, vec3 _1)
 
float TriProjectionSolidAngle (self, vec3 a, vec3 b, vec3 c)
 
int GetDimension (self)
 
float ToFloatPtr (self)
 
float ToFloatPtr (self)
 
vec2 ToVec2 (self)
 
vec2 ToVec2 (self)
 
angles ToAngles (self)
 
vec3 GetOrthonormal (self)
 
list GetOrthonormalPair (self)
 
 MakeOrthonormalTo (self, vec3 vec)
 
 ToPolarXZ (self, float Radius, float Angle)
 
float ToBaryCentric (self, vec3 t0, vec3 t1, vec3 t2, float f, float g)
 
vec3 ToNormal (self)
 
 ToPerps (self, vec3 X, vec3 Y)
 
vec3 ToPerp (self)
 

Static Public Member Functions

bool Equals (vec3 _0, vec3 _1, float Eps)
 
vec3 Abs (vec3 _0)
 
float Angle (vec3 _0, vec3 _1)
 
float Angle (vec3 p1, vec3 p2, vec3 p3, vec3 normal)
 
float AreaSigned (vec3 t0, vec3 t1, vec3 t2)
 
vec3 BaryCentric (vec3 t0, vec3 t1, vec3 t2, float f, float g)
 
vec3 Clamp (vec3 _0, vec3 _1, vec3 _2)
 
vec3 Cross (vec3 _0, vec3 _1)
 
float Distance (vec3 _0, vec3 _1)
 
float Distance2 (vec3 _0, vec3 _1)
 
float DistanceSq (vec3 _0, vec3 _1)
 
float Dot (vec3 _0, vec3 _1)
 
vec3 Lerp (vec3 _0, vec3 _1, float _2)
 
vec3 Lerp05 (vec3 _0, vec3 _1)
 
vec3 Max (vec3 _0, vec3 _1)
 
vec3 Min (vec3 _0, vec3 _1)
 
vec3 Reflect (vec3 RayDir, vec3 Normal)
 
vec3 Refract (vec3 RayDir, vec3 Normal, float Eta)
 
vec3 Slerp (vec3 n0, vec3 n1, float s)
 
vec3 Truncate (vec3 u, float MaxLen)
 
vec3 RandRange1 ()
 
vec3 RandNormal ()
 
vec3 Rand (vec3 Lo, vec3 Hi)
 
vec3 Project (vec3 v1, vec3 v2)
 
vec3 Perpendicular (vec3 v1)
 
vec3 FromPolarXZ (float Radius, float Angle)
 
bool RayTri (vec3 RayOrig, vec3 RayDir, vec3 t0, vec3 t1, vec3 t2, float u, float v, float t, bool BackFaceCull=False)
 
bool PointInTriangle (vec3 p, vec3 t0, vec3 t1, vec3 t2)
 

Constructor & Destructor Documentation

◆ __init__() [1/6]

coat.vec3.__init__ ( self)

◆ __init__() [2/6]

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

◆ __init__() [3/6]

coat.vec3.__init__ ( self,
float X,
float Y,
float Z )

◆ __init__() [4/6]

coat.vec3.__init__ ( self,
vec2 XY,
float Z )

◆ __init__() [5/6]

coat.vec3.__init__ ( self,
any v )

◆ __init__() [6/6]

coat.vec3.__init__ ( self,
vec3 v )

Member Function Documentation

◆ __add__()

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

◆ __assign__()

vec3 coat.vec3.__assign__ ( self,
vec4 _0 )

◆ __eq__()

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

◆ __getitem__()

float coat.vec3.__getitem__ ( self,
int Index )

◆ __iadd__()

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

◆ __imul__() [1/5]

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

◆ __imul__() [2/5]

vec3 coat.vec3.__imul__ ( self,
mat3 _0 )

◆ __imul__() [3/5]

coat.vec3.__imul__ ( self,
quat _0 )

◆ __imul__() [4/5]

coat.vec3.__imul__ ( self,
rotation _0 )

◆ __imul__() [5/5]

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

◆ __isub__()

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

◆ __itruediv__() [1/2]

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

◆ __itruediv__() [2/2]

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

◆ __mul__() [1/5]

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

◆ __mul__() [2/5]

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

◆ __mul__() [3/5]

vec3 coat.vec3.__mul__ ( self,
quat _0 )

◆ __mul__() [4/5]

vec3 coat.vec3.__mul__ ( self,
rotation _0 )

◆ __mul__() [5/5]

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

◆ __ne__()

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

◆ __neg__()

vec3 coat.vec3.__neg__ ( self)

◆ __setitem__()

float coat.vec3.__setitem__ ( self,
int Index )

◆ __sub__()

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

◆ __truediv__() [1/2]

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

◆ __truediv__() [2/2]

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

◆ Abs()

vec3 coat.vec3.Abs ( vec3 _0)
static

◆ AddWithWeight()

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

◆ Angle() [1/2]

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

◆ Angle() [2/2]

float coat.vec3.Angle ( vec3 p1,
vec3 p2,
vec3 p3,
vec3 normal )
static

◆ AreaSigned()

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

◆ BaryCentric()

vec3 coat.vec3.BaryCentric ( vec3 t0,
vec3 t1,
vec3 t2,
float f,
float g )
static

◆ Clamp()

vec3 coat.vec3.Clamp ( vec3 _0,
vec3 _1,
vec3 _2 )
static

◆ Copy()

coat.vec3.Copy ( self,
float Src )

◆ Cross()

vec3 coat.vec3.Cross ( vec3 _0,
vec3 _1 )
static

◆ cross()

coat.vec3.cross ( self,
vec3 u,
vec3 v )

◆ Distance()

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

◆ distance()

float coat.vec3.distance ( self,
vec3 u )

◆ Distance2()

float coat.vec3.Distance2 ( vec3 _0,
vec3 _1 )
static

◆ DistanceSq()

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

◆ distanceSq()

float coat.vec3.distanceSq ( self,
vec3 u )

◆ Dot()

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

◆ dot()

float coat.vec3.dot ( self,
vec3 u )

◆ Equals()

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

◆ FixDegenerateNormal()

bool coat.vec3.FixDegenerateNormal ( self)

◆ FixDenormals()

bool coat.vec3.FixDenormals ( self)

◆ FromPolarXZ()

vec3 coat.vec3.FromPolarXZ ( float Radius,
float Angle )
static

◆ GetDimension()

int coat.vec3.GetDimension ( self)

◆ GetOrthonormal()

vec3 coat.vec3.GetOrthonormal ( self)

◆ GetOrthonormalPair()

list coat.vec3.GetOrthonormalPair ( self)

◆ GetPosition()

float coat.vec3.GetPosition ( self)

◆ IsNormalized()

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

◆ IsValid()

bool coat.vec3.IsValid ( self)

◆ IsZero()

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

◆ Length()

float coat.vec3.Length ( self)

◆ Length2()

float coat.vec3.Length2 ( self)

◆ LengthM()

float coat.vec3.LengthM ( self)

◆ LengthSq()

float coat.vec3.LengthSq ( self)

◆ Lerp()

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

◆ Lerp05()

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

◆ MakeOrthonormalTo()

coat.vec3.MakeOrthonormalTo ( self,
vec3 vec )

◆ Max()

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

◆ Min()

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

◆ Normalize()

float coat.vec3.Normalize ( self)

Manhattan distance.

◆ Normalize2()

float coat.vec3.Normalize2 ( self)

◆ NormalizeSafe()

float coat.vec3.NormalizeSafe ( self,
vec3 Fallback = 3 )

◆ Perpendicular()

vec3 coat.vec3.Perpendicular ( vec3 v1)
static

◆ PointInTriangle()

bool coat.vec3.PointInTriangle ( vec3 p,
vec3 t0,
vec3 t1,
vec3 t2 )
static

◆ Project()

vec3 coat.vec3.Project ( vec3 v1,
vec3 v2 )
static

◆ Rand()

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

◆ RandNormal()

vec3 coat.vec3.RandNormal ( )
static

◆ RandRange1()

vec3 coat.vec3.RandRange1 ( )
static

◆ RayTri()

bool coat.vec3.RayTri ( vec3 RayOrig,
vec3 RayDir,
vec3 t0,
vec3 t1,
vec3 t2,
float u,
float v,
float t,
bool BackFaceCull = False )
static

◆ Reflect()

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

◆ Refract()

vec3 coat.vec3.Refract ( vec3 RayDir,
vec3 Normal,
float Eta )
static
Parameters
EtaRatio of indices of refraction at the surface interface.

◆ Rotate() [1/2]

coat.vec3.Rotate ( self,
quat _0 )

◆ Rotate() [2/2]

coat.vec3.Rotate ( self,
rotation _0 )

◆ Round()

coat.vec3.Round ( self)

◆ Set() [1/3]

coat.vec3.Set ( self,
float S )

◆ Set() [2/3]

coat.vec3.Set ( self,
float X,
float Y,
float Z )

◆ Set() [3/3]

coat.vec3.Set ( self,
vec2 XY,
float Z )

◆ SetCross()

coat.vec3.SetCross ( self,
vec3 _0,
vec3 _1 )

◆ SetOne()

coat.vec3.SetOne ( self)

◆ SetPosition()

coat.vec3.SetPosition ( self,
float aX,
float aY,
float aZ )

◆ SetRandRange1()

coat.vec3.SetRandRange1 ( self)

◆ SetZero()

coat.vec3.SetZero ( self)

◆ Slerp()

vec3 coat.vec3.Slerp ( vec3 n0,
vec3 n1,
float s )
static

◆ ToAngles()

angles coat.vec3.ToAngles ( self)

◆ ToBaryCentric()

float coat.vec3.ToBaryCentric ( self,
vec3 t0,
vec3 t1,
vec3 t2,
float f,
float g )

◆ ToFloatPtr() [1/2]

float coat.vec3.ToFloatPtr ( self)

◆ ToFloatPtr() [2/2]

float coat.vec3.ToFloatPtr ( self)

◆ ToNormal()

vec3 coat.vec3.ToNormal ( self)

◆ ToPerp()

vec3 coat.vec3.ToPerp ( self)

◆ ToPerps()

coat.vec3.ToPerps ( self,
vec3 X,
vec3 Y )

◆ ToPolarXZ()

coat.vec3.ToPolarXZ ( self,
float Radius,
float Angle )

◆ ToVec2() [1/2]

vec2 coat.vec3.ToVec2 ( self)

◆ ToVec2() [2/2]

vec2 coat.vec3.ToVec2 ( self)

◆ Transform()

coat.vec3.Transform ( self,
mat3 _0 )

◆ TransformCoordinate()

coat.vec3.TransformCoordinate ( self,
mat4 _0 )

◆ TransformNormal()

coat.vec3.TransformNormal ( self,
mat4 _0 )

◆ TransformNormalTransposed()

coat.vec3.TransformNormalTransposed ( self,
mat4 _0 )

◆ TriProjectionSolidAngle()

float coat.vec3.TriProjectionSolidAngle ( self,
vec3 a,
vec3 b,
vec3 c )

◆ Truncate()

vec3 coat.vec3.Truncate ( vec3 u,
float MaxLen )
static

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