Compare commits
1 Commits
v0.0.105.1
...
insertdial
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e50d2674ff |
35
Blocks3D-2003.sln
Normal file
35
Blocks3D-2003.sln
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 8.00
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Blocks3D", "Blocks3D-2003.vcproj", "{6C4D6EEF-B1D1-456A-B850-92CAB17124BE}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfiguration) = preSolution
|
||||||
|
Debug = Debug
|
||||||
|
Release = Release
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfiguration) = postSolution
|
||||||
|
{6C4D6EEF-B1D1-456A-B850-92CAB17124BE}.Debug.ActiveCfg = Debug|Win32
|
||||||
|
{6C4D6EEF-B1D1-456A-B850-92CAB17124BE}.Debug.Build.0 = Debug|Win32
|
||||||
|
{6C4D6EEF-B1D1-456A-B850-92CAB17124BE}.Release.ActiveCfg = Release|Win32
|
||||||
|
{6C4D6EEF-B1D1-456A-B850-92CAB17124BE}.Release.Build.0 = Release|Win32
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityAddIns) = postSolution
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Win32 = Debug|Win32
|
||||||
|
Release|Win32 = Release|Win32
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{6C4D6EEF-B1D1-456A-B850-92CAB17124BE}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{6C4D6EEF-B1D1-456A-B850-92CAB17124BE}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{6C4D6EEF-B1D1-456A-B850-92CAB17124BE}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{6C4D6EEF-B1D1-456A-B850-92CAB17124BE}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
649
Blocks3D-2003.vcproj
Normal file
649
Blocks3D-2003.vcproj
Normal file
@@ -0,0 +1,649 @@
|
|||||||
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
|
<VisualStudioProject
|
||||||
|
ProjectType="Visual C++"
|
||||||
|
Version="7.10"
|
||||||
|
Name="Blocks3D"
|
||||||
|
ProjectGUID="{6C4D6EEF-B1D1-456A-B850-92CAB17124BE}"
|
||||||
|
RootNamespace="Blocks3D">
|
||||||
|
<Platforms>
|
||||||
|
<Platform
|
||||||
|
Name="Win32"/>
|
||||||
|
</Platforms>
|
||||||
|
<Configurations>
|
||||||
|
<Configuration
|
||||||
|
Name="Release|Win32"
|
||||||
|
OutputDirectory=".\Release"
|
||||||
|
IntermediateDirectory=".\Release"
|
||||||
|
ConfigurationType="1"
|
||||||
|
UseOfMFC="0"
|
||||||
|
UseOfATL="0"
|
||||||
|
ATLMinimizesCRunTimeLibraryUsage="FALSE"
|
||||||
|
CharacterSet="2">
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="2"
|
||||||
|
InlineFunctionExpansion="1"
|
||||||
|
AdditionalIncludeDirectories="".\src\include""
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
|
||||||
|
StringPooling="TRUE"
|
||||||
|
RuntimeLibrary="2"
|
||||||
|
EnableFunctionLevelLinking="TRUE"
|
||||||
|
PrecompiledHeaderFile=".\Release/Blocks3D.pch"
|
||||||
|
AssemblerListingLocation=".\Release/"
|
||||||
|
ObjectFile=".\Release/"
|
||||||
|
ProgramDataBaseFileName=".\Release/"
|
||||||
|
WarningLevel="3"
|
||||||
|
SuppressStartupBanner="TRUE"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="Advapi32.lib Comctl32.lib Comdlg32.lib Shell32.lib"
|
||||||
|
OutputFile="./Blocks3D.exe"
|
||||||
|
LinkIncremental="1"
|
||||||
|
SuppressStartupBanner="TRUE"
|
||||||
|
ProgramDatabaseFile=".\Release/Blocks3D.pdb"
|
||||||
|
SubSystem="2"
|
||||||
|
TargetMachine="1"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
PreprocessorDefinitions="NDEBUG"
|
||||||
|
MkTypLibCompatible="TRUE"
|
||||||
|
SuppressStartupBanner="TRUE"
|
||||||
|
TargetEnvironment="1"
|
||||||
|
TypeLibraryName=".\Release/Blocks3D.tlb"
|
||||||
|
HeaderFileName=""/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
PreprocessorDefinitions="NDEBUG"
|
||||||
|
Culture="4105"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebDeploymentTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedWrapperGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
OutputDirectory=".\Debug"
|
||||||
|
IntermediateDirectory=".\Debug"
|
||||||
|
ConfigurationType="1"
|
||||||
|
UseOfMFC="0"
|
||||||
|
ATLMinimizesCRunTimeLibraryUsage="FALSE"
|
||||||
|
CharacterSet="2"
|
||||||
|
ManagedExtensions="FALSE">
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="".\src\include""
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;NO_SPRINTF;IGNORE_CATCH"
|
||||||
|
MinimalRebuild="FALSE"
|
||||||
|
BasicRuntimeChecks="0"
|
||||||
|
RuntimeLibrary="3"
|
||||||
|
EnableFunctionLevelLinking="FALSE"
|
||||||
|
PrecompiledHeaderFile=".\Debug/Blocks3D.pch"
|
||||||
|
AssemblerListingLocation=".\Debug/"
|
||||||
|
ObjectFile=".\Debug/"
|
||||||
|
ProgramDataBaseFileName=".\Debug/"
|
||||||
|
WarningLevel="3"
|
||||||
|
SuppressStartupBanner="TRUE"
|
||||||
|
DebugInformationFormat="3"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="Advapi32.lib UxTheme.lib Comctl32.lib Comdlg32.lib Shell32.lib Urlmon.lib ole32.lib oleaut32.lib uuid.lib"
|
||||||
|
OutputFile="./Blocks3D-Debug.exe"
|
||||||
|
LinkIncremental="2"
|
||||||
|
SuppressStartupBanner="TRUE"
|
||||||
|
GenerateDebugInformation="TRUE"
|
||||||
|
ProgramDatabaseFile=".\Debug/Blocks3D.pdb"
|
||||||
|
SubSystem="1"
|
||||||
|
TargetMachine="1"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
PreprocessorDefinitions="_DEBUG"
|
||||||
|
MkTypLibCompatible="TRUE"
|
||||||
|
SuppressStartupBanner="TRUE"
|
||||||
|
TargetEnvironment="1"
|
||||||
|
TypeLibraryName=".\Debug/Blocks3D.tlb"
|
||||||
|
HeaderFileName=""/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
PreprocessorDefinitions="_DEBUG"
|
||||||
|
Culture="4105"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebDeploymentTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedWrapperGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||||
|
</Configuration>
|
||||||
|
</Configurations>
|
||||||
|
<References>
|
||||||
|
<AssemblyReference
|
||||||
|
RelativePath="System.dll"/>
|
||||||
|
<AssemblyReference
|
||||||
|
RelativePath="System.Data.dll"/>
|
||||||
|
<AssemblyReference
|
||||||
|
RelativePath="System.Drawing.dll"/>
|
||||||
|
<AssemblyReference
|
||||||
|
RelativePath="System.Windows.Forms.dll"/>
|
||||||
|
<AssemblyReference
|
||||||
|
RelativePath="System.XML.dll"/>
|
||||||
|
</References>
|
||||||
|
<Files>
|
||||||
|
<Filter
|
||||||
|
Name="Source Files"
|
||||||
|
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\source\Application.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\source\AudioPlayer.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\source\ax.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\source\BrowserCallHandler.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\source\CameraController.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\source\ErrorFunctions.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\source\Globals.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\source\IEBrowser.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\source\IEDispatcher.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\source\main.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\source\Mouse.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\source\propertyGrid.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\source\PropertyWindow.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\source\Renderer.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\source\StringFunctions.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\source\TextureHandler.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\source\WindowFunctions.cpp">
|
||||||
|
</File>
|
||||||
|
<Filter
|
||||||
|
Name="Tool">
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\source\Tool\ArrowTool.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\source\Tool\SurfaceTool.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\source\Tool\Tool.cpp">
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Listener">
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\source\Listener\ButtonListener.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\source\Listener\CameraButtonListener.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\source\Listener\DeleteListener.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\source\Listener\GUDButtonListener.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\source\Listener\MenuButtonListener.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\source\Listener\ModeSelectionListener.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\source\Listener\RotateButtonListener.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\source\Listener\ToolbarListener.cpp">
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="DataModelV2">
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\source\DataModelV2\DataModelInstance.cpp">
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32">
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
ObjectFile="$(IntDir)\$(InputName)1.obj"/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32">
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
ObjectFile="$(IntDir)\$(InputName)1.obj"/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\source\DataModelV2\GroupInstance.cpp">
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32">
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
ObjectFile="$(IntDir)\$(InputName)1.obj"/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32">
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
ObjectFile="$(IntDir)\$(InputName)1.obj"/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\source\DataModelV2\Instance.cpp">
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32">
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
ObjectFile="$(IntDir)\$(InputName)1.obj"/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32">
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
ObjectFile="$(IntDir)\$(InputName)1.obj"/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\source\DataModelV2\LevelInstance.cpp">
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32">
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
ObjectFile="$(IntDir)\$(InputName)1.obj"/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32">
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
ObjectFile="$(IntDir)\$(InputName)1.obj"/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\source\DataModelV2\PartInstance.cpp">
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32">
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
ObjectFile="$(IntDir)\$(InputName)1.obj"/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32">
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
ObjectFile="$(IntDir)\$(InputName)1.obj"/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\source\DataModelV2\PVInstance.cpp">
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32">
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
ObjectFile="$(IntDir)\$(InputName)1.obj"/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32">
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
ObjectFile="$(IntDir)\$(InputName)1.obj"/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\source\DataModelV2\WorkspaceInstance.cpp">
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32">
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
ObjectFile="$(IntDir)\$(InputName)1.obj"/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32">
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
ObjectFile="$(IntDir)\$(InputName)1.obj"/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
<Filter
|
||||||
|
Name="Gui">
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\source\DataModelV2\BaseButtonInstance.cpp">
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32">
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
ObjectFile="$(IntDir)\$(InputName)1.obj"/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32">
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
ObjectFile="$(IntDir)\$(InputName)1.obj"/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\source\DataModelV2\BaseGuiInstance.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\source\DataModelV2\GuiRootInstance.cpp">
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32">
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
ObjectFile="$(IntDir)\$(InputName)1.obj"/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32">
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
ObjectFile="$(IntDir)\$(InputName)1.obj"/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\source\DataModelV2\ImageButtonInstance.cpp">
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32">
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
ObjectFile="$(IntDir)\$(InputName)1.obj"/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32">
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
ObjectFile="$(IntDir)\$(InputName)1.obj"/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\source\DataModelV2\TextButtonInstance.cpp">
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32">
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
ObjectFile="$(IntDir)\$(InputName)1.obj"/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32">
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
ObjectFile="$(IntDir)\$(InputName)1.obj"/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\source\DataModelV2\ToggleImageButtonInstance.cpp">
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32">
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
ObjectFile="$(IntDir)\$(InputName)1.obj"/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32">
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
ObjectFile="$(IntDir)\$(InputName)1.obj"/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Properties">
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\source\Properties\BoolProperty.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\source\Properties\Property.cpp">
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Header Files"
|
||||||
|
Filter="h;hpp;hxx;hm;inl">
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\include\Application.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\include\AudioPlayer.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\include\ax.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\include\BrowserCallHandler.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\include\CameraController.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\include\Enum.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\include\ErrorFunctions.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\include\Faces.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\include\Globals.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\include\IEBrowser.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\include\IEDispatcher.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\include\Mouse.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\include\propertyGrid.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\include\PropertyWindow.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\include\Renderer.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\resource.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\include\StringFunctions.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\include\TextureHandler.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\include\win32Defines.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\include\WindowFunctions.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\include\winver.h">
|
||||||
|
</File>
|
||||||
|
<Filter
|
||||||
|
Name="RapidXML">
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\include\rapidxml\rapidxml.hpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\include\rapidxml\rapidxml_iterators.hpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\include\rapidxml\rapidxml_print.hpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\include\rapidxml\rapidxml_utils.hpp">
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Listener">
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\include\Listener\ButtonListener.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\include\Listener\CameraButtonListener.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\include\Listener\DeleteListener.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\include\Listener\GUDButtonListener.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\include\Listener\MenuButtonListener.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\include\Listener\ModeSelectionListener.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\include\Listener\RotateButtonListener.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\include\Listener\ToolbarListener.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\include\DataModel\WorkspaceInstance.h">
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Tool">
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\include\Tool\ArrowTool.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\include\Tool\SurfaceTool.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\include\Tool\Tool.h">
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="DataModelV2">
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\include\DataModelV2\DataModelInstance.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\include\DataModelV2\GroupInstance.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\include\DataModelV2\Instance.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\include\DataModelV2\LevelInstance.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\include\DataModelV2\PartInstance.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\include\DataModelV2\PVInstance.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\include\DataModelV2\WorkspaceInstance.h">
|
||||||
|
</File>
|
||||||
|
<Filter
|
||||||
|
Name="Gui">
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\include\DataModelV2\BaseButtonInstance.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\include\DataModelV2\BaseGuiInstance.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\include\DataModelV2\GuiRootInstance.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\include\DataModelV2\ImageButtonInstance.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\include\DataModelV2\TextButtonInstance.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\include\DataModelV2\ToggleImageButtonInstance.h">
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Properties">
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\include\Properties\BoolProperty.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\include\Properties\Property.h">
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Resource Files"
|
||||||
|
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
|
||||||
|
<File
|
||||||
|
RelativePath=".\Dialogs.rc">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\icon1.ico">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\Parts.bmp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\roblox_RN1_icon.ico">
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
</Files>
|
||||||
|
<Globals>
|
||||||
|
<Global
|
||||||
|
Name="RESOURCE_FILE"
|
||||||
|
Value="Dialogs.rc"/>
|
||||||
|
</Globals>
|
||||||
|
</VisualStudioProject>
|
||||||
1847
Blocks3D.vcproj
1847
Blocks3D.vcproj
File diff suppressed because it is too large
Load Diff
12
Dialogs.rc
12
Dialogs.rc
@@ -4,8 +4,7 @@
|
|||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <commctrl.h>
|
#include <commctrl.h>
|
||||||
#include <richedit.h>
|
#include "resource.h"
|
||||||
#include "src/include/resource.h"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -35,17 +34,8 @@ FONT 8, "Ms Shell Dlg"
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Icon resources
|
// Icon resources
|
||||||
//
|
//
|
||||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_CAN
|
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_CAN
|
||||||
IDI_ICON1 ICON "FatB3dIcon.ico"
|
IDI_ICON1 ICON "FatB3dIcon.ico"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//
|
|
||||||
// Manifest resources
|
|
||||||
//
|
|
||||||
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
|
||||||
1 RT_MANIFEST ".\\Blocks3D.exe.manifest"
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
[Setup]
|
[Setup]
|
||||||
AppName=Blocks3D
|
AppName=Blocks3D
|
||||||
AppId={{4C5DF268-0208-4CDE-A7F0-65F7E2CB5067}
|
AppId={{4C5DF268-0208-4CDE-A7F0-65F7E2CB5067}
|
||||||
AppVersion=v0.0.105.0
|
AppVersion=v0_0_104_5
|
||||||
AppPublisherURL=http://blocks3d.com/
|
AppPublisherURL=http://blocks3d.com/
|
||||||
AppSupportURL=http://blocks3d.com/
|
AppSupportURL=http://blocks3d.com/
|
||||||
AppUpdatesURL=http://blocks3d.com/
|
AppUpdatesURL=http://blocks3d.com/
|
||||||
|
|||||||
0
Manifest.xml
Normal file
0
Manifest.xml
Normal file
@@ -1,6 +0,0 @@
|
|||||||
Open Dynamics Engine
|
|
||||||
|
|
||||||
Copyright (c) 2001-2004,
|
|
||||||
Russell L. Smith.
|
|
||||||
|
|
||||||
All rights reserved.
|
|
||||||
BIN
ode-0.5.7z
BIN
ode-0.5.7z
Binary file not shown.
9
resource.h
Normal file
9
resource.h
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
#ifndef IDC_STATIC
|
||||||
|
#define IDC_STATIC (-1)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define IDI_ICON1 101
|
||||||
|
#define IDB_BITMAP1 102
|
||||||
|
#define IDD_DIALOG1 103
|
||||||
|
#define IDD_DIALOG2 104
|
||||||
|
#define IDC_EDIT1 1001
|
||||||
@@ -26,7 +26,6 @@ class CameraController {
|
|||||||
void panRight();
|
void panRight();
|
||||||
void tiltUp();
|
void tiltUp();
|
||||||
void tiltDown();
|
void tiltDown();
|
||||||
void zoomExtents();
|
|
||||||
void Zoom(short delta);
|
void Zoom(short delta);
|
||||||
bool onMouseWheel(int x, int y, short delta);
|
bool onMouseWheel(int x, int y, short delta);
|
||||||
GCamera* getCamera();
|
GCamera* getCamera();
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
#include "PartInstance.h"
|
#include "PartInstance.h"
|
||||||
#include "rapidxml/rapidxml.hpp"
|
#include "rapidxml/rapidxml.hpp"
|
||||||
#include "GuiRootInstance.h"
|
#include "GuiRootInstance.h"
|
||||||
#include "XplicitNgine/XplicitNgine.h"
|
|
||||||
|
|
||||||
class GuiRootInstance;
|
class GuiRootInstance;
|
||||||
|
|
||||||
@@ -24,7 +23,6 @@ public:
|
|||||||
void drawMessage(RenderDevice*);
|
void drawMessage(RenderDevice*);
|
||||||
WorkspaceInstance* getWorkspace();
|
WorkspaceInstance* getWorkspace();
|
||||||
LevelInstance * getLevel();
|
LevelInstance * getLevel();
|
||||||
XplicitNgine * getEngine();
|
|
||||||
std::string message;
|
std::string message;
|
||||||
std::string _loadedFileName;
|
std::string _loadedFileName;
|
||||||
bool showMessage;
|
bool showMessage;
|
||||||
@@ -40,7 +38,6 @@ public:
|
|||||||
void clearLevel();
|
void clearLevel();
|
||||||
void toggleRun();
|
void toggleRun();
|
||||||
bool isRunning();
|
bool isRunning();
|
||||||
void resetEngine();
|
|
||||||
#if _DEBUG
|
#if _DEBUG
|
||||||
void modXMLLevel(float modY);
|
void modXMLLevel(float modY);
|
||||||
#endif
|
#endif
|
||||||
@@ -57,5 +54,4 @@ private:
|
|||||||
LevelInstance * level;
|
LevelInstance * level;
|
||||||
GuiRootInstance* guiRoot;
|
GuiRootInstance* guiRoot;
|
||||||
bool running;
|
bool running;
|
||||||
XplicitNgine * xplicitNgine;
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -2,6 +2,10 @@
|
|||||||
#include <G3DAll.h>
|
#include <G3DAll.h>
|
||||||
#include "propertyGrid.h"
|
#include "propertyGrid.h"
|
||||||
#include "map"
|
#include "map"
|
||||||
|
|
||||||
|
#ifdef NO_SPRINTF
|
||||||
|
#define sprintf_s sprintf
|
||||||
|
#endif
|
||||||
//#include "Properties/BoolProperty.h"
|
//#include "Properties/BoolProperty.h"
|
||||||
|
|
||||||
class Instance
|
class Instance
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "instance.h"
|
#include "instance.h"
|
||||||
#include "enum.h"
|
#include "enum.h"
|
||||||
#include <ode/ode.h>
|
|
||||||
|
|
||||||
class PVInstance :
|
class PVInstance :
|
||||||
public Instance
|
public Instance
|
||||||
|
|||||||
@@ -29,8 +29,7 @@ public:
|
|||||||
//Variables
|
//Variables
|
||||||
Color3 color;
|
Color3 color;
|
||||||
bool canCollide;
|
bool canCollide;
|
||||||
dBodyID physBody;
|
bool anchored;
|
||||||
dGeomID physGeom[3];
|
|
||||||
|
|
||||||
//Getters
|
//Getters
|
||||||
Vector3 getPosition();
|
Vector3 getPosition();
|
||||||
@@ -48,14 +47,10 @@ public:
|
|||||||
void setVelocity(Vector3);
|
void setVelocity(Vector3);
|
||||||
void setRotVelocity(Vector3);
|
void setRotVelocity(Vector3);
|
||||||
void setCFrame(CoordinateFrame);
|
void setCFrame(CoordinateFrame);
|
||||||
void setCFrameNoSync(CoordinateFrame);
|
|
||||||
void setSize(Vector3);
|
void setSize(Vector3);
|
||||||
void setShape(Enum::Shape::Value shape);
|
void setShape(Enum::Shape::Value shape);
|
||||||
void setChanged();
|
void setChanged();
|
||||||
void setSurface(int face, Enum::SurfaceType::Value surface);
|
void setSurface(int face, Enum::SurfaceType::Value surface);
|
||||||
void setAnchored(bool anchored);
|
|
||||||
bool isAnchored();
|
|
||||||
float getMass();
|
|
||||||
|
|
||||||
//Collision
|
//Collision
|
||||||
bool collides(PartInstance * part);
|
bool collides(PartInstance * part);
|
||||||
@@ -65,7 +60,6 @@ public:
|
|||||||
virtual std::vector<PROPGRIDITEM> getProperties();
|
virtual std::vector<PROPGRIDITEM> getProperties();
|
||||||
virtual void PropUpdate(LPPROPGRIDITEM &pItem);
|
virtual void PropUpdate(LPPROPGRIDITEM &pItem);
|
||||||
private:
|
private:
|
||||||
bool anchored;
|
|
||||||
Vector3 position;
|
Vector3 position;
|
||||||
Vector3 size;
|
Vector3 size;
|
||||||
Vector3 velocity;
|
Vector3 velocity;
|
||||||
@@ -73,4 +67,4 @@ private:
|
|||||||
bool changed;
|
bool changed;
|
||||||
Box itemBox;
|
Box itemBox;
|
||||||
GLuint glList;
|
GLuint glList;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -9,6 +9,5 @@ public:
|
|||||||
WorkspaceInstance(void);
|
WorkspaceInstance(void);
|
||||||
~WorkspaceInstance(void);
|
~WorkspaceInstance(void);
|
||||||
void clearChildren();
|
void clearChildren();
|
||||||
void zoomToExtents();
|
|
||||||
std::vector<PartInstance *> partObjects;
|
std::vector<PartInstance *> partObjects;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "DataModelV2/DataModelInstance.h"
|
#include "DataModelV2/DataModelInstance.h"
|
||||||
#include "XplicitNgine/XplicitNgine.h"
|
|
||||||
|
|
||||||
class Application;
|
class Application;
|
||||||
|
|
||||||
@@ -28,7 +28,6 @@ extern std::vector<Instance*> postRenderStack;
|
|||||||
extern std::vector<Instance*> g_selectedInstances;
|
extern std::vector<Instance*> g_selectedInstances;
|
||||||
extern bool running;
|
extern bool running;
|
||||||
extern DataModelInstance* g_dataModel;
|
extern DataModelInstance* g_dataModel;
|
||||||
extern XplicitNgine* g_xplicitNgine;
|
|
||||||
extern Application* g_usableApp;
|
extern Application* g_usableApp;
|
||||||
|
|
||||||
extern GFontRef g_fntdominant;
|
extern GFontRef g_fntdominant;
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
#include <ode/ode.h>
|
|
||||||
#include "DatamodelV2/Instance.h"
|
|
||||||
#include "DatamodelV2/PartInstance.h"
|
|
||||||
|
|
||||||
class XplicitNgine : public Instance
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
XplicitNgine();
|
|
||||||
~XplicitNgine();
|
|
||||||
dWorldID physWorld;
|
|
||||||
dSpaceID physSpace;
|
|
||||||
dJointGroupID contactgroup;
|
|
||||||
|
|
||||||
void step(float stepSize);
|
|
||||||
void createBody(PartInstance* partInstance);
|
|
||||||
void deleteBody(PartInstance* partInstance);
|
|
||||||
void updateBody(PartInstance* partInstance, CoordinateFrame * cFrame);
|
|
||||||
};
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
#define IDC_PROPERTYGRID 2000
|
|
||||||
#define IDC_STATIC 2
|
|
||||||
|
|
||||||
#define IDC_EDIT1 105
|
|
||||||
#define IDI_ICON1 102
|
|
||||||
#define IDB_BITMAP1 103
|
|
||||||
#define IDD_DIALOG1 104
|
|
||||||
5
src/include/winver.h
Normal file
5
src/include/winver.h
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
#ifndef WINVER
|
||||||
|
#define _WIN32_WINNT 0x0400
|
||||||
|
#define _WIN32_WINDOWS 0x0400
|
||||||
|
#define WINVER 0x0400
|
||||||
|
#endif
|
||||||
@@ -1,14 +1,13 @@
|
|||||||
#include <G3DAll.h>
|
#include <G3DAll.h>
|
||||||
#include <initguid.h>
|
#include <initguid.h>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include "resource.h"
|
#include "../../resource.h"
|
||||||
#include "DataModelV2/Instance.h"
|
#include "DataModelV2/Instance.h"
|
||||||
#include "DataModelV2/PartInstance.h"
|
#include "DataModelV2/PartInstance.h"
|
||||||
#include "DataModelV2/TextButtonInstance.h"
|
#include "DataModelV2/TextButtonInstance.h"
|
||||||
#include "DataModelV2/ImageButtonInstance.h"
|
#include "DataModelV2/ImageButtonInstance.h"
|
||||||
#include "DataModelV2/DataModelInstance.h"
|
#include "DataModelV2/DataModelInstance.h"
|
||||||
#include "DataModelV2/GuiRootInstance.h"
|
#include "DataModelV2/GuiRootInstance.h"
|
||||||
#include "XplicitNgine/XplicitNgine.h"
|
|
||||||
#include "CameraController.h"
|
#include "CameraController.h"
|
||||||
#include "AudioPlayer.h"
|
#include "AudioPlayer.h"
|
||||||
#include "Globals.h"
|
#include "Globals.h"
|
||||||
@@ -175,7 +174,7 @@ void Application::deleteInstance()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(g_selectedInstances.size() == 0)
|
if(g_selectedInstances.size() == 0)
|
||||||
g_usableApp->_propWindow->UpdateSelected(g_dataModel);
|
g_usableApp->_propWindow->ClearProperties();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -188,9 +187,10 @@ void Application::onInit() {
|
|||||||
_dataModel->setName("undefined");
|
_dataModel->setName("undefined");
|
||||||
_dataModel->font = g_fntdominant;
|
_dataModel->font = g_fntdominant;
|
||||||
g_dataModel = _dataModel;
|
g_dataModel = _dataModel;
|
||||||
|
|
||||||
|
//initGUI();
|
||||||
|
|
||||||
#ifdef LEGACY_LOAD_G3DFUN_LEVEL
|
#ifdef LEGACY_LOAD_G3DFUN_LEVEL
|
||||||
// Anchored this baseplate for XplicitNgine tests
|
|
||||||
PartInstance* test = makePart();
|
PartInstance* test = makePart();
|
||||||
test->setParent(_dataModel->getWorkspace());
|
test->setParent(_dataModel->getWorkspace());
|
||||||
test->color = Color3(0.2F,0.3F,1);
|
test->color = Color3(0.2F,0.3F,1);
|
||||||
@@ -198,8 +198,7 @@ void Application::onInit() {
|
|||||||
test->setPosition(Vector3(0,0,0));
|
test->setPosition(Vector3(0,0,0));
|
||||||
test->setCFrame(test->getCFrame() * Matrix3::fromEulerAnglesXYZ(0,toRadians(0),toRadians(0)));
|
test->setCFrame(test->getCFrame() * Matrix3::fromEulerAnglesXYZ(0,toRadians(0),toRadians(0)));
|
||||||
test->setSurface(TOP, Enum::SurfaceType::Bumps);
|
test->setSurface(TOP, Enum::SurfaceType::Bumps);
|
||||||
test->setAnchored(true);
|
|
||||||
|
|
||||||
test = makePart();
|
test = makePart();
|
||||||
test->setParent(_dataModel->getWorkspace());
|
test->setParent(_dataModel->getWorkspace());
|
||||||
test->color = Color3(.5F,1,.5F);
|
test->color = Color3(.5F,1,.5F);
|
||||||
@@ -263,6 +262,9 @@ void Application::onInit() {
|
|||||||
test->setPosition(Vector3(-2,5,0));
|
test->setPosition(Vector3(-2,5,0));
|
||||||
test->setSurface(TOP, Enum::SurfaceType::Bumps);
|
test->setSurface(TOP, Enum::SurfaceType::Bumps);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
test = makePart();
|
test = makePart();
|
||||||
test->setParent(_dataModel->getWorkspace());
|
test->setParent(_dataModel->getWorkspace());
|
||||||
test->color = Color3::gray();
|
test->color = Color3::gray();
|
||||||
@@ -292,15 +294,86 @@ void Application::onInit() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void Application::onCleanup() {
|
void Application::onCleanup() {
|
||||||
clearInstances();
|
clearInstances();
|
||||||
sky->~Sky();
|
sky->~Sky();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Application::onLogic() {
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
|
Class HyperSnapSolver
|
||||||
|
|
||||||
|
function getCollisionDepth(Part colliding, part collider);
|
||||||
|
function getFaceCollision(Part colliding, part collider);
|
||||||
|
|
||||||
|
function eject(Part colliding, Part collider)
|
||||||
|
{
|
||||||
|
if(!colliding.canCollide || !collider.canCollide)
|
||||||
|
return;
|
||||||
|
if(getCollisionDepth(colliding, collider) != 0) {
|
||||||
|
int ejectMultiplier, ejectMultipliery = 1-(collider.Friction+colliding.Friction), ejectMultiplierz = 1-(collider.Friction/2+colliding.Friction/2);
|
||||||
|
if(colliding.Anchored)
|
||||||
|
ejectMultiplier = collider.elasticity;
|
||||||
|
int faceCollided = getFaceCollision(colliding, collider);
|
||||||
|
if(faceCollided % 3 == 1)
|
||||||
|
{
|
||||||
|
ejectMultipliery = ejectMultiplier;
|
||||||
|
ejectMultiplier = 1-(collider.Friction+colliding.Friction/2);
|
||||||
|
}
|
||||||
|
else if(faceCollided % 3 == 2)
|
||||||
|
{
|
||||||
|
ejectMultiplierz = ejectMultiplier;
|
||||||
|
ejectMultiplier = 1-(collider.Friction+colliding.Friction/2);
|
||||||
|
}
|
||||||
|
|
||||||
|
collider.Velocity *= Vector3.new(colliding.Velocity.x*ejectMultiplier,colliding.Velocity.y*ejectMultipliery,colliding.Velocity.z)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
double grav = 0.32666666666666666666666666666667;
|
||||||
|
void simGrav(PartInstance * collider)
|
||||||
|
{
|
||||||
|
if(!collider->anchored)
|
||||||
|
{
|
||||||
|
collider->setPosition(collider->getPosition()+collider->getVelocity());
|
||||||
|
collider->setVelocity(collider->getVelocity()-Vector3(0,grav,0));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void eject(PartInstance * colliding, PartInstance * collider)
|
||||||
|
{
|
||||||
|
if(colliding == collider || !colliding->canCollide || !collider->canCollide)
|
||||||
|
return;
|
||||||
|
if(G3D::CollisionDetection::fixedSolidBoxIntersectsFixedSolidBox(collider->getBox(), colliding->getBox()))
|
||||||
|
collider->setVelocity(collider->getVelocity().reflectionDirection(colliding->getCFrame().upVector())/1.3F);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void Application::onLogic() {
|
||||||
|
//PhysicsStart
|
||||||
|
for_each (_dataModel->getWorkspace()->partObjects.begin(), _dataModel->getWorkspace()->partObjects.end(), simGrav);
|
||||||
|
for(size_t i = 0; i < _dataModel->getWorkspace()->partObjects.size(); i++)
|
||||||
|
{
|
||||||
|
for(size_t j = 0; j < _dataModel->getWorkspace()->partObjects.size(); j++)
|
||||||
|
{
|
||||||
|
eject(_dataModel->getWorkspace()->partObjects[i], _dataModel->getWorkspace()->partObjects[j]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void Application::onNetwork() {
|
void Application::onNetwork() {
|
||||||
// Poll net messages here
|
// Poll net messages here
|
||||||
}
|
}
|
||||||
@@ -318,47 +391,8 @@ std::vector<Instance*> Application::getSelection()
|
|||||||
void Application::onSimulation(RealTime rdt, SimTime sdt, SimTime idt) {
|
void Application::onSimulation(RealTime rdt, SimTime sdt, SimTime idt) {
|
||||||
|
|
||||||
if(_dataModel->isRunning())
|
if(_dataModel->isRunning())
|
||||||
{
|
|
||||||
// XplicitNgine Start
|
|
||||||
std::vector<PartInstance *> toDelete;
|
|
||||||
for(size_t i = 0; i < _dataModel->getWorkspace()->partObjects.size(); i++)
|
|
||||||
{
|
|
||||||
PartInstance* partInstance = _dataModel->getWorkspace()->partObjects[i];
|
|
||||||
if(partInstance->getPosition().y < -255)
|
|
||||||
{
|
|
||||||
toDelete.push_back(partInstance);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
_dataModel->getEngine()->createBody(partInstance);
|
|
||||||
}
|
|
||||||
bool a = false;
|
|
||||||
while(toDelete.size() > 0)
|
|
||||||
{
|
|
||||||
PartInstance * p = toDelete.back();
|
|
||||||
toDelete.pop_back();
|
|
||||||
if(std::find(g_selectedInstances.begin(), g_selectedInstances.end(), p) != g_selectedInstances.end())
|
|
||||||
{
|
|
||||||
g_selectedInstances.erase(std::remove(g_selectedInstances.begin(), g_selectedInstances.end(), p), g_selectedInstances.end());
|
|
||||||
a = true;
|
|
||||||
}
|
|
||||||
p->setParent(NULL);
|
|
||||||
delete p;
|
|
||||||
}
|
|
||||||
if(a)
|
|
||||||
{
|
|
||||||
if(g_selectedInstances.size() == 0)
|
|
||||||
g_usableApp->_propWindow->UpdateSelected(g_dataModel);
|
|
||||||
else if(g_selectedInstances.size() == 1)
|
|
||||||
g_usableApp->_propWindow->UpdateSelected(g_selectedInstances[0]);
|
|
||||||
}
|
|
||||||
for(int i = 0; i < 6; i++)
|
|
||||||
{
|
|
||||||
_dataModel->getEngine()->step(sdt*2);
|
|
||||||
}
|
|
||||||
onLogic();
|
onLogic();
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
_dataModel->getGuiRoot()->update();
|
_dataModel->getGuiRoot()->update();
|
||||||
|
|
||||||
if(_dataModel->name != _title)
|
if(_dataModel->name != _title)
|
||||||
@@ -373,29 +407,95 @@ void Application::onSimulation(RealTime rdt, SimTime sdt, SimTime idt) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*double getOSVersion() {
|
||||||
|
OSVERSIONINFO osvi;
|
||||||
|
|
||||||
|
ZeroMemory(&osvi, sizeof(OSVERSIONINFO));
|
||||||
|
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
|
||||||
|
|
||||||
|
GetVersionEx(&osvi);
|
||||||
|
std::string version = Convert(osvi.dwMajorVersion) + "." + Convert(osvi.dwMinorVersion);
|
||||||
|
return ::atof(version.c_str());
|
||||||
|
}*/
|
||||||
|
/*
|
||||||
|
bool IsHolding(int button)
|
||||||
|
{
|
||||||
|
return (GetKeyState(button) >> 1)>0;
|
||||||
|
}
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
void Application::onUserInput(UserInput* ui) {
|
void Application::onUserInput(UserInput* ui) {
|
||||||
if(mouseMoveState)
|
if(mouseMoveState)
|
||||||
{
|
{
|
||||||
mouseMoveState = false;
|
mouseMoveState = false;
|
||||||
tool->onMouseMoved(mouse);
|
tool->onMouseMoved(mouse);
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
if(GetHoldKeyState(VK_LCONTROL))
|
||||||
|
{
|
||||||
|
if(GetHoldKeyState('D'))
|
||||||
|
{
|
||||||
|
_messageTime = System::time();
|
||||||
|
if(debugMode())
|
||||||
|
_message = "Debug Mode Disabled";
|
||||||
|
else
|
||||||
|
_message = "Debug Mode Enabled";
|
||||||
|
setDebugMode(!debugMode());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*/
|
||||||
if(GetHoldKeyState(VK_F8))
|
if(GetHoldKeyState(VK_F8))
|
||||||
{
|
{
|
||||||
_dataModel->getGuiRoot()->setDebugMessage("FOV Set to 10", System::time());
|
_dataModel->getGuiRoot()->setDebugMessage("FOV Set to 10", System::time());
|
||||||
}
|
}
|
||||||
|
//}
|
||||||
|
|
||||||
|
//_dataModel->mousex = ui->getMouseX();
|
||||||
|
//_dataModel->mousey = ui->getMouseY();
|
||||||
mouse.setMouseDown((GetKeyState(VK_LBUTTON) & 0x100) != 0);
|
mouse.setMouseDown((GetKeyState(VK_LBUTTON) & 0x100) != 0);
|
||||||
|
|
||||||
// Camera KB Handling
|
if (GetHoldKeyState(VK_LBUTTON)) {
|
||||||
if (GetKPBool(VK_OEM_COMMA)) //Left
|
/* if (_dragging) {
|
||||||
g_usableApp->cameraController.panLeft();
|
PartInstance* part = NULL;
|
||||||
else if (GetKPBool(VK_OEM_PERIOD)) // Right
|
if(g_selectedInstances.size() > 0)
|
||||||
g_usableApp->cameraController.panRight();
|
part = (PartInstance*) g_selectedInstances.at(0);
|
||||||
else if (GetKPBool(0x49)) // Zoom In (I)
|
Ray dragRay = cameraController.getCamera()->worldRay(mouse.x, mouse.y, renderDevice->getViewport());
|
||||||
g_usableApp->cameraController.Zoom(1);
|
std::vector<Instance*> instances = _dataModel->getWorkspace()->getAllChildren();
|
||||||
else if (GetKPBool(0x4F)) // Zoom Out (O)
|
for(size_t i = 0; i < instances.size(); i++)
|
||||||
g_usableApp->cameraController.Zoom(-1);
|
{
|
||||||
|
if(PartInstance* moveTo = dynamic_cast<PartInstance*>(instances.at(i)))
|
||||||
|
{
|
||||||
|
float __time = testRay.intersectionTime(moveTo->getBox());
|
||||||
|
float __nearest=std::numeric_limits<float>::infinity();
|
||||||
|
if (__time != inf())
|
||||||
|
{
|
||||||
|
if (__nearest>__time)
|
||||||
|
{
|
||||||
|
// BROKEN
|
||||||
|
//Vector3 closest = (dragRay.closestPoint(moveTo->getPosition()) * 2);
|
||||||
|
//part->setPosition(closest);
|
||||||
|
//part->setPosition(Vector3(floor(closest.x),part->getPosition().y,floor(closest.z)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Sleep(10);
|
||||||
|
}*/
|
||||||
|
}
|
||||||
|
// Camera KB Handling {
|
||||||
|
if (GetKPBool(VK_OEM_COMMA)) //Left
|
||||||
|
g_usableApp->cameraController.panLeft();
|
||||||
|
else if (GetKPBool(VK_OEM_PERIOD)) // Right
|
||||||
|
g_usableApp->cameraController.panRight();
|
||||||
|
else if (GetKPBool(0x49)) // Zoom In (I)
|
||||||
|
g_usableApp->cameraController.Zoom(1);
|
||||||
|
else if (GetKPBool(0x4F)) // Zoom Out (O)
|
||||||
|
g_usableApp->cameraController.Zoom(-1);
|
||||||
|
// }
|
||||||
|
|
||||||
|
//readMouseGUIInput();
|
||||||
|
// Add other key handling here
|
||||||
}
|
}
|
||||||
|
|
||||||
void Application::changeTool(Tool * newTool)
|
void Application::changeTool(Tool * newTool)
|
||||||
@@ -573,17 +673,18 @@ void Application::onGraphics(RenderDevice* rd) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
renderDevice->setShininess(70);
|
//renderDevice->setShininess(70);
|
||||||
renderDevice->setSpecularCoefficient(Color3(0.1F, 0.1F, 0.1F));
|
//renderDevice->setSpecularCoefficient(Color3(0.1F, 0.1F, 0.1F));
|
||||||
|
|
||||||
//float lightAmbient[] = { 0.5F, 0.6F, 0.9F, 1.0F };
|
float lightAmbient[] = { 0.5F, 0.6F, 0.9F, 1.0F };
|
||||||
//float lightDiffuse[] = { 0.6F, 0.4F, 0.9F, 1.0F };
|
float lightDiffuse[] = { 0.6F, 0.4F, 0.9F, 1.0F };
|
||||||
|
float lightSpecular[] = { 0.8F, 0.8F, 0.8F, 1.0F };
|
||||||
//float lightSpecular[] = { 0.8F, 0.6F, 1.0F, 1.0F };
|
//float lightSpecular[] = { 0.8F, 0.6F, 1.0F, 1.0F };
|
||||||
|
|
||||||
//glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, lightAmbient);
|
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, lightAmbient);
|
||||||
//glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, lightDiffuse);
|
glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, lightDiffuse);
|
||||||
//glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, lightSpecular);
|
glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, lightSpecular);
|
||||||
//glMateriali(GL_FRONT_AND_BACK, GL_SHININESS, 70);
|
glMateriali(GL_FRONT_AND_BACK, GL_SHININESS, 70);
|
||||||
|
|
||||||
|
|
||||||
rd->beforePrimitive();
|
rd->beforePrimitive();
|
||||||
@@ -693,6 +794,11 @@ void Application::onKeyPressed(int key)
|
|||||||
{
|
{
|
||||||
_dataModel->getOpen();
|
_dataModel->getOpen();
|
||||||
}
|
}
|
||||||
|
if ((GetHoldKeyState(VK_LCONTROL) || GetHoldKeyState(VK_RCONTROL)) && key=='A')
|
||||||
|
{
|
||||||
|
std::vector<Instance *> vec = _dataModel->getWorkspace()->getAllChildren();
|
||||||
|
g_selectedInstances.insert(g_selectedInstances.end(), vec.begin(), vec.end());
|
||||||
|
}
|
||||||
tool->onKeyDown(key);
|
tool->onKeyDown(key);
|
||||||
}
|
}
|
||||||
void Application::onKeyUp(int key)
|
void Application::onKeyUp(int key)
|
||||||
@@ -843,8 +949,6 @@ void Application::run() {
|
|||||||
RealTime rdt = timeStep;
|
RealTime rdt = timeStep;
|
||||||
SimTime sdt = timeStep * rate;
|
SimTime sdt = timeStep * rate;
|
||||||
SimTime idt = desiredFrameDuration * rate;
|
SimTime idt = desiredFrameDuration * rate;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
onSimulation(rdt,sdt,idt);
|
onSimulation(rdt,sdt,idt);
|
||||||
m_simulationWatch.tock();
|
m_simulationWatch.tock();
|
||||||
|
|||||||
@@ -159,11 +159,6 @@ void CameraController::tiltDown()
|
|||||||
setFrame(frame);
|
setFrame(frame);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CameraController::zoomExtents()
|
|
||||||
{
|
|
||||||
// do some weird jank math
|
|
||||||
}
|
|
||||||
|
|
||||||
void CameraController::centerCamera(Instance* selection)
|
void CameraController::centerCamera(Instance* selection)
|
||||||
{
|
{
|
||||||
CoordinateFrame frame = CoordinateFrame(g3dCamera.getCoordinateFrame().translation);
|
CoordinateFrame frame = CoordinateFrame(g3dCamera.getCoordinateFrame().translation);
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ using namespace std;
|
|||||||
using namespace rapidxml;
|
using namespace rapidxml;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
DataModelInstance::DataModelInstance(void)
|
DataModelInstance::DataModelInstance(void)
|
||||||
{
|
{
|
||||||
Instance::Instance();
|
Instance::Instance();
|
||||||
@@ -33,33 +34,12 @@ DataModelInstance::DataModelInstance(void)
|
|||||||
_loadedFileName="..//skooter.rbxm";
|
_loadedFileName="..//skooter.rbxm";
|
||||||
listicon = 5;
|
listicon = 5;
|
||||||
running = false;
|
running = false;
|
||||||
xplicitNgine = NULL;
|
|
||||||
resetEngine();
|
|
||||||
}
|
|
||||||
|
|
||||||
void DataModelInstance::resetEngine()
|
|
||||||
{
|
|
||||||
if(xplicitNgine != NULL)
|
|
||||||
delete xplicitNgine;
|
|
||||||
xplicitNgine = new XplicitNgine();
|
|
||||||
g_xplicitNgine = xplicitNgine;
|
|
||||||
for(size_t i = 0; i < getWorkspace()->partObjects.size(); i++)
|
|
||||||
{
|
|
||||||
PartInstance* partInstance = getWorkspace()->partObjects[i];
|
|
||||||
partInstance->physBody = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
XplicitNgine * DataModelInstance::getEngine()
|
|
||||||
{
|
|
||||||
return xplicitNgine;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DataModelInstance::toggleRun()
|
void DataModelInstance::toggleRun()
|
||||||
{
|
{
|
||||||
running = !running;
|
running = !running;
|
||||||
//if(!running)
|
|
||||||
//resetEngine();
|
|
||||||
}
|
}
|
||||||
bool DataModelInstance::isRunning()
|
bool DataModelInstance::isRunning()
|
||||||
{
|
{
|
||||||
@@ -68,7 +48,6 @@ bool DataModelInstance::isRunning()
|
|||||||
|
|
||||||
DataModelInstance::~DataModelInstance(void)
|
DataModelInstance::~DataModelInstance(void)
|
||||||
{
|
{
|
||||||
delete xplicitNgine;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
@@ -292,7 +271,6 @@ bool DataModelInstance::scanXMLObject(xml_node<> * scanNode)
|
|||||||
xml_node<> *propNode = node->first_node();
|
xml_node<> *propNode = node->first_node();
|
||||||
xml_node<> *cFrameNode=0;
|
xml_node<> *cFrameNode=0;
|
||||||
xml_node<> *sizeNode=0;
|
xml_node<> *sizeNode=0;
|
||||||
xml_node<> *anchoredNode=0;
|
|
||||||
xml_node<> *shapeNode=0;
|
xml_node<> *shapeNode=0;
|
||||||
xml_node<> *colorNode=0;
|
xml_node<> *colorNode=0;
|
||||||
xml_node<> *brickColorNode=0;
|
xml_node<> *brickColorNode=0;
|
||||||
@@ -308,10 +286,6 @@ bool DataModelInstance::scanXMLObject(xml_node<> * scanNode)
|
|||||||
if (xmlValue=="CFrame" | xmlValue=="CoordinateFrame")
|
if (xmlValue=="CFrame" | xmlValue=="CoordinateFrame")
|
||||||
{
|
{
|
||||||
cFrameNode = partPropNode;
|
cFrameNode = partPropNode;
|
||||||
}
|
|
||||||
if (xmlValue=="Anchored")
|
|
||||||
{
|
|
||||||
anchoredNode = partPropNode;
|
|
||||||
}
|
}
|
||||||
if (xmlValue=="Name")
|
if (xmlValue=="Name")
|
||||||
{
|
{
|
||||||
@@ -423,10 +397,6 @@ bool DataModelInstance::scanXMLObject(xml_node<> * scanNode)
|
|||||||
{
|
{
|
||||||
test->color = bcToRGB(atoi(brickColorNode->value()));
|
test->color = bcToRGB(atoi(brickColorNode->value()));
|
||||||
}
|
}
|
||||||
if(anchoredNode)
|
|
||||||
{
|
|
||||||
test->setAnchored(stricmp(anchoredNode->value(), "true") == 0);
|
|
||||||
}
|
|
||||||
test->setSize(Vector3(sizeX,sizeY+_modY,sizeZ));
|
test->setSize(Vector3(sizeX,sizeY+_modY,sizeZ));
|
||||||
test->setName(newName);
|
test->setName(newName);
|
||||||
CoordinateFrame cf;
|
CoordinateFrame cf;
|
||||||
@@ -479,7 +449,6 @@ bool DataModelInstance::load(const char* filename, bool clearObjects)
|
|||||||
std::string hname = sfilename.substr(begin);
|
std::string hname = sfilename.substr(begin);
|
||||||
std::string tname = hname.substr(0, hname.length() - 5);
|
std::string tname = hname.substr(0, hname.length() - 5);
|
||||||
name = tname;
|
name = tname;
|
||||||
resetEngine();
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -550,7 +519,6 @@ bool DataModelInstance::getOpen()
|
|||||||
of.lpstrFile[0]='\0';
|
of.lpstrFile[0]='\0';
|
||||||
of.nMaxFile=500;
|
of.nMaxFile=500;
|
||||||
of.lpstrTitle="Hello";
|
of.lpstrTitle="Hello";
|
||||||
of.Flags = OFN_FILEMUSTEXIST;
|
|
||||||
ShowCursor(TRUE);
|
ShowCursor(TRUE);
|
||||||
BOOL file = GetOpenFileName(&of);
|
BOOL file = GetOpenFileName(&of);
|
||||||
if (file)
|
if (file)
|
||||||
@@ -558,6 +526,7 @@ bool DataModelInstance::getOpen()
|
|||||||
_loadedFileName = of.lpstrFile;
|
_loadedFileName = of.lpstrFile;
|
||||||
load(of.lpstrFile,true);
|
load(of.lpstrFile,true);
|
||||||
}
|
}
|
||||||
|
//else MessageBox(NULL, "Failed to open dialog", "Failure", MB_ICONHAND | MB_OK);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
void DataModelInstance::setMessage(std::string msg)
|
void DataModelInstance::setMessage(std::string msg)
|
||||||
|
|||||||
@@ -34,11 +34,13 @@ void GroupInstance::PropUpdate(LPPROPGRIDITEM &pItem)
|
|||||||
|
|
||||||
std::vector<Instance *> GroupInstance::unGroup()
|
std::vector<Instance *> GroupInstance::unGroup()
|
||||||
{
|
{
|
||||||
|
std::vector<Instance *> child;
|
||||||
while(children.size() > 0)
|
while(children.size() > 0)
|
||||||
{
|
{
|
||||||
|
child.push_back(children[0]);
|
||||||
children[0]->setParent(parent);
|
children[0]->setParent(parent);
|
||||||
}
|
}
|
||||||
return std::vector<Instance *>();
|
return child;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GroupInstance::render(RenderDevice * rd)
|
void GroupInstance::render(RenderDevice * rd)
|
||||||
|
|||||||
@@ -184,6 +184,8 @@ GuiRootInstance::GuiRootInstance() : _message(""), _messageTime(0)
|
|||||||
button->fontLocationRelativeTo = Vector2(10, 0);
|
button->fontLocationRelativeTo = Vector2(10, 0);
|
||||||
button->setAllColorsSame();
|
button->setAllColorsSame();
|
||||||
button->boxColorOvr = Color4(0.6F,0.6F,0.6F,0.4F);
|
button->boxColorOvr = Color4(0.6F,0.6F,0.6F,0.4F);
|
||||||
|
button->setName("insert");
|
||||||
|
button->setButtonListener(menuListener);
|
||||||
|
|
||||||
button = makeTextButton();
|
button = makeTextButton();
|
||||||
button->boxBegin = Vector2(500, 0);
|
button->boxBegin = Vector2(500, 0);
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#define WINVER 0x0400
|
|
||||||
#include <G3DAll.h>
|
#include <G3DAll.h>
|
||||||
#include "DataModelV2/Instance.h"
|
#include "DataModelV2/Instance.h"
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
PartInstance::PartInstance(void)
|
PartInstance::PartInstance(void)
|
||||||
{
|
{
|
||||||
PVInstance::PVInstance();
|
PVInstance::PVInstance();
|
||||||
physBody = NULL;
|
|
||||||
glList = glGenLists(1);
|
glList = glGenLists(1);
|
||||||
name = "Unnamed PVItem";
|
name = "Unnamed PVItem";
|
||||||
className = "Part";
|
className = "Part";
|
||||||
@@ -28,13 +27,6 @@ PartInstance::PartInstance(void)
|
|||||||
shape = Enum::Shape::Block;
|
shape = Enum::Shape::Block;
|
||||||
}
|
}
|
||||||
|
|
||||||
float PartInstance::getMass()
|
|
||||||
{
|
|
||||||
if(shape == Enum::Shape::Block)
|
|
||||||
return size.x*size.y*size.z*0.7F;
|
|
||||||
else
|
|
||||||
return 1.3333333333333333333333333333333F*(size.x/2)*(size.y/2)*(size.z/2)*0.7F;
|
|
||||||
}
|
|
||||||
|
|
||||||
Vector3 PartInstance::getVelocity()
|
Vector3 PartInstance::getVelocity()
|
||||||
{
|
{
|
||||||
@@ -117,34 +109,32 @@ void PartInstance::setSurface(int face, Enum::SurfaceType::Value surface)
|
|||||||
|
|
||||||
void PartInstance::setParent(Instance* prnt)
|
void PartInstance::setParent(Instance* prnt)
|
||||||
{
|
{
|
||||||
g_dataModel->getEngine()->deleteBody(this);
|
|
||||||
Instance * cparent = getParent();
|
Instance * cparent = getParent();
|
||||||
while(cparent != NULL)
|
while(cparent != NULL)
|
||||||
{
|
{
|
||||||
if(WorkspaceInstance* workspace = dynamic_cast<WorkspaceInstance*>(cparent))
|
if(WorkspaceInstance* workspace = dynamic_cast<WorkspaceInstance*>(cparent))
|
||||||
{
|
{
|
||||||
|
std::cout << "Removed from partarray " << std::endl;
|
||||||
workspace->partObjects.erase(std::remove(workspace->partObjects.begin(), workspace->partObjects.end(), this), workspace->partObjects.end());
|
workspace->partObjects.erase(std::remove(workspace->partObjects.begin(), workspace->partObjects.end(), this), workspace->partObjects.end());
|
||||||
}
|
|
||||||
cparent = cparent->getParent();
|
|
||||||
}
|
|
||||||
Instance::setParent(prnt);
|
|
||||||
cparent = getParent();
|
|
||||||
while(cparent != NULL)
|
|
||||||
{
|
|
||||||
if(WorkspaceInstance* workspace = dynamic_cast<WorkspaceInstance*>(cparent))
|
|
||||||
{
|
|
||||||
workspace->partObjects.push_back(this);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
cparent = cparent->getParent();
|
cparent = cparent->getParent();
|
||||||
}
|
}
|
||||||
|
Instance::setParent(prnt);
|
||||||
|
while(parent != NULL)
|
||||||
|
{
|
||||||
|
if(WorkspaceInstance* workspace = dynamic_cast<WorkspaceInstance*>(parent))
|
||||||
|
{
|
||||||
|
workspace->partObjects.push_back(this);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
parent = parent->getParent();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PartInstance::PartInstance(const PartInstance &oinst)
|
PartInstance::PartInstance(const PartInstance &oinst)
|
||||||
{
|
{
|
||||||
PVInstance::PVInstance(oinst);
|
PVInstance::PVInstance(oinst);
|
||||||
physBody = NULL;
|
|
||||||
glList = glGenLists(1);
|
glList = glGenLists(1);
|
||||||
//name = oinst.name;
|
//name = oinst.name;
|
||||||
//className = "Part";
|
//className = "Part";
|
||||||
@@ -153,7 +143,7 @@ PartInstance::PartInstance(const PartInstance &oinst)
|
|||||||
setParent(oinst.parent);
|
setParent(oinst.parent);
|
||||||
anchored = oinst.anchored;
|
anchored = oinst.anchored;
|
||||||
size = oinst.size;
|
size = oinst.size;
|
||||||
setCFrameNoSync(oinst.cFrame);
|
setCFrame(oinst.cFrame);
|
||||||
color = oinst.color;
|
color = oinst.color;
|
||||||
velocity = oinst.velocity;
|
velocity = oinst.velocity;
|
||||||
rotVelocity = oinst.rotVelocity;
|
rotVelocity = oinst.rotVelocity;
|
||||||
@@ -230,32 +220,15 @@ void PartInstance::setShape(Enum::Shape::Value shape)
|
|||||||
void PartInstance::setPosition(Vector3 pos)
|
void PartInstance::setPosition(Vector3 pos)
|
||||||
{
|
{
|
||||||
position = pos;
|
position = pos;
|
||||||
setCFrame(CoordinateFrame(cFrame.rotation, pos));
|
cFrame = CoordinateFrame(cFrame.rotation, pos);
|
||||||
|
changed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PartInstance::setAnchored(bool anchored)
|
|
||||||
{
|
|
||||||
this->anchored = anchored;
|
|
||||||
g_dataModel->getEngine()->deleteBody(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool PartInstance::isAnchored()
|
|
||||||
{
|
|
||||||
return this->anchored;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
CoordinateFrame PartInstance::getCFrame()
|
CoordinateFrame PartInstance::getCFrame()
|
||||||
{
|
{
|
||||||
return cFrame;
|
return cFrame;
|
||||||
}
|
}
|
||||||
void PartInstance::setCFrame(CoordinateFrame coordinateFrame)
|
void PartInstance::setCFrame(CoordinateFrame coordinateFrame)
|
||||||
{
|
|
||||||
g_dataModel->getEngine()->updateBody(this, &coordinateFrame);
|
|
||||||
setCFrameNoSync(coordinateFrame);
|
|
||||||
}
|
|
||||||
|
|
||||||
void PartInstance::setCFrameNoSync(CoordinateFrame coordinateFrame)
|
|
||||||
{
|
{
|
||||||
cFrame = coordinateFrame;
|
cFrame = coordinateFrame;
|
||||||
position = coordinateFrame.translation;
|
position = coordinateFrame.translation;
|
||||||
@@ -306,6 +279,7 @@ void PartInstance::render(RenderDevice* rd) {
|
|||||||
changed=false;
|
changed=false;
|
||||||
Vector3 renderSize = size/2;
|
Vector3 renderSize = size/2;
|
||||||
glNewList(glList, GL_COMPILE);
|
glNewList(glList, GL_COMPILE);
|
||||||
|
//glScalef(0.5f,0.5f,0.5f);
|
||||||
renderShape(this->shape, renderSize, color);
|
renderShape(this->shape, renderSize, color);
|
||||||
renderSurface(TOP, this->top, renderSize, this->controller, color);
|
renderSurface(TOP, this->top, renderSize, this->controller, color);
|
||||||
renderSurface(FRONT, this->front, renderSize, this->controller, color);
|
renderSurface(FRONT, this->front, renderSize, this->controller, color);
|
||||||
@@ -323,16 +297,6 @@ void PartInstance::render(RenderDevice* rd) {
|
|||||||
PartInstance::~PartInstance(void)
|
PartInstance::~PartInstance(void)
|
||||||
{
|
{
|
||||||
glDeleteLists(glList, 1);
|
glDeleteLists(glList, 1);
|
||||||
/*
|
|
||||||
// Causes some weird ODE error
|
|
||||||
// Someone, please look into this
|
|
||||||
|
|
||||||
dBodyDestroy(physBody);
|
|
||||||
for (int i = 0; i < 3; i++) {
|
|
||||||
if (physGeom[i] != NULL)
|
|
||||||
dGeomDestroy(physGeom[i]);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
char pto[512];
|
char pto[512];
|
||||||
@@ -371,7 +335,7 @@ void PartInstance::PropUpdate(LPPROPGRIDITEM &item)
|
|||||||
}
|
}
|
||||||
else if(strcmp(item->lpszPropName, "Anchored") == 0)
|
else if(strcmp(item->lpszPropName, "Anchored") == 0)
|
||||||
{
|
{
|
||||||
setAnchored(item->lpCurValue == TRUE);
|
anchored= item->lpCurValue == TRUE;
|
||||||
}
|
}
|
||||||
else if(strcmp(item->lpszPropName, "Offset") == 0)
|
else if(strcmp(item->lpszPropName, "Offset") == 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
#include "DataModelV2/WorkspaceInstance.h"
|
#include "DataModelV2/WorkspaceInstance.h"
|
||||||
#include "Globals.h"
|
|
||||||
#include "Application.h"
|
|
||||||
|
|
||||||
WorkspaceInstance::WorkspaceInstance(void)
|
WorkspaceInstance::WorkspaceInstance(void)
|
||||||
{
|
{
|
||||||
@@ -16,11 +15,6 @@ void WorkspaceInstance::clearChildren()
|
|||||||
Instance::clearChildren();
|
Instance::clearChildren();
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorkspaceInstance::zoomToExtents()
|
|
||||||
{
|
|
||||||
g_usableApp->cameraController.zoomExtents();
|
|
||||||
}
|
|
||||||
|
|
||||||
WorkspaceInstance::~WorkspaceInstance(void)
|
WorkspaceInstance::~WorkspaceInstance(void)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
#include "Globals.h"
|
#include "Globals.h"
|
||||||
#include "Application.h"
|
#include "Application.h"
|
||||||
|
|
||||||
|
int const Globals::gen = 0;
|
||||||
|
int const Globals::major = 100;
|
||||||
|
int const Globals::minor = 4;
|
||||||
|
int const Globals::patch = 3;
|
||||||
int Globals::surfaceId = 2;
|
int Globals::surfaceId = 2;
|
||||||
//bool Globals::showMouse = true;
|
//bool Globals::showMouse = true;
|
||||||
bool Globals::useMousePoint = false;
|
bool Globals::useMousePoint = false;
|
||||||
@@ -8,7 +12,6 @@ std::vector<Instance*> postRenderStack = std::vector<Instance*>();
|
|||||||
|
|
||||||
std::vector<Instance*> g_selectedInstances = std::vector<Instance*>();
|
std::vector<Instance*> g_selectedInstances = std::vector<Instance*>();
|
||||||
DataModelInstance* g_dataModel = NULL;
|
DataModelInstance* g_dataModel = NULL;
|
||||||
XplicitNgine* g_xplicitNgine = NULL;
|
|
||||||
|
|
||||||
bool running = false;
|
bool running = false;
|
||||||
G3D::TextureRef Globals::surface;
|
G3D::TextureRef Globals::surface;
|
||||||
|
|||||||
@@ -39,7 +39,6 @@ void GUDButtonListener::onButton1MouseClick(BaseButtonInstance* button)
|
|||||||
else if(button->name == "Group")
|
else if(button->name == "Group")
|
||||||
{
|
{
|
||||||
GroupInstance * inst = new GroupInstance();
|
GroupInstance * inst = new GroupInstance();
|
||||||
inst->setParent(g_dataModel->getWorkspace());
|
|
||||||
for(size_t i = 0; i < g_selectedInstances.size(); i++)
|
for(size_t i = 0; i < g_selectedInstances.size(); i++)
|
||||||
{
|
{
|
||||||
if(g_selectedInstances.at(i)->canDelete)
|
if(g_selectedInstances.at(i)->canDelete)
|
||||||
@@ -53,6 +52,7 @@ void GUDButtonListener::onButton1MouseClick(BaseButtonInstance* button)
|
|||||||
/*tempinst->setPosition(Vector3(tempPos.x, tempPos.y + tempSize.y, tempPos.z));
|
/*tempinst->setPosition(Vector3(tempPos.x, tempPos.y + tempSize.y, tempPos.z));
|
||||||
g_usableApp->cameraController.centerCamera(g_selectedInstances.at(0));*/
|
g_usableApp->cameraController.centerCamera(g_selectedInstances.at(0));*/
|
||||||
}
|
}
|
||||||
|
inst->setParent(g_dataModel->getWorkspace());
|
||||||
g_selectedInstances.clear();
|
g_selectedInstances.clear();
|
||||||
g_selectedInstances.push_back(inst);
|
g_selectedInstances.push_back(inst);
|
||||||
if(g_selectedInstances.size() > 0)
|
if(g_selectedInstances.size() > 0)
|
||||||
|
|||||||
@@ -2,6 +2,33 @@
|
|||||||
#include "DataModelV2/ToggleImageButtonInstance.h"
|
#include "DataModelV2/ToggleImageButtonInstance.h"
|
||||||
#include "Application.h"
|
#include "Application.h"
|
||||||
#include "Globals.h"
|
#include "Globals.h"
|
||||||
|
#include "../../resource.h"
|
||||||
|
|
||||||
|
INT_PTR CALLBACK InsertDlgProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
switch(Message)
|
||||||
|
{
|
||||||
|
case WM_INITDIALOG:
|
||||||
|
return TRUE;
|
||||||
|
break;
|
||||||
|
case WM_COMMAND:
|
||||||
|
switch(LOWORD(wParam))
|
||||||
|
{
|
||||||
|
case IDOK:
|
||||||
|
//g_dataModel->setMessage("lol u thought");
|
||||||
|
EndDialog(hwnd, IDOK);
|
||||||
|
break;
|
||||||
|
case IDCANCEL:
|
||||||
|
EndDialog(hwnd, IDCANCEL);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
void MenuButtonListener::onButton1MouseClick(BaseButtonInstance* button)
|
void MenuButtonListener::onButton1MouseClick(BaseButtonInstance* button)
|
||||||
{
|
{
|
||||||
if(button->name == "go")
|
if(button->name == "go")
|
||||||
@@ -14,23 +41,17 @@ void MenuButtonListener::onButton1MouseClick(BaseButtonInstance* button)
|
|||||||
HMENU mainmenu = CreatePopupMenu();
|
HMENU mainmenu = CreatePopupMenu();
|
||||||
AppendMenu(mainmenu, MF_STRING, 100, "New");
|
AppendMenu(mainmenu, MF_STRING, 100, "New");
|
||||||
AppendMenu(mainmenu, MF_STRING, 101, "Open...");
|
AppendMenu(mainmenu, MF_STRING, 101, "Open...");
|
||||||
AppendMenu(mainmenu, MF_STRING, 102, "Close");
|
AppendMenu(mainmenu, MF_STRING, 101, "Close");
|
||||||
AppendMenu(mainmenu, MF_SEPARATOR, 0, NULL);
|
AppendMenu(mainmenu, MF_SEPARATOR, 0, NULL);
|
||||||
POINT p;
|
POINT p;
|
||||||
GetCursorPos(&p);
|
GetCursorPos(&p);
|
||||||
int menuClick = TrackPopupMenu(mainmenu, TPM_LEFTBUTTON | TPM_RETURNCMD, p.x, p.y, 0, Globals::mainHwnd, 0);
|
TrackPopupMenu(mainmenu, TPM_LEFTBUTTON, p.x, p.y, 0, Globals::mainHwnd, 0);
|
||||||
switch (menuClick)
|
|
||||||
{
|
|
||||||
case 100:
|
|
||||||
g_usableApp->clearInstances();
|
|
||||||
g_usableApp->onInit();
|
|
||||||
break;
|
|
||||||
case 101:
|
|
||||||
g_dataModel->getOpen();
|
|
||||||
break;
|
|
||||||
case 102:
|
|
||||||
g_usableApp->QuitApp();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
else if(button->name == "insert")
|
||||||
|
{
|
||||||
|
//HWND aDiag = CreateDialog((HINSTANCE) GetWindowLong(Globals::mainHwnd, GWL_HINSTANCE), MAKEINTRESOURCE(IDD_DIALOG1), Globals::mainHwnd, (DLGPROC)InsertDlgProc);
|
||||||
|
HWND aDiag2 = CreateDialog((HINSTANCE) GetWindowLong(Globals::mainHwnd, GWL_HINSTANCE), MAKEINTRESOURCE(IDD_DIALOG2), Globals::mainHwnd, (DLGPROC)InsertDlgProc);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,17 @@
|
|||||||
#define _WINSOCKAPI_
|
#define _WINSOCKAPI_
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include "WindowFunctions.h"
|
#include "WindowFunctions.h"
|
||||||
#include "resource.h"
|
#include "../../resource.h"
|
||||||
#include "PropertyWindow.h"
|
#include "PropertyWindow.h"
|
||||||
#include "Globals.h"
|
#include "Globals.h"
|
||||||
#include "strsafe.h"
|
#include "strsafe.h"
|
||||||
#include "Application.h"
|
#include "Application.h"
|
||||||
|
|
||||||
|
/*typedef struct typPRGP {
|
||||||
|
Instance* instance; // Declare member types
|
||||||
|
Property ∝
|
||||||
|
} PRGP;*/
|
||||||
|
|
||||||
std::vector<PROPGRIDITEM> prop;
|
std::vector<PROPGRIDITEM> prop;
|
||||||
std::vector<Instance*> children;
|
std::vector<Instance*> children;
|
||||||
Instance * selectedInstance;
|
Instance * selectedInstance;
|
||||||
@@ -342,7 +347,7 @@ void PropertyWindow::UpdateSelected(Instance * instance)
|
|||||||
{
|
{
|
||||||
PropGrid_ResetContent(_propGrid);
|
PropGrid_ResetContent(_propGrid);
|
||||||
prop = instance->getProperties();
|
prop = instance->getProperties();
|
||||||
//if (selectedInstance != instance)
|
if (selectedInstance != instance)
|
||||||
{
|
{
|
||||||
selectedInstance = instance;
|
selectedInstance = instance;
|
||||||
for(size_t i = 0; i < prop.size(); i++)
|
for(size_t i = 0; i < prop.size(); i++)
|
||||||
|
|||||||
@@ -224,9 +224,8 @@ void renderShape(const Enum::Shape::Value& shape, const Vector3& size, const Col
|
|||||||
glPopMatrix();
|
glPopMatrix();
|
||||||
/*Plusses, can possibly integrate into cylinder code later on*/
|
/*Plusses, can possibly integrate into cylinder code later on*/
|
||||||
glVertexPointer(2, GL_FLOAT,0, square_arr);
|
glVertexPointer(2, GL_FLOAT,0, square_arr);
|
||||||
glPushMatrix();
|
|
||||||
glDisable(GL_COLOR_ARRAY);
|
|
||||||
glColor3f(127,127,127);
|
glColor3f(127,127,127);
|
||||||
|
glPushMatrix();
|
||||||
glRotatef(90,0,1,0);
|
glRotatef(90,0,1,0);
|
||||||
glTranslatef(0,0,-(size.z+0.001F));
|
glTranslatef(0,0,-(size.z+0.001F));
|
||||||
glScalef(0.75,0.75,0.75);
|
glScalef(0.75,0.75,0.75);
|
||||||
@@ -234,11 +233,9 @@ void renderShape(const Enum::Shape::Value& shape, const Vector3& size, const Col
|
|||||||
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
|
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
|
||||||
glScalef(1/(size.x*8),size.x*8,1);
|
glScalef(1/(size.x*8),size.x*8,1);
|
||||||
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
|
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
|
||||||
glEnable(GL_COLOR_ARRAY);
|
|
||||||
glPopMatrix();
|
glPopMatrix();
|
||||||
|
|
||||||
glPushMatrix();
|
glPushMatrix();
|
||||||
glDisable(GL_COLOR_ARRAY);
|
|
||||||
glRotatef(-90,0,1,0);
|
glRotatef(-90,0,1,0);
|
||||||
glTranslatef(0,0,-(size.z+0.001F));
|
glTranslatef(0,0,-(size.z+0.001F));
|
||||||
glScalef(0.75,0.75,0.75);
|
glScalef(0.75,0.75,0.75);
|
||||||
@@ -246,7 +243,6 @@ void renderShape(const Enum::Shape::Value& shape, const Vector3& size, const Col
|
|||||||
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
|
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
|
||||||
glScalef(1/(size.x*8),size.x*8,1);
|
glScalef(1/(size.x*8),size.x*8,1);
|
||||||
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
|
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
|
||||||
glEnable(GL_COLOR_ARRAY);
|
|
||||||
glPopMatrix();
|
glPopMatrix();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -69,6 +69,30 @@ void ArrowTool::onKeyDown(int key)
|
|||||||
{
|
{
|
||||||
lctrlDown = true;
|
lctrlDown = true;
|
||||||
}
|
}
|
||||||
|
else if(key == 'R')
|
||||||
|
{
|
||||||
|
if(g_selectedInstances.size() > 0)
|
||||||
|
{
|
||||||
|
Instance* selectedInstance = g_selectedInstances.at(0);
|
||||||
|
AudioPlayer::playSound(clickSound);
|
||||||
|
if(PartInstance* part = dynamic_cast<PartInstance*>(selectedInstance))
|
||||||
|
{
|
||||||
|
part->setCFrame(part->getCFrame()*Matrix3::fromEulerAnglesXYZ(0,toRadians(90),0));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(key == 'T')
|
||||||
|
{
|
||||||
|
if(g_selectedInstances.size() > 0)
|
||||||
|
{
|
||||||
|
Instance* selectedInstance = g_selectedInstances.at(0);
|
||||||
|
AudioPlayer::playSound(clickSound);
|
||||||
|
if(PartInstance* part = dynamic_cast<PartInstance*>(selectedInstance))
|
||||||
|
{
|
||||||
|
part->setCFrame(part->getCFrame()*Matrix3::fromEulerAnglesXYZ(0,0,toRadians(90)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ArrowTool::onKeyUp(int key)
|
void ArrowTool::onKeyUp(int key)
|
||||||
|
|||||||
@@ -1,194 +0,0 @@
|
|||||||
#include "XplicitNgine/XplicitNgine.h"
|
|
||||||
#include "Globals.h"
|
|
||||||
|
|
||||||
#define SIDE (0.5f)
|
|
||||||
#define MASS (1.0)
|
|
||||||
|
|
||||||
// constraints
|
|
||||||
#define MAX_BODIES 65535
|
|
||||||
#define OBJ_DENSITY (5.0)
|
|
||||||
#define MAX_CONTACT_PER_BODY 4
|
|
||||||
|
|
||||||
XplicitNgine::XplicitNgine()
|
|
||||||
{
|
|
||||||
physWorld = dWorldCreate();
|
|
||||||
physSpace = dHashSpaceCreate(0);
|
|
||||||
contactgroup = dJointGroupCreate(0);
|
|
||||||
|
|
||||||
dWorldSetGravity(physWorld, 0, -0.5, 0);
|
|
||||||
|
|
||||||
this->name = "PhysicsService";
|
|
||||||
//dGeomID ground_geom = dCreatePlane(physSpace, 0, 1, 0, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
XplicitNgine::~XplicitNgine()
|
|
||||||
{
|
|
||||||
dJointGroupDestroy (contactgroup);
|
|
||||||
dSpaceDestroy (physSpace);
|
|
||||||
dWorldDestroy (physWorld);
|
|
||||||
dCloseODE();
|
|
||||||
}
|
|
||||||
|
|
||||||
void collisionCallback(void *data, dGeomID o1, dGeomID o2)
|
|
||||||
{
|
|
||||||
int i,n;
|
|
||||||
|
|
||||||
dBodyID b1 = dGeomGetBody(o1);
|
|
||||||
dBodyID b2 = dGeomGetBody(o2);
|
|
||||||
if (b1 && b2 && dAreConnected(b1, b2))
|
|
||||||
return;
|
|
||||||
|
|
||||||
const int N = 4;
|
|
||||||
dContact contact[N];
|
|
||||||
n = dCollide (o1,o2,N,&contact[0].geom,sizeof(dContact));
|
|
||||||
if (n > 0) {
|
|
||||||
for (i=0; i<n; i++) {
|
|
||||||
contact[i].surface.mode = dContactBounce | dContactSlip1 | dContactSlip2 | dContactSoftERP | dContactSoftCFM | dContactApprox1;
|
|
||||||
|
|
||||||
// Define contact surface properties
|
|
||||||
|
|
||||||
contact[i].surface.bounce = 0.5; //Elasticity
|
|
||||||
contact[i].surface.mu = 0.3F; //Friction
|
|
||||||
contact[i].surface.slip1 = 0.0;
|
|
||||||
contact[i].surface.slip2 = 0.0;
|
|
||||||
contact[i].surface.soft_erp = 0.8F;
|
|
||||||
contact[i].surface.soft_cfm = 0.01F;
|
|
||||||
|
|
||||||
// Create joints
|
|
||||||
dJointID c = dJointCreateContact(
|
|
||||||
g_xplicitNgine->physWorld,
|
|
||||||
g_xplicitNgine->contactgroup,
|
|
||||||
contact+i
|
|
||||||
);
|
|
||||||
|
|
||||||
dJointAttach (c,b1,b2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void XplicitNgine::deleteBody(PartInstance* partInstance)
|
|
||||||
{
|
|
||||||
if(partInstance->physBody != NULL)
|
|
||||||
{
|
|
||||||
while(dBodyGetNumJoints(partInstance->physBody) > 0) {
|
|
||||||
dJointDestroy(dBodyGetJoint(partInstance->physBody, 0));
|
|
||||||
}
|
|
||||||
dBodyDestroy(partInstance->physBody);
|
|
||||||
dGeomDestroy(partInstance->physGeom[0]);
|
|
||||||
partInstance->physBody = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void XplicitNgine::createBody(PartInstance* partInstance)
|
|
||||||
{
|
|
||||||
// calculate collisions
|
|
||||||
//dSpaceCollide (physSpace,0,&collisionCallback);
|
|
||||||
|
|
||||||
if(partInstance->physBody == NULL)
|
|
||||||
{
|
|
||||||
// init body
|
|
||||||
partInstance->physBody = dBodyCreate(physWorld);
|
|
||||||
|
|
||||||
// Create geom
|
|
||||||
if(partInstance->shape == Enum::Shape::Block)
|
|
||||||
{
|
|
||||||
partInstance->physGeom[0] = dCreateBox(physSpace,
|
|
||||||
partInstance->getSize()[0],
|
|
||||||
partInstance->getSize()[1],
|
|
||||||
partInstance->getSize()[2]
|
|
||||||
);
|
|
||||||
|
|
||||||
dVector3 result;
|
|
||||||
dGeomBoxGetLengths(partInstance->physGeom[0], result);
|
|
||||||
//printf("[XplicitNgine] Part Geom Size: %.1f, %.1f, %.1f\n",
|
|
||||||
// result[0],
|
|
||||||
// result[1],
|
|
||||||
// result[2]
|
|
||||||
//);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
partInstance->physGeom[0] = dCreateSphere(physSpace, partInstance->getSize()[0]/2);
|
|
||||||
}
|
|
||||||
|
|
||||||
dMass mass;
|
|
||||||
mass.setBox(partInstance->getSize().x, partInstance->getSize().y, partInstance->getSize().z, 0.7F);
|
|
||||||
dBodySetMass(partInstance->physBody, &mass);
|
|
||||||
|
|
||||||
// Debug output
|
|
||||||
|
|
||||||
|
|
||||||
// Create rigid body
|
|
||||||
//printf("[XplicitNgine] Created Geom for PartInstance\n");
|
|
||||||
dBodySetPosition(partInstance->physBody,
|
|
||||||
partInstance->getPosition()[0],
|
|
||||||
partInstance->getPosition()[1],
|
|
||||||
partInstance->getPosition()[2]
|
|
||||||
);
|
|
||||||
|
|
||||||
dGeomSetPosition(partInstance->physGeom[0],
|
|
||||||
partInstance->getPosition()[0],
|
|
||||||
partInstance->getPosition()[1],
|
|
||||||
partInstance->getPosition()[2]);
|
|
||||||
|
|
||||||
Matrix3 g3dRot = partInstance->getCFrame().rotation;
|
|
||||||
float rotation [12] = { g3dRot[0][0], g3dRot[0][1], g3dRot[0][2], 0,
|
|
||||||
g3dRot[1][0], g3dRot[1][1], g3dRot[1][2], 0,
|
|
||||||
g3dRot[2][0], g3dRot[2][1], g3dRot[2][2], 0};
|
|
||||||
|
|
||||||
dGeomSetRotation(partInstance->physGeom[0], rotation);
|
|
||||||
dBodySetRotation(partInstance->physBody, rotation);
|
|
||||||
|
|
||||||
//printf("[XplicitNgine] Created Body for PartInstance\n");
|
|
||||||
|
|
||||||
if(!partInstance->isAnchored())
|
|
||||||
dGeomSetBody(partInstance->physGeom[0], partInstance->physBody);
|
|
||||||
|
|
||||||
} else {
|
|
||||||
if(!partInstance->isAnchored())
|
|
||||||
{
|
|
||||||
const dReal* physPosition = dBodyGetPosition(partInstance->physBody);
|
|
||||||
|
|
||||||
// TODO: Rotation code
|
|
||||||
// Probably should be done AFTER we get physics KINDA working!!!
|
|
||||||
const dReal* physRotation = dGeomGetRotation(partInstance->physGeom[0]);
|
|
||||||
//partInstance->setPosition(Vector3(physPosition[0], physPosition[1], physPosition[2]));
|
|
||||||
partInstance->setCFrameNoSync(CoordinateFrame(
|
|
||||||
Matrix3(physRotation[0],physRotation[1],physRotation[2],
|
|
||||||
physRotation[4],physRotation[5],physRotation[6],
|
|
||||||
physRotation[8],physRotation[9],physRotation[10]),
|
|
||||||
Vector3(physPosition[0], physPosition[1], physPosition[2])));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//STEP SHOULD NOT BE HERE!
|
|
||||||
//dWorldQuickStep(physWorld, stepSize);
|
|
||||||
//dJointGroupEmpty(contactgroup);
|
|
||||||
}
|
|
||||||
|
|
||||||
void XplicitNgine::step(float stepSize)
|
|
||||||
{
|
|
||||||
dSpaceCollide (physSpace,0,&collisionCallback);
|
|
||||||
dWorldQuickStep(physWorld, stepSize);
|
|
||||||
dJointGroupEmpty(contactgroup);
|
|
||||||
}
|
|
||||||
|
|
||||||
void XplicitNgine::updateBody(PartInstance *partInstance, CoordinateFrame * cFrame)
|
|
||||||
{
|
|
||||||
if(partInstance->physBody != NULL)
|
|
||||||
{
|
|
||||||
Vector3 position = cFrame->translation;
|
|
||||||
|
|
||||||
dBodySetPosition(partInstance->physBody,
|
|
||||||
position[0],
|
|
||||||
position[1],
|
|
||||||
position[2]
|
|
||||||
);
|
|
||||||
|
|
||||||
Matrix3 g3dRot = cFrame->rotation;
|
|
||||||
float rotation [12] = { g3dRot[0][0], g3dRot[0][1], g3dRot[0][2], 0,
|
|
||||||
g3dRot[1][0], g3dRot[1][1], g3dRot[1][2], 0,
|
|
||||||
g3dRot[2][0], g3dRot[2][1], g3dRot[2][2], 0};
|
|
||||||
|
|
||||||
dBodySetRotation(partInstance->physBody, rotation);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,10 +1,6 @@
|
|||||||
// TODO: Move toolbar buttons with resized window.
|
// TODO: Move toolbar buttons with resized window.
|
||||||
#define _WIN32_WINNT 0x0400
|
#include "winver.h"
|
||||||
#define _WIN32_WINDOWS 0x0400
|
#include "../../resource.h"
|
||||||
#define WINVER 0x0400
|
|
||||||
#define _CRTBLD
|
|
||||||
|
|
||||||
#include "resource.h"
|
|
||||||
#include "Application.h"
|
#include "Application.h"
|
||||||
#include "WindowFunctions.h"
|
#include "WindowFunctions.h"
|
||||||
#include "ax.h"
|
#include "ax.h"
|
||||||
@@ -148,7 +144,12 @@ LRESULT CALLBACK G3DProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
|||||||
|
|
||||||
|
|
||||||
int main(int argc, char** argv) {
|
int main(int argc, char** argv) {
|
||||||
|
|
||||||
|
long double a = 1;
|
||||||
|
|
||||||
|
#ifndef IGNORE_CATCH
|
||||||
try{
|
try{
|
||||||
|
#endif
|
||||||
hresult = OleInitialize(NULL);
|
hresult = OleInitialize(NULL);
|
||||||
|
|
||||||
/* IInternetSecurityManager *pSecurityMgr;
|
/* IInternetSecurityManager *pSecurityMgr;
|
||||||
@@ -173,7 +174,7 @@ int main(int argc, char** argv) {
|
|||||||
|
|
||||||
icc.dwSize = sizeof(icc);
|
icc.dwSize = sizeof(icc);
|
||||||
icc.dwICC = ICC_WIN95_CLASSES/*|ICC_COOL_CLASSES|ICC_DATE_CLASSES|
|
icc.dwICC = ICC_WIN95_CLASSES/*|ICC_COOL_CLASSES|ICC_DATE_CLASSES|
|
||||||
ICC_PAGESCROLLER_CLASS|ICC_USEREX_CLASSES*/;
|
// ICC_PAGESCROLLER_CLASS|ICC_USEREX_CLASSES*/;
|
||||||
InitCommonControlsEx(&icc);
|
InitCommonControlsEx(&icc);
|
||||||
|
|
||||||
AudioPlayer::init();
|
AudioPlayer::init();
|
||||||
@@ -214,10 +215,12 @@ int main(int argc, char** argv) {
|
|||||||
Globals::mainHwnd = hwndMain;
|
Globals::mainHwnd = hwndMain;
|
||||||
Application app = Application(hwndMain);
|
Application app = Application(hwndMain);
|
||||||
app.run();
|
app.run();
|
||||||
|
#ifndef IGNORE_CATCH
|
||||||
}
|
}
|
||||||
catch(...)
|
catch(...)
|
||||||
{
|
{
|
||||||
OnError(-1);
|
OnError(-1);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,13 +31,12 @@
|
|||||||
|
|
||||||
//DWM 1.9: Suppress POCC Warning "Argument x to 'sscanf' does not match the format string;
|
//DWM 1.9: Suppress POCC Warning "Argument x to 'sscanf' does not match the format string;
|
||||||
// expected 'unsigned char *' but found 'unsigned long'"
|
// expected 'unsigned char *' but found 'unsigned long'"
|
||||||
|
#include "winver.h"
|
||||||
|
|
||||||
#ifdef __POCC__
|
#ifdef __POCC__
|
||||||
#pragma warn(disable:2234)
|
#pragma warn(disable:2234)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef _WIN32_WINNT // Necessary for WM_MOUSEWHEEL support
|
|
||||||
#define _WIN32_WINNT 0x0400
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// MSVC++ Support
|
// MSVC++ Support
|
||||||
#ifndef _CRT_SECURE_NO_WARNINGS
|
#ifndef _CRT_SECURE_NO_WARNINGS
|
||||||
|
|||||||
Reference in New Issue
Block a user