Vec4.kl

Types

Vec4 (struct)

The Vec4 type represents a vector with 4 components. The Vec4 is also used as the row type for the Mat44.

注釈

Vec4 utilizes the KL ベクタ関数

参考

Vec2, Vec3

/*
** Example: Vec4
*/

Vec4 v(0.0, 0.0, 0.0, 0.0);

Members

Scalar x  
Scalar y  
Scalar z  
Scalar t  

Methods

  Vec4 ( in Color c )
  Vec4 ( in Scalar value )
  Vec4 ( in Scalar x, in Scalar y, in Scalar z, in Scalar t )
  Vec4 ( in Vec4 other )
  Vec4 ()
Vec4 add ? ( in Vec4 other )
Boolean almostEqual ? ( in Vec4 other )
Boolean almostEqual ? ( in Vec4 other, in Scalar precision )
Scalar angleTo ? ( in Vec4 other )
Vec4 clamp ? ( in Vec4 min, in Vec4 max )
Vec4 clone ? ()
Scalar component ? ( in Size i )
Scalar distanceTo ? ( in Vec4 other )
Vec4 divide ? ( in Vec4 other )
Vec4 divideScalar ? ( in Scalar other )
Scalar dot ? ( in Vec4 other )
Boolean equal ? ( in Vec4 other )
  get ? ( io Float32 v<> )
  get ? ( io Float32 v<>, in UInt32 o )
  get ? ( io Float32 v[] )
  get ? ( io Float32 v[], in UInt32 o )
  get ? ( io Float64 v<> )
  get ? ( io Float64 v<>, in UInt32 o )
  get ? ( io Float64 v[] )
  get ? ( io Float64 v[], in UInt32 o )
UInt32 hash ? ()
Vec4 inverse ? ()
Scalar length ? ()
Scalar lengthSquared ? ()
Vec4 linearInterpolate ? ( in Vec4 other, in Scalar t )
Vec3 makeHomogeneousVec3 ? ()
Vec4 multiply ? ( in Vec4 other )
Vec4 multiplyScalar ? ( in Scalar other )
Vec4 negate ? ()
  normalize ! ()
  set ! ( in Float32 v<> )
  set ! ( in Float32 v<>, in UInt32 o )
  set ! ( in Float64 v<> )
  set ! ( in Float64 v<>, in UInt32 o )
  set ! ( in Scalar value )
  set ! ( in Scalar x, in Scalar y, in Scalar z, in Scalar t )
  set ! ( in Vec3 v )
  setComponent ! ( in Size i, in Scalar v )
  setNull ! ()
Scalar setUnit ! ()
Vec4 subtract ? ( in Vec4 other )
Vec3 toVec3 ? ()
Vec4 unit ? ()
Scalar unitsAngleTo ? ( in Vec4 other )
Vec3 xyz ? ()

Operators

Vec4 = ( Param other )

Functions

Math_min

RGBA Math_min ( in RGBA val1, in RGBA val2 )

Returns the minimum of two RGBA values

Math_max

RGBA Math_max ( in RGBA val1, in RGBA val2 )

Returns the minimum of two RGBA values

Math_clamp

Vec3_i Math_clamp ( in Vec3_i val, in Scalar minval, in Scalar maxval )

Clamps a Vec3_i value by min and max

mathRandomVec4

Vec4 mathRandomVec4 ( in Size seed, in Size index, in Float32 min, in Float32 max )