You can subscribe to this list here.
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(9) |
Jun
(7) |
Jul
(24) |
Aug
(4) |
Sep
(6) |
Oct
(6) |
Nov
(23) |
Dec
(62) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2009 |
Jan
(34) |
Feb
(33) |
Mar
(21) |
Apr
(13) |
May
(8) |
Jun
(15) |
Jul
(8) |
Aug
(10) |
Sep
(22) |
Oct
(3) |
Nov
(4) |
Dec
(15) |
2010 |
Jan
(7) |
Feb
(65) |
Mar
(30) |
Apr
(21) |
May
(15) |
Jun
(15) |
Jul
(25) |
Aug
(14) |
Sep
(11) |
Oct
|
Nov
(3) |
Dec
|
2011 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
(3) |
Jul
(2) |
Aug
(1) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
(1) |
From: <kal...@us...> - 2010-06-25 18:14:45
|
Revision: 2916 http://ogreaddons.svn.sourceforge.net/ogreaddons/?rev=2916&view=rev Author: kallaspriit Date: 2010-06-25 18:14:37 +0000 (Fri, 25 Jun 2010) Log Message: ----------- Added support for Ogre 1.7.1 and Visual Studio 2010. Modified Paths: -------------- branches/ogrenewt/newton20/OgreNewt.vcproj branches/ogrenewt/newton20/OgreNewt.vcxproj branches/ogrenewt/newton20/OgreNewt.vcxproj.filters branches/ogrenewt/newton20/demos/Demo01_TheBasics/Demo01_TheBasics.vcproj branches/ogrenewt/newton20/demos/Demo02_Joints/Demo02_Joints.vcproj branches/ogrenewt/newton20/demos/Demo03_CollisionCallbacks/Demo03_CollisionCallbacks.vcproj branches/ogrenewt/newton20/demos/Demo04_Raycasting/Demo04_Raycasting.vcproj branches/ogrenewt/newton20/demos/Demo04_Raycasting/OgreNewtonApplication.cpp branches/ogrenewt/newton20/demos/Demo04_Raycasting/OgreNewtonApplication.h branches/ogrenewt/newton20/demos/Demo04_Raycasting/OgreNewtonFrameListener.cpp branches/ogrenewt/newton20/demos/Demo04_Raycasting/OgreNewtonFrameListener.h branches/ogrenewt/newton20/demos/Demo05_SimpleVehicle/Demo05_SimpleVehicle.vcproj branches/ogrenewt/newton20/demos/Demo06_SimpleBuoyancy/Demo06_SimpleBuoyancy.vcproj branches/ogrenewt/newton20/demos/Demo06_SimpleBuoyancy/OgreNewtonApplication.cpp branches/ogrenewt/newton20/demos/Demo06_SimpleBuoyancy/OgreNewtonApplication.h branches/ogrenewt/newton20/demos/Demo06_SimpleBuoyancy/OgreNewtonFrameListener.cpp branches/ogrenewt/newton20/demos/Demo06_SimpleBuoyancy/OgreNewtonFrameListener.h branches/ogrenewt/newton20/demos/Demo07_CustomJoints/Demo07_CustomJoints.vcproj branches/ogrenewt/newton20/demos/Demo08_RagdollExample/Demo08_RagdollExample.vcproj branches/ogrenewt/newton20/demos/Demo09_PlayerController/Demo09_PlayerController.vcproj branches/ogrenewt/newton20/demos/Demo09_PlayerController/OgreNewtonApplication.cpp branches/ogrenewt/newton20/demos/Demo09_PlayerController/OgreNewtonApplication.h branches/ogrenewt/newton20/demos/Demo09_PlayerController/OgreNewtonFrameListener.cpp branches/ogrenewt/newton20/demos/Demo09_PlayerController/OgreNewtonFrameListener.h branches/ogrenewt/newton20/demos/MinimalOgreNewtApplication/MinimalOgreNewt.vcproj Added Paths: ----------- branches/ogrenewt/newton20/OgreNewt_VS10.sln branches/ogrenewt/newton20/OgreNewt_VS10.suo branches/ogrenewt/newton20/OgreNewt_VS9.sln branches/ogrenewt/newton20/OgreNewt_VS9.suo branches/ogrenewt/newton20/demos/Demo01_TheBasics/Demo01_TheBasics.vcxproj branches/ogrenewt/newton20/demos/Demo01_TheBasics/Demo01_TheBasics.vcxproj.filters branches/ogrenewt/newton20/demos/Demo02_Joints/Demo02_Joints.vcxproj branches/ogrenewt/newton20/demos/Demo02_Joints/Demo02_Joints.vcxproj.filters branches/ogrenewt/newton20/demos/Demo03_CollisionCallbacks/Demo03_CollisionCallbacks.vcxproj branches/ogrenewt/newton20/demos/Demo03_CollisionCallbacks/Demo03_CollisionCallbacks.vcxproj.filters branches/ogrenewt/newton20/demos/Demo04_Raycasting/Demo04_Raycasting.vcxproj branches/ogrenewt/newton20/demos/Demo04_Raycasting/Demo04_Raycasting.vcxproj.filters branches/ogrenewt/newton20/demos/Demo05_SimpleVehicle/Demo05_SimpleVehicle.vcxproj branches/ogrenewt/newton20/demos/Demo05_SimpleVehicle/Demo05_SimpleVehicle.vcxproj.filters branches/ogrenewt/newton20/demos/Demo06_SimpleBuoyancy/Demo06_SimpleBuoyancy.vcxproj branches/ogrenewt/newton20/demos/Demo06_SimpleBuoyancy/Demo06_SimpleBuoyancy.vcxproj.filters branches/ogrenewt/newton20/demos/Demo07_CustomJoints/Demo07_CustomJoints.vcxproj branches/ogrenewt/newton20/demos/Demo07_CustomJoints/Demo07_CustomJoints.vcxproj.filters branches/ogrenewt/newton20/demos/Demo09_PlayerController/Demo09_PlayerController.vcxproj branches/ogrenewt/newton20/demos/Demo09_PlayerController/Demo09_PlayerController.vcxproj.filters branches/ogrenewt/newton20/demos/MinimalOgreNewtApplication/MinimalOgreNewt.vcxproj branches/ogrenewt/newton20/demos/MinimalOgreNewtApplication/MinimalOgreNewt.vcxproj.filters Removed Paths: ------------- branches/ogrenewt/newton20/OgreNewt.sln branches/ogrenewt/newton20/OgreNewt.suo Property Changed: ---------------- branches/ogrenewt/newton20/ Property changes on: branches/ogrenewt/newton20 ___________________________________________________________________ Modified: svn:ignore - *.ncb *.user lib obj + *.ncb *.opensdf *.sdf *.user ipch lib obj Deleted: branches/ogrenewt/newton20/OgreNewt.sln =================================================================== --- branches/ogrenewt/newton20/OgreNewt.sln 2010-06-24 11:42:09 UTC (rev 2915) +++ branches/ogrenewt/newton20/OgreNewt.sln 2010-06-25 18:14:37 UTC (rev 2916) @@ -1,122 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OgreNewt", "OgreNewt.vcproj", "{C28C7710-76B1-4FFD-A85A-9AEFDA25EE64}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Demo02_Joints", "demos\Demo02_Joints\Demo02_Joints.vcproj", "{5BAB7340-BEDB-408A-96B1-296785399531}" - ProjectSection(ProjectDependencies) = postProject - {C28C7710-76B1-4FFD-A85A-9AEFDA25EE64} = {C28C7710-76B1-4FFD-A85A-9AEFDA25EE64} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Demo01_TheBasics", "demos\Demo01_TheBasics\Demo01_TheBasics.vcproj", "{59D5ADD4-9669-468E-B687-F461BB7F4112}" - ProjectSection(ProjectDependencies) = postProject - {C28C7710-76B1-4FFD-A85A-9AEFDA25EE64} = {C28C7710-76B1-4FFD-A85A-9AEFDA25EE64} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Demo03_CollisionCallbacks", "demos\Demo03_CollisionCallbacks\Demo03_CollisionCallbacks.vcproj", "{E575CBC2-5A60-45CC-B2F8-74E2719A8114}" - ProjectSection(ProjectDependencies) = postProject - {C28C7710-76B1-4FFD-A85A-9AEFDA25EE64} = {C28C7710-76B1-4FFD-A85A-9AEFDA25EE64} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Demo04_Raycasting", "demos\Demo04_Raycasting\Demo04_Raycasting.vcproj", "{8A31E25D-CC48-401E-9936-748453D06D3C}" - ProjectSection(ProjectDependencies) = postProject - {C28C7710-76B1-4FFD-A85A-9AEFDA25EE64} = {C28C7710-76B1-4FFD-A85A-9AEFDA25EE64} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Demo06_SimpleBuoyancy", "demos\Demo06_SimpleBuoyancy\Demo06_SimpleBuoyancy.vcproj", "{118B989E-1929-4173-99F5-B3C214879241}" - ProjectSection(ProjectDependencies) = postProject - {C28C7710-76B1-4FFD-A85A-9AEFDA25EE64} = {C28C7710-76B1-4FFD-A85A-9AEFDA25EE64} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Demo07_CustomJoints", "demos\Demo07_CustomJoints\Demo07_CustomJoints.vcproj", "{730565C2-A2C2-4D8B-89D4-ED062FD22B8C}" - ProjectSection(ProjectDependencies) = postProject - {C28C7710-76B1-4FFD-A85A-9AEFDA25EE64} = {C28C7710-76B1-4FFD-A85A-9AEFDA25EE64} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Demo09_PlayerController", "demos\Demo09_PlayerController\Demo09_PlayerController.vcproj", "{2C1C0690-C7DD-4800-9E3F-52E3C3FF7F33}" - ProjectSection(ProjectDependencies) = postProject - {C28C7710-76B1-4FFD-A85A-9AEFDA25EE64} = {C28C7710-76B1-4FFD-A85A-9AEFDA25EE64} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MinimalOgreNewt", "demos\MinimalOgreNewtApplication\MinimalOgreNewt.vcproj", "{44F65D14-7093-4B8F-BE0F-95D5D31CFBBC}" - ProjectSection(ProjectDependencies) = postProject - {C28C7710-76B1-4FFD-A85A-9AEFDA25EE64} = {C28C7710-76B1-4FFD-A85A-9AEFDA25EE64} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Demo05_SimpleVehicle", "demos\Demo05_SimpleVehicle\Demo05_SimpleVehicle.vcproj", "{0F61AA2F-57FC-409F-B697-E2300FF26473}" - ProjectSection(ProjectDependencies) = postProject - {C28C7710-76B1-4FFD-A85A-9AEFDA25EE64} = {C28C7710-76B1-4FFD-A85A-9AEFDA25EE64} - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {C28C7710-76B1-4FFD-A85A-9AEFDA25EE64}.Debug|Win32.ActiveCfg = Debug|Win32 - {C28C7710-76B1-4FFD-A85A-9AEFDA25EE64}.Debug|Win32.Build.0 = Debug|Win32 - {C28C7710-76B1-4FFD-A85A-9AEFDA25EE64}.Debug|x64.ActiveCfg = Debug|Win32 - {C28C7710-76B1-4FFD-A85A-9AEFDA25EE64}.Release|Win32.ActiveCfg = Release|Win32 - {C28C7710-76B1-4FFD-A85A-9AEFDA25EE64}.Release|Win32.Build.0 = Release|Win32 - {C28C7710-76B1-4FFD-A85A-9AEFDA25EE64}.Release|x64.ActiveCfg = Release|Win32 - {5BAB7340-BEDB-408A-96B1-296785399531}.Debug|Win32.ActiveCfg = Debug|Win32 - {5BAB7340-BEDB-408A-96B1-296785399531}.Debug|Win32.Build.0 = Debug|Win32 - {5BAB7340-BEDB-408A-96B1-296785399531}.Debug|x64.ActiveCfg = Debug|Win32 - {5BAB7340-BEDB-408A-96B1-296785399531}.Release|Win32.ActiveCfg = Release|Win32 - {5BAB7340-BEDB-408A-96B1-296785399531}.Release|Win32.Build.0 = Release|Win32 - {5BAB7340-BEDB-408A-96B1-296785399531}.Release|x64.ActiveCfg = Release|Win32 - {59D5ADD4-9669-468E-B687-F461BB7F4112}.Debug|Win32.ActiveCfg = Debug|Win32 - {59D5ADD4-9669-468E-B687-F461BB7F4112}.Debug|Win32.Build.0 = Debug|Win32 - {59D5ADD4-9669-468E-B687-F461BB7F4112}.Debug|x64.ActiveCfg = Debug|Win32 - {59D5ADD4-9669-468E-B687-F461BB7F4112}.Release|Win32.ActiveCfg = Release|Win32 - {59D5ADD4-9669-468E-B687-F461BB7F4112}.Release|Win32.Build.0 = Release|Win32 - {59D5ADD4-9669-468E-B687-F461BB7F4112}.Release|x64.ActiveCfg = Release|Win32 - {E575CBC2-5A60-45CC-B2F8-74E2719A8114}.Debug|Win32.ActiveCfg = Debug|Win32 - {E575CBC2-5A60-45CC-B2F8-74E2719A8114}.Debug|Win32.Build.0 = Debug|Win32 - {E575CBC2-5A60-45CC-B2F8-74E2719A8114}.Debug|x64.ActiveCfg = Debug|Win32 - {E575CBC2-5A60-45CC-B2F8-74E2719A8114}.Release|Win32.ActiveCfg = Release|Win32 - {E575CBC2-5A60-45CC-B2F8-74E2719A8114}.Release|Win32.Build.0 = Release|Win32 - {E575CBC2-5A60-45CC-B2F8-74E2719A8114}.Release|x64.ActiveCfg = Release|Win32 - {8A31E25D-CC48-401E-9936-748453D06D3C}.Debug|Win32.ActiveCfg = Debug|Win32 - {8A31E25D-CC48-401E-9936-748453D06D3C}.Debug|Win32.Build.0 = Debug|Win32 - {8A31E25D-CC48-401E-9936-748453D06D3C}.Debug|x64.ActiveCfg = Debug|Win32 - {8A31E25D-CC48-401E-9936-748453D06D3C}.Release|Win32.ActiveCfg = Release|Win32 - {8A31E25D-CC48-401E-9936-748453D06D3C}.Release|Win32.Build.0 = Release|Win32 - {8A31E25D-CC48-401E-9936-748453D06D3C}.Release|x64.ActiveCfg = Release|Win32 - {118B989E-1929-4173-99F5-B3C214879241}.Debug|Win32.ActiveCfg = Debug|Win32 - {118B989E-1929-4173-99F5-B3C214879241}.Debug|Win32.Build.0 = Debug|Win32 - {118B989E-1929-4173-99F5-B3C214879241}.Debug|x64.ActiveCfg = Debug|Win32 - {118B989E-1929-4173-99F5-B3C214879241}.Release|Win32.ActiveCfg = Release|Win32 - {118B989E-1929-4173-99F5-B3C214879241}.Release|Win32.Build.0 = Release|Win32 - {118B989E-1929-4173-99F5-B3C214879241}.Release|x64.ActiveCfg = Release|Win32 - {730565C2-A2C2-4D8B-89D4-ED062FD22B8C}.Debug|Win32.ActiveCfg = Debug|Win32 - {730565C2-A2C2-4D8B-89D4-ED062FD22B8C}.Debug|Win32.Build.0 = Debug|Win32 - {730565C2-A2C2-4D8B-89D4-ED062FD22B8C}.Debug|x64.ActiveCfg = Debug|Win32 - {730565C2-A2C2-4D8B-89D4-ED062FD22B8C}.Release|Win32.ActiveCfg = Release|Win32 - {730565C2-A2C2-4D8B-89D4-ED062FD22B8C}.Release|Win32.Build.0 = Release|Win32 - {730565C2-A2C2-4D8B-89D4-ED062FD22B8C}.Release|x64.ActiveCfg = Release|Win32 - {2C1C0690-C7DD-4800-9E3F-52E3C3FF7F33}.Debug|Win32.ActiveCfg = Debug|Win32 - {2C1C0690-C7DD-4800-9E3F-52E3C3FF7F33}.Debug|Win32.Build.0 = Debug|Win32 - {2C1C0690-C7DD-4800-9E3F-52E3C3FF7F33}.Debug|x64.ActiveCfg = Debug|Win32 - {2C1C0690-C7DD-4800-9E3F-52E3C3FF7F33}.Release|Win32.ActiveCfg = Release|Win32 - {2C1C0690-C7DD-4800-9E3F-52E3C3FF7F33}.Release|Win32.Build.0 = Release|Win32 - {2C1C0690-C7DD-4800-9E3F-52E3C3FF7F33}.Release|x64.ActiveCfg = Release|Win32 - {44F65D14-7093-4B8F-BE0F-95D5D31CFBBC}.Debug|Win32.ActiveCfg = Debug|Win32 - {44F65D14-7093-4B8F-BE0F-95D5D31CFBBC}.Debug|Win32.Build.0 = Debug|Win32 - {44F65D14-7093-4B8F-BE0F-95D5D31CFBBC}.Debug|x64.ActiveCfg = Debug|Win32 - {44F65D14-7093-4B8F-BE0F-95D5D31CFBBC}.Release|Win32.ActiveCfg = Release|Win32 - {44F65D14-7093-4B8F-BE0F-95D5D31CFBBC}.Release|Win32.Build.0 = Release|Win32 - {44F65D14-7093-4B8F-BE0F-95D5D31CFBBC}.Release|x64.ActiveCfg = Release|Win32 - {0F61AA2F-57FC-409F-B697-E2300FF26473}.Debug|Win32.ActiveCfg = Debug|Win32 - {0F61AA2F-57FC-409F-B697-E2300FF26473}.Debug|Win32.Build.0 = Debug|Win32 - {0F61AA2F-57FC-409F-B697-E2300FF26473}.Debug|x64.ActiveCfg = Debug|Win32 - {0F61AA2F-57FC-409F-B697-E2300FF26473}.Release|Win32.ActiveCfg = Release|Win32 - {0F61AA2F-57FC-409F-B697-E2300FF26473}.Release|Win32.Build.0 = Release|Win32 - {0F61AA2F-57FC-409F-B697-E2300FF26473}.Release|x64.ActiveCfg = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal Deleted: branches/ogrenewt/newton20/OgreNewt.suo =================================================================== (Binary files differ) Modified: branches/ogrenewt/newton20/OgreNewt.vcproj =================================================================== --- branches/ogrenewt/newton20/OgreNewt.vcproj 2010-06-24 11:42:09 UTC (rev 2915) +++ branches/ogrenewt/newton20/OgreNewt.vcproj 2010-06-25 18:14:37 UTC (rev 2916) @@ -52,7 +52,7 @@ /> <Tool Name="VCCLCompilerTool" - AdditionalIncludeDirectories=""$(NEWTON_HOME)\sdk";"$(NEWTON_HOME)\sdk\dMath";"$(NEWTON_HOME)\sdk\dCustomJoints";"$(OGRE_HOME)\include";"$(OGRE_HOME)\OgreMain\include";"$(BOOST_HOME)";.\inc" + AdditionalIncludeDirectories=""$(NEWTON_HOME)\sdk";"$(NEWTON_HOME)\sdk\dMath";"$(NEWTON_HOME)\sdk\dCustomJoints";"$(OGRE_HOME)\include";"$(OGRE_BUILD_HOME)\include";"$(OGRE_BUILD_HOME)\include";"$(OGRE_HOME)\OgreMain\include";"$(BOOST_HOME)";.\inc" PreprocessorDefinitions="_OGRENEWT_EXPORTS;_OGRENEWT_DYNAMIC;WIN32" ExceptionHandling="1" RuntimeLibrary="3" @@ -84,7 +84,7 @@ OutputFile="./lib/OgreNewt_d.dll" Version="2.0" LinkIncremental="1" - AdditionalLibraryDirectories=""$(OGRE_HOME)/lib";"$(BOOST_HOME)/libs";"$(NEWTON_HOME)/sdk/x32";"$(NEWTON_HOME)/sdk/x32/dll_vs9"" + AdditionalLibraryDirectories=""$(OGRE_HOME)/lib";"$(OGRE_BUILD_HOME)/lib/Debug";"$(BOOST_HOME)/libs";"$(NEWTON_HOME)/sdk/x32";"$(NEWTON_HOME)/sdk/x32/dll_vs9"" GenerateManifest="true" GenerateDebugInformation="true" ProgramDatabaseFile=".\lib\OgreNewt_d.pdb" @@ -154,7 +154,7 @@ AdditionalOptions=" /Zm1000" Optimization="2" InlineFunctionExpansion="2" - AdditionalIncludeDirectories=""$(NEWTON_HOME)\sdk";"$(NEWTON_HOME)\sdk\dMath";"$(NEWTON_HOME)\sdk\dCustomJoints";"$(OGRE_HOME)\include";"$(OGRE_HOME)\OgreMain\include";"$(BOOST_HOME)";.\inc" + AdditionalIncludeDirectories=""$(NEWTON_HOME)\sdk";"$(NEWTON_HOME)\sdk\dMath";"$(NEWTON_HOME)\sdk\dCustomJoints";"$(OGRE_HOME)\include";"$(OGRE_BUILD_HOME)\include";"$(OGRE_BUILD_HOME)\include";"$(OGRE_HOME)\OgreMain\include";"$(BOOST_HOME)";.\inc" PreprocessorDefinitions="_OGRENEWT_EXPORTS;_OGRENEWT_DYNAMIC;WIN32" ExceptionHandling="1" RuntimeLibrary="2" @@ -186,7 +186,7 @@ OutputFile="./lib/OgreNewt.dll" Version="2.0" LinkIncremental="1" - AdditionalLibraryDirectories=""$(OGRE_HOME)/lib";"$(BOOST_HOME)/libs";"$(NEWTON_HOME)/sdk/x32";"$(NEWTON_HOME)/sdk/x32/dll_vs9"" + AdditionalLibraryDirectories=""$(OGRE_HOME)/lib";"$(OGRE_BUILD_HOME)/lib/Release";"$(BOOST_HOME)/libs";"$(NEWTON_HOME)/sdk/x32";"$(NEWTON_HOME)/sdk/x32/dll_vs9"" GenerateManifest="true" IgnoreDefaultLibraryNames="LIBCMT" GenerateDebugInformation="true" Modified: branches/ogrenewt/newton20/OgreNewt.vcxproj =================================================================== --- branches/ogrenewt/newton20/OgreNewt.vcxproj 2010-06-24 11:42:09 UTC (rev 2915) +++ branches/ogrenewt/newton20/OgreNewt.vcxproj 2010-06-25 18:14:37 UTC (rev 2916) @@ -20,7 +20,6 @@ <ConfigurationType>DynamicLibrary</ConfigurationType> <UseOfMfc>false</UseOfMfc> <CharacterSet>MultiByte</CharacterSet> - <PlatformToolset>v90</PlatformToolset> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <ConfigurationType>DynamicLibrary</ConfigurationType> @@ -69,7 +68,7 @@ <ProxyFileName>%(Filename)_p.c</ProxyFileName> </Midl> <ClCompile> - <AdditionalIncludeDirectories>$(NEWTON_HOME)\sdk;$(NEWTON_HOME)\sdk\dMath;$(NEWTON_HOME)\sdk\dCustomJoints;$(OGRE_HOME)\include;$(OGRE_HOME)\OgreMain\include;$(BOOST_HOME);.\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>$(NEWTON_HOME)\sdk;$(NEWTON_HOME)\sdk\dMath;$(NEWTON_HOME)\sdk\dCustomJoints;$(OGRE_HOME)\include;$(OGRE_BUILD_HOME)\include;$(OGRE_BUILD_HOME)\include;$(OGRE_HOME)\OgreMain\include;$(BOOST_HOME);.\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>_OGRENEWT_EXPORTS;_OGRENEWT_DYNAMIC;WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions> <ExceptionHandling>Sync</ExceptionHandling> <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> @@ -82,7 +81,7 @@ <WarningLevel>Level3</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <CompileAs>CompileAsCpp</CompileAs> - <AdditionalOptions>/Zm1000 %(AdditionalOptions)</AdditionalOptions> + <AdditionalOptions>/Zm800 %(AdditionalOptions)</AdditionalOptions> </ClCompile> <ResourceCompile> <PreprocessorDefinitions>WIN32;_WINDOWS;CMAKE_INTDIR="Debug";_OGRENEWT_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> @@ -93,7 +92,7 @@ <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib;newton.lib;dMath_d.lib;JointLibrary_d.lib;OgreMain_d.lib</AdditionalDependencies> <OutputFile>./lib/OgreNewt_d.dll</OutputFile> <Version>2.0</Version> - <AdditionalLibraryDirectories>$(OGRE_HOME)/lib;$(BOOST_HOME)/libs;$(NEWTON_HOME)/sdk/x32;$(NEWTON_HOME)/sdk/x32/dll_vs9;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <AdditionalLibraryDirectories>$(OGRE_HOME)/lib;$(OGRE_BUILD_HOME)/lib/Debug;$(BOOST_HOME)/libs;$(NEWTON_HOME)/sdk/x32;$(NEWTON_HOME)/sdk/x32/dll_vs9;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <GenerateDebugInformation>true</GenerateDebugInformation> <ProgramDatabaseFile>.\lib\OgreNewt_d.pdb</ProgramDatabaseFile> <RandomizedBaseAddress>false</RandomizedBaseAddress> @@ -125,6 +124,16 @@ if exist "$(OGRE_HOME)\bin\debug\CEGUIExpatParser_d.dll" copy "$(OGRE_HOME)\bin\debug\CEGUIExpatParser_d.dll" demos\bin\Debug\CEGUIExpatParser_d.dll" if exist "$(OGRE_HOME)\bin\debug\cg.dll" copy "$(OGRE_HOME)\bin\debug\cg.dll" demos\bin\Debug\cg.dll" +if exist "$(OGRE_BUILD_HOME)\bin\debug\OgreMain_d.dll" copy "$(OGRE_BUILD_HOME)\bin\debug\OgreMain_d.dll" "demos\bin\Debug\OgreMain_d.dll" +if exist "$(OGRE_BUILD_HOME)\bin\debug\OIS_d.dll" copy "$(OGRE_BUILD_HOME)\bin\debug\OIS_d.dll" demos\bin\Debug\OIS_d.dll" +if exist "$(OGRE_BUILD_HOME)\bin\debug\Plugin_CgProgramManager_d.dll" copy "$(OGRE_BUILD_HOME)\bin\debug\Plugin_CgProgramManager_d.dll" demos\bin\Debug\Plugin_CgProgramManager_d.dll" +if exist "$(OGRE_BUILD_HOME)\bin\debug\RenderSystem_Direct3D9_d.dll" copy "$(OGRE_BUILD_HOME)\bin\debug\RenderSystem_Direct3D9_d.dll" demos\bin\Debug\RenderSystem_Direct3D9_d.dll" +if exist "$(OGRE_BUILD_HOME)\bin\debug\RenderSystem_GL_d.dll" copy "$(OGRE_BUILD_HOME)\bin\debug\RenderSystem_GL_d.dll" demos\bin\Debug\RenderSystem_GL_d.dll" +if exist "$(OGRE_BUILD_HOME)\bin\debug\OgreGUIRenderer_d.dll" copy "$(OGRE_BUILD_HOME)\bin\debug\OgreGUIRenderer_d.dll" demos\bin\Debug\OgreGUIRenderer_d.dll" +if exist "$(OGRE_BUILD_HOME)\bin\debug\CEGUIBase_d.dll" copy "$(OGRE_BUILD_HOME)\bin\debug\CEGUIBase_d.dll" demos\bin\Debug\CEGUIBase_d.dll" +if exist "$(OGRE_BUILD_HOME)\bin\debug\CEGUIExpatParser_d.dll" copy "$(OGRE_BUILD_HOME)\bin\debug\CEGUIExpatParser_d.dll" demos\bin\Debug\CEGUIExpatParser_d.dll" +if exist "$(OGRE_BUILD_HOME)\bin\debug\cg.dll" copy "$(OGRE_BUILD_HOME)\bin\debug\cg.dll" demos\bin\Debug\cg.dll" + copy $(NEWTON_HOME)\sdk\x32\dll_vs9\newton.dll demos\bin\Debug\newton.dll copy $(NEWTON_HOME)\sdk\x32\JointLibrary_d.dll demos\bin\Debug\JointLibrary_d.dll @@ -149,7 +158,7 @@ <AdditionalOptions> /Zm1000 %(AdditionalOptions)</AdditionalOptions> <Optimization>MaxSpeed</Optimization> <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion> - <AdditionalIncludeDirectories>$(NEWTON_HOME)\sdk;$(NEWTON_HOME)\sdk\dMath;$(NEWTON_HOME)\sdk\dCustomJoints;$(OGRE_HOME)\include;$(OGRE_HOME)\OgreMain\include;$(BOOST_HOME);.\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>$(NEWTON_HOME)\sdk;$(NEWTON_HOME)\sdk\dMath;$(NEWTON_HOME)\sdk\dCustomJoints;$(OGRE_HOME)\include;$(OGRE_BUILD_HOME)\include;$(OGRE_BUILD_HOME)\include;$(OGRE_HOME)\OgreMain\include;$(BOOST_HOME);.\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>_OGRENEWT_EXPORTS;_OGRENEWT_DYNAMIC;WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions> <ExceptionHandling>Sync</ExceptionHandling> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> @@ -172,7 +181,7 @@ <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib;newton.lib;dMath.lib;JointLibrary.lib;OgreMain.lib</AdditionalDependencies> <OutputFile>./lib/OgreNewt.dll</OutputFile> <Version>2.0</Version> - <AdditionalLibraryDirectories>$(OGRE_HOME)/lib;$(BOOST_HOME)/libs;$(NEWTON_HOME)/sdk/x32;$(NEWTON_HOME)/sdk/x32/dll_vs9;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <AdditionalLibraryDirectories>$(OGRE_HOME)/lib;$(OGRE_BUILD_HOME)/lib/Release;$(BOOST_HOME)/libs;$(NEWTON_HOME)/sdk/x32;$(NEWTON_HOME)/sdk/x32/dll_vs9;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <IgnoreSpecificDefaultLibraries>LIBCMT;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> <GenerateDebugInformation>true</GenerateDebugInformation> <ProgramDatabaseFile>lib\OgreNewt.pdb</ProgramDatabaseFile> @@ -204,6 +213,16 @@ if exist "$(OGRE_HOME)\bin\release\CEGUIExpatParser.dll" copy "$(OGRE_HOME)\bin\release\CEGUIExpatParser.dll" "demos\bin\Release\CEGUIExpatParser.dll" if exist "$(OGRE_HOME)\bin\release\cg.dll" copy "$(OGRE_HOME)\bin\release\cg.dll" "demos\bin\Release\cg.dll" +if exist "$(OGRE_BUILD_HOME)\bin\release\OgreMain.dll" copy "$(OGRE_BUILD_HOME)\bin\release\OgreMain.dll" "demos\bin\Release\OgreMain.dll" +if exist "$(OGRE_BUILD_HOME)\bin\release\OIS.dll" copy "$(OGRE_BUILD_HOME)\bin\release\OIS.dll" "demos\bin\Release\OIS.dll" +if exist "$(OGRE_BUILD_HOME)\bin\release\Plugin_CgProgramManager.dll" copy "$(OGRE_BUILD_HOME)\bin\release\Plugin_CgProgramManager.dll" "demos\bin\Release\Plugin_CgProgramManager.dll" +if exist "$(OGRE_BUILD_HOME)\bin\release\RenderSystem_Direct3D9.dll" copy "$(OGRE_BUILD_HOME)\bin\release\RenderSystem_Direct3D9.dll" "demos\bin\Release\RenderSystem_Direct3D9.dll" +if exist "$(OGRE_BUILD_HOME)\bin\release\RenderSystem_GL.dll" copy "$(OGRE_BUILD_HOME)\bin\release\RenderSystem_GL.dll" "demos\bin\Release\RenderSystem_GL.dll" +if exist "$(OGRE_BUILD_HOME)\bin\release\OgreGUIRenderer.dll" copy "$(OGRE_BUILD_HOME)\bin\release\OgreGUIRenderer.dll" "demos\bin\Release\OgreGUIRenderer.dll" +if exist "$(OGRE_BUILD_HOME)\bin\release\CEGUIBase.dll" copy "$(OGRE_BUILD_HOME)\bin\release\CEGUIBase.dll" "demos\bin\Release\CEGUIBase.dll" +if exist "$(OGRE_BUILD_HOME)\bin\release\CEGUIExpatParser.dll" copy "$(OGRE_BUILD_HOME)\bin\release\CEGUIExpatParser.dll" "demos\bin\Release\CEGUIExpatParser.dll" +if exist "$(OGRE_BUILD_HOME)\bin\release\cg.dll" copy "$(OGRE_BUILD_HOME)\bin\release\cg.dll" "demos\bin\Release\cg.dll" + copy $(NEWTON_HOME)\sdk\x32\dll_vs9\newton.dll demos\bin\Release\newton.dll copy $(NEWTON_HOME)\sdk\x32\JointLibrary.dll demos\bin\Release\JointLibrary.dll </Command> Modified: branches/ogrenewt/newton20/OgreNewt.vcxproj.filters =================================================================== --- branches/ogrenewt/newton20/OgreNewt.vcxproj.filters 2010-06-24 11:42:09 UTC (rev 2915) +++ branches/ogrenewt/newton20/OgreNewt.vcxproj.filters 2010-06-25 18:14:37 UTC (rev 2916) @@ -2,10 +2,10 @@ <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup> <Filter Include="Source Files"> - <UniqueIdentifier>{c6ecb8b4-cc8e-43df-8782-5a983259e6c9}</UniqueIdentifier> + <UniqueIdentifier>{2e83a172-fd17-4256-b134-036e8a98dd05}</UniqueIdentifier> </Filter> <Filter Include="Header Files"> - <UniqueIdentifier>{e0f46e76-7210-4d83-8fd2-79b2f32bead0}</UniqueIdentifier> + <UniqueIdentifier>{f65b9980-c3a9-433f-9f43-6f74ab650344}</UniqueIdentifier> </Filter> </ItemGroup> <ItemGroup> Added: branches/ogrenewt/newton20/OgreNewt_VS10.sln =================================================================== --- branches/ogrenewt/newton20/OgreNewt_VS10.sln (rev 0) +++ branches/ogrenewt/newton20/OgreNewt_VS10.sln 2010-06-25 18:14:37 UTC (rev 2916) @@ -0,0 +1,95 @@ +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OgreNewt", "OgreNewt.vcxproj", "{C28C7710-76B1-4FFD-A85A-9AEFDA25EE64}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Demo02_Joints", "demos\Demo02_Joints\Demo02_Joints.vcxproj", "{5BAB7340-BEDB-408A-96B1-296785399531}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Demo01_TheBasics", "demos\Demo01_TheBasics\Demo01_TheBasics.vcxproj", "{59D5ADD4-9669-468E-B687-F461BB7F4112}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Demo03_CollisionCallbacks", "demos\Demo03_CollisionCallbacks\Demo03_CollisionCallbacks.vcxproj", "{E575CBC2-5A60-45CC-B2F8-74E2719A8114}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Demo04_Raycasting", "demos\Demo04_Raycasting\Demo04_Raycasting.vcxproj", "{8A31E25D-CC48-401E-9936-748453D06D3C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Demo06_SimpleBuoyancy", "demos\Demo06_SimpleBuoyancy\Demo06_SimpleBuoyancy.vcxproj", "{118B989E-1929-4173-99F5-B3C214879241}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Demo07_CustomJoints", "demos\Demo07_CustomJoints\Demo07_CustomJoints.vcxproj", "{730565C2-A2C2-4D8B-89D4-ED062FD22B8C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Demo09_PlayerController", "demos\Demo09_PlayerController\Demo09_PlayerController.vcxproj", "{2C1C0690-C7DD-4800-9E3F-52E3C3FF7F33}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MinimalOgreNewt", "demos\MinimalOgreNewtApplication\MinimalOgreNewt.vcxproj", "{44F65D14-7093-4B8F-BE0F-95D5D31CFBBC}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Demo05_SimpleVehicle", "demos\Demo05_SimpleVehicle\Demo05_SimpleVehicle.vcxproj", "{0F61AA2F-57FC-409F-B697-E2300FF26473}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C28C7710-76B1-4FFD-A85A-9AEFDA25EE64}.Debug|Win32.ActiveCfg = Debug|Win32 + {C28C7710-76B1-4FFD-A85A-9AEFDA25EE64}.Debug|Win32.Build.0 = Debug|Win32 + {C28C7710-76B1-4FFD-A85A-9AEFDA25EE64}.Debug|x64.ActiveCfg = Debug|Win32 + {C28C7710-76B1-4FFD-A85A-9AEFDA25EE64}.Release|Win32.ActiveCfg = Release|Win32 + {C28C7710-76B1-4FFD-A85A-9AEFDA25EE64}.Release|Win32.Build.0 = Release|Win32 + {C28C7710-76B1-4FFD-A85A-9AEFDA25EE64}.Release|x64.ActiveCfg = Release|Win32 + {5BAB7340-BEDB-408A-96B1-296785399531}.Debug|Win32.ActiveCfg = Debug|Win32 + {5BAB7340-BEDB-408A-96B1-296785399531}.Debug|Win32.Build.0 = Debug|Win32 + {5BAB7340-BEDB-408A-96B1-296785399531}.Debug|x64.ActiveCfg = Debug|Win32 + {5BAB7340-BEDB-408A-96B1-296785399531}.Release|Win32.ActiveCfg = Release|Win32 + {5BAB7340-BEDB-408A-96B1-296785399531}.Release|Win32.Build.0 = Release|Win32 + {5BAB7340-BEDB-408A-96B1-296785399531}.Release|x64.ActiveCfg = Release|Win32 + {59D5ADD4-9669-468E-B687-F461BB7F4112}.Debug|Win32.ActiveCfg = Debug|Win32 + {59D5ADD4-9669-468E-B687-F461BB7F4112}.Debug|Win32.Build.0 = Debug|Win32 + {59D5ADD4-9669-468E-B687-F461BB7F4112}.Debug|x64.ActiveCfg = Debug|Win32 + {59D5ADD4-9669-468E-B687-F461BB7F4112}.Release|Win32.ActiveCfg = Release|Win32 + {59D5ADD4-9669-468E-B687-F461BB7F4112}.Release|Win32.Build.0 = Release|Win32 + {59D5ADD4-9669-468E-B687-F461BB7F4112}.Release|x64.ActiveCfg = Release|Win32 + {E575CBC2-5A60-45CC-B2F8-74E2719A8114}.Debug|Win32.ActiveCfg = Debug|Win32 + {E575CBC2-5A60-45CC-B2F8-74E2719A8114}.Debug|Win32.Build.0 = Debug|Win32 + {E575CBC2-5A60-45CC-B2F8-74E2719A8114}.Debug|x64.ActiveCfg = Debug|Win32 + {E575CBC2-5A60-45CC-B2F8-74E2719A8114}.Release|Win32.ActiveCfg = Release|Win32 + {E575CBC2-5A60-45CC-B2F8-74E2719A8114}.Release|Win32.Build.0 = Release|Win32 + {E575CBC2-5A60-45CC-B2F8-74E2719A8114}.Release|x64.ActiveCfg = Release|Win32 + {8A31E25D-CC48-401E-9936-748453D06D3C}.Debug|Win32.ActiveCfg = Debug|Win32 + {8A31E25D-CC48-401E-9936-748453D06D3C}.Debug|Win32.Build.0 = Debug|Win32 + {8A31E25D-CC48-401E-9936-748453D06D3C}.Debug|x64.ActiveCfg = Debug|Win32 + {8A31E25D-CC48-401E-9936-748453D06D3C}.Release|Win32.ActiveCfg = Release|Win32 + {8A31E25D-CC48-401E-9936-748453D06D3C}.Release|Win32.Build.0 = Release|Win32 + {8A31E25D-CC48-401E-9936-748453D06D3C}.Release|x64.ActiveCfg = Release|Win32 + {118B989E-1929-4173-99F5-B3C214879241}.Debug|Win32.ActiveCfg = Debug|Win32 + {118B989E-1929-4173-99F5-B3C214879241}.Debug|Win32.Build.0 = Debug|Win32 + {118B989E-1929-4173-99F5-B3C214879241}.Debug|x64.ActiveCfg = Debug|Win32 + {118B989E-1929-4173-99F5-B3C214879241}.Release|Win32.ActiveCfg = Release|Win32 + {118B989E-1929-4173-99F5-B3C214879241}.Release|Win32.Build.0 = Release|Win32 + {118B989E-1929-4173-99F5-B3C214879241}.Release|x64.ActiveCfg = Release|Win32 + {730565C2-A2C2-4D8B-89D4-ED062FD22B8C}.Debug|Win32.ActiveCfg = Debug|Win32 + {730565C2-A2C2-4D8B-89D4-ED062FD22B8C}.Debug|Win32.Build.0 = Debug|Win32 + {730565C2-A2C2-4D8B-89D4-ED062FD22B8C}.Debug|x64.ActiveCfg = Debug|Win32 + {730565C2-A2C2-4D8B-89D4-ED062FD22B8C}.Release|Win32.ActiveCfg = Release|Win32 + {730565C2-A2C2-4D8B-89D4-ED062FD22B8C}.Release|Win32.Build.0 = Release|Win32 + {730565C2-A2C2-4D8B-89D4-ED062FD22B8C}.Release|x64.ActiveCfg = Release|Win32 + {2C1C0690-C7DD-4800-9E3F-52E3C3FF7F33}.Debug|Win32.ActiveCfg = Debug|Win32 + {2C1C0690-C7DD-4800-9E3F-52E3C3FF7F33}.Debug|Win32.Build.0 = Debug|Win32 + {2C1C0690-C7DD-4800-9E3F-52E3C3FF7F33}.Debug|x64.ActiveCfg = Debug|Win32 + {2C1C0690-C7DD-4800-9E3F-52E3C3FF7F33}.Release|Win32.ActiveCfg = Release|Win32 + {2C1C0690-C7DD-4800-9E3F-52E3C3FF7F33}.Release|Win32.Build.0 = Release|Win32 + {2C1C0690-C7DD-4800-9E3F-52E3C3FF7F33}.Release|x64.ActiveCfg = Release|Win32 + {44F65D14-7093-4B8F-BE0F-95D5D31CFBBC}.Debug|Win32.ActiveCfg = Debug|Win32 + {44F65D14-7093-4B8F-BE0F-95D5D31CFBBC}.Debug|Win32.Build.0 = Debug|Win32 + {44F65D14-7093-4B8F-BE0F-95D5D31CFBBC}.Debug|x64.ActiveCfg = Debug|Win32 + {44F65D14-7093-4B8F-BE0F-95D5D31CFBBC}.Release|Win32.ActiveCfg = Release|Win32 + {44F65D14-7093-4B8F-BE0F-95D5D31CFBBC}.Release|Win32.Build.0 = Release|Win32 + {44F65D14-7093-4B8F-BE0F-95D5D31CFBBC}.Release|x64.ActiveCfg = Release|Win32 + {0F61AA2F-57FC-409F-B697-E2300FF26473}.Debug|Win32.ActiveCfg = Debug|Win32 + {0F61AA2F-57FC-409F-B697-E2300FF26473}.Debug|Win32.Build.0 = Debug|Win32 + {0F61AA2F-57FC-409F-B697-E2300FF26473}.Debug|x64.ActiveCfg = Debug|Win32 + {0F61AA2F-57FC-409F-B697-E2300FF26473}.Release|Win32.ActiveCfg = Release|Win32 + {0F61AA2F-57FC-409F-B697-E2300FF26473}.Release|Win32.Build.0 = Release|Win32 + {0F61AA2F-57FC-409F-B697-E2300FF26473}.Release|x64.ActiveCfg = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal Added: branches/ogrenewt/newton20/OgreNewt_VS10.suo =================================================================== (Binary files differ) Property changes on: branches/ogrenewt/newton20/OgreNewt_VS10.suo ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: branches/ogrenewt/newton20/OgreNewt_VS9.sln =================================================================== --- branches/ogrenewt/newton20/OgreNewt_VS9.sln (rev 0) +++ branches/ogrenewt/newton20/OgreNewt_VS9.sln 2010-06-25 18:14:37 UTC (rev 2916) @@ -0,0 +1,122 @@ +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OgreNewt", "OgreNewt.vcproj", "{C28C7710-76B1-4FFD-A85A-9AEFDA25EE64}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Demo02_Joints", "demos\Demo02_Joints\Demo02_Joints.vcproj", "{5BAB7340-BEDB-408A-96B1-296785399531}" + ProjectSection(ProjectDependencies) = postProject + {C28C7710-76B1-4FFD-A85A-9AEFDA25EE64} = {C28C7710-76B1-4FFD-A85A-9AEFDA25EE64} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Demo01_TheBasics", "demos\Demo01_TheBasics\Demo01_TheBasics.vcproj", "{59D5ADD4-9669-468E-B687-F461BB7F4112}" + ProjectSection(ProjectDependencies) = postProject + {C28C7710-76B1-4FFD-A85A-9AEFDA25EE64} = {C28C7710-76B1-4FFD-A85A-9AEFDA25EE64} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Demo03_CollisionCallbacks", "demos\Demo03_CollisionCallbacks\Demo03_CollisionCallbacks.vcproj", "{E575CBC2-5A60-45CC-B2F8-74E2719A8114}" + ProjectSection(ProjectDependencies) = postProject + {C28C7710-76B1-4FFD-A85A-9AEFDA25EE64} = {C28C7710-76B1-4FFD-A85A-9AEFDA25EE64} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Demo04_Raycasting", "demos\Demo04_Raycasting\Demo04_Raycasting.vcproj", "{8A31E25D-CC48-401E-9936-748453D06D3C}" + ProjectSection(ProjectDependencies) = postProject + {C28C7710-76B1-4FFD-A85A-9AEFDA25EE64} = {C28C7710-76B1-4FFD-A85A-9AEFDA25EE64} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Demo06_SimpleBuoyancy", "demos\Demo06_SimpleBuoyancy\Demo06_SimpleBuoyancy.vcproj", "{118B989E-1929-4173-99F5-B3C214879241}" + ProjectSection(ProjectDependencies) = postProject + {C28C7710-76B1-4FFD-A85A-9AEFDA25EE64} = {C28C7710-76B1-4FFD-A85A-9AEFDA25EE64} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Demo07_CustomJoints", "demos\Demo07_CustomJoints\Demo07_CustomJoints.vcproj", "{730565C2-A2C2-4D8B-89D4-ED062FD22B8C}" + ProjectSection(ProjectDependencies) = postProject + {C28C7710-76B1-4FFD-A85A-9AEFDA25EE64} = {C28C7710-76B1-4FFD-A85A-9AEFDA25EE64} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Demo09_PlayerController", "demos\Demo09_PlayerController\Demo09_PlayerController.vcproj", "{2C1C0690-C7DD-4800-9E3F-52E3C3FF7F33}" + ProjectSection(ProjectDependencies) = postProject + {C28C7710-76B1-4FFD-A85A-9AEFDA25EE64} = {C28C7710-76B1-4FFD-A85A-9AEFDA25EE64} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MinimalOgreNewt", "demos\MinimalOgreNewtApplication\MinimalOgreNewt.vcproj", "{44F65D14-7093-4B8F-BE0F-95D5D31CFBBC}" + ProjectSection(ProjectDependencies) = postProject + {C28C7710-76B1-4FFD-A85A-9AEFDA25EE64} = {C28C7710-76B1-4FFD-A85A-9AEFDA25EE64} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Demo05_SimpleVehicle", "demos\Demo05_SimpleVehicle\Demo05_SimpleVehicle.vcproj", "{0F61AA2F-57FC-409F-B697-E2300FF26473}" + ProjectSection(ProjectDependencies) = postProject + {C28C7710-76B1-4FFD-A85A-9AEFDA25EE64} = {C28C7710-76B1-4FFD-A85A-9AEFDA25EE64} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C28C7710-76B1-4FFD-A85A-9AEFDA25EE64}.Debug|Win32.ActiveCfg = Debug|Win32 + {C28C7710-76B1-4FFD-A85A-9AEFDA25EE64}.Debug|Win32.Build.0 = Debug|Win32 + {C28C7710-76B1-4FFD-A85A-9AEFDA25EE64}.Debug|x64.ActiveCfg = Debug|Win32 + {C28C7710-76B1-4FFD-A85A-9AEFDA25EE64}.Release|Win32.ActiveCfg = Release|Win32 + {C28C7710-76B1-4FFD-A85A-9AEFDA25EE64}.Release|Win32.Build.0 = Release|Win32 + {C28C7710-76B1-4FFD-A85A-9AEFDA25EE64}.Release|x64.ActiveCfg = Release|Win32 + {5BAB7340-BEDB-408A-96B1-296785399531}.Debug|Win32.ActiveCfg = Debug|Win32 + {5BAB7340-BEDB-408A-96B1-296785399531}.Debug|Win32.Build.0 = Debug|Win32 + {5BAB7340-BEDB-408A-96B1-296785399531}.Debug|x64.ActiveCfg = Debug|Win32 + {5BAB7340-BEDB-408A-96B1-296785399531}.Release|Win32.ActiveCfg = Release|Win32 + {5BAB7340-BEDB-408A-96B1-296785399531}.Release|Win32.Build.0 = Release|Win32 + {5BAB7340-BEDB-408A-96B1-296785399531}.Release|x64.ActiveCfg = Release|Win32 + {59D5ADD4-9669-468E-B687-F461BB7F4112}.Debug|Win32.ActiveCfg = Debug|Win32 + {59D5ADD4-9669-468E-B687-F461BB7F4112}.Debug|Win32.Build.0 = Debug|Win32 + {59D5ADD4-9669-468E-B687-F461BB7F4112}.Debug|x64.ActiveCfg = Debug|Win32 + {59D5ADD4-9669-468E-B687-F461BB7F4112}.Release|Win32.ActiveCfg = Release|Win32 + {59D5ADD4-9669-468E-B687-F461BB7F4112}.Release|Win32.Build.0 = Release|Win32 + {59D5ADD4-9669-468E-B687-F461BB7F4112}.Release|x64.ActiveCfg = Release|Win32 + {E575CBC2-5A60-45CC-B2F8-74E2719A8114}.Debug|Win32.ActiveCfg = Debug|Win32 + {E575CBC2-5A60-45CC-B2F8-74E2719A8114}.Debug|Win32.Build.0 = Debug|Win32 + {E575CBC2-5A60-45CC-B2F8-74E2719A8114}.Debug|x64.ActiveCfg = Debug|Win32 + {E575CBC2-5A60-45CC-B2F8-74E2719A8114}.Release|Win32.ActiveCfg = Release|Win32 + {E575CBC2-5A60-45CC-B2F8-74E2719A8114}.Release|Win32.Build.0 = Release|Win32 + {E575CBC2-5A60-45CC-B2F8-74E2719A8114}.Release|x64.ActiveCfg = Release|Win32 + {8A31E25D-CC48-401E-9936-748453D06D3C}.Debug|Win32.ActiveCfg = Debug|Win32 + {8A31E25D-CC48-401E-9936-748453D06D3C}.Debug|Win32.Build.0 = Debug|Win32 + {8A31E25D-CC48-401E-9936-748453D06D3C}.Debug|x64.ActiveCfg = Debug|Win32 + {8A31E25D-CC48-401E-9936-748453D06D3C}.Release|Win32.ActiveCfg = Release|Win32 + {8A31E25D-CC48-401E-9936-748453D06D3C}.Release|Win32.Build.0 = Release|Win32 + {8A31E25D-CC48-401E-9936-748453D06D3C}.Release|x64.ActiveCfg = Release|Win32 + {118B989E-1929-4173-99F5-B3C214879241}.Debug|Win32.ActiveCfg = Debug|Win32 + {118B989E-1929-4173-99F5-B3C214879241}.Debug|Win32.Build.0 = Debug|Win32 + {118B989E-1929-4173-99F5-B3C214879241}.Debug|x64.ActiveCfg = Debug|Win32 + {118B989E-1929-4173-99F5-B3C214879241}.Release|Win32.ActiveCfg = Release|Win32 + {118B989E-1929-4173-99F5-B3C214879241}.Release|Win32.Build.0 = Release|Win32 + {118B989E-1929-4173-99F5-B3C214879241}.Release|x64.ActiveCfg = Release|Win32 + {730565C2-A2C2-4D8B-89D4-ED062FD22B8C}.Debug|Win32.ActiveCfg = Debug|Win32 + {730565C2-A2C2-4D8B-89D4-ED062FD22B8C}.Debug|Win32.Build.0 = Debug|Win32 + {730565C2-A2C2-4D8B-89D4-ED062FD22B8C}.Debug|x64.ActiveCfg = Debug|Win32 + {730565C2-A2C2-4D8B-89D4-ED062FD22B8C}.Release|Win32.ActiveCfg = Release|Win32 + {730565C2-A2C2-4D8B-89D4-ED062FD22B8C}.Release|Win32.Build.0 = Release|Win32 + {730565C2-A2C2-4D8B-89D4-ED062FD22B8C}.Release|x64.ActiveCfg = Release|Win32 + {2C1C0690-C7DD-4800-9E3F-52E3C3FF7F33}.Debug|Win32.ActiveCfg = Debug|Win32 + {2C1C0690-C7DD-4800-9E3F-52E3C3FF7F33}.Debug|Win32.Build.0 = Debug|Win32 + {2C1C0690-C7DD-4800-9E3F-52E3C3FF7F33}.Debug|x64.ActiveCfg = Debug|Win32 + {2C1C0690-C7DD-4800-9E3F-52E3C3FF7F33}.Release|Win32.ActiveCfg = Release|Win32 + {2C1C0690-C7DD-4800-9E3F-52E3C3FF7F33}.Release|Win32.Build.0 = Release|Win32 + {2C1C0690-C7DD-4800-9E3F-52E3C3FF7F33}.Release|x64.ActiveCfg = Release|Win32 + {44F65D14-7093-4B8F-BE0F-95D5D31CFBBC}.Debug|Win32.ActiveCfg = Debug|Win32 + {44F65D14-7093-4B8F-BE0F-95D5D31CFBBC}.Debug|Win32.Build.0 = Debug|Win32 + {44F65D14-7093-4B8F-BE0F-95D5D31CFBBC}.Debug|x64.ActiveCfg = Debug|Win32 + {44F65D14-7093-4B8F-BE0F-95D5D31CFBBC}.Release|Win32.ActiveCfg = Release|Win32 + {44F65D14-7093-4B8F-BE0F-95D5D31CFBBC}.Release|Win32.Build.0 = Release|Win32 + {44F65D14-7093-4B8F-BE0F-95D5D31CFBBC}.Release|x64.ActiveCfg = Release|Win32 + {0F61AA2F-57FC-409F-B697-E2300FF26473}.Debug|Win32.ActiveCfg = Debug|Win32 + {0F61AA2F-57FC-409F-B697-E2300FF26473}.Debug|Win32.Build.0 = Debug|Win32 + {0F61AA2F-57FC-409F-B697-E2300FF26473}.Debug|x64.ActiveCfg = Debug|Win32 + {0F61AA2F-57FC-409F-B697-E2300FF26473}.Release|Win32.ActiveCfg = Release|Win32 + {0F61AA2F-57FC-409F-B697-E2300FF26473}.Release|Win32.Build.0 = Release|Win32 + {0F61AA2F-57FC-409F-B697-E2300FF26473}.Release|x64.ActiveCfg = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal Added: branches/ogrenewt/newton20/OgreNewt_VS9.suo =================================================================== (Binary files differ) Property changes on: branches/ogrenewt/newton20/OgreNewt_VS9.suo ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: branches/ogrenewt/newton20/demos/Demo01_TheBasics/Demo01_TheBasics.vcproj =================================================================== --- branches/ogrenewt/newton20/demos/Demo01_TheBasics/Demo01_TheBasics.vcproj 2010-06-24 11:42:09 UTC (rev 2915) +++ branches/ogrenewt/newton20/demos/Demo01_TheBasics/Demo01_TheBasics.vcproj 2010-06-25 18:14:37 UTC (rev 2916) @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="windows-1257"?> <VisualStudioProject ProjectType="Visual C++" - Version="9,00" + Version="9.00" Name="Demo01_TheBasics" ProjectGUID="{59D5ADD4-9669-468E-B687-F461BB7F4112}" RootNamespace="Demo01_TheBasics" @@ -41,7 +41,7 @@ <Tool Name="VCCLCompilerTool" Optimization="0" - AdditionalIncludeDirectories=""$(NEWTON_HOME)\sdk";"$(BOOST_HOME)\";"$(OGRE_HOME)\OgreMain\include";"$(OGRE_HOME)\include";"$(OGRE_HOME)\Samples\Common\CEGUIRenderer\include";"$(OGRE_HOME)\Samples\Common\include";"$(OGRE_HOME)\samples\include";"$(OGRE_HOME)\Dependencies\include";"$(OGRE_HOME)\Dependencies\include\ois";"$(OGRE_HOME)\Dependencies\include\CEGUI";"$(OGRE_HOME)\include\OIS";..\..\inc;." + AdditionalIncludeDirectories="..\..\inc;"$(BOOST_HOME)\";"$(NEWTON_HOME)\sdk";"$(OGRE_HOME)\include";"$(OGRE_HOME)\include\OGRE"" PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS" MinimalRebuild="true" BasicRuntimeChecks="3" @@ -63,7 +63,7 @@ Name="VCLinkerTool" AdditionalDependencies="newton.lib OgreMain_d.lib OIS_d.lib OgreNewt_d.lib" LinkIncremental="1" - AdditionalLibraryDirectories="..\..\lib;"$(OGRE_HOME)\lib";"$(OGRE_HOME)\Dependencies\lib\Debug";"$(NEWTON_HOME)\sdk\x32\dll_vs9"" + AdditionalLibraryDirectories="..\..\lib;"$(BOOST_HOME)\lib";"$(NEWTON_HOME)\sdk\x32\dll_vs9";"$(OGRE_HOME)\lib\debug"" GenerateDebugInformation="true" SubSystem="2" TargetMachine="1" Added: branches/ogrenewt/newton20/demos/Demo01_TheBasics/Demo01_TheBasics.vcxproj =================================================================== --- branches/ogrenewt/newton20/demos/Demo01_TheBasics/Demo01_TheBasics.vcxproj (rev 0) +++ branches/ogrenewt/newton20/demos/Demo01_TheBasics/Demo01_TheBasics.vcxproj 2010-06-25 18:14:37 UTC (rev 2916) @@ -0,0 +1,115 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{59D5ADD4-9669-468E-B687-F461BB7F4112}</ProjectGuid> + <RootNamespace>Demo01_TheBasics</RootNamespace> + <Keyword>Win32Proj</Keyword> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\$(Configuration)\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\obj\$(Configuration)\$(ProjectName)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\bin\$(Configuration)\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\obj\$(Configuration)\$(ProjectName)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>$(NEWTON_HOME)\sdk;$(BOOST_HOME)\;$(OGRE_HOME)\OgreMain\include;$(OGRE_HOME)\include;$(OGRE_BUILD_HOME)\include;$(OGRE_HOME)\Samples\Common\CEGUIRenderer\include;$(OGRE_HOME)\Samples\Common\include;$(OGRE_HOME)\samples\include;$(OGRE_HOME)\Dependencies\include;$(OGRE_HOME)\Dependencies\include\ois;$(OGRE_HOME)\Dependencies\include\CEGUI;$(OGRE_HOME)\include;$(OGRE_BUILD_HOME)\include\OIS;..\..\inc;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>true</MinimalRebuild> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + </ClCompile> + <Link> + <AdditionalDependencies>newton.lib;OgreMain_d.lib;OIS_d.lib;OgreNewt_d.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalLibraryDirectories>..\..\lib;$(OGRE_HOME)\lib;$(OGRE_BUILD_HOME)\lib\Debug;$(OGRE_HOME)\Dependencies\lib\Debug;$(NEWTON_HOME)\sdk\x32\dll_vs9;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Windows</SubSystem> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <Optimization>MaxSpeed</Optimization> + <IntrinsicFunctions>true</IntrinsicFunctions> + <AdditionalIncludeDirectories>$(NEWTON_HOME)\sdk;$(BOOST_HOME)\;$(OGRE_HOME)\OgreMain\include;$(OGRE_HOME)\include;$(OGRE_BUILD_HOME)\include;$(OGRE_HOME)\Samples\Common\CEGUIRenderer\include;$(OGRE_HOME)\Samples\Common\include;$(OGRE_HOME)\samples\include;$(OGRE_HOME)\Dependencies\include;$(OGRE_HOME)\Dependencies\include\ois;$(OGRE_HOME)\Dependencies\include\CEGUI;$(OGRE_HOME)\include;$(OGRE_BUILD_HOME)\include\OIS;..\..\inc;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> + <FunctionLevelLinking>true</FunctionLevelLinking> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + </ClCompile> + <Link> + <AdditionalDependencies>newton.lib;OgreMain.lib;OIS.lib;OgreNewt.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalLibraryDirectories>..\..\lib;$(OGRE_HOME)\lib;$(OGRE_BUILD_HOME)\lib\Release;$(OGRE_HOME)\Dependencies\lib\Release;$(NEWTON_HOME)\sdk\x32\dll_vs9;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Windows</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="demo01.cpp" /> + <ClCompile Include="OgreNewtonApplication.cpp" /> + <ClCompile Include="OgreNewtonFrameListener.cpp" /> + </ItemGroup> + <ItemGroup> + <ClInclude Include="OgreNewtonApplication.h" /> + <ClInclude Include="OgreNewtonFrameListener.h" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\..\OgreNewt.vcxproj"> + <Project>{c28c7710-76b1-4ffd-a85a-9aefda25ee64}</Project> + <ReferenceOutputAssembly>false</ReferenceOutputAssembly> + </ProjectReference> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project> \ No newline at end of file Added: branches/ogrenewt/newton20/demos/Demo01_TheBasics/Demo01_TheBasics.vcxproj.filters =================================================================== --- branches/ogrenewt/newton20/demos/Demo01_TheBasics/Demo01_TheBasics.vcxproj.filters (rev 0) +++ branches/ogrenewt/newton20/demos/Demo01_TheBasics/Demo01_TheBasics.vcxproj.filters 2010-06-25 18:14:37 UTC (rev 2916) @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Filter Include="Source Files"> + <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> + <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> + </Filter> + <Filter Include="Header Files"> + <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> + <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions> + </Filter> + <Filter Include="Resource Files"> + <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier> + <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions> + </Filter> + </ItemGroup> + <ItemGroup> + <ClCompile Include="demo01.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="OgreNewtonApplication.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="OgreNewtonFrameListener.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + </ItemGroup> + <ItemGroup> + <ClInclude Include="OgreNewtonApplication.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="OgreNewtonFrameListener.h"> + <Filter>Header Files</Filter> + </ClInclude> + </ItemGroup> +</Project> \ No newline at end of file Modified: branches/ogrenewt/newton20/demos/Demo02_Joints/Demo02_Joints.vcproj =================================================================== --- branches/ogrenewt/newton20/demos/Demo02_Joints/Demo02_Joints.vcproj 2010-06-24 11:42:09 UTC (rev 2915) +++ branches/ogrenewt/newton20/demos/Demo02_Joints/Demo02_Joints.vcproj 2010-06-25 18:14:37 UTC (rev 2916) @@ -41,7 +41,7 @@ <Tool Name="VCCLCompilerTool" Optimization="0" - AdditionalIncludeDirectories=""$(NEWTON_HOME)\sdk";"$(BOOST_HOME)\";"$(OGRE_HOME)\OgreMain\include";"$(OGRE_HOME)\include";"$(OGRE_HOME)\Samples\Common\CEGUIRenderer\include";"$(OGRE_HOME)\Samples\Common\include";"$(OGRE_HOME)\samples\include";"$(OGRE_HOME)\Dependencies\include";"$(OGRE_HOME)\Dependencies\include\ois";"$(OGRE_HOME)\Dependencies\include\CEGUI";"$(OGRE_HOME)\include\OIS";..\..\inc;." + AdditionalIncludeDirectories=""$(BOOST_HOME)\";"$(NEWTON_HOME)\sdk";"$(OGRE_HOME)\include\OGRE";"$(OGRE_HOME)\include";..\..\inc;." PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS" MinimalRebuild="true" BasicRuntimeChecks="3" @@ -63,7 +63,7 @@ Name="VCLinkerTool" AdditionalDependencies="newton.lib OgreMain_d.lib OIS_d.lib OgreNewt_d.lib" LinkIncremental="1" - AdditionalLibraryDirectories="..\..\lib;"$(OGRE_HOME)\lib";"$(OGRE_HOME)\Dependencies\lib\Debug";"$(NEWTON_HOME)\sdk\x32\dll_vs9"" + AdditionalLibraryDirectories="..\..\lib;"$(BOOST_HOME)\lib";"$(OGRE_HOME)\lib\debug";"$(NEWTON_HOME)\sdk\x32\dll_vs9"" GenerateDebugInformation="true" SubSystem="2" TargetMachine="1" Added: branches/ogrenewt/newton20/demos/Demo02_Joints/Demo02_Joints.vcxproj =================================================================== --- branches/ogrenewt/newton20/demos/Demo02_Joints/Demo02_Joints.vcxproj (rev 0) +++ branches/ogrenewt/newton20/demos/Demo02_Joints/Demo02_Joints.vcxproj 2010-06-25 18:14:37 UTC (rev 2916) @@ -0,0 +1,115 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{5BAB7340-BEDB-408A-96B1-296785399531}</ProjectGuid> + <RootNamespace>Demo02_Joints</RootNamespace> + <Keyword>Win32Proj</Keyword> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\$(Configuration)\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\obj\$(Configuration)\$(ProjectName)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\bin\$(Configuration)\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\obj\$(Configuration)\$(ProjectName)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>$(NEWTON_HOME)\sdk;$(BOOST_HOME)\;$(OGRE_HOME)\OgreMain\include;$(OGRE_HOME)\include;$(OGRE_BUILD_HOME)\include;$(OGRE_HOME)\Samples\Common\CEGUIRenderer\include;$(OGRE_HOME)\Samples\Common\include;$(OGRE_HOME)\samples\include;$(OGRE_HOME)\Dependencies\include;$(OGRE_HOME)\Dependencies\include\ois;$(OGRE_HOME)\Dependencies\include\CEGUI;$... [truncated message content] |
From: <kal...@us...> - 2010-06-24 11:42:15
|
Revision: 2915 http://ogreaddons.svn.sourceforge.net/ogreaddons/?rev=2915&view=rev Author: kallaspriit Date: 2010-06-24 11:42:09 +0000 (Thu, 24 Jun 2010) Log Message: ----------- - added void OgreNewt::Joint::localToGlobalVisual() that is the same as localToGlobal() except it uses visual position and orientation - added getters for BasicRaycastInfo - fixed graphics interpolation if running graphics faster than physics, it did not use to work at all actually as Julio first implemented it - fixed couple method names that started with uppercase character Modified Paths: -------------- branches/ogrenewt/newton20/OgreNewt.suo branches/ogrenewt/newton20/demos/MinimalOgreNewtApplication/MinimalOgreNewt.suo branches/ogrenewt/newton20/demos/MinimalOgreNewtApplication/media/materials/scripts/debug.material branches/ogrenewt/newton20/demos/MinimalOgreNewtApplication/source/PrimitiveFactory.cpp branches/ogrenewt/newton20/inc/OgreNewt_Body.h branches/ogrenewt/newton20/inc/OgreNewt_CollisionPrimitives.h branches/ogrenewt/newton20/inc/OgreNewt_Joint.h branches/ogrenewt/newton20/inc/OgreNewt_RayCast.h branches/ogrenewt/newton20/inc/OgreNewt_World.h branches/ogrenewt/newton20/src/OgreNewt_Body.cpp branches/ogrenewt/newton20/src/OgreNewt_CollisionPrimitives.cpp branches/ogrenewt/newton20/src/OgreNewt_Joint.cpp branches/ogrenewt/newton20/src/OgreNewt_World.cpp Added Paths: ----------- branches/ogrenewt/newton20/OgreNewt.vcxproj branches/ogrenewt/newton20/OgreNewt.vcxproj.filters Modified: branches/ogrenewt/newton20/OgreNewt.suo =================================================================== (Binary files differ) Added: branches/ogrenewt/newton20/OgreNewt.vcxproj =================================================================== --- branches/ogrenewt/newton20/OgreNewt.vcxproj (rev 0) +++ branches/ogrenewt/newton20/OgreNewt.vcxproj 2010-06-24 11:42:09 UTC (rev 2915) @@ -0,0 +1,266 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{C28C7710-76B1-4FFD-A85A-9AEFDA25EE64}</ProjectGuid> + <RootNamespace>OgreNewt</RootNamespace> + <Keyword>Win32Proj</Keyword> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <UseOfMfc>false</UseOfMfc> + <CharacterSet>MultiByte</CharacterSet> + <PlatformToolset>v90</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <UseOfMfc>false</UseOfMfc> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">lib\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">obj\debug\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental> + <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</GenerateManifest> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">lib\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">obj/release\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> + <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</GenerateManifest> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <Midl> + <PreprocessorDefinitions>WIN32;_WINDOWS;CMAKE_INTDIR="Debug";_OGRENEWT_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MkTypLibCompatible>false</MkTypLibCompatible> + <TargetEnvironment>Win32</TargetEnvironment> + <GenerateStublessProxies>true</GenerateStublessProxies> + <TypeLibraryName>%(Filename).tlb</TypeLibraryName> + <OutputDirectory>$(IntDir)</OutputDirectory> + <HeaderFileName>%(Filename).h</HeaderFileName> + <DllDataFileName> + </DllDataFileName> + <InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName> + <ProxyFileName>%(Filename)_p.c</ProxyFileName> + </Midl> + <ClCompile> + <AdditionalIncludeDirectories>$(NEWTON_HOME)\sdk;$(NEWTON_HOME)\sdk\dMath;$(NEWTON_HOME)\sdk\dCustomJoints;$(OGRE_HOME)\include;$(OGRE_HOME)\OgreMain\include;$(BOOST_HOME);.\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>_OGRENEWT_EXPORTS;_OGRENEWT_DYNAMIC;WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <ExceptionHandling>Sync</ExceptionHandling> + <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> + <RuntimeTypeInfo>true</RuntimeTypeInfo> + <PrecompiledHeader>Use</PrecompiledHeader> + <PrecompiledHeaderFile>OgreNewt_Stdafx.h</PrecompiledHeaderFile> + <AssemblerListingLocation>Debug</AssemblerListingLocation> + <ObjectFileName>$(IntDir)</ObjectFileName> + <ProgramDataBaseFileName>.\lib\OgreNewt_d.pdb</ProgramDataBaseFileName> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <CompileAs>CompileAsCpp</CompileAs> + <AdditionalOptions>/Zm1000 %(AdditionalOptions)</AdditionalOptions> + </ClCompile> + <ResourceCompile> + <PreprocessorDefinitions>WIN32;_WINDOWS;CMAKE_INTDIR="Debug";_OGRENEWT_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <AdditionalIncludeDirectories>.\OgreNewt\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + </ResourceCompile> + <Link> + <AdditionalOptions> /STACK:10000000 /machine:I386 /debug %(AdditionalOptions)</AdditionalOptions> + <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib;newton.lib;dMath_d.lib;JointLibrary_d.lib;OgreMain_d.lib</AdditionalDependencies> + <OutputFile>./lib/OgreNewt_d.dll</OutputFile> + <Version>2.0</Version> + <AdditionalLibraryDirectories>$(OGRE_HOME)/lib;$(BOOST_HOME)/libs;$(NEWTON_HOME)/sdk/x32;$(NEWTON_HOME)/sdk/x32/dll_vs9;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <ProgramDatabaseFile>.\lib\OgreNewt_d.pdb</ProgramDatabaseFile> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <ImportLibrary>.\lib\OgreNewt_d.lib</ImportLibrary> + </Link> + <PostBuildEvent> + <Command>copy $(OutDir)OgreNewt_d.dll demos\bin\Debug\OgreNewt_d.dll + + +if exist "$(OGRE_HOME)\Samples\Common\bin\Debug\OgreMain_d.dll" copy "$(OGRE_HOME)\Samples\Common\bin\Debug\OgreMain_d.dll" "demos\bin\Debug\OgreMain_d.dll" +if exist "$(OGRE_HOME)\Samples\Common\bin\Debug\OIS_d.dll" copy "$(OGRE_HOME)\Samples\Common\bin\Debug\OIS_d.dll" "demos\bin\Debug\OIS_d.dll" +if exist "$(OGRE_HOME)\Samples\Common\bin\Debug\Plugin_CgProgramManager_d.dll" copy "$(OGRE_HOME)\Samples\Common\bin\Debug\Plugin_CgProgramManager_d.dll" "demos\bin\Debug\Plugin_CgProgramManager_d.dll" +if exist "$(OGRE_HOME)\Samples\Common\bin\Debug\RenderSystem_Direct3D9_d.dll" copy "$(OGRE_HOME)\Samples\Common\bin\Debug\RenderSystem_Direct3D9_d.dll" "demos\bin\Debug\RenderSystem_Direct3D9_d.dll" +if exist "$(OGRE_HOME)\Samples\Common\bin\Debug\RenderSystem_GL_d.dll" copy "$(OGRE_HOME)\Samples\Common\bin\Debug\RenderSystem_GL_d.dll" "demos\bin\Debug\RenderSystem_GL_d.dll" +if exist "$(OGRE_HOME)\Samples\Common\bin\Debug\OgreGUIRenderer_d.dll" copy "$(OGRE_HOME)\Samples\Common\bin\Debug\OgreGUIRenderer_d.dll" "demos\bin\Debug\OgreGUIRenderer_d.dll" +if exist "$(OGRE_HOME)\Samples\Common\bin\Debug\CEGUIBase_d.dll" copy "$(OGRE_HOME)\Samples\Common\bin\Debug\CEGUIBase_d.dll" "demos\bin\Debug\CEGUIBase_d.dll" +if exist "$(OGRE_HOME)\Samples\Common\bin\Debug\CEGUIExpatParser_d.dll" copy "$(OGRE_HOME)\Samples\Common\bin\Debug\CEGUIExpatParser_d.dll" "demos\bin\Debug\CEGUIExpatParser_d.dll" +if exist "$(OGRE_HOME)\Samples\Common\bin\Debug\cg.dll" copy "$(OGRE_HOME)\Samples\Common\bin\Debug\cg.dll" "demos\bin\Debug\cg.dll" + +if exist "$(OGRE_HOME)\bin\debug\OgreMain_d.dll" copy "$(OGRE_HOME)\bin\debug\OgreMain_d.dll" "demos\bin\Debug\OgreMain_d.dll" +if exist "$(OGRE_HOME)\bin\debug\OIS_d.dll" copy "$(OGRE_HOME)\bin\debug\OIS_d.dll" demos\bin\Debug\OIS_d.dll" +if exist "$(OGRE_HOME)\bin\debug\Plugin_CgProgramManager_d.dll" copy "$(OGRE_HOME)\bin\debug\Plugin_CgProgramManager_d.dll" demos\bin\Debug\Plugin_CgProgramManager_d.dll" +if exist "$(OGRE_HOME)\bin\debug\RenderSystem_Direct3D9_d.dll" copy "$(OGRE_HOME)\bin\debug\RenderSystem_Direct3D9_d.dll" demos\bin\Debug\RenderSystem_Direct3D9_d.dll" +if exist "$(OGRE_HOME)\bin\debug\RenderSystem_GL_d.dll" copy "$(OGRE_HOME)\bin\debug\RenderSystem_GL_d.dll" demos\bin\Debug\RenderSystem_GL_d.dll" +if exist "$(OGRE_HOME)\bin\debug\OgreGUIRenderer_d.dll" copy "$(OGRE_HOME)\bin\debug\OgreGUIRenderer_d.dll" demos\bin\Debug\OgreGUIRenderer_d.dll" +if exist "$(OGRE_HOME)\bin\debug\CEGUIBase_d.dll" copy "$(OGRE_HOME)\bin\debug\CEGUIBase_d.dll" demos\bin\Debug\CEGUIBase_d.dll" +if exist "$(OGRE_HOME)\bin\debug\CEGUIExpatParser_d.dll" copy "$(OGRE_HOME)\bin\debug\CEGUIExpatParser_d.dll" demos\bin\Debug\CEGUIExpatParser_d.dll" +if exist "$(OGRE_HOME)\bin\debug\cg.dll" copy "$(OGRE_HOME)\bin\debug\cg.dll" demos\bin\Debug\cg.dll" + +copy $(NEWTON_HOME)\sdk\x32\dll_vs9\newton.dll demos\bin\Debug\newton.dll +copy $(NEWTON_HOME)\sdk\x32\JointLibrary_d.dll demos\bin\Debug\JointLibrary_d.dll + +</Command> + </PostBuildEvent> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <Midl> + <PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;CMAKE_INTDIR="Release";_OGRENEWT_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MkTypLibCompatible>false</MkTypLibCompatible> + <TargetEnvironment>Win32</TargetEnvironment> + <GenerateStublessProxies>true</GenerateStublessProxies> + <TypeLibraryName>%(Filename).tlb</TypeLibraryName> + <OutputDirectory>$(IntDir)</OutputDirectory> + <HeaderFileName>%(Filename).h</HeaderFileName> + <DllDataFileName> + </DllDataFileName> + <InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName> + <ProxyFileName>%(Filename)_p.c</ProxyFileName> + </Midl> + <ClCompile> + <AdditionalOptions> /Zm1000 %(AdditionalOptions)</AdditionalOptions> + <Optimization>MaxSpeed</Optimization> + <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion> + <AdditionalIncludeDirectories>$(NEWTON_HOME)\sdk;$(NEWTON_HOME)\sdk\dMath;$(NEWTON_HOME)\sdk\dCustomJoints;$(OGRE_HOME)\include;$(OGRE_HOME)\OgreMain\include;$(BOOST_HOME);.\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>_OGRENEWT_EXPORTS;_OGRENEWT_DYNAMIC;WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <ExceptionHandling>Sync</ExceptionHandling> + <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> + <RuntimeTypeInfo>true</RuntimeTypeInfo> + <PrecompiledHeader>Use</PrecompiledHeader> + <PrecompiledHeaderFile>OgreNewt_Stdafx.h</PrecompiledHeaderFile> + <AssemblerListingLocation>Release</AssemblerListingLocation> + <ObjectFileName>$(IntDir)</ObjectFileName> + <ProgramDataBaseFileName>.\lib\OgreNewt.pdb</ProgramDataBaseFileName> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <CompileAs>CompileAsCpp</CompileAs> + </ClCompile> + <ResourceCompile> + <PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;CMAKE_INTDIR="Release";_OGRENEWT_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <AdditionalIncludeDirectories>.\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + </ResourceCompile> + <Link> + <AdditionalOptions> /STACK:10000000 /machine:I386 %(AdditionalOptions)</AdditionalOptions> + <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib;newton.lib;dMath.lib;JointLibrary.lib;OgreMain.lib</AdditionalDependencies> + <OutputFile>./lib/OgreNewt.dll</OutputFile> + <Version>2.0</Version> + <AdditionalLibraryDirectories>$(OGRE_HOME)/lib;$(BOOST_HOME)/libs;$(NEWTON_HOME)/sdk/x32;$(NEWTON_HOME)/sdk/x32/dll_vs9;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <IgnoreSpecificDefaultLibraries>LIBCMT;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> + <GenerateDebugInformation>true</GenerateDebugInformation> + <ProgramDatabaseFile>lib\OgreNewt.pdb</ProgramDatabaseFile> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <ImportLibrary>lib\OgreNewt.lib</ImportLibrary> + </Link> + <PostBuildEvent> + <Command>copy $(OutDir)OgreNewt.dll demos\bin\Release\OgreNewt.dll + +if exist "$(OGRE_HOME)\Samples\Common\bin\Release\OgreMain.dll" copy "$(OGRE_HOME)\Samples\Common\bin\Release\OgreMain.dll" "demos\bin\Release\OgreMain.dll" +if exist "$(OGRE_HOME)\Samples\Common\bin\Release\OIS.dll" copy "$(OGRE_HOME)\Samples\Common\bin\Release\OIS.dll" "demos\bin\Release\OIS.dll" +if exist "$(OGRE_HOME)\Samples\Common\bin\Release\Plugin_CgProgramManager.dll" copy "$(OGRE_HOME)\Samples\Common\bin\Release\Plugin_CgProgramManager.dll" "demos\bin\Release\Plugin_CgProgramManager.dll" +if exist "$(OGRE_HOME)\Samples\Common\bin\Release\RenderSystem_Direct3D9.dll" copy "$(OGRE_HOME)\Samples\Common\bin\Release\RenderSystem_Direct3D9.dll" "demos\bin\Release\RenderSystem_Direct3D9.dll" +if exist "$(OGRE_HOME)\Samples\Common\bin\Release\RenderSystem_GL.dll" copy "$(OGRE_HOME)\Samples\Common\bin\Release\RenderSystem_GL.dll" "demos\bin\Release\RenderSystem_GL.dll" +if exist "$(OGRE_HOME)\Samples\Common\bin\Release\OgreGUIRenderer.dll" copy "$(OGRE_HOME)\Samples\Common\bin\Release\OgreGUIRenderer.dll" "demos\bin\Release\OgreGUIRenderer.dll" +if exist "$(OGRE_HOME)\Samples\Common\bin\Release\CEGUIBase.dll" copy "$(OGRE_HOME)\Samples\Common\bin\Release\CEGUIBase.dll" "demos\bin\Release\CEGUIBase.dll" +if exist "$(OGRE_HOME)\Samples\Common\bin\Release\CEGUIExpatParser.dll" copy "$(OGRE_HOME)\Samples\Common\bin\Release\CEGUIExpatParser.dll" "demos\bin\Release\CEGUIExpatParser.dll" +if exist "$(OGRE_HOME)\Samples\Common\bin\Release\cg.dll" copy "$(OGRE_HOME)\Samples\Common\bin\Release\cg.dll" "demos\bin\Release\cg.dll" + +if exist "$(OGRE_HOME)\bin\release\OgreMain.dll" copy "$(OGRE_HOME)\bin\release\OgreMain.dll" "demos\bin\Release\OgreMain.dll" +if exist "$(OGRE_HOME)\bin\release\OIS.dll" copy "$(OGRE_HOME)\bin\release\OIS.dll" "demos\bin\Release\OIS.dll" +if exist "$(OGRE_HOME)\bin\release\Plugin_CgProgramManager.dll" copy "$(OGRE_HOME)\bin\release\Plugin_CgProgramManager.dll" "demos\bin\Release\Plugin_CgProgramManager.dll" +if exist "$(OGRE_HOME)\bin\release\RenderSystem_Direct3D9.dll" copy "$(OGRE_HOME)\bin\release\RenderSystem_Direct3D9.dll" "demos\bin\Release\RenderSystem_Direct3D9.dll" +if exist "$(OGRE_HOME)\bin\release\RenderSystem_GL.dll" copy "$(OGRE_HOME)\bin\release\RenderSystem_GL.dll" "demos\bin\Release\RenderSystem_GL.dll" +if exist "$(OGRE_HOME)\bin\release\OgreGUIRenderer.dll" copy "$(OGRE_HOME)\bin\release\OgreGUIRenderer.dll" "demos\bin\Release\OgreGUIRenderer.dll" +if exist "$(OGRE_HOME)\bin\release\CEGUIBase.dll" copy "$(OGRE_HOME)\bin\release\CEGUIBase.dll" "demos\bin\Release\CEGUIBase.dll" +if exist "$(OGRE_HOME)\bin\release\CEGUIExpatParser.dll" copy "$(OGRE_HOME)\bin\release\CEGUIExpatParser.dll" "demos\bin\Release\CEGUIExpatParser.dll" +if exist "$(OGRE_HOME)\bin\release\cg.dll" copy "$(OGRE_HOME)\bin\release\cg.dll" "demos\bin\Release\cg.dll" + +copy $(NEWTON_HOME)\sdk\x32\dll_vs9\newton.dll demos\bin\Release\newton.dll +copy $(NEWTON_HOME)\sdk\x32\JointLibrary.dll demos\bin\Release\JointLibrary.dll +</Command> + </PostBuildEvent> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="src\OgreNewt_BasicFrameListener.cpp" /> + <ClCompile Include="src\OgreNewt_BasicJoints.cpp" /> + <ClCompile Include="src\OgreNewt_Body.cpp" /> + <ClCompile Include="src\OgreNewt_BodyInAABBIterator.cpp" /> + <ClCompile Include="src\OgreNewt_Collision.cpp" /> + <ClCompile Include="src\OgreNewt_CollisionPrimitives.cpp" /> + <ClCompile Include="src\OgreNewt_CollisionSerializer.cpp" /> + <ClCompile Include="src\OgreNewt_ContactCallback.cpp" /> + <ClCompile Include="src\OgreNewt_ContactJoint.cpp" /> + <ClCompile Include="src\OgreNewt_ConvexCast.cpp" /> + <ClCompile Include="src\OgreNewt_Debugger.cpp" /> + <ClCompile Include="src\OgreNewt_Joint.cpp" /> + <ClCompile Include="src\OgreNewt_MaterialID.cpp" /> + <ClCompile Include="src\OgreNewt_MaterialPair.cpp" /> + <ClCompile Include="src\OgreNewt_PlayerController.cpp" /> + <ClCompile Include="src\OgreNewt_RayCast.cpp" /> + <ClCompile Include="src\OgreNewt_RayCastVehicle.cpp" /> + <ClCompile Include="src\OgreNewt_Stdafx.cpp"> + <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader> + <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader> + </ClCompile> + <ClCompile Include="src\OgreNewt_Tools.cpp" /> + <ClCompile Include="src\OgreNewt_Vehicle.cpp" /> + <ClCompile Include="src\OgreNewt_World.cpp" /> + </ItemGroup> + <ItemGroup> + <ClInclude Include="inc\OgreNewt.h" /> + <ClInclude Include="inc\OgreNewt_BasicFrameListener.h" /> + <ClInclude Include="inc\OgreNewt_BasicJoints.h" /> + <ClInclude Include="inc\OgreNewt_Body.h" /> + <ClInclude Include="inc\OgreNewt_BodyInAABBIterator.h" /> + <ClInclude Include="inc\OgreNewt_Collision.h" /> + <ClInclude Include="inc\OgreNewt_CollisionPrimitives.h" /> + <ClInclude Include="inc\OgreNewt_CollisionSerializer.h" /> + <ClInclude Include="inc\OgreNewt_ContactCallback.h" /> + <ClInclude Include="inc\OgreNewt_ContactJoint.h" /> + <ClInclude Include="inc\OgreNewt_ConvexCast.h" /> + <ClInclude Include="inc\OgreNewt_Debugger.h" /> + <ClInclude Include="inc\OgreNewt_Joint.h" /> + <ClInclude Include="inc\OgreNewt_MaterialID.h" /> + <ClInclude Include="inc\OgreNewt_MaterialPair.h" /> + <ClInclude Include="inc\OgreNewt_PlayerController.h" /> + <ClInclude Include="inc\OgreNewt_Prerequisites.h" /> + <ClInclude Include="inc\OgreNewt_RayCast.h" /> + <ClInclude Include="inc\OgreNewt_RayCastVehicle.h" /> + <ClInclude Include="inc\OgreNewt_Stdafx.h" /> + <ClInclude Include="inc\OgreNewt_Tools.h" /> + <ClInclude Include="inc\OgreNewt_Vehicle.h" /> + <ClInclude Include="inc\OgreNewt_World.h" /> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project> \ No newline at end of file Added: branches/ogrenewt/newton20/OgreNewt.vcxproj.filters =================================================================== --- branches/ogrenewt/newton20/OgreNewt.vcxproj.filters (rev 0) +++ branches/ogrenewt/newton20/OgreNewt.vcxproj.filters 2010-06-24 11:42:09 UTC (rev 2915) @@ -0,0 +1,147 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Filter Include="Source Files"> + <UniqueIdentifier>{c6ecb8b4-cc8e-43df-8782-5a983259e6c9}</UniqueIdentifier> + </Filter> + <Filter Include="Header Files"> + <UniqueIdentifier>{e0f46e76-7210-4d83-8fd2-79b2f32bead0}</UniqueIdentifier> + </Filter> + </ItemGroup> + <ItemGroup> + <ClCompile Include="src\OgreNewt_BasicFrameListener.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="src\OgreNewt_BasicJoints.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="src\OgreNewt_Body.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="src\OgreNewt_BodyInAABBIterator.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="src\OgreNewt_Collision.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="src\OgreNewt_CollisionPrimitives.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="src\OgreNewt_CollisionSerializer.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="src\OgreNewt_ContactCallback.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="src\OgreNewt_ContactJoint.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="src\OgreNewt_ConvexCast.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="src\OgreNewt_Debugger.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="src\OgreNewt_Joint.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="src\OgreNewt_MaterialID.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="src\OgreNewt_MaterialPair.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="src\OgreNewt_PlayerController.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="src\OgreNewt_RayCast.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="src\OgreNewt_RayCastVehicle.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="src\OgreNewt_Stdafx.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="src\OgreNewt_Tools.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="src\OgreNewt_Vehicle.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="src\OgreNewt_World.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + </ItemGroup> + <ItemGroup> + <ClInclude Include="inc\OgreNewt.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="inc\OgreNewt_BasicFrameListener.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="inc\OgreNewt_BasicJoints.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="inc\OgreNewt_Body.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="inc\OgreNewt_BodyInAABBIterator.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="inc\OgreNewt_Collision.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="inc\OgreNewt_CollisionPrimitives.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="inc\OgreNewt_CollisionSerializer.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="inc\OgreNewt_ContactCallback.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="inc\OgreNewt_ContactJoint.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="inc\OgreNewt_ConvexCast.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="inc\OgreNewt_Debugger.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="inc\OgreNewt_Joint.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="inc\OgreNewt_MaterialID.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="inc\OgreNewt_MaterialPair.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="inc\OgreNewt_PlayerController.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="inc\OgreNewt_Prerequisites.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="inc\OgreNewt_RayCast.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="inc\OgreNewt_RayCastVehicle.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="inc\OgreNewt_Stdafx.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="inc\OgreNewt_Tools.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="inc\OgreNewt_Vehicle.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="inc\OgreNewt_World.h"> + <Filter>Header Files</Filter> + </ClInclude> + </ItemGroup> +</Project> \ No newline at end of file Modified: branches/ogrenewt/newton20/demos/MinimalOgreNewtApplication/MinimalOgreNewt.suo =================================================================== (Binary files differ) Modified: branches/ogrenewt/newton20/demos/MinimalOgreNewtApplication/media/materials/scripts/debug.material =================================================================== --- branches/ogrenewt/newton20/demos/MinimalOgreNewtApplication/media/materials/scripts/debug.material 2010-06-04 07:23:55 UTC (rev 2914) +++ branches/ogrenewt/newton20/demos/MinimalOgreNewtApplication/media/materials/scripts/debug.material 2010-06-24 11:42:09 UTC (rev 2915) @@ -1,6 +1,5 @@ material Debug/Blue { - cast_shadows on receive_shadows on technique @@ -17,7 +16,6 @@ material Debug/Green { - cast_shadows on receive_shadows on technique @@ -34,7 +32,6 @@ material Debug/Red { - cast_shadows on receive_shadows on technique Modified: branches/ogrenewt/newton20/demos/MinimalOgreNewtApplication/source/PrimitiveFactory.cpp =================================================================== --- branches/ogrenewt/newton20/demos/MinimalOgreNewtApplication/source/PrimitiveFactory.cpp 2010-06-04 07:23:55 UTC (rev 2914) +++ branches/ogrenewt/newton20/demos/MinimalOgreNewtApplication/source/PrimitiveFactory.cpp 2010-06-24 11:42:09 UTC (rev 2915) @@ -519,7 +519,7 @@ Ogre::Entity* entity = static_cast<Ogre::Entity*>(attachedObject); - OgreNewt::ConvexCollisionPtr collision = OgreNewt::ConvexCollisionPtr(new OgreNewt::CollisionPrimitives::ConvexHull(world, entity, true, objectId)); + OgreNewt::ConvexCollisionPtr collision = OgreNewt::ConvexCollisionPtr(new OgreNewt::CollisionPrimitives::ConvexHull(world, entity, objectId)); OgreNewt::Body* body = new OgreNewt::Body(world, collision, objectId); @@ -664,13 +664,13 @@ name = "FactoryObject" + Ogre::StringConverter::toString(generatedObjectCount++); } - if (material == "") + Ogre::Entity* entity = sceneManager->createEntity(name, mesh); + + if (material != "") { - material = defaultMaterialName; + entity->setMaterialName(material); } - Ogre::Entity* entity = sceneManager->createEntity(name, mesh); - entity->setMaterialName(material); entity->setCastShadows(true); Ogre::SceneNode* node = sceneManager->getRootSceneNode()->createChildSceneNode(name); Modified: branches/ogrenewt/newton20/inc/OgreNewt_Body.h =================================================================== --- branches/ogrenewt/newton20/inc/OgreNewt_Body.h 2010-06-04 07:23:55 UTC (rev 2914) +++ branches/ogrenewt/newton20/inc/OgreNewt_Body.h 2010-06-24 11:42:09 UTC (rev 2915) @@ -478,11 +478,13 @@ bool isNodeUpdateNeeded() const {return m_nodeupdateneeded;} #endif + /* //! Return if an node update was requested bool isNodeUpdateNeeded() const {return m_nodeupdateneeded;} //! Set this body to for visual node update - void SetNodeUpdateState(bool state) {m_nodeupdateneeded = state;} + void setNodeUpdateNeeded(bool state) {m_nodeupdateneeded = state;} + */ //! update the position of the node (if attached) and sets m_nodeupdateneeded to false void updateNode(Ogre::Real interpolatParam); @@ -512,7 +514,7 @@ int m_type; Ogre::Node* m_node; - bool m_nodeupdateneeded; + //bool m_nodeupdateneeded; ForceCallback m_forcecallback; Modified: branches/ogrenewt/newton20/inc/OgreNewt_CollisionPrimitives.h =================================================================== --- branches/ogrenewt/newton20/inc/OgreNewt_CollisionPrimitives.h 2010-06-04 07:23:55 UTC (rev 2914) +++ branches/ogrenewt/newton20/inc/OgreNewt_CollisionPrimitives.h 2010-06-24 11:42:09 UTC (rev 2915) @@ -231,7 +231,7 @@ \parem tolerance a tolerance passed to newton \param forceScale if set to something else then (0,0,0), the value of this argument will be used as scale instead of the parent-node's scale */ - ConvexHull( const World* world, Ogre::Entity* ent, int id, + ConvexHull( const World* world, Ogre::Entity* ent, int id = 1, const Ogre::Quaternion& orient = Ogre::Quaternion::IDENTITY, const Ogre::Vector3& pos = Ogre::Vector3::ZERO, Ogre::Real tolerance = 0.001f , const Ogre::Vector3& forceScale = Ogre::Vector3::ZERO); /*! @@ -244,7 +244,7 @@ \param pos position offset of the primitive \param tolerance a tolerance passed to newton */ - ConvexHull( const World* world, const Ogre::Vector3* verts, int vertcount,int id, + ConvexHull( const World* world, const Ogre::Vector3* verts, int vertcount,int id = 1, const Ogre::Quaternion& orient = Ogre::Quaternion::IDENTITY, const Ogre::Vector3& pos = Ogre::Vector3::ZERO, Ogre::Real tolerance = 0.001f ); //! destructor Modified: branches/ogrenewt/newton20/inc/OgreNewt_Joint.h =================================================================== --- branches/ogrenewt/newton20/inc/OgreNewt_Joint.h 2010-06-04 07:23:55 UTC (rev 2914) +++ branches/ogrenewt/newton20/inc/OgreNewt_Joint.h 2010-06-24 11:42:09 UTC (rev 2915) @@ -137,6 +137,7 @@ void pinAndDirToLocal( const Ogre::Vector3& pinpt, const Ogre::Vector3& pindir, Ogre::Quaternion& localOrient0, Ogre::Vector3& localPos0, Ogre::Quaternion& localOrient1, Ogre::Vector3& localPos1 ) const; void localToGlobal( const Ogre::Quaternion& localOrient, const Ogre::Vector3& localPos, Ogre::Quaternion& globalOrient, Ogre::Vector3& globalPos, int bodyIndex ) const; + void localToGlobalVisual( const Ogre::Quaternion& localOrient, const Ogre::Vector3& localPos, Ogre::Quaternion& globalOrient, Ogre::Vector3& globalPos, int bodyIndex ) const; void globalToLocal( const Ogre::Quaternion& globalOrient, const Ogre::Vector3& globalPos, Ogre::Quaternion& localOrient, Ogre::Vector3& localPos, int bodyIndex ) const; Ogre::Quaternion grammSchmidt( const Ogre::Vector3& pin ) const; Modified: branches/ogrenewt/newton20/inc/OgreNewt_RayCast.h =================================================================== --- branches/ogrenewt/newton20/inc/OgreNewt_RayCast.h 2010-06-04 07:23:55 UTC (rev 2914) +++ branches/ogrenewt/newton20/inc/OgreNewt_RayCast.h 2010-06-24 11:42:09 UTC (rev 2915) @@ -94,13 +94,19 @@ class _OgreNewtExport BasicRaycastInfo { public: + BasicRaycastInfo(); + ~BasicRaycastInfo(); + + Ogre::Real getDistance() { return mDistance; }; + OgreNewt::Body* getBody() { return mBody; }; + int getCollisionId() { return mCollisionID; }; + Ogre::Vector3 getNormal() { return mNormal; }; + Ogre::Quaternion getNormalOrientation() { return OgreNewt::Converters::grammSchmidt(mNormal); }; + Ogre::Real mDistance; //!< dist from point1 of the raycast, in range [0,1]. OgreNewt::Body* mBody; //!< pointer to body intersected with int mCollisionID; //!< collision ID of the primitive hit by the ray (for compound collision bodies) Ogre::Vector3 mNormal; //!< normal of intersection. - - BasicRaycastInfo(); - ~BasicRaycastInfo(); bool operator<(const BasicRaycastInfo& rhs) const { Modified: branches/ogrenewt/newton20/inc/OgreNewt_World.h =================================================================== --- branches/ogrenewt/newton20/inc/OgreNewt_World.h 2010-06-04 07:23:55 UTC (rev 2914) +++ branches/ogrenewt/newton20/inc/OgreNewt_World.h 2010-06-24 11:42:09 UTC (rev 2915) @@ -97,7 +97,7 @@ Is is no necessary to call this function allocations default to malloc and free but if an application then it must call this once before the creation of any Newton world */ - static void SetAllocators (NewtonAllocMemory newtonAlloc, NewtonFreeMemory newtonFree); + static void setAllocators (NewtonAllocMemory newtonAlloc, NewtonFreeMemory newtonFree); //! update the world by the specified time_step. /*! @@ -291,10 +291,11 @@ */ Debugger& getDebugger() const {return *m_debugger;} + /* //! adds an update request for the body, this means that after the next world update the function body->updateNode will be called, if the bodie needs updating void addBodyUpdateNodeRequest( int threadIndex, OgreNewt::Body* body ) const ; + */ - #ifndef WIN32 //! notify an entrance to a critical section of code concerning Ogre (and only concerning Ogre!) /*! @@ -336,7 +337,7 @@ typedef std::vector< OgreNewt::Body* > BodyVector; typedef std::vector< BodyVector > BodyVectorVector; - mutable BodyVectorVector m_bodyUpdateNodeRequests; + //mutable BodyVectorVector m_bodyUpdateNodeRequests; mutable Debugger* m_debugger; Modified: branches/ogrenewt/newton20/src/OgreNewt_Body.cpp =================================================================== --- branches/ogrenewt/newton20/src/OgreNewt_Body.cpp 2010-06-04 07:23:55 UTC (rev 2914) +++ branches/ogrenewt/newton20/src/OgreNewt_Body.cpp 2010-06-24 11:42:09 UTC (rev 2915) @@ -25,7 +25,7 @@ m_buoyancycallback = NULL; m_nodeupdatenotifycallback = NULL; - m_nodeupdateneeded = false; + //m_nodeupdateneeded = false; m_nodePosit = Ogre::Vector3 (0.0f, 0.0f, 0.0f); m_curPosit = Ogre::Vector3 (0.0f, 0.0f, 0.0f); @@ -94,6 +94,7 @@ me->m_prevRotation = -1.0f * me->m_prevRotation; } + /* // if (me->m_node) { // if (m_nodeupdateneeded && !forceNodeUpdate ) if (!me->m_nodeupdateneeded) { @@ -102,6 +103,7 @@ // me->m_transformcallback( me, threadIndex ); } // } + */ } @@ -449,7 +451,9 @@ void Body::updateNode(Ogre::Real interpolatParam) { - m_nodePosit = m_prevPosit + (m_curPosit - m_prevPosit) * interpolatParam; + Ogre::Vector3 velocity = m_curPosit - m_prevPosit; + + m_nodePosit = m_prevPosit + velocity * interpolatParam; m_nodeRotation = Ogre::Quaternion::Slerp (interpolatParam, m_prevRotation, m_curRotation); if (m_node) { Modified: branches/ogrenewt/newton20/src/OgreNewt_CollisionPrimitives.cpp =================================================================== --- branches/ogrenewt/newton20/src/OgreNewt_CollisionPrimitives.cpp 2010-06-04 07:23:55 UTC (rev 2914) +++ branches/ogrenewt/newton20/src/OgreNewt_CollisionPrimitives.cpp 2010-06-24 11:42:09 UTC (rev 2915) @@ -124,12 +124,10 @@ { Ogre::Vector3 scale(1.0,1.0,1.0); - //get the mesh! //Ogre::Entity* obj = (Ogre::Entity*)node->getAttachedObject(0); Ogre::MeshPtr mesh = obj->getMesh(); - // get scale, if attached to node Ogre::Node * node = obj->getParentNode(); if (node) scale = node->getScale(); @@ -254,8 +252,6 @@ } - - TreeCollision::TreeCollision( const World* world) : Collision(world) { } Modified: branches/ogrenewt/newton20/src/OgreNewt_Joint.cpp =================================================================== --- branches/ogrenewt/newton20/src/OgreNewt_Joint.cpp 2010-06-04 07:23:55 UTC (rev 2914) +++ branches/ogrenewt/newton20/src/OgreNewt_Joint.cpp 2010-06-24 11:42:09 UTC (rev 2915) @@ -241,6 +241,29 @@ globalOrient = bodyOrient * localOrient; } +void CustomJoint::localToGlobalVisual( const Ogre::Quaternion& localOrient, const Ogre::Vector3& localPos, Ogre::Quaternion& globalOrient, Ogre::Vector3& globalPos, int bodyIndex ) const +{ + globalOrient = Ogre::Quaternion::IDENTITY; + globalPos= Ogre::Vector3::ZERO; + + const Body* bdy = NULL; + if (bodyIndex == 0) + bdy = getBody0(); + else if (getBody1()) + bdy = getBody1(); + + Ogre::Quaternion bodyOrient = Ogre::Quaternion::IDENTITY; + Ogre::Vector3 bodyPos = Ogre::Vector3::ZERO; + + if (bdy) + { + bdy->getVisualPositionOrientation( bodyPos, bodyOrient ); + } + + globalPos = (bodyOrient * localPos) + bodyPos; + globalOrient = bodyOrient * localOrient; +} + void CustomJoint::globalToLocal( const Ogre::Quaternion& globalOrient, const Ogre::Vector3& globalPos, Ogre::Quaternion& localOrient, Ogre::Vector3& localPos, int bodyIndex ) const { localOrient = Ogre::Quaternion::IDENTITY; Modified: branches/ogrenewt/newton20/src/OgreNewt_World.cpp =================================================================== --- branches/ogrenewt/newton20/src/OgreNewt_World.cpp 2010-06-04 07:23:55 UTC (rev 2914) +++ branches/ogrenewt/newton20/src/OgreNewt_World.cpp 2010-06-24 11:42:09 UTC (rev 2915) @@ -81,7 +81,6 @@ void World::setUpdateFPS(Ogre::Real desiredFps, int maxUpdatesPerFrames) { - if (maxUpdatesPerFrames < 1) { maxUpdatesPerFrames = 1; } @@ -94,10 +93,10 @@ m_updateFPS = desiredFps; m_timestep = 1.0f / desiredFps; + if (m_timestep > 1.0f / 10.0f) { // recalculate the iteration count to met the desire fps - m_maxTicksPerFrames += ceilf (m_timestep / (1.0f / 60.0f)); - + m_maxTicksPerFrames += ceilf (m_timestep / (1.0f / 10.0f)); m_timestep = 1.0 / 10.0f; m_updateFPS = 10; } @@ -112,52 +111,59 @@ } // Set allocators -void World::SetAllocators (NewtonAllocMemory newtonAlloc, NewtonFreeMemory newtonFree) +void World::setAllocators (NewtonAllocMemory newtonAlloc, NewtonFreeMemory newtonFree) { NewtonSetMemorySystem (newtonAlloc, newtonFree); } void World::setThreadCount(int threads) { + /* // clean up all pending bodies for update for( BodyVectorVector::iterator it = m_bodyUpdateNodeRequests.begin(); it != m_bodyUpdateNodeRequests.end(); it++ ) { for( BodyVector::iterator body = it->begin(); body != it->end(); body++ ) { - (*body)->SetNodeUpdateState (false); + (*body)->setNodeUpdateNeeded (false); } it->clear(); } + */ NewtonSetThreadsCount (m_world, threads) ; + /* // resize the update queue m_bodyUpdateNodeRequests.resize(getThreadCount()); + */ } - +/* void World::addBodyUpdateNodeRequest( int threadIndex, OgreNewt::Body* body ) const { - body->SetNodeUpdateState (true); + body->setNodeUpdateNeeded (true); m_bodyUpdateNodeRequests.at(threadIndex).push_back(body); } +*/ // update int World::update( Ogre::Real t_step ) { int realUpdates = 0; + /* // clean up all pending bodies for update for( BodyVectorVector::iterator it = m_bodyUpdateNodeRequests.begin(); it != m_bodyUpdateNodeRequests.end(); it++ ) { for( BodyVector::iterator body = it->begin(); body != it->end(); body++ ) { + (*body)->setNodeUpdateNeeded (false); + } - (*body)->SetNodeUpdateState (false); - } it->clear(); } + */ #ifdef _DEBUG @@ -165,13 +171,14 @@ // " m_update:"+Ogre::StringConverter::toString(m_update)); #endif - // clamp thE step if necessary + // clamp the step if necessary if (t_step > (m_timestep * m_maxTicksPerFrames)) { t_step = m_timestep * m_maxTicksPerFrames; } // advance the accumulator; m_timeAcumulator += t_step; + while (m_timeAcumulator >= m_timestep) { NewtonUpdate (m_world, m_timestep); m_timeAcumulator -= m_timestep; @@ -186,6 +193,7 @@ Ogre::Real param = m_timeAcumulator * m_invTimestep; //param = 1.0f; + /* Julio's version, does not really work as the body is only updated once per transform-callback for( BodyVectorVector::iterator it = m_bodyUpdateNodeRequests.begin(); it != m_bodyUpdateNodeRequests.end(); it++ ) { for( BodyVector::iterator body = it->begin(); body != it->end(); body++ ) @@ -193,7 +201,13 @@ (*body)->updateNode(param); } } + */ + for( Body* body = getFirstBody(); body; body = body->getNext() ) + { + body->updateNode(param); + } + return realUpdates; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <es...@us...> - 2010-06-04 07:24:02
|
Revision: 2914 http://ogreaddons.svn.sourceforge.net/ogreaddons/?rev=2914&view=rev Author: esuvs Date: 2010-06-04 07:23:55 +0000 (Fri, 04 Jun 2010) Log Message: ----------- Work on QtScripting support. Modified Paths: -------------- trunk/QtOgreFramework/Demo/source/DemoGameLogic.cpp Added Paths: ----------- trunk/QtOgreFramework/Demo/include/CameraWrapper.h trunk/QtOgreFramework/Demo/include/Keyboard.h trunk/QtOgreFramework/Demo/include/Mouse.h trunk/QtOgreFramework/Demo/source/CameraWrapper.cpp trunk/QtOgreFramework/Demo/source/Keyboard.cpp trunk/QtOgreFramework/Demo/source/Mouse.cpp Added: trunk/QtOgreFramework/Demo/include/CameraWrapper.h =================================================================== --- trunk/QtOgreFramework/Demo/include/CameraWrapper.h (rev 0) +++ trunk/QtOgreFramework/Demo/include/CameraWrapper.h 2010-06-04 07:23:55 UTC (rev 2914) @@ -0,0 +1,31 @@ +#ifndef CAMERAWRAPPER_H_ +#define CAMERAWRAPPER_H_ + +#include <OgrePrerequisites.h> +#include <OgreMath.h> + +#include <QObject> + +class CameraWrapper : public QObject +{ + Q_OBJECT + +public: + void setOgreCamera(Ogre::Camera* pOgreCamera); + +public slots: + void moveRelative(const Ogre::Vector3 &vec); + + void yaw (const Ogre::Radian &angle); + + void pitch (const Ogre::Radian &angle); + + Ogre::Radian getFOVy (void) const; + + void setFOVy (const Ogre::Radian& fovy); + +private: + Ogre::Camera* m_pOgreCamera; +}; + +#endif //CAMERAWRAPPER_H_ \ No newline at end of file Added: trunk/QtOgreFramework/Demo/include/Keyboard.h =================================================================== --- trunk/QtOgreFramework/Demo/include/Keyboard.h (rev 0) +++ trunk/QtOgreFramework/Demo/include/Keyboard.h 2010-06-04 07:23:55 UTC (rev 2914) @@ -0,0 +1,19 @@ +#ifndef KEYBOARD_H_ +#define KEYBOARD_H_ + +#include <QHash> + +class Keyboard : public QObject + { + Q_OBJECT + + public slots: + bool isPressed(int key); + void press(int key); + void release(int key); + + private: + QHash<int, bool> mKeyStates; + }; + +#endif //KEYBOARD_H_ \ No newline at end of file Added: trunk/QtOgreFramework/Demo/include/Mouse.h =================================================================== --- trunk/QtOgreFramework/Demo/include/Mouse.h (rev 0) +++ trunk/QtOgreFramework/Demo/include/Mouse.h 2010-06-04 07:23:55 UTC (rev 2914) @@ -0,0 +1,42 @@ +#ifndef MOUSE_H_ +#define MOUSE_H_ + +#include <QObject> +#include <QPoint> + +class Mouse : public QObject +{ + Q_OBJECT + +public: + Mouse(void); + +public slots: + bool isPressed(int mouseButton); + + void press(int mouseButton); + + void release(int mouseButton); + + const QPoint& pos(void); + + void setPos(const QPoint& pos); + + QPoint computeDelta(void); + + void resetDelta(void); + + void modifyWheelDelta(int wheelDelta); + + int getWheelDelta(void); + + void resetWheelDelta(void); + +private: + Qt::MouseButtons mMouseButtons; + QPoint mPos; + QPoint mOldPos; + int mWheelDelta; +}; + +#endif //MOUSE_H_ \ No newline at end of file Added: trunk/QtOgreFramework/Demo/source/CameraWrapper.cpp =================================================================== --- trunk/QtOgreFramework/Demo/source/CameraWrapper.cpp (rev 0) +++ trunk/QtOgreFramework/Demo/source/CameraWrapper.cpp 2010-06-04 07:23:55 UTC (rev 2914) @@ -0,0 +1,34 @@ +#include "CameraWrapper.h" + +#include <OgreCamera.h> +#include <OgreMath.h> + +void CameraWrapper::setOgreCamera(Ogre::Camera* pOgreCamera) +{ + m_pOgreCamera = pOgreCamera; +} + +void CameraWrapper::moveRelative(const Ogre::Vector3 &vec) +{ + m_pOgreCamera->moveRelative(vec); +} + +void CameraWrapper::yaw (const Ogre::Radian &angle) +{ + m_pOgreCamera->yaw(angle); +} + +void CameraWrapper::pitch (const Ogre::Radian &angle) +{ + m_pOgreCamera->pitch(angle); +} + +Ogre::Radian CameraWrapper::getFOVy (void) const +{ + return m_pOgreCamera->getFOVy(); +} + +void CameraWrapper::setFOVy (const Ogre::Radian& fovy) +{ + m_pOgreCamera->setFOVy(fovy); +} \ No newline at end of file Modified: trunk/QtOgreFramework/Demo/source/DemoGameLogic.cpp =================================================================== --- trunk/QtOgreFramework/Demo/source/DemoGameLogic.cpp 2010-05-31 21:09:29 UTC (rev 2913) +++ trunk/QtOgreFramework/Demo/source/DemoGameLogic.cpp 2010-06-04 07:23:55 UTC (rev 2914) @@ -120,7 +120,7 @@ ; debugger.attachTo(scriptEngine); - debugger.action(QScriptEngineDebugger::InterruptAction)->trigger(); + //debugger.action(QScriptEngineDebugger::InterruptAction)->trigger(); Added: trunk/QtOgreFramework/Demo/source/Keyboard.cpp =================================================================== --- trunk/QtOgreFramework/Demo/source/Keyboard.cpp (rev 0) +++ trunk/QtOgreFramework/Demo/source/Keyboard.cpp 2010-06-04 07:23:55 UTC (rev 2914) @@ -0,0 +1,16 @@ +#include "Keyboard.h" + +bool Keyboard::isPressed(int key) +{ + return mKeyStates[key]; +} + +void Keyboard::press(int key) +{ + mKeyStates[key] = true; +} + +void Keyboard::release(int key) +{ + mKeyStates[key] = false; +} \ No newline at end of file Added: trunk/QtOgreFramework/Demo/source/Mouse.cpp =================================================================== --- trunk/QtOgreFramework/Demo/source/Mouse.cpp (rev 0) +++ trunk/QtOgreFramework/Demo/source/Mouse.cpp 2010-06-04 07:23:55 UTC (rev 2914) @@ -0,0 +1,71 @@ +#include "Mouse.h" + +Mouse::Mouse(void) + :mWheelDelta(0) +{ +} + +bool Mouse::isPressed(int mouseButton) +{ + //Note - I'd rather pass a Qt::MouseButton in a parameter to this + //function and avoid the class, but I had problems registering it + //with qScriptRegisterMetaType(). + Qt::MouseButton mb = static_cast<Qt::MouseButton>(mouseButton); + + return mMouseButtons & mb; +} + +void Mouse::press(int mouseButton) +{ + //Note - I'd rather pass a Qt::MouseButton in a parameter to this + //function and avoid the class, but I had problems registering it + //with qScriptRegisterMetaType(). + Qt::MouseButton mb = static_cast<Qt::MouseButton>(mouseButton); + + mMouseButtons |= mb; +} + +void Mouse::release(int mouseButton) +{ + //Note - I'd rather pass a Qt::MouseButton in a parameter to this + //function and avoid the class, but I had problems registering it + //with qScriptRegisterMetaType(). + Qt::MouseButton mb = static_cast<Qt::MouseButton>(mouseButton); + + mMouseButtons &= ~mb; +} + +const QPoint& Mouse::pos(void) +{ + return mPos; +} + +void Mouse::setPos(const QPoint& pos) +{ + mPos = pos; +} + +QPoint Mouse::computeDelta(void) +{ + return mPos - mOldPos; +} + +void Mouse::resetDelta(void) +{ + mOldPos = mPos; +} + +void Mouse::modifyWheelDelta(int wheelDelta) +{ + mWheelDelta += wheelDelta; +} + +int Mouse::getWheelDelta(void) +{ + return mWheelDelta; +} + +void Mouse::resetWheelDelta(void) +{ + mWheelDelta = 0; +} \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <es...@us...> - 2010-05-31 21:09:37
|
Revision: 2913 http://ogreaddons.svn.sourceforge.net/ogreaddons/?rev=2913&view=rev Author: esuvs Date: 2010-05-31 21:09:29 +0000 (Mon, 31 May 2010) Log Message: ----------- Initial support for QtScript debugging. Modified Paths: -------------- trunk/QtOgreFramework/Demo/CMakeLists.txt trunk/QtOgreFramework/Demo/include/DemoGameLogic.h trunk/QtOgreFramework/Demo/source/DemoGameLogic.cpp Modified: trunk/QtOgreFramework/Demo/CMakeLists.txt =================================================================== --- trunk/QtOgreFramework/Demo/CMakeLists.txt 2010-05-30 21:42:20 UTC (rev 2912) +++ trunk/QtOgreFramework/Demo/CMakeLists.txt 2010-05-31 21:09:29 UTC (rev 2913) @@ -40,6 +40,7 @@ FIND_PACKAGE(Qt4) SET(QT_USE_QTGUI 1) SET(QT_USE_QTSCRIPT 1) +SET(QT_USE_QTSCRIPTTOOLS 1) SET(QT_USE_QTXML 1) INCLUDE(${QT_USE_FILE}) Modified: trunk/QtOgreFramework/Demo/include/DemoGameLogic.h =================================================================== --- trunk/QtOgreFramework/Demo/include/DemoGameLogic.h 2010-05-30 21:42:20 UTC (rev 2912) +++ trunk/QtOgreFramework/Demo/include/DemoGameLogic.h 2010-05-31 21:09:29 UTC (rev 2913) @@ -16,6 +16,7 @@ #include <QTime> #include <QtScript> +#include <QScriptEngineDebugger> class StyleSettingsWidget; @@ -76,6 +77,8 @@ QScriptValue cameraPositionScriptValue; QScriptValue cameraDirectionScriptValue; QScriptValue cameraRightScriptValue; + + QScriptEngineDebugger debugger; }; #endif /*DEMOGAMELOGIC_H_*/ \ No newline at end of file Modified: trunk/QtOgreFramework/Demo/source/DemoGameLogic.cpp =================================================================== --- trunk/QtOgreFramework/Demo/source/DemoGameLogic.cpp 2010-05-30 21:42:20 UTC (rev 2912) +++ trunk/QtOgreFramework/Demo/source/DemoGameLogic.cpp 2010-05-31 21:09:29 UTC (rev 2913) @@ -119,8 +119,12 @@ "camera.setFOVy(fov);" ; + debugger.attachTo(scriptEngine); + debugger.action(QScriptEngineDebugger::InterruptAction)->trigger(); + + //qApp->setStyleSheet(qApp->settings()->value("UI/StyleFile").toString()); mDemoLog = mApplication->createLog("Demo"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <es...@us...> - 2010-05-30 21:42:26
|
Revision: 2912 http://ogreaddons.svn.sourceforge.net/ogreaddons/?rev=2912&view=rev Author: esuvs Date: 2010-05-30 21:42:20 +0000 (Sun, 30 May 2010) Log Message: ----------- Refactoring of scripting classes. Modified Paths: -------------- trunk/QtOgreFramework/Demo/CMakeLists.txt trunk/QtOgreFramework/Demo/include/ChooseMeshWidget.h trunk/QtOgreFramework/Demo/include/DemoGameLogic.h trunk/QtOgreFramework/Demo/include/MainMenu.h trunk/QtOgreFramework/Demo/include/StyleSettingsWidget.h trunk/QtOgreFramework/Demo/source/ChooseMeshWidget.cpp trunk/QtOgreFramework/Demo/source/DemoGameLogic.cpp trunk/QtOgreFramework/Demo/source/MainMenu.cpp trunk/QtOgreFramework/Demo/source/StyleSettingsWidget.cpp trunk/QtOgreFramework/QtOgre/include/Scripting/OgreRadianClass.h trunk/QtOgreFramework/QtOgre/source/Scripting/OgreRadianClass.cpp Modified: trunk/QtOgreFramework/Demo/CMakeLists.txt =================================================================== --- trunk/QtOgreFramework/Demo/CMakeLists.txt 2010-05-30 16:16:17 UTC (rev 2911) +++ trunk/QtOgreFramework/Demo/CMakeLists.txt 2010-05-30 21:42:20 UTC (rev 2912) @@ -3,17 +3,23 @@ PROJECT(Demo) SET(SRC_FILES + source/CameraWrapper.cpp source/main.cpp + source/Mouse.cpp source/ChooseMeshWidget.cpp source/DemoGameLogic.cpp + source/Keyboard.cpp source/MainMenu.cpp source/StyleSettingsWidget.cpp ) SET(INC_FILES + include/CameraWrapper.h include/ChooseMeshWidget.h include/DemoGameLogic.h + include/Keyboard.h include/MainMenu.h + include/Mouse.h include/StyleSettingsWidget.h ) Modified: trunk/QtOgreFramework/Demo/include/ChooseMeshWidget.h =================================================================== --- trunk/QtOgreFramework/Demo/include/ChooseMeshWidget.h 2010-05-30 16:16:17 UTC (rev 2911) +++ trunk/QtOgreFramework/Demo/include/ChooseMeshWidget.h 2010-05-30 21:42:20 UTC (rev 2912) @@ -5,25 +5,22 @@ #include "OgrePrerequisites.h" -namespace QtOgre +class DemoGameLogic; + +class ChooseMeshWidget : public QWidget, private Ui::ChooseMeshWidget { - class DemoGameLogic; + Q_OBJECT - class ChooseMeshWidget : public QWidget, private Ui::ChooseMeshWidget - { - Q_OBJECT +public: + ChooseMeshWidget(Ogre::Entity* jaiquaEntity, Ogre::Entity* robotEntity, QWidget *parent = 0); - public: - ChooseMeshWidget(Ogre::Entity* jaiquaEntity, Ogre::Entity* robotEntity, QWidget *parent = 0); +public slots: + void on_mJaiquaRadioButton_toggled(bool checked); + void on_mRobotRadioButton_toggled(bool checked); - public slots: - void on_mJaiquaRadioButton_toggled(bool checked); - void on_mRobotRadioButton_toggled(bool checked); +private: + Ogre::Entity* mJaiquaEntity; + Ogre::Entity* mRobotEntity; +}; - private: - Ogre::Entity* mJaiquaEntity; - Ogre::Entity* mRobotEntity; - }; -} - #endif /*CHOOSEMESHWIDGET_H_*/ \ No newline at end of file Modified: trunk/QtOgreFramework/Demo/include/DemoGameLogic.h =================================================================== --- trunk/QtOgreFramework/Demo/include/DemoGameLogic.h 2010-05-30 16:16:17 UTC (rev 2911) +++ trunk/QtOgreFramework/Demo/include/DemoGameLogic.h 2010-05-30 21:42:20 UTC (rev 2912) @@ -1,8 +1,11 @@ #ifndef DEMOGAMELOGIC_H_ #define DEMOGAMELOGIC_H_ +#include "CameraWrapper.h" #include "ChooseMeshWidget.h" #include "GameLogic.h" +#include "Keyboard.h" +#include "Mouse.h" #include "MainMenu.h" #include <OgreCamera.h> @@ -14,219 +17,65 @@ #include <QtScript> -namespace QtOgre -{ - enum KeyStates - { - KS_RELEASED, - KS_PRESSED - }; - - class StyleSettingsWidget; - class Keyboard : public QObject - { - Q_OBJECT - public slots: - bool isPressed(int key) - { - return mKeyStates[key] == KS_PRESSED; - } - - void press(int key) - { - mKeyStates[key] = KS_PRESSED; - } - - void release(int key) - { - mKeyStates[key] = KS_RELEASED; - } - - private: - QHash<int, KeyStates> mKeyStates; - }; - - class Mouse : public QObject - { - Q_OBJECT - public slots: - bool isPressed(int mouseButton) - { - //Note - I'd rather pass a Qt::MouseButton in a parameter to this - //function and avoid the class, but I had problems registering it - //with qScriptRegisterMetaType(). - Qt::MouseButton mb = static_cast<Qt::MouseButton>(mouseButton); - - return mMouseButtons & mb; - } - - void press(int mouseButton) - { - //Note - I'd rather pass a Qt::MouseButton in a parameter to this - //function and avoid the class, but I had problems registering it - //with qScriptRegisterMetaType(). - Qt::MouseButton mb = static_cast<Qt::MouseButton>(mouseButton); - - mMouseButtons |= mb; - } - - void release(int mouseButton) - { - //Note - I'd rather pass a Qt::MouseButton in a parameter to this - //function and avoid the class, but I had problems registering it - //with qScriptRegisterMetaType(). - Qt::MouseButton mb = static_cast<Qt::MouseButton>(mouseButton); - - mMouseButtons &= ~mb; - } - - const QPoint& pos(void) - { - return mPos; - } - - void setPos(const QPoint& pos) - { - mPos = pos; - } - - QPoint computeDelta(void) - { - return mPos - mOldPos; - } - - void resetDelta(void) - { - mOldPos = mPos; - } - - const int wheelPos(void) - { - return mWheelPos; - } - - void setWheelPos(int wheelPos) - { - mWheelPos = wheelPos; - } - - int computeWheelDelta(void) - { - return mWheelPos - mOldWheelPos; - } - - void resetWheelDelta(void) - { - mOldWheelPos = mWheelPos; - } - - private: - Qt::MouseButtons mMouseButtons; - QPoint mPos; - QPoint mOldPos; - int mWheelPos; - int mOldWheelPos; - }; - - class CameraWrapper : public QObject - { - Q_OBJECT - - public: - void setOgreCamera(Ogre::Camera* pOgreCamera) - { - m_pOgreCamera = pOgreCamera; - } - - public slots: - void moveRelative(const Ogre::Vector3 &vec) - { - m_pOgreCamera->moveRelative(vec); - } - - void yaw (const Ogre::Radian &angle) - { - m_pOgreCamera->yaw(angle); - } - - void pitch (const Ogre::Radian &angle) - { - m_pOgreCamera->pitch(angle); - } - - private: - Ogre::Camera* m_pOgreCamera; - }; - - struct MyStruct - { - int x; - int y; - }; +class StyleSettingsWidget; - class DemoGameLogic : public GameLogic - { - public: - DemoGameLogic(void); +class DemoGameLogic : public QtOgre::GameLogic +{ +public: + DemoGameLogic(void); - void initialise(void); - void update(void); - void shutdown(void); + void initialise(void); + void update(void); + void shutdown(void); - void onKeyPress(QKeyEvent* event); - void onKeyRelease(QKeyEvent* event); + void onKeyPress(QKeyEvent* event); + void onKeyRelease(QKeyEvent* event); - void onMouseMove(QMouseEvent* event); - void onMousePress(QMouseEvent* event); - void onMouseRelease(QMouseEvent* event); + void onMouseMove(QMouseEvent* event); + void onMousePress(QMouseEvent* event); + void onMouseRelease(QMouseEvent* event); - void onWheel(QWheelEvent* event); + void onWheel(QWheelEvent* event); - QtOgre::Log* demoLog(void); + QtOgre::Log* demoLog(void); - void loadScene(QString filename); + void loadScene(QString filename); - private: - Keyboard keyboard; - Mouse mouse; - /*QPoint mLastFrameMousePos; - QPoint mCurrentMousePos;*/ +private: + Keyboard keyboard; + Mouse mouse; + /*QPoint mLastFrameMousePos; + QPoint mCurrentMousePos;*/ - /*int mLastFrameWheelPos; - int mCurrentWheelPos;*/ - QTime* mTime; + /*int mLastFrameWheelPos; + int mCurrentWheelPos;*/ + QTime* mTime; - int mLastFrameTime; - int mCurrentTime; + int mLastFrameTime; + int mCurrentTime; - bool mIsFirstFrame; + bool mIsFirstFrame; - float mCameraSpeed; + float mCameraSpeed; - ChooseMeshWidget* mChooseMeshWidget; + ChooseMeshWidget* mChooseMeshWidget; - MainMenu* mMainMenu; + MainMenu* mMainMenu; - StyleSettingsWidget* mStyleSettingsWidget; + StyleSettingsWidget* mStyleSettingsWidget; - Ogre::Camera* mCamera; - Ogre::SceneManager* mSceneManager; - QtOgre::Log* mDemoLog; + Ogre::Camera* mCamera; + Ogre::SceneManager* mSceneManager; + QtOgre::Log* mDemoLog; - //Scripting - QScriptEngine* scriptEngine; - QString updateScript; - CameraWrapper cameraWrapper; - MyStruct myStruct; - QScriptValue cameraPositionScriptValue; - QScriptValue cameraDirectionScriptValue; - QScriptValue cameraRightScriptValue; - }; + //Scripting + QScriptEngine* scriptEngine; + QString updateScript; + CameraWrapper cameraWrapper; + QScriptValue cameraPositionScriptValue; + QScriptValue cameraDirectionScriptValue; + QScriptValue cameraRightScriptValue; +}; - -} - -Q_DECLARE_METATYPE(QtOgre::MyStruct) - #endif /*DEMOGAMELOGIC_H_*/ \ No newline at end of file Modified: trunk/QtOgreFramework/Demo/include/MainMenu.h =================================================================== --- trunk/QtOgreFramework/Demo/include/MainMenu.h 2010-05-30 16:16:17 UTC (rev 2911) +++ trunk/QtOgreFramework/Demo/include/MainMenu.h 2010-05-30 21:42:20 UTC (rev 2912) @@ -5,27 +5,23 @@ #include "Application.h" -namespace QtOgre +class MainMenu : public QDialog, private Ui::MainMenu { + Q_OBJECT - class MainMenu : public QDialog, private Ui::MainMenu - { - Q_OBJECT +public: + MainMenu(QtOgre::Application* application, QWidget* mainWidget, QWidget *parent = 0); - public: - MainMenu(Application* application, QWidget* mainWidget, QWidget *parent = 0); +public slots: + void on_mQuitButton_clicked(void); + void on_mResumeButton_clicked(void); + void on_mSettingsButton_clicked(void); + void on_mViewLogsButton_clicked(void); - public slots: - void on_mQuitButton_clicked(void); - void on_mResumeButton_clicked(void); - void on_mSettingsButton_clicked(void); - void on_mViewLogsButton_clicked(void); +private: + QtOgre::Application *mApplication; + QWidget* mMainWidget; - private: - Application *mApplication; - QWidget* mMainWidget; +}; - }; -} - #endif /*MAINMENU_H_*/ \ No newline at end of file Modified: trunk/QtOgreFramework/Demo/include/StyleSettingsWidget.h =================================================================== --- trunk/QtOgreFramework/Demo/include/StyleSettingsWidget.h 2010-05-30 16:16:17 UTC (rev 2911) +++ trunk/QtOgreFramework/Demo/include/StyleSettingsWidget.h 2010-05-30 21:42:20 UTC (rev 2912) @@ -5,25 +5,21 @@ #include <AbstractSettingsWidget.h> -namespace QtOgre +class StyleSettingsWidget : public QtOgre::AbstractSettingsWidget, private Ui::StyleSettingsWidget { + Q_OBJECT - class StyleSettingsWidget : public AbstractSettingsWidget, private Ui::StyleSettingsWidget - { - Q_OBJECT +public: + StyleSettingsWidget(QWidget *parent = 0); - public: - StyleSettingsWidget(QWidget *parent = 0); + void disableFirstTimeOnlySettings(void); - void disableFirstTimeOnlySettings(void); - - public slots: - void readFromSettings(void); - void writeToSettings(void); +public slots: + void readFromSettings(void); + void writeToSettings(void); - private slots: - void chooseStyleFile(bool); - }; -} +private slots: + void chooseStyleFile(bool); +}; #endif /*QTOGRE_STYLESETTINGSWIDGET_H_*/ Modified: trunk/QtOgreFramework/Demo/source/ChooseMeshWidget.cpp =================================================================== --- trunk/QtOgreFramework/Demo/source/ChooseMeshWidget.cpp 2010-05-30 16:16:17 UTC (rev 2911) +++ trunk/QtOgreFramework/Demo/source/ChooseMeshWidget.cpp 2010-05-30 21:42:20 UTC (rev 2912) @@ -2,26 +2,23 @@ #include <OgreEntity.h> -namespace QtOgre +ChooseMeshWidget::ChooseMeshWidget(Ogre::Entity* jaiquaEntity, Ogre::Entity* robotEntity, QWidget *parent) + :QWidget(parent, Qt::Tool) { - ChooseMeshWidget::ChooseMeshWidget(Ogre::Entity* jaiquaEntity, Ogre::Entity* robotEntity, QWidget *parent) - :QWidget(parent, Qt::Tool) - { - setupUi(this); + setupUi(this); - mJaiquaEntity = jaiquaEntity; - mRobotEntity = robotEntity; - } + mJaiquaEntity = jaiquaEntity; + mRobotEntity = robotEntity; +} - void ChooseMeshWidget::on_mJaiquaRadioButton_toggled(bool checked) - { - mRobotEntity->setVisible(!checked); - mJaiquaEntity->setVisible(checked); - } +void ChooseMeshWidget::on_mJaiquaRadioButton_toggled(bool checked) +{ + mRobotEntity->setVisible(!checked); + mJaiquaEntity->setVisible(checked); +} - void ChooseMeshWidget::on_mRobotRadioButton_toggled(bool checked) - { - mRobotEntity->setVisible(checked); - mJaiquaEntity->setVisible(!checked); - } +void ChooseMeshWidget::on_mRobotRadioButton_toggled(bool checked) +{ + mRobotEntity->setVisible(checked); + mJaiquaEntity->setVisible(!checked); } \ No newline at end of file Modified: trunk/QtOgreFramework/Demo/source/DemoGameLogic.cpp =================================================================== --- trunk/QtOgreFramework/Demo/source/DemoGameLogic.cpp 2010-05-30 16:16:17 UTC (rev 2911) +++ trunk/QtOgreFramework/Demo/source/DemoGameLogic.cpp 2010-05-30 21:42:20 UTC (rev 2912) @@ -20,22 +20,8 @@ #include <QMetaObject> -namespace QtOgre -{ - QScriptValue toScriptValue(QScriptEngine *engine, const MyStruct &s) - { - QScriptValue obj = engine->newObject(); - obj.setProperty("x", s.x); - obj.setProperty("y", s.y); - return obj; - } +using namespace QtOgre; - void fromScriptValue(const QScriptValue &obj, MyStruct &s) - { - s.x = obj.property("x").toInt32(); - s.y = obj.property("y").toInt32(); - } - QScriptValue toScriptValueQPoint(QScriptEngine *engine, const QPoint &s) { QScriptValue obj = engine->newObject(); @@ -83,11 +69,6 @@ Qt.setProperty("App", scriptEngine->newQObject(qApp)); scriptEngine->globalObject().setProperty("Qt", Qt); - myStruct.x = 10; - qScriptRegisterMetaType(scriptEngine, toScriptValue, fromScriptValue); - QScriptValue myStructValue = scriptEngine->toScriptValue(myStruct); - scriptEngine->globalObject().setProperty("myStruct", myStructValue); - qScriptRegisterMetaType(scriptEngine, toScriptValueQPoint, fromScriptValueQPoint); OgreVector3Class *vecClass = new OgreVector3Class(scriptEngine); @@ -128,6 +109,14 @@ " mouseDelta = mouse.computeDelta();" " camera.pitch(new OgreRadian(-mouseDelta.y * 0.01));" "}" + "wheelDelta = mouse.getWheelDelta();" + "print('wheelDelta = ', wheelDelta);" + "fov = camera.getFOVy();" + "print('old fov = ', fov.valueRadians);" + "tempFOV = new OgreRadian(-wheelDelta * 0.001);" + "fov.valueRadians = fov.valueRadians + tempFOV.valueRadians;" + "print('new fov = ', fov.valueRadians);" + "camera.setFOVy(fov);" ; @@ -221,20 +210,6 @@ float distance = mCameraSpeed * timeElapsedInSeconds; - /*if(mouse.isPressed(Qt::LeftButton)) - { - QPoint mouseDelta = mouse.computeDelta(); - mCamera->yaw(Ogre::Radian(-mouseDelta.x() * timeElapsedInSeconds)); - mCamera->pitch(Ogre::Radian(-mouseDelta.y() * timeElapsedInSeconds)); - - int wheelDelta = mouse.computeWheelDelta(); - Ogre::Radian fov = mCamera->getFOVy(); - fov += Ogre::Radian(-wheelDelta * 0.001); - fov = (std::min)(fov, Ogre::Radian(2.0f)); - fov = (std::max)(fov, Ogre::Radian(0.5f)); - mCamera->setFOVy(fov); - }*/ - mIsFirstFrame = false; QScriptValue result = scriptEngine->evaluate(updateScript); @@ -293,7 +268,7 @@ void DemoGameLogic::onWheel(QWheelEvent* event) { //mCurrentWheelPos += event->delta(); - mouse.setWheelPos(mouse.wheelPos() + event->delta()); + mouse.modifyWheelDelta(event->delta()); } Log* DemoGameLogic::demoLog(void) @@ -333,5 +308,4 @@ viewport->setBackgroundColour(Ogre::ColourValue::Black); cameraWrapper.setOgreCamera(mCamera); - } -} \ No newline at end of file + } \ No newline at end of file Modified: trunk/QtOgreFramework/Demo/source/MainMenu.cpp =================================================================== --- trunk/QtOgreFramework/Demo/source/MainMenu.cpp 2010-05-30 16:16:17 UTC (rev 2911) +++ trunk/QtOgreFramework/Demo/source/MainMenu.cpp 2010-05-30 21:42:20 UTC (rev 2912) @@ -4,35 +4,34 @@ #include "OgreWidget.h" #include "SettingsDialog.h" -namespace QtOgre +using namespace QtOgre; + +MainMenu::MainMenu(Application* application, QWidget* mainWidget, QWidget *parent) +:QDialog(parent) { - MainMenu::MainMenu(Application* application, QWidget* mainWidget, QWidget *parent) - :QDialog(parent) - { - setupUi(this); + setupUi(this); - mApplication = application; - mMainWidget = mainWidget; - } + mApplication = application; + mMainWidget = mainWidget; +} - void MainMenu::on_mQuitButton_clicked(void) - { - mMainWidget->close(); - } +void MainMenu::on_mQuitButton_clicked(void) +{ + mMainWidget->close(); +} - void MainMenu::on_mResumeButton_clicked(void) - { - reject(); - } +void MainMenu::on_mResumeButton_clicked(void) +{ + reject(); +} - void MainMenu::on_mSettingsButton_clicked(void) - { - mApplication->showSettingsDialog(); - } +void MainMenu::on_mSettingsButton_clicked(void) +{ + mApplication->showSettingsDialog(); +} - void MainMenu::on_mViewLogsButton_clicked(void) - { - mApplication->showLogManager(); - //reject(); - } +void MainMenu::on_mViewLogsButton_clicked(void) +{ + mApplication->showLogManager(); + //reject(); } \ No newline at end of file Modified: trunk/QtOgreFramework/Demo/source/StyleSettingsWidget.cpp =================================================================== --- trunk/QtOgreFramework/Demo/source/StyleSettingsWidget.cpp 2010-05-30 16:16:17 UTC (rev 2911) +++ trunk/QtOgreFramework/Demo/source/StyleSettingsWidget.cpp 2010-05-30 21:42:20 UTC (rev 2912) @@ -5,39 +5,38 @@ #include <QSettings> #include <QFileDialog> -namespace QtOgre +using namespace QtOgre; + +StyleSettingsWidget::StyleSettingsWidget(QWidget *parent) +:AbstractSettingsWidget(parent) { - StyleSettingsWidget::StyleSettingsWidget(QWidget *parent) - :AbstractSettingsWidget(parent) - { - setupUi(this); + setupUi(this); - connect(browseButton, SIGNAL(clicked(bool)), this, SLOT(chooseStyleFile(bool))); - } + connect(browseButton, SIGNAL(clicked(bool)), this, SLOT(chooseStyleFile(bool))); +} - void StyleSettingsWidget::disableFirstTimeOnlySettings(void) - { - //None - } +void StyleSettingsWidget::disableFirstTimeOnlySettings(void) +{ + //None +} - void StyleSettingsWidget::readFromSettings(void) - { - fileLineEdit->setText(mSettings->value("UI/StyleFile").toString()); - } +void StyleSettingsWidget::readFromSettings(void) +{ + fileLineEdit->setText(mSettings->value("UI/StyleFile").toString()); +} - void StyleSettingsWidget::writeToSettings(void) - { - mSettings->setValue("UI/StyleFile", fileLineEdit->text()); - QFile styleFile(fileLineEdit->text()); - styleFile.open(QIODevice::ReadOnly | QIODevice::Text); - qApp->setStyleSheet(QString(styleFile.readAll())); - styleFile.close(); - } +void StyleSettingsWidget::writeToSettings(void) +{ + mSettings->setValue("UI/StyleFile", fileLineEdit->text()); + QFile styleFile(fileLineEdit->text()); + styleFile.open(QIODevice::ReadOnly | QIODevice::Text); + qApp->setStyleSheet(QString(styleFile.readAll())); + styleFile.close(); +} - void StyleSettingsWidget::chooseStyleFile(bool checked) - { - //QFileDialog fileDialog(this, "Style file"); - //fileDialog.setNameFilter("Qt Style Files (*.qss)"); - fileLineEdit->setText(QFileDialog::getOpenFileName(this, "Style file", "", "Qt Style Files (*.qss)")); - } +void StyleSettingsWidget::chooseStyleFile(bool checked) +{ + //QFileDialog fileDialog(this, "Style file"); + //fileDialog.setNameFilter("Qt Style Files (*.qss)"); + fileLineEdit->setText(QFileDialog::getOpenFileName(this, "Style file", "", "Qt Style Files (*.qss)")); } Modified: trunk/QtOgreFramework/QtOgre/include/Scripting/OgreRadianClass.h =================================================================== --- trunk/QtOgreFramework/QtOgre/include/Scripting/OgreRadianClass.h 2010-05-30 16:16:17 UTC (rev 2911) +++ trunk/QtOgreFramework/QtOgre/include/Scripting/OgreRadianClass.h 2010-05-30 21:42:20 UTC (rev 2912) @@ -42,7 +42,7 @@ static QScriptValue toScriptValue(QScriptEngine *eng, const Ogre::Radian &ba); static void fromScriptValue(const QScriptValue &obj, Ogre::Radian &ba); - //QScriptString x; + QScriptString valueRadians; //QScriptString y; //QScriptString z; QScriptValue proto; Modified: trunk/QtOgreFramework/QtOgre/source/Scripting/OgreRadianClass.cpp =================================================================== --- trunk/QtOgreFramework/QtOgre/source/Scripting/OgreRadianClass.cpp 2010-05-30 16:16:17 UTC (rev 2911) +++ trunk/QtOgreFramework/QtOgre/source/Scripting/OgreRadianClass.cpp 2010-05-30 21:42:20 UTC (rev 2912) @@ -11,7 +11,7 @@ { qScriptRegisterMetaType<Ogre::Radian>(engine, toScriptValue, fromScriptValue); - //x = engine->toStringHandle(QLatin1String("x")); + valueRadians = engine->toStringHandle(QLatin1String("valueRadians")); //y = engine->toStringHandle(QLatin1String("y")); //z = engine->toStringHandle(QLatin1String("z")); @@ -38,11 +38,11 @@ Ogre::Radian *ba = qscriptvalue_cast<Ogre::Radian*>(object.data()); if (!ba) return 0; - /*if (name == x) + if (name == valueRadians) { return flags; } - if (name == y) + /*if (name == y) { return flags; } @@ -59,11 +59,11 @@ Ogre::Radian *ba = qscriptvalue_cast<Ogre::Radian*>(object.data()); if (!ba) return QScriptValue(); - /*if (name == x) + if (name == valueRadians) { - return ba->x; + return ba->valueRadians(); } - if (name == y) + /*if (name == y) { return ba->y; } @@ -81,11 +81,11 @@ Ogre::Radian *ba = qscriptvalue_cast<Ogre::Radian*>(object.data()); if (!ba) return; - /* if (name == x) + if (name == valueRadians) { - ba->x = value.toNumber(); + *ba = value.toNumber(); } - if (name == y) + /*if (name == y) { ba->y = value.toNumber(); } @@ -98,12 +98,12 @@ QScriptValue::PropertyFlags OgreRadianClass::propertyFlags( const QScriptValue &/*object*/, const QScriptString &name, uint /*id*/) { - /* if (name == x) + if (name == valueRadians) { return QScriptValue::Undeletable | QScriptValue::SkipInEnumeration; } - if (name == y) + /*if (name == y) { return QScriptValue::Undeletable | QScriptValue::SkipInEnumeration; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <es...@us...> - 2010-05-30 16:16:24
|
Revision: 2911 http://ogreaddons.svn.sourceforge.net/ogreaddons/?rev=2911&view=rev Author: esuvs Date: 2010-05-30 16:16:17 +0000 (Sun, 30 May 2010) Log Message: ----------- Work exposing mouse to QtScript. Modified Paths: -------------- trunk/QtOgreFramework/Demo/include/DemoGameLogic.h trunk/QtOgreFramework/Demo/source/DemoGameLogic.cpp Modified: trunk/QtOgreFramework/Demo/include/DemoGameLogic.h =================================================================== --- trunk/QtOgreFramework/Demo/include/DemoGameLogic.h 2010-05-29 11:30:23 UTC (rev 2910) +++ trunk/QtOgreFramework/Demo/include/DemoGameLogic.h 2010-05-30 16:16:17 UTC (rev 2911) @@ -45,6 +45,88 @@ private: QHash<int, KeyStates> mKeyStates; + }; + + class Mouse : public QObject + { + Q_OBJECT + public slots: + bool isPressed(int mouseButton) + { + //Note - I'd rather pass a Qt::MouseButton in a parameter to this + //function and avoid the class, but I had problems registering it + //with qScriptRegisterMetaType(). + Qt::MouseButton mb = static_cast<Qt::MouseButton>(mouseButton); + + return mMouseButtons & mb; + } + + void press(int mouseButton) + { + //Note - I'd rather pass a Qt::MouseButton in a parameter to this + //function and avoid the class, but I had problems registering it + //with qScriptRegisterMetaType(). + Qt::MouseButton mb = static_cast<Qt::MouseButton>(mouseButton); + + mMouseButtons |= mb; + } + + void release(int mouseButton) + { + //Note - I'd rather pass a Qt::MouseButton in a parameter to this + //function and avoid the class, but I had problems registering it + //with qScriptRegisterMetaType(). + Qt::MouseButton mb = static_cast<Qt::MouseButton>(mouseButton); + + mMouseButtons &= ~mb; + } + + const QPoint& pos(void) + { + return mPos; + } + + void setPos(const QPoint& pos) + { + mPos = pos; + } + + QPoint computeDelta(void) + { + return mPos - mOldPos; + } + + void resetDelta(void) + { + mOldPos = mPos; + } + + const int wheelPos(void) + { + return mWheelPos; + } + + void setWheelPos(int wheelPos) + { + mWheelPos = wheelPos; + } + + int computeWheelDelta(void) + { + return mWheelPos - mOldWheelPos; + } + + void resetWheelDelta(void) + { + mOldWheelPos = mWheelPos; + } + + private: + Qt::MouseButtons mMouseButtons; + QPoint mPos; + QPoint mOldPos; + int mWheelPos; + int mOldWheelPos; }; class CameraWrapper : public QObject @@ -68,6 +150,11 @@ m_pOgreCamera->yaw(angle); } + void pitch (const Ogre::Radian &angle) + { + m_pOgreCamera->pitch(angle); + } + private: Ogre::Camera* m_pOgreCamera; }; @@ -92,6 +179,7 @@ void onMouseMove(QMouseEvent* event); void onMousePress(QMouseEvent* event); + void onMouseRelease(QMouseEvent* event); void onWheel(QWheelEvent* event); @@ -101,11 +189,12 @@ private: Keyboard keyboard; - QPoint mLastFrameMousePos; - QPoint mCurrentMousePos; + Mouse mouse; + /*QPoint mLastFrameMousePos; + QPoint mCurrentMousePos;*/ - int mLastFrameWheelPos; - int mCurrentWheelPos; + /*int mLastFrameWheelPos; + int mCurrentWheelPos;*/ QTime* mTime; int mLastFrameTime; Modified: trunk/QtOgreFramework/Demo/source/DemoGameLogic.cpp =================================================================== --- trunk/QtOgreFramework/Demo/source/DemoGameLogic.cpp 2010-05-29 11:30:23 UTC (rev 2910) +++ trunk/QtOgreFramework/Demo/source/DemoGameLogic.cpp 2010-05-30 16:16:17 UTC (rev 2911) @@ -36,6 +36,20 @@ s.y = obj.property("y").toInt32(); } + QScriptValue toScriptValueQPoint(QScriptEngine *engine, const QPoint &s) + { + QScriptValue obj = engine->newObject(); + obj.setProperty("x", s.x()); + obj.setProperty("y", s.y()); + return obj; + } + + void fromScriptValueQPoint(const QScriptValue &obj, QPoint &s) + { + s.setX(obj.property("x").toInt32()); + s.setY(obj.property("y").toInt32()); + } + struct QtMetaObject : private QObject { public: @@ -52,9 +66,16 @@ { scriptEngine = new QScriptEngine; + scriptEngine->importExtension("qt.core"); + scriptEngine->importExtension("qt.gui"); + + QScriptValue keyboardScriptValue = scriptEngine->newQObject(&keyboard); scriptEngine->globalObject().setProperty("keyboard", keyboardScriptValue); + QScriptValue mouseScriptValue = scriptEngine->newQObject(&mouse); + scriptEngine->globalObject().setProperty("mouse", mouseScriptValue); + QScriptValue cameraScriptValue = scriptEngine->newQObject(&cameraWrapper); scriptEngine->globalObject().setProperty("camera", cameraScriptValue); @@ -62,31 +83,19 @@ Qt.setProperty("App", scriptEngine->newQObject(qApp)); scriptEngine->globalObject().setProperty("Qt", Qt); - //OgreVector3Class* cameraPosition = new OgreVector3Class(scriptEngine); - /*cameraPositionScriptValue = scriptEngine->newObject(cameraPosition); - scriptEngine->globalObject().setProperty("cameraPosition", cameraPositionScriptValue);*/ - - //OgreVector3Class* cameraDirection = new OgreVector3Class(scriptEngine); - /*cameraDirectionScriptValue = scriptEngine->newObject(cameraDirection); - scriptEngine->globalObject().setProperty("cameraDirection", cameraDirectionScriptValue);*/ - - //OgreVector3Class* cameraRight = new OgreVector3Class(scriptEngine); - /*cameraRightScriptValue = scriptEngine->newObject(cameraRight); - scriptEngine->globalObject().setProperty("cameraRight", cameraRightScriptValue);*/ - myStruct.x = 10; qScriptRegisterMetaType(scriptEngine, toScriptValue, fromScriptValue); QScriptValue myStructValue = scriptEngine->toScriptValue(myStruct); scriptEngine->globalObject().setProperty("myStruct", myStructValue); + qScriptRegisterMetaType(scriptEngine, toScriptValueQPoint, fromScriptValueQPoint); + OgreVector3Class *vecClass = new OgreVector3Class(scriptEngine); scriptEngine->globalObject().setProperty("OgreVector3", vecClass->constructor()); OgreRadianClass *radianClass = new OgreRadianClass(scriptEngine); scriptEngine->globalObject().setProperty("OgreRadian", radianClass->constructor()); - //updateScript = "print('w pressed = ', keyboard.isPressed(Qt.Key_W));"; - updateScript = "vec = new OgreVector3;" "vec.x = 0.0;" @@ -109,8 +118,16 @@ " vec.x = 1.0;" "}" "camera.moveRelative(vec);" - /*"rad = new OgreRadian(0.1);" - "camera.yaw(rad);"*/ + "if(mouse.isPressed(Qt.RightButton))" + "{" + " mouseDelta = mouse.computeDelta();" + " camera.yaw(new OgreRadian(-mouseDelta.x * 0.01));" + "}" + "if(mouse.isPressed(Qt.RightButton))" + "{" + " mouseDelta = mouse.computeDelta();" + " camera.pitch(new OgreRadian(-mouseDelta.y * 0.01));" + "}" ; @@ -204,61 +221,22 @@ float distance = mCameraSpeed * timeElapsedInSeconds; - /*if(keyboard.isPressed(Qt::Key_W)) + /*if(mouse.isPressed(Qt::LeftButton)) { - mCamera->setPosition(mCamera->getPosition() + mCamera->getDirection() * distance); - } - if(keyboard.isPressed(Qt::Key_S)) - { - mCamera->setPosition(mCamera->getPosition() - mCamera->getDirection() * distance); - } - if(keyboard.isPressed(Qt::Key_A)) - { - mCamera->setPosition(mCamera->getPosition() - mCamera->getRight() * distance); - } - if(keyboard.isPressed(Qt::Key_D)) - { - mCamera->setPosition(mCamera->getPosition() + mCamera->getRight() * distance); - }*/ - - if(!mIsFirstFrame) - { - QPoint mouseDelta = mCurrentMousePos - mLastFrameMousePos; + QPoint mouseDelta = mouse.computeDelta(); mCamera->yaw(Ogre::Radian(-mouseDelta.x() * timeElapsedInSeconds)); mCamera->pitch(Ogre::Radian(-mouseDelta.y() * timeElapsedInSeconds)); - int wheelDelta = mCurrentWheelPos - mLastFrameWheelPos; + int wheelDelta = mouse.computeWheelDelta(); Ogre::Radian fov = mCamera->getFOVy(); fov += Ogre::Radian(-wheelDelta * 0.001); fov = (std::min)(fov, Ogre::Radian(2.0f)); fov = (std::max)(fov, Ogre::Radian(0.5f)); mCamera->setFOVy(fov); - } - mLastFrameMousePos = mCurrentMousePos; - mLastFrameWheelPos = mCurrentWheelPos; + }*/ mIsFirstFrame = false; - /*cameraPositionScriptValue.setProperty("x", mCamera->getPosition().x); - cameraPositionScriptValue.setProperty("y", mCamera->getPosition().y); - cameraPositionScriptValue.setProperty("z", mCamera->getPosition().z);*/ - - /*cameraDirectionScriptValue.setProperty("x", mCamera->getDirection().x); - cameraDirectionScriptValue.setProperty("y", mCamera->getDirection().y); - cameraDirectionScriptValue.setProperty("z", mCamera->getDirection().z); - - cameraRightScriptValue.setProperty("x", mCamera->getRight().x); - cameraRightScriptValue.setProperty("y", mCamera->getRight().y); - cameraRightScriptValue.setProperty("z", mCamera->getRight().z);*/ - - /*cameraPositionScriptValue = scriptEngine->toScriptValue(mCamera->getPosition()); - cameraDirectionScriptValue = scriptEngine->toScriptValue(mCamera->getDirection()); - cameraRightScriptValue = scriptEngine->toScriptValue(mCamera->getRight()); - - scriptEngine->globalObject().setProperty("cameraPosition", cameraPositionScriptValue); - scriptEngine->globalObject().setProperty("cameraDirection", cameraDirectionScriptValue); - scriptEngine->globalObject().setProperty("cameraRight", cameraRightScriptValue);*/ - QScriptValue result = scriptEngine->evaluate(updateScript); if (scriptEngine->hasUncaughtException()) { @@ -266,17 +244,8 @@ qCritical() << "uncaught exception at line" << line << ":" << result.toString(); } - //mCamera->setPosition(scriptEngine->fromScriptValue<Ogre::Vector3>(cameraPositionScriptValue)); - //mCamera->setDirection(scriptEngine->fromScriptValue<Ogre::Vector3>(cameraDirectionScriptValue)); - - //mCamera->setPosition(cameraPositionScriptValue.property("x").toNumber(), cameraPositionScriptValue.property("y").toNumber(), cameraPositionScriptValue.property("z").toNumber()); - //mCamera->setDirection(cameraDirectionScriptValue.property("x").toNumber(), cameraDirectionScriptValue.property("y").toNumber(), cameraDirectionScriptValue.property("z").toNumber()); - //mCamera->setRight(cameraRightScriptValue.property("x").toNumber(), cameraRightScriptValue.property("y").toNumber(), cameraRightScriptValue.property("z").toNumber()); - - - //cameraWrapper.moveForward(); - - //std::cout << "From C++: myStruct.x = " << myStruct.x << std::endl; + mouse.resetDelta(); + mouse.resetWheelDelta(); } void DemoGameLogic::shutdown(void) @@ -303,18 +272,28 @@ void DemoGameLogic::onMousePress(QMouseEvent* event) { - mCurrentMousePos = event->pos(); - mLastFrameMousePos = mCurrentMousePos; + mouse.press(event->button()); + + //Update the mouse position as well or we get 'jumps' + mouse.setPos(event->pos()); + mouse.resetDelta(); } + void DemoGameLogic::onMouseRelease(QMouseEvent* event) + { + mouse.release(event->button()); + } + void DemoGameLogic::onMouseMove(QMouseEvent* event) { - mCurrentMousePos = event->pos(); + //mCurrentMousePos = event->pos(); + mouse.setPos(event->pos()); } void DemoGameLogic::onWheel(QWheelEvent* event) { - mCurrentWheelPos += event->delta(); + //mCurrentWheelPos += event->delta(); + mouse.setWheelPos(mouse.wheelPos() + event->delta()); } Log* DemoGameLogic::demoLog(void) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <es...@us...> - 2010-05-29 11:30:29
|
Revision: 2910 http://ogreaddons.svn.sourceforge.net/ogreaddons/?rev=2910&view=rev Author: esuvs Date: 2010-05-29 11:30:23 +0000 (Sat, 29 May 2010) Log Message: ----------- Added Scriptable radian class, removed camera class. Modified Paths: -------------- trunk/QtOgreFramework/Demo/include/DemoGameLogic.h trunk/QtOgreFramework/Demo/source/DemoGameLogic.cpp trunk/QtOgreFramework/QtOgre/CMakeLists.txt Added Paths: ----------- trunk/QtOgreFramework/QtOgre/include/Scripting/OgreRadianClass.h trunk/QtOgreFramework/QtOgre/include/Scripting/OgreRadianPrototype.h trunk/QtOgreFramework/QtOgre/source/Scripting/OgreRadianClass.cpp trunk/QtOgreFramework/QtOgre/source/Scripting/OgreRadianPrototype.cpp Removed Paths: ------------- trunk/QtOgreFramework/QtOgre/include/Scripting/OgreCameraClass.h trunk/QtOgreFramework/QtOgre/include/Scripting/OgreCameraPrototype.h trunk/QtOgreFramework/QtOgre/source/Scripting/OgreCameraClass.cpp trunk/QtOgreFramework/QtOgre/source/Scripting/OgreCameraPrototype.cpp Modified: trunk/QtOgreFramework/Demo/include/DemoGameLogic.h =================================================================== --- trunk/QtOgreFramework/Demo/include/DemoGameLogic.h 2010-05-29 09:47:13 UTC (rev 2909) +++ trunk/QtOgreFramework/Demo/include/DemoGameLogic.h 2010-05-29 11:30:23 UTC (rev 2910) @@ -58,14 +58,16 @@ } public slots: - void moveForward() + void moveRelative(const Ogre::Vector3 &vec) { - Ogre::Vector3 dir = m_pOgreCamera->getDirection(); - dir.normalise(); - dir *= 0.01; - m_pOgreCamera->setPosition(m_pOgreCamera->getPosition() + dir); + m_pOgreCamera->moveRelative(vec); } + void yaw (const Ogre::Radian &angle) + { + m_pOgreCamera->yaw(angle); + } + private: Ogre::Camera* m_pOgreCamera; }; Modified: trunk/QtOgreFramework/Demo/source/DemoGameLogic.cpp =================================================================== --- trunk/QtOgreFramework/Demo/source/DemoGameLogic.cpp 2010-05-29 09:47:13 UTC (rev 2909) +++ trunk/QtOgreFramework/Demo/source/DemoGameLogic.cpp 2010-05-29 11:30:23 UTC (rev 2910) @@ -2,6 +2,7 @@ #include "DotSceneHandler.h" #include "MainMenu.h" +#include "Scripting/OgreRadianClass.h" #include "Scripting/OgreVector3Class.h" #include "LogManager.h" @@ -81,41 +82,35 @@ OgreVector3Class *vecClass = new OgreVector3Class(scriptEngine); scriptEngine->globalObject().setProperty("OgreVector3", vecClass->constructor()); + OgreRadianClass *radianClass = new OgreRadianClass(scriptEngine); + scriptEngine->globalObject().setProperty("OgreRadian", radianClass->constructor()); + //updateScript = "print('w pressed = ', keyboard.isPressed(Qt.Key_W));"; updateScript = + "vec = new OgreVector3;" + "vec.x = 0.0;" + "vec.y = 0.0;" + "vec.z = 0.0;" "if(keyboard.isPressed(Qt.Key_W))" - "{" - " vec = new OgreVector3;" - " vec.x = 1.0;" - " vec.y = 1.0;" - " vec.z = 1.0;" - " vec.normalise();" - " print('vec x = ', vec.x);" - " myStruct.x = myStruct.x + 1;" - " cameraPosition.x = cameraPosition.x + cameraDirection.x;" - " cameraPosition.y = cameraPosition.y + cameraDirection.y;" - " cameraPosition.z = cameraPosition.z + cameraDirection.z;" - " print('x = ', myStruct.x);" + "{" + " vec.z = -1.0;" "}" "if(keyboard.isPressed(Qt.Key_S))" - "{" - " cameraPosition.x = cameraPosition.x - cameraDirection.x;" - " cameraPosition.y = cameraPosition.y - cameraDirection.y;" - " cameraPosition.z = cameraPosition.z - cameraDirection.z;" + "{" + " vec.z = 1.0;" "}" - "if(keyboard.isPressed(Qt.Key_D))" - "{" - " cameraPosition.x = cameraPosition.x + cameraRight.x;" - " cameraPosition.y = cameraPosition.y + cameraRight.y;" - " cameraPosition.z = cameraPosition.z + cameraRight.z;" - "}" "if(keyboard.isPressed(Qt.Key_A))" - "{" - " cameraPosition.x = cameraPosition.x - cameraRight.x;" - " cameraPosition.y = cameraPosition.y - cameraRight.y;" - " cameraPosition.z = cameraPosition.z - cameraRight.z;" + "{" + " vec.x = -1.0;" "}" + "if(keyboard.isPressed(Qt.Key_D))" + "{" + " vec.x = 1.0;" + "}" + "camera.moveRelative(vec);" + /*"rad = new OgreRadian(0.1);" + "camera.yaw(rad);"*/ ; @@ -179,13 +174,13 @@ mStyleSettingsWidget = new StyleSettingsWidget; mApplication->addSettingsWidget("Style", mStyleSettingsWidget); - cameraPositionScriptValue = scriptEngine->toScriptValue(mCamera->getPosition()); + /*cameraPositionScriptValue = scriptEngine->toScriptValue(mCamera->getPosition()); cameraDirectionScriptValue = scriptEngine->toScriptValue(mCamera->getDirection()); cameraRightScriptValue = scriptEngine->toScriptValue(mCamera->getRight()); scriptEngine->globalObject().setProperty("cameraPosition", cameraPositionScriptValue); scriptEngine->globalObject().setProperty("cameraDirection", cameraDirectionScriptValue); - scriptEngine->globalObject().setProperty("cameraRight", cameraRightScriptValue); + scriptEngine->globalObject().setProperty("cameraRight", cameraRightScriptValue);*/ } void DemoGameLogic::update(void) @@ -271,8 +266,8 @@ qCritical() << "uncaught exception at line" << line << ":" << result.toString(); } - mCamera->setPosition(scriptEngine->fromScriptValue<Ogre::Vector3>(cameraPositionScriptValue)); - mCamera->setDirection(scriptEngine->fromScriptValue<Ogre::Vector3>(cameraDirectionScriptValue)); + //mCamera->setPosition(scriptEngine->fromScriptValue<Ogre::Vector3>(cameraPositionScriptValue)); + //mCamera->setDirection(scriptEngine->fromScriptValue<Ogre::Vector3>(cameraDirectionScriptValue)); //mCamera->setPosition(cameraPositionScriptValue.property("x").toNumber(), cameraPositionScriptValue.property("y").toNumber(), cameraPositionScriptValue.property("z").toNumber()); //mCamera->setDirection(cameraDirectionScriptValue.property("x").toNumber(), cameraDirectionScriptValue.property("y").toNumber(), cameraDirectionScriptValue.property("z").toNumber()); Modified: trunk/QtOgreFramework/QtOgre/CMakeLists.txt =================================================================== --- trunk/QtOgreFramework/QtOgre/CMakeLists.txt 2010-05-29 09:47:13 UTC (rev 2909) +++ trunk/QtOgreFramework/QtOgre/CMakeLists.txt 2010-05-29 11:30:23 UTC (rev 2910) @@ -22,8 +22,8 @@ source/LogModelSortFilterProxy.cpp source/OgreWidget.cpp source/SettingsDialog.cpp - source/Scripting/OgreCameraClass.cpp - source/Scripting/OgreCameraPrototype.cpp + source/Scripting/OgreRadianClass.cpp + source/Scripting/OgreRadianPrototype.cpp source/Scripting/OgreVector3Class.cpp source/Scripting/OgreVector3Prototype.cpp ) @@ -46,8 +46,8 @@ include/OgreWidget.h include/QtOgreForwardDeclarations.h include/SettingsDialog.h - include/Scripting/OgreCameraClass.h - include/Scripting/OgreCameraPrototype.h + include/Scripting/OgreRadianClass.h + include/Scripting/OgreRadianPrototype.h include/Scripting/OgreVector3Class.h include/Scripting/OgreVector3Prototype.h ) Deleted: trunk/QtOgreFramework/QtOgre/include/Scripting/OgreCameraClass.h =================================================================== --- trunk/QtOgreFramework/QtOgre/include/Scripting/OgreCameraClass.h 2010-05-29 09:47:13 UTC (rev 2909) +++ trunk/QtOgreFramework/QtOgre/include/Scripting/OgreCameraClass.h 2010-05-29 11:30:23 UTC (rev 2910) @@ -1,49 +0,0 @@ -#ifndef OGRECAMERACLASS_H -#define OGRECAMERACLASS_H - -#include <QtCore/QObject> -#include <QtScript/QScriptClass> -#include <QtScript/QScriptContext> -#include <QtScript/QScriptString> - -#include <OgreCamera.h> - -class OgreCameraClass : public QObject, public QScriptClass -{ -public: - OgreCameraClass(QScriptEngine *engine); - ~OgreCameraClass(); - - //QScriptValue constructor(); - - //QScriptValue newInstance(int size = 0); - //QScriptValue newInstance(const Ogre::Camera &ba); - - QueryFlags queryProperty(const QScriptValue &object, - const QScriptString &name, - QueryFlags flags, uint *id); - - QScriptValue property(const QScriptValue &object, - const QScriptString &name, uint id); - - void setProperty(QScriptValue &object, const QScriptString &name, - uint id, const QScriptValue &value); - - QScriptValue::PropertyFlags propertyFlags( - const QScriptValue &object, const QScriptString &name, uint id); - - QString name() const; - - QScriptValue prototype() const; - -private: - //static QScriptValue construct(QScriptContext *ctx, QScriptEngine *eng); - - //static QScriptValue toScriptValue(QScriptEngine *eng, const Ogre::Camera &ba); - //static void fromScriptValue(const QScriptValue &obj, Ogre::Camera &ba); - - QScriptValue proto; - //QScriptValue ctor; -}; - -#endif //OGRECAMERACLASS_H Deleted: trunk/QtOgreFramework/QtOgre/include/Scripting/OgreCameraPrototype.h =================================================================== --- trunk/QtOgreFramework/QtOgre/include/Scripting/OgreCameraPrototype.h 2010-05-29 09:47:13 UTC (rev 2909) +++ trunk/QtOgreFramework/QtOgre/include/Scripting/OgreCameraPrototype.h 2010-05-29 11:30:23 UTC (rev 2910) @@ -1,28 +0,0 @@ -#ifndef OGRECAMERAPROTOTYPE_H -#define OGRECAMERAPROTOTYPE_H - -#include <OgreCamera.h> -#include <OgreVector3.h> - -#include <QtCore/QObject> -#include <QtScript/QScriptable> -#include <QtScript/QScriptValue> - -class OgreCameraPrototype : public QObject, public QScriptable -{ -Q_OBJECT -public: - OgreCameraPrototype(QObject *parent = 0); - ~OgreCameraPrototype(); - -public slots: - QScriptValue valueOf() const; - - void setPosition(const Ogre::Vector3 &vec); - -private: - Ogre::Camera* thisOgreCamera() const; -}; - - -#endif //OGRECAMERAPROTOTYPE_H Added: trunk/QtOgreFramework/QtOgre/include/Scripting/OgreRadianClass.h =================================================================== --- trunk/QtOgreFramework/QtOgre/include/Scripting/OgreRadianClass.h (rev 0) +++ trunk/QtOgreFramework/QtOgre/include/Scripting/OgreRadianClass.h 2010-05-29 11:30:23 UTC (rev 2910) @@ -0,0 +1,56 @@ +#ifndef OGRERADIANCLASS_H +#define OGRERADIANCLASS_H + +#include <QtCore/QObject> +#include <QtScript/QScriptClass> +#include <QtScript/QScriptContext> +#include <QtScript/QScriptString> + +#include <OgreMath.h> + +class OgreRadianClass : public QObject, public QScriptClass +{ +public: + OgreRadianClass(QScriptEngine *engine); + ~OgreRadianClass(); + + QScriptValue constructor(); + + QScriptValue newInstance(qreal value = 0.0); + QScriptValue newInstance(const Ogre::Radian &ba); + + QueryFlags queryProperty(const QScriptValue &object, + const QScriptString &name, + QueryFlags flags, uint *id); + + QScriptValue property(const QScriptValue &object, + const QScriptString &name, uint id); + + void setProperty(QScriptValue &object, const QScriptString &name, + uint id, const QScriptValue &value); + + QScriptValue::PropertyFlags propertyFlags( + const QScriptValue &object, const QScriptString &name, uint id); + + QString name() const; + + QScriptValue prototype() const; + +private: + static QScriptValue construct(QScriptContext *ctx, QScriptEngine *eng); + + static QScriptValue toScriptValue(QScriptEngine *eng, const Ogre::Radian &ba); + static void fromScriptValue(const QScriptValue &obj, Ogre::Radian &ba); + + //QScriptString x; + //QScriptString y; + //QScriptString z; + QScriptValue proto; + QScriptValue ctor; +}; + +Q_DECLARE_METATYPE(Ogre::Radian*) +Q_DECLARE_METATYPE(Ogre::Radian) +Q_DECLARE_METATYPE(OgreRadianClass*) + +#endif //OGRERADIANCLASS_H Added: trunk/QtOgreFramework/QtOgre/include/Scripting/OgreRadianPrototype.h =================================================================== --- trunk/QtOgreFramework/QtOgre/include/Scripting/OgreRadianPrototype.h (rev 0) +++ trunk/QtOgreFramework/QtOgre/include/Scripting/OgreRadianPrototype.h 2010-05-29 11:30:23 UTC (rev 2910) @@ -0,0 +1,25 @@ +#ifndef OGRERADIANPROTOTYPE_H +#define OGRERADIANPROTOTYPE_H + +#include <OgreMath.h> + +#include <QtCore/QObject> +#include <QtScript/QScriptable> +#include <QtScript/QScriptValue> + +class OgreRadianPrototype : public QObject, public QScriptable +{ +Q_OBJECT +public: + OgreRadianPrototype(QObject *parent = 0); + ~OgreRadianPrototype(); + +public slots: + QScriptValue valueOf() const; + +private: + Ogre::Radian* thisOgreRadian() const; +}; + + +#endif //OGRERADIANPROTOTYPE_H Deleted: trunk/QtOgreFramework/QtOgre/source/Scripting/OgreCameraClass.cpp =================================================================== --- trunk/QtOgreFramework/QtOgre/source/Scripting/OgreCameraClass.cpp 2010-05-29 09:47:13 UTC (rev 2909) +++ trunk/QtOgreFramework/QtOgre/source/Scripting/OgreCameraClass.cpp 2010-05-29 11:30:23 UTC (rev 2910) @@ -1,170 +0,0 @@ -#include "Scripting/OgreCameraClass.h" -#include "Scripting/OgreCameraPrototype.h" - -#include <QtScript/QScriptClassPropertyIterator> -#include <QtScript/QScriptEngine> - -#include <stdlib.h> - -Q_DECLARE_METATYPE(Ogre::Camera*) -//Q_DECLARE_METATYPE(Ogre::Camera) -Q_DECLARE_METATYPE(OgreCameraClass*) - -OgreCameraClass::OgreCameraClass(QScriptEngine *engine) - : QObject(engine), QScriptClass(engine) -{ - //qScriptRegisterMetaType<Ogre::Camera>(engine, toScriptValue, fromScriptValue); - - /*x = engine->toStringHandle(QLatin1String("x")); - y = engine->toStringHandle(QLatin1String("y")); - z = engine->toStringHandle(QLatin1String("z"));*/ - - proto = engine->newQObject(new OgreCameraPrototype(this), - QScriptEngine::QtOwnership, - QScriptEngine::SkipMethodsInEnumeration - | QScriptEngine::ExcludeSuperClassMethods - | QScriptEngine::ExcludeSuperClassProperties); - QScriptValue global = engine->globalObject(); - proto.setPrototype(global.property("Object").property("prototype")); - - /*ctor = engine->newFunction(construct); - ctor.setData(qScriptValueFromValue(engine, this));*/ -} - -OgreCameraClass::~OgreCameraClass() -{ -} - -QScriptClass::QueryFlags OgreCameraClass::queryProperty(const QScriptValue &object, - const QScriptString &name, - QueryFlags flags, uint *id) -{ - Ogre::Camera *ba = qscriptvalue_cast<Ogre::Camera*>(object.data()); - if (!ba) - return 0; - /*if (name == x) - { - return flags; - } - if (name == y) - { - return flags; - } - if (name == z) - { - return flags; - }*/ - return 0; -} - -QScriptValue OgreCameraClass::property(const QScriptValue &object, - const QScriptString &name, uint id) -{ - Ogre::Camera *ba = qscriptvalue_cast<Ogre::Camera*>(object.data()); - if (!ba) - return QScriptValue(); - /*if (name == x) - { - return ba->x; - } - if (name == y) - { - return ba->y; - } - if (name == z) - { - return ba->z; - }*/ - return QScriptValue(); -} - -void OgreCameraClass::setProperty(QScriptValue &object, - const QScriptString &name, - uint id, const QScriptValue &value) -{ - Ogre::Camera *ba = qscriptvalue_cast<Ogre::Camera*>(object.data()); - if (!ba) - return; - /*if (name == x) - { - ba->x = value.toNumber(); - } - if (name == y) - { - ba->y = value.toNumber(); - } - if (name == z) - { - ba->z = value.toNumber(); - }*/ -} - -QScriptValue::PropertyFlags OgreCameraClass::propertyFlags( - const QScriptValue &/*object*/, const QScriptString &name, uint /*id*/) -{ - /*if (name == x) - { - return QScriptValue::Undeletable - | QScriptValue::SkipInEnumeration; - } - if (name == y) - { - return QScriptValue::Undeletable - | QScriptValue::SkipInEnumeration; - } - if (name == z) - { - return QScriptValue::Undeletable - | QScriptValue::SkipInEnumeration; - }*/ - return QScriptValue::Undeletable; -} - -QString OgreCameraClass::name() const -{ - return QLatin1String("OgreCamera"); -} - -QScriptValue OgreCameraClass::prototype() const -{ - return proto; -} - -/*QScriptValue OgreCameraClass::constructor() -{ - return ctor; -}*/ - -/*QScriptValue OgreCameraClass::newInstance(int size) -{ - return newInstance(Ogre::Camera()); -}*/ - -/*QScriptValue OgreCameraClass::newInstance(const Ogre::Camera &ba) -{ - QScriptValue data = engine()->newVariant(QVariant::fromValue(ba)); - return engine()->newObject(this, data); -}*/ - -/*QScriptValue OgreCameraClass::construct(QScriptContext *ctx, QScriptEngine *) -{ - OgreCameraClass *cls = qscriptvalue_cast<OgreCameraClass*>(ctx->callee().data()); - if (!cls) - return QScriptValue(); - int size = ctx->argument(0).toInt32(); - return cls->newInstance(size); -}*/ - -/*QScriptValue OgreCameraClass::toScriptValue(QScriptEngine *eng, const Ogre::Camera &ba) -{ - QScriptValue ctor = eng->globalObject().property("OgreCamera"); - OgreCameraClass *cls = qscriptvalue_cast<OgreCameraClass*>(ctor.data()); - if (!cls) - return eng->newVariant(qVariantFromValue(ba)); - return cls->newInstance(ba); -}*/ - -/*void OgreCameraClass::fromScriptValue(const QScriptValue &obj, Ogre::Camera &ba) -{ - ba = qscriptvalue_cast<Ogre::Camera>(obj.data()); -}*/ Deleted: trunk/QtOgreFramework/QtOgre/source/Scripting/OgreCameraPrototype.cpp =================================================================== --- trunk/QtOgreFramework/QtOgre/source/Scripting/OgreCameraPrototype.cpp 2010-05-29 09:47:13 UTC (rev 2909) +++ trunk/QtOgreFramework/QtOgre/source/Scripting/OgreCameraPrototype.cpp 2010-05-29 11:30:23 UTC (rev 2910) @@ -1,29 +0,0 @@ -#include "Scripting/OgreCameraPrototype.h" - -#include <QtScript/QScriptEngine> - -Q_DECLARE_METATYPE(Ogre::Camera*) - -OgreCameraPrototype::OgreCameraPrototype(QObject* parent) - : QObject(parent) -{ -} - -OgreCameraPrototype::~OgreCameraPrototype() -{ -} - -Ogre::Camera* OgreCameraPrototype::thisOgreCamera() const -{ - return qscriptvalue_cast<Ogre::Camera*>(thisObject().data()); -} - -QScriptValue OgreCameraPrototype::valueOf() const -{ - return thisObject().data(); -} - -void OgreCameraPrototype::setPosition(const Ogre::Vector3 &vec) -{ - thisOgreCamera()->setPosition(vec); -} \ No newline at end of file Added: trunk/QtOgreFramework/QtOgre/source/Scripting/OgreRadianClass.cpp =================================================================== --- trunk/QtOgreFramework/QtOgre/source/Scripting/OgreRadianClass.cpp (rev 0) +++ trunk/QtOgreFramework/QtOgre/source/Scripting/OgreRadianClass.cpp 2010-05-29 11:30:23 UTC (rev 2910) @@ -0,0 +1,166 @@ +#include "Scripting/OgreRadianClass.h" +#include "Scripting/OgreRadianPrototype.h" + +#include <QtScript/QScriptClassPropertyIterator> +#include <QtScript/QScriptEngine> + +#include <stdlib.h> + +OgreRadianClass::OgreRadianClass(QScriptEngine *engine) + : QObject(engine), QScriptClass(engine) +{ + qScriptRegisterMetaType<Ogre::Radian>(engine, toScriptValue, fromScriptValue); + + //x = engine->toStringHandle(QLatin1String("x")); + //y = engine->toStringHandle(QLatin1String("y")); + //z = engine->toStringHandle(QLatin1String("z")); + + proto = engine->newQObject(new OgreRadianPrototype(this), + QScriptEngine::QtOwnership, + QScriptEngine::SkipMethodsInEnumeration + | QScriptEngine::ExcludeSuperClassMethods + | QScriptEngine::ExcludeSuperClassProperties); + QScriptValue global = engine->globalObject(); + proto.setPrototype(global.property("Object").property("prototype")); + + ctor = engine->newFunction(construct); + ctor.setData(qScriptValueFromValue(engine, this)); +} + +OgreRadianClass::~OgreRadianClass() +{ +} + +QScriptClass::QueryFlags OgreRadianClass::queryProperty(const QScriptValue &object, + const QScriptString &name, + QueryFlags flags, uint *id) +{ + Ogre::Radian *ba = qscriptvalue_cast<Ogre::Radian*>(object.data()); + if (!ba) + return 0; + /*if (name == x) + { + return flags; + } + if (name == y) + { + return flags; + } + if (name == z) + { + return flags; + }*/ + return 0; +} + +QScriptValue OgreRadianClass::property(const QScriptValue &object, + const QScriptString &name, uint id) +{ + Ogre::Radian *ba = qscriptvalue_cast<Ogre::Radian*>(object.data()); + if (!ba) + return QScriptValue(); + /*if (name == x) + { + return ba->x; + } + if (name == y) + { + return ba->y; + } + if (name == z) + { + return ba->z; + }*/ + return QScriptValue(); +} + +void OgreRadianClass::setProperty(QScriptValue &object, + const QScriptString &name, + uint id, const QScriptValue &value) +{ + Ogre::Radian *ba = qscriptvalue_cast<Ogre::Radian*>(object.data()); + if (!ba) + return; + /* if (name == x) + { + ba->x = value.toNumber(); + } + if (name == y) + { + ba->y = value.toNumber(); + } + if (name == z) + { + ba->z = value.toNumber(); + }*/ +} + +QScriptValue::PropertyFlags OgreRadianClass::propertyFlags( + const QScriptValue &/*object*/, const QScriptString &name, uint /*id*/) +{ + /* if (name == x) + { + return QScriptValue::Undeletable + | QScriptValue::SkipInEnumeration; + } + if (name == y) + { + return QScriptValue::Undeletable + | QScriptValue::SkipInEnumeration; + } + if (name == z) + { + return QScriptValue::Undeletable + | QScriptValue::SkipInEnumeration; + }*/ + return QScriptValue::Undeletable; +} + +QString OgreRadianClass::name() const +{ + return QLatin1String("OgreRadian"); +} + +QScriptValue OgreRadianClass::prototype() const +{ + return proto; +} + +QScriptValue OgreRadianClass::constructor() +{ + return ctor; +} + +QScriptValue OgreRadianClass::newInstance(qreal value) +{ + return newInstance(Ogre::Radian(value)); +} + +QScriptValue OgreRadianClass::newInstance(const Ogre::Radian &ba) +{ + QScriptValue data = engine()->newVariant(QVariant::fromValue(ba)); + return engine()->newObject(this, data); +} + +QScriptValue OgreRadianClass::construct(QScriptContext *ctx, QScriptEngine *) +{ + OgreRadianClass *cls = qscriptvalue_cast<OgreRadianClass*>(ctx->callee().data()); + if (!cls) + return QScriptValue(); + qreal value = ctx->argument(0).toNumber(); + return cls->newInstance(value); +} + +QScriptValue OgreRadianClass::toScriptValue(QScriptEngine *eng, const Ogre::Radian &ba) +{ + QScriptValue ctor = eng->globalObject().property("OgreRadian"); + OgreRadianClass *cls = qscriptvalue_cast<OgreRadianClass*>(ctor.data()); + if (!cls) + return eng->newVariant(qVariantFromValue(ba)); + return cls->newInstance(ba); +} + +void OgreRadianClass::fromScriptValue(const QScriptValue &obj, Ogre::Radian &ba) +{ + ba = qvariant_cast<Ogre::Radian>(obj.data().toVariant()); +} Added: trunk/QtOgreFramework/QtOgre/source/Scripting/OgreRadianPrototype.cpp =================================================================== --- trunk/QtOgreFramework/QtOgre/source/Scripting/OgreRadianPrototype.cpp (rev 0) +++ trunk/QtOgreFramework/QtOgre/source/Scripting/OgreRadianPrototype.cpp 2010-05-29 11:30:23 UTC (rev 2910) @@ -0,0 +1,24 @@ +#include "Scripting/OgreRadianPrototype.h" + +#include <QtScript/QScriptEngine> + +Q_DECLARE_METATYPE(Ogre::Radian*) + +OgreRadianPrototype::OgreRadianPrototype(QObject* parent) + : QObject(parent) +{ +} + +OgreRadianPrototype::~OgreRadianPrototype() +{ +} + +Ogre::Radian* OgreRadianPrototype::thisOgreRadian() const +{ + return qscriptvalue_cast<Ogre::Radian*>(thisObject().data()); +} + +QScriptValue OgreRadianPrototype::valueOf() const +{ + return thisObject().data(); +} \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <es...@us...> - 2010-05-29 09:47:19
|
Revision: 2909 http://ogreaddons.svn.sourceforge.net/ogreaddons/?rev=2909&view=rev Author: esuvs Date: 2010-05-29 09:47:13 +0000 (Sat, 29 May 2010) Log Message: ----------- More work on scripting... Modified Paths: -------------- trunk/QtOgreFramework/Demo/source/DemoGameLogic.cpp trunk/QtOgreFramework/QtOgre/source/Scripting/OgreVector3Class.cpp Modified: trunk/QtOgreFramework/Demo/source/DemoGameLogic.cpp =================================================================== --- trunk/QtOgreFramework/Demo/source/DemoGameLogic.cpp 2010-05-28 10:45:58 UTC (rev 2908) +++ trunk/QtOgreFramework/Demo/source/DemoGameLogic.cpp 2010-05-29 09:47:13 UTC (rev 2909) @@ -61,17 +61,17 @@ Qt.setProperty("App", scriptEngine->newQObject(qApp)); scriptEngine->globalObject().setProperty("Qt", Qt); - OgreVector3Class* cameraPosition = new OgreVector3Class(scriptEngine); - cameraPositionScriptValue = scriptEngine->newObject(cameraPosition); - scriptEngine->globalObject().setProperty("cameraPosition", cameraPositionScriptValue); + //OgreVector3Class* cameraPosition = new OgreVector3Class(scriptEngine); + /*cameraPositionScriptValue = scriptEngine->newObject(cameraPosition); + scriptEngine->globalObject().setProperty("cameraPosition", cameraPositionScriptValue);*/ - OgreVector3Class* cameraDirection = new OgreVector3Class(scriptEngine); - cameraDirectionScriptValue = scriptEngine->newObject(cameraDirection); - scriptEngine->globalObject().setProperty("cameraDirection", cameraDirectionScriptValue); + //OgreVector3Class* cameraDirection = new OgreVector3Class(scriptEngine); + /*cameraDirectionScriptValue = scriptEngine->newObject(cameraDirection); + scriptEngine->globalObject().setProperty("cameraDirection", cameraDirectionScriptValue);*/ - OgreVector3Class* cameraRight = new OgreVector3Class(scriptEngine); - cameraRightScriptValue = scriptEngine->newObject(cameraRight); - scriptEngine->globalObject().setProperty("cameraRight", cameraRightScriptValue); + //OgreVector3Class* cameraRight = new OgreVector3Class(scriptEngine); + /*cameraRightScriptValue = scriptEngine->newObject(cameraRight); + scriptEngine->globalObject().setProperty("cameraRight", cameraRightScriptValue);*/ myStruct.x = 10; qScriptRegisterMetaType(scriptEngine, toScriptValue, fromScriptValue); @@ -178,6 +178,14 @@ mStyleSettingsWidget = new StyleSettingsWidget; mApplication->addSettingsWidget("Style", mStyleSettingsWidget); + + cameraPositionScriptValue = scriptEngine->toScriptValue(mCamera->getPosition()); + cameraDirectionScriptValue = scriptEngine->toScriptValue(mCamera->getDirection()); + cameraRightScriptValue = scriptEngine->toScriptValue(mCamera->getRight()); + + scriptEngine->globalObject().setProperty("cameraPosition", cameraPositionScriptValue); + scriptEngine->globalObject().setProperty("cameraDirection", cameraDirectionScriptValue); + scriptEngine->globalObject().setProperty("cameraRight", cameraRightScriptValue); } void DemoGameLogic::update(void) @@ -248,13 +256,13 @@ cameraRightScriptValue.setProperty("y", mCamera->getRight().y); cameraRightScriptValue.setProperty("z", mCamera->getRight().z);*/ - cameraPositionScriptValue = scriptEngine->toScriptValue(mCamera->getPosition()); + /*cameraPositionScriptValue = scriptEngine->toScriptValue(mCamera->getPosition()); cameraDirectionScriptValue = scriptEngine->toScriptValue(mCamera->getDirection()); cameraRightScriptValue = scriptEngine->toScriptValue(mCamera->getRight()); scriptEngine->globalObject().setProperty("cameraPosition", cameraPositionScriptValue); scriptEngine->globalObject().setProperty("cameraDirection", cameraDirectionScriptValue); - scriptEngine->globalObject().setProperty("cameraRight", cameraRightScriptValue); + scriptEngine->globalObject().setProperty("cameraRight", cameraRightScriptValue);*/ QScriptValue result = scriptEngine->evaluate(updateScript); if (scriptEngine->hasUncaughtException()) @@ -263,11 +271,11 @@ qCritical() << "uncaught exception at line" << line << ":" << result.toString(); } - //mCamera->setPosition(scriptEngine->fromScriptValue<Ogre::Vector3>(cameraPositionScriptValue)); - //mCamera->setDirection(scriptEngine->fromScriptValue<Ogre::Vector3>(cameraDirectionScriptValue)); + mCamera->setPosition(scriptEngine->fromScriptValue<Ogre::Vector3>(cameraPositionScriptValue)); + mCamera->setDirection(scriptEngine->fromScriptValue<Ogre::Vector3>(cameraDirectionScriptValue)); - mCamera->setPosition(cameraPositionScriptValue.property("x").toNumber(), cameraPositionScriptValue.property("y").toNumber(), cameraPositionScriptValue.property("z").toNumber()); - mCamera->setDirection(cameraDirectionScriptValue.property("x").toNumber(), cameraDirectionScriptValue.property("y").toNumber(), cameraDirectionScriptValue.property("z").toNumber()); + //mCamera->setPosition(cameraPositionScriptValue.property("x").toNumber(), cameraPositionScriptValue.property("y").toNumber(), cameraPositionScriptValue.property("z").toNumber()); + //mCamera->setDirection(cameraDirectionScriptValue.property("x").toNumber(), cameraDirectionScriptValue.property("y").toNumber(), cameraDirectionScriptValue.property("z").toNumber()); //mCamera->setRight(cameraRightScriptValue.property("x").toNumber(), cameraRightScriptValue.property("y").toNumber(), cameraRightScriptValue.property("z").toNumber()); Modified: trunk/QtOgreFramework/QtOgre/source/Scripting/OgreVector3Class.cpp =================================================================== --- trunk/QtOgreFramework/QtOgre/source/Scripting/OgreVector3Class.cpp 2010-05-28 10:45:58 UTC (rev 2908) +++ trunk/QtOgreFramework/QtOgre/source/Scripting/OgreVector3Class.cpp 2010-05-29 09:47:13 UTC (rev 2909) @@ -162,5 +162,5 @@ void OgreVector3Class::fromScriptValue(const QScriptValue &obj, Ogre::Vector3 &ba) { - ba = qscriptvalue_cast<Ogre::Vector3>(obj.data()); + ba = qvariant_cast<Ogre::Vector3>(obj.data().toVariant()); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ka...@us...> - 2010-05-28 10:46:05
|
Revision: 2908 http://ogreaddons.svn.sourceforge.net/ogreaddons/?rev=2908&view=rev Author: kardoon Date: 2010-05-28 10:45:58 +0000 (Fri, 28 May 2010) Log Message: ----------- Fix for building on Linux. This seems like a strange fix but GCC can be very picky about scope. Hopefully it works on Windows too. Modified Paths: -------------- trunk/QtOgreFramework/Demo/include/DemoGameLogic.h Modified: trunk/QtOgreFramework/Demo/include/DemoGameLogic.h =================================================================== --- trunk/QtOgreFramework/Demo/include/DemoGameLogic.h 2010-05-26 22:38:42 UTC (rev 2907) +++ trunk/QtOgreFramework/Demo/include/DemoGameLogic.h 2010-05-28 10:45:58 UTC (rev 2908) @@ -75,8 +75,6 @@ int x; int y; }; - - Q_DECLARE_METATYPE(MyStruct) class DemoGameLogic : public GameLogic { @@ -138,4 +136,6 @@ } +Q_DECLARE_METATYPE(QtOgre::MyStruct) + #endif /*DEMOGAMELOGIC_H_*/ \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <es...@us...> - 2010-05-26 22:38:49
|
Revision: 2907 http://ogreaddons.svn.sourceforge.net/ogreaddons/?rev=2907&view=rev Author: esuvs Date: 2010-05-26 22:38:42 +0000 (Wed, 26 May 2010) Log Message: ----------- Changes to work with Qt 4.7. Modified Paths: -------------- trunk/QtOgreFramework/Demo/include/DemoGameLogic.h trunk/QtOgreFramework/Demo/source/DemoGameLogic.cpp trunk/QtOgreFramework/QtOgre/include/Scripting/OgreVector3Class.h trunk/QtOgreFramework/QtOgre/source/Scripting/OgreVector3Class.cpp Modified: trunk/QtOgreFramework/Demo/include/DemoGameLogic.h =================================================================== --- trunk/QtOgreFramework/Demo/include/DemoGameLogic.h 2010-05-26 17:24:43 UTC (rev 2906) +++ trunk/QtOgreFramework/Demo/include/DemoGameLogic.h 2010-05-26 22:38:42 UTC (rev 2907) @@ -126,7 +126,7 @@ QtOgre::Log* mDemoLog; //Scripting - QScriptEngine scriptEngine; + QScriptEngine* scriptEngine; QString updateScript; CameraWrapper cameraWrapper; MyStruct myStruct; Modified: trunk/QtOgreFramework/Demo/source/DemoGameLogic.cpp =================================================================== --- trunk/QtOgreFramework/Demo/source/DemoGameLogic.cpp 2010-05-26 17:24:43 UTC (rev 2906) +++ trunk/QtOgreFramework/Demo/source/DemoGameLogic.cpp 2010-05-26 22:38:42 UTC (rev 2907) @@ -45,35 +45,41 @@ DemoGameLogic::DemoGameLogic(void) :GameLogic() { - QScriptValue keyboardScriptValue = scriptEngine.newQObject(&keyboard); - scriptEngine.globalObject().setProperty("keyboard", keyboardScriptValue); + } - QScriptValue cameraScriptValue = scriptEngine.newQObject(&cameraWrapper); - scriptEngine.globalObject().setProperty("camera", cameraScriptValue); + void DemoGameLogic::initialise(void) + { + scriptEngine = new QScriptEngine; - QScriptValue Qt = scriptEngine.newQMetaObject(QtMetaObject::get()); - Qt.setProperty("App", scriptEngine.newQObject(qApp)); - scriptEngine.globalObject().setProperty("Qt", Qt); + QScriptValue keyboardScriptValue = scriptEngine->newQObject(&keyboard); + scriptEngine->globalObject().setProperty("keyboard", keyboardScriptValue); - OgreVector3Class* cameraPosition = new OgreVector3Class(&scriptEngine); - cameraPositionScriptValue = scriptEngine.newObject(cameraPosition); - scriptEngine.globalObject().setProperty("cameraPosition", cameraPositionScriptValue); + QScriptValue cameraScriptValue = scriptEngine->newQObject(&cameraWrapper); + scriptEngine->globalObject().setProperty("camera", cameraScriptValue); - OgreVector3Class* cameraDirection = new OgreVector3Class(&scriptEngine); - cameraDirectionScriptValue = scriptEngine.newObject(cameraDirection); - scriptEngine.globalObject().setProperty("cameraDirection", cameraDirectionScriptValue); + QScriptValue Qt = scriptEngine->newQMetaObject(QtMetaObject::get()); + Qt.setProperty("App", scriptEngine->newQObject(qApp)); + scriptEngine->globalObject().setProperty("Qt", Qt); - OgreVector3Class* cameraRight = new OgreVector3Class(&scriptEngine); - cameraRightScriptValue = scriptEngine.newObject(cameraRight); - scriptEngine.globalObject().setProperty("cameraRight", cameraRightScriptValue); + OgreVector3Class* cameraPosition = new OgreVector3Class(scriptEngine); + cameraPositionScriptValue = scriptEngine->newObject(cameraPosition); + scriptEngine->globalObject().setProperty("cameraPosition", cameraPositionScriptValue); + OgreVector3Class* cameraDirection = new OgreVector3Class(scriptEngine); + cameraDirectionScriptValue = scriptEngine->newObject(cameraDirection); + scriptEngine->globalObject().setProperty("cameraDirection", cameraDirectionScriptValue); + + OgreVector3Class* cameraRight = new OgreVector3Class(scriptEngine); + cameraRightScriptValue = scriptEngine->newObject(cameraRight); + scriptEngine->globalObject().setProperty("cameraRight", cameraRightScriptValue); + myStruct.x = 10; - qScriptRegisterMetaType(&scriptEngine, toScriptValue, fromScriptValue); - QScriptValue myStructValue = scriptEngine.toScriptValue(myStruct); - scriptEngine.globalObject().setProperty("myStruct", myStructValue); + qScriptRegisterMetaType(scriptEngine, toScriptValue, fromScriptValue); + QScriptValue myStructValue = scriptEngine->toScriptValue(myStruct); + scriptEngine->globalObject().setProperty("myStruct", myStructValue); - OgreVector3Class *vecClass = new OgreVector3Class(&scriptEngine); - scriptEngine.globalObject().setProperty("OgreVector3", vecClass->constructor()); + OgreVector3Class *vecClass = new OgreVector3Class(scriptEngine); + scriptEngine->globalObject().setProperty("OgreVector3", vecClass->constructor()); //updateScript = "print('w pressed = ', keyboard.isPressed(Qt.Key_W));"; @@ -111,10 +117,9 @@ " cameraPosition.z = cameraPosition.z - cameraRight.z;" "}" ; - } - void DemoGameLogic::initialise(void) - { + + //qApp->setStyleSheet(qApp->settings()->value("UI/StyleFile").toString()); mDemoLog = mApplication->createLog("Demo"); @@ -231,25 +236,36 @@ mIsFirstFrame = false; - cameraPositionScriptValue.setProperty("x", mCamera->getPosition().x); + /*cameraPositionScriptValue.setProperty("x", mCamera->getPosition().x); cameraPositionScriptValue.setProperty("y", mCamera->getPosition().y); - cameraPositionScriptValue.setProperty("z", mCamera->getPosition().z); + cameraPositionScriptValue.setProperty("z", mCamera->getPosition().z);*/ - cameraDirectionScriptValue.setProperty("x", mCamera->getDirection().x); + /*cameraDirectionScriptValue.setProperty("x", mCamera->getDirection().x); cameraDirectionScriptValue.setProperty("y", mCamera->getDirection().y); cameraDirectionScriptValue.setProperty("z", mCamera->getDirection().z); cameraRightScriptValue.setProperty("x", mCamera->getRight().x); cameraRightScriptValue.setProperty("y", mCamera->getRight().y); - cameraRightScriptValue.setProperty("z", mCamera->getRight().z); + cameraRightScriptValue.setProperty("z", mCamera->getRight().z);*/ - QScriptValue result = scriptEngine.evaluate(updateScript); - if (scriptEngine.hasUncaughtException()) + cameraPositionScriptValue = scriptEngine->toScriptValue(mCamera->getPosition()); + cameraDirectionScriptValue = scriptEngine->toScriptValue(mCamera->getDirection()); + cameraRightScriptValue = scriptEngine->toScriptValue(mCamera->getRight()); + + scriptEngine->globalObject().setProperty("cameraPosition", cameraPositionScriptValue); + scriptEngine->globalObject().setProperty("cameraDirection", cameraDirectionScriptValue); + scriptEngine->globalObject().setProperty("cameraRight", cameraRightScriptValue); + + QScriptValue result = scriptEngine->evaluate(updateScript); + if (scriptEngine->hasUncaughtException()) { - int line = scriptEngine.uncaughtExceptionLineNumber(); + int line = scriptEngine->uncaughtExceptionLineNumber(); qCritical() << "uncaught exception at line" << line << ":" << result.toString(); } + //mCamera->setPosition(scriptEngine->fromScriptValue<Ogre::Vector3>(cameraPositionScriptValue)); + //mCamera->setDirection(scriptEngine->fromScriptValue<Ogre::Vector3>(cameraDirectionScriptValue)); + mCamera->setPosition(cameraPositionScriptValue.property("x").toNumber(), cameraPositionScriptValue.property("y").toNumber(), cameraPositionScriptValue.property("z").toNumber()); mCamera->setDirection(cameraDirectionScriptValue.property("x").toNumber(), cameraDirectionScriptValue.property("y").toNumber(), cameraDirectionScriptValue.property("z").toNumber()); //mCamera->setRight(cameraRightScriptValue.property("x").toNumber(), cameraRightScriptValue.property("y").toNumber(), cameraRightScriptValue.property("z").toNumber()); Modified: trunk/QtOgreFramework/QtOgre/include/Scripting/OgreVector3Class.h =================================================================== --- trunk/QtOgreFramework/QtOgre/include/Scripting/OgreVector3Class.h 2010-05-26 17:24:43 UTC (rev 2906) +++ trunk/QtOgreFramework/QtOgre/include/Scripting/OgreVector3Class.h 2010-05-26 22:38:42 UTC (rev 2907) @@ -49,4 +49,8 @@ QScriptValue ctor; }; +Q_DECLARE_METATYPE(Ogre::Vector3*) +Q_DECLARE_METATYPE(Ogre::Vector3) +Q_DECLARE_METATYPE(OgreVector3Class*) + #endif //OGREVECTOR3CLASS_H Modified: trunk/QtOgreFramework/QtOgre/source/Scripting/OgreVector3Class.cpp =================================================================== --- trunk/QtOgreFramework/QtOgre/source/Scripting/OgreVector3Class.cpp 2010-05-26 17:24:43 UTC (rev 2906) +++ trunk/QtOgreFramework/QtOgre/source/Scripting/OgreVector3Class.cpp 2010-05-26 22:38:42 UTC (rev 2907) @@ -6,10 +6,6 @@ #include <stdlib.h> -Q_DECLARE_METATYPE(Ogre::Vector3*) -Q_DECLARE_METATYPE(Ogre::Vector3) -Q_DECLARE_METATYPE(OgreVector3Class*) - OgreVector3Class::OgreVector3Class(QScriptEngine *engine) : QObject(engine), QScriptClass(engine) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bel...@us...> - 2010-05-26 17:24:50
|
Revision: 2906 http://ogreaddons.svn.sourceforge.net/ogreaddons/?rev=2906&view=rev Author: bellyfish Date: 2010-05-26 17:24:43 +0000 (Wed, 26 May 2010) Log Message: ----------- * Removing unused #include. Thanks to Altren: http://www.ogre3d.org/addonforums/viewtopic.php?p=71605#p71605 Modified Paths: -------------- trunk/ogrebullet/Collisions/include/Shapes/OgreBulletCollisionsTerrainShape.h Modified: trunk/ogrebullet/Collisions/include/Shapes/OgreBulletCollisionsTerrainShape.h =================================================================== --- trunk/ogrebullet/Collisions/include/Shapes/OgreBulletCollisionsTerrainShape.h 2010-05-24 21:06:33 UTC (rev 2905) +++ trunk/ogrebullet/Collisions/include/Shapes/OgreBulletCollisionsTerrainShape.h 2010-05-26 17:24:43 UTC (rev 2906) @@ -9,7 +9,6 @@ #include "BulletCollision/CollisionShapes/btHeightfieldTerrainShape.h" #include "BulletCollision/CollisionShapes/btTriangleCallback.h" -#include "BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h" namespace OgreBulletCollisions { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <es...@us...> - 2010-05-24 21:06:40
|
Revision: 2905 http://ogreaddons.svn.sourceforge.net/ogreaddons/?rev=2905&view=rev Author: esuvs Date: 2010-05-24 21:06:33 +0000 (Mon, 24 May 2010) Log Message: ----------- Making sure boost in OgreSDK can be found. Modified Paths: -------------- trunk/QtOgreFramework/cmake/modules/FindOGRE.cmake Modified: trunk/QtOgreFramework/cmake/modules/FindOGRE.cmake =================================================================== --- trunk/QtOgreFramework/cmake/modules/FindOGRE.cmake 2010-05-24 16:45:25 UTC (rev 2904) +++ trunk/QtOgreFramework/cmake/modules/FindOGRE.cmake 2010-05-24 21:06:33 UTC (rev 2905) @@ -23,7 +23,7 @@ MESSAGE(STATUS "Using OGRE SDK") STRING(REGEX REPLACE "[\\]" "/" OGRESDK "${OGRESDK}") SET(OGRE_INCLUDE_DIRS ${OGRESDK}/include/Ogre ${OGRESDK}/boost_1_42) - SET(OGRE_LIBRARY_DIRS ${OGRESDK}/lib ${OGRESDK}/boost_1_42/lib) + SET(OGRE_LIBRARY_DIRS ${OGRESDK}/lib ${OGRESDK}/boost_1_42/lib) SET(OGRE_LIBRARIES debug OgreMain_d optimized OgreMain) ENDIF (OGRESDK) IF (OGRESOURCE) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kal...@us...> - 2010-05-24 16:45:31
|
Revision: 2904 http://ogreaddons.svn.sourceforge.net/ogreaddons/?rev=2904&view=rev Author: kallaspriit Date: 2010-05-24 16:45:25 +0000 (Mon, 24 May 2010) Log Message: ----------- Added getCollisionState, setCollisionState, getStiffness and setStiffness back to the joint interface. Modified Paths: -------------- branches/ogrenewt/newton20/inc/OgreNewt_Joint.h branches/ogrenewt/newton20/src/OgreNewt_Joint.cpp Modified: branches/ogrenewt/newton20/inc/OgreNewt_Joint.h =================================================================== --- branches/ogrenewt/newton20/inc/OgreNewt_Joint.h 2010-05-24 16:14:19 UTC (rev 2903) +++ branches/ogrenewt/newton20/inc/OgreNewt_Joint.h 2010-05-24 16:45:25 UTC (rev 2904) @@ -18,8 +18,6 @@ class NewtonCustomJoint; - - // OgreNewt namespace. all functions and classes use this namespace. namespace OgreNewt { @@ -86,36 +84,33 @@ //! void setRowSpringDamper(Ogre::Real springK, Ogre::Real springD) const; - -#if 0 //! returns collision state /*! The collision state determines whether collision should be calculated between the parent and child bodies of the joint. \return integer value. 1 = collision on, 0 = collision off. */ - int getCollisionState() const { return NewtonJointGetCollisionState( m_joint ); } + int getCollisionState() const; //! sets the collision state /*! The collision state determines whether collision should be calculated between the parent and child bodies of the joint. \param state integer value. 1 = collision on, 0 = collision off. */ - void setCollisionState( int state ) const { NewtonJointSetCollisionState( m_joint, state ); } + void setCollisionState( int state ) const; //! get joint stiffness /*! Joint stiffness adjusts how much "play" the joint can have. high stiffness = very small play, but more likely to become unstable. \return float representing joint stiffness in range [0,1] */ - Ogre::Real getStiffness() const { return (Ogre::Real)NewtonJointGetStiffness( m_joint ); } + Ogre::Real getStiffness() const; //! set joint stiffness /*! Joint stiffness adjusts how much "play" the joint can have. high stiffness = very small play, but more likely to become unstable. \param stiffness float representing joint stiffness in range [0,1] */ - void setStiffness( Ogre::Real stiffness ) const { NewtonJointSetStiffness( m_joint, stiffness ); } -#endif + void setStiffness( Ogre::Real stiffness ) const; protected: Modified: branches/ogrenewt/newton20/src/OgreNewt_Joint.cpp =================================================================== --- branches/ogrenewt/newton20/src/OgreNewt_Joint.cpp 2010-05-24 16:14:19 UTC (rev 2903) +++ branches/ogrenewt/newton20/src/OgreNewt_Joint.cpp 2010-05-24 16:45:25 UTC (rev 2904) @@ -133,6 +133,26 @@ NewtonUserJointSetRowSpringDamperAcceleration( m_joint->GetJoint(), springK, springD ); } +int Joint::getCollisionState() const +{ + return NewtonJointGetCollisionState( m_joint->GetJoint() ); +} + +void Joint::setCollisionState( int state ) const +{ + NewtonJointSetCollisionState( m_joint->GetJoint(), state ); +} + +Ogre::Real Joint::getStiffness() const +{ + return (Ogre::Real)NewtonJointGetStiffness( m_joint->GetJoint() ); +} + +void Joint::setStiffness( Ogre::Real stiffness ) const +{ + NewtonJointSetStiffness( m_joint->GetJoint(), stiffness ); +} + //! destructor void _CDECL Joint::destructorCallback( const NewtonCustomJoint* me ) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kal...@us...> - 2010-05-24 16:14:26
|
Revision: 2903 http://ogreaddons.svn.sourceforge.net/ogreaddons/?rev=2903&view=rev Author: kallaspriit Date: 2010-05-24 16:14:19 +0000 (Mon, 24 May 2010) Log Message: ----------- Added Body::addGlobalForceAccumulate( const Ogre::Vector3& force, const Ogre::Vector3& pos ), that can be called outside force-callback. The forces are accumulated and applied in default force-callback when body is updated. Added bugfix, where node scale was not taken into account when building tree collision. Modified Paths: -------------- branches/ogrenewt/newton20/demos/MinimalOgreNewtApplication/MinimalOgreNewt.suo branches/ogrenewt/newton20/demos/MinimalOgreNewtApplication/source/Application.cpp branches/ogrenewt/newton20/inc/OgreNewt_Body.h branches/ogrenewt/newton20/src/OgreNewt_Body.cpp branches/ogrenewt/newton20/src/OgreNewt_CollisionPrimitives.cpp Modified: branches/ogrenewt/newton20/demos/MinimalOgreNewtApplication/MinimalOgreNewt.suo =================================================================== (Binary files differ) Modified: branches/ogrenewt/newton20/demos/MinimalOgreNewtApplication/source/Application.cpp =================================================================== --- branches/ogrenewt/newton20/demos/MinimalOgreNewtApplication/source/Application.cpp 2010-05-23 00:32:17 UTC (rev 2902) +++ branches/ogrenewt/newton20/demos/MinimalOgreNewtApplication/source/Application.cpp 2010-05-24 16:14:19 UTC (rev 2903) @@ -252,10 +252,30 @@ light->setType(Ogre::Light::LT_POINT); light->setPosition(Ogre::Vector3(100, 100, 100)); + + // Create a body manually + Ogre::Entity* entity = sceneManager->createEntity("Ellipsoid", "ellipsoid.mesh"); + entity->setMaterialName("Debug/Blue"); + Ogre::SceneNode* node = sceneManager->getRootSceneNode()->createChildSceneNode("Ellipsoid"); + node->attachObject(entity); + node->setScale(Ogre::Vector3(5, 5, 5)); + + OgreNewt::ConvexCollisionPtr collision = OgreNewt::ConvexCollisionPtr(new OgreNewt::CollisionPrimitives::Ellipsoid(world, node->getScale() / 2, 1)); + OgreNewt::Body* body = new OgreNewt::Body(world, collision); + body->attachNode(node); + body->setPositionOrientation(Ogre::Vector3(0.0f, 5.0f, -10.0f), Ogre::Quaternion::IDENTITY); + + Ogre::Vector3 inertia, centerOfMass; + collision->calculateInertialMatrix(inertia, centerOfMass); + body->setMassMatrix(50.0f, inertia * 50.0f); + body->setCenterOfMass(centerOfMass); + body->setStandardForceCallback(); + + // Create a body out of an Ogre node - Ogre::Entity* entity = sceneManager->createEntity("Cylinder", "cylinder.mesh"); + entity = sceneManager->createEntity("Spinner", "cylinder.mesh"); entity->setMaterialName("Debug/Red"); - Ogre::SceneNode* node = sceneManager->getRootSceneNode()->createChildSceneNode("Cylinder"); + node = sceneManager->getRootSceneNode()->createChildSceneNode("Cylinder"); node->attachObject(entity); node->setScale(Ogre::Vector3(7, 1, 3)); node->setPosition(Ogre::Vector3(0, 0.5f, 0)); @@ -277,24 +297,6 @@ } - // Create a body manually - entity = sceneManager->createEntity("Ellipsoid", "ellipsoid.mesh"); - entity->setMaterialName("Debug/Blue"); - node = sceneManager->getRootSceneNode()->createChildSceneNode("Ellipsoid"); - node->attachObject(entity); - node->setScale(Ogre::Vector3(5, 5, 5)); - - OgreNewt::ConvexCollisionPtr collision = OgreNewt::ConvexCollisionPtr(new OgreNewt::CollisionPrimitives::Ellipsoid(world, node->getScale() / 2, 1)); - OgreNewt::Body* body = new OgreNewt::Body(world, collision); - body->attachNode(node); - body->setPositionOrientation(Ogre::Vector3(0.0f, 5.0f, -10.0f), Ogre::Quaternion::IDENTITY); - - Ogre::Vector3 inertia, centerOfMass; - collision->calculateInertialMatrix(inertia, centerOfMass); - body->setMassMatrix(50.0f, inertia * 50.0f); - body->setCenterOfMass(centerOfMass); - body->setStandardForceCallback(); - // Lets create a simple vehicle-like object Ogre::Vector3 pos = Ogre::Vector3(0, 1, 10); Modified: branches/ogrenewt/newton20/inc/OgreNewt_Body.h =================================================================== --- branches/ogrenewt/newton20/inc/OgreNewt_Body.h 2010-05-23 00:32:17 UTC (rev 2902) +++ branches/ogrenewt/newton20/inc/OgreNewt_Body.h 2010-05-24 16:14:19 UTC (rev 2903) @@ -435,6 +435,15 @@ */ void addGlobalForce( const Ogre::Vector3& force, const Ogre::Vector3& pos ); + //! helper function that adds a force (and resulting torque) to an object in global cordinates called from anywhere. + /*! + this function can also be called outside ForceCallback function, the calls are accumulated and + applied in the callback. + \param force vector representing force, in global space + \param pos vector representing location of force, in global space + */ + void addGlobalForceAccumulate( const Ogre::Vector3& force, const Ogre::Vector3& pos ); + // helper function that adds a force (and resulting torque) to an object in local coordinates. /*! this function is only valid inside a ForceCallback function! @@ -485,6 +494,8 @@ const MaterialID* m_matid; const World* m_world; + std::vector<std::pair<Ogre::Vector3, Ogre::Vector3>> m_accumulatedGlobalForces; + Ogre::Vector3 m_nodePosit; Ogre::Vector3 m_curPosit; Ogre::Vector3 m_prevPosit; Modified: branches/ogrenewt/newton20/src/OgreNewt_Body.cpp =================================================================== --- branches/ogrenewt/newton20/src/OgreNewt_Body.cpp 2010-05-23 00:32:17 UTC (rev 2902) +++ branches/ogrenewt/newton20/src/OgreNewt_Body.cpp 2010-05-24 16:14:19 UTC (rev 2903) @@ -125,6 +125,13 @@ me->addForce( force ); + while (me->m_accumulatedGlobalForces.size() > 0) + { + std::pair<Ogre::Vector3, Ogre::Vector3> forceInfo = me->m_accumulatedGlobalForces.back(); + me->m_accumulatedGlobalForces.pop_back(); + + me->addGlobalForce(forceInfo.first, forceInfo.second); + } } @@ -407,6 +414,11 @@ addTorque( torque ); } +void Body::addGlobalForceAccumulate( const Ogre::Vector3& force, const Ogre::Vector3& pos ) +{ + m_accumulatedGlobalForces.push_back(std::pair<Ogre::Vector3,Ogre::Vector3>(force, pos)); +} + void Body::addLocalForce( const Ogre::Vector3& force, const Ogre::Vector3& pos ) { Ogre::Vector3 bodypos; Modified: branches/ogrenewt/newton20/src/OgreNewt_CollisionPrimitives.cpp =================================================================== --- branches/ogrenewt/newton20/src/OgreNewt_CollisionPrimitives.cpp 2010-05-23 00:32:17 UTC (rev 2902) +++ branches/ogrenewt/newton20/src/OgreNewt_CollisionPrimitives.cpp 2010-05-24 16:14:19 UTC (rev 2903) @@ -556,7 +556,7 @@ // parse the individual nodes. Ogre::Quaternion rootOrient = Ogre::Quaternion::IDENTITY; Ogre::Vector3 rootPos = Ogre::Vector3::ZERO; - Ogre::Vector3 rootScale = Ogre::Vector3::UNIT_SCALE; + Ogre::Vector3 rootScale = startNode->getScale();; _parseNode( startNode, rootOrient, rootPos, rootScale, fw ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bel...@us...> - 2010-05-23 00:32:24
|
Revision: 2902 http://ogreaddons.svn.sourceforge.net/ogreaddons/?rev=2902&view=rev Author: bellyfish Date: 2010-05-23 00:32:17 +0000 (Sun, 23 May 2010) Log Message: ----------- * Removed outdated source file. Removed Paths: ------------- trunk/ogrebullet/Collisions/src/OgreBulletBollisionsWorld.cpp Deleted: trunk/ogrebullet/Collisions/src/OgreBulletBollisionsWorld.cpp =================================================================== --- trunk/ogrebullet/Collisions/src/OgreBulletBollisionsWorld.cpp 2010-05-22 22:32:03 UTC (rev 2901) +++ trunk/ogrebullet/Collisions/src/OgreBulletBollisionsWorld.cpp 2010-05-23 00:32:17 UTC (rev 2902) @@ -1,294 +0,0 @@ -/*************************************************************************** - -This source file is part of OGREBULLET -(Object-oriented Graphics Rendering Engine Bullet Wrapper) -For the latest info, see http://www.ogre3d.org/phpBB2addons/viewforum.php?f=10 - -Copyright (c) 2007 tua...@gm... (Use it Freely, even Statically, but have to contribute any changes) - - - -This program is free software; you can redistribute it and/or modify it under -the terms of the GPL General Public License with runtime exception as published by the Free Software -Foundation; either version 2 of the License, or (at your option) any later -version. - -This program is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GPL General Public License with runtime exception for more details. - -You should have received a copy of the GPL General Public License with runtime exception along with -this program; if not, write to the Free Software Foundation, Inc., 59 Temple -Place - Suite 330, Boston, MA 02111-1307, USA, or go to -http://www.gnu.org/licenses/old-licenses/gpl-2.0.html ------------------------------------------------------------------------------ -*/ - -#include "OgreBulletCollisions.h" - -#include "Debug/OgreBulletCollisionsDebugDrawer.h" - -#include "OgreBulletCollisionsWorld.h" -#include "Utils/OgreBulletConverter.h" - -#include "OgreBulletCollisionsObject.h" -#include "Debug/OgreBulletCollisionsDebugShape.h" -#include "OgreBulletCollisionsRay.h" - - - -using namespace Ogre; -using namespace OgreBulletCollisions; - -namespace OgreBulletCollisions -{ - // ------------------------------------------------------------------------- - CollisionsWorld::CollisionsWorld(SceneManager *scn, const AxisAlignedBox &bounds, bool init, bool set32bitsAxisSweep): - mScnMgr(scn), - mBounds(bounds), - mShowDebugShapes(false), - mShowDebugContactPoints(false), - mDebugContactPoints(0), - mDebugDrawer(0) - { - mDispatcher = new btCollisionDispatcher(&mDefaultCollisionConfiguration); - - if (set32bitsAxisSweep) - { - mBroadphase = new bt32BitAxisSweep3( - OgreBtConverter::to(bounds.getMinimum()), - OgreBtConverter::to(bounds.getMaximum())); - } - else - { - mBroadphase = new btAxisSweep3( - OgreBtConverter::to(bounds.getMinimum()), - OgreBtConverter::to(bounds.getMaximum())); - } - - // if not called by a inherited class - if (init) - { - mWorld = new btCollisionWorld(mDispatcher, mBroadphase, &mDefaultCollisionConfiguration); - - btCollisionDispatcher * dispatcher = static_cast<btCollisionDispatcher *>(mWorld->getDispatcher()); - btGImpactCollisionAlgorithm::registerAlgorithm(dispatcher); - } - } - // ------------------------------------------------------------------------- - void CollisionsWorld::setDebugDrawer(DebugDrawer *debugdrawer) - { - mDebugDrawer = debugdrawer; - (static_cast <btCollisionWorld *> (mWorld))->setDebugDrawer(mDebugDrawer); - }; - // ------------------------------------------------------------------------- - void CollisionsWorld::setDebugContactPoints(DebugLines *debugcontact) - { - mDebugContactPoints = debugcontact; - }; - - // ------------------------------------------------------------------------- - CollisionsWorld::~CollisionsWorld() - { - delete mWorld; - delete mBroadphase; - delete mDispatcher; - } - // ------------------------------------------------------------------------- - void CollisionsWorld::setShowDebugContactPoints(bool show) - { - if (show && !mShowDebugContactPoints) - { - assert (mDebugContactPoints == 0); - mDebugContactPoints = new DebugLines(); - getSceneManager()->getRootSceneNode ()->createChildSceneNode ("DebugContactPoints")->attachObject (mDebugContactPoints); - mShowDebugContactPoints = true; - return; - } - if (!show && mShowDebugContactPoints) - { - assert (mDebugContactPoints != 0); - Ogre::SceneNode * n = (Ogre::SceneNode *)getSceneManager()->getRootSceneNode ()->getChild ("DebugContactPoints"); - n->detachObject (mDebugContactPoints); - n->getParentSceneNode()->removeAndDestroyChild("DebugContactPoints"); - delete mDebugContactPoints; - mShowDebugContactPoints = false; - return; - } - } - // ------------------------------------------------------------------------- - void CollisionsWorld::setShowDebugShapes(bool show) - { - if (show && !mShowDebugShapes) - { - //assert (mDebugShapes == 0); - std::deque<Object*>::iterator it = mObjects.begin(); - while (it != mObjects.end()) - { - (*it)->showDebugShape(show); - ++it; - } - mShowDebugShapes = true; - return; - } - if (!show && mShowDebugShapes) - { - //assert (mDebugShapes != 0); - std::deque<Object*>::iterator it = mObjects.begin(); - while (it != mObjects.end()) - { - (*it)->showDebugShape(show); - ++it; - } - mShowDebugShapes = false; - return; - } - } - // ------------------------------------------------------------------------- - void CollisionsWorld::addObject(Object *obj, int filterGrp, short int collisionFilter) - { - mObjects.push_back (obj); - mWorld->addCollisionObject(obj->getBulletObject(), filterGrp, collisionFilter); - } - //------------------------------------------------------------------------- - bool CollisionsWorld::removeObject(Object *obj) - { - std::deque<Object*>::iterator it = find(mObjects.begin(),mObjects.end(), obj); - if (it == mObjects.end()) - return false; - mObjects.erase(it); - return true; - } - // ------------------------------------------------------------------------- - bool CollisionsWorld::isObjectregistered(Object *obj) const - { - std::deque<Object *>::const_iterator itRes = std::find(mObjects.begin(), mObjects.end(), obj); - if (itRes != mObjects.end()) - return true; - return false; - } - // ------------------------------------------------------------------------- - Object *CollisionsWorld::findObject(btCollisionObject *object) const - { - std::deque<Object *>::const_iterator it = mObjects.begin(); - while (it != mObjects.end()) - { - if ((*it)->getBulletObject() == object) - return (*it); - ++it; - } - return 0; - } - // ------------------------------------------------------------------------- - Object *CollisionsWorld::findObject(SceneNode *node) const - { - std::deque<Object *>::const_iterator it = mObjects.begin(); - while (it != mObjects.end()) - { - //if ((*it)->getParentNode() == node) - if((*it)->getRootNode() == node) - return (*it); - ++it; - } - return 0; - } - // ------------------------------------------------------------------------- - void CollisionsWorld::discreteCollide() - { - if (mDebugDrawer) - mDebugDrawer->clear (); - if (mDebugContactPoints) - mDebugContactPoints->clear (); - - - mWorld->performDiscreteCollisionDetection(); - - ///one way to draw all the contact points is iterating over contact manifolds / points: - const unsigned int numManifolds = mWorld->getDispatcher()->getNumManifolds(); - for (unsigned int i=0;i < numManifolds; i++) - { - btPersistentManifold* contactManifold = mWorld->getDispatcher()->getManifoldByIndexInternal(i); - - btCollisionObject* obA = static_cast<btCollisionObject*>(contactManifold->getBody0()); - btCollisionObject* obB = static_cast<btCollisionObject*>(contactManifold->getBody1()); - - contactManifold->refreshContactPoints(obA->getWorldTransform(),obB->getWorldTransform()); - - const unsigned int numContacts = contactManifold->getNumContacts(); - for (unsigned int j = 0;j < numContacts; j++) - { - btManifoldPoint& pt = contactManifold->getContactPoint(j); - - if (mShowDebugContactPoints) - { - btVector3 ptA = pt.getPositionWorldOnA(); - btVector3 ptB = pt.getPositionWorldOnB(); - btVector3 ptDistB = ptB + pt.m_normalWorldOnB *100; - - mDebugContactPoints->addLine(ptA.x(),ptA.y(),ptA.z(), - ptB.x(),ptB.y(),ptB.z()); - mDebugContactPoints->addLine(ptB.x(),ptB.y(),ptB.z(), - ptDistB.x(),ptDistB.y(),ptDistB.z()); - } - } - //you can un-comment out this line, and then all points are removed - //contactManifold->clearManifold(); - } - if (mDebugContactPoints) - mDebugContactPoints->draw(); - - - /* - if (mShowDebugShapes) - { - std::deque<Object*>::iterator it = mObjects.begin(); - while (it != mObjects.end()) - { - - //(*it)->getBulletObject()->getWorldTransform().getOpenGLMatrix( m ); - mShowDebugDrawShapes-> - //GL_ShapeDrawer::drawOpenGL(m,objects[i].getCollisionShape(),btVector3(1,1,1),getDebugMode()); - - ++it; - } - } - */ - - if (mDebugDrawer) - { - // draw lines that step Simulation sent. - //mDebugDrawer->draw(); - - const bool drawFeaturesText = (mDebugDrawer->getDebugMode () & btIDebugDraw::DBG_DrawFeaturesText) != 0; - if (drawFeaturesText) - { - // on all bodies we have - // we get all shapes and draw more information - //depending on mDebugDrawer mode. - std::deque<Object*>::iterator it = mObjects.begin(); - while (it != mObjects.end()) - { - //(*it)->drawFeaturesText(); - ++it; - } - } - } - if (mDebugContactPoints) - { - // draw lines that step Simulation sent. - mDebugContactPoints->draw(); - } - } - - // ------------------------------------------------------------------------- - void CollisionsWorld::launchRay(CollisionRayResultCallback &rayresult, short int collisionFilterMask) - { - mWorld->rayTest( - OgreBtConverter::to(rayresult.getRayStartPoint()), - OgreBtConverter::to(rayresult.getRayEndPoint()), - *rayresult.getBulletRay () - //, collisionFilterMask - ); - } -} - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <es...@us...> - 2010-05-22 22:32:09
|
Revision: 2901 http://ogreaddons.svn.sourceforge.net/ogreaddons/?rev=2901&view=rev Author: esuvs Date: 2010-05-22 22:32:03 +0000 (Sat, 22 May 2010) Log Message: ----------- Fix for compile error and to work with new OgreSDK (path to boost needed) Modified Paths: -------------- trunk/QtOgreFramework/Demo/source/DemoGameLogic.cpp trunk/QtOgreFramework/cmake/modules/FindOGRE.cmake Modified: trunk/QtOgreFramework/Demo/source/DemoGameLogic.cpp =================================================================== --- trunk/QtOgreFramework/Demo/source/DemoGameLogic.cpp 2010-05-21 17:05:57 UTC (rev 2900) +++ trunk/QtOgreFramework/Demo/source/DemoGameLogic.cpp 2010-05-22 22:32:03 UTC (rev 2901) @@ -2,7 +2,7 @@ #include "DotSceneHandler.h" #include "MainMenu.h" -#include "OgreVector3Class.h" +#include "Scripting/OgreVector3Class.h" #include "LogManager.h" #include "OgreWidget.h" Modified: trunk/QtOgreFramework/cmake/modules/FindOGRE.cmake =================================================================== --- trunk/QtOgreFramework/cmake/modules/FindOGRE.cmake 2010-05-21 17:05:57 UTC (rev 2900) +++ trunk/QtOgreFramework/cmake/modules/FindOGRE.cmake 2010-05-22 22:32:03 UTC (rev 2901) @@ -22,8 +22,8 @@ IF (OGRESDK) MESSAGE(STATUS "Using OGRE SDK") STRING(REGEX REPLACE "[\\]" "/" OGRESDK "${OGRESDK}") - SET(OGRE_INCLUDE_DIRS ${OGRESDK}/include/Ogre) - SET(OGRE_LIBRARY_DIRS ${OGRESDK}/lib) + SET(OGRE_INCLUDE_DIRS ${OGRESDK}/include/Ogre ${OGRESDK}/boost_1_42) + SET(OGRE_LIBRARY_DIRS ${OGRESDK}/lib ${OGRESDK}/boost_1_42/lib) SET(OGRE_LIBRARIES debug OgreMain_d optimized OgreMain) ENDIF (OGRESDK) IF (OGRESOURCE) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <es...@us...> - 2010-05-21 17:06:03
|
Revision: 2900 http://ogreaddons.svn.sourceforge.net/ogreaddons/?rev=2900&view=rev Author: esuvs Date: 2010-05-21 17:05:57 +0000 (Fri, 21 May 2010) Log Message: ----------- Added scriptable OgreCameraClass. Modified Paths: -------------- trunk/QtOgreFramework/QtOgre/CMakeLists.txt Added Paths: ----------- trunk/QtOgreFramework/QtOgre/include/Scripting/OgreCameraClass.h trunk/QtOgreFramework/QtOgre/include/Scripting/OgreCameraPrototype.h trunk/QtOgreFramework/QtOgre/source/Scripting/OgreCameraClass.cpp trunk/QtOgreFramework/QtOgre/source/Scripting/OgreCameraPrototype.cpp Modified: trunk/QtOgreFramework/QtOgre/CMakeLists.txt =================================================================== --- trunk/QtOgreFramework/QtOgre/CMakeLists.txt 2010-05-16 22:14:03 UTC (rev 2899) +++ trunk/QtOgreFramework/QtOgre/CMakeLists.txt 2010-05-21 17:05:57 UTC (rev 2900) @@ -22,6 +22,8 @@ source/LogModelSortFilterProxy.cpp source/OgreWidget.cpp source/SettingsDialog.cpp + source/Scripting/OgreCameraClass.cpp + source/Scripting/OgreCameraPrototype.cpp source/Scripting/OgreVector3Class.cpp source/Scripting/OgreVector3Prototype.cpp ) @@ -44,6 +46,8 @@ include/OgreWidget.h include/QtOgreForwardDeclarations.h include/SettingsDialog.h + include/Scripting/OgreCameraClass.h + include/Scripting/OgreCameraPrototype.h include/Scripting/OgreVector3Class.h include/Scripting/OgreVector3Prototype.h ) Added: trunk/QtOgreFramework/QtOgre/include/Scripting/OgreCameraClass.h =================================================================== --- trunk/QtOgreFramework/QtOgre/include/Scripting/OgreCameraClass.h (rev 0) +++ trunk/QtOgreFramework/QtOgre/include/Scripting/OgreCameraClass.h 2010-05-21 17:05:57 UTC (rev 2900) @@ -0,0 +1,49 @@ +#ifndef OGRECAMERACLASS_H +#define OGRECAMERACLASS_H + +#include <QtCore/QObject> +#include <QtScript/QScriptClass> +#include <QtScript/QScriptContext> +#include <QtScript/QScriptString> + +#include <OgreCamera.h> + +class OgreCameraClass : public QObject, public QScriptClass +{ +public: + OgreCameraClass(QScriptEngine *engine); + ~OgreCameraClass(); + + //QScriptValue constructor(); + + //QScriptValue newInstance(int size = 0); + //QScriptValue newInstance(const Ogre::Camera &ba); + + QueryFlags queryProperty(const QScriptValue &object, + const QScriptString &name, + QueryFlags flags, uint *id); + + QScriptValue property(const QScriptValue &object, + const QScriptString &name, uint id); + + void setProperty(QScriptValue &object, const QScriptString &name, + uint id, const QScriptValue &value); + + QScriptValue::PropertyFlags propertyFlags( + const QScriptValue &object, const QScriptString &name, uint id); + + QString name() const; + + QScriptValue prototype() const; + +private: + //static QScriptValue construct(QScriptContext *ctx, QScriptEngine *eng); + + //static QScriptValue toScriptValue(QScriptEngine *eng, const Ogre::Camera &ba); + //static void fromScriptValue(const QScriptValue &obj, Ogre::Camera &ba); + + QScriptValue proto; + //QScriptValue ctor; +}; + +#endif //OGRECAMERACLASS_H Added: trunk/QtOgreFramework/QtOgre/include/Scripting/OgreCameraPrototype.h =================================================================== --- trunk/QtOgreFramework/QtOgre/include/Scripting/OgreCameraPrototype.h (rev 0) +++ trunk/QtOgreFramework/QtOgre/include/Scripting/OgreCameraPrototype.h 2010-05-21 17:05:57 UTC (rev 2900) @@ -0,0 +1,28 @@ +#ifndef OGRECAMERAPROTOTYPE_H +#define OGRECAMERAPROTOTYPE_H + +#include <OgreCamera.h> +#include <OgreVector3.h> + +#include <QtCore/QObject> +#include <QtScript/QScriptable> +#include <QtScript/QScriptValue> + +class OgreCameraPrototype : public QObject, public QScriptable +{ +Q_OBJECT +public: + OgreCameraPrototype(QObject *parent = 0); + ~OgreCameraPrototype(); + +public slots: + QScriptValue valueOf() const; + + void setPosition(const Ogre::Vector3 &vec); + +private: + Ogre::Camera* thisOgreCamera() const; +}; + + +#endif //OGRECAMERAPROTOTYPE_H Added: trunk/QtOgreFramework/QtOgre/source/Scripting/OgreCameraClass.cpp =================================================================== --- trunk/QtOgreFramework/QtOgre/source/Scripting/OgreCameraClass.cpp (rev 0) +++ trunk/QtOgreFramework/QtOgre/source/Scripting/OgreCameraClass.cpp 2010-05-21 17:05:57 UTC (rev 2900) @@ -0,0 +1,170 @@ +#include "Scripting/OgreCameraClass.h" +#include "Scripting/OgreCameraPrototype.h" + +#include <QtScript/QScriptClassPropertyIterator> +#include <QtScript/QScriptEngine> + +#include <stdlib.h> + +Q_DECLARE_METATYPE(Ogre::Camera*) +//Q_DECLARE_METATYPE(Ogre::Camera) +Q_DECLARE_METATYPE(OgreCameraClass*) + +OgreCameraClass::OgreCameraClass(QScriptEngine *engine) + : QObject(engine), QScriptClass(engine) +{ + //qScriptRegisterMetaType<Ogre::Camera>(engine, toScriptValue, fromScriptValue); + + /*x = engine->toStringHandle(QLatin1String("x")); + y = engine->toStringHandle(QLatin1String("y")); + z = engine->toStringHandle(QLatin1String("z"));*/ + + proto = engine->newQObject(new OgreCameraPrototype(this), + QScriptEngine::QtOwnership, + QScriptEngine::SkipMethodsInEnumeration + | QScriptEngine::ExcludeSuperClassMethods + | QScriptEngine::ExcludeSuperClassProperties); + QScriptValue global = engine->globalObject(); + proto.setPrototype(global.property("Object").property("prototype")); + + /*ctor = engine->newFunction(construct); + ctor.setData(qScriptValueFromValue(engine, this));*/ +} + +OgreCameraClass::~OgreCameraClass() +{ +} + +QScriptClass::QueryFlags OgreCameraClass::queryProperty(const QScriptValue &object, + const QScriptString &name, + QueryFlags flags, uint *id) +{ + Ogre::Camera *ba = qscriptvalue_cast<Ogre::Camera*>(object.data()); + if (!ba) + return 0; + /*if (name == x) + { + return flags; + } + if (name == y) + { + return flags; + } + if (name == z) + { + return flags; + }*/ + return 0; +} + +QScriptValue OgreCameraClass::property(const QScriptValue &object, + const QScriptString &name, uint id) +{ + Ogre::Camera *ba = qscriptvalue_cast<Ogre::Camera*>(object.data()); + if (!ba) + return QScriptValue(); + /*if (name == x) + { + return ba->x; + } + if (name == y) + { + return ba->y; + } + if (name == z) + { + return ba->z; + }*/ + return QScriptValue(); +} + +void OgreCameraClass::setProperty(QScriptValue &object, + const QScriptString &name, + uint id, const QScriptValue &value) +{ + Ogre::Camera *ba = qscriptvalue_cast<Ogre::Camera*>(object.data()); + if (!ba) + return; + /*if (name == x) + { + ba->x = value.toNumber(); + } + if (name == y) + { + ba->y = value.toNumber(); + } + if (name == z) + { + ba->z = value.toNumber(); + }*/ +} + +QScriptValue::PropertyFlags OgreCameraClass::propertyFlags( + const QScriptValue &/*object*/, const QScriptString &name, uint /*id*/) +{ + /*if (name == x) + { + return QScriptValue::Undeletable + | QScriptValue::SkipInEnumeration; + } + if (name == y) + { + return QScriptValue::Undeletable + | QScriptValue::SkipInEnumeration; + } + if (name == z) + { + return QScriptValue::Undeletable + | QScriptValue::SkipInEnumeration; + }*/ + return QScriptValue::Undeletable; +} + +QString OgreCameraClass::name() const +{ + return QLatin1String("OgreCamera"); +} + +QScriptValue OgreCameraClass::prototype() const +{ + return proto; +} + +/*QScriptValue OgreCameraClass::constructor() +{ + return ctor; +}*/ + +/*QScriptValue OgreCameraClass::newInstance(int size) +{ + return newInstance(Ogre::Camera()); +}*/ + +/*QScriptValue OgreCameraClass::newInstance(const Ogre::Camera &ba) +{ + QScriptValue data = engine()->newVariant(QVariant::fromValue(ba)); + return engine()->newObject(this, data); +}*/ + +/*QScriptValue OgreCameraClass::construct(QScriptContext *ctx, QScriptEngine *) +{ + OgreCameraClass *cls = qscriptvalue_cast<OgreCameraClass*>(ctx->callee().data()); + if (!cls) + return QScriptValue(); + int size = ctx->argument(0).toInt32(); + return cls->newInstance(size); +}*/ + +/*QScriptValue OgreCameraClass::toScriptValue(QScriptEngine *eng, const Ogre::Camera &ba) +{ + QScriptValue ctor = eng->globalObject().property("OgreCamera"); + OgreCameraClass *cls = qscriptvalue_cast<OgreCameraClass*>(ctor.data()); + if (!cls) + return eng->newVariant(qVariantFromValue(ba)); + return cls->newInstance(ba); +}*/ + +/*void OgreCameraClass::fromScriptValue(const QScriptValue &obj, Ogre::Camera &ba) +{ + ba = qscriptvalue_cast<Ogre::Camera>(obj.data()); +}*/ Added: trunk/QtOgreFramework/QtOgre/source/Scripting/OgreCameraPrototype.cpp =================================================================== --- trunk/QtOgreFramework/QtOgre/source/Scripting/OgreCameraPrototype.cpp (rev 0) +++ trunk/QtOgreFramework/QtOgre/source/Scripting/OgreCameraPrototype.cpp 2010-05-21 17:05:57 UTC (rev 2900) @@ -0,0 +1,29 @@ +#include "Scripting/OgreCameraPrototype.h" + +#include <QtScript/QScriptEngine> + +Q_DECLARE_METATYPE(Ogre::Camera*) + +OgreCameraPrototype::OgreCameraPrototype(QObject* parent) + : QObject(parent) +{ +} + +OgreCameraPrototype::~OgreCameraPrototype() +{ +} + +Ogre::Camera* OgreCameraPrototype::thisOgreCamera() const +{ + return qscriptvalue_cast<Ogre::Camera*>(thisObject().data()); +} + +QScriptValue OgreCameraPrototype::valueOf() const +{ + return thisObject().data(); +} + +void OgreCameraPrototype::setPosition(const Ogre::Vector3 &vec) +{ + thisOgreCamera()->setPosition(vec); +} \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <es...@us...> - 2010-05-16 22:14:09
|
Revision: 2899 http://ogreaddons.svn.sourceforge.net/ogreaddons/?rev=2899&view=rev Author: esuvs Date: 2010-05-16 22:14:03 +0000 (Sun, 16 May 2010) Log Message: ----------- Initial work on QtScript support. Modified Paths: -------------- trunk/QtOgreFramework/Demo/CMakeLists.txt trunk/QtOgreFramework/Demo/include/DemoGameLogic.h trunk/QtOgreFramework/Demo/source/DemoGameLogic.cpp trunk/QtOgreFramework/QtOgre/CMakeLists.txt Added Paths: ----------- trunk/QtOgreFramework/QtOgre/include/Scripting/ trunk/QtOgreFramework/QtOgre/include/Scripting/OgreVector3Class.h trunk/QtOgreFramework/QtOgre/include/Scripting/OgreVector3Prototype.h trunk/QtOgreFramework/QtOgre/source/Scripting/ trunk/QtOgreFramework/QtOgre/source/Scripting/OgreVector3Class.cpp trunk/QtOgreFramework/QtOgre/source/Scripting/OgreVector3Prototype.cpp Modified: trunk/QtOgreFramework/Demo/CMakeLists.txt =================================================================== --- trunk/QtOgreFramework/Demo/CMakeLists.txt 2010-04-15 16:05:48 UTC (rev 2898) +++ trunk/QtOgreFramework/Demo/CMakeLists.txt 2010-05-16 22:14:03 UTC (rev 2899) @@ -33,6 +33,7 @@ FIND_PACKAGE(Qt4) SET(QT_USE_QTGUI 1) +SET(QT_USE_QTSCRIPT 1) SET(QT_USE_QTXML 1) INCLUDE(${QT_USE_FILE}) Modified: trunk/QtOgreFramework/Demo/include/DemoGameLogic.h =================================================================== --- trunk/QtOgreFramework/Demo/include/DemoGameLogic.h 2010-04-15 16:05:48 UTC (rev 2898) +++ trunk/QtOgreFramework/Demo/include/DemoGameLogic.h 2010-05-16 22:14:03 UTC (rev 2899) @@ -5,12 +5,15 @@ #include "GameLogic.h" #include "MainMenu.h" +#include <OgreCamera.h> #include <OgrePrerequisites.h> #include <QHash> #include <QTime> +#include <QtScript> + namespace QtOgre { enum KeyStates @@ -20,6 +23,60 @@ }; class StyleSettingsWidget; + + class Keyboard : public QObject + { + Q_OBJECT + public slots: + bool isPressed(int key) + { + return mKeyStates[key] == KS_PRESSED; + } + + void press(int key) + { + mKeyStates[key] = KS_PRESSED; + } + + void release(int key) + { + mKeyStates[key] = KS_RELEASED; + } + + private: + QHash<int, KeyStates> mKeyStates; + }; + + class CameraWrapper : public QObject + { + Q_OBJECT + + public: + void setOgreCamera(Ogre::Camera* pOgreCamera) + { + m_pOgreCamera = pOgreCamera; + } + + public slots: + void moveForward() + { + Ogre::Vector3 dir = m_pOgreCamera->getDirection(); + dir.normalise(); + dir *= 0.01; + m_pOgreCamera->setPosition(m_pOgreCamera->getPosition() + dir); + } + + private: + Ogre::Camera* m_pOgreCamera; + }; + + struct MyStruct + { + int x; + int y; + }; + + Q_DECLARE_METATYPE(MyStruct) class DemoGameLogic : public GameLogic { @@ -43,7 +100,7 @@ void loadScene(QString filename); private: - QHash<int, KeyStates> mKeyStates; + Keyboard keyboard; QPoint mLastFrameMousePos; QPoint mCurrentMousePos; @@ -67,7 +124,18 @@ Ogre::Camera* mCamera; Ogre::SceneManager* mSceneManager; QtOgre::Log* mDemoLog; + + //Scripting + QScriptEngine scriptEngine; + QString updateScript; + CameraWrapper cameraWrapper; + MyStruct myStruct; + QScriptValue cameraPositionScriptValue; + QScriptValue cameraDirectionScriptValue; + QScriptValue cameraRightScriptValue; }; + + } #endif /*DEMOGAMELOGIC_H_*/ \ No newline at end of file Modified: trunk/QtOgreFramework/Demo/source/DemoGameLogic.cpp =================================================================== --- trunk/QtOgreFramework/Demo/source/DemoGameLogic.cpp 2010-04-15 16:05:48 UTC (rev 2898) +++ trunk/QtOgreFramework/Demo/source/DemoGameLogic.cpp 2010-05-16 22:14:03 UTC (rev 2899) @@ -1,6 +1,8 @@ #include "DemoGameLogic.h" + #include "DotSceneHandler.h" #include "MainMenu.h" +#include "OgreVector3Class.h" #include "LogManager.h" #include "OgreWidget.h" @@ -15,11 +17,100 @@ #include <QMouseEvent> #include <QSettings> +#include <QMetaObject> + namespace QtOgre { + QScriptValue toScriptValue(QScriptEngine *engine, const MyStruct &s) + { + QScriptValue obj = engine->newObject(); + obj.setProperty("x", s.x); + obj.setProperty("y", s.y); + return obj; + } + + void fromScriptValue(const QScriptValue &obj, MyStruct &s) + { + s.x = obj.property("x").toInt32(); + s.y = obj.property("y").toInt32(); + } + + struct QtMetaObject : private QObject + { + public: + static const QMetaObject *get() + { return &static_cast<QtMetaObject*>(0)->staticQtMetaObject; } + }; + DemoGameLogic::DemoGameLogic(void) :GameLogic() { + QScriptValue keyboardScriptValue = scriptEngine.newQObject(&keyboard); + scriptEngine.globalObject().setProperty("keyboard", keyboardScriptValue); + + QScriptValue cameraScriptValue = scriptEngine.newQObject(&cameraWrapper); + scriptEngine.globalObject().setProperty("camera", cameraScriptValue); + + QScriptValue Qt = scriptEngine.newQMetaObject(QtMetaObject::get()); + Qt.setProperty("App", scriptEngine.newQObject(qApp)); + scriptEngine.globalObject().setProperty("Qt", Qt); + + OgreVector3Class* cameraPosition = new OgreVector3Class(&scriptEngine); + cameraPositionScriptValue = scriptEngine.newObject(cameraPosition); + scriptEngine.globalObject().setProperty("cameraPosition", cameraPositionScriptValue); + + OgreVector3Class* cameraDirection = new OgreVector3Class(&scriptEngine); + cameraDirectionScriptValue = scriptEngine.newObject(cameraDirection); + scriptEngine.globalObject().setProperty("cameraDirection", cameraDirectionScriptValue); + + OgreVector3Class* cameraRight = new OgreVector3Class(&scriptEngine); + cameraRightScriptValue = scriptEngine.newObject(cameraRight); + scriptEngine.globalObject().setProperty("cameraRight", cameraRightScriptValue); + + myStruct.x = 10; + qScriptRegisterMetaType(&scriptEngine, toScriptValue, fromScriptValue); + QScriptValue myStructValue = scriptEngine.toScriptValue(myStruct); + scriptEngine.globalObject().setProperty("myStruct", myStructValue); + + OgreVector3Class *vecClass = new OgreVector3Class(&scriptEngine); + scriptEngine.globalObject().setProperty("OgreVector3", vecClass->constructor()); + + //updateScript = "print('w pressed = ', keyboard.isPressed(Qt.Key_W));"; + + updateScript = + "if(keyboard.isPressed(Qt.Key_W))" + "{" + " vec = new OgreVector3;" + " vec.x = 1.0;" + " vec.y = 1.0;" + " vec.z = 1.0;" + " vec.normalise();" + " print('vec x = ', vec.x);" + " myStruct.x = myStruct.x + 1;" + " cameraPosition.x = cameraPosition.x + cameraDirection.x;" + " cameraPosition.y = cameraPosition.y + cameraDirection.y;" + " cameraPosition.z = cameraPosition.z + cameraDirection.z;" + " print('x = ', myStruct.x);" + "}" + "if(keyboard.isPressed(Qt.Key_S))" + "{" + " cameraPosition.x = cameraPosition.x - cameraDirection.x;" + " cameraPosition.y = cameraPosition.y - cameraDirection.y;" + " cameraPosition.z = cameraPosition.z - cameraDirection.z;" + "}" + "if(keyboard.isPressed(Qt.Key_D))" + "{" + " cameraPosition.x = cameraPosition.x + cameraRight.x;" + " cameraPosition.y = cameraPosition.y + cameraRight.y;" + " cameraPosition.z = cameraPosition.z + cameraRight.z;" + "}" + "if(keyboard.isPressed(Qt.Key_A))" + "{" + " cameraPosition.x = cameraPosition.x - cameraRight.x;" + " cameraPosition.y = cameraPosition.y - cameraRight.y;" + " cameraPosition.z = cameraPosition.z - cameraRight.z;" + "}" + ; } void DemoGameLogic::initialise(void) @@ -105,22 +196,22 @@ float distance = mCameraSpeed * timeElapsedInSeconds; - if(mKeyStates[Qt::Key_W] == KS_PRESSED) + /*if(keyboard.isPressed(Qt::Key_W)) { mCamera->setPosition(mCamera->getPosition() + mCamera->getDirection() * distance); } - if(mKeyStates[Qt::Key_S] == KS_PRESSED) + if(keyboard.isPressed(Qt::Key_S)) { mCamera->setPosition(mCamera->getPosition() - mCamera->getDirection() * distance); } - if(mKeyStates[Qt::Key_A] == KS_PRESSED) + if(keyboard.isPressed(Qt::Key_A)) { mCamera->setPosition(mCamera->getPosition() - mCamera->getRight() * distance); } - if(mKeyStates[Qt::Key_D] == KS_PRESSED) + if(keyboard.isPressed(Qt::Key_D)) { mCamera->setPosition(mCamera->getPosition() + mCamera->getRight() * distance); - } + }*/ if(!mIsFirstFrame) { @@ -139,6 +230,34 @@ mLastFrameWheelPos = mCurrentWheelPos; mIsFirstFrame = false; + + cameraPositionScriptValue.setProperty("x", mCamera->getPosition().x); + cameraPositionScriptValue.setProperty("y", mCamera->getPosition().y); + cameraPositionScriptValue.setProperty("z", mCamera->getPosition().z); + + cameraDirectionScriptValue.setProperty("x", mCamera->getDirection().x); + cameraDirectionScriptValue.setProperty("y", mCamera->getDirection().y); + cameraDirectionScriptValue.setProperty("z", mCamera->getDirection().z); + + cameraRightScriptValue.setProperty("x", mCamera->getRight().x); + cameraRightScriptValue.setProperty("y", mCamera->getRight().y); + cameraRightScriptValue.setProperty("z", mCamera->getRight().z); + + QScriptValue result = scriptEngine.evaluate(updateScript); + if (scriptEngine.hasUncaughtException()) + { + int line = scriptEngine.uncaughtExceptionLineNumber(); + qCritical() << "uncaught exception at line" << line << ":" << result.toString(); + } + + mCamera->setPosition(cameraPositionScriptValue.property("x").toNumber(), cameraPositionScriptValue.property("y").toNumber(), cameraPositionScriptValue.property("z").toNumber()); + mCamera->setDirection(cameraDirectionScriptValue.property("x").toNumber(), cameraDirectionScriptValue.property("y").toNumber(), cameraDirectionScriptValue.property("z").toNumber()); + //mCamera->setRight(cameraRightScriptValue.property("x").toNumber(), cameraRightScriptValue.property("y").toNumber(), cameraRightScriptValue.property("z").toNumber()); + + + //cameraWrapper.moveForward(); + + //std::cout << "From C++: myStruct.x = " << myStruct.x << std::endl; } void DemoGameLogic::shutdown(void) @@ -149,7 +268,7 @@ void DemoGameLogic::onKeyPress(QKeyEvent* event) { - mKeyStates[event->key()] = KS_PRESSED; + keyboard.press(event->key()); if(event->key() == Qt::Key_Escape) { @@ -160,7 +279,7 @@ void DemoGameLogic::onKeyRelease(QKeyEvent* event) { - mKeyStates[event->key()] = KS_RELEASED; + keyboard.release(event->key()); } void DemoGameLogic::onMousePress(QMouseEvent* event) @@ -214,5 +333,7 @@ Ogre::Viewport* viewport = mApplication->ogreRenderWindow()->addViewport(mCamera); viewport->setBackgroundColour(Ogre::ColourValue::Black); + + cameraWrapper.setOgreCamera(mCamera); } } \ No newline at end of file Modified: trunk/QtOgreFramework/QtOgre/CMakeLists.txt =================================================================== --- trunk/QtOgreFramework/QtOgre/CMakeLists.txt 2010-04-15 16:05:48 UTC (rev 2898) +++ trunk/QtOgreFramework/QtOgre/CMakeLists.txt 2010-05-16 22:14:03 UTC (rev 2899) @@ -22,6 +22,8 @@ source/LogModelSortFilterProxy.cpp source/OgreWidget.cpp source/SettingsDialog.cpp + source/Scripting/OgreVector3Class.cpp + source/Scripting/OgreVector3Prototype.cpp ) SET(INC_FILES @@ -42,6 +44,8 @@ include/OgreWidget.h include/QtOgreForwardDeclarations.h include/SettingsDialog.h + include/Scripting/OgreVector3Class.h + include/Scripting/OgreVector3Prototype.h ) SET(UI_FILES @@ -61,6 +65,7 @@ FIND_PACKAGE(Qt4) SET(QT_USE_QTGUI 1) +SET(QT_USE_QTSCRIPT 1) SET(QT_USE_QTXML 1) INCLUDE(${QT_USE_FILE}) Added: trunk/QtOgreFramework/QtOgre/include/Scripting/OgreVector3Class.h =================================================================== --- trunk/QtOgreFramework/QtOgre/include/Scripting/OgreVector3Class.h (rev 0) +++ trunk/QtOgreFramework/QtOgre/include/Scripting/OgreVector3Class.h 2010-05-16 22:14:03 UTC (rev 2899) @@ -0,0 +1,52 @@ +#ifndef OGREVECTOR3CLASS_H +#define OGREVECTOR3CLASS_H + +#include <QtCore/QObject> +#include <QtScript/QScriptClass> +#include <QtScript/QScriptContext> +#include <QtScript/QScriptString> + +#include <OgreVector3.h> + +class OgreVector3Class : public QObject, public QScriptClass +{ +public: + OgreVector3Class(QScriptEngine *engine); + ~OgreVector3Class(); + + QScriptValue constructor(); + + QScriptValue newInstance(int size = 0); + QScriptValue newInstance(const Ogre::Vector3 &ba); + + QueryFlags queryProperty(const QScriptValue &object, + const QScriptString &name, + QueryFlags flags, uint *id); + + QScriptValue property(const QScriptValue &object, + const QScriptString &name, uint id); + + void setProperty(QScriptValue &object, const QScriptString &name, + uint id, const QScriptValue &value); + + QScriptValue::PropertyFlags propertyFlags( + const QScriptValue &object, const QScriptString &name, uint id); + + QString name() const; + + QScriptValue prototype() const; + +private: + static QScriptValue construct(QScriptContext *ctx, QScriptEngine *eng); + + static QScriptValue toScriptValue(QScriptEngine *eng, const Ogre::Vector3 &ba); + static void fromScriptValue(const QScriptValue &obj, Ogre::Vector3 &ba); + + QScriptString x; + QScriptString y; + QScriptString z; + QScriptValue proto; + QScriptValue ctor; +}; + +#endif //OGREVECTOR3CLASS_H Added: trunk/QtOgreFramework/QtOgre/include/Scripting/OgreVector3Prototype.h =================================================================== --- trunk/QtOgreFramework/QtOgre/include/Scripting/OgreVector3Prototype.h (rev 0) +++ trunk/QtOgreFramework/QtOgre/include/Scripting/OgreVector3Prototype.h 2010-05-16 22:14:03 UTC (rev 2899) @@ -0,0 +1,27 @@ +#ifndef OGREVECTOR3PROTOTYPE_H +#define OGREVECTOR3PROTOTYPE_H + +#include <OgreVector3.h> + +#include <QtCore/QObject> +#include <QtScript/QScriptable> +#include <QtScript/QScriptValue> + +class OgreVector3Prototype : public QObject, public QScriptable +{ +Q_OBJECT +public: + OgreVector3Prototype(QObject *parent = 0); + ~OgreVector3Prototype(); + +public slots: + QScriptValue valueOf() const; + + void normalise(void); + +private: + Ogre::Vector3* thisOgreVector3() const; +}; + + +#endif //OGREVECTOR3PROTOTYPE_H Added: trunk/QtOgreFramework/QtOgre/source/Scripting/OgreVector3Class.cpp =================================================================== --- trunk/QtOgreFramework/QtOgre/source/Scripting/OgreVector3Class.cpp (rev 0) +++ trunk/QtOgreFramework/QtOgre/source/Scripting/OgreVector3Class.cpp 2010-05-16 22:14:03 UTC (rev 2899) @@ -0,0 +1,170 @@ +#include "Scripting/OgreVector3Class.h" +#include "Scripting/OgreVector3Prototype.h" + +#include <QtScript/QScriptClassPropertyIterator> +#include <QtScript/QScriptEngine> + +#include <stdlib.h> + +Q_DECLARE_METATYPE(Ogre::Vector3*) +Q_DECLARE_METATYPE(Ogre::Vector3) +Q_DECLARE_METATYPE(OgreVector3Class*) + +OgreVector3Class::OgreVector3Class(QScriptEngine *engine) + : QObject(engine), QScriptClass(engine) +{ + qScriptRegisterMetaType<Ogre::Vector3>(engine, toScriptValue, fromScriptValue); + + x = engine->toStringHandle(QLatin1String("x")); + y = engine->toStringHandle(QLatin1String("y")); + z = engine->toStringHandle(QLatin1String("z")); + + proto = engine->newQObject(new OgreVector3Prototype(this), + QScriptEngine::QtOwnership, + QScriptEngine::SkipMethodsInEnumeration + | QScriptEngine::ExcludeSuperClassMethods + | QScriptEngine::ExcludeSuperClassProperties); + QScriptValue global = engine->globalObject(); + proto.setPrototype(global.property("Object").property("prototype")); + + ctor = engine->newFunction(construct); + ctor.setData(qScriptValueFromValue(engine, this)); +} + +OgreVector3Class::~OgreVector3Class() +{ +} + +QScriptClass::QueryFlags OgreVector3Class::queryProperty(const QScriptValue &object, + const QScriptString &name, + QueryFlags flags, uint *id) +{ + Ogre::Vector3 *ba = qscriptvalue_cast<Ogre::Vector3*>(object.data()); + if (!ba) + return 0; + if (name == x) + { + return flags; + } + if (name == y) + { + return flags; + } + if (name == z) + { + return flags; + } + return 0; +} + +QScriptValue OgreVector3Class::property(const QScriptValue &object, + const QScriptString &name, uint id) +{ + Ogre::Vector3 *ba = qscriptvalue_cast<Ogre::Vector3*>(object.data()); + if (!ba) + return QScriptValue(); + if (name == x) + { + return ba->x; + } + if (name == y) + { + return ba->y; + } + if (name == z) + { + return ba->z; + } + return QScriptValue(); +} + +void OgreVector3Class::setProperty(QScriptValue &object, + const QScriptString &name, + uint id, const QScriptValue &value) +{ + Ogre::Vector3 *ba = qscriptvalue_cast<Ogre::Vector3*>(object.data()); + if (!ba) + return; + if (name == x) + { + ba->x = value.toNumber(); + } + if (name == y) + { + ba->y = value.toNumber(); + } + if (name == z) + { + ba->z = value.toNumber(); + } +} + +QScriptValue::PropertyFlags OgreVector3Class::propertyFlags( + const QScriptValue &/*object*/, const QScriptString &name, uint /*id*/) +{ + if (name == x) + { + return QScriptValue::Undeletable + | QScriptValue::SkipInEnumeration; + } + if (name == y) + { + return QScriptValue::Undeletable + | QScriptValue::SkipInEnumeration; + } + if (name == z) + { + return QScriptValue::Undeletable + | QScriptValue::SkipInEnumeration; + } + return QScriptValue::Undeletable; +} + +QString OgreVector3Class::name() const +{ + return QLatin1String("OgreVector3"); +} + +QScriptValue OgreVector3Class::prototype() const +{ + return proto; +} + +QScriptValue OgreVector3Class::constructor() +{ + return ctor; +} + +QScriptValue OgreVector3Class::newInstance(int size) +{ + return newInstance(Ogre::Vector3()); +} + +QScriptValue OgreVector3Class::newInstance(const Ogre::Vector3 &ba) +{ + QScriptValue data = engine()->newVariant(QVariant::fromValue(ba)); + return engine()->newObject(this, data); +} + +QScriptValue OgreVector3Class::construct(QScriptContext *ctx, QScriptEngine *) +{ + OgreVector3Class *cls = qscriptvalue_cast<OgreVector3Class*>(ctx->callee().data()); + if (!cls) + return QScriptValue(); + int size = ctx->argument(0).toInt32(); + return cls->newInstance(size); +} + +QScriptValue OgreVector3Class::toScriptValue(QScriptEngine *eng, const Ogre::Vector3 &ba) +{ + QScriptValue ctor = eng->globalObject().property("OgreVector3"); + OgreVector3Class *cls = qscriptvalue_cast<OgreVector3Class*>(ctor.data()); + if (!cls) + return eng->newVariant(qVariantFromValue(ba)); + return cls->newInstance(ba); +} + +void OgreVector3Class::fromScriptValue(const QScriptValue &obj, Ogre::Vector3 &ba) +{ + ba = qscriptvalue_cast<Ogre::Vector3>(obj.data()); +} Added: trunk/QtOgreFramework/QtOgre/source/Scripting/OgreVector3Prototype.cpp =================================================================== --- trunk/QtOgreFramework/QtOgre/source/Scripting/OgreVector3Prototype.cpp (rev 0) +++ trunk/QtOgreFramework/QtOgre/source/Scripting/OgreVector3Prototype.cpp 2010-05-16 22:14:03 UTC (rev 2899) @@ -0,0 +1,29 @@ +#include "Scripting/OgreVector3Prototype.h" + +#include <QtScript/QScriptEngine> + +Q_DECLARE_METATYPE(Ogre::Vector3*) + +OgreVector3Prototype::OgreVector3Prototype(QObject* parent) + : QObject(parent) +{ +} + +OgreVector3Prototype::~OgreVector3Prototype() +{ +} + +Ogre::Vector3* OgreVector3Prototype::thisOgreVector3() const +{ + return qscriptvalue_cast<Ogre::Vector3*>(thisObject().data()); +} + +QScriptValue OgreVector3Prototype::valueOf() const +{ + return thisObject().data(); +} + +void OgreVector3Prototype::normalise(void) +{ + thisOgreVector3()->normalise(); +} \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <si...@us...> - 2010-04-15 16:05:59
|
Revision: 2898 http://ogreaddons.svn.sourceforge.net/ogreaddons/?rev=2898&view=rev Author: sinbad Date: 2010-04-15 16:05:48 +0000 (Thu, 15 Apr 2010) Log Message: ----------- Fix inconsistent EOLs Modified Paths: -------------- trunk/meshmagick/include/MmEditableMesh.h trunk/meshmagick/src/MmEditableMesh.cpp Modified: trunk/meshmagick/include/MmEditableMesh.h =================================================================== --- trunk/meshmagick/include/MmEditableMesh.h 2010-04-14 15:33:57 UTC (rev 2897) +++ trunk/meshmagick/include/MmEditableMesh.h 2010-04-15 16:05:48 UTC (rev 2898) @@ -1,26 +1,26 @@ -/* -This file is part of MeshMagick - An Ogre mesh file manipulation tool. -Copyright (C) 2007-2010 Sascha Kolewa, Daniel Wickert - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - +/* +This file is part of MeshMagick - An Ogre mesh file manipulation tool. +Copyright (C) 2007-2010 Sascha Kolewa, Daniel Wickert + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +*/ + #include <OgreMesh.h> namespace meshmagick Modified: trunk/meshmagick/src/MmEditableMesh.cpp =================================================================== --- trunk/meshmagick/src/MmEditableMesh.cpp 2010-04-14 15:33:57 UTC (rev 2897) +++ trunk/meshmagick/src/MmEditableMesh.cpp 2010-04-15 16:05:48 UTC (rev 2898) @@ -1,26 +1,26 @@ -/* -This file is part of MeshMagick - An Ogre mesh file manipulation tool. -Copyright (C) 2007-2010 Sascha Kolewa, Daniel Wickert - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - +/* +This file is part of MeshMagick - An Ogre mesh file manipulation tool. +Copyright (C) 2007-2010 Sascha Kolewa, Daniel Wickert + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +*/ + #include "MmEditableMesh.h" namespace meshmagick This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <si...@us...> - 2010-04-14 15:34:06
|
Revision: 2897 http://ogreaddons.svn.sourceforge.net/ogreaddons/?rev=2897&view=rev Author: sinbad Date: 2010-04-14 15:33:57 +0000 (Wed, 14 Apr 2010) Log Message: ----------- Some diagnostics (disabled) - useful when Tootle asserts and you need to ask ATI why ;) Modified Paths: -------------- trunk/meshmagick/src/MmTootleTool.cpp Modified: trunk/meshmagick/src/MmTootleTool.cpp =================================================================== --- trunk/meshmagick/src/MmTootleTool.cpp 2010-04-10 01:26:44 UTC (rev 2896) +++ trunk/meshmagick/src/MmTootleTool.cpp 2010-04-14 15:33:57 UTC (rev 2897) @@ -304,6 +304,28 @@ //start tootle work +#if 0 + // Dump to .obj for diagnostics for when Tootle asserts + if (mVerbosity >= V_HIGH) + { + std::ofstream ofstream; + String filename = String("TootleInput_") + mesh->getName() + "_" + StringConverter::toString(i) + ".obj"; + ofstream.open(filename.c_str()); + + for (std::vector<Vector3>::iterator v = vertices.begin(); v != vertices.end(); ++v) + { + ofstream << "v " << v->x << " " << v->y << " " << v->z << std::endl; + } + for (std::vector<unsigned int>::iterator f = indices.begin(); f != indices.end();) + { + ofstream << "f " << (*f++ + 1) << " " << (*f++ + 1) << " " << (*f++ + 1) << std::endl; + } + ofstream.close(); + + } +#endif + + // ***************************************************************** // Optimize the mesh // ***************************************************************** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ror...@us...> - 2010-04-10 01:26:49
|
Revision: 2896 http://ogreaddons.svn.sourceforge.net/ogreaddons/?rev=2896&view=rev Author: rorthomas Date: 2010-04-10 01:26:44 +0000 (Sat, 10 Apr 2010) Log Message: ----------- moved svn files to new location: please leave this SVN as it is to preserve file history Added Paths: ----------- trunk/forests/moved.txt Added: trunk/forests/moved.txt =================================================================== --- trunk/forests/moved.txt (rev 0) +++ trunk/forests/moved.txt 2010-04-10 01:26:44 UTC (rev 2896) @@ -0,0 +1,2 @@ +the source code moved to its new home: +http://code.google.com/p/ogre-paged/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ror...@us...> - 2010-04-10 01:18:11
|
Revision: 2895 http://ogreaddons.svn.sourceforge.net/ogreaddons/?rev=2895&view=rev Author: rorthomas Date: 2010-04-10 01:18:01 +0000 (Sat, 10 Apr 2010) Log Message: ----------- moved svn files to new location: please leave this SVN as it is to preserve file history Removed Paths: ------------- trunk/forests/CMakeDependenciesConfig.txt trunk/forests/CMakeLists.txt trunk/forests/GettingStarted.txt trunk/forests/PagedGeometry.pc.in trunk/forests/Todo.txt trunk/forests/bin/ trunk/forests/docs/ trunk/forests/examples/ trunk/forests/include/ trunk/forests/lib/ trunk/forests/source/ Deleted: trunk/forests/CMakeDependenciesConfig.txt =================================================================== --- trunk/forests/CMakeDependenciesConfig.txt 2010-04-09 16:11:06 UTC (rev 2894) +++ trunk/forests/CMakeDependenciesConfig.txt 2010-04-10 01:18:01 UTC (rev 2895) @@ -1,66 +0,0 @@ -IF(WIN32) - set(Ogre_INCLUDE_DIRS "include/Ogre" CACHE PATH "The ogre include path to use") - set(Ogre_LIBRARY_DIRS "lib" CACHE PATH "The ogre lib path to use") - set(Ogre_LIBRARIES "OgreMain" CACHE STRING "The ogre lib to link against") - set(Ois_INCLUDE_DIRS "include/ois" CACHE PATH "The OIS include path to use") - set(Ois_LIBRARY_DIRS "lib" CACHE PATH "The OIS lib path to use") - set(Ois_LIBRARIES "ois" CACHE STRING "The ogre lib to link against") - # add includes to check directories - set(CMAKE_REQUIRED_INCLUDES ${Ogre_INCLUDE_DIRS} ${Ois_INCLUDE_DIRS}) - - # check for libs and include files we want to use - CHECK_INCLUDE_FILE(windows.h HAVE_WINDOWS_INCLUDES) - if(NOT HAVE_WINDOWS_INCLUDES) - message(FATAL_ERROR "could not find the windows platform includes. Please install them.") - endif() - - set(BOOST_PATH "C:/Program Files/boost/boost_1_39" CACHE PATH "The BOOST root path to use") - include_directories(${BOOST_PATH}) - link_directories (${BOOST_PATH}/lib) -ELSEIF(UNIX) - find_package(PkgConfig) - PKG_CHECK_MODULES (Ogre OGRE REQUIRED) - PKG_CHECK_MODULES (Ois OIS REQUIRED) - # add includes to check directories - set(CMAKE_REQUIRED_INCLUDES ${Ogre_INCLUDE_DIRS} ${Ois_INCLUDE_DIRS}) - # check for libs and include files we want to use - # check below not working!? - #CHECK_LIBRARY_EXISTS(libOgreMain.so loadPlugins "" HAVE_OGRE_LIBS) - #if(NOT HAVE_OGRE_LIBS) - # message(FATAL_ERROR "could not link against Ogre, please check of you have the required libraries installed") - #endif() -ENDIF(WIN32) - - -IF(NOT WIN32) - # XXX TODO: fix the checks for windows! - # add this so the checks work - set(CMAKE_REQUIRED_INCLUDES ${Ogre_INCLUDE_DIRS} ${Ois_INCLUDE_DIRS}) - - # cross platform checks - # check for libs and include files we want to use - CHECK_INCLUDE_FILE_CXX(OgrePrerequisites.h HAVE_OGRE_INCLUDES) - if(NOT HAVE_OGRE_INCLUDES) - message("could not find the Ogre includes. Please install them.") - endif() - - CHECK_INCLUDE_FILE_CXX(OIS/OIS.h HAVE_OIS_DIR_INCLUDES) - if(HAVE_OIS_DIR_INCLUDES) - set(OIS_INCLUDE "OIS/OIS.h") - endif() - - CHECK_INCLUDE_FILE_CXX(OIS.h HAVE_OIS_INCLUDES) - if(HAVE_OIS_INCLUDES) - set(OIS_INCLUDE "OIS.h") - endif() - - if(NOT HAVE_OIS_DIR_INCLUDES AND NOT HAVE_OIS_INCLUDES) - message("could not find the OIS includes. Please install them.") - endif() - - if(HAVE_OIS_DIR_INCLUDES AND NOT HAVE_OIS_INCLUDES) - set(OIS_USING_DIR TRUE) - else() - set(OIS_USING_DIR FALSE) - endif() -endif() Deleted: trunk/forests/CMakeLists.txt =================================================================== --- trunk/forests/CMakeLists.txt 2010-04-09 16:11:06 UTC (rev 2894) +++ trunk/forests/CMakeLists.txt 2010-04-10 01:18:01 UTC (rev 2895) @@ -1,137 +0,0 @@ -###################################################################### -# PagedGeometry BUILD SYSTEM -# Welcome to the CMake build system for PagedGeometry. -# This is the main file where we prepare the general build environment -# and provide build configuration options. -###################################################################### -# cmake system for PagedGeometry updated on the 5th of April by thomas{at}thomasfischer{DOT}biz - -cmake_minimum_required(VERSION 2.4) -# loose if - else constructs -SET(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS TRUE) -if(COMMAND cmake_policy) - cmake_policy(SET CMP0003 NEW) -endif(COMMAND cmake_policy) - - -# add some functions we use that are shipped with cmake -INCLUDE(CheckLibraryExists) -INCLUDE(CheckIncludeFile) -INCLUDE(CheckIncludeFileCXX) -INCLUDE(CheckCCompilerFlag) -INCLUDE(CheckCSourceCompiles) - - -# define the project -project(PagedGeometry) - -# find all dependencies -include(CMakeDependenciesConfig.txt) - -# build static libs by default -SET(BUILD_SHARED_LIBS ON) - -# setup paths -SET(RUNTIME_OUTPUT_DIRECTORY "${PagedGeometry_SOURCE_DIR}/bin/") -SET(LIBRARY_OUTPUT_DIRECTORY "${PagedGeometry_SOURCE_DIR}/lib/") -SET(ARCHIVE_OUTPUT_DIRECTORY "${PagedGeometry_SOURCE_DIR}/lib/") -SET(EXECUTABLE_OUTPUT_PATH ${RUNTIME_OUTPUT_DIRECTORY}) -SET(LIBRARY_OUTPUT_PATH ${LIBRARY_OUTPUT_DIRECTORY}) - -# some optimization flags -if(WIN32) - # add multi processor compilation flags - set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MP /GL /Ox /Ob2 /Oi /Ot /Oy /fp:fast /GS- /MP /Zi") - set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} /MP /Zi") - set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /MP /Od /Zi") - set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MP /Od /Zi") - # some general flags - add_definitions("-D_CRT_SECURE_NO_WARNINGS") - include_directories(${DirectX_INCLUDE_DIR}) - - set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /DEBUG /SUBSYSTEM:WINDOWS") - set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /DEBUG /SUBSYSTEM:WINDOWS /LTCG /OPT:REF") - set(CMAKE_EXE_LINKER_FLAGS_MINSIZEREL "${CMAKE_EXE_LINKER_FLAGS_MINSIZEREL} /DEBUG /SUBSYSTEM:WINDOWS /LTCG /OPT:REF") - set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO} /DEBUG /SUBSYSTEM:WINDOWS /LTCG /OPT:REF") -ELSEIF(UNIX) - set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -mfpmath=sse -msse2 -mmmx -msse -msse3 -m3dnow -O2 -fomit-frame-pointer -fstrict-aliasing -ffast-math -ftracer") - set(CMAKE_EXE_LINKER_FLAGS_RelWithDebug "${CMAKE_EXE_LINKER_FLAGS_RelWithDebug} -O0") -endif(WIN32) - -# some ugly hack to fix cmake's stupidity -macro(windows_hacks NAME) -IF(WIN32) - if (MSVC_IDE) - # hack to get around the "Debug" and "Release" directories cmake tries to add on Windows - set_target_properties(${NAME} PROPERTIES PREFIX "../") - set_target_properties(${NAME} PROPERTIES IMPORT_PREFIX "../") - endif(MSVC_IDE) -ENDIF(WIN32) -endmacro(windows_hacks) - -# some PG build options -set(PAGEDGEOMETRY_BUILD_SAMPLES "TRUE" CACHE BOOL "build the examples") -set(PAGEDGEOMETRY_ALTERNATE_COORDSYSTEM "FALSE" CACHE BOOL "alternate coordinate system, do not use unless you are very sure about it") -set(PAGEDGEOMETRY_USE_OGRE_RANDOM "FALSE" CACHE BOOL "fallback to Ogre's PRNG instead of using our own (not recommended)") -set(PAGEDGEOMETRY_USER_DATA "FALSE" CACHE BOOL "ability to attach user data to entities") - -# some versioning things -SET(LIB_MAJOR_VERSION "1") -SET(LIB_MINOR_VERSION "1") -SET(LIB_BUILD_VERSION "0") -SET(LIB_VERSION "${LIB_MAJOR_VERSION}.${LIB_MINOR_VERSION}.${LIB_BUILD_VERSION}") -IF(NOT DEFINED LIB_INSTALL_DIR) - SET(LIB_INSTALL_DIR "lib${LIB_SUFFIX}") -ENDIF(NOT DEFINED LIB_INSTALL_DIR) - -# Needed for PagedGeometry.pc.in -SET(prefix ${CMAKE_INSTALL_PREFIX}) -SET(exec_prefix "\${prefix}") -SET(libdir "\${exec_prefix}/${LIB_INSTALL_DIR}") -SET(bindir "\${exec_prefix}/bin") -SET(includedir "\${prefix}/include") -SET(PACKAGE_NAME "PagedGeometry") -SET(PACKAGE_VERSION "${LIB_VERSION}") - -# configuration of the config.h and PkgConfig -CONFIGURE_FILE( - "${PagedGeometry_SOURCE_DIR}/include/PagedGeometryConfig.h.in" - "${PagedGeometry_BINARY_DIR}/include/PagedGeometryConfig.h") -CONFIGURE_FILE( - "${PagedGeometry_SOURCE_DIR}/PagedGeometry.pc.in" - "${PagedGeometry_BINARY_DIR}/PagedGeometry.pc" - @ONLY) -# install the PkgConfig file -INSTALL(FILES "${PagedGeometry_BINARY_DIR}/PagedGeometry.pc" DESTINATION "${LIB_INSTALL_DIR}/pkgconfig") - -# some additional compiler flags -IF(NOT WIN32) - ADD_DEFINITIONS(-Wall) - CHECK_C_COMPILER_FLAG(-Wextra HAVE_W_EXTRA) - IF(HAVE_W_EXTRA) - ADD_DEFINITIONS(-Wextra) - ENDIF() -endif() - -# Set visibility options if available -IF(NOT WIN32) - CHECK_C_SOURCE_COMPILES("int foo() __attribute__((destructor)); - int main() {return 0;}" HAVE_GCC_DESTRUCTOR) - - CHECK_C_COMPILER_FLAG(-fvisibility=hidden HAVE_VISIBILITY_SWITCH) - IF(HAVE_VISIBILITY_SWITCH) - CHECK_C_SOURCE_COMPILES("int foo() __attribute__((visibility(\"default\"))); - int main() {return 0;}" HAVE_GCC_VISIBILITY) - IF(HAVE_GCC_VISIBILITY) - ADD_DEFINITIONS(-fvisibility=hidden -DHAVE_GCC_VISIBILITY) - ENDIF() - ENDIF() -ENDIF() - - -# now add the directories -add_subdirectory(source) - -if(PAGEDGEOMETRY_BUILD_SAMPLES) - add_subdirectory(examples) -endif(PAGEDGEOMETRY_BUILD_SAMPLES) \ No newline at end of file Deleted: trunk/forests/GettingStarted.txt =================================================================== --- trunk/forests/GettingStarted.txt 2010-04-09 16:11:06 UTC (rev 2894) +++ trunk/forests/GettingStarted.txt 2010-04-10 01:18:01 UTC (rev 2895) @@ -1,15 +0,0 @@ -==== What is PagedGeometry? ==== - -The PagedGeometry engine is an add-on to the OGRE Graphics Engine, which provides highly optimized methods for rendering massive amounts of small meshes covering a possibly infinite area. This is especially well suited for dense forests and outdoor scenes, with millions of trees, bushes, grass, rocks, etc., etc. - -Paged geometry gives you many advantages over plain entities, the main one being speed: With proper usage of detail levels, outdoor scenes managed by PagedGeometry can be >100x faster than plain entities. Another advantage is that the geometry is paged; in other words, only entities which are immediately needed (to be displayed) are loaded. This allows you to expand the boundaries of your virtual world almost infinitely (only limited by floating point precision), providing the player with a more realistically scaled game area. - -==== Getting Started ==== - -The first thing you should do after extracting PagedGeometry somewhere is compile it. By default, the PagedGeometry library files (PagedGeometry.lib, and PagedGeometry_d.lib) are not included in the download, so you'll have to compile them yourself. Fortunately, this is fairly easy to do, since PagedGeometry doesn't require any external libraries besides Ogre. First, double-click on \x93PagedGeometry.sln\x94 to open up the PagedGeometry library project in Visual Studio. Then find the \x93Solution Explorer\x94 window right-click on \x93Solution 'PagedGeometry' (1 project)\x94, and select \x93Batch Build\x94. Click \x93Select All\x94, then \x93Build\x94, and wait until PagedGeometry has finished compiling (the status bar at the bottom of the screen should say \x93Build succeeded\x94 when finished). - -Next, find Ogre's release and debug DLLs (usually C:\OgreSDK\bin\[release|debug]), and copy them appropriately into the \PagedGeometry\examples\bin\[release|debug] folders. This is necessary because, in order for the examples to run properly, they need to have access to Ogre's DLLs. Note that Plugin_ParticleFX.dll, Plugin_BSPSceneManager.dll, OgreGUIRenderer.dll, and CEGUI DLLs are not used by the examples, and don't need to be copied. - -Now you can try running the example applications. Open "Examples.sln" (in the "examples" folder) in Visual Studio. You should see a list of example projects on the left. To choose one, right click on the project name (for example, "Example 7 - Lightmaps"), and select "Set as StartUp Project". Make sure "Release" is selected ("Debug" mode is very slow) in the configuration drop-down, and run (Debug -> Start Debugging). - -When you're ready to start learning how to use PagedGeometry, the best place to start is with Tutorial 1 (in the docs folder). The tutorials will teach you how to use many important PagedGeometry features, step by step. The API reference isn't recommended for learning, but is a valuable resource when you need specific in-depth information about a certain function or class. \ No newline at end of file Deleted: trunk/forests/PagedGeometry.pc.in =================================================================== --- trunk/forests/PagedGeometry.pc.in 2010-04-09 16:11:06 UTC (rev 2894) +++ trunk/forests/PagedGeometry.pc.in 2010-04-10 01:18:01 UTC (rev 2895) @@ -1,11 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ - -Name: PagedGeometry -Description: Paged Geometry is a library that helps you to add grass and trees to your Ogre3D scene -Requires: @PKG_CONFIG_REQUIRES@ -Version: @PACKAGE_VERSION@ -Libs: -L${libdir} -l@LIBNAME@ @PKG_CONFIG_LIBS@ -Cflags: -I${includedir} Deleted: trunk/forests/Todo.txt =================================================================== --- trunk/forests/Todo.txt 2010-04-09 16:11:06 UTC (rev 2894) +++ trunk/forests/Todo.txt 2010-04-10 01:18:01 UTC (rev 2895) @@ -1,57 +0,0 @@ -__PagedGeometry________________________ - -+ Add minimum tree scale for treeloaders -+ Enforce tree scales with debug-only exceptions in treeloaders -+ Add support for alternate coordinate systems (for example, where Z is up) -+ Update docs (recompile API, no more updateAnimation(), new frameUpdate() function in PageLoader) -+ Add #defines for alternate coordinate system support -+ Fix impostor rotation point -+ Add grass layer delete -+ Fix impostor rotation point problem -+ Add userData parameter support to height functions - -Fixed: -+ Fix tree scale issue -+ Fix StaticBillboardSet reference bug -+ Fix possible grass animation bug -+ Fix grass reload bug -+ Supplying an invalid material to GrassLayer will crash without a descriptive error -+ Fix impostor filename issue -+ Batches and impostors do not correctly handle per-subentity materials - - Add shared vertex data support - -Confirmed: - - ---- Release Version 1.0 --- - -+ Sprite grass - Angled grass - Add density map tree loader - Fix batching of shared vertices - Density map editing functions - Add BillboardPage - Add Impostor autoregeneration - ---- Release Version 1.1 --- - - Improve impostor customization - setDefaultImpostorResolution(), setDefaultImpostorColor(), setDefaultImpostorRenders() - setImpostorResolution(), setImpostorColor(), setImpostorRenders() - Implement InstancePage - Add hard disk tree loader - - Dynamic lighting - Swaying trees - Add functions to reload rectangular and circular regions of geometry - Add progressive reloading option - - - Add a maximum view height as well as a maximum view distance for detail levels - Optimize impostor generator for tall, skinny trees - Fix Ogre's billboard system for camera roll - Experement with single-triangle billboards and point-sprites - Add collision interface - Possibly add a pseudo-volumetric-texture GeometryPage implementation - Add automated terrain lightmapper to PagedGeometry This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <si...@us...> - 2010-04-09 16:11:12
|
Revision: 2894 http://ogreaddons.svn.sourceforge.net/ogreaddons/?rev=2894&view=rev Author: sinbad Date: 2010-04-09 16:11:06 +0000 (Fri, 09 Apr 2010) Log Message: ----------- Allow setting of options in code without using invoke() Modified Paths: -------------- trunk/meshmagick/include/MmTool.h Modified: trunk/meshmagick/include/MmTool.h =================================================================== --- trunk/meshmagick/include/MmTool.h 2010-04-09 08:29:28 UTC (rev 2893) +++ trunk/meshmagick/include/MmTool.h 2010-04-09 16:11:06 UTC (rev 2894) @@ -46,8 +46,14 @@ void invoke(const OptionList& globalOptions, const OptionList& toolOptions, const Ogre::StringVector& inFileNames, const Ogre::StringVector& outFileNames); + typedef enum {V_QUIET, V_NORMAL, V_HIGH} Verbosity; + void setVerbosity(Verbosity v) { mVerbosity = v; } + Verbosity getVerbosity() const { return mVerbosity; } + + void setFollowSkeletonLink(bool f) { mFollowSkeletonLink = f; } + bool getFollowSkeletonLink() const { return mFollowSkeletonLink; } + protected: - typedef enum {V_QUIET, V_NORMAL, V_HIGH} Verbosity; Verbosity mVerbosity; bool mFollowSkeletonLink; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ror...@us...> - 2010-04-09 08:29:35
|
Revision: 2893 http://ogreaddons.svn.sourceforge.net/ogreaddons/?rev=2893&view=rev Author: rorthomas Date: 2010-04-09 08:29:28 +0000 (Fri, 09 Apr 2010) Log Message: ----------- defaults to shared DLL Modified Paths: -------------- trunk/forests/CMakeLists.txt trunk/forests/source/CMakeLists.txt Modified: trunk/forests/CMakeLists.txt =================================================================== --- trunk/forests/CMakeLists.txt 2010-04-09 00:34:15 UTC (rev 2892) +++ trunk/forests/CMakeLists.txt 2010-04-09 08:29:28 UTC (rev 2893) @@ -29,7 +29,7 @@ include(CMakeDependenciesConfig.txt) # build static libs by default -SET(BUILD_SHARED_LIBS OFF) +SET(BUILD_SHARED_LIBS ON) # setup paths SET(RUNTIME_OUTPUT_DIRECTORY "${PagedGeometry_SOURCE_DIR}/bin/") Modified: trunk/forests/source/CMakeLists.txt =================================================================== --- trunk/forests/source/CMakeLists.txt 2010-04-09 00:34:15 UTC (rev 2892) +++ trunk/forests/source/CMakeLists.txt 2010-04-09 08:29:28 UTC (rev 2893) @@ -8,7 +8,7 @@ set(LIBNAME "PagedGeometry") -ADD_LIBRARY(${LIBNAME} STATIC ${sources}) +ADD_LIBRARY(${LIBNAME} ${sources}) windows_hacks(${LIBNAME}) # install the library This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ror...@us...> - 2010-04-09 00:34:21
|
Revision: 2892 http://ogreaddons.svn.sourceforge.net/ogreaddons/?rev=2892&view=rev Author: rorthomas Date: 2010-04-09 00:34:15 +0000 (Fri, 09 Apr 2010) Log Message: ----------- temporary removed some windows checks, so the windows version is at least compiling. need to readd them later fixed ois windows error removed obsolete comment Modified Paths: -------------- trunk/forests/CMakeDependenciesConfig.txt trunk/forests/CMakeLists.txt trunk/forests/examples/CMakeLists.txt trunk/forests/examples/PGExampleFrameListener.h trunk/forests/source/BatchPage.cpp Modified: trunk/forests/CMakeDependenciesConfig.txt =================================================================== --- trunk/forests/CMakeDependenciesConfig.txt 2010-04-08 17:10:08 UTC (rev 2891) +++ trunk/forests/CMakeDependenciesConfig.txt 2010-04-09 00:34:15 UTC (rev 2892) @@ -32,28 +32,35 @@ ENDIF(WIN32) -# cross platform checks -# check for libs and include files we want to use -CHECK_INCLUDE_FILE_CXX(OgrePrerequisites.h HAVE_OGRE_INCLUDES) -if(NOT HAVE_OGRE_INCLUDES) - message(FATAL_ERROR "could not find the Ogre includes. Please install them.") -endif() -CHECK_INCLUDE_FILE_CXX(OIS/OIS.h HAVE_OIS_DIR_INCLUDES) -if(HAVE_OIS_DIR_INCLUDES) - set(OIS_INCLUDE "OIS/OIS.h") -endif() +IF(NOT WIN32) + # XXX TODO: fix the checks for windows! + # add this so the checks work + set(CMAKE_REQUIRED_INCLUDES ${Ogre_INCLUDE_DIRS} ${Ois_INCLUDE_DIRS}) -CHECK_INCLUDE_FILE_CXX(OIS.h HAVE_OIS_INCLUDES) -if(HAVE_OIS_INCLUDES) - set(OIS_INCLUDE "OIS.h") -endif() + # cross platform checks + # check for libs and include files we want to use + CHECK_INCLUDE_FILE_CXX(OgrePrerequisites.h HAVE_OGRE_INCLUDES) + if(NOT HAVE_OGRE_INCLUDES) + message("could not find the Ogre includes. Please install them.") + endif() -if(NOT HAVE_OIS_DIR_INCLUDES AND NOT HAVE_OIS_INCLUDES) - message(FATAL_ERROR "could not find the OIS includes. Please install them.") -endif() + CHECK_INCLUDE_FILE_CXX(OIS/OIS.h HAVE_OIS_DIR_INCLUDES) + if(HAVE_OIS_DIR_INCLUDES) + set(OIS_INCLUDE "OIS/OIS.h") + endif() -if(HAVE_OIS_DIR_INCLUDES AND NOT HAVE_OIS_INCLUDES) - set(OIS_USING_DIR TRUE) -else() - set(OIS_USING_DIR FALSE) + CHECK_INCLUDE_FILE_CXX(OIS.h HAVE_OIS_INCLUDES) + if(HAVE_OIS_INCLUDES) + set(OIS_INCLUDE "OIS.h") + endif() + + if(NOT HAVE_OIS_DIR_INCLUDES AND NOT HAVE_OIS_INCLUDES) + message("could not find the OIS includes. Please install them.") + endif() + + if(HAVE_OIS_DIR_INCLUDES AND NOT HAVE_OIS_INCLUDES) + set(OIS_USING_DIR TRUE) + else() + set(OIS_USING_DIR FALSE) + endif() endif() Modified: trunk/forests/CMakeLists.txt =================================================================== --- trunk/forests/CMakeLists.txt 2010-04-08 17:10:08 UTC (rev 2891) +++ trunk/forests/CMakeLists.txt 2010-04-09 00:34:15 UTC (rev 2892) @@ -105,11 +105,13 @@ INSTALL(FILES "${PagedGeometry_BINARY_DIR}/PagedGeometry.pc" DESTINATION "${LIB_INSTALL_DIR}/pkgconfig") # some additional compiler flags -ADD_DEFINITIONS(-Wall) -CHECK_C_COMPILER_FLAG(-Wextra HAVE_W_EXTRA) -IF(HAVE_W_EXTRA) - ADD_DEFINITIONS(-Wextra) -ENDIF() +IF(NOT WIN32) + ADD_DEFINITIONS(-Wall) + CHECK_C_COMPILER_FLAG(-Wextra HAVE_W_EXTRA) + IF(HAVE_W_EXTRA) + ADD_DEFINITIONS(-Wextra) + ENDIF() +endif() # Set visibility options if available IF(NOT WIN32) Modified: trunk/forests/examples/CMakeLists.txt =================================================================== --- trunk/forests/examples/CMakeLists.txt 2010-04-08 17:10:08 UTC (rev 2891) +++ trunk/forests/examples/CMakeLists.txt 2010-04-09 00:34:15 UTC (rev 2892) @@ -11,11 +11,20 @@ IF(WIN32) set(OS_LIBS "dinput8.lib dxguid.lib") + # directX + include_directories($ENV{DXSDK_DIR}/Include) + link_directories ($ENV{DXSDK_DIR}/Lib/x86) + + # add DX path for checks + set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} $ENV{DXSDK_DIR}/Include) + # check for libs and include files we want to use - CHECK_LIBRARY_EXISTS(dinput8 DirectInput8Create "" HAVE_DXINPUT_LIBS) - if(NOT HAVE_DXINPUT_LIBS) - message(FATAL_ERROR "could not link against DirectX input, please check of you have the required libraries installed") - endif() + # XXX TODO: fix directx lib check + #set(CMAKE_REQUIRED_FLAGS "-L$ENV{DXSDK_DIR}/Lib/x86") + #CHECK_LIBRARY_EXISTS(dinput8 DirectInput8Create "" HAVE_DXINPUT_LIBS) + #if(NOT HAVE_DXINPUT_LIBS) + # message(FATAL_ERROR "could not link against DirectX input, please check of you have the required libraries installed") + #endif() CHECK_INCLUDE_FILE(dinput.h HAVE_DXINPUT_INCLUDES) if(NOT HAVE_DXINPUT_INCLUDES) message(FATAL_ERROR "could not find the DirectX includes. Please install them.") Modified: trunk/forests/examples/PGExampleFrameListener.h =================================================================== --- trunk/forests/examples/PGExampleFrameListener.h 2010-04-08 17:10:08 UTC (rev 2891) +++ trunk/forests/examples/PGExampleFrameListener.h 2010-04-09 00:34:15 UTC (rev 2892) @@ -49,7 +49,7 @@ //Use this define to signify OIS will be used as a DLL //(so that dll import/export macros are in effect) -#define OIS_DYNAMIC_LIB +//#define OIS_DYNAMIC_LIB #ifdef OIS_USING_DIR # include "OIS/OIS.h" #else Modified: trunk/forests/source/BatchPage.cpp =================================================================== --- trunk/forests/source/BatchPage.cpp 2010-04-08 17:10:08 UTC (rev 2891) +++ trunk/forests/source/BatchPage.cpp 2010-04-09 00:34:15 UTC (rev 2892) @@ -159,7 +159,6 @@ batch->setRenderQueueGroup(RENDER_QUEUE_6); } else { - // why was this disabled? - tdev, 27th March 2010 //Opaque batches should render in the normal render queue batch->setRenderQueueGroup(RENDER_QUEUE_MAIN); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |