Unit Utilities

DescriptionusesClasses, Interfaces, Objects and RecordsFunctions and ProceduresTypesConstantsVariables

Description

Utilities contains a variety of miscellaneous routines involving OpenGL, and math.

uses

Overview

Functions and Procedures

procedure CrossProduct(const v1, v2: T3DRealPoint; out result: T3DRealPoint);
procedure ExtractColorComponents(const AColor: TColor; out Red, Green, Blue: TGLubyte);
function ExtractFileRoot(const FileName: string): string;
function FracAndSchemeToColor(const ColorSchemeIndex: integer; Fraction: real; const Cycles: integer): TColor;
procedure Normal(const v1, v2, v3: T3DRealPoint; out result: T3DRealPoint);
procedure SubtractVectors(const v1, v2: T3DRealPoint; out result: T3DRealPoint);

Description

Functions and Procedures

procedure CrossProduct(const v1, v2: T3DRealPoint; out result: T3DRealPoint);

CrossProduct calculates the cross product of v1 and v2.

procedure ExtractColorComponents(const AColor: TColor; out Red, Green, Blue: TGLubyte);

ExtractColorComponents gets the red, green, and blue components from a TColor in a form suitable for use with OpenGL.

function ExtractFileRoot(const FileName: string): string;

ExtractFileRoot extracts the file name without the drive, directory or extension.

function FracAndSchemeToColor(const ColorSchemeIndex: integer; Fraction: real; const Cycles: integer): TColor;

FracAndSchemeToColor converts a fraction between 0 and 1 to a color using the selected ColorSchemeIndex.

Parameters
ColorSchemeIndex
0: FracToSpectrum;

1: FracToGreenMagenta (reversed);

2: FracToBlueRed (reversed);

3: FracToBlueDarkOrange (reversed);

4: FracToBlueGreen (reversed);

5: FracToBrownBlue (reversed);

6: FracToBlueGray (reversed);

7: FracToBlueOrange (reversed);

8: FracToBlue_OrangeRed (reversed);

9: FracToLightBlue_DarkBlue (reversed);

10: ModifiedSpectralScheme (reversed);

procedure Normal(const v1, v2, v3: T3DRealPoint; out result: T3DRealPoint);

Normal calculates the normal of the plane defined by v1, v2, and v3.

procedure SubtractVectors(const v1, v2: T3DRealPoint; out result: T3DRealPoint);

SubtractVectors subtracts v2 from v1.


Generated by PasDoc 0.10.0 on 2006-10-31 09:56:48