@@ -2,33 +2,28 @@ object FormFPSMovement: TFormFPSMovement
Left = 209
Top = 112
Caption = 'FPSMovement'
- ClientHeight = 479
- ClientWidth = 735
+ ClientHeight = 383
+ ClientWidth = 588
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
- Font.Height = -14
+ Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
KeyPreview = True
Position = poScreenCenter
OnCreate = FormCreate
OnKeyDown = FormKeyDown
- PixelsPerInch = 120
- TextHeight = 16
+ TextHeight = 13
object GLSceneViewer1: TGLSceneViewer
Left = 0
Top = 0
- Width = 735
- Height = 479
- Margins.Left = 4
- Margins.Top = 4
- Margins.Right = 4
- Margins.Bottom = 4
+ Width = 588
+ Height = 383
Camera = ThirdPersonCamera
Buffer.BackgroundColor = clBlack
Buffer.ShadeModel = smSmooth
- FieldOfView = 156.415664672851600000
+ FieldOfView = 150.733886718750000000
PenAsTouch = False
Align = alClient
TabOrder = 0
@@ -38,6 +33,11 @@ object FormFPSMovement: TFormFPSMovement
Top = 24
object World: TGLDummyCube
CubeSize = 1.000000000000000000
+ object GLLight: TGLLightSource
+ ConstAttenuation = 1.000000000000000000
+ Diffuse.Color = {3333733F3333733F3333733F0000803F}
+ SpotCutOff = 180.000000000000000000
+ end
object Player: TGLDummyCube
Position.Coordinates = {0000803FCDCC8C3F0000803F0000803F}
@@ -83,11 +83,6 @@ object FormFPSMovement: TFormFPSMovement
Radius = 0.400000005960464500
end
- object GLLight: TGLLightSource
- ConstAttenuation = 1.000000000000000000
- Diffuse.Color = {3333733F3333733F3333733F0000803F}
- SpotCutOff = 180.000000000000000000
- end
object Map1: TGLFreeForm
VisibilityCulling = vcNone
Direction.Coordinates = {F7FF7FA7FFFF7FBFE1CD0C3400000000}
@@ -122,7 +122,7 @@ begin
if Key = VK_F3 then
GLSceneViewer1.Camera := ThirdPersonCamera;
// solid / wireframe
- if iskeydown(VK_F5) then
+ if IsKeyDown(VK_F5) then
begin
WireFrame := not WireFrame;
if WireFrame then
@@ -1,7 +1,7 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{A4E3012C-F239-4F92-95E0-9E18A667A067}</ProjectGuid>
- <ProjectVersion>19.3</ProjectVersion>
+ <ProjectVersion>19.4</ProjectVersion>
<FrameworkType>VCL</FrameworkType>
<AppType>Application</AppType>
<MainSource>CGBombShaderC.cpp</MainSource>
@@ -121,7 +121,7 @@
<BT_BuildType>Debug</BT_BuildType>
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<VerInfo_Locale>1033</VerInfo_Locale>
- <ILINK_LibraryPath>$(BDSCOMMONDIR)\Dcp;$(ILINK_LibraryPath)</ILINK_LibraryPath>
+ <ILINK_LibraryPath>$(BDSCOMMONDIR)\Dcp;$(BDSLIB)\$(PLATFORM)$(CC_SUFFIX)\debug;$(ILINK_LibraryPath)</ILINK_LibraryPath>
<Defines>_DEBUG;$(Defines)</Defines>
<LinkPackageImports>rtl.bpi;vcl.bpi;fmx.bpi;xmlrtl.bpi;vclimg.bpi;GLScene_RT.bpi;GLScene_Cg_RT.bpi</LinkPackageImports>
</PropertyGroup>
@@ -217,164 +217,163 @@
</Excluded_Packages>
</CPlusPlusBuilder.Personality>
<Deployment Version="3">
- <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'!='true'" LocalName="$(BDS)\bin\cc32160.dll" Class="DependencyModule">
- <Platform Name="Win32">
+ <DeployFile Condition="'$(UsingDelphiRTL)'=='true'" LocalName="$(BDS)\bin64\borlndmm.dll" Class="DependencyModule">
+ <Platform Name="Win64">
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
- <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'=='true'" LocalName="$(BDS)\bin64\cc64230mt.dll" Class="DependencyModule">
+ <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'!='true'" LocalName="$(BDS)\bin64\cc64160.dll" Class="DependencyModule">
<Platform Name="Win64">
- <DeployFile Condition="'$(DynamicRTL)'=='true'" LocalName="$(BDS)\Redist\osx32\libcgcrtl.dylib" Class="DependencyModule">
- <Platform Name="OSX32">
+ <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'=='true'" LocalName="$(BDS)\bin64\cc64160mt.dll" Class="DependencyModule">
- <DeployFile Condition="'$(UsingDelphiRTL)'=='true'" LocalName="$(BDS)\bin\borlndmm.dll" Class="DependencyModule">
+ <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'!='true'" LocalName="$(BDS)\bin64\cc64230.dll" Class="DependencyModule">
- <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'=='true'" LocalName="$(BDS)\bin\cc32c280mt.dll" Class="DependencyModule">
+ <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'=='true'" LocalName="$(BDS)\bin64\cc64230mt.dll" Class="DependencyModule">
- <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'!='true'" LocalName="$(BDS)\bin\cc32c260.dll" Class="DependencyModule">
+ <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'!='true'" LocalName="$(BDS)\bin64\cc64240.dll" Class="DependencyModule">
- <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'!='true'" LocalName="$(BDS)\bin\cc32c240.dll" Class="DependencyModule">
+ <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'=='true'" LocalName="$(BDS)\bin64\cc64240mt.dll" Class="DependencyModule">
- <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'!='true'" LocalName="$(BDS)\bin64\cc64230.dll" Class="DependencyModule">
+ <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'!='true'" LocalName="$(BDS)\bin64\cc64260.dll" Class="DependencyModule">
- <DeployFile Condition="'$(UsingDelphiRTL)'=='true'" LocalName="$(BDS)\bin64\borlndmm.dll" Class="DependencyModule">
+ <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'=='true'" LocalName="$(BDS)\bin64\cc64260mt.dll" Class="DependencyModule">
- <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'!='true'" LocalName="$(BDS)\bin\cc32c280.dll" Class="DependencyModule">
+ <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'!='true'" LocalName="$(BDS)\bin64\cc64280.dll" Class="DependencyModule">
- <DeployFile Condition="'$(DynamicRTL)'=='true'" LocalName="$(BDS)\Redist\osx32\libcgstl.dylib" Class="DependencyModule">
+ <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'=='true'" LocalName="$(BDS)\bin64\cc64280mt.dll" Class="DependencyModule">
- <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'!='true'" LocalName="$(BDS)\bin\cc32230.dll" Class="DependencyModule">
+ <DeployFile Condition="'$(UsingDelphiRTL)'=='true'" LocalName="$(BDS)\bin\borlndmm.dll" Class="DependencyModule">
<Platform Name="Win32">
- <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'=='true'" LocalName="$(BDS)\bin\cc32160mt.dll" Class="DependencyModule">
+ <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'!='true'" LocalName="$(BDS)\bin\cc32160.dll" Class="DependencyModule">
- <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'=='true'" LocalName="$(BDS)\bin\cc32230mt.dll" Class="DependencyModule">
+ <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'=='true'" LocalName="$(BDS)\bin\cc32160mt.dll" Class="DependencyModule">
- <DeployFile Condition="'$(DynamicRTL)'=='true'" LocalName="$(BDS)\Redist\osx64\libcgcrtl.dylib" Class="DependencyModule">
- <Platform Name="OSX64">
+ <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'!='true'" LocalName="$(BDS)\bin\cc32230.dll" Class="DependencyModule">
+ <Platform Name="Win32">
- <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'=='true'" LocalName="$(BDS)\bin\cc32280mt.dll" Class="DependencyModule">
+ <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'=='true'" LocalName="$(BDS)\bin\cc32230mt.dll" Class="DependencyModule">
- <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'!='true'" LocalName="$(BDS)\bin64\cc64280.dll" Class="DependencyModule">
- <Platform Name="Win64">
+ <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'!='true'" LocalName="$(BDS)\bin\cc32240.dll" Class="DependencyModule">
- <DeployFile Condition="'$(DynamicRTL)'=='true'" LocalName="$(BDS)\Redist\osx64\libcgstl.dylib" Class="DependencyModule">
+ <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'=='true'" LocalName="$(BDS)\bin\cc32240mt.dll" Class="DependencyModule">
- <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'=='true'" LocalName="$(BDS)\bin\cc32c260mt.dll" Class="DependencyModule">
+ <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'!='true'" LocalName="$(BDS)\bin\cc32260.dll" Class="DependencyModule">
- <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'=='true'" LocalName="$(BDS)\bin\cc32240mt.dll" Class="DependencyModule">
+ <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'=='true'" LocalName="$(BDS)\bin\cc32260mt.dll" Class="DependencyModule">
- <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'!='true'" LocalName="$(BDS)\bin64\cc64240.dll" Class="DependencyModule">
+ <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'!='true'" LocalName="$(BDS)\bin\cc32280.dll" Class="DependencyModule">
- <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'=='true'" LocalName="$(BDS)\bin\cc32c240mt.dll" Class="DependencyModule">
+ <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'=='true'" LocalName="$(BDS)\bin\cc32280mt.dll" Class="DependencyModule">
- <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'=='true'" LocalName="$(BDS)\bin\cc32260mt.dll" Class="DependencyModule">
+ <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'!='true'" LocalName="$(BDS)\bin\cc32c240.dll" Class="DependencyModule">
- <DeployFile LocalName=".\Win32\Debug\CGBombShaderC.tds" Configuration="Debug" Class="DebugSymbols">
+ <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'=='true'" LocalName="$(BDS)\bin\cc32c240mt.dll" Class="DependencyModule">
- <RemoteName>CGBombShaderC.tds</RemoteName>
- <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'!='true'" LocalName="$(BDS)\bin64\cc64260.dll" Class="DependencyModule">
+ <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'!='true'" LocalName="$(BDS)\bin\cc32c260.dll" Class="DependencyModule">
- <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'!='true'" LocalName="$(BDS)\bin\cc32240.dll" Class="DependencyModule">
+ <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'=='true'" LocalName="$(BDS)\bin\cc32c260mt.dll" Class="DependencyModule">
- <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'=='true'" LocalName="$(BDS)\bin64\cc64260mt.dll" Class="DependencyModule">
+ <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'!='true'" LocalName="$(BDS)\bin\cc32c280.dll" Class="DependencyModule">
- <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'!='true'" LocalName="$(BDS)\bin\cc32260.dll" Class="DependencyModule">
+ <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'=='true'" LocalName="$(BDS)\bin\cc32c280mt.dll" Class="DependencyModule">
- <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'!='true'" LocalName="$(BDS)\bin64\cc64160.dll" Class="DependencyModule">
+ <DeployFile Condition="'$(DynamicRTL)'=='true'" LocalName="$(BDS)\Redist\osx32\libcgcrtl.dylib" Class="DependencyModule">
+ <Platform Name="OSX32">
- <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'=='true'" LocalName="$(BDS)\bin64\cc64240mt.dll" Class="DependencyModule">
+ <DeployFile Condition="'$(DynamicRTL)'=='true'" LocalName="$(BDS)\Redist\osx32\libcgstl.dylib" Class="DependencyModule">
- <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'!='true'" LocalName="$(BDS)\bin\cc32280.dll" Class="DependencyModule">
+ <DeployFile Condition="'$(DynamicRTL)'=='true'" LocalName="$(BDS)\Redist\osx64\libcgcrtl.dylib" Class="DependencyModule">
+ <Platform Name="OSX64">
- <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'=='true'" LocalName="$(BDS)\bin64\cc64280mt.dll" Class="DependencyModule">
+ <DeployFile Condition="'$(DynamicRTL)'=='true'" LocalName="$(BDS)\Redist\osx64\libcgstl.dylib" Class="DependencyModule">
@@ -384,8 +383,9 @@
- <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'=='true'" LocalName="$(BDS)\bin64\cc64160mt.dll" Class="DependencyModule">
+ <DeployFile LocalName=".\Win32\Debug\CGBombShaderC.tds" Configuration="Debug" Class="DebugSymbols">
+ <RemoteName>CGBombShaderC.tds</RemoteName>
@@ -1511,17 +1511,17 @@
<Operation>1</Operation>
</DeployClass>
- <ProjectRoot Platform="OSX32" Name="$(PROJECTNAME).app"/>
- <ProjectRoot Platform="OSX64" Name="$(PROJECTNAME).app"/>
- <ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
- <ProjectRoot Platform="Android64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Android" Name="$(PROJECTNAME)"/>
- <ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
- <ProjectRoot Platform="OSXARM64" Name="$(PROJECTNAME).app"/>
+ <ProjectRoot Platform="Android64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="iOSDevice32" Name="$(PROJECTNAME).app"/>
<ProjectRoot Platform="iOSDevice64" Name="$(PROJECTNAME).app"/>
- <ProjectRoot Platform="Linux64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="iOSSimulator" Name="$(PROJECTNAME).app"/>
+ <ProjectRoot Platform="Linux64" Name="$(PROJECTNAME)"/>
+ <ProjectRoot Platform="OSX32" Name="$(PROJECTNAME).app"/>
+ <ProjectRoot Platform="OSX64" Name="$(PROJECTNAME).app"/>
+ <ProjectRoot Platform="OSXARM64" Name="$(PROJECTNAME).app"/>
+ <ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
+ <ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
</Deployment>
<Platforms>
<Platform value="Win32">True</Platform>
@@ -7,7 +7,7 @@
<TargetedPlatforms>1</TargetedPlatforms>
<Platform Condition="'$(Platform)'==''">Win32</Platform>
<PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
@@ -1240,17 +1240,17 @@
</BorlandProject>
<ProjectFileVersion>12</ProjectFileVersion>
<ProjectGuid>{2648E61C-57A6-4D1B-BEE8-1CDBB9946B3A}</ProjectGuid>
<MainSource>CgCellShaderC.cpp</MainSource>
@@ -127,6 +127,7 @@
<VerInfo_Keys>CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName);FileDescription=$(MSBuildProjectName);ProductName=$(MSBuildProjectName)</VerInfo_Keys>
+ <LinkPackageStatics>GR32_RT.lib</LinkPackageStatics>
<PropertyGroup Condition="'$(Cfg_1_Win64)'!=''">
@@ -222,69 +223,67 @@
- <DeployFile LocalName="D:\media\Shaders\cellshading_fp.cg" Configuration="Debug" Class="ProjectFile">
- <RemoteDir>.\</RemoteDir>
- <DeployFile LocalName=".\Win32\Debug\CgCellShaderC.exe" Configuration="Debug" Class="ProjectOutput">
- <RemoteName>CgCellShaderC.exe</RemoteName>
@@ -294,127 +293,129 @@
- <DeployFile LocalName="D:\media\Shaders\cellshading_vp.cg" Configuration="Debug" Class="ProjectFile">
- <DeployFile LocalName=".\Win32\Debug\CgCellShaderC.tds" Configuration="Debug" Class="DebugSymbols">
- <RemoteName>CgCellShaderC.tds</RemoteName>
- <DeployFile LocalName="..\..\..\..\media\Shaders\cellshading_vp.cg" Configuration="Debug" Class="ProjectFile">
- <DeployFile LocalName="..\..\..\..\media\Shaders\cellshading_fp.cg" Configuration="Debug" Class="ProjectFile">
+ <DeployFile LocalName="..\..\..\..\media\Shaders\cellshading_fp.cg" Configuration="Debug" Class="ProjectFile">
+ <RemoteDir>.\</RemoteDir>
+ <DeployFile LocalName="..\..\..\..\media\Shaders\cellshading_vp.cg" Configuration="Debug" Class="ProjectFile">
+ <DeployFile LocalName=".\Win32\Debug\CgCellShaderC.exe" Configuration="Debug" Class="ProjectOutput">
+ <RemoteName>CgCellShaderC.exe</RemoteName>
+ <DeployFile LocalName=".\Win32\Debug\CgCellShaderC.tds" Configuration="Debug" Class="DebugSymbols">
+ <RemoteName>CgCellShaderC.tds</RemoteName>
+ <DeployFile LocalName="D:\media\Shaders\cellshading_fp.cg" Configuration="Debug" Class="ProjectFile">
+ <DeployFile LocalName="D:\media\Shaders\cellshading_vp.cg" Configuration="Debug" Class="ProjectFile">
@@ -1540,17 +1541,17 @@
@@ -165,45 +165,45 @@
- <DeployFile LocalName="Win32\Debug\CgCellShaderD.exe" Configuration="Debug" Class="ProjectOutput">
- <RemoteName>CgCellShaderD.exe</RemoteName>
<RemoteDir>.\</RemoteDir>
- <DeployFile LocalName="Shaders\cellshading_fp.cg" Configuration="Debug" Class="ProjectFile">
- <DeployFile LocalName="Shaders\cellshading_vp.cg" Configuration="Debug" Class="ProjectFile">
+ <DeployFile LocalName="Shaders\cellshading_fp.cg" Configuration="Debug" Class="ProjectFile">
- <DeployFile LocalName="Win64\Debug\CgCellShaderD.exe" Configuration="Debug" Class="ProjectOutput">
+ <DeployFile LocalName="Shaders\cellshading_vp.cg" Configuration="Debug" Class="ProjectFile">
+ <DeployFile LocalName="Win32\Debug\CgCellShaderD.exe" Configuration="Debug" Class="ProjectOutput">
+ <RemoteName>CgCellShaderD.exe</RemoteName>
+ <DeployFile LocalName="Win64\Debug\CgCellShaderD.exe" Configuration="Debug" Class="ProjectOutput">
@@ -1328,17 +1328,17 @@
<ProjectGuid>{1EFB5BD6-6033-430A-9B05-230C62C18661}</ProjectGuid>
<MainSource>CgSimpleC.cpp</MainSource>
<PropertyGroup Condition="'$(Cfg_1_Win32)'!=''">
<FinalOutputDir>.</FinalOutputDir>
@@ -217,122 +217,118 @@
</ProjectProperties>
- <DeployFile LocalName="..\..\..\..\media\Shaders\Simple_vp.cg" Configuration="Debug" Class="ProjectFile">
- <DeployFile LocalName="D:\media\Shaders\Simple_vp.cg" Configuration="Debug" Class="ProjectFile">
- <DeployFile LocalName="..\..\..\..\media\Shaders\Simple_fp.cg" Configuration="Debug" Class="ProjectFile">
- <DeployFile LocalName="D:\media\Shaders\Simple_fp.cg" Configuration="Debug" Class="ProjectFile">
@@ -341,7 +337,7 @@
@@ -351,65 +347,69 @@
- <DeployFile LocalName=".\CgSimpleC.exe" Configuration="Debug" Class="ProjectOutput">
+ <DeployFile LocalName="..\..\..\..\media\Shaders\Simple_fp.cg" Configuration="Debug" Class="ProjectFile">
- <RemoteName>CgSimpleC.exe</RemoteName>
+ <DeployFile LocalName="..\..\..\..\media\Shaders\Simple_vp.cg" Configuration="Debug" Class="ProjectFile">
- <DeployFile LocalName=".\CgSimpleC.tds" Configuration="Debug" Class="DebugSymbols">
+ <DeployFile LocalName=".\CgSimpleC.exe" Configuration="Debug" Class="ProjectOutput">
- <RemoteName>CgSimpleC.tds</RemoteName>
+ <RemoteName>CgSimpleC.exe</RemoteName>
+ <DeployFile LocalName=".\CgSimpleC.tds" Configuration="Debug" Class="DebugSymbols">
+ <RemoteName>CgSimpleC.tds</RemoteName>
+ <DeployFile LocalName="D:\media\Shaders\Simple_fp.cg" Configuration="Debug" Class="ProjectFile">
+ <DeployFile LocalName="D:\media\Shaders\Simple_vp.cg" Configuration="Debug" Class="ProjectFile">
@@ -1535,17 +1535,17 @@
@@ -159,21 +159,21 @@
<Platform value="Win64">False</Platform>
</Platforms>
- <DeployFile LocalName="..\..\..\media\Shaders\Simple_vp.cg" Configuration="Debug" Class="ProjectFile">
+ <DeployFile LocalName="..\..\..\media\Shaders\Simple_fp.cg" Configuration="Debug" Class="ProjectFile">
- <DeployFile LocalName="Win32\Debug\CgSimpleD.exe" Configuration="Debug" Class="ProjectOutput">
+ <DeployFile LocalName="..\..\..\media\Shaders\Simple_vp.cg" Configuration="Debug" Class="ProjectFile">
- <RemoteName>CgSimpleD.exe</RemoteName>
- <DeployFile LocalName="..\..\..\media\Shaders\Simple_fp.cg" Configuration="Debug" Class="ProjectFile">
+ <DeployFile LocalName="Win32\Debug\CgSimpleD.exe" Configuration="Debug" Class="ProjectOutput">
+ <RemoteName>CgSimpleD.exe</RemoteName>
@@ -1298,17 +1298,17 @@
<ProjectGuid>{6157C599-9E82-4051-AD5E-BA4183F35E94}</ProjectGuid>
<MainSource>CgTextureC.cpp</MainSource>
@@ -120,7 +120,7 @@
<ILINK_LibraryPath>$(BDSLIB)\$(PLATFORM)\debug;$(ILINK_LibraryPath)</ILINK_LibraryPath>
@@ -224,69 +224,67 @@
- <DeployFile LocalName=".\CgTextureC.tds" Configuration="Debug" Class="DebugSymbols">
- <RemoteName>CgTextureC.tds</RemoteName>
- <DeployFile LocalName="D:\media\Shaders\cg_texture_fp.cg" Configuration="Debug" Class="ProjectFile">
@@ -296,9 +294,8 @@
- <DeployFile LocalName=".\CgTextureC.exe" Configuration="Debug" Class="ProjectOutput">
- <RemoteName>CgTextureC.exe</RemoteName>
@@ -307,116 +304,119 @@
- <DeployFile LocalName="D:\media\Shaders\cg_texture_vp.cg" Configuration="Debug" Class="ProjectFile">
- <DeployFile LocalName="..\..\..\..\media\Shaders\cg_texture_vp.cg" Configuration="Debug" Class="ProjectFile">
- <DeployFile LocalName="..\..\..\..\media\Shaders\cg_texture_fp.cg" Configuration="Debug" Class="ProjectFile">
+ <DeployFile LocalName="..\..\..\..\media\Shaders\cg_texture_fp.cg" Configuration="Debug" Class="ProjectFile">
+ <DeployFile LocalName="..\..\..\..\media\Shaders\cg_texture_vp.cg" Configuration="Debug" Class="ProjectFile">
+ <DeployFile LocalName=".\CgTextureC.exe" Configuration="Debug" Class="ProjectOutput">
+ <RemoteName>CgTextureC.exe</RemoteName>
+ <DeployFile LocalName=".\CgTextureC.tds" Configuration="Debug" Class="DebugSymbols">
+ <RemoteName>CgTextureC.tds</RemoteName>
+ <DeployFile LocalName="D:\media\Shaders\cg_texture_fp.cg" Configuration="Debug" Class="ProjectFile">
+ <DeployFile LocalName="D:\media\Shaders\cg_texture_vp.cg" Configuration="Debug" Class="ProjectFile">
@@ -1542,17 +1542,17 @@
@@ -161,39 +161,39 @@
- <DeployFile LocalName="Win64\Debug\CgTextureD.exe" Configuration="Debug" Class="ProjectOutput">
- <RemoteName>CgTextureD.exe</RemoteName>
- <DeployFile LocalName="CgTextureD.exe" Configuration="Debug" Class="ProjectOutput">
+ <DeployFile LocalName="..\..\..\media\Shaders\cg_texture_fp.cg" Configuration="Debug" Class="ProjectFile">
- <DeployFile LocalName="..\..\..\media\Shaders\cg_texture_fp.cg" Configuration="Debug" Class="ProjectFile">
+ <DeployFile LocalName="..\..\..\media\Shaders\cg_texture_vp.cg" Configuration="Debug" Class="ProjectFile">
- <DeployFile LocalName="..\..\..\media\Shaders\cg_texture_vp.cg" Configuration="Debug" Class="ProjectFile">
+ <DeployFile LocalName="CgTextureD.exe" Configuration="Debug" Class="ProjectOutput">
+ <RemoteName>CgTextureD.exe</RemoteName>
+ <DeployFile LocalName="Win64\Debug\CgTextureD.exe" Configuration="Debug" Class="ProjectOutput">
@@ -1318,17 +1318,17 @@
@@ -2,29 +2,24 @@ object FormHFPick: TFormHFPick
Left = 133
Top = 72
Caption = 'Heightfield Pick'
- ClientHeight = 561
- ClientWidth = 721
+ ClientHeight = 449
+ ClientWidth = 577
object GLSceneViewer: TGLSceneViewer
- Width = 594
- Height = 561
+ Width = 475
+ Height = 449
Camera = GLCamera1
Buffer.BackgroundColor = clTeal
- FieldOfView = 159.786010742187500000
+ FieldOfView = 154.888351440429700000
OnMouseDown = GLSceneViewerMouseDown
@@ -32,66 +27,50 @@ object FormHFPick: TFormHFPick
object Panel1: TPanel
- Left = 594
+ Left = 475
- Width = 127
+ Width = 102
Align = alRight
BevelOuter = bvLowered
Font.Name = 'Arial'
ParentFont = False
TabOrder = 1
object Label1: TLabel
- Left = 10
- Top = 10
- Width = 108
- Height = 22
+ Left = 8
+ Top = 8
+ Width = 82
+ Height = 18
Caption = 'Last Coord.'
- Font.Height = -19
+ Font.Height = -15
Font.Style = [fsBold]
object Label2: TLabel
- Left = 30
- Top = 40
- Width = 41
+ Left = 24
+ Top = 32
+ Width = 32
Caption = 'X Y'
object Label3: TLabel
- Top = 210
- Width = 111
- Height = 181
+ Top = 168
+ Width = 89
+ Height = 145
AutoSize = False
Caption =
'This demo uses a crude method for heightfield picking based on t' +
@@ -100,28 +79,20 @@ object FormHFPick: TFormHFPick
WordWrap = True
object RBPaint: TRadioButton
- Left = 20
- Top = 100
- Width = 61
- Height = 21
+ Left = 16
+ Top = 80
+ Width = 49
+ Height = 17
Caption = 'Paint'
Checked = True
TabStop = True
object RadioButton2: TRadioButton
- Top = 140
- Width = 71
+ Top = 112
+ Width = 57
Caption = 'Rotate'
@@ -3,30 +3,25 @@ object Form1: TForm1
Top = 96
BorderStyle = bsDialog
Caption = 'Pick'
- ClientHeight = 416
- ClientWidth = 528
+ ClientHeight = 333
+ ClientWidth = 422
- Width = 528
- Height = 416
+ Width = 422
+ Height = 333
Buffer.BackgroundColor = clBackground
- FieldOfView = 152.966857910156300000
+ FieldOfView = 146.569946289062500000
OnMouseDown = GLSceneViewer1MouseDown
@@ -18,7 +18,8 @@ uses
GLS.Color,
GLS.Coordinates,
- GLS.BaseClasses, GLS.SimpleNavigation;
+ GLS.BaseClasses,
+ GLS.SimpleNavigation;
type
TForm1 = class(TForm)
@@ -2,29 +2,24 @@ object FormCustomQuad: TFormCustomQuad
Left = 185
Top = 101
Caption = 'Custom Quad'
- ClientHeight = 405
- ClientWidth = 555
+ ClientHeight = 324
+ ClientWidth = 444
- Width = 555
- Height = 405
+ Width = 444
+ Height = 324
- FieldOfView = 139.353729248046900000
+ FieldOfView = 130.315216064453100000
@@ -69,6 +69,9 @@ begin
Material.FrontProperties.Emission.Color := clrGray50;
MatLib.AddTextureMaterial('stone', 'walkway.jpg').
Material.FaceCulling := fcNoCull;
+
+ Torus1.Material.Texture.Disabled := False;
+ Torus1.Material.Texture.Image.LoadFromFile('walkway.jpg');
end;
procedure TFormCustomQuad.DirectOpenGL1Render(Sender: TObject;
@@ -2,129 +2,120 @@ object FormCsg: TFormCsg
Left = 321
Top = 128
Caption = 'Constructive Solid Geometry'
- ClientHeight = 545
- ClientWidth = 693
+ ClientHeight = 542
+ ClientWidth = 726
+ Position = poScreenCenter
OnMouseWheelDown = FormMouseWheelDown
OnMouseWheelUp = FormMouseWheelUp
- Width = 693
- Height = 493
+ Width = 544
+ Height = 542
Buffer.FaceCulling = False
- FieldOfView = 157.067413330078100000
+ FieldOfView = 159.092758178710900000
OnMouseMove = GLSceneViewer1MouseMove
OnMouseUp = GLSceneViewer1MouseUp
+ ExplicitWidth = 556
+ ExplicitHeight = 395
- object Panel1: TPanel
- Left = 0
- Top = 493
- Height = 52
- Align = alBottom
+ object PanelLeft: TPanel
+ Left = 544
+ Top = 0
+ Width = 182
+ Align = alRight
- object btnClear: TButton
- Height = 31
- Caption = 'Clear'
+ ExplicitLeft = 536
+ object chbSolidResult: TCheckBox
+ Left = 48
+ Top = 324
+ Width = 97
+ Caption = 'Solid Result'
+ Checked = True
+ State = cbChecked
- OnClick = btnClearClick
+ OnClick = chbSolidResultClick
- object btnUnion: TButton
- Left = 79
- Width = 104
- Caption = 'Union A and B'
+ object btnReset: TButton
+ Top = 371
+ Height = 25
+ Caption = 'Reset'
- OnClick = btnUnionClick
+ OnClick = btnResetClick
- object btnSubtractAB: TButton
- Left = 198
- Top = 8
- Width = 93
- Caption = 'Subtract A-B'
+ object gbVisibility: TGroupBox
+ Top = 210
+ Width = 153
+ Height = 92
+ Caption = 'Visibility'
TabOrder = 2
- OnClick = btnSubtractABClick
+ object chbA: TCheckBox
+ Left = 32
+ Top = 18
+ Caption = 'Object A'
+ TabOrder = 0
+ OnClick = chbClick
+ object chbB: TCheckBox
+ Top = 41
+ Caption = 'Object B'
+ TabOrder = 1
+ object chbC: TCheckBox
+ Top = 64
+ Caption = 'Result'
+ TabOrder = 2
- object btnSubtractBA: TButton
- Left = 299
- Width = 94
- Caption = 'Subtract B-A'
+ object rgOperation: TRadioGroup
+ Top = 16
+ Height = 169
+ Caption = 'Operation'
+ ItemIndex = 0
+ Items.Strings = (
+ 'Union A and B'
+ 'Subtract A-B'
+ 'Subtract B-A'
+ 'Intersect A and B')
TabOrder = 3
- OnClick = btnSubtractBAClick
- object btnIntersect: TButton
- Left = 400
- Width = 121
- Caption = 'Intersection A or B'
- TabOrder = 4
- OnClick = btnIntersectClick
- object CheckBox1: TCheckBox
- Left = 571
- Top = 15
- Width = 122
- Caption = 'Solid Result'
- Checked = True
- State = cbChecked
- TabOrder = 5
- OnClick = CheckBox1Click
+ OnClick = rgOperationClick
object GLScene1: TGLScene
@@ -145,10 +136,15 @@ object FormCsg: TFormCsg
object GLDummyCube1: TGLDummyCube
Scale.Coordinates = {00000040000000400000004000000000}
CubeSize = 100.000000000000000000
- object GLFreeForm3: TGLFreeForm
- MaterialLibrary = GLMaterialLibrary1
+ object FF_A: TGLFreeForm
+ Material.FrontProperties.Ambient.Color = {0000000000000000000000000000803F}
+ Material.FrontProperties.Diffuse.Color = {9484843E9484843EDBDEDE3E0000803F}
+ Material.FrontProperties.Shininess = 32
+ Material.FrontProperties.Specular.Color = {9A99593F9A99593FCDCCCC3D0000803F}
+ Scale.Coordinates = {0000A0420000A0420000A04200000000}
+ AutoCentering = [macCenterX, macCenterY, macCenterZ]
- object GLFreeForm2: TGLFreeForm
+ object FF_B: TGLFreeForm
Material.FrontProperties.Ambient.Color = {0000000000000000000000000000803F}
Material.FrontProperties.Diffuse.Color = {CFBC3C3EA19E9E3EA19E9E3E0000803F}
Material.FrontProperties.Shininess = 32
@@ -157,13 +153,8 @@ object FormCsg: TFormCsg
Scale.Coordinates = {00002042000020420000204200000000}
AutoCentering = [macCenterX, macCenterY, macCenterZ]
- object GLFreeForm1: TGLFreeForm
- Material.FrontProperties.Ambient.Color = {0000000000000000000000000000803F}
- Material.FrontProperties.Diffuse.Color = {9484843E9484843EDBDEDE3E0000803F}
- Material.FrontProperties.Shininess = 32
- Material.FrontProperties.Specular.Color = {9A99593F9A99593FCDCCCC3D0000803F}
- Scale.Coordinates = {0000A0420000A0420000A04200000000}
- AutoCentering = [macCenterX, macCenterY, macCenterZ]
+ object FF_C: TGLFreeForm
+ MaterialLibrary = GLMaterialLibrary1
@@ -15,7 +15,7 @@ uses
Vcl.Dialogs,
Vcl.StdCtrls,
-
GLS.Scene,
GLS.PersistentClasses,
GLS.VectorFileObjects,
@@ -25,7 +25,7 @@ uses
GLS.Objects,
GLS.Texture,
GLS.File3DS,
GLS.Material,
GLS.BaseClasses,
@@ -36,21 +36,22 @@ uses
TFormCsg = class(TForm)
GLScene1: TGLScene;
- GLFreeForm1: TGLFreeForm;
+ FF_A: TGLFreeForm;
GLCamera1: TGLCamera;
GLSceneViewer1: TGLSceneViewer;
GLMaterialLibrary1: TGLMaterialLibrary;
- GLFreeForm2: TGLFreeForm;
- GLFreeForm3: TGLFreeForm;
- Panel1: TPanel;
- btnClear: TButton;
- btnUnion: TButton;
- btnSubtractAB: TButton;
- btnSubtractBA: TButton;
- btnIntersect: TButton;
- CheckBox1: TCheckBox;
+ FF_B: TGLFreeForm;
+ FF_C: TGLFreeForm;
GLLightSource1: TGLLightSource;
GLDummyCube1: TGLDummyCube;
+ PanelLeft: TPanel;
+ chbSolidResult: TCheckBox;
+ btnReset: TButton;
+ gbVisibility: TGroupBox;
+ chbA: TCheckBox;
+ chbB: TCheckBox;
+ chbC: TCheckBox;
+ rgOperation: TRadioGroup;
procedure GLSceneViewer1MouseDown(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
procedure GLSceneViewer1MouseUp(Sender: TObject; Button: TMouseButton;
@@ -62,15 +63,13 @@ type
procedure FormMouseWheelUp(Sender: TObject; Shift: TShiftState;
MousePos: TPoint; var Handled: Boolean);
procedure FormCreate(Sender: TObject);
-// Demo starts here above is just navigation.
- procedure btnClearClick(Sender: TObject);
- procedure btnUnionClick(Sender: TObject);
- procedure btnSubtractABClick(Sender: TObject);
- procedure btnSubtractBAClick(Sender: TObject);
- procedure btnIntersectClick(Sender: TObject);
- procedure CheckBox1Click(Sender: TObject);
+ procedure btnResetClick(Sender: TObject);
+ procedure chbSolidResultClick(Sender: TObject);
+ procedure chbClick(Sender: TObject);
+ procedure rgOperationClick(Sender: TObject);
private
public
mx : Integer;
my : Integer;
@@ -84,15 +83,41 @@ implementation
{$R *.dfm}
procedure TFormCsg.FormCreate(Sender: TObject);
SetGLSceneMediaDir();
// scaled 40
- GLFreeForm1.LoadFromFile('polyhedron.3ds');
+ FF_A.LoadFromFile('polyhedron.3ds');
// scaled 20, position.x = 16
- GLFreeForm2.LoadFromFile('polyhedron.3ds');
+ FF_B.LoadFromFile('polyhedron.3ds');
+end;
+//
+// Boolean operations
+procedure TFormCsg.rgOperationClick(Sender: TObject);
+begin
+ FF_C.MeshObjects.Clear;
+ if FF_C.MeshObjects.Count = 0 then
+ TGLMeshObject.CreateOwned(FF_C.MeshObjects).Mode := momFaceGroups;
+ case rgOperation.ItemIndex of
+ 0: CSG_Operation(FF_A.MeshObjects.Items[0], FF_B.MeshObjects.Items[0],
+ CSG_Union, FF_C.MeshObjects[0], '1', '2');
+ 1: CSG_Operation(FF_A.MeshObjects.Items[0], FF_B.MeshObjects.Items[0],
+ CSG_Subtraction, FF_C.MeshObjects[0], '1', '2');
+ 2: CSG_Operation(FF_B.MeshObjects.Items[0], FF_A.MeshObjects.Items[0],
+ 3: CSG_Operation(FF_A.MeshObjects.Items[0], FF_B.MeshObjects.Items[0],
+ CSG_Intersection, FF_C.MeshObjects[0],'1','2');
+ end;
+ FF_A.Material.PolygonMode := pmLines;
+ FF_B.Material.PolygonMode := pmLines;
+ FF_C.StructureChanged;
+ GLSceneViewer1.Invalidate;
procedure TFormCsg.GLSceneViewer1MouseDown(Sender: TObject;
@@ -118,102 +143,29 @@ begin
my := Y;
-procedure TFormCsg.FormMouseWheelDown(Sender: TObject; Shift: TShiftState;
- MousePos: TPoint; var Handled: Boolean);
-begin
- GLCamera1.AdjustDistanceToTarget(1.1);
-end;
procedure TFormCsg.FormMouseWheelUp(Sender: TObject; Shift: TShiftState;
GLCamera1.AdjustDistanceToTarget(1/1.1);
-procedure TFormCsg.btnClearClick(Sender: TObject);
- GLFreeForm3.MeshObjects.Clear;
- GLFreeForm3.StructureChanged;
- GLFreeForm1.Material.PolygonMode := pmFill;
- GLFreeForm2.Material.PolygonMode := pmFill;
-procedure TFormCsg.btnUnionClick(Sender: TObject);
-var
- Mesh : TGLMeshObject;
- btnClearClick(Sender);
- if GLFreeForm3.MeshObjects.Count = 0 then
- TGLMeshObject.CreateOwned(GLFreeForm3.MeshObjects).Mode := momFaceGroups;
- Mesh := GLFreeForm3.MeshObjects[0];
- CSG_Operation(GLFreeForm1.MeshObjects.Items[0],GLFreeForm2.MeshObjects.Items[0],CSG_Union,Mesh,'1','2');
- GLFreeForm1.Material.PolygonMode := pmLines;
- GLFreeForm2.Material.PolygonMode := pmLines;
-procedure TFormCsg.btnSubtractABClick(Sender: TObject);
+procedure TFormCsg.FormMouseWheelDown(Sender: TObject; Shift: TShiftState;
+ MousePos: TPoint; var Handled: Boolean);
- CSG_Operation(GLFreeForm1.MeshObjects.Items[0],GLFreeForm2.MeshObjects.Items[0],CSG_Subtraction,Mesh,'1','2');
+ GLCamera1.AdjustDistanceToTarget(1.1);
-procedure TFormCsg.btnSubtractBAClick(Sender: TObject);
- CSG_Operation(GLFreeForm2.MeshObjects.Items[0],GLFreeForm1.MeshObjects.Items[0],CSG_Subtraction,Mesh,'1','2');
-procedure TFormCsg.btnIntersectClick(Sender: TObject);
+procedure TFormCsg.chbClick(Sender: TObject);
- CSG_Operation(GLFreeForm1.MeshObjects.Items[0],GLFreeForm2.MeshObjects.Items[0],CSG_Intersection,Mesh,'1','2');
+ FF_A.Visible := chbA.Checked;
+ FF_B.Visible := chbB.Checked;
+ FF_C.Visible := chbC.Checked;
-procedure TFormCsg.CheckBox1Click(Sender: TObject);
+procedure TFormCsg.chbSolidResultClick(Sender: TObject);
- if CheckBox1.Checked then
+ if chbSolidResult.Checked then
GLMaterialLibrary1.Materials[0].Material.PolygonMode := pmFill;
GLMaterialLibrary1.Materials[1].Material.PolygonMode := pmFill;
@@ -223,7 +175,25 @@ begin
GLMaterialLibrary1.Materials[0].Material.PolygonMode := pmLines;
GLMaterialLibrary1.Materials[1].Material.PolygonMode := pmLines;
+procedure TFormCsg.btnResetClick(Sender: TObject);
+ FF_A.Visible := True; chbA.Checked := True;
+ FF_B.Visible := True; chbB.Checked := True;
+ FF_C.Visible := True; chbC.Checked := True;
+ chbSolidResult.Checked := True;
+ FF_A.Material.PolygonMode := pmFill;
+ FF_B.Material.PolygonMode := pmFill;
+ rgOperation.ItemIndex := 0;
end.
@@ -1,346 +1,2627 @@
-<html>
+<html xmlns:v="urn:schemas-microsoft-com:vml"
+xmlns:o="urn:schemas-microsoft-com:office:office"
+xmlns:w="urn:schemas-microsoft-com:office:word"
+xmlns:m="http://schemas.microsoft.com/office/2004/12/omml"
+xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
-<meta name=Generator content="Microsoft Word 15 (filtered)">
+<meta name=ProgId content=Word.Document>
+<meta name=Generator content="Microsoft Word 15">
+<meta name=Originator content="Microsoft Word 15">
+<link rel=File-List href="aMeshes.files/filelist.xml">
+<link rel=Edit-Time-Data href="aMeshes.files/editdata.mso">
+<!--[if !mso]>
+<style>
+v\:* {behavior:url(#default#VML);}
+o\:* {behavior:url(#default#VML);}
+w\:* {behavior:url(#default#VML);}
+.shape {behavior:url(#default#VML);}
+</style>
+<![endif]-->
<title>Meshes demos</title>
+<link rel=themeData href="aMeshes.files/themedata.thmx">
+<link rel=colorSchemeMapping href="aMeshes.files/colorschememapping.xml">
+<!--[if gte mso 9]><xml>
+ <w:WordDocument>
+ <w:View>Print</w:View>
+ <w:TrackMoves>false</w:TrackMoves>
+ <w:TrackFormatting/>
+ <w:ValidateAgainstSchemas/>
+ <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
+ <w:IgnoreMixedContent>false</w:IgnoreMixedContent>
+ <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
+ <w:DoNotPromoteQF/>
+ <w:LidThemeOther>RU</w:LidThemeOther>
+ <w:LidThemeAsian>X-NONE</w:LidThemeAsian>
+ <w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
+ <w:Compatibility>
+ <w:BreakWrappedTables/>
+ <w:SplitPgBreakAndParaMark/>
+ </w:Compatibility>
+ <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
+ <m:mathPr>
+ <m:mathFont m:val="Cambria Math"/>
+ <m:brkBin m:val="before"/>
+ <m:brkBinSub m:val="--"/>
+ <m:smallFrac m:val="off"/>
+ <m:dispDef/>
+ <m:lMargin m:val="0"/>
+ <m:rMargin m:val="0"/>
+ <m:defJc m:val="centerGroup"/>
+ <m:wrapIndent m:val="1440"/>
+ <m:intLim m:val="subSup"/>
+ <m:naryLim m:val="undOvr"/>
+ </m:mathPr></w:WordDocument>
+</xml><![endif]--><!--[if gte mso 9]><xml>
+ <w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="false"
+ DefSemiHidden="false" DefQFormat="false" DefPriority="99"
+ LatentStyleCount="371">
+ <w:LsdException Locked="false" Priority="0" QFormat="true" Name="Normal"/>
+ <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 1"/>
+ <w:LsdException Locked="false" Priority="9" SemiHidden="true"
+ UnhideWhenUsed="true" QFormat="true" Name="heading 2"/>
+ UnhideWhenUsed="true" QFormat="true" Name="heading 3"/>
+ UnhideWhenUsed="true" QFormat="true" Name="heading 4"/>
+ UnhideWhenUsed="true" QFormat="true" Name="heading 5"/>
+ UnhideWhenUsed="true" QFormat="true" Name="heading 6"/>
+ UnhideWhenUsed="true" QFormat="true" Name="heading 7"/>
+ UnhideWhenUsed="true" QFormat="true" Name="heading 8"/>
+ UnhideWhenUsed="true" QFormat="true" Name="heading 9"/>
+ <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
+ Name="index 1"/>
+ Name="index 2"/>
+ Name="index 3"/>
+ Name="index 4"/>
+ Name="index 5"/>
+ Name="index 6"/>
+ Name="index 7"/>
+ Name="index 8"/>
+ Name="index 9"/>
+ <w:LsdException Locked="false" Priority="39" SemiHidden="true"
+ UnhideWhenUsed="true" Name="toc 1"/>
+ UnhideWhenUsed="true" Name="toc 2"/>
+ UnhideWhenUsed="true" Name="toc 3"/>
+ UnhideWhenUsed="true" Name="toc 4"/>
+ UnhideWhenUsed="true" Name="toc 5"/>
+ UnhideWhenUsed="true" Name="toc 6"/>
+ UnhideWhenUsed="true" Name="toc 7"/>
+ UnhideWhenUsed="true" Name="toc 8"/>
+ UnhideWhenUsed="true" Name="toc 9"/>
+ Name="Normal Indent"/>
+ Name="footnote text"/>
+ Name="annotation text"/>
+ Name="header"/>
+ Name="footer"/>
+ Name="index heading"/>
+ <w:LsdException Locked="false" Priority="35" SemiHidden="true"
+ UnhideWhenUsed="true" QFormat="true" Name="caption"/>
+ Name="table of figures"/>
+ Name="envelope address"/>
+ Name="envelope return"/>
+ Name="footnote reference"/>
+ Name="annotation reference"/>
+ Name="line number"/>
+ Name="page number"/>
+ Name="endnote reference"/>
+ Name="endnote text"/>
+ Name="table of authorities"/>
+ Name="macro"/>
+ Name="toa heading"/>
+ Name="List"/>
+ Name="List Bullet"/>
+ Name="List Number"/>
+ Name="List 2"/>
+ Name="List 3"/>
+ Name="List 4"/>
+ Name="List 5"/>
+ Name="List Bullet 2"/>
+ Name="List Bullet 3"/>
+ Name="List Bullet 4"/>
+ Name="List Bullet 5"/>
+ Name="List Number 2"/>
+ Name="List Number 3"/>
+ Name="List Number 4"/>
+ Name="List Number 5"/>
+ <w:LsdException Locked="false" Priority="10" QFormat="true" Name="Title"/>
+ Name="Closing"/>
+ Name="Signature"/>
+ <w:LsdException Locked="false" Priority="1" SemiHidden="true"
+ UnhideWhenUsed="true" Name="Default Paragraph Font"/>
+ Name="Body Text"/>
+ Name="Body Text Indent"/>
+ Name="List Continue"/>
+ Name="List Continue 2"/>
+ Name="List Continue 3"/>
+ Name="List Continue 4"/>
+ Name="List Continue 5"/>
+ Name="Message Header"/>
+ <w:LsdException Locked="false" Priority="11" QFormat="true" Name="Subtitle"/>
+ Name="Salutation"/>
+ Name="Date"/>
+ Name="Body Text First Indent"/>
+ Name="Body Text First Indent 2"/>
+ Name="Note Heading"/>
+ Name="Body Text 2"/>
+ Name="Body Text 3"/>
+ Name="Body Text Indent 2"/>
+ Name="Body Text Indent 3"/>
+ Name="Block Text"/>
+ Name="Hyperlink"/>
+ Name="FollowedHyperlink"/>
+ <w:LsdException Locked="false" Priority="22" QFormat="true" Name="Strong"/>
+ <w:LsdException Locked="false" Priority="20" QFormat="true" Name="Emphasis"/>
+ Name="Document Map"/>
+ Name="Plain Text"/>
+ Name="E-mail Signature"/>
+ Name="HTML Top of Form"/>
+ Name="HTML Bottom of Form"/>
+ Name="Normal (Web)"/>
+ Name="HTML Acronym"/>
+ Name="HTML Address"/>
+ Name="HTML Cite"/>
+ Name="HTML Code"/>
+ Name="HTML Definition"/>
+ Name="HTML Keyboard"/>
+ Name="HTML Preformatted"/>
+ Name="HTML Sample"/>
+ Name="HTML Typewriter"/>
+ Name="HTML Variable"/>
+ Name="Normal Table"/>
+ Name="annotation subject"/>
+ Name="No List"/>
+ Name="Outline List 1"/>
+ Name="Outline List 2"/>
+ Name="Outline List 3"/>
+ Name="Table Simple 1"/>
+ Name="Table Simple 2"/>
+ Name="Table Simple 3"/>
+ Name="Table Classic 1"/>
+ Name="Table Classic 2"/>
+ Name="Table Classic 3"/>
+ Name="Table Classic 4"/>
+ Name="Table Colorful 1"/>
+ Name="Table Colorful 2"/>
+ Name="Table Colorful 3"/>
+ Name="Table Columns 1"/>
+ Name="Table Columns 2"/>
+ Name="Table Columns 3"/>
+ Name="Table Columns 4"/>
+ Name="Table Columns 5"/>
+ Name="Table Grid 1"/>
+ Name="Table Grid 2"/>
+ Name="Table Grid 3"/>
+ Name="Table Grid 4"/>
+ Name="Table Grid 5"/>
+ Name="Table Grid 6"/>
+ Name="Table Grid 7"/>
+ Name="Table Grid 8"/>
+ Name="Table List 1"/>
+ Name="Table List 2"/>
+ Name="Table List 3"/>
+ Name="Table List 4"/>
+ Name="Table List 5"/>
+ Name="Table List 6"/>
+ Name="Table List 7"/>
+ Name="Table List 8"/>
+ Name="Table 3D effects 1"/>
+ Name="Table 3D effects 2"/>
+ Name="Table 3D effects 3"/>
+ Name="Table Contemporary"/>
+ Name="Table Elegant"/>
+ Name="Table Professional"/>
+ Name="Table Subtle 1"/>
+ Name="Table Subtle 2"/>
+ Name="Table Web 1"/>
+ Name="Table Web 2"/>
+ Name="Table Web 3"/>
+ Name="Balloon Text"/>
+ <w:LsdException Locked="false" Priority="39" Name="Table Grid"/>
+ Name="Table Theme"/>
+ <w:LsdException Locked="false" SemiHidden="true" Name="Placeholder Text"/>
+ <w:LsdException Locked="false" Priority="1" QFormat="true" Name="No Spacing"/>
+ <w:LsdException Locked="false" Priority="60" Name="Light Shading"/>
+ <w:LsdException Locked="false" Priority="61" Name="Light List"/>
+ <w:LsdException Locked="false" Priority="62" Name="Light Grid"/>
+ <w:LsdException Locked="false" Priority="63" Name="Medium Shading 1"/>
+ <w:LsdException Locked="false" Priority="64" Name="Medium Shading 2"/>
+ <w:LsdException Locked="false" Priority="65" Name="Medium List 1"/>
+ <w:LsdException Locked="false" Priority="66" Name="Medium List 2"/>
+ <w:LsdException Locked="false" Priority="67" Name="Medium Grid 1"/>
+ <w:LsdException Locked="false" Priority="68" Name="Medium Grid 2"/>
+ <w:LsdException Locked="false" Priority="69" Name="Medium Grid 3"/>
+ <w:LsdException Locked="false" Priority="70" Name="Dark List"/>
+ <w:LsdException Locked="false" Priority="71" Name="Colorful Shading"/>
+ <w:LsdException Locked="false" Priority="72" Name="Colorful List"/>
+ <w:LsdException Locked="false" Priority="73" Name="Colorful Grid"/>
+ <w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 1"/>
+ <w:LsdException Locked="false" Priority="61" Name="Light List Accent 1"/>
+ <w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 1"/>
+ <w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 1"/>
+ <w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 1"/>
+ <w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 1"/>
+ <w:LsdException Locked="false" SemiHidden="true" Name="Revision"/>
+ <w:LsdException Locked="false" Priority="34" QFormat="true"
+ Name="List Paragraph"/>
+ <w:LsdException Locked="false" Priority="29" QFormat="true" Name="Quote"/>
+ <w:LsdException Locked="false" Priority="30" QFormat="true"
+ Name="Intense Quote"/>
+ <w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 1"/>
+ <w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 1"/>
+ <w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 1"/>
+ <w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 1"/>
+ <w:LsdException Locked="false" Priority="70" Name="Dark List Accent 1"/>
+ <w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 1"/>
+ <w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 1"/>
+ <w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 1"/>
+ <w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 2"/>
+ <w:LsdException Locked="false" Priority="61" Name="Light List Accent 2"/>
+ <w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 2"/>
+ <w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 2"/>
+ <w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 2"/>
+ <w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 2"/>
+ <w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 2"/>
+ <w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 2"/>
+ <w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 2"/>
+ <w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 2"/>
+ <w:LsdException Locked="false" Priority="70" Name="Dark List Accent 2"/>
+ <w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 2"/>
+ <w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 2"/>
+ <w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 2"/>
+ <w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 3"/>
+ <w:LsdException Locked="false" Priority="61" Name="Light List Accent 3"/>
+ <w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 3"/>
+ <w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 3"/>
+ <w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 3"/>
+ <w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 3"/>
+ <w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 3"/>
+ <w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 3"/>
+ <w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 3"/>
+ <w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 3"/>
+ <w:LsdException Locked="false" Priority="70" Name="Dark List Accent 3"/>
+ <w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 3"/>
+ <w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 3"/>
+ <w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 3"/>
+ <w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 4"/>
+ <w:LsdException Locked="false" Priority="61" Name="Light List Accent 4"/>
+ <w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 4"/>
+ <w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 4"/>
+ <w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 4"/>
+ <w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 4"/>
+ <w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 4"/>
+ <w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 4"/>
+ <w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 4"/>
+ <w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 4"/>
+ <w:LsdException Locked="false" Priority="70" Name="Dark List Accent 4"/>
+ <w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 4"/>
+ <w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 4"/>
+ <w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 4"/>
+ <w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 5"/>
+ <w:LsdException Locked="false" Priority="61" Name="Light List Accent 5"/>
+ <w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 5"/>
+ <w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 5"/>
+ <w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 5"/>
+ <w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 5"/>
+ <w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 5"/>
+ <w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 5"/>
+ <w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 5"/>
+ <w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 5"/>
+ <w:LsdException Locked="false" Priority="70" Name="Dark List Accent 5"/>
+ <w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 5"/>
+ <w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 5"/>
+ <w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 5"/>
+ <w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 6"/>
+ <w:LsdException Locked="false" Priority="61" Name="Light List Accent 6"/>
+ <w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 6"/>
+ <w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 6"/>
+ <w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 6"/>
+ <w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 6"/>
+ <w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 6"/>
+ <w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 6"/>
+ <w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 6"/>
+ <w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 6"/>
+ <w:LsdException Locked="false" Priority="70" Name="Dark List Accent 6"/>
+ <w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 6"/>
+ <w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 6"/>
+ <w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 6"/>
+ <w:LsdException Locked="false" Priority="19" QFormat="true"
+ Name="Subtle Emphasis"/>
+ <w:LsdException Locked="false" Priority="21" QFormat="true"
+ Name="Intense Emphasis"/>
+ <w:LsdException Locked="false" Priority="31" QFormat="true"
+ Name="Subtle Reference"/>
+ <w:LsdException Locked="false" Priority="32" QFormat="true"
+ Name="Intense Reference"/>
+ <w:LsdException Locked="false" Priority="33" QFormat="true" Name="Book Title"/>
+ <w:LsdException Locked="false" Priority="37" SemiHidden="true"
+ UnhideWhenUsed="true" Name="Bibliography"/>
+ UnhideWhenUsed="true" QFormat="true" Name="TOC Heading"/>
+ <w:LsdException Locked="false" Priority="41" Name="Plain Table 1"/>
+ <w:LsdException Locked="false" Priority="42" Name="Plain Table 2"/>
+ <w:LsdException Locked="false" Priority="43" Name="Plain Table 3"/>
+ <w:LsdException Locked="false" Priority="44" Name="Plain Table 4"/>
+ <w:LsdException Locked="false" Priority="45" Name="Plain Table 5"/>
+ <w:LsdException Locked="false" Priority="40" Name="Grid Table Light"/>
+ <w:LsdException Locked="false" Priority="46" Name="Grid Table 1 Light"/>
+ <w:LsdException Locked="false" Priority="47" Name="Grid Table 2"/>
+ <w:LsdException Locked="false" Priority="48" Name="Grid Table 3"/>
+ <w:LsdException Locked="false" Priority="49" Name="Grid Table 4"/>
+ <w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark"/>
+ <w:LsdException Locked="false" Priority="51" Name="Grid Table 6 Colorful"/>
+ <w:LsdException Locked="false" Priority="52" Name="Grid Table 7 Colorful"/>
+ <w:LsdException Locked="false" Priority="46"
+ Name="Grid Table 1 Light Accent 1"/>
+ <w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 1"/>
+ <w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 1"/>
+ <w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 1"/>
+ <w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 1"/>
+ <w:LsdException Locked="false" Priority="51"
+ Name="Grid Table 6 Colorful Accent 1"/>
+ <w:LsdException Locked="false" Priority="52"
+ Name="Grid Table 7 Colorful Accent 1"/>
+ Name="Grid Table 1 Light Accent 2"/>
+ <w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 2"/>
+ <w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 2"/>
+ <w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 2"/>
+ <w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 2"/>
+ Name="Grid Table 6 Colorful Accent 2"/>
+ Name="Grid Table 7 Colorful Accent 2"/>
+ Name="Grid Table 1 Light Accent 3"/>
+ <w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 3"/>
+ <w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 3"/>
+ <w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 3"/>
+ <w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 3"/>
+ Name="Grid Table 6 Colorful Accent 3"/>
+ Name="Grid Table 7 Colorful Accent 3"/>
+ Name="Grid Table 1 Light Accent 4"/>
+ <w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 4"/>
+ <w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 4"/>
+ <w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 4"/>
+ <w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 4"/>
+ Name="Grid Table 6 Colorful Accent 4"/>
+ Name="Grid Table 7 Colorful Accent 4"/>
+ Name="Grid Table 1 Light Accent 5"/>
+ <w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 5"/>
+ <w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 5"/>
+ <w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 5"/>
+ <w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 5"/>
+ Name="Grid Table 6 Colorful Accent 5"/>
+ Name="Grid Table 7 Colorful Accent 5"/>
+ Name="Grid Table 1 Light Accent 6"/>
+ <w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 6"/>
+ <w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 6"/>
+ <w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 6"/>
+ <w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 6"/>
+ Name="Grid Table 6 Colorful Accent 6"/>
+ Name="Grid Table 7 Colorful Accent 6"/>
+ <w:LsdException Locked="false" Priority="46" Name="List Table 1 Light"/>
+ <w:LsdException Locked="false" Priority="47" Name="List Table 2"/>
+ <w:LsdException Locked="false" Priority="48" Name="List Table 3"/>
+ <w:LsdException Locked="false" Priority="49" Name="List Table 4"/>
+ <w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark"/>
+ <w:LsdException Locked="false" Priority="51" Name="List Table 6 Colorful"/>
+ <w:LsdException Locked="false" Priority="52" Name="List Table 7 Colorful"/>
+ Name="List Table 1 Light Accent 1"/>
+ <w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 1"/>
+ <w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 1"/>
+ <w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 1"/>
+ <w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 1"/>
+ Name="List Table 6 Colorful Accent 1"/>
+ Name="List Table 7 Colorful Accent 1"/>
+ Name="List Table 1 Light Accent 2"/>
+ <w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 2"/>
+ <w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 2"/>
+ <w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 2"/>
+ <w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 2"/>
+ Name="List Table 6 Colorful Accent 2"/>
+ Name="List Table 7 Colorful Accent 2"/>
+ Name="List Table 1 Light Accent 3"/>
+ <w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 3"/>
+ <w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 3"/>
+ <w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 3"/>
+ <w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 3"/>
+ Name="List Table 6 Colorful Accent 3"/>
+ Name="List Table 7 Colorful Accent 3"/>
+ Name="List Table 1 Light Accent 4"/>
+ <w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 4"/>
+ <w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 4"/>
+ <w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 4"/>
+ <w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 4"/>
+ Name="List Table 6 Colorful Accent 4"/>
+ Name="List Table 7 Colorful Accent 4"/>
+ Name="List Table 1 Light Accent 5"/>
+ <w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 5"/>
+ <w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 5"/>
+ <w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 5"/>
+ <w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 5"/>
+ Name="List Table 6 Colorful Accent 5"/>
+ Name="List Table 7 Colorful Accent 5"/>
+ Name="List Table 1 Light Accent 6"/>
+ <w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 6"/>
+ <w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 6"/>
+ <w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 6"/>
+ <w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 6"/>
+ Name="List Table 6 Colorful Accent 6"/>
+ Name="List Table 7 Colorful Accent 6"/>
+ </w:LatentStyles>
+</xml><![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
- panose-1:2 4 5 3 5 4 6 3 2 4;}
+ panose-1:2 4 5 3 5 4 6 3 2 4;
+ mso-font-charset:204;
+ mso-generic-font-family:roman;
+ mso-font-pitch:variable;
+ mso-font-signature:-536869121 1107305727 33554432 0 415 0;}
{font-family:Consolas;
- panose-1:2 11 6 9 2 2 4 3 2 4;}
+ panose-1:2 11 6 9 2 2 4 3 2 4;
+ mso-generic-font-family:modern;
+ mso-font-pitch:fixed;
+ mso-font-signature:-536869121 64767 1 0 415 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
- {margin:0cm;
+ {mso-style-unhide:no;
+ mso-style-qformat:yes;
+ mso-style-parent:"";
+ margin:0cm;
margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
font-size:12.0pt;
- font-family:"Times New Roman",serif;}
+ font-family:"Times New Roman",serif;
+ mso-fareast-font-family:"Times New Roman";
+ mso-fareast-theme-font:minor-fareast;}
a:link, span.MsoHyperlink
- {color:blue;
- text-decoration:underline;}
+ {mso-style-noshow:yes;
+ mso-style-priority:99;
+ color:blue;
+ text-decoration:underline;
+ text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
- {color:purple;
+ color:purple;
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
- {mso-style-link:"\0422\0435\043A\0441\0442 \0417\043D\0430\043A";
+ mso-style-link:"\0422\0435\043A\0441\0442 \0417\043D\0430\043A";
+ mso-margin-top-alt:auto;
margin-right:0cm;
+ mso-margin-bottom-alt:auto;
margin-left:0cm;
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
+ mso-style-unhide:no;
span.a
{mso-style-name:"\0422\0435\043A\0441\0442 \0417\043D\0430\043A";
+ mso-style-noshow:yes;
+ mso-style-locked:yes;
mso-style-link:\0422\0435\043A\0441\0442;
- font-family:Consolas;}
+ font-family:Consolas;
+ mso-ascii-font-family:Consolas;
+ mso-hansi-font-family:Consolas;}
p.msochpdefault, li.msochpdefault, div.msochpdefault
{mso-style-name:msochpdefault;
font-size:10.0pt;
.MsoChpDefault
- {font-size:10.0pt;}
+ {mso-style-type:export-only;
+ mso-default-props:yes;
+ font-size:10.0pt;
+ mso-ansi-font-size:10.0pt;
+ mso-bidi-font-size:10.0pt;}
@page WordSection1
{size:595.3pt 841.9pt;
- margin:2.0cm 42.5pt 2.0cm 3.0cm;}
+ margin:2.0cm 42.5pt 2.0cm 3.0cm;
+ mso-header-margin:35.4pt;
+ mso-footer-margin:35.4pt;
+ mso-paper-source:0;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
- ol
+ @list l0
+ {mso-list-id:164901286;
+ mso-list-template-ids:-306444160;}
+@list l0:level1
+ {mso-level-number-format:bullet;
+ mso-level-text:\F0B7;
+ mso-level-tab-stop:36.0pt;
+ mso-level-number-position:left;
+ text-indent:-18.0pt;
+ font-family:Symbol;}
+@list l0:level2
+ mso-level-text:o;
+ mso-level-tab-stop:72.0pt;
+ font-family:"Courier New";
+ mso-bidi-font-family:"Times New Roman";}
+@list l0:level3
+ mso-level-tab-stop:108.0pt;
+@list l0:level4
+ mso-level-tab-stop:144.0pt;
+@list l0:level5
+ mso-level-tab-stop:180.0pt;
+@list l0:level6
+ mso-level-tab-stop:216.0pt;
+@list l0:level7
+ mso-level-tab-stop:252.0pt;
+@list l0:level8
+ mso-level-tab-stop:288.0pt;
+@list l0:level9
+ mso-level-tab-stop:324.0pt;
+@list l1
+ {mso-list-id:200677574;
+ mso-list-template-ids:758571580;}
+@list l1:level1
+@list l1:level2
+@list l1:level3
+@list l1:level4
+@list l1:level5
+@list l1:level6
+@list l1:level7
+@list l1:level8
+@list l1:level9
+@list l2
+ {mso-list-id:228927576;
+ mso-list-template-ids:-502489406;}
+@list l2:level1
+@list l2:level2
+@list l2:level3
+@list l2:level4
+@list l2:level5
+@list l2:level6
+@list l2:level7
+@list l2:level8
+@list l2:level9
+@list l3
+ {mso-list-id:251281917;
+ mso-list-template-ids:-1219040372;}
+@list l3:level1
+@list l3:level2
+@list l3:level3
+@list l3:level4
+@list l3:level5
+@list l3:level6
+@list l3:level7
+@list l3:level8
+@list l3:level9
+@list l4
+ {mso-list-id:433980886;
+ mso-list-template-ids:237137500;}
+@list l4:level1
+@list l4:level2
+@list l4:level3
+@list l4:level4
+@list l4:level5
+@list l4:level6
+@list l4:level7
+@list l4:level8
+@list l4:level9
+@list l5
+ {mso-list-id:476537612;
+ mso-list-template-ids:270069714;}
+@list l5:level1
+@list l5:level2
+@list l5:level3
+@list l5:level4
+@list l5:level5
+@list l5:level6
+@list l5:level7
+@list l5:level8
+@list l5:level9
+@list l6
+ {mso-list-id:600845363;
+ mso-list-template-ids:-644331142;}
+@list l6:level1
+@list l6:level2
+@list l6:level3
+@list l6:level4
+@list l6:level5
+@list l6:level6
+@list l6:level7
+@list l6:level8
+@list l6:level9
+@list l7
+ {mso-list-id:602373177;
+ mso-list-template-ids:-792038990;}
+@list l7:level1
+@list l7:level2
+@list l7:level3
+@list l7:level4
+@list l7:level5
+@list l7:level6
+@list l7:level7
+@list l7:level8
+@list l7:level9
+@list l8
+ {mso-list-id:680133499;
+ mso-list-template-ids:1718257104;}
+@list l8:level1
+@list l8:level2
+@list l8:level3
+@list l8:level4
+@list l8:level5
+@list l8:level6
+@list l8:level7
+@list l8:level8
+@list l8:level9
+@list l9
+ {mso-list-id:891891873;
+ mso-list-template-ids:-1828427382;}
+@list l9:level1
+@list l9:level2
+@list l9:level3
+@list l9:level4
+@list l9:level5
+@list l9:level6
+@list l9:level7
+@list l9:level8
+@list l9:level9
+@list l10
+ {mso-list-id:965427646;
+ mso-list-template-ids:-989691612;}
+@list l10:level1
+@list l10:level2
+@list l10:level3
+@list l10:level4
+@list l10:level5
+@list l10:level6
+@list l10:level7
+@list l10:level8
+@list l10:level9
+@list l11
+ {mso-list-id:1432240423;
+ mso-list-template-ids:1296728238;}
+@list l11:level1
+@list l11:level2
+@list l11:level3
+@list l11:level4
+@list l11:level5
+@list l11:level6
+@list l11:level7
+@list l11:level8
+@list l11:level9
+@list l12
+ {mso-list-id:1669750903;
+ mso-list-template-ids:-467488044;}
+@list l12:level1
+@list l12:level2
+@list l12:level3
+@list l12:level4
+@list l12:level5
+@list l12:level6
+@list l12:level7
+@list l12:level8
+@list l12:level9
+@list l13
+ {mso-list-id:1936283496;
+ mso-list-template-ids:396646646;}
+@list l13:level1
+@list l13:level2
+@list l13:level3
+@list l13:level4
+@list l13:level5
+@list l13:level6
+@list l13:level7
+@list l13:level8
+@list l13:level9
+@list l14
+ {mso-list-id:1958293951;
+ mso-list-template-ids:1544183164;}
+@list l14:level1
+@list l14:level2
+@list l14:level3
+@list l14:level4
+@list l14:level5
+@list l14:level6
+@list l14:level7
+@list l14:level8
+@list l14:level9
+@list l15
+ {mso-list-id:1958948297;
+ mso-list-template-ids:1619719050;}
+@list l15:level1
+@list l15:level2
+@list l15:level3
+@list l15:level4
+@list l15:level5
+@list l15:level6
+@list l15:level7
+@list l15:level8
+@list l15:level9
+@list l16
+ {mso-list-id:1974482144;
+ mso-list-template-ids:-2066172880;}
+@list l16:level1
+@list l16:level2
+@list l16:level3
+@list l16:level4
+@list l16:level5
+@list l16:level6
+@list l16:level7
+@list l16:level8
+@list l16:level9
+@list l17
+ {mso-list-id:2067219784;
+ mso-list-template-ids:1123439910;}
+@list l17:level1
+@list l17:level2
+@list l17:level3
+@list l17:level4
+@list l17:level5
+@list l17:level6
+@list l17:level7
+@list l17:level8
+@list l17:level9
+ol
{margin-bottom:0cm;}
ul
-->
</style>
+<!--[if gte mso 10]>
+ /* Style Definitions */
+ table.MsoNormalTable
+ {mso-style-name:"\041E\0431\044B\0447\043D\0430\044F \0442\0430\0431\043B\0438\0446\0430";
+ mso-tstyle-rowband-size:0;
+ mso-tstyle-colband-size:0;
+ mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
+ mso-para-margin:0cm;
+ mso-para-margin-bottom:.0001pt;
+ font-family:"Times New Roman",serif;}
+<![endif]--><!--[if gte mso 9]><xml>
+ <o:shapedefaults v:ext="edit" spidmax="1026"/>
+ <o:shapelayout v:ext="edit">
+ <o:idmap v:ext="edit" data="1"/>
+ </o:shapelayout></xml><![endif]-->
</head>
-<body bgcolor=white lang=RU link=blue vlink=purple>
+<body bgcolor=white lang=RU link=blue vlink=purple style='tab-interval:35.4pt'>
<div class=WordSection1>
<p class=MsoPlainText><b><span lang=FR style='font-size:13.5pt;font-family:
-"Courier New"'>Meshes :</span></b></p>
+"Courier New";mso-ansi-language:FR'>Meshes :</span></b></p>
<ul style='margin-top:0cm' type=disc>
- <li class=MsoNormal><span lang=FR><a href="actor/ActorD.dpr"><b>Actor</b></a><b> :</b></span></li>
+ <li class=MsoNormal style='mso-list:l4 level1 lfo1;tab-stops:list 36.0pt'><span
+ lang=FR style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+ FR'><a href="actor/ActorD.dpr"><b>Actor</b></a><b> :</b></span><span
+ style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></li>
<ul style='margin-top:0cm' type=circle>
- <li class=MsoNormal><span lang=FR>using the TGLActor object to load Quake II
- model (.md2)</span></li>
- <li class=MsoNormal><span lang=FR>displaying an actor's frame names</span></li>
- <li class=MsoNormal><span lang=FR>animating an actor (morph animation)</span></li>
+ <li class=MsoNormal style='mso-list:l4 level2 lfo1;tab-stops:list 72.0pt'><span
+ FR'>using the TGLActor object to load Quake II model (.md2)</span><span
+ lang=EN-US style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:
+ EN-US'><o:p></o:p></span></li>
+ FR'>displaying an actor's frame names</span><span style='mso-fareast-font-family:
+ "Times New Roman"'><o:p></o:p></span></li>
+ FR'>animating an actor (morph animation)</span><span lang=EN-US
+ style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US'><o:p></o:p></span></li>
</ul>
-<p class=MsoNormal><img border=0 width=451 height=314 src=Actor.jpg></p>
+<p class=MsoNormal><span style='mso-no-proof:yes'><img border=0 width=450
+height=314 id="_x0000_i1042" src=Actor.jpg></span></p>
- <li class=MsoNormal><span lang=FR><a href="actorproxy/ActorProxyD.dpr"><b>Actor
- Proxy</b></a> <b> :</b></span></li>
+ <li class=MsoNormal style='mso-list:l5 level1 lfo2;tab-stops:list 36.0pt'><span
+ FR'><a href="actorproxy/ActorProxyD.dpr"><b>Actor Proxy</b></a> <b> :</b></span><span
- <li class=MsoNormal><span lang=FR>using the TGLActorProxy object to load
- Quake II model (.md2)</span></li>
- <li class=MsoNormal><span lang=FR>animating actors</span></li>
+ <li class=MsoNormal style='mso-list:l5 level2 lfo2;tab-stops:list 72.0pt'><span
+ FR'>using the TGLActorProxy object to load Quake II model (.md2)</span><span
+ FR'>animating actors</span><span style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></li>
-<p class=MsoNormal><img border=0 width=455 height=360 src=ActorProxy.jpg></p>
+<p class=MsoNormal><span style='mso-no-proof:yes'><img border=0 width=455
+height=361 id="_x0000_i1041" src=ActorProxy.jpg></span></p>
-<p class=MsoNormal><span lang=EN-US> </span></p>
+<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'> </span></p>
- <li class=MsoNormal><span lang=FR><a href="actortwocam/ActorTwocamD.dpr"><b>ActorTwocam</b></a><b> :</b></span></li>
+ <li class=MsoNormal style='mso-list:l0 level1 lfo3;tab-stops:list 36.0pt'><span
+ FR'><a href="actortwocam/ActorTwocamD.dpr"><b>ActorTwocam</b></a><b> :</b></span><span
- <li class=MsoNormal><span lang=FR>moving a TGLActor (Quake II model with
- wepon) in a small scenery</span></li>
- <li class=MsoNormal><span lang=FR>doom-like (keyboard only) movement, with
- walk/run, turn/strafe</span></li>
- <li class=MsoNormal><span lang=FR>switching between first-person and
- third-person views</span></li>
+ <li class=MsoNormal style='mso-list:l0 level2 lfo3;tab-stops:list 72.0pt'><span
+ FR'>moving a TGLActor (Quake II model with wepon) in a small scenery</span><span
+ FR'>doom-like (keyboard only) movement, with walk/run, turn/strafe</span><span
+ FR'>switching between first-person and third-person views</span><span
+<p class=MsoNormal><span lang=EN-US style='mso-ansi-language:EN-US'> <o:p></o:p></span></p>
-<p class=MsoNormal><span lang=FR> </span><img border=0 width=450
-height=293 src=ActorTwocam.jpg></p>
+<p class=MsoNormal><span lang=FR style='mso-ansi-language:FR'> </span><span
+style='mso-no-proof:yes'><img border=0 width=450 height=293 id="_x0000_i1040"
+src=ActorTwocam.jpg></span></p>
- <li class=MsoNormal><span lang=FR><a href="centering/CenteringD.dpr"><b>Centering</b></a><b> :</b></span></li>
+ <li class=MsoNormal style='mso-list:l9 level1 lfo4;tab-stops:list 36.0pt'><span
+ FR'><a href="centering/CenteringD.dpr"><b>Centering</b></a><b> :</b></span><span
- <li class=MsoNormal><span lang=FR>using AutoCentering for a TFreeForm's mesh</span></li>
- <li class=MsoNormal><span lang=FR>effects of various AutoCentering options</span></li>
+ <li class=MsoNormal style='mso-list:l9 level2 lfo4;tab-stops:list 72.0pt'><span
+ FR'>using AutoCentering for a TFreeForm's mesh</span><span lang=EN-US
+ FR'>effects of various AutoCentering options</span><span
-<p class=MsoNormal><span lang=FR> </span><img border=0 width=445
-height=294 src=Centering.jpg></p>
+style='mso-no-proof:yes'><img border=0 width=445 height=294 id="_x0000_i1039"
+src=Centering.jpg></span></p>
-<p class=MsoNormal><span lang=FR> </span></p>
+<p class=MsoNormal><span lang=FR style='mso-ansi-language:FR'> </span></p>
-<p class=MsoNormal><span lang=FR> </span> </p>
+<p class=MsoNormal><span lang=FR style='mso-ansi-language:FR'> </span> </p>
- <li class=MsoNormal><span lang=FR><a href="CSG/CsgD.dpr"><b>Csg</b></a><b> :</b></span></li>
+ <li class=MsoNormal style='mso-list:l10 level1 lfo5;tab-stops:list 36.0pt'><span
+ FR'><a href="CSG/CsgD.dpr"><b>Csg</b></a><b> :</b></span><span
- <li class=MsoNormal><span lang=FR>Constructive Solid Geometry.</span></li>
- <li class=MsoNormal><span lang=FR>The CSG system uses BSP to optimize what
- triangles it considers.</span></li>
- <li class=MsoNormal><span lang=FR>Features: CSG_Union, CSG_Subtraction,
- CSG_Intersection.</span></li>
+ <li class=MsoNormal style='mso-list:l10 level2 lfo5;tab-stops:list 72.0pt'><span
+ FR'>Constructive Solid Geometry.</span><span style='mso-fareast-font-family:
+ FR'>The CSG system uses BSP to optimize what triangles it considers.</span><span
+ FR'>Features: CSG_Union, CSG_Subtraction, CSG_Intersection.</span><span
+lang=EN-US style='mso-ansi-language:EN-US'><o:p></o:p></span></p>
-<p class=MsoNormal><img border=0 width=454 height=382 src=Csg.jpg></p>
+<p class=MsoNormal><span style='mso-no-proof:yes'><img border=0 width=454
+height=382 id="_x0000_i1038" src=Csg.jpg></span></p>
- <li class=MsoNormal><span lang=FR><a href="ducky/DuckyD.dpr"><b>Ducky</b></a><b> :</b></span></li>
+ <li class=MsoNormal style='mso-list:l11 level1 lfo6;tab-stops:list 36.0pt'><span
+ FR'><a href="ducky/DuckyD.dpr"><b>Ducky</b></a><b> :</b></span><span
- <li class=MsoNormal><span lang=FR>Loading NURBS into a GLScene FreeForm/Actor
- object.</span></li>
- <li class=MsoNormal><span lang=FR>Use the resolution slider to increase or
- decrease the models triangle count dynamically.</span></li>
+ <li class=MsoNormal style='mso-list:l11 level2 lfo6;tab-stops:list 72.0pt'><span
+ FR'>Loading NURBS into a GLScene FreeForm/Actor object.</span><span
+ FR'>Use the resolution slider to increase or decrease the models triangle
+ count dynamically.</span><span lang=EN-US style='mso-fareast-font-family:
+ "Times New Roman";mso-ansi-language:EN-US'><o:p></o:p></span></li>
-<p class=MsoNormal><span lang=FR> </span><img border=0 width=458
-height=300 src=Ducky.jpg></p>
+style='mso-no-proof:yes'><img border=0 width=458 height=300 id="_x0000_i1037"
+src=Ducky.jpg></span></p>
- <li class=MsoNormal><span lang=FR><a href="expolygon/ExPolygonD.dpr"><strong>expolygon</strong></a>
- :</span></li>
+ <li class=MsoNormal style='mso-list:l3 level1 lfo7;tab-stops:list 36.0pt'><span
+ FR'><a href="expolygon/ExPolygonD.dpr"><strong>expolygon</strong></a> :</span><span
- <li class=MsoNormal><span lang=FR>using TMultiPolygon for rendering complex
- polygons</span></li>
- <li class=MsoNormal><span lang=FR>automatic tesselation of polygons with
- holes and cutoffs</span></li>
+ <li class=MsoNormal style='mso-list:l3 level2 lfo7;tab-stops:list 72.0pt'><span
+ FR'>using TMultiPolygon for rendering complex polygons</span><span
+ FR'>automatic tesselation of polygons with holes and cutoffs</span><span
-<p class=MsoNormal><img border=0 width=449 height=338 src=ExPolygon.jpg></p>
+<p class=MsoNormal><span style='mso-no-proof:yes'><img border=0 width=449
+height=338 id="_x0000_i1036" src=ExPolygon.jpg></span></p>
- <li class=MsoNormal><span lang=FR><a href="feedback/FeedbackD.dpr"><b>Feedback</b></a><b> :</b></span></li>
+ <li class=MsoNormal style='mso-list:l1 level1 lfo8;tab-stops:list 36.0pt'><span
+ FR'><a href="feedback/FeedbackD.dpr"><b>Feedback</b></a><b> :</b></span><span
- <li class=MsoNormal><span lang=FR>This demo shows how to use a GLFeedback
- object </span></li>
- <li class=MsoNormal><span lang=FR>to extract mesh data from regular GLScene
- objects.</span></li>
- <li class=MsoNormal><span lang=FR>The GLFeedback object</span></li>
+ <li class=MsoNormal style='mso-list:l1 level2 lfo8;tab-stops:list 72.0pt'><span
+ FR'>This demo shows how to use a GLFeedback object </span><span
+ FR'>to extract mesh data from regular GLScene objects.</span><span
+ FR'>The GLFeedback object</span><span style='mso-fareast-font-family:
+style='mso-no-proof:yes'><!--[if gte vml 1]><v:shapetype id="_x0000_t75"
+ coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe"
+ filled="f" stroked="f">
+ <v:stroke joinstyle="miter"/>
+ <v:formulas>
+ <v:f eqn="if lineDrawn pixelLineWidth 0"/>
+ <v:f eqn="sum @0 1 0"/>
+ <v:f eqn="sum 0 0 @1"/>
+ <v:f eqn="prod @2 1 2"/>
+ <v:f eqn="prod @3 21600 pixelWidth"/>
+ <v:f eqn="prod @3 21600 pixelHeight"/>
+ <v:f eqn="sum @0 0 1"/>
+ <v:f eqn="prod @6 1 2"/>
+ <v:f eqn="prod @7 21600 pixelWidth"/>
+ <v:f eqn="sum @8 21600 0"/>
+ <v:f eqn="prod @7 21600 pixelHeight"/>
+ <v:f eqn="sum @10 21600 0"/>
+ </v:formulas>
+ <v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"/>
+ <o:lock v:ext="edit" aspectratio="t"/>
+</v:shapetype><v:shape id="_x0420__x0438__x0441__x0443__x043d__x043e__x043a__x0020_18"
+ o:spid="_x0000_i1035" type="#_x0000_t75" style='width:333.6pt;height:286.8pt;
+ visibility:visible;mso-wrap-style:square'>
+ <v:imagedata src="aMeshes.files/image001.jpg" o:title=""/>
+</v:shape><![endif]--><![if !vml]><img border=0 width=445 height=382
+src="aMeshes.files/image002.jpg" v:shapes="_x0420__x0438__x0441__x0443__x043d__x043e__x043a__x0020_18"><![endif]></span></p>
- <li class=MsoNormal><span lang=FR><a href="formula/FormulaD.dpr"><b>Formula</b></a><b> :</b></span></li>
+ <li class=MsoNormal style='mso-list:l12 level1 lfo9;tab-stops:list 36.0pt'><span
+ FR'><a href="formula/FormulaD.dpr"><b>Formula</b></a><b> :</b></span><span
- <li class=MsoNormal><span lang=FR>using the TMesh object to plot a formula in
- 3D</span></li>
- <li class=MsoNormal><span lang=FR>triangle and triangle-strip meshes to make
- regular, grid-based, height-fields meshes</span></li>
+ <li class=MsoNormal style='mso-list:l12 level2 lfo9;tab-stops:list 72.0pt'><span
+ FR'>using the TMesh object to plot a formula in 3D</span><span
+ FR'>triangle and triangle-strip meshes to make regular, grid-based,
+ height-fields meshes</span><span lang=EN-US style='mso-fareast-font-family:
-<p class=MsoNormal><img border=0 width=537 height=280 src=Formula.jpg></p>
+<p class=MsoNormal><span style='mso-no-proof:yes'><img border=0 width=537
+height=280 id="_x0000_i1034" src=Formula.jpg></span></p>
- <li class=MsoNormal><span lang=FR><a href="mushroom/MushroomD.dpr"><b>Mushroom</b></a><b> :</b></span></li>
+ <li class=MsoNormal style='mso-list:l13 level1 lfo10;tab-stops:list 36.0pt'><span
+ FR'><a href="mushroom/MushroomD.dpr"><b>Mushroom</b></a><b> :</b></span><span
- <li class=MsoNormal><span lang=FR>using the TFreeForm to load a 3DStudio
- (.3DS) mesh</span></li>
- <li class=MsoNormal><span lang=FR>using TGLProxyObject to duplicate an object</span></li>
- <li class=MsoNormal><span lang=FR>uses fog and a textured "ground"</span></li>
+ <li class=MsoNormal style='mso-list:l13 level2 lfo10;tab-stops:list 72.0pt'><span
+ FR'>using the TFreeForm to load a 3DStudio (.3DS) mesh</span><span
+ FR'>using TGLProxyObject to duplicate an object</span><span lang=EN-US
+ FR'>uses fog and a textured "ground"</span><span lang=EN-US
-<p class=MsoNormal><img border=0 width=415 height=291 src=Mushroom.jpg></p>
+<p class=MsoNormal><span style='mso-no-proof:yes'><img border=0 width=415
+height=291 id="_x0000_i1033" src=Mushroom.jpg></span></p>
- <li class=MsoNormal><span lang=FR><a href="portal/PortalD.dpr"><b>Portal</b></a><b> :</b></span></li>
+ <li class=MsoNormal style='mso-list:l8 level1 lfo11;tab-stops:list 36.0pt'><span
+ FR'><a href="portal/PortalD.dpr"><b>Portal</b></a><b> :</b></span><span
- <li class=MsoNormal><span lang=FR>using the TPortal object to render indoor
- scenes</span></li>
- <li class=MsoNormal><span lang=FR>basic wolfenstein-like "level
- designer" for generating the maze mesh</span></li>
+ <li class=MsoNormal style='mso-list:l8 level2 lfo11;tab-stops:list 72.0pt'><span
+ FR'>using the TPortal object to render indoor scenes</span><span
+ FR'>basic wolfenstein-like "level designer" for generating the
+ maze mesh</span><span lang=EN-US style='mso-fareast-font-family:"Times New Roman";
+ mso-ansi-language:EN-US'><o:p></o:p></span></li>
-<p class=MsoNormal><span lang=FR> </span><img border=0 width=415
-height=262 src=Portal.jpg></p>
+style='mso-no-proof:yes'><img border=0 width=415 height=262 id="_x0000_i1032"
+src=Portal.jpg></span></p>
- <li class=MsoNormal><span lang=FR><a href="skeletal/SkeletalD.dpr"><b>Skeletal</b></a><b> :</b></span></li>
+ <li class=MsoNormal style='mso-list:l16 level1 lfo12;tab-stops:list 36.0pt'><span
+ FR'><a href="skeletal/SkeletalD.dpr"><b>Skeletal</b></a><b> :</b></span><span
- <li class=MsoNormal><span lang=FR>using the TActor object to an Half-Life
- model (.smd)</span></li>
- <li class=MsoNormal><span lang=FR>animating an actor (skeletal animation)</span></li>
+ <li class=MsoNormal style='mso-list:l16 level2 lfo12;tab-stops:list 72.0pt'><span
+ FR'>using the TActor object to an Half-Life model (.smd)</span><span
+ FR'>animating an actor (skeletal animation)</span><span lang=EN-US
-<p class=MsoNormal><span lang=FR> </span><img border=0 width=422
-height=354 src=Skeletal.jpg></p>
+style='mso-no-proof:yes'><img border=0 width=422 height=354 id="_x0000_i1031"
+src=Skeletal.jpg></span></p>
- <li class=MsoNormal><span lang=FR><a href="shadedterrain/ShadedTerrainD.dpr"><b>Shadedterrain</b></a><b> :</b></span></li>
+ <li class=MsoNormal style='mso-list:l6 level1 lfo13;tab-stops:list 36.0pt'><span
+ FR'><a href="shadedterrain/ShadedTerrainD.dpr"><b>Shadedterrain</b></a><b> :</b></span><span
- <li class=MsoNormal><span lang=FR>Shaded terrain rendering demo.</span></li>
- <li class=MsoNormal><span lang=FR>...</span></li>
+ <li class=MsoNormal style='mso-list:l6 level2 lfo13;tab-stops:list 72.0pt'><span
+ FR'>Shaded terrain rendering demo.</span><span style='mso-fareast-font-family:
+ FR'>...</span><span style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></li>
-<p class=MsoNormal><img border=0 width=430 height=274 src=ShadedTerrain.jpg></p>
+<p class=MsoNormal><span style='mso-no-proof:yes'><img border=0 width=430
+height=274 id="_x0000_i1030" src=ShadedTerrain.jpg></span></p>
<p class=MsoNormal> </p>
- <li class=MsoNormal><span lang=FR><a href="subdivide/SubdivideD.dpr"><b>Subdivide</b></a><b> :</b></span></li>
+ <li class=MsoNormal style='mso-list:l7 level1 lfo14;tab-stops:list 36.0pt'><span
+ FR'><a href="subdivide/SubdivideD.dpr"><b>Subdivide</b></a><b> :</b></span><span
- <li class=MsoNormal><span lang=FR>Early mesh subdivision refinement demo</span></li>
- <li class=MsoNormal><span lang=FR>MD2 format isn't really suited for
- refinement</span></li>
+ <li class=MsoNormal style='mso-list:l7 level2 lfo14;tab-stops:list 72.0pt'><span
+ FR'>Early mesh subdivision refinement demo</span><span style='mso-fareast-font-family:
+ FR'>MD2 format isn't really suited for refinement</span><span lang=EN-US
-<p class=MsoNormal><img border=0 width=434 height=309 src=Subdivide.jpg></p>
+<p class=MsoNormal><span style='mso-no-proof:yes'><img border=0 width=434
+height=309 id="_x0000_i1029" src=Subdivide.jpg></span></p>
- <li class=MsoNormal><span lang=FR><a href="synthterr/SynthTerrainD.dpr"><b>Synthterr</b></a><b> :</b></span></li>
+ <li class=MsoNormal style='mso-list:l2 level1 lfo15;tab-stops:list 36.0pt'><span
+ FR'><a href="synthterr/SynthTerrainD.dpr"><b>Synthterr</b></a><b> :</b></span><span
- <li class=MsoNormal><span lang=FR>using TTerrainRender and TGLCustomHDS</span></li>
- <li class=MsoNormal><span lang=FR>1D textures</span></li>
+ <li class=MsoNormal style='mso-list:l2 level2 lfo15;tab-stops:list 72.0pt'><span
+ FR'>using TTerrainRender and TGLCustomHDS</span><span style='mso-fareast-font-family:
+ FR'>1D textures</span><span style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></li>
-<p class=MsoNormal><img border=0 width=433 height=338 src=SynthTerrain.jpg></p>
+<p class=MsoNormal><span style='mso-no-proof:yes'><img border=0 width=433
+height=338 id="_x0000_i1028" src=SynthTerrain.jpg></span></p>
- <li class=MsoNormal><span lang=FR><a href="terrain/TerrainD.dpr"><b>Terrain</b></a><b> :</b></span></li>
+ <li class=MsoNormal style='mso-list:l17 level1 lfo16;tab-stops:list 36.0pt'><span
+ FR'><a href="terrain/TerrainD.dpr"><b>Terrain</b></a><b> :</b></span><span
- <li class=MsoNormal><span lang=FR>using TTerrainRender and TGLBitmapHDS to
- render a simple landscape</span></li>
- <li class=MsoNormal><span lang=FR>Full-screen mode and using
- THUDText/TBitmapFont for a FPS counter</span></li>
- <li class=MsoNormal><span lang=FR>Positional 3D sounds</span></li>
+ <li class=MsoNormal style='mso-list:l17 level2 lfo16;tab-stops:list 72.0pt'><span
+ FR'>using TTerrainRender and TGLBitmapHDS to render a simple landscape</span><span
+ FR'>Full-screen mode and using THUDText/TBitmapFont for a FPS counter</span><span
+ FR'>Positional 3D sounds</span><span style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></li>
-<p class=MsoNormal><img border=0 width=445 height=314 src=Terrain.jpg></p>
+<p class=MsoNormal><span style='mso-no-proof:yes'><img border=0 width=445
+height=314 id="_x0000_i1027" src=Terrain.jpg></span></p>
- <li class=MsoNormal><span lang=FR><a href="tiles/TilesD.dpr"><b>Tiles</b></a><b> :</b></span></li>
+ <li class=MsoNormal style='mso-list:l14 level1 lfo17;tab-stops:list 36.0pt'><span
+ FR'><a href="tiles/TilesD.dpr"><b>Tiles</b></a><b> :</b></span><span
- <li class=MsoNormal><span lang=FR>Illustrates the use of TGLTilePlane to
- render an area made of tiled textures placed in a grid.</span></li>
- <li class=MsoNormal><span lang=FR>The TGLTilePlane object</span></li>
+ <li class=MsoNormal style='mso-list:l14 level2 lfo17;tab-stops:list 72.0pt'><span
+ FR'>Illustrates the use of TGLTilePlane to render an area made of tiled
+ textures placed in a grid.</span><span lang=EN-US style='mso-fareast-font-family:
+ FR'>The TGLTilePlane object</span><span style='mso-fareast-font-family:
-<p class=MsoNormal><img border=0 width=446 height=323 src=Tiles.jpg></p>
+<p class=MsoNormal><span style='mso-no-proof:yes'><img border=0 width=446
+height=323 id="_x0000_i1026" src=Tiles.jpg></span></p>
- <li class=MsoNormal><span lang=FR><a href="tree/TreeD.dpr"><b>tree</b></a><b> :</b></span></li>
+ <li class=MsoNormal style='mso-list:l15 level1 lfo18;tab-stops:list 36.0pt'><span
+ FR'><a href="tree/TreeD.dpr"><b>tree</b></a><b> :</b></span><span
- <li class=MsoNormal><span lang=FR>GLTree Editor.</span></li>
- <li class=MsoNormal><span lang=FR>Interactive parameter changes display tree
- variations.</span></li>
+ <li class=MsoNormal style='mso-list:l15 level2 lfo18;tab-stops:list 72.0pt'><span
+ FR'>GLTree Editor.</span><span style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></li>
+ FR'>Interactive parameter changes display tree variations.</span><span
-<p class=MsoNormal><img border=0 width=448 height=378 src=Tree.jpg></p>
+<p class=MsoNormal><span style='mso-no-proof:yes'><img border=0 width=448
+height=378 id="_x0000_i1025" src=Tree.jpg></span></p>
-<p class=MsoNormal><span lang=FR><a href="../demos.htm">Back</a></span></p>
+<p class=MsoNormal><span lang=FR style='mso-ansi-language:FR'><a
+href="../demos.htm">Back</a></span></p>
</div>
@@ -19,7 +19,7 @@ object FormActor: TFormActor
Top = 38
Width = 683
Height = 430
- Camera = GLCamera1
+ Camera = Camera
Buffer.BackgroundColor = clSilver
FieldOfView = 56.516059875488280000
@@ -119,21 +119,21 @@ object FormActor: TFormActor
ShowHint = True
OnClick = SBFrameToFrameClick
- object Label1: TLabel
+ object lblAnimation: TLabel
Left = 8
Top = 14
Width = 52
Height = 13
Caption = 'Animation :'
- object LabelFPS: TLabel
- Left = 490
+ object lblDiskSlices: TLabel
+ Left = 466
Top = 12
- Width = 20
+ Width = 52
- Caption = 'FPS'
+ Caption = 'Disk Slices'
- object CBAnimations: TComboBox
+ object cbxAnimations: TComboBox
Left = 64
Top = 10
Width = 109
@@ -143,7 +143,7 @@ object FormActor: TFormActor
ParentShowHint = False
- OnChange = CBAnimationsChange
+ OnChange = cbxAnimationsChange
object BBLoadWeapon: TBitBtn
Left = 351
@@ -154,7 +154,7 @@ object FormActor: TFormActor
OnClick = BBLoadWeaponClick
- object CBSmooth: TCheckBox
+ object chbSmooth: TCheckBox
Left = 280
Top = 11
Width = 65
@@ -163,35 +163,51 @@ object FormActor: TFormActor
State = cbChecked
- OnClick = CBSmoothClick
+ OnClick = chbSmoothClick
+ object cbxDiskSlices: TComboBox
+ Left = 540
+ Top = 11
+ Width = 93
+ Height = 21
+ TabOrder = 3
+ OnChange = cbxDiskSlicesChange
+ '3'
+ '4'
+ '5'
+ '6'
+ '12'
+ '64')
Left = 24
Top = 48
- object DummyCube1: TGLDummyCube
+ object DummyCube: TGLDummyCube
- object GLLightSource1: TGLLightSource
+ object LightSource: TGLLightSource
Ambient.Color = {0000803F0000803F0000803F0000803F}
ConstAttenuation = 1.000000000000000000
Position.Coordinates = {0000204100000000000020410000803F}
LightStyle = lsOmni
SpotCutOff = 180.000000000000000000
- object GLCamera1: TGLCamera
+ object Camera: TGLCamera
DepthOfView = 1000.000000000000000000
FocalLength = 400.000000000000000000
- TargetObject = DummyCube1
+ TargetObject = DummyCube
Position.Coordinates = {00009041000080410000C0400000803F}
Direction.Coordinates = {2EF964BF2EF9E43E0000000000000000}
Up.Coordinates = {00000000000000000000803F00000000}
- object Disk1: TGLDisk
+ object DiskRing: TGLDisk
Material.Texture.MinFilter = miLinear
Position.Coordinates = {0000000000000000000080BF0000803F}
+ InnerRadius = 2.000000000000000000
Loops = 1
- OuterRadius = 3.000000000000000000
- Slices = 100
+ OuterRadius = 5.000000000000000000
+ Slices = 3
SweepAngle = 360.000000000000000000
@@ -31,10 +31,10 @@ uses
TFormActor = class(TForm)
- GLCamera1: TGLCamera;
- GLLightSource1: TGLLightSource;
- DummyCube1: TGLDummyCube;
- Disk1: TGLDisk;
+ Camera: TGLCamera;
+ LightSource: TGLLightSource;
+ DummyCube: TGLDummyCube;
+ DiskRing: TGLDisk;
Actor1: TGLActor;
Actor2: TGLActor;
@@ -43,13 +43,14 @@ type
Panel1: TPanel;
SBPlay: TSpeedButton;
SBStop: TSpeedButton;
- CBAnimations: TComboBox;
+ cbxAnimations: TComboBox;
BBLoadWeapon: TBitBtn;
SBFrameToFrame: TSpeedButton;
- Label1: TLabel;
- CBSmooth: TCheckBox;
+ lblAnimation: TLabel;
+ chbSmooth: TCheckBox;
Timer1: TTimer;
- LabelFPS: TLabel;
+ lblDiskSlices: TLabel;
+ cbxDiskSlices: TComboBox;
procedure GLSceneViewer1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure GLSceneViewer1MouseMove(Sender: TObject; Shift: TShiftState;
@@ -60,17 +61,17 @@ type
procedure SBStopClick(Sender: TObject);
procedure BBLoadWeaponClick(Sender: TObject);
- procedure CBAnimationsChange(Sender: TObject);
+ procedure cbxAnimationsChange(Sender: TObject);
procedure SBFrameToFrameClick(Sender: TObject);
procedure Actor1FrameChanged(Sender: TObject);
- procedure CBSmoothClick(Sender: TObject);
+ procedure chbSmoothClick(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
procedure GLCadencer1Progress(Sender: TObject;
const deltaTime, newTime: Double);
+ procedure cbxDiskSlicesChange(Sender: TObject);
mdx, mdy: Integer;
var
@@ -87,10 +88,10 @@ procedure TFormActor.FormCreate(Sender: TObject);
// Load Texture for ground disk
- Disk1.Material.Texture.Image.LoadFromFile('clover.jpg');
- Disk1.Material.Texture.Disabled := False;
+ DiskRing.Material.Texture.Image.LoadFromFile('clover.jpg');
+ DiskRing.Material.Texture.Disabled := False;
- // Load Actor into GLScene
+ // Load Actor from file
Actor1.LoadFromFile('waste.md2');
Actor1.Material.Texture.Image.LoadFromFile('waste.jpg');
@@ -104,10 +105,13 @@ begin
Actor1.Scale.SetVector(0.04, 0.04, 0.04, 0);
// Send animation names to the combo, to allow user selection
- Actor1.Animations.SetToStrings(CBAnimations.Items);
+ Actor1.Animations.SetToStrings(cbxAnimations.Items);
// Force state to stand (first in list)
- CBAnimations.ItemIndex := 0;
- CBAnimationsChange(Self);
+ cbxAnimations.ItemIndex := 0;
+ cbxAnimationsChange(Self);
+ cbxDiskSlices.ItemIndex := 5; // 64
+ cbxDiskSlicesChange(Self);
procedure TFormActor.SBPlayClick(Sender: TObject);
@@ -147,10 +151,11 @@ begin
Actor2.Synchronize(Actor1);
-procedure TFormActor.CBAnimationsChange(Sender: TObject);
+// Combo Box with Animations
+procedure TFormActor.cbxAnimationsChange(Sender: TObject);
// Change animation
- Actor1.SwitchToAnimation(CBAnimations.Text, True);
+ Actor1.SwitchToAnimation(cbxAnimations.Text, True);
// Normally actors for Quake II Model have one number of frames
// for all states 198 for actors and 172 for weapon,
@@ -161,6 +166,21 @@ begin
+procedure TFormActor.cbxDiskSlicesChange(Sender: TObject);
+// DiskRing.Slices := StrToInt(cbxDiskSlices.Items[cbxDiskSlices.ItemIndex]);
+// (* the same
+ case cbxDiskSlices.ItemIndex of
+ 0: DiskRing.Slices := StrToInt(cbxDiskSlices.Items[0]); // 3
+ 1: DiskRing.Slices := StrToInt(cbxDiskSlices.Items[1]); // 4
+ 2: DiskRing.Slices := StrToInt(cbxDiskSlices.Items[2]); // 5
+ 3: DiskRing.Slices := StrToInt(cbxDiskSlices.Items[3]); // 6
+ 4: DiskRing.Slices := StrToInt(cbxDiskSlices.Items[4]); // 12;
+ 5: DiskRing.Slices := StrToInt(cbxDiskSlices.Items[5]); // 64;
+// *)
procedure TFormActor.SBFrameToFrameClick(Sender: TObject);
// Animate Frame to Frame
@@ -168,10 +188,10 @@ begin
Actor2.NextFrame;
-procedure TFormActor.CBSmoothClick(Sender: TObject);
+procedure TFormActor.chbSmoothClick(Sender: TObject);
// Smooth movement is achieved by using linear frame interpolation
- if CBSmooth.Checked then
+ if chbSmooth.Checked then
Actor1.FrameInterpolation := afpLinear;
Actor2.FrameInterpolation := afpLinear;
@@ -188,10 +208,7 @@ begin
StatusBar1.SimpleText := 'CurrentFrame = ' + IntToStr(Actor1.CurrentFrame);
-//
// events that follow handle camera movements and FPS rate
procedure TFormActor.GLSceneViewer1MouseDown(Sender: TObject; Button: TMouseButton;
@@ -205,7 +222,7 @@ procedure TFormActor.GLSceneViewer1MouseMove(Sender: TObject; Shift: TShiftState
// (we're moving around the parent and target dummycube)
if Shift <> [] then
- GLCamera1.MoveAroundTarget(mdy - Y, mdx - X);
+ Camera.MoveAroundTarget(mdy - Y, mdx - X);
mdx := X;
mdy := Y;
@@ -215,12 +232,12 @@ procedure TFormActor.FormMouseWheel(Sender: TObject; Shift: TShiftState;
// Note that 1 wheel-step induces a WheelDelta of 120,
// this code adjusts the distance to target with a 10% per wheel-step ratio
- GLCamera1.AdjustDistanceToTarget(Power(1.1, WheelDelta / 120));
+ Camera.AdjustDistanceToTarget(Power(1.1, WheelDelta / 120));
procedure TFormActor.Timer1Timer(Sender: TObject);
- LabelFPS.Caption := Format('%.1f FPS', [GLSceneViewer1.FramesPerSecond]);
+ StatusBar1.Panels[0].Text := Format(' FPS ' + '%.1f', [GLSceneViewer1.FramesPerSecond]);
GLSceneViewer1.ResetPerformanceMonitor;
@@ -2,31 +2,26 @@ object FormActorTwocam: TFormActorTwocam
Left = 77
Top = 70
Caption = 'Actor with Two Cameras'
- ClientHeight = 498
- ClientWidth = 821
+ ClientHeight = 398
+ ClientWidth = 657
WindowState = wsMaximized
- Top = 31
- Width = 821
- Height = 467
+ Top = 25
+ Width = 657
+ Height = 373
Camera = GLCamera2
Buffer.BackgroundColor = clGreen
- FieldOfView = 133.632431030273400000
+ FieldOfView = 123.600204467773400000
@@ -34,71 +29,51 @@ object FormActorTwocam: TFormActorTwocam
Align = alTop
- Left = 440
- Width = 103
- Height = 16
+ Left = 352
+ Top = 6
+ Width = 76
+ Height = 14
Caption = 'F7 Third Person'
object Label4: TLabel
- Left = 560
- Width = 107
+ Left = 448
+ Width = 83
Caption = 'F8 First Person'
- Width = 423
+ Width = 324
'Use arrow keys to move, CTRL to strafe , SHIFT to run , ESC to e' +
'xit'
object CBMouseLook: TCheckBox
- Left = 690
- Top = 5
+ Left = 552
+ Top = 4
Caption = '&Mouse Look'
OnClick = CBMouseLookClick
@@ -8,7 +8,7 @@
<ProjectVersion>19.4</ProjectVersion>
- <Platform Condition="'$(Platform)'==''">Win64</Platform>
+ <Platform Condition="'$(Platform)'==''">Win32</Platform>
<Base>true</Base>
@@ -2,93 +2,74 @@ object FormCentering: TFormCentering
Left = 160
Top = 105
Caption = 'Centering'
- ClientHeight = 315
- ClientWidth = 711
+ ClientHeight = 408
+ ClientWidth = 574
+ TextHeight = 14
- Top = 51
- Width = 680
- Height = 264
+ Width = 549
+ Height = 367
Buffer.BackgroundColor = 11447982
- FieldOfView = 72.507675170898440000
+ FieldOfView = 91.103324890136720000
+ ExplicitWidth = 545
+ ExplicitHeight = 329
object TrackBar1: TTrackBar
- Left = 680
- Width = 31
+ Left = 549
+ Width = 25
Max = 80
Min = -80
Orientation = trVertical
Frequency = 10
- ThumbLength = 13
+ ThumbLength = 10
OnChange = TrackBar1Change
+ ExplicitLeft = 544
+ ExplicitHeight = 211
- Width = 711
- Height = 51
+ Width = 574
+ Height = 41
+ ExplicitWidth = 569
- Left = 70
- Width = 88
+ Left = 56
+ Width = 68
Caption = 'Centered X, Y'
- Left = 290
- Width = 72
+ Left = 232
+ Width = 55
Caption = 'Centered Y'
- Left = 510
- Width = 102
+ Left = 408
+ Width = 80
Caption = 'Centered X, Y, Z'
@@ -1,4 +1,5 @@
-{: This demo shows how to use a GLFeedback object to
+(*
+ This demo shows how to use a GLFeedback object to
extract mesh data from regular GLScene objects.
The GLFeedback object uses the GL_FEEDBACK render
@@ -16,8 +17,7 @@
returned will be per index value. They can either
be used in a TFGIndexTexCoordList or resampled for
use with other facegroup types.
-}
+*)
program FeedbackD;
uses
@@ -47,7 +47,7 @@ void __fastcall TForm1::Button1Click(TObject *Sender)
GLSceneViewer1->Buffer->Render(GLFeedback1);
// Hide the child objects we rendered
- MeshObject1->Visible = false;
+ /// MeshObject1->Visible = false; /// need to be true
// Create a new mesh object in our freeform
// Delphi - mo := TGLMeshObject.CreateOwned(GLFreeForm1.MeshObjects);
@@ -66,7 +66,7 @@ void __fastcall TForm1::Button1Click(TObject *Sender)
// (comments from first mesh object apply here also)
MeshObject2->Visible = true;
- MeshObject2->Visible = false;
+ /// MeshObject2->Visible = false; /// need to be true
// Vertex indices are required for smooth normals
// in Delphi - mo := TGLMeshObject.CreateOwned(GLFreeForm1.MeshObjects);
@@ -2,30 +2,25 @@ object Form1: TForm1
Caption = 'Feedback'
- ClientWidth = 501
+ ClientHeight = 252
+ ClientWidth = 401
Font.Name = 'Tahoma'
- TextHeight = 17
- Width = 501
- Height = 315
+ Width = 401
+ Height = 252
Buffer.AmbientColor.Color = {0000000000000000000000000000803F}
- FieldOfView = 144.774841308593800000
+ FieldOfView = 136.711135864257800000
@@ -33,14 +28,10 @@ object Form1: TForm1
object Button1: TButton
- Left = 190
+ Left = 152
+ Width = 75
Caption = 'Build Mesh'
OnClick = Button1Click
@@ -2,44 +2,39 @@ object FormFeedback: TFormFeedback
Left = 192
Top = 107
- ClientHeight = 221
- ClientWidth = 445
+ ClientWidth = 481
- Width = 445
- Height = 221
+ Width = 481
+ Buffer.BackgroundColor = clTeal
- FieldOfView = 131.307571411132800000
+ ExplicitWidth = 373
+ ExplicitHeight = 214
+ Left = 200
+ Top = 24
@@ -66,7 +61,6 @@ object FormFeedback: TFormFeedback
MaxBufferSize = 1048576
Active = False
Mode = fm3DColorTexture
- Visible = False
object MeshObject1: TGLDummyCube
Visible = False
@@ -29,14 +29,14 @@ type
- GLCube1: TGLCube;
GLFreeForm1: TGLFreeForm;
Button1: TButton;
GLFeedback1: TGLFeedback;
- GLDodecahedron1: TGLDodecahedron;
MeshObject1: TGLDummyCube;
MeshObject2: TGLDummyCube;
+ GLCube1: TGLCube;
GLSphere1: TGLSphere;
+ GLDodecahedron1: TGLDodecahedron;
procedure Button1Click(Sender: TObject);
@@ -65,7 +65,7 @@ begin
// objects into it's buffer
GLFeedback1.Active := True;
- // Process the first mesh object (GLCube and GLDodecahedron)
+ (* Process the first mesh object (GLCube and GLDodecahedron) *)
// Make the objects visible that we want to buffer
MeshObject1.Visible := True;
@@ -75,7 +75,7 @@ begin
GLSceneViewer1.Buffer.Render(GLFeedback1);
- MeshObject1.Visible := False;
+ /// MeshObject1.Visible := False;
mo := TGLMeshObject.CreateOwned(GLFreeForm1.MeshObjects);
@@ -83,16 +83,15 @@ begin
// Process the feedback buffer for polygon data
// and build a mesh (normals are recalculated
- // since feedback only yields position and
- // texcoords)
- GLFeedback1.BuildMeshFromBuffer(
- mo.Vertices, mo.Normals, mo.Colors, mo.TexCoords, nil);
+ // since feedback only yields position and texcoords)
+ GLFeedback1.BuildMeshFromBuffer(mo.Vertices, mo.Normals, mo.Colors, mo.TexCoords, nil);
// Process the second mesh object (GLSphere)
MeshObject2.Visible := True;
- MeshObject2.Visible := False;
+ /// MeshObject2.Visible := False;
@@ -1,14 +1,14 @@
-{: Generates a 3D mesh from a height-field function.
+ Generates a 3D mesh from a height-field function.
The left viewer shows a triangle-based mesh, the right viewer uses a
triangle-strip-based mesh, both mesh are based on the same height-field and
have the same resolution.
- This sample wants to demonstrate a few things :<ul>
- <li>how to define a mesh (triangle & triangle strip)
- <li>what the default normal calculations looks like
- <li>TriangleStrips are faster, but slightly more complex to use
- </ul>
+ This sample wants to demonstrate a few things :
+ - how to define a mesh (triangle & triangle strip)
+ - what the default normal calculations looks like
+ - TriangleStrips are faster, but slightly more complex to use
In triangle mode, the normals are computed on a triangle basis, hence the
facetted look, for triangle-strip, they are computed for each vertex based
@@ -24,12 +24,12 @@
Sample framerates (K7-500 + GeForce 256), 20000 triangles (cResolution=50) :
- mmTriangles : 53 FPS
- mmTriangleStrip : 202 FPS
program FormulaD;
Forms,
- fFormulaD in 'fFormulaD.pas' {FormFormula};
+ fFormulaD in 'fFormulaD.pas';
{$R *.RES}
@@ -4,28 +4,23 @@ object FormTerrain: TFormTerrain
BorderStyle = bsNone
Caption = 'FormTerrain'
- ClientHeight = 506
- ClientWidth = 754
+ ClientHeight = 405
+ ClientWidth = 603
OnKeyPress = FormKeyPress
OnMouseWheel = FormMouseWheel
- Width = 754
- Height = 506
+ Width = 603
+ Height = 405
Buffer.FogEnvironment.FogColor.Color = {0000803F0000803F0000803F0000803F}
Buffer.FogEnvironment.FogStart = 200.000000000000000000
@@ -34,7 +29,7 @@ object FormTerrain: TFormTerrain
Buffer.BackgroundColor = clGray
Buffer.FogEnable = True
Buffer.Lighting = False
- FieldOfView = 157.641555786132800000
+ FieldOfView = 152.260620117187500000
@@ -2,28 +2,23 @@ object FormEvents: TFormEvents
Top = 106
Caption = 'Events'
- ClientHeight = 378
- ClientWidth = 629
+ ClientHeight = 302
+ ClientWidth = 503
- Width = 629
- Height = 378
+ Width = 503
+ Height = 302
Camera = Camera1
- FieldOfView = 150.363708496093800000
+ FieldOfView = 143.357925415039100000
@@ -18,7 +18,7 @@ uses
GLS.Cadencer,
GLS.SceneViewer,
GLS.TimeEventsMgr,
GLS.BaseClasses;
@@ -52,38 +52,38 @@ implementation
procedure TFormEvents.Timer1Timer(Sender: TObject);
- Caption:= 'Events ' + Format(' TIME: %.4f', [GLCadencer1.CurrentTime]);
- GLSceneViewer1.ResetPerformanceMonitor;
+ Caption := 'Events ' + Format(' TIME: %.4f', [GLCadencer1.CurrentTime]);
+ GLSceneViewer1.ResetPerformanceMonitor;
procedure TFormEvents.GLTimeEventsMGR1Events0Event(event: TTimeEvent);
- Cube1.RollAngle:=event.ElapsedTime*180/3;
+ Cube1.RollAngle := event.ElapsedTime * 180 / 3;
procedure TFormEvents.GLTimeEventsMGR1Events1Event(event: TTimeEvent);
- Cube2.RollAngle:=event.TickCount/499*180;
+ Cube2.RollAngle := event.TickCount / 499 * 180;
procedure TFormEvents.GLTimeEventsMGR1Events2Event(event: TTimeEvent);
- Cube3.RollAngle:=90;
+ Cube3.RollAngle := 90;
procedure TFormEvents.GLTimeEventsMGR1Events3Event(event: TTimeEvent);
- Cube1.RollAngle:=event.TickCount/4*90;
+ Cube1.RollAngle := event.TickCount / 4 * 90;
procedure TFormEvents.GLTimeEventsMGR1Events4Event(event: TTimeEvent);
- Cube2.RollAngle:=event.TickCount/20*90;
+ Cube2.RollAngle := event.TickCount / 20 * 90;
procedure TFormEvents.GLTimeEventsMGR1Events5Event(event: TTimeEvent);
- Cube3.RollAngle:=event.TickCount/200*90;
+ Cube3.RollAngle := event.TickCount / 200 * 90;
@@ -2,8 +2,8 @@ object FormObjmove: TFormObjmove
Left = 87
Caption = 'Moving Objects with Mouse'
- ClientHeight = 628
- ClientWidth = 832
+ ClientHeight = 502
+ ClientWidth = 666
ParentFont = True
@@ -12,123 +12,84 @@ object FormObjmove: TFormObjmove
OnKeyUp = FormKeyUp
- OnMouseWheel = FormMouseWheel
TextHeight = 20
object Scn: TGLSceneViewer
- Left = 201
+ Left = 161
- Width = 631
- Height = 605
+ Width = 505
+ Height = 484
Camera = GLCamera
- FieldOfView = 36.478870391845700000
+ FieldOfView = 29.538454055786130000
OnMouseDown = ScnMouseDown
OnMouseMove = ScnMouseMove
- ExplicitWidth = 598
- ExplicitHeight = 582
- Width = 201
+ Width = 161
Align = alLeft
BevelOuter = bvNone
- ExplicitHeight = 563
- Height = 40
+ Height = 60
Caption = 'Select and move with the mouse any of the cubes.'
ShowAccelChar = False
- ExplicitWidth = 171
+ ExplicitWidth = 146
+ Top = 60
Height = 40
Caption = 'Default movement is on the XY plane.'
- ExplicitTop = 75
- ExplicitWidth = 188
+ ExplicitWidth = 159
- Top = 80
+ Top = 100
Caption = 'Shift + Drag moves on the XZ plane.'
- ExplicitTop = 125
- ExplicitWidth = 200
+ ExplicitWidth = 153
- Left = 773
- Width = 193
+ Left = 618
+ Width = 155
Caption = 'Near: (0,0) Eye -> Obj'
object GroupBox1: TGroupBox
- Top = 120
- Height = 53
+ Top = 140
+ Height = 42
Caption = 'Options'
object ShowAxes: TCheckBox
- Left = 6
- Top = 23
- Width = 182
+ Left = 5
+ Width = 145
Caption = 'Show selection axes'
@@ -139,16 +100,10 @@ object FormObjmove: TFormObjmove
object StatusBar1: TStatusBar
- Top = 605
- Width = 832
- Height = 23
+ Top = 484
+ Width = 666
Panels = <>
- ExplicitTop = 563
- ExplicitWidth = 785
Left = 296
@@ -169,6 +124,7 @@ object FormObjmove: TFormObjmove
object DummyCube: TGLDummyCube
Position.Coordinates = {0000803F0000803F0000003F0000803F}
+ Visible = False
CubeSize = 0.200000002980232200
EdgeColor.Color = {DEDD5D3FDEDD5D3FE9E8683F0000803F}
@@ -2,32 +2,27 @@ object Form1: TForm1
Caption = 'Bunny Bump Shader'
- ClientHeight = 546
- ClientWidth = 703
+ ClientHeight = 437
+ ClientWidth = 562
OnResize = FormResize
- Top = 71
- Width = 703
- Height = 475
+ Top = 57
+ Width = 562
+ Height = 380
Camera = Camera
BeforeRender = GLSceneViewer1BeforeRender
- FieldOfView = 156.222686767578100000
+ FieldOfView = 150.512878417968800000
@@ -37,56 +32,36 @@ object Form1: TForm1
- Height = 71
+ Height = 57
+ Width = 70
+ Height = 13
Caption = 'Shade Method'
- Left = 460
- Width = 92
+ Left = 368
+ Width = 72
Caption = 'Specular Mode'
object LabelFPS: TLabel
- Left = 643
- Top = 33
- Width = 26
+ Left = 514
+ Top = 26
+ Width = 20
Caption = 'FPS'
object ComboBox1: TComboBox
- Top = 30
- Width = 181
- Height = 24
Style = csDropDownList
ItemIndex = 0
@@ -96,116 +71,80 @@ object Form1: TForm1
'Per-Vertex')
- Top = 13
- Width = 212
+ Top = 10
+ Width = 169
Caption = 'Lights'
object ShapeWhite: TShape
- Left = 40
- Top = 20
- Width = 21
+ Width = 17
Hint = 'White'
OnMouseDown = ShapeMouseDown
object ShapeRed: TShape
- Left = 110
+ Left = 88
Hint = 'Red'
Brush.Color = clRed
object ShapeBlue: TShape
- Left = 180
+ Left = 144
Hint = 'Blue'
Brush.Color = clBlue
object cbWhite: TCheckBox
- Left = 11
- Width = 22
+ Left = 9
OnClick = CheckBoxClick
object cbRed: TCheckBox
- Left = 81
+ Left = 65
object cbBlue: TCheckBox
- Left = 151
+ Left = 121
object CheckBox4: TCheckBox
- Left = 573
+ Left = 458
Caption = 'Spin'
object ComboBox2: TComboBox
- Left = 464
- Width = 91
+ Left = 371
+ Width = 73
<TargetedPlatforms>3</TargetedPlatforms>
<Platform Condition="'$(Platform)'==''">Win64</Platform>
@@ -1241,17 +1241,17 @@
@@ -2317,6 +2317,8 @@ object FormPFXGallery: TFormPFXGallery
Height = 16.000000000000000000
Width = 8.000000000000000000
+ XTiles = 0
+ YTiles = 0
object ICE: TGLSpaceText
<ProjectGuid>{D4639F58-1087-4AB4-9C02-65CA2BD9C1E4}</ProjectGuid>
<MainSource>ParticleMaskingC.cpp</MainSource>
@@ -100,7 +100,7 @@
<ILINK_TranslatedLibraryPath>$(BDSLIB)\$(PLATFORM)\debug\$(LANGDIR);$(ILINK_TranslatedLibraryPath)</ILINK_TranslatedLibraryPath>
<LinkPackageImports>rtl.bpi;vcl.bpi;GLScene_RT.bpi;xmlrtl.bpi;vclimg.bpi</LinkPackageImports>
@@ -197,135 +197,135 @@
- <DeployFile LocalName=".\Win32\Debug\ParticleMaskingC.tds" Configuration="Debug" Class="DebugSymbols">
- <RemoteName>ParticleMaskingC.tds</RemoteName>
- <DeployFile LocalName=".\Win32\Debug\ParticleMaskingC.exe" Configuration="Debug" Class="ProjectOutput">
- <RemoteName>ParticleMaskingC.exe</RemoteName>
+ <DeployFile LocalName=".\Win32\Debug\ParticleMaskingC.exe" Configuration="Debug" Class="ProjectOutput">
+ <RemoteName>ParticleMaskingC.exe</RemoteName>
+ <DeployFile LocalName=".\Win32\Debug\ParticleMaskingC.tds" Configuration="Debug" Class="DebugSymbols">
+ <RemoteName>ParticleMaskingC.tds</RemoteName>
@@ -1450,17 +1450,17 @@
<ProjectGuid>{E40C5E98-F262-45D2-8EA8-AE68BF358D83}</ProjectGuid>
<MainSource>ShadowPlaneC.cpp</MainSource>
@@ -214,78 +214,77 @@
- <DeployFile LocalName=".\ShadowPlaneC.tds" Configuration="Debug" Class="DebugSymbols">
- <RemoteName>ShadowPlaneC.tds</RemoteName>
@@ -295,43 +294,43 @@
@@ -341,8 +340,9 @@
+ <DeployFile LocalName=".\ShadowPlaneC.tds" Configuration="Debug" Class="DebugSymbols">
+ <RemoteName>ShadowPlaneC.tds</RemoteName>
@@ -1467,17 +1467,17 @@
<ProjectGuid>{07638790-44BF-45A8-8F42-5473E949DEA0}</ProjectGuid>
<MainSource>ShadowFBOC.cpp</MainSource>
@@ -155,156 +155,156 @@
- <DeployFile LocalName=".\Win32\Debug\Project4.tds" Configuration="Debug" Class="DebugSymbols"/>
- <DeployFile LocalName=".\Win32\Debug\ShadowFBOC.tds" Configuration="Debug" Class="DebugSymbols">
- <RemoteName>ShadowFBOC.tds</RemoteName>
- <DeployFile LocalName=".\Win32\Debug\ShadowFBOC.exe" Configuration="Debug" Class="ProjectOutput">
- <RemoteName>ShadowFBOC.exe</RemoteName>
+ <DeployFile LocalName=".\Win32\Debug\Project4.tds" Configuration="Debug" Class="DebugSymbols"/>
+ <DeployFile LocalName=".\Win32\Debug\ShadowFBOC.exe" Configuration="Debug" Class="ProjectOutput">
+ <RemoteName>ShadowFBOC.exe</RemoteName>
+ <DeployFile LocalName=".\Win32\Debug\ShadowFBOC.tds" Configuration="Debug" Class="DebugSymbols">
+ <RemoteName>ShadowFBOC.tds</RemoteName>
@@ -1430,17 +1430,17 @@
@@ -1245,17 +1245,17 @@
@@ -1268,17 +1268,17 @@
<ProjectGuid>{BFDF644D-4464-4349-B46B-54516A5BFA83}</ProjectGuid>
<MainSource>BoomC.cpp</MainSource>
<LinkPackageImports>rtl.bpi;vcl.bpi;GLScene_RT.bpi;fmx.bpi;xmlrtl.bpi;vclimg.bpi</LinkPackageImports>
@@ -212,93 +212,87 @@
- <Overwrite>true</Overwrite>
- </Platform>
- </DeployFile>
+ <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'!='true'" LocalName="$(BDS)\bin64\cc64230.dll" Class="DependencyModule"/>
+ <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'=='true'" LocalName="$(BDS)\bin64\cc64230mt.dll" Class="DependencyModule"/>
- <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'=='true'" LocalName="$(BDS)\bin64\cc64230mt.dll" Class="DependencyModule"/>
+ <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'!='true'" LocalName="$(BDS)\bin\cc32230.dll" Class="DependencyModule"/>
+ <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'=='true'" LocalName="$(BDS)\bin\cc32230mt.dll" Class="DependencyModule"/>
- <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'!='true'" LocalName="$(BDS)\bin64\cc64230.dll" Class="DependencyModule"/>
- <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'=='true'" LocalName="$(BDS)\bin\cc32230mt.dll" Class="DependencyModule"/>
- <DeployFile LocalName=".\Win32\Debug\BoomC.exe" Configuration="Debug" Class="ProjectOutput">
- <RemoteName>BoomC.exe</RemoteName>
- <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'!='true'" LocalName="$(BDS)\bin\cc32230.dll" Class="DependencyModule"/>
<DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'!='true'" LocalName="$(BDS)\bin\cc32c280.dll" Class="DependencyModule">
@@ -307,8 +301,14 @@
+ <Overwrite>true</Overwrite>
+ </Platform>
+ </DeployFile>
+ <DeployFile LocalName=".\Win32\Debug\BoomC.exe" Configuration="Debug" Class="ProjectOutput">
+ <RemoteName>BoomC.exe</RemoteName>
@@ -1395,17 +1395,17 @@
@@ -1244,17 +1244,17 @@
<ProjectGuid>{FBD7C37F-44B7-4174-A637-B35289F7011A}</ProjectGuid>
<MainSource>CandlesC.cpp</MainSource>
@@ -217,98 +217,97 @@
- <DeployFile LocalName=".\Win32\Debug\CandlesC.exe" Configuration="Debug" Class="ProjectOutput">
- <RemoteName>CandlesC.exe</RemoteName>
@@ -318,54 +317,55 @@
- <DeployFile LocalName=".\Win32\Debug\CandlesC.tds" Configuration="Debug" Class="DebugSymbols">
- <RemoteName>CandlesC.tds</RemoteName>
+ <DeployFile LocalName=".\Win32\Debug\CandlesC.exe" Configuration="Debug" Class="ProjectOutput">
+ <RemoteName>CandlesC.exe</RemoteName>
+ <DeployFile LocalName=".\Win32\Debug\CandlesC.tds" Configuration="Debug" Class="DebugSymbols">
+ <RemoteName>CandlesC.tds</RemoteName>
@@ -1491,17 +1491,17 @@
<ProjectGuid>{C80A5B3F-722B-4597-8DD1-6AA0EB66B533}</ProjectGuid>
<MainSource>FireC.cpp</MainSource>
@@ -211,109 +211,109 @@
- <DeployFile LocalName=".\Win32\Debug\FireC.exe" Configuration="Debug" Class="ProjectOutput">
- <RemoteName>FireC.exe</RemoteName>
- <DeployFile LocalName=".\Win32\Debug\FireC.tds" Configuration="Debug" Class="DebugSymbols">
- <RemoteName>FireC.tds</RemoteName>
+ <DeployFile LocalName=".\Win32\Debug\FireC.exe" Configuration="Debug" Class="ProjectOutput">
+ <RemoteName>FireC.exe</RemoteName>
+ <DeployFile LocalName=".\Win32\Debug\FireC.tds" Configuration="Debug" Class="DebugSymbols">
+ <RemoteName>FireC.tds</RemoteName>
@@ -1394,17 +1394,17 @@
<ProjectGuid>{8A88376B-770E-418C-B10C-2E3FEB466B52}</ProjectGuid>
<MainSource>MeshExplosionC.cpp</MainSource>
@@ -211,54 +211,58 @@
- <DeployFile LocalName=".\Win32\Debug\MeshExplosionC.tds" Configuration="Debug" Class="DebugSymbols">
- <RemoteName>MeshExplosionC.tds</RemoteName>
@@ -272,28 +276,18 @@
<Platform Name="OSX32">
@@ -302,8 +296,8 @@
@@ -313,6 +307,12 @@
+ <DeployFile LocalName=".\Win32\Debug\MeshExplosionC.tds" Configuration="Debug" Class="DebugSymbols">
+ <RemoteName>MeshExplosionC.tds</RemoteName>
<DeployClass Name="AdditionalDebugSymbols">
<Platform Name="iOSSimulator">
@@ -1390,17 +1390,17 @@
<ProjectGuid>{133AAC71-34FC-4574-8ED3-AD7A9C96B577}</ProjectGuid>
<MainSource>MotionBlurC.cpp</MainSource>
@@ -211,155 +211,155 @@
- <DeployFile LocalName=".\Win32\Debug\MotionBlurC.tds" Configuration="Debug" Class="DebugSymbols">
- <RemoteName>MotionBlurC.tds</RemoteName>
- <DeployFile LocalName=".\Win32\Debug\MotionBlurC.exe" Configuration="Debug" Class="ProjectOutput">
- <RemoteName>MotionBlurC.exe</RemoteName>
+ <DeployFile LocalName=".\Win32\Debug\MotionBlurC.exe" Configuration="Debug" Class="ProjectOutput">
+ <RemoteName>MotionBlurC.exe</RemoteName>
+ <DeployFile LocalName=".\Win32\Debug\MotionBlurC.tds" Configuration="Debug" Class="DebugSymbols">
+ <RemoteName>MotionBlurC.tds</RemoteName>
@@ -1485,17 +1485,17 @@
@@ -1246,17 +1246,17 @@
<ProjectGuid>{D7DBF1C1-16FB-4C5E-B342-A1F1E769674B}</ProjectGuid>
<MainSource>MotionBlur2C.cpp</MainSource>
@@ -212,78 +212,77 @@
- <DeployFile LocalName=".\Win32\Debug\MotionBlur2C.exe" Configuration="Debug" Class="ProjectOutput">
- <RemoteName>MotionBlur2C.exe</RemoteName>
@@ -293,54 +292,55 @@
- <DeployFile LocalName=".\Win32\Debug\MotionBlur2C.tds" Configuration="Debug" Class="DebugSymbols">
- <RemoteName>MotionBlur2C.tds</RemoteName>
+ <DeployFile LocalName=".\Win32\Debug\MotionBlur2C.exe" Configuration="Debug" Class="ProjectOutput">
+ <RemoteName>MotionBlur2C.exe</RemoteName>
+ <DeployFile LocalName=".\Win32\Debug\MotionBlur2C.tds" Configuration="Debug" Class="DebugSymbols">
+ <RemoteName>MotionBlur2C.tds</RemoteName>
@@ -1465,17 +1465,17 @@
@@ -1243,17 +1243,17 @@
<ProjectGuid>{756D7A1C-A28A-4E82-B70D-A3C03C102E1E}</ProjectGuid>
<MainSource>PostEffectC.cpp</MainSource>
@@ -147,33 +147,33 @@
</Source>
- <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'=='true'" LocalName="$(BDS)\bin\cc32c250mt.dll" Class="DependencyModule">
+ <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'!='true'" LocalName="$(BDS)\bin64\cc64250.dll" Class="DependencyModule">
@@ -182,84 +182,83 @@
- <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'!='true'" LocalName="$(BDS)\bin64\cc64250.dll" Class="DependencyModule">
- <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'!='true'" LocalName="$(BDS)\bin\cc32250.dll" Class="DependencyModule">
- <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'=='true'" LocalName="$(BDS)\bin\cc32250mt.dll" Class="DependencyModule">
+ <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'!='true'" LocalName="$(BDS)\bin\cc32250.dll" Class="DependencyModule">
+ <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'=='true'" LocalName="$(BDS)\bin\cc32250mt.dll" Class="DependencyModule">
- <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'!='true'" LocalName="$(BDS)\bin\cc32c250.dll" Class="DependencyModule">
@@ -268,54 +267,53 @@
+ <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'!='true'" LocalName="$(BDS)\bin\cc32c250.dll" Class="DependencyModule">
- <DeployFile LocalName=".\Win32\Debug\PostEffectC.tds" Configuration="Debug" Class="DebugSymbols">
+ <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'=='true'" LocalName="$(BDS)\bin\cc32c250mt.dll" Class="DependencyModule">
- <RemoteName>PostEffectC.tds</RemoteName>
@@ -325,11 +323,13 @@
+ <DeployFile LocalName=".\Win32\Debug\PostEffectC.tds" Configuration="Debug" Class="DebugSymbols">
+ <RemoteName>PostEffectC.tds</RemoteName>
@@ -1452,17 +1452,17 @@
@@ -162,14 +162,14 @@
<Platform value="Win64">True</Platform>
- <DeployFile LocalName="Win64\Debug\PostEffectD.exe" Configuration="Debug" Class="ProjectOutput">
+ <DeployFile LocalName="Win32\Debug\PostEffectD.exe" Configuration="Debug" Class="ProjectOutput">
<RemoteName>PostEffectD.exe</RemoteName>
- <DeployFile LocalName="Win32\Debug\PostEffectD.exe" Configuration="Debug" Class="ProjectOutput">
+ <DeployFile LocalName="Win64\Debug\PostEffectD.exe" Configuration="Debug" Class="ProjectOutput">
@@ -1251,17 +1251,17 @@
@@ -6,7 +6,7 @@
<Base>True</Base>
<Config Condition="'$(Config)'==''">Debug</Config>
@@ -237,54 +237,58 @@
- <DeployFile LocalName=".\ProjTexturesC.exe" Configuration="Debug" Class="ProjectOutput">
- <RemoteName>ProjTexturesC.exe</RemoteName>
@@ -298,39 +302,34 @@
- <DeployFile LocalName="ProjTexturesC.res" Configuration="Debug" Class="ProjectFile">
+ <DeployFile LocalName=".\ProjTexturesC.exe" Configuration="Debug" Class="ProjectOutput">
+ <RemoteName>ProjTexturesC.exe</RemoteName>
@@ -340,8 +339,9 @@
+ <DeployFile LocalName="ProjTexturesC.res" Configuration="Debug" Class="ProjectFile">
@@ -1422,17 +1422,17 @@
@@ -2,32 +2,27 @@ object FormProjTextures: TFormProjTextures
Left = 202
Caption = 'Projected Textures'
- ClientHeight = 555
- ClientWidth = 855
+ ClientHeight = 444
+ ClientWidth = 684
object viewer: TGLSceneViewer
- Width = 855
- Height = 555
+ Width = 684
+ Height = 444
Camera = camera
Buffer.ContextOptions = [roDoubleBuffer, roStencilBuffer, roRenderToWindow]
Buffer.DepthPrecision = dp32bits
- FieldOfView = 159.572052001953100000
+ FieldOfView = 154.614669799804700000
OnMouseDown = viewerMouseDown
@@ -43,7 +38,8 @@ object FormProjTextures: TFormProjTextures
object scenery: TGLDummyCube
object GLCube2: TGLCube
- Scale.Coordinates = {000020C1000020C1000020C100000000}
+ Scale.Coordinates = {000040C0000040C0000040C000000000}
NormalDirection = ndInside
object light2: TGLDummyCube
<ProjectGuid>{0EF58930-562A-44EC-88C6-3F4249B932E6}</ProjectGuid>
<MainSource>ShadowsC.cpp</MainSource>
@@ -213,78 +213,77 @@
- <DeployFile LocalName=".\Win32\Debug\ShadowsC.exe" Configuration="Debug" Class="ProjectOutput">
- <RemoteName>ShadowsC.exe</RemoteName>
@@ -294,48 +293,49 @@
+ <DeployFile LocalName=".\Win32\Debug\ShadowsC.exe" Configuration="Debug" Class="ProjectOutput">
+ <RemoteName>ShadowsC.exe</RemoteName>
@@ -1466,17 +1466,17 @@
@@ -239,111 +239,111 @@
- <DeployFile LocalName=".\ShadowVolumesC.exe" Configuration="Debug" Class="ProjectOutput">
- <RemoteName>ShadowVolumesC.exe</RemoteName>
- <DeployFile LocalName="ShadowVolumesC.res" Configuration="Debug" Class="ProjectFile">
- <DeployFile LocalName=".\ShadowVolumesC.tds" Configuration="Debug" Class="DebugSymbols">
- <RemoteName>ShadowVolumesC.tds</RemoteName>
+ <DeployFile LocalName=".\ShadowVolumesC.exe" Configuration="Debug" Class="ProjectOutput">
+ <RemoteName>ShadowVolumesC.exe</RemoteName>
+ <DeployFile LocalName=".\ShadowVolumesC.tds" Configuration="Debug" Class="DebugSymbols">
+ <RemoteName>ShadowVolumesC.tds</RemoteName>
+ <DeployFile LocalName="ShadowVolumesC.res" Configuration="Debug" Class="ProjectFile">
@@ -1424,17 +1424,17 @@
@@ -245,54 +245,58 @@
- <DeployFile LocalName="SpiralC.res" Configuration="Debug" Class="ProjectFile">
@@ -306,29 +310,28 @@
- <DeployFile LocalName=".\SpiralC.tds" Configuration="Debug" Class="DebugSymbols">
- <RemoteName>SpiralC.tds</RemoteName>
@@ -338,18 +341,15 @@
+ <DeployFile LocalName=".\SpiralC.tds" Configuration="Debug" Class="DebugSymbols">
+ <RemoteName>SpiralC.tds</RemoteName>
+ <DeployFile LocalName="SpiralC.res" Configuration="Debug" Class="ProjectFile">
- <DeployFile LocalName="Win64\Debug\ThorD.exe" Configuration="Debug" Class="ProjectOutput">
+ <DeployFile LocalName="Win32\Debug\ThorD.exe" Configuration="Debug" Class="ProjectOutput">
<RemoteName>ThorD.exe</RemoteName>
- <DeployFile LocalName="Win32\Debug\ThorD.exe" Configuration="Debug" Class="ProjectOutput">
+ <DeployFile LocalName="Win64\Debug\ThorD.exe" Configuration="Debug" Class="ProjectOutput">
@@ -237,111 +237,111 @@
- <DeployFile LocalName="WarpingC.res" Configuration="Debug" Class="ProjectFile">
- <DeployFile LocalName=".\WarpingC.tds" Configuration="Debug" Class="DebugSymbols">
- <RemoteName>WarpingC.tds</RemoteName>
- <DeployFile LocalName=".\WarpingC.exe" Configuration="Debug" Class="ProjectOutput">
- <RemoteName>WarpingC.exe</RemoteName>
+ <DeployFile LocalName=".\WarpingC.exe" Configuration="Debug" Class="ProjectOutput">
+ <RemoteName>WarpingC.exe</RemoteName>
+ <DeployFile LocalName=".\WarpingC.tds" Configuration="Debug" Class="DebugSymbols">
+ <RemoteName>WarpingC.tds</RemoteName>
+ <DeployFile LocalName="WarpingC.res" Configuration="Debug" Class="ProjectFile">
- <DeployFile LocalName="Win64\Debug\WarpingD.exe" Configuration="Debug" Class="ProjectOutput">
+ <DeployFile LocalName="Win32\Debug\WarpingD.exe" Configuration="Debug" Class="ProjectOutput">
<RemoteName>WarpingD.exe</RemoteName>
- <DeployFile LocalName="Win32\Debug\WarpingD.exe" Configuration="Debug" Class="ProjectOutput">
+ <DeployFile LocalName="Win64\Debug\WarpingD.exe" Configuration="Debug" Class="ProjectOutput">
@@ -243,60 +243,58 @@
- <DeployFile LocalName=".\Win32\Debug\WaterPlaneC.exe" Configuration="Debug" Class="ProjectOutput">
- <RemoteName>WaterPlaneC.exe</RemoteName>
- <DeployFile LocalName=".\Win32\Debug\WaterPlaneC.tds" Configuration="Debug" Class="DebugSymbols">
- <RemoteName>WaterPlaneC.tds</RemoteName>
@@ -310,44 +308,46 @@
- <DeployFile LocalName="WaterPlaneC.res" Configuration="Debug" Class="ProjectFile">
+ <DeployFile LocalName=".\Win32\Debug\WaterPlaneC.exe" Configuration="Debug" Class="ProjectOutput">
+ <RemoteName>WaterPlaneC.exe</RemoteName>
+ <DeployFile LocalName=".\Win32\Debug\WaterPlaneC.tds" Configuration="Debug" Class="DebugSymbols">
+ <RemoteName>WaterPlaneC.tds</RemoteName>
+ <DeployFile LocalName="WaterPlaneC.res" Configuration="Debug" Class="ProjectFile">
@@ -1428,17 +1428,17 @@
@@ -165,12 +165,12 @@
- <DeployFile LocalName="$(BDS)\Redist\iossimulator\libpcre.dylib" Class="DependencyModule">
+ <DeployFile LocalName="$(BDS)\Redist\iossimulator\libPCRE.dylib" Class="DependencyModule">
- <DeployFile LocalName="$(BDS)\Redist\iossimulator\libPCRE.dylib" Class="DependencyModule">
+ <DeployFile LocalName="$(BDS)\Redist\iossimulator\libpcre.dylib" Class="DependencyModule">
<AppType>Package</AppType>
@@ -1,7 +1,6 @@
//
// The graphics rendering engine GLScene http://glscene.org
unit Formats.GL2;
(*
@@ -20,42 +19,25 @@ uses
TGLMHeader = record
- fileID : array[0..3] of char;
- version : integer;
- strFile,
- animName : array[0..63] of char;
- animIndex,
- numBones,
- numLODs,
- ofsLODs,
- numSurfaces,
- ofsSurfHierarchy,
- ofsEnd : integer;
+ fileID: array [0 .. 3] of char;
+ version: integer;
+ strFile, animName: array [0 .. 63] of char;
+ animIndex, numBones, numLODs, ofsLODs, numSurfaces, ofsSurfHierarchy, ofsEnd: integer;
TGLMSurfaceHeirachyOffsets = array of integer;
TGLMSurfaceHeirachy = record
- name : array[0..63] of Char;
- flags : LongWord;
- shader : array[0..63] of Char;
- shaderIndex,
- parentIndex,
- numChildren : integer;
- childIndices : array of integer;
+ name: array [0 .. 63] of char;
+ flags: LongWord;
+ shader: array [0 .. 63] of char;
+ shaderIndex, parentIndex, numChildren: integer;
+ childIndices: array of integer;
TGLMSurfaceHeader = record
- ident,
- thisSurfaceIndex,
- ofsHeader,
- numVerts,
- ofsVerts,
- numTriangles,
- ofsTriangles,
- numBoneReferences,
- ofsBoneReferences,
+ ident, thisSurfaceIndex, ofsHeader, numVerts, ofsVerts, numTriangles, ofsTriangles,
+ numBoneReferences, ofsBoneReferences, ofsEnd: integer;
TGLMTriangle = record
@@ -134,8 +116,7 @@ type
function G2_GetVertWeights(const vert: TGLMVertex): integer;
-function G2_GetVertBoneIndex(const vert: TGLMVertex;
- iWeightNum: integer): integer;
+function G2_GetVertBoneIndex(const vert: TGLMVertex; iWeightNum: integer): integer;
function G2_GetVertBoneWeight(const vert: TGLMVertex; iWeightNum: Cardinal;
var fTotalWeight: single; const iNumWeights: Cardinal): single;
@@ -160,8 +141,7 @@ begin
result := (vert.uiNumWeightsAndBoneIndices shr 30) + 1;
// Extract the bone reference array index, a 5-bit integer
result := (vert.uiNumWeightsAndBoneIndices shr (5 * iWeightNum)) and 31;
@@ -185,8 +165,7 @@ begin
iTemp := vert.BoneWeightings[iWeightNum];
// Get the 2-bit overflow and 'or' it to the front of the
// weight to get 10-bit integer weight (0..1023)
- iTemp := iTemp or
- ((vert.uiNumWeightsAndBoneIndices shr (12 + (iWeightNum * 2))) and $300);
+ iTemp := iTemp or ((vert.uiNumWeightsAndBoneIndices shr (12 + (iWeightNum * 2))) and $300);
// Convert to floating point weight (0..1)
fBoneWeight := iTemp / 1023;
// Accumulate total weight
@@ -200,10 +179,9 @@ end;
procedure MC_UnCompressQuat(var mat: TGLMatrix; const comp: TGLACompQuatBone);
- mat := QuaternionToMatrix(QuaternionMake([comp[1] - 32726, comp[2] - 32726,
- comp[3] - 32726], comp[0] - 32726));
- mat.V[3] := VectorMake(comp[4] / 64 - 512, comp[5] / 64 - 512,
- comp[6] / 64 - 512, 1);
+ mat := QuaternionToMatrix(QuaternionMake([comp[1] - 32726, comp[2] - 32726, comp[3] - 32726],
+ comp[0] - 32726));
+ mat.V[3] := VectorMake(comp[4] / 64 - 512, comp[5] / 64 - 512, comp[6] / 64 - 512, 1);
@@ -222,21 +200,18 @@ begin
if not(idstr = '2LGM') then
- raise Exception.Create(Format('Unknown or incorrect identity tag: [%s]',
- [idstr]));
+ raise Exception.Create(Format('Unknown or incorrect identity tag: [%s]', [idstr]));
exit;
- aStream.Read(ModelHeader,SizeOf(ModelHeader));
+ aStream.Read(ModelHeader, sizeof(ModelHeader));
if ModelHeader.version <> 6 then
- raise Exception.Create
- (Format('Only GLM (MDXM) version 6 is supported. File is version %d.',
+ raise Exception.Create(Format('Only GLM (MDXM) version 6 is supported. File is version %d.',
[ModelHeader.version]));
SetLength(SurfaceHeirachyOffsets, ModelHeader.numSurfaces);
- aStream.Read(SurfaceHeirachyOffsets[0], sizeof(integer) *
- ModelHeader.numSurfaces);
+ aStream.Read(SurfaceHeirachyOffsets[0], sizeof(integer) * ModelHeader.numSurfaces);
SetLength(SurfaceHeirachy, ModelHeader.numSurfaces);
for i := 0 to ModelHeader.numSurfaces - 1 do
@@ -264,8 +239,7 @@ begin
LODofs := aStream.Position;
aStream.Read(LODInfo, sizeof(LODInfo));
SetLength(LODSurfaceOffsets, ModelHeader.numSurfaces);
- aStream.Read(LODSurfaceOffsets[0], sizeof(integer) *
+ aStream.Read(LODSurfaceOffsets[0], sizeof(integer) * ModelHeader.numSurfaces);
SetLength(Surfaces, ModelHeader.numSurfaces);
for j := 0 to ModelHeader.numSurfaces - 1 do
with Surfaces[j] do
@@ -277,16 +251,12 @@ begin
SetLength(TexCoords, SurfaceHeader.numVerts);
SetLength(BoneReferences, SurfaceHeader.numBoneReferences);
aStream.Position := ofs + SurfaceHeader.ofsTriangles;
- aStream.Read(Triangles[0], SurfaceHeader.numTriangles *
- sizeof(TGLMTriangle));
+ aStream.Read(Triangles[0], SurfaceHeader.numTriangles * sizeof(TGLMTriangle));
aStream.Position := ofs + SurfaceHeader.ofsVerts;
- aStream.Read(Vertices[0], SurfaceHeader.numVerts *
- sizeof(TGLMVertex));
- aStream.Read(TexCoords[0], SurfaceHeader.numVerts *
- sizeof(TVector2f));
+ aStream.Read(Vertices[0], SurfaceHeader.numVerts * sizeof(TGLMVertex));
+ aStream.Read(TexCoords[0], SurfaceHeader.numVerts * sizeof(TVector2f));
aStream.Position := ofs + SurfaceHeader.ofsBoneReferences;
- aStream.Read(BoneReferences[0], SurfaceHeader.numBoneReferences *
- sizeof(integer));
+ aStream.Read(BoneReferences[0], SurfaceHeader.numBoneReferences * sizeof(integer));
aStream.Position := ofs + SurfaceHeader.ofsEnd;
aStream.Position := LODofs + LODInfo.ofsEnd;
@@ -307,8 +277,7 @@ end;
function TFileGLA.GetUnCompressedMatrix(Frame, Bone: integer): TGLMatrix;
- MC_UnCompressQuat(result, CompBonePool[BoneIndices[Frame * AnimHeader.numBones
- + Bone]]);
+ MC_UnCompressQuat(result, CompBonePool[BoneIndices[Frame * AnimHeader.numBones + Bone]]);
procedure TFileGLA.LoadFromStream(aStream: TStream);
@@ -322,16 +291,14 @@ begin
if not(idstr = '2LGA') then
- aStream.Read(AnimHeader,SizeOf(AnimHeader));
+ aStream.Read(AnimHeader, sizeof(AnimHeader));
if AnimHeader.version <> 6 then
- (Format('Only GLA (MDXA) version 6 is supported. File is version %d.',
+ raise Exception.Create(Format('Only GLA (MDXA) version 6 is supported. File is version %d.',
[AnimHeader.version]));
SetLength(SkeletonOffsets, AnimHeader.numBones);
@@ -343,7 +310,7 @@ begin
aStream.Read(name, Length(name));
aStream.Read(flags, sizeof(LongWord));
- aStream.Read(Parent,SizeOf(Integer));
+ aStream.Read(parent, sizeof(integer));
aStream.Read(BasePoseMat, sizeof(TGLABone));
aStream.Read(BasePoseMatInv, sizeof(TGLABone));
aStream.Read(numChildren, sizeof(integer));
@@ -1,15 +1,12 @@
unit GLS.CurvesAndSurfaces;
(* Bezier and B-Spline Curve and Surface Routines *)
interface
-{$I GLScene.inc}
System.SysUtils,
GLS.VectorTypes,
unit GLS.Feedback;
@@ -30,7 +30,7 @@ type
FCurrentPos: Integer;
FBasePose: TGLSkeletonFrame;
FFramePositions: TGLAffineVectorList;
- FFrameQuaternions: TQuaternionList;
+ FFrameQuaternions: TGLQuaternionList;
FJointFlags: TGLIntegerList;
FNumFrames, FFirstFrame, FFrameRate, FNumJoints: Integer;
function ReadLine: String;
@@ -480,7 +480,7 @@ begin
FNumJoints := StrToInt(FTempString[1]);
FFramePositions := TGLAffineVectorList.Create;
- FFrameQuaternions := TQuaternionList.Create;
+ FFrameQuaternions := TGLQuaternionList.Create;
if Owner.Skeleton.Frames.Count = 0 then
FBasePose := TGLSkeletonFrame.CreateOwned(Owner.Skeleton.Frames);
@@ -825,7 +825,7 @@ begin
// we also want StartAngle and StartAngle+SweepAngle to be in this range
beginAngle := Trunc(StartAngle) mod 360;
endAngle := Trunc(StartAngle + SweepAngle) mod 360;
- // If beginAngle>endAngle then area crosses the boundary from 360=>0 degrees
+ // If beginAngle > endAngle then area crosses the boundary from 360=>0 degrees
// therefore have 2 valid regions (beginAngle to 360) & (0 to endAngle)
// otherwise just 1 valid region (beginAngle to endAngle)
if beginAngle > endAngle then
@@ -959,10 +959,8 @@ begin
MakeVector(p[0], FBottomRadius * sina2, -HalfHeight, FBottomRadius * cosa2);
MakeVector(p[1], FBottomRadius * sina1, -HalfHeight, FBottomRadius * cosa1);
// Top corners
- MakeVector(p[2], ShadowTopRadius * sina1, HalfHeight,
- ShadowTopRadius * cosa1);
- MakeVector(p[3], ShadowTopRadius * sina2, HalfHeight,
- ShadowTopRadius * cosa2); // }
+ MakeVector(p[2], ShadowTopRadius * sina1, HalfHeight, ShadowTopRadius * cosa1);
+ MakeVector(p[3], ShadowTopRadius * sina2, HalfHeight, ShadowTopRadius * cosa2);
// This should be optimized to use AddIndexedFace, because this method
// searches for each of the vertices and adds them or re-uses them.
// Skin
@@ -5,8 +5,7 @@ unit GLS.Mesh;
This unit is for simple meshes and legacy support,
- GLS.VectorFileObjects implements more efficient
- (though more complex) mesh tools.
+ GLS.VectorFileObjects implements more efficient (though more complex) mesh tools.
*)
@@ -35,7 +35,7 @@ type
TBSPRenderContextInfo = record
// Local coordinates of the camera (can be a vector or point)
cameraLocal: TGLVector;
- rci: PRenderContextInfo;
+ rci: PGLRenderContextInfo;
faceGroups: TList;
cullingSpheres: array of TBSPCullingSphere;
@@ -5,12 +5,9 @@ unit GLS.MeshBuilder;
Build mesh objects.
- How often do you miss a BuildSphereMesh function for testing or editors?
- Well this unit is intended to solve that problem. We want fast,
- flexible functions with lots of options...
- Original Author: Joen Joensen.
- Contributed to the GLScene community.
- Features: BuildCube, BuildCylinder.
+ This unit is intended to create and draw some mesh objects using flexible functions
+ with lots of options, including applying materials and textures for different facets.
+ Started by Joen Joensen, who contributed procedures: BuildMeshCube, BuildMeshCylinder.
@@ -20,27 +17,176 @@ uses
System.Classes,
- GLS.VectorFileObjects,
GLS.VectorGeometry,
GLS.VectorLists,
+ GLS.VectorFileObjects,
GLS.MeshUtils;
-(* ---------------- Mesh building routines ------------------- *)
-procedure BuildCube(Mesh : TGLMeshObject; const Position, Scale : TAffineVector);
-procedure BuildCylinder(Mesh : TGLMeshObject; const Position, Scale : TAffineVector; Slices : Integer);
-procedure BuildCylinder2(Mesh : TGLMeshObject; const Position, Scale : TAffineVector; TopRadius,BottomRadius,Height: single; Slices : Integer);
+type
+ (*
+ Properties of a hexahedron with 6 quad parts
+ *)
+ TGLHexahedronProperties = record
+ Normal3f: TVector3f;
+ VertexCoords: array [0 .. 3] of TVector3f;
+ TextureCoords: array [0 .. 3] of TVector2f;
+ PartIndices: array [0 .. 5] of Integer;
+ Material: string; // for 6 colors or cubic map from MaterialLibrary
+ Properties of a sphere with two hemisphere parts
+ using 5 points to make each hemisphere
+ TGLSphereProperties = record
+ VertexCoords: array [0 .. 4] of TVector3f;
+ TextureCoords: array [0 .. 4] of TVector2f;
+ PartIndices: array [0 .. 1] of Integer;
+ Material: string; // for 2 colors or textures
+ Properties of a cylinder with 8 parts for 2 hemicylinders
+ using 6 points to make each part for hemidisk caps and side surfaces
+ TGLCylinderProperties = record
+ VertexCoords: array [0 .. 5] of TVector3f;
+ TextureCoords: array [0 .. 5] of TVector2f;
+ PartIndices: array [0 .. 7] of Integer;
+ Material: string; // for 8 colors or textures
-(* ---------------- Mesh optimization routines --------------- *)
TGLMeshOptimizerOption = (mooStandardize, mooVertexCache, mooSortByMaterials,
mooMergeObjects);
TGLMeshOptimizerOptions = set of TGLMeshOptimizerOption;
-(* Optimize Mesh (list, default options) *)
+// Hexahedron arrays for 6 parts
+const
+ cMeshHexahedron: array [0 .. 5] of TGLHexahedronProperties = ((
+ // Front Quad
+ VertexCoords: ((X: - 1; Y: - 1; Z: 1), (X: 1; Y: - 1; Z: 1), (X: 1; Y: 1;
+ Z: 1), (X: - 1; Y: 1; Z: 1)); TextureCoords: ((X: 0; Y: 0), (X: 1; Y: 0), (X: 1;
+ Y: 1), (X: 0; Y: 1)); PartIndices: (0, 1, 2, 2, 3, 0);
+ Material: 'Front';), (
+ // Back Quad
+ VertexCoords: ((X: - 1; Y: - 1; Z: - 1), (X: - 1; Y: 1; Z: - 1), (X: 1; Y: 1;
+ Z: - 1), (X: 1; Y: - 1; Z: - 1)); TextureCoords: ((X: 1; Y: 0), (X: 1;
+ Y: 1), (X: 0; Y: 1), (X: 0; Y: 0)); PartIndices: (4, 5, 6, 6, 7, 4);
+ Material: 'Back';), (
+ // Top Quad
+ VertexCoords: ((X: - 1; Y: 1; Z: - 1), (X: - 1; Y: 1; Z: 1), (X: 1; Y: 1;
+ Z: 1), (X: 1; Y: 1; Z: - 1)); TextureCoords: ((X: 0; Y: 1), (X: 0; Y: 0), (X: 1;
+ Y: 0), (X: 1; Y: 1)); PartIndices: (8, 9, 10, 10, 11, 8);
+ Material: 'Top';), (
+ // Bottom Quad
+ VertexCoords: ((X: - 1; Y: - 1; Z: - 1), (X: 1; Y: - 1; Z: - 1), (X: 1; Y: - 1;
+ Z: 1), (X: - 1; Y: - 1; Z: 1)); TextureCoords: ((X: 1; Y: 1), (X: 0;
+ Y: 1), (X: 0; Y: 0), (X: 1; Y: 0)); PartIndices: (12, 13, 14, 14, 15, 12);
+ Material: 'Bottom';), (
+ // Right Quad
+ VertexCoords: ((X: 1; Y: - 1; Z: - 1), (X: 1; Y: 1; Z: - 1), (X: 1; Y: 1;
+ Z: 1), (X: 1; Y: - 1; Z: 1)); TextureCoords: ((X: 1; Y: 0), (X: 1; Y: 1), (X: 0;
+ Y: 1), (X: 0; Y: 0)); PartIndices: (16, 17, 18, 18, 19, 16);
+ Material: 'Right';), (
+ // Left Quad
+ VertexCoords: ((X: - 1; Y: - 1; Z: - 1), (X: - 1; Y: - 1; Z: 1), (X: - 1; Y: 1;
+ Z: 1), (X: - 1; Y: 1; Z: - 1)); TextureCoords: ((X: 0; Y: 0), (X: 1;
+ Y: 0), (X: 1; Y: 1), (X: 0; Y: 1)); PartIndices: (20, 21, 22, 22, 23, 20);
+ Material: 'Left';));
+// Sphere arrays for parts with 2 hemispheres
+ cMeshSphere: array [0 .. 1] of TGLSphereProperties = ((
+ // Top HemiSphere
+ Z: 1), (X: 1; Y: 1; Z: - 1), (X: 0; Y: 1; Z: 0)); TextureCoords: ((X: 0; Y: 1), (X: 0; Y: 0), (X: 1;
+ Y: 0), (X: 1; Y: 1), (X: 1; Y: 1)); PartIndices: (0, 1);
+ // Bottom HemiSphere
+ Z: 1), (X: - 1; Y: - 1; Z: 1), (X: - 1; Y: - 1; Z: 1)); TextureCoords: ((X: 1; Y: 1), (X: 0;
+ Y: 1), (X: 0; Y: 0), (X: 1; Y: 0), (X: 0; Y: 0)); PartIndices: (1, 2);
+ Material: 'Bottom';));
+// Cylinder arrays
+ cMeshCylinder: array [0 .. 3] of TGLCylinderProperties = ((
+ // Front Disk
+ Y: 1), (X: 0; Y: 1)); PartIndices: (0, 1, 2);
+ // Back Disk
+ Y: 1), (X: 0; Y: 1), (X: 0; Y: 0)); PartIndices: (3, 4, 5);
+ // Top Dome
+ Y: 0), (X: 1; Y: 1)); PartIndices: (6, 7, 8);
+ // Bottom Dome
+ Y: 1), (X: 0; Y: 0), (X: 1; Y: 0)); PartIndices: (9, 10, 11);
+// Tetrahedron part arrays
+ cMeshTetrahedron: array [0 .. 3] of TGLFacetProperties = ((
+ // Front HemiDisk
+ Y: 1), (X: 0; Y: 1)); FacetIndex: (0, 1, 2, 2, 3, 0);
+ // Back HemiDisk
+ Y: 1), (X: 0; Y: 1), (X: 0; Y: 0)); FacetIndex: (4, 5, 6, 6, 7, 4);
+ // Top HemiDome
+ Y: 0), (X: 1; Y: 1)); FacetIndex: (8, 9, 10, 10, 11, 8);
+ // Bottom Square
+ Y: 1), (X: 0; Y: 0), (X: 1; Y: 0)); FacetIndex: (12, 13, 14, 14, 15, 12);
+(* ---------------- Build Meshes ------------------- *)
+procedure BuildMeshCube(Mesh : TGLMeshObject; const Position, Scale : TAffineVector);
+procedure BuildMeshCylinder(Mesh : TGLMeshObject; const Position, Scale : TAffineVector; Slices : Integer);
+procedure BuildMeshCylinderAdv(Mesh: TGLMeshObject;
+ const Position, Scale: TAffineVector; TopRadius, BottomRadius, Height: single;
+ Slices: Integer);
+// Not implemented
+procedure BuildMeshHemiSphere(Mesh: TGLMeshObject; const Position, Scale: TAffineVector);
+procedure BuildMeshHemiCylinder(Mesh: TGLMeshObject; const Position, Scale: TAffineVector;
+(* ---------------- Make Meshes ------------------- *)
+procedure MakeMeshHexahedron(MeshObject: TGLMeshObject);
+procedure MakeMeshTetrahedron(MeshObject: TGLMeshObject);
+procedure MakeMeshSphere(MeshObject: TGLMeshObject);
+(* ------ -------- Mesh optimization --------------- *)
+// Optimize Mesh (list, default options)
procedure OptimizeMesh(aList: TGLMeshObjectList; options: TGLMeshOptimizerOptions); overload;
procedure OptimizeMesh(aList: TGLMeshObjectList); overload;
// OptimizeMesh (object, with options)
@@ -59,15 +205,16 @@ var
implementation
//------------------------------------------------------------------
-function VectorCombineWeighted(const Position, Scale : TAffineVector; X, Y, Z : Single) : TAffineVector;
+function VectorCombineWeighted(const Position, Scale: TAffineVector; X, Y, Z: single)
+ : TAffineVector;
- Result.X:= position.X+Scale.X*X;
- Result.Y:= position.Y+Scale.Y*Y;
- Result.Z:= position.Z+Scale.Z*Z;
+ Result.X := Position.X + Scale.X * X;
+ Result.Y := Position.Y + Scale.Y * Y;
+ Result.Z := Position.Z + Scale.Z * Z;
+procedure BuildMeshCube(Mesh: TGLMeshObject; const Position, Scale: TAffineVector);
FGR : TFGVertexNormalTexIndexList;
VertexOffset : Integer;
@@ -109,66 +256,68 @@ begin
FGR := TFGVertexNormalTexIndexList.CreateOwned(Mesh.FaceGroups);
FGR.Mode := fgmmTriangles;
- // front
- FGR.VertexIndices.Add(VertexOffset+0,VertexOffset+1,VertexOffset+3);
- FGR.VertexIndices.Add(VertexOffset+0,VertexOffset+3,VertexOffset+2);
- FGR.NormalIndices.Add(NormalOffset+0,NormalOffset+0,NormalOffset+0);
- FGR.TexCoordIndices.Add(TextureOffset+0,TextureOffset+1,TextureOffset+3);
- FGR.TexCoordIndices.Add(TextureOffset+0,TextureOffset+3,TextureOffset+2);
- // back
- FGR.VertexIndices.Add(VertexOffset+4,VertexOffset+6,VertexOffset+7);
- FGR.VertexIndices.Add(VertexOffset+4,VertexOffset+7,VertexOffset+5);
- FGR.NormalIndices.Add(NormalOffset+1,NormalOffset+1,NormalOffset+1);
- FGR.TexCoordIndices.Add(TextureOffset+4,TextureOffset+6,TextureOffset+7);
- FGR.TexCoordIndices.Add(TextureOffset+4,TextureOffset+7,TextureOffset+5);
- // right
- FGR.VertexIndices.Add(VertexOffset+0,VertexOffset+2,VertexOffset+6);
- FGR.VertexIndices.Add(VertexOffset+0,VertexOffset+6,VertexOffset+4);
- FGR.NormalIndices.Add(NormalOffset+2,NormalOffset+2,NormalOffset+2);
- FGR.TexCoordIndices.Add(TextureOffset+0,TextureOffset+2,TextureOffset+6);
- FGR.TexCoordIndices.Add(TextureOffset+0,TextureOffset+6,TextureOffset+4);
- // left
- FGR.VertexIndices.Add(VertexOffset+1,VertexOffset+5,VertexOffset+7);
- FGR.VertexIndices.Add(VertexOffset+1,VertexOffset+7,VertexOffset+3);
- FGR.NormalIndices.Add(NormalOffset+3,NormalOffset+3,NormalOffset+3);
- FGR.TexCoordIndices.Add(TextureOffset+1,TextureOffset+5,TextureOffset+7);
- FGR.TexCoordIndices.Add(TextureOffset+1,TextureOffset+7,TextureOffset+3);
- // top
- FGR.VertexIndices.Add(VertexOffset+0,VertexOffset+4,VertexOffset+5);
- FGR.VertexIndices.Add(VertexOffset+0,VertexOffset+5,VertexOffset+1);
- FGR.NormalIndices.Add(NormalOffset+4,NormalOffset+4,NormalOffset+4);
- FGR.TexCoordIndices.Add(TextureOffset+0,TextureOffset+4,TextureOffset+5);
- FGR.TexCoordIndices.Add(TextureOffset+0,TextureOffset+5,TextureOffset+1);
- // bottom
- FGR.VertexIndices.Add(VertexOffset+2,VertexOffset+3,VertexOffset+7);
- FGR.VertexIndices.Add(VertexOffset+2,VertexOffset+7,VertexOffset+6);
- FGR.NormalIndices.Add(NormalOffset+5,NormalOffset+5,NormalOffset+5);
- FGR.TexCoordIndices.Add(TextureOffset+2,TextureOffset+3,TextureOffset+7);
- FGR.TexCoordIndices.Add(TextureOffset+2,TextureOffset+7,TextureOffset+6);
+ // Front
+ FGR.VertexIndices.Add(VertexOffset + 0, VertexOffset + 1, VertexOffset + 3);
+ FGR.VertexIndices.Add(VertexOffset + 0, VertexOffset + 3, VertexOffset + 2);
+ FGR.NormalIndices.Add(NormalOffset + 0, NormalOffset + 0, NormalOffset + 0);
+ FGR.TexCoordIndices.Add(TextureOffset + 0, TextureOffset + 1, TextureOffset + 3);
+ FGR.TexCoordIndices.Add(TextureOffset + 0, TextureOffset + 3, TextureOffset + 2);
+ // Back
+ FGR.VertexIndices.Add(VertexOffset + 4, VertexOffset + 6, VertexOffset + 7);
+ FGR.VertexIndices.Add(VertexOffset + 4, VertexOffset + 7, VertexOffset + 5);
+ FGR.NormalIndices.Add(NormalOffset + 1, NormalOffset + 1, NormalOffset + 1);
+ FGR.TexCoordIndices.Add(TextureOffset + 4, TextureOffset + 6, TextureOffset + 7);
+ FGR.TexCoordIndices.Add(TextureOffset + 4, TextureOffset + 7, TextureOffset + 5);
+ // Right
+ FGR.VertexIndices.Add(VertexOffset + 0, VertexOffset + 2, VertexOffset + 6);
+ FGR.VertexIndices.Add(VertexOffset + 0, VertexOffset + 6, VertexOffset + 4);
+ FGR.NormalIndices.Add(NormalOffset + 2, NormalOffset + 2, NormalOffset + 2);
+ FGR.TexCoordIndices.Add(TextureOffset + 0, TextureOffset + 2, TextureOffset + 6);
+ FGR.TexCoordIndices.Add(TextureOffset + 0, TextureOffset + 6, TextureOffset + 4);
+ // Left
+ FGR.VertexIndices.Add(VertexOffset + 1, VertexOffset + 5, VertexOffset + 7);
+ FGR.VertexIndices.Add(VertexOffset + 1, VertexOffset + 7, VertexOffset + 3);
+ FGR.NormalIndices.Add(NormalOffset + 3, NormalOffset + 3, NormalOffset + 3);
+ FGR.TexCoordIndices.Add(TextureOffset + 1, TextureOffset + 5, TextureOffset + 7);
+ FGR.TexCoordIndices.Add(TextureOffset + 1, TextureOffset + 7, TextureOffset + 3);
+ // Top
+ FGR.VertexIndices.Add(VertexOffset + 0, VertexOffset + 4, VertexOffset + 5);
+ FGR.VertexIndices.Add(VertexOffset + 0, VertexOffset + 5, VertexOffset + 1);
+ FGR.NormalIndices.Add(NormalOffset + 4, NormalOffset + 4, NormalOffset + 4);
+ FGR.TexCoordIndices.Add(TextureOffset + 0, TextureOffset + 4, TextureOffset + 5);
+ FGR.TexCoordIndices.Add(TextureOffset + 0, TextureOffset + 5, TextureOffset + 1);
+ // Bottom
+ FGR.VertexIndices.Add(VertexOffset + 2, VertexOffset + 3, VertexOffset + 7);
+ FGR.VertexIndices.Add(VertexOffset + 2, VertexOffset + 7, VertexOffset + 6);
+ FGR.NormalIndices.Add(NormalOffset + 5, NormalOffset + 5, NormalOffset + 5);
+ FGR.TexCoordIndices.Add(TextureOffset + 2, TextureOffset + 3, TextureOffset + 7);
+ FGR.TexCoordIndices.Add(TextureOffset + 2, TextureOffset + 7, TextureOffset + 6);
+// Mesh cylinder
NormalOffset : Integer;
TextureOffset : Integer;
- Cosine,Sine : Array of Single;
+ Cosine,Sine : array of Single;
xc,yc : Integer;
- If Slices < 3 then Exit;
+ if Slices < 3 then Exit;
SetLength(Sine,Slices+1);
SetLength(Cosine,Slices+1);
@@ -177,7 +326,7 @@ begin
VertexOffset := Mesh.Vertices.Count;
NormalOffset := Mesh.Normals.Count;
TextureOffset := Mesh.TexCoords.Count;
- For xc := 0 to Slices-1 do
+ for xc := 0 to Slices-1 do
Mesh.Vertices.Add(VectorCombineWeighted(Position,Scale,0.5*cosine[xc],0.5*sine[xc],0.5));
Mesh.Vertices.Add(VectorCombineWeighted(Position,Scale,0.5*cosine[xc],0.5*sine[xc],-0.5));
@@ -193,90 +342,155 @@ begin
+ for xc := 0 to Slices - 1 do
- yc := xc+1;
- If yc = slices then yc := 0;
- FGR.VertexIndices.Add(VertexOffset+xc*2,VertexOffset+xc*2+1,VertexOffset+yc*2+1);
- FGR.VertexIndices.Add(VertexOffset+xc*2,VertexOffset+yc*2+1,VertexOffset+yc*2);
- FGR.NormalIndices.Add(NormalOffset+xc,NormalOffset+xc,NormalOffset+yc);
- FGR.NormalIndices.Add(NormalOffset+xc,NormalOffset+yc,NormalOffset+yc);
- FGR.TexCoordIndices.Add(TextureOffset+xc*2,TextureOffset+xc*2+1,TextureOffset+yc*2+1);
- FGR.TexCoordIndices.Add(TextureOffset+xc*2,TextureOffset+yc*2+1,TextureOffset+yc*2);
+ yc := xc + 1;
+ if yc = slices then yc := 0;
+ FGR.VertexIndices.Add(VertexOffset + xc * 2, VertexOffset + xc * 2 + 1, VertexOffset + yc * 2 + 1);
+ FGR.VertexIndices.Add(VertexOffset + xc * 2, VertexOffset + yc * 2 + 1, VertexOffset + yc * 2);
+ FGR.NormalIndices.Add(NormalOffset + xc, NormalOffset + xc, NormalOffset + yc);
+ FGR.NormalIndices.Add(NormalOffset + xc, NormalOffset + yc, NormalOffset + yc);
+ FGR.TexCoordIndices.Add(TextureOffset + xc * 2, TextureOffset + xc * 2 + 1, TextureOffset + yc * 2 + 1);
+ FGR.TexCoordIndices.Add(TextureOffset + xc * 2, TextureOffset + yc * 2 + 1, TextureOffset + yc * 2);
End;
- For xc := 1 to Slices-2 do
+ for xc := 1 to Slices - 2 do
- FGR.VertexIndices.Add(VertexOffset,VertexOffset+xc*2,VertexOffset+yc*2);
- FGR.VertexIndices.Add(VertexOffset+1,VertexOffset+yc*2+1,VertexOffset+xc*2+1);
- FGR.NormalIndices.Add(NormalOffset+Slices,NormalOffset+Slices,NormalOffset+Slices);
- FGR.NormalIndices.Add(NormalOffset+Slices+1,NormalOffset+Slices+1,NormalOffset+Slices+1);
- FGR.TexCoordIndices.Add(TextureOffset,TextureOffset+xc*2,TextureOffset+yc*2);
- FGR.TexCoordIndices.Add(TextureOffset+1,TextureOffset+yc*2+1,TextureOffset+xc*2+1);
+ FGR.VertexIndices.Add(VertexOffset, VertexOffset + xc * 2, VertexOffset + yc * 2);
+ FGR.VertexIndices.Add(VertexOffset + 1, VertexOffset + yc * 2 + 1, VertexOffset + xc * 2 + 1);
+ FGR.NormalIndices.Add(NormalOffset + Slices, NormalOffset + Slices, NormalOffset + Slices);
+ FGR.NormalIndices.Add(NormalOffset + Slices + 1, NormalOffset + Slices + 1, NormalOffset + Slices + 1);
+ FGR.TexCoordIndices.Add(TextureOffset, TextureOffset + xc * 2, TextureOffset + yc * 2);
+ FGR.TexCoordIndices.Add(TextureOffset + 1, TextureOffset + yc * 2 + 1, TextureOffset + xc * 2 + 1);
+// Mesh Cylinder with advanced options
+ const Position, Scale: TAffineVector; TopRadius, BottomRadius, Height: single; Slices: Integer);
- FGR : TFGVertexNormalTexIndexList;
- VertexOffset : Integer;
- NormalOffset : Integer;
- TextureOffset : Integer;
- xc,yc : Integer;
+ FGR: TFGVertexNormalTexIndexList;
+ VertexOffset: Integer;
+ NormalOffset: Integer;
+ TextureOffset: Integer;
+ Cosine, Sine: array of single;
+ xc, yc: Integer;
+ if Slices < 3 then
+ Exit;
- SetLength(Sine,Slices+1);
- SetLength(Cosine,Slices+1);
- PrepareSinCosCache(Sine,Cosine,0,360);
+ SetLength(Sine, Slices + 1);
+ SetLength(Cosine, Slices + 1);
+ PrepareSinCosCache(Sine, Cosine, 0, 360);
- VertexOffset := Mesh.Vertices.Count;
- NormalOffset := Mesh.Normals.Count;
+ VertexOffset := Mesh.Vertices.Count;
+ NormalOffset := Mesh.Normals.Count;
- Mesh.Vertices.Add(VectorCombineWeighted(Position,Scale,TopRadius*0.5*cosine[xc],TopRadius*0.5*sine[xc],Height/2));
- Mesh.Vertices.Add(VectorCombineWeighted(Position,Scale,BottomRadius*0.5*cosine[xc],BottomRadius*0.5*sine[xc],-Height/2));
+ Mesh.Vertices.Add(VectorCombineWeighted(Position, Scale, TopRadius * 0.5 * Cosine[xc],
+ TopRadius * 0.5 * Sine[xc], Height / 2));
+ Mesh.Vertices.Add(VectorCombineWeighted(Position, Scale, BottomRadius * 0.5 * Cosine[xc],
+ BottomRadius * 0.5 * Sine[xc], -Height / 2));
// Normals
- Mesh.Normals.add(AffineVectorMake(cosine[xc],sine[xc],0));
+ Mesh.Normals.Add(AffineVectorMake(Cosine[xc], Sine[xc], 0));
// Texture Coordinates
- Mesh.TexCoords.add(VectorCombineWeighted(Position,XYZVector,TopRadius*0.5*cosine[xc],TopRadius*0.5*sine[xc],Height/2));
- Mesh.TexCoords.add(VectorCombineWeighted(Position,XYZVector,BottomRadius*0.5*cosine[xc],BottomRadius*0.5*sine[xc],-Height/2));
+ Mesh.TexCoords.Add(VectorCombineWeighted(Position, XYZVector, TopRadius * 0.5 * Cosine[xc],
+ Mesh.TexCoords.Add(VectorCombineWeighted(Position, XYZVector, BottomRadius * 0.5 * Cosine[xc],
- Mesh.Normals.add(AffineVectorMake(0,0,1));
- Mesh.Normals.add(AffineVectorMake(0,0,-1));
+ Mesh.Normals.Add(AffineVectorMake(0, 0, 1));
+ Mesh.Normals.Add(AffineVectorMake(0, 0, -1));
+ begin
+ if yc = Slices then
+ yc := 0;
+ FGR.VertexIndices.Add(VertexOffset + xc * 2, VertexOffset + xc * 2 + 1,
+ VertexOffset + yc * 2 + 1);
+ FGR.TexCoordIndices.Add(TextureOffset + xc * 2, TextureOffset + xc * 2 + 1,
+ TextureOffset + yc * 2 + 1);
+ FGR.TexCoordIndices.Add(TextureOffset + xc * 2, TextureOffset + yc * 2 + 1,
+ TextureOffset + yc * 2);
+ FGR.NormalIndices.Add(NormalOffset + Slices + 1, NormalOffset + Slices + 1,
+ NormalOffset + Slices + 1);
+ FGR.TexCoordIndices.Add(TextureOffset + 1, TextureOffset + yc * 2 + 1,
+ TextureOffset + xc * 2 + 1);
+// -----------------------------------------------------------
+// Make Mesh Hexahedron
+var
+ FaceGroupList: TFGVertexIndexList;
+ i, j: Integer;
+ for i := Low(cMeshHexahedron) to High(cMeshHexahedron) do
+ // Add vertex coordinates
+ for j := Low(cMeshHexahedron[i].VertexCoords) to High(cMeshHexahedron[i].VertexCoords) do
+ MeshObject.Vertices.Add(cMeshHexahedron[i].VertexCoords[j]);
+ // Add texture coordinates
+ for j := Low(cMeshHexahedron[i].TextureCoords) to High(cMeshHexahedron[i].TextureCoords) do
+ MeshObject.TexCoords.Add(cMeshHexahedron[i].TextureCoords[j]);
+ FaceGroupList := TFGVertexIndexList.CreateOwned(MeshObject.FaceGroups);
+ for j := Low(cMeshHexahedron[i].PartIndices) to High(cMeshHexahedron[i].PartIndices) do
+ FaceGroupList.Add(cMeshHexahedron[i].PartIndices[j]);
+ FaceGroupList.MaterialName := cMeshHexahedron[i].Material;
+// --------------------------------------------------------------------------------------
+procedure BuildMeshHemiSphere(Mesh : TGLMeshObject; const Position, Scale : TAffineVector);
+ //
+procedure BuildMeshHemiCylinder(Mesh : TGLMeshObject; const Position, Scale : TAffineVector; Slices : Integer);
+procedure MakeMeshSphere(MeshObject : TGLMeshObject);
// --------------- Mesh Optimization ---------------
procedure OptimizeMesh(aList: TGLMeshObjectList);
@@ -526,8 +526,8 @@ begin
FG1 := TFGBSPNode.CreateOwned(BSP1.FaceGroups);
FG2 := TFGBSPNode.CreateOwned(BSP2.FaceGroups);
- t1 := TGLAffineVectorList.create;
- n1 := TGLAffineVectorList.create;
+ t1 := TGLAffineVectorList.Create;
+ n1 := TGLAffineVectorList.Create;
v1 := obj1.ExtractTriangles(t1, n1);
v1.TransformAsPoints(obj1.Owner.Owner.Matrix^);
@@ -538,8 +538,8 @@ begin
BSP1.TexCoords := t1;
FG1.VertexIndices.AddSerie(0, 1, BSP1.Vertices.Count);
- t2 := TGLAffineVectorList.create;
- n2 := TGLAffineVectorList.create;
+ t2 := TGLAffineVectorList.Create;
+ n2 := TGLAffineVectorList.Create;
v2 := obj2.ExtractTriangles(t2, n2);
v2.TransformAsPoints(obj2.Owner.Owner.Matrix^);
@@ -19,82 +19,92 @@ uses
GLS.VectorTypes;
-(* Converts a triangle strips into a triangle list.
+ Converts a triangle strips into a triangle list.
Vertices are added to list, based on the content of strip. Both non-indexed
- and indexed variants are available, the output is *always* non indexed. *)
+ and indexed variants are available, the output is *always* non indexed.
procedure ConvertStripToList(const strip: TGLAffineVectorList;
list: TGLAffineVectorList); overload;
procedure ConvertStripToList(const strip: TGLIntegerList;
list: TGLIntegerList); overload;
const indices: TGLIntegerList; list: TGLAffineVectorList); overload;
function ConvertStripToList(const AindicesList: PLongWordArray; Count: LongWord;
RestartIndex: LongWord): TGLLongWordList; overload;
function ConvertFansToList(const AindicesList: PLongWordArray; Count: LongWord;
RestartIndex: LongWord): TGLLongWordList;
// Expands an indexed structure into a non-indexed structure.
procedure ConvertIndexedListToList(const data: TGLAffineVectorList;
const indices: TGLIntegerList; list: TGLAffineVectorList);
-(* Builds a vector-count optimized indices list.
+ Builds a vector-count optimized indices list.
The returned list (to be freed by caller) contains an "optimized" indices
list in which duplicates coordinates in the original vertices list are used
only once (the first available duplicate in the list is used).
The vertices list is left untouched, to remap/cleanup, you may use the
- RemapAndCleanupReferences function. *)
+ RemapAndCleanupReferences function.
function BuildVectorCountOptimizedIndices(const vertices: TGLAffineVectorList;
const normals: TGLAffineVectorList = nil;
const texCoords: TGLAffineVectorList = nil): TGLIntegerList;
-(* Alters a reference array and removes unused reference values.
+ Alters a reference array and removes unused reference values.
This functions scans the reference list and removes all values that aren't
- referred in the indices list, the indices list is *not* remapped. *)
+ referred in the indices list, the indices list is *not* remapped.
procedure RemapReferences(reference: TGLAffineVectorList;
const indices: TGLIntegerList); overload;
procedure RemapReferences(reference: TGLIntegerList;
-(* Alters a reference/indice pair and removes unused reference values.
+ Alters a reference/indice pair and removes unused reference values.
referred in the indices list, and the indices list is remapped so as to remain
- coherent. *)
+ coherent.
procedure RemapAndCleanupReferences(reference: TGLAffineVectorList;
indices: TGLIntegerList);
-(* Creates an indices map from a remap list.
+ Creates an indices map from a remap list.
The remap list is what BuildVectorCountOptimizedIndices, a list of indices
to distinct/unique items, the indices map contains the indices of these items
after a remap and cleanup of the set referred by remapIndices... Clear?
In short it takes the output of BuildVectorCountOptimizedIndices and can change
it to something suitable for RemapTrianglesIndices.
- Any simpler documentation of this function welcome ;) *)
+ Any simpler documentation of this function welcome ;)
function RemapIndicesToIndicesMap(remapIndices: TGLIntegerList): TGLIntegerList;
-(* Remaps a list of triangles vertex indices and remove degenerate triangles.
- The indicesMap provides newVertexIndex:=indicesMap[oldVertexIndex] *)
+ Remaps a list of triangles vertex indices and remove degenerate triangles.
+ The indicesMap provides newVertexIndex:=indicesMap[oldVertexIndex]
procedure RemapTrianglesIndices(indices, indicesMap: TGLIntegerList);
-(* Remaps a list of indices.
+ Remaps a list of indices.
procedure remapIndices(indices, indicesMap: TGLIntegerList);
-(* Attempts to unify triangle winding.
+ Attempts to unify triangle winding.
Depending on topology, this may or may not be successful (some topologies
can't be unified, f.i. those that have duplicate triangles, those that
have edges shared by more than two triangles, those that have unconnected
- submeshes etc.) *)
+ submeshes etc.)
procedure UnifyTrianglesWinding(indices: TGLIntegerList);
// Inverts the triangles winding (vertex order).
procedure InvertTrianglesWinding(indices: TGLIntegerList);
-(* Builds normals for a triangles list.
+ Builds normals for a triangles list.
Builds one normal per reference vertex (may be NullVector is reference isn't
used), which is the averaged for normals of all adjacent triangles.
- Returned list must be freed by caller. *)
+ Returned list must be freed by caller.
function BuildNormals(reference: TGLAffineVectorList; indices: TGLIntegerList)
: TGLAffineVectorList;
-(* Builds a list of non-oriented (non duplicated) edges list.
+ Builds a list of non-oriented (non duplicated) edges list.
Each edge is represented by the two integers of its vertices,
sorted in ascending order. If not nil then
- triangleEdges is filled with the 3 indices of the 3 edges
@@ -103,13 +113,13 @@ function BuildNormals(reference: TGLAffineVectorList; indices: TGLIntegerList)
- edgesTriangles is filled with the indices of the first index
of the triangle in triangleIndices that have this edge.
A maximum of two triangles can be referred by this list,
- and its final size will be that of the Result (ie. non oriented edges list) *)
+ and its final size will be that of the Result (ie. non oriented edges list)
function BuildNonOrientedEdgesList(triangleIndices: TGLIntegerList;
triangleEdges: TGLIntegerList = nil; edgesTriangles: TGLIntegerList = nil)
: TGLIntegerList;
-(* Welds all vertices separated by a distance inferior to weldRadius.
+ Welds all vertices separated by a distance inferior to weldRadius.
Any two vertices whose distance is inferior to weldRadius will be merged
(ie. one of them will be removed, and the other replaced by the barycenter).
The indicesMap is constructed to allow remapping of indices lists with the
@@ -119,21 +129,24 @@ function BuildNonOrientedEdgesList(triangleIndices: TGLIntegerList;
This procedure can be used for mesh simplification, but preferably at design-time
for it is not optimized for speed. This is more a "fixing" utility for meshes
exported from high-polycount CAD tools (to remove duplicate vertices,
- quantification errors, etc.) *)
+ quantification errors, etc.)
procedure WeldVertices(vertices: TGLAffineVectorList; indicesMap: TGLIntegerList;
weldRadius: Single);
-(* Attempts to create as few as possible triangle strips to cover the mesh.
+ Attempts to create as few as possible triangle strips to cover the mesh.
The indices parameters define a set of triangles as a set of indices to
vertices in a vertex pool, free of duplicate vertices (or resulting
stripification will be of lower quality).
The function returns a list of TGLIntegerList, each of these lists hosting
a triangle strip, returned objects must be freed by caller.
If agglomerateLoneTriangles is True, the first of the lists actually contains
- the agglomerated list of the triangles that couldn't be stripified. *)
+ the agglomerated list of the triangles that couldn't be stripified.
function StripifyMesh(indices: TGLIntegerList; maxVertexIndex: Integer;
agglomerateLoneTriangles: Boolean = False): TGLPersistentObjectList;
-(* Increases indices coherency wrt vertex caches.
+ Increases indices coherency wrt vertex caches.
The indices parameters is understood as vertex indices of a triangles set,
the triangles are reordered to maximize coherency (vertex reuse) over the
cacheSize latest indices. This allows higher rendering performance from
@@ -141,24 +154,25 @@ function StripifyMesh(indices: TGLIntegerList; maxVertexIndex: Integer;
allowing reuse of T&L performance (similar to stripification without
the normals issues of strips).
This procedure performs a coherency optimization via a greedy hill-climber
- algorithm (ie. not optimal but fast). *)
+ algorithm (ie. not optimal but fast).
procedure IncreaseCoherency(indices: TGLIntegerList; cacheSize: Integer);
TSubdivideEdgeEvent = procedure(const idxA, idxB, newIdx: Integer); register;
- (* Subdivides mesh triangles.
- Splits along edges, each triangle becomes four. The smoothFactor can be
- used to control subdivision smoothing, zero means no smoothing (tesselation
- only), while 1 means "sphere" subdivision (a low res sphere will be subdivided
- in a higher-res sphere), values outside of the [0..1] range are for, er,
- artistic purposes.
- The procedure is not intended for real-time use. *)
+ Subdivides mesh triangles.
+ Splits along edges, each triangle becomes four. The smoothFactor can be
+ used to control subdivision smoothing, zero means no smoothing (tesselation
+ only), while 1 means "sphere" subdivision (a low res sphere will be subdivided
+ in a higher-res sphere), values outside of the [0..1] range are for, er,
+ artistic purposes.
+ The procedure is not intended for real-time use.
procedure SubdivideTriangles(smoothFactor: Single; vertices: TGLAffineVectorList;
triangleIndices: TGLIntegerList; normals: TGLAffineVectorList = nil;
onSubdivideEdge: TSubdivideEdgeEvent = nil);
-(* Create list of indices of triangles with adjacency from triangle list *)
+// Create list of indices of triangles with adjacency from triangle list
function MakeTriangleAdjacencyList(const AindicesList: PLongWordArray;
Count: LongWord; const AVerticesList: PAffineVectorArray): TGLLongWordList;
unit GLS.Movement;
unit GLS.MultiProxy;
(* Implements a multi-proxy objects, useful for discreet LOD. *)
@@ -28,7 +27,7 @@ type
TGLMultiProxy = class;
- (* MasterObject description for a MultiProxy object. *)
+ // MasterObject description for a MultiProxy object
TGLMultiProxyMaster = class (TCollectionItem)
FMasterObject : TGLBaseSceneObject;
@@ -48,19 +47,20 @@ type
function OwnerObject : TGLMultiProxy;
procedure NotifyChange;
published
- {Specifies the Master object which will be proxy'ed. }
+ // Specifies the Master object which will be proxy'ed.
property MasterObject : TGLBaseSceneObject read FMasterObject write SetMasterObject;
- {Minimum visibility distance (inclusive). }
+ // Minimum visibility distance (inclusive).
property DistanceMin : Single read FDistanceMin write SetDistanceMin;
- {Maximum visibility distance (exclusive). }
+ // Maximum visibility distance (exclusive).
property DistanceMax : Single read FDistanceMax write SetDistanceMax;
- {Determines if the master object can be visible (proxy'ed).
- Note: the master object's distance also has to be within DistanceMin
- and DistanceMax.}
+ Determines if the master object can be visible (proxy'ed).
+ Note: the master object's distance also has to be within DistanceMin and DistanceMax.
property Visible : Boolean read FVisible write SetVisible default True;
- {Collection of TGLMultiProxyMaster. }
+ // Collection of TGLMultiProxyMaster.
TGLMultiProxyMasters = class (TOwnedCollection)
protected
procedure SetItems(index : Integer; const val : TGLMultiProxyMaster);
@@ -77,13 +77,13 @@ type
procedure EndUpdate; override;
- {Multiple Proxy object.
+ (* Multiple Proxy object.
This proxy has multiple master objects, which are individually made visible
depending on a distance to the camera criterion. It can be used to implement
discreet level of detail directly for static objects, or objects that
go through cyclic animation.
For dimensionsn raycasting and silhouette purposes, the first master is used
- (item zero in the MasterObjects collection). }
+ (item zero in the MasterObjects collection). *)
TGLMultiProxy = class (TGLSceneObject)
FMasterObjects : TGLMultiProxyMasters;
@@ -19,7 +19,7 @@ uses
- TDrawState = (dsRendering, dsPicking, dsPrinting);
+ TGLDrawState = (dsRendering, dsPicking, dsPrinting);
TGLSize = record
cx: Longint;
@@ -32,9 +32,8 @@ type
osRenderFarthestFirst : render objects whose Position is the farthest from the camera first.
osRenderBlendedLast : opaque objects are not sorted and rendered first, blended ones are rendered afterwards and depth sorted.
osRenderNearestFirst : render objects whose Position is the nearest to the camera first. *)
- TGLObjectsSorting = (osInherited, osNone,
- osRenderFarthestFirst, osRenderBlendedLast,
- osRenderNearestFirst);
+ TGLObjectsSorting = (osInherited, osNone, osRenderFarthestFirst,
+ osRenderBlendedLast, osRenderNearestFirst);
(* Determines the visibility culling mode.
Culling is done level by level, allowed values are:
@@ -52,7 +51,7 @@ type
board, it may be faster not to cull at all (ie. leave this to the hardware). *)
TGLVisibilityCulling = (vcInherited, vcNone, vcObjectBased, vcHierarchical);
- TRenderContextClippingInfo = record
+ TGLRenderContextClippingInfo = record
Origin: TGLVector;
ClippingDirection: TGLVector;
ViewPortRadius: Single; // viewport bounding radius per distance unit
@@ -72,12 +71,12 @@ type
MaterialLibrary: TObject; //usually TGLMaterialLibrary;
LightMapLibrary: TObject; //usually TGLMaterialLibrary;
FogDisabledCounter: Integer;
- DrawState: TDrawState;
+ DrawState: TGLDrawState;
ObjectsSorting: TGLObjectsSorting;
VisibilityCulling: TGLVisibilityCulling;
GLStates: TGLStateCache;
PipelineTransformation: TGLTransformation;
- Rcci: TRenderContextClippingInfo;
+ Rcci: TGLRenderContextClippingInfo;
SceneAmbientColor: TGLColorVector;
BufferFaceCull: Boolean;
BufferLighting: Boolean;
@@ -94,14 +93,10 @@ type
PrimitiveMask: TGLMeshPrimitives;
OrderCounter: Integer;
- PRenderContextInfo = ^TGLRenderContextInfo;
+ PGLRenderContextInfo = ^TGLRenderContextInfo;
//====================================================================
@@ -1339,7 +1339,7 @@ type
procedure PrepareRenderingMatrices(const aViewPort: TRectangle;
resolution: Integer; pickingRect: PRect = nil); inline;
procedure DoBaseRender(const aViewPort: TRectangle; resolution: Integer;
- drawState: TDrawState; baseObject: TGLBaseSceneObject);
+ drawState: TGLDrawState; baseObject: TGLBaseSceneObject);
procedure SetupRenderingContext(context: TGLContext);
procedure SetupRCOptions(context: TGLContext);
procedure PrepareGLContext;
@@ -1398,7 +1398,7 @@ type
procedure Render; overload; inline;
procedure RenderScene(aScene: TGLScene;
const viewPortSizeX, viewPortSizeY: Integer;
(*Render the scene to a bitmap at given DPI.
DPI = "dots per inch".
The "magic" DPI of the screen is 96 under Windows. *)
@@ -7243,7 +7243,7 @@ end;
procedure TGLSceneBuffer.DoBaseRender(const aViewPort: TRectangle; resolution:
Integer;
with RenderingContext.GLStates do
@@ -7379,7 +7379,7 @@ end;
procedure TGLSceneBuffer.RenderScene(aScene: TGLScene;
- drawState: TDrawState;
+ drawState: TGLDrawState;
baseObject: TGLBaseSceneObject);
@@ -97,7 +97,7 @@ type
access a tiny bit of a triangle (for instance), not all data. *)
FEdgeVertices: TGLIntegerList;
FEdgeFaces: TGLIntegerList;
- FFaceVisible: TByteList;
+ FFaceVisible: TGLByteList;
FFaceVertexIndex: TGLIntegerList;
FFaceNormal: TGLAffineVectorList;
FVertexMemory: TGLIntegerList;
@@ -277,7 +277,7 @@ end;
constructor TGLConnectivity.Create(APrecomputeFaceNormal: Boolean);
- FFaceVisible := TByteList.Create;
+ FFaceVisible := TGLByteList.Create;
FFaceVertexIndex := TGLIntegerList.Create;
FFaceNormal := TGLAffineVectorList.Create;
FEdgeVertices := TGLIntegerList.Create;
@@ -440,7 +440,7 @@ var
Patch, PrevPatch: TGLROAMPatch;
PatchList, RowList, prevRow, buf: TList;
PostRenderPatchList, postRenderHeightDataList: TList;
- rcci: TRenderContextClippingInfo;
+ rcci: TGLRenderContextClippingInfo;
CurrentMaterialName: String;
MaxTilePosX, MaxTilePosY, MinTilePosX, MinTilePosY: Single;
t_l, t_t, t_r, t_b: Single;
@@ -1,21 +1,20 @@
unit GLS.TimeEventsMgr;
- Time based events mannager using the Cadencer
- can be useful to make animations with GlScene
+ Time based events mannager using the Cadencer
+ can be useful to make animations with GLScene
- System.Classes,
+ System.Classes,
- GLS.Cadencer,
+ GLS.Cadencer,
@@ -24,162 +23,176 @@ type
TGLTimeEventsMGR = class(TGLUpdateAbleComponent)
- FCadencer : TGLCadencer;
- FEnabled : boolean;
- FFreeEventOnEnd : boolean;
- FEvents : TTimeEvents;
- protected
- procedure Notification(AComponent: TComponent; Operation: TOperation); override;
- procedure SetCadencer(const val : TGLCadencer);
- procedure SetEvents(const val : TTimeEvents);
- public
- constructor Create(aOwner : TComponent); override;
- destructor Destroy; override;
- procedure DoProgress(const progressTime : TGLProgressTimes); override;
- procedure Reset();
- published
- property Cadencer : TGLCadencer read FCadencer write SetCadencer;
- property Enabled : boolean read FEnabled write FEnabled default True;
- property FreeEventOnEnd : boolean read FFreeEventOnEnd write FFreeEventOnEnd default False;
- property Events : TTimeEvents read FEvents write SetEvents;
- end;
- TTimeEvents = class (TCollection)
- Owner : TComponent;
- function GetOwner: TPersistent; override;
- procedure SetItems(index : Integer; const val : TTimeEvent);
- function GetItems(index : Integer) : TTimeEvent;
- constructor Create(AOwner : TComponent);
- function Add: TTimeEvent;
- function FindItemID(ID: Integer): TTimeEvent;
- function EventByName(const name:String): TTimeEvent;
- property Items[index : Integer] : TTimeEvent read GetItems write SetItems; default;
- TTimeEventType = (etOneShot, etContinuous, etPeriodic);
- TTimeEventProc = procedure (event : TTimeEvent) of object;
- TTimeEvent = class (TCollectionItem)
- private
- FName: String;
- FStartTime, FEndTime, FElapsedTime : Double;
- FPeriod : Double;
- FEventType: TTimeEventType;
- FOnEvent:TTimeEventProc;
- FEnabled: boolean;
- FTickCount : Cardinal;
- procedure SetEnabled(const Value: Boolean);
- function GetDisplayName : String; override;
- procedure SetName(const Val : String);
- procedure DoEvent(const CurTime : Double);
- constructor Create(Collection : TCollection); override;
- // Number of times the event was triggered since activation
- property TickCount : Cardinal read FTickCount;
- // Elapsed time since the event was activated
- property ElapsedTime : Double read FElapsedTime;
- property Name : String read FName write SetName;
- property StartTime : Double read FStartTime write FStartTime;
- property EndTime : Double read FEndTime write FEndTime;
- property Period : Double read FPeriod write FPeriod;
- property EventType : TTimeEventType read FEventType write FEventType default etOneShot;
- property OnEvent : TTimeEventProc read FOnEvent write FOnEvent;
- property Enabled : Boolean read FEnabled write SetEnabled default True;
-//--------------------------------------------
+ FCadencer: TGLCadencer;
+ FEnabled: boolean;
+ FFreeEventOnEnd: boolean;
+ FEvents: TTimeEvents;
+ protected
+ procedure Notification(AComponent: TComponent;
+ Operation: TOperation); override;
+ procedure SetCadencer(const val: TGLCadencer);
+ procedure SetEvents(const val: TTimeEvents);
+ public
+ constructor Create(aOwner: TComponent); override;
+ destructor Destroy; override;
+ procedure DoProgress(const progressTime: TGLProgressTimes); override;
+ procedure Reset();
+ published
+ property Cadencer: TGLCadencer read FCadencer write SetCadencer;
+ property Enabled: boolean read FEnabled write FEnabled default True;
+ property FreeEventOnEnd: boolean read FFreeEventOnEnd write FFreeEventOnEnd
+ default False;
+ property Events: TTimeEvents read FEvents write SetEvents;
+ TTimeEvents = class(TCollection)
+ Owner: TComponent;
+ function GetOwner: TPersistent; override;
+ procedure SetItems(index: Integer; const val: TTimeEvent);
+ function GetItems(index: Integer): TTimeEvent;
+ constructor Create(aOwner: TComponent);
+ function Add: TTimeEvent;
+ function FindItemID(ID: Integer): TTimeEvent;
+ function EventByName(const name: String): TTimeEvent;
+ property Items[index: Integer]: TTimeEvent read GetItems
+ write SetItems; default;
+ TTimeEventType = (etOneShot, etContinuous, etPeriodic);
+ TTimeEventProc = procedure(event: TTimeEvent) of object;
+ TTimeEvent = class(TCollectionItem)
+ private
+ FName: String;
+ FStartTime, FEndTime, FElapsedTime: Double;
+ FPeriod: Double;
+ FEventType: TTimeEventType;
+ FOnEvent: TTimeEventProc;
+ FTickCount: Cardinal;
+ procedure SetEnabled(const Value: boolean);
+ function GetDisplayName: String; override;
+ procedure SetName(const val: String);
+ procedure DoEvent(const CurTime: Double);
+ constructor Create(Collection: TCollection); override;
+ // Number of times the event was triggered since activation
+ property TickCount: Cardinal read FTickCount;
+ // Elapsed time since the event was activated
+ property ElapsedTime: Double read FElapsedTime;
+ property Name: String read FName write SetName;
+ property StartTime: Double read FStartTime write FStartTime;
+ property EndTime: Double read FEndTime write FEndTime;
+ property Period: Double read FPeriod write FPeriod;
+ property EventType: TTimeEventType read FEventType write FEventType
+ default etOneShot;
+ property OnEvent: TTimeEventProc read FOnEvent write FOnEvent;
+ property Enabled: boolean read FEnabled write SetEnabled default True;
+// --------------------------------------------
// ------------------
// ------------------ TGLTimeEventsMGR ------------------
-constructor TGLTimeEventsMGR.Create(aOwner : TComponent);
+constructor TGLTimeEventsMGR.Create(aOwner: TComponent);
- inherited;
- FEnabled:=True;
- FFreeEventOnEnd:=False;
- FEvents:=TTimeEvents.Create(self);
+ inherited;
+ FEnabled := True;
+ FFreeEventOnEnd := False;
+ FEvents := TTimeEvents.Create(self);
destructor TGLTimeEventsMGR.Destroy;
- Cadencer:=nil;
- FEvents.Free;
- inherited Destroy;
+ Cadencer := nil;
+ FEvents.Free;
+ inherited Destroy;
-procedure TGLTimeEventsMGR.Notification(AComponent: TComponent; Operation: TOperation);
+procedure TGLTimeEventsMGR.Notification(AComponent: TComponent;
+ Operation: TOperation);
- if (Operation=opRemove) and (AComponent=Cadencer) then
- FCadencer:=nil;
+ if (Operation = opRemove) and (AComponent = Cadencer) then
+ FCadencer := nil;
-procedure TGLTimeEventsMGR.SetCadencer(const val : TGLCadencer);
+procedure TGLTimeEventsMGR.SetCadencer(const val: TGLCadencer);
- if FCadencer<>val then begin
- if Assigned(FCadencer) then
- FCadencer.UnSubscribe(Self);
- FCadencer:=val;
- FCadencer.Subscribe(Self);
+ if FCadencer <> val then
+ if Assigned(FCadencer) then
+ FCadencer.UnSubscribe(self);
+ FCadencer := val;
+ FCadencer.Subscribe(self);
-procedure TGLTimeEventsMGR.SetEvents(const val : TTimeEvents);
+procedure TGLTimeEventsMGR.SetEvents(const val: TTimeEvents);
- FEvents.Assign(val);
+ FEvents.Assign(val);
-procedure TGLTimeEventsMGR.DoProgress(const progressTime : TGLProgressTimes);
+procedure TGLTimeEventsMGR.DoProgress(const progressTime: TGLProgressTimes);
- i : Integer;
+ i: Integer;
- if not Enabled then Exit;
- i:=0;
- with progressTime do while i<=Events.Count-1 do with Events.Items[i] do begin
- if Enabled and Assigned(FOnEvent) then begin
- case EventType of
- etOneShot :
- if (newTime>=StartTime) and (TickCount=0) then
- DoEvent(newTime);
- etContinuous :
- if (newTime>=StartTime) and ((newTime<=EndTime) or (EndTime<=0)) then
- etPeriodic :
- if (newTime>=StartTime+TickCount*Period) and ((newTime<=EndTime) or (EndTime<=0)) then
- else
+ if not Enabled then
+ i := 0;
+ with progressTime do
+ while i <= Events.Count - 1 do
+ with Events.Items[i] do
+ if Enabled and Assigned(FOnEvent) then
+ case EventType of
+ etOneShot:
+ if (newTime >= StartTime) and (TickCount = 0) then
+ DoEvent(newTime);
+ etContinuous:
+ if (newTime >= StartTime) and
+ ((newTime <= EndTime) or (EndTime <= 0)) then
+ etPeriodic:
+ if (newTime >= StartTime + TickCount * Period) and
+ else
Assert(False);
- if FreeEventOnEnd and
- ( ((EventType<>etOneShot) and (newTime>EndTime) and (EndTime>=0)) or
- ((EventType=etOneShot) and (TickCount>0)) ) then
- Events[i].Free
- else begin
- // if we delete current event, the next will have same index
- // so increment only if we don't delete
- Inc(i);
+ if FreeEventOnEnd and
+ (((EventType <> etOneShot) and (newTime > EndTime) and (EndTime >= 0))
+ or ((EventType = etOneShot) and (TickCount > 0))) then
+ Events[i].Free
+ // if we delete current event, the next will have same index
+ // so increment only if we don't delete
+ Inc(i);
procedure TGLTimeEventsMGR.Reset;
- I: Integer;
if FEvents.Count <> 0 then
- for I := 0 to FEvents.Count - 1 do
- FEvents[I].FTickCount := 0;
+ for i := 0 to FEvents.Count - 1 do
+ FEvents[i].FTickCount := 0;
@@ -187,101 +200,114 @@ end;
// ------------------ TTimeEvents ------------------
-constructor TTimeEvents.Create(AOwner : TComponent);
+constructor TTimeEvents.Create(aOwner: TComponent);
- Owner:=AOwner;
- inherited Create(TTimeEvent);
+ Owner := aOwner;
+ inherited Create(TTimeEvent);
function TTimeEvents.GetOwner: TPersistent;
- Result:=Owner;
+ Result := Owner;
-procedure TTimeEvents.SetItems(index : Integer; const val : TTimeEvent);
+procedure TTimeEvents.SetItems(index: Integer; const val: TTimeEvent);
- inherited Items[index]:=val;
+ inherited Items[index] := val;
-function TTimeEvents.GetItems(index : Integer) : TTimeEvent;
+function TTimeEvents.GetItems(index: Integer): TTimeEvent;
- Result:=TTimeEvent(inherited Items[index]);
+ Result := TTimeEvent(inherited Items[index]);
-function TTimeEvents.Add : TTimeEvent;
+function TTimeEvents.Add: TTimeEvent;
- Result:=(inherited Add) as TTimeEvent;
+ Result := (inherited Add) as TTimeEvent;
function TTimeEvents.FindItemID(ID: Integer): TTimeEvent;
- Result:=(inherited FindItemID(ID)) as TTimeEvent;
+ Result := (inherited FindItemID(ID)) as TTimeEvent;
-function TTimeEvents.EventByName(const name:String): TTimeEvent;
-var i:integer;
+function TTimeEvents.EventByName(const name: String): TTimeEvent;
- while (i<Count) and (Items[i].FName<>name) do inc(i);
- if i=Count then result:=nil else result:=Items[i];
+ while (i < Count) and (Items[i].FName <> name) do
+ if i = Count then
+ Result := nil
+ Result := Items[i];
// ------------------ TTimeEvent ------------------
-constructor TTimeEvent.Create(Collection : TCollection);
+constructor TTimeEvent.Create(Collection: TCollection);
- inherited Create(Collection);
- FEventType:=etOneShot;
- FName:=Format('Event%d', [index]); // give a default name different for each event
+ inherited Create(Collection);
+ FEventType := etOneShot;
+ FName := Format('Event%d', [index]);
+ // give a default name different for each event
destructor TTimeEvent.Destroy;
-function TTimeEvent.GetDisplayName : String;
+function TTimeEvent.GetDisplayName: String;
- etOneShot:
- Result:=Name+Format(' (OneShot ST=%g)',[StartTime]);
- etContinuous:
- Result:=Name+Format(' (Continuous ST=%g ET=%g)',[StartTime,EndTime]);
- etPeriodic:
- Result:=Name+Format(' (Periodic ST=%g ET=%g P=%g)',[StartTime,EndTime,Period]);
+ Result := Name + Format(' (OneShot ST=%g)', [StartTime]);
+ Result := Name + Format(' (Continuous ST=%g ET=%g)',
+ [StartTime, EndTime]);
+ Result := Name + Format(' (Periodic ST=%g ET=%g P=%g)',
+ [StartTime, EndTime, Period]);
-procedure TTimeEvent.SetName(const Val : String);
+procedure TTimeEvent.SetName(const val: String);
- ok : Boolean;
+ ok: boolean;
- ok := True;
- with self.Collection as TTimeEvents do // we mustn't have 2 events with the same name (for EventByName)
- for i:=0 to Count-1 do
- if Items[i].FName = val then Ok := False;
- if Ok and (Val<>'') then FName:=Val;
+ ok := True;
+ with self.Collection as TTimeEvents do
+ // we mustn't have 2 events with the same name (for EventByName)
+ for i := 0 to Count - 1 do
+ if Items[i].FName = val then
+ ok := False;
+ if ok and (val <> '') then
+ FName := val;
-procedure TTimeEvent.DoEvent(const curTime : Double);
+procedure TTimeEvent.DoEvent(const CurTime: Double);
- if Assigned(FOnEvent) then begin
- FElapsedTime:=curTime-StartTime;
- FOnEvent(Self);
- Inc(FTickCount);
+ if Assigned(FOnEvent) then
+ FElapsedTime := CurTime - StartTime;
+ FOnEvent(self);
+ Inc(FTickCount);
-procedure TTimeEvent.SetEnabled(const Value: Boolean);
+procedure TTimeEvent.SetEnabled(const Value: boolean);
FEnabled := Value;
- FStartTime := ((GetOwner as TTimeEvents).Owner as TGLTimeEventsMGR).Cadencer.CurrentTime;
+ FStartTime := ((GetOwner as TTimeEvents).Owner as TGLTimeEventsMGR)
+ .Cadencer.CurrentTime;
@@ -51,8 +51,10 @@ type
TGLMeshAutoCenterings = set of TGLMeshAutoCentering;
TGLMeshObjectMode = (momTriangles, momTriangleStrip, momFaceGroups);
- (* A base class for mesh objects. The class introduces a set of vertices and
- normals for the object but does no rendering of its own *)
+ A base class for mesh objects. The class introduces a set of vertices and
+ normals for the object but does no rendering of its own
TGLBaseMeshObject = class(TGLPersistentObject)
FName: string;
@@ -73,7 +75,8 @@ type
procedure Clear; virtual;
// Translates all the vertices by the given delta.
procedure Translate(const delta: TAffineVector); virtual;
- (* Builds (smoothed) normals for the vertex list.
+ Builds (smoothed) normals for the vertex list.
If normalIndices is nil, the method assumes a bijection between
vertices and normals sets, and when performed, Normals and Vertices
list will have the same number of items (whatever previously was in
@@ -82,18 +85,21 @@ type
their indices will be added to normalIndices. Already defined
normals and indices are preserved.
The only valid modes are currently momTriangles and momTriangleStrip
- (ie. momFaceGroups not supported). *)
+ (ie. momFaceGroups not supported).
procedure BuildNormals(vertexIndices: TGLIntegerList; mode: TGLMeshObjectMode;
NormalIndices: TGLIntegerList = nil);
// Builds normals faster without index calculations for the stripe mode
procedure GenericOrderedBuildNormals (mode: TGLMeshObjectMode);
- (* Extracts all mesh triangles as a triangles list.
+ Extracts all mesh triangles as a triangles list.
The resulting list size is a multiple of 3, each group of 3 vertices
making up and independant triangle.
The returned list can be used independantly from the mesh object
(all data is duplicated) and should be freed by caller.
If texCoords is specified, per vertex texture coordinates will be
- placed there, when available. *)
+ placed there, when available.
function ExtractTriangles(texCoords: TGLAffineVectorList = nil;
Normals: TGLAffineVectorList = nil): TGLAffineVectorList; virtual;
property Name: string read FName write FName;
@@ -105,23 +111,25 @@ type
TGLSkeletonFrameList = class;
TGLSkeletonFrameTransform = (sftRotation, sftQuaternion);
- (* Stores position and rotation for skeleton joints.
+ Stores position and rotation for skeleton joints.
If you directly alter some values, make sure to call FlushLocalMatrixList
so that the local matrices will be recalculated (the call to Flush does
- not recalculate the matrices, but marks the current ones as dirty) *)
+ not recalculate the matrices, but marks the current ones as dirty)
TGLSkeletonFrame = class(TGLPersistentObject)
FOwner: TGLSkeletonFrameList;
FPosition: TGLAffineVectorList;
FRotation: TGLAffineVectorList;
- FQuaternion: TQuaternionList;
+ FQuaternion: TGLQuaternionList;
FLocalMatrixList: PMatrixArray;
FTransformMode: TGLSkeletonFrameTransform;
procedure SetPosition(const val: TGLAffineVectorList);
procedure SetRotation(const val: TGLAffineVectorList);
- procedure SetQuaternion(const val: TQuaternionList);
+ procedure SetQuaternion(const val: TGLQuaternionList);
constructor CreateOwned(aOwner: TGLSkeletonFrameList);
constructor Create; override;
@@ -136,7 +144,7 @@ type
property Rotation: TGLAffineVectorList read FRotation write SetRotation;
(* Quaternions are an alternative to Euler rotations to build the
global matrices for the skeleton bones. *)
- property Quaternion: TQuaternionList read FQuaternion write SetQuaternion;
+ property Quaternion: TGLQuaternionList read FQuaternion write SetQuaternion;
(* TransformMode indicates whether to use Rotation or Quaternion to build
the local transform matrices. *)
property TransformMode: TGLSkeletonFrameTransform read FTransformMode write FTransformMode;
@@ -211,10 +219,12 @@ type
property GlobalMatrix: TGLMatrix read FGlobalMatrix write FGlobalMatrix;
- (* A skeleton bone or node and its children.
+ A skeleton bone or node and its children.
This class is the base item of the bones hierarchy in a skeletal model.
The joint values are stored in a TGLSkeletonFrame, but the calculated bone
- matrices are stored here. *)
+ matrices are stored here.
TGLSkeletonBone = class(TGLSkeletonBoneList)
FOwner: TGLSkeletonBoneList; // indirectly persistent
@@ -244,12 +254,16 @@ type
procedure SetGlobalMatrix(const Matrix: TGLMatrix); // Ragdoll
// Set the bone's GlobalMatrix. Used for Ragdoll.
procedure SetGlobalMatrixForRagDoll(const RagDollMatrix: TGLMatrix); // Ragdoll
- (* Calculates the global matrix for the bone and its sub-bone.
- Call this function directly only the RootBone. *)
+ Calculates the global matrix for the bone and its sub-bone.
+ Call this function directly only the RootBone.
procedure PrepareGlobalMatrices; override;
- (* Global Matrix for the bone in the current frame.
+ Global Matrix for the bone in the current frame.
Global matrices must be prepared by invoking PrepareGlobalMatrices
- on the root bone. *)
+ on the root bone.
property GlobalMatrix: TGLMatrix read FGlobalMatrix;
// Free all sub bones and reset BoneID and Name.
procedure Clean; override;
@@ -257,10 +271,12 @@ type
TGLSkeletonColliderList = class;
- (* A general class storing the base level info required for skeleton
+ A general class storing the base level info required for skeleton
based collision methods. This class is meant to be inherited from
to create skeleton driven Verlet Constraints, ODE Geoms, etc.
- Overriden classes should be named as TSCxxxxx. *)
+ Overriden classes should be named as TSCxxxxx.
TGLSkeletonCollider = class(TGLPersistentObject)
FOwner: TGLSkeletonColliderList;
@@ -317,7 +333,7 @@ type
Weight: Single;
ExternalPositions: TGLAffineVectorList;
ExternalRotations: TGLAffineVectorList;
- ExternalQuaternions: TQuaternionList;
+ ExternalQuaternions: TGLQuaternionList;
(* Main skeleton object. This class stores the bones hierarchy and animation frames.
@@ -358,17 +374,21 @@ type
procedure MorphTo(frame: TGLSkeletonFrame); overload;
procedure Lerp(frameIndex1, frameIndex2: Integer; lerpFactor: Single);
procedure BlendedLerps(const lerpInfos: array of TGLBlendedLerpInfo);
- (* Linearly removes the translation component between skeletal frames.
+ Linearly removes the translation component between skeletal frames.
This function will compute the translation of the first bone (index 0)
and linearly subtract this translation in all frames between startFrame
and endFrame. Its purpose is essentially to remove the 'slide' that
- exists in some animation formats (f.i. SMD). *)
+ exists in some animation formats (f.i. SMD).
procedure MakeSkeletalTranslationStatic(startFrame, endFrame: Integer);
- (* Removes the absolute rotation component of the skeletal frames.
+ Removes the absolute rotation component of the skeletal frames.
Some formats will store frames with absolute rotation information,
if this correct if the animation is the "main" animation.
This function removes that absolute information, making the animation
- frames suitable for blending purposes. *)
+ frames suitable for blending purposes.
procedure MakeSkeletalRotationDelta(startFrame, endFrame: Integer);
// Applies current frame to morph all mesh objects.
procedure MorphMesh(normalize: Boolean);
@@ -380,24 +400,30 @@ type
procedure StartRagdoll;
// Restore the BoneMatrixInvertedMeshes to stop the ragdoll
procedure StopRagdoll;
- (* Turning this option off (by default) allows to increase FPS,
+ Turning this option off (by default) allows to increase FPS,
but may break backwards-compatibility, because some may choose to
- attach other objects to invisible parts. *)
+ attach other objects to invisible parts.
property MorphInvisibleParts: Boolean read FMorphInvisibleParts write FMorphInvisibleParts;
- (* Rendering options per TGLMeshObject.moroGroupByMaterial : if set,
+ Rendering options per TGLMeshObject.moroGroupByMaterial : if set,
the facegroups will be rendered by material in batchs, this will optimize
rendering by reducing material switches, but also implies that facegroups
- will not be rendered in the order they are in the list *)
+ will not be rendered in the order they are in the list
TGLMeshObjectRenderingOption = (moroGroupByMaterial);
TGLMeshObjectRenderingOptions = set of TGLMeshObjectRenderingOption;
TGLVBOBuffer = (vbVertices, vbNormals, vbColors, vbTexCoords, vbLightMapTexCoords, vbTexCoordsEx);
TGLVBOBuffers = set of TGLVBOBuffer;
- (* Base mesh class. Introduces base methods and properties for mesh objects.
- Subclasses are named "TGLMOxxx". *)
+ Base mesh class. Introduces base methods and properties for mesh objects.
+ Subclasses are named "TGLMOxxx".
TGLMeshObject = class(TGLBaseMeshObject)
FOwner: TGLMeshObjectList;
@@ -1801,7 +1827,7 @@ begin
inherited Create;
FPosition := TGLAffineVectorList.Create;
FRotation := TGLAffineVectorList.Create;
- FQuaternion := TQuaternionList.Create;
+ FQuaternion := TGLQuaternionList.Create;
FTransformMode := sftRotation;
@@ -1861,7 +1887,7 @@ begin
FRotation.Assign(val);
-procedure TGLSkeletonFrame.SetQuaternion(const val: TQuaternionList);
+procedure TGLSkeletonFrame.SetQuaternion(const val: TGLQuaternionList);
FQuaternion.Assign(val);
@@ -2636,7 +2662,7 @@ var
i, n: Integer;
blendPositions: TGLAffineVectorList;
blendRotations: TGLAffineVectorList;
- blendQuaternions: TQuaternionList;
+ blendQuaternions: TGLQuaternionList;
n := High(lerpInfos) - Low(lerpInfos) + 1;
Assert(n >= 1);
@@ -2710,7 +2736,7 @@ begin
sftQuaternion:
- blendQuaternions := TQuaternionList.Create;
+ blendQuaternions := TGLQuaternionList.Create;
// Initial frame lerp
Quaternion.Lerp(Frames[lerpInfos[i].frameIndex1].Quaternion,
Frames[lerpInfos[i].frameIndex2].Quaternion,
@@ -26,6 +26,7 @@ unit GLS.VectorGeometry;
{$I GLScene.inc}
System.Types,
@@ -38,8 +39,10 @@ const
cColinearBias = 1E-8;
- (* Data types needed for 3D graphics calculation, included are 'C like'
- aliases for each type (to be conformal with OpenGL types) *)
+ Data types needed for 3D graphics calculation, included are 'C like'
+ aliases for each type (to be conformal with OpenGL types)
PFloat = PSingle;
PTexPoint = ^TTexPoint;
@@ -47,8 +50,10 @@ type
S, T: Single;
- (* Types to specify continous streams of a specific type
- switch off range checking to access values beyond the limits *)
+ Types to specify continous streams of a specific type
+ switch off range checking to access values beyond the limits
PByteVector = ^TByteVector;
PByteArray = PByteVector;
TByteVector = array [0 .. cMaxArray] of Byte;
@@ -186,10 +191,12 @@ type
PAffineMatrix = ^TAffineMatrix;
TAffineMatrix = TAffineFltMatrix;
- (* A plane equation.
+ A plane equation.
Defined by its equation A.x+B.y+C.z+D , a plane can be mapped to the
homogeneous space coordinates, and this is what we are doing here.
- The typename is just here for easing up data manipulation *)
+ The typename is just here for easing up data manipulation
THmgPlane = TGLVector;
TDoubleHmgPlane = THomogeneousDblVector;
@@ -221,13 +228,17 @@ type
ttTranslateX, ttTranslateY, ttTranslateZ,
ttPerspectiveX, ttPerspectiveY, ttPerspectiveZ, ttPerspectiveW);
- (* Used to describe a sequence of transformations in following order:
- [Sx][Sy][Sz][ShearXY][ShearXZ][ShearZY][Rx][Ry][Rz][Tx][Ty][Tz][P(x,y,z,w)]
- constants are declared for easier access (see MatrixDecompose below) *)
+ Used to describe a sequence of transformations in following order:
+ [Sx][Sy][Sz][ShearXY][ShearXZ][ShearZY][Rx][Ry][Rz][Tx][Ty][Tz][P(x,y,z,w)]
+ constants are declared for easier access (see MatrixDecompose below)
TTransformations = array [TTransType] of Single;
TPackedRotationMatrix = array [0 .. 2] of SmallInt;
+ TGLInterpolationType = (itLinear, itPower, itSin, itSinAlt, itTan, itLn, itExp);
const
// TexPoints (2D space)
XTexPoint: TTexPoint = (S: 1; T: 0);
@@ -616,9 +627,6 @@ procedure VectorArrayLerp(const src1, src2: PVectorArray; T: Single; n: Integer;
procedure VectorArrayLerp(const src1, src2: PAffineVectorArray; T: Single; n: Integer; dest: PAffineVectorArray); overload;
procedure VectorArrayLerp(const src1, src2: PTexPointArray; T: Single; n: Integer; dest: PTexPointArray); overload;
-type
- TGLInterpolationType = (itLinear, itPower, itSin, itSinAlt, itTan, itLn, itExp);
// There functions that do the same as "Lerp", but add some distortions
function InterpolatePower(const start, stop, delta: Single; const DistortionDegree: Single): Single;
function InterpolateLn(const start, stop, delta: Single; const DistortionDegree: Single): Single;
@@ -645,9 +653,9 @@ function InterpolateCombined(const start, stop, delta: Single;
const DistortionDegree: Single;
const InterpolationType: TGLInterpolationType): Single; inline;
-{ Calculates the length of a vector following the equation sqrt(x*x+y*y). }
-function VectorLength(const X, Y: Single): Single; overload;
-{ Calculates the length of a vector following the equation sqrt(x*x+y*y+z*z). }
+// Calculates the length of a vector following the equation sqrt(x*x+y*y).
+function VectorLength(const X, Y: Single): Single; overload;
+// Calculates the length of a vector following the equation sqrt(x*x+y*y+z*z).
function VectorLength(const X, Y, Z: Single): Single; overload;
// Calculates the length of a vector following the equation sqrt(x*x+y*y).
function VectorLength(const V: TVector2f): Single; overload;
@@ -690,12 +698,16 @@ function VectorNormalize(const V: TGLVector): TGLVector; overload;
// Transforms vectors to unit length
procedure NormalizeVectorArray(list: PAffineVectorArray; n: Integer); overload; inline;
-(* Calculates the cosine of the angle between Vector1 and Vector2.
- Result = DotProduct(V1, V2) / (Length(V1) * Length(V2)) *)
+ Calculates the cosine of the angle between Vector1 and Vector2.
+ Result = DotProduct(V1, V2) / (Length(V1) * Length(V2))
function VectorAngleCosine(const V1, V2: TAffineVector): Single; overload;
function VectorAngleCosine(const V1, V2: TGLVector): Single; overload;
// Negates the vector
@@ -739,8 +751,10 @@ function VectorScale(const V: TAffineVector; const factor: TAffineVector): TAffi
// RScales given vector by another vector
function VectorScale(const V: TGLVector; const factor: TGLVector): TGLVector; overload;
-(* Divides given vector by another vector.
- v[x]:=v[x]/divider[x], v[y]:=v[y]/divider[y] etc. *)
+ Divides given vector by another vector.
+ v[x]:=v[x]/divider[x], v[y]:=v[y]/divider[y] etc.
procedure DivideVector(var V: TGLVector; const divider: TGLVector); overload; inline;
procedure DivideVector(var V: TAffineVector; const divider: TAffineVector); overload; inline;
function VectorDivide(const V: TGLVector; const divider: TGLVector): TGLVector; overload; inline;
@@ -828,8 +842,10 @@ function CreateScaleMatrix(const V: TGLVector): TGLMatrix; overload;
function CreateTranslationMatrix(const V: TAffineVector): TGLMatrix; overload;
// Creates translation matrix
function CreateTranslationMatrix(const V: TGLVector): TGLMatrix; overload;
-{ Creates a scale+translation matrix.
- Scale is applied BEFORE applying offset }
+ Creates a scale+translation matrix.
+ Scale is applied BEFORE applying offset
function CreateScaleAndTranslationMatrix(const scale, offset: TGLVector): TGLMatrix; overload;
// Creates matrix for rotation about x-axis (angle in rad)
function CreateRotationMatrixX(const sine, cosine: Single): TGLMatrix; overload;
@@ -898,15 +914,19 @@ function MatrixInvert(const M: TGLMatrix): TGLMatrix; overload;
procedure InvertMatrix(var M: TAffineMatrix); overload;
function MatrixInvert(const M: TAffineMatrix): TAffineMatrix; overload;
-(* Finds the inverse of an angle preserving matrix.
+ Finds the inverse of an angle preserving matrix.
Angle preserving matrices can combine translation, rotation and isotropic
- scaling, other matrices won't be properly inverted by this function. *)
+ scaling, other matrices won't be properly inverted by this function.
function AnglePreservingMatrixInvert(const mat: TGLMatrix): TGLMatrix;
-(* Decompose a non-degenerated 4x4 transformation matrix into the sequence of transformations that produced it.
+ Decompose a non-degenerated 4x4 transformation matrix into the sequence of transformations that produced it.
Modified by ml then eg, original Author: Spencer W. Thomas, University of Michigan
The coefficient of each transformation is returned in the corresponding
- element of the vector Tran. Returns true upon success, false if the matrix is singular. *)
+ element of the vector Tran. Returns true upon success, false if the matrix is singular.
function MatrixDecompose(const M: TGLMatrix; var Tran: TTransformations): Boolean;
function CreateLookAtMatrix(const eye, center, normUp: TGLVector): TGLMatrix;
function CreateMatrixFromFrustum(Left, Right, Bottom, Top, ZNear, ZFar: Single): TGLMatrix;
@@ -931,10 +951,12 @@ procedure SetPlane(var dest: TDoubleHmgPlane; const src: THmgPlane);
// Normalize a plane so that point evaluation = plane distance. }
procedure NormalizePlane(var plane: THmgPlane);
-(* Calculates the cross-product between the plane normal and plane to point vector.
- This functions gives an hint as to were the point is, if the point is in the
- half-space pointed by the vector, result is positive.
- This function performs an homogeneous space dot-product. *)
+ Calculates the cross-product between the plane normal and plane to point vector.
+ This functions gives an hint as to were the point is, if the point is in the
+ half-space pointed by the vector, result is positive.
+ This function performs an homogeneous space dot-product.
function PlaneEvaluatePoint(const plane: THmgPlane; const point: TAffineVector): Single; overload;
function PlaneEvaluatePoint(const plane: THmgPlane; const point: TGLVector): Single; overload;
@@ -943,15 +965,18 @@ function CalcPlaneNormal(const p1, p2, p3: TAffineVector): TAffineVector; overlo
procedure CalcPlaneNormal(const p1, p2, p3: TAffineVector; var vr: TAffineVector); overload;
procedure CalcPlaneNormal(const p1, p2, p3: TGLVector; var vr: TAffineVector); overload;
-(* Returns true if point is in the half-space defined by a plane with normal.
- The plane itself is not considered to be in the tested halfspace. *)
+ Returns true if point is in the half-space defined by a plane with normal.
+ The plane itself is not considered to be in the tested halfspace.
function PointIsInHalfSpace(const point, planePoint, planeNormal: TGLVector): Boolean; overload;
function PointIsInHalfSpace(const point, planePoint, planeNormal: TAffineVector): Boolean; overload;
function PointIsInHalfSpace(const point: TAffineVector; const plane: THmgPlane): Boolean; overload;
-(* Computes algebraic distance between point and plane.
- Value will be positive if the point is in the halfspace pointed by the normal,
- negative on the other side. *)
+ Computes algebraic distance between point and plane.
+ Value will be positive if the point is in the halfspace pointed by the normal, negative on the other side.
function PointPlaneDistance(const point, planePoint, planeNormal: TGLVector): Single; overload;
function PointPlaneDistance(const point, planePoint, planeNormal: TAffineVector): Single; overload;
function PointPlaneDistance(const point: TAffineVector; const plane: THmgPlane): Single; overload;
@@ -1039,14 +1064,18 @@ function QuaternionFromAngleAxis(const angle: Single; const axis: TAffineVector)
function QuaternionFromRollPitchYaw(const r, p, Y: Single): TQuaternion;
// Constructs quaternion from Euler angles in arbitrary order (angles in degrees)
function QuaternionFromEuler(const X, Y, Z: Single; eulerOrder: TEulerOrder): TQuaternion;
-(* Returns quaternion product qL * qR. Note: order is important!
+ Returns quaternion product qL * qR. Note: order is important!
To combine rotations, use the product QuaternionMuliply(qSecond, qFirst),
- which gives the effect of rotating by qFirst then qSecond *)
+ which gives the effect of rotating by qFirst then qSecond
function QuaternionMultiply(const qL, qR: TQuaternion): TQuaternion;
-(* Spherical linear interpolation of unit quaternions with spins.
+ Spherical linear interpolation of unit quaternions with spins.
QStart, QEnd - start and end unit quaternions
t - interpolation parameter (0 to 1)
- Spin - number of extra spin rotations to involve *)
+ Spin - number of extra spin rotations to involve
function QuaternionSlerp(const QStart, QEnd: TQuaternion; Spin: Integer; T: Single): TQuaternion; overload;
function QuaternionSlerp(const source, dest: TQuaternion; const T: Single): TQuaternion; overload;
@@ -1066,12 +1095,12 @@ function PowerInt64(Base: Single; Exponent: Int64): Single; overload;
function DegToRadian(const Degrees: Extended): Extended; overload;
function DegToRadian(const Degrees: Single): Single; overload;
function RadianToDeg(const Radians: Extended): Extended; overload;
-function RadianToDeg(const Radians: Single): Single; overload;
+function RadianToDeg(const Radians: Single): Single; overload;
// Normalize to an angle in the [-PI; +PI] range
-function NormalizeAngle(angle: Single): Single;
+function NormalizeAngle(angle: Single): Single;
// Normalize to an angle in the [-180; 180] range
-function NormalizeDegAngle(angle: Single): Single;
+function NormalizeDegAngle(angle: Single): Single;
// Calculates sine and cosine from the given angle Theta
procedure SinCosine(const Theta: Double; out Sin, Cos: Double); overload;
@@ -1181,11 +1210,13 @@ function TriangleSignedArea(const p1, p2, p3: TAffineVector): Single; overload;
// Computes a 2D polygon's signed area. Only X and Y coordinates are used, Z is ignored. Polygon needs not be convex
function PolygonSignedArea(const p: PAffineVectorArray; nSides: Integer): Single; overload;
-(* Multiplies values in the array by factor.
+ Multiplies values in the array by factor.
This function is especially efficient for large arrays, it is not recommended
for arrays that have less than 10 items.
Expected performance is 4 to 5 times that of a Deliph-compiled loop on AMD
- CPUs, and 2 to 3 when 3DNow! isn't available *)
+ CPUs, and 2 to 3 when 3DNow! isn't available
procedure ScaleFloatArray(values: PSingleArray; nb: Integer; var factor: Single); overload;
procedure ScaleFloatArray(var values: TSingleArray; factor: Single); overload;
@@ -1222,20 +1253,25 @@ function ClampValue(const aValue, aMin: Single): Single; overload;
// Returns the detected optimization mode. Returned values is either 'FPU', '3DNow!' or 'SSE'
function GeometryOptimizationMode: String;
-(* Begins a FPU-only section.
+ Begins a FPU-only section.
You can use a FPU-only section to force use of FPU versions of the math
functions, though typically slower than their SIMD counterparts, they have
a higher precision (80 bits internally) that may be required in some cases.
Each BeginFPUOnlySection call must be balanced by a EndFPUOnlySection (calls
- can be nested). *)
+ can be nested).
procedure BeginFPUOnlySection;
// Ends a FPU-only section. See BeginFPUOnlySection
procedure EndFPUOnlySection;
-// --------------------- Unstandardized functions after these lines
+// ---------------- Unstandardized functions after these lines
// Mixed functions
-// Turn a triplet of rotations about x, y, and z (in that order) into an equivalent rotation around a single axis (all in radians)
+ Turn a triplet of rotations about x, y, and z (in that order) into
+ an equivalent rotation around a single axis (all in radians)
function ConvertRotation(const Angles: TAffineVector): TGLVector;
// Miscellaneous functions
@@ -1249,9 +1285,11 @@ function VectorDblToFlt(const V: THomogeneousDblVector): THomogeneousVector;
function VectorAffineFltToDbl(const V: TAffineVector): TAffineDblVector;
// Converts a vector containing single sized values into a vector with double sized values
function VectorFltToDbl(const V: TGLVector): THomogeneousDblVector;
-(* The code below is from Wm. Randolph Franklin <[email protected]>
+ The code below is from Wm. Randolph Franklin <[email protected]>
with some minor modifications for speed. It returns 1 for strictly
- interior points, 0 for strictly exterior, and 0 or 1 for points on the boundary *)
+ interior points, 0 for strictly exterior, and 0 or 1 for points on the boundary
function PointInPolygon(const xp, yp: array of Single; X, Y: Single): Boolean;
// PtInRegion
function IsPointInPolygon(const Polygon: array of TPoint; const p: TPoint): Boolean;
@@ -1274,32 +1312,39 @@ function Roll(const Matrix: TGLMatrix; const MasterDirection: TAffineVector; Ang
// Intersection functions
-(* Compute the intersection point "res" of a line with a plane.
+ Compute the intersection point "res" of a line with a plane.
Return value:
- 0 : no intersection, line parallel to plane
- 1 : res is valid
- -1 : line is inside plane
+ 0 : no intersection, line parallel to plane
+ 1 : res is valid
+ -1 : line is inside plane
Adapted from:
- E.Hartmann, Computeruntersttzte Darstellende Geometrie, B.G. Teubner Stuttgart 1988 *)
+ E.Hartmann, Computeruntersttzte Darstellende Geometrie, B.G. Teubner Stuttgart 1988
function IntersectLinePlane(const point, direction: TGLVector;
const plane: THmgPlane; intersectPoint: PGLVector = nil): Integer; overload;
-(* Compute intersection between a triangle and a box.
- Returns True if an intersection was found *)
+ Compute intersection between a triangle and a box.
+ Returns True if an intersection was found
function IntersectTriangleBox(const p1, p2, p3, aMinExtent, aMaxExtent: TAffineVector): Boolean;
-(* Compute intersection between a Sphere and a box.
- Up, Direction and Right must be normalized!
- Use CubDepth, CubeHeight and CubeWidth to scale TGLCube *)
+ Compute intersection between a Sphere and a box.
+ Up, Direction and Right must be normalized!
+ Use CubDepth, CubeHeight and CubeWidth to scale TGLCube
function IntersectSphereBox(const SpherePos: TGLVector;
const SphereRadius: Single; const BoxMatrix: TGLMatrix;
const BoxScale: TAffineVector; intersectPoint: PAffineVector = nil;
normal: PAffineVector = nil; depth: PSingle = nil): Boolean;
-(* Compute intersection between a ray and a plane.
+ Compute intersection between a ray and a plane.
Returns True if an intersection was found, the intersection point is placed
- in intersectPoint is the reference is not nil *)
+ in intersectPoint is the reference is not nil
function RayCastPlaneIntersect(const rayStart, rayVector: TGLVector;
const planePoint, planeNormal: TGLVector; intersectPoint: PGLVector = nil): Boolean; overload;
function RayCastPlaneXZIntersect(const rayStart, rayVector: TGLVector;
@@ -1349,8 +1394,10 @@ function IsVolumeClipped(const min, max: TAffineVector; const Frustum: TFrustum)
(* Misc funcs *)
-(* Creates a parallel projection matrix.
- Transformed points will projected on the plane along the specified direction *)
+ Creates a parallel projection matrix.
+ Transformed points will projected on the plane along the specified direction
function MakeParallelProjectionMatrix(const plane: THmgPlane; const dir: TGLVector): TGLMatrix;
(* Creates a shadow projection matrix.
Shadows will be projected onto the plane defined by planePoint and planeNormal,
@@ -1359,18 +1406,21 @@ function MakeShadowMatrix(const planePoint, planeNormal, lightPos: TGLVector): T
(* Builds a reflection matrix for the given plane.
Reflection matrix allow implementing planar reflectors (mirrors) *)
function MakeReflectionMatrix(const planePoint, planeNormal: TAffineVector): TGLMatrix;
-(* Packs an homogeneous rotation matrix to 6 bytes.
+ Packs an homogeneous rotation matrix to 6 bytes.
The 6:64 (or 6:36) compression ratio is achieved by computing the quaternion
associated to the matrix and storing its Imaginary components at 16 bits
precision each. Deviation is typically below 0.01% and around 0.1% in worst case situations.
- Note: quaternion conversion is faster and more robust than an angle decomposition *)
+ Note: quaternion conversion is faster and more robust than an angle decomposition
function PackRotationMatrix(const mat: TGLMatrix): TPackedRotationMatrix;
// Restores a packed rotation matrix. See PackRotationMatrix
function UnPackRotationMatrix(const packedMatrix: TPackedRotationMatrix): TGLMatrix;
-(*Calculates angles for the Camera.MoveAroundTarget(pitch, turn) procedure.
+ Calculates angles for the Camera.MoveAroundTarget(pitch, turn) procedure.
Initially from then GLCameraColtroller unit, requires AOriginalUpVector to contain only -1, 0 or 1.
- Result contains pitch and turn angles *)
+ Result contains pitch and turn angles
function GetSafeTurnAngle(const AOriginalPosition, AOriginalUpVector,
ATargetPosition, AMoveAroundTargetCenter: TGLVector): TVector2f; overload;
@@ -1384,15 +1434,16 @@ function MoveObjectAround(const AMovingObjectPosition, AMovingObjectUp,
function AngleBetweenVectors(const a, b, ACenterPoint: TGLVector): Single; overload;
function AngleBetweenVectors(const a, b, ACenterPoint: TAffineVector): Single; overload;
-(*AOriginalPosition - Object initial position.
+ AOriginalPosition - Object initial position.
ACenter - some point, from which is should be distanced.
ADistance + AFromCenterSpot - distance, which object should keep from ACenter or
ADistance + not AFromCenterSpot - distance, which object should shift
- from his current position away from center *)
+ from his current position away from center
function ShiftObjectFromCenter(const AOriginalPosition: TGLVector;
const ACenter: TGLVector; const ADistance: Single;
const AFromCenterSpot: Boolean): TGLVector; overload;
function ShiftObjectFromCenter(const AOriginalPosition: TAffineVector;
const ACenter: TAffineVector; const ADistance: Single;
const AFromCenterSpot: Boolean): TAffineVector; overload;
@@ -18,8 +18,8 @@ uses
GLS.PersistentClasses;
- TBaseListOption = (bloExternalMemory, bloSetCountResetsMemory);
- TBaseListOptions = set of TBaseListOption;
+ TGLBaseListOption = (bloExternalMemory, bloSetCountResetsMemory);
+ TGLBaseListOptions = set of TGLBaseListOption;
// Base class for lists, introduces common behaviours
TGLBaseList = class(TGLPersistentObject)
@@ -28,7 +28,7 @@ type
FCapacity: Integer;
FGrowthDelta: Integer;
FBufferItem: PByteArray;
- FOptions: TBaseListOptions;
+ FOptions: TGLBaseListOptions;
FRevision: LongWord;
FTagString: string;
@@ -292,14 +292,14 @@ type
procedure Offset(delta: Integer; const base, nb: Integer); overload;
- TSingleArrayList = array[0..MaxInt shr 4] of Single;
- PSingleArrayList = ^TSingleArrayList;
+ TGLSingleArrayList = array[0..MaxInt shr 4] of Single;
+ PGLSingleArrayList = ^TGLSingleArrayList;
(* A list of Single. Similar to TList, but using Single as items.
The list has stack-like push/pop methods *)
TGLSingleList = class(TGLBaseList)
- FList: PSingleArrayList;
+ FList: PGLSingleArrayList;
function Get(Index: Integer): Single; inline;
procedure Put(Index: Integer; const item: Single); inline;
@@ -315,7 +315,7 @@ type
function Pop: Single; inline;
procedure Insert(Index: Integer; const item: Single); inline;
property Items[Index: Integer]: Single read Get write Put; default;
- property List: PSingleArrayList read FList;
+ property List: PGLSingleArrayList read FList;
procedure AddSerie(aBase, aDelta: Single; aCount: Integer);
// Adds delta to all items in the list
procedure Offset(delta: Single); overload;
@@ -335,14 +335,14 @@ type
function Max: Single;
- TDoubleArrayList = array[0..MaxInt shr 4] of Double;
- PDoubleArrayList = ^TDoubleArrayList;
+ TGLDoubleArrayList = array[0..MaxInt shr 4] of Double;
+ PGLDoubleArrayList = ^TGLDoubleArrayList;
(* A list of Double. Similar to TList, but using Double as items.
TGLDoubleList = class(TGLBaseList)
- FList: PDoubleArrayList;
+ FList: PGLDoubleArrayList;
function Get(Index: Integer): Double;
procedure Put(Index: Integer; const item: Double);
@@ -355,12 +355,12 @@ type
function Pop: Double;
procedure Insert(Index: Integer; const item: Double);
property Items[Index: Integer]: Double read Get write Put; default;
- property List: PDoubleArrayList read FList;
+ property List: PGLDoubleArrayList read FList;
procedure AddSerie(aBase, aDelta: Double; aCount: Integer);
procedure Offset(delta: Double); overload;
(* Adds to each item the corresponding item in the delta list.
- Performs 'Items[i]:=Items[i]+delta[i]'.
+ Performs 'Items[i] := Items[i] + delta[i]'.
If both lists don't have the same item count, an exception is raised *)
procedure Offset(const delta: TGLDoubleList); overload;
// Multiplies all items by factor
@@ -376,7 +376,7 @@ type
// A list of bytes. Similar to TList, but using Byte as items
- TByteList = class(TGLBaseList)
+ TGLByteList = class(TGLBaseList)
FList: PByteArray;
@@ -394,7 +394,7 @@ type
(* A list of TQuaternion. Similar to TList, but using TQuaternion as items.
- TQuaternionList = class(TGLBaseVectorList)
+ TGLQuaternionList = class(TGLBaseVectorList)
FList: PQuaternionArray;
@@ -423,7 +423,7 @@ type
// 4 byte union contain access like Integer, Single and four Byte
- T4ByteData = packed record
+ TGL4ByteData = packed record
case Byte of
0 : (Bytes : record Value : array[0..3] of Byte; end);
1 : (Int : record Value : Integer; end);
@@ -432,21 +432,21 @@ type
4 : (Word : record Value : array[0..1] of Word; end);
- T4ByteArrayList = array[0..MaxInt shr 4] of T4ByteData;
+ T4ByteArrayList = array[0..MaxInt shr 4] of TGL4ByteData;
P4ByteArrayList = ^T4ByteArrayList;
- // A list of T4ByteData
+ // A list of TGL4ByteData
TGL4ByteList = class(TGLBaseList)
FList: P4ByteArrayList;
- function Get(Index: Integer): T4ByteData;
- procedure Put(Index: Integer; const item: T4ByteData);
+ function Get(Index: Integer): TGL4ByteData;
+ procedure Put(Index: Integer; const item: TGL4ByteData);
procedure SetCapacity(NewCapacity: Integer); override;
procedure Assign(Src: TPersistent); override;
- function Add(const item: T4ByteData): Integer; overload;
+ function Add(const item: TGL4ByteData): Integer; overload;
procedure Add(const i1: Single); overload;
procedure Add(const i1, i2: Single); overload;
procedure Add(const i1, i2, i3: Single); overload;
@@ -460,10 +460,10 @@ type
procedure Add(const i1, i2, i3: Cardinal); overload;
procedure Add(const i1, i2, i3, i4: Cardinal); overload;
procedure Add(const AList: TGL4ByteList); overload;
- procedure Push(const Val: T4ByteData);
- function Pop: T4ByteData;
- procedure Insert(Index: Integer; const item: T4ByteData);
- property Items[Index: Integer]: T4ByteData read Get write Put; default;
+ procedure Push(const Val: TGL4ByteData);
+ function Pop: TGL4ByteData;
+ procedure Insert(Index: Integer; const item: TGL4ByteData);
+ property Items[Index: Integer]: TGL4ByteData read Get write Put; default;
property List: P4ByteArrayList read FList;
@@ -2395,7 +2395,7 @@ end;
procedure TGLSingleList.SetCapacity(NewCapacity: Integer);
inherited;
- FList := PSingleArrayList(FBaseList);
+ FList := PGLSingleArrayList(FBaseList);
procedure TGLSingleList.Push(const Val: Single);
@@ -2453,7 +2453,7 @@ end;
procedure TGLSingleList.Sqr;
I: Integer;
- locList: PSingleArrayList;
+ locList: PGLSingleArrayList;
locList := FList;
for I := 0 to Count - 1 do
@@ -2463,7 +2463,7 @@ end;
procedure TGLSingleList.Sqrt;
@@ -2482,7 +2482,7 @@ end;
function TGLSingleList.Min: Single;
if FCount > 0 then
@@ -2499,7 +2499,7 @@ end;
function TGLSingleList.Max: Single;
@@ -2514,29 +2514,29 @@ begin
-// ------------------ TByteList ------------------
+// ------------------ TGLByteList ------------------
-constructor TByteList.Create;
+constructor TGLByteList.Create;
FItemSize := SizeOf(Byte);
FGrowthDelta := cDefaultListGrowthDelta;
-procedure TByteList.Assign(Src: TPersistent);
+procedure TGLByteList.Assign(Src: TPersistent);
if Assigned(Src) then
- if (Src is TByteList) then
- System.Move(TByteList(Src).FList^, FList^, FCount * SizeOf(Byte));
+ if (Src is TGLByteList) then
+ System.Move(TGLByteList(Src).FList^, FList^, FCount * SizeOf(Byte));
else
Clear;
-function TByteList.Add(const item: Byte): Integer;
+function TGLByteList.Add(const item: Byte): Integer;
Result := FCount;
if Result = FCapacity then
@@ -2545,7 +2545,7 @@ begin
Inc(FCount);
-function TByteList.Get(Index: Integer): Byte;
+function TGLByteList.Get(Index: Integer): Byte;
{$IFOPT R+}
Assert(Cardinal(Index) < Cardinal(FCount));
@@ -2553,7 +2553,7 @@ begin
Result := FList^[Index];
-procedure TByteList.Insert(Index: Integer; const Item: Byte);
+procedure TGLByteList.Insert(Index: Integer; const Item: Byte);
@@ -2567,7 +2567,7 @@ begin
-procedure TByteList.Put(Index: Integer; const Item: Byte);
+procedure TGLByteList.Put(Index: Integer; const Item: Byte);
@@ -2575,7 +2575,7 @@ begin
FList^[Index] := Item;
-procedure TByteList.SetCapacity(NewCapacity: Integer);
+procedure TGLByteList.SetCapacity(NewCapacity: Integer);
FList := PByteArray(FBaseList);
@@ -2646,7 +2646,7 @@ end;
procedure TGLDoubleList.SetCapacity(NewCapacity: Integer);
- FList := PDoubleArrayList(FBaseList);
+ FList := PGLDoubleArrayList(FBaseList);
procedure TGLDoubleList.Push(const Val: Double);
@@ -2713,7 +2713,7 @@ end;
procedure TGLDoubleList.Sqr;
- locList: PDoubleArrayList;
+ locList: PGLDoubleArrayList;
@@ -2723,7 +2723,7 @@ end;
procedure TGLDoubleList.Sqrt;
@@ -2742,7 +2742,7 @@ end;
function TGLDoubleList.Min: Single;
@@ -2759,7 +2759,7 @@ end;
function TGLDoubleList.Max: Single;
@@ -2774,29 +2774,29 @@ begin
-// ------------------ TQuaternionList ------------------
+// ------------------ TGLQuaternionList ------------------
-constructor TQuaternionList.Create;
+constructor TGLQuaternionList.Create;
FItemSize := SizeOf(TQuaternion);
-procedure TQuaternionList.Assign(Src: TPersistent);
+procedure TGLQuaternionList.Assign(Src: TPersistent);
- if (Src is TQuaternionList) then
- System.Move(TQuaternionList(Src).FList^, FList^, FCount * SizeOf(TQuaternion));
+ if (Src is TGLQuaternionList) then
+ System.Move(TGLQuaternionList(Src).FList^, FList^, FCount * SizeOf(TQuaternion));
-function TQuaternionList.Add(const item: TQuaternion): Integer;
+function TGLQuaternionList.Add(const item: TQuaternion): Integer;
@@ -2805,17 +2805,17 @@ begin
-function TQuaternionList.Add(const item: TAffineVector; w: Single): Integer;
+function TGLQuaternionList.Add(const item: TAffineVector; w: Single): Integer;
Result := Add(QuaternionMake([item.X, item.Y, item.Z], w));
-function TQuaternionList.Add(const X, Y, Z, w: Single): Integer;
+function TGLQuaternionList.Add(const X, Y, Z, w: Single): Integer;
Result := Add(QuaternionMake([X, Y, Z], w));
-function TQuaternionList.Get(Index: Integer): TQuaternion;
+function TGLQuaternionList.Get(Index: Integer): TQuaternion;
@@ -2823,7 +2823,7 @@ begin
-procedure TQuaternionList.Insert(Index: Integer; const Item: TQuaternion);
+procedure TGLQuaternionList.Insert(Index: Integer; const Item: TQuaternion);
@@ -2837,7 +2837,7 @@ begin
-procedure TQuaternionList.Put(Index: Integer; const Item: TQuaternion);
+procedure TGLQuaternionList.Put(Index: Integer; const Item: TQuaternion);
@@ -2845,18 +2845,18 @@ begin
-procedure TQuaternionList.SetCapacity(NewCapacity: Integer);
+procedure TGLQuaternionList.SetCapacity(NewCapacity: Integer);
FList := PQuaternionArray(FBaseList);
-procedure TQuaternionList.Push(const Val: TQuaternion);
+procedure TGLQuaternionList.Push(const Val: TQuaternion);
Add(Val);
-function TQuaternionList.Pop: TQuaternion;
+function TGLQuaternionList.Pop: TQuaternion;
@@ -2867,7 +2867,7 @@ begin
Result := IdentityQuaternion;
-function TQuaternionList.IndexOf(const item: TQuaternion): Integer;
+function TGLQuaternionList.IndexOf(const item: TQuaternion): Integer;
curItem: PQuaternion;
@@ -2884,28 +2884,28 @@ begin
Result := -1;
-function TQuaternionList.FindOrAdd(const item: TQuaternion): Integer;
+function TGLQuaternionList.FindOrAdd(const item: TQuaternion): Integer;
Result := IndexOf(item);
if Result < 0 then
Result := Add(item);
-procedure TQuaternionList.Lerp(const list1, list2: TGLBaseVectorList; lerpFactor: Single);
+procedure TGLQuaternionList.Lerp(const list1, list2: TGLBaseVectorList; lerpFactor: Single);
- if (list1 is TQuaternionList) and (list2 is TQuaternionList) then
+ if (list1 is TGLQuaternionList) and (list2 is TGLQuaternionList) then
Assert(list1.Count = list2.Count);
Capacity := list1.Count;
FCount := list1.Count;
for I := 0 to FCount - 1 do
- Put(I, QuaternionSlerp(TQuaternionList(list1)[I], TQuaternionList(list2)[I], lerpFactor));
+ Put(I, QuaternionSlerp(TGLQuaternionList(list1)[I], TGLQuaternionList(list2)[I], lerpFactor));
-procedure TQuaternionList.Combine(const list2: TGLBaseVectorList; factor: Single);
+procedure TGLQuaternionList.Combine(const list2: TGLBaseVectorList; factor: Single);
procedure CombineQuaternion(var q1: TQuaternion; const q2: TQuaternion; factor: Single);
@@ -2916,7 +2916,7 @@ var
Assert(list2.Count >= Count);
- if list2 is TQuaternionList then
+ if list2 is TGLQuaternionList then
@@ -2946,13 +2946,13 @@ begin
if (Src is TGL4ByteList) then
- System.Move(TGL4ByteList(Src).FList^, FList^, FCount * SizeOf(T4ByteData));
+ System.Move(TGL4ByteList(Src).FList^, FList^, FCount * SizeOf(TGL4ByteData));
-function TGL4ByteList.Add(const item: T4ByteData): Integer;
+function TGL4ByteList.Add(const item: TGL4ByteData): Integer;
@@ -3136,13 +3136,13 @@ begin
if Count + AList.Count > Capacity then
Capacity := Count + AList.Count;
- System.Move(AList.FList[0], FList[Count], AList.Count * SizeOf(T4ByteData));
+ System.Move(AList.FList[0], FList[Count], AList.Count * SizeOf(TGL4ByteData));
Inc(FCount, AList.Count);
Inc(FRevision);
-function TGL4ByteList.Get(Index: Integer): T4ByteData;
+function TGL4ByteList.Get(Index: Integer): TGL4ByteData;
@@ -3150,7 +3150,7 @@ begin
-procedure TGL4ByteList.Insert(Index: Integer; const Item: T4ByteData);
+procedure TGL4ByteList.Insert(Index: Integer; const Item: TGL4ByteData);
@@ -3159,13 +3159,13 @@ begin
SetCapacity(FCapacity + FGrowthDelta);
if Index < FCount then
System.Move(FList[Index], FList[Index + 1],
- (FCount - Index) * SizeOf(T4ByteData));
+ (FCount - Index) * SizeOf(TGL4ByteData));
-procedure TGL4ByteList.Put(Index: Integer; const Item: T4ByteData);
+procedure TGL4ByteList.Put(Index: Integer; const Item: TGL4ByteData);
@@ -3180,14 +3180,14 @@ begin
FList := P4ByteArrayList(FBaseList);
-procedure TGL4ByteList.Push(const Val: T4ByteData);
+procedure TGL4ByteList.Push(const Val: TGL4ByteData);
-function TGL4ByteList.Pop: T4ByteData;
+function TGL4ByteList.Pop: TGL4ByteData;
- Zero : T4ByteData = ( Int: (Value:0) );
+ Zero : TGL4ByteData = ( Int: (Value:0) );