Vec4_c (struct)¶
The Vec4_c type represents a vector with 4 components. The Vec4_c is also used as the row type for the Mat44.
注釈
Vec4_c utilizes the KL ベクタ関数
/*
** Example: Vec4_c
*/
Vec4_c v(0.0, 0.0, 0.0, 0.0);
Methods¶
Methods in detail¶
Constructor with same scalar for all components
Vec4_c ( in Complex x, in Complex y, in Complex z, in Complex t )
Constructor from scalar components
copy constructor
Vec4_c ()
Default constructor
Vec4_c Vec4_c.add? ( in Vec4_c other )
Overload method for the add operator
Boolean Vec4_c.almostEqual? ( in Vec4_c other )
Returns true if this vector is the same as another one (using a default precision)
Boolean Vec4_c.almostEqual? ( in Vec4_c other, in Float32 precision )
Returns true if this vector is the same as another one (given a precision)
clone method
Complex Vec4_c.component? ( in Size i )
Returns the component of this vector by index
Complex Vec4_c.distanceTo? ( in Vec4_c other )
Returns the distance of this vector to the given vector
Vec4_c Vec4_c.divide? ( in Vec4_c other )
Overload method for the divide operator
Vec4_c Vec4_c.divideComplex? ( in Complex other )
Returns the division of this vector and a scalar
Complex Vec4_c.dot? ( in Vec4_c other )
Returns the dot product of this vector and another one
Boolean Vec4_c.equal? ( in Vec4_c other )
Returns true if this vector is the same as another one
Hash for this value
Returns the inversed version of this vector
Returns the length of this vector
Complex Vec4_c.lengthSquared? ()
Returns the squared length of this vector
Vec4_c Vec4_c.linearInterpolate? ( in Vec4_c other, in Complex t )
Linearly interpolates this vector with the given vector based on a scalar blend value (0.0 to 1.0)
Vec3_c Vec4_c.makeHomogeneousVec3_c? ()
Returns a homogeneous Vec3_c
Vec4_c Vec4_c.multiply? ( in Vec4_c other )
Overload method for the multiply operator
Vec4_c Vec4_c.multiplyComplex? ( in Complex other )
Returns the product of this vector and a scalar
Returns the negated version of this vector
Vec4_c.normalize! ()
Vec4_c.set! ( in Complex value )
Setter from same scalar for all components
Vec4_c.set! ( in Complex x, in Complex y, in Complex z, in Complex t )
Setter from scalar components
Setter from a Vec3_c (t = 1.0)
Vec4_c.setComponent! ( in Size i, in Complex v )
Sets the component of this vector by index
Vec4_c.setNull! ()
Sets all components of this vec to 0.0
Sets this vector to its unit vector and returns its previous length
Vec4_c Vec4_c.subtract? ( in Vec4_c other )
Overload method for the subtract operator
Returns the X, Y and Z components as Vec3_c
Returns the unit vector of this one
Returns a Vec3_c containing the X, Y and Z components.