Browse Source

Combined units GLPerlinBase and GLPerlin

GLScene 5 years ago
parent
commit
4c57bcc00b
100 changed files with 1026 additions and 924 deletions
  1. 1 1
      Demos/Delphi/bench/smoking/smoking.dproj
  2. 5 1
      Demos/Delphi/movements/SmoothNavigator/uMainForm.dfm
  3. 1 4
      Demos/Delphi/movements/pointto/Unit1.pas
  4. 1 1
      Demos/Delphi/physics/NewtonDensity/NewtonDensity.dproj
  5. 1 1
      Demos/Delphi/physics/NewtonJoints/NewtonJoints.dproj
  6. 1 1
      Demos/Delphi/physics/NewtonMaterial/NewtonMaterial.dproj
  7. 1 1
      Demos/Delphi/physics/NewtonMousePick/NewtonMousePick.dproj
  8. 1 1
      Demos/Delphi/physics/NewtonSimpleSpawn/NewtonSimpleSpawn.dproj
  9. 1 1
      Demos/Delphi/physics/NewtonWalkAndCarry/NewtonWalkAndCarry.dproj
  10. 1 1
      Demos/Delphi/physics/NewtonWalkCarryShoot/NewtonWalkCarryShoot.dproj
  11. 242 1
      Demos/Delphi/physics/OdeClothify/OdeClothify.dproj
  12. 1 1
      Demos/Delphi/physics/OdeConveyor/OdeConveyor.dproj
  13. 1 1
      Demos/Delphi/physics/OdeFurball/OdeFurBall.dproj
  14. 1 1
      Demos/Delphi/physics/OdeMachine/OdeMachine.dproj
  15. 1 1
      Demos/Delphi/physics/OdeRagdoll/OdeRagdoll.dproj
  16. 1 11
      Demos/Delphi/physics/OdeSimple/OdeSimple.dproj
  17. 2 2
      Demos/Delphi/physics/clothactor/Unit1.pas
  18. 1 1
      Demos/Delphi/physics/clothactor/clothactor.dproj
  19. 1 1
      Demos/Delphi/physics/odeterrain/OdeTerrain.dproj
  20. 0 2
      Packages/Win32/GLScene_RT.dpk
  21. 0 2
      Packages/Win32/GLScene_RT.dproj
  22. 0 2
      Packages/Win64/GLScene_RT.dpk
  23. 0 2
      Packages/Win64/GLScene_RT.dproj
  24. 3 3
      Source/FGuiSkinEditor.pas
  25. 3 3
      Source/FInfo.pas
  26. 3 3
      Source/FRFaceEditor.pas
  27. 3 3
      Source/FRMaterialPreview.pas
  28. 4 4
      Source/FRTextureEdit.pas
  29. 3 3
      Source/FRTrackBarEdit.pas
  30. 3 3
      Source/FXCollectionEditor.pas
  31. 3 2
      Source/File3DSConst.pas
  32. 5 7
      Source/File3DSTypes.pas
  33. 5 3
      Source/File3DSUtils.pas
  34. 3 3
      Source/FileB3D.pas
  35. 3 2
      Source/FileDDSImage.pas
  36. 3 2
      Source/FileDXTC.pas
  37. 195 9
      Source/FileLWObjects.pas
  38. 0 224
      Source/FileLWObjects.txt
  39. 3 3
      Source/FileQ3BSP.pas
  40. 2 3
      Source/FileTGA.pas
  41. 3 3
      Source/FileVFW.pas
  42. 3 3
      Source/FileVRMLParser.pas
  43. 3 3
      Source/FileX.pas
  44. 37 39
      Source/GLAnimatedSprite.pas
  45. 2 4
      Source/GLAnimationUtils.pas
  46. 5 3
      Source/GLAsmShader.pas
  47. 5 4
      Source/GLAsyncHDS.pas
  48. 5 3
      Source/GLAsyncTimer.pas
  49. 3 2
      Source/GLAtmosphere.pas
  50. 2 3
      Source/GLBaseMeshSilhouette.pas
  51. 9 10
      Source/GLBehaviours.pas
  52. 38 66
      Source/GLCadencer.pas
  53. 5 5
      Source/GLCameraController.pas
  54. 5 3
      Source/GLCanvas.pas
  55. 5 3
      Source/GLCelShader.pas
  56. 12 12
      Source/GLColor.pas
  57. 5 4
      Source/GLCompositeImage.pas
  58. 53 58
      Source/GLConsole.pas
  59. 5 3
      Source/GLCustomShader.pas
  60. 3 2
      Source/GLDCE.pas
  61. 5 4
      Source/GLEParticleMasksManager.pas
  62. 3 3
      Source/GLEllipseCollision.pas
  63. 2 3
      Source/GLFPSMovement.pas
  64. 3 3
      Source/GLFile3DSSceneObjects.pas
  65. 3 3
      Source/GLFileB3D.pas
  66. 0 2
      Source/GLFileBMP.pas
  67. 3 4
      Source/GLFileGL2.pas
  68. 5 5
      Source/GLFileGLB.pas
  69. 3 3
      Source/GLFileGLTF.pas
  70. 5 5
      Source/GLFileGTS.pas
  71. 3 3
      Source/GLFileLMTS.pas
  72. 3 3
      Source/GLFileLWO.pas
  73. 4 5
      Source/GLFileMD2.pas
  74. 3 4
      Source/GLFileMD3.pas
  75. 3 3
      Source/GLFileMD5.pas
  76. 5 3
      Source/GLFileMDC.pas
  77. 5 5
      Source/GLFileMP3.pas
  78. 35 31
      Source/GLFileMS3D.pas
  79. 5 3
      Source/GLFileNMF.pas
  80. 3 3
      Source/GLFileNurbs.pas
  81. 10 9
      Source/GLFileOBJ.pas
  82. 1 1
      Source/GLFileOCT.pas
  83. 7 7
      Source/GLFilePAK.pas
  84. 3 1
      Source/GLFileTGA.pas
  85. 3 3
      Source/GLFileVRML.pas
  86. 4 4
      Source/GLFileWAV.pas
  87. 2 3
      Source/GLFileX.pas
  88. 10 18
      Source/GLFileZLIB.pas
  89. 3 3
      Source/GLFireFX.pas
  90. 2 2
      Source/GLForces.pas
  91. 6 5
      Source/GLGLUTesselation.pas
  92. 3 3
      Source/GLGeomObjects.pas
  93. 51 57
      Source/GLGeometryBB.pas
  94. 78 137
      Source/GLGeometryCoordinates.pas
  95. 5 4
      Source/GLGizmo.pas
  96. 5 3
      Source/GLGizmoEx.pas
  97. 3 3
      Source/GLGraph.pas
  98. 4 4
      Source/GLHeightTileFileHDS.pas
  99. 5 4
      Source/GLHiddenLineShader.pas
  100. 3 1
      Source/GLJoints.pas

+ 1 - 1
Demos/Delphi/bench/smoking/smoking.dproj

@@ -8,7 +8,7 @@
         <AppType>Application</AppType>
         <AppType>Application</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>

+ 5 - 1
Demos/Delphi/movements/SmoothNavigator/uMainForm.dfm

@@ -23,8 +23,9 @@ object Form1: TForm1
     Width = 642
     Width = 642
     Height = 463
     Height = 463
     Camera = GLCamera1
     Camera = GLCamera1
-    Buffer.BackgroundColor = clBackground
+    Buffer.BackgroundColor = clNavy
     FieldOfView = 155.624618530273400000
     FieldOfView = 155.624618530273400000
+    PenAsTouch = False
     Align = alClient
     Align = alClient
     OnMouseDown = GLSceneViewer1MouseDown
     OnMouseDown = GLSceneViewer1MouseDown
     OnMouseMove = GLSceneViewer1MouseMove
     OnMouseMove = GLSceneViewer1MouseMove
@@ -141,9 +142,12 @@ object Form1: TForm1
         Radius = 10.000000000000000000
         Radius = 10.000000000000000000
       end
       end
       object GLArrowLine1: TGLArrowLine
       object GLArrowLine1: TGLArrowLine
+        Material.BackProperties.Specular.Color = {0000003F0000003F0000003F0000803F}
+        Material.MaterialOptions = [moNoLighting]
         Direction.Coordinates = {000000000000803F0000000000000000}
         Direction.Coordinates = {000000000000803F0000000000000000}
         Position.Coordinates = {0000000000004843000000000000803F}
         Position.Coordinates = {0000000000004843000000000000803F}
         Scale.Coordinates = {0000C8420000C8420000C84200000000}
         Scale.Coordinates = {0000C8420000C8420000C84200000000}
+        ShowAxes = True
         Up.Coordinates = {0000000000000000000080BF00000000}
         Up.Coordinates = {0000000000000000000080BF00000000}
         BottomRadius = 0.100000001490116100
         BottomRadius = 0.100000001490116100
         Height = 1.000000000000000000
         Height = 1.000000000000000000

+ 1 - 4
Demos/Delphi/movements/pointto/Unit1.pas

@@ -43,9 +43,6 @@ type
     procedure GLCadencer1Progress(Sender: TObject; const deltaTime,
     procedure GLCadencer1Progress(Sender: TObject; const deltaTime,
       newTime: Double);
       newTime: Double);
   private
   private
-     
-  public
-     
   end;
   end;
 
 
 var
 var
@@ -60,7 +57,7 @@ procedure TForm1.GLCadencer1Progress(Sender: TObject; const deltaTime,
 begin
 begin
    // Make the blue sphere turn and ride a sin
    // Make the blue sphere turn and ride a sin
    DCSphere.Turn(deltaTime*30);
    DCSphere.Turn(deltaTime*30);
-   Sphere.Position.Y:=Sin(DegToRad(newTime*50))*3;
+   Sphere.Position.Y := Sin(DegToRad(newTime*50))*3;
 
 
    // Make the arrow turn
    // Make the arrow turn
    DCArrow.Turn(-deltaTime*15);
    DCArrow.Turn(-deltaTime*15);

+ 1 - 1
Demos/Delphi/physics/NewtonDensity/NewtonDensity.dproj

@@ -7,7 +7,7 @@
         <TargetedPlatforms>3</TargetedPlatforms>
         <TargetedPlatforms>3</TargetedPlatforms>
         <AppType>Application</AppType>
         <AppType>Application</AppType>
         <FrameworkType>VCL</FrameworkType>
         <FrameworkType>VCL</FrameworkType>
-        <ProjectVersion>18.5</ProjectVersion>
+        <ProjectVersion>19.0</ProjectVersion>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
     </PropertyGroup>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">

+ 1 - 1
Demos/Delphi/physics/NewtonJoints/NewtonJoints.dproj

@@ -7,7 +7,7 @@
         <TargetedPlatforms>3</TargetedPlatforms>
         <TargetedPlatforms>3</TargetedPlatforms>
         <AppType>Application</AppType>
         <AppType>Application</AppType>
         <FrameworkType>VCL</FrameworkType>
         <FrameworkType>VCL</FrameworkType>
-        <ProjectVersion>18.5</ProjectVersion>
+        <ProjectVersion>19.0</ProjectVersion>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
     </PropertyGroup>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">

+ 1 - 1
Demos/Delphi/physics/NewtonMaterial/NewtonMaterial.dproj

@@ -7,7 +7,7 @@
         <TargetedPlatforms>1</TargetedPlatforms>
         <TargetedPlatforms>1</TargetedPlatforms>
         <AppType>Application</AppType>
         <AppType>Application</AppType>
         <FrameworkType>VCL</FrameworkType>
         <FrameworkType>VCL</FrameworkType>
-        <ProjectVersion>18.5</ProjectVersion>
+        <ProjectVersion>19.0</ProjectVersion>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
     </PropertyGroup>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">

+ 1 - 1
Demos/Delphi/physics/NewtonMousePick/NewtonMousePick.dproj

@@ -7,7 +7,7 @@
         <TargetedPlatforms>1</TargetedPlatforms>
         <TargetedPlatforms>1</TargetedPlatforms>
         <AppType>Application</AppType>
         <AppType>Application</AppType>
         <FrameworkType>VCL</FrameworkType>
         <FrameworkType>VCL</FrameworkType>
-        <ProjectVersion>18.5</ProjectVersion>
+        <ProjectVersion>19.0</ProjectVersion>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
     </PropertyGroup>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">

+ 1 - 1
Demos/Delphi/physics/NewtonSimpleSpawn/NewtonSimpleSpawn.dproj

@@ -7,7 +7,7 @@
         <TargetedPlatforms>1</TargetedPlatforms>
         <TargetedPlatforms>1</TargetedPlatforms>
         <AppType>Application</AppType>
         <AppType>Application</AppType>
         <FrameworkType>VCL</FrameworkType>
         <FrameworkType>VCL</FrameworkType>
-        <ProjectVersion>18.5</ProjectVersion>
+        <ProjectVersion>19.0</ProjectVersion>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
     </PropertyGroup>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">

+ 1 - 1
Demos/Delphi/physics/NewtonWalkAndCarry/NewtonWalkAndCarry.dproj

@@ -7,7 +7,7 @@
         <TargetedPlatforms>1</TargetedPlatforms>
         <TargetedPlatforms>1</TargetedPlatforms>
         <AppType>Application</AppType>
         <AppType>Application</AppType>
         <FrameworkType>VCL</FrameworkType>
         <FrameworkType>VCL</FrameworkType>
-        <ProjectVersion>18.5</ProjectVersion>
+        <ProjectVersion>19.0</ProjectVersion>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
     </PropertyGroup>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">

+ 1 - 1
Demos/Delphi/physics/NewtonWalkCarryShoot/NewtonWalkCarryShoot.dproj

@@ -7,7 +7,7 @@
         <TargetedPlatforms>1</TargetedPlatforms>
         <TargetedPlatforms>1</TargetedPlatforms>
         <AppType>Application</AppType>
         <AppType>Application</AppType>
         <FrameworkType>VCL</FrameworkType>
         <FrameworkType>VCL</FrameworkType>
-        <ProjectVersion>18.5</ProjectVersion>
+        <ProjectVersion>19.0</ProjectVersion>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
     </PropertyGroup>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">

+ 242 - 1
Demos/Delphi/physics/OdeClothify/OdeClothify.dproj

@@ -7,7 +7,7 @@
         <TargetedPlatforms>3</TargetedPlatforms>
         <TargetedPlatforms>3</TargetedPlatforms>
         <AppType>Application</AppType>
         <AppType>Application</AppType>
         <FrameworkType>VCL</FrameworkType>
         <FrameworkType>VCL</FrameworkType>
-        <ProjectVersion>18.5</ProjectVersion>
+        <ProjectVersion>19.0</ProjectVersion>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
     </PropertyGroup>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
@@ -170,12 +170,20 @@
                         <RemoteDir>classes</RemoteDir>
                         <RemoteDir>classes</RemoteDir>
                         <Operation>1</Operation>
                         <Operation>1</Operation>
                     </Platform>
                     </Platform>
+                    <Platform Name="Android64">
+                        <RemoteDir>classes</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 </DeployClass>
                 <DeployClass Name="AndroidFileProvider">
                 <DeployClass Name="AndroidFileProvider">
                     <Platform Name="Android">
                     <Platform Name="Android">
                         <RemoteDir>res\xml</RemoteDir>
                         <RemoteDir>res\xml</RemoteDir>
                         <Operation>1</Operation>
                         <Operation>1</Operation>
                     </Platform>
                     </Platform>
+                    <Platform Name="Android64">
+                        <RemoteDir>res\xml</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 </DeployClass>
                 <DeployClass Name="AndroidGDBServer">
                 <DeployClass Name="AndroidGDBServer">
                     <Platform Name="Android">
                     <Platform Name="Android">
@@ -188,12 +196,26 @@
                         <RemoteDir>library\lib\armeabi</RemoteDir>
                         <RemoteDir>library\lib\armeabi</RemoteDir>
                         <Operation>1</Operation>
                         <Operation>1</Operation>
                     </Platform>
                     </Platform>
+                    <Platform Name="Android64">
+                        <RemoteDir>library\lib\armeabi</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
+                <DeployClass Name="AndroidLibnativeArmeabiv7aFile">
+                    <Platform Name="Android64">
+                        <RemoteDir>library\lib\armeabi-v7a</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 </DeployClass>
                 <DeployClass Name="AndroidLibnativeMipsFile">
                 <DeployClass Name="AndroidLibnativeMipsFile">
                     <Platform Name="Android">
                     <Platform Name="Android">
                         <RemoteDir>library\lib\mips</RemoteDir>
                         <RemoteDir>library\lib\mips</RemoteDir>
                         <Operation>1</Operation>
                         <Operation>1</Operation>
                     </Platform>
                     </Platform>
+                    <Platform Name="Android64">
+                        <RemoteDir>library\lib\mips</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 </DeployClass>
                 <DeployClass Name="AndroidLibnativeX86File"/>
                 <DeployClass Name="AndroidLibnativeX86File"/>
                 <DeployClass Name="AndroidServiceOutput">
                 <DeployClass Name="AndroidServiceOutput">
@@ -201,84 +223,216 @@
                         <RemoteDir>library\lib\armeabi-v7a</RemoteDir>
                         <RemoteDir>library\lib\armeabi-v7a</RemoteDir>
                         <Operation>1</Operation>
                         <Operation>1</Operation>
                     </Platform>
                     </Platform>
+                    <Platform Name="Android64">
+                        <RemoteDir>library\lib\arm64-v8a</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
+                <DeployClass Name="AndroidServiceOutput_Android32">
+                    <Platform Name="Android64">
+                        <RemoteDir>library\lib\armeabi-v7a</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 </DeployClass>
                 <DeployClass Name="AndroidSplashImageDef">
                 <DeployClass Name="AndroidSplashImageDef">
                     <Platform Name="Android">
                     <Platform Name="Android">
                         <RemoteDir>res\drawable</RemoteDir>
                         <RemoteDir>res\drawable</RemoteDir>
                         <Operation>1</Operation>
                         <Operation>1</Operation>
                     </Platform>
                     </Platform>
+                    <Platform Name="Android64">
+                        <RemoteDir>res\drawable</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 </DeployClass>
                 <DeployClass Name="AndroidSplashStyles">
                 <DeployClass Name="AndroidSplashStyles">
                     <Platform Name="Android">
                     <Platform Name="Android">
                         <RemoteDir>res\values</RemoteDir>
                         <RemoteDir>res\values</RemoteDir>
                         <Operation>1</Operation>
                         <Operation>1</Operation>
                     </Platform>
                     </Platform>
+                    <Platform Name="Android64">
+                        <RemoteDir>res\values</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 </DeployClass>
                 <DeployClass Name="AndroidSplashStylesV21">
                 <DeployClass Name="AndroidSplashStylesV21">
                     <Platform Name="Android">
                     <Platform Name="Android">
                         <RemoteDir>res\values-v21</RemoteDir>
                         <RemoteDir>res\values-v21</RemoteDir>
                         <Operation>1</Operation>
                         <Operation>1</Operation>
                     </Platform>
                     </Platform>
+                    <Platform Name="Android64">
+                        <RemoteDir>res\values-v21</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
+                <DeployClass Name="Android_Colors">
+                    <Platform Name="Android">
+                        <RemoteDir>res\values</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="Android64">
+                        <RemoteDir>res\values</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 </DeployClass>
                 <DeployClass Name="Android_DefaultAppIcon">
                 <DeployClass Name="Android_DefaultAppIcon">
                     <Platform Name="Android">
                     <Platform Name="Android">
                         <RemoteDir>res\drawable</RemoteDir>
                         <RemoteDir>res\drawable</RemoteDir>
                         <Operation>1</Operation>
                         <Operation>1</Operation>
                     </Platform>
                     </Platform>
+                    <Platform Name="Android64">
+                        <RemoteDir>res\drawable</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 </DeployClass>
                 <DeployClass Name="Android_LauncherIcon144">
                 <DeployClass Name="Android_LauncherIcon144">
                     <Platform Name="Android">
                     <Platform Name="Android">
                         <RemoteDir>res\drawable-xxhdpi</RemoteDir>
                         <RemoteDir>res\drawable-xxhdpi</RemoteDir>
                         <Operation>1</Operation>
                         <Operation>1</Operation>
                     </Platform>
                     </Platform>
+                    <Platform Name="Android64">
+                        <RemoteDir>res\drawable-xxhdpi</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 </DeployClass>
                 <DeployClass Name="Android_LauncherIcon36">
                 <DeployClass Name="Android_LauncherIcon36">
                     <Platform Name="Android">
                     <Platform Name="Android">
                         <RemoteDir>res\drawable-ldpi</RemoteDir>
                         <RemoteDir>res\drawable-ldpi</RemoteDir>
                         <Operation>1</Operation>
                         <Operation>1</Operation>
                     </Platform>
                     </Platform>
+                    <Platform Name="Android64">
+                        <RemoteDir>res\drawable-ldpi</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 </DeployClass>
                 <DeployClass Name="Android_LauncherIcon48">
                 <DeployClass Name="Android_LauncherIcon48">
                     <Platform Name="Android">
                     <Platform Name="Android">
                         <RemoteDir>res\drawable-mdpi</RemoteDir>
                         <RemoteDir>res\drawable-mdpi</RemoteDir>
                         <Operation>1</Operation>
                         <Operation>1</Operation>
                     </Platform>
                     </Platform>
+                    <Platform Name="Android64">
+                        <RemoteDir>res\drawable-mdpi</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 </DeployClass>
                 <DeployClass Name="Android_LauncherIcon72">
                 <DeployClass Name="Android_LauncherIcon72">
                     <Platform Name="Android">
                     <Platform Name="Android">
                         <RemoteDir>res\drawable-hdpi</RemoteDir>
                         <RemoteDir>res\drawable-hdpi</RemoteDir>
                         <Operation>1</Operation>
                         <Operation>1</Operation>
                     </Platform>
                     </Platform>
+                    <Platform Name="Android64">
+                        <RemoteDir>res\drawable-hdpi</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 </DeployClass>
                 <DeployClass Name="Android_LauncherIcon96">
                 <DeployClass Name="Android_LauncherIcon96">
                     <Platform Name="Android">
                     <Platform Name="Android">
                         <RemoteDir>res\drawable-xhdpi</RemoteDir>
                         <RemoteDir>res\drawable-xhdpi</RemoteDir>
                         <Operation>1</Operation>
                         <Operation>1</Operation>
                     </Platform>
                     </Platform>
+                    <Platform Name="Android64">
+                        <RemoteDir>res\drawable-xhdpi</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
+                <DeployClass Name="Android_NotificationIcon24">
+                    <Platform Name="Android">
+                        <RemoteDir>res\drawable-mdpi</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="Android64">
+                        <RemoteDir>res\drawable-mdpi</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
+                <DeployClass Name="Android_NotificationIcon36">
+                    <Platform Name="Android">
+                        <RemoteDir>res\drawable-hdpi</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="Android64">
+                        <RemoteDir>res\drawable-hdpi</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
+                <DeployClass Name="Android_NotificationIcon48">
+                    <Platform Name="Android">
+                        <RemoteDir>res\drawable-xhdpi</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="Android64">
+                        <RemoteDir>res\drawable-xhdpi</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
+                <DeployClass Name="Android_NotificationIcon72">
+                    <Platform Name="Android">
+                        <RemoteDir>res\drawable-xxhdpi</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="Android64">
+                        <RemoteDir>res\drawable-xxhdpi</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
+                <DeployClass Name="Android_NotificationIcon96">
+                    <Platform Name="Android">
+                        <RemoteDir>res\drawable-xxxhdpi</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="Android64">
+                        <RemoteDir>res\drawable-xxxhdpi</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 </DeployClass>
                 <DeployClass Name="Android_SplashImage426">
                 <DeployClass Name="Android_SplashImage426">
                     <Platform Name="Android">
                     <Platform Name="Android">
                         <RemoteDir>res\drawable-small</RemoteDir>
                         <RemoteDir>res\drawable-small</RemoteDir>
                         <Operation>1</Operation>
                         <Operation>1</Operation>
                     </Platform>
                     </Platform>
+                    <Platform Name="Android64">
+                        <RemoteDir>res\drawable-small</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 </DeployClass>
                 <DeployClass Name="Android_SplashImage470">
                 <DeployClass Name="Android_SplashImage470">
                     <Platform Name="Android">
                     <Platform Name="Android">
                         <RemoteDir>res\drawable-normal</RemoteDir>
                         <RemoteDir>res\drawable-normal</RemoteDir>
                         <Operation>1</Operation>
                         <Operation>1</Operation>
                     </Platform>
                     </Platform>
+                    <Platform Name="Android64">
+                        <RemoteDir>res\drawable-normal</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 </DeployClass>
                 <DeployClass Name="Android_SplashImage640">
                 <DeployClass Name="Android_SplashImage640">
                     <Platform Name="Android">
                     <Platform Name="Android">
                         <RemoteDir>res\drawable-large</RemoteDir>
                         <RemoteDir>res\drawable-large</RemoteDir>
                         <Operation>1</Operation>
                         <Operation>1</Operation>
                     </Platform>
                     </Platform>
+                    <Platform Name="Android64">
+                        <RemoteDir>res\drawable-large</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 </DeployClass>
                 <DeployClass Name="Android_SplashImage960">
                 <DeployClass Name="Android_SplashImage960">
                     <Platform Name="Android">
                     <Platform Name="Android">
                         <RemoteDir>res\drawable-xlarge</RemoteDir>
                         <RemoteDir>res\drawable-xlarge</RemoteDir>
                         <Operation>1</Operation>
                         <Operation>1</Operation>
                     </Platform>
                     </Platform>
+                    <Platform Name="Android64">
+                        <RemoteDir>res\drawable-xlarge</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
+                <DeployClass Name="Android_Strings">
+                    <Platform Name="Android">
+                        <RemoteDir>res\values</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="Android64">
+                        <RemoteDir>res\values</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 </DeployClass>
                 <DeployClass Name="DebugSymbols">
                 <DeployClass Name="DebugSymbols">
                     <Platform Name="iOSSimulator">
                     <Platform Name="iOSSimulator">
@@ -367,6 +521,9 @@
                     <Platform Name="Android">
                     <Platform Name="Android">
                         <Operation>0</Operation>
                         <Operation>0</Operation>
                     </Platform>
                     </Platform>
+                    <Platform Name="Android64">
+                        <Operation>0</Operation>
+                    </Platform>
                     <Platform Name="iOSDevice32">
                     <Platform Name="iOSDevice32">
                         <Operation>0</Operation>
                         <Operation>0</Operation>
                     </Platform>
                     </Platform>
@@ -421,6 +578,16 @@
                         <Operation>1</Operation>
                         <Operation>1</Operation>
                     </Platform>
                     </Platform>
                 </DeployClass>
                 </DeployClass>
+                <DeployClass Name="iPad_Launch2x">
+                    <Platform Name="iOSDevice64">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
                 <DeployClass Name="iPad_Launch768">
                 <DeployClass Name="iPad_Launch768">
                     <Platform Name="iOSDevice32">
                     <Platform Name="iOSDevice32">
                         <Operation>1</Operation>
                         <Operation>1</Operation>
@@ -432,6 +599,26 @@
                         <Operation>1</Operation>
                         <Operation>1</Operation>
                     </Platform>
                     </Platform>
                 </DeployClass>
                 </DeployClass>
+                <DeployClass Name="iPad_LaunchDark2x">
+                    <Platform Name="iOSDevice64">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
+                <DeployClass Name="iPhone_Launch2x">
+                    <Platform Name="iOSDevice64">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
                 <DeployClass Name="iPhone_Launch320">
                 <DeployClass Name="iPhone_Launch320">
                     <Platform Name="iOSDevice32">
                     <Platform Name="iOSDevice32">
                         <Operation>1</Operation>
                         <Operation>1</Operation>
@@ -443,6 +630,16 @@
                         <Operation>1</Operation>
                         <Operation>1</Operation>
                     </Platform>
                     </Platform>
                 </DeployClass>
                 </DeployClass>
+                <DeployClass Name="iPhone_Launch3x">
+                    <Platform Name="iOSDevice64">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
                 <DeployClass Name="iPhone_Launch640">
                 <DeployClass Name="iPhone_Launch640">
                     <Platform Name="iOSDevice32">
                     <Platform Name="iOSDevice32">
                         <Operation>1</Operation>
                         <Operation>1</Operation>
@@ -465,10 +662,33 @@
                         <Operation>1</Operation>
                         <Operation>1</Operation>
                     </Platform>
                     </Platform>
                 </DeployClass>
                 </DeployClass>
+                <DeployClass Name="iPhone_LaunchDark2x">
+                    <Platform Name="iOSDevice64">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
+                <DeployClass Name="iPhone_LaunchDark3x">
+                    <Platform Name="iOSDevice64">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
                 <DeployClass Name="ProjectAndroidManifest">
                 <DeployClass Name="ProjectAndroidManifest">
                     <Platform Name="Android">
                     <Platform Name="Android">
                         <Operation>1</Operation>
                         <Operation>1</Operation>
                     </Platform>
                     </Platform>
+                    <Platform Name="Android64">
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 </DeployClass>
                 <DeployClass Name="ProjectiOSDeviceDebug">
                 <DeployClass Name="ProjectiOSDeviceDebug">
                     <Platform Name="iOSDevice32">
                     <Platform Name="iOSDevice32">
@@ -509,6 +729,16 @@
                         <Operation>1</Operation>
                         <Operation>1</Operation>
                     </Platform>
                     </Platform>
                 </DeployClass>
                 </DeployClass>
+                <DeployClass Name="ProjectiOSLaunchScreen">
+                    <Platform Name="iOSDevice64">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen</RemoteDir>
+                        <Operation>64</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen</RemoteDir>
+                        <Operation>64</Operation>
+                    </Platform>
+                </DeployClass>
                 <DeployClass Name="ProjectiOSResource">
                 <DeployClass Name="ProjectiOSResource">
                     <Platform Name="iOSDevice32">
                     <Platform Name="iOSDevice32">
                         <Operation>1</Operation>
                         <Operation>1</Operation>
@@ -561,6 +791,10 @@
                         <RemoteDir>library\lib\armeabi-v7a</RemoteDir>
                         <RemoteDir>library\lib\armeabi-v7a</RemoteDir>
                         <Operation>1</Operation>
                         <Operation>1</Operation>
                     </Platform>
                     </Platform>
+                    <Platform Name="Android64">
+                        <RemoteDir>library\lib\arm64-v8a</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                     <Platform Name="iOSDevice32">
                     <Platform Name="iOSDevice32">
                         <Operation>1</Operation>
                         <Operation>1</Operation>
                     </Platform>
                     </Platform>
@@ -585,6 +819,12 @@
                         <Operation>0</Operation>
                         <Operation>0</Operation>
                     </Platform>
                     </Platform>
                 </DeployClass>
                 </DeployClass>
+                <DeployClass Name="ProjectOutput_Android32">
+                    <Platform Name="Android64">
+                        <RemoteDir>library\lib\armeabi-v7a</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
                 <DeployClass Name="ProjectUWPManifest">
                 <DeployClass Name="ProjectUWPManifest">
                     <Platform Name="Win32">
                     <Platform Name="Win32">
                         <Operation>1</Operation>
                         <Operation>1</Operation>
@@ -622,6 +862,7 @@
                 <ProjectRoot Platform="Android" Name="$(PROJECTNAME)"/>
                 <ProjectRoot Platform="Android" Name="$(PROJECTNAME)"/>
                 <ProjectRoot Platform="OSX64" Name="$(PROJECTNAME).app"/>
                 <ProjectRoot Platform="OSX64" Name="$(PROJECTNAME).app"/>
                 <ProjectRoot Platform="iOSSimulator" Name="$(PROJECTNAME).app"/>
                 <ProjectRoot Platform="iOSSimulator" Name="$(PROJECTNAME).app"/>
+                <ProjectRoot Platform="Android64" Name="$(PROJECTNAME)"/>
             </Deployment>
             </Deployment>
         </BorlandProject>
         </BorlandProject>
         <ProjectFileVersion>12</ProjectFileVersion>
         <ProjectFileVersion>12</ProjectFileVersion>

+ 1 - 1
Demos/Delphi/physics/OdeConveyor/OdeConveyor.dproj

@@ -7,7 +7,7 @@
         <TargetedPlatforms>1</TargetedPlatforms>
         <TargetedPlatforms>1</TargetedPlatforms>
         <AppType>Application</AppType>
         <AppType>Application</AppType>
         <FrameworkType>VCL</FrameworkType>
         <FrameworkType>VCL</FrameworkType>
-        <ProjectVersion>18.5</ProjectVersion>
+        <ProjectVersion>19.0</ProjectVersion>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
     </PropertyGroup>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">

+ 1 - 1
Demos/Delphi/physics/OdeFurball/OdeFurBall.dproj

@@ -7,7 +7,7 @@
         <TargetedPlatforms>1</TargetedPlatforms>
         <TargetedPlatforms>1</TargetedPlatforms>
         <AppType>Application</AppType>
         <AppType>Application</AppType>
         <FrameworkType>VCL</FrameworkType>
         <FrameworkType>VCL</FrameworkType>
-        <ProjectVersion>18.5</ProjectVersion>
+        <ProjectVersion>19.0</ProjectVersion>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
     </PropertyGroup>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">

+ 1 - 1
Demos/Delphi/physics/OdeMachine/OdeMachine.dproj

@@ -7,7 +7,7 @@
         <TargetedPlatforms>1</TargetedPlatforms>
         <TargetedPlatforms>1</TargetedPlatforms>
         <AppType>Application</AppType>
         <AppType>Application</AppType>
         <FrameworkType>VCL</FrameworkType>
         <FrameworkType>VCL</FrameworkType>
-        <ProjectVersion>18.5</ProjectVersion>
+        <ProjectVersion>19.0</ProjectVersion>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
     </PropertyGroup>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">

+ 1 - 1
Demos/Delphi/physics/OdeRagdoll/OdeRagdoll.dproj

@@ -7,7 +7,7 @@
         <TargetedPlatforms>1</TargetedPlatforms>
         <TargetedPlatforms>1</TargetedPlatforms>
         <AppType>Application</AppType>
         <AppType>Application</AppType>
         <FrameworkType>VCL</FrameworkType>
         <FrameworkType>VCL</FrameworkType>
-        <ProjectVersion>18.5</ProjectVersion>
+        <ProjectVersion>19.0</ProjectVersion>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
     </PropertyGroup>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">

+ 1 - 11
Demos/Delphi/physics/OdeSimple/OdeSimple.dproj

@@ -7,7 +7,7 @@
         <TargetedPlatforms>3</TargetedPlatforms>
         <TargetedPlatforms>3</TargetedPlatforms>
         <AppType>Application</AppType>
         <AppType>Application</AppType>
         <FrameworkType>VCL</FrameworkType>
         <FrameworkType>VCL</FrameworkType>
-        <ProjectVersion>18.5</ProjectVersion>
+        <ProjectVersion>19.0</ProjectVersion>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
     </PropertyGroup>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
@@ -45,12 +45,6 @@
         <CfgParent>Base</CfgParent>
         <CfgParent>Base</CfgParent>
         <Base>true</Base>
         <Base>true</Base>
     </PropertyGroup>
     </PropertyGroup>
-    <PropertyGroup Condition="('$(Platform)'=='iOSDevice64' and '$(Cfg_2)'=='true') or '$(Cfg_2_iOSDevice64)'!=''">
-        <Cfg_2_iOSDevice64>true</Cfg_2_iOSDevice64>
-        <CfgParent>Cfg_2</CfgParent>
-        <Cfg_2>true</Cfg_2>
-        <Base>true</Base>
-    </PropertyGroup>
     <PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win32)'!=''">
     <PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win32)'!=''">
         <Cfg_2_Win32>true</Cfg_2_Win32>
         <Cfg_2_Win32>true</Cfg_2_Win32>
         <CfgParent>Cfg_2</CfgParent>
         <CfgParent>Cfg_2</CfgParent>
