record TVector3i

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TVector3i = record

Description

3D integer vector.

Overview

Fields

X: VectorInt;
Y: VectorInt;
Z: VectorInt;

Methods

function Angle(const Vector: TVector3i): VectorFloat;
function Cross(const Vector: TVector3i): TVector3i;
function Dot(const Vector: TVector3i): VectorInt; inline;
function GetXY: TPoint2i; inline;
function Length: VectorFloat;
function Lerp(const Vector: TVector3i; const Theta: VectorFloat): TVector3i;

Description

Fields

X: VectorInt;

The coordinate in 3D space.

Y: VectorInt;

The coordinate in 3D space.

Z: VectorInt;

The coordinate in 3D space.

Methods

function Angle(const Vector: TVector3i): VectorFloat;

Calculates angle between current and the specified 3D vector. The returned value has range of [0..Pi].

function Cross(const Vector: TVector3i): TVector3i;

Calculates a cross product between current and the specified 3D vector. The resulting vector is perpendicular to both vectors and normal to the plane containing them.

function Dot(const Vector: TVector3i): VectorInt; inline;

Calculates a dot product between current and the specified 3D vector. The dot product is an indirect measure of angle between two vectors.

function GetXY: TPoint2i; inline;

Returns (x, y) portion of 3D vector as TPoint2i.

function Length: VectorFloat;

Returns length of current vector.

function Lerp(const Vector: TVector3i; const Theta: VectorFloat): TVector3i;

Interpolates between current and destination integer 3D vectors.

Parameters
Vector
The destination vector to be used in the interpolation
Theta
The mixture of the two vectors with the a range of [0..1].

Copyright © 2000 - 2017 Yuriy Kotsarenko. Help files generated by PasDoc.