Переглянути джерело

TVector from GLS.VectorGeometry renamed to TGLVector to be able use TVector from System.Math.Vectors without conflicts of names

GLScene 4 роки тому
батько
коміт
78258c3c8f
96 змінених файлів з 1246 додано та 1256 видалено
  1. 2 2
      AdvDemos/Delphi/GLSViewer/GLSViewer.dproj
  2. 10 12
      Demos/CPP/physics/OdeSimple/Unit1.dfm
  3. 1 1
      Demos/Delphi/behaviours/DceFm.pas
  4. 2 2
      Demos/Delphi/behaviours/FpsMovementFm.pas
  5. 5 5
      Demos/Delphi/collisions/BoxedinFm.pas
  6. 1 1
      Demos/Delphi/collisions/FacevsFaceFm.pas
  7. 2 2
      Demos/Delphi/collisions/MeshHitFm.pas
  8. 1 1
      Demos/Delphi/collisions/OctreeFm.pas
  9. 1 1
      Demos/Delphi/collisions/OctreedemoFm.pas
  10. 2 2
      Demos/Delphi/collisions/RayCastFm.pas
  11. 2 2
      Demos/Delphi/physics/NewtonDensityFm.pas
  12. 1 1
      Packages/GLScene_RT.dproj
  13. 1 1
      Source/Cg.Shader.pas
  14. 24 24
      Source/DWS.Scene.pas
  15. 37 37
      Source/DWS.VectorGeometry.pas
  16. 3 3
      Source/Formats.B3D.pas
  17. 2 2
      Source/Formats.OCT.pas
  18. 1 1
      Source/Formats.X.pas
  19. 2 2
      Source/GLS.AnimationUtils.pas
  20. 11 11
      Source/GLS.Atmosphere.pas
  21. 7 7
      Source/GLS.Behaviours.pas
  22. 4 4
      Source/GLS.BitmapFont.pas
  23. 40 40
      Source/GLS.CameraController.pas
  24. 15 15
      Source/GLS.Collision.pas
  25. 5 5
      Source/GLS.Color.pas
  26. 5 5
      Source/GLS.Context.pas
  27. 27 27
      Source/GLS.Coordinates.pas
  28. 2 2
      Source/GLS.DCE.pas
  29. 1 1
      Source/GLS.ExplosionFx.pas
  30. 7 7
      Source/GLS.Extrusion.pas
  31. 1 1
      Source/GLS.FBORenderer.pas
  32. 16 16
      Source/GLS.FPSMovement.pas
  33. 1 1
      Source/GLS.Feedback.pas
  34. 5 5
      Source/GLS.File3DS.pas
  35. 8 8
      Source/GLS.File3DSSceneObjects.pas
  36. 3 3
      Source/GLS.FileASE.pas
  37. 1 1
      Source/GLS.FileLMTS.pas
  38. 2 2
      Source/GLS.FileOBJ.pas
  39. 7 7
      Source/GLS.FireFX.pas
  40. 52 52
      Source/GLS.GeomObjects.pas
  41. 26 26
      Source/GLS.GeometryBB.pas
  42. 25 25
      Source/GLS.Gizmo.pas
  43. 28 28
      Source/GLS.GizmoEx.pas
  44. 18 18
      Source/GLS.Imposter.pas
  45. 2 2
      Source/GLS.Isosurface.pas
  46. 5 5
      Source/GLS.MaterialEx.pas
  47. 6 6
      Source/GLS.MaterialMultiProxy.pas
  48. 4 4
      Source/GLS.Mesh.pas
  49. 6 6
      Source/GLS.MeshBSP.pas
  50. 1 1
      Source/GLS.MeshLines.pas
  51. 3 3
      Source/GLS.Mirror.pas
  52. 16 16
      Source/GLS.Movement.pas
  53. 5 5
      Source/GLS.MultiPolygon.pas
  54. 9 9
      Source/GLS.MultiProxy.pas
  55. 13 13
      Source/GLS.Navigator.pas
  56. 6 6
      Source/GLS.Nodes.pas
  57. 54 54
      Source/GLS.Objects.pas
  58. 33 33
      Source/GLS.Octree.pas
  59. 2 2
      Source/GLS.ParticleFX.pas
  60. 2 2
      Source/GLS.PerlinPFX.pas
  61. 22 22
      Source/GLS.ProxyObjects.pas
  62. 1 1
      Source/GLS.ROAMPatch.pas
  63. 18 18
      Source/GLS.RandomHDS.pas
  64. 4 4
      Source/GLS.RenderContextInfo.pas
  65. 172 172
      Source/GLS.Scene.pas
  66. 2 8
      Source/GLS.ShadowPlane.pas
  67. 10 10
      Source/GLS.SkyDome.pas
  68. 12 12
      Source/GLS.SmoothNavigator.pas
  69. 4 4
      Source/GLS.Sound.pas
  70. 5 5
      Source/GLS.SpaceText.pas
  71. 4 4
      Source/GLS.Spline.pas
  72. 65 65
      Source/GLS.State.pas
  73. 10 10
      Source/GLS.TerrainRenderer.pas
  74. 5 5
      Source/GLS.ThorFX.pas
  75. 4 4
      Source/GLS.Tree.pas
  76. 42 43
      Source/GLS.VectorFileObjects.pas
  77. 172 172
      Source/GLS.VectorGeometry.pas
  78. 25 25
      Source/GLS.VectorLists.pas
  79. 1 2
      Source/GLS.VectorTypesExt.pas
  80. 6 6
      Source/GLS.WaterPlane.pas
  81. 3 3
      Source/GLS.Windows.pas
  82. 6 6
      Source/GLS.zBuffer.pas
  83. 1 1
      Source/GLSL.AsmShader.pas
  84. 2 2
      Source/GLSL.BumpShaders.pas
  85. 2 2
      Source/GLSL.CustomShader.pas
  86. 2 2
      Source/GLSL.PhongShader.pas
  87. 2 2
      Source/GLSL.Shader.pas
  88. 1 1
      Source/GLSL.ShapeShaders.pas
  89. 31 31
      Source/Physics.NGDManager.pas
  90. 1 1
      Source/Physics.NGDRagdoll.pas
  91. 12 12
      Source/Physics.ODEManager.pas
  92. 6 6
      Source/Physics.ODEUtils.pas
  93. 2 2
      Source/Physics.SPIInertias.pas
  94. 3 3
      Source/Sounds.BASS.pas
  95. 3 3
      Source/Sounds.FMOD.pas
  96. 1 1
      Source/Sounds.OpenAL.pas

+ 2 - 2
AdvDemos/Delphi/GLSViewer/GLSViewer.dproj

@@ -100,14 +100,14 @@
     </PropertyGroup>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
     <PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
         <BT_BuildType>Debug</BT_BuildType>
         <BT_BuildType>Debug</BT_BuildType>
-        <VerInfo_Build>92</VerInfo_Build>
+        <VerInfo_Build>93</VerInfo_Build>
         <AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
         <AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
         <VerInfo_AutoIncVersion>true</VerInfo_AutoIncVersion>
         <VerInfo_AutoIncVersion>true</VerInfo_AutoIncVersion>
         <VerInfo_MinorVer>8</VerInfo_MinorVer>
         <VerInfo_MinorVer>8</VerInfo_MinorVer>
         <VerInfo_Debug>true</VerInfo_Debug>
         <VerInfo_Debug>true</VerInfo_Debug>
         <VerInfo_Locale>1033</VerInfo_Locale>
         <VerInfo_Locale>1033</VerInfo_Locale>
         <Icon_MainIcon>Resource\GLSViewer.ico</Icon_MainIcon>
         <Icon_MainIcon>Resource\GLSViewer.ico</Icon_MainIcon>
-        <VerInfo_Keys>CompanyName=;FileVersion=1.8.0.92;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.8.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName);FileDescription=$(MSBuildProjectName);ProductName=$(MSBuildProjectName)</VerInfo_Keys>
+        <VerInfo_Keys>CompanyName=;FileVersion=1.8.0.93;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.8.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName);FileDescription=$(MSBuildProjectName);ProductName=$(MSBuildProjectName)</VerInfo_Keys>
         <VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
         <VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
     </PropertyGroup>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Cfg_2_Win64)'!=''">
     <PropertyGroup Condition="'$(Cfg_2_Win64)'!=''">

+ 10 - 12
Demos/CPP/physics/OdeSimple/Unit1.dfm

@@ -171,12 +171,12 @@ object Form1: TForm1
       Height = 10.000000000000000000
       Height = 10.000000000000000000
       Width = 10.000000000000000000
       Width = 10.000000000000000000
       BehavioursData = {
       BehavioursData = {
-        0458434F4C02010201060C54474C4F4445537461746963020012000000000200
-        0200120000000002000500000000006F1283F53F0800000500000000000000FA
-        0840050000000000000000000005000000000000000000000500000000000000
-        0000000500000000000000000000050000000000000000000005000000000000
-        0000000005000000000000000000000500000000000000000000050000000000
-        000000000002000458434F4C02010200}
+        0458434F4C02010201060C54474C4F44455374617469630200060A4F44452053
+        746174696302000200120000000002000500000000006F1283F53F0800000500
+        000000000000FA08400500000000000000000000050000000000000000000005
+        0000000000000000000005000000000000000000000500000000000000000000
+        0500000000000000000000050000000000000000000005000000000000000000
+        00050000000000000000000002000458434F4C02010200}
     end
     end
     object ODEObjects: TGLDummyCube
     object ODEObjects: TGLDummyCube
       CubeSize = 1.000000000000000000
       CubeSize = 1.000000000000000000
@@ -192,14 +192,12 @@ object Form1: TForm1
     Top = 72
     Top = 72
   end
   end
   object GLODEManager1: TGLODEManager
   object GLODEManager1: TGLODEManager
-    Gravity.Coordinates = {00000000C3F51CC1000000000000803F}
-    Solver = osmQuickStep
+    Solver = osmDefault
     Iterations = 3
     Iterations = 3
     MaxContacts = 8
     MaxContacts = 8
-    RenderPoint = GLRenderPoint1
     Visible = False
     Visible = False
-    VisibleAtRunTime = True
-    Left = 280
-    Top = 8
+    VisibleAtRunTime = False
+    Left = 312
+    Top = 16
   end
   end
 end
 end

+ 1 - 1
Demos/Delphi/behaviours/DceFm.pas

@@ -227,7 +227,7 @@ procedure TFormDCE.AddMushrooms;
 var
 var
   i: Integer;
   i: Integer;
   proxy: TGLFreeFormProxy;
   proxy: TGLFreeFormProxy;
-  s: TVector;
+  s: TGLVector;
   f: Single;
   f: Single;
 begin
 begin
   // spawn some more mushrooms using proxy objects
   // spawn some more mushrooms using proxy objects

+ 2 - 2
Demos/Delphi/behaviours/FpsMovementFm.pas

@@ -77,8 +77,8 @@ implementation
 var
 var
   yangle: double = 90;
   yangle: double = 90;
   xangle: double = 0;
   xangle: double = 0;
-  //Velocity:TVector=(0,0,0,0);
-  //Gravity:TVector=(0,-9.81*20,0,0);
+  //Velocity:TGLVector=(0,0,0,0);
+  //Gravity:TGLVector=(0,-9.81*20,0,0);
   Wireframe: Boolean;
   Wireframe: Boolean;
   //DisplayTime:Integer=2000;
   //DisplayTime:Integer=2000;
 
 

+ 5 - 5
Demos/Delphi/collisions/BoxedinFm.pas

@@ -63,7 +63,7 @@ type
      
      
     colTotalTime : Single; // for timing collision detection
     colTotalTime : Single; // for timing collision detection
     colCount : Integer;
     colCount : Integer;
-    procedure AddToTrail(const p : TVector);
+    procedure AddToTrail(const p : TGLVector);
   public
   public
      
      
     mousex, mousey: integer;
     mousex, mousey: integer;
@@ -93,10 +93,10 @@ end;
 procedure TFormBoxedin.GLCadencer1Progress(Sender: TObject; const deltaTime,
 procedure TFormBoxedin.GLCadencer1Progress(Sender: TObject; const deltaTime,
   newTime: Double);
   newTime: Double);
 var
 var
-   rayStart, rayVector : TVector;
+   rayStart, rayVector : TGLVector;
    velocity : Single;
    velocity : Single;
-   pPoint : TVector;
-   pNormal : TVector;
+   pPoint : TGLVector;
+   pNormal : TGLVector;
    t : Int64;
    t : Int64;
 begin
 begin
    if IsKeyDown(VK_ESCAPE) then close;
    if IsKeyDown(VK_ESCAPE) then close;
@@ -140,7 +140,7 @@ begin
    Inc(colCount);
    Inc(colCount);
 end;
 end;
 
 
-procedure TFormBoxedin.AddToTrail(const p : TVector);
+procedure TFormBoxedin.AddToTrail(const p : TGLVector);
 var
 var
    i, k : Integer;
    i, k : Integer;
 begin
 begin

+ 1 - 1
Demos/Delphi/collisions/FacevsFaceFm.pas

@@ -221,7 +221,7 @@ procedure TFormFacevsFace.GLSceneViewer1MouseMove(Sender: TObject;
   Shift: TShiftState; X, Y: Integer);
   Shift: TShiftState; X, Y: Integer);
 var
 var
    dx, dy: Integer;
    dx, dy: Integer;
-   VX, VY: TVector;
+   VX, VY: TGLVector;
    Camera: TGLCamera;
    Camera: TGLCamera;
 begin
 begin
    Camera := GLSceneViewer1.Camera;
    Camera := GLSceneViewer1.Camera;

+ 2 - 2
Demos/Delphi/collisions/MeshHitFm.pas

@@ -68,7 +68,7 @@ end;
 procedure TFormMeshHit.GLSceneViewer1MouseDown(Sender: TObject;
 procedure TFormMeshHit.GLSceneViewer1MouseDown(Sender: TObject;
   Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
   Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
 var
 var
-   rayStart, rayVector, iPoint, iNormal : TVector;
+   rayStart, rayVector, iPoint, iNormal : TGLVector;
 begin
 begin
    // retrieve raycasting data:
    // retrieve raycasting data:
    //    rayStart is obtained for camera and screen position
    //    rayStart is obtained for camera and screen position
@@ -103,7 +103,7 @@ end;
 procedure TFormMeshHit.GLSceneViewer2MouseDown(Sender: TObject;
 procedure TFormMeshHit.GLSceneViewer2MouseDown(Sender: TObject;
   Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
   Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
 var
 var
-   rayStart, rayVector, iPoint, iNormal : TVector;
+   rayStart, rayVector, iPoint, iNormal : TGLVector;
 begin
 begin
    // retrieve raycasting data:
    // retrieve raycasting data:
    //    rayStart is the eye (camera) position
    //    rayStart is the eye (camera) position

+ 1 - 1
Demos/Delphi/collisions/OctreeFm.pas

@@ -98,7 +98,7 @@ end;
 procedure TFormOctree.GLSceneViewer2MouseDown(Sender: TObject;
 procedure TFormOctree.GLSceneViewer2MouseDown(Sender: TObject;
   Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
   Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
 var
 var
-   rayStart, rayVector, iPoint, iNormal : TVector;
+   rayStart, rayVector, iPoint, iNormal : TGLVector;
    t : Int64;
    t : Int64;
 begin
 begin
    SetVector(rayStart, GLCamera2.AbsolutePosition);
    SetVector(rayStart, GLCamera2.AbsolutePosition);

+ 1 - 1
Demos/Delphi/collisions/OctreedemoFm.pas

@@ -98,7 +98,7 @@ end;
 procedure TFormOctreedemo.GLSceneViewer2MouseDown(Sender: TObject;
 procedure TFormOctreedemo.GLSceneViewer2MouseDown(Sender: TObject;
   Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
   Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
 var
 var
-   rayStart, rayVector, iPoint, iNormal : TVector;
+   rayStart, rayVector, iPoint, iNormal : TGLVector;
    t : Int64;
    t : Int64;
 begin
 begin
    SetVector(rayStart, GLCamera2.AbsolutePosition);
    SetVector(rayStart, GLCamera2.AbsolutePosition);

+ 2 - 2
Demos/Delphi/collisions/RayCastFm.pas

@@ -65,8 +65,8 @@ implementation
 
 
 procedure TFormRayCast.BUCastClick(Sender: TObject);
 procedure TFormRayCast.BUCastClick(Sender: TObject);
 var
 var
-  o, v, vLight, light, iPoint, iNormal: TVector;
-  up, right, dir: TVector;
+  o, v, vLight, light, iPoint, iNormal: TGLVector;
+  up, right, dir: TGLVector;
   x, y, dx, dy: Integer;
   x, y, dx, dy: Integer;
   f, d: Single;
   f, d: Single;
   color: TColor;
   color: TColor;

+ 2 - 2
Demos/Delphi/physics/NewtonDensityFm.pas

@@ -84,7 +84,7 @@ function BuoyancyPlaneCallback(const collisionID: Integer; context: Pointer;
 var
 var
   BodyMatrix: TMatrix;
   BodyMatrix: TMatrix;
   PlaneEquation: TGLVector;
   PlaneEquation: TGLVector;
-  pv: PVector;
+  pv: PGLVector;
   MyForm: TFormNewtonDensity;
   MyForm: TFormNewtonDensity;
 begin
 begin
   // Get the matrix of the actual body
   // Get the matrix of the actual body
@@ -98,7 +98,7 @@ begin
   PlaneEquation := MyForm.GLPlane1.Direction.AsVector;
   PlaneEquation := MyForm.GLPlane1.Direction.AsVector;
   // the distance along this normal, to the origin.
   // the distance along this normal, to the origin.
   PlaneEquation.W := MyForm.GLPlane1.Position.Y;
   PlaneEquation.W := MyForm.GLPlane1.Position.Y;
-  PVector(globalSpacePlane)^ := PlaneEquation;
+  PGLVector(globalSpacePlane)^ := PlaneEquation;
   Result := 1;
   Result := 1;
 end;
 end;
 
 

+ 1 - 1
Packages/GLScene_RT.dproj

@@ -8,7 +8,7 @@
         <AppType>Package</AppType>
         <AppType>Package</AppType>
         <FrameworkType>VCL</FrameworkType>
         <FrameworkType>VCL</FrameworkType>
         <ProjectVersion>19.0</ProjectVersion>
         <ProjectVersion>19.0</ProjectVersion>
-        <Platform Condition="'$(Platform)'==''">Win32</Platform>
+        <Platform Condition="'$(Platform)'==''">Win64</Platform>
     </PropertyGroup>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
         <Base>true</Base>
         <Base>true</Base>

+ 1 - 1
Source/Cg.Shader.pas

@@ -199,7 +199,7 @@ type
     property Direction: TCGenum read FDirection write FDirection;
     property Direction: TCGenum read FDirection write FDirection;
     property Variability: TCGenum read FVariability write FVariability;
     property Variability: TCGenum read FVariability write FVariability;
     // GLScene-friendly properties
     // GLScene-friendly properties
-    property AsVector: TVector write SetAsVector4f; // position f.i.
+    property AsVector: TGLVector write SetAsVector4f; // position f.i.
     property AsAffineVector: TAffineVector write SetAsVector3f; // normal f.i.
     property AsAffineVector: TAffineVector write SetAsVector3f; // normal f.i.
     property AsVector2f: TVector2f write SetAsVector2f; // texCoord f.i.
     property AsVector2f: TVector2f write SetAsVector2f; // texCoord f.i.
   end;
   end;

+ 24 - 24
Source/DWS.Scene.pas

@@ -322,13 +322,13 @@ type
   // ---------- Vector/Matrix to/from IInfo helper functions ----------
   // ---------- Vector/Matrix to/from IInfo helper functions ----------
   // ----------
   // ----------
 
 
-function GetVectorFromInfo(Info: IInfo): TVector;
+function GetVectorFromInfo(Info: IInfo): TGLVector;
 begin
 begin
   Result := VectorMake(Info.Element([0]).Value, Info.Element([1]).Value,
   Result := VectorMake(Info.Element([0]).Value, Info.Element([1]).Value,
     Info.Element([2]).Value, Info.Element([3]).Value);
     Info.Element([2]).Value, Info.Element([3]).Value);
 end;
 end;
 
 
-procedure SetInfoFromVector(Info: IInfo; vec: TVector);
+procedure SetInfoFromVector(Info: IInfo; vec: TGLVector);
 var
 var
   i: Integer;
   i: Integer;
 begin
 begin
@@ -436,7 +436,7 @@ end;
 // TGLCoordinates.AsVector write access
 // TGLCoordinates.AsVector write access
 procedure TGLCoordinatesSetAsVectorMethod.Execute(var ExternalObject: TObject);
 procedure TGLCoordinatesSetAsVectorMethod.Execute(var ExternalObject: TObject);
 var
 var
-  v: TVector;
+  v: TGLVector;
 begin
 begin
   ValidateExternalObject(ExternalObject, TGLCoordinates);
   ValidateExternalObject(ExternalObject, TGLCoordinates);
   v := GetVectorFromInfo(Info.Vars['Value']);
   v := GetVectorFromInfo(Info.Vars['Value']);
@@ -446,7 +446,7 @@ end;
 // TGLCoordinates.AsVector read access
 // TGLCoordinates.AsVector read access
 procedure TGLCoordinatesGetAsVectorMethod.Execute(var ExternalObject: TObject);
 procedure TGLCoordinatesGetAsVectorMethod.Execute(var ExternalObject: TObject);
 var
 var
-  v: TVector;
+  v: TGLVector;
 begin
 begin
   ValidateExternalObject(ExternalObject, TGLCoordinates);
   ValidateExternalObject(ExternalObject, TGLCoordinates);
   v := TGLCoordinates(ExternalObject).AsVector;
   v := TGLCoordinates(ExternalObject).AsVector;
@@ -463,7 +463,7 @@ end;
 // TGLCoordinates.Translate
 // TGLCoordinates.Translate
 procedure TGLCoordinatesTranslateMethod.Execute(var ExternalObject: TObject);
 procedure TGLCoordinatesTranslateMethod.Execute(var ExternalObject: TObject);
 var
 var
-  v: TVector;
+  v: TGLVector;
 begin
 begin
   ValidateExternalObject(ExternalObject, TGLCoordinates);
   ValidateExternalObject(ExternalObject, TGLCoordinates);
   v := GetVectorFromInfo(Info.Vars['translationVector']);
   v := GetVectorFromInfo(Info.Vars['translationVector']);
@@ -474,7 +474,7 @@ end;
 procedure TGLCoordinatesAddScaledVectorMethod.Execute(var ExternalObject
 procedure TGLCoordinatesAddScaledVectorMethod.Execute(var ExternalObject
   : TObject);
   : TObject);
 var
 var
-  v: TVector;
+  v: TGLVector;
 begin
 begin
   ValidateExternalObject(ExternalObject, TGLCoordinates);
   ValidateExternalObject(ExternalObject, TGLCoordinates);
   v := GetVectorFromInfo(Info.Vars['translationVector']);
   v := GetVectorFromInfo(Info.Vars['translationVector']);
@@ -484,7 +484,7 @@ end;
 // TGLCoordinates.Rotate
 // TGLCoordinates.Rotate
 procedure TGLCoordinatesRotateMethod.Execute(var ExternalObject: TObject);
 procedure TGLCoordinatesRotateMethod.Execute(var ExternalObject: TObject);
 var
 var
-  v: TVector;
+  v: TGLVector;
 begin
 begin
   ValidateExternalObject(ExternalObject, TGLCoordinates);
   ValidateExternalObject(ExternalObject, TGLCoordinates);
   v := GetVectorFromInfo(Info.Vars['anAxis']);
   v := GetVectorFromInfo(Info.Vars['anAxis']);
@@ -515,7 +515,7 @@ end;
 // TGLCoordinates.Equals
 // TGLCoordinates.Equals
 procedure TGLCoordinatesEqualsMethod.Execute(var ExternalObject: TObject);
 procedure TGLCoordinatesEqualsMethod.Execute(var ExternalObject: TObject);
 var
 var
-  v: TVector;
+  v: TGLVector;
 begin
 begin
   ValidateExternalObject(ExternalObject, TGLCoordinates);
   ValidateExternalObject(ExternalObject, TGLCoordinates);
   v := GetVectorFromInfo(Info.Vars['aVector']);
   v := GetVectorFromInfo(Info.Vars['aVector']);
@@ -871,23 +871,23 @@ begin
       '', ClassSym, SymbolTable);
       '', ClassSym, SymbolTable);
   if not Assigned(ClassSym.Members.FindLocal('SetAsVector')) then
   if not Assigned(ClassSym.Members.FindLocal('SetAsVector')) then
     TGLCoordinatesSetAsVectorMethod.Create(mkProcedure, [], 0, 'SetAsVector',
     TGLCoordinatesSetAsVectorMethod.Create(mkProcedure, [], 0, 'SetAsVector',
-      ['Value', 'TVector'], '', ClassSym, SymbolTable);
+      ['Value', 'TGLVector'], '', ClassSym, SymbolTable);
   if not Assigned(ClassSym.Members.FindLocal('GetAsVector')) then
   if not Assigned(ClassSym.Members.FindLocal('GetAsVector')) then
     TGLCoordinatesGetAsVectorMethod.Create(mkFunction, [], 0, 'GetAsVector', [],
     TGLCoordinatesGetAsVectorMethod.Create(mkFunction, [], 0, 'GetAsVector', [],
-      'TVector', ClassSym, SymbolTable);
+      'TGLVector', ClassSym, SymbolTable);
   if not Assigned(ClassSym.Members.FindLocal('GetAsString')) then
   if not Assigned(ClassSym.Members.FindLocal('GetAsString')) then
     TGLCoordinatesGetAsStringMethod.Create(mkFunction, [], 0, 'GetAsString', [],
     TGLCoordinatesGetAsStringMethod.Create(mkFunction, [], 0, 'GetAsString', [],
       'String', ClassSym, SymbolTable);
       'String', ClassSym, SymbolTable);
   if not Assigned(ClassSym.Members.FindLocal('Translate')) then
   if not Assigned(ClassSym.Members.FindLocal('Translate')) then
     TGLCoordinatesTranslateMethod.Create(mkProcedure, [], 0, 'Translate',
     TGLCoordinatesTranslateMethod.Create(mkProcedure, [], 0, 'Translate',
-      ['translationVector', 'TVector'], '', ClassSym, SymbolTable);
+      ['translationVector', 'TGLVector'], '', ClassSym, SymbolTable);
   if not Assigned(ClassSym.Members.FindLocal('AddScaledVector')) then
   if not Assigned(ClassSym.Members.FindLocal('AddScaledVector')) then
     TGLCoordinatesAddScaledVectorMethod.Create(mkProcedure, [], 0,
     TGLCoordinatesAddScaledVectorMethod.Create(mkProcedure, [], 0,
-      'AddScaledVector', ['factor', 'Float', 'translationVector', 'TVector'],
+      'AddScaledVector', ['factor', 'Float', 'translationVector', 'TGLVector'],
       '', ClassSym, SymbolTable);
       '', ClassSym, SymbolTable);
   if not Assigned(ClassSym.Members.FindLocal('Rotate')) then
   if not Assigned(ClassSym.Members.FindLocal('Rotate')) then
     TGLCoordinatesRotateMethod.Create(mkProcedure, [], 0, 'Rotate',
     TGLCoordinatesRotateMethod.Create(mkProcedure, [], 0, 'Rotate',
-      ['anAxis', 'TVector', 'anAngle', 'Float'], '', ClassSym, SymbolTable);
+      ['anAxis', 'TGLVector', 'anAngle', 'Float'], '', ClassSym, SymbolTable);
   if not Assigned(ClassSym.Members.FindLocal('Normalize')) then
   if not Assigned(ClassSym.Members.FindLocal('Normalize')) then
     TGLCoordinatesNormalizeMethod.Create(mkProcedure, [], 0, 'Normalize', [],
     TGLCoordinatesNormalizeMethod.Create(mkProcedure, [], 0, 'Normalize', [],
       '', ClassSym, SymbolTable);
       '', ClassSym, SymbolTable);
@@ -899,7 +899,7 @@ begin
       ['factor', 'Float'], '', ClassSym, SymbolTable);
       ['factor', 'Float'], '', ClassSym, SymbolTable);
   if not Assigned(ClassSym.Members.FindLocal('Equals')) then
   if not Assigned(ClassSym.Members.FindLocal('Equals')) then
     TGLCoordinatesEqualsMethod.Create(mkFunction, [], 0, 'Equals',
     TGLCoordinatesEqualsMethod.Create(mkFunction, [], 0, 'Equals',
-      ['aVector', 'TVector'], 'Boolean', ClassSym, SymbolTable);
+      ['aVector', 'TGLVector'], 'Boolean', ClassSym, SymbolTable);
 
 
   // Properties
   // Properties
   AddPropertyToClass('X', 'Float', 'GetX', 'SetX', '', False, ClassSym,
   AddPropertyToClass('X', 'Float', 'GetX', 'SetX', '', False, ClassSym,
@@ -908,7 +908,7 @@ begin
     SymbolTable);
     SymbolTable);
   AddPropertyToClass('Z', 'Float', 'GetZ', 'SetZ', '', False, ClassSym,
   AddPropertyToClass('Z', 'Float', 'GetZ', 'SetZ', '', False, ClassSym,
     SymbolTable);
     SymbolTable);
-  AddPropertyToClass('AsVector', 'TVector', 'GetAsVector', 'SetAsVector', '',
+  AddPropertyToClass('AsVector', 'TGLVector', 'GetAsVector', 'SetAsVector', '',
     False, ClassSym, SymbolTable);
     False, ClassSym, SymbolTable);
   AddPropertyToClass('AsString', 'String', 'GetAsString', '', '', False,
   AddPropertyToClass('AsString', 'String', 'GetAsString', '', '', False,
     ClassSym, SymbolTable);
     ClassSym, SymbolTable);
@@ -942,22 +942,22 @@ begin
       'InvAbsoluteMatrix', [], 'TMatrix', ClassSym, SymbolTable);
       'InvAbsoluteMatrix', [], 'TMatrix', ClassSym, SymbolTable);
   if not Assigned(ClassSym.Members.FindLocal('SetAbsolutePosition')) then
   if not Assigned(ClassSym.Members.FindLocal('SetAbsolutePosition')) then
     TGLBaseSceneObjectSetAbsolutePositionMethod.Create(mkProcedure, [], 0,
     TGLBaseSceneObjectSetAbsolutePositionMethod.Create(mkProcedure, [], 0,
-      'SetAbsolutePosition', ['Value', 'TVector'], '', ClassSym, SymbolTable);
+      'SetAbsolutePosition', ['Value', 'TGLVector'], '', ClassSym, SymbolTable);
   if not Assigned(ClassSym.Members.FindLocal('GetAbsolutePosition')) then
   if not Assigned(ClassSym.Members.FindLocal('GetAbsolutePosition')) then
     TGLBaseSceneObjectGetAbsolutePositionMethod.Create(mkFunction, [], 0,
     TGLBaseSceneObjectGetAbsolutePositionMethod.Create(mkFunction, [], 0,
-      'GetAbsolutePosition', [], 'TVector', ClassSym, SymbolTable);
+      'GetAbsolutePosition', [], 'TGLVector', ClassSym, SymbolTable);
   if not Assigned(ClassSym.Members.FindLocal('SetAbsoluteUp')) then
   if not Assigned(ClassSym.Members.FindLocal('SetAbsoluteUp')) then
     TGLBaseSceneObjectSetAbsoluteUpMethod.Create(mkProcedure, [], 0,
     TGLBaseSceneObjectSetAbsoluteUpMethod.Create(mkProcedure, [], 0,
-      'SetAbsoluteUp', ['Value', 'TVector'], '', ClassSym, SymbolTable);
+      'SetAbsoluteUp', ['Value', 'TGLVector'], '', ClassSym, SymbolTable);
   if not Assigned(ClassSym.Members.FindLocal('GetAbsoluteUp')) then
   if not Assigned(ClassSym.Members.FindLocal('GetAbsoluteUp')) then
     TGLBaseSceneObjectGetAbsoluteUpMethod.Create(mkFunction, [], 0,
     TGLBaseSceneObjectGetAbsoluteUpMethod.Create(mkFunction, [], 0,
-      'GetAbsoluteUp', [], 'TVector', ClassSym, SymbolTable);
+      'GetAbsoluteUp', [], 'TGLVector', ClassSym, SymbolTable);
   if not Assigned(ClassSym.Members.FindLocal('SetAbsoluteDirection')) then
   if not Assigned(ClassSym.Members.FindLocal('SetAbsoluteDirection')) then
     TGLBaseSceneObjectSetAbsoluteDirectionMethod.Create(mkProcedure, [], 0,
     TGLBaseSceneObjectSetAbsoluteDirectionMethod.Create(mkProcedure, [], 0,
-      'SetAbsoluteDirection', ['Value', 'TVector'], '', ClassSym, SymbolTable);
+      'SetAbsoluteDirection', ['Value', 'TGLVector'], '', ClassSym, SymbolTable);
   if not Assigned(ClassSym.Members.FindLocal('GetAbsoluteDirection')) then
   if not Assigned(ClassSym.Members.FindLocal('GetAbsoluteDirection')) then
     TGLBaseSceneObjectGetAbsoluteDirectionMethod.Create(mkFunction, [], 0,
     TGLBaseSceneObjectGetAbsoluteDirectionMethod.Create(mkFunction, [], 0,
-      'GetAbsoluteDirection', [], 'TVector', ClassSym, SymbolTable);
+      'GetAbsoluteDirection', [], 'TGLVector', ClassSym, SymbolTable);
 
 
   if not Assigned(ClassSym.Members.FindLocal('SetPosition')) then
   if not Assigned(ClassSym.Members.FindLocal('SetPosition')) then
     TGLBaseSceneObjectSetPositionMethod.Create(mkProcedure, [], 0,
     TGLBaseSceneObjectSetPositionMethod.Create(mkProcedure, [], 0,
@@ -1023,11 +1023,11 @@ begin
     False, ClassSym, SymbolTable);
     False, ClassSym, SymbolTable);
   AddPropertyToClass('Matrix', 'TMatrix', 'GetMatrix', 'SetMatrix', '', False,
   AddPropertyToClass('Matrix', 'TMatrix', 'GetMatrix', 'SetMatrix', '', False,
     ClassSym, SymbolTable);
     ClassSym, SymbolTable);
-  AddPropertyToClass('AbsolutePosition', 'TVector', 'GetAbsolutePosition',
+  AddPropertyToClass('AbsolutePosition', 'TGLVector', 'GetAbsolutePosition',
     'SetAbsolutePosition', '', False, ClassSym, SymbolTable);
     'SetAbsolutePosition', '', False, ClassSym, SymbolTable);
-  AddPropertyToClass('AbsoluteUp', 'TVector', 'GetAbsoluteUp', 'SetAbsoluteUp',
+  AddPropertyToClass('AbsoluteUp', 'TGLVector', 'GetAbsoluteUp', 'SetAbsoluteUp',
     '', False, ClassSym, SymbolTable);
     '', False, ClassSym, SymbolTable);
-  AddPropertyToClass('AbsoluteDirection', 'TVector', 'GetAbsoluteDirection',
+  AddPropertyToClass('AbsoluteDirection', 'TGLVector', 'GetAbsoluteDirection',
     'SetAbsoluteDirection', '', False, ClassSym, SymbolTable);
     'SetAbsoluteDirection', '', False, ClassSym, SymbolTable);
   AddPropertyToClass('Position', 'TGLBaseSceneObject', 'GetPosition',
   AddPropertyToClass('Position', 'TGLBaseSceneObject', 'GetPosition',
     'SetPosition', '', False, ClassSym, SymbolTable);
     'SetPosition', '', False, ClassSym, SymbolTable);

+ 37 - 37
Source/DWS.VectorGeometry.pas

@@ -145,13 +145,13 @@ begin
   RegisterComponents('GLScene DWS', [TdwsVectorGeometryUnit]);
   RegisterComponents('GLScene DWS', [TdwsVectorGeometryUnit]);
 end;
 end;
 
 
-function GetVectorFromInfo(Info: IInfo): TVector;
+function GetVectorFromInfo(Info: IInfo): TGLVector;
 begin
 begin
   Result := VectorMake(Info.Element([0]).Value, Info.Element([1]).Value,
   Result := VectorMake(Info.Element([0]).Value, Info.Element([1]).Value,
     Info.Element([2]).Value, Info.Element([3]).Value);
     Info.Element([2]).Value, Info.Element([3]).Value);
 end;
 end;
 
 
-procedure SetInfoFromVector(Info: IInfo; vec: TVector);
+procedure SetInfoFromVector(Info: IInfo; vec: TGLVector);
 var
 var
   i: Integer;
   i: Integer;
 begin
 begin
@@ -185,39 +185,39 @@ begin
   FloatSymbol := SymbolTable.FindSymbol('Float');
   FloatSymbol := SymbolTable.FindSymbol('Float');
 
 
   // Array types
   // Array types
-  SymbolTable.AddSymbol(TStaticArraySymbol.Create('TVector',
+  SymbolTable.AddSymbol(TStaticArraySymbol.Create('TGLVector',
     FloatSymbol, 0, 3));
     FloatSymbol, 0, 3));
   SymbolTable.AddSymbol(TStaticArraySymbol.Create('TMatrix',
   SymbolTable.AddSymbol(TStaticArraySymbol.Create('TMatrix',
-    SymbolTable.FindSymbol('TVector'), 0, 3));
+    SymbolTable.FindSymbol('TGLVector'), 0, 3));
 
 
   // Vector functions
   // Vector functions
   TVectorMakeFunction.Create(SymbolTable, 'VectorMake',
   TVectorMakeFunction.Create(SymbolTable, 'VectorMake',
-    ['x', 'Float', 'y', 'Float', 'z', 'Float', 'w', 'Float'], 'TVector');
+    ['x', 'Float', 'y', 'Float', 'z', 'Float', 'w', 'Float'], 'TGLVector');
   TSetVectorFunction.Create(SymbolTable, 'SetVector',
   TSetVectorFunction.Create(SymbolTable, 'SetVector',
-    ['@v', 'TVector', 'x', 'Float', 'y', 'Float', 'z', 'Float', 'w',
+    ['@v', 'TGLVector', 'x', 'Float', 'y', 'Float', 'z', 'Float', 'w',
     'Float'], '');
     'Float'], '');
   TVectorAddFunction.Create(SymbolTable, 'VectorAdd',
   TVectorAddFunction.Create(SymbolTable, 'VectorAdd',
-    ['v1', 'TVector', 'v2', 'TVector'], 'TVector');
+    ['v1', 'TGLVector', 'v2', 'TGLVector'], 'TGLVector');
   TVectorSubtractFunction.Create(SymbolTable, 'VectorSubtract',
   TVectorSubtractFunction.Create(SymbolTable, 'VectorSubtract',
-    ['v1', 'TVector', 'v2', 'TVector'], 'TVector');
+    ['v1', 'TGLVector', 'v2', 'TGLVector'], 'TGLVector');
   TVectorScaleFunction.Create(SymbolTable, 'VectorScale',
   TVectorScaleFunction.Create(SymbolTable, 'VectorScale',
-    ['v', 'TVector', 'f', 'Float'], 'TVector');
+    ['v', 'TGLVector', 'f', 'Float'], 'TGLVector');
   TCombineVectorFunction.Create(SymbolTable, 'CombineVector',
   TCombineVectorFunction.Create(SymbolTable, 'CombineVector',
-    ['@vr', 'TVector', 'v', 'TVector', '@f', 'Float'], '');
+    ['@vr', 'TGLVector', 'v', 'TGLVector', '@f', 'Float'], '');
   TVectorCombineFunction.Create(SymbolTable, 'VectorCombine',
   TVectorCombineFunction.Create(SymbolTable, 'VectorCombine',
-    ['v1', 'TVector', 'v2', 'TVector', 'f1', 'Float', 'f2', 'Float'],
-    'TVector');
+    ['v1', 'TGLVector', 'v2', 'TGLVector', 'f1', 'Float', 'f2', 'Float'],
+    'TGLVector');
   TVectorCombine3Function.Create(SymbolTable, 'VectorCombine3',
   TVectorCombine3Function.Create(SymbolTable, 'VectorCombine3',
-    ['v1', 'TVector', 'v2', 'TVector', 'v3', 'TVector', 'f1', 'Float', 'f2',
-    'Float', 'f3', 'Float'], 'TVector');
+    ['v1', 'TGLVector', 'v2', 'TGLVector', 'v3', 'TGLVector', 'f1', 'Float', 'f2',
+    'Float', 'f3', 'Float'], 'TGLVector');
   TVectorDotProductFunction.Create(SymbolTable, 'VectorDotProduct',
   TVectorDotProductFunction.Create(SymbolTable, 'VectorDotProduct',
-    ['v1', 'TVector', 'v2', 'TVector'], 'Float');
+    ['v1', 'TGLVector', 'v2', 'TGLVector'], 'Float');
   TVectorCrossProductFunction.Create(SymbolTable, 'VectorCrossProduct',
   TVectorCrossProductFunction.Create(SymbolTable, 'VectorCrossProduct',
-    ['v1', 'TVector', 'v2', 'TVector'], 'TVector');
+    ['v1', 'TGLVector', 'v2', 'TGLVector'], 'TGLVector');
   TVectorNormalizeFunction.Create(SymbolTable, 'VectorNormalize',
   TVectorNormalizeFunction.Create(SymbolTable, 'VectorNormalize',
-    ['v', 'TVector'], 'TVector');
+    ['v', 'TGLVector'], 'TGLVector');
   TVectorTransformFunction.Create(SymbolTable, 'VectorTransform',
   TVectorTransformFunction.Create(SymbolTable, 'VectorTransform',
-    ['v', 'TVector', 'm', 'TMatrix'], 'TVector');
+    ['v', 'TGLVector', 'm', 'TMatrix'], 'TGLVector');
 
 
   // Matrix function
   // Matrix function
   TInvertMatrixFunction.Create(SymbolTable, 'InvertMatrix',
   TInvertMatrixFunction.Create(SymbolTable, 'InvertMatrix',
@@ -227,12 +227,12 @@ begin
   TMatrixMultiplyFunction.Create(SymbolTable, 'MatrixMultiply',
   TMatrixMultiplyFunction.Create(SymbolTable, 'MatrixMultiply',
     ['m1', 'TMatrix', 'm2', 'TMatrix'], 'TMatrix');
     ['m1', 'TMatrix', 'm2', 'TMatrix'], 'TMatrix');
   TCreateScaleMatrixFunction.Create(SymbolTable, 'CreateScaleMatrix',
   TCreateScaleMatrixFunction.Create(SymbolTable, 'CreateScaleMatrix',
-    ['v', 'TVector'], 'TMatrix');
+    ['v', 'TGLVector'], 'TMatrix');
   TCreateTranslationMatrixFunction.Create(SymbolTable,
   TCreateTranslationMatrixFunction.Create(SymbolTable,
-    'CreateTranslationMatrix', ['v', 'TVector'], 'TMatrix');
+    'CreateTranslationMatrix', ['v', 'TGLVector'], 'TMatrix');
   TCreateScaleAndTranslationMatrixFunction.Create(SymbolTable,
   TCreateScaleAndTranslationMatrixFunction.Create(SymbolTable,
-    'CreateScaleAndTranslationMatrix', ['scale', 'TVector', 'offset',
-    'TVector'], 'TMatrix');
+    'CreateScaleAndTranslationMatrix', ['scale', 'TGLVector', 'offset',
+    'TGLVector'], 'TMatrix');
   TCreateRotationMatrixXFunction.Create(SymbolTable, 'CreateRotationMatrixX',
   TCreateRotationMatrixXFunction.Create(SymbolTable, 'CreateRotationMatrixX',
     ['angle', 'Float'], 'TMatrix');
     ['angle', 'Float'], 'TMatrix');
   TCreateRotationMatrixYFunction.Create(SymbolTable, 'CreateRotationMatrixY',
   TCreateRotationMatrixYFunction.Create(SymbolTable, 'CreateRotationMatrixY',
@@ -240,7 +240,7 @@ begin
   TCreateRotationMatrixZFunction.Create(SymbolTable, 'CreateRotationMatrixZ',
   TCreateRotationMatrixZFunction.Create(SymbolTable, 'CreateRotationMatrixZ',
     ['angle', 'Float'], 'TMatrix');
     ['angle', 'Float'], 'TMatrix');
   TCreateRotationMatrixFunction.Create(SymbolTable, 'CreateRotationMatrix',
   TCreateRotationMatrixFunction.Create(SymbolTable, 'CreateRotationMatrix',
-    ['anAxis', 'TVector', 'angle', 'Float'], 'TMatrix');
+    ['anAxis', 'TGLVector', 'angle', 'Float'], 'TMatrix');
 end;
 end;
 
 
 constructor TdwsVectorGeometryUnit.Create(AOwner: TComponent);
 constructor TdwsVectorGeometryUnit.Create(AOwner: TComponent);
@@ -267,7 +267,7 @@ end;
 
 
 procedure TVectorAddFunction.Execute;
 procedure TVectorAddFunction.Execute;
 var
 var
-  v1, v2, vr: TVector;
+  v1, v2, vr: TGLVector;
 begin
 begin
   v1 := GetVectorFromInfo(Info.Vars['v1']);
   v1 := GetVectorFromInfo(Info.Vars['v1']);
   v2 := GetVectorFromInfo(Info.Vars['v2']);
   v2 := GetVectorFromInfo(Info.Vars['v2']);
@@ -277,7 +277,7 @@ end;
 
 
 procedure TVectorSubtractFunction.Execute;
 procedure TVectorSubtractFunction.Execute;
 var
 var
-  v1, v2, vr: TVector;
+  v1, v2, vr: TGLVector;
 begin
 begin
   v1 := GetVectorFromInfo(Info.Vars['v1']);
   v1 := GetVectorFromInfo(Info.Vars['v1']);
   v2 := GetVectorFromInfo(Info.Vars['v2']);
   v2 := GetVectorFromInfo(Info.Vars['v2']);
@@ -287,7 +287,7 @@ end;
 
 
 procedure TVectorScaleFunction.Execute;
 procedure TVectorScaleFunction.Execute;
 var
 var
-  v, vr: TVector;
+  v, vr: TGLVector;
   f: Single;
   f: Single;
 begin
 begin
   v := GetVectorFromInfo(Info.Vars['v']);
   v := GetVectorFromInfo(Info.Vars['v']);
@@ -298,7 +298,7 @@ end;
 
 
 procedure TCombineVectorFunction.Execute;
 procedure TCombineVectorFunction.Execute;
 var
 var
-  vr, v: TVector;
+  vr, v: TGLVector;
   f: Single;
   f: Single;
 begin
 begin
   vr := GetVectorFromInfo(Info.Vars['vr']);
   vr := GetVectorFromInfo(Info.Vars['vr']);
@@ -311,7 +311,7 @@ end;
 
 
 procedure TVectorCombineFunction.Execute;
 procedure TVectorCombineFunction.Execute;
 var
 var
-  v1, v2, vr: TVector;
+  v1, v2, vr: TGLVector;
   f1, f2: Single;
   f1, f2: Single;
 begin
 begin
   v1 := GetVectorFromInfo(Info.Vars['v1']);
   v1 := GetVectorFromInfo(Info.Vars['v1']);
@@ -324,7 +324,7 @@ end;
 
 
 procedure TVectorCombine3Function.Execute;
 procedure TVectorCombine3Function.Execute;
 var
 var
-  v1, v2, v3, vr: TVector;
+  v1, v2, v3, vr: TGLVector;
   f1, f2, f3: Single;
   f1, f2, f3: Single;
 begin
 begin
   v1 := GetVectorFromInfo(Info.Vars['v1']);
   v1 := GetVectorFromInfo(Info.Vars['v1']);
@@ -339,7 +339,7 @@ end;
 
 
 procedure TVectorDotProductFunction.Execute;
 procedure TVectorDotProductFunction.Execute;
 var
 var
-  v1, v2: TVector;
+  v1, v2: TGLVector;
 begin
 begin
   v1 := GetVectorFromInfo(Info.Vars['v1']);
   v1 := GetVectorFromInfo(Info.Vars['v1']);
   v2 := GetVectorFromInfo(Info.Vars['v2']);
   v2 := GetVectorFromInfo(Info.Vars['v2']);
@@ -348,7 +348,7 @@ end;
 
 
 procedure TVectorCrossProductFunction.Execute;
 procedure TVectorCrossProductFunction.Execute;
 var
 var
-  v1, v2, vr: TVector;
+  v1, v2, vr: TGLVector;
 begin
 begin
   v1 := GetVectorFromInfo(Info.Vars['v1']);
   v1 := GetVectorFromInfo(Info.Vars['v1']);
   v2 := GetVectorFromInfo(Info.Vars['v2']);
   v2 := GetVectorFromInfo(Info.Vars['v2']);
@@ -358,7 +358,7 @@ end;
 
 
 procedure TVectorNormalizeFunction.Execute;
 procedure TVectorNormalizeFunction.Execute;
 var
 var
-  v, vr: TVector;
+  v, vr: TGLVector;
 begin
 begin
   v := GetVectorFromInfo(Info.Vars['v']);
   v := GetVectorFromInfo(Info.Vars['v']);
   vr := VectorNormalize(v);
   vr := VectorNormalize(v);
@@ -367,7 +367,7 @@ end;
 
 
 procedure TVectorTransformFunction.Execute;
 procedure TVectorTransformFunction.Execute;
 var
 var
-  v, vr: TVector;
+  v, vr: TGLVector;
   mat: TMatrix;
   mat: TMatrix;
 begin
 begin
   v := GetVectorFromInfo(Info.Vars['v']);
   v := GetVectorFromInfo(Info.Vars['v']);
@@ -406,7 +406,7 @@ end;
 
 
 procedure TCreateScaleMatrixFunction.Execute;
 procedure TCreateScaleMatrixFunction.Execute;
 var
 var
-  v: TVector;
+  v: TGLVector;
   mr: TMatrix;
   mr: TMatrix;
 begin
 begin
   v := GetVectorFromInfo(Info.Vars['v']);
   v := GetVectorFromInfo(Info.Vars['v']);
@@ -416,7 +416,7 @@ end;
 
 
 procedure TCreateTranslationMatrixFunction.Execute;
 procedure TCreateTranslationMatrixFunction.Execute;
 var
 var
-  v: TVector;
+  v: TGLVector;
   mr: TMatrix;
   mr: TMatrix;
 begin
 begin
   v := GetVectorFromInfo(Info.Vars['v']);
   v := GetVectorFromInfo(Info.Vars['v']);
@@ -426,7 +426,7 @@ end;
 
 
 procedure TCreateScaleAndTranslationMatrixFunction.Execute;
 procedure TCreateScaleAndTranslationMatrixFunction.Execute;
 var
 var
-  scale, offset: TVector;
+  scale, offset: TGLVector;
   mr: TMatrix;
   mr: TMatrix;
 begin
 begin
   scale := GetVectorFromInfo(Info.Vars['scale']);
   scale := GetVectorFromInfo(Info.Vars['scale']);
@@ -468,7 +468,7 @@ end;
 procedure TCreateRotationMatrixFunction.Execute;
 procedure TCreateRotationMatrixFunction.Execute;
 var
 var
   angle: Single;
   angle: Single;
-  anAxis: TVector;
+  anAxis: TGLVector;
   mr: TMatrix;
   mr: TMatrix;
 begin
 begin
   anAxis := GetVectorFromInfo(Info.Vars['anAxis']);
   anAxis := GetVectorFromInfo(Info.Vars['anAxis']);

+ 3 - 3
Source/Formats.B3D.pas

@@ -99,7 +99,7 @@ type
     frame: Integer; //where key occurs
     frame: Integer; //where key occurs
     position: TAffineVector; //present if (flags&1)
     position: TAffineVector; //present if (flags&1)
     scale: TAffineVector; //present if (flags&2)
     scale: TAffineVector; //present if (flags&2)
-    rotation: TVector; //present if (flags&4)
+    rotation: TGLVector; //present if (flags&4)
   end;
   end;
 
 
   PANIMChunk = ^TANIMChunk;
   PANIMChunk = ^TANIMChunk;
@@ -114,7 +114,7 @@ type
     name: array[0..255] of char; //name of node
     name: array[0..255] of char; //name of node
     position: TAffineVector;  //local...
     position: TAffineVector;  //local...
     scale: TAffineVector; //coord...
     scale: TAffineVector; //coord...
-    rotation: TVector; //system...
+    rotation: TGLVector; //system...
     //array of node elements
     //array of node elements
     //should be one of meshes or bones, support meshes only for now
     //should be one of meshes or bones, support meshes only for now
     meshes: PMESHChunk; //what 'kind' of node this is - if unrecognized, just use a Blitz3D pivot.
     meshes: PMESHChunk; //what 'kind' of node this is - if unrecognized, just use a Blitz3D pivot.
@@ -542,7 +542,7 @@ begin
   Inc(Count, ReadString(aStream, Node^.name, 255));
   Inc(Count, ReadString(aStream, Node^.name, 255));
   Inc(Count, aStream.Read(Node^.position.X, sizeof(TAffineVector)));
   Inc(Count, aStream.Read(Node^.position.X, sizeof(TAffineVector)));
   Inc(Count, aStream.Read(Node^.scale.X, sizeof(TAffineVector)));
   Inc(Count, aStream.Read(Node^.scale.X, sizeof(TAffineVector)));
-  Inc(Count, aStream.Read(Node^.rotation.X, sizeof(TVector)));
+  Inc(Count, aStream.Read(Node^.rotation.X, sizeof(TGLVector)));
   while Count<aChunk.length do
   while Count<aChunk.length do
   begin
   begin
     Inc(Count, aStream.Read(C, sizeof(TB3DChunk)));
     Inc(Count, aStream.Read(C, sizeof(TB3DChunk)));

+ 2 - 2
Source/Formats.OCT.pas

@@ -78,7 +78,7 @@ type
     procedure SaveToStream(aStream: TStream);
     procedure SaveToStream(aStream: TStream);
     procedure AddTriangles(vertexCoords: TAffineVectorList;
     procedure AddTriangles(vertexCoords: TAffineVectorList;
       texMapCoords: TAffineVectorList; const textureName: String);
       texMapCoords: TAffineVectorList; const textureName: String);
-    procedure AddLight(const lightPos: TAffineVector; const lightColor: TVector;
+    procedure AddLight(const lightPos: TAffineVector; const lightColor: TGLVector;
       lightIntensity: Integer);
       lightIntensity: Integer);
   end;
   end;
 
 
@@ -178,7 +178,7 @@ begin
 end;
 end;
 
 
 procedure TOCTFile.AddLight(const lightPos: TAffineVector;
 procedure TOCTFile.AddLight(const lightPos: TAffineVector;
-  const lightColor: TVector; lightIntensity: Integer);
+  const lightColor: TGLVector; lightIntensity: Integer);
 var
 var
   n: Integer;
   n: Integer;
 begin
 begin

+ 1 - 1
Source/Formats.X.pas

@@ -296,7 +296,7 @@ var
     end;
     end;
   end;
   end;
 
 
-  function ReadVector4f: TVector;
+  function ReadVector4f: TGLVector;
   var
   var
     str: String;
     str: String;
   begin
   begin

+ 2 - 2
Source/GLS.AnimationUtils.pas

@@ -62,7 +62,7 @@ type
 
 
 
 
   function Tweener(Current, Target: TAffineVector; Time, Duration: Single; EaseType: TEaseType): TAffineVector; overload;
   function Tweener(Current, Target: TAffineVector; Time, Duration: Single; EaseType: TEaseType): TAffineVector; overload;
-  function Tweener(Current, Target: TVector; Time, Duration: Single; EaseType: TEaseType): TVector; overload;
+  function Tweener(Current, Target: TGLVector; Time, Duration: Single; EaseType: TEaseType): TGLVector; overload;
   function Tweener(Current, Target: TVector2f; Time, Duration: Single; EaseType: TEaseType): TVector2f; overload;
   function Tweener(Current, Target: TVector2f; Time, Duration: Single; EaseType: TEaseType): TVector2f; overload;
   function Tweener(Current, Target: Single; Time, Duration: Single; EaseType: TEaseType): Single; overload;
   function Tweener(Current, Target: Single; Time, Duration: Single; EaseType: TEaseType): Single; overload;
 
 
@@ -918,7 +918,7 @@ begin
   end;
   end;
 end;
 end;
 
 
-function Tweener(Current, Target: TVector; Time, Duration: Single; EaseType: TEaseType): TVector;
+function Tweener(Current, Target: TGLVector; Time, Duration: Single; EaseType: TEaseType): TGLVector;
 var
 var
   i: integer;
   i: integer;
   EaseFunction : TEaseFunction;
   EaseFunction : TEaseFunction;

+ 11 - 11
Source/GLS.Atmosphere.pas

@@ -90,7 +90,7 @@ type
     // Main rendering procedure.
     // Main rendering procedure.
     procedure DoRender(var rci: TGLRenderContextInfo; renderSelf, renderChildren: Boolean); override;
     procedure DoRender(var rci: TGLRenderContextInfo; renderSelf, renderChildren: Boolean); override;
     // Used to determine extents.
     // Used to determine extents.
-    function AxisAlignedDimensionsUnscaled : TVector; override;
+    function AxisAlignedDimensionsUnscaled : TGLVector; override;
   end;
   end;
 
 
   TGLAtmosphere = class(TGLCustomAtmosphere)
   TGLAtmosphere = class(TGLCustomAtmosphere)
@@ -165,14 +165,14 @@ end;
 procedure TGLCustomAtmosphere.DoRender(var rci: TGLRenderContextInfo; renderSelf, renderChildren: Boolean);
 procedure TGLCustomAtmosphere.DoRender(var rci: TGLRenderContextInfo; renderSelf, renderChildren: Boolean);
 var
 var
   radius, invAtmosphereHeight:    Single;
   radius, invAtmosphereHeight:    Single;
-  sunPos, eyePos, lightingVector: TVector;
-  diskNormal, diskRight, diskUp:  TVector;
+  sunPos, eyePos, lightingVector: TGLVector;
+  diskNormal, diskRight, diskUp:  TGLVector;
 
 
 
 
-  function AtmosphereColor(const rayStart, rayEnd: TVector): TColorVector;
+  function AtmosphereColor(const rayStart, rayEnd: TGLVector): TColorVector;
   var
   var
     I, n:     Integer;
     I, n:     Integer;
-    atmPoint, normal: TVector;
+    atmPoint, normal: TGLVector;
     altColor: TColorVector;
     altColor: TColorVector;
     alt, rayLength, contrib, decay, intensity, invN: Single;
     alt, rayLength, contrib, decay, intensity, invN: Single;
   begin
   begin
@@ -214,10 +214,10 @@ var
   end;
   end;
 
 
 
 
-  function ComputeColor(var rayDest: TVector; mayHitGround: Boolean): TColorVector;
+  function ComputeColor(var rayDest: TGLVector; mayHitGround: Boolean): TColorVector;
   var
   var
-    ai1, ai2, pi1, pi2: TVector;
-    rayVector: TVector;
+    ai1, ai2, pi1, pi2: TGLVector;
+    rayVector: TGLVector;
   begin
   begin
     rayVector := VectorNormalize(VectorSubtract(rayDest, eyePos));
     rayVector := VectorNormalize(VectorSubtract(rayDest, eyePos));
     if RayCastSphereIntersect(eyePos, rayVector, NullHmgPoint,
     if RayCastSphereIntersect(eyePos, rayVector, NullHmgPoint,
@@ -363,7 +363,7 @@ begin
   if FSun <> nil then FSun.FreeNotification(Self);
   if FSun <> nil then FSun.FreeNotification(Self);
 end;
 end;
 
 
-function TGLCustomAtmosphere.AxisAlignedDimensionsUnscaled : TVector;
+function TGLCustomAtmosphere.AxisAlignedDimensionsUnscaled : TGLVector;
 begin
 begin
   Result.X := FAtmosphereRadius;
   Result.X := FAtmosphereRadius;
   Result.Y := Result.X;
   Result.Y := Result.X;
@@ -431,8 +431,8 @@ begin
     SetLength(sinCache, FSlices + 1);
     SetLength(sinCache, FSlices + 1);
     PrepareSinCosCache(sinCache, cosCache, 0, 360);
     PrepareSinCosCache(sinCache, cosCache, 0, 360);
 
 
-    GetMem(pVertex, 2 * (FSlices + 1) * SizeOf(TVector));
-    GetMem(pColor, 2 * (FSlices + 1) * SizeOf(TVector));
+    GetMem(pVertex, 2 * (FSlices + 1) * SizeOf(TGLVector));
+    GetMem(pColor, 2 * (FSlices + 1) * SizeOf(TGLVector));
   end
   end
   else
   else
     raise EGLAtmosphereException.Create('Slices must be more than0!');
     raise EGLAtmosphereException.Create('Slices must be more than0!');

+ 7 - 7
Source/GLS.Behaviours.pas

@@ -89,9 +89,9 @@ type
     procedure DoProgress(const progressTime: TGLProgressTimes); override;
     procedure DoProgress(const progressTime: TGLProgressTimes); override;
     // Adds time-proportionned acceleration to the speed. 
     // Adds time-proportionned acceleration to the speed. 
     procedure ApplyTranslationAcceleration(const deltaTime: double;
     procedure ApplyTranslationAcceleration(const deltaTime: double;
-      const accel: TVector);
+      const accel: TGLVector);
     // Applies a timed force to the inertia. If Mass is null, nothing is done. 
     // Applies a timed force to the inertia. If Mass is null, nothing is done. 
-    procedure ApplyForce(const deltaTime: Double; const Force: TVector);
+    procedure ApplyForce(const deltaTime: Double; const Force: TGLVector);
     (*Applies a timed torque to the inertia (yuck!).
     (*Applies a timed torque to the inertia (yuck!).
       This gets a "yuck!" because it is as false as the rest of the rotation  model. *)
       This gets a "yuck!" because it is as false as the rest of the rotation  model. *)
     procedure ApplyTorque(const deltaTime: double;
     procedure ApplyTorque(const deltaTime: double;
@@ -101,7 +101,7 @@ type
     (* Bounce speed as if hitting a surface. 
     (* Bounce speed as if hitting a surface. 
        restitution is the coefficient of restituted energy (1=no energy loss, 0=no bounce). 
        restitution is the coefficient of restituted energy (1=no energy loss, 0=no bounce). 
 	   The normal is NOT assumed to be normalized. *)
 	   The normal is NOT assumed to be normalized. *)
-    procedure SurfaceBounce(const surfaceNormal: TVector; restitution: single);
+    procedure SurfaceBounce(const surfaceNormal: TGLVector; restitution: single);
   published
   published
     property Mass: single read FMass write FMass;
     property Mass: single read FMass write FMass;
     property TranslationSpeed: TGLCoordinates read FTranslationSpeed write SetTranslationSpeed;
     property TranslationSpeed: TGLCoordinates read FTranslationSpeed write SetTranslationSpeed;
@@ -405,7 +405,7 @@ end;
 
 
 procedure TGLBInertia.DoProgress(const progressTime: TGLProgressTimes);
 procedure TGLBInertia.DoProgress(const progressTime: TGLProgressTimes);
 var
 var
-  trnVector: TVector;
+  trnVector: TGLVector;
   speed, newSpeed: double;
   speed, newSpeed: double;
 
 
   procedure ApplyRotationDamping(var rotationSpeed: single);
   procedure ApplyRotationDamping(var rotationSpeed: single);
@@ -465,13 +465,13 @@ begin
 end;
 end;
 
 
 procedure TGLBInertia.ApplyTranslationAcceleration(const deltaTime: double;
 procedure TGLBInertia.ApplyTranslationAcceleration(const deltaTime: double;
-  const accel: TVector);
+  const accel: TGLVector);
 begin
 begin
   FTranslationSpeed.AsVector := VectorCombine(FTranslationSpeed.AsVector,
   FTranslationSpeed.AsVector := VectorCombine(FTranslationSpeed.AsVector,
     accel, 1, deltaTime);
     accel, 1, deltaTime);
 end;
 end;
 
 
-procedure TGLBInertia.ApplyForce(const deltaTime: double; const force: TVector);
+procedure TGLBInertia.ApplyForce(const deltaTime: double; const force: TGLVector);
 begin
 begin
   if Mass <> 0 then
   if Mass <> 0 then
     FTranslationSpeed.AsVector :=
     FTranslationSpeed.AsVector :=
@@ -497,7 +497,7 @@ begin
   FTranslationSpeed.Invert;
   FTranslationSpeed.Invert;
 end;
 end;
 
 
-procedure TGLBInertia.SurfaceBounce(const surfaceNormal: TVector; restitution: single);
+procedure TGLBInertia.SurfaceBounce(const surfaceNormal: TGLVector; restitution: single);
 var
 var
   f: single;
   f: single;
 begin
 begin

+ 4 - 4
Source/GLS.BitmapFont.pas

@@ -190,7 +190,7 @@ type
     procedure RenderString(var ARci: TGLRenderContextInfo;
     procedure RenderString(var ARci: TGLRenderContextInfo;
       const aText: UnicodeString; aAlignment: TAlignment;
       const aText: UnicodeString; aAlignment: TAlignment;
       aLayout: TTextLayout; const aColor: TColorVector;
       aLayout: TTextLayout; const aColor: TColorVector;
-      aPosition: PVector = nil; aReverseY: boolean = False); overload; virtual;
+      aPosition: PGLVector = nil; aReverseY: boolean = False); overload; virtual;
     (* A simpler canvas-style TextOut helper for RenderString.
     (* A simpler canvas-style TextOut helper for RenderString.
        The rendering is reversed along Y by default, to allow direct use
        The rendering is reversed along Y by default, to allow direct use
        with TGLCanvas *)
        with TGLCanvas *)
@@ -832,7 +832,7 @@ end;
 
 
 procedure TGLCustomBitmapFont.RenderString(var ARci: TGLRenderContextInfo;
 procedure TGLCustomBitmapFont.RenderString(var ARci: TGLRenderContextInfo;
   const aText: UnicodeString; aAlignment: TAlignment; aLayout: TTextLayout;
   const aText: UnicodeString; aAlignment: TAlignment; aLayout: TTextLayout;
-  const aColor: TColorVector; aPosition: PVector = nil;
+  const aColor: TColorVector; aPosition: PGLVector = nil;
   aReverseY: boolean = False);
   aReverseY: boolean = False);
 
 
   function AlignmentAdjustement(p: Integer): Single;
   function AlignmentAdjustement(p: Integer): Single;
@@ -875,7 +875,7 @@ var
   i, chi: Integer;
   i, chi: Integer;
   pch: PCharInfo;
   pch: PCharInfo;
   TopLeft, BottomRight: TTexPoint;
   TopLeft, BottomRight: TTexPoint;
-  vTopLeft, vBottomRight: TVector;
+  vTopLeft, vBottomRight: TGLVector;
   deltaV, spaceDeltaH: Single;
   deltaV, spaceDeltaH: Single;
   currentChar: WideChar;
   currentChar: WideChar;
 begin
 begin
@@ -966,7 +966,7 @@ end;
 procedure TGLCustomBitmapFont.TextOut(var rci: TGLRenderContextInfo; X, Y: Single;
 procedure TGLCustomBitmapFont.TextOut(var rci: TGLRenderContextInfo; X, Y: Single;
   const Text: UnicodeString; const Color: TColorVector);
   const Text: UnicodeString; const Color: TColorVector);
 var
 var
-  V: TVector;
+  V: TGLVector;
 begin
 begin
   V.X := X;
   V.X := X;
   V.Y := Y;
   V.Y := Y;

+ 40 - 40
Source/GLS.CameraController.pas

@@ -75,8 +75,8 @@ type
 
 
   TGLMoveToPosJob = class(TGLCameraJob)
   TGLMoveToPosJob = class(TGLCameraJob)
   private
   private
-    FInitialPos: TVector;
-    FFinalPos: TVector;
+    FInitialPos: TGLVector;
+    FFinalPos: TGLVector;
   public
   public
     X: Double;
     X: Double;
     Y: Double;
     Y: Double;
@@ -85,40 +85,40 @@ type
     procedure Step; override;
     procedure Step; override;
     procedure Init; override;
     procedure Init; override;
     // Properties.
     // Properties.
-    property InitialPos: TVector read FInitialPos;
-    property FinalPos: TVector read FFinalPos;
+    property InitialPos: TGLVector read FInitialPos;
+    property FinalPos: TGLVector read FFinalPos;
   end;
   end;
 
 
   TGLZoomToDistanceJob = class(TGLCameraJob)
   TGLZoomToDistanceJob = class(TGLCameraJob)
   private
   private
-    FInitialPos: TVector;
-    FFinalPos: TVector;
+    FInitialPos: TGLVector;
+    FFinalPos: TGLVector;
   public
   public
     Distance: Double;
     Distance: Double;
     Time: Double;
     Time: Double;
     procedure Step; override;
     procedure Step; override;
     procedure Init; override;
     procedure Init; override;
     // Properties.
     // Properties.
-    property InitialPos: TVector read FInitialPos;
-    property FinalPos: TVector read FFinalPos;
+    property InitialPos: TGLVector read FInitialPos;
+    property FinalPos: TGLVector read FFinalPos;
   end;
   end;
 
 
   TGLOrbitToPosJob = class(TGLCameraJob)
   TGLOrbitToPosJob = class(TGLCameraJob)
   private
   private
-    FFinalPos: TVector; // Yep, FFinalPos is stored in relative coordinates.
+    FFinalPos: TGLVector; // Yep, FFinalPos is stored in relative coordinates.
     FRotateSpeed: TVector2f;
     FRotateSpeed: TVector2f;
-    FCameraUpVector: TVector;
+    FCameraUpVector: TGLVector;
     // Absolute Coordinates, can even be not normalized by radius.
     // Absolute Coordinates, can even be not normalized by radius.
     // Procesed in Init, not used anywhere else.
     // Procesed in Init, not used anywhere else.
-    FTargetPosition: TVector;
+    FTargetPosition: TGLVector;
     FTime: Double;
     FTime: Double;
   public
   public
     procedure Step; override;
     procedure Step; override;
     procedure Init; override;
     procedure Init; override;
     property RotateSpeed: TVector2f read FRotateSpeed;
     property RotateSpeed: TVector2f read FRotateSpeed;
-    property CameraUpVector: TVector read FCameraUpVector;
-    property TargetPosition: TVector read FTargetPosition;
-    property FinalPos: TVector read FFinalPos;
+    property CameraUpVector: TGLVector read FCameraUpVector;
+    property TargetPosition: TGLVector read FTargetPosition;
+    property FinalPos: TGLVector read FFinalPos;
     property Time: Double read FTime;
     property Time: Double read FTime;
   end;
   end;
 
 
@@ -138,11 +138,11 @@ type
 
 
   TGLOrbitToPosAdvJob = class(TGLCameraJob)
   TGLOrbitToPosAdvJob = class(TGLCameraJob)
   private
   private
-    FInitialPos: TVector;
-    FFinalPos: TVector;
-    FInitialUp: TVector;
-    FInitialDir: TVector;
-    FRotAxis: TVector;
+    FInitialPos: TGLVector;
+    FFinalPos: TGLVector;
+    FInitialUp: TGLVector;
+    FInitialDir: TGLVector;
+    FRotAxis: TGLVector;
     FAngle: Double;
     FAngle: Double;
   public
   public
     X: Double;
     X: Double;
@@ -153,15 +153,15 @@ type
     procedure Step; override;
     procedure Step; override;
     procedure Init; override;
     procedure Init; override;
     // Properties.
     // Properties.
-    property InitialPos: TVector read FInitialPos;
-    property InitialUp: TVector read FInitialUp;
-    property InitialDir: TVector read FInitialDir;
-    property FinalPos: TVector read FFinalPos;
+    property InitialPos: TGLVector read FInitialPos;
+    property InitialUp: TGLVector read FInitialUp;
+    property InitialDir: TGLVector read FInitialDir;
+    property FinalPos: TGLVector read FFinalPos;
   end;
   end;
 
 
   TGLSmoothOrbitToPosAdvJob = class(TGLOrbitToPosAdvJob)
   TGLSmoothOrbitToPosAdvJob = class(TGLOrbitToPosAdvJob)
   private
   private
-    FPreviousPosition: TVector;
+    FPreviousPosition: TGLVector;
     FSmoothNavigator: TGLNavigatorSmoothChangeVector;
     FSmoothNavigator: TGLNavigatorSmoothChangeVector;
     FRestoreUpVector: boolean;
     FRestoreUpVector: boolean;
   public
   public
@@ -212,11 +212,11 @@ type
     function OrbitToPos(X, Y, Z, Time: Double): TGLOrbitToPosJob;
     function OrbitToPos(X, Y, Z, Time: Double): TGLOrbitToPosJob;
     (* Same as OrbitToPos(), but makes use of SmoothNavigator to make
     (* Same as OrbitToPos(), but makes use of SmoothNavigator to make
       sure all camera movements are smooth. *)
       sure all camera movements are smooth. *)
-    function OrbitToPosSmooth(const ATargetPosition: TVector;
+    function OrbitToPosSmooth(const ATargetPosition: TGLVector;
       const ATime: Double;
       const ATime: Double;
       const ASmoothNavigator: TGLNavigatorSmoothChangeVector;
       const ASmoothNavigator: TGLNavigatorSmoothChangeVector;
       const AFNeedToRecalculateZoom: boolean;
       const AFNeedToRecalculateZoom: boolean;
-      const ACameraUpVector: PVector = nil): TGLSmoothOrbitToPos;
+      const ACameraUpVector: PGLVector = nil): TGLSmoothOrbitToPos;
     (* Same function as OrbitToPos but support all camera states
     (* Same function as OrbitToPos but support all camera states
       PreferUpAxis value is to setup if function use Camera Up based rotation axis
       PreferUpAxis value is to setup if function use Camera Up based rotation axis
       instead of Camera direction based rotation axis when destination and camera
       instead of Camera direction based rotation axis when destination and camera
@@ -386,9 +386,9 @@ begin
   Result.FTime := Time;
   Result.FTime := Time;
 end;
 end;
 
 
-function TGLCameraController.OrbitToPosSmooth(const ATargetPosition: TVector;
+function TGLCameraController.OrbitToPosSmooth(const ATargetPosition: TGLVector;
   const ATime: Double; const ASmoothNavigator: TGLNavigatorSmoothChangeVector;
   const ATime: Double; const ASmoothNavigator: TGLNavigatorSmoothChangeVector;
-  const AFNeedToRecalculateZoom: boolean; const ACameraUpVector: PVector = nil)
+  const AFNeedToRecalculateZoom: boolean; const ACameraUpVector: PGLVector = nil)
   : TGLSmoothOrbitToPos;
   : TGLSmoothOrbitToPos;
 begin
 begin
   Result := TGLSmoothOrbitToPos.Create(FCameraJobList);
   Result := TGLSmoothOrbitToPos.Create(FCameraJobList);
@@ -572,7 +572,7 @@ end;
 
 
 procedure TGLMoveToPosJob.Step;
 procedure TGLMoveToPosJob.Step;
 var
 var
-  Vect: TVector;
+  Vect: TGLVector;
 begin
 begin
   if FElapsedTime < FProceedTime then
   if FElapsedTime < FProceedTime then
   begin
   begin
@@ -607,7 +607,7 @@ end;
 
 
 procedure TGLZoomToDistanceJob.Step;
 procedure TGLZoomToDistanceJob.Step;
 var
 var
-  Vect: TVector;
+  Vect: TGLVector;
 begin
 begin
   if FElapsedTime < FProceedTime then
   if FElapsedTime < FProceedTime then
   begin
   begin
@@ -672,8 +672,8 @@ end;
 
 
 procedure TGLOrbitToPosAdvJob.Init;
 procedure TGLOrbitToPosAdvJob.Init;
 var
 var
-  Right: TVector;
-  lAbsVectorToTarget: TVector;
+  Right: TGLVector;
+  lAbsVectorToTarget: TGLVector;
 begin
 begin
   FProceedTime := Time;
   FProceedTime := Time;
   FInitialPos := VectorSubtract(FJoblist.FController.FCamera.AbsolutePosition,
   FInitialPos := VectorSubtract(FJoblist.FController.FCamera.AbsolutePosition,
@@ -725,7 +725,7 @@ end;
 
 
 procedure TGLOrbitToPosAdvJob.Step;
 procedure TGLOrbitToPosAdvJob.Step;
 var
 var
-  tempUp, tempDir, tempPos: TVector;
+  tempUp, tempDir, tempPos: TGLVector;
 begin
 begin
   if FElapsedTime < FProceedTime then
   if FElapsedTime < FProceedTime then
   begin
   begin
@@ -771,7 +771,7 @@ end;
 
 
 procedure TGLSmoothOrbitToPosAdvJob.Init;
 procedure TGLSmoothOrbitToPosAdvJob.Init;
 var
 var
-  Right: TVector;
+  Right: TGLVector;
 begin
 begin
   FProceedTime := Time;
   FProceedTime := Time;
   FInitialPos := VectorSubtract(FPreviousPosition,
   FInitialPos := VectorSubtract(FPreviousPosition,
@@ -823,7 +823,7 @@ end;
 
 
 procedure TGLSmoothOrbitToPosAdvJob.Step;
 procedure TGLSmoothOrbitToPosAdvJob.Step;
 var
 var
-  tempUp, tempDir, tempPos: TVector;
+  tempUp, tempDir, tempPos: TGLVector;
 begin
 begin
   if FElapsedTime < FProceedTime then
   if FElapsedTime < FProceedTime then
   begin
   begin
@@ -889,14 +889,14 @@ end;
 procedure TGLSmoothOrbitToPos.Step;
 procedure TGLSmoothOrbitToPos.Step;
 var
 var
   lCurrentDistanceToTarget: Single;
   lCurrentDistanceToTarget: Single;
-  lTargetPosition: TVector;
+  lTargetPosition: TGLVector;
   lCurrentMatrix: TMatrix;
   lCurrentMatrix: TMatrix;
   lAngle: Single;
   lAngle: Single;
-  lAbsTargetPosition: TVector;
+  lAbsTargetPosition: TGLVector;
 
 
   procedure RestoreDistanceToTarget();
   procedure RestoreDistanceToTarget();
   var
   var
-    lDirection: TVector;
+    lDirection: TGLVector;
   begin
   begin
     lDirection := VectorNormalize
     lDirection := VectorNormalize
       (VectorSubtract(FJoblist.FController.FCameraTarget.AbsolutePosition,
       (VectorSubtract(FJoblist.FController.FCameraTarget.AbsolutePosition,
@@ -907,7 +907,7 @@ var
       VectorScale(lDirection, -lCurrentDistanceToTarget));
       VectorScale(lDirection, -lCurrentDistanceToTarget));
   end;
   end;
 
 
-  procedure SetTargetValueRelative(const AAbsolutePosition: TVector);
+  procedure SetTargetValueRelative(const AAbsolutePosition: TGLVector);
   begin
   begin
     if FJoblist.FController.FCamera.Parent = nil then
     if FJoblist.FController.FCamera.Parent = nil then
       FSmoothNavigator.TargetValue.DirectVector := AAbsolutePosition
       FSmoothNavigator.TargetValue.DirectVector := AAbsolutePosition
@@ -918,7 +918,7 @@ var
 
 
   procedure ApplyDistanceToResult();
   procedure ApplyDistanceToResult();
   var
   var
-    lDirection, lNewTargetPosition: TVector;
+    lDirection, lNewTargetPosition: TGLVector;
   begin
   begin
     lDirection := VectorNormalize
     lDirection := VectorNormalize
       (VectorSubtract(FJoblist.FController.FCameraTarget.AbsolutePosition,
       (VectorSubtract(FJoblist.FController.FCameraTarget.AbsolutePosition,

+ 15 - 15
Source/GLS.Collision.pas

@@ -164,7 +164,7 @@ end;
 
 
 function FastCheckPointVsEllipsoid(obj1, obj2: TGLBaseSceneObject): Boolean;
 function FastCheckPointVsEllipsoid(obj1, obj2: TGLBaseSceneObject): Boolean;
 var
 var
-  v: TVector;
+  v: TGLVector;
 begin
 begin
   // calc vector expressed in local coordinates (for obj2)
   // calc vector expressed in local coordinates (for obj2)
   v := VectorTransform(obj1.AbsolutePosition, obj2.InvAbsoluteMatrix);
   v := VectorTransform(obj1.AbsolutePosition, obj2.InvAbsoluteMatrix);
@@ -181,7 +181,7 @@ end;
 
 
 function FastCheckPointVsCube(obj1, obj2: TGLBaseSceneObject): Boolean;
 function FastCheckPointVsCube(obj1, obj2: TGLBaseSceneObject): Boolean;
 var
 var
-  v: TVector;
+  v: TGLVector;
 begin
 begin
   // calc vector expressed in local coordinates (for obj2)
   // calc vector expressed in local coordinates (for obj2)
   v := VectorTransform(obj1.AbsolutePosition, obj2.InvAbsoluteMatrix);
   v := VectorTransform(obj1.AbsolutePosition, obj2.InvAbsoluteMatrix);
@@ -205,8 +205,8 @@ end;
 
 
 function FastCheckSphereVsEllipsoid(obj1, obj2: TGLBaseSceneObject): Boolean;
 function FastCheckSphereVsEllipsoid(obj1, obj2: TGLBaseSceneObject): Boolean;
 var
 var
-  v: TVector;
-  aad: TVector;
+  v: TGLVector;
+  aad: TGLVector;
 begin
 begin
   // express in local coordinates (for obj2)
   // express in local coordinates (for obj2)
   v := VectorTransform(obj1.AbsolutePosition, obj2.InvAbsoluteMatrix);
   v := VectorTransform(obj1.AbsolutePosition, obj2.InvAbsoluteMatrix);
@@ -222,8 +222,8 @@ end;
 
 
 function FastCheckSphereVsCube(obj1, obj2: TGLBaseSceneObject): Boolean;
 function FastCheckSphereVsCube(obj1, obj2: TGLBaseSceneObject): Boolean;
 var
 var
-  v: TVector;
-  aad: TVector;
+  v: TGLVector;
+  aad: TGLVector;
   r, r2: Single;
   r, r2: Single;
 begin
 begin
   // express in local coordinates (for cube "obj2")
   // express in local coordinates (for cube "obj2")
@@ -314,7 +314,7 @@ end;
 
 
 function FastCheckEllipsoidVsEllipsoid(obj1, obj2: TGLBaseSceneObject): Boolean;
 function FastCheckEllipsoidVsEllipsoid(obj1, obj2: TGLBaseSceneObject): Boolean;
 var
 var
-  v1, v2: TVector;
+  v1, v2: TGLVector;
 begin
 begin
   // express in local coordinates (for obj2)
   // express in local coordinates (for obj2)
   v1 := VectorTransform(obj1.AbsolutePosition, obj2.InvAbsoluteMatrix);
   v1 := VectorTransform(obj1.AbsolutePosition, obj2.InvAbsoluteMatrix);
@@ -335,8 +335,8 @@ end;
 function FastCheckEllipsoidVsCube(obj1, obj2: TGLBaseSceneObject): Boolean;
 function FastCheckEllipsoidVsCube(obj1, obj2: TGLBaseSceneObject): Boolean;
 { current implementation assumes Ellipsoid as Sphere }
 { current implementation assumes Ellipsoid as Sphere }
 var
 var
-  v: TVector;
-  aad: TVector;
+  v: TGLVector;
+  aad: TGLVector;
 begin
 begin
   // express in local coordinates (for obj2)
   // express in local coordinates (for obj2)
   v := VectorTransform(obj1.AbsolutePosition, obj2.InvAbsoluteMatrix);
   v := VectorTransform(obj1.AbsolutePosition, obj2.InvAbsoluteMatrix);
@@ -365,7 +365,7 @@ begin
   Result := FastCheckEllipsoidVsCube(obj2, obj1);
   Result := FastCheckEllipsoidVsCube(obj2, obj1);
 end;
 end;
 
 
-procedure InitArray(v: TVector; var pt: array of TVector);
+procedure InitArray(v: TGLVector; var pt: array of TGLVector);
 // calculate the cube edge points from the axis aligned dimension
 // calculate the cube edge points from the axis aligned dimension
 begin
 begin
   pt[0] := VectorMake(-v.X, -v.Y, -v.Z, 1);
   pt[0] := VectorMake(-v.X, -v.Y, -v.Z, 1);
@@ -383,7 +383,7 @@ function DoCubesIntersectPrim(obj1, obj2: TGLBaseSceneObject): Boolean;
 // else, for each "wire" in then wireframe of the "cube" obj1, check if it
 // else, for each "wire" in then wireframe of the "cube" obj1, check if it
 // intersects with one of the "planes" of "cube" obj2
 // intersects with one of the "planes" of "cube" obj2
 
 
-  function CheckWire(p0, p1, pl: TVector): Boolean;
+  function CheckWire(p0, p1, pl: TGLVector): Boolean;
   // check "wire" line (p0,p1) for intersection with each plane, given from
   // check "wire" line (p0,p1) for intersection with each plane, given from
   // axis aligned dimensions pl
   // axis aligned dimensions pl
   // - calculate "direction" d: p0 -> p1
   // - calculate "direction" d: p0 -> p1
@@ -396,7 +396,7 @@ function DoCubesIntersectPrim(obj1, obj2: TGLBaseSceneObject): Boolean;
   // - do the same for opposite plane -pl[I]
   // - do the same for opposite plane -pl[I]
   var
   var
     t: Single;
     t: Single;
-    d, s: TVector;
+    d, s: TGLVector;
     i, j, k: Integer;
     i, j, k: Integer;
   begin
   begin
     Result := true;
     Result := true;
@@ -440,10 +440,10 @@ const
   cWires: array [0 .. 11, 0 .. 1] of Integer = ((0, 1), (1, 2), (2, 3), (3, 0),
   cWires: array [0 .. 11, 0 .. 1] of Integer = ((0, 1), (1, 2), (2, 3), (3, 0),
     (4, 5), (5, 6), (6, 7), (7, 4), (0, 4), (1, 5), (2, 6), (3, 7));
     (4, 5), (5, 6), (6, 7), (7, 4), (0, 4), (1, 5), (2, 6), (3, 7));
 var
 var
-  pt1: array [0 .. 7] of TVector;
+  pt1: array [0 .. 7] of TGLVector;
   M: TMatrix;
   M: TMatrix;
   i: Integer;
   i: Integer;
-  aad: TVector;
+  aad: TGLVector;
 begin
 begin
   Result := true;
   Result := true;
   aad := obj2.AxisAlignedDimensionsUnscaled; // DanB experiment
   aad := obj2.AxisAlignedDimensionsUnscaled; // DanB experiment
@@ -467,7 +467,7 @@ end;
 
 
 function FastCheckCubeVsCube(obj1, obj2: TGLBaseSceneObject): Boolean;
 function FastCheckCubeVsCube(obj1, obj2: TGLBaseSceneObject): Boolean;
 { var
 { var
-  aad1,aad2 : TVector;
+  aad1,aad2 : TGLVector;
   D1,D2,D : Double;
   D1,D2,D : Double;
 }
 }
 begin
 begin

+ 5 - 5
Source/GLS.Color.pas

@@ -44,8 +44,8 @@ type
     procedure DefineProperties(Filer: TFiler); override;
     procedure DefineProperties(Filer: TFiler); override;
     procedure ReadData(Stream: TStream);
     procedure ReadData(Stream: TStream);
     procedure WriteData(Stream: TStream);
     procedure WriteData(Stream: TStream);
-    function GetHSVA: TVector;
-    procedure SetHSVA(const hsva: TVector);
+    function GetHSVA: TGLVector;
+    procedure SetHSVA(const hsva: TGLVector);
   public
   public
     constructor Create(AOwner: TPersistent); override;
     constructor Create(AOwner: TPersistent); override;
     constructor CreateInitialized(AOwner: TPersistent;
     constructor CreateInitialized(AOwner: TPersistent;
@@ -60,7 +60,7 @@ type
     property Color: TColorVector read FColor write SetColorVector;
     property Color: TColorVector read FColor write SetColorVector;
     property DirectColor: TColorVector read FColor write SetDirectColorVector;
     property DirectColor: TColorVector read FColor write SetDirectColorVector;
     property AsWinColor: TColor read GetAsWinColor write SetAsWinColor;
     property AsWinColor: TColor read GetAsWinColor write SetAsWinColor;
-    property hsva: TVector read GetHSVA write SetHSVA;
+    property hsva: TGLVector read GetHSVA write SetHSVA;
     property DefaultColor: TColorVector read FColor;
     property DefaultColor: TColorVector read FColor;
   published
   published
     property Red: Single index 0 read GetColorComponent write SetColorComponent
     property Red: Single index 0 read GetColorComponent write SetColorComponent
@@ -613,7 +613,7 @@ begin
   NotifyChange(Self);
   NotifyChange(Self);
 end;
 end;
 
 
-function TGLColor.GetHSVA: TVector;
+function TGLColor.GetHSVA: TGLVector;
 var
 var
   delta, min: Single;
   delta, min: Single;
 const
 const
@@ -649,7 +649,7 @@ begin
   Result.W := Alpha;
   Result.W := Alpha;
 end;
 end;
 
 
-procedure TGLColor.SetHSVA(const hsva: TVector);
+procedure TGLColor.SetHSVA(const hsva: TGLVector);
 var
 var
   f, hTemp, p, q, t: Single;
   f, hTemp, p, q, t: Single;
 const
 const

+ 5 - 5
Source/GLS.Context.pas

@@ -810,8 +810,8 @@ type
     procedure SetUniform2f(const index: string; const val: TVector2f);
     procedure SetUniform2f(const index: string; const val: TVector2f);
     function GetUniform3f(const index: string): TAffineVector;
     function GetUniform3f(const index: string): TAffineVector;
     procedure SetUniform3f(const index: string; const val: TAffineVector);
     procedure SetUniform3f(const index: string; const val: TAffineVector);
-    function GetUniform4f(const index: string): TVector;
-    procedure SetUniform4f(const index: string; const val: TVector);
+    function GetUniform4f(const index: string): TGLVector;
+    procedure SetUniform4f(const index: string; const val: TGLVector);
     function GetUniformMatrix2fv(const index: string): TMatrix2f;
     function GetUniformMatrix2fv(const index: string): TMatrix2f;
     procedure SetUniformMatrix2fv(const index: string; const val: TMatrix2f);
     procedure SetUniformMatrix2fv(const index: string; const val: TMatrix2f);
     function GetUniformMatrix3fv(const index: string): TMatrix3f;
     function GetUniformMatrix3fv(const index: string): TMatrix3f;
@@ -865,7 +865,7 @@ type
     property Uniform1f[const index: string]: Single read GetUniform1f write SetUniform1f;
     property Uniform1f[const index: string]: Single read GetUniform1f write SetUniform1f;
     property Uniform2f[const index: string]: TVector2f read GetUniform2f write SetUniform2f;
     property Uniform2f[const index: string]: TVector2f read GetUniform2f write SetUniform2f;
     property Uniform3f[const index: string]: TAffineVector read GetUniform3f write SetUniform3f;
     property Uniform3f[const index: string]: TAffineVector read GetUniform3f write SetUniform3f;
-    property Uniform4f[const index: string]: TVector read GetUniform4f write SetUniform4f;
+    property Uniform4f[const index: string]: TGLVector read GetUniform4f write SetUniform4f;
     property UniformMatrix2fv[const index: string]: TMatrix2f read GetUniformMatrix2fv write SetUniformMatrix2fv;
     property UniformMatrix2fv[const index: string]: TMatrix2f read GetUniformMatrix2fv write SetUniformMatrix2fv;
     property UniformMatrix3fv[const index: string]: TMatrix3f read GetUniformMatrix3fv write SetUniformMatrix3fv;
     property UniformMatrix3fv[const index: string]: TMatrix3f read GetUniformMatrix3fv write SetUniformMatrix3fv;
     property UniformMatrix4fv[const index: string]: TMatrix read GetUniformMatrix4fv write SetUniformMatrix4fv;
     property UniformMatrix4fv[const index: string]: TMatrix read GetUniformMatrix4fv write SetUniformMatrix4fv;
@@ -3226,12 +3226,12 @@ begin
   gl.Uniform3f(GetUniformLocation(index), val.X, val.Y, val.Z);
   gl.Uniform3f(GetUniformLocation(index), val.X, val.Y, val.Z);
 end;
 end;
 
 
-function TGLProgramHandle.GetUniform4f(const index: string): TVector;
+function TGLProgramHandle.GetUniform4f(const index: string): TGLVector;
 begin
 begin
   gl.GetUniformfv(GetHandle, GetUniformLocation(index), @Result);
   gl.GetUniformfv(GetHandle, GetUniformLocation(index), @Result);
 end;
 end;
 
 
-procedure TGLProgramHandle.SetUniform4f(const index: string; const val: TVector);
+procedure TGLProgramHandle.SetUniform4f(const index: string; const val: TGLVector);
 begin
 begin
   gl.Uniform4f(GetUniformLocation(index), val.X, val.Y, val.Z, val.W);
   gl.Uniform4f(GetUniformLocation(index), val.X, val.Y, val.Z, val.W);
 end;
 end;

+ 27 - 27
Source/GLS.Coordinates.pas

@@ -28,17 +28,17 @@ type
   TGLCoordinatesStyle = (csPoint2D, csPoint, csVector, csUnknown);
   TGLCoordinatesStyle = (csPoint2D, csPoint, csVector, csUnknown);
 
 
   (* Stores and homogeneous vector.
   (* Stores and homogeneous vector.
-    This class is basicly a container for a TVector, allowing proper use of
+    This class is basicly a container for a TGLVector, allowing proper use of
     delphi property editors and editing in the IDE. Vector/Coordinates
     delphi property editors and editing in the IDE. Vector/Coordinates
     manipulation methods are only minimal.
     manipulation methods are only minimal.
     Handles dynamic default values to save resource file space.  *)
     Handles dynamic default values to save resource file space.  *)
   TGLCustomCoordinates = class(TGLUpdateAbleObject)
   TGLCustomCoordinates = class(TGLUpdateAbleObject)
   private
   private
-   FCoords: TVector;
+   FCoords: TGLVector;
     FStyle: TGLCoordinatesStyle; // NOT Persistent
     FStyle: TGLCoordinatesStyle; // NOT Persistent
-    FPDefaultCoords: PVector;
+    FPDefaultCoords: PGLVector;
     procedure SetAsPoint2D(const Value: TVector2f);
     procedure SetAsPoint2D(const Value: TVector2f);
-    procedure SetAsVector(const Value: TVector);
+    procedure SetAsVector(const Value: TGLVector);
     procedure SetAsAffineVector(const Value: TAffineVector);
     procedure SetAsAffineVector(const Value: TAffineVector);
     function GetAsAffineVector: TAffineVector; inline;
     function GetAsAffineVector: TAffineVector; inline;
     function GetAsPoint2D: TVector2f;
     function GetAsPoint2D: TVector2f;
@@ -48,18 +48,18 @@ type
     function GetDirectCoordinate(const Index: Integer): Single; inline;
     function GetDirectCoordinate(const Index: Integer): Single; inline;
     procedure SetDirectCoordinate(const Index: Integer; const AValue: Single);
     procedure SetDirectCoordinate(const Index: Integer; const AValue: Single);
   protected
   protected
-    procedure SetDirectVector(const V: TVector); inline;
+    procedure SetDirectVector(const V: TGLVector); inline;
     procedure DefineProperties(Filer: TFiler); override;
     procedure DefineProperties(Filer: TFiler); override;
     procedure ReadData(Stream: TStream);
     procedure ReadData(Stream: TStream);
     procedure WriteData(Stream: TStream);
     procedure WriteData(Stream: TStream);
   public
   public
-    constructor CreateInitialized(AOwner: TPersistent; const AValue: TVector;
+    constructor CreateInitialized(AOwner: TPersistent; const AValue: TGLVector;
       const AStyle: TGLCoordinatesStyle = CsUnknown);
       const AStyle: TGLCoordinatesStyle = CsUnknown);
     destructor Destroy; override;
     destructor Destroy; override;
     procedure Assign(Source: TPersistent); override;
     procedure Assign(Source: TPersistent); override;
     procedure WriteToFiler(Writer: TWriter);
     procedure WriteToFiler(Writer: TWriter);
     procedure ReadFromFiler(Reader: TReader);
     procedure ReadFromFiler(Reader: TReader);
-    procedure Initialize(const Value: TVector);
+    procedure Initialize(const Value: TGLVector);
     procedure NotifyChange(Sender: TObject); override;
     procedure NotifyChange(Sender: TObject); override;
     (* Identifies the coordinates styles.
     (* Identifies the coordinates styles.
       The property is NOT persistent, csUnknown by default, and should be
       The property is NOT persistent, csUnknown by default, and should be
@@ -68,36 +68,36 @@ type
       to detect "misuses" or "misunderstandings" of what the homogeneous
       to detect "misuses" or "misunderstandings" of what the homogeneous
       coordinates system implies. *)
       coordinates system implies. *)
     property Style: TGLCoordinatesStyle read FStyle write FStyle;
     property Style: TGLCoordinatesStyle read FStyle write FStyle;
-    procedure Translate(const TranslationVector: TVector); overload;
+    procedure Translate(const TranslationVector: TGLVector); overload;
     procedure Translate(const TranslationVector: TAffineVector); overload;
     procedure Translate(const TranslationVector: TAffineVector); overload;
-    procedure AddScaledVector(const Factor: Single; const TranslationVector: TVector); overload;
+    procedure AddScaledVector(const Factor: Single; const TranslationVector: TGLVector); overload;
     procedure AddScaledVector(const Factor: Single; const TranslationVector: TAffineVector); overload;
     procedure AddScaledVector(const Factor: Single; const TranslationVector: TAffineVector); overload;
     procedure Rotate(const AnAxis: TAffineVector; AnAngle: Single); overload;
     procedure Rotate(const AnAxis: TAffineVector; AnAngle: Single); overload;
-    procedure Rotate(const AnAxis: TVector; AnAngle: Single); overload;
+    procedure Rotate(const AnAxis: TGLVector; AnAngle: Single); overload;
     procedure Normalize; inline;
     procedure Normalize; inline;
     procedure Invert;
     procedure Invert;
     procedure Scale(Factor: Single);
     procedure Scale(Factor: Single);
     function VectorLength: Single;
     function VectorLength: Single;
     function VectorNorm: Single;
     function VectorNorm: Single;
     function MaxXYZ: Single;
     function MaxXYZ: Single;
-    function Equals(const AVector: TVector): Boolean; reintroduce;
+    function Equals(const AVector: TGLVector): Boolean; reintroduce;
     procedure SetVector(const X, Y: Single; Z: Single = 0); overload;
     procedure SetVector(const X, Y: Single; Z: Single = 0); overload;
     procedure SetVector(const X, Y, Z, W: Single); overload;
     procedure SetVector(const X, Y, Z, W: Single); overload;
     procedure SetVector(const V: TAffineVector); overload;
     procedure SetVector(const V: TAffineVector); overload;
-    procedure SetVector(const V: TVector); overload;
+    procedure SetVector(const V: TGLVector); overload;
     procedure SetPoint(const X, Y, Z: Single); overload;
     procedure SetPoint(const X, Y, Z: Single); overload;
     procedure SetPoint(const V: TAffineVector); overload;
     procedure SetPoint(const V: TAffineVector); overload;
-    procedure SetPoint(const V: TVector); overload;
+    procedure SetPoint(const V: TGLVector); overload;
     procedure SetPoint2D(const X, Y: Single); overload;
     procedure SetPoint2D(const X, Y: Single); overload;
     procedure SetPoint2D(const Vector: TAffineVector); overload;
     procedure SetPoint2D(const Vector: TAffineVector); overload;
-    procedure SetPoint2D(const Vector: TVector); overload;
+    procedure SetPoint2D(const Vector: TGLVector); overload;
     procedure SetPoint2D(const Vector: TVector2f); overload;
     procedure SetPoint2D(const Vector: TVector2f); overload;
     procedure SetToZero;
     procedure SetToZero;
     function AsAddress: PSingle; inline;
     function AsAddress: PSingle; inline;
     (* The coordinates viewed as a vector.
     (* The coordinates viewed as a vector.
       Assigning a value to this property will trigger notification events,
       Assigning a value to this property will trigger notification events,
       if you don't want so, use DirectVector instead. *)
       if you don't want so, use DirectVector instead. *)
-    property AsVector: TVector read FCoords write SetAsVector;
+    property AsVector: TGLVector read FCoords write SetAsVector;
     (* The coordinates viewed as an affine vector.
     (* The coordinates viewed as an affine vector.
       Assigning a value to this property will trigger notification events,
       Assigning a value to this property will trigger notification events,
       if you don't want so, use DirectVector instead.
       if you don't want so, use DirectVector instead.
@@ -115,7 +115,7 @@ type
     // The coordinates, in-between brackets, separated by semi-colons.
     // The coordinates, in-between brackets, separated by semi-colons.
     property AsString: String read GetAsString;
     property AsString: String read GetAsString;
     // Similar to AsVector but does not trigger notification events
     // Similar to AsVector but does not trigger notification events
-    property DirectVector: TVector read FCoords write SetDirectVector;
+    property DirectVector: TGLVector read FCoords write SetDirectVector;
     property DirectX: Single index 0 read GetDirectCoordinate write SetDirectCoordinate;
     property DirectX: Single index 0 read GetDirectCoordinate write SetDirectCoordinate;
     property DirectY: Single index 1 read GetDirectCoordinate write SetDirectCoordinate;
     property DirectY: Single index 1 read GetDirectCoordinate write SetDirectCoordinate;
     property DirectZ: Single index 2 read GetDirectCoordinate write SetDirectCoordinate;
     property DirectZ: Single index 2 read GetDirectCoordinate write SetDirectCoordinate;
@@ -253,7 +253,7 @@ const
   // ------------------
   // ------------------
 
 
 constructor TGLCustomCoordinates.CreateInitialized(AOwner: TPersistent;
 constructor TGLCustomCoordinates.CreateInitialized(AOwner: TPersistent;
-  const AValue: TVector; const AStyle: TGLCoordinatesStyle = CsUnknown);
+  const AValue: TGLVector; const AStyle: TGLCoordinatesStyle = CsUnknown);
 begin
 begin
   Create(AOwner);
   Create(AOwner);
   Initialize(AValue);
   Initialize(AValue);
@@ -267,7 +267,7 @@ begin
   inherited;
   inherited;
 end;
 end;
 
 
-procedure TGLCustomCoordinates.Initialize(const Value: TVector);
+procedure TGLCustomCoordinates.Initialize(const Value: TGLVector);
 begin
 begin
   FCoords := Value;
   FCoords := Value;
   if VUseDefaultCoordinateSets then
   if VUseDefaultCoordinateSets then
@@ -347,7 +347,7 @@ begin
   inherited NotifyChange(Sender);
   inherited NotifyChange(Sender);
 end;
 end;
 
 
-procedure TGLCustomCoordinates.Translate(const TranslationVector: TVector);
+procedure TGLCustomCoordinates.Translate(const TranslationVector: TGLVector);
 begin
 begin
   FCoords.X := FCoords.X + TranslationVector.X;
   FCoords.X := FCoords.X + TranslationVector.X;
   FCoords.Y := FCoords.Y + TranslationVector.Y;
   FCoords.Y := FCoords.Y + TranslationVector.Y;
@@ -365,7 +365,7 @@ begin
 end;
 end;
 
 
 procedure TGLCustomCoordinates.AddScaledVector(const Factor: Single;
 procedure TGLCustomCoordinates.AddScaledVector(const Factor: Single;
-  const TranslationVector: TVector);
+  const TranslationVector: TGLVector);
 var
 var
   F: Single;
   F: Single;
 begin
 begin
@@ -391,7 +391,7 @@ begin
   NotifyChange(Self);
   NotifyChange(Self);
 end;
 end;
 
 
-procedure TGLCustomCoordinates.Rotate(const AnAxis: TVector; AnAngle: Single);
+procedure TGLCustomCoordinates.Rotate(const AnAxis: TGLVector; AnAngle: Single);
 begin
 begin
   RotateVector(FCoords, AnAxis, AnAngle);
   RotateVector(FCoords, AnAxis, AnAngle);
   NotifyChange(Self);
   NotifyChange(Self);
@@ -430,7 +430,7 @@ begin
   Result := MaxXYZComponent(FCoords);
   Result := MaxXYZComponent(FCoords);
 end;
 end;
 
 
-function TGLCustomCoordinates.Equals(const AVector: TVector): Boolean;
+function TGLCustomCoordinates.Equals(const AVector: TGLVector): Boolean;
 begin
 begin
   Result := VectorEquals(FCoords, AVector);
   Result := VectorEquals(FCoords, AVector);
 end;
 end;
@@ -449,7 +449,7 @@ begin
   NotifyChange(Self);
   NotifyChange(Self);
 end;
 end;
 
 
-procedure TGLCustomCoordinates.SetVector(const V: TVector);
+procedure TGLCustomCoordinates.SetVector(const V: TGLVector);
 begin
 begin
   Assert(FStyle = csVector, csVectorHelp);
   Assert(FStyle = csVector, csVectorHelp);
   GLS.VectorGeometry.SetVector(FCoords, V);
   GLS.VectorGeometry.SetVector(FCoords, V);
@@ -469,7 +469,7 @@ begin
   FCoords.V[index] := AValue;
   FCoords.V[index] := AValue;
 end;
 end;
 
 
-procedure TGLCustomCoordinates.SetDirectVector(const V: TVector);
+procedure TGLCustomCoordinates.SetDirectVector(const V: TGLVector);
 begin
 begin
   FCoords.X := V.X;
   FCoords.X := V.X;
   FCoords.Y := V.Y;
   FCoords.Y := V.Y;
@@ -503,7 +503,7 @@ begin
   NotifyChange(Self);
   NotifyChange(Self);
 end;
 end;
 
 
-procedure TGLCustomCoordinates.SetPoint(const V: TVector);
+procedure TGLCustomCoordinates.SetPoint(const V: TGLVector);
 begin
 begin
   Assert(FStyle = CsPoint, CsPointHelp);
   Assert(FStyle = CsPoint, CsPointHelp);
   MakePoint(FCoords, V);
   MakePoint(FCoords, V);
@@ -524,7 +524,7 @@ begin
   NotifyChange(Self);
   NotifyChange(Self);
 end;
 end;
 
 
-procedure TGLCustomCoordinates.SetPoint2D(const Vector: TVector);
+procedure TGLCustomCoordinates.SetPoint2D(const Vector: TGLVector);
 begin
 begin
   Assert(FStyle = CsPoint2D, CsPoint2DHelp);
   Assert(FStyle = CsPoint2D, CsPoint2DHelp);
   MakeVector(FCoords, Vector);
   MakeVector(FCoords, Vector);
@@ -543,7 +543,7 @@ begin
   Result := @FCoords;
   Result := @FCoords;
 end;
 end;
 
 
-procedure TGLCustomCoordinates.SetAsVector(const Value: TVector);
+procedure TGLCustomCoordinates.SetAsVector(const Value: TGLVector);
 begin
 begin
   FCoords := Value;
   FCoords := Value;
   case FStyle of
   case FStyle of

+ 2 - 2
Source/GLS.DCE.pas

@@ -318,7 +318,7 @@ procedure ECAddFreeForm(var MovePack: TECMovePack; FreeForm: TGLBaseSceneObject;
   Solid: Boolean; ObjectID: Integer);
   Solid: Boolean; ObjectID: Integer);
 var
 var
   i, count: Integer;
   i, count: Integer;
-  Pos: TVector;
+  Pos: TGLVector;
   Master: TGLBaseSceneObject;
   Master: TGLBaseSceneObject;
   d1, d2: single;
   d1, d2: single;
 begin
 begin
@@ -502,7 +502,7 @@ end;
 function RotateVectorByObject(obj: TGLBaseSceneObject; const v: TAffineVector)
 function RotateVectorByObject(obj: TGLBaseSceneObject; const v: TAffineVector)
   : TAffineVector;
   : TAffineVector;
 var
 var
-  v2: TVector;
+  v2: TGLVector;
 begin
 begin
   SetVector(v2, v);
   SetVector(v2, v);
   SetVector(result, VectorTransform(v2, obj.Matrix^));
   SetVector(result, VectorTransform(v2, obj.Matrix^));

+ 1 - 1
Source/GLS.ExplosionFx.pas

@@ -167,7 +167,7 @@ procedure TGLBExplosionFx.CacheInfo;
 var
 var
   Face: integer;
   Face: integer;
   p1, p2, p3, v1, v2, posi: TAffineVector;
   p1, p2, p3, v1, v2, posi: TAffineVector;
-  Normal: TVector;
+  Normal: TGLVector;
 begin
 begin
   // make sure we can explode this object
   // make sure we can explode this object
   if not OwnerBaseSceneObject.InheritsFrom(TGLBaseMesh) then begin
   if not OwnerBaseSceneObject.InheritsFrom(TGLBaseMesh) then begin

+ 7 - 7
Source/GLS.Extrusion.pas

@@ -59,7 +59,7 @@ type
     FTriangleCount: Integer;
     FTriangleCount: Integer;
     FNormalDirection: TGLNormalDirection;
     FNormalDirection: TGLNormalDirection;
     FParts: TGLRevolutionSolidParts;
     FParts: TGLRevolutionSolidParts;
-    FAxisAlignedDimensionsCache: TVector;
+    FAxisAlignedDimensionsCache: TGLVector;
   protected
   protected
     procedure SetStartAngle(const val: Single);
     procedure SetStartAngle(const val: Single);
     procedure SetStopAngle(const val: Single);
     procedure SetStopAngle(const val: Single);
@@ -76,7 +76,7 @@ type
     procedure BuildList(var rci: TGLRenderContextInfo); override;
     procedure BuildList(var rci: TGLRenderContextInfo); override;
     {Number of triangles used for rendering. }
     {Number of triangles used for rendering. }
     property TriangleCount: Integer read FTriangleCount;
     property TriangleCount: Integer read FTriangleCount;
-    function AxisAlignedDimensionsUnscaled: TVector; override;
+    function AxisAlignedDimensionsUnscaled: TGLVector; override;
     procedure StructureChanged; override;
     procedure StructureChanged; override;
   published
   published
     (* Parts of the rotation solid to be generated for rendering.
     (* Parts of the rotation solid to be generated for rendering.
@@ -122,7 +122,7 @@ type
     FHeight: TGLFloat;
     FHeight: TGLFloat;
     FMinSmoothAngle: Single;
     FMinSmoothAngle: Single;
     FMinSmoothAngleCos: Single;
     FMinSmoothAngleCos: Single;
-    FAxisAlignedDimensionsCache: TVector;
+    FAxisAlignedDimensionsCache: TGLVector;
     procedure SetHeight(const Value: TGLFloat);
     procedure SetHeight(const Value: TGLFloat);
     procedure SetMinSmoothAngle(const Value: Single);
     procedure SetMinSmoothAngle(const Value: Single);
   protected
   protected
@@ -137,7 +137,7 @@ type
     procedure BuildList(var rci: TGLRenderContextInfo); override;
     procedure BuildList(var rci: TGLRenderContextInfo); override;
     // Number of triangles used for rendering.
     // Number of triangles used for rendering.
     property TriangleCount: Integer read FTriangleCount;
     property TriangleCount: Integer read FTriangleCount;
-    function AxisAlignedDimensionsUnscaled: TVector; override;
+    function AxisAlignedDimensionsUnscaled: TGLVector; override;
     procedure StructureChanged; override;
     procedure StructureChanged; override;
   published
   published
     property Parts: TGLExtrusionSolidParts read FParts write SetParts default [espOutside];
     property Parts: TGLExtrusionSolidParts read FParts write SetParts default [espOutside];
@@ -652,7 +652,7 @@ begin
   end;
   end;
 end;
 end;
 
 
-function TGLRevolutionSolid.AxisAlignedDimensionsUnscaled: TVector;
+function TGLRevolutionSolid.AxisAlignedDimensionsUnscaled: TGLVector;
 var
 var
   maxRadius: Single;
   maxRadius: Single;
   maxHeight: Single;
   maxHeight: Single;
@@ -982,7 +982,7 @@ const
   end;
   end;
 
 
   procedure RenderDisk(row: PRowData;
   procedure RenderDisk(row: PRowData;
-    const center: TVector; const normal: TAffineVector;
+    const center: TGLVector; const normal: TAffineVector;
     invert: Boolean; TextCoordTileS: Single);
     invert: Boolean; TextCoordTileS: Single);
   var
   var
     i: Integer;
     i: Integer;
@@ -1734,7 +1734,7 @@ begin
 end;
 end;
 
 
 
 
-function TGLExtrusionSolid.AxisAlignedDimensionsUnscaled: TVector;
+function TGLExtrusionSolid.AxisAlignedDimensionsUnscaled: TGLVector;
 var
 var
   dMin, dMax: TAffineVector;
   dMin, dMax: TAffineVector;
 begin
 begin

+ 1 - 1
Source/GLS.FBORenderer.pas

@@ -196,7 +196,7 @@ type
     FPostGenerateMipmap: Boolean;
     FPostGenerateMipmap: Boolean;
     FMaxSize: Integer;
     FMaxSize: Integer;
     FMaxAttachment: Integer;
     FMaxAttachment: Integer;
-    FStoreCamera: array[0..2] of TVector;
+    FStoreCamera: array[0..2] of TGLVector;
     FOnSetTextureTargets: TSetTextureTargetsEvent;
     FOnSetTextureTargets: TSetTextureTargetsEvent;
     // implementing IGLMaterialLibrarySupported
     // implementing IGLMaterialLibrarySupported
     function GetMaterialLibrary: TGLAbstractMaterialLibrary;
     function GetMaterialLibrary: TGLAbstractMaterialLibrary;

+ 16 - 16
Source/GLS.FPSMovement.pas

@@ -36,12 +36,12 @@ uses
 
 
 type
 type
   TGLContactPoint = record
   TGLContactPoint = record
-    intPoint, intNormal: TVector;
+    intPoint, intNormal: TGLVector;
   end;
   end;
 
 
   TGLCollisionState = class
   TGLCollisionState = class
   public
   public
-    Position: TVector;
+    Position: TGLVector;
     Contact: TGLContactPoint;
     Contact: TGLContactPoint;
     Time: Int64;
     Time: Int64;
   end;
   end;
@@ -92,7 +92,7 @@ type
     FScene: TGLScene;
     FScene: TGLScene;
     procedure SetNavigator(value: TGLNavigator);
     procedure SetNavigator(value: TGLNavigator);
     procedure setScene(value: TGLScene);
     procedure setScene(value: TGLScene);
-    procedure DrawArrows(intPoint, intNormal, Ray: TVector;
+    procedure DrawArrows(intPoint, intNormal, Ray: TGLVector;
       Arrow1, Arrow2: TGLArrowLine);
       Arrow1, Arrow2: TGLArrowLine);
   protected
   protected
     procedure Loaded; override;
     procedure Loaded; override;
@@ -109,10 +109,10 @@ type
       (e.g. floor + multiple walls + ceiling) limit iterations to 4 or 5 for now,
       (e.g. floor + multiple walls + ceiling) limit iterations to 4 or 5 for now,
       may need to be higher for more complex maps or fast motion *)
       may need to be higher for more complex maps or fast motion *)
     function SphereSweepAndSlide(freeform: TGLFreeForm;
     function SphereSweepAndSlide(freeform: TGLFreeForm;
-      behaviour: TGLBFPSMovement; SphereStart: TVector;
-      var Velocity, newPosition: TVector; sphereRadius: single): boolean; overload;
+      behaviour: TGLBFPSMovement; SphereStart: TGLVector;
+      var Velocity, newPosition: TGLVector; sphereRadius: single): boolean; overload;
     procedure SphereSweepAndSlide(behaviour: TGLBFPSMovement;
     procedure SphereSweepAndSlide(behaviour: TGLBFPSMovement;
-      SphereStart: TVector; var Velocity, newPosition: TVector;
+      SphereStart: TGLVector; var Velocity, newPosition: TGLVector;
       sphereRadius: single); overload;
       sphereRadius: single); overload;
   published
   published
     property Maps: TGLMapCollection read FMaps write FMaps;
     property Maps: TGLMapCollection read FMaps write FMaps;
@@ -131,7 +131,7 @@ type
       ArrowLine6: TGLArrowLine;
       ArrowLine6: TGLArrowLine;
     dirGl: TGLDirectOpenGL;
     dirGl: TGLDirectOpenGL;
     tickCount: Int64;
     tickCount: Int64;
-    oldPosition: TVector;
+    oldPosition: TGLVector;
     FGravityEnabled: boolean;
     FGravityEnabled: boolean;
     FSphereRadius: single;
     FSphereRadius: single;
     FShowArrows: boolean;
     FShowArrows: boolean;
@@ -144,7 +144,7 @@ type
     procedure ReadFromFiler(reader: TReader); override;
     procedure ReadFromFiler(reader: TReader); override;
     procedure Loaded; override;
     procedure Loaded; override;
   public
   public
-    Velocity: TVector;
+    Velocity: TGLVector;
     constructor Create(aOwner: TXCollection); override;
     constructor Create(aOwner: TXCollection); override;
     destructor Destroy; override;
     destructor Destroy; override;
     procedure DoProgress(const progressTime: TGLProgressTimes); override;
     procedure DoProgress(const progressTime: TGLProgressTimes); override;
@@ -419,7 +419,7 @@ begin
   end;
   end;
 end;
 end;
 
 
-procedure TGLFPSMovementManager.DrawArrows(intPoint, intNormal, Ray: TVector;
+procedure TGLFPSMovementManager.DrawArrows(intPoint, intNormal, Ray: TGLVector;
   Arrow1, Arrow2: TGLArrowLine);
   Arrow1, Arrow2: TGLArrowLine);
 begin
 begin
   Arrow1.Position.AsVector := intPoint;
   Arrow1.Position.AsVector := intPoint;
@@ -434,7 +434,7 @@ begin
 end;
 end;
 
 
 procedure TGLFPSMovementManager.SphereSweepAndSlide(behaviour: TGLBFPSMovement;
 procedure TGLFPSMovementManager.SphereSweepAndSlide(behaviour: TGLBFPSMovement;
-  SphereStart: TVector; var Velocity, newPosition: TVector;
+  SphereStart: TGLVector; var Velocity, newPosition: TGLVector;
   sphereRadius: single);
   sphereRadius: single);
 var
 var
   i: integer;
   i: integer;
@@ -450,14 +450,14 @@ begin
 end;
 end;
 
 
 function TGLFPSMovementManager.SphereSweepAndSlide(freeform: TGLFreeForm;
 function TGLFPSMovementManager.SphereSweepAndSlide(freeform: TGLFreeForm;
-  behaviour: TGLBFPSMovement; SphereStart: TVector;
-  var Velocity, newPosition: TVector; sphereRadius: single): boolean;
+  behaviour: TGLBFPSMovement; SphereStart: TGLVector;
+  var Velocity, newPosition: TGLVector; sphereRadius: single): boolean;
 var
 var
-  oldPosition, Ray: TVector;
+  oldPosition, Ray: TGLVector;
   vel, slidedistance: single;
   vel, slidedistance: single;
-  intPoint, intNormal: TVector;
+  intPoint, intNormal: TGLVector;
   newDirection, newRay, collisionPosition, pointOnSphere,
   newDirection, newRay, collisionPosition, pointOnSphere,
-    point2OnSphere: TVector;
+    point2OnSphere: TGLVector;
   i: integer;
   i: integer;
   CollisionState: TGLCollisionState;
   CollisionState: TGLCollisionState;
   SphereRadiusRel: single; // mrqzzz
   SphereRadiusRel: single; // mrqzzz
@@ -796,7 +796,7 @@ end;
 
 
 procedure TGLBFPSMovement.DoProgress(const progressTime: TGLProgressTimes);
 procedure TGLBFPSMovement.DoProgress(const progressTime: TGLProgressTimes);
 var
 var
-  newPosition: TVector;
+  newPosition: TGLVector;
   CollisionState: TGLCollisionState;
   CollisionState: TGLCollisionState;
 begin
 begin
   inherited DoProgress(progressTime);
   inherited DoProgress(progressTime);

+ 1 - 1
Source/GLS.Feedback.pas

@@ -193,7 +193,7 @@ procedure TGLFeedback.BuildMeshFromBuffer(
 var
 var
   value: Single;
   value: Single;
   i, j, LCount, skip: Integer;
   i, j, LCount, skip: Integer;
-  vertex, color, texcoord: TVector;
+  vertex, color, texcoord: TGLVector;
   tempVertices, tempNormals, tempTexCoords: TAffineVectorList;
   tempVertices, tempNormals, tempTexCoords: TAffineVectorList;
   tempColors: TVectorList;
   tempColors: TVectorList;
   tempIndices: TIntegerList;
   tempIndices: TIntegerList;

+ 5 - 5
Source/GLS.File3DS.pas

@@ -40,7 +40,7 @@ type
   // A record that holds all the information that is used during 3ds animation.
   // A record that holds all the information that is used during 3ds animation.
   TGLFile3DSAnimationData = packed record
   TGLFile3DSAnimationData = packed record
     ModelMatrix: TMatrix;
     ModelMatrix: TMatrix;
-    Color: TVector; // Omni Light.
+    Color: TGLVector; // Omni Light.
     TargetPos: TAffineVector; // Spot Light.
     TargetPos: TAffineVector; // Spot Light.
     SpotLightCutOff: Single;
     SpotLightCutOff: Single;
     HotSpot: Single;
     HotSpot: Single;
@@ -335,7 +335,7 @@ end;
 
 
 function MakeRotationQuaternion(const axis: TAffineVector; angle: Single): TQuaternion;
 function MakeRotationQuaternion(const axis: TAffineVector; angle: Single): TQuaternion;
 var
 var
-  v: TVector;
+  v: TGLVector;
   halfAngle, invAxisLengthMult: Single;
   halfAngle, invAxisLengthMult: Single;
 begin
 begin
   halfAngle := (angle) / 2;
   halfAngle := (angle) / 2;
@@ -353,7 +353,7 @@ end;
 function QuaternionToRotateMatrix(const Quaternion: TQuaternion): TMatrix;
 function QuaternionToRotateMatrix(const Quaternion: TQuaternion): TMatrix;
 var
 var
   wx, wy, wz, xx, yy, yz, xy, xz, zz, x2, y2, z2: Single;
   wx, wy, wz, xx, yy, yz, xy, xz, zz, x2, y2, z2: Single;
-  quat: TVector;
+  quat: TGLVector;
   m: TMatrix;
   m: TMatrix;
 begin
 begin
   quat := VectorMake(Quaternion.ImagPart);
   quat := VectorMake(Quaternion.ImagPart);
@@ -1506,7 +1506,7 @@ var
   function GetOrAllocateMaterial(materials: TMaterialList; const Name: string): string;
   function GetOrAllocateMaterial(materials: TMaterialList; const Name: string): string;
   var
   var
     material: PMaterial3DS;
     material: PMaterial3DS;
-    specColor: TVector;
+    specColor: TGLVector;
     matLib: TGLMaterialLibrary;
     matLib: TGLMaterialLibrary;
     libMat, SecondMaterial: TGLLibMaterial;
     libMat, SecondMaterial: TGLLibMaterial;
   begin
   begin
@@ -1709,7 +1709,7 @@ var
     I, Index: Integer;
     I, Index: Integer;
     boolY: Boolean;
     boolY: Boolean;
     m: TMatrix;
     m: TMatrix;
-    v4: TVector;
+    v4: TGLVector;
     factor: Single;
     factor: Single;
   begin
   begin
     with Objects do
     with Objects do

+ 8 - 8
Source/GLS.File3DSSceneObjects.pas

@@ -85,8 +85,8 @@ type
     destructor Destroy; override;
     destructor Destroy; override;
     procedure BuildList(var rci: TGLRenderContextInfo); override;
     procedure BuildList(var rci: TGLRenderContextInfo); override;
     procedure CoordinateChanged(Sender: TGLCustomCoordinates); override;
     procedure CoordinateChanged(Sender: TGLCustomCoordinates); override;
-    function AxisAlignedDimensionsUnscaled: TVector; override;
-    function BarycenterAbsolutePosition: TVector; override;
+    function AxisAlignedDimensionsUnscaled: TGLVector; override;
+    function BarycenterAbsolutePosition: TGLVector; override;
   published
   published
     property S_Rot3DS: TGLCoordinates4 read FS_Rot3DS;
     property S_Rot3DS: TGLCoordinates4 read FS_Rot3DS;
     property Rot3DS: TGLCoordinates4 read FRot3DS;
     property Rot3DS: TGLCoordinates4 read FRot3DS;
@@ -102,7 +102,7 @@ implementation
 
 
 function MakeRotationQuaternion(const axis: TAffineVector; angle: Single): TQuaternion;
 function MakeRotationQuaternion(const axis: TAffineVector; angle: Single): TQuaternion;
 var
 var
-  v: Tvector;
+  v: TGLVector;
   halfAngle, invAxisLengthMult: Single;
   halfAngle, invAxisLengthMult: Single;
 begin
 begin
   halfAngle := (angle) / 2;
   halfAngle := (angle) / 2;
@@ -120,7 +120,7 @@ end;
 function QuaternionToRotateMatrix(const Quaternion: TQuaternion): TMatrix;
 function QuaternionToRotateMatrix(const Quaternion: TQuaternion): TMatrix;
 var
 var
   wx, wy, wz, xx, yy, yz, xy, xz, zz, x2, y2, z2: Single;
   wx, wy, wz, xx, yy, yz, xy, xz, zz, x2, y2, z2: Single;
-  quat: TVector;
+  quat: TGLVector;
   m: TMatrix;
   m: TMatrix;
 begin
 begin
   quat := VectorMake(Quaternion.ImagPart);
   quat := VectorMake(Quaternion.ImagPart);
@@ -375,7 +375,7 @@ end;
 
 
 procedure TGLFile3DSFreeForm.ReadMesh(Stream: TStream);
 procedure TGLFile3DSFreeForm.ReadMesh(Stream: TStream);
 var
 var
-  v: TVector;
+  v: TGLVector;
   virt: TGLBinaryReader;
   virt: TGLBinaryReader;
 begin
 begin
   virt := TGLBinaryReader.Create(Stream);
   virt := TGLBinaryReader.Create(Stream);
@@ -395,7 +395,7 @@ end;
 procedure TGLFile3DSFreeForm.WriteMesh(Stream: TStream);
 procedure TGLFile3DSFreeForm.WriteMesh(Stream: TStream);
 var
 var
   virt: TGLBinaryWriter;
   virt: TGLBinaryWriter;
-  v: TVector;
+  v: TGLVector;
 begin
 begin
   virt := TGLBinaryWriter.Create(Stream);
   virt := TGLBinaryWriter.Create(Stream);
 
 
@@ -457,7 +457,7 @@ begin
   end;
   end;
 end;
 end;
 
 
-function TGLFile3DSFreeForm.AxisAlignedDimensionsUnscaled: TVector;
+function TGLFile3DSFreeForm.AxisAlignedDimensionsUnscaled: TGLVector;
 var
 var
   dMin, dMax: TAffineVector;
   dMin, dMax: TAffineVector;
   mat: TMatrix;
   mat: TMatrix;
@@ -476,7 +476,7 @@ begin
   Result.W := 0;
   Result.W := 0;
 end;
 end;
 
 
-function TGLFile3DSFreeForm.BarycenterAbsolutePosition: TVector;
+function TGLFile3DSFreeForm.BarycenterAbsolutePosition: TGLVector;
 var
 var
   dMin, dMax: TAffineVector;
   dMin, dMax: TAffineVector;
   mat: TMatrix;
   mat: TMatrix;

+ 3 - 3
Source/GLS.FileASE.pas

@@ -96,7 +96,7 @@ type
     FInheritedRotation: TAffineVector;
     FInheritedRotation: TAffineVector;
     FRotationAngle: Single;
     FRotationAngle: Single;
     FRotationAxis: TAffineVector;
     FRotationAxis: TAffineVector;
-    FPosition: TVector;
+    FPosition: TGLVector;
     FScale: TAffineVector;
     FScale: TAffineVector;
     FScaleAxisAngle: Single;
     FScaleAxisAngle: Single;
     FScaleAxis: TAffineVector;
     FScaleAxis: TAffineVector;
@@ -117,7 +117,7 @@ type
     property InheritedPosition: TAffineVector read FInheritedPosition;
     property InheritedPosition: TAffineVector read FInheritedPosition;
     property InheritedRotation: TAffineVector read FInheritedRotation;
     property InheritedRotation: TAffineVector read FInheritedRotation;
     property InheritedScale: TAffineVector read FInheritedScale;
     property InheritedScale: TAffineVector read FInheritedScale;
-    property Position: TVector read FPosition;
+    property Position: TGLVector read FPosition;
     property RotationAxis: TAffineVector read FRotationAxis;
     property RotationAxis: TAffineVector read FRotationAxis;
     property RotationAngle: Single read FRotationAngle;
     property RotationAngle: Single read FRotationAngle;
     property Scale: TAffineVector read FScale;
     property Scale: TAffineVector read FScale;
@@ -676,7 +676,7 @@ procedure CopyASEToMesh(aASEMesh: TGLASEMeshObject; aMesh: TMeshObject; aASEMate
   function GetOrAllocateMaterial(const aIndex, aSubID: Integer): string;
   function GetOrAllocateMaterial(const aIndex, aSubID: Integer): string;
   var
   var
     material : TGLASEMaterial;
     material : TGLASEMaterial;
-    specColor : TVector;
+    specColor : TGLVector;
     matLib : TGLMaterialLibrary;
     matLib : TGLMaterialLibrary;
     libMat : TGLLibMaterial;
     libMat : TGLLibMaterial;
     TM: TGLASEMaterialTextureMap;
     TM: TGLASEMaterialTextureMap;

+ 1 - 1
Source/GLS.FileLMTS.pas

@@ -85,7 +85,7 @@ type
   TMaterialInfo = record
   TMaterialInfo = record
     FShininess, BShininess: TGLShininess;
     FShininess, BShininess: TGLShininess;
     FAmbient, FDiffuse, FEmission, FSpecular, BAmbient, BDiffuse, BEmission,
     FAmbient, FDiffuse, FEmission, FSpecular, BAmbient, BDiffuse, BEmission,
-      BSpecular: TVector;
+      BSpecular: TGLVector;
     ImageAlpha: TGLTextureImageAlpha;
     ImageAlpha: TGLTextureImageAlpha;
     magFilter: TGLMagFilter;
     magFilter: TGLMagFilter;
     minFilter: TGLMinFilter;
     minFilter: TGLMinFilter;

+ 2 - 2
Source/GLS.FileOBJ.pas

@@ -88,7 +88,7 @@ type
     procedure Prepare;
     procedure Prepare;
     function MaterialStringProperty(const materialName, propertyName: string): string;
     function MaterialStringProperty(const materialName, propertyName: string): string;
     function MaterialVectorProperty(const materialName, propertyName: string;
     function MaterialVectorProperty(const materialName, propertyName: string;
-      const defaultValue: TVector): TVector;
+      const defaultValue: TGLVector): TGLVector;
   end;
   end;
 
 
 var
 var
@@ -1350,7 +1350,7 @@ begin
 end;
 end;
 
 
 function TGLMTLFile.MaterialVectorProperty(const materialName, propertyName: string;
 function TGLMTLFile.MaterialVectorProperty(const materialName, propertyName: string;
-  const defaultValue: TVector): TVector;
+  const defaultValue: TGLVector): TGLVector;
 var
 var
   i: Integer;
   i: Integer;
   sl: TStringList;
   sl: TStringList;

+ 7 - 7
Source/GLS.FireFX.pas

@@ -36,8 +36,8 @@ uses
 type
 type
   PFireParticle = ^TFireParticle;
   PFireParticle = ^TFireParticle;
   TFireParticle = record
   TFireParticle = record
-    Position: TVector;
-    Speed: TVector;
+    Position: TGLVector;
+    Speed: TGLVector;
     Alpha: Single;
     Alpha: Single;
     TimeToLive, LifeLength: Single;
     TimeToLive, LifeLength: Single;
   end;
   end;
@@ -394,7 +394,7 @@ procedure TGLFireFXManager.IsotropicExplosion(minInitialSpeed, maxInitialSpeed,
   nbParticles: Integer = -1);
   nbParticles: Integer = -1);
 var
 var
   n: Integer;
   n: Integer;
-  tmp, refPos: TVector;
+  tmp, refPos: TGLVector;
 begin
 begin
   if nbParticles < 0 then
   if nbParticles < 0 then
     n := MaxInt
     n := MaxInt
@@ -429,7 +429,7 @@ procedure TGLFireFXManager.RingExplosion(minInitialSpeed, maxInitialSpeed, lifeB
   nbParticles: Integer = -1);
   nbParticles: Integer = -1);
 var
 var
   n: Integer;
   n: Integer;
-  tmp, refPos: TVector;
+  tmp, refPos: TGLVector;
   fx, fy, d: Single;
   fx, fy, d: Single;
 begin
 begin
   if nbParticles < 0 then
   if nbParticles < 0 then
@@ -467,7 +467,7 @@ procedure TGLFireFXManager.CalcFire(deltaTime: Double;
 var
 var
   N, I: Integer;
   N, I: Integer;
   Fdelta: Single;
   Fdelta: Single;
-  tmp, refPos: TVector;
+  tmp, refPos: TGLVector;
 begin
 begin
   // Process live stuff
   // Process live stuff
   N := 0;
   N := 0;
@@ -528,7 +528,7 @@ end;
 
 
 procedure TGLFireFXManager.AffParticle3d(Color2: TColorVector; const mat: TMatrix);
 procedure TGLFireFXManager.AffParticle3d(Color2: TColorVector; const mat: TMatrix);
 var
 var
-  vx, vy: TVector;
+  vx, vy: TGLVector;
   i: Integer;
   i: Integer;
 begin
 begin
   for i := 0 to 2 do
   for i := 0 to 2 do
@@ -653,7 +653,7 @@ procedure TGLBFireFX.Render(var rci: TGLRenderContextInfo);
 var
 var
   n: Integer;
   n: Integer;
   i: Integer;
   i: Integer;
-  innerColor: TVector;
+  innerColor: TGLVector;
   lastTr: TAffineVector;
   lastTr: TAffineVector;
   distList: TSingleList;
   distList: TSingleList;
   objList: TList;
   objList: TList;

+ 52 - 52
Source/GLS.GeomObjects.pas

@@ -98,9 +98,9 @@ type
     constructor Create(AOwner: TComponent); override;
     constructor Create(AOwner: TComponent); override;
     procedure BuildList(var rci: TGLRenderContextInfo); override;
     procedure BuildList(var rci: TGLRenderContextInfo); override;
     procedure Assign(Source: TPersistent); override;
     procedure Assign(Source: TPersistent); override;
-    function AxisAlignedDimensionsUnscaled: TVector; override;
-    function RayCastIntersect(const rayStart, rayVector: TVector;
-      intersectPoint: PVector = nil; intersectNormal: PVector = nil) : Boolean; override;
+    function AxisAlignedDimensionsUnscaled: TGLVector; override;
+    function RayCastIntersect(const rayStart, rayVector: TGLVector;
+      intersectPoint: PGLVector = nil; intersectNormal: PGLVector = nil) : Boolean; override;
   published
   published
     //  Allows defining a "hole" in the disk 
     //  Allows defining a "hole" in the disk 
     property InnerRadius: Single read FInnerRadius write SetInnerRadius;
     property InnerRadius: Single read FInnerRadius write SetInnerRadius;
@@ -158,9 +158,9 @@ type
     constructor Create(AOwner: TComponent); override;
     constructor Create(AOwner: TComponent); override;
     procedure Assign(Source: TPersistent); override;
     procedure Assign(Source: TPersistent); override;
     procedure BuildList(var rci: TGLRenderContextInfo); override;
     procedure BuildList(var rci: TGLRenderContextInfo); override;
-    function AxisAlignedDimensionsUnscaled: TVector; override;
-    function RayCastIntersect(const rayStart, rayVector: TVector;
-      intersectPoint: PVector = nil; intersectNormal: PVector = nil)
+    function AxisAlignedDimensionsUnscaled: TGLVector; override;
+    function RayCastIntersect(const rayStart, rayVector: TGLVector;
+      intersectPoint: PGLVector = nil; intersectNormal: PGLVector = nil)
       : Boolean; override;
       : Boolean; override;
   published
   published
     property Parts: TGLConeParts read FParts write SetParts
     property Parts: TGLConeParts read FParts write SetParts
@@ -186,11 +186,11 @@ type
     constructor Create(AOwner: TComponent); override;
     constructor Create(AOwner: TComponent); override;
     procedure Assign(Source: TPersistent); override;
     procedure Assign(Source: TPersistent); override;
     procedure BuildList(var rci: TGLRenderContextInfo); override;
     procedure BuildList(var rci: TGLRenderContextInfo); override;
-    function AxisAlignedDimensionsUnscaled: TVector; override;
-    function RayCastIntersect(const rayStart, rayVector: TVector;
-      intersectPoint: PVector = nil; intersectNormal: PVector = nil)
+    function AxisAlignedDimensionsUnscaled: TGLVector; override;
+    function RayCastIntersect(const rayStart, rayVector: TGLVector;
+      intersectPoint: PGLVector = nil; intersectNormal: PGLVector = nil)
       : Boolean; override;
       : Boolean; override;
-    procedure Align(const startPoint, endPoint: TVector); overload;
+    procedure Align(const startPoint, endPoint: TGLVector); overload;
     procedure Align(const startObj, endObj: TGLBaseSceneObject); overload;
     procedure Align(const startObj, endObj: TGLBaseSceneObject); overload;
     procedure Align(const startPoint, endPoint: TAffineVector); overload;
     procedure Align(const startPoint, endPoint: TAffineVector); overload;
   published
   published
@@ -221,11 +221,11 @@ type
     constructor Create(AOwner: TComponent); override;
     constructor Create(AOwner: TComponent); override;
     procedure Assign(Source: TPersistent); override;
     procedure Assign(Source: TPersistent); override;
     procedure BuildList(var rci: TGLRenderContextInfo); override;
     procedure BuildList(var rci: TGLRenderContextInfo); override;
-    function AxisAlignedDimensionsUnscaled: TVector; override;
-    function RayCastIntersect(const rayStart, rayVector: TVector;
-      intersectPoint: PVector = nil; intersectNormal: PVector = nil)
+    function AxisAlignedDimensionsUnscaled: TGLVector; override;
+    function RayCastIntersect(const rayStart, rayVector: TGLVector;
+      intersectPoint: PGLVector = nil; intersectNormal: PGLVector = nil)
       : Boolean; override;
       : Boolean; override;
-    procedure Align(const startPoint, endPoint: TVector); overload;
+    procedure Align(const startPoint, endPoint: TGLVector); overload;
     procedure Align(const startObj, endObj: TGLBaseSceneObject); overload;
     procedure Align(const startObj, endObj: TGLBaseSceneObject); overload;
     procedure Align(const startPoint, endPoint: TAffineVector); overload;
     procedure Align(const startPoint, endPoint: TAffineVector); overload;
   published
   published
@@ -258,9 +258,9 @@ type
     constructor Create(AOwner: TComponent); override;
     constructor Create(AOwner: TComponent); override;
     procedure Assign(Source: TPersistent); override;
     procedure Assign(Source: TPersistent); override;
     procedure BuildList(var rci: TGLRenderContextInfo); override;
     procedure BuildList(var rci: TGLRenderContextInfo); override;
-    function AxisAlignedDimensionsUnscaled: TVector; override;
-    function RayCastIntersect(const rayStart, rayVector: TVector;
-      intersectPoint: PVector = nil; intersectNormal: PVector = nil)
+    function AxisAlignedDimensionsUnscaled: TGLVector; override;
+    function RayCastIntersect(const rayStart, rayVector: TGLVector;
+      intersectPoint: PGLVector = nil; intersectNormal: PGLVector = nil)
       : Boolean; override;
       : Boolean; override;
   published
   published
     property BottomInnerRadius: Single read FBottomInnerRadius
     property BottomInnerRadius: Single read FBottomInnerRadius
@@ -294,9 +294,9 @@ type
   public
   public
     constructor Create(AOwner: TComponent); override;
     constructor Create(AOwner: TComponent); override;
     procedure BuildList(var rci: TGLRenderContextInfo); override;
     procedure BuildList(var rci: TGLRenderContextInfo); override;
-    function AxisAlignedDimensionsUnscaled: TVector; override;
-    function RayCastIntersect(const rayStart, rayVector: TVector;
-      intersectPoint: PVector = nil; intersectNormal: PVector = nil): Boolean; override;
+    function AxisAlignedDimensionsUnscaled: TGLVector; override;
+    function RayCastIntersect(const rayStart, rayVector: TGLVector;
+      intersectPoint: PGLVector = nil; intersectNormal: PGLVector = nil): Boolean; override;
   published
   published
     property MajorRadius: Single read FMajorRadius write SetMajorRadius;
     property MajorRadius: Single read FMajorRadius write SetMajorRadius;
     property MinorRadius: Single read FMinorRadius write SetMinorRadius;
     property MinorRadius: Single read FMinorRadius write SetMinorRadius;
@@ -471,7 +471,7 @@ type
     function TopDepth: Single;
     function TopDepth: Single;
     function TopWidth: Single;
     function TopWidth: Single;
     function AxisAlignedBoundingBoxUnscaled: TAABB;
     function AxisAlignedBoundingBoxUnscaled: TAABB;
-    function AxisAlignedDimensionsUnscaled: TVector; override;
+    function AxisAlignedDimensionsUnscaled: TGLVector; override;
   published
   published
     property ApexHeight: Single read FApexHeight write SetApexHeight stored False;
     property ApexHeight: Single read FApexHeight write SetApexHeight stored False;
     property BaseDepth: Single read FBaseDepth write SetBaseDepth stored False;
     property BaseDepth: Single read FBaseDepth write SetBaseDepth stored False;
@@ -490,7 +490,7 @@ type
     FGrid: Cardinal;
     FGrid: Cardinal;
   public
   public
     constructor Create(AOwner: TComponent); override;
     constructor Create(AOwner: TComponent); override;
-    function AxisAlignedDimensionsUnscaled: TVector; override;
+    function AxisAlignedDimensionsUnscaled: TGLVector; override;
     procedure BuildList(var rci: TGLRenderContextInfo); override;
     procedure BuildList(var rci: TGLRenderContextInfo); override;
     procedure DoRender(var ARci: TGLRenderContextInfo;
     procedure DoRender(var ARci: TGLRenderContextInfo;
       ARenderSelf, ARenderChildren: Boolean); override;
       ARenderSelf, ARenderChildren: Boolean); override;
@@ -797,7 +797,7 @@ begin
   inherited Assign(Source);
   inherited Assign(Source);
 end;
 end;
 
 
-function TGLDisk.AxisAlignedDimensionsUnscaled: TVector;
+function TGLDisk.AxisAlignedDimensionsUnscaled: TGLVector;
 var
 var
   r: Single;
   r: Single;
 begin
 begin
@@ -805,13 +805,13 @@ begin
   Result := VectorMake(r, r, 0);
   Result := VectorMake(r, r, 0);
 end;
 end;
 
 
-function TGLDisk.RayCastIntersect(const rayStart, rayVector: TVector;
-  intersectPoint: PVector = nil; intersectNormal: PVector = nil): Boolean;
+function TGLDisk.RayCastIntersect(const rayStart, rayVector: TGLVector;
+  intersectPoint: PGLVector = nil; intersectNormal: PGLVector = nil): Boolean;
 var
 var
-  ip: TVector;
+  ip: TGLVector;
   d: Single;
   d: Single;
   angle, beginAngle, endAngle: Single;
   angle, beginAngle, endAngle: Single;
-  localIntPoint: TVector;
+  localIntPoint: TGLVector;
 begin
 begin
   Result := False;
   Result := False;
   if SweepAngle > 0 then
   if SweepAngle > 0 then
@@ -1038,7 +1038,7 @@ begin
   inherited Assign(Source);
   inherited Assign(Source);
 end;
 end;
 
 
-function TGLCone.AxisAlignedDimensionsUnscaled: TVector;
+function TGLCone.AxisAlignedDimensionsUnscaled: TGLVector;
 var
 var
   r: Single;
   r: Single;
 begin
 begin
@@ -1052,10 +1052,10 @@ begin
   Result := 0;
   Result := 0;
 end;
 end;
 
 
-function TGLCone.RayCastIntersect(const rayStart, rayVector: TVector;
-  intersectPoint: PVector = nil; intersectNormal: PVector = nil): Boolean;
+function TGLCone.RayCastIntersect(const rayStart, rayVector: TGLVector;
+  intersectPoint: PGLVector = nil; intersectNormal: PGLVector = nil): Boolean;
 var
 var
-  ip, localRayStart, localRayVector: TVector;
+  ip, localRayStart, localRayVector: TGLVector;
   poly: array [0 .. 2] of Double;
   poly: array [0 .. 2] of Double;
   roots: TDoubleArray;
   roots: TDoubleArray;
   minRoot: Double;
   minRoot: Double;
@@ -1210,7 +1210,7 @@ begin
   inherited Assign(Source);
   inherited Assign(Source);
 end;
 end;
 
 
-function TGLCylinder.AxisAlignedDimensionsUnscaled: TVector;
+function TGLCylinder.AxisAlignedDimensionsUnscaled: TGLVector;
 var
 var
   r, r1: Single;
   r, r1: Single;
 begin
 begin
@@ -1222,12 +1222,12 @@ begin
   // ScaleVector(Result, Scale.AsVector);
   // ScaleVector(Result, Scale.AsVector);
 end;
 end;
 
 
-function TGLCylinder.RayCastIntersect(const rayStart, rayVector: TVector;
-  intersectPoint: PVector = nil; intersectNormal: PVector = nil): Boolean;
+function TGLCylinder.RayCastIntersect(const rayStart, rayVector: TGLVector;
+  intersectPoint: PGLVector = nil; intersectNormal: PGLVector = nil): Boolean;
 const
 const
   cOne: Single = 1;
   cOne: Single = 1;
 var
 var
-  locRayStart, locRayVector, ip: TVector;
+  locRayStart, locRayVector, ip: TGLVector;
   poly: array [0 .. 2] of Double;
   poly: array [0 .. 2] of Double;
   roots: TDoubleArray;
   roots: TDoubleArray;
   minRoot: Double;
   minRoot: Double;
@@ -1342,7 +1342,7 @@ begin
     SetLength(roots, 0);
     SetLength(roots, 0);
 end;
 end;
 
 
-procedure TGLCylinder.Align(const startPoint, endPoint: TVector);
+procedure TGLCylinder.Align(const startPoint, endPoint: TGLVector);
 var
 var
   dir: TAffineVector;
   dir: TAffineVector;
 begin
 begin
@@ -1567,7 +1567,7 @@ begin
   inherited Assign(Source);
   inherited Assign(Source);
 end;
 end;
 
 
-function TGLCapsule.AxisAlignedDimensionsUnscaled: TVector;
+function TGLCapsule.AxisAlignedDimensionsUnscaled: TGLVector;
 var
 var
   r, r1: Single;
   r, r1: Single;
 begin
 begin
@@ -1579,12 +1579,12 @@ begin
   // ScaleVector(Result, Scale.AsVector);
   // ScaleVector(Result, Scale.AsVector);
 end;
 end;
 
 
-function TGLCapsule.RayCastIntersect(const rayStart, rayVector: TVector;
-  intersectPoint: PVector = nil; intersectNormal: PVector = nil): Boolean;
+function TGLCapsule.RayCastIntersect(const rayStart, rayVector: TGLVector;
+  intersectPoint: PGLVector = nil; intersectNormal: PGLVector = nil): Boolean;
 const
 const
   cOne: Single = 1;
   cOne: Single = 1;
 var
 var
-  locRayStart, locRayVector, ip: TVector;
+  locRayStart, locRayVector, ip: TGLVector;
   poly: array [0 .. 2] of Double;
   poly: array [0 .. 2] of Double;
   roots: TDoubleArray;
   roots: TDoubleArray;
   minRoot: Double;
   minRoot: Double;
@@ -1698,7 +1698,7 @@ begin
     SetLength(roots, 0);
     SetLength(roots, 0);
 end;
 end;
 
 
-procedure TGLCapsule.Align(const startPoint, endPoint: TVector);
+procedure TGLCapsule.Align(const startPoint, endPoint: TGLVector);
 var
 var
   dir: TAffineVector;
   dir: TAffineVector;
 begin
 begin
@@ -1816,7 +1816,7 @@ begin
   inherited Assign(Source);
   inherited Assign(Source);
 end;
 end;
 
 
-function TGLAnnulus.AxisAlignedDimensionsUnscaled: TVector;
+function TGLAnnulus.AxisAlignedDimensionsUnscaled: TGLVector;
 var
 var
   r, r1: Single;
   r, r1: Single;
 begin
 begin
@@ -1827,12 +1827,12 @@ begin
   Result := VectorMake(r, 0.5 * FHeight, r);
   Result := VectorMake(r, 0.5 * FHeight, r);
 end;
 end;
 
 
-function TGLAnnulus.RayCastIntersect(const rayStart, rayVector: TVector;
-  intersectPoint, intersectNormal: PVector): Boolean;
+function TGLAnnulus.RayCastIntersect(const rayStart, rayVector: TGLVector;
+  intersectPoint, intersectNormal: PGLVector): Boolean;
 const
 const
   cOne: Single = 1;
   cOne: Single = 1;
 var
 var
-  locRayStart, locRayVector, ip: TVector;
+  locRayStart, locRayVector, ip: TGLVector;
   poly: array [0 .. 2] of Double;
   poly: array [0 .. 2] of Double;
   t, tr2, invRayVector1: Single;
   t, tr2, invRayVector1: Single;
   tPlaneMin, tPlaneMax: Single;
   tPlaneMin, tPlaneMax: Single;
@@ -2318,7 +2318,7 @@ begin
   end;
   end;
 end;
 end;
 
 
-function TGLTorus.AxisAlignedDimensionsUnscaled: TVector;
+function TGLTorus.AxisAlignedDimensionsUnscaled: TGLVector;
 var
 var
   r, r1: Single;
   r, r1: Single;
 begin
 begin
@@ -2327,15 +2327,15 @@ begin
   Result := VectorMake(r + r1, r + r1, r1); // Danb
   Result := VectorMake(r + r1, r + r1, r1); // Danb
 end;
 end;
 
 
-function TGLTorus.RayCastIntersect(const rayStart, rayVector: TVector;
-  intersectPoint: PVector = nil; intersectNormal: PVector = nil): Boolean;
+function TGLTorus.RayCastIntersect(const rayStart, rayVector: TGLVector;
+  intersectPoint: PGLVector = nil; intersectNormal: PGLVector = nil): Boolean;
 var
 var
   i: integer;
   i: integer;
   fRo2, fRi2, fDE, fVal, r, nearest: Double;
   fRo2, fRi2, fDE, fVal, r, nearest: Double;
   polynom: array [0 .. 4] of Double;
   polynom: array [0 .. 4] of Double;
   polyRoots: TDoubleArray;
   polyRoots: TDoubleArray;
-  localStart, localVector: TVector;
-  vi, vc: TVector;
+  localStart, localVector: TGLVector;
+  vi, vc: TGLVector;
 begin
 begin
   // compute coefficients of quartic polynomial
   // compute coefficients of quartic polynomial
   fRo2 := Sqr(MajorRadius);
   fRo2 := Sqr(MajorRadius);
@@ -3388,7 +3388,7 @@ begin
   end;
   end;
 end;
 end;
 
 
-function TGLFrustrum.AxisAlignedDimensionsUnscaled: TVector;
+function TGLFrustrum.AxisAlignedDimensionsUnscaled: TGLVector;
 begin
 begin
   Result.X := FBaseWidth * 0.5;
   Result.X := FBaseWidth * 0.5;
   Result.Y := FHeight * 0.5;
   Result.Y := FHeight * 0.5;
@@ -3475,7 +3475,7 @@ begin
   FGrid := 5;
   FGrid := 5;
 end;
 end;
 
 
-function TGLTeapot.AxisAlignedDimensionsUnscaled: TVector;
+function TGLTeapot.AxisAlignedDimensionsUnscaled: TGLVector;
 begin
 begin
   SetVector(Result, 0.55, 0.25, 0.35);
   SetVector(Result, 0.55, 0.25, 0.35);
 end;
 end;

+ 26 - 26
Source/GLS.GeometryBB.pas

@@ -22,7 +22,7 @@ type
   PHmgBoundingBox = ^THmgBoundingBox;
   PHmgBoundingBox = ^THmgBoundingBox;
 
 
   THmgBoundingBox = record
   THmgBoundingBox = record
-    BBox: array [0 .. 7] of TVector;
+    BBox: array [0 .. 7] of TGLVector;
   end;
   end;
 
 
   //  Structure for storing Axis Aligned Bounding Boxes 
   //  Structure for storing Axis Aligned Bounding Boxes 
@@ -74,8 +74,8 @@ function BoundingBoxesAreEqual(const ABoundingBox1, ABoundingBox2: PHmgBoundingB
 function AddBB(var C1: THmgBoundingBox; const C2: THmgBoundingBox): THmgBoundingBox;
 function AddBB(var C1: THmgBoundingBox; const C2: THmgBoundingBox): THmgBoundingBox;
 procedure AddAABB(var Aabb: TAABB; const Aabb1: TAABB);
 procedure AddAABB(var Aabb: TAABB; const Aabb1: TAABB);
 
 
-procedure SetBB(var C: THmgBoundingBox; const V: TVector);
-procedure SetAABB(var Bb: TAABB; const V: TVector); inline;
+procedure SetBB(var C: THmgBoundingBox; const V: TGLVector);
+procedure SetAABB(var Bb: TAABB; const V: TGLVector); inline;
 
 
 procedure BBTransform(var C: THmgBoundingBox; const M: TMatrix);
 procedure BBTransform(var C: THmgBoundingBox; const M: TMatrix);
 procedure AABBTransform(var Bb: TAABB; const M: TMatrix);
 procedure AABBTransform(var Bb: TAABB; const M: TMatrix);
@@ -91,7 +91,7 @@ function BBMaxZ(const C: THmgBoundingBox): Single;
 // Resize the AABB if necessary to include p.
 // Resize the AABB if necessary to include p.
 procedure AABBInclude(var Bb: TAABB; const P: TAffineVector);
 procedure AABBInclude(var Bb: TAABB; const P: TAffineVector);
 // Make an AABB that is formed by sweeping a sphere (or AABB) from Start to Dest 
 // Make an AABB that is formed by sweeping a sphere (or AABB) from Start to Dest 
-procedure AABBFromSweep(var SweepAABB: TAABB; const Start, Dest: TVector; const Radius: Single);
+procedure AABBFromSweep(var SweepAABB: TAABB; const Start, Dest: TGLVector; const Radius: Single);
 (* Returns the intersection AABB of two AABBs. 
 (* Returns the intersection AABB of two AABBs. 
   If the AABBs don't intersect, will return a degenerated AABB (plane, line or point). *)
   If the AABBs don't intersect, will return a degenerated AABB (plane, line or point). *)
 function AABBIntersection(const Aabb1, Aabb2: TAABB): TAABB;
 function AABBIntersection(const Aabb1, Aabb2: TAABB): TAABB;
@@ -103,12 +103,12 @@ function AABBToBB(const AnAABB: TAABB): THmgBoundingBox; overload;
 function AABBToBB(const AnAABB: TAABB; const M: TMatrix): THmgBoundingBox; overload;
 function AABBToBB(const AnAABB: TAABB; const M: TMatrix): THmgBoundingBox; overload;
 //  Adds delta to min and max of the AABB. 
 //  Adds delta to min and max of the AABB. 
 procedure OffsetAABB(var Aabb: TAABB; const Delta: TAffineVector); overload;
 procedure OffsetAABB(var Aabb: TAABB; const Delta: TAffineVector); overload;
-procedure OffsetAABB(var Aabb: TAABB; const Delta: TVector); overload;
+procedure OffsetAABB(var Aabb: TAABB; const Delta: TGLVector); overload;
 //  Adds delta to min and max of the BB.
 //  Adds delta to min and max of the BB.
 procedure OffsetBB(var Bb: THmgBoundingBox; const Delta: TAffineVector); overload;
 procedure OffsetBB(var Bb: THmgBoundingBox; const Delta: TAffineVector); overload;
-procedure OffsetBB(var Bb: THmgBoundingBox; const Delta: TVector); overload;
+procedure OffsetBB(var Bb: THmgBoundingBox; const Delta: TGLVector); overload;
 // The same as above but uses AddPoint() instead of AddVector().
 // The same as above but uses AddPoint() instead of AddVector().
-procedure OffsetBBPoint(var Bb: THmgBoundingBox; const Delta: TVector); overload;
+procedure OffsetBBPoint(var Bb: THmgBoundingBox; const Delta: TGLVector); overload;
 (* Determines if two AxisAlignedBoundingBoxes intersect.
 (* Determines if two AxisAlignedBoundingBoxes intersect.
   The matrices are the ones that convert one point to the other's AABB system *)
   The matrices are the ones that convert one point to the other's AABB system *)
 function IntersectAABBs(const Aabb1, Aabb2: TAABB; const M1To2, M2To1: TMatrix): Boolean; overload;
 function IntersectAABBs(const Aabb1, Aabb2: TAABB; const M1To2, M2To1: TMatrix): Boolean; overload;
@@ -124,7 +124,7 @@ function AABBFitsInAABBAbsolute(const Aabb1, Aabb2: TAABB): Boolean;
 
 
 // Checks if a point "p" is inside an AABB
 // Checks if a point "p" is inside an AABB
 function PointInAABB(const P: TAffineVector; const Aabb: TAABB): Boolean; overload;
 function PointInAABB(const P: TAffineVector; const Aabb: TAABB): Boolean; overload;
-function PointInAABB(const P: TVector; const Aabb: TAABB): Boolean; overload;
+function PointInAABB(const P: TGLVector; const Aabb: TAABB): Boolean; overload;
 
 
 // Checks if a plane (given by the normal+d) intersects the AABB
 // Checks if a plane (given by the normal+d) intersects the AABB
 function PlaneIntersectAABB(const Normal: TAffineVector; D: Single; const Aabb: TAABB): Boolean;
 function PlaneIntersectAABB(const Normal: TAffineVector; D: Single; const Aabb: TAABB): Boolean;
@@ -154,7 +154,7 @@ procedure AABBToBSphere(const AABB: TAABB; var BSphere: TBSphere);
 // Convert a BSphere to an AABB 
 // Convert a BSphere to an AABB 
 procedure BSphereToAABB(const BSphere: TBSphere; var AABB: TAABB); overload;
 procedure BSphereToAABB(const BSphere: TBSphere; var AABB: TAABB); overload;
 function BSphereToAABB(const Center: TAffineVector; Radius: Single): TAABB; overload;
 function BSphereToAABB(const Center: TAffineVector; Radius: Single): TAABB; overload;
-function BSphereToAABB(const Center: TVector; Radius: Single): TAABB; overload;
+function BSphereToAABB(const Center: TGLVector; Radius: Single): TAABB; overload;
 
 
 // Determines to which extent one AABB contains another AABB 
 // Determines to which extent one AABB contains another AABB 
 function AABBContainsAABB(const MainAABB, TestAABB: TAABB): TSpaceContains;
 function AABBContainsAABB(const MainAABB, TestAABB: TAABB): TSpaceContains;
@@ -184,10 +184,10 @@ function AABBToClipRect(const Aabb: TAABB; const ModelViewProjection: TMatrix;
   ViewportSizeX, ViewportSizeY: Integer): TClipRect;
   ViewportSizeX, ViewportSizeY: Integer): TClipRect;
 
 
 // Finds the intersection between a ray and an axis aligned bounding box. 
 // Finds the intersection between a ray and an axis aligned bounding box. 
-function RayCastAABBIntersect(const RayOrigin, RayDirection: TVector;
+function RayCastAABBIntersect(const RayOrigin, RayDirection: TGLVector;
   const Aabb: TAABB; out TNear, TFar: Single): Boolean; overload;
   const Aabb: TAABB; out TNear, TFar: Single): Boolean; overload;
-function RayCastAABBIntersect(const RayOrigin, RayDirection: TVector;
-  const Aabb: TAABB; IntersectPoint: PVector = nil): Boolean; overload;
+function RayCastAABBIntersect(const RayOrigin, RayDirection: TGLVector;
+  const Aabb: TAABB; IntersectPoint: PGLVector = nil): Boolean; overload;
 
 
 type
 type
   TPlanIndices = array [0 .. 3] of Integer;
   TPlanIndices = array [0 .. 3] of Integer;
@@ -281,7 +281,7 @@ begin
     Aabb.Max.Z := Aabb1.Max.Z;
     Aabb.Max.Z := Aabb1.Max.Z;
 end;
 end;
 
 
-procedure SetBB(var C: THmgBoundingBox; const V: TVector);
+procedure SetBB(var C: THmgBoundingBox; const V: TGLVector);
 begin
 begin
   SetPlanBB(C, 0, V.X);
   SetPlanBB(C, 0, V.X);
   SetPlanBB(C, 1, -V.X);
   SetPlanBB(C, 1, -V.X);
@@ -291,7 +291,7 @@ begin
   SetPlanBB(C, 5, -V.Z);
   SetPlanBB(C, 5, -V.Z);
 end;
 end;
 
 
-procedure SetAABB(var Bb: TAABB; const V: TVector);
+procedure SetAABB(var Bb: TAABB; const V: TGLVector);
 begin
 begin
   Bb.Max.X := Abs(V.X);
   Bb.Max.X := Abs(V.X);
   Bb.Max.Y := Abs(V.Y);
   Bb.Max.Y := Abs(V.Y);
@@ -408,7 +408,7 @@ begin
     Bb.Max.Z := P.Z;
     Bb.Max.Z := P.Z;
 end;
 end;
 
 
-procedure AABBFromSweep(var SweepAABB: TAABB; const Start, Dest: TVector;
+procedure AABBFromSweep(var SweepAABB: TAABB; const Start, Dest: TGLVector;
   const Radius: Single);
   const Radius: Single);
 begin
 begin
   if Start.X < Dest.X then
   if Start.X < Dest.X then
@@ -504,7 +504,7 @@ begin
   AddVector(Aabb.Max, Delta);
   AddVector(Aabb.Max, Delta);
 end;
 end;
 
 
-procedure OffsetAABB(var Aabb: TAABB; const Delta: TVector);
+procedure OffsetAABB(var Aabb: TAABB; const Delta: TGLVector);
 begin
 begin
   AddVector(Aabb.Min, Delta);
   AddVector(Aabb.Min, Delta);
   AddVector(Aabb.Max, Delta);
   AddVector(Aabb.Max, Delta);
@@ -513,14 +513,14 @@ end;
 procedure OffsetBB(var Bb: THmgBoundingBox; const Delta: TAffineVector);
 procedure OffsetBB(var Bb: THmgBoundingBox; const Delta: TAffineVector);
 var
 var
   I: Integer;
   I: Integer;
-  TempVector: TVector;
+  TempVector: TGLVector;
 begin
 begin
   TempVector := VectorMake(Delta, 0);
   TempVector := VectorMake(Delta, 0);
   for I := 0 to 7 do
   for I := 0 to 7 do
     AddVector(Bb.BBox[I], TempVector);
     AddVector(Bb.BBox[I], TempVector);
 end;
 end;
 
 
-procedure OffsetBB(var Bb: THmgBoundingBox; const Delta: TVector);
+procedure OffsetBB(var Bb: THmgBoundingBox; const Delta: TGLVector);
 var
 var
   I: Integer;
   I: Integer;
 begin
 begin
@@ -528,7 +528,7 @@ begin
     AddVector(Bb.BBox[I], Delta);
     AddVector(Bb.BBox[I], Delta);
 end;
 end;
 
 
-procedure OffsetBBPoint(var Bb: THmgBoundingBox; const Delta: TVector);
+procedure OffsetBBPoint(var Bb: THmgBoundingBox; const Delta: TGLVector);
 var
 var
   I: Integer;
   I: Integer;
 begin
 begin
@@ -577,7 +577,7 @@ var
   Planes2: array [0 .. 5] of THmgPlane;
   Planes2: array [0 .. 5] of THmgPlane;
   I, T: Integer;
   I, T: Integer;
   V: TVertex;
   V: TVertex;
-  P: TVector;
+  P: TGLVector;
 begin
 begin
   Result := False;
   Result := False;
 
 
@@ -706,7 +706,7 @@ begin
     (P.Z >= Aabb.Min.Z);
     (P.Z >= Aabb.Min.Z);
 end;
 end;
 
 
-function PointInAABB(const P: TVector; const Aabb: TAABB): Boolean;
+function PointInAABB(const P: TGLVector; const Aabb: TAABB): Boolean;
 begin
 begin
   Result := (P.X <= Aabb.Max.X) and
   Result := (P.X <= Aabb.Max.X) and
     (P.X >= Aabb.Min.X) and (P.Y <= Aabb.Max.Y) and
     (P.X >= Aabb.Min.X) and (P.Y <= Aabb.Max.Y) and
@@ -1040,7 +1040,7 @@ begin
   Result.Max := VectorAdd(Center, Radius);
   Result.Max := VectorAdd(Center, Radius);
 end;
 end;
 
 
-function BSphereToAABB(const Center: TVector; Radius: Single): TAABB;
+function BSphereToAABB(const Center: TGLVector; Radius: Single): TAABB;
 begin
 begin
   SetVector(Result.Min, VectorSubtract(Center, Radius));
   SetVector(Result.Min, VectorSubtract(Center, Radius));
   SetVector(Result.Max, VectorAdd(Center, Radius));
   SetVector(Result.Max, VectorAdd(Center, Radius));
@@ -1292,7 +1292,7 @@ function AABBToClipRect(const Aabb: TAABB; const ModelViewProjection: TMatrix;
   ViewportSizeX, ViewportSizeY: Integer): TClipRect;
   ViewportSizeX, ViewportSizeY: Integer): TClipRect;
 var
 var
   I: Integer;
   I: Integer;
-  V, Vt: TVector;
+  V, Vt: TGLVector;
   Minmax: array [0 .. 1] of PAffineVector;
   Minmax: array [0 .. 1] of PAffineVector;
 begin
 begin
   Minmax[0] := @Aabb.Min;
   Minmax[0] := @Aabb.Min;
@@ -1322,7 +1322,7 @@ begin
   end;
   end;
 end;
 end;
 
 
-function RayCastAABBIntersect(const RayOrigin, RayDirection: TVector;
+function RayCastAABBIntersect(const RayOrigin, RayDirection: TGLVector;
   const Aabb: TAABB; out TNear, TFar: Single): Boolean; overload;
   const Aabb: TAABB; out TNear, TFar: Single): Boolean; overload;
 const
 const
   Infinity = 1.0 / 0.0;
   Infinity = 1.0 / 0.0;
@@ -1370,8 +1370,8 @@ begin
   Result := True;
   Result := True;
 end;
 end;
 
 
-function RayCastAABBIntersect(const RayOrigin, RayDirection: TVector;
-  const Aabb: TAABB; IntersectPoint: PVector = nil): Boolean; overload;
+function RayCastAABBIntersect(const RayOrigin, RayDirection: TGLVector;
+  const Aabb: TAABB; IntersectPoint: PGLVector = nil): Boolean; overload;
 var
 var
   TNear, TFar: Single;
   TNear, TFar: Single;
 begin
 begin

+ 25 - 25
Source/GLS.Gizmo.pas

@@ -139,9 +139,9 @@ type
     gpRotateGizmo);
     gpRotateGizmo);
 
 
   TGLGizmoAcceptEvent = procedure(Sender: TObject; var Obj: TGLBaseSceneObject;
   TGLGizmoAcceptEvent = procedure(Sender: TObject; var Obj: TGLBaseSceneObject;
-    var Accept: Boolean; var Dimensions: TVector) of object;
+    var Accept: Boolean; var Dimensions: TGLVector) of object;
   TGLGizmoUpdateEvent = procedure(Sender: TObject; Obj: TGLBaseSceneObject;
   TGLGizmoUpdateEvent = procedure(Sender: TObject; Obj: TGLBaseSceneObject;
-    Axis: TGLGizmoAxis; Operation: TGLGizmoOperation; var Vector: TVector)
+    Axis: TGLGizmoAxis; Operation: TGLGizmoOperation; var Vector: TGLVector)
     of object;
     of object;
 
 
   TGLGizmoPickMode = (pmGetPickedObjects, pmRayCast);
   TGLGizmoPickMode = (pmGetPickedObjects, pmRayCast);
@@ -149,7 +149,7 @@ type
   TGLGizmoRayCastHitData = class(TPersistent)
   TGLGizmoRayCastHitData = class(TPersistent)
   public
   public
     Obj: TGLBaseSceneObject;
     Obj: TGLBaseSceneObject;
-    Point: TVector;
+    Point: TGLVector;
   end;
   end;
 
 
   TGLGizmoPickCube = class(TGLCube)
   TGLGizmoPickCube = class(TGLCube)
@@ -204,8 +204,8 @@ type
     Rx, Ry: Integer;
     Rx, Ry: Integer;
     dglEnable, dglDisable, dgtEnable, dgtDisable, dgcEnable, dgcDisable,
     dglEnable, dglDisable, dgtEnable, dgtDisable, dgcEnable, dgcDisable,
       dglaEnable, dglaDisable, dgliEnable, dgliDisable: TGLDirectOpenGL;
       dglaEnable, dglaDisable, dgliEnable, dgliDisable: TGLDirectOpenGL;
-    LastMousePos: TVector;
-    ObjDimensions: TVector;
+    LastMousePos: TGLVector;
+    ObjDimensions: TGLVector;
     FOnBeforeSelect: TGLGizmoAcceptEvent;
     FOnBeforeSelect: TGLGizmoAcceptEvent;
     FOnBeforeUpdate: TGLGizmoUpdateEvent;
     FOnBeforeUpdate: TGLGizmoUpdateEvent;
     FOnSelectionLost: TNotifyEvent;
     FOnSelectionLost: TNotifyEvent;
@@ -225,7 +225,7 @@ type
     procedure SetExcludeObjectsList(const AValue: TStrings);
     procedure SetExcludeObjectsList(const AValue: TStrings);
     procedure DirectGlDisable(Sender: TObject; var Rci: TGLRenderContextInfo);
     procedure DirectGlDisable(Sender: TObject; var Rci: TGLRenderContextInfo);
     procedure DirectGlEnable(Sender: TObject; var Rci: TGLRenderContextInfo);
     procedure DirectGlEnable(Sender: TObject; var Rci: TGLRenderContextInfo);
-    function MouseWorldPos(const X, Y: Integer): TVector;
+    function MouseWorldPos(const X, Y: Integer): TGLVector;
     function CheckObjectInExcludeList(const Obj: TGLBaseSceneObject): Boolean;
     function CheckObjectInExcludeList(const Obj: TGLBaseSceneObject): Boolean;
     procedure UpdateVisibleInfoLabels;
     procedure UpdateVisibleInfoLabels;
     procedure SetGLGizmoThickness(const Value: Single);
     procedure SetGLGizmoThickness(const Value: Single);
@@ -246,9 +246,9 @@ type
     procedure ViewerMouseDown(const X, Y: Integer);
     procedure ViewerMouseDown(const X, Y: Integer);
     procedure ViewerMouseUp(const X, Y: Integer);
     procedure ViewerMouseUp(const X, Y: Integer);
     procedure UpdateGizmo; overload;
     procedure UpdateGizmo; overload;
-    procedure UpdateGizmo(const NewDimensions: TVector); overload;
+    procedure UpdateGizmo(const NewDimensions: TGLVector); overload;
     procedure SetVisible(const AValue: Boolean);
     procedure SetVisible(const AValue: Boolean);
-    function GetPickedObjectPoint(const Obj: TGLBaseSceneObject): TVector;
+    function GetPickedObjectPoint(const Obj: TGLBaseSceneObject): TGLVector;
     procedure LooseSelection; virtual;
     procedure LooseSelection; virtual;
     procedure UndoAdd(const AObject: TGLCustomSceneObject);
     procedure UndoAdd(const AObject: TGLCustomSceneObject);
     property RootGizmo: TGLBaseSceneObject read FRootGizmo write SetRootGizmo;
     property RootGizmo: TGLBaseSceneObject read FRootGizmo write SetRootGizmo;
@@ -922,7 +922,7 @@ begin
     Rci.GLStates.Enable(StDepthTest);
     Rci.GLStates.Enable(StDepthTest);
 end;
 end;
 
 
-function TGLGizmo.GetPickedObjectPoint(const Obj: TGLBaseSceneObject): TVector;
+function TGLGizmo.GetPickedObjectPoint(const Obj: TGLBaseSceneObject): TGLVector;
 var
 var
   T: Integer;
   T: Integer;
   R: TGLGizmoRayCastHitData;
   R: TGLGizmoRayCastHitData;
@@ -942,7 +942,7 @@ function TGLGizmo.InternalGetPickedObjects(const X1, Y1, X2, Y2: Integer;
   const GuessCount: Integer): TGLPickList;
   const GuessCount: Integer): TGLPickList;
 var
 var
   T: Integer;
   T: Integer;
-  RayStart, RayVector, IPoint, INormal: TVector;
+  RayStart, RayVector, IPoint, INormal: TGLVector;
   O: TGLBaseSceneObject;
   O: TGLBaseSceneObject;
   Dist: Single;
   Dist: Single;
   HitData: TGLGizmoRayCastHitData;
   HitData: TGLGizmoRayCastHitData;
@@ -1107,9 +1107,9 @@ begin
   end;
   end;
 end;
 end;
 
 
-function TGLGizmo.MouseWorldPos(const X, Y: Integer): TVector;
+function TGLGizmo.MouseWorldPos(const X, Y: Integer): TGLVector;
 var
 var
-  V: TVector;
+  V: TGLVector;
   InvertedY: Integer;
   InvertedY: Integer;
 begin
 begin
   InvertedY := Viewer.Height - Y;
   InvertedY := Viewer.Height - Y;
@@ -1158,7 +1158,7 @@ end;
 procedure TGLGizmo.ViewerMouseMove(const X, Y: Integer);
 procedure TGLGizmo.ViewerMouseMove(const X, Y: Integer);
 var
 var
   PickList: TGLPickList;
   PickList: TGLPickList;
-  MousePos: TVector;
+  MousePos: TGLVector;
 
 
   function IndexOf(Obj: TGLBaseSceneObject): Integer;
   function IndexOf(Obj: TGLBaseSceneObject): Integer;
   var
   var
@@ -1173,7 +1173,7 @@ var
       end;
       end;
   end;
   end;
 
 
-  function LightLine(const Line: TGLLines; const Dark: TVector;
+  function LightLine(const Line: TGLLines; const Dark: TGLVector;
     const Axis: TGLGizmoAxis; AlterStyle: Boolean = False): Boolean;
     const Axis: TGLGizmoAxis; AlterStyle: Boolean = False): Boolean;
   var
   var
     PickObj: TGLBaseSceneObject;
     PickObj: TGLBaseSceneObject;
@@ -1215,7 +1215,7 @@ var
     end;
     end;
   end;
   end;
 
 
-  function LightTorus(const Torus: TGLGizmoPickTorus; const Dark: TVector;
+  function LightTorus(const Torus: TGLGizmoPickTorus; const Dark: TGLVector;
     const Axis: TGLGizmoAxis; AlterStyle: Boolean = False): Boolean;
     const Axis: TGLGizmoAxis; AlterStyle: Boolean = False): Boolean;
   begin
   begin
     if IndexOf(Torus) > -1 then
     if IndexOf(Torus) > -1 then
@@ -1240,7 +1240,7 @@ var
     end;
     end;
   end;
   end;
 
 
-  function LightCube(const Cube: TGLCube; const Dark: TVector;
+  function LightCube(const Cube: TGLCube; const Dark: TGLVector;
     const Axis: TGLGizmoAxis; AlterStyle: Boolean = False): Boolean;
     const Axis: TGLGizmoAxis; AlterStyle: Boolean = False): Boolean;
   begin
   begin
     if IndexOf(Cube) > -1 then
     if IndexOf(Cube) > -1 then
@@ -1265,10 +1265,10 @@ var
     end;
     end;
   end;
   end;
 
 
-  procedure OpeMove(MousePos: TVector);
+  procedure OpeMove(MousePos: TGLVector);
   var
   var
-    Vec1, Vec2: TVector;
-    QuantizedMousePos, QuantizedMousePos2: TVector;
+    Vec1, Vec2: TGLVector;
+    QuantizedMousePos, QuantizedMousePos2: TGLVector;
     T: Integer;
     T: Integer;
   begin
   begin
     for T := 0 to 3 do
     for T := 0 to 3 do
@@ -1310,7 +1310,7 @@ var
 
 
   procedure OpeRotate(const X, Y: Integer);
   procedure OpeRotate(const X, Y: Integer);
   var
   var
-    Vec1: TVector;
+    Vec1: TGLVector;
     RotV: TAffineVector;
     RotV: TAffineVector;
     Pmat: TMatrix;
     Pmat: TMatrix;
 
 
@@ -1390,10 +1390,10 @@ var
     end;
     end;
   end;
   end;
 
 
-  procedure OpeScale(const MousePos: TVector);
+  procedure OpeScale(const MousePos: TGLVector);
   var
   var
-    Vec1, Vec2: TVector;
-    QuantizedMousePos, QuantizedMousePos2: TVector;
+    Vec1, Vec2: TGLVector;
+    QuantizedMousePos, QuantizedMousePos2: TGLVector;
     T: Integer;
     T: Integer;
   begin
   begin
     for T := 0 to 3 do
     for T := 0 to 3 do
@@ -1528,7 +1528,7 @@ var
   Pick: TGLPickList;
   Pick: TGLPickList;
   I: Integer;
   I: Integer;
   Accept: Boolean;
   Accept: Boolean;
-  Dimensions: TVector;
+  Dimensions: TGLVector;
   GotPick: Boolean;
   GotPick: Boolean;
   PickedObj: TGLBaseSceneObject;
   PickedObj: TGLBaseSceneObject;
 begin
 begin
@@ -1685,7 +1685,7 @@ begin
   _GZOrootVisibleInfoLabels.Scale.AsVector := VectorMake(D, D, D);
   _GZOrootVisibleInfoLabels.Scale.AsVector := VectorMake(D, D, D);
 end;
 end;
 
 
-procedure TGLGizmo.UpdateGizmo(const NewDimensions: TVector);
+procedure TGLGizmo.UpdateGizmo(const NewDimensions: TGLVector);
 begin
 begin
   ObjDimensions := NewDimensions;
   ObjDimensions := NewDimensions;
   UpdateGizmo;
   UpdateGizmo;

+ 28 - 28
Source/GLS.GizmoEx.pas

@@ -48,7 +48,7 @@ type
 
 
   TGLGizmoExObjectItem = class(TCollectionItem)
   TGLGizmoExObjectItem = class(TCollectionItem)
   private
   private
-    FOldAutoScaling: TVector;
+    FOldAutoScaling: TGLVector;
     FEffectedObject: TGLBaseSceneObject;
     FEffectedObject: TGLBaseSceneObject;
     FParentOldObject: TGLBaseSceneObject;
     FParentOldObject: TGLBaseSceneObject;
     FIndexOldObject: Integer;
     FIndexOldObject: Integer;
@@ -318,7 +318,7 @@ type
     fLastCursorPos: TPoint;
     fLastCursorPos: TPoint;
     fChangeRate: TAffineVector;   //total rotate angle
     fChangeRate: TAffineVector;   //total rotate angle
     FEnableLoopCursorMoving: Boolean;
     FEnableLoopCursorMoving: Boolean;
-    lastMousePos: TVector;
+    lastMousePos: TGLVector;
     FOnUpdate: TNotifyEvent;
     FOnUpdate: TNotifyEvent;
     FOnSelect: TGLGizmoExAcceptEvent;
     FOnSelect: TGLGizmoExAcceptEvent;
     FOnOperationChange: TNotifyEvent;
     FOnOperationChange: TNotifyEvent;
@@ -347,7 +347,7 @@ type
     procedure SetHistoryStepsCount(aValue: Integer);
     procedure SetHistoryStepsCount(aValue: Integer);
     procedure SetExcludeObjectsList(const AValue: TStrings);
     procedure SetExcludeObjectsList(const AValue: TStrings);
     procedure SetExcludeClassNameList(const AValue: TStrings);
     procedure SetExcludeClassNameList(const AValue: TStrings);
-    function MouseWorldPos(const X, Y: Integer): TVector;
+    function MouseWorldPos(const X, Y: Integer): TGLVector;
     function CheckObjectInExcludeList(const Obj: TGLBaseSceneObject): Boolean;
     function CheckObjectInExcludeList(const Obj: TGLBaseSceneObject): Boolean;
     function CheckClassNameInExcludeList(const Obj: TGLBaseSceneObject): Boolean;
     function CheckClassNameInExcludeList(const Obj: TGLBaseSceneObject): Boolean;
     procedure UpdateVisibleInfoLabels;
     procedure UpdateVisibleInfoLabels;
@@ -2110,7 +2110,7 @@ procedure TGLGizmoEx.InternalRender(Sender: TObject; var rci: TGLRenderContextIn
   var
   var
     I, J:    Byte;
     I, J:    Byte;
     BB:      THmgBoundingBox;
     BB:      THmgBoundingBox;
-    AVector: TVector;
+    AVector: TGLVector;
   begin
   begin
     if aObject = nil then
     if aObject = nil then
       Exit;
       Exit;
@@ -2134,7 +2134,7 @@ procedure TGLGizmoEx.InternalRender(Sender: TObject; var rci: TGLRenderContextIn
 
 
   //test#12 result is positive, but only for 2d
   //test#12 result is positive, but only for 2d
   //
   //
-  procedure ShowText(const Text: UnicodeString; Position: Tvector; Scale: TVector; Color: Tvector);
+  procedure ShowText(const Text: UnicodeString; Position: TGLVector; Scale: TGLVector; Color: TGLVector);
   var
   var
     FLayout: TTextLayout;
     FLayout: TTextLayout;
     FAlignment: TAlignment;
     FAlignment: TAlignment;
@@ -2897,7 +2897,7 @@ function TGLGizmoEx.InternalGetPickedObjects(const x1, y1, x2, y2: Integer; cons
   var
   var
     t:    Integer;
     t:    Integer;
     dist: Single;
     dist: Single;
-    rayStart, rayVector, iPoint, iNormal: TVector;
+    rayStart, rayVector, iPoint, iNormal: TGLVector;
   begin
   begin
     SetVector(rayStart, Viewer.Camera.AbsolutePosition);
     SetVector(rayStart, Viewer.Camera.AbsolutePosition);
     SetVector(rayVector, Viewer.Buffer.ScreenToVector(AffineVectorMake(X, Viewer.Height - Y, 0)));
     SetVector(rayVector, Viewer.Buffer.ScreenToVector(AffineVectorMake(X, Viewer.Height - Y, 0)));
@@ -3073,9 +3073,9 @@ begin
 
 
 end;
 end;
 
 
-function TGLGizmoEx.MouseWorldPos(const X, Y: Integer): TVector;
+function TGLGizmoEx.MouseWorldPos(const X, Y: Integer): TGLVector;
 var
 var
-  v: TVector;
+  v: TGLVector;
   InvertedY: Integer;
   InvertedY: Integer;
 begin
 begin
 
 
@@ -3100,7 +3100,7 @@ end;
 
 
 procedure TGLGizmoEx.ActivatingElements(PickList: TGLPickList);
 procedure TGLGizmoEx.ActivatingElements(PickList: TGLPickList);
 
 
-  procedure ActlightRotateLine(const line: TGLLines; const dark: TVector);
+  procedure ActlightRotateLine(const line: TGLLines; const dark: TGLVector);
   var
   var
     v: TVector4f;
     v: TVector4f;
     I: Integer;
     I: Integer;
@@ -3122,7 +3122,7 @@ procedure TGLGizmoEx.ActivatingElements(PickList: TGLPickList);
     end;
     end;
   end;
   end;
 
 
-  procedure DeActlightRotateLine(const line: TGLLines; const dark: TVector);
+  procedure DeActlightRotateLine(const line: TGLLines; const dark: TGLVector);
   var
   var
     v: TVector4f;
     v: TVector4f;
     I: Integer;
     I: Integer;
@@ -3151,7 +3151,7 @@ procedure TGLGizmoEx.ActivatingElements(PickList: TGLPickList);
     line.Options := [];
     line.Options := [];
   end;
   end;
 
 
-  procedure DeActlightLine(const line: TGLLines; const dark: TVector; alterStyle: Boolean = False);
+  procedure DeActlightLine(const line: TGLLines; const dark: TGLVector; alterStyle: Boolean = False);
   begin
   begin
     with  line.LineColor do
     with  line.LineColor do
       if (AsWinColor = FSelectedColor.AsWinColor) then
       if (AsWinColor = FSelectedColor.AsWinColor) then
@@ -3163,13 +3163,13 @@ procedure TGLGizmoEx.ActivatingElements(PickList: TGLPickList);
       end;
       end;
   end;
   end;
 
 
-  procedure ActlightRotateArrowLine(const line: TGLLines; Color: TVector);
+  procedure ActlightRotateArrowLine(const line: TGLLines; Color: TGLVector);
   begin
   begin
     line.LineColor.color := Color;
     line.LineColor.color := Color;
     line.Options := [];
     line.Options := [];
   end;
   end;
 
 
-  procedure DeActlightRotateArrowLine(const line: TGLLines; const dark: TVector);
+  procedure DeActlightRotateArrowLine(const line: TGLLines; const dark: TGLVector);
   begin
   begin
     if not VectorEquals(line.LineColor.Color, dark) then
     if not VectorEquals(line.LineColor.Color, dark) then
     begin
     begin
@@ -3194,19 +3194,19 @@ procedure TGLGizmoEx.ActivatingElements(PickList: TGLPickList);
     FlatText.ModulateColor.Color := FSelectedColor.Color;
     FlatText.ModulateColor.Color := FSelectedColor.Color;
   end;
   end;
 
 
-  procedure DeActlightText(const FlatText: TGLFlatText; const dark: TVector);
+  procedure DeActlightText(const FlatText: TGLFlatText; const dark: TGLVector);
   begin
   begin
     with FlatText.ModulateColor do
     with FlatText.ModulateColor do
       if AsWinColor = FSelectedColor.AsWinColor then
       if AsWinColor = FSelectedColor.AsWinColor then
         Color := dark;
         Color := dark;
   end;
   end;
 
 
-  procedure ActlightTextRotate(const FlatText: TGLFlatText; Color: TVector);
+  procedure ActlightTextRotate(const FlatText: TGLFlatText; Color: TGLVector);
   begin
   begin
     FlatText.ModulateColor.Color := Color;
     FlatText.ModulateColor.Color := Color;
   end;
   end;
 
 
-  procedure DeActlightTextRotate(const FlatText: TGLFlatText; const dark: TVector);
+  procedure DeActlightTextRotate(const FlatText: TGLFlatText; const dark: TGLVector);
   begin
   begin
     with FlatText.ModulateColor do
     with FlatText.ModulateColor do
       if not VectorEquals(Color, dark) then
       if not VectorEquals(Color, dark) then
@@ -3458,7 +3458,7 @@ end;
 procedure TGLGizmoEx.ViewerMouseMove(const X, Y: Integer);
 procedure TGLGizmoEx.ViewerMouseMove(const X, Y: Integer);
 var
 var
   pickList:  TGLPickList;
   pickList:  TGLPickList;
-  mousePos:  TVector;
+  mousePos:  TGLVector;
   includeCh: Boolean;
   includeCh: Boolean;
 
 
   function FindParent(parent: TGLBaseSceneObject): Boolean;
   function FindParent(parent: TGLBaseSceneObject): Boolean;
@@ -3472,10 +3472,10 @@ var
     end;
     end;
   end;
   end;
 
 
-  procedure OpeMove(mousePos: TVector);
+  procedure OpeMove(mousePos: TGLVector);
   var
   var
-    vec1, vec2: TVector;
-    quantizedMousePos, quantizedMousePos2: TVector;
+    vec1, vec2: TGLVector;
+    quantizedMousePos, quantizedMousePos2: TGLVector;
     I: Integer;
     I: Integer;
   begin
   begin
     if VectorNorm(lastMousePos) = 0 then
     if VectorNorm(lastMousePos) = 0 then
@@ -3558,12 +3558,12 @@ var
 
 
   procedure OpeRotate(const X, Y: Integer);
   procedure OpeRotate(const X, Y: Integer);
   var
   var
-    vec1: TVector;
+    vec1: TGLVector;
     rotV: TAffineVector;
     rotV: TAffineVector;
     pmat: TMatrix;
     pmat: TMatrix;
     I:    Integer;
     I:    Integer;
     IncludeCh: Boolean;
     IncludeCh: Boolean;
-    v:    TVector;
+    v:    TGLVector;
   begin
   begin
 
 
     vec1.X := 0;
     vec1.X := 0;
@@ -3657,10 +3657,10 @@ var
       end;
       end;
   end;
   end;
 
 
-  procedure OpeScale(const mousePos: TVector);
+  procedure OpeScale(const mousePos: TGLVector);
   var
   var
-    vec1, vec2: TVector;
-    quantizedMousePos, quantizedMousePos2: TVector;
+    vec1, vec2: TGLVector;
+    quantizedMousePos, quantizedMousePos2: TGLVector;
     t: Integer;
     t: Integer;
   begin
   begin
     if VectorNorm(lastMousePos) = 0 then
     if VectorNorm(lastMousePos) = 0 then
@@ -3881,9 +3881,9 @@ end;
 
 
 procedure TGLGizmoEx.ViewerMouseDown(const X, Y: Integer);
 procedure TGLGizmoEx.ViewerMouseDown(const X, Y: Integer);
 
 
-  function SetInitialDiskPostition(aObject, aObject2: TGLCustomSceneObject): TVector;
+  function SetInitialDiskPostition(aObject, aObject2: TGLCustomSceneObject): TGLVector;
   var
   var
-    rayStart, rayVector, iPoint, iNormal: TVector;
+    rayStart, rayVector, iPoint, iNormal: TGLVector;
   begin
   begin
     if (Viewer = nil) then
     if (Viewer = nil) then
       Exit;
       Exit;
@@ -4042,7 +4042,7 @@ end;
 procedure TGLGizmoEx.UpdateGizmo;
 procedure TGLGizmoEx.UpdateGizmo;
 var
 var
   d: Single;
   d: Single;
-  v: TVector;
+  v: TGLVector;
   I: Integer;
   I: Integer;
 begin
 begin
   if not Assigned(RootGizmo)   or
   if not Assigned(RootGizmo)   or

+ 18 - 18
Source/GLS.Imposter.pas

@@ -72,22 +72,22 @@ type
     FAspectRatio: Single;
     FAspectRatio: Single;
     FModulated: Boolean;
     FModulated: Boolean;
   protected
   protected
-    FVx, FVy: TVector;
-    FStaticOffset: TVector;
-    FQuad: array[0..3] of TVector;
+    FVx, FVy: TGLVector;
+    FStaticOffset: TGLVector;
+    FQuad: array[0..3] of TGLVector;
     FStaticScale: Single;
     FStaticScale: Single;
     procedure PrepareTexture(var rci: TGLRenderContextInfo); virtual;
     procedure PrepareTexture(var rci: TGLRenderContextInfo); virtual;
-    procedure RenderQuad(const texExtents, objPos: TVector; size: Single);
+    procedure RenderQuad(const texExtents, objPos: TGLVector; size: Single);
   public
   public
     constructor Create(aBuilder: TGLImposterBuilder); virtual;
     constructor Create(aBuilder: TGLImposterBuilder); virtual;
     destructor Destroy; override;
     destructor Destroy; override;
     procedure BeginRender(var rci: TGLRenderContextInfo); virtual;
     procedure BeginRender(var rci: TGLRenderContextInfo); virtual;
     procedure Render(var rci: TGLRenderContextInfo;
     procedure Render(var rci: TGLRenderContextInfo;
-      const objPos, localCameraPos: TVector;
+      const objPos, localCameraPos: TGLVector;
       size: Single); virtual;
       size: Single); virtual;
     procedure EndRender(var rci: TGLRenderContextInfo); virtual;
     procedure EndRender(var rci: TGLRenderContextInfo); virtual;
     procedure RenderOnce(var rci: TGLRenderContextInfo;
     procedure RenderOnce(var rci: TGLRenderContextInfo;
-      const objPos, localCameraPos: TVector;
+      const objPos, localCameraPos: TGLVector;
       size: Single);
       size: Single);
     property AspectRatio: Single read FAspectRatio write FAspectRatio;
     property AspectRatio: Single read FAspectRatio write FAspectRatio;
     property Builder: TGLImposterBuilder read FBuilder;
     property Builder: TGLImposterBuilder read FBuilder;
@@ -244,7 +244,7 @@ type
   TStaticImposter = class(TImposter)
   TStaticImposter = class(TImposter)
   public
   public
     procedure Render(var rci: TGLRenderContextInfo;
     procedure Render(var rci: TGLRenderContextInfo;
-      const objPos, localCameraPos: TVector;
+      const objPos, localCameraPos: TGLVector;
       size: Single); override;
       size: Single); override;
   end;
   end;
 
 
@@ -499,17 +499,17 @@ begin
 end;
 end;
 
 
 procedure TImposter.Render(var rci: TGLRenderContextInfo;
 procedure TImposter.Render(var rci: TGLRenderContextInfo;
-  const objPos, localCameraPos: TVector;
+  const objPos, localCameraPos: TGLVector;
   size: Single);
   size: Single);
 const
 const
-  cQuadTexExtents: TVector = (X:0; Y:0; Z:1; W:1);
+  cQuadTexExtents: TGLVector = (X:0; Y:0; Z:1; W:1);
 begin
 begin
   RenderQuad(cQuadTexExtents, objPos, size);
   RenderQuad(cQuadTexExtents, objPos, size);
 end;
 end;
 
 
-procedure TImposter.RenderQuad(const texExtents, objPos: TVector; size: Single);
+procedure TImposter.RenderQuad(const texExtents, objPos: TGLVector; size: Single);
 var
 var
-  pos: TVector;
+  pos: TGLVector;
 begin
 begin
   VectorCombine(objPos, FQuad[0], size, pos);
   VectorCombine(objPos, FQuad[0], size, pos);
   gl.TexCoord2f(texExtents.Z, texExtents.W);
   gl.TexCoord2f(texExtents.Z, texExtents.W);
@@ -532,7 +532,7 @@ begin
 end;
 end;
 
 
 procedure TImposter.RenderOnce(var rci: TGLRenderContextInfo;
 procedure TImposter.RenderOnce(var rci: TGLRenderContextInfo;
-  const objPos, localCameraPos: TVector;
+  const objPos, localCameraPos: TGLVector;
   size: Single);
   size: Single);
 begin
 begin
   BeginRender(rci);
   BeginRender(rci);
@@ -930,14 +930,14 @@ end;
 // ----------
 // ----------
 
 
 procedure TStaticImposter.Render(var rci: TGLRenderContextInfo;
 procedure TStaticImposter.Render(var rci: TGLRenderContextInfo;
-  const objPos, localCameraPos: TVector;
+  const objPos, localCameraPos: TGLVector;
   size: Single);
   size: Single);
 var
 var
   azimuthAngle: Single;
   azimuthAngle: Single;
   i: Integer;
   i: Integer;
   x, y: Word;
   x, y: Word;
   bestCorona: TGLStaticImposterBuilderCorona;
   bestCorona: TGLStaticImposterBuilderCorona;
-  texExtents: TVector;
+  texExtents: TGLVector;
   tdx, tdy: Single;
   tdx, tdy: Single;
   siBuilder: TGLStaticImposterBuilder;
   siBuilder: TGLStaticImposterBuilder;
 begin // inherited; exit;
 begin // inherited; exit;
@@ -1120,7 +1120,7 @@ procedure TGLStaticImposterBuilder.Render(var rci: TGLRenderContextInfo;
 var
 var
   i, coronaIdx, curSample: Integer;
   i, coronaIdx, curSample: Integer;
   radius: Single;
   radius: Single;
-  cameraDirection, cameraOffset: TVector;
+  cameraDirection, cameraOffset: TGLVector;
   xDest, xSrc, yDest, ySrc: Integer;
   xDest, xSrc, yDest, ySrc: Integer;
   corona: TGLStaticImposterBuilderCorona;
   corona: TGLStaticImposterBuilderCorona;
   fx, fy, yOffset: Single;
   fx, fy, yOffset: Single;
@@ -1303,7 +1303,7 @@ var
   i, size, Left, Top, Width, Height : Integer;
   i, size, Left, Top, Width, Height : Integer;
   imposter : TGLImposter;
   imposter : TGLImposter;
   mat, projection, modelview : TMatrix;
   mat, projection, modelview : TMatrix;
-  BackColor, pos, temp : TVector;
+  BackColor, pos, temp : TGLVector;
   rad : Single;
   rad : Single;
   AABB : TAABB;
   AABB : TAABB;
 begin
 begin
@@ -1454,7 +1454,7 @@ end;
 procedure TGLImposter.DoRender(var ARci: TGLRenderContextInfo;
 procedure TGLImposter.DoRender(var ARci: TGLRenderContextInfo;
   ARenderSelf, ARenderChildren: Boolean);
   ARenderSelf, ARenderChildren: Boolean);
 var
 var
-  camPos: TVector;
+  camPos: TGLVector;
   imposter: TImposter;
   imposter: TImposter;
 begin
 begin
   if ARenderSelf and Assigned(Builder) and Assigned(ImpostoredObject) then
   if ARenderSelf and Assigned(Builder) and Assigned(ImpostoredObject) then
@@ -1503,7 +1503,7 @@ begin
 end;
 end;
 
 
 {
 {
-function TGLImposter.AxisAlignedDimensionsUnscaled : TVector;
+function TGLImposter.AxisAlignedDimensionsUnscaled : TGLVector;
 begin
 begin
    Result:=NullHMGVector;
    Result:=NullHMGVector;
 end;
 end;

+ 2 - 2
Source/GLS.Isosurface.pas

@@ -1496,7 +1496,7 @@ var
   i: Integer;
   i: Integer;
   vx1, vx2, vx3: TGLVertexData;
   vx1, vx2, vx3: TGLVertexData;
 
 
-  function GetNrmColor(Nrm: TAffineVector): TVector;
+  function GetNrmColor(Nrm: TAffineVector): TGLVector;
   begin
   begin
     Result.V[0] := 0;
     Result.V[0] := 0;
     if Nrm.V[0] > 0.0 then
     if Nrm.V[0] > 0.0 then
@@ -1524,7 +1524,7 @@ var
     Result.V[3] := 0.3
     Result.V[3] := 0.3
   end;
   end;
 
 
-  function GetColor(H: TxScalarValue): TVector;
+  function GetColor(H: TxScalarValue): TGLVector;
   begin
   begin
     Result := VectorMake(0.890, 0.855, 0.788, Alpha)
     Result := VectorMake(0.890, 0.855, 0.788, Alpha)
     (*
     (*

+ 5 - 5
Source/GLS.MaterialEx.pas

@@ -738,7 +738,7 @@ type
     function GetFloat: Single; virtual;
     function GetFloat: Single; virtual;
     function GetVec2: TVector2f; virtual;
     function GetVec2: TVector2f; virtual;
     function GetVec3: TVector3f; virtual;
     function GetVec3: TVector3f; virtual;
-    function GetVec4: TVector; virtual;
+    function GetVec4: TGLVector; virtual;
     function GetInt: TGLint; virtual;
     function GetInt: TGLint; virtual;
     function GetIVec2: TVector2i; virtual;
     function GetIVec2: TVector2i; virtual;
     function GetIVec3: TVector3i; virtual;
     function GetIVec3: TVector3i; virtual;
@@ -787,7 +787,7 @@ type
     function GetFloat: Single; override;
     function GetFloat: Single; override;
     function GetVec2: TVector2f; override;
     function GetVec2: TVector2f; override;
     function GetVec3: TVector3f; override;
     function GetVec3: TVector3f; override;
-    function GetVec4: TVector; override;
+    function GetVec4: TGLVector; override;
     function GetInt: Integer; override;
     function GetInt: Integer; override;
     function GetIVec2: TVector2i; override;
     function GetIVec2: TVector2i; override;
     function GetIVec3: TVector3i; override;
     function GetIVec3: TVector3i; override;
@@ -3180,7 +3180,7 @@ end;
 procedure TGLMultitexturingProperties.Apply(var ARci: TGLRenderContextInfo);
 procedure TGLMultitexturingProperties.Apply(var ARci: TGLRenderContextInfo);
 var
 var
   N, U: Integer;
   N, U: Integer;
-  LDir: TVector;
+  LDir: TGLVector;
 begin
 begin
   if FEnabled then
   if FEnabled then
   begin
   begin
@@ -5775,7 +5775,7 @@ begin
   FillChar(Result, SizeOf(Result), $00);
   FillChar(Result, SizeOf(Result), $00);
 end;
 end;
 
 
-function TGLAbstractShaderUniform.GetVec4: TVector;
+function TGLAbstractShaderUniform.GetVec4: TGLVector;
 begin
 begin
   FillChar(Result, SizeOf(Result), $00);
   FillChar(Result, SizeOf(Result), $00);
 end;
 end;
@@ -5985,7 +5985,7 @@ begin
   gl.GetUniformfv(GetProgram, FLocation, @Result);
   gl.GetUniformfv(GetProgram, FLocation, @Result);
 end;
 end;
 
 
-function TGLShaderUniform.GetVec4: TVector;
+function TGLShaderUniform.GetVec4: TGLVector;
 begin
 begin
   gl.GetUniformfv(GetProgram, FLocation, @Result);
   gl.GetUniformfv(GetProgram, FLocation, @Result);
 end;
 end;

+ 6 - 6
Source/GLS.MaterialMultiProxy.pas

@@ -125,8 +125,8 @@ type
     destructor Destroy; override;
     destructor Destroy; override;
     procedure Assign(Source: TPersistent); override;
     procedure Assign(Source: TPersistent); override;
     procedure DoRender(var rci: TGLRenderContextInfo; renderSelf, renderChildren: Boolean); override;
     procedure DoRender(var rci: TGLRenderContextInfo; renderSelf, renderChildren: Boolean); override;
-    function AxisAlignedDimensionsUnscaled: TVector; override;
-    function RayCastIntersect(const rayStart, rayVector: TVector; intersectPoint: PVector = nil; intersectNormal: PVector = nil): Boolean; override;
+    function AxisAlignedDimensionsUnscaled: TGLVector; override;
+    function RayCastIntersect(const rayStart, rayVector: TGLVector; intersectPoint: PGLVector = nil; intersectNormal: PGLVector = nil): Boolean; override;
     function GenerateSilhouette(const silhouetteParameters: TGLSilhouetteParameters): TGLSilhouette; override;
     function GenerateSilhouette(const silhouetteParameters: TGLSilhouetteParameters): TGLSilhouette; override;
   published
   published
     property MasterObjects: TGLMaterialMultiProxyMasters read FMasterObjects write SetMasterObjects;
     property MasterObjects: TGLMaterialMultiProxyMasters read FMasterObjects write SetMasterObjects;
@@ -451,7 +451,7 @@ begin
     Result := nil;
     Result := nil;
 end;
 end;
 
 
-function TGLMaterialMultiProxy.AxisAlignedDimensionsUnscaled: TVector;
+function TGLMaterialMultiProxy.AxisAlignedDimensionsUnscaled: TGLVector;
 var
 var
   Master: TGLBaseSceneObject;
   Master: TGLBaseSceneObject;
 begin
 begin
@@ -462,10 +462,10 @@ begin
     Result := inherited AxisAlignedDimensionsUnscaled;
     Result := inherited AxisAlignedDimensionsUnscaled;
 end;
 end;
 
 
-function TGLMaterialMultiProxy.RayCastIntersect(const rayStart, rayVector: TVector;
-  intersectPoint: PVector = nil; intersectNormal: PVector = nil): Boolean;
+function TGLMaterialMultiProxy.RayCastIntersect(const rayStart, rayVector: TGLVector;
+  intersectPoint: PGLVector = nil; intersectNormal: PGLVector = nil): Boolean;
 var
 var
-  localRayStart, localRayVector: TVector;
+  localRayStart, localRayVector: TGLVector;
   Master: TGLBaseSceneObject;
   Master: TGLBaseSceneObject;
 begin
 begin
   Master := PrimaryMaster;
   Master := PrimaryMaster;

+ 4 - 4
Source/GLS.Mesh.pas

@@ -50,7 +50,7 @@ type
 
 
   TGLVertexData = packed record
   TGLVertexData = packed record
     textCoord: TTexPoint;
     textCoord: TTexPoint;
-    color: TVector;
+    color: TGLVector;
     normal: TAffineVector;
     normal: TAffineVector;
     coord: TVertex;
     coord: TVertex;
   end;
   end;
@@ -159,7 +159,7 @@ type
     FVertices: TGLVertexList;
     FVertices: TGLVertexList;
     FMode: TGLMeshMode;
     FMode: TGLMeshMode;
     FVertexMode: TGLVertexMode;
     FVertexMode: TGLVertexMode;
-    FAxisAlignedDimensionsCache: TVector;
+    FAxisAlignedDimensionsCache: TGLVector;
   protected
   protected
     procedure SetMode(AValue: TGLMeshMode);
     procedure SetMode(AValue: TGLMeshMode);
     procedure SetVertices(AValue: TGLVertexList);
     procedure SetVertices(AValue: TGLVertexList);
@@ -172,7 +172,7 @@ type
     procedure BuildList(var rci: TGLRenderContextInfo); override;
     procedure BuildList(var rci: TGLRenderContextInfo); override;
     procedure CalcNormals(Frontface: TGLFaceWinding);
     procedure CalcNormals(Frontface: TGLFaceWinding);
     property Vertices: TGLVertexList read FVertices write SetVertices;
     property Vertices: TGLVertexList read FVertices write SetVertices;
-    function AxisAlignedDimensionsUnscaled: TVector; override;
+    function AxisAlignedDimensionsUnscaled: TGLVector; override;
     procedure StructureChanged; override;
     procedure StructureChanged; override;
     function Length: Single;
     function Length: Single;
     function Area: Single;
     function Area: Single;
@@ -743,7 +743,7 @@ begin
     inherited Assign(Source);
     inherited Assign(Source);
 end;
 end;
 
 
-function TGLMesh.AxisAlignedDimensionsUnscaled: TVector;
+function TGLMesh.AxisAlignedDimensionsUnscaled: TGLVector;
 var
 var
   dMin, dMax: TAffineVector;
   dMin, dMax: TAffineVector;
 begin
 begin

+ 6 - 6
Source/GLS.MeshBSP.pas

@@ -29,13 +29,13 @@ uses
 type
 type
 
 
   TBSPCullingSphere = record
   TBSPCullingSphere = record
-    position: TVector;
+    position: TGLVector;
     radius: Single;
     radius: Single;
   end;
   end;
 
 
   TBSPRenderContextInfo = record
   TBSPRenderContextInfo = record
     // Local coordinates of the camera (can be a vector or point)
     // Local coordinates of the camera (can be a vector or point)
-    cameraLocal: TVector;
+    cameraLocal: TGLVector;
     rci: PRenderContextInfo;
     rci: PRenderContextInfo;
     faceGroups: TList;
     faceGroups: TList;
     cullingSpheres: array of TBSPCullingSphere;
     cullingSpheres: array of TBSPCullingSphere;
@@ -85,7 +85,7 @@ type
       of tree balancing (structurally speaking, not polygon-wise). *)
       of tree balancing (structurally speaking, not polygon-wise). *)
     function AverageDepth: Single;
     function AverageDepth: Single;
     // Traverses the tree to the given point and returns the node index.
     // Traverses the tree to the given point and returns the node index.
-    function FindNodeByPoint(const aPoint: TVector): TFGBSPNode;
+    function FindNodeByPoint(const aPoint: TGLVector): TFGBSPNode;
     (*  Rendering sort mode.
     (*  Rendering sort mode.
       This sort mode can currently *not* blend with the sort by materials
       This sort mode can currently *not* blend with the sort by materials
       flag, default mode is rsBackToFront.
       flag, default mode is rsBackToFront.
@@ -278,10 +278,10 @@ var
   renderNode: Boolean;
   renderNode: Boolean;
   camNode: TFGBSPNode;
   camNode: TFGBSPNode;
 
 
-  procedure AbsoluteSphereToLocal(const absPos: TVector; absRadius: Single;
+  procedure AbsoluteSphereToLocal(const absPos: TGLVector; absRadius: Single;
     var local: TBSPCullingSphere);
     var local: TBSPCullingSphere);
   var
   var
-    v: TVector;
+    v: TGLVector;
   begin
   begin
     local.position := Owner.Owner.AbsoluteToLocal(absPos);
     local.position := Owner.Owner.AbsoluteToLocal(absPos);
     SetVector(v, absRadius, absRadius, absRadius, 0);
     SetVector(v, absRadius, absRadius, absRadius, 0);
@@ -500,7 +500,7 @@ begin
   end;
   end;
 end;
 end;
 
 
-function TBSPMeshObject.FindNodeByPoint(const aPoint: TVector): TFGBSPNode;
+function TBSPMeshObject.FindNodeByPoint(const aPoint: TGLVector): TFGBSPNode;
 
 
   function Traverse(nodeIndex: Integer): Integer;
   function Traverse(nodeIndex: Integer): Integer;
   var
   var

+ 1 - 1
Source/GLS.MeshLines.pas

@@ -602,7 +602,7 @@ end;
 
 
 procedure TGLMeshLines.DrawCircle(Radius: Single);
 procedure TGLMeshLines.DrawCircle(Radius: Single);
 var
 var
-  inner,outer,p1,p2: TVector;
+  inner,outer,p1,p2: TGLVector;
   i: Integer;
   i: Integer;
   a: Single;
   a: Single;
   lUp: TAffineVector;
   lUp: TAffineVector;

+ 3 - 3
Source/GLS.Mirror.pas

@@ -79,7 +79,7 @@ type
       ARenderSelf, ARenderChildren: Boolean); override;
       ARenderSelf, ARenderChildren: Boolean); override;
     procedure BuildList(var ARci: TGLRenderContextInfo); override;
     procedure BuildList(var ARci: TGLRenderContextInfo); override;
     procedure Assign(Source: TPersistent); override;
     procedure Assign(Source: TPersistent); override;
-    function AxisAlignedDimensionsUnscaled: TVector; override;
+    function AxisAlignedDimensionsUnscaled: TGLVector; override;
   published
   published
     // Selects the object to mirror. If nil, the whole scene is mirrored 
     // Selects the object to mirror. If nil, the whole scene is mirrored 
     property MirrorObject: TGLBaseSceneObject read FMirrorObject write
     property MirrorObject: TGLBaseSceneObject read FMirrorObject write
@@ -142,7 +142,7 @@ var
   refMat, curMat, ModelMat: TMatrix;
   refMat, curMat, ModelMat: TMatrix;
   clipPlane: TDoubleHmgPlane;
   clipPlane: TDoubleHmgPlane;
   bgColor: TColorVector;
   bgColor: TColorVector;
-  cameraPosBackup, cameraDirectionBackup: TVector;
+  cameraPosBackup, cameraDirectionBackup: TGLVector;
   CurrentBuffer: TGLSceneBuffer;
   CurrentBuffer: TGLSceneBuffer;
 begin
 begin
   if FRendering then
   if FRendering then
@@ -411,7 +411,7 @@ begin
 end;
 end;
 
 
 
 
-function TGLMirror.AxisAlignedDimensionsUnscaled: TVector;
+function TGLMirror.AxisAlignedDimensionsUnscaled: TGLVector;
 begin
 begin
   Result := VectorMake(0.5 * Abs(FWidth),
   Result := VectorMake(0.5 * Abs(FWidth),
     0.5 * Abs(FHeight), 0);
     0.5 * Abs(FHeight), 0);

+ 16 - 16
Source/GLS.Movement.pas

@@ -34,15 +34,15 @@ type
 
 
   TGLPathNode = class (TCollectionItem)
   TGLPathNode = class (TCollectionItem)
   private
   private
-    FPosition: TVector;
-    FScale: TVector;
-    FRotation: TVector;
-    FDirection: TVector;
-    FUp: TVector;
+    FPosition: TGLVector;
+    FScale: TGLVector;
+    FRotation: TGLVector;
+    FDirection: TGLVector;
+    FUp: TGLVector;
     FSpeed: single;
     FSpeed: single;
-    procedure SetPositionAsVector(const Value: TVector);
-    procedure SetRotationAsVector(const Value: TVector);
-    procedure SetScaleAsVector(const Value: TVector);
+    procedure SetPositionAsVector(const Value: TGLVector);
+    procedure SetRotationAsVector(const Value: TGLVector);
+    procedure SetScaleAsVector(const Value: TGLVector);
     function GetPositionCoordinate(const Index: Integer): TGLFloat;
     function GetPositionCoordinate(const Index: Integer): TGLFloat;
     procedure SetPositionCoordinate(const Index: integer; const AValue: TGLFloat);
     procedure SetPositionCoordinate(const Index: integer; const AValue: TGLFloat);
     function GetRotationCoordinate(const Index: Integer): TGLFloat; inline;
     function GetRotationCoordinate(const Index: Integer): TGLFloat; inline;
@@ -69,11 +69,11 @@ type
     {Warning: does not take speed into account. }
     {Warning: does not take speed into account. }
     function EqualNode(const aNode: TGLPathNode): boolean;
     function EqualNode(const aNode: TGLPathNode): boolean;
     {Rotation.X means PitchAngle, Rotation.Y means TurnAngle, Rotation.Z means RollAngle.}
     {Rotation.X means PitchAngle, Rotation.Y means TurnAngle, Rotation.Z means RollAngle.}
-    property RotationAsVector: TVector Read FRotation Write SetRotationAsVector;
-    property PositionAsVector: TVector Read FPosition Write SetPositionAsVector;
-    property ScaleAsVector: TVector Read FScale Write SetScaleAsVector;
-    property UpAsVector: TVector read FUp write FUp;
-    property DirectionAsVector: TVector read FDirection write FDirection;
+    property RotationAsVector: TGLVector Read FRotation Write SetRotationAsVector;
+    property PositionAsVector: TGLVector Read FPosition Write SetPositionAsVector;
+    property ScaleAsVector: TGLVector Read FScale Write SetScaleAsVector;
+    property UpAsVector: TGLVector read FUp write FUp;
+    property DirectionAsVector: TGLVector read FDirection write FDirection;
   published
   published
     property X: TGLFloat index 0 Read GetPositionCoordinate Write SetPositionCoordinate;
     property X: TGLFloat index 0 Read GetPositionCoordinate Write SetPositionCoordinate;
     property Y: TGLFloat index 1 Read GetPositionCoordinate Write SetPositionCoordinate;
     property Y: TGLFloat index 1 Read GetPositionCoordinate Write SetPositionCoordinate;
@@ -303,19 +303,19 @@ begin
   inherited Destroy;
   inherited Destroy;
 end;
 end;
 
 
-procedure TGLPathNode.SetPositionAsVector(const Value: TVector);
+procedure TGLPathNode.SetPositionAsVector(const Value: TGLVector);
 begin
 begin
   FPosition := Value;
   FPosition := Value;
     (Collection as TGLPathNodes).NotifyChange;
     (Collection as TGLPathNodes).NotifyChange;
 end;
 end;
 
 
-procedure TGLPathNode.SetRotationAsVector(const Value: TVector);
+procedure TGLPathNode.SetRotationAsVector(const Value: TGLVector);
 begin
 begin
   FRotation := Value;
   FRotation := Value;
     (Collection as TGLPathNodes).NotifyChange;
     (Collection as TGLPathNodes).NotifyChange;
 end;
 end;
 
 
-procedure TGLPathNode.SetScaleAsVector(const Value: TVector);
+procedure TGLPathNode.SetScaleAsVector(const Value: TGLVector);
 begin
 begin
   FScale := Value;
   FScale := Value;
     (Collection as TGLPathNodes).NotifyChange;
     (Collection as TGLPathNodes).NotifyChange;

+ 5 - 5
Source/GLS.MultiPolygon.pas

@@ -121,7 +121,7 @@ type
     FContours: TGLContours;
     FContours: TGLContours;
     FOutline: TGLPolygonList;
     FOutline: TGLPolygonList;
     FContoursNormal: TAffineVector;
     FContoursNormal: TAffineVector;
-    FAxisAlignedDimensionsCache: TVector;
+    FAxisAlignedDimensionsCache: TGLVector;
     procedure SetContours(const Value: TGLContours);
     procedure SetContours(const Value: TGLContours);
     function GetPath(i: Integer): TGLContourNodes;
     function GetPath(i: Integer): TGLContourNodes;
     procedure SetPath(i: Integer; const value: TGLContourNodes);
     procedure SetPath(i: Integer; const value: TGLContourNodes);
@@ -139,12 +139,12 @@ type
     procedure Assign(Source: TPersistent); override;
     procedure Assign(Source: TPersistent); override;
     procedure AddNode(const i: Integer; const coords: TGLCoordinates); overload;
     procedure AddNode(const i: Integer; const coords: TGLCoordinates); overload;
     procedure AddNode(const i: Integer; const X, Y, Z: TGLfloat); overload;
     procedure AddNode(const i: Integer; const X, Y, Z: TGLfloat); overload;
-    procedure AddNode(const i: Integer; const value: TVector); overload;
+    procedure AddNode(const i: Integer; const value: TGLVector); overload;
     procedure AddNode(const i: Integer; const value: TAffineVector); overload;
     procedure AddNode(const i: Integer; const value: TAffineVector); overload;
     property Path[i: Integer]: TGLContourNodes read GetPath write SetPath;
     property Path[i: Integer]: TGLContourNodes read GetPath write SetPath;
     property Outline: TGLPolygonList read GetOutline;
     property Outline: TGLPolygonList read GetOutline;
     property ContoursNormal: TAffineVector read FContoursNormal write SetContoursNormal;
     property ContoursNormal: TAffineVector read FContoursNormal write SetContoursNormal;
-    function AxisAlignedDimensionsUnscaled: TVector; override;
+    function AxisAlignedDimensionsUnscaled: TGLVector; override;
     procedure StructureChanged; override;
     procedure StructureChanged; override;
   published
   published
     property Contours: TGLContours read FContours write SetContours;
     property Contours: TGLContours read FContours write SetContours;
@@ -422,7 +422,7 @@ begin
 end;
 end;
 
 
 
 
-procedure TGLMultiPolygonBase.AddNode(const i: Integer; const value: TVector);
+procedure TGLMultiPolygonBase.AddNode(const i: Integer; const value: TGLVector);
 begin
 begin
   Path[i].AddNode(value);
   Path[i].AddNode(value);
 end;
 end;
@@ -758,7 +758,7 @@ begin
 end;
 end;
 
 
 
 
-function TGLMultiPolygonBase.AxisAlignedDimensionsUnscaled: TVector;
+function TGLMultiPolygonBase.AxisAlignedDimensionsUnscaled: TGLVector;
 var
 var
   dMin, dMax: TAffineVector;
   dMin, dMax: TAffineVector;
 begin
 begin

+ 9 - 9
Source/GLS.MultiProxy.pas

@@ -98,10 +98,10 @@ type
 	      procedure Assign(Source: TPersistent); override;
 	      procedure Assign(Source: TPersistent); override;
          procedure DoRender(var rci : TGLRenderContextInfo;
          procedure DoRender(var rci : TGLRenderContextInfo;
                             renderSelf, renderChildren : Boolean); override;
                             renderSelf, renderChildren : Boolean); override;
-         function AxisAlignedDimensionsUnscaled : TVector; override;
-         function RayCastIntersect(const rayStart, rayVector : TVector;
-                                 intersectPoint : PVector = nil;
-                                 intersectNormal : PVector = nil) : Boolean; override;
+         function AxisAlignedDimensionsUnscaled : TGLVector; override;
+         function RayCastIntersect(const rayStart, rayVector : TGLVector;
+                                 intersectPoint : PGLVector = nil;
+                                 intersectNormal : PGLVector = nil) : Boolean; override;
          function GenerateSilhouette(const silhouetteParameters : TGLSilhouetteParameters) : TGLSilhouette; override;
          function GenerateSilhouette(const silhouetteParameters : TGLSilhouetteParameters) : TGLSilhouette; override;
       published
       published
          property MasterObjects : TGLMultiProxyMasters read FMasterObjects write SetMasterObjects;
          property MasterObjects : TGLMultiProxyMasters read FMasterObjects write SetMasterObjects;
@@ -352,7 +352,7 @@ begin
    else Result:=nil;
    else Result:=nil;
 end;
 end;
 
 
-function TGLMultiProxy.AxisAlignedDimensionsUnscaled : TVector;
+function TGLMultiProxy.AxisAlignedDimensionsUnscaled : TGLVector;
 var
 var
    master : TGLBaseSceneObject;
    master : TGLBaseSceneObject;
 begin
 begin
@@ -362,11 +362,11 @@ begin
    end else Result:=inherited AxisAlignedDimensionsUnscaled;
    end else Result:=inherited AxisAlignedDimensionsUnscaled;
 end;
 end;
 
 
-function TGLMultiProxy.RayCastIntersect(const rayStart, rayVector : TVector;
-                                 intersectPoint : PVector = nil;
-                                 intersectNormal : PVector = nil) : Boolean;
+function TGLMultiProxy.RayCastIntersect(const rayStart, rayVector : TGLVector;
+                                 intersectPoint : PGLVector = nil;
+                                 intersectNormal : PGLVector = nil) : Boolean;
 var
 var
-   localRayStart, localRayVector : TVector;
+   localRayStart, localRayVector : TGLVector;
    master : TGLBaseSceneObject;
    master : TGLBaseSceneObject;
 begin
 begin
    master:=PrimaryMaster;
    master:=PrimaryMaster;

+ 13 - 13
Source/GLS.Navigator.pas

@@ -57,7 +57,7 @@ type
   TGLNavigator = class(TComponent)
   TGLNavigator = class(TComponent)
   private
   private
     FObject: TGLBaseSceneObject;
     FObject: TGLBaseSceneObject;
-    FVirtualRight: TVector;
+    FVirtualRight: TGLVector;
     FVirtualUp: TGLCoordinates;
     FVirtualUp: TGLCoordinates;
     FUseVirtualUp: boolean;
     FUseVirtualUp: boolean;
     FAutoUpdateObject: boolean;
     FAutoUpdateObject: boolean;
@@ -74,7 +74,7 @@ type
     procedure SetObject(NewObject: TGLBaseSceneObject); virtual;
     procedure SetObject(NewObject: TGLBaseSceneObject); virtual;
     procedure SetUseVirtualUp(UseIt: boolean);
     procedure SetUseVirtualUp(UseIt: boolean);
     procedure SetVirtualUp(Up: TGLCoordinates);
     procedure SetVirtualUp(Up: TGLCoordinates);
-    function CalcRight: TVector;
+    function CalcRight: TGLVector;
   public
   public
     constructor Create(AOwner: TComponent); override;
     constructor Create(AOwner: TComponent); override;
     destructor Destroy; override;
     destructor Destroy; override;
@@ -160,7 +160,7 @@ type
     FDelta, FFps, FTimer, FInactiveTime: single;
     FDelta, FFps, FTimer, FInactiveTime: single;
     FCube: TGLDummyCube;
     FCube: TGLDummyCube;
     FSel: integer;
     FSel: integer;
-    FSelPos: TVector;
+    FSelPos: TGLVector;
     FCam, FNaviCam: TGLCamera;
     FCam, FNaviCam: TGLCamera;
     FHud: TGLHUDSprite;
     FHud: TGLHUDSprite;
     FMem: TGLMemoryViewer;
     FMem: TGLMemoryViewer;
@@ -168,8 +168,8 @@ type
     FReady, FMouse: boolean;
     FReady, FMouse: boolean;
     FMouseRotation: boolean;
     FMouseRotation: boolean;
     FMousePos: TPoint;
     FMousePos: TPoint;
-    FPosAnimationStart: TVector;
-    FPosAnimationEnd: TVector;
+    FPosAnimationStart: TGLVector;
+    FPosAnimationEnd: TGLVector;
   public
   public
     constructor CreateAsChild(aParentOwner: TGLBaseSceneObject); reintroduce;
     constructor CreateAsChild(aParentOwner: TGLBaseSceneObject); reintroduce;
     procedure DoProgress(const pt: TGLProgressTimes); override;
     procedure DoProgress(const pt: TGLProgressTimes); override;
@@ -241,7 +241,7 @@ begin
   inherited;
   inherited;
 end;
 end;
 
 
-Function TGLNavigator.CalcRight: TVector;
+Function TGLNavigator.CalcRight: TGLVector;
 
 
 begin
 begin
   If Assigned(FObject) then
   If Assigned(FObject) then
@@ -259,7 +259,7 @@ end;
 procedure TGLNavigator.TurnHorizontal(Angle: single);
 procedure TGLNavigator.TurnHorizontal(Angle: single);
 
 
 Var
 Var
-  T: TVector;
+  T: TGLVector;
   U: TAffineVector;
   U: TAffineVector;
   TempVal: single;
   TempVal: single;
 
 
@@ -299,7 +299,7 @@ Var
   ExpectedAngle: single;
   ExpectedAngle: single;
   CosAngle, SinAngle: single;
   CosAngle, SinAngle: single;
   TempVal: single;
   TempVal: single;
-  Direction: TVector;
+  Direction: TGLVector;
 
 
 begin
 begin
   ExpectedAngle := FCurrentVAngle + Angle;
   ExpectedAngle := FCurrentVAngle + Angle;
@@ -379,8 +379,8 @@ end;
 procedure TGLNavigator.Straighten;
 procedure TGLNavigator.Straighten;
 
 
 Var
 Var
-  R: TVector;
-  D: TVector;
+  R: TGLVector;
+  D: TGLVector;
   A: single;
   A: single;
 
 
 begin
 begin
@@ -778,7 +778,7 @@ end;
 
 
 procedure TGLNaviCube.DoProgress(const pt: TGLProgressTimes);
 procedure TGLNaviCube.DoProgress(const pt: TGLProgressTimes);
 const
 const
-  tb: array [0 .. 1] of array [0 .. 3] of TVector = (((x: 0; Y: 20; z: 1;
+  tb: array [0 .. 1] of array [0 .. 3] of TGLVector = (((x: 0; Y: 20; z: 1;
     W: 0), (x: 1; Y: 20; z: 0; W: 0), (x: 0; Y: 20; z: - 1; W: 0), (x: - 1;
     W: 0), (x: 1; Y: 20; z: 0; W: 0), (x: 0; Y: 20; z: - 1; W: 0), (x: - 1;
     Y: 20; z: 0; W: 0)), ((x: 0; Y: - 20; z: 1; W: 0), (x: 1; Y: - 20; z: 0;
     Y: 20; z: 0; W: 0)), ((x: 0; Y: - 20; z: 1; W: 0), (x: 1; Y: - 20; z: 0;
     W: 0), (x: 0; Y: - 20; z: - 1; W: 0), (x: - 1; Y: - 20; z: 0; W: 0)));
     W: 0), (x: 0; Y: - 20; z: - 1; W: 0), (x: - 1; Y: - 20; z: 0; W: 0)));
@@ -786,10 +786,10 @@ var
   mp: TPoint;
   mp: TPoint;
   mover: boolean;
   mover: boolean;
   i: integer;
   i: integer;
-  v0, v1, v2, v: TVector;
+  v0, v1, v2, v: TGLVector;
   obj: TGLBaseSceneObject;
   obj: TGLBaseSceneObject;
 
 
-  procedure moveTo(trgv: TVector);
+  procedure moveTo(trgv: TGLVector);
   begin
   begin
     FPosAnimationStart := FCam.Position.AsVector;
     FPosAnimationStart := FCam.Position.AsVector;
     FPosAnimationEnd := FCam.TargetObject.AbsoluteToLocal
     FPosAnimationEnd := FCam.TargetObject.AbsoluteToLocal

+ 6 - 6
Source/GLS.Nodes.pas

@@ -26,9 +26,9 @@ uses
 type
 type
   TGLNode = class(TCollectionItem)
   TGLNode = class(TCollectionItem)
   private
   private
-    FCoords: TVector;
+    FCoords: TGLVector;
     FTagObject: TObject;
     FTagObject: TObject;
-    procedure SetAsVector(const Value: TVector);
+    procedure SetAsVector(const Value: TGLVector);
     procedure SetAsAffineVector(const Value: TAffineVector);
     procedure SetAsAffineVector(const Value: TAffineVector);
     function GetAsAffineVector: TAffineVector;
     function GetAsAffineVector: TAffineVector;
     procedure SetCoordinate(AIndex: Integer; AValue: TGLFloat);
     procedure SetCoordinate(AIndex: Integer; AValue: TGLFloat);
@@ -44,7 +44,7 @@ type
     (* The coordinates viewed as a vector.
     (* The coordinates viewed as a vector.
       Assigning a value to this property will trigger notification events,
       Assigning a value to this property will trigger notification events,
       if you don't want so, use DirectVector instead. *)
       if you don't want so, use DirectVector instead. *)
-    property AsVector: TVector read FCoords write SetAsVector;
+    property AsVector: TGLVector read FCoords write SetAsVector;
     (* The coordinates viewed as an affine vector.
     (* The coordinates viewed as an affine vector.
       Assigning a value to this property will trigger notification events,
       Assigning a value to this property will trigger notification events,
       if you don't want so, use DirectVector instead.
       if you don't want so, use DirectVector instead.
@@ -76,7 +76,7 @@ type
     // AddNode (TGLCustomCoordinates)
     // AddNode (TGLCustomCoordinates)
     procedure AddNode(const Coords: TGLCustomCoordinates); overload;
     procedure AddNode(const Coords: TGLCustomCoordinates); overload;
     procedure AddNode(const X, Y, Z: TGLfloat); overload;
     procedure AddNode(const X, Y, Z: TGLfloat); overload;
-    procedure AddNode(const Value: TVector); overload;
+    procedure AddNode(const Value: TGLVector); overload;
     procedure AddNode(const Value: TAffineVector); overload;
     procedure AddNode(const Value: TAffineVector); overload;
     procedure AddXYArc(XRadius, YRadius: Single; StartAngle, StopAngle: Single; NbSegments: Integer;
     procedure AddXYArc(XRadius, YRadius: Single; StartAngle, StopAngle: Single; NbSegments: Integer;
       const Center: TAffineVector);
       const Center: TAffineVector);
@@ -153,7 +153,7 @@ begin
   Result := @FCoords;
   Result := @FCoords;
 end;
 end;
 
 
-procedure TGLNode.SetAsVector(const Value: TVector);
+procedure TGLNode.SetAsVector(const Value: TGLVector);
 begin
 begin
   FCoords := Value;
   FCoords := Value;
   (Collection as TGLNodes).NotifyChange;
   (Collection as TGLNodes).NotifyChange;
@@ -278,7 +278,7 @@ begin
   Add.AsVector := PointMake(X, Y, Z);
   Add.AsVector := PointMake(X, Y, Z);
 end;
 end;
 
 
-procedure TGLNodes.AddNode(const Value: TVector);
+procedure TGLNodes.AddNode(const Value: TGLVector);
 begin
 begin
   Add.AsVector := Value;
   Add.AsVector := Value;
 end;
 end;

+ 54 - 54
Source/GLS.Objects.pas

@@ -87,15 +87,15 @@ type
     constructor Create(AOwner: TComponent); override;
     constructor Create(AOwner: TComponent); override;
     destructor Destroy; override;
     destructor Destroy; override;
     procedure Assign(Source: TPersistent); override;
     procedure Assign(Source: TPersistent); override;
-    function AxisAlignedDimensionsUnscaled: TVector; override;
-    function RayCastIntersect(const rayStart, rayVector: TVector;
-      intersectPoint: PVector = nil; intersectNormal: PVector = nil)
+    function AxisAlignedDimensionsUnscaled: TGLVector; override;
+    function RayCastIntersect(const rayStart, rayVector: TGLVector;
+      intersectPoint: PGLVector = nil; intersectNormal: PGLVector = nil)
       : Boolean; override;
       : Boolean; override;
     procedure BuildList(var rci: TGLRenderContextInfo); override;
     procedure BuildList(var rci: TGLRenderContextInfo); override;
     procedure DoRender(var rci: TGLRenderContextInfo;
     procedure DoRender(var rci: TGLRenderContextInfo;
       renderSelf, renderChildren: Boolean); override;
       renderSelf, renderChildren: Boolean); override;
     procedure StructureChanged; override;
     procedure StructureChanged; override;
-    function BarycenterAbsolutePosition: TVector; override;
+    function BarycenterAbsolutePosition: TGLVector; override;
   published
   published
     property CubeSize: TGLFloat read FCubeSize write SetCubeSize;
     property CubeSize: TGLFloat read FCubeSize write SetCubeSize;
     property EdgeColor: TGLColor read FEdgeColor write SetEdgeColor;
     property EdgeColor: TGLColor read FEdgeColor write SetEdgeColor;
@@ -161,16 +161,16 @@ type
     procedure BuildList(var rci: TGLRenderContextInfo); override;
     procedure BuildList(var rci: TGLRenderContextInfo); override;
     function GenerateSilhouette(const silhouetteParameters
     function GenerateSilhouette(const silhouetteParameters
       : TGLSilhouetteParameters): TGLSilhouette; override;
       : TGLSilhouetteParameters): TGLSilhouette; override;
-    function AxisAlignedDimensionsUnscaled: TVector; override;
-    function RayCastIntersect(const rayStart, rayVector: TVector;
-      intersectPoint: PVector = nil; intersectNormal: PVector = nil)
+    function AxisAlignedDimensionsUnscaled: TGLVector; override;
+    function RayCastIntersect(const rayStart, rayVector: TGLVector;
+      intersectPoint: PGLVector = nil; intersectNormal: PGLVector = nil)
       : Boolean; override;
       : Boolean; override;
     (* Computes the screen coordinates of the smallest rectangle encompassing the plane.
     (* Computes the screen coordinates of the smallest rectangle encompassing the plane.
       Returned extents are NOT limited to any physical screen extents. *)
       Returned extents are NOT limited to any physical screen extents. *)
     function ScreenRect(aBuffer: TGLSceneBuffer): TRect;
     function ScreenRect(aBuffer: TGLSceneBuffer): TRect;
     (* Computes the signed distance to the point.
     (* Computes the signed distance to the point.
       Point coordinates are expected in absolute coordinates. *)
       Point coordinates are expected in absolute coordinates. *)
-    function PointDistance(const aPoint: TVector): Single;
+    function PointDistance(const aPoint: TGLVector): Single;
   published
   published
     property Height: TGLFloat read FHeight write SetHeight;
     property Height: TGLFloat read FHeight write SetHeight;
     property Width: TGLFloat read FWidth write SetWidth;
     property Width: TGLFloat read FWidth write SetWidth;
@@ -206,7 +206,7 @@ type
     constructor Create(AOwner: TComponent); override;
     constructor Create(AOwner: TComponent); override;
     procedure Assign(Source: TPersistent); override;
     procedure Assign(Source: TPersistent); override;
     procedure BuildList(var rci: TGLRenderContextInfo); override;
     procedure BuildList(var rci: TGLRenderContextInfo); override;
-    function AxisAlignedDimensionsUnscaled: TVector; override;
+    function AxisAlignedDimensionsUnscaled: TGLVector; override;
     procedure SetSize(const Width, Height: TGLFloat);
     procedure SetSize(const Width, Height: TGLFloat);
     // Set width and height to "size"
     // Set width and height to "size"
     procedure SetSquareSize(const Size: TGLFloat);
     procedure SetSquareSize(const Size: TGLFloat);
@@ -410,10 +410,10 @@ type
     constructor Create(AOwner: TComponent); override;
     constructor Create(AOwner: TComponent); override;
     destructor Destroy; override;
     destructor Destroy; override;
     procedure Assign(Source: TPersistent); override;
     procedure Assign(Source: TPersistent); override;
-    function AxisAlignedDimensionsUnscaled: TVector; override;
+    function AxisAlignedDimensionsUnscaled: TGLVector; override;
     procedure AddNode(const coords: TGLCoordinates); overload;
     procedure AddNode(const coords: TGLCoordinates); overload;
     procedure AddNode(const X, Y, Z: TGLFloat); overload;
     procedure AddNode(const X, Y, Z: TGLFloat); overload;
-    procedure AddNode(const Value: TVector); overload;
+    procedure AddNode(const Value: TGLVector); overload;
     procedure AddNode(const Value: TAffineVector); overload;
     procedure AddNode(const Value: TAffineVector); overload;
   published
   published
     // Default color for nodes. lnaInvisible and lnaAxes ignore this setting
     // Default color for nodes. lnaInvisible and lnaAxes ignore this setting
@@ -503,9 +503,9 @@ type
       : TGLSilhouetteParameters): TGLSilhouette; override;
       : TGLSilhouetteParameters): TGLSilhouette; override;
     procedure BuildList(var rci: TGLRenderContextInfo); override;
     procedure BuildList(var rci: TGLRenderContextInfo); override;
     procedure Assign(Source: TPersistent); override;
     procedure Assign(Source: TPersistent); override;
-    function AxisAlignedDimensionsUnscaled: TVector; override;
-    function RayCastIntersect(const rayStart, rayVector: TVector;
-      intersectPoint: PVector = nil; intersectNormal: PVector = nil)
+    function AxisAlignedDimensionsUnscaled: TGLVector; override;
+    function RayCastIntersect(const rayStart, rayVector: TGLVector;
+      intersectPoint: PGLVector = nil; intersectNormal: PGLVector = nil)
       : Boolean; override;
       : Boolean; override;
   published
   published
     property CubeWidth: TGLFloat index 0 read GetCubeWHD write SetCubeWHD
     property CubeWidth: TGLFloat index 0 read GetCubeWHD write SetCubeWHD
@@ -578,9 +578,9 @@ type
     constructor Create(AOwner: TComponent); override;
     constructor Create(AOwner: TComponent); override;
     procedure Assign(Source: TPersistent); override;
     procedure Assign(Source: TPersistent); override;
     procedure BuildList(var rci: TGLRenderContextInfo); override;
     procedure BuildList(var rci: TGLRenderContextInfo); override;
-    function AxisAlignedDimensionsUnscaled: TVector; override;
-    function RayCastIntersect(const rayStart, rayVector: TVector;
-      intersectPoint: PVector = nil; intersectNormal: PVector = nil)
+    function AxisAlignedDimensionsUnscaled: TGLVector; override;
+    function RayCastIntersect(const rayStart, rayVector: TGLVector;
+      intersectPoint: PGLVector = nil; intersectNormal: PGLVector = nil)
       : Boolean; override;
       : Boolean; override;
     function GenerateSilhouette(const silhouetteParameters
     function GenerateSilhouette(const silhouetteParameters
       : TGLSilhouetteParameters): TGLSilhouette; override;
       : TGLSilhouetteParameters): TGLSilhouette; override;
@@ -615,7 +615,7 @@ type
     procedure NotifyChange(Sender: TObject); override;
     procedure NotifyChange(Sender: TObject); override;
     procedure AddNode(const coords: TGLCoordinates); overload;
     procedure AddNode(const coords: TGLCoordinates); overload;
     procedure AddNode(const X, Y, Z: TGLFloat); overload;
     procedure AddNode(const X, Y, Z: TGLFloat); overload;
-    procedure AddNode(const Value: TVector); overload;
+    procedure AddNode(const Value: TGLVector); overload;
     procedure AddNode(const Value: TAffineVector); overload;
     procedure AddNode(const Value: TAffineVector); overload;
   published
   published
     // The nodes list.
     // The nodes list.
@@ -655,9 +655,9 @@ type
     constructor Create(AOwner: TComponent); override;
     constructor Create(AOwner: TComponent); override;
     procedure Assign(Source: TPersistent); override;
     procedure Assign(Source: TPersistent); override;
     procedure BuildList(var rci: TGLRenderContextInfo); override;
     procedure BuildList(var rci: TGLRenderContextInfo); override;
-    function AxisAlignedDimensionsUnscaled: TVector; override;
-    function RayCastIntersect(const rayStart, rayVector: TVector;
-      intersectPoint: PVector = nil; intersectNormal: PVector = nil)
+    function AxisAlignedDimensionsUnscaled: TGLVector; override;
+    function RayCastIntersect(const rayStart, rayVector: TGLVector;
+      intersectPoint: PGLVector = nil; intersectNormal: PGLVector = nil)
       : Boolean; override;
       : Boolean; override;
     function GenerateSilhouette(const silhouetteParameters
     function GenerateSilhouette(const silhouetteParameters
       : TGLSilhouetteParameters): TGLSilhouette; override;
       : TGLSilhouetteParameters): TGLSilhouette; override;
@@ -774,7 +774,7 @@ begin
   inherited Assign(Source);
   inherited Assign(Source);
 end;
 end;
 
 
-function TGLDummyCube.AxisAlignedDimensionsUnscaled: TVector;
+function TGLDummyCube.AxisAlignedDimensionsUnscaled: TGLVector;
 begin
 begin
   Result.X := 0.5 * Abs(FCubeSize);
   Result.X := 0.5 * Abs(FCubeSize);
   Result.Y := Result.X;
   Result.Y := Result.X;
@@ -782,8 +782,8 @@ begin
   Result.W := 0;
   Result.W := 0;
 end;
 end;
 
 
-function TGLDummyCube.RayCastIntersect(const rayStart, rayVector: TVector;
-  intersectPoint: PVector = nil; intersectNormal: PVector = nil): Boolean;
+function TGLDummyCube.RayCastIntersect(const rayStart, rayVector: TGLVector;
+  intersectPoint: PGLVector = nil; intersectNormal: PGLVector = nil): Boolean;
 begin
 begin
   Result := False;
   Result := False;
 end;
 end;
@@ -831,7 +831,7 @@ begin
   inherited;
   inherited;
 end;
 end;
 
 
-function TGLDummyCube.BarycenterAbsolutePosition: TVector;
+function TGLDummyCube.BarycenterAbsolutePosition: TGLVector;
 var
 var
   i: Integer;
   i: Integer;
 begin
 begin
@@ -919,17 +919,17 @@ begin
   inherited Assign(Source);
   inherited Assign(Source);
 end;
 end;
 
 
-function TGLPlane.AxisAlignedDimensionsUnscaled: TVector;
+function TGLPlane.AxisAlignedDimensionsUnscaled: TGLVector;
 begin
 begin
   Result.X := 0.5 * Abs(FWidth);
   Result.X := 0.5 * Abs(FWidth);
   Result.Y := 0.5 * Abs(FHeight);
   Result.Y := 0.5 * Abs(FHeight);
   Result.Z := 0;
   Result.Z := 0;
 end;
 end;
 
 
-function TGLPlane.RayCastIntersect(const rayStart, rayVector: TVector;
-  intersectPoint: PVector = nil; intersectNormal: PVector = nil): Boolean;
+function TGLPlane.RayCastIntersect(const rayStart, rayVector: TGLVector;
+  intersectPoint: PGLVector = nil; intersectNormal: PGLVector = nil): Boolean;
 var
 var
-  locRayStart, locRayVector, ip: TVector;
+  locRayStart, locRayVector, ip: TGLVector;
   t: Single;
   t: Single;
 begin
 begin
   locRayStart := AbsoluteToLocal(rayStart);
   locRayStart := AbsoluteToLocal(rayStart);
@@ -1143,7 +1143,7 @@ end;
 
 
 function TGLPlane.ScreenRect(aBuffer: TGLSceneBuffer): TRect;
 function TGLPlane.ScreenRect(aBuffer: TGLSceneBuffer): TRect;
 var
 var
-  v: array [0 .. 3] of TVector;
+  v: array [0 .. 3] of TGLVector;
   buf: TGLSceneBuffer;
   buf: TGLSceneBuffer;
   hw, hh: TGLFloat;
   hw, hh: TGLFloat;
 begin
 begin
@@ -1166,7 +1166,7 @@ begin
     FillChar(Result, SizeOf(TRect), 0);
     FillChar(Result, SizeOf(TRect), 0);
 end;
 end;
 
 
-function TGLPlane.PointDistance(const aPoint: TVector): Single;
+function TGLPlane.PointDistance(const aPoint: TGLVector): Single;
 begin
 begin
   Result := VectorDotProduct(VectorSubtract(aPoint, AbsolutePosition),
   Result := VectorDotProduct(VectorSubtract(aPoint, AbsolutePosition),
     AbsoluteDirection);
     AbsoluteDirection);
@@ -1290,7 +1290,7 @@ begin
   inherited Assign(Source);
   inherited Assign(Source);
 end;
 end;
 
 
-function TGLSprite.AxisAlignedDimensionsUnscaled: TVector;
+function TGLSprite.AxisAlignedDimensionsUnscaled: TGLVector;
 begin
 begin
   Result.X := 0.5 * Abs(FWidth);
   Result.X := 0.5 * Abs(FWidth);
   Result.Y := 0.5 * Abs(FHeight);
   Result.Y := 0.5 * Abs(FHeight);
@@ -1608,7 +1608,7 @@ end;
 procedure TGLPoints.BuildList(var rci: TGLRenderContextInfo);
 procedure TGLPoints.BuildList(var rci: TGLRenderContextInfo);
 var
 var
   n: Integer;
   n: Integer;
-  v: TVector;
+  v: TGLVector;
 begin
 begin
   n := FPositions.Count;
   n := FPositions.Count;
   if n = 0 then
   if n = 0 then
@@ -2023,7 +2023,7 @@ begin
   gl.PopMatrix;
   gl.PopMatrix;
 end;
 end;
 
 
-function TGLNodedLines.AxisAlignedDimensionsUnscaled: TVector;
+function TGLNodedLines.AxisAlignedDimensionsUnscaled: TGLVector;
 var
 var
   i: Integer;
   i: Integer;
 begin
 begin
@@ -2054,7 +2054,7 @@ begin
   StructureChanged;
   StructureChanged;
 end;
 end;
 
 
-procedure TGLNodedLines.AddNode(const Value: TVector);
+procedure TGLNodedLines.AddNode(const Value: TGLVector);
 var
 var
   n: TGLNode;
   n: TGLNode;
 begin
 begin
@@ -2154,9 +2154,9 @@ var
   A, B, C: TGLFloat;
   A, B, C: TGLFloat;
   f: Single;
   f: Single;
   Spline: TCubicSpline;
   Spline: TCubicSpline;
-  vertexColor: TVector;
+  vertexColor: TGLVector;
   nodeBuffer: array of TAffineVector;
   nodeBuffer: array of TAffineVector;
-  colorBuffer: array of TVector;
+  colorBuffer: array of TGLVector;
   nurbsRenderer: PGLUNurbs;
   nurbsRenderer: PGLUNurbs;
 begin
 begin
   if Nodes.Count > 1 then
   if Nodes.Count > 1 then
@@ -2549,7 +2549,7 @@ begin
   inherited Assign(Source);
   inherited Assign(Source);
 end;
 end;
 
 
-function TGLCube.AxisAlignedDimensionsUnscaled: TVector;
+function TGLCube.AxisAlignedDimensionsUnscaled: TGLVector;
 begin
 begin
   Result.X := FCubeSize.X * 0.5;
   Result.X := FCubeSize.X * 0.5;
   Result.Y := FCubeSize.Y * 0.5;
   Result.Y := FCubeSize.Y * 0.5;
@@ -2557,12 +2557,12 @@ begin
   Result.W := 0;
   Result.W := 0;
 end;
 end;
 
 
-function TGLCube.RayCastIntersect(const rayStart, rayVector: TVector;
-  intersectPoint: PVector = nil; intersectNormal: PVector = nil): Boolean;
+function TGLCube.RayCastIntersect(const rayStart, rayVector: TGLVector;
+  intersectPoint: PGLVector = nil; intersectNormal: PGLVector = nil): Boolean;
 var
 var
-  p: array [0 .. 5] of TVector;
-  rv: TVector;
-  rs, r: TVector;
+  p: array [0 .. 5] of TGLVector;
+  rv: TGLVector;
+  rs, r: TGLVector;
   i: Integer;
   i: Integer;
   t: Single;
   t: Single;
   eSize: TAffineVector;
   eSize: TAffineVector;
@@ -2873,11 +2873,11 @@ begin
   rci.GLStates.PopAttrib;
   rci.GLStates.PopAttrib;
 end;
 end;
 
 
-function TGLSphere.RayCastIntersect(const rayStart, rayVector: TVector;
-  intersectPoint: PVector = nil; intersectNormal: PVector = nil): Boolean;
+function TGLSphere.RayCastIntersect(const rayStart, rayVector: TGLVector;
+  intersectPoint: PGLVector = nil; intersectNormal: PGLVector = nil): Boolean;
 var
 var
-  i1, i2: TVector;
-  localStart, localVector: TVector;
+  i1, i2: TGLVector;
+  localStart, localVector: TGLVector;
 begin
 begin
   // compute coefficients of quartic polynomial
   // compute coefficients of quartic polynomial
   SetVector(localStart, AbsoluteToLocal(rayStart));
   SetVector(localStart, AbsoluteToLocal(rayStart));
@@ -3036,7 +3036,7 @@ begin
   inherited Assign(Source);
   inherited Assign(Source);
 end;
 end;
 
 
-function TGLSphere.AxisAlignedDimensionsUnscaled: TVector;
+function TGLSphere.AxisAlignedDimensionsUnscaled: TGLVector;
 begin
 begin
   Result.X := Abs(FRadius);
   Result.X := Abs(FRadius);
   Result.Y := Result.X;
   Result.Y := Result.X;
@@ -3131,7 +3131,7 @@ begin
   StructureChanged;
   StructureChanged;
 end;
 end;
 
 
-procedure TGLPolygonBase.AddNode(const Value: TVector);
+procedure TGLPolygonBase.AddNode(const Value: TGLVector);
 var
 var
   n: TGLNode;
   n: TGLNode;
 begin
 begin
@@ -3436,11 +3436,11 @@ end;
 
 
 // This will probably not work, karamba
 // This will probably not work, karamba
 // RayCastSphereIntersect -> RayCastSuperellipsoidIntersect ??????
 // RayCastSphereIntersect -> RayCastSuperellipsoidIntersect ??????
-function TGLSuperellipsoid.RayCastIntersect(const rayStart, rayVector: TVector;
-  intersectPoint: PVector = nil; intersectNormal: PVector = nil): Boolean;
+function TGLSuperellipsoid.RayCastIntersect(const rayStart, rayVector: TGLVector;
+  intersectPoint: PGLVector = nil; intersectNormal: PGLVector = nil): Boolean;
 var
 var
-  i1, i2: TVector;
-  localStart, localVector: TVector;
+  i1, i2: TGLVector;
+  localStart, localVector: TGLVector;
 begin
 begin
   // compute coefficients of quartic polynomial
   // compute coefficients of quartic polynomial
   SetVector(localStart, AbsoluteToLocal(rayStart));
   SetVector(localStart, AbsoluteToLocal(rayStart));
@@ -3617,7 +3617,7 @@ begin
   inherited Assign(Source);
   inherited Assign(Source);
 end;
 end;
 
 
-function TGLSuperellipsoid.AxisAlignedDimensionsUnscaled: TVector;
+function TGLSuperellipsoid.AxisAlignedDimensionsUnscaled: TGLVector;
 begin
 begin
   Result.X := Abs(FRadius);
   Result.X := Abs(FRadius);
   Result.Y := Result.X;
   Result.Y := Result.X;

+ 33 - 33
Source/GLS.Octree.pas

@@ -64,13 +64,13 @@ type
       V3: TAffineFLTVector): BOOLEAN;
       V3: TAffineFLTVector): BOOLEAN;
     // Check if a sphere (at point C with radius) lies within the AABB specified by min and max entents
     // Check if a sphere (at point C with radius) lies within the AABB specified by min and max entents
     function SphereInNode(const MinExtent, MaxExtent: TAffineVector;
     function SphereInNode(const MinExtent, MaxExtent: TAffineVector;
-      const C: TVector; Radius: Single): Boolean;
+      const C: TGLVector; Radius: Single): Boolean;
     procedure WalkTriToLeafx(Onode: POctreeNode;
     procedure WalkTriToLeafx(Onode: POctreeNode;
       const V1, V2, V3: TAffineFLTVector);
       const V1, V2, V3: TAffineFLTVector);
     procedure WalkPointToLeafx(ONode: POctreeNode; const P: TAffineVector);
     procedure WalkPointToLeafx(ONode: POctreeNode; const P: TAffineVector);
-    procedure WalkSphereToLeafx(Onode: POctreeNode; const P: TVector;
+    procedure WalkSphereToLeafx(Onode: POctreeNode; const P: TGLVector;
       Radius: Single);
       Radius: Single);
-    procedure WalkRayToLeafx(Onode: POctreeNode; const P, V: TVector);
+    procedure WalkRayToLeafx(Onode: POctreeNode; const P, V: TGLVector);
     function GetExtent(const Flags: array of Byte; ParentNode: POctreeNode)
     function GetExtent(const Flags: array of Byte; ParentNode: POctreeNode)
       : TAffineFLTVector;
       : TAffineFLTVector;
     //  Recursive routine to build nodes from parent to max depth level.
     //  Recursive routine to build nodes from parent to max depth level.
@@ -79,7 +79,7 @@ type
     procedure WalkPointToLeaf(ONode: POctreeNode; const P: TAffineVector);
     procedure WalkPointToLeaf(ONode: POctreeNode; const P: TAffineVector);
     procedure WalkTriToLeaf(Onode: POctreeNode;
     procedure WalkTriToLeaf(Onode: POctreeNode;
       const V1, V2, V3: TAffineVector);
       const V1, V2, V3: TAffineVector);
-    procedure WalkRayToLeaf(Onode: POctreeNode; const P, V: TVector);
+    procedure WalkRayToLeaf(Onode: POctreeNode; const P, V: TGLVector);
     // Example of how to process each node in the tree
     // Example of how to process each node in the tree
     procedure ConvertR4(ONode: POctreeNode; const Scale: TAffineFLTVector);
     procedure ConvertR4(ONode: POctreeNode; const Scale: TAffineFLTVector);
     procedure CreateTree(Depth: Integer);
     procedure CreateTree(Depth: Integer);
@@ -96,7 +96,7 @@ type
     ResultArray: array of POctreeNode;
     ResultArray: array of POctreeNode;
     // holds the result nodes of various calls
     // holds the result nodes of various calls
     TriangleFiler: TAffineVectorList;
     TriangleFiler: TAffineVectorList;
-    procedure WalkSphereToLeaf(Onode: POctreeNode; const P: TVector;
+    procedure WalkSphereToLeaf(Onode: POctreeNode; const P: TGLVector;
       Radius: Single);
       Radius: Single);
     (*  Initializes the tree from the triangle list.
     (*  Initializes the tree from the triangle list.
       All triangles must be contained in the world extent to be properly
       All triangles must be contained in the world extent to be properly
@@ -106,12 +106,12 @@ type
       const ATreeDepth: Integer);
       const ATreeDepth: Integer);
     procedure DisposeTree;
     procedure DisposeTree;
     destructor Destroy; override;
     destructor Destroy; override;
-    function RayCastIntersect(const RayStart, RayVector: TVector;
-      IntersectPoint: PVector = nil; IntersectNormal: PVector = nil;
+    function RayCastIntersect(const RayStart, RayVector: TGLVector;
+      IntersectPoint: PGLVector = nil; IntersectNormal: PGLVector = nil;
       TriangleInfo: POctreeTriangleInfo = nil): Boolean;
       TriangleInfo: POctreeTriangleInfo = nil): Boolean;
-    function SphereSweepIntersect(const RayStart, RayVector: TVector;
-      const Velocity, Radius: Single; IntersectPoint: PVector = nil;
-      IntersectNormal: PVector = nil): Boolean;
+    function SphereSweepIntersect(const RayStart, RayVector: TGLVector;
+      const Velocity, Radius: Single; IntersectPoint: PGLVector = nil;
+      IntersectNormal: PGLVector = nil): Boolean;
     function TriangleIntersect(const V1, V2, V3: TAffineVector): Boolean;
     function TriangleIntersect(const V1, V2, V3: TAffineVector): Boolean;
     //  Returns all triangles in the AABB.
     //  Returns all triangles in the AABB.
     function GetTrianglesFromNodesIntersectingAABB(const ObjAABB: TAABB)
     function GetTrianglesFromNodesIntersectingAABB(const ObjAABB: TAABB)
@@ -138,7 +138,7 @@ implementation
 // Return: TRUE if point is in sphere, FALSE if not.
 // Return: TRUE if point is in sphere, FALSE if not.
 // -----------------------------------------------------------------------
 // -----------------------------------------------------------------------
 
 
-function CheckPointInSphere(const Point, SO: TVector; const SR: Single)
+function CheckPointInSphere(const Point, SO: TGLVector; const SR: Single)
   : Boolean;
   : Boolean;
 begin
 begin
   // Allow small margin of error
   // Allow small margin of error
@@ -293,7 +293,7 @@ begin
 end;
 end;
 
 
 function HitBoundingBox(const MinB, MaxB: TAffineFLTVector;
 function HitBoundingBox(const MinB, MaxB: TAffineFLTVector;
-  const Origin, Dir: TVector; var Coord: TVector): BOOLEAN;
+  const Origin, Dir: TGLVector; var Coord: TGLVector): BOOLEAN;
 const
 const
   NUMDIM = 2;
   NUMDIM = 2;
   RIGHT = 0;
   RIGHT = 0;
@@ -985,7 +985,7 @@ begin
 end;
 end;
 
 
 function TGLOctree.SphereInNode(const MinExtent, MaxExtent: TAffineVector;
 function TGLOctree.SphereInNode(const MinExtent, MaxExtent: TAffineVector;
-  const C: TVector; Radius: Single): Boolean;
+  const C: TGLVector; Radius: Single): Boolean;
 // Sphere-AABB intersection by Miguel Gomez
 // Sphere-AABB intersection by Miguel Gomez
 var
 var
   S, D: Single;
   S, D: Single;
@@ -1014,14 +1014,14 @@ begin
     Result := FALSE;
     Result := FALSE;
 end;
 end;
 
 
-procedure TGLOctree.WalkSphereToLeaf(Onode: POctreeNode; const P: TVector;
+procedure TGLOctree.WalkSphereToLeaf(Onode: POctreeNode; const P: TGLVector;
   Radius: Single);
   Radius: Single);
 begin
 begin
   Finalize(Resultarray);
   Finalize(Resultarray);
   WalkSphereToLeafx(Onode, P, Radius);
   WalkSphereToLeafx(Onode, P, Radius);
 end;
 end;
 
 
-procedure TGLOctree.WalkSphereToLeafx(Onode: POctreeNode; const P: TVector;
+procedure TGLOctree.WalkSphereToLeafx(Onode: POctreeNode; const P: TGLVector;
   Radius: Single);
   Radius: Single);
 var
 var
   N: Integer;
   N: Integer;
@@ -1040,17 +1040,17 @@ begin
 end;
 end;
 
 
 // Cast a ray (point p, vector v) into the Octree (ie: ray-box intersect).
 // Cast a ray (point p, vector v) into the Octree (ie: ray-box intersect).
-procedure TGLOctree.WalkRayToLeaf(Onode: POctreeNode; const P, V: TVector);
+procedure TGLOctree.WalkRayToLeaf(Onode: POctreeNode; const P, V: TGLVector);
 begin
 begin
   Finalize(Resultarray);
   Finalize(Resultarray);
 
 
   WalkRayToLeafx(Onode, P, V);
   WalkRayToLeafx(Onode, P, V);
 end;
 end;
 
 
-procedure TGLOctree.WalkRayToLeafx(Onode: POctreeNode; const P, V: TVector);
+procedure TGLOctree.WalkRayToLeafx(Onode: POctreeNode; const P, V: TGLVector);
 var
 var
   N: Integer;
   N: Integer;
-  Coord: TVector;
+  Coord: TGLVector;
 begin
 begin
   if HitBoundingBox(Onode^.MinExtent, Onode^.MaxExtent, P, V, Coord) then
   if HitBoundingBox(Onode^.MinExtent, Onode^.MaxExtent, P, V, Coord) then
   begin
   begin
@@ -1132,8 +1132,8 @@ begin
   end;
   end;
 end;
 end;
 
 
-function TGLOctree.RayCastIntersect(const RayStart, RayVector: TVector;
-  IntersectPoint: PVector = nil; IntersectNormal: PVector = nil;
+function TGLOctree.RayCastIntersect(const RayStart, RayVector: TGLVector;
+  IntersectPoint: PGLVector = nil; IntersectNormal: PGLVector = nil;
   TriangleInfo: POctreeTriangleInfo = nil): Boolean;
   TriangleInfo: POctreeTriangleInfo = nil): Boolean;
 const
 const
   CInitialMinD: Single = 1E40;
   CInitialMinD: Single = 1E40;
@@ -1141,7 +1141,7 @@ var
   I, T, K: Integer;
   I, T, K: Integer;
   D, MinD: Single;
   D, MinD: Single;
   P: POctreeNode;
   P: POctreeNode;
-  IPoint, INormal: TVector;
+  IPoint, INormal: TGLVector;
 begin
 begin
   WalkRayToLeaf(RootNode, RayStart, RayVector);
   WalkRayToLeaf(RootNode, RayStart, RayVector);
 
 
@@ -1215,9 +1215,9 @@ end;
 //
 //
 // Return the polygon intersection point and the closest triangle's normal if hit.
 // Return the polygon intersection point and the closest triangle's normal if hit.
 //
 //
-function TGLOctree.SphereSweepIntersect(const RayStart, RayVector: TVector;
-  const Velocity, Radius: Single; IntersectPoint: PVector = nil;
-  IntersectNormal: PVector = nil): Boolean;
+function TGLOctree.SphereSweepIntersect(const RayStart, RayVector: TGLVector;
+  const Velocity, Radius: Single; IntersectPoint: PGLVector = nil;
+  IntersectNormal: PGLVector = nil): Boolean;
 const
 const
   CInitialMinD2: Single = 1E40;
   CInitialMinD2: Single = 1E40;
   CEpsilon: Single = 0.05;
   CEpsilon: Single = 0.05;
@@ -1228,12 +1228,12 @@ var
   DistanceToTravel, DistanceToTravelMinusRadius2: Single;
   DistanceToTravel, DistanceToTravelMinusRadius2: Single;
   P: POctreeNode;
   P: POctreeNode;
   PNormal: TAffineVector;
   PNormal: TAffineVector;
-  PNormal4: TVector;
-  NEGpNormal4: TVector;
-  SIPoint, SIPoint2: TVector; // sphere intersection point
-  PIPoint: TVector; // plane intersection point
-  PolyIPoint: TVector; // polygon intersection point
-  NEGVelocity: TVector; // sphere's forward velocity
+  PNormal4: TGLVector;
+  NEGpNormal4: TGLVector;
+  SIPoint, SIPoint2: TGLVector; // sphere intersection point
+  PIPoint: TGLVector; // plane intersection point
+  PolyIPoint: TGLVector; // polygon intersection point
+  NEGVelocity: TGLVector; // sphere's forward velocity
   DirectHit: Boolean;
   DirectHit: Boolean;
 
 
   P1, P2, P3: PAffineVector;
   P1, P2, P3: PAffineVector;
@@ -1241,9 +1241,9 @@ var
   // SphereSweepAABB:TAABB;
   // SphereSweepAABB:TAABB;
 
 
   // response identifiers (for future use)
   // response identifiers (for future use)
-  // destinationPoint, newdestinationPoint: TVector;
-  // slidePlaneOrigin, slidePlaneNormal: TVector;
-  // newvelocityVector: TVector;
+  // destinationPoint, newdestinationPoint: TGLVector;
+  // slidePlaneOrigin, slidePlaneNormal: TGLVector;
+  // newvelocityVector: TGLVector;
   // v: single;
   // v: single;
   // L: double;
   // L: double;
 begin
 begin

+ 2 - 2
Source/GLS.ParticleFX.pas

@@ -763,7 +763,7 @@ procedure RndVector(const dispersion: TGLSourcePFXDispersionMode;
 
 
 var
 var
   f2: Single;
   f2: Single;
-  p: TVector;
+  p: TGLVector;
 begin
 begin
   f2 := 2 * f;
   f2 := 2 * f;
   if Assigned(dispersionRange) then
   if Assigned(dispersionRange) then
@@ -1917,7 +1917,7 @@ var
   list: PGLParticleArray;
   list: PGLParticleArray;
   doFriction, doPack: Boolean;
   doFriction, doPack: Boolean;
   frictionScale: Single;
   frictionScale: Single;
-  //pos4: TVector;
+  //pos4: TGLVector;
 begin
 begin
   maxAge := MaxParticleAge;
   maxAge := MaxParticleAge;
   accelVector := Acceleration.AsAffineVector;
   accelVector := Acceleration.AsAffineVector;

+ 2 - 2
Source/GLS.PerlinPFX.pas

@@ -103,7 +103,7 @@ type
     function Noise(const x, y: Single): Single; overload;
     function Noise(const x, y: Single): Single; overload;
     function Noise(const x, y, z: Single): Single; overload;
     function Noise(const x, y, z: Single): Single; overload;
     function Noise(const v: TAffineVector): Single; overload;
     function Noise(const v: TAffineVector): Single; overload;
-    function Noise(const v: TVector): Single; overload;
+    function Noise(const v: TGLVector): Single; overload;
   end;
   end;
 
 
 
 
@@ -432,7 +432,7 @@ begin
   Result := Noise(AffineVectorMake(x, y, z));
   Result := Noise(AffineVectorMake(x, y, z));
 end;
 end;
 
 
-function TGLPerlin3DNoise.Noise(const v: TVector): Single;
+function TGLPerlin3DNoise.Noise(const v: TGLVector): Single;
 begin
 begin
   Result := Noise(PAffineVector(@v)^);
   Result := Noise(PAffineVector(@v)^);
 end;
 end;

+ 22 - 22
Source/GLS.ProxyObjects.pas

@@ -102,12 +102,12 @@ type
   public
   public
     (* If the MasterObject is a FreeForm, you can raycast against the Octree,
     (* If the MasterObject is a FreeForm, you can raycast against the Octree,
        which is alot faster.  You must build the octree before using. *)
        which is alot faster.  You must build the octree before using. *)
-    function OctreeRayCastIntersect(const rayStart, rayVector: TVector;
-      intersectPoint: PVector = nil;  intersectNormal: PVector = nil): Boolean;
+    function OctreeRayCastIntersect(const rayStart, rayVector: TGLVector;
+      intersectPoint: PGLVector = nil;  intersectNormal: PGLVector = nil): Boolean;
     // WARNING: This function is not yet 100% reliable with scale+rotation. 
     // WARNING: This function is not yet 100% reliable with scale+rotation. 
-    function OctreeSphereSweepIntersect(const rayStart, rayVector: TVector;
+    function OctreeSphereSweepIntersect(const rayStart, rayVector: TGLVector;
       const velocity, radius, modelscale: Single;
       const velocity, radius, modelscale: Single;
-      intersectPoint: PVector = nil; intersectNormal: PVector = nil): Boolean;
+      intersectPoint: PGLVector = nil; intersectNormal: PGLVector = nil): Boolean;
   published
   published
 
 
    // Redeclare as TGLFreeForm.
    // Redeclare as TGLFreeForm.
@@ -176,9 +176,9 @@ type
     function BoneMatrix(BoneName: string): TMatrix; overload;
     function BoneMatrix(BoneName: string): TMatrix; overload;
     procedure BoneMatricesClear;
     procedure BoneMatricesClear;
     // A standard version of the RayCastIntersect function. 
     // A standard version of the RayCastIntersect function. 
-    function RayCastIntersect(const rayStart, rayVector: TVector;
-      intersectPoint: PVector = nil;
-      intersectNormal: PVector = nil): Boolean; override;
+    function RayCastIntersect(const rayStart, rayVector: TGLVector;
+      intersectPoint: PGLVector = nil;
+      intersectNormal: PGLVector = nil): Boolean; override;
     (* Raycasts on self, but actually on the "RefActor" Actor.
     (* Raycasts on self, but actually on the "RefActor" Actor.
        Note that the "RefActor" parameter does not necessarily have to be
        Note that the "RefActor" parameter does not necessarily have to be
        the same Actor refernced by the MasterObject property:
        the same Actor refernced by the MasterObject property:
@@ -186,9 +186,9 @@ type
        while using a high-poly Actor in the "MasterObject" property,
        while using a high-poly Actor in the "MasterObject" property,
        of course we assume that the two Masterobject Actors have same animations.  *)
        of course we assume that the two Masterobject Actors have same animations.  *)
     function RayCastIntersectEx(RefActor: TGLActor; const rayStart, rayVector:
     function RayCastIntersectEx(RefActor: TGLActor; const rayStart, rayVector:
-      TVector;
-      intersectPoint: PVector = nil;
-      intersectNormal: PVector = nil): Boolean; overload;
+      TGLVector;
+      intersectPoint: PGLVector = nil;
+      intersectNormal: PGLVector = nil): Boolean; overload;
   published
   published
     property AnimationMode: TGLActorProxyAnimationMode read FAnimationMode write FAnimationMode default pamInherited;
     property AnimationMode: TGLActorProxyAnimationMode read FAnimationMode write FAnimationMode default pamInherited;
     property Animation: TGLActorAnimationName read FAnimation write SetAnimation;
     property Animation: TGLActorAnimationName read FAnimation write SetAnimation;
@@ -292,11 +292,11 @@ end;
 // ------------------
 // ------------------
 
 
 function TGLFreeFormProxy.OctreeRayCastIntersect(const rayStart, rayVector:
 function TGLFreeFormProxy.OctreeRayCastIntersect(const rayStart, rayVector:
-  TVector;
-  intersectPoint: PVector = nil;
-  intersectNormal: PVector = nil): Boolean;
+  TGLVector;
+  intersectPoint: PGLVector = nil;
+  intersectNormal: PGLVector = nil): Boolean;
 var
 var
-  localRayStart, localRayVector: TVector;
+  localRayStart, localRayVector: TGLVector;
 begin
 begin
   if Assigned(MasterObject) then
   if Assigned(MasterObject) then
   begin
   begin
@@ -330,12 +330,12 @@ begin
 end;
 end;
 
 
 function TGLFreeFormProxy.OctreeSphereSweepIntersect(const rayStart, rayVector:
 function TGLFreeFormProxy.OctreeSphereSweepIntersect(const rayStart, rayVector:
-  TVector;
+  TGLVector;
   const velocity, radius, modelscale: Single;
   const velocity, radius, modelscale: Single;
-  intersectPoint: PVector = nil;
-  intersectNormal: PVector = nil): Boolean;
+  intersectPoint: PGLVector = nil;
+  intersectNormal: PGLVector = nil): Boolean;
 var
 var
-  localRayStart, localRayVector: TVector;
+  localRayStart, localRayVector: TGLVector;
   localVelocity, localRadius: single;
   localVelocity, localRadius: single;
 begin
 begin
   Result := False;
   Result := False;
@@ -618,8 +618,8 @@ begin
   end;
   end;
 end;
 end;
 
 
-function TGLActorProxy.RayCastIntersect(const rayStart, rayVector: TVector;
-  intersectPoint, intersectNormal: PVector): Boolean;
+function TGLActorProxy.RayCastIntersect(const rayStart, rayVector: TGLVector;
+  intersectPoint, intersectNormal: PGLVector): Boolean;
 begin
 begin
   if MasterObject <> nil then
   if MasterObject <> nil then
     Result := RayCastIntersectEx(GetMasterActorObject, rayStart, rayVector,
     Result := RayCastIntersectEx(GetMasterActorObject, rayStart, rayVector,
@@ -634,9 +634,9 @@ type
   TGLDummyActor = class(TGLActor);
   TGLDummyActor = class(TGLActor);
 
 
 function TGLActorProxy.RayCastIntersectEx(RefActor: TGLActor; const rayStart,
 function TGLActorProxy.RayCastIntersectEx(RefActor: TGLActor; const rayStart,
-  rayVector: TVector; intersectPoint, intersectNormal: PVector): Boolean;
+  rayVector: TGLVector; intersectPoint, intersectNormal: PGLVector): Boolean;
 var
 var
-  localRayStart, localRayVector: TVector;
+  localRayStart, localRayVector: TGLVector;
   cf, sf, ef: Integer;
   cf, sf, ef: Integer;
   cfd: Single;
   cfd: Single;
   HaspooTransformation: boolean;
   HaspooTransformation: boolean;

+ 1 - 1
Source/GLS.ROAMPatch.pas

@@ -180,7 +180,7 @@ procedure DrawContours(Vertices: TAffineVectorList; VertexIndices: TIntegerList;
 var
 var
   i: Integer;
   i: Integer;
   Isolines: TAffineVectorList;
   Isolines: TAffineVectorList;
-  CurColor: TVector;
+  CurColor: TGLVector;
 
 
 begin
 begin
   if ContourInterval > 0 then
   if ContourInterval > 0 then

+ 18 - 18
Source/GLS.RandomHDS.pas

@@ -103,12 +103,12 @@ type
   end;
   end;
 
 
   TMapOfSingle = array of array of single;
   TMapOfSingle = array of array of single;
-  TMapOfVector = array of array of TVector;
+  TMapOfVector = array of array of TGLVector;
 
 
   TGLBaseRandomHDS = class;
   TGLBaseRandomHDS = class;
 
 
   // Function type to use for topography-based texture
   // Function type to use for topography-based texture
-  TOnDrawTexture = function(const Sender: TGLBaseRandomHDS; x, y: integer; z: double; Normal: TVector): TColorVector of object;
+  TOnDrawTexture = function(const Sender: TGLBaseRandomHDS; x, y: integer; z: double; Normal: TGLVector): TColorVector of object;
 
 
   TSingleClamp = procedure(var x, y: single) of object;
   TSingleClamp = procedure(var x, y: single) of object;
   TIntegerClamp = procedure(var x, y: integer) of object;
   TIntegerClamp = procedure(var x, y: integer) of object;
@@ -129,7 +129,7 @@ type
     FSize: integer;
     FSize: integer;
     FMaterialName: string;
     FMaterialName: string;
     FLighting: boolean;
     FLighting: boolean;
-    FLightDirection: TVector;
+    FLightDirection: TGLVector;
     FTerrainRenderer: TGLTerrainRenderer;
     FTerrainRenderer: TGLTerrainRenderer;
     FLightColor: TColorVector;
     FLightColor: TColorVector;
     FShadows: boolean;
     FShadows: boolean;
@@ -145,11 +145,11 @@ type
     FPrimerLandscape: boolean;
     FPrimerLandscape: boolean;
     FLandTileInfo: TLandTileInfo;
     FLandTileInfo: TLandTileInfo;
     FOnDrawTexture: TOnDrawTexture;
     FOnDrawTexture: TOnDrawTexture;
-    function OnDrawTextureDefault(const Sender: TGLBaseRandomHDS; x, y: integer; z: double; Normal: TVector): TColorVector;
+    function OnDrawTextureDefault(const Sender: TGLBaseRandomHDS; x, y: integer; z: double; Normal: TGLVector): TColorVector;
     procedure SetSeed(const Value: integer);
     procedure SetSeed(const Value: integer);
     procedure SetMaterialName(const Value: string);
     procedure SetMaterialName(const Value: string);
     procedure SetLighting(const Value: boolean);
     procedure SetLighting(const Value: boolean);
-    procedure SetLightDirection(const Value: TVector);
+    procedure SetLightDirection(const Value: TGLVector);
     procedure SetTerrainRenderer(const Value: TGLTerrainRenderer); virtual; abstract;
     procedure SetTerrainRenderer(const Value: TGLTerrainRenderer); virtual; abstract;
     procedure SetLightColor(const Value: TColorVector);
     procedure SetLightColor(const Value: TColorVector);
     procedure SetShadows(const Value: boolean);
     procedure SetShadows(const Value: boolean);
@@ -179,7 +179,7 @@ type
     // Usually white, but you can generate e.g.sunset ambiance by setting it to red
     // Usually white, but you can generate e.g.sunset ambiance by setting it to red
     property LightColor: TColorVector read FLightColor write SetLightColor;
     property LightColor: TColorVector read FLightColor write SetLightColor;
     // Light is parallel (sun light)
     // Light is parallel (sun light)
-    property LightDirection: TVector read FLightDirection write SetLightDirection;
+    property LightDirection: TGLVector read FLightDirection write SetLightDirection;
     (* This function must be supplied by the user. Here he/she can define which
     (* This function must be supplied by the user. Here he/she can define which
       colour to use depending on coordinates, elevation and normal. This provides
       colour to use depending on coordinates, elevation and normal. This provides
       a great flexibility. If no function is supplied (OnDrawTexture=nil), a default
       a great flexibility. If no function is supplied (OnDrawTexture=nil), a default
@@ -269,7 +269,7 @@ type
       - Compute the casted shadows
       - Compute the casted shadows
       - Perform a basic smoothing if TextureScale>1 *)
       - Perform a basic smoothing if TextureScale>1 *)
     procedure BuildLightMap; overload;
     procedure BuildLightMap; overload;
-    procedure BuildLightMap(const aLightDirection: TVector); overload;
+    procedure BuildLightMap(const aLightDirection: TGLVector); overload;
     // Normals are needed for lighting and slope-based textures
     // Normals are needed for lighting and slope-based textures
     procedure BuildNormals;
     procedure BuildNormals;
     (* For every pixel of the texture, computes slope and interpolated height and
     (* For every pixel of the texture, computes slope and interpolated height and
@@ -329,7 +329,7 @@ type
     property MaxHeight: single read FMaxHeight;
     property MaxHeight: single read FMaxHeight;
     property MinHeight: single read FMinHeight;
     property MinHeight: single read FMinHeight;
     // Vector normal to the terrain at the position
     // Vector normal to the terrain at the position
-    function Normal(const Position: TVector): TVector;
+    function Normal(const Position: TGLVector): TGLVector;
     // Max height - min height
     // Max height - min height
     property RangeHeight: single read FRangeHeight;
     property RangeHeight: single read FRangeHeight;
     (* Scale of the Terrain Renderer. They are set so as giving a identical
     (* Scale of the Terrain Renderer. They are set so as giving a identical
@@ -726,7 +726,7 @@ begin
   Result := FLandTileInfo;
   Result := FLandTileInfo;
 end;
 end;
 
 
-function TGLBaseRandomHDS.OnDrawTextureDefault(const Sender: TGLBaseRandomHDS; x, y: integer; z: double; Normal: TVector)
+function TGLBaseRandomHDS.OnDrawTextureDefault(const Sender: TGLBaseRandomHDS; x, y: integer; z: double; Normal: TGLVector)
   : TColorVector;
   : TColorVector;
 begin
 begin
   if z > Sender.SeaLevel * VSF then
   if z > Sender.SeaLevel * VSF then
@@ -775,9 +775,9 @@ begin
   FLightColor := Value;
   FLightColor := Value;
 end;
 end;
 
 
-procedure TGLBaseRandomHDS.SetLightDirection(const Value: TVector);
+procedure TGLBaseRandomHDS.SetLightDirection(const Value: TGLVector);
 var
 var
-  v: TVector;
+  v: TGLVector;
 begin
 begin
   v := Value;
   v := Value;
   NormalizeVector(v);
   NormalizeVector(v);
@@ -949,8 +949,8 @@ var
   i, j, k, m, n: integer;
   i, j, k, m, n: integer;
   x, y: single;
   x, y: single;
   t: single;
   t: single;
-  v1, v2: TVector;
-  l: TVector;
+  v1, v2: TGLVector;
+  l: TGLVector;
   Shade: single;
   Shade: single;
 begin
 begin
   if FSize = 0 then
   if FSize = 0 then
@@ -1038,7 +1038,7 @@ begin
   end; // if
   end; // if
 end;
 end;
 
 
-procedure TGLCustomRandomHDS.BuildLightMap(const aLightDirection: TVector);
+procedure TGLCustomRandomHDS.BuildLightMap(const aLightDirection: TGLVector);
 begin
 begin
   FLightDirection := aLightDirection;
   FLightDirection := aLightDirection;
   BuildLightMap;
   BuildLightMap;
@@ -1048,9 +1048,9 @@ procedure TGLCustomRandomHDS.BuildNormals;
 var
 var
   i, j: integer;
   i, j: integer;
   z0: single;
   z0: single;
-  v1, v2: TVector;
-  n1: TVector;
-  Normal: TVector;
+  v1, v2: TGLVector;
+  n1: TGLVector;
+  Normal: TGLVector;
 begin
 begin
   FTask := 'Normal computation';
   FTask := 'Normal computation';
 
 
@@ -1813,7 +1813,7 @@ begin
   Result := (x >= 0) and (x <= FSize) and (y >= 0) and (y <= FSize);
   Result := (x >= 0) and (x <= FSize) and (y >= 0) and (y <= FSize);
 end;
 end;
 
 
-function TGLCustomRandomHDS.Normal(const Position: TVector): TVector;
+function TGLCustomRandomHDS.Normal(const Position: TGLVector): TGLVector;
 var
 var
   x, y: integer;
   x, y: integer;
 begin
 begin

+ 4 - 4
Source/GLS.RenderContextInfo.pas

@@ -52,8 +52,8 @@ type
   TGLVisibilityCulling = (vcInherited, vcNone, vcObjectBased, vcHierarchical);
   TGLVisibilityCulling = (vcInherited, vcNone, vcObjectBased, vcHierarchical);
 
 
   TRenderContextClippingInfo = record
   TRenderContextClippingInfo = record
-    Origin: TVector;
-    ClippingDirection: TVector;
+    Origin: TGLVector;
+    ClippingDirection: TGLVector;
     ViewPortRadius: Single; // viewport bounding radius per distance unit
     ViewPortRadius: Single; // viewport bounding radius per distance unit
     NearClippingDistance: Single;
     NearClippingDistance: Single;
     FarClippingDistance: Single;
     FarClippingDistance: Single;
@@ -64,8 +64,8 @@ type
   TGLRenderContextInfo = record
   TGLRenderContextInfo = record
     Scene: TObject; //usually TGLScene
     Scene: TObject; //usually TGLScene
     Buffer: TObject; //usually TGLSceneBuffer
     Buffer: TObject; //usually TGLSceneBuffer
-    CameraPosition: TVector;
-    CameraDirection, CameraUp: TVector;
+    CameraPosition: TGLVector;
+    CameraDirection, CameraUp: TGLVector;
     ViewPortSize: TGLSize;
     ViewPortSize: TGLSize;
     RenderDPI: Integer;
     RenderDPI: Integer;
     MaterialLibrary: TObject; //usually TGLMaterialLibrary;
     MaterialLibrary: TObject; //usually TGLMaterialLibrary;

Різницю між файлами не показано, бо вона завелика
+ 172 - 172
Source/GLS.Scene.pas


+ 2 - 8
Source/GLS.ShadowPlane.pas

@@ -1,14 +1,13 @@
 //
 //
 // The graphics rendering engine GLScene http://glscene.org
 // The graphics rendering engine GLScene http://glscene.org
 //
 //
-
 unit GLS.ShadowPlane;
 unit GLS.ShadowPlane;
 
 
 (*
 (*
    Implements a basic shadow plane.
    Implements a basic shadow plane.
 
 
-   It is strongly recommended to read and understand the explanations in the
-   materials/mirror demo before using this component.
+   It is strongly recommended to read and understand the explanations
+   in the materials/mirror demo before using this component.
 *)
 *)
 
 
 interface
 interface
@@ -36,9 +35,7 @@ uses
   GLS.Texture,
   GLS.Texture,
   GLS.Utils;
   GLS.Utils;
 
 
-
 type
 type
-
   TShadowPlaneOption = (spoUseStencil, spoScissor, spoTransparent, spoIgnoreZ);
   TShadowPlaneOption = (spoUseStencil, spoScissor, spoTransparent, spoIgnoreZ);
   TShadowPlaneOptions = set of TShadowPlaneOption;
   TShadowPlaneOptions = set of TShadowPlaneOption;
 
 
@@ -278,7 +275,6 @@ begin
   end;
   end;
 end;
 end;
 
 
-
 procedure TGLShadowPlane.Notification(AComponent: TComponent; Operation: TOperation);
 procedure TGLShadowPlane.Notification(AComponent: TComponent; Operation: TOperation);
 begin
 begin
   if Operation = opRemove then
   if Operation = opRemove then
@@ -291,7 +287,6 @@ begin
   inherited;
   inherited;
 end;
 end;
 
 
-
 procedure TGLShadowPlane.SetShadowingObject(const val: TGLBaseSceneObject);
 procedure TGLShadowPlane.SetShadowingObject(const val: TGLBaseSceneObject);
 begin
 begin
   if FShadowingObject <> val then
   if FShadowingObject <> val then
@@ -305,7 +300,6 @@ begin
   end;
   end;
 end;
 end;
 
 
-
 procedure TGLShadowPlane.SetShadowedLight(const val: TGLLightSource);
 procedure TGLShadowPlane.SetShadowedLight(const val: TGLLightSource);
 begin
 begin
   if FShadowedLight <> val then
   if FShadowedLight <> val then

+ 10 - 10
Source/GLS.SkyDome.pas

@@ -297,7 +297,7 @@ function StarRecordPositionZUp(const starRecord: TGLStarRecord): TAffineVector;
 // Computes position on the unit sphere of a star record (Y=up)
 // Computes position on the unit sphere of a star record (Y=up)
 function StarRecordPositionYUp(const starRecord: TGLStarRecord): TAffineVector;
 function StarRecordPositionYUp(const starRecord: TGLStarRecord): TAffineVector;
 // Computes star color from BV index (RGB) and magnitude (alpha)
 // Computes star color from BV index (RGB) and magnitude (alpha)
-function StarRecordColor(const starRecord: TGLStarRecord; bias: Single): TVector;
+function StarRecordColor(const starRecord: TGLStarRecord; bias: Single): TGLVector;
 
 
 // ------------------------------------------------------------------
 // ------------------------------------------------------------------
 implementation
 implementation
@@ -667,13 +667,13 @@ begin
 end;
 end;
 
 
 function StarRecordColor(const starRecord: TGLStarRecord; bias: Single)
 function StarRecordColor(const starRecord: TGLStarRecord; bias: Single)
-  : TVector;
+  : TGLVector;
 const
 const
   // very *rough* approximation
   // very *rough* approximation
-  cBVm035: TVector = (X: 0.7; Y: 0.8; Z: 1.0; W: 1);
-  cBV015: TVector = (X: 1.0; Y: 1.0; Z: 1.0; W: 1);
-  cBV060: TVector = (X: 1.0; Y: 1.0; Z: 0.7; W: 1);
-  cBV135: TVector = (X: 1.0; Y: 0.8; Z: 0.7; W: 1);
+  cBVm035: TGLVector = (X: 0.7; Y: 0.8; Z: 1.0; W: 1);
+  cBV015: TGLVector = (X: 1.0; Y: 1.0; Z: 1.0; W: 1);
+  cBV060: TGLVector = (X: 1.0; Y: 1.0; Z: 0.7; W: 1);
+  cBV135: TGLVector = (X: 1.0; Y: 0.8; Z: 0.7; W: 1);
 var
 var
   bvIndex100: Integer;
   bvIndex100: Integer;
 begin
 begin
@@ -795,7 +795,7 @@ procedure TGLSkyDomeBand.BuildList(var rci: TGLRenderContextInfo);
   var
   var
     i: Integer;
     i: Integer;
     f, r, r2: Single;
     f, r, r2: Single;
-    vertex1, vertex2: TVector;
+    vertex1, vertex2: TGLVector;
   begin
   begin
     vertex1.W := 1;
     vertex1.W := 1;
     if start = -90 then
     if start = -90 then
@@ -1582,7 +1582,7 @@ var
   // coordinates system note: X is forward, Y is left and Z is up
   // coordinates system note: X is forward, Y is left and Z is up
   // always rendered as sphere of radius 1
   // always rendered as sphere of radius 1
 
 
-  function CalculateCosGamma(const p: TVector): Single;
+  function CalculateCosGamma(const p: TGLVector): Single;
   begin
   begin
     Result := 1 - VectorAngleCosine(PAffineVector(@p)^, sunPos);
     Result := 1 - VectorAngleCosine(PAffineVector(@p)^, sunPos);
   end;
   end;
@@ -1591,7 +1591,7 @@ var
   var
   var
     i: Integer;
     i: Integer;
     r, thetaStart: Single;
     r, thetaStart: Single;
-    vertex1: TVector;
+    vertex1: TGLVector;
     Color: TColorVector;
     Color: TColorVector;
   begin
   begin
     r := 0;
     r := 0;
@@ -1618,7 +1618,7 @@ var
   var
   var
     i: Integer;
     i: Integer;
     r, r2, thetaStart, thetaStop: Single;
     r, r2, thetaStart, thetaStop: Single;
-    vertex1, vertex2: TVector;
+    vertex1, vertex2: TGLVector;
     Color: TColorVector;
     Color: TColorVector;
   begin
   begin
     vertex1.W := 1;
     vertex1.W := 1;

+ 12 - 12
Source/GLS.SmoothNavigator.pas

@@ -117,8 +117,8 @@ type
   end;
   end;
 
 
   TGLNavigatorSmoothChangeVector = class;
   TGLNavigatorSmoothChangeVector = class;
-  TGLNavigatorSmoothChangeVectorGetEvent = function(const ASender: TGLNavigatorSmoothChangeVector): TVector of object;
-  TGLNavigatorSmoothChangeVectorSetEvent = procedure(const ASender: TGLNavigatorSmoothChangeVector; const AValue: TVector) of object;
+  TGLNavigatorSmoothChangeVectorGetEvent = function(const ASender: TGLNavigatorSmoothChangeVector): TGLVector of object;
+  TGLNavigatorSmoothChangeVectorSetEvent = procedure(const ASender: TGLNavigatorSmoothChangeVector; const AValue: TGLVector) of object;
 
 
   // Smoothly change any Vector4f value, so it will become TargetValue in the end.
   // Smoothly change any Vector4f value, so it will become TargetValue in the end.
   TGLNavigatorSmoothChangeVector = class(TGLNavigatorSmoothChangeItem)
   TGLNavigatorSmoothChangeVector = class(TGLNavigatorSmoothChangeItem)
@@ -335,10 +335,10 @@ type
     function MoveAroundTarget(const PitchDelta, TurnDelta : Single; const ADeltaTime: Double): Boolean;
     function MoveAroundTarget(const PitchDelta, TurnDelta : Single; const ADeltaTime: Double): Boolean;
     function MoveObjectAround(const AObject: TGLBaseSceneObject; PitchDelta, TurnDelta : Single; ADeltaTime: Double): Boolean;
     function MoveObjectAround(const AObject: TGLBaseSceneObject; PitchDelta, TurnDelta : Single; ADeltaTime: Double): Boolean;
     // Uses AdjustDistanceParams.
     // Uses AdjustDistanceParams.
-    function AdjustDistanceToPoint(const  APoint: TVector; const DistanceRatio : Single; ADeltaTime: Double): Boolean;
+    function AdjustDistanceToPoint(const  APoint: TGLVector; const DistanceRatio : Single; ADeltaTime: Double): Boolean;
     function AdjustDistanceToTarget(const DistanceRatio : Single; const ADeltaTime: Double): Boolean;
     function AdjustDistanceToTarget(const DistanceRatio : Single; const ADeltaTime: Double): Boolean;
     // Uses AdjustDistanceParamsEx.
     // Uses AdjustDistanceParamsEx.
-    function AdjustDistanceToPointEx(const  APoint: TVector; ADeltaTime: Double): Boolean;
+    function AdjustDistanceToPointEx(const  APoint: TGLVector; ADeltaTime: Double): Boolean;
     function AdjustDistanceToTargetEx(const ADeltaTime: Double): Boolean;
     function AdjustDistanceToTargetEx(const ADeltaTime: Double): Boolean;
     // Uses CustomAnimatedItems.
     // Uses CustomAnimatedItems.
     procedure AnimateCustomItems(const ADeltaTime: Double); virtual;
     procedure AnimateCustomItems(const ADeltaTime: Double); virtual;
@@ -696,7 +696,7 @@ var
   FinalPitch: Single;
   FinalPitch: Single;
   FinalTurn:  Single;
   FinalTurn:  Single;
 
 
-  lUp: TVector;
+  lUp: TGLVector;
 begin
 begin
   Result := False;
   Result := False;
   FinalPitch := 0;
   FinalPitch := 0;
@@ -733,13 +733,13 @@ begin
 end;
 end;
 
 
 
 
-function TGLSmoothNavigator.AdjustDistanceToPoint(const APoint: TVector;
+function TGLSmoothNavigator.AdjustDistanceToPoint(const APoint: TGLVector;
   const DistanceRatio: Single; ADeltaTime: Double): Boolean;
   const DistanceRatio: Single; ADeltaTime: Double): Boolean;
 
 
   // Based on TGLCamera.AdjustDistanceToTarget
   // Based on TGLCamera.AdjustDistanceToTarget
   procedure DoAdjustDistanceToPoint(const DistanceRatio: Single);
   procedure DoAdjustDistanceToPoint(const DistanceRatio: Single);
   var
   var
-    vect: TVector;
+    vect: TGLVector;
   begin
   begin
     vect := VectorSubtract(MovingObject.AbsolutePosition, APoint);
     vect := VectorSubtract(MovingObject.AbsolutePosition, APoint);
     ScaleVector(vect, (distanceRatio - 1));
     ScaleVector(vect, (distanceRatio - 1));
@@ -791,17 +791,17 @@ begin
   FAdjustDistanceParams.Assign(Value);
   FAdjustDistanceParams.Assign(Value);
 end;
 end;
 
 
-function TGLSmoothNavigator.AdjustDistanceToPointEx(const APoint: TVector;
+function TGLSmoothNavigator.AdjustDistanceToPointEx(const APoint: TGLVector;
   ADeltaTime: Double): Boolean;
   ADeltaTime: Double): Boolean;
 
 
 var
 var
-  lAbsolutePosition: TVector;
+  lAbsolutePosition: TGLVector;
   lCurrentDistance: Single;
   lCurrentDistance: Single;
   lDistanceDifference, lTempCurrentDistance: Single;
   lDistanceDifference, lTempCurrentDistance: Single;
 
 
   procedure DoAdjustDistanceToPoint(const DistanceValue: Single);
   procedure DoAdjustDistanceToPoint(const DistanceValue: Single);
   var
   var
-    vect: TVector;
+    vect: TGLVector;
   begin
   begin
     vect := VectorSubtract(APoint, lAbsolutePosition);
     vect := VectorSubtract(APoint, lAbsolutePosition);
     NormalizeVector(vect);
     NormalizeVector(vect);
@@ -1564,14 +1564,14 @@ end;
 
 
 function TGLNavigatorSmoothChangeVector.Proceed(ADeltaTime: Double): Boolean;
 function TGLNavigatorSmoothChangeVector.Proceed(ADeltaTime: Double): Boolean;
 var
 var
-  lAbsolutePosition: TVector;
+  lAbsolutePosition: TGLVector;
   lCurrentDistance: Single;
   lCurrentDistance: Single;
   lTotalDistanceToTravelThisTime, lDistanceToTravelThisTime: Single;
   lTotalDistanceToTravelThisTime, lDistanceToTravelThisTime: Single;
   lMaxExpectedDeltaTime: Double;
   lMaxExpectedDeltaTime: Double;
 
 
   procedure DoAdjustDistanceToPoint();
   procedure DoAdjustDistanceToPoint();
   var
   var
-    vect: TVector;
+    vect: TGLVector;
   begin
   begin
     vect := VectorScale(VectorNormalize(VectorSubtract(FTargetValue.DirectVector, lAbsolutePosition)), lTotalDistanceToTravelThisTime);
     vect := VectorScale(VectorNormalize(VectorSubtract(FTargetValue.DirectVector, lAbsolutePosition)), lTotalDistanceToTravelThisTime);
     AddVector(vect, lAbsolutePosition);
     AddVector(vect, lAbsolutePosition);

+ 4 - 4
Source/GLS.Sound.pas

@@ -222,7 +222,7 @@ type
     FPause: Boolean;
     FPause: Boolean;
     FMasterVolume: Single;
     FMasterVolume: Single;
     FListener: TGLBaseSceneObject;
     FListener: TGLBaseSceneObject;
-    FLastListenerPosition: TVector;
+    FLastListenerPosition: TGLVector;
     FSources: TGLSoundSources;
     FSources: TGLSoundSources;
     FMaxChannels: Integer;
     FMaxChannels: Integer;
     FOutputFrequency: Integer;
     FOutputFrequency: Integer;
@@ -257,7 +257,7 @@ type
     procedure SetSoundEnvironment(const val: TGLSoundEnvironment);
     procedure SetSoundEnvironment(const val: TGLSoundEnvironment);
     procedure Loaded; override;
     procedure Loaded; override;
     procedure DefineProperties(Filer: TFiler); override;
     procedure DefineProperties(Filer: TFiler); override;
-    procedure ListenerCoordinates(var position, velocity, direction, up: TVector);
+    procedure ListenerCoordinates(var position, velocity, direction, up: TGLVector);
     function DoActivate: Boolean; virtual;
     function DoActivate: Boolean; virtual;
     // Invoked AFTER all sources have been stopped
     // Invoked AFTER all sources have been stopped
     procedure DoDeActivate; virtual;
     procedure DoDeActivate; virtual;
@@ -1321,9 +1321,9 @@ end;
 
 
 
 
 procedure TGLSoundManager.ListenerCoordinates(var position, velocity, direction,
 procedure TGLSoundManager.ListenerCoordinates(var position, velocity, direction,
-  up: TVector);
+  up: TGLVector);
 var
 var
-  right: TVector;
+  right: TGLVector;
 begin
 begin
   if Listener <> nil then
   if Listener <> nil then
   begin
   begin

+ 5 - 5
Source/GLS.SpaceText.pas

@@ -127,8 +127,8 @@ type
     procedure NotifyFontChanged;
     procedure NotifyFontChanged;
     procedure NotifyChange(sender: TObject); override;
     procedure NotifyChange(sender: TObject); override;
     procedure DefaultHandler(var Message); override;
     procedure DefaultHandler(var Message); override;
-    function AxisAlignedDimensionsUnscaled: TVector; override;
-    function BarycenterAbsolutePosition: TVector; override;
+    function AxisAlignedDimensionsUnscaled: TGLVector; override;
+    function BarycenterAbsolutePosition: TGLVector; override;
   published
   published
     (* Adjusts the 3D font extrusion.
     (* Adjusts the 3D font extrusion.
       If Extrusion=0, the characters will be flat (2D), values >0 will
       If Extrusion=0, the characters will be flat (2D), values >0 will
@@ -615,10 +615,10 @@ begin
   end;
   end;
 end;
 end;
 
 
-function TGLSpaceText.BarycenterAbsolutePosition: TVector;
+function TGLSpaceText.BarycenterAbsolutePosition: TGLVector;
 var
 var
   lWidth, lHeightMax, lHeightMin: Single;
   lWidth, lHeightMax, lHeightMin: Single;
-  AdjustVector: TVector;
+  AdjustVector: TGLVector;
 begin
 begin
   TextMetrics(Text, lWidth, lHeightMax, lHeightMin);
   TextMetrics(Text, lWidth, lHeightMax, lHeightMin);
 
 
@@ -657,7 +657,7 @@ begin
   Result := LocalToAbsolute(AdjustVector);
   Result := LocalToAbsolute(AdjustVector);
 end;
 end;
 
 
-function TGLSpaceText.AxisAlignedDimensionsUnscaled: TVector;
+function TGLSpaceText.AxisAlignedDimensionsUnscaled: TGLVector;
 var
 var
   lWidth, lHeightMax, lHeightMin: Single;
   lWidth, lHeightMax, lHeightMin: Single;
   charScale: Single;
   charScale: Single;

+ 4 - 4
Source/GLS.Spline.pas

@@ -57,9 +57,9 @@ type
     procedure SplineAffineVector(const t: Single;
     procedure SplineAffineVector(const t: Single;
       var vector: TAffineVector); overload;
       var vector: TAffineVector); overload;
     // Calculates vector at time t. 
     // Calculates vector at time t. 
-    function SplineVector(const t: Single): TVector; overload;
+    function SplineVector(const t: Single): TGLVector; overload;
     // Calculates vector at time t. 
     // Calculates vector at time t. 
-    procedure SplineVector(const t: Single; var vector: TVector); overload;
+    procedure SplineVector(const t: Single; var vector: TGLVector); overload;
     // Calculates X component slope at time t. 
     // Calculates X component slope at time t. 
     function SplineSlopeX(const t: Single): Single;
     function SplineSlopeX(const t: Single): Single;
     // Calculates Y component slope at time t. 
     // Calculates Y component slope at time t. 
@@ -269,7 +269,7 @@ begin
   vector.Z := MATValeurSpline(matZ, t, FNb);
   vector.Z := MATValeurSpline(matZ, t, FNb);
 end;
 end;
 
 
-function TCubicSpline.SplineVector(const t: Single): TVector;
+function TCubicSpline.SplineVector(const t: Single): TGLVector;
 begin
 begin
   Result.X := MATValeurSpline(matX, t, FNb);
   Result.X := MATValeurSpline(matX, t, FNb);
   Result.Y := MATValeurSpline(matY, t, FNb);
   Result.Y := MATValeurSpline(matY, t, FNb);
@@ -277,7 +277,7 @@ begin
   Result.W := MATValeurSpline(matW, t, FNb);
   Result.W := MATValeurSpline(matW, t, FNb);
 end;
 end;
 
 
-procedure TCubicSpline.SplineVector(const t: Single; var vector: TVector);
+procedure TCubicSpline.SplineVector(const t: Single; var vector: TGLVector);
 begin
 begin
   vector.X := MATValeurSpline(matX, t, FNb);
   vector.X := MATValeurSpline(matX, t, FNb);
   vector.Y := MATValeurSpline(matY, t, FNb);
   vector.Y := MATValeurSpline(matY, t, FNb);

+ 65 - 65
Source/GLS.State.pas

@@ -152,23 +152,23 @@ type
   TGLHintType = (hintDontCare, hintFastest, hintNicest);
   TGLHintType = (hintDontCare, hintFastest, hintNicest);
 
 
   TGLLightSourceState = packed record
   TGLLightSourceState = packed record
-    Position: array [0 .. MAX_HARDWARE_LIGHT - 1] of TVector;
-    Ambient: array [0 .. MAX_HARDWARE_LIGHT - 1] of TVector;
-    Diffuse: array [0 .. MAX_HARDWARE_LIGHT - 1] of TVector;
-    Specular: array [0 .. MAX_HARDWARE_LIGHT - 1] of TVector;
-    SpotDirection: array [0 .. MAX_HARDWARE_LIGHT - 1] of TVector;
-    SpotCosCutoffExponent: array [0 .. MAX_HARDWARE_LIGHT - 1] of TVector;
-    Attenuation: array [0 .. MAX_HARDWARE_LIGHT - 1] of TVector;
+    Position: array [0 .. MAX_HARDWARE_LIGHT - 1] of TGLVector;
+    Ambient: array [0 .. MAX_HARDWARE_LIGHT - 1] of TGLVector;
+    Diffuse: array [0 .. MAX_HARDWARE_LIGHT - 1] of TGLVector;
+    Specular: array [0 .. MAX_HARDWARE_LIGHT - 1] of TGLVector;
+    SpotDirection: array [0 .. MAX_HARDWARE_LIGHT - 1] of TGLVector;
+    SpotCosCutoffExponent: array [0 .. MAX_HARDWARE_LIGHT - 1] of TGLVector;
+    Attenuation: array [0 .. MAX_HARDWARE_LIGHT - 1] of TGLVector;
   end;
   end;
 
 
   TGLShaderLightSourceState = packed record
   TGLShaderLightSourceState = packed record
-    Position: array [0 .. MAX_SHADER_LIGHT - 1] of TVector;
-    Ambient: array [0 .. MAX_SHADER_LIGHT - 1] of TVector;
-    Diffuse: array [0 .. MAX_SHADER_LIGHT - 1] of TVector;
-    Specular: array [0 .. MAX_SHADER_LIGHT - 1] of TVector;
-    SpotDirection: array [0 .. MAX_SHADER_LIGHT - 1] of TVector;
-    SpotCosCutoffExponent: array [0 .. MAX_SHADER_LIGHT - 1] of TVector;
-    Attenuation: array [0 .. MAX_SHADER_LIGHT - 1] of TVector;
+    Position: array [0 .. MAX_SHADER_LIGHT - 1] of TGLVector;
+    Ambient: array [0 .. MAX_SHADER_LIGHT - 1] of TGLVector;
+    Diffuse: array [0 .. MAX_SHADER_LIGHT - 1] of TGLVector;
+    Specular: array [0 .. MAX_SHADER_LIGHT - 1] of TGLVector;
+    SpotDirection: array [0 .. MAX_SHADER_LIGHT - 1] of TGLVector;
+    SpotCosCutoffExponent: array [0 .. MAX_SHADER_LIGHT - 1] of TGLVector;
+    Attenuation: array [0 .. MAX_SHADER_LIGHT - 1] of TGLVector;
   end;
   end;
 
 
   TGLOnLightsChanged = procedure(Sender: TObject);
   TGLOnLightsChanged = procedure(Sender: TObject);
@@ -190,7 +190,7 @@ type
   TGLStateCache = class
   TGLStateCache = class
   strict private
   strict private
     // Legacy state
     // Legacy state
-    FFrontBackColors: array [0 .. 1, 0 .. 3] of TVector;
+    FFrontBackColors: array [0 .. 1, 0 .. 3] of TGLVector;
     FFrontBackShininess: array [0 .. 1] of Integer;
     FFrontBackShininess: array [0 .. 1] of Integer;
     FAlphaFunc: TGLComparisonFunction;
     FAlphaFunc: TGLComparisonFunction;
     FAlphaRef: Single;
     FAlphaRef: Single;
@@ -292,7 +292,7 @@ type
     FBlendDstAlpha: TGLDstBlendFunction;
     FBlendDstAlpha: TGLDstBlendFunction;
     FBlendEquationRGB: TGLBlendEquation;
     FBlendEquationRGB: TGLBlendEquation;
     FBlendEquationAlpha: TGLBlendEquation;
     FBlendEquationAlpha: TGLBlendEquation;
-    FBlendColor: TVector;
+    FBlendColor: TGLVector;
     FEnableFramebufferSRGB: TGLboolean;
     FEnableFramebufferSRGB: TGLboolean;
     FEnableDither: TGLboolean;
     FEnableDither: TGLboolean;
     FEnableColorLogicOp: TGLboolean;
     FEnableColorLogicOp: TGLboolean;
@@ -302,7 +302,7 @@ type
     FDepthWriteMask: TGLboolean;
     FDepthWriteMask: TGLboolean;
     FStencilWriteMask: Cardinal;
     FStencilWriteMask: Cardinal;
     FStencilBackWriteMask: Cardinal;
     FStencilBackWriteMask: Cardinal;
-    FColorClearValue: TVector;
+    FColorClearValue: TGLVector;
     FDepthClearValue: TGLfloat;
     FDepthClearValue: TGLfloat;
     FStencilClearValue: Cardinal;
     FStencilClearValue: Cardinal;
     // Framebuffer state
     // Framebuffer state
@@ -335,7 +335,7 @@ type
     FUniformBufferBinding: Cardinal;
     FUniformBufferBinding: Cardinal;
     FUBOStates: array [TGLBufferBindingTarget, 0 .. MAX_HARDWARE_UNIFORM_BUFFER_BINDING - 1] of TUBOStates;
     FUBOStates: array [TGLBufferBindingTarget, 0 .. MAX_HARDWARE_UNIFORM_BUFFER_BINDING - 1] of TUBOStates;
     // Vector + Geometry Shader state
     // Vector + Geometry Shader state
-    FCurrentVertexAttrib: array [0 .. 15] of TVector;
+    FCurrentVertexAttrib: array [0 .. 15] of TGLVector;
     FEnableProgramPointSize: TGLboolean;
     FEnableProgramPointSize: TGLboolean;
     // Transform Feedback state
     // Transform Feedback state
     FTransformFeedbackBufferBinding: Cardinal;
     FTransformFeedbackBufferBinding: Cardinal;
@@ -430,7 +430,7 @@ type
     procedure SetDepthFunc(const Value: TGLDepthFunction); inline;
     procedure SetDepthFunc(const Value: TGLDepthFunction); inline;
     function GetEnableBlend(index: Integer): TGLboolean; inline;
     function GetEnableBlend(index: Integer): TGLboolean; inline;
     procedure SetEnableBlend(index: Integer; const Value: TGLboolean); inline;
     procedure SetEnableBlend(index: Integer; const Value: TGLboolean); inline;
-    procedure SetBlendColor(const Value: TVector); inline;
+    procedure SetBlendColor(const Value: TGLVector); inline;
     procedure SetEnableFramebufferSRGB(const Value: TGLboolean); inline;
     procedure SetEnableFramebufferSRGB(const Value: TGLboolean); inline;
     procedure SetEnableDither(const Value: TGLboolean); inline;
     procedure SetEnableDither(const Value: TGLboolean); inline;
     procedure SetEnableColorLogicOp(const Value: TGLboolean); inline;
     procedure SetEnableColorLogicOp(const Value: TGLboolean); inline;
@@ -441,7 +441,7 @@ type
     procedure SetDepthWriteMask(const Value: TGLboolean); inline;
     procedure SetDepthWriteMask(const Value: TGLboolean); inline;
     procedure SetStencilWriteMask(const Value: Cardinal); inline;
     procedure SetStencilWriteMask(const Value: Cardinal); inline;
     procedure SetStencilBackWriteMask(const Value: Cardinal); inline;
     procedure SetStencilBackWriteMask(const Value: Cardinal); inline;
-    procedure SetColorClearValue(const Value: TVector); inline;
+    procedure SetColorClearValue(const Value: TGLVector); inline;
     procedure SetDepthClearValue(const Value: TGLfloat); inline;
     procedure SetDepthClearValue(const Value: TGLfloat); inline;
     procedure SetStencilClearValue(const Value: Cardinal); inline;
     procedure SetStencilClearValue(const Value: Cardinal); inline;
     // Framebuffer
     // Framebuffer
@@ -473,8 +473,8 @@ type
     procedure SetUniformBufferBinding(const Value: Cardinal); inline;
     procedure SetUniformBufferBinding(const Value: Cardinal); inline;
     function GetMaxTextureUnits: Cardinal; inline;
     function GetMaxTextureUnits: Cardinal; inline;
     // Vector + Geometry Shader state
     // Vector + Geometry Shader state
-    function GetCurrentVertexAttrib(index: Integer): TVector; inline;
-    procedure SetCurrentVertexAttrib(index: Integer; const Value: TVector); inline;
+    function GetCurrentVertexAttrib(index: Integer): TGLVector; inline;
+    procedure SetCurrentVertexAttrib(index: Integer; const Value: TGLVector); inline;
     procedure SetEnableProgramPointSize(const Value: TGLboolean); inline;
     procedure SetEnableProgramPointSize(const Value: TGLboolean); inline;
     // Transform Feedback state
     // Transform Feedback state
     procedure SetTransformFeedbackBufferBinding(const Value: Cardinal); inline;
     procedure SetTransformFeedbackBufferBinding(const Value: Cardinal); inline;
@@ -495,16 +495,16 @@ type
     function GetMaxLights: Integer; inline;
     function GetMaxLights: Integer; inline;
     function GetLightEnabling(I: Integer): Boolean; inline;
     function GetLightEnabling(I: Integer): Boolean; inline;
     procedure SetLightEnabling(I: Integer; Value: Boolean); inline;
     procedure SetLightEnabling(I: Integer; Value: Boolean); inline;
-    function GetLightPosition(I: Integer): TVector; inline;
-    procedure SetLightPosition(I: Integer; const Value: TVector); inline;
+    function GetLightPosition(I: Integer): TGLVector; inline;
+    procedure SetLightPosition(I: Integer; const Value: TGLVector); inline;
     function GetLightSpotDirection(I: Integer): TAffineVector; inline;
     function GetLightSpotDirection(I: Integer): TAffineVector; inline;
     procedure SetLightSpotDirection(I: Integer; const Value: TAffineVector); inline;
     procedure SetLightSpotDirection(I: Integer; const Value: TAffineVector); inline;
-    function GetLightAmbient(I: Integer): TVector; inline;
-    procedure SetLightAmbient(I: Integer; const Value: TVector); inline;
-    function GetLightDiffuse(I: Integer): TVector; inline;
-    procedure SetLightDiffuse(I: Integer; const Value: TVector); inline;
-    function GetLightSpecular(I: Integer): TVector; inline;
-    procedure SetLightSpecular(I: Integer; const Value: TVector); inline;
+    function GetLightAmbient(I: Integer): TGLVector; inline;
+    procedure SetLightAmbient(I: Integer; const Value: TGLVector); inline;
+    function GetLightDiffuse(I: Integer): TGLVector; inline;
+    procedure SetLightDiffuse(I: Integer; const Value: TGLVector); inline;
+    function GetLightSpecular(I: Integer): TGLVector; inline;
+    procedure SetLightSpecular(I: Integer; const Value: TGLVector); inline;
     function GetSpotCutoff(I: Integer): Single; inline;
     function GetSpotCutoff(I: Integer): Single; inline;
     procedure SetSpotCutoff(I: Integer; const Value: Single); inline;
     procedure SetSpotCutoff(I: Integer; const Value: Single); inline;
     function GetSpotExponent(I: Integer): Single; inline;
     function GetSpotExponent(I: Integer): Single; inline;
@@ -516,10 +516,10 @@ type
     function GetQuadAtten(I: Integer): Single; inline;
     function GetQuadAtten(I: Integer): Single; inline;
     procedure SetQuadAtten(I: Integer; const Value: Single); inline;
     procedure SetQuadAtten(I: Integer; const Value: Single); inline;
     procedure SetForwardContext(Value: Boolean); inline;
     procedure SetForwardContext(Value: Boolean); inline;
-    function GetMaterialAmbient(const aFace: TGLCullFaceMode): TVector; inline;
-    function GetMaterialDiffuse(const aFace: TGLCullFaceMode): TVector; inline;
-    function GetMaterialSpecular(const aFace: TGLCullFaceMode): TVector; inline;
-    function GetMaterialEmission(const aFace: TGLCullFaceMode): TVector; inline;
+    function GetMaterialAmbient(const aFace: TGLCullFaceMode): TGLVector; inline;
+    function GetMaterialDiffuse(const aFace: TGLCullFaceMode): TGLVector; inline;
+    function GetMaterialSpecular(const aFace: TGLCullFaceMode): TGLVector; inline;
+    function GetMaterialEmission(const aFace: TGLCullFaceMode): TGLVector; inline;
     function GetMaterialShininess(const aFace: TGLCullFaceMode): Integer; inline;
     function GetMaterialShininess(const aFace: TGLCullFaceMode): Integer; inline;
   public
   public
     constructor Create; virtual;
     constructor Create; virtual;
@@ -540,26 +540,26 @@ type
     procedure SetGLFrontFaceCW; deprecated; inline;
     procedure SetGLFrontFaceCW; deprecated; inline;
     procedure ResetAll; deprecated; inline;
     procedure ResetAll; deprecated; inline;
     // Adjusts material colors for a face
     // Adjusts material colors for a face
-    procedure SetGLMaterialColors(const aFace: TGLCullFaceMode; const emission, Ambient, Diffuse, Specular: TVector;
+    procedure SetGLMaterialColors(const aFace: TGLCullFaceMode; const emission, Ambient, Diffuse, Specular: TGLVector;
       const shininess: Integer);
       const shininess: Integer);
-    property MaterialAmbient[const aFace: TGLCullFaceMode]: TVector read GetMaterialAmbient;
-    property MaterialDiffuse[const aFace: TGLCullFaceMode]: TVector read GetMaterialDiffuse;
-    property MaterialSpecular[const aFace: TGLCullFaceMode]: TVector read GetMaterialSpecular;
-    property MaterialEmission[const aFace: TGLCullFaceMode]: TVector read GetMaterialEmission;
+    property MaterialAmbient[const aFace: TGLCullFaceMode]: TGLVector read GetMaterialAmbient;
+    property MaterialDiffuse[const aFace: TGLCullFaceMode]: TGLVector read GetMaterialDiffuse;
+    property MaterialSpecular[const aFace: TGLCullFaceMode]: TGLVector read GetMaterialSpecular;
+    property MaterialEmission[const aFace: TGLCullFaceMode]: TGLVector read GetMaterialEmission;
     property MaterialShininess[const aFace: TGLCullFaceMode]: Integer read GetMaterialShininess;
     property MaterialShininess[const aFace: TGLCullFaceMode]: Integer read GetMaterialShininess;
     // Adjusts material alpha channel for a face
     // Adjusts material alpha channel for a face
     procedure SetGLMaterialAlphaChannel(const aFace: Cardinal; const alpha: TGLfloat);
     procedure SetGLMaterialAlphaChannel(const aFace: Cardinal; const alpha: TGLfloat);
     // Adjusts material diffuse color for a face
     // Adjusts material diffuse color for a face
-    procedure SetGLMaterialDiffuseColor(const aFace: Cardinal; const Diffuse: TVector);
+    procedure SetGLMaterialDiffuseColor(const aFace: Cardinal; const Diffuse: TGLVector);
     // Lighting states
     // Lighting states
     property FixedFunctionPipeLight: Boolean read FFFPLight write SetFFPLight;
     property FixedFunctionPipeLight: Boolean read FFFPLight write SetFFPLight;
     property MaxLights: Integer read GetMaxLights;
     property MaxLights: Integer read GetMaxLights;
     property LightEnabling[Index: Integer]: Boolean read GetLightEnabling write SetLightEnabling;
     property LightEnabling[Index: Integer]: Boolean read GetLightEnabling write SetLightEnabling;
-    property LightPosition[Index: Integer]: TVector read GetLightPosition write SetLightPosition;
+    property LightPosition[Index: Integer]: TGLVector read GetLightPosition write SetLightPosition;
     property LightSpotDirection[Index: Integer]: TAffineVector read GetLightSpotDirection write SetLightSpotDirection;
     property LightSpotDirection[Index: Integer]: TAffineVector read GetLightSpotDirection write SetLightSpotDirection;
-    property LightAmbient[Index: Integer]: TVector read GetLightAmbient write SetLightAmbient;
-    property LightDiffuse[Index: Integer]: TVector read GetLightDiffuse write SetLightDiffuse;
-    property LightSpecular[Index: Integer]: TVector read GetLightSpecular write SetLightSpecular;
+    property LightAmbient[Index: Integer]: TGLVector read GetLightAmbient write SetLightAmbient;
+    property LightDiffuse[Index: Integer]: TGLVector read GetLightDiffuse write SetLightDiffuse;
+    property LightSpecular[Index: Integer]: TGLVector read GetLightSpecular write SetLightSpecular;
     property LightSpotCutoff[Index: Integer]: Single read GetSpotCutoff write SetSpotCutoff;
     property LightSpotCutoff[Index: Integer]: Single read GetSpotCutoff write SetSpotCutoff;
     property LightSpotExponent[Index: Integer]: Single read GetSpotExponent write SetSpotExponent;
     property LightSpotExponent[Index: Integer]: Single read GetSpotExponent write SetSpotExponent;
     property LightConstantAtten[Index: Integer]: Single read GetConstantAtten write SetConstantAtten;
     property LightConstantAtten[Index: Integer]: Single read GetConstantAtten write SetConstantAtten;
@@ -771,7 +771,7 @@ type
     // Sets the blend equations for RGB + alpha separately.
     // Sets the blend equations for RGB + alpha separately.
     procedure SetBlendEquationSeparate(const modeRGB, modeAlpha: TGLBlendEquation); inline;
     procedure SetBlendEquationSeparate(const modeRGB, modeAlpha: TGLBlendEquation); inline;
     // A constant blend color, that can be used in the blend equation.
     // A constant blend color, that can be used in the blend equation.
-    property BlendColor: TVector read FBlendColor write SetBlendColor;
+    property BlendColor: TGLVector read FBlendColor write SetBlendColor;
     // Enables/disables framebuffer SRGB.
     // Enables/disables framebuffer SRGB.
     property EnableFramebufferSRGB: TGLboolean read FEnableFramebufferSRGB write SetEnableFramebufferSRGB;
     property EnableFramebufferSRGB: TGLboolean read FEnableFramebufferSRGB write SetEnableFramebufferSRGB;
     // Enables/disables dithering.
     // Enables/disables dithering.
@@ -791,7 +791,7 @@ type
     // The stencil back write mask.
     // The stencil back write mask.
     property StencilBackWriteMask: Cardinal read FStencilBackWriteMask write SetStencilBackWriteMask;
     property StencilBackWriteMask: Cardinal read FStencilBackWriteMask write SetStencilBackWriteMask;
     // The color clear value.
     // The color clear value.
-    property ColorClearValue: TVector read FColorClearValue write SetColorClearValue;
+    property ColorClearValue: TGLVector read FColorClearValue write SetColorClearValue;
     // The depth clear value.
     // The depth clear value.
     property DepthClearValue: TGLfloat read FDepthClearValue write SetDepthClearValue;
     property DepthClearValue: TGLfloat read FDepthClearValue write SetDepthClearValue;
     // The stencil clear value.
     // The stencil clear value.
@@ -853,7 +853,7 @@ type
     procedure SetBufferIndexedBinding(const Value: Cardinal; ATarget: TGLBufferBindingTarget; AIndex: Cardinal;
     procedure SetBufferIndexedBinding(const Value: Cardinal; ATarget: TGLBufferBindingTarget; AIndex: Cardinal;
       AOffset: TGLintptr; ARangeSize: TGLsizeiptr); overload; inline;
       AOffset: TGLintptr; ARangeSize: TGLsizeiptr); overload; inline;
     // Default values to be used when a vertex array is not used for that attribute
     // Default values to be used when a vertex array is not used for that attribute
-    property CurrentVertexAttrib[Index: Integer]: TVector read GetCurrentVertexAttrib write SetCurrentVertexAttrib;
+    property CurrentVertexAttrib[Index: Integer]: TGLVector read GetCurrentVertexAttrib write SetCurrentVertexAttrib;
     // Enables/disables program point size
     // Enables/disables program point size
     property EnableProgramPointSize: TGLboolean read FEnableProgramPointSize write SetEnableProgramPointSize;
     property EnableProgramPointSize: TGLboolean read FEnableProgramPointSize write SetEnableProgramPointSize;
     // Currently bound transform feedbac buffer
     // Currently bound transform feedbac buffer
@@ -1331,7 +1331,7 @@ begin
 end;
 end;
 
 
 procedure TGLStateCache.SetGLMaterialColors(const aFace: TGLCullFaceMode;
 procedure TGLStateCache.SetGLMaterialColors(const aFace: TGLCullFaceMode;
-  const emission, ambient, diffuse, specular: TVector;
+  const emission, ambient, diffuse, specular: TGLVector;
   const shininess: Integer);
   const shininess: Integer);
 var
 var
   I: Integer;
   I: Integer;
@@ -1417,7 +1417,7 @@ begin
   end;
   end;
 end;
 end;
 
 
-procedure TGLStateCache.SetGLMaterialDiffuseColor(const aFace: Cardinal; const Diffuse: TVector);
+procedure TGLStateCache.SetGLMaterialDiffuseColor(const aFace: Cardinal; const Diffuse: TGLVector);
 var
 var
   I: Integer;
   I: Integer;
 begin
 begin
@@ -1554,7 +1554,7 @@ begin
   end;
   end;
 end;
 end;
 
 
-procedure TGLStateCache.SetBlendColor(const Value: TVector);
+procedure TGLStateCache.SetBlendColor(const Value: TGLVector);
 begin
 begin
   if not VectorEquals(Value, FBlendColor) or FInsideList then
   if not VectorEquals(Value, FBlendColor) or FInsideList then
   begin
   begin
@@ -1704,7 +1704,7 @@ begin
   end;
   end;
 end;
 end;
 
 
-procedure TGLStateCache.SetCurrentVertexAttrib(index: Integer; const Value: TVector);
+procedure TGLStateCache.SetCurrentVertexAttrib(index: Integer; const Value: TGLVector);
 begin
 begin
   if not VectorEquals(Value, FCurrentVertexAttrib[Index]) then
   if not VectorEquals(Value, FCurrentVertexAttrib[Index]) then
   begin
   begin
@@ -2034,7 +2034,7 @@ begin
   Result := FCurrentQuery[Index];
   Result := FCurrentQuery[Index];
 end;
 end;
 
 
-function TGLStateCache.GetCurrentVertexAttrib(index: Integer): TVector;
+function TGLStateCache.GetCurrentVertexAttrib(index: Integer): TGLVector;
 begin
 begin
   Result := FCurrentVertexAttrib[Index];
   Result := FCurrentVertexAttrib[Index];
 end;
 end;
@@ -2071,17 +2071,17 @@ begin
   Result := FMaxTextureSize;
   Result := FMaxTextureSize;
 end;
 end;
 
 
-function TGLStateCache.GetMaterialAmbient(const aFace: TGLCullFaceMode): TVector;
+function TGLStateCache.GetMaterialAmbient(const aFace: TGLCullFaceMode): TGLVector;
 begin
 begin
   Result := FFrontBackColors[ord(aFace)][1];
   Result := FFrontBackColors[ord(aFace)][1];
 end;
 end;
 
 
-function TGLStateCache.GetMaterialDiffuse(const aFace: TGLCullFaceMode): TVector;
+function TGLStateCache.GetMaterialDiffuse(const aFace: TGLCullFaceMode): TGLVector;
 begin
 begin
   Result := FFrontBackColors[ord(aFace)][2];
   Result := FFrontBackColors[ord(aFace)][2];
 end;
 end;
 
 
-function TGLStateCache.GetMaterialEmission(const aFace: TGLCullFaceMode): TVector;
+function TGLStateCache.GetMaterialEmission(const aFace: TGLCullFaceMode): TGLVector;
 begin
 begin
   Result := FFrontBackColors[ord(aFace)][0];
   Result := FFrontBackColors[ord(aFace)][0];
 end;
 end;
@@ -2091,7 +2091,7 @@ begin
   Result := FFrontBackShininess[ord(aFace)];
   Result := FFrontBackShininess[ord(aFace)];
 end;
 end;
 
 
-function TGLStateCache.GetMaterialSpecular(const aFace: TGLCullFaceMode): TVector;
+function TGLStateCache.GetMaterialSpecular(const aFace: TGLCullFaceMode): TGLVector;
 begin
 begin
   Result := FFrontBackColors[ord(aFace)][3];
   Result := FFrontBackColors[ord(aFace)][3];
 end;
 end;
@@ -2588,7 +2588,7 @@ begin
   end;
   end;
 end;
 end;
 
 
-procedure TGLStateCache.SetColorClearValue(const Value: TVector);
+procedure TGLStateCache.SetColorClearValue(const Value: TGLVector);
 begin
 begin
   if not VectorEquals(Value, FColorClearValue) or FInsideList then
   if not VectorEquals(Value, FColorClearValue) or FInsideList then
   begin
   begin
@@ -3158,12 +3158,12 @@ begin
   Result := @FShaderLightStates;
   Result := @FShaderLightStates;
 end;
 end;
 
 
-function TGLStateCache.GetLightPosition(I: Integer): TVector;
+function TGLStateCache.GetLightPosition(I: Integer): TGLVector;
 begin
 begin
   Result := FLightStates.Position[I];
   Result := FLightStates.Position[I];
 end;
 end;
 
 
-procedure TGLStateCache.SetLightPosition(I: Integer; const Value: TVector);
+procedure TGLStateCache.SetLightPosition(I: Integer; const Value: TGLVector);
 begin
 begin
   if not VectorEquals(Value, FLightStates.Position[I]) then
   if not VectorEquals(Value, FLightStates.Position[I]) then
   begin
   begin
@@ -3190,12 +3190,12 @@ begin
   end;
   end;
 end;
 end;
 
 
-function TGLStateCache.GetLightAmbient(I: Integer): TVector;
+function TGLStateCache.GetLightAmbient(I: Integer): TGLVector;
 begin
 begin
   Result := FLightStates.Ambient[I];
   Result := FLightStates.Ambient[I];
 end;
 end;
 
 
-procedure TGLStateCache.SetLightAmbient(I: Integer; const Value: TVector);
+procedure TGLStateCache.SetLightAmbient(I: Integer; const Value: TGLVector);
 begin
 begin
   if not VectorEquals(Value, FLightStates.Ambient[I]) or FInsideList then
   if not VectorEquals(Value, FLightStates.Ambient[I]) or FInsideList then
   begin
   begin
@@ -3213,12 +3213,12 @@ begin
   end;
   end;
 end;
 end;
 
 
-function TGLStateCache.GetLightDiffuse(I: Integer): TVector;
+function TGLStateCache.GetLightDiffuse(I: Integer): TGLVector;
 begin
 begin
   Result := FLightStates.Diffuse[I];
   Result := FLightStates.Diffuse[I];
 end;
 end;
 
 
-procedure TGLStateCache.SetLightDiffuse(I: Integer; const Value: TVector);
+procedure TGLStateCache.SetLightDiffuse(I: Integer; const Value: TGLVector);
 begin
 begin
   if not VectorEquals(Value, FLightStates.Diffuse[I]) or FInsideList then
   if not VectorEquals(Value, FLightStates.Diffuse[I]) or FInsideList then
   begin
   begin
@@ -3236,12 +3236,12 @@ begin
   end;
   end;
 end;
 end;
 
 
-function TGLStateCache.GetLightSpecular(I: Integer): TVector;
+function TGLStateCache.GetLightSpecular(I: Integer): TGLVector;
 begin
 begin
   Result := FLightStates.Specular[I];
   Result := FLightStates.Specular[I];
 end;
 end;
 
 
-procedure TGLStateCache.SetLightSpecular(I: Integer; const Value: TVector);
+procedure TGLStateCache.SetLightSpecular(I: Integer; const Value: TGLVector);
 begin
 begin
   if not VectorEquals(Value, FLightStates.Specular[I]) or FInsideList then
   if not VectorEquals(Value, FLightStates.Specular[I]) or FInsideList then
   begin
   begin

+ 10 - 10
Source/GLS.TerrainRenderer.pas

@@ -110,11 +110,11 @@ type
     constructor Create(AOwner: TComponent); override;
     constructor Create(AOwner: TComponent); override;
     destructor Destroy; override;
     destructor Destroy; override;
     procedure BuildList(var rci: TGLRenderContextInfo); override;
     procedure BuildList(var rci: TGLRenderContextInfo); override;
-    function RayCastIntersect(const rayStart, rayVector: TVector;
-      intersectPoint: PVector = nil; intersectNormal: PVector = nil): Boolean; override;
+    function RayCastIntersect(const rayStart, rayVector: TGLVector;
+      intersectPoint: PGLVector = nil; intersectNormal: PGLVector = nil): Boolean; override;
     (* Interpolates height for the given point.
     (* Interpolates height for the given point.
        Expects a point expressed in absolute coordinates. *)
        Expects a point expressed in absolute coordinates. *)
-    function InterpolatedHeight(const p: TVector): Single; overload;
+    function InterpolatedHeight(const p: TGLVector): Single; overload;
     function InterpolatedHeight(const p: TAffineVector): Single; overload;
     function InterpolatedHeight(const p: TAffineVector): Single; overload;
     // Triangle count for the last render
     // Triangle count for the last render
     property LastTriangleCount: Integer read FLastTriangleCount;
     property LastTriangleCount: Integer read FLastTriangleCount;
@@ -286,14 +286,14 @@ begin
     HeightDataSource.Clear;
     HeightDataSource.Clear;
 end;
 end;
 
 
-function TGLTerrainRenderer.RayCastIntersect(const rayStart, rayVector: TVector;
-  intersectPoint: PVector = nil; intersectNormal: PVector = nil): Boolean;
+function TGLTerrainRenderer.RayCastIntersect(const rayStart, rayVector: TGLVector;
+  intersectPoint: PGLVector = nil; intersectNormal: PGLVector = nil): Boolean;
 var
 var
-  p1, d, p2, p3: TVector;
+  p1, d, p2, p3: TGLVector;
   step, i, h, minH, maxH, p1height: Single;
   step, i, h, minH, maxH, p1height: Single;
   startedAbove: Boolean;
   startedAbove: Boolean;
   failSafe: Integer;
   failSafe: Integer;
-  AbsX, AbsY, AbsZ: TVector;
+  AbsX, AbsY, AbsZ: TGLVector;
 begin
 begin
   Result := False;
   Result := False;
   if Assigned(HeightDataSource) then
   if Assigned(HeightDataSource) then
@@ -411,9 +411,9 @@ begin
   end;
   end;
 end;
 end;
 
 
-function TGLTerrainRenderer.InterpolatedHeight(const p: TVector): Single;
+function TGLTerrainRenderer.InterpolatedHeight(const p: TGLVector): Single;
 var
 var
-  pLocal: TVector;
+  pLocal: TGLVector;
 begin
 begin
   if Assigned(HeightDataSource) then
   if Assigned(HeightDataSource) then
   begin
   begin
@@ -432,7 +432,7 @@ end;
 
 
 procedure TGLTerrainRenderer.BuildList(var rci: TGLRenderContextInfo);
 procedure TGLTerrainRenderer.BuildList(var rci: TGLRenderContextInfo);
 var
 var
-  vEye, vEyeDirection: TVector;
+  vEye, vEyeDirection: TGLVector;
   TilePos, AbsTilePos, Observer: TAffineVector;
   TilePos, AbsTilePos, Observer: TAffineVector;
   DeltaX, nbX, iX: Integer;
   DeltaX, nbX, iX: Integer;
   DeltaY, nbY, iY: Integer;
   DeltaY, nbY, iY: Integer;

+ 5 - 5
Source/GLS.ThorFX.pas

@@ -38,7 +38,7 @@ type
   PThorpoint = ^TThorpoint;
   PThorpoint = ^TThorpoint;
 
 
   TThorpoint = record
   TThorpoint = record
-    Position: TVector; // Position
+    Position: TGLVector; // Position
     Size: single; // particle size
     Size: single; // particle size
   end;
   end;
 
 
@@ -293,7 +293,7 @@ end;
 procedure TGLThorFXManager.CalcThor;
 procedure TGLThorFXManager.CalcThor;
 var
 var
   N: integer;
   N: integer;
-  vec, axs, nvec: TVector;
+  vec, axs, nvec: TGLVector;
   dist: single;
   dist: single;
   a, b: single;
   a, b: single;
   len: single;
   len: single;
@@ -463,14 +463,14 @@ procedure TGLBThorFX.Render(var rci: TGLRenderContextInfo);
 var
 var
   N: integer;
   N: integer;
   i: integer;
   i: integer;
-  // absPos :TVector;
-  InnerColor: TVector;
+  // absPos :TGLVector;
+  InnerColor: TGLVector;
   distList: TSingleList;
   distList: TSingleList;
   objList: TList;
   objList: TList;
   fp: PThorpoint;
   fp: PThorpoint;
   mat: TMatrix;
   mat: TMatrix;
 
 
-  vx, vy: TVector;
+  vx, vy: TGLVector;
   m: integer;
   m: integer;
   Icol, Ocol, Ccol: TColorVector;
   Icol, Ocol, Ccol: TColorVector;
   Ppos, Ppos2: TAffineVector;
   Ppos, Ppos2: TAffineVector;

+ 4 - 4
Source/GLS.Tree.pas

@@ -168,7 +168,7 @@ type
     FLeafBackMaterialName: TGLLibMaterialName;
     FLeafBackMaterialName: TGLLibMaterialName;
     FBranchMaterialName: TGLLibMaterialName;
     FBranchMaterialName: TGLLibMaterialName;
     FRebuildTree: Boolean;
     FRebuildTree: Boolean;
-    FAxisAlignedDimensionsCache: TVector;
+    FAxisAlignedDimensionsCache: TGLVector;
   protected
   protected
    procedure SetDepth(const Value: Integer);
    procedure SetDepth(const Value: Integer);
     procedure SetBranchFacets(const Value: Integer);
     procedure SetBranchFacets(const Value: Integer);
@@ -205,7 +205,7 @@ type
     procedure ForceTotalRebuild;
     procedure ForceTotalRebuild;
     procedure Clear;
     procedure Clear;
     procedure GetExtents(var min, max: TAffineVector);
     procedure GetExtents(var min, max: TAffineVector);
-    function AxisAlignedDimensionsUnscaled: TVector; override;
+    function AxisAlignedDimensionsUnscaled: TGLVector; override;
     procedure LoadFromStream(aStream: TStream);
     procedure LoadFromStream(aStream: TStream);
     procedure SaveToStream(aStream: TStream);
     procedure SaveToStream(aStream: TStream);
     procedure LoadFromFile(const aFileName: String);
     procedure LoadFromFile(const aFileName: String);
@@ -287,7 +287,7 @@ end;
 procedure TGLTreeLeaves.AddNew(matrix: TMatrix);
 procedure TGLTreeLeaves.AddNew(matrix: TMatrix);
 var
 var
   radius: Single;
   radius: Single;
-  pos: TVector;
+  pos: TGLVector;
 begin
 begin
   radius := Owner.LeafSize;
   radius := Owner.LeafSize;
   Inc(FCount);
   Inc(FCount);
@@ -1339,7 +1339,7 @@ begin
   max.Z := MaxFloat([lmin.Z, lmax.Z, bmin.Z, bmax.Z]);
   max.Z := MaxFloat([lmin.Z, lmax.Z, bmin.Z, bmax.Z]);
 end;
 end;
 
 
-function TGLTree.AxisAlignedDimensionsUnscaled: TVector;
+function TGLTree.AxisAlignedDimensionsUnscaled: TGLVector;
 var
 var
   dMin, dMax: TAffineVector;
   dMin, dMax: TAffineVector;
 begin
 begin

+ 42 - 43
Source/GLS.VectorFileObjects.pas

@@ -1,7 +1,6 @@
 //
 //
 // The graphics rendering engine GLScene http://glscene.org
 // The graphics rendering engine GLScene http://glscene.org
 //
 //
-
 unit GLS.VectorFileObjects;
 unit GLS.VectorFileObjects;
 
 
 (* Vector File related objects *)
 (* Vector File related objects *)
@@ -22,6 +21,7 @@ uses
   GLS.OpenGLTokens,
   GLS.OpenGLTokens,
   GLS.Scene,
   GLS.Scene,
   GLS.VectorGeometry,
   GLS.VectorGeometry,
+  GLS.VectorTypes,
   GLS.VectorTypesExt,
   GLS.VectorTypesExt,
   GLS.VectorLists,
   GLS.VectorLists,
   GLS.PersistentClasses,
   GLS.PersistentClasses,
@@ -468,16 +468,16 @@ type
     procedure GetExtents(out min, max: TAffineVector); overload; virtual;
     procedure GetExtents(out min, max: TAffineVector); overload; virtual;
     procedure GetExtents(out aabb: TAABB); overload; virtual;
     procedure GetExtents(out aabb: TAABB); overload; virtual;
     // Barycenter from vertices data
     // Barycenter from vertices data
-    function GetBarycenter: TVector;
+    function GetBarycenter: TGLVector;
     // Precalculate whatever is needed for rendering, called once
     // Precalculate whatever is needed for rendering, called once
     procedure Prepare; virtual;
     procedure Prepare; virtual;
     function PointInObject(const aPoint: TAffineVector): Boolean; virtual;
     function PointInObject(const aPoint: TAffineVector): Boolean; virtual;
     // Returns the triangle data for a given triangle
     // Returns the triangle data for a given triangle
     procedure GetTriangleData(tri: Integer; list: TAffineVectorList; var v0, v1, v2: TAffineVector); overload;
     procedure GetTriangleData(tri: Integer; list: TAffineVectorList; var v0, v1, v2: TAffineVector); overload;
-    procedure GetTriangleData(tri: Integer; list: TVectorList; var v0, v1, v2: TVector); overload;
+    procedure GetTriangleData(tri: Integer; list: TVectorList; var v0, v1, v2: TGLVector); overload;
     // Sets the triangle data of a given triangle
     // Sets the triangle data of a given triangle
     procedure SetTriangleData(tri: Integer; list: TAffineVectorList; const v0, v1, v2: TAffineVector); overload;
     procedure SetTriangleData(tri: Integer; list: TAffineVectorList; const v0, v1, v2: TAffineVector); overload;
-    procedure SetTriangleData(tri: Integer; list: TVectorList; const v0, v1, v2: TVector); overload;
+    procedure SetTriangleData(tri: Integer; list: TVectorList; const v0, v1, v2: TGLVector); overload;
     (* Build the tangent space from the mesh object's vertex, normal
     (* Build the tangent space from the mesh object's vertex, normal
       and texcoord data, filling the binormals and tangents where specified. *)
       and texcoord data, filling the binormals and tangents where specified. *)
     procedure BuildTangentSpace(buildBinormals: Boolean = True; buildTangents: Boolean = True);
     procedure BuildTangentSpace(buildBinormals: Boolean = True; buildTangents: Boolean = True);
@@ -846,9 +846,9 @@ type
     FNormalsOrientation: TGLMeshNormalsOrientation;
     FNormalsOrientation: TGLMeshNormalsOrientation;
     FMaterialLibrary: TGLMaterialLibrary;
     FMaterialLibrary: TGLMaterialLibrary;
     FLightmapLibrary: TGLMaterialLibrary;
     FLightmapLibrary: TGLMaterialLibrary;
-    FAxisAlignedDimensionsCache: TVector;
+    FAxisAlignedDimensionsCache: TGLVector;
     FBaryCenterOffsetChanged: Boolean;
     FBaryCenterOffsetChanged: Boolean;
-    FBaryCenterOffset: TVector;
+    FBaryCenterOffset: TGLVector;
     FUseMeshMaterials: Boolean;
     FUseMeshMaterials: Boolean;
     FOverlaySkeleton: Boolean;
     FOverlaySkeleton: Boolean;
     FIgnoreMissingTextures: Boolean;
     FIgnoreMissingTextures: Boolean;
@@ -891,10 +891,10 @@ type
     destructor Destroy; override;
     destructor Destroy; override;
     procedure Assign(Source: TPersistent); override;
     procedure Assign(Source: TPersistent); override;
     procedure Notification(AComponent: TComponent; Operation: TOperation); override;
     procedure Notification(AComponent: TComponent; Operation: TOperation); override;
-    function AxisAlignedDimensionsUnscaled: TVector; override;
-    function BarycenterOffset: TVector;
-    function BarycenterPosition: TVector;
-    function BarycenterAbsolutePosition: TVector; override;
+    function AxisAlignedDimensionsUnscaled: TGLVector; override;
+    function BarycenterOffset: TGLVector;
+    function BarycenterPosition: TGLVector;
+    function BarycenterAbsolutePosition: TGLVector; override;
     procedure BuildList(var rci: TGLRenderContextInfo); override;
     procedure BuildList(var rci: TGLRenderContextInfo); override;
     procedure DoRender(var rci: TGLRenderContextInfo; renderSelf, renderChildren: Boolean); override;
     procedure DoRender(var rci: TGLRenderContextInfo; renderSelf, renderChildren: Boolean); override;
     procedure StructureChanged; override;
     procedure StructureChanged; override;
@@ -904,8 +904,8 @@ type
       (ie. invalid collision detection). Use with caution. *)
       (ie. invalid collision detection). Use with caution. *)
     procedure StructureChangedNoPrepare;
     procedure StructureChangedNoPrepare;
     // BEWARE! Utterly inefficient implementation! 
     // BEWARE! Utterly inefficient implementation! 
-    function RayCastIntersect(const rayStart, rayVector: TVector; intersectPoint: PVector = nil;
-	  intersectNormal: PVector = nil): Boolean; override;
+    function RayCastIntersect(const rayStart, rayVector: TGLVector; intersectPoint: PGLVector = nil;
+	  intersectNormal: PGLVector = nil): Boolean; override;
     function GenerateSilhouette(const silhouetteParameters: TGLSilhouetteParameters): TGLSilhouette; override;
     function GenerateSilhouette(const silhouetteParameters: TGLSilhouetteParameters): TGLSilhouette; override;
     (* This method allows fast shadow volumes for GLActors.
     (* This method allows fast shadow volumes for GLActors.
       If your actor/mesh doesn't change, you don't need to call this.
       If your actor/mesh doesn't change, you don't need to call this.
@@ -999,14 +999,14 @@ type
   public
   public
     constructor Create(aOwner: TComponent); override;
     constructor Create(aOwner: TComponent); override;
     destructor Destroy; override;
     destructor Destroy; override;
-    function OctreeRayCastIntersect(const rayStart, rayVector: TVector; intersectPoint: PVector = nil;
-      intersectNormal: PVector = nil): Boolean;
-    function OctreeSphereSweepIntersect(const rayStart, rayVector: TVector; const velocity, radius: Single;
-      intersectPoint: PVector = nil; intersectNormal: PVector = nil): Boolean;
+    function OctreeRayCastIntersect(const rayStart, rayVector: TGLVector; intersectPoint: PGLVector = nil;
+      intersectNormal: PGLVector = nil): Boolean;
+    function OctreeSphereSweepIntersect(const rayStart, rayVector: TGLVector; const velocity, radius: Single;
+      intersectPoint: PGLVector = nil; intersectNormal: PGLVector = nil): Boolean;
     function OctreeTriangleIntersect(const v1, v2, v3: TAffineVector): Boolean;
     function OctreeTriangleIntersect(const v1, v2, v3: TAffineVector): Boolean;
     (* Returns true if Point is inside the free form - this will only work
     (* Returns true if Point is inside the free form - this will only work
       properly on closed meshes. Requires that Octree has been prepared. *)
       properly on closed meshes. Requires that Octree has been prepared. *)
-    function OctreePointInMesh(const Point: TVector): Boolean;
+    function OctreePointInMesh(const Point: TGLVector): Boolean;
     function OctreeAABBIntersect(const AABB: TAABB; objMatrix, invObjMatrix: TMatrix;
     function OctreeAABBIntersect(const AABB: TAABB; objMatrix, invObjMatrix: TMatrix;
       triangles: TAffineVectorList = nil): Boolean;
       triangles: TAffineVectorList = nil): Boolean;
     // TODO:  function OctreeSphereIntersect
     // TODO:  function OctreeSphereIntersect
@@ -1313,8 +1313,7 @@ uses
   GLS.MeshUtils,
   GLS.MeshUtils,
   GLS.State,
   GLS.State,
   GLS.Utils,
   GLS.Utils,
-  GLS.BaseMeshSilhouette,
-  GLS.VectorTypes;
+  GLS.BaseMeshSilhouette;
 
 
 var
 var
   vVectorFileFormats: TGLVectorFileFormatsList;
   vVectorFileFormats: TGLVectorFileFormatsList;
@@ -3121,7 +3120,7 @@ begin
   aabb := FExtentCache;
   aabb := FExtentCache;
 end;
 end;
 
 
-function TMeshObject.GetBarycenter: TVector;
+function TMeshObject.GetBarycenter: TGLVector;
 var
 var
   dMin, dMax: TAffineVector;
   dMin, dMax: TAffineVector;
 begin
 begin
@@ -3299,7 +3298,7 @@ begin
   end;
   end;
 end;
 end;
 
 
-procedure TMeshObject.GetTriangleData(tri: Integer; list: TVectorList; var v0, v1, v2: TVector);
+procedure TMeshObject.GetTriangleData(tri: Integer; list: TVectorList; var v0, v1, v2: TGLVector);
 var
 var
   i, LastCount, Count: Integer;
   i, LastCount, Count: Integer;
   fg: TFGVertexIndexList;
   fg: TFGVertexIndexList;
@@ -3451,7 +3450,7 @@ begin
   end;
   end;
 end;
 end;
 
 
-procedure TMeshObject.SetTriangleData(tri: Integer; list: TVectorList; const v0, v1, v2: TVector);
+procedure TMeshObject.SetTriangleData(tri: Integer; list: TVectorList; const v0, v1, v2: TGLVector);
 var
 var
   i, LastCount, Count: Integer;
   i, LastCount, Count: Integer;
   fg: TFGVertexIndexList;
   fg: TFGVertexIndexList;
@@ -3574,7 +3573,7 @@ procedure TMeshObject.BuildTangentSpace(buildBinormals: Boolean = True; buildTan
 var
 var
   i, j: Integer;
   i, j: Integer;
   v, n, t: array [0 .. 2] of TAffineVector;
   v, n, t: array [0 .. 2] of TAffineVector;
-  tangent, binormal: array [0 .. 2] of TVector;
+  tangent, binormal: array [0 .. 2] of TGLVector;
   vt, tt: TAffineVector;
   vt, tt: TAffineVector;
   interp, dot: Single;
   interp, dot: Single;
 
 
@@ -3757,7 +3756,7 @@ begin
             if FUseVBO then
             if FUseVBO then
               FTexCoordsVBO[i].Bind;
               FTexCoordsVBO[i].Bind;
             gl.ClientActiveTexture(GL_TEXTURE0 + i);
             gl.ClientActiveTexture(GL_TEXTURE0 + i);
-            gl.TexCoordPointer(4, GL_FLOAT, SizeOf(TVector), tlists[i]);
+            gl.TexCoordPointer(4, GL_FLOAT, SizeOf(TGLVector), tlists[i]);
             gl.EnableClientState(GL_TEXTURE_COORD_ARRAY);
             gl.EnableClientState(GL_TEXTURE_COORD_ARRAY);
           end;
           end;
         end;
         end;
@@ -3955,7 +3954,7 @@ begin
 
 
     if FColorsVBO.IsDataNeedUpdate then
     if FColorsVBO.IsDataNeedUpdate then
     begin
     begin
-      FColorsVBO.BindBufferData(Colors.list, SizeOf(TVector) * Colors.Count, BufferUsage);
+      FColorsVBO.BindBufferData(Colors.list, SizeOf(TGLVector) * Colors.Count, BufferUsage);
       FColorsVBO.NotifyDataUpdated;
       FColorsVBO.NotifyDataUpdated;
       FColorsVBO.UnBind;
       FColorsVBO.UnBind;
     end;
     end;
@@ -4011,7 +4010,7 @@ begin
 
 
       if FTexCoordsVBO[i].IsDataNeedUpdate then
       if FTexCoordsVBO[i].IsDataNeedUpdate then
       begin
       begin
-        FTexCoordsVBO[i].BindBufferData(TexCoordsEx[i].list, SizeOf(TVector) * TexCoordsEx[i].Count, BufferUsage);
+        FTexCoordsVBO[i].BindBufferData(TexCoordsEx[i].list, SizeOf(TGLVector) * TexCoordsEx[i].Count, BufferUsage);
         FTexCoordsVBO[i].NotifyDataUpdated;
         FTexCoordsVBO[i].NotifyDataUpdated;
         FTexCoordsVBO[i].UnBind;
         FTexCoordsVBO[i].UnBind;
       end;
       end;
@@ -4913,7 +4912,7 @@ var
   invMesh: TGLBaseMeshObject;
   invMesh: TGLBaseMeshObject;
   invMat: TMatrix;
   invMat: TMatrix;
   Bone: TGLSkeletonBone;
   Bone: TGLSkeletonBone;
-  p: TVector;
+  p: TGLVector;
 begin
 begin
   // cleanup existing stuff
   // cleanup existing stuff
   for i := 0 to FBoneMatrixInvertedMeshes.Count - 1 do
   for i := 0 to FBoneMatrixInvertedMeshes.Count - 1 do
@@ -4991,7 +4990,7 @@ procedure TGLSkeletonMeshObject.ApplyCurrentSkeletonFrame(normalize: Boolean);
 var
 var
   i, j, BoneID: Integer;
   i, j, BoneID: Integer;
   refVertices, refNormals: TAffineVectorList;
   refVertices, refNormals: TAffineVectorList;
-  n, nt: TVector;
+  n, nt: TGLVector;
   Bone: TGLSkeletonBone;
   Bone: TGLSkeletonBone;
   Skeleton: TGLSkeleton;
   Skeleton: TGLSkeleton;
   tempvert, tempnorm: TAffineVector;
   tempvert, tempnorm: TAffineVector;
@@ -6175,7 +6174,7 @@ begin
   inherited;
   inherited;
 end;
 end;
 
 
-function TGLBaseMesh.AxisAlignedDimensionsUnscaled: TVector;
+function TGLBaseMesh.AxisAlignedDimensionsUnscaled: TGLVector;
 var
 var
   dMin, dMax: TAffineVector;
   dMin, dMax: TAffineVector;
 begin
 begin
@@ -6190,7 +6189,7 @@ begin
   SetVector(Result, FAxisAlignedDimensionsCache);
   SetVector(Result, FAxisAlignedDimensionsCache);
 end;
 end;
 
 
-function TGLBaseMesh.BarycenterOffset: TVector;
+function TGLBaseMesh.BarycenterOffset: TGLVector;
 var
 var
   dMin, dMax: TAffineVector;
   dMin, dMax: TAffineVector;
 begin
 begin
@@ -6207,12 +6206,12 @@ begin
   Result := FBaryCenterOffset;
   Result := FBaryCenterOffset;
 end;
 end;
 
 
-function TGLBaseMesh.BarycenterPosition: TVector;
+function TGLBaseMesh.BarycenterPosition: TGLVector;
 begin
 begin
   Result := VectorAdd(Position.DirectVector, BarycenterOffset);
   Result := VectorAdd(Position.DirectVector, BarycenterOffset);
 end;
 end;
 
 
-function TGLBaseMesh.BarycenterAbsolutePosition: TVector;
+function TGLBaseMesh.BarycenterAbsolutePosition: TGLVector;
 begin
 begin
   Result := LocalToAbsolute(BarycenterPosition);
   Result := LocalToAbsolute(BarycenterPosition);
 end;
 end;
@@ -6390,14 +6389,14 @@ begin
   inherited StructureChanged;
   inherited StructureChanged;
 end;
 end;
 
 
-function TGLBaseMesh.RayCastIntersect(const rayStart, rayVector: TVector; intersectPoint: PVector = nil;
-  intersectNormal: PVector = nil): Boolean;
+function TGLBaseMesh.RayCastIntersect(const rayStart, rayVector: TGLVector; intersectPoint: PGLVector = nil;
+  intersectNormal: PGLVector = nil): Boolean;
 
 
 var
 var
   i,j: Integer;
   i,j: Integer;
   Obj: TMeshObject;
   Obj: TMeshObject;
   Tris: TAffineVectorList;
   Tris: TAffineVectorList;
-  locRayStart, locRayVector, iPoint, iNormal: TVector;
+  locRayStart, locRayVector, iPoint, iNormal: TGLVector;
   d, minD: Single;
   d, minD: Single;
 
 
 begin
 begin
@@ -6529,10 +6528,10 @@ begin
   end;
   end;
 end;
 end;
 
 
-function TGLFreeForm.OctreeRayCastIntersect(const rayStart, rayVector: TVector; intersectPoint: PVector = nil;
-  intersectNormal: PVector = nil): Boolean;
+function TGLFreeForm.OctreeRayCastIntersect(const rayStart, rayVector: TGLVector; intersectPoint: PGLVector = nil;
+  intersectNormal: PGLVector = nil): Boolean;
 var
 var
-  locRayStart, locRayVector: TVector;
+  locRayStart, locRayVector: TGLVector;
 begin
 begin
   Assert(Assigned(FOctree), strOctreeMustBePreparedBeforeUse);
   Assert(Assigned(FOctree), strOctreeMustBePreparedBeforeUse);
   SetVector(locRayStart, AbsoluteToLocal(rayStart));
   SetVector(locRayStart, AbsoluteToLocal(rayStart));
@@ -6551,11 +6550,11 @@ begin
   end;
   end;
 end;
 end;
 
 
-function TGLFreeForm.OctreePointInMesh(const Point: TVector): Boolean;
+function TGLFreeForm.OctreePointInMesh(const Point: TGLVector): Boolean;
 const
 const
   cPointRadiusStep = 10000;
   cPointRadiusStep = 10000;
 var
 var
-  rayStart, rayVector, hitPoint, hitNormal: TVector;
+  rayStart, rayVector, hitPoint, hitNormal: TGLVector;
   BRad: double;
   BRad: double;
   HitCount: Integer;
   HitCount: Integer;
   hitDot: double;
   hitDot: double;
@@ -6605,10 +6604,10 @@ begin
   end;
   end;
 end;
 end;
 
 
-function TGLFreeForm.OctreeSphereSweepIntersect(const rayStart, rayVector: TVector; const velocity, radius: Single;
-  intersectPoint: PVector = nil; intersectNormal: PVector = nil): Boolean;
+function TGLFreeForm.OctreeSphereSweepIntersect(const rayStart, rayVector: TGLVector; const velocity, radius: Single;
+  intersectPoint: PGLVector = nil; intersectNormal: PGLVector = nil): Boolean;
 var
 var
-  locRayStart, locRayVector: TVector;
+  locRayStart, locRayVector: TGLVector;
 begin
 begin
   Assert(Assigned(FOctree), strOctreeMustBePreparedBeforeUse);
   Assert(Assigned(FOctree), strOctreeMustBePreparedBeforeUse);
   SetVector(locRayStart, AbsoluteToLocal(rayStart));
   SetVector(locRayStart, AbsoluteToLocal(rayStart));

Різницю між файлами не показано, бо вона завелика
+ 172 - 172
Source/GLS.VectorGeometry.pas


+ 25 - 25
Source/GLS.VectorLists.pas

@@ -129,7 +129,7 @@ type
     constructor Create; override;
     constructor Create; override;
     procedure Assign(Src: TPersistent); override;
     procedure Assign(Src: TPersistent); override;
     function Add(const item: TAffineVector): Integer; overload;
     function Add(const item: TAffineVector): Integer; overload;
-    function Add(const item: TVector): Integer; overload;
+    function Add(const item: TGLVector): Integer; overload;
     procedure Add(const i1, i2: TAffineVector); overload;
     procedure Add(const i1, i2: TAffineVector); overload;
     procedure Add(const i1, i2, i3: TAffineVector); overload;
     procedure Add(const i1, i2, i3: TAffineVector); overload;
     function Add(const item: TVector2f): Integer; overload;
     function Add(const item: TVector2f): Integer; overload;
@@ -172,33 +172,33 @@ type
     procedure Scale(const factors: TAffineVector); overload;
     procedure Scale(const factors: TAffineVector); overload;
   end;
   end;
 
 
-  (* A list of TVector.
-   Similar to TList, but using TVector as items.
+  (* A list of TGLVector.
+   Similar to TList, but using TGLVector as items.
    The list has stack-like push/pop methods *)
    The list has stack-like push/pop methods *)
   TVectorList = class(TBaseVectorList)
   TVectorList = class(TBaseVectorList)
   private
   private
     FList: PVectorArray;
     FList: PVectorArray;
   protected
   protected
-    function Get(Index: Integer): TVector; inline;
-    procedure Put(Index: Integer; const item: TVector); inline;
+    function Get(Index: Integer): TGLVector; inline;
+    procedure Put(Index: Integer; const item: TGLVector); inline;
     procedure SetCapacity(NewCapacity: Integer); override;
     procedure SetCapacity(NewCapacity: Integer); override;
   public
   public
     constructor Create; override;
     constructor Create; override;
     procedure Assign(Src: TPersistent); override;
     procedure Assign(Src: TPersistent); override;
-    function Add(const item: TVector): Integer; overload; inline;
+    function Add(const item: TGLVector): Integer; overload; inline;
     function Add(const item: TAffineVector; w: Single): Integer; overload; inline;
     function Add(const item: TAffineVector; w: Single): Integer; overload; inline;
     function Add(const X, Y, Z, w: Single): Integer; overload; inline;
     function Add(const X, Y, Z, w: Single): Integer; overload; inline;
     procedure Add(const i1, i2, i3: TAffineVector; w: Single); overload; inline;
     procedure Add(const i1, i2, i3: TAffineVector; w: Single); overload; inline;
     function AddVector(const item: TAffineVector): Integer; overload;
     function AddVector(const item: TAffineVector): Integer; overload;
     function AddPoint(const item: TAffineVector): Integer; overload;
     function AddPoint(const item: TAffineVector): Integer; overload;
     function AddPoint(const X, Y: Single; const Z: Single = 0): Integer; overload;
     function AddPoint(const X, Y: Single; const Z: Single = 0): Integer; overload;
-    procedure Push(const Val: TVector);
-    function Pop: TVector;
-    function IndexOf(const item: TVector): Integer;
-    function FindOrAdd(const item: TVector): Integer;
+    procedure Push(const Val: TGLVector);
+    function Pop: TGLVector;
+    function IndexOf(const item: TGLVector): Integer;
+    function FindOrAdd(const item: TGLVector): Integer;
     function FindOrAddPoint(const item: TAffineVector): Integer;
     function FindOrAddPoint(const item: TAffineVector): Integer;
-    procedure Insert(Index: Integer; const item: TVector);
-    property Items[Index: Integer]: TVector read Get write Put; default;
+    procedure Insert(Index: Integer; const item: TGLVector);
+    property Items[Index: Integer]: TGLVector read Get write Put; default;
     property List: PVectorArray read FList;
     property List: PVectorArray read FList;
     procedure Lerp(const list1, list2: TBaseVectorList; lerpFactor: Single); override;
     procedure Lerp(const list1, list2: TBaseVectorList; lerpFactor: Single); override;
   end;
   end;
@@ -1220,7 +1220,7 @@ begin
   Inc(FRevision);
   Inc(FRevision);
 end;
 end;
 
 
-function TAffineVectorList.Add(const item: TVector): Integer;
+function TAffineVectorList.Add(const item: TGLVector): Integer;
 begin
 begin
   Result := Add(PAffineVector(@item)^);
   Result := Add(PAffineVector(@item)^);
 end;
 end;
@@ -1546,7 +1546,7 @@ end;
 
 
 constructor TVectorList.Create;
 constructor TVectorList.Create;
 begin
 begin
-  FItemSize := SizeOf(TVector);
+  FItemSize := SizeOf(TGLVector);
   inherited Create;
   inherited Create;
   FGrowthDelta := cDefaultListGrowthDelta;
   FGrowthDelta := cDefaultListGrowthDelta;
 end;
 end;
@@ -1557,13 +1557,13 @@ begin
   begin
   begin
     inherited;
     inherited;
     if (Src is TVectorList) then
     if (Src is TVectorList) then
-      System.Move(TVectorList(Src).FList^, FList^, FCount * SizeOf(TVector));
+      System.Move(TVectorList(Src).FList^, FList^, FCount * SizeOf(TGLVector));
   end
   end
   else
   else
     Clear;
     Clear;
 end;
 end;
 
 
-function TVectorList.Add(const item: TVector): Integer;
+function TVectorList.Add(const item: TGLVector): Integer;
 begin
 begin
   Result := FCount;
   Result := FCount;
   if Result = FCapacity then
   if Result = FCapacity then
@@ -1610,7 +1610,7 @@ begin
   Result := Add(PointMake(X, Y, Z));
   Result := Add(PointMake(X, Y, Z));
 end;
 end;
 
 
-function TVectorList.Get(Index: Integer): TVector;
+function TVectorList.Get(Index: Integer): TGLVector;
 begin
 begin
 {$IFOPT R+}
 {$IFOPT R+}
     Assert(Cardinal(Index) < Cardinal(FCount));
     Assert(Cardinal(Index) < Cardinal(FCount));
@@ -1618,7 +1618,7 @@ begin
   Result := FList^[Index];
   Result := FList^[Index];
 end;
 end;
 
 
-procedure TVectorList.Insert(Index: Integer; const Item: TVector);
+procedure TVectorList.Insert(Index: Integer; const Item: TGLVector);
 begin
 begin
 {$IFOPT R+}
 {$IFOPT R+}
     Assert(Cardinal(Index) < Cardinal(FCount));
     Assert(Cardinal(Index) < Cardinal(FCount));
@@ -1627,12 +1627,12 @@ begin
     SetCapacity(FCapacity + FGrowthDelta);
     SetCapacity(FCapacity + FGrowthDelta);
   if Index < FCount then
   if Index < FCount then
     System.Move(FList[Index], FList[Index + 1],
     System.Move(FList[Index], FList[Index + 1],
-      (FCount - Index) * SizeOf(TVector));
+      (FCount - Index) * SizeOf(TGLVector));
   FList^[Index] := Item;
   FList^[Index] := Item;
   Inc(FCount);
   Inc(FCount);
 end;
 end;
 
 
-procedure TVectorList.Put(Index: Integer; const Item: TVector);
+procedure TVectorList.Put(Index: Integer; const Item: TGLVector);
 begin
 begin
 {$IFOPT R+}
 {$IFOPT R+}
     Assert(Cardinal(Index) < Cardinal(FCount));
     Assert(Cardinal(Index) < Cardinal(FCount));
@@ -1646,12 +1646,12 @@ begin
   FList := PVectorArray(FBaseList);
   FList := PVectorArray(FBaseList);
 end;
 end;
 
 
-procedure TVectorList.Push(const Val: TVector);
+procedure TVectorList.Push(const Val: TGLVector);
 begin
 begin
   Add(Val);
   Add(Val);
 end;
 end;
 
 
-function TVectorList.Pop: TVector;
+function TVectorList.Pop: TGLVector;
 begin
 begin
   if FCount > 0 then
   if FCount > 0 then
   begin
   begin
@@ -1662,7 +1662,7 @@ begin
     Result := NullHmgVector;
     Result := NullHmgVector;
 end;
 end;
 
 
-function TVectorList.IndexOf(const item: TVector): Integer;
+function TVectorList.IndexOf(const item: TGLVector): Integer;
 var
 var
   I: Integer;
   I: Integer;
 begin
 begin
@@ -1675,7 +1675,7 @@ begin
     end;
     end;
 end;
 end;
 
 
-function TVectorList.FindOrAdd(const item: TVector): Integer;
+function TVectorList.FindOrAdd(const item: TGLVector): Integer;
 begin
 begin
   Result := IndexOf(item);
   Result := IndexOf(item);
   if Result < 0 then
   if Result < 0 then
@@ -1684,7 +1684,7 @@ end;
 
 
 function TVectorList.FindOrAddPoint(const item: TAffineVector): Integer;
 function TVectorList.FindOrAddPoint(const item: TAffineVector): Integer;
 var
 var
-  ptItem: TVector;
+  ptItem: TGLVector;
 begin
 begin
   MakePoint(ptItem, item);
   MakePoint(ptItem, item);
   Result := IndexOf(ptItem);
   Result := IndexOf(ptItem);

+ 1 - 2
Source/GLS.VectorTypesExt.pas

@@ -1,7 +1,6 @@
 //
 //
 // The graphics rendering engine GLScene http://glscene.org
 // The graphics rendering engine GLScene http://glscene.org
 //
 //
-
 unit GLS.VectorTypesExt;
 unit GLS.VectorTypesExt;
 
 
 (* Defines common vector types as advanced records using
 (* Defines common vector types as advanced records using
@@ -1024,7 +1023,7 @@ procedure Init(Obj, TypeInfoOfObj: Pointer; Offset: Integer = 0);
 const
 const
   DefaultRowCount = 3;
   DefaultRowCount = 3;
   DefaultColCount = 3;
   DefaultColCount = 3;
-  VectorTypeName = 'TVector';
+  VectorTypeName = 'TGLVector';
   MatrixTypeName = 'TMatrix';
   MatrixTypeName = 'TMatrix';
 var
 var
   RTTIContext: TRttiContext;
   RTTIContext: TRttiContext;

+ 6 - 6
Source/GLS.WaterPlane.pas

@@ -79,10 +79,10 @@ const
      procedure DoProgress(const progressTime: TGLProgressTimes); override;
      procedure DoProgress(const progressTime: TGLProgressTimes); override;
      procedure BuildList(var rci: TGLRenderContextInfo); override;
      procedure BuildList(var rci: TGLRenderContextInfo); override;
      procedure Assign(Source: TPersistent); override;
      procedure Assign(Source: TPersistent); override;
-     function AxisAlignedDimensionsUnscaled: TVector; override;
+     function AxisAlignedDimensionsUnscaled: TGLVector; override;
      procedure CreateRippleAtGridPos(X, Y: Integer);
      procedure CreateRippleAtGridPos(X, Y: Integer);
      procedure CreateRippleAtWorldPos(const X, Y, z: Single); overload;
      procedure CreateRippleAtWorldPos(const X, Y, z: Single); overload;
-     procedure CreateRippleAtWorldPos(const pos: TVector); overload;
+     procedure CreateRippleAtWorldPos(const pos: TGLVector); overload;
      procedure CreateRippleRandom;
      procedure CreateRippleRandom;
      procedure Reset;
      procedure Reset;
      // CPU time (in seconds) taken by the last iteration step.
      // CPU time (in seconds) taken by the last iteration step.
@@ -206,16 +206,16 @@ end;
 
 
 procedure TGLWaterPlane.CreateRippleAtWorldPos(const X, Y, z: Single);
 procedure TGLWaterPlane.CreateRippleAtWorldPos(const X, Y, z: Single);
 var
 var
-  vv: TVector;
+  vv: TGLVector;
 begin
 begin
   vv := AbsoluteToLocal(PointMake(X, Y, z));
   vv := AbsoluteToLocal(PointMake(X, Y, z));
   CreateRippleAtGridPos(Round((vv.X + 0.5) * Resolution),
   CreateRippleAtGridPos(Round((vv.X + 0.5) * Resolution),
     Round((vv.z + 0.5) * Resolution));
     Round((vv.z + 0.5) * Resolution));
 end;
 end;
 
 
-procedure TGLWaterPlane.CreateRippleAtWorldPos(const pos: TVector);
+procedure TGLWaterPlane.CreateRippleAtWorldPos(const pos: TGLVector);
 var
 var
-  vv: TVector;
+  vv: TGLVector;
 begin
 begin
   vv := AbsoluteToLocal(PointMake(pos));
   vv := AbsoluteToLocal(PointMake(pos));
   CreateRippleAtGridPos(Round((vv.X + 0.5) * Resolution),
   CreateRippleAtGridPos(Round((vv.X + 0.5) * Resolution),
@@ -477,7 +477,7 @@ begin
   inherited Assign(Source);
   inherited Assign(Source);
 end;
 end;
 
 
-function TGLWaterPlane.AxisAlignedDimensionsUnscaled: TVector;
+function TGLWaterPlane.AxisAlignedDimensionsUnscaled: TGLVector;
 begin
 begin
   Result.X := 0.5 * Abs(Resolution);
   Result.X := 0.5 * Abs(Resolution);
   Result.Y := 0;
   Result.Y := 0;

+ 3 - 3
Source/GLS.Windows.pas

@@ -1645,7 +1645,7 @@ end;
 procedure TGLBaseFontControl.WriteTextAt(var rci: TGLRenderContextInfo; const X,
 procedure TGLBaseFontControl.WriteTextAt(var rci: TGLRenderContextInfo; const X,
   Y: TGLFloat; const Data: UnicodeString; const Color: TColorVector);
   Y: TGLFloat; const Data: UnicodeString; const Color: TColorVector);
 var
 var
-  Position: TVector;
+  Position: TGLVector;
 begin
 begin
   if Assigned(BitmapFont) then
   if Assigned(BitmapFont) then
   begin
   begin
@@ -1660,7 +1660,7 @@ end;
 procedure TGLBaseFontControl.WriteTextAt(var rci: TGLRenderContextInfo; const X1,
 procedure TGLBaseFontControl.WriteTextAt(var rci: TGLRenderContextInfo; const X1,
   Y1, X2, Y2: TGLFloat; const Data: UnicodeString; const Color: TColorVector);
   Y1, X2, Y2: TGLFloat; const Data: UnicodeString; const Color: TColorVector);
 var
 var
-  Position: TVector;
+  Position: TGLVector;
 begin
 begin
   if Assigned(BitmapFont) then
   if Assigned(BitmapFont) then
   begin
   begin
@@ -2772,7 +2772,7 @@ end;
 procedure TGLLabel.InternalRender(var rci: TGLRenderContextInfo; renderSelf,
 procedure TGLLabel.InternalRender(var rci: TGLRenderContextInfo; renderSelf,
   renderChildren: Boolean);
   renderChildren: Boolean);
 var
 var
-  TekstPos: TVector;
+  TekstPos: TGLVector;
   Tekst: UnicodeString;
   Tekst: UnicodeString;
   TextColor: TColorVector;
   TextColor: TColorVector;
 begin
 begin

+ 6 - 6
Source/GLS.zBuffer.pas

@@ -357,7 +357,7 @@ end;
 procedure TGLzBuffer.DoCalcVectors;
 procedure TGLzBuffer.DoCalcVectors;
 var
 var
   axs: TAffineVector;
   axs: TAffineVector;
-  Hnorm, hcvec: TVector;
+  Hnorm, hcvec: TGLVector;
   vec: TAffineVector;
   vec: TAffineVector;
   w, h: integer;
   w, h: integer;
   wrp: single;
   wrp: single;
@@ -485,7 +485,7 @@ function TGLzBuffer.PixelToWorld(const x, y: Integer): TAffineVector;
 var
 var
   z, dst: single;
   z, dst: single;
   fy: integer;
   fy: integer;
-  camvec: TVector;
+  camvec: TGLVector;
 begin
 begin
   // if (Cardinal(x)<Cardinal(FWidth)) and (Cardinal(y)<Cardinal(FWidth)) then begin       //xres,yres?
   // if (Cardinal(x)<Cardinal(FWidth)) and (Cardinal(y)<Cardinal(FWidth)) then begin       //xres,yres?
   if (x < FWidth) and (y < FHeight) then
   if (x < FWidth) and (y < FHeight) then
@@ -509,7 +509,7 @@ end;
 function TGLzBuffer.WorldToPixel(const aPoint: TAffineVector; out pixX, pixY:
 function TGLzBuffer.WorldToPixel(const aPoint: TAffineVector; out pixX, pixY:
   integer; out pixZ: single): boolean;
   integer; out pixZ: single): boolean;
 var
 var
-  camPos: TVector;
+  camPos: TGLVector;
   x, y, z, v0, v1, zscal: single;
   x, y, z, v0, v1, zscal: single;
 begin
 begin
   //---Takes x,y,z world coordinate.
   //---Takes x,y,z world coordinate.
@@ -546,7 +546,7 @@ end;
 function TGLzBuffer.WorldToPixelZ(const aPoint: TAffineVector; out pixX, pixY:
 function TGLzBuffer.WorldToPixelZ(const aPoint: TAffineVector; out pixX, pixY:
   integer; out pixZ: single): boolean; //OVERLOAD
   integer; out pixZ: single): boolean; //OVERLOAD
 var
 var
-  camPos: TVector;
+  camPos: TGLVector;
   x, y, z, v0, v1, zscal: single;
   x, y, z, v0, v1, zscal: single;
 begin
 begin
   //---Takes x,y,z world coordinate.
   //---Takes x,y,z world coordinate.
@@ -585,7 +585,7 @@ end;
 function TGLzBuffer.WorldToPixelZ(const aPoint: TAffineVector; out pixX, pixY:
 function TGLzBuffer.WorldToPixelZ(const aPoint: TAffineVector; out pixX, pixY:
   single; out pixZ: single): boolean; //OVERLOAD
   single; out pixZ: single): boolean; //OVERLOAD
 var
 var
-  camPos: TVector;
+  camPos: TGLVector;
   x, y, z, invZ, v0, v1, zscal: single;
   x, y, z, invZ, v0, v1, zscal: single;
 begin
 begin
   //---Takes x,y,z world coordinate. (aPoint)
   //---Takes x,y,z world coordinate. (aPoint)
@@ -625,7 +625,7 @@ end;
 function TGLzBuffer.OrthWorldToPixelZ(const aPoint: TAffineVector; out pixX,
 function TGLzBuffer.OrthWorldToPixelZ(const aPoint: TAffineVector; out pixX,
   pixY: single; out pixZ: single): boolean;
   pixY: single; out pixZ: single): boolean;
 var
 var
-  camPos: TVector;
+  camPos: TGLVector;
   x, y, z: single;
   x, y, z: single;
 begin
 begin
   campos := cam.AbsolutePosition;
   campos := cam.AbsolutePosition;

+ 1 - 1
Source/GLSL.AsmShader.pas

@@ -41,7 +41,7 @@ type
     function GetAsVector2i: TVector2i; override;
     function GetAsVector2i: TVector2i; override;
     function GetAsVector3f: TVector3f; override;
     function GetAsVector3f: TVector3f; override;
     function GetAsVector3i: TVector3i; override;
     function GetAsVector3i: TVector3i; override;
-    function GetAsVector4f: TVector; override;
+    function GetAsVector4f: TGLVector; override;
     function GetAsVector4i: TVector4i; override;
     function GetAsVector4i: TVector4i; override;
 
 
     procedure SetAsVector1f(const Value: Single); override;
     procedure SetAsVector1f(const Value: Single); override;

+ 2 - 2
Source/GLSL.BumpShaders.pas

@@ -1593,7 +1593,7 @@ procedure TGLBumpShader.DoLightPass(var rci: TGLRenderContextInfo;
 var
 var
   dummyHandle, tempHandle: Integer;
   dummyHandle, tempHandle: Integer;
   lightPos, lightAtten,
   lightPos, lightAtten,
-    materialDiffuse, lightDiffuse, lightSpecular: TVector;
+    materialDiffuse, lightDiffuse, lightSpecular: TGLVector;
 begin
 begin
   FVertexProgramHandle.Enable;
   FVertexProgramHandle.Enable;
   FVertexProgramHandle.Bind;
   FVertexProgramHandle.Bind;
@@ -1763,7 +1763,7 @@ end;
 
 
 function TGLBumpShader.DoUnApply(var rci: TGLRenderContextInfo): Boolean;
 function TGLBumpShader.DoUnApply(var rci: TGLRenderContextInfo): Boolean;
 var
 var
-  ambient, LMaterialAmbient: TVector;
+  ambient, LMaterialAmbient: TGLVector;
 begin
 begin
   Result := False;
   Result := False;
   if (csDesigning in ComponentState) and not DesignTimeEnabled then
   if (csDesigning in ComponentState) and not DesignTimeEnabled then

+ 2 - 2
Source/GLSL.CustomShader.pas

@@ -170,7 +170,7 @@ type
     function GetAsVector1f: Single; virtual; abstract;
     function GetAsVector1f: Single; virtual; abstract;
     function GetAsVector2f: TVector2f; virtual; abstract;
     function GetAsVector2f: TVector2f; virtual; abstract;
     function GetAsVector3f: TVector3f; virtual; abstract;
     function GetAsVector3f: TVector3f; virtual; abstract;
-    function GetAsVector4f: TVector; virtual; abstract;
+    function GetAsVector4f: TGLVector; virtual; abstract;
     function GetAsVector1i: Integer; virtual; abstract;
     function GetAsVector1i: Integer; virtual; abstract;
     function GetAsVector2i: TVector2i; virtual; abstract;
     function GetAsVector2i: TVector2i; virtual; abstract;
     function GetAsVector3i: TVector3i; virtual; abstract;
     function GetAsVector3i: TVector3i; virtual; abstract;
@@ -224,7 +224,7 @@ type
     procedure SetToTextureOf(const LibMaterial: TGLLibMaterial; const TextureIndex: Integer); overload;
     procedure SetToTextureOf(const LibMaterial: TGLLibMaterial; const TextureIndex: Integer); overload;
     procedure SetToTextureOf(const Texture: TGLTexture; const TextureIndex: Integer); overload;
     procedure SetToTextureOf(const Texture: TGLTexture; const TextureIndex: Integer); overload;
     // GLScene-friendly properties.
     // GLScene-friendly properties.
-    property AsVector: TVector read GetAsVector4f write SetAsVector4f;
+    property AsVector: TGLVector read GetAsVector4f write SetAsVector4f;
     property AsAffineVector: TAffineVector read GetAsVector3f write SetAsVector3f;
     property AsAffineVector: TAffineVector read GetAsVector3f write SetAsVector3f;
      // Standard types.
      // Standard types.
     property AsFloat: Single read GetAsVector1f write SetAsVector1f;
     property AsFloat: Single read GetAsVector1f write SetAsVector1f;

+ 2 - 2
Source/GLSL.PhongShader.pas

@@ -215,7 +215,7 @@ end;
 
 
 procedure TGLPhongShader.DoAmbientPass(var rci: TGLRenderContextInfo);
 procedure TGLPhongShader.DoAmbientPass(var rci: TGLRenderContextInfo);
 var
 var
-  ambient, materialAmbient: TVector;
+  ambient, materialAmbient: TGLVector;
 begin
 begin
   rci.GLStates.Disable(stLighting);
   rci.GLStates.Disable(stLighting);
 
 
@@ -227,7 +227,7 @@ end;
 
 
 procedure TGLPhongShader.DoLightPass(lightID: Cardinal);
 procedure TGLPhongShader.DoLightPass(lightID: Cardinal);
 var
 var
-  LightParam: TVector;
+  LightParam: TGLVector;
 begin
 begin
   Self.ApplyShaderPrograms();
   Self.ApplyShaderPrograms();
 
 

+ 2 - 2
Source/GLSL.Shader.pas

@@ -106,7 +106,7 @@ type
     function GetAsVector1f: Single; override;
     function GetAsVector1f: Single; override;
     function GetAsVector2f: TVector2f; override;
     function GetAsVector2f: TVector2f; override;
     function GetAsVector3f: TVector3f; override;
     function GetAsVector3f: TVector3f; override;
-    function GetAsVector4f: TVector; override;
+    function GetAsVector4f: TGLVector; override;
     function GetAsVector1i: Integer; override;
     function GetAsVector1i: Integer; override;
     function GetAsVector2i: TVector2i; override;
     function GetAsVector2i: TVector2i; override;
     function GetAsVector3i: TVector3i; override;
     function GetAsVector3i: TVector3i; override;
@@ -499,7 +499,7 @@ begin
   gl.GetUniformiv(FGLSLProg.Handle, FParameterID, @Result);
   gl.GetUniformiv(FGLSLProg.Handle, FParameterID, @Result);
 end;
 end;
 
 
-function TGLSLShaderParameter.GetAsVector4f: TVector;
+function TGLSLShaderParameter.GetAsVector4f: TGLVector;
 begin
 begin
   gl.GetUniformfv(FGLSLProg.Handle, FParameterID, @Result);
   gl.GetUniformfv(FGLSLProg.Handle, FParameterID, @Result);
 end;
 end;

+ 1 - 1
Source/GLSL.ShapeShaders.pas

@@ -800,7 +800,7 @@ end;
 
 
 procedure TGLCelShader.DoApply(var rci: TGLRenderContextInfo; Sender: TObject);
 procedure TGLCelShader.DoApply(var rci: TGLRenderContextInfo; Sender: TObject);
 var
 var
-  light: TVector;
+  light: TGLVector;
 begin
 begin
   if (csDesigning in ComponentState) then
   if (csDesigning in ComponentState) then
     exit;
     exit;

+ 31 - 31
Source/Physics.NGDManager.pas

@@ -23,7 +23,7 @@ uses
   /// Import.Newton,    // new version
   /// Import.Newton,    // new version
 
 
   GLS.VectorTypes,
   GLS.VectorTypes,
-  GLS.VectorGeometry, // PVector TVector TMatrix PMatrix NullHmgVector...
+  GLS.VectorGeometry, // PGLVector TGLVector TMatrix PMatrix NullHmgVector...
   GLS.VectorLists, // TAffineVectorList for Tree
   GLS.VectorLists, // TAffineVectorList for Tree
   GLS.XCollection, // TXCollection file function
   GLS.XCollection, // TXCollection file function
   GLS.GeometryBB, // For show debug
   GLS.GeometryBB, // For show debug
@@ -188,7 +188,7 @@ type
     function GetConstraintCount: Integer;
     function GetConstraintCount: Integer;
     procedure AddNode(const coords: TGLCustomCoordinates); overload;
     procedure AddNode(const coords: TGLCustomCoordinates); overload;
     procedure AddNode(const X, Y, Z: Single); overload;
     procedure AddNode(const X, Y, Z: Single); overload;
-    procedure AddNode(const Value: TVector); overload;
+    procedure AddNode(const Value: TGLVector); overload;
     procedure AddNode(const Value: TAffineVector); overload;
     procedure AddNode(const Value: TAffineVector); overload;
     procedure RebuildAllMaterial;
     procedure RebuildAllMaterial;
     procedure RebuildAllJoint(Sender: TObject);
     procedure RebuildAllJoint(Sender: TObject);
@@ -365,16 +365,16 @@ type
   public
   public
     constructor Create(AOwner: TXCollection); override;
     constructor Create(AOwner: TXCollection); override;
     destructor Destroy; override;
     destructor Destroy; override;
-    procedure AddImpulse(const veloc, pointposit: TVector);
-    function GetOmega: TVector;
-    procedure SetOmega(const Omega: TVector);
-    function GetVelocity: TVector;
-    procedure SetVelocity(const Velocity: TVector);
+    procedure AddImpulse(const veloc, pointposit: TGLVector);
+    function GetOmega: TGLVector;
+    procedure SetOmega(const Omega: TGLVector);
+    function GetVelocity: TGLVector;
+    procedure SetVelocity(const Velocity: TGLVector);
     class function FriendlyName: string; override;
     class function FriendlyName: string; override;
     property CustomForceAndTorqueEvent: TApplyForceAndTorqueEvent
     property CustomForceAndTorqueEvent: TApplyForceAndTorqueEvent
       read FCustomForceAndTorqueEvent write FCustomForceAndTorqueEvent;
       read FCustomForceAndTorqueEvent write FCustomForceAndTorqueEvent;
-    property Velocity: TVector read GetVelocity write SetVelocity;
-    property Omega: TVector read GetOmega write SetOmega;
+    property Velocity: TGLVector read GetVelocity write SetVelocity;
+    property Omega: TGLVector read GetOmega write SetOmega;
   published
   published
     property Force: TGLCoordinates read FForce write FForce;
     property Force: TGLCoordinates read FForce write FForce;
     property Torque: TGLCoordinates read FTorque write FTorque;
     property Torque: TGLCoordinates read FTorque write FTorque;
@@ -632,7 +632,7 @@ type
   public
   public
     constructor Create(Collection: TCollection); override;
     constructor Create(Collection: TCollection); override;
     destructor Destroy; override;
     destructor Destroy; override;
-    procedure KinematicControllerPick(pickpoint: TVector;
+    procedure KinematicControllerPick(pickpoint: TGLVector;
       PickedActions: TGLNGDPickedActions);
       PickedActions: TGLNGDPickedActions);
   published
   published
     property BallAndSocketOptions: TGLNGDJointPivot read FBallAndSocketOptions
     property BallAndSocketOptions: TGLNGDJointPivot read FBallAndSocketOptions
@@ -781,7 +781,7 @@ end;
 // ------------------------
 // ------------------------
 // TGLNGDManager
 // TGLNGDManager
 // ------------------------
 // ------------------------
-procedure TGLNGDManager.AddNode(const Value: TVector);
+procedure TGLNGDManager.AddNode(const Value: TGLVector);
 begin
 begin
   if Assigned(FGLLines) then
   if Assigned(FGLLines) then
   begin
   begin
@@ -821,7 +821,7 @@ end;
 
 
 constructor TGLNGDManager.Create(AOwner: TComponent);
 constructor TGLNGDManager.Create(AOwner: TComponent);
 var
 var
-  minworld, maxworld: TVector;
+  minworld, maxworld: TGLVector;
 begin
 begin
   inherited;
   inherited;
   FNGDBehaviours := TGLNGDBehaviourList.Create;
   FNGDBehaviours := TGLNGDBehaviourList.Create;
@@ -1418,13 +1418,13 @@ end;
 
 
 function TGLNGDBehaviour.GetBBoxCollision: PNewtonCollision;
 function TGLNGDBehaviour.GetBBoxCollision: PNewtonCollision;
 var
 var
-  vc: array [0 .. 7] of TVector;
+  vc: array [0 .. 7] of TGLVector;
   I: Integer;
   I: Integer;
 begin
 begin
   for I := 0 to 8 - 1 do
   for I := 0 to 8 - 1 do
     vc[I] := AABBToBB(FOwnerBaseSceneObject.AxisAlignedBoundingBoxEx).BBox[I];
     vc[I] := AABBToBB(FOwnerBaseSceneObject.AxisAlignedBoundingBoxEx).BBox[I];
   Result := NewtonCreateConvexHull(FManager.FNewtonWorld, 8, @vc[0],
   Result := NewtonCreateConvexHull(FManager.FNewtonWorld, 8, @vc[0],
-    SizeOf(TVector), 0.01, 0, nil);
+    SizeOf(TGLVector), 0.01, 0, nil);
 end;
 end;
 
 
 function TGLNGDBehaviour.GetBSphereCollision: PNewtonCollision;
 function TGLNGDBehaviour.GetBSphereCollision: PNewtonCollision;
@@ -1952,7 +1952,7 @@ end;
 // TGLNGDDynamic
 // TGLNGDDynamic
 //-------------------------
 //-------------------------
 
 
-procedure TGLNGDDynamic.AddImpulse(const veloc, pointposit: TVector);
+procedure TGLNGDDynamic.AddImpulse(const veloc, pointposit: TGLVector);
 begin
 begin
   if Assigned(FNewtonBody) then
   if Assigned(FNewtonBody) then
     NewtonBodyAddImpulse(FNewtonBody, @veloc, @pointposit);
     NewtonBodyAddImpulse(FNewtonBody, @veloc, @pointposit);
@@ -2090,7 +2090,7 @@ procedure TGLNGDDynamic.Render;
     cnt: PNewtonJoint;
     cnt: PNewtonJoint;
     thisContact: PNewtonJoint;
     thisContact: PNewtonJoint;
     material: PNewtonMaterial;
     material: PNewtonMaterial;
-    pos, nor: TVector;
+    pos, nor: TGLVector;
   begin
   begin
     FManager.FCurrentColor := FManager.DebugOption.ContactColor;
     FManager.FCurrentColor := FManager.DebugOption.ContactColor;
     cnt := NewtonBodyGetFirstContactJoint(FNewtonBody);
     cnt := NewtonBodyGetFirstContactJoint(FNewtonBody);
@@ -2112,7 +2112,7 @@ procedure TGLNGDDynamic.Render;
     end;
     end;
   end;
   end;
 
 
-  function GetAbsCom(): TVector;
+  function GetAbsCom(): TGLVector;
   var
   var
     M: TMatrix;
     M: TMatrix;
   begin
   begin
@@ -2126,8 +2126,8 @@ procedure TGLNGDDynamic.Render;
 
 
   procedure DrawForce;
   procedure DrawForce;
   var
   var
-    pos: TVector;
-    nor: TVector;
+    pos: TGLVector;
+    nor: TGLVector;
   begin
   begin
     pos := GetAbsCom;
     pos := GetAbsCom;
 
 
@@ -2158,7 +2158,7 @@ procedure TGLNGDDynamic.Render;
 
 
   procedure DrawCoM;
   procedure DrawCoM;
   var
   var
-    com: TVector;
+    com: TGLVector;
     size: Single;
     size: Single;
   begin
   begin
     FManager.FCurrentColor := FManager.DebugOption.CenterOfMassColor;
     FManager.FCurrentColor := FManager.DebugOption.CenterOfMassColor;
@@ -2203,8 +2203,8 @@ end;
 
 
 procedure TGLNGDDynamic.SetDensity(const Value: Single);
 procedure TGLNGDDynamic.SetDensity(const Value: Single);
 var
 var
-  inertia: TVector;
-  origin: TVector;
+  inertia: TGLVector;
+  origin: TGLVector;
 begin
 begin
   if Assigned(FManager) then
   if Assigned(FManager) then
     if Value >= 0 then
     if Value >= 0 then
@@ -2238,22 +2238,22 @@ begin
       NewtonBodySetLinearDamping(FNewtonBody, FLinearDamping);
       NewtonBodySetLinearDamping(FNewtonBody, FLinearDamping);
 end;
 end;
 
 
-function TGLNGDDynamic.GetOmega: TVector;
+function TGLNGDDynamic.GetOmega: TGLVector;
 begin
 begin
   NewtonBodyGetOmega(FNewtonBody, @Result);
   NewtonBodyGetOmega(FNewtonBody, @Result);
 end;
 end;
 
 
-procedure TGLNGDDynamic.SetOmega(const Omega: TVector);
+procedure TGLNGDDynamic.SetOmega(const Omega: TGLVector);
 begin
 begin
   NewtonBodySetOmega(FNewtonBody, @Omega);
   NewtonBodySetOmega(FNewtonBody, @Omega);
 end;
 end;
 
 
-function TGLNGDDynamic.GetVelocity: TVector;
+function TGLNGDDynamic.GetVelocity: TGLVector;
 begin
 begin
   NewtonBodyGetVelocity(FNewtonBody, @Result);
   NewtonBodyGetVelocity(FNewtonBody, @Result);
 end;
 end;
 
 
-procedure TGLNGDDynamic.SetVelocity(const Velocity: TVector);
+procedure TGLNGDDynamic.SetVelocity(const Velocity: TGLVector);
 begin
 begin
   NewtonBodySetVelocity(FNewtonBody, @Velocity);
   NewtonBodySetVelocity(FNewtonBody, @Velocity);
 end;
 end;
@@ -2371,7 +2371,7 @@ end;
 procedure TGLNGDDynamic.OnApplyForceAndTorqueEvent(const cbody: PNewtonBody;
 procedure TGLNGDDynamic.OnApplyForceAndTorqueEvent(const cbody: PNewtonBody;
   timestep: NGDFloat; threadIndex: Integer);
   timestep: NGDFloat; threadIndex: Integer);
 var
 var
-  worldGravity: TVector;
+  worldGravity: TGLVector;
 begin
 begin
   // Read Only: We get the force and torque resulting from every interaction on this body
   // Read Only: We get the force and torque resulting from every interaction on this body
   NewtonBodyGetForce(cbody, @(FAppliedForce.AsVector));
   NewtonBodyGetForce(cbody, @(FAppliedForce.AsVector));
@@ -2642,7 +2642,7 @@ begin
   end;
   end;
 end;
 end;
 
 
-procedure TGLNGDJoint.KinematicControllerPick(pickpoint: TVector;
+procedure TGLNGDJoint.KinematicControllerPick(pickpoint: TGLVector;
   PickedActions: TGLNGDPickedActions);
   PickedActions: TGLNGDPickedActions);
 begin
 begin
   (* CustomDestroyJoint(FNewtonUserJoint);  //from dJointLibrary.dll
   (* CustomDestroyJoint(FNewtonUserJoint);  //from dJointLibrary.dll
@@ -2691,7 +2691,7 @@ end;
 
 
 procedure TGLNGDJoint.Render;
 procedure TGLNGDJoint.Render;
 
 
-  procedure DrawPivot(pivot: TVector);
+  procedure DrawPivot(pivot: TGLVector);
   var
   var
     size: Single;
     size: Single;
   begin
   begin
@@ -2705,14 +2705,14 @@ procedure TGLNGDJoint.Render;
     FManager.AddNode(VectorAdd(pivot, VectorMake(-size, 0, 0)));
     FManager.AddNode(VectorAdd(pivot, VectorMake(-size, 0, 0)));
   end;
   end;
 
 
-  procedure DrawPin(pin, pivot: TVector);
+  procedure DrawPin(pin, pivot: TGLVector);
   begin
   begin
     FManager.FCurrentColor := FManager.DebugOption.JointAxisColor;
     FManager.FCurrentColor := FManager.DebugOption.JointAxisColor;
     FManager.AddNode(VectorAdd(pivot, pin));
     FManager.AddNode(VectorAdd(pivot, pin));
     FManager.AddNode(VectorAdd(pivot, VectorNegate(pin)));
     FManager.AddNode(VectorAdd(pivot, VectorNegate(pin)));
   end;
   end;
 
 
-  procedure DrawJoint(pivot: TVector);
+  procedure DrawJoint(pivot: TGLVector);
   begin
   begin
     FManager.FCurrentColor := FManager.DebugOption.CustomColor;
     FManager.FCurrentColor := FManager.DebugOption.CustomColor;
     FManager.AddNode(FParentObject.AbsolutePosition);
     FManager.AddNode(FParentObject.AbsolutePosition);

+ 1 - 1
Source/Physics.NGDRagdoll.pas

@@ -49,7 +49,7 @@ procedure Conform;
 destructor Destroy; override;
 destructor Destroy; override;
 procedure LoadFromFile(filename: string);
 procedure LoadFromFile(filename: string);
 procedure SaveToFile(filename: string);
 procedure SaveToFile(filename: string);
-function TranslatePos(n: integer; add: boolean): TVector;
+function TranslatePos(n: integer; add: boolean): TGLVector;
 end;
 end;
 
 
 function GetBoneParent(actor: TGLActor; bone: integer): integer;
 function GetBoneParent(actor: TGLActor; bone: integer): integer;

+ 12 - 12
Source/Physics.ODEManager.pas

@@ -2681,7 +2681,7 @@ end;
 
 
 procedure TGLODEElementBase.CoordinateChanged(Sender: TObject);
 procedure TGLODEElementBase.CoordinateChanged(Sender: TObject);
 var
 var
-  rightVector: TVector;
+  rightVector: TGLVector;
 begin
 begin
   if FIsCalculating then
   if FIsCalculating then
     Exit;
     Exit;
@@ -4369,7 +4369,7 @@ end;
 
 
 procedure TGLODEJointHinge.AxisChange(Sender: TObject);
 procedure TGLODEJointHinge.AxisChange(Sender: TObject);
 var
 var
-  vec: TVector;
+  vec: TGLVector;
 begin
 begin
   vec := FAxis.DirectVector;
   vec := FAxis.DirectVector;
   NormalizeVector(vec);
   NormalizeVector(vec);
@@ -4558,7 +4558,7 @@ end;
 
 
 procedure TGLODEJointSlider.AxisChange(Sender: TObject);
 procedure TGLODEJointSlider.AxisChange(Sender: TObject);
 var
 var
-  vec: TVector;
+  vec: TGLVector;
 begin
 begin
   vec := FAxis.DirectVector;
   vec := FAxis.DirectVector;
   NormalizeVector(vec);
   NormalizeVector(vec);
@@ -4738,7 +4738,7 @@ end;
 
 
 procedure TGLODEJointHinge2.Axis1Change(Sender: TObject);
 procedure TGLODEJointHinge2.Axis1Change(Sender: TObject);
 var
 var
-  vec: TVector;
+  vec: TGLVector;
 begin
 begin
   vec := FAxis1.DirectVector;
   vec := FAxis1.DirectVector;
   NormalizeVector(vec);
   NormalizeVector(vec);
@@ -4749,7 +4749,7 @@ end;
 
 
 procedure TGLODEJointHinge2.Axis2Change(Sender: TObject);
 procedure TGLODEJointHinge2.Axis2Change(Sender: TObject);
 var
 var
-  vec: TVector;
+  vec: TGLVector;
 begin
 begin
   vec := FAxis2.DirectVector;
   vec := FAxis2.DirectVector;
   NormalizeVector(vec);
   NormalizeVector(vec);
@@ -4924,7 +4924,7 @@ end;
 
 
 procedure TGLODEJointUniversal.Axis1Change(Sender: TObject);
 procedure TGLODEJointUniversal.Axis1Change(Sender: TObject);
 var
 var
-  vec: TVector;
+  vec: TGLVector;
 begin
 begin
   vec := FAxis1.DirectVector;
   vec := FAxis1.DirectVector;
   NormalizeVector(vec);
   NormalizeVector(vec);
@@ -4935,7 +4935,7 @@ end;
 
 
 procedure TGLODEJointUniversal.Axis2Change(Sender: TObject);
 procedure TGLODEJointUniversal.Axis2Change(Sender: TObject);
 var
 var
-  vec: TVector;
+  vec: TGLVector;
 begin
 begin
   vec := FAxis2.DirectVector;
   vec := FAxis2.DirectVector;
   NormalizeVector(vec);
   NormalizeVector(vec);
@@ -5315,7 +5315,7 @@ end;
 function TGLODEHeightField.Collide(aPos: TAffineVector; var Depth: Single;
 function TGLODEHeightField.Collide(aPos: TAffineVector; var Depth: Single;
   var cPos, cNorm: TAffineVector): Boolean;
   var cPos, cNorm: TAffineVector): Boolean;
 
 
-  function AbsoluteToLocal(vec: TVector): TVector;
+  function AbsoluteToLocal(vec: TGLVector): TGLVector;
   var
   var
     mat: TMatrix;
     mat: TMatrix;
   begin
   begin
@@ -5332,7 +5332,7 @@ function TGLODEHeightField.Collide(aPos: TAffineVector; var Depth: Single;
       Assert(False);
       Assert(False);
   end;
   end;
 
 
-  function LocalToAbsolute(vec: TVector): TVector;
+  function LocalToAbsolute(vec: TGLVector): TGLVector;
   var
   var
     mat: TMatrix;
     mat: TMatrix;
   begin
   begin
@@ -5348,9 +5348,9 @@ function TGLODEHeightField.Collide(aPos: TAffineVector; var Depth: Single;
       Assert(False);
       Assert(False);
   end;
   end;
 
 
-  function GetHeight(pos: TVector; var height: Single): Boolean;
+  function GetHeight(pos: TGLVector; var height: Single): Boolean;
   var
   var
-    dummy1: TVector;
+    dummy1: TGLVector;
     dummy2: TTexPoint;
     dummy2: TTexPoint;
   begin
   begin
     Result := False;
     Result := False;
@@ -5373,7 +5373,7 @@ function TGLODEHeightField.Collide(aPos: TAffineVector; var Depth: Single;
 const
 const
   cDelta = 0.1;
   cDelta = 0.1;
 var
 var
-  localPos: TVector;
+  localPos: TGLVector;
   height: Single;
   height: Single;
   temp1, temp2: TAffineVector;
   temp1, temp2: TAffineVector;
 begin
 begin

+ 6 - 6
Source/Physics.ODEUtils.pas

@@ -74,10 +74,10 @@ function CreateTriMeshFromBaseMesh(
   var Indices: PdIntegerArray): PdxGeom;
   var Indices: PdIntegerArray): PdxGeom;
 
 
 function GLMatrixFromGeom(Geom: PdxGeom): TMatrix;
 function GLMatrixFromGeom(Geom: PdxGeom): TMatrix;
-function GLDirectionFromGeom(Geom: PdxGeom): TVector;
+function GLDirectionFromGeom(Geom: PdxGeom): TGLVector;
 function CreateODEPlaneFromGLPlane(Plane: TGLPlane; Space: PdxSpace): PdxGeom;
 function CreateODEPlaneFromGLPlane(Plane: TGLPlane; Space: PdxSpace): PdxGeom;
 procedure RenderGeomList(GeomList: TGeomList);
 procedure RenderGeomList(GeomList: TGeomList);
-function RandomColorVector: TVector;
+function RandomColorVector: TGLVector;
 
 
 {.$ EXTERNALSYM GL_ZERO}
 {.$ EXTERNALSYM GL_ZERO}
 
 
@@ -344,7 +344,7 @@ begin
   end;
   end;
 end;
 end;
 
 
-function GLDirectionFromGeom(Geom: PdxGeom): TVector;
+function GLDirectionFromGeom(Geom: PdxGeom): TGLVector;
 var
 var
   m: TMatrix;
   m: TMatrix;
 begin
 begin
@@ -375,7 +375,7 @@ end;
 
 
 procedure CopyPosFromGeomToGL(Geom: PdxGeom; GLBaseSceneObject: TGLBaseSceneObject);
 procedure CopyPosFromGeomToGL(Geom: PdxGeom; GLBaseSceneObject: TGLBaseSceneObject);
 var
 var
-  v: TVector;
+  v: TGLVector;
   m: TMatrix;
   m: TMatrix;
 
 
   R: PdMatrix3;
   R: PdMatrix3;
@@ -551,7 +551,7 @@ end;
 
 
 function CreateODEPlaneFromGLPlane(Plane: TGLPlane; Space: PdxSpace): PdxGeom;
 function CreateODEPlaneFromGLPlane(Plane: TGLPlane; Space: PdxSpace): PdxGeom;
 var
 var
-  Pos, Direction: TVector;
+  Pos, Direction: TGLVector;
   d: single;
   d: single;
 begin
 begin
   Direction := Plane.AbsoluteDirection;
   Direction := Plane.AbsoluteDirection;
@@ -564,7 +564,7 @@ begin
   result := dCreatePlane(space, Direction.X, Direction.Y, Direction.Z, d);
   result := dCreatePlane(space, Direction.X, Direction.Y, Direction.Z, d);
 end;
 end;
 
 
-function RandomColorVector: TVector;
+function RandomColorVector: TGLVector;
 begin
 begin
   result := VectorMake(Random, Random, Random, 1);
   result := VectorMake(Random, Random, Random, 1);
 end;
 end;

+ 2 - 2
Source/Physics.SPIInertias.pas

@@ -69,7 +69,7 @@ type
     (* Bounce speed as if hitting a surface.
     (* Bounce speed as if hitting a surface.
       restitution is the coefficient of restituted energy (1=no energy loss,
       restitution is the coefficient of restituted energy (1=no energy loss,
       0=no bounce). The normal is NOT assumed to be normalized. *)
       0=no bounce). The normal is NOT assumed to be normalized. *)
-    procedure SurfaceBounce(const surfaceNormal: TVector; restitution: Single);
+    procedure SurfaceBounce(const surfaceNormal: TGLVector; restitution: Single);
   published
   published
     property Mass: Single read FMass write FMass;
     property Mass: Single read FMass write FMass;
     property TranslationSpeed: TGLCoordinates read FTranslationSpeed
     property TranslationSpeed: TGLCoordinates read FTranslationSpeed
@@ -465,7 +465,7 @@ begin
   FTranslationSpeed.Invert;
   FTranslationSpeed.Invert;
 end;
 end;
 
 
-procedure TGLParticleInertia.SurfaceBounce(const surfaceNormal: TVector;
+procedure TGLParticleInertia.SurfaceBounce(const surfaceNormal: TGLVector;
   restitution: Single);
   restitution: Single);
 var
 var
   f: Single;
   f: Single;

+ 3 - 3
Source/Sounds.BASS.pas

@@ -68,7 +68,7 @@ type
 
 
   PBASSInfo = ^TBASSInfo;
   PBASSInfo = ^TBASSInfo;
 
 
-procedure VectorToBASSVector(const aVector: TVector;
+procedure VectorToBASSVector(const aVector: TGLVector;
   var aBASSVector: BASS_3DVECTOR);
   var aBASSVector: BASS_3DVECTOR);
 begin
 begin
   aBASSVector.x := aVector.x;
   aBASSVector.x := aVector.x;
@@ -177,7 +177,7 @@ procedure TGLSMBASS.UpdateSource(aSource: TGLBaseSoundSource);
 var
 var
   i: Integer;
   i: Integer;
   p: PBASSInfo;
   p: PBASSInfo;
-  objPos, objOri, objVel: TVector;
+  objPos, objOri, objVel: TGLVector;
   position, orientation, velocity: BASS_3DVECTOR;
   position, orientation, velocity: BASS_3DVECTOR;
   res: Boolean;
   res: Boolean;
 begin
 begin
@@ -289,7 +289,7 @@ end;
 
 
 procedure TGLSMBASS.UpdateSources;
 procedure TGLSMBASS.UpdateSources;
 var
 var
-  objPos, objVel, objDir, objUp: TVector;
+  objPos, objVel, objDir, objUp: TGLVector;
   position, velocity, fwd, top: BASS_3DVECTOR;
   position, velocity, fwd, top: BASS_3DVECTOR;
 begin
 begin
   // update listener
   // update listener

+ 3 - 3
Source/Sounds.FMOD.pas

@@ -67,7 +67,7 @@ type
 
 
   PFMODInfo = ^TFMODInfo;
   PFMODInfo = ^TFMODInfo;
 
 
-procedure VectorToFMODVector(const aVector: TVector; var aFMODVector: TFSoundVector);
+procedure VectorToFMODVector(const aVector: TGLVector; var aFMODVector: TFSoundVector);
 begin
 begin
   aFMODVector.X := aVector.X;
   aFMODVector.X := aVector.X;
   aFMODVector.Y := aVector.Y;
   aFMODVector.Y := aVector.Y;
@@ -211,7 +211,7 @@ end;
 procedure TGLSMFMOD.UpdateSource(aSource: TGLBaseSoundSource);
 procedure TGLSMFMOD.UpdateSource(aSource: TGLBaseSoundSource);
 var
 var
   p: PFMODInfo;
   p: PFMODInfo;
-  objPos, objVel: TVector;
+  objPos, objVel: TGLVector;
   position, velocity: TFSoundVector;
   position, velocity: TFSoundVector;
 begin
 begin
   if (sscSample in aSource.Changes) then
   if (sscSample in aSource.Changes) then
@@ -297,7 +297,7 @@ end;
 
 
 procedure TGLSMFMOD.UpdateSources;
 procedure TGLSMFMOD.UpdateSources;
 var
 var
-  objPos, objVel, objDir, objUp: TVector;
+  objPos, objVel, objDir, objUp: TGLVector;
   position, velocity, fwd, top: TFSoundVector;
   position, velocity, fwd, top: TFSoundVector;
 begin
 begin
   // update listener
   // update listener

+ 1 - 1
Source/Sounds.OpenAL.pas

@@ -306,7 +306,7 @@ end;
 
 
 procedure TGLSMOpenAL.UpdateSources;
 procedure TGLSMOpenAL.UpdateSources;
 var
 var
-  pos, dir, up, vel: TVector;
+  pos, dir, up, vel: TGLVector;
   DirUp: array [0 .. 5] of TALfloat; // orientation
   DirUp: array [0 .. 5] of TALfloat; // orientation
 begin
 begin
   ListenerCoordinates(pos, vel, dir, up);
   ListenerCoordinates(pos, vel, dir, up);

Деякі файли не було показано, через те що забагато файлів було змінено