@@ -113,9 +107,6 @@
         <DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
         <DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
         <DCC_Optimize>false</DCC_Optimize>
         <DCC_Optimize>false</DCC_Optimize>
     </PropertyGroup>
     </PropertyGroup>
-    <PropertyGroup Condition="'$(Cfg_2_iOSDevice64)'!=''">
-        <BT_BuildType>Debug</BT_BuildType>
-    </PropertyGroup>
     <PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
     <PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
         <DCC_ExeOutput>.\$(Platform)\$(Config)</DCC_ExeOutput>
         <DCC_ExeOutput>.\$(Platform)\$(Config)</DCC_ExeOutput>
         <VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
         <VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
@@ -174,7 +165,6 @@
                 </Excluded_Packages>
                 </Excluded_Packages>
             </Delphi.Personality>
             </Delphi.Personality>
             <Platforms>
             <Platforms>
-                <Platform value="iOSDevice64">False</Platform>
                 <Platform value="Win32">True</Platform>
                 <Platform value="Win32">True</Platform>
                 <Platform value="Win64">True</Platform>
                 <Platform value="Win64">True</Platform>
             </Platforms>
             </Platforms>

+ 2 - 2
Demos/Delphi/physics/clothactor/Unit1.pas

@@ -210,11 +210,11 @@ begin
   // Add the collider's verlet constraints to the verlet world
   // Add the collider's verlet constraints to the verlet world
   AddSCVerletConstriantsToVerletWorld(GLActor1.Skeleton.Colliders, VerletWorld);
   AddSCVerletConstriantsToVerletWorld(GLActor1.Skeleton.Colliders, VerletWorld);
 
 
