Download Now

    Reference TVec3

    Declared in Codebot.Geometry.pas on line 101

    TVec3 is a three component vector
      TVec3 = record
      public
        { Returns true if all components match }
        function Equals(const Value: TVec3): Boolean; inline;
        { The angles in radians of the vector in the XZ and ZY planes }
        function Angle: TVec2;
        { Mix with another vector by a percent from 0 to 1 }
        function Blend(const V: TVec3; Percent: Float): TVec3;
        { The cross product with another vector }
        function Cross(const V: TVec3): TVec3;
        { The dot product with another vector }
        function Dot(const V: TVec3): Float;
        { The length of the vector }
        function Distance: Float; overload;
        { The distance from this vector to a point }
        function Distance(X, Y, Z: Float): Float; overload;
        function Distance(const V: TVec3): Float; overload;
        { Scale the vector to a length of 1 }
        procedure Normalize;
        X: Float;
        Y: Float;
        Z: Float;
        R: Float;
        G: Float;
        B: Float;
        Red: Float;
        Green: Float;
        Blue: Float;
        Pitch: Float;
        Heading: Float;
        Roll: Float;
        Hue: Float;
        Saturation: Float;
        Lightness: Float;
        V1: TVec1;
        V2: TVec2;
        V: array[0..2] of Float;
      end;

    See also

    Float in Codebot.System.pas