-  { AirResistance := TVFAirResistance.Create(VerletWorld);
+  (* AirResistance := TVFAirResistance.Create(VerletWorld);
     AirResistance.DragCoeff := 0.001;
     AirResistance.DragCoeff := 0.001;
     AirResistance.WindDirection := AffineVectorMake(0,0,1);
     AirResistance.WindDirection := AffineVectorMake(0,0,1);
     AirResistance.WindMagnitude := 15;
     AirResistance.WindMagnitude := 15;
-    AirResistance.WindChaos := 2;// }
+    AirResistance.WindChaos := 2;// *)
 end;
 end;
 
 
 procedure TForm1.FormDestroy(Sender: TObject);
 procedure TForm1.FormDestroy(Sender: TObject);

+ 1 - 1
Demos/Delphi/physics/clothactor/clothactor.dproj

@@ -7,7 +7,7 @@
         <TargetedPlatforms>3</TargetedPlatforms>
         <TargetedPlatforms>3</TargetedPlatforms>
         <AppType>Application</AppType>
         <AppType>Application</AppType>
         <FrameworkType>VCL</FrameworkType>
         <FrameworkType>VCL</FrameworkType>
-        <ProjectVersion>18.5</ProjectVersion>
+        <ProjectVersion>19.0</ProjectVersion>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
     </PropertyGroup>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">

+ 1 - 1
Demos/Delphi/physics/odeterrain/OdeTerrain.dproj

@@ -7,7 +7,7 @@
         <TargetedPlatforms>1</TargetedPlatforms>
         <TargetedPlatforms>1</TargetedPlatforms>
         <AppType>Application</AppType>
         <AppType>Application</AppType>
         <FrameworkType>VCL</FrameworkType>
         <FrameworkType>VCL</FrameworkType>
-        <ProjectVersion>18.5</ProjectVersion>
+        <ProjectVersion>19.0</ProjectVersion>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
     </PropertyGroup>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">

+ 0 - 2
Packages/Win32/GLScene_RT.dpk

@@ -188,8 +188,6 @@ contains
   GLParticleFX in '..\..\Source\GLParticleFX.pas',
   GLParticleFX in '..\..\Source\GLParticleFX.pas',
   GLParticles in '..\..\Source\GLParticles.pas',
   GLParticles in '..\..\Source\GLParticles.pas',
   GLPerlin in '..\..\Source\GLPerlin.pas',
   GLPerlin in '..\..\Source\GLPerlin.pas',
-  GLPerlinBase in '..\..\Source\GLPerlinBase.pas',
-  GLPerlinNoise3D in '..\..\Source\GLPerlinNoise3D.pas',
   GLPerlinPFX in '..\..\Source\GLPerlinPFX.pas',
   GLPerlinPFX in '..\..\Source\GLPerlinPFX.pas',
   GLPersistentClasses in '..\..\Source\GLPersistentClasses.pas',
   GLPersistentClasses in '..\..\Source\GLPersistentClasses.pas',
   GLPhongShader in '..\..\Source\GLPhongShader.pas',
   GLPhongShader in '..\..\Source\GLPhongShader.pas',

+ 0 - 2
Packages/Win32/GLScene_RT.dproj

@@ -282,8 +282,6 @@
         <DCCReference Include="..\..\Source\GLParticleFX.pas"/>
         <DCCReference Include="..\..\Source\GLParticleFX.pas"/>
         <DCCReference Include="..\..\Source\GLParticles.pas"/>
         <DCCReference Include="..\..\Source\GLParticles.pas"/>
         <DCCReference Include="..\..\Source\GLPerlin.pas"/>
         <DCCReference Include="..\..\Source\GLPerlin.pas"/>
-        <DCCReference Include="..\..\Source\GLPerlinBase.pas"/>
-        <DCCReference Include="..\..\Source\GLPerlinNoise3D.pas"/>
         <DCCReference Include="..\..\Source\GLPerlinPFX.pas"/>
         <DCCReference Include="..\..\Source\GLPerlinPFX.pas"/>
         <DCCReference Include="..\..\Source\GLPersistentClasses.pas"/>
         <DCCReference Include="..\..\Source\GLPersistentClasses.pas"/>
         <DCCReference Include="..\..\Source\GLPhongShader.pas"/>
         <DCCReference Include="..\..\Source\GLPhongShader.pas"/>

+ 0 - 2
Packages/Win64/GLScene_RT.dpk

@@ -190,8 +190,6 @@ contains
   GLParticleFX in '..\..\Source\GLParticleFX.pas',
   GLParticleFX in '..\..\Source\GLParticleFX.pas',
   GLParticles in '..\..\Source\GLParticles.pas',
   GLParticles in '..\..\Source\GLParticles.pas',
   GLPerlin in '..\..\Source\GLPerlin.pas',
   GLPerlin in '..\..\Source\GLPerlin.pas',
-  GLPerlinBase in '..\..\Source\GLPerlinBase.pas',
-  GLPerlinNoise3D in '..\..\Source\GLPerlinNoise3D.pas',
   GLPerlinPFX in '..\..\Source\GLPerlinPFX.pas',
   GLPerlinPFX in '..\..\Source\GLPerlinPFX.pas',
   GLPersistentClasses in '..\..\Source\GLPersistentClasses.pas',
   GLPersistentClasses in '..\..\Source\GLPersistentClasses.pas',
   GLPhongShader in '..\..\Source\GLPhongShader.pas',
   GLPhongShader in '..\..\Source\GLPhongShader.pas',

+ 0 - 2
Packages/Win64/GLScene_RT.dproj

@@ -292,8 +292,6 @@
         <DCCReference Include="..\..\Source\GLParticleFX.pas"/>
         <DCCReference Include="..\..\Source\GLParticleFX.pas"/>
         <DCCReference Include="..\..\Source\GLParticles.pas"/>
         <DCCReference Include="..\..\Source\GLParticles.pas"/>
         <DCCReference Include="..\..\Source\GLPerlin.pas"/>
         <DCCReference Include="..\..\Source\GLPerlin.pas"/>
-        <DCCReference Include="..\..\Source\GLPerlinBase.pas"/>
-        <DCCReference Include="..\..\Source\GLPerlinNoise3D.pas"/>
         <DCCReference Include="..\..\Source\GLPerlinPFX.pas"/>
         <DCCReference Include="..\..\Source\GLPerlinPFX.pas"/>
         <DCCReference Include="..\..\Source\GLPersistentClasses.pas"/>
         <DCCReference Include="..\..\Source\GLPersistentClasses.pas"/>
         <DCCReference Include="..\..\Source\GLPhongShader.pas"/>
         <DCCReference Include="..\..\Source\GLPhongShader.pas"/>

+ 3 - 3
Source/FGuiSkinEditor.pas

@@ -1,11 +1,11 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-{
-   Editor for Gui skin. 
-}
+
 unit FGuiSkinEditor;
 unit FGuiSkinEditor;
 
 
+(*  Editor for Gui skin. *)
+
 interface
 interface
 
 
 {$I GLScene.inc}
 {$I GLScene.inc}

+ 3 - 3
Source/FInfo.pas

@@ -1,11 +1,11 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-{
-  Informations on OpenGL driver and contributions
-}
+
 unit FInfo;
 unit FInfo;
 
 
+(* Informations on OpenGL driver and contributions *)
+
 interface
 interface
 
 
 {$I GLScene.inc}
 {$I GLScene.inc}

+ 3 - 3
Source/FRFaceEditor.pas

@@ -1,11 +1,11 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-{
-  Editor frame for a TGLFaceProperties. 
-}
+
 unit FRFaceEditor;
 unit FRFaceEditor;
 
 
+(* Editor frame for a TGLFaceProperties. *)
+
 interface
 interface
 
 
 {$I GLScene.inc}
 {$I GLScene.inc}

+ 3 - 3
Source/FRMaterialPreview.pas

@@ -1,11 +1,11 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-{
-   Material Preview frame. 
-}
+
 unit FRMaterialPreview;
 unit FRMaterialPreview;
 
 
+(* Material Preview frame. *)
+
 interface
 interface
 
 
 {$I GLScene.inc}
 {$I GLScene.inc}

+ 4 - 4
Source/FRTextureEdit.pas

@@ -1,12 +1,12 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-{
-  Basic editing frame for TGLTexture 
-}
-{ TODO : Replace STImageClass with a dropdown (polymorphism) }
+
 unit FRTextureEdit;
 unit FRTextureEdit;
 
 
+(* Basic editing frame for TGLTexture *)
+// TODO : Replace STImageClass with a dropdown (polymorphism) 
+
 interface
 interface
 
 
 {$I GLScene.inc}
 {$I GLScene.inc}

+ 3 - 3
Source/FRTrackBarEdit.pas

@@ -1,11 +1,11 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-{
-   Frame combining a TrackBar and an Edit. 
-}
+
 unit FRTrackBarEdit;
 unit FRTrackBarEdit;
 
 
+(* Frame combining a TrackBar and an Edit. *)
+
 interface
 interface
 
 
 {$I GLScene.inc}
 {$I GLScene.inc}

+ 3 - 3
Source/FXCollectionEditor.pas

@@ -1,11 +1,11 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-(*
-  Edits a TXCollection
-*)
+
 unit FXCollectionEditor;
 unit FXCollectionEditor;
 
 
+(* Edits a TXCollection *)
+
 interface
 interface
 
 
 {$I GLScene.inc}
 {$I GLScene.inc}

+ 3 - 2
Source/File3DSConst.pas

@@ -1,6 +1,9 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
+
+unit File3DSConst;
+
 (*
 (*
  All 3DS constant definitions used by the various routines (mainly in Utils3DS.pas). About one thousand
  All 3DS constant definitions used by the various routines (mainly in Utils3DS.pas). About one thousand
  defined constants herein. The guys at Autodesk must be crazy...
  defined constants herein. The guys at Autodesk must be crazy...
@@ -8,8 +11,6 @@
  (c) Copyright 1999, Dipl. Ing. Mike Lischke ([email protected])
  (c) Copyright 1999, Dipl. Ing. Mike Lischke ([email protected])
 *)
 *)
 
 
-unit File3DSConst;
-
 interface
 interface
 
 
 uses
 uses

+ 5 - 7
Source/File3DSTypes.pas

@@ -1,18 +1,16 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-{
-   Implements the standard Teapot, build from evaluators. 
-}
+
+unit File3DSTypes;
+
+(* Implements the standard Teapot, build from evaluators. *)
 
 
 // This unit contains all of the data types used by the core routines. Most of these are only used
 // This unit contains all of the data types used by the core routines. Most of these are only used
 // with the internal database, created when a file is loaded.
 // with the internal database, created when a file is loaded.
-//
-// Last change - 03. October 1999
-//
+// Initial developer
 // (c) Copyright 1999, Dipl. Ing. Mike Lischke ([email protected])
 // (c) Copyright 1999, Dipl. Ing. Mike Lischke ([email protected])
 
 
-unit File3DSTypes;
 
 
 {$ALIGN ON}
 {$ALIGN ON}
 {$MINENUMSIZE 4}
 {$MINENUMSIZE 4}

+ 5 - 3
Source/File3DSUtils.pas

@@ -1,12 +1,14 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-{
+
+unit File3DSUtils;
+
+(*
    Utility functions for the universal 3DS file reader and writer (TFile3DS).
    Utility functions for the universal 3DS file reader and writer (TFile3DS).
    Essentially, the functions here are the heart of the import library as
    Essentially, the functions here are the heart of the import library as
    they deal actually with the database and chunks.
    they deal actually with the database and chunks.
-}
-unit File3DSUtils;
+*)
 
 
 interface
 interface
 
 

+ 3 - 3
Source/FileB3D.pas

@@ -1,11 +1,11 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-{
-    File streaming class for the B3D loader
-}
+
 unit FileB3D;
 unit FileB3D;
 
 
+(* File streaming class for the B3D loader *)
+
 interface
 interface
 
 
 {$I GLScene.inc}
 {$I GLScene.inc}

+ 3 - 2
Source/FileDDSImage.pas

@@ -1,6 +1,9 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
+
+unit FileDDSImage;
+
 (*
 (*
     Alternative for DDS unit with more supported formats of flat image:
     Alternative for DDS unit with more supported formats of flat image:
     Alpha8, Luminance8, R3G3B2, RGB5A1, RGBA4, Alpha8Luminance8, Luminance16, R5G6B5,
     Alpha8, Luminance8, R3G3B2, RGB5A1, RGBA4, Alpha8Luminance8, Luminance16, R5G6B5,
@@ -12,8 +15,6 @@
     so you may include both DDSImage (preview) and GLFileDDS (loading)
     so you may include both DDSImage (preview) and GLFileDDS (loading)
 *)
 *)
 
 
-unit FileDDSImage;
-
 interface
 interface
 
 
 {$I GLScene.inc}
 {$I GLScene.inc}

+ 3 - 2
Source/FileDXTC.pas

@@ -1,13 +1,14 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
+
+unit FileDXTC;
+
 (*
 (*
    DXTC (also S3TC) decoding.
    DXTC (also S3TC) decoding.
    Adapted from DevIL image library (http://openil.sourceforge.net)
    Adapted from DevIL image library (http://openil.sourceforge.net)
 *)
 *)
 
 
-unit FileDXTC;
-
 interface
 interface
 
 
   {$I GLScene.inc}
   {$I GLScene.inc}

+ 195 - 9
Source/FileLWObjects.pas

@@ -4,19 +4,205 @@
 
 
 unit FileLWObjects;
 unit FileLWObjects;
 
 
-(* -------------------------------------------------------------------------------
-  Unit Name:  Lightwave
+(* =============================================================
+
+This unit provides functions, constants and now classes for use in
+working with Lightwave3D Object files.
+
+Chunk ID constants are defined for all of the Chunk IDs listed
+in the Lightwave 7.5 sdk.
+It is important to note that this is a constant work-in-progress
+and as such there are omissions and may be errors. Feedback and
+suggestions would be appreciated.
+There are two ways of using this unit. The first uses user-defines
+callbacks to handle parsing lwo chunk data. The second way uses
+object orientation.
+
+Loading LWO chunk data via callbacks
+A function is provided for loading a Lightwave object from a file.
+The Loader itself uses a callback mechanism for the loading of
+Lightwave object chunks. The callback is called for every chunk
+(with the exception of the FORM and LWOB or LWO2 chunks).
+
+The Chunk struct passed in the callback contains members for the
+chunk ID, chunk size and pointer to chunk data. This data is
+untouched internally so any parsing and numeric formatting
+is up to you. This provides maximum flexibility and allows you to
+handle the data that you need without loading the entire object
+into ram first.
+
+The chunk data memory is freed upon the return of the callback
+so do not keep a reference to the chunk data. Copy it to your own
+storage.
+
+function LoadLW0(const Filename: string; ReadProc: TLWOReadProc;
+ UserData: Pointer): LongWord; cdecl;
+
+ Filename:      The fully qualified filename of the file to be
+                loaded.
+
+ ReadCallback:  The address of a TLWOReadCallback procedure
+                defined as:
+                TLWOReadCallback = procedure(Chunk: TLWChunk;
+                  UserData: Pointer); cdecl;
+                This procedure will be called for every chunk
+                encountered in the Lightwave object file. The
+                Chunk parameter is the chunk struct of the chunk
+                being loaded. UserData is the pointer supplied
+                in the original call to LoadLWO (see below).
+
+ UserData:      A pointer to user supplied data to be passed
+                in the ReadCallback.
+
+A non-zero results indicates that the object file was parsed
+successfully.
+
+Loading LWO chunks via objects
+============================
+To load data from a lightwave object file, create an instance of
+TLWObjectFile and call its LoadFromFile method.
+
+The data can then be accessed with the Chunks array property and
+iterated in combination with the ChunkCount property.
+
+Chunk data is parsed and interfaced by descendents of the TLWChunk
+class. I have made handlers for the following chunk types:
+
+TLWLayr  Modeler Layer chunk
+TLWPnts  Points chunk
+TLWPols  Polygons chunk
+TLWPTag  Polygon tag mapping
+TLWSurf  Surface subchunk container
+TLWTags  Tags (Name tag strings for named items)
+TLWVMap  Vertex Mapping
+
+The data for chunks without handlers can be gotten at with the
+Data and Size properties of the TLWChunk. Data is a pointer to
+the start of the chunk data. This data is unparsed.
+Data is nil for descendents.
+
+
+This should provide enough to move geometry into your favourite
+delphi-based 3d engine.
+
+
+Making chunk handler objects
+============================
+
+All chunk types are derived from TLWChunk in the following manner:
+
+TLWChunk
+
+ex:
+
+TLWPTag        <- PTAG chunk type. polygon tag map.
+
+TLWParentChunk <- A base class for chunks that can contain other chunks.
+                 This is not necessarily how the data is stored in
+                 the file but more for ease of access to data.
+ ex:
+ TLWPnts <- PNTS chunk type (points)
+ TLWLayr <- LAYR chunk type (modeler layer)
+ TLWSurf <- SURF chunk type (constains surface attributes as sub chunks)
+ TLWSubChunk <- A base class for chunks whose max data len is 65536 bytes.
+ TLWDiff   <- DIFF subchunk type (diffuse surface parameter)
+ TLWSpec   <- SPEC subchunk type (specularity surface parameter)...
+ etc.
+
+Each descendent of TLWChunk or TLWSubChunk is required to override
+the GetID class function, the LoadData method and the Clear method
+to provide custom handling for chunktype data.
+
+ex:
+...
+type
+  TLWPnts = class (TLWParentChunk)
+  private
+    FPoints: TVEC12DynArray;
+    function GetCount: LongWord;
+    protected
+    procedure Clear; override;
+    procedure LoadData(AStream: TStream; DataStart, DataSize: LongWord); override;
+  public
+    class function GetID: TID4; override;
+    function GetVMap(VMapID: TID4; out VMap: TLWVMap): boolean;
+    property Count: LongWord read GetCount;
+    property Points: TVEC12DynArray read FPoints;
+  end;
+...
+
+// Return the the chunk id that is the target of this handler
+
+class function TLWPnts.GetID: TID4;
+begin
+  result := ID_PNTS;
+end;
+
+// Load the point data - the stream is already positioned at the start of the chunk data
+
+procedure TLWPnts.LoadData(AStream: TStream; DataStart, DataSize: LongWord);
+begin
+  SetLength(FPoints,DataSize div 12); // allocate storage for DataSize div 12 points
+  ReadMotorolaNumber(AStream,@FPoints[0],4,DataSize div 4); // read the point data
+end;
+
+
+// Cleanup - Free any memory that you've allocated
+
+procedure TLWPnts.Clear;
+begin
+  SetLength(FPoints,0);
+end;
+
+
+Utility Functions
+=================
+A function is provided for converting an array of numbers between
+Motorola and Intel format (big endian <-> little endian). Converting
+only needs to be done for numeric types that are of 2 or 4 byte
+lengths.
+
+procedure ReverseByteOrder(ValueIn: Pointer; Size: integer; Count: integer = 1);
+
+ ValueIn: The address of a number or array of numbers to have their
+          bytes swapped.
+ Size:    The size in bytes of each numeric type.
+ Count:   The count of numbers in the numbers array. The default
+          value is 1.
+
+Two routines are provided for reading and writing big endian
+(Motorola and misc other processor vendors ) numbers to and from a
+stream. These routines handle 2 and 4 byte numeric types and can
+also handle arrays.
+
+procedure ReadMotorolaNumber(Stream: TStream; Data: Pointer;
+ ElementSize: integer; Count: integer = 1);
+
+function WriteMotorolaNumber(Stream: TStream; Data: Pointer;
+ ElementSize: integer; Count: integer = 1): Integer;
+
+Each take a valid TStream descendent, a pointer to the numeric data,
+the element size of the data elements (either 2 or 4) and the array
+element count if sending an array. The default count is 1.
+
+Notes for improvement of this unit:
+
+- A version ID tag should be visible to all chunks in order to
+ provide handling for Lightwave pre 6.0 object files.
+
+- Chunk type handlers should leave memory allocation to
+ the base class (TLWChunk) and act more as an interface
+ to the data pointed to by Data in TLWChunk. This would
+ keep memory allocation very efficient and make implementing
+ chunk handlers even easier.
+
   Author:     Brian Johns [email protected]
   Author:     Brian Johns [email protected]
   Purpose:    Lightwave object support unit for Delphi.
   Purpose:    Lightwave object support unit for Delphi.
-
   Notes:      For the Lightwave Object File Format documentation please refer to
   Notes:      For the Lightwave Object File Format documentation please refer to
   http://www.lightwave3d.com/developer.
   http://www.lightwave3d.com/developer.
-
-  License:    This unit is distributed under the Mozilla Public License.
-  For license details, refer to http://www.mozilla.org
   Lightwave3D is a registered trademark of Newtek Incorporated.
   Lightwave3D is a registered trademark of Newtek Incorporated.
 
 
-  ------------------------------------------------------------------------------- *)
+===================================================================== *)
 
 
 interface
 interface
 
 
@@ -255,7 +441,7 @@ type
   TColr4 = array [0 .. 3] of TU1;
   TColr4 = array [0 .. 3] of TU1;
   PColr4 = ^TColr4;
   PColr4 = ^TColr4;
 
 
-  { Lightwave Chunk Struct - Used in TLWOReadCallback }
+  // Lightwave Chunk Struct - Used in TLWOReadCallback
   PLWChunkRec = ^TLWChunkRec;
   PLWChunkRec = ^TLWChunkRec;
 
 
   TLWChunkRec = record
   TLWChunkRec = record
@@ -264,7 +450,7 @@ type
     data: Pointer;
     data: Pointer;
   end;
   end;
 
 
-  { Lightwave SubChunk Struct - Used in TLWOReadCallback }
+  // Lightwave SubChunk Struct - Used in TLWOReadCallback
   PLWSubChunkRec = ^TLWSubChunkRec;
   PLWSubChunkRec = ^TLWSubChunkRec;
 
 
   TLWSubChunkRec = record
   TLWSubChunkRec = record

+ 0 - 224
Source/FileLWObjects.txt

@@ -1,224 +0,0 @@
-FileLWObjects.pas
-=============
-
-This unit provides functions, constants and now classes for use in
-working with Lightwave3D Object files.
-
-Chunk ID constants are defined for all of the Chunk IDs listed
-in the Lightwave 7.5 sdk.
-
-It is important to note that this is a constant work-in-progress
-and as such there are omissions and may be errors. Feedback and
-suggestions would be appreciated.
-
-There are two ways of using this unit. The first uses user-defines
-callbacks to handle parsing lwo chunk data. The second way uses
-object orientation.
-
-Loading LWO chunk data via callbacks
-====================================
-
-A function is provided for loading a Lightwave object from a file.
-The Loader itself uses a callback mechanism for the loading of
-Lightwave object chunks. The callback is called for every chunk
-(with the exception of the FORM and LWOB or LWO2 chunks).
-
-The Chunk struct passed in the callback contains members for the
-chunk ID, chunk size and pointer to chunk data. This data is
-untouched internally so any parsing and numeric formatting
-is up to you. This provides maximum flexibility and allows you to
-handle the data that you need without loading the entire object
-into ram first.
-
-The chunk data memory is freed upon the return of the callback
-so do not keep a reference to the chunk data. Copy it to your own
-storage.
-
-function LoadLW0(const Filename: string; ReadProc: TLWOReadProc;
- UserData: Pointer): LongWord; cdecl;
-
- Filename:      The fully qualified filename of the file to be
-                loaded.
-
- ReadCallback:  The address of a TLWOReadCallback procedure
-                defined as:
-
-                TLWOReadCallback = procedure(Chunk: TLWChunk;
-                  UserData: Pointer); cdecl;
-
-                This procedure will be called for every chunk
-                encountered in the Lightwave object file. The
-                Chunk parameter is the chunk struct of the chunk
-                being loaded. UserData is the pointer supplied
-                in the original call to LoadLWO (see below).
-
-
- UserData:      A pointer to user supplied data to be passed
-                in the ReadCallback.
-
-
-A non-zero results indicates that the object file was parsed
-successfully.
-
-Loading LWO chunks via objects
-==============================
-
-To load data from a lightwave object file, create an instance of
-TLWObjectFile and call its LoadFromFile method.
-
-The data can then be accessed with the Chunks array property and
-iterated in combination with the ChunkCount property.
-
-Chunk data is parsed and interfaced by descendents of the TLWChunk
-class. I have made handlers for the following chunk types:
-
-TLWLayr  Modeler Layer chunk
-TLWPnts  Points chunk
-TLWPols  Polygons chunk
-TLWPTag  Polygon tag mapping
-TLWSurf  Surface subchunk container
-TLWTags  Tags (Name tag strings for named items)
-TLWVMap  Vertex Mapping
-
-The data for chunks without handlers can be gotten at with the
-Data and Size properties of the TLWChunk. Data is a pointer to
-the start of the chunk data. This data is unparsed.
-Data is nil for descendents.
-
-
-This should provide enough to move geometry into your favourite
-delphi-based 3d engine.
-
-
-Making chunk handler objects
-============================
-
-All chunk types are derived from TLWChunk in the following manner:
-
-TLWChunk
-
-ex:
-
-TLWPTag        <- PTAG chunk type. polygon tag map.
-
-
-
-TLWParentChunk <- A base class for chunks that can contain other chunks.
-                 This is not necessarily how the data is stored in
-                 the file but more for ease of access to data.
-
- ex:
-
- TLWPnts <- PNTS chunk type (points)
- TLWLayr <- LAYR chunk type (modeler layer)
-
- TLWSurf <- SURF chunk type (constains surface attributes as sub chunks)
-
-TLWSubChunk <- A base class for chunks whose max data len is 65536 bytes.
- TLWDiff   <- DIFF subchunk type (diffuse surface parameter)
- TLWSpec   <- SPEC subchunk type (specularity surface parameter)...
- etc.
-
-Each descendent of TLWChunk or TLWSubChunk is required to override
-the GetID class function, the LoadData method and the Clear method
-to provide custom handling for chunktype data.
-
-
-ex:
-
-...
-
-type
-
-  TLWPnts = class (TLWParentChunk)
-  private
-    FPoints: TVEC12DynArray;
-    function GetCount: LongWord;
-    protected
-    procedure Clear; override;
-    procedure LoadData(AStream: TStream; DataStart, DataSize: LongWord); override;
-  public
-    class function GetID: TID4; override;
-    function GetVMap(VMapID: TID4; out VMap: TLWVMap): boolean;
-    property Count: LongWord read GetCount;
-    property Points: TVEC12DynArray read FPoints;
-  end;
-
-...
-
-
-(* Return the the chunk id that is the target of this handler *)
-
-class function TLWPnts.GetID: TID4;
-begin
-  result := ID_PNTS;
-end;
-
-(* Load the point data -
-   the stream is already positioned at the start of the chunk data *)
-
-procedure TLWPnts.LoadData(AStream: TStream; DataStart, DataSize: LongWord);
-begin
-  SetLength(FPoints,DataSize div 12); // allocate storage for DataSize div 12 points
-  ReadMotorolaNumber(AStream,@FPoints[0],4,DataSize div 4); // read the point data
-end;
-
-
-(* Cleanup - Free any memory that you've allocated *)
-
-procedure TLWPnts.Clear;
-begin
-  SetLength(FPoints,0);
-end;
-
-
-Utility Functions
-=================
-A function is provided for converting an array of numbers between
-Motorola and Intel format (big endian <-> little endian). Converting
-only needs to be done for numeric types that are of 2 or 4 byte
-lengths.
-
-procedure ReverseByteOrder(ValueIn: Pointer; Size: integer;
-
- Count: integer = 1);
-
- ValueIn: The address of a number or array of numbers to have their
-          bytes swapped.
-
- Size:    The size in bytes of each numeric type.
-
- Count:   The count of numbers in the numbers array. The default
-          value is 1.
-
-
-Two routines are provided for reading and writing big endian
-(Motorola and misc other processor vendors ) numbers to and from a
-stream. These routines handle 2 and 4 byte numeric types and can
-also handle arrays.
-
-procedure ReadMotorolaNumber(Stream: TStream; Data: Pointer;
- ElementSize: integer; Count: integer = 1);
-
-function WriteMotorolaNumber(Stream: TStream; Data: Pointer;
- ElementSize: integer; Count: integer = 1): Integer;
-
-Each take a valid TStream descendent, a pointer to the numeric data,
-the element size of the data elements (either 2 or 4) and the array
-element count if sending an array. The default count is 1.
-
-
-
-Notes for improvement of this unit:
-
-- A version ID tag should be visible to all chunks in order to
- provide handling for Lightwave pre 6.0 object files.
-
-- Chunk type handlers should leave memory allocation to
- the base class (TLWChunk) and act more as an interface
- to the data pointed to by Data in TLWChunk. This would
- keep memory allocation very efficient and make implementing
- chunk handlers even easier.
-
-- A future Lightwave support unit could possibly benefit from the
- use of delphi's interface type.

+ 3 - 3
Source/FileQ3BSP.pas

@@ -1,11 +1,11 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-(*
-  Simple Quake III BSP file loader.
-*)
+
 unit FileQ3BSP;
 unit FileQ3BSP;
 
 
+(* Simple Quake III BSP file loader. *)
+
 interface
 interface
 
 
 uses 
 uses 

+ 2 - 3
Source/FileTGA.pas

@@ -1,12 +1,11 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-{
-   Graphic engine friendly loading of TGA image.
-}
 
 
 unit FileTGA;
 unit FileTGA;
 
 
+(* Graphic engine friendly loading of TGA image. *)
+
 interface
 interface
 
 
 {.$I GLScene.inc}
 {.$I GLScene.inc}

+ 3 - 3
Source/FileVFW.pas

@@ -1,11 +1,11 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-(*
-   Video for windows
-*)
+
 unit FileVFW;
 unit FileVFW;
 
 
+(*  Video for windows *)
+
 interface
 interface
 
 
 {.$UNDEF UNICODE}
 {.$UNDEF UNICODE}

+ 3 - 3
Source/FileVRMLParser.pas

@@ -1,11 +1,11 @@
 //
 //
 // The unit is part of the GLScene Engine, http://glscene.org
 // The unit is part of the GLScene Engine, http://glscene.org
 //
 //
-(*
-  VRML file format parser.
-*)
+
 unit FileVRMLParser;
 unit FileVRMLParser;
 
 
+(*  VRML file format parser. *)
+
 interface
 interface
 
 
 {$I GLScene.inc}
 {$I GLScene.inc}

+ 3 - 3
Source/FileX.pas

@@ -1,11 +1,11 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-(*
-    Simple X format support for Delphi (Microsoft's favorite format)
-*)
+
 unit FileX;
 unit FileX;
 
 
+(* Simple X format support for Delphi (Microsoft's favorite format) *)
+
 interface
 interface
 
 
 {$I GLScene.inc}
 {$I GLScene.inc}

+ 37 - 39
Source/GLAnimatedSprite.pas

@@ -1,11 +1,11 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-{
-  A sprite that uses a scrolling texture for animation. 
-}
+
 unit GLAnimatedSprite;
 unit GLAnimatedSprite;
 
 
+(* A sprite that uses a scrolling texture for animation. *)
+
 interface
 interface
 
 
 {$I GLScene.inc}
 {$I GLScene.inc}
@@ -34,8 +34,8 @@ type
   TGLSpriteAnimationList = class;
   TGLSpriteAnimationList = class;
   TGLAnimatedSprite = class;
   TGLAnimatedSprite = class;
 
 
-  { Used by the SpriteAnimation when Dimensions are set manual. The animation
-    will use the offsets, width and height to determine the texture coodinates for this frame. }
+  (* Used by the SpriteAnimation when Dimensions are set manual. The animation
+    will use the offsets, width and height to determine the texture coodinates for this frame. *)
   TGLSpriteAnimFrame = class(TXCollectionItem)
   TGLSpriteAnimFrame = class(TXCollectionItem)
   private
   private
     FOffsetX,
     FOffsetX,
@@ -66,14 +66,14 @@ type
     class function ItemsClass: TXCollectionItemClass; override;
     class function ItemsClass: TXCollectionItemClass; override;
   end;
   end;
 
 
-  {Determines if the texture coordinates are Automatically generated
+  (* Determines if the texture coordinates are Automatically generated
      from the Animations properties or if they are Manually set through
      from the Animations properties or if they are Manually set through
-     the Frames collection. }
+     the Frames collection. *)
   TGLSpriteFrameDimensions = (sfdAuto, sfdManual);
   TGLSpriteFrameDimensions = (sfdAuto, sfdManual);
 
 
-  { Used to mask the auto generated frames. The Left, Top, Right and
+  (* Used to mask the auto generated frames. The Left, Top, Right and
     Bottom properties determines the number of pixels to be cropped
     Bottom properties determines the number of pixels to be cropped
-    from each corresponding side of the frame. Only applicable to auto dimensions. }
+    from each corresponding side of the frame. Only applicable to auto dimensions. *)
   TGLSpriteAnimMargins = class(TPersistent)
   TGLSpriteAnimMargins = class(TPersistent)
   private
   private
     FOwner: TGLSpriteAnimation;
     FOwner: TGLSpriteAnimation;
@@ -94,7 +94,7 @@ type
     property Bottom: Integer read FBottom write SetBottom;
     property Bottom: Integer read FBottom write SetBottom;
   end;
   end;
 
 
-  {Animations define how the texture coordinates for each offset are to be determined. }
+  // Animations define how the texture coordinates for each offset are to be determined. 
   TGLSpriteAnimation = class(TXCollectionItem, IGLMaterialLibrarySupported)
   TGLSpriteAnimation = class(TXCollectionItem, IGLMaterialLibrarySupported)
   private
   private
     FCurrentFrame,
     FCurrentFrame,
@@ -140,48 +140,48 @@ type
     property FrameWidth: Integer read FFrameWidth write SetFrameWidth;
     property FrameWidth: Integer read FFrameWidth write SetFrameWidth;
     // Height of each frame in an auto dimension animation.
     // Height of each frame in an auto dimension animation.
     property FrameHeight: Integer read FFrameHeight write SetFrameHeight;
     property FrameHeight: Integer read FFrameHeight write SetFrameHeight;
-    {The name of the lib material the sprites associated material library
-       for this animation. }
+    (* The name of the lib material the sprites associated material library
+       for this animation. *)
     property LibMaterialName: TGLLibMaterialName read FLibMaterialName write
     property LibMaterialName: TGLLibMaterialName read FLibMaterialName write
       SetLibMaterialName;
       SetLibMaterialName;
-    {Manual dimension animation frames. Stores the offsets and dimensions
-       for each frame in the animation. }
+    (* Manual dimension animation frames. Stores the offsets and dimensions
+       for each frame in the animation. *)
     property Frames: TGLSpriteAnimFrameList read FFrames;
     property Frames: TGLSpriteAnimFrameList read FFrames;
     // Automatic or manual texture coordinate generation.
     // Automatic or manual texture coordinate generation.
     property Dimensions: TGLSpriteFrameDimensions read FDimensions write
     property Dimensions: TGLSpriteFrameDimensions read FDimensions write
       SetDimensions;
       SetDimensions;
-    {The number of milliseconds between each frame in the animation.
+    (* The number of milliseconds between each frame in the animation.
        Will automatically calculate the FrameRate value when set.
        Will automatically calculate the FrameRate value when set.
-       Will override the TGLAnimatedSprite Interval is greater than zero. }
+       Will override the TGLAnimatedSprite Interval is greater than zero. *)
     property Interval: Integer read FInterval write SetInterval;
     property Interval: Integer read FInterval write SetInterval;
-    {The number of frames per second for the animation.
+    (* The number of frames per second for the animation.
        Will automatically calculate the Interval value when set.
        Will automatically calculate the Interval value when set.
-       Precision will depend on Interval since Interval has priority. }
+       Precision will depend on Interval since Interval has priority. *)
     property FrameRate: Single read GetFrameRate write SetFrameRate;
     property FrameRate: Single read GetFrameRate write SetFrameRate;
     // Sets cropping margins for auto dimension animations.
     // Sets cropping margins for auto dimension animations.
     property Margins: TGLSpriteAnimMargins read FMargins;
     property Margins: TGLSpriteAnimMargins read FMargins;
   end;
   end;
 
 
-  {A collection for storing SpriteAnimation objects. }
+  // A collection for storing SpriteAnimation objects. 
   TGLSpriteAnimationList = class(TXCollection)
   TGLSpriteAnimationList = class(TXCollection)
   public
   public
     constructor Create(aOwner: TPersistent); override;
     constructor Create(aOwner: TPersistent); override;
     class function ItemsClass: TXCollectionItemClass; override;
     class function ItemsClass: TXCollectionItemClass; override;
   end;
   end;
 
 
-  {Sets the current animation playback mode:
-      samNone - No playback, the animation does not progress.
-      samPlayOnce - Plays the animation once then switches to samNone.
-      samLoop - Play the animation forward in a continuous loop.
-      samLoopBackward - Same as samLoop but reversed direction.
-      samBounceForward - Plays forward and switches to samBounceBackward
-        when EndFrame is reached.
-      samBounceBackward - Plays backward and switches to samBounceForward
-        when StartFrame is reached. }
+  (* Sets the current animation playback mode:
+     samNone - No playback, the animation does not progress.
+     samPlayOnce - Plays the animation once then switches to samNone.
+     samLoop - Play the animation forward in a continuous loop.
+     samLoopBackward - Same as samLoop but reversed direction.
+     samBounceForward - Plays forward and switches to samBounceBackward
+       when EndFrame is reached.
+     samBounceBackward - Plays backward and switches to samBounceForward
+       when StartFrame is reached. *)
   TGLSpriteAnimationMode = (samNone, samPlayOnce, samLoop, samBounceForward,
   TGLSpriteAnimationMode = (samNone, samPlayOnce, samLoop, samBounceForward,
     samBounceBackward, samLoopBackward);
     samBounceBackward, samLoopBackward);
 
 
-  {An animated version for using offset texture coordinate animation. }
+  // An animated version for using offset texture coordinate animation. 
   TGLAnimatedSprite = class(TGLBaseSceneObject)
   TGLAnimatedSprite = class(TGLBaseSceneObject)
   private
   private
     FAnimations: TGLSpriteAnimationList;
     FAnimations: TGLSpriteAnimationList;
@@ -201,8 +201,7 @@ type
     procedure DefineProperties(Filer: TFiler); override;
     procedure DefineProperties(Filer: TFiler); override;
     procedure WriteAnimations(Stream: TStream);
     procedure WriteAnimations(Stream: TStream);
     procedure ReadAnimations(Stream: TStream);
     procedure ReadAnimations(Stream: TStream);
-    procedure Notification(AComponent: TComponent; Operation: TOperation);
-      override;
+    procedure Notification(AComponent: TComponent; Operation: TOperation); override;
     procedure SetInterval(const val: Integer);
     procedure SetInterval(const val: Integer);
     procedure SetAnimationIndex(const val: Integer);
     procedure SetAnimationIndex(const val: Integer);
     procedure SetAnimationMode(const val: TGLSpriteAnimationMode);
     procedure SetAnimationMode(const val: TGLSpriteAnimationMode);
@@ -221,15 +220,14 @@ type
     // Steps the current animation to the next frame
     // Steps the current animation to the next frame
     procedure NextFrame;
     procedure NextFrame;
   published
   published
-    { A collection of animations. Stores the settings for animating
-       then sprite. }
+    // A collection of animations. Stores the settings for animating then sprite. 
     property Animations: TGLSpriteAnimationList read FAnimations;
     property Animations: TGLSpriteAnimationList read FAnimations;
     // The material library that stores the lib materials for the animations.
     // The material library that stores the lib materials for the animations.
     property MaterialLibrary: TGLMaterialLibrary read FMaterialLibrary write
     property MaterialLibrary: TGLMaterialLibrary read FMaterialLibrary write
       SetMaterialLibrary;
       SetMaterialLibrary;
-    {Sets the number of milliseconds between each frame. Will recalculate
+    (* Sets the number of milliseconds between each frame. Will recalculate
        the Framerate when set. Will be overridden by the TGLSpriteAnimation
        the Framerate when set. Will be overridden by the TGLSpriteAnimation
-       Interval if it is greater than zero. }
+       Interval if it is greater than zero. *)
     property Interval: Integer read FInterval write SetInterval;
     property Interval: Integer read FInterval write SetInterval;
     // Index of the sprite animation to be used.
     // Index of the sprite animation to be used.
     property AnimationIndex: Integer read FAnimationIndex write
     property AnimationIndex: Integer read FAnimationIndex write
@@ -237,11 +235,11 @@ type
     // Playback mode for the current animation.
     // Playback mode for the current animation.
     property AnimationMode: TGLSpriteAnimationMode read FAnimationMode write
     property AnimationMode: TGLSpriteAnimationMode read FAnimationMode write
       SetAnimationMode;
       SetAnimationMode;
-    { Used to automatically calculate the width and height of a sprite based
+    (* Used to automatically calculate the width and height of a sprite based
        on the size of the frame it is showing. For example, if PixelRatio is
        on the size of the frame it is showing. For example, if PixelRatio is
        set to 100 and the current animation frame is 100 pixels wide it will
        set to 100 and the current animation frame is 100 pixels wide it will
        set the width of the sprite to 1. If the frame is 50 pixels width the
        set the width of the sprite to 1. If the frame is 50 pixels width the
-       sprite will be 0.5 wide. }
+       sprite will be 0.5 wide. *)
     property PixelRatio: Integer read FPixelRatio write SetPixelRatio;
     property PixelRatio: Integer read FPixelRatio write SetPixelRatio;
     // Rotates the sprite (in degrees).
     // Rotates the sprite (in degrees).
     property Rotation: Integer read FRotation write SetRotation;
     property Rotation: Integer read FRotation write SetRotation;
@@ -249,9 +247,9 @@ type
     property MirrorU: Boolean read FMirrorU write SetMirrorU;
     property MirrorU: Boolean read FMirrorU write SetMirrorU;
     // Mirror the generated texture coords in the V axis.
     // Mirror the generated texture coords in the V axis.
     property MirrorV: Boolean read FMirrorV write SetMirrorV;
     property MirrorV: Boolean read FMirrorV write SetMirrorV;
-    { Sets the frames per second for the current animation. Automatically
+    (* Sets the frames per second for the current animation. Automatically
        calculates the Interval. Precision will be restricted to the values
        calculates the Interval. Precision will be restricted to the values
-       of Interval since Interval takes priority. }
+       of Interval since Interval takes priority. *)
     property FrameRate: Single read GetFrameRate write SetFrameRate;
     property FrameRate: Single read GetFrameRate write SetFrameRate;
     property Position;
     property Position;
     property Scale;
     property Scale;

+ 2 - 4
Source/GLAnimationUtils.pas

@@ -1,13 +1,11 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-{
-  Main purpose is to give an easy way to create an interpolation. 
-}
 
 
 unit GLAnimationUtils;
 unit GLAnimationUtils;
 
 
-
+(* Main purpose is to give an easy way to create an interpolation. *)
+
 interface
 interface
 
 
 {$I GLScene.inc}
 {$I GLScene.inc}

+ 5 - 3
Source/GLAsmShader.pas

@@ -1,12 +1,14 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-{
+
+unit GLAsmShader;
+
+(*
     TGLAsmShader is a wrapper for all ARB shaders 
     TGLAsmShader is a wrapper for all ARB shaders 
     This component is only a template and has to be replaced with a
     This component is only a template and has to be replaced with a
     proper version by someone who uses ARB shaders more then me.
     proper version by someone who uses ARB shaders more then me.
-}
-unit GLAsmShader;
+*)
 
 
 interface
 interface
 
 

+ 5 - 4
Source/GLAsyncHDS.pas

@@ -1,7 +1,10 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-{
+
+unit GLAsyncHDS;
+
+(*
    Implements a HDS Filter that generates HeightData tiles in a seperate thread.
    Implements a HDS Filter that generates HeightData tiles in a seperate thread.
 
 
    This component is a TGLHeightDataSourceFilter, which uses a TGLHeightDataSourceThread,
    This component is a TGLHeightDataSourceFilter, which uses a TGLHeightDataSourceThread,
@@ -12,9 +15,7 @@
    being prepared.  Although this keeps the framerate up, it may cause holes in the
    being prepared.  Although this keeps the framerate up, it may cause holes in the
    terrain to show, if the HeightDataThreads cant keep up with the TerrainRenderer's
    terrain to show, if the HeightDataThreads cant keep up with the TerrainRenderer's
    requests for new tiles.
    requests for new tiles.
-}
-
-unit GLAsyncHDS;
+*)
 
 
 interface
 interface
 
 

+ 5 - 3
Source/GLAsyncTimer.pas

@@ -1,11 +1,13 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-{  
+
+unit GLAsyncTimer;
+
+(*  
    Asynchronous timer component (actual 1 ms resolution). 
    Asynchronous timer component (actual 1 ms resolution). 
    This component is based on ThreadedTimer by Carlos Barbosa. 
    This component is based on ThreadedTimer by Carlos Barbosa. 
-}
-unit GLAsyncTimer;
+*)
 
 
 interface
 interface
 
 

+ 3 - 2
Source/GLAtmosphere.pas

@@ -1,14 +1,15 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
+
+unit GLAtmosphere;
+
 (*
 (*
    This unit contains classes that imitate an atmosphere around a planet.
    This unit contains classes that imitate an atmosphere around a planet.
       1) Eats a lot of CPU (reduces FPS from 1240 to 520 on my PC with cSlices=100)
       1) Eats a lot of CPU (reduces FPS from 1240 to 520 on my PC with cSlices=100)
       2) Alpha in LowAtmColor, HighAtmColor is ignored.
       2) Alpha in LowAtmColor, HighAtmColor is ignored.
 *)
 *)
 
 
-unit GLAtmosphere;
-
 interface
 interface
 
 
 {$I GLScene.inc}
 {$I GLScene.inc}

+ 2 - 3
Source/GLBaseMeshSilhouette.pas

@@ -1,12 +1,11 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-{
-  Silhouette classes for GLBaseMesh and FaceGroups.
-}
 
 
 unit GLBaseMeshSilhouette;
 unit GLBaseMeshSilhouette;
 
 
+(* Silhouette classes for GLBaseMesh and FaceGroups. *)
+
 interface
 interface
 
 
 {$I GLScene.inc}
 {$I GLScene.inc}

+ 9 - 10
Source/GLBehaviours.pas

@@ -1,11 +1,11 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-(*
-   Standard TGLBehaviour subclasses
-*)
+
 unit GLBehaviours;
 unit GLBehaviours;
 
 
+(* Standard TGLBehaviour subclasses *)
+
 interface
 interface
 
 
 {$I GLScene.inc}
 {$I GLScene.inc}
@@ -22,13 +22,13 @@ uses
   GLCoordinates;
   GLCoordinates;
 
 
 type
 type
-  (*Holds parameters for TGLScene basic damping model.
-    Damping is modelled by calculating a force from the speed, this force
-    can then be transformed to an acceleration is you know the object's mass.
-    Formulas:
+  (* Holds parameters for TGLScene basic damping model.
+     Damping is modelled by calculating a force from the speed, this force
+     can then be transformed to an acceleration is you know the object's mass.
+     Formulas:
      damping = constant + linear * Speed + quadratic * Speed^2
      damping = constant + linear * Speed + quadratic * Speed^2
      accel = damping / Mass
      accel = damping / Mass
-    That's just basic physics. A note on the components:
+     That's just basic physics. A note on the components:
      constant: use it for solid friction (will stop abruptly an object after decreasing its speed.
      constant: use it for solid friction (will stop abruptly an object after decreasing its speed.
      linear: linear friction damping.
      linear: linear friction damping.
      quadratic: expresses viscosity *)
      quadratic: expresses viscosity *)
@@ -152,8 +152,7 @@ function GetOrCreateInertia(obj: TGLBaseSceneObject): TGLBInertia; overload;
 
 
 (* Returns or creates the TGLBAcceleration within the given behaviours. 
 (* Returns or creates the TGLBAcceleration within the given behaviours. 
    This helper function is convenient way to access a TGLBAcceleration. *)
    This helper function is convenient way to access a TGLBAcceleration. *)
-function GetOrCreateAcceleration(behaviours: TGLBehaviours): TGLBAcceleration;
-  overload;
+function GetOrCreateAcceleration(behaviours: TGLBehaviours): TGLBAcceleration; overload;
 function GetOrCreateAcceleration(obj: TGLBaseSceneObject): TGLBAcceleration; overload;
 function GetOrCreateAcceleration(obj: TGLBaseSceneObject): TGLBAcceleration; overload;
 
 
 // ------------------------------------------------------------------
 // ------------------------------------------------------------------

+ 38 - 66
Source/GLCadencer.pas

@@ -1,11 +1,11 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-{
-  Cadencing composant for GLScene (ease Progress processing)
-}
+
 unit GLCadencer;
 unit GLCadencer;
 
 
+(* Cadencing composant for GLScene (ease Progress processing) *)
+
 interface
 interface
 
 
 {$I GLScene.inc}
 {$I GLScene.inc}
@@ -23,32 +23,32 @@ uses
 
 
 type
 type
 
 
-  {Determines how the TGLCadencer operates.
+  (* Determines how the TGLCadencer operates.
    - cmManual : you must trigger progress manually (in your code)
    - cmManual : you must trigger progress manually (in your code)
    - cmASAP : progress is triggered As Soon As Possible after a previous
    - cmASAP : progress is triggered As Soon As Possible after a previous
      progress (uses windows messages).
      progress (uses windows messages).
    - cmApplicationIdle : will hook Application.OnIdle, this will overwrite
    - cmApplicationIdle : will hook Application.OnIdle, this will overwrite
-     any previous event handle, and only one cadencer may be in this mode. }
+     any previous event handle, and only one cadencer may be in this mode. *)
   TGLCadencerMode = (cmManual, cmASAP, cmApplicationIdle);
   TGLCadencerMode = (cmManual, cmASAP, cmApplicationIdle);
 
 
-  {Determines which time reference the TGLCadencer should use. 
+  (* Determines which time reference the TGLCadencer should use. 
    - cmRTC : the Real Time Clock is used (precise over long periods, but
    - cmRTC : the Real Time Clock is used (precise over long periods, but
     not accurate to the millisecond, may limit your effective framerate
     not accurate to the millisecond, may limit your effective framerate
           to less than 50 FPS on some systems)
           to less than 50 FPS on some systems)
    - cmPerformanceCounter : the windows performance counter is used (nice
    - cmPerformanceCounter : the windows performance counter is used (nice
     precision, may derive over long periods, this is the default option
     precision, may derive over long periods, this is the default option
     as it allows the smoothest animation on fast systems)
     as it allows the smoothest animation on fast systems)
-   - cmExternal : the CurrentTime property is used }
+   - cmExternal : the CurrentTime property is used *)
   TGLCadencerTimeReference = (cmRTC, cmPerformanceCounter, cmExternal);
   TGLCadencerTimeReference = (cmRTC, cmPerformanceCounter, cmExternal);
 
 
-  {This component allows auto-progression of animation. 
+  (* This component allows auto-progression of animation. 
    Basicly dropping this component and linking it to your TGLScene will send
    Basicly dropping this component and linking it to your TGLScene will send
    it real-time progression events (time will be measured in seconds) while
    it real-time progression events (time will be measured in seconds) while
    keeping the CPU 100% busy if possible (ie. if things change in your scene). 
    keeping the CPU 100% busy if possible (ie. if things change in your scene). 
    The progression time (the one you'll see in you progression events)
    The progression time (the one you'll see in you progression events)
    is calculated using  (CurrentTime-OriginTime)*TimeMultiplier,
    is calculated using  (CurrentTime-OriginTime)*TimeMultiplier,
    CurrentTime being either manually or automatically updated using
    CurrentTime being either manually or automatically updated using
-   TimeReference (setting CurrentTime does NOT trigger progression). }
+   TimeReference (setting CurrentTime does NOT trigger progression). *)
   TGLCadencer = class(TComponent)
   TGLCadencer = class(TComponent)
   private
   private
     FSubscribedCadenceableComponents: TList;
     FSubscribedCadenceableComponents: TList;
@@ -83,56 +83,56 @@ type
     destructor Destroy; override;
     destructor Destroy; override;
     procedure Subscribe(aComponent: TGLCadenceAbleComponent);
     procedure Subscribe(aComponent: TGLCadenceAbleComponent);
     procedure UnSubscribe(aComponent: TGLCadenceAbleComponent);
     procedure UnSubscribe(aComponent: TGLCadenceAbleComponent);
-    {Allows to manually trigger a progression. 
+    (* Allows to manually trigger a progression. 
      Time stuff is handled automatically.
      Time stuff is handled automatically.
-     If cadencer is disabled, this functions does nothing. }
+     If cadencer is disabled, this functions does nothing. *)
     procedure Progress;
     procedure Progress;
-    {Adjusts CurrentTime if necessary, then returns its value. }
+    // Adjusts CurrentTime if necessary, then returns its value. 
     function GetCurrenttime: Double; inline;
     function GetCurrenttime: Double; inline;
-    {Returns True if a "Progress" is underway.
+    (* Returns True if a "Progress" is underway.
      Be aware that as long as IsBusy is True, the Cadencer may be
      Be aware that as long as IsBusy is True, the Cadencer may be
      sending messages and progression calls to cadenceable components
      sending messages and progression calls to cadenceable components
-     and scenes. }
+     and scenes. *)
     function IsBusy: Boolean;
     function IsBusy: Boolean;
-    {Reset the time parameters and returns to zero. }
+    // Reset the time parameters and returns to zero. 
     procedure Reset;
     procedure Reset;
-    {Value soustracted to current time to obtain progression time. }
+    // Value soustracted to current time to obtain progression time. 
     property OriginTime: Double read FOriginTime write FOriginTime;
     property OriginTime: Double read FOriginTime write FOriginTime;
-    {Current time (manually or automatically set, see TimeReference). }
+    // Current time (manually or automatically set, see TimeReference). 
     property CurrentTime: Double read FCurrentTime write SetCurrentTime;
     property CurrentTime: Double read FCurrentTime write SetCurrentTime;
   published
   published
-    {The TGLScene that will be cadenced (progressed). }
+    // The TGLScene that will be cadenced (progressed). 
     property Scene: TGLScene read FScene write SetScene;
     property Scene: TGLScene read FScene write SetScene;
-    {Enables/Disables cadencing.
+    (* Enables/Disables cadencing.
      Disabling won't cause a jump when restarting, it is working like
      Disabling won't cause a jump when restarting, it is working like
-     a play/pause (ie. may modify OriginTime to keep things smooth). }
+     a play/pause (ie. may modify OriginTime to keep things smooth). *)
     property Enabled: Boolean read FEnabled write SetEnabled default True;
     property Enabled: Boolean read FEnabled write SetEnabled default True;
-    {Defines how CurrentTime is updated.
+    (* Defines how CurrentTime is updated.
      See TGLCadencerTimeReference.
      See TGLCadencerTimeReference.
-     Dynamically changeing the TimeReference may cause a "jump".  }
+     Dynamically changeing the TimeReference may cause a "jump".  *)
     property TimeReference: TGLCadencerTimeReference read FTimeReference write
     property TimeReference: TGLCadencerTimeReference read FTimeReference write
       SetTimeReference default cmPerformanceCounter;
       SetTimeReference default cmPerformanceCounter;
-    {Multiplier applied to the time reference. 
+    (* Multiplier applied to the time reference. 
       Zero isn't an allowed value, and be aware that if negative values
       Zero isn't an allowed value, and be aware that if negative values
       are accepted, they may not be supported by other GLScene objects.
       are accepted, they may not be supported by other GLScene objects.
-     Changing the TimeMultiplier will alter OriginTime. }
+     Changing the TimeMultiplier will alter OriginTime. *)
     property TimeMultiplier: Double read FTimeMultiplier write SetTimeMultiplier
     property TimeMultiplier: Double read FTimeMultiplier write SetTimeMultiplier
       stored StoreTimeMultiplier;
       stored StoreTimeMultiplier;
-    {Maximum value for deltaTime in progression events. 
+    (* Maximum value for deltaTime in progression events. 
        If null or negative, no max deltaTime is defined, otherwise, whenever
        If null or negative, no max deltaTime is defined, otherwise, whenever
        an event whose actual deltaTime would be superior to MaxDeltaTime
        an event whose actual deltaTime would be superior to MaxDeltaTime
        occurs, deltaTime is clamped to this max, and the extra time is hidden
        occurs, deltaTime is clamped to this max, and the extra time is hidden
        by the cadencer (it isn't visible in CurrentTime either).
        by the cadencer (it isn't visible in CurrentTime either).
        This option allows to limit progression rate in simulations where
        This option allows to limit progression rate in simulations where
-       high values would result in errors/random behaviour. }
+       high values would result in errors/random behaviour. *)
     property MaxDeltaTime: Double read FMaxDeltaTime write FMaxDeltaTime;
     property MaxDeltaTime: Double read FMaxDeltaTime write FMaxDeltaTime;
-    {Minimum value for deltaTime in progression events. 
+    (* Minimum value for deltaTime in progression events. 
        If superior to zero, this value specifies the minimum time step
        If superior to zero, this value specifies the minimum time step
        between two progression events.
        between two progression events.
        This option allows to limit progression rate in simulations where
        This option allows to limit progression rate in simulations where
-       low values would result in errors/random behaviour. }
+       low values would result in errors/random behaviour. *)
     property MinDeltaTime: Double read FMinDeltaTime write FMinDeltaTime;
     property MinDeltaTime: Double read FMinDeltaTime write FMinDeltaTime;
-    {Fixed time-step value for progression events. 
+    (* Fixed time-step value for progression events. 
        If superior to zero, progression steps will happen with that fixed
        If superior to zero, progression steps will happen with that fixed
        delta time. The progression remains time based, so zero to N events
        delta time. The progression remains time based, so zero to N events
        may be fired depending on the actual deltaTime (if deltaTime is
        may be fired depending on the actual deltaTime (if deltaTime is
@@ -140,23 +140,21 @@ type
        to two times FixedDeltaTime, two events will be fired, etc.).
        to two times FixedDeltaTime, two events will be fired, etc.).
        This option allows to use fixed time steps in simulations (while the
        This option allows to use fixed time steps in simulations (while the
        animation and rendering itself may happen at a lower or higher
        animation and rendering itself may happen at a lower or higher
-       framerate). }
+       framerate). *)
     property FixedDeltaTime: Double read FFixedDeltaTime write FFixedDeltaTime;
     property FixedDeltaTime: Double read FFixedDeltaTime write FFixedDeltaTime;
-    {Adjusts how progression events are triggered. 
-     See TGLCadencerMode. }
+    // Adjusts how progression events are triggered. See TGLCadencerMode. 
     property Mode: TGLCadencerMode read FMode write SetMode default cmASAP;
     property Mode: TGLCadencerMode read FMode write SetMode default cmASAP;
-    {Allows relinquishing time to other threads/processes. 
+    (* Allows relinquishing time to other threads/processes. 
      A "sleep" is issued BEFORE each progress if SleepLength>=0 (see
      A "sleep" is issued BEFORE each progress if SleepLength>=0 (see
-     help for the "sleep" procedure in delphi for details). }
-    property SleepLength: Integer read FSleepLength write FSleepLength default
-      -1;
-    {Happens AFTER scene was progressed. }
+     help for the "sleep" procedure in delphi for details). *)
+    property SleepLength: Integer read FSleepLength write FSleepLength default -1;
+    // Happens AFTER scene was progressed. 
     property OnProgress: TGLProgressEvent read FOnProgress write FOnProgress;
     property OnProgress: TGLProgressEvent read FOnProgress write FOnProgress;
-    {Happens AFTER all iterations with fixed delta time. }
+    // Happens AFTER all iterations with fixed delta time. 
     property OnTotalProgress : TGLProgressEvent read FOnTotalProgress write FOnTotalProgress;
     property OnTotalProgress : TGLProgressEvent read FOnTotalProgress write FOnTotalProgress;
   end;
   end;
 
 
-  {Adds a property to connect/subscribe to a cadencer.  }
+  // Adds a property to connect/subscribe to a cadencer.  
   TGLCustomCadencedComponent = class(TGLUpdateAbleComponent)
   TGLCustomCadencedComponent = class(TGLUpdateAbleComponent)
   private
   private
     FCadencer: TGLCadencer;
     FCadencer: TGLCadencer;
@@ -182,7 +180,6 @@ const
   cTickGLCadencer = 'TickGLCadencer';
   cTickGLCadencer = 'TickGLCadencer';
 
 
 type
 type
-  { TASAPHandler }
   TASAPHandler = class
   TASAPHandler = class
   private
   private
     FTooFastCounter: Integer;
     FTooFastCounter: Integer;
@@ -240,7 +237,6 @@ end;
 // ------------------ TASAPHandler ------------------
 // ------------------ TASAPHandler ------------------
 // ------------------
 // ------------------
 
 
-
 constructor TASAPHandler.Create;
 constructor TASAPHandler.Create;
 begin
 begin
   inherited Create;
   inherited Create;
@@ -248,7 +244,6 @@ begin
   PostMessage(FWindowHandle, vWMTickCadencer, 0, 0);
   PostMessage(FWindowHandle, vWMTickCadencer, 0, 0);
 end;
 end;
 
 
-
 destructor TASAPHandler.Destroy;
 destructor TASAPHandler.Destroy;
 begin
 begin
   if FTimer <> 0 then
   if FTimer <> 0 then
@@ -261,7 +256,6 @@ end;
 var
 var
   vWndProcInLoop: Boolean;
   vWndProcInLoop: Boolean;
 
 
-
 procedure TASAPHandler.WndProc(var Msg: TMessage);
 procedure TASAPHandler.WndProc(var Msg: TMessage);
 var
 var
   i: Integer;
   i: Integer;
@@ -351,7 +345,6 @@ end;
 // ------------------ TGLCadencer ------------------
 // ------------------ TGLCadencer ------------------
 // ------------------
 // ------------------
 
 
-
 constructor TGLCadencer.Create(AOwner: TComponent);
 constructor TGLCadencer.Create(AOwner: TComponent);
 begin
 begin
   inherited Create(AOwner);
   inherited Create(AOwner);
@@ -364,7 +357,6 @@ begin
   Enabled := True;
   Enabled := True;
 end;
 end;
 
 
-
 destructor TGLCadencer.Destroy;
 destructor TGLCadencer.Destroy;
 begin
 begin
   Assert(FProgressing = 0);
   Assert(FProgressing = 0);
@@ -374,7 +366,6 @@ begin
   inherited Destroy;
   inherited Destroy;
 end;
 end;
 
 
-
 procedure TGLCadencer.Subscribe(aComponent: TGLCadenceAbleComponent);
 procedure TGLCadencer.Subscribe(aComponent: TGLCadenceAbleComponent);
 begin
 begin
   if not Assigned(FSubscribedCadenceableComponents) then
   if not Assigned(FSubscribedCadenceableComponents) then
@@ -386,7 +377,6 @@ begin
   end;
   end;
 end;
 end;
 
 
-
 procedure TGLCadencer.UnSubscribe(aComponent: TGLCadenceAbleComponent);
 procedure TGLCadencer.UnSubscribe(aComponent: TGLCadenceAbleComponent);
 var
 var
   i: Integer;
   i: Integer;
@@ -402,7 +392,6 @@ begin
   end;
   end;
 end;
 end;
 
 
-
 procedure TGLCadencer.Notification(AComponent: TComponent; Operation:
 procedure TGLCadencer.Notification(AComponent: TComponent; Operation:
   TOperation);
   TOperation);
 begin
 begin
@@ -416,21 +405,18 @@ begin
   inherited;
   inherited;
 end;
 end;
 
 
-
 procedure TGLCadencer.Loaded;
 procedure TGLCadencer.Loaded;
 begin
 begin
   inherited Loaded;
   inherited Loaded;
   RestartASAP;
   RestartASAP;
 end;
 end;
 
 
-
 procedure TGLCadencer.OnIdleEvent(Sender: TObject; var Done: Boolean);
 procedure TGLCadencer.OnIdleEvent(Sender: TObject; var Done: Boolean);
 begin
 begin
   Progress;
   Progress;
   Done := False;
   Done := False;
 end;
 end;
 
 
-
 procedure TGLCadencer.RestartASAP;
 procedure TGLCadencer.RestartASAP;
 begin
 begin
   if not (csLoading in ComponentState) then
   if not (csLoading in ComponentState) then
@@ -444,7 +430,6 @@ begin
   end;
   end;
 end;
 end;
 
 
-
 procedure TGLCadencer.SetEnabled(const val: Boolean);
 procedure TGLCadencer.SetEnabled(const val: Boolean);
 begin
 begin
   if FEnabled <> val then
   if FEnabled <> val then
@@ -461,7 +446,6 @@ begin
   end;
   end;
 end;
 end;
 
 
-
 procedure TGLCadencer.SetScene(const val: TGLScene);
 procedure TGLCadencer.SetScene(const val: TGLScene);
 begin
 begin
   if FScene <> val then
   if FScene <> val then
@@ -475,7 +459,6 @@ begin
   end;
   end;
 end;
 end;
 
 
-
 procedure TGLCadencer.SetTimeMultiplier(const val: Double);
 procedure TGLCadencer.SetTimeMultiplier(const val: Double);
 var
 var
   rawRef: Double;
   rawRef: Double;
@@ -508,13 +491,11 @@ begin
   end;
   end;
 end;
 end;
 
 
-
 function TGLCadencer.StoreTimeMultiplier: Boolean;
 function TGLCadencer.StoreTimeMultiplier: Boolean;
 begin
 begin
   Result := (FTimeMultiplier <> 1);
   Result := (FTimeMultiplier <> 1);
 end;
 end;
 
 
-
 procedure TGLCadencer.SetMode(const val: TGLCadencerMode);
 procedure TGLCadencer.SetMode(const val: TGLCadencerMode);
 begin
 begin
   if FMode <> val then
   if FMode <> val then
@@ -526,14 +507,12 @@ begin
   end;
   end;
 end;
 end;
 
 
-
 procedure TGLCadencer.SetTimeReference(const val: TGLCadencerTimeReference);
 procedure TGLCadencer.SetTimeReference(const val: TGLCadencerTimeReference);
 begin
 begin
   // nothing more, yet
   // nothing more, yet
   FTimeReference := val;
   FTimeReference := val;
 end;
 end;
 
 
-
 procedure TGLCadencer.Progress;
 procedure TGLCadencer.Progress;
 var
 var
   deltaTime, newTime, totalDelta: Double;
   deltaTime, newTime, totalDelta: Double;
@@ -626,7 +605,6 @@ begin
   end;
   end;
 end;
 end;
 
 
-
 function TGLCadencer.GetRawReferenceTime: Double;
 function TGLCadencer.GetRawReferenceTime: Double;
 var
 var
   counter: Int64;
   counter: Int64;
@@ -647,20 +625,17 @@ begin
   end;
   end;
 end;
 end;
 
 
-
 function TGLCadencer.GetCurrenttime: Double;
 function TGLCadencer.GetCurrenttime: Double;
 begin
 begin
   Result := (GetRawReferenceTime - FOriginTime) * FTimeMultiplier;
   Result := (GetRawReferenceTime - FOriginTime) * FTimeMultiplier;
   FCurrentTime := Result;
   FCurrentTime := Result;
 end;
 end;
 
 
-
 function TGLCadencer.IsBusy: Boolean;
 function TGLCadencer.IsBusy: Boolean;
 begin
 begin
   Result := (FProgressing <> 0);
   Result := (FProgressing <> 0);
 end;
 end;
 
 
-
 procedure TGLCadencer.Reset;
 procedure TGLCadencer.Reset;
 begin
 begin
   lasttime := 0;
   lasttime := 0;
@@ -668,7 +643,6 @@ begin
   FOriginTime := downTime;
   FOriginTime := downTime;
 end;
 end;
 
 
-
 procedure TGLCadencer.SetCurrentTime(const Value: Double);
 procedure TGLCadencer.SetCurrentTime(const Value: Double);
 begin
 begin
   LastTime := Value - (FCurrentTime - LastTime);
   LastTime := Value - (FCurrentTime - LastTime);
@@ -680,14 +654,12 @@ end;
 // ------------------ TGLCustomCadencedComponent ------------------
 // ------------------ TGLCustomCadencedComponent ------------------
 // ------------------
 // ------------------
 
 
-
 destructor TGLCustomCadencedComponent.Destroy;
 destructor TGLCustomCadencedComponent.Destroy;
 begin
 begin
   Cadencer := nil;
   Cadencer := nil;
   inherited Destroy;
   inherited Destroy;
 end;
 end;
 
 
-
 procedure TGLCustomCadencedComponent.Notification(AComponent: TComponent;
 procedure TGLCustomCadencedComponent.Notification(AComponent: TComponent;
   Operation: TOperation);
   Operation: TOperation);
 begin
 begin
@@ -696,7 +668,6 @@ begin
   inherited;
   inherited;
 end;
 end;
 
 
-
 procedure TGLCustomCadencedComponent.SetCadencer(const val: TGLCadencer);
 procedure TGLCustomCadencedComponent.SetCadencer(const val: TGLCadencer);
 begin
 begin
   if FCadencer <> val then
   if FCadencer <> val then
@@ -723,6 +694,7 @@ initialization
     vCounterFrequency := 0;
     vCounterFrequency := 0;
 
 
 finalization
 finalization
+
   FreeAndNil(vHandler);
   FreeAndNil(vHandler);
   FreeAndNil(vASAPCadencerList);
   FreeAndNil(vASAPCadencerList);
 end.
 end.

+ 5 - 5
Source/GLCameraController.pas

@@ -1,14 +1,14 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-{
+
+unit GLCameraController;
+
+(*
   Component for animating camera movement.
   Component for animating camera movement.
   Can be used to zoom in/out, for linear movement, orbiting and Google Earth - like "fly-to"
   Can be used to zoom in/out, for linear movement, orbiting and Google Earth - like "fly-to"
   Main purpose was the SafeOrbitAndZoomToPos method, the others are usable as well
   Main purpose was the SafeOrbitAndZoomToPos method, the others are usable as well
-}
-
-
-unit GLCameraController;
+*)
 
 
 interface
 interface
 
 

+ 5 - 3
Source/GLCanvas.pas

@@ -1,12 +1,14 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-{
+
+unit GLCanvas;
+
+(*
    Implements a basic Canvas-like interface over for OpenGL.
    Implements a basic Canvas-like interface over for OpenGL.
    This class can be used for generic OpenGL applications and has no dependencies
    This class can be used for generic OpenGL applications and has no dependencies
    to the GLScene core units (only to base units).
    to the GLScene core units (only to base units).
-}
-unit GLCanvas;
+*)
 
 
 interface
 interface
 
 

+ 5 - 3
Source/GLCelShader.pas

@@ -1,11 +1,13 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-{
+
+unit GLCelShader;
+
+(*
    A shader that applies cel shading through a vertex program
    A shader that applies cel shading through a vertex program
    and shade definition texture. 
    and shade definition texture. 
-}
-unit GLCelShader;
+*)
 
 
 interface
 interface
 
 

+ 12 - 12
Source/GLColor.pas

@@ -1,11 +1,11 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-{
-  All color types, constants and utilities should go here
-}
+
 unit GLColor;
 unit GLColor;
 
 
+(* All color types, constants and utilities should go here *)
+
 interface
 interface
 
 
 {$I GLScene.inc}
 {$I GLScene.inc}
@@ -30,7 +30,7 @@ type
   PRGBColor = ^TRGBColor;
   PRGBColor = ^TRGBColor;
   TRGBColor = TVector3b;
   TRGBColor = TVector3b;
 
 
-  { Wraps an OpenGL color. }
+  // Wraps an OpenGL color. 
   TGLColor = class(TGLUpdateAbleObject)
   TGLColor = class(TGLUpdateAbleObject)
   private
   private
     FColor: TColorVector;
     FColor: TColorVector;
@@ -95,7 +95,7 @@ type
     procedure RemoveColor(const aName: String);
     procedure RemoveColor(const aName: String);
   end;
   end;
 
 
-{Builds a TColor from Red Green Blue components. }
+// Builds a TColor from Red Green Blue components. 
 function RGB2Color(const r, g, b: Byte): TColor; inline;
 function RGB2Color(const r, g, b: Byte): TColor; inline;
 function ColorManager: TGLColorManager;
 function ColorManager: TGLColorManager;
 procedure RegisterColor(const aName: String; const aColor: TColorVector);
 procedure RegisterColor(const aName: String; const aColor: TColorVector);
@@ -104,12 +104,12 @@ function GetRValue(rgb: DWORD): Byte; {$NODEFINE GetRValue}
 function GetGValue(rgb: DWORD): Byte; {$NODEFINE GetGValue}
 function GetGValue(rgb: DWORD): Byte; {$NODEFINE GetGValue}
 function GetBValue(rgb: DWORD): Byte; {$NODEFINE GetBValue}
 function GetBValue(rgb: DWORD): Byte; {$NODEFINE GetBValue}
 procedure InitGLSceneColors;
 procedure InitGLSceneColors;
-{ Converts a delphi color into its RGB fragments and correct range. }
+// Converts a delphi color into its RGB fragments and correct range. 
 function ConvertWinColor(aColor: TColor; Alpha: Single = 1): TColorVector;
 function ConvertWinColor(aColor: TColor; Alpha: Single = 1): TColorVector;
 // Converts a color vector (containing float values)
 // Converts a color vector (containing float values)
 function ConvertColorVector(const aColor: TColorVector): TColor; overload;
 function ConvertColorVector(const aColor: TColorVector): TColor; overload;
-{ Converts a color vector (containing float values) and alter intensity.
-  intensity is in [0..1] }
+(* Converts a color vector (containing float values) and alter intensity.
+  intensity is in [0..1] *)
 function ConvertColorVector(const aColor: TColorVector; intensity: Single): TColor; overload;
 function ConvertColorVector(const aColor: TColorVector; intensity: Single): TColor; overload;
 // Converts RGB components into a color vector with correct range
 // Converts RGB components into a color vector with correct range
 function ConvertRGBColor(const aColor: array of Byte): TColorVector;
 function ConvertRGBColor(const aColor: array of Byte): TColorVector;
@@ -132,12 +132,12 @@ const
   clHighlight = TColor(-13);
   clHighlight = TColor(-13);
   clHighlightedText = TColor(-14);
   clHighlightedText = TColor(-14);
 
 
-  { Mapped role offsets }
+  // Mapped role offsets 
   cloNormal = 32;
   cloNormal = 32;
   cloDisabled = 64;
   cloDisabled = 64;
   cloActive = 96;
   cloActive = 96;
 
 
-  { Normal, mapped, pseudo, rgb values }
+  // Normal, mapped, pseudo, rgb values 
   clNormalForeground = TColor(clForeground - cloNormal);
   clNormalForeground = TColor(clForeground - cloNormal);
   clNormalButton = TColor(clButton - cloNormal);
   clNormalButton = TColor(clButton - cloNormal);
   clNormalLight = TColor(clLight - cloNormal);
   clNormalLight = TColor(clLight - cloNormal);
@@ -153,7 +153,7 @@ const
   clNormalHighlight = TColor(clHighlight - cloNormal);
   clNormalHighlight = TColor(clHighlight - cloNormal);
   clNormalHighlightedText = TColor(clHighlightedText - cloNormal);
   clNormalHighlightedText = TColor(clHighlightedText - cloNormal);
 
 
-  { Disabled, mapped, pseudo, rgb values }
+  // Disabled, mapped, pseudo, rgb values 
   clDisabledForeground = TColor(clForeground - cloDisabled);
   clDisabledForeground = TColor(clForeground - cloDisabled);
   clDisabledButton = TColor(clButton - cloDisabled);
   clDisabledButton = TColor(clButton - cloDisabled);
   clDisabledLight = TColor(clLight - cloDisabled);
   clDisabledLight = TColor(clLight - cloDisabled);
@@ -169,7 +169,7 @@ const
   clDisabledHighlight = TColor(clHighlight - cloDisabled);
   clDisabledHighlight = TColor(clHighlight - cloDisabled);
   clDisabledHighlightedText = TColor(clHighlightedText - cloDisabled);
   clDisabledHighlightedText = TColor(clHighlightedText - cloDisabled);
 
 
-  { Active, mapped, pseudo, rgb values }
+  // Active, mapped, pseudo, rgb values 
   clActiveForeground = TColor(clForeground - cloActive);
   clActiveForeground = TColor(clForeground - cloActive);
   clActiveButton = TColor(clButton - cloActive);
   clActiveButton = TColor(clButton - cloActive);
   clActiveLight = TColor(clLight - cloActive);
   clActiveLight = TColor(clLight - cloActive);

+ 5 - 4
Source/GLCompositeImage.pas

@@ -1,13 +1,14 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-{
-  This class is required for loading images such classes as TGLDDSImage,
-  TGLO3TCImage, TGLHDRImage etc.
-}
 
 
 unit GLCompositeImage;
 unit GLCompositeImage;
 
 
+(*
+  This class is required for loading images such classes as TGLDDSImage,
+  TGLO3TCImage, TGLHDRImage etc.
+*)
+
 interface
 interface
 
 
 uses
 uses

+ 53 - 58
Source/GLConsole.pas

@@ -82,8 +82,8 @@ type
   TGLConsoleCommandList = class;
   TGLConsoleCommandList = class;
   TGLConsoleCommand = class;
   TGLConsoleCommand = class;
 
 
-  {Stores info on a command. A command is a parsed input line.
-    Should be transformed into a class, I think...}
+  (* Stores info on a command. A command is a parsed input line.
+    Should be transformed into a class, I think...*)
   TGLUserInputCommand = record
   TGLUserInputCommand = record
     CommandCount: Integer;
     CommandCount: Integer;
     Strings: array of string;
     Strings: array of string;
@@ -91,14 +91,14 @@ type
       //if user identifies a command, he must set this to  "True"
       //if user identifies a command, he must set this to  "True"
   end;
   end;
 
 
-  {Event called when used presses the "Enter"}
+  // Event called when used presses the "Enter"
   TGLlConsoleEvent = procedure(const ConsoleCommand: TGLConsoleCommand;
   TGLlConsoleEvent = procedure(const ConsoleCommand: TGLConsoleCommand;
     const Console: TGLCustomConsole;
     const Console: TGLCustomConsole;
     var Command: TGLUserInputCommand) of object;
     var Command: TGLUserInputCommand) of object;
 
 
   TGLConsoleMatchList = set of 0..CONSOLE_MAX_COMMANDS {Byte};
   TGLConsoleMatchList = set of 0..CONSOLE_MAX_COMMANDS {Byte};
 
 
-  { A class that checks for duplicates. }
+  // A class that checks for duplicates. 
   TGLConsoleStringList = class(TStringList)
   TGLConsoleStringList = class(TStringList)
   private
   private
     FConsole: TGLCustomConsole;
     FConsole: TGLCustomConsole;
@@ -110,7 +110,7 @@ type
     constructor Create(const Owner: TGLCustomConsole);
     constructor Create(const Owner: TGLCustomConsole);
   end;
   end;
 
 
-  { A wrapper for a console command. }
+  // A wrapper for a console command. 
   TGLConsoleCommand = class(TCollectionItem)
   TGLConsoleCommand = class(TCollectionItem)
   private
   private
     FVisible: Boolean;
     FVisible: Boolean;
@@ -130,14 +130,12 @@ type
     procedure DoOnCommand(var UserInputCommand: TGLUserInputCommand); virtual;
     procedure DoOnCommand(var UserInputCommand: TGLUserInputCommand); virtual;
     function GetDisplayName: string; override;
     function GetDisplayName: string; override;
   public
   public
-    //procedures
     procedure ShowHelp; virtual;
     procedure ShowHelp; virtual;
     procedure ShowShortHelp; virtual;
     procedure ShowShortHelp; virtual;
     procedure Assign(Source: TPersistent); override;
     procedure Assign(Source: TPersistent); override;
     constructor Create(Collection: TCollection); override;
     constructor Create(Collection: TCollection); override;
     destructor Destroy; override;
     destructor Destroy; override;
   published
   published
-    //properties
     property CommandName: string read FCommandName write SetCommandName;
     property CommandName: string read FCommandName write SetCommandName;
     property ShortHelp: string read FShortHelp write FShortHelp;
     property ShortHelp: string read FShortHelp write FShortHelp;
     property LongHelp: TStringList read FLongHelp;
     property LongHelp: TStringList read FLongHelp;
@@ -145,12 +143,12 @@ type
     property OnHelp: TNotifyEvent read FOnHelp write FOnHelp;
     property OnHelp: TNotifyEvent read FOnHelp write FOnHelp;
     // Disabled commands won't execute
     // Disabled commands won't execute
     property Enabled: Boolean read FEnabled write FEnabled default True;
     property Enabled: Boolean read FEnabled write FEnabled default True;
-    {If command is disabled and user calls it, no error report will be
-       generated if SilentDisabled is enabled }
+    (* If command is disabled and user calls it, no error report will be
+       generated if SilentDisabled is enabled *)
     property SilentDisabled: Boolean read FSilentDisabled write FSilentDisabled
     property SilentDisabled: Boolean read FSilentDisabled write FSilentDisabled
       default False;
       default False;
-    {Hidden commands won't show when user requests command list
-      or uses auto-complete }
+    (* Hidden commands won't show when user requests command list
+      or uses auto-complete *)
     property Visible: Boolean read FVisible write FVisible default True;
     property Visible: Boolean read FVisible write FVisible default True;
   end;
   end;
 
 
@@ -191,25 +189,16 @@ type
     constructor Create(AOwner: TPersistent);
     constructor Create(AOwner: TPersistent);
     procedure Assign(Source: TPersistent); override;
     procedure Assign(Source: TPersistent); override;
   published
   published
-    property NavigateUp: Byte read FNavigateUp write FNavigateUp default
-      VK_HOME;
-    property NavigateDown: Byte read FNavigateDown write FNavigateDown default
-      VK_END;
-    property NavigatePageUp: Byte read FNavigatePageUp write FNavigatePageUp
-      default VK_PRIOR;
-    property NavigatePageDown: Byte read FNavigatePageDown write
-      FNavigatePageDown default VK_NEXT;
-    property NextCommand: Byte read FNextCommand write FNextCommand default
-      VK_DOWN;
-    property PreviousCommand: Byte read FPreviousCommand write FPreviousCommand
-      default VK_UP;
-    property AutoCompleteCommand: Byte read FAutoCompleteCommand write
-      FAutoCompleteCommand default VK_CONTROL;
-    property DblClickDelay: Integer read FDblClickDelay write FDblClickDelay
-      default 300;
+    property NavigateUp: Byte read FNavigateUp write FNavigateUp default VK_HOME;
+    property NavigateDown: Byte read FNavigateDown write FNavigateDown default VK_END;
+    property NavigatePageUp: Byte read FNavigatePageUp write FNavigatePageUp default VK_PRIOR;
+    property NavigatePageDown: Byte read FNavigatePageDown write FNavigatePageDown default VK_NEXT;
+    property NextCommand: Byte read FNextCommand write FNextCommand default VK_DOWN;
+    property PreviousCommand: Byte read FPreviousCommand write FPreviousCommand default VK_UP;
+    property AutoCompleteCommand: Byte read FAutoCompleteCommand write FAutoCompleteCommand default VK_CONTROL;
+    property DblClickDelay: Integer read FDblClickDelay write FDblClickDelay default 300;
   end;
   end;
 
 
-  {TGLCustomConsole }
   TGLCustomConsole = class(TGLBaseSceneObject)
   TGLCustomConsole = class(TGLBaseSceneObject)
   private
   private
     FHudSprite: TGLHudSprite;
     FHudSprite: TGLHudSprite;
@@ -233,9 +222,8 @@ type
     function GetFont: TGLCustomBitmapFont;
     function GetFont: TGLCustomBitmapFont;
     procedure SetFont(const Value: TGLCustomBitmapFont);
     procedure SetFont(const Value: TGLCustomBitmapFont);
   protected
   protected
-    {Misc }
-    procedure DoOnCommandIssued(var UserInputCommand: TGLUserInputCommand);
-      virtual;
+    // Misc 
+    procedure DoOnCommandIssued(var UserInputCommand: TGLUserInputCommand); virtual;
     procedure SetFontColor(const Color: TColor); virtual;
     procedure SetFontColor(const Color: TColor); virtual;
     function GetFontColor: TColor;
     function GetFontColor: TColor;
     procedure SetHUDSpriteColor(const Color: TColor); virtual;
     procedure SetHUDSpriteColor(const Color: TColor); virtual;
@@ -243,17 +231,17 @@ type
     function NumLines: Integer;
     function NumLines: Integer;
     procedure ShowConsoleHelp; virtual;
     procedure ShowConsoleHelp; virtual;
     procedure HandleUnknownCommand(const Command: string); virtual;
     procedure HandleUnknownCommand(const Command: string); virtual;
-    {Auto Complete Command }
+    // Auto Complete Command 
     procedure AutoCompleteCommand; overload; virtual;
     procedure AutoCompleteCommand; overload; virtual;
     procedure AutoCompleteCommand(var MatchCount: Integer; var
     procedure AutoCompleteCommand(var MatchCount: Integer; var
       AdditionalCommandsMatchList: TGLConsoleMatchList; var CommandsMatchList:
       AdditionalCommandsMatchList: TGLConsoleMatchList; var CommandsMatchList:
       TGLConsoleMatchList); overload;
       TGLConsoleMatchList); overload;
-    {Command interpreters }
+    // Command interpreters 
     procedure CommandIssued(var UserInputCommand: TGLUserInputCommand); virtual;
     procedure CommandIssued(var UserInputCommand: TGLUserInputCommand); virtual;
     procedure FixCommand(var UserInputCommand: TGLUserInputCommand); virtual;
     procedure FixCommand(var UserInputCommand: TGLUserInputCommand); virtual;
     function ParseString(str, caract: string): TGLUserInputCommand;
     function ParseString(str, caract: string): TGLUserInputCommand;
     procedure ProcessInput; virtual;
     procedure ProcessInput; virtual;
-    {Refreshes the Hud (clip lines outside the visible console). }
+    // Refreshes the Hud (clip lines outside the visible console). 
     procedure RefreshHud; virtual;
     procedure RefreshHud; virtual;
     // Register built-in commands (onCreate)
     // Register built-in commands (onCreate)
     procedure RegisterBuiltInCommands; virtual;
     procedure RegisterBuiltInCommands; virtual;
@@ -310,50 +298,48 @@ type
     procedure NavigateDown;
     procedure NavigateDown;
     procedure NavigatePageUp;
     procedure NavigatePageUp;
     procedure NavigatePageDown;
     procedure NavigatePageDown;
-    {Refreshes the size of the hud to reflect changes on the viewer.
-       Should be called whenever the viewer's size changes. }
+    (* Refreshes the size of the hud to reflect changes on the viewer.
+       Should be called whenever the viewer's size changes. *)
     procedure RefreshHudSize; virtual;
     procedure RefreshHudSize; virtual;
-    {Adds a line (which is not treated as a command). }
+    // Adds a line (which is not treated as a command). 
     procedure AddLine(const str: string);
     procedure AddLine(const str: string);
-    {TypedCommands are cleared and current command index is reset. }
+    // TypedCommands are cleared and current command index is reset. 
     procedure ClearTypedCommands;
     procedure ClearTypedCommands;
     procedure ExecuteCommand(const Command: string);
     procedure ExecuteCommand(const Command: string);
     procedure ExecuteCommands(const Commands: TStrings);
     procedure ExecuteCommands(const Commands: TStrings);
     constructor Create(AOwner: TComponent); override;
     constructor Create(AOwner: TComponent); override;
     destructor Destroy; override;
     destructor Destroy; override;
-    {Changes the console font color. }
-    property FontColor: TColor read GetFontColor write SetFontColor stored
-      False;
-    property HUDSpriteColor: TColor read GetHUDSpriteColor write
-      SetHUDSpriteColor stored False;
+    // Changes the console font color. 
+    property FontColor: TColor read GetFontColor write SetFontColor stored False;
+    property HUDSpriteColor: TColor read GetHUDSpriteColor write SetHUDSpriteColor stored False;
     // Where user enters his commands.
     // Where user enters his commands.
     property InputLine: string read FInputLine write FInputLine;
     property InputLine: string read FInputLine write FInputLine;
     // List of commands that user typed.
     // List of commands that user typed.
     property TypedCommands: TStringList read FTypedCommands;
     property TypedCommands: TStringList read FTypedCommands;
     // Commands have events that are called when user types a sertauin command
     // Commands have events that are called when user types a sertauin command
     property Commands: TGLConsoleCommandList read FCommands;
     property Commands: TGLConsoleCommandList read FCommands;
-    {Aditional commands can be registered to participate in command auto-completion.
-     They can be interpreted in the global OnCommandIssued event handler. }
+    (* Aditional commands can be registered to participate in command auto-completion.
+     They can be interpreted in the global OnCommandIssued event handler. *)
     property AdditionalCommands: TGLConsoleStringList read FAdditionalCommands;
     property AdditionalCommands: TGLConsoleStringList read FAdditionalCommands;
-    {User controls. }
+    // User controls. 
     property Controls: TGLConsoleControls read FControls;
     property Controls: TGLConsoleControls read FControls;
-    {list of commands that user typed and console's responces. }
+    // List of commands that user typed and console's responces. 
     property ColsoleLog: TStringList read FColsoleLog;
     property ColsoleLog: TStringList read FColsoleLog;
-    {Allows to change consol's height from 0 to 1. }
+    // Allows to change consol's height from 0 to 1. 
     property Size: Single read FSize write SetSize;
     property Size: Single read FSize write SetSize;
-    {Visual stuff. }
+    // Visual stuff. 
     property SceneViewer: TGLSceneViewer read FSceneViewer write SetSceneViewer;
     property SceneViewer: TGLSceneViewer read FSceneViewer write SetSceneViewer;
     property HudSprite: TGLHudSprite read FHudSprite;
     property HudSprite: TGLHudSprite read FHudSprite;
     property HudText: TGLHudText read FHudText;
     property HudText: TGLHudText read FHudText;
     property Font: TGLCustomBitmapFont read GetFont write SetFont stored False;
     property Font: TGLCustomBitmapFont read GetFont write SetFont stored False;
     property Options: TGLConsoleOptions read FOptions write FOptions;
     property Options: TGLConsoleOptions read FOptions write FOptions;
-    { Main event of the console. Happens whenever the enter key is pressed.
+    (* Main event of the console. Happens whenever the enter key is pressed.
       First the input line is compared to all registered commands, then everything
       First the input line is compared to all registered commands, then everything
       is parsed into a TGLUserInputCommand record and  sent to the event.
       is parsed into a TGLUserInputCommand record and  sent to the event.
-      Empty lines are  not  ignored (i.e. they also trigger events)}
+      Empty lines are  not  ignored (i.e. they also trigger events) *)
     property OnCommandIssued: TGLlConsoleEvent read FOnCommandIssued write
     property OnCommandIssued: TGLlConsoleEvent read FOnCommandIssued write
       FOnCommandIssued;
       FOnCommandIssued;
-    {Standard stuff }
+    // Standard stuff 
     property Hint: string read FHint write FHint;
     property Hint: string read FHint write FHint;
     property Visible default False;
     property Visible default False;
   end;
   end;
@@ -393,7 +379,9 @@ const
   conDefaultConsoleWidth = 400;
   conDefaultConsoleWidth = 400;
   conDefaultConsoleHeight = 100;
   conDefaultConsoleHeight = 100;
 
 
-  { TGLCustomConsole }
+//------------------------------
+//  TGLCustomConsole 
+//------------------------------
 
 
 procedure TGLCustomConsole.ProcessInternalCommandClearScreen(const
 procedure TGLCustomConsole.ProcessInternalCommandClearScreen(const
   ConsoleCommand: TGLConsoleCommand; const Console: TGLCustomConsole; var Command:
   ConsoleCommand: TGLConsoleCommand; const Console: TGLCustomConsole; var Command:
@@ -1236,7 +1224,7 @@ begin
     FOnCommand := ProcessInternalCommandClearScreen;
     FOnCommand := ProcessInternalCommandClearScreen;
   end;
   end;
 
 
-  { Console commands }
+  // Console commands 
   with FCommands.Add do
   with FCommands.Add do
   begin
   begin
     FCommandName := 'Console.Hide';
     FCommandName := 'Console.Hide';
@@ -1270,7 +1258,7 @@ begin
     FOnCommand := ProcessInternalCommandConsoleClearTypedCommands;
     FOnCommand := ProcessInternalCommandConsoleClearTypedCommands;
   end;
   end;
 
 
-  { System commands }
+  // System commands 
   with FCommands.Add do
   with FCommands.Add do
   begin
   begin
     FCommandName := 'System.Time';
     FCommandName := 'System.Time';
@@ -1287,7 +1275,7 @@ begin
     FOnCommand := ProcessInternalCommandSystemDate;
     FOnCommand := ProcessInternalCommandSystemDate;
   end;
   end;
 
 
-  { Viewer commands }
+  // Viewer commands 
   with FCommands.Add do
   with FCommands.Add do
   begin
   begin
     FCommandName := 'Viewer.FPS';
     FCommandName := 'Viewer.FPS';
@@ -1457,7 +1445,9 @@ begin
   FHudText.Name := Value + 'HudText';
   FHudText.Name := Value + 'HudText';
 end;
 end;
 
 
-{ TGLConsoleControls }
+//--------------------------------
+// TGLConsoleControls 
+//--------------------------------
 
 
 procedure TGLConsoleControls.Assign(Source: TPersistent);
 procedure TGLConsoleControls.Assign(Source: TPersistent);
 begin
 begin
@@ -1494,7 +1484,9 @@ begin
   Result := FOwner;
   Result := FOwner;
 end;
 end;
 
 
-{ TGLConsoleCommand }
+//---------------------------
+// TGLConsoleCommand 
+//---------------------------
 
 
 procedure TGLConsoleCommand.Assign(Source: TPersistent);
 procedure TGLConsoleCommand.Assign(Source: TPersistent);
 begin
 begin
@@ -1688,7 +1680,10 @@ begin
   Result := FConsole;
   Result := FConsole;
 end;
 end;
 
 
+//---------------------------
 initialization
 initialization
+//---------------------------
+
   RegisterClasses([TGLCustomConsole, TGLConsole, TGLConsoleStringList,
   RegisterClasses([TGLCustomConsole, TGLConsole, TGLConsoleStringList,
     TGLConsoleCommand, TGLConsoleCommandList, TGLConsoleControls]);
     TGLConsoleCommand, TGLConsoleCommandList, TGLConsoleControls]);
 
 

+ 5 - 3
Source/GLCustomShader.pas

@@ -1,15 +1,17 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-{
+
+unit GLCustomShader;
+
+(*
     A collection of pure abstract classes - descendants of TGLShader, which are
     A collection of pure abstract classes - descendants of TGLShader, which are
     used for purpose of not having to write the same stuff all over and over
     used for purpose of not having to write the same stuff all over and over
     again in your own shader classes.
     again in your own shader classes.
     It also contains a procedures and function that can be used in all shaders.
     It also contains a procedures and function that can be used in all shaders.
     The whole history is logged in a former GLS version of the unit.
     The whole history is logged in a former GLS version of the unit.
 
 
-}
-unit GLCustomShader;
+*)
 
 
 interface
 interface
 
 

+ 3 - 2
Source/GLDCE.pas

@@ -1,6 +1,9 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
+
+unit GLDCE;
+
 (*
 (*
   Dynamic Collision Engine
   Dynamic Collision Engine
   How to use:
   How to use:
@@ -21,8 +24,6 @@
   - BounceFactor: Restituition factor, 1 means that it will bounce forever
   - BounceFactor: Restituition factor, 1 means that it will bounce forever
 *)
 *)
 
 
-unit GLDCE;
-
 interface
 interface
 
 
 {$I GLScene.inc}
 {$I GLScene.inc}

+ 5 - 4
Source/GLEParticleMasksManager.pas

@@ -1,7 +1,10 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-{
+
+unit GLEParticleMasksManager;
+
+(*
    A pretty particle mask effect manager.
    A pretty particle mask effect manager.
    This unit is part of GLE - GLScene Game Utilities Engine set by Kenneth Poulter [email protected]
    This unit is part of GLE - GLScene Game Utilities Engine set by Kenneth Poulter [email protected]
    Module Number: 37
    Module Number: 37
@@ -18,9 +21,7 @@
 
 
    Licenses: Removed. Donated to GLScene's Code Base as long as the author (Kenneth Poulter) is not altered in this file.
    Licenses: Removed. Donated to GLScene's Code Base as long as the author (Kenneth Poulter) is not altered in this file.
              Theft of code also is not allowed, although alterations are allowed.
              Theft of code also is not allowed, although alterations are allowed.
-}
-
-unit GLEParticleMasksManager;
+*)
 
 
 interface
 interface
 
 

+ 3 - 3
Source/GLEllipseCollision.pas

@@ -1,11 +1,11 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-{
-  Ellipsoid collision functions (mainly used by DCE).
-}
+
 unit GLEllipseCollision;
 unit GLEllipseCollision;
 
 
+(* Ellipsoid collision functions (mainly used by DCE). *)
+
 interface
 interface
 
 
 {$I GLScene.inc}
 {$I GLScene.inc}

+ 2 - 3
Source/GLFPSMovement.pas

@@ -1,12 +1,11 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-(*
-  FPS-like movement behaviour and manager.
-*)
 
 
 unit GLFPSMovement;
 unit GLFPSMovement;
 
 
+(* FPS-like movement behaviour and manager. *)
+
 interface
 interface
 
 
 {$I GLScene.inc}
 {$I GLScene.inc}

+ 3 - 3
Source/GLFile3DSSceneObjects.pas

@@ -1,11 +1,11 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-{
-  3ds-specific scene objects. 
-}
+
 unit GLFile3DSSceneObjects;
 unit GLFile3DSSceneObjects;
 
 
+(* 3ds-specific scene objects. *)
+
 interface
 interface
 
 
 {$I GLScene.inc}
 {$I GLScene.inc}

+ 3 - 3
Source/GLFileB3D.pas

@@ -1,11 +1,11 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-{
-  B3D VectorFile class to load Blitz 3D model files 
-}
+
 unit GLFileB3D;
 unit GLFileB3D;
 
 
+(* B3D VectorFile class to load Blitz 3D model files *)
+
 interface
 interface
 
 
 uses
 uses

+ 0 - 2
Source/GLFileBMP.pas

@@ -40,13 +40,11 @@ type
     function Quadrochrome(N: Integer): Integer;
     function Quadrochrome(N: Integer): Integer;
     function Octochrome(N: Integer): Integer;
     function Octochrome(N: Integer): Integer;
   public
   public
-    
     procedure LoadFromFile(const filename: string); override;
     procedure LoadFromFile(const filename: string); override;
     procedure SaveToFile(const filename: string); override;
     procedure SaveToFile(const filename: string); override;
     procedure LoadFromStream(stream: TStream); override;
     procedure LoadFromStream(stream: TStream); override;
     procedure SaveToStream(stream: TStream); override;
     procedure SaveToStream(stream: TStream); override;
     class function Capabilities: TGLDataFileCapabilities; override;
     class function Capabilities: TGLDataFileCapabilities; override;
-
     procedure AssignFromTexture(textureContext: TGLContext;
     procedure AssignFromTexture(textureContext: TGLContext;
       const textureHandle: Cardinal;
       const textureHandle: Cardinal;
       textureTarget: TGLTextureTarget;
       textureTarget: TGLTextureTarget;

+ 3 - 4
Source/GLFileGL2.pas

@@ -1,12 +1,11 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-{
-   Vector file object loading of Ghoul2 model and animation 
-   files into GLScene. 
-}
+
 unit GLFileGL2;
 unit GLFileGL2;
 
 
+(* Vector file object loading of Ghoul2 model and animation files *)
+
 interface
 interface
 
 
 uses
 uses

+ 5 - 5
Source/GLFileGLB.pas

@@ -1,11 +1,11 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-{
-   GLB binary file for glTF format implementation. 
-}
+
 unit GLFileGLB;
 unit GLFileGLB;
 
 
+(* GLB binary file for glTF format implementation. *)
+
 interface
 interface
 
 
 uses
 uses
@@ -23,8 +23,8 @@ uses
   GLPersistentClasses;
   GLPersistentClasses;
 
 
 type
 type
-   {The GLB binary glTF format is a runtime asset delivery format 
-      for GL APIs: WebGL, OpenGL ES OpenGL and Vulkan. }
+   (* The GLB binary glTF format is a runtime asset delivery format 
+      for GL APIs: WebGL, OpenGL ES OpenGL and Vulkan. *)
    TGLBVectorFile = class(TGLVectorFile)
    TGLBVectorFile = class(TGLVectorFile)
       public
       public
          class function Capabilities : TGLDataFileCapabilities; override;
          class function Capabilities : TGLDataFileCapabilities; override;

+ 3 - 3
Source/GLFileGLTF.pas

@@ -1,11 +1,11 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-{
-   GLTF file embedded glTF format implementation. 
-}
+
 unit GLFileGLTF;
 unit GLFileGLTF;
 
 
+(* GLB binary file for glTF format implementation. *)
+
 interface
 interface
 
 
 uses
 uses

+ 5 - 5
Source/GLFileGTS.pas

@@ -1,11 +1,11 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-{
-    GTS (GNU Triangulated Surface) vector file format implementation. 
-}
+
 unit GLFileGTS;
 unit GLFileGTS;
 
 
+(* GTS (GNU Triangulated Surface) vector file format implementation. *)
+
 interface
 interface
 
 
 {$I GLScene.inc}
 {$I GLScene.inc}
@@ -19,13 +19,13 @@ uses
   GLApplicationFileIO;
   GLApplicationFileIO;
 
 
 type
 type
-   {The GTS vector file (GNU Triangulated Surface library).
+   (* The GTS vector file (GNU Triangulated Surface library).
       It is a simple text format, with indexed vertices. The first line contains
       It is a simple text format, with indexed vertices. The first line contains
       the number of vertices, the number of edges and the number of faces separated
       the number of vertices, the number of edges and the number of faces separated
       by spaces.
       by spaces.
       Following lines contain the x/y/z coordinates of vertices, then the edges
       Following lines contain the x/y/z coordinates of vertices, then the edges
       (two indices) and the faces (three indices).
       (two indices) and the faces (three indices).
-      http://gts.sourceforge.net/ }
+      http://gts.sourceforge.net/ *)
    TGLGTSVectorFile = class(TGLVectorFile)
    TGLGTSVectorFile = class(TGLVectorFile)
       public
       public
          
          

+ 3 - 3
Source/GLFileLMTS.pas

@@ -1,11 +1,11 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-{
-   File loader for MTS
-}
+
 unit GLFileLMTS;
 unit GLFileLMTS;
 
 
+(* File loader for MTS *)
+
 interface
 interface
 
 
 {$I GLScene.inc}
 {$I GLScene.inc}

+ 3 - 3
Source/GLFileLWO.pas

@@ -1,11 +1,11 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-(*
-    Support-code to load Lightwave LWO Files (v6.0+, partial support).
-*)
+
 unit GLFileLWO;
 unit GLFileLWO;
 
 
+(*  Support-code to load Lightwave LWO Files (v6.0+, partial support).*)
+
 interface
 interface
 
 
 {$I GLScene.inc}
 {$I GLScene.inc}

+ 4 - 5
Source/GLFileMD2.pas

@@ -1,12 +1,11 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-{
-   Quake2 MD2 vector file format implementation.
-}
 
 
 unit GLFileMD2;
 unit GLFileMD2;
 
 
+(* Quake2 MD2 vector file format implementation. *)
+
 interface
 interface
 
 
 {$I GLScene.inc}
 {$I GLScene.inc}
@@ -19,11 +18,11 @@ uses
   FileMD2;
   FileMD2;
 
 
 type
 type
-   {The MD2 vector file (Quake2 actor file).
+   (* The MD2 vector file (Quake2 actor file).
       Stores a set of "frames" describing the different postures of the actor,
       Stores a set of "frames" describing the different postures of the actor,
       it may be animated by TGLActor. The "Skin" must be loaded indepentendly
       it may be animated by TGLActor. The "Skin" must be loaded indepentendly
       (the whole mesh uses a single texture bitmap).
       (the whole mesh uses a single texture bitmap).
-      Based on code by Roger Cao. }
+      Based on code by Roger Cao. *)
    TGLMD2VectorFile = class(TGLVectorFile)
    TGLMD2VectorFile = class(TGLVectorFile)
       public
       public
         class function Capabilities : TGLDataFileCapabilities; override;
         class function Capabilities : TGLDataFileCapabilities; override;

+ 3 - 4
Source/GLFileMD3.pas

@@ -1,12 +1,11 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-{
-  Code for loading animated MD3 files into GLScene
-              FreeForms and Actors.
-}
+
 unit GLFileMD3;
 unit GLFileMD3;
 
 
+(* Code for loading animated MD3 files into FreeForms and Actors. *)
+
 interface
 interface
 
 
 uses
 uses

+ 3 - 3
Source/GLFileMD5.pas

@@ -1,11 +1,11 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-{
-   Doom3 MD5 mesh and animation vector file format implementation. 
-}
+
 unit GLFileMD5;
 unit GLFileMD5;
 
 
+(* Doom3 MD5 mesh and animation vector file format implementation. *)
+
 interface
 interface
 
 
 {$I GLScene.inc}
 {$I GLScene.inc}

+ 5 - 3
Source/GLFileMDC.pas

@@ -1,7 +1,10 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-{
+
+unit GLFileMDC;
+
+(*
   Code for loading animated MDC files into GLScene FreeForms
   Code for loading animated MDC files into GLScene FreeForms
   and Actors.
   and Actors.
   This file format uses in Return To Castle Wolfenstein instead
   This file format uses in Return To Castle Wolfenstein instead
@@ -9,8 +12,7 @@
   plus very small data!
   plus very small data!
 
 
   Original code by Osman Turan ([email protected])
   Original code by Osman Turan ([email protected])
-}
-unit GLFileMDC;
+*)
 
 
 interface
 interface
 
 

+ 5 - 5
Source/GLFileMP3.pas

@@ -1,11 +1,11 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-{
-   Support for MP3 format. 
-}
+
 unit GLFileMP3;
 unit GLFileMP3;
 
 
+(* Support for MP3 format. *)
+
 interface
 interface
 
 
 {$I GLScene.inc}
 {$I GLScene.inc}
@@ -17,8 +17,8 @@ uses
 
 
 type
 type
 
 
-   {Support for MP3 format. 
-      *Partial* support only, access to PCMData is NOT supported. }
+   (* Support for MP3 format. 
+      *Partial* support only, access to PCMData is NOT supported. *)
    TGLMP3File = class (TGLSoundFile)
    TGLMP3File = class (TGLSoundFile)
       private
       private
          data : array of Byte; // used to store MP3 bitstream
          data : array of Byte; // used to store MP3 bitstream

+ 35 - 31
Source/GLFileMS3D.pas

@@ -1,11 +1,11 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-{
-   Support for MS3D file format.
-}
+
 unit GLFileMS3D;
 unit GLFileMS3D;
 
 
+(* Support for MS3D file format. *)
+
 interface
 interface
 
 
 {$I GLScene.inc}
 {$I GLScene.inc}
@@ -35,13 +35,13 @@ const
 
 
 type
 type
   // typedef struct
   // typedef struct
-  // {
+  // (*
   //     byte            flags;                              // SELECTED | HIDDEN
   //     byte            flags;                              // SELECTED | HIDDEN
   //     char            name[32];                           //
   //     char            name[32];                           //
   //     word            numtriangles;                       //
   //     word            numtriangles;                       //
   //     word            triangleIndices[numtriangles];      // the groups group the triangles
   //     word            triangleIndices[numtriangles];      // the groups group the triangles
   //     char            materialIndex;                      // -1 = no material
   //     char            materialIndex;                      // -1 = no material
-  // } ms3d_group_t;
+  // *) ms3d_group_t;
   TMS3DGroup = class
   TMS3DGroup = class
   public
   public
     Flags: byte;
     Flags: byte;
@@ -54,10 +54,10 @@ type
   end;
   end;
 
 
   // typdef struct
   // typdef struct
-  // {
+  // (*
   //    char    id[10];                                     // always "MS3D000000"
   //    char    id[10];                                     // always "MS3D000000"
   //    int     version;                                    // 4
   //    int     version;                                    // 4
-  // } ms3d_header_t;
+  // *) ms3d_header_t;
   {$A-}
   {$A-}
 
 
   TMS3DHeader = record
   TMS3DHeader = record
@@ -67,12 +67,12 @@ type
 
 
 
 
   // typedef struct
   // typedef struct
-  // {
+  // (*
   //     byte    flags;                                      // SELECTED | SELECTED2 | HIDDEN
   //     byte    flags;                                      // SELECTED | SELECTED2 | HIDDEN
   //     float   vertex[3];                                  //
   //     float   vertex[3];                                  //
   //     char    boneId;                                     // -1 = no bone
   //     char    boneId;                                     // -1 = no bone
   //     byte    referenceCount;
   //     byte    referenceCount;
-  // } ms3d_vertex_t;
+  // *) ms3d_vertex_t;
 
 
   TMS3DVertex = record
   TMS3DVertex = record
     Flags: byte;
     Flags: byte;
@@ -85,7 +85,7 @@ type
   TMS3DVertexArray = array[0..MAX_MS3D_VERTICES - 1] of TMS3DVertex;
   TMS3DVertexArray = array[0..MAX_MS3D_VERTICES - 1] of TMS3DVertex;
 
 
   // typedef struct
   // typedef struct
-  // {
+  // (*
   //     word    flags;                                      // SELECTED | SELECTED2 | HIDDEN
   //     word    flags;                                      // SELECTED | SELECTED2 | HIDDEN
   //     word    vertexIndices[3];                           //
   //     word    vertexIndices[3];                           //
   //     float   vertexNormals[3][3];                        //
   //     float   vertexNormals[3][3];                        //
@@ -93,7 +93,7 @@ type
   //     float   t[3];                                       //
   //     float   t[3];                                       //
   //     byte    smoothingGroup;                             // 1 - 32
   //     byte    smoothingGroup;                             // 1 - 32
   //     byte    groupIndex;                                 //
   //     byte    groupIndex;                                 //
-  // } ms3d_triangle_t;
+  // *) ms3d_triangle_t;
 
 
   TMS3DTriangle = record
   TMS3DTriangle = record
     Flags: word;
     Flags: word;
@@ -108,8 +108,8 @@ type
   PMS3DTriangleArray = ^TMS3DTriangleArray;
   PMS3DTriangleArray = ^TMS3DTriangleArray;
   TMS3DTriangleArray = array[0..MAX_MS3D_TRIANGLES - 1] of TMS3DTriangle;
   TMS3DTriangleArray = array[0..MAX_MS3D_TRIANGLES - 1] of TMS3DTriangle;
 
 
-   // typedef struct
-  // {
+  // typedef struct
+  // (*
   //     char            name[32];                           //
   //     char            name[32];                           //
   //     float           ambient[4];                         //
   //     float           ambient[4];                         //
   //     float           diffuse[4];                         //
   //     float           diffuse[4];                         //
@@ -120,7 +120,7 @@ type
   //     char            mode;                               // 0, 1, 2 is unused now
   //     char            mode;                               // 0, 1, 2 is unused now
   //     char            texture[128];                        // texture.bmp
   //     char            texture[128];                        // texture.bmp
   //     char            alphamap[128];                       // alpha.bmp
   //     char            alphamap[128];                       // alpha.bmp
-  // } ms3d_material_t;
+  // *) ms3d_material_t;
   TMS3DMaterial = record
   TMS3DMaterial = record
     Name: array[0..31] of AnsiChar;
     Name: array[0..31] of AnsiChar;
     Ambient: TColorVector;
     Ambient: TColorVector;
@@ -136,10 +136,10 @@ type
 
 
 
 
   // typedef struct
   // typedef struct
-  // {
+  // (*
   //     float           time;                               // time in seconds
   //     float           time;                               // time in seconds
   //     float           rotation[3];                        // x, y, z angles
   //     float           rotation[3];                        // x, y, z angles
-  // } ms3d_keyframe_rot_t;
+  // *) ms3d_keyframe_rot_t;
   TMS3DKeyframeRotation = record
   TMS3DKeyframeRotation = record
     Time: single;
     Time: single;
     Rotation: TD3DVector;
     Rotation: TD3DVector;
@@ -149,10 +149,10 @@ type
   TMS3DKeyframeRotationArray = array[0..MAX_MS3D_KEYFRAMES - 1] of TMS3DKeyframeRotation;
   TMS3DKeyframeRotationArray = array[0..MAX_MS3D_KEYFRAMES - 1] of TMS3DKeyframeRotation;
 
 
   // typedef struct
   // typedef struct
-  // {
+  // (*
   //     float           time;                               // time in seconds
   //     float           time;                               // time in seconds
   //     float           position[3];                        // local position
   //     float           position[3];                        // local position
-  // } ms3d_keyframe_pos_t;
+  // *) ms3d_keyframe_pos_t;
   TMS3DKeyframePosition = record
   TMS3DKeyframePosition = record
     Time: single;
     Time: single;
     Position: TD3DVector;
     Position: TD3DVector;
@@ -162,7 +162,7 @@ type
   TMS3DKeyframePositionArray = array[0..MAX_MS3D_KEYFRAMES - 1] of TMS3DKeyframePosition;
   TMS3DKeyframePositionArray = array[0..MAX_MS3D_KEYFRAMES - 1] of TMS3DKeyframePosition;
 
 
   // typedef struct
   // typedef struct
-  // {
+  // (*
   //     byte            flags;                              // SELECTED | DIRTY
   //     byte            flags;                              // SELECTED | DIRTY
   //     char            name[32];                           //
   //     char            name[32];                           //
   //     char            parentName[32];                     //
   //     char            parentName[32];                     //
@@ -174,7 +174,7 @@ type
   //
   //
   //     ms3d_keyframe_rot_t keyFramesRot[numKeyFramesRot];      // local animation matrices
   //     ms3d_keyframe_rot_t keyFramesRot[numKeyFramesRot];      // local animation matrices
   //     ms3d_keyframe_pos_t keyFramesTrans[numKeyFramesTrans];  // local animation matrices
   //     ms3d_keyframe_pos_t keyFramesTrans[numKeyFramesTrans];  // local animation matrices
-  // } ms3d_joint_t;
+  // *) ms3d_joint_t;
 
 
   TMS3DJointBase = record
   TMS3DJointBase = record
     Flags: byte;
     Flags: byte;
@@ -195,8 +195,6 @@ type
   PMS3DJointArray = ^TMS3DJointArray;
   PMS3DJointArray = ^TMS3DJointArray;
   TMS3DJointArray = array[0..MAX_MS3D_JOINTS - 1] of TMS3DJoint;
   TMS3DJointArray = array[0..MAX_MS3D_JOINTS - 1] of TMS3DJoint;
 
 
-
-
   TMS3DComment=record
   TMS3DComment=record
       index: Integer;
       index: Integer;
       commentLength: integer;
       commentLength: integer;
@@ -233,14 +231,11 @@ type
     destructor Destroy; override;
     destructor Destroy; override;
     property Weight[idx: Integer]: pMS3D_vertex_ex_t read GetWeight;
     property Weight[idx: Integer]: pMS3D_vertex_ex_t read GetWeight;
     property subVersion: Integer read FsubVersion write SetsubVersion;
     property subVersion: Integer read FsubVersion write SetsubVersion;
-
   end;
   end;
 
 
-
-
 type
 type
-  { The MilkShape vector file.
-     By Mattias Fagerlund, [email protected]. Yada yada. Eric rules! }
+  (* The MilkShape vector file.
+     By Mattias Fagerlund, [email protected]. Yada yada. Eric rules! *)
   TGLMS3DVectorFile = class(TGLVectorFile)
   TGLMS3DVectorFile = class(TGLVectorFile)
   public
   public
     class function Capabilities: TGLDataFileCapabilities; override;
     class function Capabilities: TGLDataFileCapabilities; override;
@@ -252,8 +247,12 @@ type
 
 
 // ------------------------------------------------------------------
 // ------------------------------------------------------------------
 implementation
 implementation
+// ------------------------------------------------------------------
+
 
 
-{ TMS3DGroup }
+// -------------------------
+//  TMS3DGroup 
+// -------------------------
 
 
 constructor TMS3DGroup.Create;
 constructor TMS3DGroup.Create;
 begin
 begin
@@ -266,7 +265,9 @@ begin
   inherited;
   inherited;
 end;
 end;
 
 
-{ TMS3DCommentList }
+// -------------------------
+//  TMS3DCommentList 
+// -------------------------
 
 
 destructor TMS3DCommentList.destroy;
 destructor TMS3DCommentList.destroy;
 var
 var
@@ -287,7 +288,9 @@ begin
     add(result);
     add(result);
 end;
 end;
 
 
-{ TVertexWeightList }
+// -------------------------
+// TVertexWeightList 
+// -------------------------
 
 
 procedure TVertexWeightList.clear;
 procedure TVertexWeightList.clear;
 var
 var
@@ -623,7 +626,8 @@ begin
       end
       end
       else
       else
       begin
       begin
-        Exception.Create(ResourceName + ' has materials but there is no material library assigned to the object loading this MS3D file.' + #10#13 + 'If this is what you want,  then you can safely ignore this exception.');
+        Exception.Create(ResourceName + ' has materials but there is no material library assigned to the object loading this MS3D file.' + #10#13 + 
+          'If this is what you want,  then you can safely ignore this exception.');
       end;
       end;
     end;
     end;
 
 

+ 5 - 3
Source/GLFileNMF.pas

@@ -1,13 +1,15 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-{
+
+unit GLFileNMF;
+
+(*
   NormalMapper loading into GLScene FreeForms/Actors
   NormalMapper loading into GLScene FreeForms/Actors
 
 
   Notes:
   Notes:
   NormalMapper can be found at http://www.ati.com/developer/tools.html
   NormalMapper can be found at http://www.ati.com/developer/tools.html
-}
-unit GLFileNMF;
+*)
 
 
 interface
 interface
 
 

+ 3 - 3
Source/GLFileNurbs.pas

@@ -1,11 +1,11 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-{
-   Nurbs surfaces vector file loading. 
-}
+
 unit GLFileNurbs;
 unit GLFileNurbs;
 
 
+(* Nurbs surfaces vector file loading. *)
+
 interface
 interface
 
 
 uses
 uses

+ 10 - 9
Source/GLFileOBJ.pas

@@ -33,20 +33,21 @@ uses
   GLMaterial;
   GLMaterial;
 
 
 const
 const
-  BufSize = 10240; { Load input data in chunks of BufSize Bytes. }
-  LineLen = 100; { Allocate memory for the current line in chunks
-  of LineLen Bytes. }
+  // Load input data in chunks of BufSize Bytes. 
+  BufSize = 10240;
+  // Allocate memory for the current line in chunks of LineLen Bytes.  
+  LineLen = 100; 
 
 
 type
 type
 
 
   TGLOBJVectorFile = class(TGLVectorFile)
   TGLOBJVectorFile = class(TGLVectorFile)
   private
   private
-    FSourceStream: TStream; { Load from this stream }
-    FBuffer: AnsiString; { Buffer }
-    FLine: string; { current line }
-    FLineNo: Integer; { current Line number - for error messages }
-    FEof: Boolean; { Stream done? }
-    FBufPos: Integer; { Position in the buffer }
+    FSourceStream: TStream; // Load from this stream 
+    FBuffer: AnsiString; // Buffer 
+    FLine: string; // current line 
+    FLineNo: Integer; // current Line number - for error messages 
+    FEof: Boolean; // Stream done? 
+    FBufPos: Integer; // Position in the buffer 
   protected
   protected
     // Read a single line of text from the source stream, set FEof to true when done.
     // Read a single line of text from the source stream, set FEof to true when done.
     procedure ReadLine;
     procedure ReadLine;

+ 1 - 1
Source/GLFileOCT.pas

@@ -32,7 +32,7 @@ uses
 
 
 type
 type
 
 
-  {The OCT vector file (FSRad output).  }
+  // The OCT vector file (FSRad output).  
   TGLOCTGLVectorFile = class(TGLVectorFile)
   TGLOCTGLVectorFile = class(TGLVectorFile)
   public
   public
     class function Capabilities: TGLDataFileCapabilities; override;
     class function Capabilities: TGLDataFileCapabilities; override;

+ 7 - 7
Source/GLFilePAK.pas

@@ -1,16 +1,15 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-{
-   Methods for PAK Archiving
-}
 
 
 unit GLFilePAK;
 unit GLFilePAK;
 
 
-{$I GLScene.inc}
+(* Methods for PAK Archiving *)
 
 
 interface
 interface
 
 
+{$I GLScene.inc}
+
 uses
 uses
   System.Classes,
   System.Classes,
   System.SysUtils,
   System.SysUtils,
@@ -19,7 +18,7 @@ uses
 const
 const
    SIGN = 'PACK';
    SIGN = 'PACK';
 
 
-Type
+type
 
 
    TPakHeader = record
    TPakHeader = record
       Signature: array[0..3] of AnsiChar;
       Signature: array[0..3] of AnsiChar;
@@ -73,7 +72,9 @@ implementation
 var
 var
    Dir: TFileSection;
    Dir: TFileSection;
 
 
-{ TPAKArchive }
+//-------------------------------
+// TPAKArchive 
+//-------------------------------
 
 
 function TPAKArchive.GetContentCount: integer;
 function TPAKArchive.GetContentCount: integer;
 begin
 begin
@@ -99,7 +100,6 @@ begin
   inherited SetCompressionLevel(aValue);
   inherited SetCompressionLevel(aValue);
 end;
 end;
 
 
-
 procedure TPAKArchive.LoadFromFile(const FileName: string);
 procedure TPAKArchive.LoadFromFile(const FileName: string);
 begin
 begin
    FFileName := FileName;
    FFileName := FileName;

+ 3 - 1
Source/GLFileTGA.pas

@@ -1,13 +1,15 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
+
+unit GLFileTGA;
+
 (*
 (*
   Simple TGA formats supports.
   Simple TGA formats supports.
   Currently supports only 24 and 32 bits RGB formats
   Currently supports only 24 and 32 bits RGB formats
   (uncompressed and RLE compressed).
   (uncompressed and RLE compressed).
   Based on David McDuffee's document from www.wotsit.org
   Based on David McDuffee's document from www.wotsit.org
 *)
 *)
-unit GLFileTGA;
 
 
 interface
 interface
 
 

+ 3 - 3
Source/GLFileVRML.pas

@@ -1,11 +1,11 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-{
-  Preliminary VRML vector file support.
-}
+
 unit GLFileVRML;
 unit GLFileVRML;
 
 
+(* Preliminary VRML vector file support. *)
+
 interface
 interface
 
 
 {$I GLScene.inc}
 {$I GLScene.inc}

+ 4 - 4
Source/GLFileWAV.pas

@@ -1,11 +1,11 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-{
-   Support for Windows WAV format. 
-}
+
 unit GLFileWAV;
 unit GLFileWAV;
 
 
+(* Support for Windows WAV format. *)
+
 interface
 interface
 
 
 {$I GLScene.inc}
 {$I GLScene.inc}
@@ -18,7 +18,7 @@ uses
 
 
 type
 type
 
 
-   {Support for Windows WAV format. }
+   // Support for Windows WAV format. 
    TGLWAVFile = class (TGLSoundFile)
    TGLWAVFile = class (TGLSoundFile)
       private
       private
          {$IFDEF MSWINDOWS}
          {$IFDEF MSWINDOWS}

+ 2 - 3
Source/GLFileX.pas

@@ -1,12 +1,11 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-{
-  Simple X format support for Delphi (Microsoft's favorite format)
-}
 
 
 unit GLFileX;
 unit GLFileX;
 
 
+(* Simple X format support for Delphi (Microsoft's favorite format) *)
+
 interface
 interface
 
 
 {$I GLScene.inc}
 {$I GLScene.inc}

+ 10 - 18
Source/GLFileZLIB.pas

@@ -1,17 +1,15 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-{
-   Methods for archiving using ZLib 
-   .
-}
 
 
 unit GLFileZLIB;
 unit GLFileZLIB;
 
 
-{$I GLScene.inc}
+(* Methods for archiving using ZLib *)
 
 
 interface
 interface
 
 
+{$I GLScene.inc}
+
 uses
 uses
   System.Classes, 
   System.Classes, 
   System.SysUtils, 
   System.SysUtils, 
@@ -36,37 +34,27 @@ Type
       CbrMode: TCompressionLevel;
       CbrMode: TCompressionLevel;
    end;
    end;
 
 
-  { TZLibArchive }
-
-  TZLibArchive=class(TGLBaseArchive)
+  TZLibArchive = class(TGLBaseArchive)
     private
     private
       FHeader: TZLibHeader;
       FHeader: TZLibHeader;
       FStream: TFileStream;
       FStream: TFileStream;
-
       function GetContentCount: integer;
       function GetContentCount: integer;
       procedure MakeContentList;
       procedure MakeContentList;
     public
     public
       property ContentCount: integer Read GetContentCount;
       property ContentCount: integer Read GetContentCount;
       destructor Destroy; override;
       destructor Destroy; override;
-
       procedure LoadFromFile(const FileName: string); override;
       procedure LoadFromFile(const FileName: string); override;
-
       procedure Clear; override;
       procedure Clear; override;
       function ContentExists(ContentName: string): boolean;override;
       function ContentExists(ContentName: string): boolean;override;
-
       function GetContent(aStream: TStream; index: integer): TStream; override;
       function GetContent(aStream: TStream; index: integer): TStream; override;
       function GetContent(index: integer): TStream; override;
       function GetContent(index: integer): TStream; override;
       function GetContent(ContentName: string): TStream; override;
       function GetContent(ContentName: string): TStream; override;
-
       function GetContentSize(index: integer): integer; override;
       function GetContentSize(index: integer): integer; override;
       function GetContentSize(ContentName: string): integer; override;
       function GetContentSize(ContentName: string): integer; override;
-
       procedure AddFromStream(ContentName, Path: string; FS: TStream);override;
       procedure AddFromStream(ContentName, Path: string; FS: TStream);override;
       procedure AddFromFile(FileName, Path: string); override;
       procedure AddFromFile(FileName, Path: string); override;
-
       procedure RemoveContent(index: integer); overload; override;
       procedure RemoveContent(index: integer); overload; override;
       procedure RemoveContent(ContentName: string); overload;override;
       procedure RemoveContent(ContentName: string); overload;override;
-
       procedure Extract(index: integer; NewName: string); override;
       procedure Extract(index: integer; NewName: string); override;
       procedure Extract(ContentName, NewName: string); override;
       procedure Extract(ContentName, NewName: string); override;
   end;
   end;
@@ -78,8 +66,9 @@ implementation
 var
 var
    Dir: TFileSection;
    Dir: TFileSection;
 
 
-{ TZLibArchive }
-
+//-----------------------------
+//  TZLibArchive 
+//-----------------------------
 
 
 function TZLibArchive.GetContentCount: integer;
 function TZLibArchive.GetContentCount: integer;
 begin
 begin
@@ -340,7 +329,10 @@ begin
       Extract(FContentList.IndexOf(ContentName), NewName);
       Extract(FContentList.IndexOf(ContentName), NewName);
 end;
 end;
 
 
+//-----------------------------
 initialization
 initialization
+//-----------------------------
+
   RegisterArchiveFormat('zlib', 'GLScene file uses the zlib compression algorithm', TZLibArchive);
   RegisterArchiveFormat('zlib', 'GLScene file uses the zlib compression algorithm', TZLibArchive);
 
 
 end.
 end.

+ 3 - 3
Source/GLFireFX.pas

@@ -1,11 +1,11 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-(*
-   Fire special effect
-*)
+
 unit GLFireFX;
 unit GLFireFX;
 
 
+(*  Fire special effect *)
+
 interface
 interface
 
 
 {$I GLScene.inc}
 {$I GLScene.inc}

+ 2 - 2
Source/GLForces.pas

@@ -14,8 +14,8 @@ uses
   GLScene,
   GLScene,
   GLVectorGeometry,
   GLVectorGeometry,
   GLBehaviours,
   GLBehaviours,
-  GLCoordinates
-  {, GLSceneRegister};
+  // GLSceneRegister,
+  GLCoordinates;
 
 
 type
 type
   TGLForce = class;
   TGLForce = class;

+ 6 - 5
Source/GLGLUTesselation.pas

@@ -1,11 +1,11 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-{
-  Code to generate triangle strips and fans for polygons.
-}
+
 unit GLGLUTesselation;
 unit GLGLUTesselation;
 
 
+(* Code to generate triangle strips and fans for polygons. *)
+
 interface
 interface
 
 
 {$I GLScene.inc}
 {$I GLScene.inc}
@@ -21,8 +21,9 @@ uses
   GLVectorLists,
   GLVectorLists,
   GLVectorGeometry;
   GLVectorGeometry;
 
 
-{Tesselates the polygon outlined by the Vertexes. And addeds them to the first facegroup of the Mesh. }
-procedure DoTesselate(Vertexes: TAffineVectorList; Mesh: TGLBaseMesh; normal: PAffineVector = nil; invertNormals: Boolean = False);
+(* Tesselates the polygon outlined by the Vertexes. And addeds them to the first facegroup of the Mesh. *)
+procedure DoTesselate(Vertexes: TAffineVectorList; Mesh: TGLBaseMesh; 
+  normal: PAffineVector = nil; invertNormals: Boolean = False);
 
 
 //---------------------------------------------------------------------------
 //---------------------------------------------------------------------------
 implementation
 implementation

+ 3 - 3
Source/GLGeomObjects.pas

@@ -1,11 +1,11 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-(*
-  Geometric objects.
-*)
+
 unit GLGeomObjects;
 unit GLGeomObjects;
 
 
+(* Geometric objects. *)
+
 interface
 interface
 
 
 {$I GLScene.inc}
 {$I GLScene.inc}

+ 51 - 57
Source/GLGeometryBB.pas

@@ -1,12 +1,11 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-{
-  Calculations and manipulations on Bounding Boxes. 
-}
 
 
 unit GLGeometryBB;
 unit GLGeometryBB;
 
 
+(* Calculations and manipulations on Bounding Boxes *)
+
 interface
 interface
 
 
 {$I GLScene.inc}
 {$I GLScene.inc}
@@ -19,21 +18,21 @@ uses
   GLVectorTypes;
   GLVectorTypes;
 
 
 type
 type
-  {  Structure for storing Bounding Boxes }
+  //  Structure for storing Bounding Boxes 
   PHmgBoundingBox = ^THmgBoundingBox;
   PHmgBoundingBox = ^THmgBoundingBox;
 
 
   THmgBoundingBox = record
   THmgBoundingBox = record
     BBox: array [0 .. 7] of TVector;
     BBox: array [0 .. 7] of TVector;
   end;
   end;
 
 
-  {  Structure for storing Axis Aligned Bounding Boxes }
+  //  Structure for storing Axis Aligned Bounding Boxes 
   TAABB = record
   TAABB = record
     Min, Max: TAffineVector;
     Min, Max: TAffineVector;
   end;
   end;
 
 
   PAABB = ^TAABB;
   PAABB = ^TAABB;
 
 
-  { Structure for storing BoundingSpheres. Similar to TAABB }
+  // Structure for storing BoundingSpheres. Similar to TAABB 
   TBSphere = record
   TBSphere = record
     { Center of Bounding Sphere }
     { Center of Bounding Sphere }
     Center: TAffineVector;
     Center: TAffineVector;
@@ -46,10 +45,10 @@ type
     Right, Bottom: Single;
     Right, Bottom: Single;
   end;
   end;
 
 
-  { Result type for space intersection tests, like AABBContainsAABB or
-    BSphereContainsAABB }
+  (* Result type for space intersection tests, like AABBContainsAABB or
+    BSphereContainsAABB *)
   TSpaceContains = (ScNoOverlap, ScContainsFully, ScContainsPartially);
   TSpaceContains = (ScNoOverlap, ScContainsFully, ScContainsPartially);
-  { Structure for storing the corners of an AABB, used with ExtractAABBCorners }
+  // Structure for storing the corners of an AABB, used with ExtractAABBCorners 
   TAABBCorners = array [0 .. 7] of TAffineVector;
   TAABBCorners = array [0 .. 7] of TAffineVector;
 
 
   const
   const
@@ -67,15 +66,12 @@ type
 // Bounding Box functions
 // Bounding Box functions
 // ------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------
 
 
-function BoundingBoxesAreEqual(const ABoundingBox1, ABoundingBox2
-  : THmgBoundingBox): Boolean; overload;
-function BoundingBoxesAreEqual(const ABoundingBox1, ABoundingBox2
-  : PHmgBoundingBox): Boolean; overload;
+function BoundingBoxesAreEqual(const ABoundingBox1, ABoundingBox2: THmgBoundingBox): Boolean; overload;
+function BoundingBoxesAreEqual(const ABoundingBox1, ABoundingBox2: PHmgBoundingBox): Boolean; overload;
 
 
-{  Adds a BB into another BB. 
-  The original BB (c1) is extended if necessary to contain c2. }
-function AddBB(var C1: THmgBoundingBox; const C2: THmgBoundingBox)
-  : THmgBoundingBox;
+(*  Adds a BB into another BB. 
+  The original BB (c1) is extended if necessary to contain c2. *)
+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 SetBB(var C: THmgBoundingBox; const V: TVector);
@@ -92,91 +88,89 @@ function BBMaxY(const C: THmgBoundingBox): Single;
 function BBMinZ(const C: THmgBoundingBox): Single;
 function BBMinZ(const C: THmgBoundingBox): Single;
 function BBMaxZ(const C: THmgBoundingBox): Single;
 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: TVector; const Radius: Single);
-{ Returns the intersection AABB of two AABBs. 
-  If the AABBs don't intersect, will return a degenerated AABB (plane, line or point). }
+(* Returns the intersection AABB of two AABBs. 
+  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;
-{  Extract AABB information from a BB. }
+//  Extract AABB information from a BB. 
 function BBToAABB(const ABB: THmgBoundingBox): TAABB;
 function BBToAABB(const ABB: THmgBoundingBox): TAABB;
-{ Converts an AABB to its canonical BB. }
+// Converts an AABB to its canonical BB. 
 function AABBToBB(const AnAABB: TAABB): THmgBoundingBox; overload;
 function AABBToBB(const AnAABB: TAABB): THmgBoundingBox; overload;
-{ Transforms an AABB to a BB. }
+// Transforms an AABB to a BB. 
 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: TVector); 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: TVector); 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: TVector); overload;
-{ Determines if two AxisAlignedBoundingBoxes intersect. 
-  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;
-{ Checks whether two Bounding boxes aligned with the world axes collide in the XY plane.  }
+(* Determines if two AxisAlignedBoundingBoxes intersect. 
+  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;
+// Checks whether two Bounding boxes aligned with the world axes collide in the XY plane.  
 function IntersectAABBsAbsoluteXY(const Aabb1, Aabb2: TAABB): Boolean;
 function IntersectAABBsAbsoluteXY(const Aabb1, Aabb2: TAABB): Boolean;
-{ Checks whether two Bounding boxes aligned with the world axes collide in the XZ plane.  }
+// Checks whether two Bounding boxes aligned with the world axes collide in the XZ plane.  
 function IntersectAABBsAbsoluteXZ(const Aabb1, Aabb2: TAABB): Boolean;
 function IntersectAABBsAbsoluteXZ(const Aabb1, Aabb2: TAABB): Boolean;
-{ Checks whether two Bounding boxes aligned with the world axes collide.  }
+// Checks whether two Bounding boxes aligned with the world axes collide.  
 function IntersectAABBsAbsolute(const Aabb1, Aabb2: TAABB): Boolean;
 function IntersectAABBsAbsolute(const Aabb1, Aabb2: TAABB): Boolean;
-{ Checks whether one Bounding box aligned with the world axes fits within
-  another Bounding box.  }
+(* Checks whether one Bounding box aligned with the world axes fits within
+  another Bounding box *)
 function AABBFitsInAABBAbsolute(const Aabb1, Aabb2: TAABB): Boolean;
 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: TVector; 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;
-{ Compute the intersection between a plane and the AABB}
+// Compute the intersection between a plane and the AABB
 function PlaneAABBIntersection(const plane : THmgPlane; const AABB : TAABB) : TAffineVectorList;
 function PlaneAABBIntersection(const plane : THmgPlane; const AABB : TAABB) : TAffineVectorList;
-{ Checks if a triangle (given by vertices v1, v2 and v3) intersects an AABB }
+// Checks if a triangle (given by vertices v1, v2 and v3) intersects an AABB 
 function TriangleIntersectAABB(const Aabb: TAABB; const V1, V2, V3: TAffineVector): Boolean;
 function TriangleIntersectAABB(const Aabb: TAABB; const V1, V2, V3: TAffineVector): Boolean;
 
 
-{ Extract the corners from an AABB }
+// Extract the corners from an AABB 
 procedure ExtractAABBCorners(const AABB: TAABB; var AABBCorners: TAABBCorners);
 procedure ExtractAABBCorners(const AABB: TAABB; var AABBCorners: TAABBCorners);
 
 
-{ Convert an AABB to a BSphere }
+// Convert an AABB to a BSphere 
 procedure AABBToBSphere(const AABB: TAABB; var BSphere: TBSphere);
 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: TVector; 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;
-{ Determines to which extent a BSphere contains an AABB }
+// Determines to which extent a BSphere contains an AABB 
 function BSphereContainsAABB(const MainBSphere: TBSphere; const TestAABB: TAABB): TSpaceContains;
 function BSphereContainsAABB(const MainBSphere: TBSphere; const TestAABB: TAABB): TSpaceContains;
-{ Determines to which extent one BSphere contains another BSphere }
+// Determines to which extent one BSphere contains another BSphere 
 function BSphereContainsBSphere(const MainBSphere, TestBSphere: TBSphere): TSpaceContains;
 function BSphereContainsBSphere(const MainBSphere, TestBSphere: TBSphere): TSpaceContains;
-{ Determines to which extent an AABB contains a BSpher }
-function AABBContainsBSphere(const MainAABB: TAABB; const TestBSphere: TBSphere)
-  : TSpaceContains;
-{ Determines to which extent a plane contains a BSphere }
+// Determines to which extent an AABB contains a BSpher 
+function AABBContainsBSphere(const MainAABB: TAABB; const TestBSphere: TBSphere): TSpaceContains;
+// Determines to which extent a plane contains a BSphere 
 function PlaneContainsBSphere(const Location, Normal: TAffineVector;
 function PlaneContainsBSphere(const Location, Normal: TAffineVector;
   const TestBSphere: TBSphere): TSpaceContains;
   const TestBSphere: TBSphere): TSpaceContains;
-{ Determines to which extent a frustum contains a BSphere }
+// Determines to which extent a frustum contains a BSphere 
 function FrustumContainsBSphere(const Frustum: TFrustum;
 function FrustumContainsBSphere(const Frustum: TFrustum;
   const TestBSphere: TBSphere): TSpaceContains;
   const TestBSphere: TBSphere): TSpaceContains;
-{ Determines to which extent a frustum contains an AABB }
+// Determines to which extent a frustum contains an AABB 
 function FrustumContainsAABB(const Frustum: TFrustum; const TestAABB: TAABB): TSpaceContains;
 function FrustumContainsAABB(const Frustum: TFrustum; const TestAABB: TAABB): TSpaceContains;
-{ Clips a position to an AABB }
+// Clips a position to an AABB 
 function ClipToAABB(const V: TAffineVector; const AABB: TAABB): TAffineVector;
 function ClipToAABB(const V: TAffineVector; const AABB: TAABB): TAffineVector;
-{ Determines if one BSphere intersects another BSphere }
+// Determines if one BSphere intersects another BSphere 
 function BSphereIntersectsBSphere(const MainBSphere, TestBSphere: TBSphere): Boolean;
 function BSphereIntersectsBSphere(const MainBSphere, TestBSphere: TBSphere): Boolean;
 
 
-{ Extend the clip rect to include given coordinate. }
+// Extend the clip rect to include given coordinate. 
 procedure IncludeInClipRect(var ClipRect: TClipRect; X, Y: Single);
 procedure IncludeInClipRect(var ClipRect: TClipRect; X, Y: Single);
-{ Projects an AABB and determines the extent of its projection as a clip rect. }
+// Projects an AABB and determines the extent of its projection as a clip rect. 
 function AABBToClipRect(const Aabb: TAABB; const ModelViewProjection: TMatrix;
 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: TVector;
   const Aabb: TAABB; out TNear, TFar: Single): Boolean; overload;
   const Aabb: TAABB; out TNear, TFar: Single): Boolean; overload;
 function RayCastAABBIntersect(const RayOrigin, RayDirection: TVector;
 function RayCastAABBIntersect(const RayOrigin, RayDirection: TVector;

+ 78 - 137
Source/GLGeometryCoordinates.pas

@@ -1,11 +1,13 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-{
+
+unit GLGeometryCoordinates;
+
+(*
   Helper functions to convert between different three dimensional coordinate
   Helper functions to convert between different three dimensional coordinate
   systems. Room for optimisations.
   systems. Room for optimisations.
-}
-unit GLGeometryCoordinates;
+*)
 
 
 interface
 interface
 
 
@@ -16,73 +18,73 @@ uses
 
 
   GLVectorGeometry;
   GLVectorGeometry;
 
 
-{ Convert cylindrical to cartesian [single]. theta in rad }
+// Convert cylindrical to cartesian [single]. theta in rad 
 procedure Cylindrical_Cartesian(const r, theta, z1: single; var x, y, z: single); overload;
 procedure Cylindrical_Cartesian(const r, theta, z1: single; var x, y, z: single); overload;
-{ Convert cylindrical to cartesian [double]. theta in rads }
+// Convert cylindrical to cartesian [double]. theta in rads 
 procedure Cylindrical_Cartesian(const r, theta, z1: double; var x, y, z: double); overload;
 procedure Cylindrical_Cartesian(const r, theta, z1: double; var x, y, z: double); overload;
-{ Convert cylindrical to cartesian [single] (with error check). theta in rad }
+// Convert cylindrical to cartesian [single] (with error check). theta in rad 
 procedure Cylindrical_Cartesian(const r, theta, z1: single; var x, y, z: single;
 procedure Cylindrical_Cartesian(const r, theta, z1: single; var x, y, z: single;
   var ierr: integer); overload;
   var ierr: integer); overload;
-{ Convert cylindrical to cartesian [double] (with error check). theta in rad }
+// Convert cylindrical to cartesian [double] (with error check). theta in rad 
 procedure Cylindrical_Cartesian(const r, theta, z1: double; var x, y, z: double;
 procedure Cylindrical_Cartesian(const r, theta, z1: double; var x, y, z: double;
   var ierr: integer); overload;
   var ierr: integer); overload;
 
 
-{ Convert cartesian to cylindrical [single] }
+// Convert cartesian to cylindrical [single] 
 procedure Cartesian_Cylindrical(const x, y, z1: single; var r, theta, z: single); overload;
 procedure Cartesian_Cylindrical(const x, y, z1: single; var r, theta, z: single); overload;
-{ Convert cartesion to cylindrical [double] }
+// Convert cartesion to cylindrical [double] 
 procedure Cartesian_Cylindrical(const x, y, z1: double; var r, theta, z: double); overload;
 procedure Cartesian_Cylindrical(const x, y, z1: double; var r, theta, z: double); overload;
 
 
-{ Convert spherical to cartesion. [single] theta,phi in rads }
+// Convert spherical to cartesion. [single] theta,phi in rads 
 procedure Spherical_Cartesian(const r, theta, phi: single; var x, y, z: single); overload;
 procedure Spherical_Cartesian(const r, theta, phi: single; var x, y, z: single); overload;
-{ Convert spherical to cartesion. [double] theta,phi in rads }
+// Convert spherical to cartesion. [double] theta,phi in rads 
 procedure Spherical_Cartesian(const r, theta, phi: double; var x, y, z: double); overload;
 procedure Spherical_Cartesian(const r, theta, phi: double; var x, y, z: double); overload;
-{ Convert spherical to cartesian [single] (with error check).theta,phi in rad }
+// Convert spherical to cartesian [single] (with error check).theta,phi in rad 
 procedure Spherical_Cartesian(const r, theta, phi: single; var x, y, z: single;
 procedure Spherical_Cartesian(const r, theta, phi: single; var x, y, z: single;
   var ierr: integer); overload;
   var ierr: integer); overload;
-{ Convert spherical to cartesian [double] (with error check).theta,phi in rad }
+// Convert spherical to cartesian [double] (with error check).theta,phi in rad 
 procedure Spherical_Cartesian(const r, theta, phi: double; var x, y, z: double;
 procedure Spherical_Cartesian(const r, theta, phi: double; var x, y, z: double;
   var ierr: integer); overload;
   var ierr: integer); overload;
 
 
-{ Convert cartesian to spherical [single] }
+// Convert cartesian to spherical [single] 
 procedure Cartesian_Spherical(const x, y, z: single; var r, theta, phi: single); overload;
 procedure Cartesian_Spherical(const x, y, z: single; var r, theta, phi: single); overload;
 procedure Cartesian_Spherical(const v: TAffineVector; var r, theta, phi: single); overload;
 procedure Cartesian_Spherical(const v: TAffineVector; var r, theta, phi: single); overload;
-{ Convert cartesion to spherical [double] }
+// Convert cartesion to spherical [double] 
 procedure Cartesian_Spherical(const x, y, z: double; var r, theta, phi: double); overload;
 procedure Cartesian_Spherical(const x, y, z: double; var r, theta, phi: double); overload;
 
 
-{ Convert Prolate-Spheroidal to Cartesian. [single] eta, phi in rad }
+// Convert Prolate-Spheroidal to Cartesian. [single] eta, phi in rad 
 procedure ProlateSpheroidal_Cartesian(const xi, eta, phi, a: single;
 procedure ProlateSpheroidal_Cartesian(const xi, eta, phi, a: single;
   var x, y, z: single); overload;
   var x, y, z: single); overload;
-{ Convert Prolate-Spheroidal to Cantesian. [double] eta,phi in rad }
+// Convert Prolate-Spheroidal to Cantesian. [double] eta,phi in rad 
 procedure ProlateSpheroidal_Cartesian(const xi, eta, phi, a: double;
 procedure ProlateSpheroidal_Cartesian(const xi, eta, phi, a: double;
   var x, y, z: double); overload;
   var x, y, z: double); overload;
-{ Convert Prolate-Spheroidal to Cartesian [single](with error check). eta,phi in rad }
+// Convert Prolate-Spheroidal to Cartesian [single](with error check). eta,phi in rad 
 procedure ProlateSpheroidal_Cartesian(const xi, eta, phi, a: single; 
 procedure ProlateSpheroidal_Cartesian(const xi, eta, phi, a: single; 
   var x, y, z: single; var ierr: integer); overload;
   var x, y, z: single; var ierr: integer); overload;
-{ Convert Prolate-Spheroidal to Cartesian [single](with error check). eta,phi in rad }
+// Convert Prolate-Spheroidal to Cartesian [single](with error check). eta,phi in rad 
 procedure ProlateSpheroidal_Cartesian(const xi, eta, phi, a: double; 
 procedure ProlateSpheroidal_Cartesian(const xi, eta, phi, a: double; 
   var x, y, z: double;  var ierr: integer); overload;
   var x, y, z: double;  var ierr: integer); overload;
-{ Convert Oblate-Spheroidal to Cartesian. [Single] eta, phi in rad }
+// Convert Oblate-Spheroidal to Cartesian. [Single] eta, phi in rad 
 procedure OblateSpheroidal_Cartesian(const xi, eta, phi, a: single;
 procedure OblateSpheroidal_Cartesian(const xi, eta, phi, a: single;
   var x, y, z: single); overload;
   var x, y, z: single); overload;
-{ Convert Oblate-Spheroidal to Cartesian. [Double] eta, phi in rad }
+// Convert Oblate-Spheroidal to Cartesian. [Double] eta, phi in rad 
 procedure OblateSpheroidal_Cartesian(const xi, eta, phi, a: double;
 procedure OblateSpheroidal_Cartesian(const xi, eta, phi, a: double;
   var x, y, z: double); overload;
   var x, y, z: double); overload;
-{ Convert Oblate-Spheroidal to Cartesian (with error check). eta,phi in rad }
+// Convert Oblate-Spheroidal to Cartesian (with error check). eta,phi in rad 
 procedure OblateSpheroidal_Cartesian(const xi, eta, phi, a: single;
 procedure OblateSpheroidal_Cartesian(const xi, eta, phi, a: single;
   var x, y, z: single; var ierr: integer); overload;
   var x, y, z: single; var ierr: integer); overload;
-{ Convert Oblate-Spheroidal to Cartesian (with error check).[Double] eta,phi in rad }
+// Convert Oblate-Spheroidal to Cartesian (with error check).[Double] eta,phi in rad 
 procedure OblateSpheroidal_Cartesian(const xi, eta, phi, a: double;
 procedure OblateSpheroidal_Cartesian(const xi, eta, phi, a: double;
   var x, y, z: double; var ierr: integer); overload;
   var x, y, z: double; var ierr: integer); overload;
-{ Convert Bipolar to Cartesian. u in rad }
+// Convert Bipolar to Cartesian. u in rad 
 procedure BipolarCylindrical_Cartesian(const u, v, z1, a: single;
 procedure BipolarCylindrical_Cartesian(const u, v, z1, a: single;
   var x, y, z: single); overload;
   var x, y, z: single); overload;
-{ Convert Bipolar to Cartesian. [Double] u in rad }
+// Convert Bipolar to Cartesian. [Double] u in rad 
 procedure BipolarCylindrical_Cartesian(const u, v, z1, a: double;
 procedure BipolarCylindrical_Cartesian(const u, v, z1, a: double;
   var x, y, z: double); overload;
   var x, y, z: double); overload;
-{ Convert Bipolar to Cartesian (with error check). u in rad }
+// Convert Bipolar to Cartesian (with error check). u in rad 
 procedure BipolarCylindrical_Cartesian(const u, v, z1, a: single;
 procedure BipolarCylindrical_Cartesian(const u, v, z1, a: single;
   var x, y, z: single; var ierr: integer); overload;
   var x, y, z: single; var ierr: integer); overload;
-{ Convert Bipolar to Cartesian (with error check). [Double] u in rad }
+// Convert Bipolar to Cartesian (with error check). [Double] u in rad 
 procedure BipolarCylindrical_Cartesian(const u, v, z1, a: double;
 procedure BipolarCylindrical_Cartesian(const u, v, z1, a: double;
   var x, y, z: double; var ierr: integer); overload;
   var x, y, z: double; var ierr: integer); overload;
 
 
@@ -91,8 +93,8 @@ implementation
 // --------------------------------------------------------------------------
 // --------------------------------------------------------------------------
 
 
 // ----- Cylindrical_Cartesian ---------------------------------------------
 // ----- Cylindrical_Cartesian ---------------------------------------------
-{ ** Convert Cylindrical to Cartesian with no checks.
-  Ref: http://mathworld.wolfram.com/CylindricalCoordinates.html }
+(* Convert Cylindrical to Cartesian with no checks.
+  Ref: http://mathworld.wolfram.com/CylindricalCoordinates.html *)
 procedure Cylindrical_Cartesian(const r, theta, z1: single; var x, y, z: single);
 procedure Cylindrical_Cartesian(const r, theta, z1: single; var x, y, z: single);
 
 
 begin
 begin
@@ -101,8 +103,8 @@ begin
 end;
 end;
 
 
 // ----- Cylindrical_Cartesian -------------------------------------------------
 // ----- Cylindrical_Cartesian -------------------------------------------------
-{ ** Convert Cylindrical to Cartesian with no checks. Double version
-  Ref: http://mathworld.wolfram.com/CylindricalCoordinates.html }
+(* Convert Cylindrical to Cartesian with no checks. Double version
+  Ref: http://mathworld.wolfram.com/CylindricalCoordinates.html *)
 procedure Cylindrical_Cartesian(const r, theta, z1: double; var x, y, z: double);
 procedure Cylindrical_Cartesian(const r, theta, z1: double; var x, y, z: double);
 
 
 begin
 begin
@@ -111,17 +113,17 @@ begin
 end;
 end;
 
 
 // ----- Cylindrical_Cartesian -------------------------------------------------
 // ----- Cylindrical_Cartesian -------------------------------------------------
-{ ** Convert Cylindrical to Cartesian with checks.
+(* Convert Cylindrical to Cartesian with checks.
   ierr: [0] = ok,
   ierr: [0] = ok,
   [1] = r out of bounds. Acceptable r: [0,inf)
   [1] = r out of bounds. Acceptable r: [0,inf)
   [2] = theta out of bounds. Acceptable theta: [0,2pi)
   [2] = theta out of bounds. Acceptable theta: [0,2pi)
   [3] = z1 out of bounds. Acceptable z1 : (-inf,inf)
   [3] = z1 out of bounds. Acceptable z1 : (-inf,inf)
-  Ref: http://mathworld.wolfram.com/CylindricalCoordinates.html }
+  Ref: http://mathworld.wolfram.com/CylindricalCoordinates.html *)
 procedure Cylindrical_Cartesian(const r, theta, z1: single; var x, y, z: single;
 procedure Cylindrical_Cartesian(const r, theta, z1: single; var x, y, z: single;
   var ierr: integer);
   var ierr: integer);
 
 
 begin
 begin
-  { ** check input parameters }
+  // check input parameters 
   if (r < 0.0) then
   if (r < 0.0) then
     ierr := 1
     ierr := 1
   else if ((theta < 0.0) or (theta >= 2 * pi)) then
   else if ((theta < 0.0) or (theta >= 2 * pi)) then
@@ -137,17 +139,17 @@ begin
 end;
 end;
 
 
 // ----- Cylindrical_Cartesian -------------------------------------------------
 // ----- Cylindrical_Cartesian -------------------------------------------------
-{ ** Convert Cylindrical to Cartesian with checks.
+(* Convert Cylindrical to Cartesian with checks.
   ierr: [0] = ok,
   ierr: [0] = ok,
   [1] = r out of bounds. Acceptable r: [0,inf)
   [1] = r out of bounds. Acceptable r: [0,inf)
   [2] = theta out of bounds. Acceptable theta: [0,2pi)
   [2] = theta out of bounds. Acceptable theta: [0,2pi)
   [3] = z1 out of bounds. Acceptable z1 : (-inf,inf)
   [3] = z1 out of bounds. Acceptable z1 : (-inf,inf)
-  Ref: http://mathworld.wolfram.com/CylindricalCoordinates.html }
+  Ref: http://mathworld.wolfram.com/CylindricalCoordinates.html *)
 procedure Cylindrical_Cartesian(const r, theta, z1: double; var x, y, z: double;
 procedure Cylindrical_Cartesian(const r, theta, z1: double; var x, y, z: double;
   var ierr: integer);
   var ierr: integer);
 
 
 begin
 begin
-  { ** check input parameters }
+  // check input parameters 
   if (r < 0.0) then
   if (r < 0.0) then
     ierr := 1
     ierr := 1
   else if ((theta < 0.0) or (theta >= 2 * pi)) then
   else if ((theta < 0.0) or (theta >= 2 * pi)) then
@@ -163,9 +165,8 @@ begin
 end;
 end;
 
 
 // ----- Cartesian_Cylindrical -------------------------------------------------
 // ----- Cartesian_Cylindrical -------------------------------------------------
-{ ** Convert Cartesian to Cylindrical no checks. Single }
+(* Convert Cartesian to Cylindrical no checks. Single *)
 procedure Cartesian_Cylindrical(const x, y, z1: single; var r, theta, z: single);
 procedure Cartesian_Cylindrical(const x, y, z1: single; var r, theta, z: single);
-
 begin
 begin
   r := sqrt(x * x + y * y);
   r := sqrt(x * x + y * y);
   theta := ArcTan2(y, x);
   theta := ArcTan2(y, x);
@@ -173,9 +174,8 @@ begin
 end;
 end;
 
 
 // ----- Cartesian_Cylindrical -------------------------------------------------
 // ----- Cartesian_Cylindrical -------------------------------------------------
-{ ** Convert Cartesian to Cylindrical no checks. Duoble }
+(* Convert Cartesian to Cylindrical no checks. Duoble *)
 procedure Cartesian_Cylindrical(const x, y, z1: double; var r, theta, z: double);
 procedure Cartesian_Cylindrical(const x, y, z1: double; var r, theta, z: double);
-
 begin
 begin
   r := sqrt(x * x + y * y);
   r := sqrt(x * x + y * y);
   theta := ArcTan2(y, x);
   theta := ArcTan2(y, x);
@@ -183,44 +183,38 @@ begin
 end;
 end;
 
 
 // ----- Spherical_Cartesian ---------------------------------------------------
 // ----- Spherical_Cartesian ---------------------------------------------------
-{ ** Convert Spherical to Cartesian with no checks.
-  Ref: http://mathworld.wolfram.com/SphericalCoordinates.html }
+(* Convert Spherical to Cartesian with no checks.
+  Ref: http://mathworld.wolfram.com/SphericalCoordinates.html *)
 procedure Spherical_Cartesian(const r, theta, phi: single; var x, y, z: single);
 procedure Spherical_Cartesian(const r, theta, phi: single; var x, y, z: single);
-
 var
 var
   a: single;
   a: single;
-
 begin
 begin
   SinCosine(phi, r, a, z); // z = r*cos(phi), a=r*sin(phi)
   SinCosine(phi, r, a, z); // z = r*cos(phi), a=r*sin(phi)
   SinCosine(theta, a, y, x); // x = a*cos(theta), y = a*sin(theta)}
   SinCosine(theta, a, y, x); // x = a*cos(theta), y = a*sin(theta)}
 end;
 end;
 
 
 // ----- Spherical_Cartesian ---------------------------------------------------
 // ----- Spherical_Cartesian ---------------------------------------------------
-{ ** Convert Spherical to Cartesian with no checks. Double version.
-  Ref: http://mathworld.wolfram.com/SphericalCoordinates.html }
+(* Convert Spherical to Cartesian with no checks. Double version.
+  Ref: http://mathworld.wolfram.com/SphericalCoordinates.html *)
 procedure Spherical_Cartesian(const r, theta, phi: double; var x, y, z: double);
 procedure Spherical_Cartesian(const r, theta, phi: double; var x, y, z: double);
-
 var
 var
   a: double;
   a: double;
-
 begin
 begin
   SinCosine(phi, r, a, z); // z = r*cos(phi), a=r*sin(phi)
   SinCosine(phi, r, a, z); // z = r*cos(phi), a=r*sin(phi)
   SinCosine(theta, a, y, x); // x = a*cos(theta), y = a*sin(theta)}
   SinCosine(theta, a, y, x); // x = a*cos(theta), y = a*sin(theta)}
 end;
 end;
 
 
 // ----- Spherical_Cartesian ---------------------------------------------------
 // ----- Spherical_Cartesian ---------------------------------------------------
-{ ** Convert Spherical to Cartesian with checks.
+(* Convert Spherical to Cartesian with checks.
   ierr: [0] = ok,
   ierr: [0] = ok,
   [1] = r out of bounds
   [1] = r out of bounds
   [2] = theta out of bounds
   [2] = theta out of bounds
   [3] = phi out of bounds
   [3] = phi out of bounds
-  Ref: http://mathworld.wolfram.com/SphericalCoordinates.html }
+  Ref: http://mathworld.wolfram.com/SphericalCoordinates.html *)
 procedure Spherical_Cartesian(const r, theta, phi: single; var x, y, z: single;
 procedure Spherical_Cartesian(const r, theta, phi: single; var x, y, z: single;
   var ierr: integer);
   var ierr: integer);
-
 var
 var
   a: single;
   a: single;
-
 begin
 begin
   if (r < 0.0) then
   if (r < 0.0) then
     ierr := 1
     ierr := 1
@@ -230,7 +224,6 @@ begin
     ierr := 3
     ierr := 3
   else
   else
     ierr := 0;
     ierr := 0;
-
   if (ierr = 0) then
   if (ierr = 0) then
   begin
   begin
     SinCosine(phi, r, a, z); // z = r*cos(phi), a=r*sin(phi)
     SinCosine(phi, r, a, z); // z = r*cos(phi), a=r*sin(phi)
@@ -239,18 +232,16 @@ begin
 end;
 end;
 
 
 // ----- Spherical_Cartesian ---------------------------------------------------
 // ----- Spherical_Cartesian ---------------------------------------------------
-{ ** Convert Spherical to Cartesian with checks.
+(* Convert Spherical to Cartesian with checks.
   ierr: [0] = ok,
   ierr: [0] = ok,
   [1] = r out of bounds
   [1] = r out of bounds
   [2] = theta out of bounds
   [2] = theta out of bounds
   [3] = phi out of bounds
   [3] = phi out of bounds
-  Ref: http://mathworld.wolfram.com/SphericalCoordinates.html }
+  Ref: http://mathworld.wolfram.com/SphericalCoordinates.html *)
 procedure Spherical_Cartesian(const r, theta, phi: double; var x, y, z: double;
 procedure Spherical_Cartesian(const r, theta, phi: double; var x, y, z: double;
   var ierr: integer);
   var ierr: integer);
-
 var
 var
   a: double;
   a: double;
-
 begin
 begin
   if (r < 0.0) then
   if (r < 0.0) then
     ierr := 1
     ierr := 1
@@ -269,12 +260,10 @@ begin
 end;
 end;
 
 
 // ----- Cartesian_Spherical ---------------------------------------------------
 // ----- Cartesian_Spherical ---------------------------------------------------
-{ ** convert Cartesian to Spherical, no checks, single
+(* convert Cartesian to Spherical, no checks, single
   Ref: http://mathworld.wolfram.com/SphericalCoordinates.html
   Ref: http://mathworld.wolfram.com/SphericalCoordinates.html
-  NB: Could be optimised by using jclmath.pas unit?
-}
+  NB: Could be optimised by using jclmath.pas unit? *)
 procedure Cartesian_Spherical(const x, y, z: single; var r, theta, phi: single);
 procedure Cartesian_Spherical(const x, y, z: single; var r, theta, phi: single);
-
 begin
 begin
   r := sqrt((x * x) + (y * y) + (z * z));
   r := sqrt((x * x) + (y * y) + (z * z));
   theta := ArcTan2(y, x);
   theta := ArcTan2(y, x);
@@ -289,12 +278,10 @@ begin
 end;
 end;
 
 
 // ----- Cartesian_Spherical ---------------------------------------------------
 // ----- Cartesian_Spherical ---------------------------------------------------
-{ ** convert Cartesian to Spherical, no checks, double
+(* convert Cartesian to Spherical, no checks, double
   Ref: http://mathworld.wolfram.com/SphericalCoordinates.html
   Ref: http://mathworld.wolfram.com/SphericalCoordinates.html
-  NB: Could be optimised by using jclmath.pas unit?
-}
+  NB: Could be optimised by using jclmath.pas unit? *)
 procedure Cartesian_Spherical(const x, y, z: double; var r, theta, phi: double);
 procedure Cartesian_Spherical(const x, y, z: double; var r, theta, phi: double);
-
 begin
 begin
   r := sqrt((x * x) + (y * y) + (z * z));
   r := sqrt((x * x) + (y * y) + (z * z));
   theta := ArcTan2(y, x);
   theta := ArcTan2(y, x);
@@ -302,7 +289,7 @@ begin
 end;
 end;
 
 
 // ----- ProlateSpheroidal_Cartesian -------------------------------------------
 // ----- ProlateSpheroidal_Cartesian -------------------------------------------
-{ ** Convert Prolate-Spheroidal to Cartesian with no checks.
+(* Convert Prolate-Spheroidal to Cartesian with no checks.
   A system of curvilinear coordinates in which two sets of coordinate surfaces are
   A system of curvilinear coordinates in which two sets of coordinate surfaces are
   obtained by revolving the curves of the elliptic cylindrical coordinates about
   obtained by revolving the curves of the elliptic cylindrical coordinates about
   the x-axis, which is relabeled the z-axis. The third set of coordinates
   the x-axis, which is relabeled the z-axis. The third set of coordinates
@@ -310,12 +297,10 @@ end;
   The coordinate system is parameterised by parameter a. A default value of a=1 is
   The coordinate system is parameterised by parameter a. A default value of a=1 is
   suggesed:
   suggesed:
   http://documents.wolfram.com/v4/AddOns/StandardPackages/Calculus/VectorAnalysis.html
   http://documents.wolfram.com/v4/AddOns/StandardPackages/Calculus/VectorAnalysis.html
-  Ref: http://mathworld.wolfram.com/ProlateSpheroidalCoordinates.html }
+  Ref: http://mathworld.wolfram.com/ProlateSpheroidalCoordinates.html *)
 procedure ProlateSpheroidal_Cartesian(const xi, eta, phi, a: single; var x, y, z: single);
 procedure ProlateSpheroidal_Cartesian(const xi, eta, phi, a: single; var x, y, z: single);
-
 var
 var
   sn, cs, snphi, csphi, shx, chx: single;
   sn, cs, snphi, csphi, shx, chx: single;
-
 begin
 begin
   SinCosine(eta, a, sn, cs);
   SinCosine(eta, a, sn, cs);
   SinCosine(phi, snphi, csphi);
   SinCosine(phi, snphi, csphi);
@@ -327,7 +312,7 @@ begin
 end;
 end;
 
 
 // ----- ProlateSpheroidal_Cartesian -------------------------------------------
 // ----- ProlateSpheroidal_Cartesian -------------------------------------------
-{ ** Convert Prolate-Spheroidal to Cartesian with no checks. Double version.
+(* Convert Prolate-Spheroidal to Cartesian with no checks. Double version.
   A system of curvilinear coordinates in which two sets of coordinate surfaces are
   A system of curvilinear coordinates in which two sets of coordinate surfaces are
   obtained by revolving the curves of the elliptic cylindrical coordinates about
   obtained by revolving the curves of the elliptic cylindrical coordinates about
   the x-axis, which is relabeled the z-axis. The third set of coordinates
   the x-axis, which is relabeled the z-axis. The third set of coordinates
@@ -335,12 +320,10 @@ end;
   The coordinate system is parameterised by parameter a. A default value of a=1 is
   The coordinate system is parameterised by parameter a. A default value of a=1 is
   suggesed:
   suggesed:
   http://documents.wolfram.com/v4/AddOns/StandardPackages/Calculus/VectorAnalysis.html
   http://documents.wolfram.com/v4/AddOns/StandardPackages/Calculus/VectorAnalysis.html
-  Ref: http://mathworld.wolfram.com/ProlateSpheroidalCoordinates.html }
+  Ref: http://mathworld.wolfram.com/ProlateSpheroidalCoordinates.html *)
 procedure ProlateSpheroidal_Cartesian(const xi, eta, phi, a: double; var x, y, z: double);
 procedure ProlateSpheroidal_Cartesian(const xi, eta, phi, a: double; var x, y, z: double);
-
 var
 var
   sn, cs, snphi, csphi, shx, chx: double;
   sn, cs, snphi, csphi, shx, chx: double;
-
 begin
 begin
   SinCosine(eta, a, sn, cs);
   SinCosine(eta, a, sn, cs);
   SinCosine(phi, snphi, csphi);
   SinCosine(phi, snphi, csphi);
@@ -352,18 +335,16 @@ begin
 end;
 end;
 
 
 // ----- ProlateSpheroidal_Cartesian -------------------------------------------
 // ----- ProlateSpheroidal_Cartesian -------------------------------------------
-{ ** Convert Prolate-Spheroidal to Cartesian with checks.
+(* Convert Prolate-Spheroidal to Cartesian with checks.
   ierr: [0] = ok,
   ierr: [0] = ok,
   [1] = xi out of bounds. Acceptable xi: [0,inf)
   [1] = xi out of bounds. Acceptable xi: [0,inf)
   [2] = eta out of bounds. Acceptable eta: [0,pi]
   [2] = eta out of bounds. Acceptable eta: [0,pi]
   [3] = phi out of bounds. Acceptable phi: [0,2pi)
   [3] = phi out of bounds. Acceptable phi: [0,2pi)
-  Ref: http://mathworld.wolfram.com/ProlateSpheroidalCoordinates.html }
+  Ref: http://mathworld.wolfram.com/ProlateSpheroidalCoordinates.html *)
 procedure ProlateSpheroidal_Cartesian(const xi, eta, phi, a: single;
 procedure ProlateSpheroidal_Cartesian(const xi, eta, phi, a: single;
   var x, y, z: single; var ierr: integer); overload;
   var x, y, z: single; var ierr: integer); overload;
-
 var
 var
   sn, cs, snphi, csphi, shx, chx: single;
   sn, cs, snphi, csphi, shx, chx: single;
-
 begin
 begin
   if (xi < 0.0) then
   if (xi < 0.0) then
     ierr := 1
     ierr := 1
@@ -373,15 +354,12 @@ begin
     ierr := 3
     ierr := 3
   else
   else
     ierr := 0;
     ierr := 0;
-
   if (ierr = 0) then
   if (ierr = 0) then
   begin
   begin
     SinCosine(eta, a, sn, cs);
     SinCosine(eta, a, sn, cs);
     SinCosine(phi, snphi, csphi);
     SinCosine(phi, snphi, csphi);
-
     shx := sinh(xi);
     shx := sinh(xi);
     chx := cosh(xi);
     chx := cosh(xi);
-
     x := sn * shx * csphi; // x = a*sin(eta)*sinh(xi)*cos(phi)
     x := sn * shx * csphi; // x = a*sin(eta)*sinh(xi)*cos(phi)
     y := sn * shx * snphi; // y = a*sin(eta)*sinh(xi)*sin(phi)
     y := sn * shx * snphi; // y = a*sin(eta)*sinh(xi)*sin(phi)
     z := cs * chx; // z = a*cos(eta)*cosh(xi)
     z := cs * chx; // z = a*cos(eta)*cosh(xi)
@@ -389,18 +367,16 @@ begin
 end;
 end;
 
 
 // ----- ProlateSpheroidal_Cartesian -------------------------------------------
 // ----- ProlateSpheroidal_Cartesian -------------------------------------------
-{ ** Convert Prolate-Spheroidal to Cartesian with checks. Double Version.
+(* Convert Prolate-Spheroidal to Cartesian with checks. Double Version.
   ierr: [0] = ok,
   ierr: [0] = ok,
   [1] = xi out of bounds. Acceptable xi: [0,inf)
   [1] = xi out of bounds. Acceptable xi: [0,inf)
   [2] = eta out of bounds. Acceptable eta: [0,pi]
   [2] = eta out of bounds. Acceptable eta: [0,pi]
   [3] = phi out of bounds. Acceptable phi: [0,2pi)
   [3] = phi out of bounds. Acceptable phi: [0,2pi)
-  Ref: http://mathworld.wolfram.com/ProlateSpheroidalCoordinates.html }
+  Ref: http://mathworld.wolfram.com/ProlateSpheroidalCoordinates.html *)
 procedure ProlateSpheroidal_Cartesian(const xi, eta, phi, a: double;
 procedure ProlateSpheroidal_Cartesian(const xi, eta, phi, a: double;
   var x, y, z: double; var ierr: integer); overload;
   var x, y, z: double; var ierr: integer); overload;
-
 var
 var
   sn, cs, snphi, csphi, shx, chx: double;
   sn, cs, snphi, csphi, shx, chx: double;
-
 begin
 begin
   if (xi < 0.0) then
   if (xi < 0.0) then
     ierr := 1
     ierr := 1
@@ -410,15 +386,12 @@ begin
     ierr := 3
     ierr := 3
   else
   else
     ierr := 0;
     ierr := 0;
-
   if (ierr = 0) then
   if (ierr = 0) then
   begin
   begin
     SinCosine(eta, a, sn, cs);
     SinCosine(eta, a, sn, cs);
     SinCosine(phi, snphi, csphi);
     SinCosine(phi, snphi, csphi);
-
     shx := sinh(xi);
     shx := sinh(xi);
     chx := cosh(xi);
     chx := cosh(xi);
-
     x := sn * shx * csphi; // x = a*sin(eta)*sinh(xi)*cos(phi)
     x := sn * shx * csphi; // x = a*sin(eta)*sinh(xi)*cos(phi)
     y := sn * shx * snphi; // y = a*sin(eta)*sinh(xi)*sin(phi)
     y := sn * shx * snphi; // y = a*sin(eta)*sinh(xi)*sin(phi)
     z := cs * chx; // z = a*cos(eta)*cosh(xi)
     z := cs * chx; // z = a*cos(eta)*cosh(xi)
@@ -426,7 +399,7 @@ begin
 end;
 end;
 
 
 // ----- OblateSpheroidal_Cartesian -------------------------------------------
 // ----- OblateSpheroidal_Cartesian -------------------------------------------
-{ ** Convert Oblate-Spheroidal to Cartesian with no checks.
+(* Convert Oblate-Spheroidal to Cartesian with no checks.
   A system of curvilinear coordinates in which two sets of coordinate surfaces are
   A system of curvilinear coordinates in which two sets of coordinate surfaces are
   obtained by revolving the curves of the elliptic cylindrical coordinates about
   obtained by revolving the curves of the elliptic cylindrical coordinates about
   the y-axis which is relabeled the z-axis. The third set of coordinates consists
   the y-axis which is relabeled the z-axis. The third set of coordinates consists
@@ -434,26 +407,22 @@ end;
   The coordinate system is parameterised by parameter a. A default value of a=1 is
   The coordinate system is parameterised by parameter a. A default value of a=1 is
   suggesed:
   suggesed:
   http://documents.wolfram.com/v4/AddOns/StandardPackages/Calculus/VectorAnalysis.html
   http://documents.wolfram.com/v4/AddOns/StandardPackages/Calculus/VectorAnalysis.html
-  Ref: http://mathworld.wolfram.com/OblateSpheroidalCoordinates.html }
+  Ref: http://mathworld.wolfram.com/OblateSpheroidalCoordinates.html *)
 procedure OblateSpheroidal_Cartesian(const xi, eta, phi, a: single; var x, y, z: single);
 procedure OblateSpheroidal_Cartesian(const xi, eta, phi, a: single; var x, y, z: single);
-
 var
 var
   sn, cs, snphi, csphi, shx, chx: single;
   sn, cs, snphi, csphi, shx, chx: single;
-
 begin
 begin
   SinCosine(eta, a, sn, cs);
   SinCosine(eta, a, sn, cs);
   SinCosine(phi, snphi, csphi);
   SinCosine(phi, snphi, csphi);
-
   shx := sinh(xi);
   shx := sinh(xi);
   chx := cosh(xi);
   chx := cosh(xi);
-
   x := cs * chx * csphi; // x = a*cos(eta)*cosh(xi)*cos(phi)
   x := cs * chx * csphi; // x = a*cos(eta)*cosh(xi)*cos(phi)
   y := cs * chx * snphi; // y = a*cos(eta)*cosh(xi)*sin(phi)
   y := cs * chx * snphi; // y = a*cos(eta)*cosh(xi)*sin(phi)
   z := sn * shx; // z = a*sin(eta)*sinh(xi)
   z := sn * shx; // z = a*sin(eta)*sinh(xi)
 end;
 end;
 
 
 // ----- OblateSpheroidal_Cartesian -------------------------------------------
 // ----- OblateSpheroidal_Cartesian -------------------------------------------
-{ ** Convert Oblate-Spheroidal to Cartesian with no checks. Double Version.
+(* Convert Oblate-Spheroidal to Cartesian with no checks. Double Version.
   A system of curvilinear coordinates in which two sets of coordinate surfaces are
   A system of curvilinear coordinates in which two sets of coordinate surfaces are
   obtained by revolving the curves of the elliptic cylindrical coordinates about
   obtained by revolving the curves of the elliptic cylindrical coordinates about
   the y-axis which is relabeled the z-axis. The third set of coordinates consists
   the y-axis which is relabeled the z-axis. The third set of coordinates consists
@@ -461,37 +430,31 @@ end;
   The coordinate system is parameterised by parameter a. A default value of a=1 is
   The coordinate system is parameterised by parameter a. A default value of a=1 is
   suggesed:
   suggesed:
   http://documents.wolfram.com/v4/AddOns/StandardPackages/Calculus/VectorAnalysis.html
   http://documents.wolfram.com/v4/AddOns/StandardPackages/Calculus/VectorAnalysis.html
-  Ref: http://mathworld.wolfram.com/OblateSpheroidalCoordinates.html }
+  Ref: http://mathworld.wolfram.com/OblateSpheroidalCoordinates.html *)
 procedure OblateSpheroidal_Cartesian(const xi, eta, phi, a: double; var x, y, z: double);
 procedure OblateSpheroidal_Cartesian(const xi, eta, phi, a: double; var x, y, z: double);
-
 var
 var
   sn, cs, snphi, csphi, shx, chx: double;
   sn, cs, snphi, csphi, shx, chx: double;
-
 begin
 begin
   SinCosine(eta, a, sn, cs);
   SinCosine(eta, a, sn, cs);
   SinCosine(phi, snphi, csphi);
   SinCosine(phi, snphi, csphi);
-
   shx := sinh(xi);
   shx := sinh(xi);
   chx := cosh(xi);
   chx := cosh(xi);
-
   x := cs * chx * csphi; // x = a*cos(eta)*cosh(xi)*cos(phi)
   x := cs * chx * csphi; // x = a*cos(eta)*cosh(xi)*cos(phi)
   y := cs * chx * snphi; // y = a*cos(eta)*cosh(xi)*sin(phi)
   y := cs * chx * snphi; // y = a*cos(eta)*cosh(xi)*sin(phi)
   z := sn * shx; // z = a*sin(eta)*sinh(xi)
   z := sn * shx; // z = a*sin(eta)*sinh(xi)
 end;
 end;
 
 
 // ----- OblateSpheroidal_Cartesian -------------------------------------------
 // ----- OblateSpheroidal_Cartesian -------------------------------------------
-{ ** Convert Oblate-Spheroidal to Cartesian with checks.
+(* Convert Oblate-Spheroidal to Cartesian with checks.
   ierr: [0] = ok,
   ierr: [0] = ok,
   [1] = xi out of bounds. Acceptable xi: [0,inf)
   [1] = xi out of bounds. Acceptable xi: [0,inf)
   [2] = eta out of bounds. Acceptable eta: [-0.5*pi,0.5*pi]
   [2] = eta out of bounds. Acceptable eta: [-0.5*pi,0.5*pi]
   [3] = phi out of bounds. Acceptable phi: [0,2*pi)
   [3] = phi out of bounds. Acceptable phi: [0,2*pi)
-  Ref: http://mathworld.wolfram.com/ProlateSpheroidalCoordinates.html }
+  Ref: http://mathworld.wolfram.com/ProlateSpheroidalCoordinates.html *)
 procedure OblateSpheroidal_Cartesian(const xi, eta, phi, a: single;
 procedure OblateSpheroidal_Cartesian(const xi, eta, phi, a: single;
   var x, y, z: single; var ierr: integer); overload;
   var x, y, z: single; var ierr: integer); overload;
-
 var
 var
   sn, cs, snphi, csphi, shx, chx: single;
   sn, cs, snphi, csphi, shx, chx: single;
-
 begin
 begin
   if (xi < 0.0) then
   if (xi < 0.0) then
     ierr := 1
     ierr := 1
@@ -501,15 +464,12 @@ begin
     ierr := 3
     ierr := 3
   else
   else
     ierr := 0;
     ierr := 0;
-
   if (ierr = 0) then
   if (ierr = 0) then
   begin
   begin
     SinCosine(eta, a, sn, cs);
     SinCosine(eta, a, sn, cs);
     SinCosine(phi, snphi, csphi);
     SinCosine(phi, snphi, csphi);
-
     shx := sinh(xi);
     shx := sinh(xi);
     chx := cosh(xi);
     chx := cosh(xi);
-
     x := cs * chx * csphi; // x = a*cos(eta)*cosh(xi)*cos(phi)
     x := cs * chx * csphi; // x = a*cos(eta)*cosh(xi)*cos(phi)
     y := cs * chx * snphi; // y = a*cos(eta)*cosh(xi)*sin(phi)
     y := cs * chx * snphi; // y = a*cos(eta)*cosh(xi)*sin(phi)
     z := sn * shx; // z = a*sin(eta)*sinh(xi)
     z := sn * shx; // z = a*sin(eta)*sinh(xi)
@@ -517,18 +477,16 @@ begin
 end;
 end;
 
 
 // ----- OblateSpheroidal_Cartesian -------------------------------------------
 // ----- OblateSpheroidal_Cartesian -------------------------------------------
-{ ** Convert Oblate-Spheroidal to Cartesian with checks. Double Version.
+(* Convert Oblate-Spheroidal to Cartesian with checks. Double Version.
   ierr: [0] = ok,
   ierr: [0] = ok,
   [1] = xi out of bounds. Acceptable xi: [0,inf)
   [1] = xi out of bounds. Acceptable xi: [0,inf)
   [2] = eta out of bounds. Acceptable eta: [-0.5*pi,0.5*pi]
   [2] = eta out of bounds. Acceptable eta: [-0.5*pi,0.5*pi]
   [3] = phi out of bounds. Acceptable phi: [0,2*pi)
   [3] = phi out of bounds. Acceptable phi: [0,2*pi)
-  Ref: http://mathworld.wolfram.com/ProlateSpheroidalCoordinates.html }
+  Ref: http://mathworld.wolfram.com/ProlateSpheroidalCoordinates.html *)
 procedure OblateSpheroidal_Cartesian(const xi, eta, phi, a: double;
 procedure OblateSpheroidal_Cartesian(const xi, eta, phi, a: double;
   var x, y, z: double; var ierr: integer); overload;
   var x, y, z: double; var ierr: integer); overload;
-
 var
 var
   sn, cs, snphi, csphi, shx, chx: double;
   sn, cs, snphi, csphi, shx, chx: double;
-
 begin
 begin
   if (xi < 0.0) then
   if (xi < 0.0) then
     ierr := 1
     ierr := 1
@@ -538,15 +496,12 @@ begin
     ierr := 3
     ierr := 3
   else
   else
     ierr := 0;
     ierr := 0;
-
   if (ierr = 0) then
   if (ierr = 0) then
   begin
   begin
     SinCosine(eta, a, sn, cs);
     SinCosine(eta, a, sn, cs);
     SinCosine(phi, snphi, csphi);
     SinCosine(phi, snphi, csphi);
-
     shx := sinh(xi);
     shx := sinh(xi);
     chx := cosh(xi);
     chx := cosh(xi);
-
     x := cs * chx * csphi; // x = a*cos(eta)*cosh(xi)*cos(phi)
     x := cs * chx * csphi; // x = a*cos(eta)*cosh(xi)*cos(phi)
     y := cs * chx * snphi; // y = a*cos(eta)*cosh(xi)*sin(phi)
     y := cs * chx * snphi; // y = a*cos(eta)*cosh(xi)*sin(phi)
     z := sn * shx; // z = a*sin(eta)*sinh(xi)
     z := sn * shx; // z = a*sin(eta)*sinh(xi)
@@ -554,67 +509,56 @@ begin
 end;
 end;
 
 
 // ----- BipolarCylindrical_Cartesian ------------------------------------------
 // ----- BipolarCylindrical_Cartesian ------------------------------------------
-{ ** Convert BiPolarCylindrical to Cartesian with no checks.
-  http://mathworld.wolfram.com/BipolarCylindricalCoordinates.html }
+(* Convert BiPolarCylindrical to Cartesian with no checks.
+  http://mathworld.wolfram.com/BipolarCylindricalCoordinates.html *)
 procedure BipolarCylindrical_Cartesian(const u, v, z1, a: single; var x, y, z: single);
 procedure BipolarCylindrical_Cartesian(const u, v, z1, a: single; var x, y, z: single);
-
 var
 var
   cs, sn, shx, chx: single;
   cs, sn, shx, chx: single;
-
 begin
 begin
   SinCosine(u, sn, cs);
   SinCosine(u, sn, cs);
   shx := sinh(v);
   shx := sinh(v);
   chx := cosh(v);
   chx := cosh(v);
-
   x := a * shx / (chx - cs);
   x := a * shx / (chx - cs);
   y := a * sn / (chx - cs);
   y := a * sn / (chx - cs);
   z := z1;
   z := z1;
 end;
 end;
 
 
 // ----- BipolarCylindrical_Cartesian ------------------------------------------
 // ----- BipolarCylindrical_Cartesian ------------------------------------------
-{ ** Convert BiPolarCylindrical to Cartesian with no checks. Double Version
-  http://mathworld.wolfram.com/BipolarCylindricalCoordinates.html }
+(* Convert BiPolarCylindrical to Cartesian with no checks. Double Version
+  http://mathworld.wolfram.com/BipolarCylindricalCoordinates.html *)
 procedure BipolarCylindrical_Cartesian(const u, v, z1, a: double; var x, y, z: double);
 procedure BipolarCylindrical_Cartesian(const u, v, z1, a: double; var x, y, z: double);
-
 var
 var
   cs, sn, shx, chx: double;
   cs, sn, shx, chx: double;
-
 begin
 begin
   SinCosine(u, sn, cs);
   SinCosine(u, sn, cs);
   shx := sinh(v);
   shx := sinh(v);
   chx := cosh(v);
   chx := cosh(v);
-
   x := a * shx / (chx - cs);
   x := a * shx / (chx - cs);
   y := a * sn / (chx - cs);
   y := a * sn / (chx - cs);
   z := z1;
   z := z1;
 end;
 end;
 
 
 // ----- BipolarCylindrical_Cartesian ------------------------------------------
 // ----- BipolarCylindrical_Cartesian ------------------------------------------
-{ ** Convert Oblate-Spheroidal to Cartesian with checks.
+(* Convert Oblate-Spheroidal to Cartesian with checks.
   ierr: [0] = ok,
   ierr: [0] = ok,
   [1] = u out of bounds. Acceptable u: [0,2*pi)
   [1] = u out of bounds. Acceptable u: [0,2*pi)
   [2] = v out of bounds. Acceptable v: (-inf,inf)
   [2] = v out of bounds. Acceptable v: (-inf,inf)
   [3] = z1 out of bounds. Acceptable z1: (-inf,inf)
   [3] = z1 out of bounds. Acceptable z1: (-inf,inf)
-  Ref: http://mathworld.wolfram.com/BiPolarCylindricalCoordinates.html }
+  Ref: http://mathworld.wolfram.com/BiPolarCylindricalCoordinates.html *)
 procedure BipolarCylindrical_Cartesian(const u, v, z1, a: single;
 procedure BipolarCylindrical_Cartesian(const u, v, z1, a: single;
   var x, y, z: single; var ierr: integer); overload;
   var x, y, z: single; var ierr: integer); overload;
-
 var
 var
   cs, sn, shx, chx: single;
   cs, sn, shx, chx: single;
-
 begin
 begin
   if ((u < 0.0) or (u >= 2 * pi)) then
   if ((u < 0.0) or (u >= 2 * pi)) then
     ierr := 1
     ierr := 1
   else
   else
     ierr := 0;
     ierr := 0;
-
   if (ierr = 0) then
   if (ierr = 0) then
   begin
   begin
     SinCosine(u, sn, cs);
     SinCosine(u, sn, cs);
-
     shx := sinh(v);
     shx := sinh(v);
     chx := cosh(v);
     chx := cosh(v);
-
     x := a * shx / (chx - cs);
     x := a * shx / (chx - cs);
     y := a * sn / (chx - cs);
     y := a * sn / (chx - cs);
     z := z1;
     z := z1;
@@ -622,30 +566,26 @@ begin
 end;
 end;
 
 
 // ----- BipolarCylindrical_Cartesian ------------------------------------------
 // ----- BipolarCylindrical_Cartesian ------------------------------------------
-{ ** Convert Oblate-Spheroidal to Cartesian with checks. Double Version
+(* Convert Oblate-Spheroidal to Cartesian with checks. Double Version
   ierr: [0] = ok,
   ierr: [0] = ok,
   [1] = u out of bounds. Acceptable u: [0,2*pi)
   [1] = u out of bounds. Acceptable u: [0,2*pi)
   [2] = v out of bounds. Acceptable v: (-inf,inf)
   [2] = v out of bounds. Acceptable v: (-inf,inf)
   [3] = z1 out of bounds. Acceptable z1: (-inf,inf)
   [3] = z1 out of bounds. Acceptable z1: (-inf,inf)
-  Ref: http://mathworld.wolfram.com/BiPolarCylindricalCoordinates.html }
+  Ref: http://mathworld.wolfram.com/BiPolarCylindricalCoordinates.html *)
 procedure BipolarCylindrical_Cartesian(const u, v, z1, a: double;
 procedure BipolarCylindrical_Cartesian(const u, v, z1, a: double;
   var x, y, z: double; var ierr: integer); overload;
   var x, y, z: double; var ierr: integer); overload;
-
 var
 var
   cs, sn, shx, chx: double;
   cs, sn, shx, chx: double;
-
 begin
 begin
   if ((u < 0.0) or (u >= 2 * pi)) then
   if ((u < 0.0) or (u >= 2 * pi)) then
     ierr := 1
     ierr := 1
   else
   else
     ierr := 0;
     ierr := 0;
-
   if (ierr = 0) then
   if (ierr = 0) then
   begin
   begin
     SinCosine(u, sn, cs);
     SinCosine(u, sn, cs);
     shx := sinh(v);
     shx := sinh(v);
     chx := cosh(v);
     chx := cosh(v);
-
     x := a * shx / (chx - cs);
     x := a * shx / (chx - cs);
     y := a * sn / (chx - cs);
     y := a * sn / (chx - cs);
     z := z1;
     z := z1;
@@ -653,4 +593,5 @@ begin
 end;
 end;
 
 
 // =============================================================================
 // =============================================================================
+
 end.
 end.

+ 5 - 4
Source/GLGizmo.pas

@@ -1,10 +1,13 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-{
+
+unit GLGizmo;
+
+(*
   Invisible component for helping to Move, Rotate and Scale an Object
   Invisible component for helping to Move, Rotate and Scale an Object
   under GLScene (usefull for an Editor). 
   under GLScene (usefull for an Editor). 
-}
+*)
 //
 //
 // Original Header:
 // Original Header:
 //
 //
@@ -48,8 +51,6 @@
 // use objects' BarryCenter. For Example, if you select Space Text.
 // use objects' BarryCenter. For Example, if you select Space Text.
 // ------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------
 
 
-unit GLGizmo;
-
 interface
 interface
 
 
 {$I GLScene.inc}
 {$I GLScene.inc}

+ 5 - 3
Source/GLGizmoEx.pas

@@ -1,12 +1,14 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-{
+
+unit GLGizmoEx;
+
+(*
    Invisible component for helping to Move, Rotate and Scale an Object
    Invisible component for helping to Move, Rotate and Scale an Object
    under GLScene (usefull for an Editor).
    under GLScene (usefull for an Editor).
    This is an enhanced version of TGLGizmo
    This is an enhanced version of TGLGizmo
-}
-unit GLGizmoEx;
+*)
 
 
 interface
 interface
 
 

+ 3 - 3
Source/GLGraph.pas

@@ -1,11 +1,11 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-{  
-  Graph plotting objects for GLScene 
-}
+
 unit GLGraph;
 unit GLGraph;
 
 
+(* Graph plotting objects for GLScene *)
+
 interface
 interface
 
 
 {$I GLScene.inc}
 {$I GLScene.inc}

+ 4 - 4
Source/GLHeightTileFileHDS.pas

@@ -1,11 +1,11 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-{
-   HeightDataSource for the HTF (HeightTileFile) format. 
-}
+
 unit GLHeightTileFileHDS;
 unit GLHeightTileFileHDS;
 
 
+(* HeightDataSource for the HTF (HeightTileFile) format *)
+
 interface
 interface
 
 
 {$I GLScene.inc}
 {$I GLScene.inc}
@@ -19,7 +19,7 @@ uses
 
 
 type
 type
 
 
-   {An Height Data Source for the HTF format.  }
+   // An Height Data Source for the HTF format.  
 	TGLHeightTileFileHDS = class (TGLHeightDataSource)
 	TGLHeightTileFileHDS = class (TGLHeightDataSource)
 	   private
 	   private
          FInfiniteWrap : Boolean;
          FInfiniteWrap : Boolean;

+ 5 - 4
Source/GLHiddenLineShader.pas

@@ -1,13 +1,14 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
-{
+
+unit GLHiddenLineShader;
+
+(*
    A shader that renders hidden (back-faced) lines differently from visible
    A shader that renders hidden (back-faced) lines differently from visible
    (front) lines. Polygon offset is used to displace fragments depths a little
    (front) lines. Polygon offset is used to displace fragments depths a little
    so that there is no z-fighting in rendering the same geometry multiple times. 
    so that there is no z-fighting in rendering the same geometry multiple times. 
-
-}
-unit GLHiddenLineShader;
+*)
 
 
 interface
 interface
 
 

+ 3 - 1
Source/GLJoints.pas

@@ -1,11 +1,13 @@
 //
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 //
+
+unit GLJoints;
+
 (*
 (*
   This unit isn't used at all at the moment, just putting down some ideas
   This unit isn't used at all at the moment, just putting down some ideas
   for serial-link manipulators
   for serial-link manipulators
 *)
 *)
-unit GLJoints;
 
 
 interface
 interface
 
 

Some files were not shown because too many files changed in this diff