Thread: [Python-ogre-commit] SF.net SVN: python-ogre: [371] trunk/python-ogre
Brought to you by:
andy_miller,
roman_yakovenko
From: <and...@us...> - 2007-08-11 05:55:16
|
Revision: 371 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=371&view=rev Author: andy_miller Date: 2007-08-10 22:55:18 -0700 (Fri, 10 Aug 2007) Log Message: ----------- Changes/Updates for 1.0 Release New Modules - NxOgre, PhysX, DirectShow Video, FFMPEG Video, BetaGui.cpp Updates/Fixes for Ogre, QuickGUI New Demos for ODE + New Modules Modified Paths: -------------- trunk/python-ogre/ChangeLog.txt trunk/python-ogre/PythonOgreConfig_nt.py trunk/python-ogre/PythonOgreConfig_posix.py trunk/python-ogre/SConstruct trunk/python-ogre/ThirdParty/vcredist_x86.exe trunk/python-ogre/code_generators/bullet/generate_code.py trunk/python-ogre/code_generators/cegui/customization_data.py trunk/python-ogre/code_generators/cegui/generate_code.py trunk/python-ogre/code_generators/cegui/hand_made_wrappers.py trunk/python-ogre/code_generators/cegui/python_CEGUI_aliases.h trunk/python-ogre/code_generators/common_utils/extract_documentation.py trunk/python-ogre/code_generators/ogre/generate_code.py trunk/python-ogre/code_generators/ogre/hand_made_wrappers.py trunk/python-ogre/code_generators/ogre/python_ogre_aliases.h trunk/python-ogre/code_generators/ogre/python_ogre_sizeof.h trunk/python-ogre/code_generators/ogreode/generate_code.py trunk/python-ogre/code_generators/opcode/generate_code.py trunk/python-ogre/code_generators/opcode/hand_made_wrappers.py trunk/python-ogre/code_generators/quickgui/generate_code.py trunk/python-ogre/code_generators/quickgui/python_quickgui.h trunk/python-ogre/code_generators/quickgui/python_quickgui_aliases.h trunk/python-ogre/demos/gui/Demo_QuickGUI01.py trunk/python-ogre/demos/gui/plugins.cfg trunk/python-ogre/demos/gui/tofix/MenuDemo.py trunk/python-ogre/demos/media/gui/ogregui.layout trunk/python-ogre/demos/media/materials/scripts/Example.material trunk/python-ogre/demos/media/skins/SkinTemplate.material trunk/python-ogre/demos/ogre/Demo_Basic.py trunk/python-ogre/demos/ogre/Demo_Bezier.py trunk/python-ogre/demos/ogre/Demo_CameraTracking.py trunk/python-ogre/demos/ogre/Demo_Grass.py trunk/python-ogre/demos/ogre/Demo_SkeletalAnimation.py trunk/python-ogre/demos/ogre/Demo_SkeletonAnimation.py trunk/python-ogre/demos/ogre/Demo_SkyBox.py trunk/python-ogre/demos/ogre/Demo_SkyDome.py trunk/python-ogre/demos/ogre/Demo_Smoke.py trunk/python-ogre/demos/ogre/Demo_Spinner.py trunk/python-ogre/demos/ogre/Demo_Terrain.py trunk/python-ogre/demos/ogre/plugins.cfg trunk/python-ogre/demos/ogre/tests/Test_Iterator.py trunk/python-ogre/demos/ogre/tests/plugins.cfg trunk/python-ogre/environment.py trunk/python-ogre/packages_2.5/ogre/renderer/OGRE/sf_OIS.py trunk/python-ogre/scripts/epydoc_config trunk/python-ogre/setup.py Added Paths: ----------- trunk/python-ogre/ThirdParty/betagui/ trunk/python-ogre/ThirdParty/betagui/BetaGUI.h trunk/python-ogre/ThirdParty/betagui/BetaGui.cpp trunk/python-ogre/ThirdParty/betagui/BetaGui.py trunk/python-ogre/ThirdParty/dshow/ trunk/python-ogre/ThirdParty/dshow/UtilsOgreDShow.cpp trunk/python-ogre/ThirdParty/dshow/UtilsOgreDshow.h trunk/python-ogre/ThirdParty/dshow/UtilsOgreDshow_private.h trunk/python-ogre/ThirdParty/ffmpeg/ trunk/python-ogre/ThirdParty/ffmpeg/videoPlayer.cpp trunk/python-ogre/ThirdParty/ffmpeg/videoPlayer.h trunk/python-ogre/code_generators/betagui/ trunk/python-ogre/code_generators/betagui/customization_data.py trunk/python-ogre/code_generators/betagui/generate_code.py trunk/python-ogre/code_generators/betagui/hand_made_wrappers.py trunk/python-ogre/code_generators/betagui/python_betagui.h trunk/python-ogre/code_generators/betagui/python_betagui_aliases.h trunk/python-ogre/code_generators/betagui/python_betagui_sizeof.h trunk/python-ogre/code_generators/nxogre/ trunk/python-ogre/code_generators/nxogre/customization_data.py trunk/python-ogre/code_generators/nxogre/generate_code.py trunk/python-ogre/code_generators/nxogre/hand_made_wrappers.py trunk/python-ogre/code_generators/nxogre/python_nxogre.h trunk/python-ogre/code_generators/nxogre/python_nxogre_aliases.h trunk/python-ogre/code_generators/nxogre/python_nxogre_sizeof.h trunk/python-ogre/code_generators/nxogre/register_exceptions.py trunk/python-ogre/code_generators/ogredshow/ trunk/python-ogre/code_generators/ogredshow/customization_data.py trunk/python-ogre/code_generators/ogredshow/generate_code.py trunk/python-ogre/code_generators/ogredshow/hand_made_wrappers.py trunk/python-ogre/code_generators/ogredshow/python_ogredshow.h trunk/python-ogre/code_generators/ogredshow/python_ogredshow_aliases.h trunk/python-ogre/code_generators/ogredshow/python_ogredshow_sizeof.h trunk/python-ogre/code_generators/ogredshow/register_exceptions.py trunk/python-ogre/code_generators/ogrevideoffmpeg/ trunk/python-ogre/code_generators/ogrevideoffmpeg/PythonOgreConfig_posix.py trunk/python-ogre/code_generators/ogrevideoffmpeg/customization_data.py trunk/python-ogre/code_generators/ogrevideoffmpeg/generate_code.py trunk/python-ogre/code_generators/ogrevideoffmpeg/hand_made_wrappers.py trunk/python-ogre/code_generators/ogrevideoffmpeg/python_ogrevideoffmpeg.h trunk/python-ogre/code_generators/ogrevideoffmpeg/python_ogrevideoffmpeg_aliases.h trunk/python-ogre/code_generators/ogrevideoffmpeg/python_ogrevideoffmpeg_sizeof.h trunk/python-ogre/code_generators/theora/ trunk/python-ogre/code_generators/theora/customization_data.py trunk/python-ogre/code_generators/theora/generate_code.py trunk/python-ogre/code_generators/theora/hand_made_wrappers.py trunk/python-ogre/code_generators/theora/python_theora.h trunk/python-ogre/code_generators/theora/python_theora_aliases.h trunk/python-ogre/code_generators/theora/python_theora_sizeof.h trunk/python-ogre/code_generators/theora/register_exceptions.py trunk/python-ogre/demos/dshow/ trunk/python-ogre/demos/dshow/Demo_Video.py trunk/python-ogre/demos/dshow/SampleFramework.py trunk/python-ogre/demos/dshow/plugins.cfg trunk/python-ogre/demos/dshow/resources.cfg trunk/python-ogre/demos/ffmpeg/ trunk/python-ogre/demos/ffmpeg/Demo_Video.py trunk/python-ogre/demos/ffmpeg/SampleFramework.py trunk/python-ogre/demos/ffmpeg/plugins.cfg trunk/python-ogre/demos/ffmpeg/resources.cfg trunk/python-ogre/demos/ffmpeg/test.wmv trunk/python-ogre/demos/gui/MenuDemo.py trunk/python-ogre/demos/media/Audio/clock.avi trunk/python-ogre/demos/media/Audio/clock.ogg trunk/python-ogre/demos/media/ComplexMeshes/ trunk/python-ogre/demos/media/ComplexMeshes/cloth.material trunk/python-ogre/demos/media/ComplexMeshes/nx.flag.png trunk/python-ogre/demos/media/Env/ trunk/python-ogre/demos/media/Env/nx.floor.material trunk/python-ogre/demos/media/Env/nx.floor.mesh trunk/python-ogre/demos/media/Env/nx.floor.png trunk/python-ogre/demos/media/Env/nx.floor.shadowalpha.png trunk/python-ogre/demos/media/Env/nx.skygrid.png trunk/python-ogre/demos/media/Essential/ trunk/python-ogre/demos/media/Essential/BetaGUI/ trunk/python-ogre/demos/media/Essential/BetaGUI/bgui.button.active.png trunk/python-ogre/demos/media/Essential/BetaGUI/bgui.button.png trunk/python-ogre/demos/media/Essential/BetaGUI/bgui.material trunk/python-ogre/demos/media/Essential/BetaGUI/bgui.pointer.png trunk/python-ogre/demos/media/Essential/BetaGUI/bgui.textinput.active.png trunk/python-ogre/demos/media/Essential/BetaGUI/bgui.textinput.png trunk/python-ogre/demos/media/Essential/BetaGUI/bgui.window.png trunk/python-ogre/demos/media/Essential/BetaGUI/bgui.window.resize.active.png trunk/python-ogre/demos/media/Essential/BetaGUI/bgui.window.resize.png trunk/python-ogre/demos/media/Essential/BetaGUI/bgui.window.titlebar.png trunk/python-ogre/demos/media/Essential/BetaGUIExtended/ trunk/python-ogre/demos/media/Essential/BetaGUIExtended/bgui.exit.active.png trunk/python-ogre/demos/media/Essential/BetaGUIExtended/bgui.exit.png trunk/python-ogre/demos/media/Essential/BetaGUIExtended/bgui.pause.active.png trunk/python-ogre/demos/media/Essential/BetaGUIExtended/bgui.pause.png trunk/python-ogre/demos/media/Essential/BetaGUIExtended/debug.active.png trunk/python-ogre/demos/media/Essential/BetaGUIExtended/debug.png trunk/python-ogre/demos/media/Essential/BetaGUIExtended/debugon.active.png trunk/python-ogre/demos/media/Essential/BetaGUIExtended/debugon.png trunk/python-ogre/demos/media/Essential/BetaGUIExtended/editor.material.material trunk/python-ogre/demos/media/Essential/BetaGUIExtended/editor.material.text.png trunk/python-ogre/demos/media/Essential/BetaGUIExtended/editor.material.window.png trunk/python-ogre/demos/media/Essential/BetaGUIExtended/editor.material.window.titlebar.png trunk/python-ogre/demos/media/Essential/BetaGUIExtended/editor.microtext.active.png trunk/python-ogre/demos/media/Essential/BetaGUIExtended/editor.microtext.confirm.active.png trunk/python-ogre/demos/media/Essential/BetaGUIExtended/editor.microtext.confirm.png trunk/python-ogre/demos/media/Essential/BetaGUIExtended/editor.microtext.do.active.png trunk/python-ogre/demos/media/Essential/BetaGUIExtended/editor.microtext.do.png trunk/python-ogre/demos/media/Essential/BetaGUIExtended/editor.microtext.png trunk/python-ogre/demos/media/Essential/BetaGUIExtended/editor.microtext.up.active.png trunk/python-ogre/demos/media/Essential/BetaGUIExtended/editor.microtext.up.png trunk/python-ogre/demos/media/Essential/BetaGUIExtended/nxbgui.material trunk/python-ogre/demos/media/Essential/BetaGUIExtended/pause.active.png trunk/python-ogre/demos/media/Essential/BetaGUIExtended/pause.png trunk/python-ogre/demos/media/Essential/BetaGUIExtended/play.active.png trunk/python-ogre/demos/media/Essential/BetaGUIExtended/play.png trunk/python-ogre/demos/media/Essential/Boot/ trunk/python-ogre/demos/media/Essential/Boot/101.jpg trunk/python-ogre/demos/media/Essential/Boot/102.jpg trunk/python-ogre/demos/media/Essential/Boot/103.jpg trunk/python-ogre/demos/media/Essential/Boot/any.jpg trunk/python-ogre/demos/media/Essential/Boot/arrow1.png trunk/python-ogre/demos/media/Essential/Boot/axis_x.png trunk/python-ogre/demos/media/Essential/Boot/axis_y.png trunk/python-ogre/demos/media/Essential/Boot/axis_z.png trunk/python-ogre/demos/media/Essential/Boot/bodyguide1m.png trunk/python-ogre/demos/media/Essential/Boot/boot.material trunk/python-ogre/demos/media/Essential/Boot/debug.png trunk/python-ogre/demos/media/Essential/Boot/gui.material trunk/python-ogre/demos/media/Essential/Boot/gui_loading.png trunk/python-ogre/demos/media/Essential/Boot/gui_loading_notice.png trunk/python-ogre/demos/media/Essential/Boot/gui_options.png trunk/python-ogre/demos/media/Essential/Boot/gui_options_selected.png trunk/python-ogre/demos/media/Essential/Boot/gui_pause.png trunk/python-ogre/demos/media/Essential/Boot/gui_save.png trunk/python-ogre/demos/media/Essential/Boot/gui_save_selected.png trunk/python-ogre/demos/media/Essential/Boot/gui_slowfast.png trunk/python-ogre/demos/media/Essential/Boot/nx.body.axis.mesh trunk/python-ogre/demos/media/Essential/Boot/nx.bodyguide.material trunk/python-ogre/demos/media/Essential/Boot/nx.bodyguide.mesh trunk/python-ogre/demos/media/Essential/Fonts/ trunk/python-ogre/demos/media/Essential/Fonts/MgOpen.license.txt trunk/python-ogre/demos/media/Essential/Fonts/MgOpen.png trunk/python-ogre/demos/media/Essential/Fonts/MgOpen.ttf trunk/python-ogre/demos/media/Essential/Fonts/MgOpenAsBitmap.fontdef trunk/python-ogre/demos/media/Essential/Fonts/MgOpenAsNxOgreFont.fontdef trunk/python-ogre/demos/media/Essential/icon.cube.png trunk/python-ogre/demos/media/Essential/icon.sphere.png trunk/python-ogre/demos/media/Essential/widget.add.active.png trunk/python-ogre/demos/media/Essential/widget.add.png trunk/python-ogre/demos/media/Essential/widget.angle.over.png trunk/python-ogre/demos/media/Essential/widget.angle.png trunk/python-ogre/demos/media/Essential/widget.create.png trunk/python-ogre/demos/media/Essential/widget.edit.png trunk/python-ogre/demos/media/Essential/widget.material.over.png trunk/python-ogre/demos/media/Essential/widget.material.png trunk/python-ogre/demos/media/Essential/widget.mm.bodies.over.png trunk/python-ogre/demos/media/Essential/widget.mm.bodies.png trunk/python-ogre/demos/media/Essential/widget.mm.fx.over.png trunk/python-ogre/demos/media/Essential/widget.mm.fx.png trunk/python-ogre/demos/media/Essential/widget.mm.joints.over.png trunk/python-ogre/demos/media/Essential/widget.mm.joints.png trunk/python-ogre/demos/media/Essential/widget.mm.png trunk/python-ogre/demos/media/Essential/widget.scale.over.png trunk/python-ogre/demos/media/Essential/widget.scale.png trunk/python-ogre/demos/media/Essential/widgets.material trunk/python-ogre/demos/media/SimpleMeshes/ trunk/python-ogre/demos/media/SimpleMeshes/Example_BumpMapping.cg trunk/python-ogre/demos/media/SimpleMeshes/capsule.50cmx1m.mesh trunk/python-ogre/demos/media/SimpleMeshes/capsule.prefix.material trunk/python-ogre/demos/media/SimpleMeshes/convex.prefix.material trunk/python-ogre/demos/media/SimpleMeshes/convex1.mesh trunk/python-ogre/demos/media/SimpleMeshes/cube.1m-2m-1m.mesh trunk/python-ogre/demos/media/SimpleMeshes/cube.1m.h.mesh trunk/python-ogre/demos/media/SimpleMeshes/cube.1m.mesh trunk/python-ogre/demos/media/SimpleMeshes/cube.1m.smooth.mesh trunk/python-ogre/demos/media/SimpleMeshes/cube.mesh trunk/python-ogre/demos/media/SimpleMeshes/cube.prefix.material trunk/python-ogre/demos/media/SimpleMeshes/fish.mesh trunk/python-ogre/demos/media/SimpleMeshes/hilight.material trunk/python-ogre/demos/media/SimpleMeshes/nx-cube-diffuse.dds trunk/python-ogre/demos/media/SimpleMeshes/nx-cube-normal.dds trunk/python-ogre/demos/media/SimpleMeshes/nx-cube-spec.dds trunk/python-ogre/demos/media/SimpleMeshes/nx.70s1.dds trunk/python-ogre/demos/media/SimpleMeshes/nx.block.material trunk/python-ogre/demos/media/SimpleMeshes/nx.block.mesh trunk/python-ogre/demos/media/SimpleMeshes/nx.convex2.material trunk/python-ogre/demos/media/SimpleMeshes/nx.convex2.mesh trunk/python-ogre/demos/media/SimpleMeshes/nx.convex2.mesh.xml trunk/python-ogre/demos/media/SimpleMeshes/nx.cube.png trunk/python-ogre/demos/media/SimpleMeshes/nx.flag.png trunk/python-ogre/demos/media/SimpleMeshes/nx.lava.dds trunk/python-ogre/demos/media/SimpleMeshes/nx.planet1.dds trunk/python-ogre/demos/media/SimpleMeshes/nx.planet2.dds trunk/python-ogre/demos/media/SimpleMeshes/nx.sphere.50cm.mesh trunk/python-ogre/demos/media/SimpleMeshes/nx.sphere.50cm.mesh.xml trunk/python-ogre/demos/media/SimpleMeshes/nx.sphere.material trunk/python-ogre/demos/media/SimpleMeshes/nx.sphere1.png trunk/python-ogre/demos/media/SimpleMeshes/nx.stone1.dds trunk/python-ogre/demos/media/SimpleMeshes/nx.tartan.dds trunk/python-ogre/demos/media/SimpleMeshes/nx.tube.material trunk/python-ogre/demos/media/SimpleMeshes/nx.tube.mesh trunk/python-ogre/demos/media/SimpleMeshes/nx.yellow1.png trunk/python-ogre/demos/media/SimpleMeshes/prism.12x150cmx3m.mesh trunk/python-ogre/demos/media/SimpleMeshes/prism.8x50cmx2m.mesh trunk/python-ogre/demos/media/SimpleMeshes/racecar.material trunk/python-ogre/demos/media/SimpleMeshes/racecar.mesh trunk/python-ogre/demos/media/SimpleMeshes/racecar1.png trunk/python-ogre/demos/media/SimpleMeshes/sandbox.material trunk/python-ogre/demos/media/SimpleMeshes/sphere.2m.mesh trunk/python-ogre/demos/media/SimpleMeshes/sphere.50cm.mesh trunk/python-ogre/demos/media/SimpleMeshes/sphere.prefix.material trunk/python-ogre/demos/media/SimpleMeshes/squirrel.mesh trunk/python-ogre/demos/media/SimpleMeshes/squirrel.skeleton trunk/python-ogre/demos/media/SimpleMeshes/tyre.png trunk/python-ogre/demos/media/SimpleMeshes/wheel50cmx10cmx50cm.material trunk/python-ogre/demos/media/SimpleMeshes/wheel50cmx10cmx50cm.mesh trunk/python-ogre/demos/media/skins/qgui/qgui.image.png trunk/python-ogre/demos/media/skins/qgui/qgui.trackbar.horizontal.png trunk/python-ogre/demos/media/skins/qgui/qgui.trackbar.horizontal.slider.down.png trunk/python-ogre/demos/media/skins/qgui/qgui.trackbar.horizontal.slider.over.png trunk/python-ogre/demos/media/skins/qgui/qgui.trackbar.horizontal.slider.png trunk/python-ogre/demos/media/skins/qgui/qgui.trackbar.vertical.png trunk/python-ogre/demos/media/skins/qgui/qgui.trackbar.vertical.slider.down.png trunk/python-ogre/demos/media/skins/qgui/qgui.trackbar.vertical.slider.over.png trunk/python-ogre/demos/media/skins/qgui/qgui.trackbar.vertical.slider.png trunk/python-ogre/demos/media/skins/qgui/qgui_uv_test0.png trunk/python-ogre/demos/media/times.ttf trunk/python-ogre/demos/nxogre/ trunk/python-ogre/demos/nxogre/BetaGui.py trunk/python-ogre/demos/nxogre/CakeFramework.py trunk/python-ogre/demos/nxogre/Demo_101.py trunk/python-ogre/demos/nxogre/Demo_102.py trunk/python-ogre/demos/nxogre/Demo_103.py trunk/python-ogre/demos/nxogre/Enums.py trunk/python-ogre/demos/nxogre/SampleFramework.py trunk/python-ogre/demos/nxogre/config.yaml trunk/python-ogre/demos/nxogre/plugins.cfg trunk/python-ogre/demos/nxogre/resources.cfg trunk/python-ogre/demos/ogre/Demo_Shadows.py trunk/python-ogre/demos/ogreode/GranTurismOgre.py trunk/python-ogre/demos/opcode/Demo_OgreCollision01.py trunk/python-ogre/demos/opcode/Demo_OpcodeCollision01.py trunk/python-ogre/packages_2.5/ogre/addons/ trunk/python-ogre/packages_2.5/ogre/addons/__init__.py trunk/python-ogre/packages_2.5/ogre/addons/ogredshow/ trunk/python-ogre/packages_2.5/ogre/addons/ogredshow/__init__.py trunk/python-ogre/packages_2.5/ogre/addons/ogrevideoffmpeg/ trunk/python-ogre/packages_2.5/ogre/addons/ogrevideoffmpeg/__init__.py trunk/python-ogre/packages_2.5/ogre/addons/theora/ trunk/python-ogre/packages_2.5/ogre/addons/theora/__init__.py trunk/python-ogre/packages_2.5/ogre/gui/betagui/ trunk/python-ogre/packages_2.5/ogre/gui/betagui/__init__.py trunk/python-ogre/packages_2.5/ogre/physics/NxOgre/ trunk/python-ogre/packages_2.5/ogre/physics/NxOgre/__init__.py trunk/python-ogre/packages_2.5/ogre/physics/PhysX/ trunk/python-ogre/packages_2.5/ogre/physics/PhysX/__init__.py trunk/python-ogre/packages_2.5/ogre/physics/bullet/ trunk/python-ogre/packages_2.5/ogre/physics/bullet/__init__.py trunk/python-ogre/packages_2.5/ogre/renderer/OGREdshow/ trunk/python-ogre/packages_2.5/ogre/renderer/OGREdshow/__init__.py Removed Paths: ------------- trunk/python-ogre/code_generators/ogrevideo/ trunk/python-ogre/demos/ogre/tests/ogre.cfg trunk/python-ogre/demos/opcode/ogre.cfg Modified: trunk/python-ogre/ChangeLog.txt =================================================================== --- trunk/python-ogre/ChangeLog.txt 2007-07-25 04:47:51 UTC (rev 370) +++ trunk/python-ogre/ChangeLog.txt 2007-08-11 05:55:18 UTC (rev 371) @@ -1,12 +1,24 @@ -xxx 2007 + +August 10 2007: Version 1.0 - Release ============================================ -* Updated to QuickGui 0.9.5 +* Added NxOgre Wrapper -- single demo with Cakewalk +* Added PhysX Wrapper -- required for NxOgre -- you need to install the PhysX library +* Added OgreDshow wrapper -- play videos (with sound) on textures using DirectShow +* Added OgreVideoFfmpeg wrapper (thanks Dermont) -- plays video (without sound) vis ffmpeg +* Added BetaGUI wrapper -- needed for the NxOgre Cakewalk conversion +* Updated to QuickGui 0.9.5 -- using SVN version * Added common_utils function to remove duplicate Properties which happened when there was a getXXX AND a hasXXX implemented in the C++ code -- now we filter these are give the getXXX priority * Implemented support for Ogre compiled with THREADS enabled - need to set value to True in ogre/generate_code.py * Change implemented in Py++ to expose missing 'setters' -* Added bullet physics to the library - no testing as of yet +* Added castAsOverlayContainer function to Ogre -- needed for 'add2D' functionality +* Added bullet physics to the library - no testing as of yet -- probably doesn't work +* Fixed issue where we were exposing constructors with arguments that were pointers to fundemental types (int * etc) + could cause a crash if passing invalid parameters (None) to these constructors * OIS compile has changed to use the static library instead of the dll +* Updated Windows Help documentation +* SVN and Tickets have been moved to SourceForge +* Using "touch" on the release files to get some consistancy in the release June 10 2007: Version 1.0 RC2(c) -- Release ============================================ Modified: trunk/python-ogre/PythonOgreConfig_nt.py =================================================================== --- trunk/python-ogre/PythonOgreConfig_nt.py 2007-07-25 04:47:51 UTC (rev 370) +++ trunk/python-ogre/PythonOgreConfig_nt.py 2007-08-11 05:55:18 UTC (rev 371) @@ -36,9 +36,16 @@ PATH_raknet= os.path.join(BASE_DIR, 'RakNet') PATH_OPCODE= os.path.join(BASE_DIR, 'Opcode') PATH_quickgui= os.path.join(root_dir, 'ThirdParty','quickgui') +PATH_quickgui= os.path.join(BASE_DIR, 'Quickgui') ## note test for Quickgui SVN version +PATH_betagui= os.path.join(root_dir, 'ThirdParty','betagui') PATH_NxOgre= os.path.join(BASE_DIR, 'nxogre/NxOgre') PATH_Bullet= os.path.join(BASE_DIR, 'bullet-2.52') PATH_PhysX= "c:/program files/AGEIA Technologies/SDK/v2.7.2/SDKs" +PATH_Theora= os.path.join(PATH_OgreAddons,'videoplugin','TheoraVideo') +PATH_Dshow= os.path.join(root_dir, 'ThirdParty','dshow') +PATH_ogrevideoffmpeg = os.path.join(root_dir, 'ThirdParty','ffmpeg') +PATH_ffmpeg= os.path.join(BASE_DIR, 'ffmpeg') +PATH_ogredshow = os.path.join(root_dir, 'ThirdParty','dshow') # # it's time for the SDK version if SDK: @@ -76,11 +83,16 @@ PATH_LIB_OgreOdeLoader = os.path.join( PATH_OgreOde, 'loader/lib/Release' ) PATH_LIB_FMOD = os.path.join(PATH_FMOD, 'api/lib') PATH_LIB_OgreAL = os.path.join(PATH_OGREAL, 'lib/Release' ) -PATH_LIB_quickgui = PATH_quickgui +PATH_LIB_betagui = PATH_betagui +PATH_LIB_quickgui = os.path.join(PATH_quickgui, 'bin') PATH_LIB_raknet = os.path.join(PATH_raknet, 'Lib' ) -PATH_LIB_NxOgre= os.path.join(PATH_NxOgre, 'compiler','NxOgre.VC8','Release','lib') -PATH_LIB_PhysX = "" +PATH_LIB_NxOgre= os.path.join(PATH_NxOgre, 'lib') +PATH_LIB_PhysX = os.path.join(PATH_PhysX,'lib/win32') PATH_LIB_Bullet = os.path.join(PATH_Bullet, 'out/release8/libs' ) +PATH_LIB_Theora= os.path.join(PATH_Theora, 'bin', 'Release') +PATH_LIB_ogrevideoffmpeg = PATH_ogrevideoffmpeg +PATH_LIB_ffmpeg= os.path.join(PATH_ffmpeg, 'lib') +PATH_LIB_ogredshow = PATH_ogredshow if SDK: PATH_LIB_Ogre_CEGUIRenderer = os.path.join( PATH_Ogre, 'lib') @@ -111,11 +123,24 @@ PATH_INCLUDE_OgreOdeLoader= os.path.join( PATH_OgreOde,'loader/include') PATH_INCLUDE_FMOD = os.path.join(PATH_FMOD, 'api/inc') PATH_INCLUDE_Ogre_CEGUIRenderer = os.path.join( PATH_Ogre, 'samples/Common/CEGUIRenderer/include') -PATH_INCLUDE_quickgui = PATH_quickgui +PATH_INCLUDE_quickgui = os.path.join(PATH_quickgui,'QuickGUI','include') PATH_INCLUDE_raknet = os.path.join(PATH_raknet, 'Source' ) PATH_INCLUDE_NxOgre= os.path.join(PATH_NxOgre, 'include') PATH_INCLUDE_Bullet= os.path.join(PATH_Bullet, 'src') +PATH_INCLUDE_freetype= os.path.join(PATH_INCLUDE_quickgui,'FreeType2.3.5') +PATH_INCLUDE_betagui = PATH_betagui +PATH_INCLUDE_Dshow= PATH_Dshow +PATH_INCLUDE_Theora = os.path.join (PATH_Theora,'include') +PATH_INCLUDE_ogrevideoffmpeg = PATH_ogrevideoffmpeg +PATH_INCLUDE_ffmpeg = os.path.join (PATH_ffmpeg,'include') +PATH_INCLUDE_ogredshow = PATH_ogredshow +PATH_INCLUDE_OggVorbisTheora = [ os.path.join(BASE_DIR,'ogg','include') + ,os.path.join(BASE_DIR, 'vorbis', 'include') + ,os.path.join(PATH_OgreAddons,'videoplugin','theora','include') + ,os.path.join(PATH_OgreAddons,'videoplugin','ptypes-1.8.3','include') + ] + PATH_INCLUDE_PhysX= [ os.path.join(PATH_PhysX, 'Physics','include') ,os.path.join(PATH_PhysX, 'Cooking','include') ,os.path.join(PATH_PhysX, 'Foundation','include') Modified: trunk/python-ogre/PythonOgreConfig_posix.py =================================================================== --- trunk/python-ogre/PythonOgreConfig_posix.py 2007-07-25 04:47:51 UTC (rev 370) +++ trunk/python-ogre/PythonOgreConfig_posix.py 2007-08-11 05:55:18 UTC (rev 371) @@ -1,108 +1,107 @@ -import sys,os - - -## Boost stuff -## path to the root of your boost dir, should have 'libs', 'boost' subdirectories -module_dir = os.path.abspath(os.path.dirname(__file__) )## The root directory is where this module is located - -## lets assume that the base development directory is one level higher -BASE_DIR,ignore = os.path.split(module_dir) ## r'/home/andy/development' - -ROOT_DIR = os.path.join(BASE_DIR,'root') - - -LOCAL_LIB = os.path.join(ROOT_DIR,'usr/lib') -LOCAL_INCLUDE = os.path.join(ROOT_DIR, 'usr/include') -PATH_Boost = os.path.join(LOCAL_INCLUDE, 'boost-1_34') -print "**", PATH_Boost - -# -PATH_LIB_Boost = LOCAL_LIB -## and the name of the boost python library -LIB_Boost = 'libboost_python-gcc41-1_34' - -# -# Don't forget we need to call gccxml...... -gccxml_bin = os.path.join(BASE_DIR,'gccxml-build/bin') -# and the Py++ directory as sometimes we need access to the code repository there -pyplusplus_install_dir = os.path.join(BASE_DIR,'pygccxml') - - -# # ## Parent directories of the libraries -PATH_Ogre = os.path.join(BASE_DIR,'ogrenew') -PATH_OgreAddons = os.path.join(BASE_DIR, 'OgreAddons') -PATH_CEGUI = os.path.join(BASE_DIR, 'CEGUI-0.5.0') -PATH_OIS = os.path.join(BASE_DIR, 'ois-1.0RC1') -PATH_Newton = os.path.join(BASE_DIR, 'newtonSDK/sdk') -# # PATH_FMOD = os.path.join(BASE_DIR, 'fmod') -PATH_ODE = os.path.join(BASE_DIR, 'ode-0.8') -# # PATH_OGREAL= os.path.join(BASE_DIR, 'ogreal/trunk/OgreAL-Eihort') -# # PATH_OGG = os.path.join(BASE_DIR, 'ogg') -# # PATH_VORBIS= os.path.join(BASE_DIR, 'vorbis') -# # PATH_OPENAL= os.path.join(BASE_DIR, 'openal') -# # PATH_ALUT= os.path.join(BASE_DIR, 'freealut') -PATH_OgreOde= os.path.join(BASE_DIR, 'ogreaddons','ogreode') -#PATH_betagui= os.path.join(module_dir, 'ThirdParty','betagui') -#PATH_raknet= os.path.join(BASE_DIR, 'RakNet') -PATH_quickgui= os.path.join(module_dir, 'ThirdParty','quickgui') -PATH_OPCODE= os.path.join(BASE_DIR, 'Opcode') - - - -# # # Overrides - this is needed as libs isn't defined in enirvonment for fmod.. -# # #class fmod: -# # # version= "4.06" -# # # libs=[LIB_Boost, 'fmodexL_vc'] -# # ##libs=[Config.LIB_Boost, 'libfmodex'] ##posix - -# # ### -# # ### these paths assume you've left all the directory structure as standard -# # ### Override anything that is different -# # ### -PATH_LIB_Ogre_CEGUIRenderer = os.path.join( LOCAL_LIB ) #, 'Samples/Common/CEGUIRenderer/lib') -PATH_LIB_Ogre_OgreMain= os.path.join( LOCAL_LIB ) # PATH_Ogre, 'OgreMain/lib/Release' ) -PATH_LIB_Ogre_Dependencies = os.path.join( LOCAL_LIB ) # , 'Dependencies/lib/Release') - - - -PATH_LIB_OgreRefApp = os.path.join( LOCAL_LIB ) # PATH_Ogre, 'ReferenceApplication/ReferenceAppLayer/lib/Release') -PATH_LIB_OgreNewt = os.path.join( LOCAL_LIB ) #PATH_OgreAddons, r'ogrenewt/OgreNewt_Main/lib/Release') -PATH_LIB_Newton = PATH_Newton #os.path.join( LOCAL_LIB ) # PATH_Newton ,'dll') ##NOTE Posix platforms this lives in 'lib-mt' -PATH_LIB_OIS = os.path.join( LOCAL_LIB ) #PATH_OIS, 'dll') ## NOTE Posix platforms this lives in'lib' not 'dll' -PATH_LIB_CEGUI = os.path.join ( LOCAL_LIB ) #PATH_Ogre, r'Dependencies/lib/Release' ) -PATH_LIB_ODE = os.path.join( LOCAL_LIB ) #PATH_ODE, 'lib/releasedll')## probable releaselib for posix -PATH_LIB_OgreOde = os.path.join( LOCAL_LIB ) #PATH_OgreOde, 'lib/Release') -PATH_LIB_OgreOdePrefab = os.path.join( LOCAL_LIB ) #PATH_OgreOde, 'prefab/lib/Release' ) -PATH_LIB_OgreOdeLoader = os.path.join( LOCAL_LIB ) #PATH_OgreOde, 'loader/lib/Release' ) - -PATH_LIB_OgreAL = os.path.join( LOCAL_LIB ) #PATH_OGREAL, 'lib/Release' ) -#PATH_LIB_betagui = PATH_betagui -PATH_LIB_quickgui = PATH_quickgui -#PATH_LIB_raknet = os.path.join( LOCAL_LIB ) #PATH_raknet, 'Lib' ) - -PATH_LIB_OPCODE = os.path.join( PATH_OPCODE, 'Release') -PATH_INCLUDE_Ogre= os.path.join(LOCAL_INCLUDE,'OGRE') # os.path.join(PATH_Ogre,'OgreMain/include') - -PATH_INCLUDE_Ogre_Dependencies = PATH_INCLUDE_Ogre # os.path.join( PATH_Ogre, 'Dependencies/include') -PATH_INCLUDE_OIS = os.path.join(LOCAL_INCLUDE,'OIS') #os.path.join(PATH_OIS,'includes') ## Note the plural include's -PATH_INCLUDE_OgreRefApp = os.path.join(PATH_Ogre,'ReferenceApplication/ReferenceAppLayer/include') -PATH_INCLUDE_OgreNewt = os.path.join(LOCAL_INCLUDE,'OgreNewt') #os.path.join(PATH_OgreAddons,'ogrenewt/OgreNewt_Main/inc') -PATH_INCLUDE_CEGUI = os.path.join(LOCAL_INCLUDE,'CEGUI') #os.path.join(PATH_CEGUI, r'include/CEGUI') -PATH_INCLUDE_ODE = os.path.join(LOCAL_INCLUDE,'') #os.path.join( PATH_ODE, 'include') -PATH_INCLUDE_ODESOURCE = '' # os.path.join( PATH_ODE, 'ode/src') -PATH_INCLUDE_OPCODE = PATH_OPCODE - -PATH_INCLUDE_OgreAL = ''# os.path.join( PATH_OGREAL, 'include' ) -PATH_INCLUDE_OPENAL = ''# os.path.join( PATH_OPENAL, 'include') -PATH_INCLUDE_OGG= ''# os.path.join( PATH_OGG, r'include' ) -PATH_INCLUDE_VORBIS= ''# os.path.join( PATH_VORBIS, r'include' ) -PATH_INCLUDE_ALUT= ''# os.path.join( PATH_ALUT, 'include' ) - -PATH_INCLUDE_OgreOde = os.path.join( PATH_OgreOde,'include') -PATH_INCLUDE_OgreOdePrefab= os.path.join( PATH_OgreOde,'prefab/include') -PATH_INCLUDE_OgreOdeLoader= os.path.join( PATH_OgreOde,'loader/include') -PATH_INCLUDE_Newton = PATH_Newton # os.path.join(LOCAL_INCLUDE,'Newton') -#PATH_INCLUDE_betagui = PATH_betagui -PATH_INCLUDE_quickgui = PATH_quickgui -#PATH_INCLUDE_raknet = os.path.join(PATH_raknet, 'Source' ) -PATH_INCLUDE_Ogre_CEGUIRenderer = os.path.join( PATH_Ogre, 'Samples/Common/CEGUIRenderer/include') +import sys,os + + +## Boost stuff +## path to the root of your boost dir, should have 'libs', 'boost' subdirectories +module_dir = os.path.abspath(os.path.dirname(__file__) )## The root directory is where this module is located + +## lets assume that the base development directory is one level higher +BASE_DIR,ignore = os.path.split(module_dir) ## r'/home/andy/development' + +ROOT_DIR = os.path.join(BASE_DIR,'root') + + +LOCAL_LIB = os.path.join(ROOT_DIR,'/usr/lib') +LOCAL_INCLUDE = os.path.join(ROOT_DIR, '/usr/include') +PATH_Boost = os.path.join(LOCAL_INCLUDE, 'boost_1_34') + +# +PATH_LIB_Boost = LOCAL_LIB +## and the name of the boost python library +LIB_Boost = 'libboost_python-gcc41-1_34' + +# +# Don't forget we need to call gccxml...... +gccxml_bin = os.path.join(BASE_DIR,'gccxml-build/bin') +# and the Py++ directory as sometimes we need access to the code repository there +pyplusplus_install_dir = os.path.join(BASE_DIR,'pygccxml') + + +# # ## Parent directories of the libraries +PATH_Ogre = os.path.join(BASE_DIR,'ogrenew') +# # PATH_OgreAddons = os.path.join(BASE_DIR, 'OgreAddons') +# # PATH_CEGUI = os.path.join(BASE_DIR, 'CEGUI-0.5.0') +# # PATH_OIS = os.path.join(BASE_DIR, 'ois-1.0RC1') +# # PATH_Newton = os.path.join(BASE_DIR, 'newtonsdk/sdk') +# # PATH_FMOD = os.path.join(BASE_DIR, 'fmod') +# # PATH_ODE = os.path.join(BASE_DIR, 'opende/trunk') +# # PATH_OGREAL= os.path.join(BASE_DIR, 'ogreal/trunk/OgreAL-Eihort') +# # PATH_OGG = os.path.join(BASE_DIR, 'ogg') +# # PATH_VORBIS= os.path.join(BASE_DIR, 'vorbis') +# # PATH_OPENAL= os.path.join(BASE_DIR, 'openal') +# # PATH_ALUT= os.path.join(BASE_DIR, 'freealut') +PATH_OgreOde= os.path.join(BASE_DIR, 'OgreAddons/ogreode') +# # PATH_betagui= os.path.join(BASE_DIR, 'betagui') +# PATH_raknet= os.path.join(BASE_DIR, 'RakNet') +PATH_simplegui= os.path.join(module_dir, 'ThirdParty/simplegui') + + + + +# # # Overrides - this is needed as libs isn't defined in enirvonment for fmod.. +# # #class fmod: +# # # version= "4.06" +# # # libs=[LIB_Boost, 'fmodexL_vc'] +# # ##libs=[Config.LIB_Boost, 'libfmodex'] ##posix + +# # ### +# # ### these paths assume you've left all the directory structure as standard +# # ### Override anything that is different +# # ### +PATH_LIB_Ogre_CEGUIRenderer = os.path.join( LOCAL_LIB ) #, 'Samples/Common/CEGUIRenderer/lib') +PATH_LIB_Ogre_OgreMain= os.path.join( LOCAL_LIB ) # PATH_Ogre, 'OgreMain/lib/Release' ) +PATH_LIB_Ogre_Dependencies = os.path.join( LOCAL_LIB ) # , 'Dependencies/lib/Release') + + + +PATH_LIB_OgreRefApp = os.path.join( LOCAL_LIB ) # PATH_Ogre, 'ReferenceApplication/ReferenceAppLayer/lib/Release') +PATH_LIB_OgreNewt = os.path.join( LOCAL_LIB ) #PATH_OgreAddons, r'ogrenewt/OgreNewt_Main/lib/Release') +PATH_LIB_Newton = os.path.join( LOCAL_LIB ) # PATH_Newton ,'dll') ##NOTE Posix platforms this lives in 'lib-mt' +PATH_LIB_OIS = os.path.join( LOCAL_LIB ) #PATH_OIS, 'dll') ## NOTE Posix platforms this lives in'lib' not 'dll' +PATH_LIB_CEGUI = os.path.join ( LOCAL_LIB ) #PATH_Ogre, r'Dependencies/lib/Release' ) +PATH_LIB_ODE = os.path.join( LOCAL_LIB ) #PATH_ODE, 'lib/releasedll')## probable releaselib for posix +PATH_LIB_OgreOde = os.path.join( LOCAL_LIB ) #PATH_OgreOde, 'lib/Release') +PATH_LIB_OgreOdePrefab = os.path.join( LOCAL_LIB ) #PATH_OgreOde, 'prefab/lib/Release' ) +PATH_LIB_OgreOdeLoader = os.path.join( LOCAL_LIB ) #PATH_OgreOde, 'loader/lib/Release' ) + +PATH_LIB_OgreAL = os.path.join( LOCAL_LIB ) #PATH_OGREAL, 'lib/Release' ) +PATH_LIB_betagui = PATH_betagui +PATH_LIB_simplegui = PATH_simplegui +PATH_LIB_raknet = os.path.join( LOCAL_LIB ) #PATH_raknet, 'Lib' ) + + +PATH_INCLUDE_Ogre= os.path.join(LOCAL_INCLUDE,'OGRE') # os.path.join(PATH_Ogre,'OgreMain/include') + +PATH_INCLUDE_Ogre_Dependencies = PATH_INCLUDE_Ogre # os.path.join( PATH_Ogre, 'Dependencies/include') +PATH_INCLUDE_OIS = os.path.join(LOCAL_INCLUDE,'OIS') #os.path.join(PATH_OIS,'includes') ## Note the plural include's +PATH_INCLUDE_OgreRefApp = os.path.join(PATH_Ogre,'ReferenceApplication/ReferenceAppLayer/include') +PATH_INCLUDE_OgreNewt = os.path.join(LOCAL_INCLUDE,'OgreNewt') #os.path.join(PATH_OgreAddons,'ogrenewt/OgreNewt_Main/inc') +PATH_INCLUDE_CEGUI = os.path.join(LOCAL_INCLUDE,'CEGUI') #os.path.join(PATH_CEGUI, r'include/CEGUI') +PATH_INCLUDE_ODE = os.path.join(LOCAL_INCLUDE,'ODE') #os.path.join( PATH_ODE, 'include') +PATH_INCLUDE_ODESOURCE = '' # os.path.join( PATH_ODE, 'ode/src') + + +PATH_INCLUDE_OgreAL = ''# os.path.join( PATH_OGREAL, 'include' ) +PATH_INCLUDE_OPENAL = ''# os.path.join( PATH_OPENAL, 'include') +PATH_INCLUDE_OGG= ''# os.path.join( PATH_OGG, r'include' ) +PATH_INCLUDE_VORBIS= ''# os.path.join( PATH_VORBIS, r'include' ) +PATH_INCLUDE_ALUT= ''# os.path.join( PATH_ALUT, 'include' ) + +PATH_INCLUDE_OgreOde = os.path.join( PATH_OgreOde,'include') +PATH_INCLUDE_OgreOdePrefab= os.path.join( PATH_OgreOde,'prefab/include') +PATH_INCLUDE_OgreOdeLoader= os.path.join( PATH_OgreOde,'loader/include') + +PATH_INCLUDE_betagui = PATH_betagui +PATH_INCLUDE_simplegui = PATH_simplegui +PATH_INCLUDE_raknet = os.path.join(PATH_raknet, 'Source' ) +PATH_INCLUDE_Ogre_CEGUIRenderer = os.path.join( PATH_Ogre, 'samples/Common/CEGUIRenderer/include') Modified: trunk/python-ogre/SConstruct =================================================================== --- trunk/python-ogre/SConstruct 2007-07-25 04:47:51 UTC (rev 370) +++ trunk/python-ogre/SConstruct 2007-08-11 05:55:18 UTC (rev 371) @@ -89,9 +89,11 @@ # Let us select the projects to build possible_projects = ['ogre' , 'ois', 'ogrerefapp', 'ogrenewt', 'cegui', 'ode',\ - 'ogreode', 'ogreal', 'quickgui', 'opcode', 'nxogre', 'bullet' ] # , 'raknet' + 'ogreode', 'ogreal', 'quickgui', 'opcode', 'nxogre', 'bullet', 'physx', 'betagui','theora',\ + 'ogrevideoffmpeg', 'ogredshow' ] # , 'raknet' default_projects = ['ogre' , 'ois', 'ogrerefapp', 'ogrenewt', 'cegui', 'ode',\ - 'ogreode', 'ogreal', 'quickgui', 'opcode', 'nxogre', 'bullet' ] + 'ogreode', 'ogreal', 'quickgui', 'opcode', 'nxogre', 'bullet', 'physx', 'betagui','theora',\ + 'ogrevideoffmpeg', 'ogredshow' ] # This lets you call scons like: 'scons PROJECTS=ogre,cegui' opts = Options('custom.py') Added: trunk/python-ogre/ThirdParty/betagui/BetaGUI.h =================================================================== --- trunk/python-ogre/ThirdParty/betagui/BetaGUI.h (rev 0) +++ trunk/python-ogre/ThirdParty/betagui/BetaGUI.h 2007-08-11 05:55:18 UTC (rev 371) @@ -0,0 +1,638 @@ +#ifndef BETAGUI_H +#define BETAGUI_H + +/// Betajaen's GUI 016 Uncompressed +/// Written by Robin "Betajaen" Southern 07-Nov-2006, http://www.ogre3d.org/wiki/index.php/BetaGUI +/// This code is under the Whatevar! licence. Do what you want; but keep the original copyright header. + +#include "Ogre.h" +#include "OgreTextAreaOverlayElement.h" + +#include <iostream> + +using namespace Ogre; +using namespace std; + +namespace BetaGUI +{ + //------------------------------------------------------------------------------------------------ + class GUI; + + class Widget; + class Window; + + class Button; + class BoolButton; + class MenuButton; + class RealButton; + + class StaticText; + class TextInput; + + class Callback; + + class Effect; + class AlphaEffect; + class MoveEffect; + class SizeEffect; + + //------------------------------------------------------------------------------------------------ + enum WindowFeatureType + { + WFT_NONE = 0, + WFT_MOVE , + WFT_RESIZE , + WFT_RESIZE_AND_MOVE + }; + //------------------------------------------------------------------------------------------------ + enum WindowPlacementType + { + WPT_NONE = 0, + WPT_VERTICAL , + WPT_HORIZONTAL + }; + //------------------------------------------------------------------------------------------------ + enum WindowActivity + { + WA_NONE = 0, + WA_MOVE , + WA_RESIZE , + WA_PRESS + }; + //------------------------------------------------------------------------------------------------ + class GUI + { + public: + + friend class Window; + + friend class Button; + + friend class MenuButton; + friend class BoolButton; + friend class RealButton; + + friend class StaticText; + friend class TextInput; + + GUI(const Ogre::String &baseOverlay, const Ogre::String &font, int fontSize, Ogre::RenderWindow *win); + + ~GUI(); + + void sortZOrder() ; + + void setZRangeOrder(int nearZ, int FarZ); + + bool injectMouse(int x, int y, bool LMB); + bool injectMouse(float x, float y, bool LMB); + + bool injectKey(const Ogre::String &key, int x, int y); + + void injectBackspace(int x, int y); + + Window* createWindow( + const Ogre::Vector4 &Dimensions, + const Ogre::String &Material, + WindowFeatureType type, + const Ogre::String &caption = ""); + + void destroyWindow(Window *window) { + mNextWindowToDestroy=window; + } + Ogre::OverlayContainer* createOverlay(const Ogre::String &name, + const Ogre::Vector2 &position, + const Ogre::Vector2 &dimensions, + const Ogre::String &material = "", + const Ogre::String &caption = ""); + + Ogre::OverlayContainer* createMousePointer(Ogre::Vector2 dimensions, + const Ogre::String &material); + + + + Window *addMenuWindow(const Ogre::Vector2 dimensions); + + void update(Ogre::Real timeElapsed); + void addEffect (Effect* e); + Ogre::Real getUpTime() const {return mUpTime;} + + protected: + //Ogre::Overlay* mGuiOverlay; // Main sheet overlay + std::vector<Window*> mWindows; // Windows + Window * mNextWindowToDestroy; // Window to destroy + Ogre::OverlayContainer* mMousePointerOverlay; // Mouse Pointer Overlay + + Ogre::String mFont; + int mFontSize; + int mWindowCount, mButtonCount, mTextCaptionCount, mTextCaptionCountArea, mButtonCountTextArea; + + + Ogre::uint mDragWindowAction; + + int mDragX, mDragY; + int mDragWindowX, mDragWindowY; + + Window * mActiveDraggedWindow; + TextInput * mActiveTextInput; + Button * mActiveButton; + + Ogre::Vector2 mNextMenuWindowPos; + Window * mMenuWindow; + Ogre::RenderWindow * mRenderWindow; + + std::list<Effect*> mActiveEffects; + + Ogre::Real mUpTime; + Ogre::String mName; + int mFarZ; + int mNearZ; + }; + //------------------------------------------------------------------------------------------------ + class Widget + { + public: + + friend class GUI; + + Widget(const Ogre::Vector4 &Dimension, + const Ogre::String &materialNameNormal, + bool hasOverState = true, + bool hasActiveState = true); + + virtual ~Widget(); + + Ogre::Vector2 getPosition() const{return Ogre::Vector2(mPosX,mPosY);} + Ogre::Vector2 getSize() const {return Ogre::Vector2(mWidth,mHeight); } + + void setPosition(const Ogre::Vector2 &position); + void setSize(const Ogre::Vector2 &size); + + virtual void show(){setAlpha (1.0, true);}; + virtual void hide(){setAlpha (0.0, true);}; + + virtual bool isVisible() {return mMainOverlay->isVisible ();}; + + virtual void over(const bool a); + virtual void activate(const bool a); + + virtual void adjustSizeToContent(); + + virtual void setPosition(float X,float Y); + virtual void setPosition(int X,int Y); + virtual void setSize(int X,int Y); + virtual void setAlpha(const Ogre::Real alpha, const bool isContainer); + virtual void setMaterialBlendFactor(const Ogre::Real blendFactor, const bool isContainer); + + // mUnderEffect getter + bool getUnderEffect() const { return mUnderEffect; } + // mUnderEffect setter + void setUnderEffect(bool val); + + // mOver getter + bool getOver() const { return mOver; } + // mOver setter + void setOver(bool val) { mOver = val; } + // mActive getter + bool getActive() const { return mActive; } + // mActive setter + void setActive(bool val) { mActive = val; } + + // mActive setter + void setMainMaterial(const Ogre::String& mat) { + mMainOverlay->setMaterialName(mat); + } + + void setCaptionMaterial(const Ogre::String& mat) { + mCaptionOverlay->setMaterialName(mat); + } + + void setText(const Ogre::String& t) { + mCaptionOverlay->setCaption(t); + } + + Ogre::String getText() const { + return mCaptionOverlay->getCaption(); + } + + protected: + //------------------------------------------------------------------------------------------------ + inline bool isOut (const int x, const int y) const + { + return (x < mPosX) || (y < mPosY) + || (x > (mPosX + mWidth)) || + (y > (mPosY + mHeight)); + } + //------------------------------------------------------------------------------------------------ + inline bool isIn (const int x, const int y) const + { + return (x >= mPosX) && (y >= mPosY) + && (x <= (mPosX + mWidth)) && + (y <= (mPosY + mHeight)); + } + + void instantiateMaterial(Ogre::OverlayContainer * const oc, bool reset) const; + void setOverlayAlpha(Ogre::OverlayContainer * const oc, const Ogre::Real alpha) const; + void setOverlayMaterialBlendFactor(Ogre::OverlayContainer * const oc, const Ogre::Real blendFactor) const; + + int mPosX, mPosY, mWidth, mHeight; + + std::vector<Widget *> mChildren; + Ogre::OverlayContainer* mMainOverlay; + Ogre::OverlayContainer* mCaptionOverlay; + Ogre::String mMaterialName; + + bool mHasMaterial; + bool mHasOverState; + bool mHasActiveState; + bool mUnderEffect; + bool mOver; + bool mActive; + }; + //------------------------------------------------------------------------------------------------ + class Window : public Widget + { + public: + friend class Button; + friend class TextInput; + friend class StaticText; + friend class GUI; + + Window(const Ogre::Vector4 &Dimensions, const Ogre::String &Material, WindowFeatureType type, const Ogre::String &caption, GUI *gui); + virtual ~Window(); + + Button* createButton(const Ogre::Vector4 &Dimensions, const Ogre::String &Material, + const Ogre::String &Text, Callback callback); + + TextInput* createTextInput(const Ogre::Vector4 &Dimensions, const Ogre::String &Material, + const Ogre::String & Value, int length); + + StaticText* createStaticText(const Ogre::Vector4 &Dimensions, const Ogre::String &Text); + + void setSize(int X,int Y); + + MenuButton *addMenuButton(Window *target, const Ogre::String &label, WindowPlacementType wpt = WPT_NONE); + BoolButton *addBoolButton(bool value, const Ogre::String &label, WindowPlacementType wpt = WPT_NONE); + RealButton *addRealButton(Ogre::Real value, const Ogre::Vector4 &SliderMoves, const Ogre::String &label, WindowPlacementType wpt = WPT_NONE); + StaticText* addStaticText(const Ogre::String &label, WindowPlacementType wpt = WPT_NONE); + + Window *addMenuWindowTab(const Ogre::String &label, + bool titleBarWin = true, + WindowPlacementType wpt = WPT_VERTICAL); + + MenuButton* createMenuButton(const Ogre::Vector4 &D, const Ogre::String &M, const Ogre::String &T, Callback C, Window *t); + BoolButton* createBoolButton(const Ogre::Vector4 &D, const Ogre::String &M, const Ogre::String &T, Callback C, bool boolValue); + + RealButton *Window::createRealButton(Ogre::Real value, + const Ogre::Vector4 &SliderMoves, + const Ogre::String &label, + const Ogre::Vector2 &pos); + + GUI* getGUI() const {return mGUI;} + + void setFadeOut(bool f){mFadeOut = f;} + void setZOrder(int zOrder){mGuiOverlay->setZOrder (zOrder);} + protected: + + + bool check(int x, int y, bool LMB); + bool checkKey(const Ogre::String &key, int x, int y); + + TextInput* mActiveTextInput; // Active TextInput + + Button + *mCloseButton, + *mResizerButton, + *mActiveButton, + *mTitleBarButton; // Resizer, ActiveButton, Title bar + + GUI *mGUI; // mGUI pointer + + std::vector<Button*> mButtons; // Buttons + std::vector<TextInput*> mTextInput; // TextInputs + + Ogre::Overlay *mGuiOverlay; + + void addWidget(const Widget * const w, WindowPlacementType wpt); + Ogre::Vector2 mNextWidgetPos; + WindowActivity mDragType; + + bool mFadeOut; + + }; + //------------------------------------------------------------------------------------------------ + class BetaGUIListener + { + public: + virtual void onButtonPress(Button*, unsigned char) = 0; + }; + //------------------------------------------------------------------------------------------------ + class Callback + { + public: + friend class Window; + friend class Button; + + Callback() { + mCallbackType=0; + } + + Callback( void(*functionPointer)(BetaGUI::Button*, bool) ) { + mCallbackType=1; + fp = functionPointer; + } + + Callback(BetaGUIListener *l){ + mCallbackType = 2; + mListener = l; + } + protected: + unsigned char mCallbackType; // Type of callback: 0 - None, 1 - FunctionPointer 2 - GUIListener, 3 - Move Window, 4 - Resize + void(*fp)(BetaGUI::Button*, bool); // Function pointer (if 1) + BetaGUIListener *mListener; // GuiListener (if 2) + }; + //------------------------------------------------------------------------------------------------ + class Button : public Widget + { + public: + friend class Window; + friend class GUI; + + Button(const Ogre::Vector4 &Dimensions, const Ogre::String &Material, + const Ogre::String &Text, Callback callback, Window *parent); + virtual ~Button() {} + + protected: + Callback mCallback; // Callback to use + }; + //------------------------------------------------------------------------------------------------ + class MenuButton : public Button + { + public: + MenuButton(const Ogre::Vector4 &Dimensions, const Ogre::String &Material, + const Ogre::String &Text, Callback callback, Window *parent, + Window *target) : + Button(Dimensions, Material, Text, callback, parent), + mTarget(target) + {}; + virtual ~MenuButton(){}; + protected: + void activate(const bool a) ; + + Window *mTarget; + }; + //------------------------------------------------------------------------------------------------ + class BoolButton : public Button + { + public: + BoolButton(const Ogre::Vector4 &Dimensions, const Ogre::String &Material, + const Ogre::String &Text, Callback callback, Window *parent, bool boolValue): + Button(Dimensions, Material, Text, callback, parent), + mBoolValue(boolValue) + {} + virtual ~BoolButton(){}; + + protected: + void activate(const bool a) ; + + bool mBoolValue; + }; + //------------------------------------------------------------------------------------------------ + class TextInput : public Widget + { + public: + friend class Window; + friend class GUI; + + TextInput(const Ogre::Vector4 &Dimensions, const Ogre::String &Material, + const Ogre::String &Value, unsigned int length, Window *parent); + virtual ~TextInput(){} + const Ogre::String &getValue() const {return mValueText;} + void setValue(const Ogre::String &v) {mCaptionOverlay->setCaption(mValueText = v);} + + protected: + unsigned int length; + Ogre::String mValueText;// MaterialName Normal, MaterialName Active + + }; + //------------------------------------------------------------------------------------------------ + class StaticText : public Widget + { + public: + friend class Window; + + StaticText(const Ogre::Vector4 &Dimensions, + const Ogre::String &Value, + Window *parent); + virtual ~StaticText(){} + + const Ogre::String &getValue() const + {return mValueText;} + + void setValue(const Ogre::String &v) + { + mCaptionOverlay->setCaption(mValueText = v); + mWidth = static_cast<int> (mValueText.size () * 7); + mParent->adjustSizeToContent (); + } + + protected: + + int length; + Ogre::String mValueText; + Window *mParent; + }; + //------------------------------------------------------------------------------------------------ + class RealButton : public BetaGUIListener, public Widget + { + public: + friend class Window; + + RealButton(BetaGUI::Window *window, + Ogre::Real value, + const Ogre::Vector4 &SliderMoves, + const Ogre::String &label, + const Ogre::Vector2 &pos); + + virtual ~RealButton(){}; + + Ogre::Real getValue() const {return mValue;} + + void setValue(const Ogre::Real v); + + void onButtonPress(BetaGUI::Button *ref, Ogre::uchar type); + protected: + + int length; + + BetaGUI::TextInput *mtextValueInput; + BetaGUI::Button *mForward, *mFastForward, *mRewind, *mFastRewind; + + Ogre::Real mValue; + Ogre::String mValueText; + + Ogre::Real mLowSlideUnit; + Ogre::Real mFastSlideUnit; + Ogre::Real mMinValue; + Ogre::Real mMaxValue; + + }; + //------------------------------------------------------------------------------------------------ + class Effect + { + public: + enum EffectInterpolatorType + { + EFFECT_LINEAR = 0, + EFFECT_LINEARX2, + EFFECT_LINEARX4, + EFFECT_SIN + }; + public: + Effect(Widget * const widget, const Ogre::Real duration, + const Ogre::Real startTime, const Ogre::Real currTime = 0, const bool repeat = false, + EffectInterpolatorType type = EFFECT_LINEARX4) : + mWidget(widget), + mStartTime(startTime), + mDuration(duration), + mRepeat(repeat), + mCurrTime(currTime), + mType(type) + { + assert (duration != 0); + } + virtual ~Effect(){}; + + virtual void updateValue(const Ogre::Real factor) = 0; + + bool update(Ogre::Real timeElapsed); + Ogre::Real getTimeFactor() ; + bool getTimeOrIsFinished(); +// Ogre::Real linearInterpolate(const Ogre::Real start, +// const Ogre::Real end, +// const Ogre::Real timeFactor) const; + Ogre::Real interpolate(const Ogre::Real start, + const Ogre::Real end, + const Ogre::Real timeFactor) const; + + protected: + Widget * const mWidget; + const Ogre::Real mStartTime; + const Ogre::Real mDuration; + const bool mRepeat; + + Ogre::Real mCurrTime; + const EffectInterpolatorType mType; + }; + //------------------------------------------------------------------------------------------------ + class AlphaEffect : public Effect + { + public: + + AlphaEffect(Widget * const widget, + const Ogre::Real duration, + const Ogre::Real startAlpha, + const Ogre::Real endAlpha, + const Ogre::Real startTime, + const Ogre::Real currTime = 0, + const bool repeat = false, + EffectInterpolatorType type = EFFECT_LINEARX4) : + Effect(widget, duration, startTime, currTime, repeat), + mStartAlpha(startAlpha), + mEndAlpha(endAlpha) + { + assert(mStartAlpha >= 0.0 && mStartAlpha <= 1.0); + assert(mEndAlpha >= 0.0 && mEndAlpha <= 1.0); + } + virtual ~AlphaEffect(){}; + + void updateValue(const Ogre::Real factor); + private: + const Ogre::Real mStartAlpha; + const Ogre::Real mEndAlpha; + }; + //------------------------------------------------------------------------------------------------ + class MoveEffect : public Effect + { + public: + MoveEffect(Widget * const widget, + const Ogre::Real duration, + const Ogre::Vector2 &startPosition, + const Ogre::Vector2 &endPosition, + const Ogre::Real startTime, + const Ogre::Real currTime = 0, + const bool repeat = false, + EffectInterpolatorType type = EFFECT_LINEARX4) : + Effect(widget, duration, startTime, currTime, repeat), + mStartPosition(startPosition), + mEndPosition(endPosition) + {} + virtual ~MoveEffect(){}; + void updateValue(const Ogre::Real factor); + + private: + const Ogre::Vector2 mStartPosition; + const Ogre::Vector2 mEndPosition; + }; + //------------------------------------------------------------------------------------------------ + class SizeEffect : public Effect + { + public: + SizeEffect(Widget * const widget, + const Ogre::Real duration, + const Ogre::Vector2 &startSize, + const Ogre::Vector2 &endSize, + const Ogre::Real startTime, + const Ogre::Real currTime = 0, + const bool repeat = false, + EffectInterpolatorType type = EFFECT_LINEARX4) : + Effect(widget, duration, startTime, currTime, repeat), + mStartSize(startSize), + mEndSize(endSize) + {} + virtual ~SizeEffect(){}; + void updateValue(const Ogre::Real factor); + + private: + const Ogre::Vector2 mStartSize; + const Ogre::Vector2 mEndSize; + }; + //------------------------------------------------------------------------------------------------ + class ActivateEffect : public Effect + { + public: + ActivateEffect(Widget * const widget, + const Ogre::Real duration, + const Ogre::Real startTime, + const Ogre::Real currTime = 0, + const bool repeat = false, + EffectInterpolatorType type = EFFECT_LINEARX4): + Effect(widget, duration, startTime, currTime, repeat) + {}; + virtual ~ActivateEffect(){}; + void updateValue(const Ogre::Real factor); + + }; + //------------------------------------------------------------------------------------------------ + class OverEffect : public Effect + { + public: + OverEffect(Widget * const widget, + const Ogre::Real duration, + const Ogre::Real startTime, + const Ogre::Real currTime = 0, + const bool repeat = false, + EffectInterpolatorType type = EFFECT_LINEARX4): + Effect(widget, duration, startTime, currTime, repeat) + {}; + virtual ~OverEffect(){}; + void updateValue(const Ogre::Real factor); + + }; + //------------------------------------------------------------------------------------------------ + + +} // End of Namespace + +/////////////////////////////////////////////////////////////////////////////// +#endif + Added: trunk/python-ogre/ThirdParty/betagui/BetaGui.cpp =================================================================== --- trunk/python-ogre/ThirdParty/betagui/BetaGui.cpp (rev 0) +++ trunk/python-ogre/ThirdParty/betagui/BetaGui.cpp 2007-08-11 05... [truncated message content] |
From: <and...@us...> - 2007-08-12 14:35:00
|
Revision: 372 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=372&view=rev Author: andy_miller Date: 2007-08-12 07:34:59 -0700 (Sun, 12 Aug 2007) Log Message: ----------- Modified Paths: -------------- trunk/python-ogre/code_generators/ogredshow/generate_code.py trunk/python-ogre/code_generators/ogrevideoffmpeg/generate_code.py trunk/python-ogre/code_generators/quickgui/generate_code.py trunk/python-ogre/demos/gui/Demo_QuickGUI01.py trunk/python-ogre/demos/nxogre/CakeFramework.py trunk/python-ogre/setup.py Added Paths: ----------- trunk/python-ogre/demos/gui/resources.cfg.quickgui Modified: trunk/python-ogre/code_generators/ogredshow/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/ogredshow/generate_code.py 2007-08-11 05:55:18 UTC (rev 371) +++ trunk/python-ogre/code_generators/ogredshow/generate_code.py 2007-08-12 14:34:59 UTC (rev 372) @@ -535,10 +535,10 @@ for f in additional_files: if f.endswith('cpp') or f.endswith('.h'): sourcefile = os.path.join(p, f) - destfile = os.path.join(environment.ogrevideoffmpeg.generated_dir, f ) + destfile = os.path.join(environment.ogredshow.generated_dir, f ) if not common_utils.samefile( sourcefile ,destfile ): - shutil.copy( sourcefile, environment.ogrevideoffmpeg.generated_dir ) + shutil.copy( sourcefile, environment.ogredshow.generated_dir ) print "Updated ", f, "as it was missing or out of date" if __name__ == '__main__': Modified: trunk/python-ogre/code_generators/ogrevideoffmpeg/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/ogrevideoffmpeg/generate_code.py 2007-08-11 05:55:18 UTC (rev 371) +++ trunk/python-ogre/code_generators/ogrevideoffmpeg/generate_code.py 2007-08-12 14:34:59 UTC (rev 372) @@ -441,10 +441,10 @@ for f in additional_files: if f.endswith('cpp') or f.endswith('.h'): sourcefile = os.path.join(p, f) - destfile = os.path.join(environment.ogredshow.generated_dir, f ) + destfile = os.path.join(environment.ogrevideoffmpeg.generated_dir, f ) if not common_utils.samefile( sourcefile ,destfile ): - shutil.copy( sourcefile, environment.ogredshow.generated_dir ) + shutil.copy( sourcefile, environment.ogrevideoffmpeg.generated_dir ) print "Updated ", f, "as it was missing or out of date" if __name__ == '__main__': Modified: trunk/python-ogre/code_generators/quickgui/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/quickgui/generate_code.py 2007-08-11 05:55:18 UTC (rev 371) +++ trunk/python-ogre/code_generators/quickgui/generate_code.py 2007-08-12 14:34:59 UTC (rev 372) @@ -106,6 +106,7 @@ global_ns.class_('::Ogre::FontPtr').include(already_exposed=True) global_ns.class_('::Ogre::RenderQueueListener').include(already_exposed=True) global_ns.class_('::Ogre::SceneManager').include(already_exposed=True) +# global_ns.class_('::Ogre::TRect<float>').include(already_exposed=True) global_ns.namespace( 'Ogre' ).class_('Singleton<QuickGUI::GUIManager>').include() #already_exposed=True) Modified: trunk/python-ogre/demos/gui/Demo_QuickGUI01.py =================================================================== --- trunk/python-ogre/demos/gui/Demo_QuickGUI01.py 2007-08-11 05:55:18 UTC (rev 371) +++ trunk/python-ogre/demos/gui/Demo_QuickGUI01.py 2007-08-12 14:34:59 UTC (rev 372) @@ -59,7 +59,7 @@ s = "" if( gm.getMouseOverWidget() != None): s = gm.getMouseOverWidget().getInstanceName() - w = gm.getDefaultSheet().getWindow("Mouse Over Window").getTextBox(0).setText(s) + w = gm.getDefaultSheet().getWindow("Mouse Over Window") if w : w.getTextBox(0).setText(s) @@ -92,6 +92,13 @@ def keyPressed( self, arg ): if( arg.key == ois.KC_ESCAPE ): self.ShutdownRequested = True + elif ( arg.key == ois.KC_UP ): + camPos = self.camera.getPostion() + self.camera.setPosition(camPos.x, camPos.y, camPos.z-5) + elif ( arg.key == ois.KC_DOWN ): + camPos = self.camera.getPostion() + self.camera.setPosition(camPos.x, camPos.y, camPos.z+5) + ## Now convert from OIS keycode to QuickGUI one.. k = gui.KeyCode.values[arg.key] gui.GUIManager.getSingleton().injectKeyDown( k ) @@ -107,6 +114,20 @@ class QuickGUIDemoApp (sf.Application): + + def _setUpResources(self): + """This sets up Ogre's resources, which are different for QuickGUI + """ + config = Ogre.ConfigFile() + config.load('resources.cfg.quickgui' ) + seci = config.getSectionIterator() + while seci.hasMoreElements(): + SectionName = seci.peekNextKey() + Section = seci.getNext() + for item in Section: + Ogre.ResourceGroupManager.getSingleton().\ + addResourceLocation(item.value, item.key, SectionName) + ## Just override the mandatory create scene method def _createScene(self): self.mDebugDisplayShown=True @@ -123,9 +144,7 @@ ## other objects, but I don't l.setPosition(20,80,50) - print "\n\nCREATE GUIMANAGER\n" self.mGUIManager = gui.GUIManager(self.renderWindow.getWidth(),self.renderWindow.getHeight()) - print "\n\n", self.mGUIManager self.robot = self.sceneManager.createEntity("ChuckNorris", "robot.mesh") @@ -136,7 +155,7 @@ ## This ensures the camera doesn't move when we move the cursor.. #3 However we do the same thing by setting MenuMode to True in the frameListerner further down - self.camera.setAutoTracking(True, robotNode) +# # # self.camera.setAutoTracking(True, robotNode) plane = Ogre.Plane( Ogre.Vector3.UNIT_Y, 0 ) Ogre.MeshManager.getSingleton().createPlane("ground", @@ -177,72 +196,66 @@ def createGUI(self): self.callbacks=[] - self.mousecursor = self.mGUIManager.getMouseCursor() - self.mousecursor.show() - self.mousecursor.setTexture("qgui.unchecked.over.png" ) #pointer.png") - self.mousecursor.setSize(50,50) - print "\n\n",self.mousecursor,"\n\n" - - + self.mGUIManager.clearAll() self.mSheet = self.mGUIManager.getDefaultSheet() ## Main Menu and it's MenuLists - topMenu = self.mSheet.createMenu((0,0,1,0.04)) + topMenu = self.mSheet.createMenu((0,0,1,0.05)) + fileList = topMenu.addMenuList("File",0,0.075) exitListItem = fileList.addListItem("Exit") - exitListItem.addEventHandler(gui.Widget.Event.QGUI_EVENT_MOUSE_BUTTON_UP,self.MakeCallback (self.evtHndlr_exitListItem ) ) + exitListItem.addEventHandler(gui.Widget.EVENT_MOUSE_BUTTON_UP,self.MakeCallback (self.evtHndlr_exitListItem ) ) - cameraList = topMenu.addMenuList("Camera Properties",0.08,0.2) + cameraList = topMenu.addMenuList("Progress",0.08,0.2) pointListItem = cameraList.addListItem("Point") - pointListItem.addImage(Ogre.Vector4(0,0,0.2,1),"demo.pointmode") - pointListItem.addEventHandler(gui.Widget.QGUI_EVENT_MOUSE_BUTTON_UP,self.MakeCallback(self.evtHndlr_CameraPoint) ) + pointListItem.addImage(Ogre.Vector4(0,0,0.2,1),"pointmode.png") + pointListItem.addEventHandler(gui.Widget.EVENT_MOUSE_BUTTON_UP,self.MakeCallback(self.evtHndlr_CameraPoint) ) wireframeListItem = cameraList.addListItem("Wire Frame") - wireframeListItem.addImage(Ogre.Vector4(0,0,0.2,1),"demo.wireframemode") - wireframeListItem.addEventHandler(gui.Widget.QGUI_EVENT_MOUSE_BUTTON_UP,self.MakeCallback(self.evtHndlr_CameraWireFrame) ) + wireframeListItem.addImage(Ogre.Vector4(0,0,0.2,1),"wireframemode.png") + wireframeListItem.addEventHandler(gui.Widget.EVENT_MOUSE_BUTTON_UP,self.MakeCallback(self.evtHndlr_CameraWireFrame) ) solidListItem = cameraList.addListItem("Solid") - solidListItem.addImage(Ogre.Vector4(0,0,0.2,1),"demo.solidmode") - solidListItem.addEventHandler(gui.Widget.QGUI_EVENT_MOUSE_BUTTON_UP,self.MakeCallback(self.evtHndlr_CameraSolid) ) + solidListItem.addImage(Ogre.Vector4(0,0,0.2,1),"solidmode.png") + solidListItem.addEventHandler(gui.Widget.EVENT_MOUSE_BUTTON_UP,self.MakeCallback(self.evtHndlr_CameraSolid) ) - viewportList = topMenu.addMenuList("Progress Bar Color",0.285,0.2) + viewportList = topMenu.addMenuList("Progress Bar Color",0.285,0.25) redListItem = viewportList.addListItem("Red") - redListItem.addImage(Ogre.Vector4(0.1,0.1,0.8,0.8),"demo.listitem.red") - redListItem.addEventHandler(gui.Widget.QGUI_EVENT_MOUSE_BUTTON_UP,self.MakeCallback(self.evtHndlr_pbRed) ) + redListItem.addImage(Ogre.Vector4(0.1,0.1,0.8,0.8),"listitem.red.png") + redListItem.addEventHandler(gui.Widget.EVENT_MOUSE_BUTTON_UP,self.MakeCallback(self.evtHndlr_pbRed) ) greenListItem = viewportList.addListItem("Green") - greenListItem.addImage(Ogre.Vector4(0.1,0.1,0.8,0.8),"demo.listitem.green") - greenListItem.addEventHandler(gui.Widget.QGUI_EVENT_MOUSE_BUTTON_UP,self.MakeCallback(self.evtHndlr_pbGreen) ) + greenListItem.addImage(Ogre.Vector4(0.1,0.1,0.8,0.8),"listitem.green.png") + greenListItem.addEventHandler(gui.Widget.EVENT_MOUSE_BUTTON_UP,self.MakeCallback(self.evtHndlr_pbGreen) ) blueListItem = viewportList.addListItem("Blue") - blueListItem.addImage(Ogre.Vector4(0.1,0.1,0.8,0.8),"demo.listitem.blue") - blueListItem.addEventHandler(gui.Widget.QGUI_EVENT_MOUSE_BUTTON_UP,self.MakeCallback(self.evtHndlr_pbBlue) ) + blueListItem.addImage(Ogre.Vector4(0.1,0.1,0.8,0.8),"listitem.blue.png") + blueListItem.addEventHandler(gui.Widget.EVENT_MOUSE_BUTTON_UP,self.MakeCallback(self.evtHndlr_pbBlue) ) - otherList = topMenu.addMenuList("Other",0.49,0.1) + otherList = topMenu.addMenuList("Other",0.55,0.25) textColorListItem = otherList.addListItem("Text Color") - textColorListItem.addEventHandler(gui.Widget.QGUI_EVENT_MOUSE_BUTTON_UP,self.MakeCallback(self.evtHndlr_setTextWhite) ) + textColorListItem.addEventHandler(gui.Widget.EVENT_MOUSE_BUTTON_UP,self.MakeCallback(self.evtHndlr_setTextWhite) ) tcProperties = textColorListItem.addNStateButton(Ogre.Vector4(0.8,0.1,0.175,0.9)) - tcProperties.addState("OpenProperties","demo.listitem.textproperties") - tcProperties.addEventHandler(gui.Widget.QGUI_EVENT_MOUSE_BUTTON_UP,self.MakeCallback(self.evtHndlr_showSetTextDialog) ) + tcProperties.addState("OpenProperties","properties.png") + tcProperties.addEventHandler(gui.Widget.EVENT_MOUSE_BUTTON_UP,self.MakeCallback(self.evtHndlr_showSetTextDialog) ) RenderStatsListItem = otherList.addListItem("Render Stats") toggleRenderStats = RenderStatsListItem.addNStateButton(Ogre.Vector4(0.8,0.1,0.175,0.9)) - toggleRenderStats.addState("checked","qgui.unchecked") - toggleRenderStats.addState("unchecked","qgui.checked") - toggleRenderStats.addEventHandler(gui.Widget.QGUI_EVENT_MOUSE_BUTTON_UP,self.MakeCallback(self.evtHndlr_toggleDebugDisplay)) + toggleRenderStats.addState("checked","qgui.unchecked.png") + toggleRenderStats.addState("unchecked","qgui.checked.png") + toggleRenderStats.addEventHandler(gui.Widget.EVENT_MOUSE_BUTTON_UP,self.MakeCallback(self.evtHndlr_toggleDebugDisplay)) ## Logos - logoImage = self.mSheet.createImage((0.02,0.07,0.3,0.3)) logoImage.setBorderWidth(10) logoLabel = self.mSheet.createLabel((0.075,0.4,0.15,0.05)) - logoLabel.setText("Click Me >") + logoLabel.getText().setCaption("Click Me >") imageToggleButton = self.mSheet.createNStateButton(Ogre.Vector4(0.225,0.4,0.05,0.05)) - imageToggleButton.addState("OgreLogo","qgui.checked") - imageToggleButton.addState("QuickGUILogo","qgui.unchecked") + imageToggleButton.addState("OgreLogo","qgui.checked.png") + imageToggleButton.addState("QuickGUILogo","qgui.unchecked.png") ## RTT Example Use rttImage = self.mSheet.createImage(Ogre.Vector4(0.75,0.07,0.2,0.15),"self.rttTex") - rttImage.setBorderWidth(10) - ninjaWindow = self.mSheet.createWindow(Ogre.Vector4(0.725,0.25,0.25,0.15)) +# rttImage.setBorderWidth(10) + ninjaWindow = self.mSheet.createWindow(Ogre.Vector4(0.75,0.25,0.2,0.2)) ninjaWindow.hideTitlebar() animToggleButton = ninjaWindow.createNStateButton(Ogre.Vector4(0.05,0.033,0.9,0.3)) ## populate NStateButton with States - robot animations @@ -250,7 +263,7 @@ state = 0 while( casi.hasMoreElements() ): animName = casi.getNext().getAnimationName() - animToggleButton.addState("State"+str(state),"qgui.button",animName) + animToggleButton.addState("State"+str(state),"qgui.button.png",animName) if state == 0: self.robotAnimationState = self.robot.getAnimationState(animName) self.robotAnimationState.setEnabled(True) @@ -258,61 +271,73 @@ self.robotAnimationState.setLoop(True) state+=1 # animToggleButton.addOnStateChangedEventHandler(self.evtHndlr_changeAnimations) -# animToggleButton.addEventHandler(gui.Widget.QGUI_EVENT_MOUSE_BUTTON_UP,self.MakeCallback(self.evtHndlr_changeAnimations) ) +# animToggleButton.addEventHandler(gui.Widget.EVENT_MOUSE_BUTTON_UP,self.MakeCallback(self.evtHndlr_changeAnimations) ) animToggleButton.addOnStateChangedEventHandler(self.MakeCallback(self.evtHndlr_changeAnimations) ) hurtButton = ninjaWindow.createButton(Ogre.Vector4(0.05,0.36,0.9,0.3)) - hurtButton.setText("Hurt") - hurtButton.addEventHandler(gui.Widget.QGUI_EVENT_MOUSE_BUTTON_UP,self.MakeCallback(self.evtHndlr_hurt) ) + hurtButton.getText().setCaption("Hurt") + hurtButton.addEventHandler(gui.Widget.EVENT_MOUSE_BUTTON_UP,self.MakeCallback(self.evtHndlr_hurt) ) healButton = ninjaWindow.createButton(Ogre.Vector4(0.05,0.69,0.9,0.3)) - healButton.setText("Heal") - healButton.addEventHandler(gui.Widget.QGUI_EVENT_MOUSE_BUTTON_UP,self.MakeCallback(self.evtHndlr_heal) ) - - ## Progress Bar Setup - self.mSheet.createLabel((0.4,0.5125,0.07,0.07),"").setText("HP") - self.lifeBarValueLabel = self.mSheet.createLabel((0.55,0.5125,0.07,0.07),"") - self.lifeBarValueLabel.setText("100") - self.lifeBar =self.mSheet.createProgressBar((0.4,0.55,0.2,0.03)) + healButton.getText().setCaption("Heal") + healButton.addEventHandler(gui.Widget.EVENT_MOUSE_BUTTON_UP,self.MakeCallback(self.evtHndlr_heal) ) - self.lifeBar.setTexture("progressbar.red") + ## TrackBar Setup + tb1 = self.mSheet.createTrackBar(Ogre.Vector4(0.4,0.1,0.2,0.04)) + tb1.setNumRegions(3) + tb1.setTickPosition(4) # Does not work! 3 regions -> ticks: 0/1/2/3 + tb2 = self.mSheet.createTrackBar(Ogre.Vector4(0.4,0.15,0.03,0.2)) + tb2.setNumTicks(10) + tb2.setTickPosition(9) + ## Progress Bar Setup + self.lifeBar = self.mSheet.createProgressBar(Ogre.Vector4(0.4,0.55,0.2,0.03)) + self.lifeBar.setInitialPixelOffset(0) + HPLabel = self.mSheet.createLabel(Ogre.Vector4(0.4,0.5125,0.07,0.07),"") + HPLabel.getText().setCaption("HP") + HPLabel.appearOverWidget(self.lifeBar) + self.lifeBarValueLabel = self.mSheet.createLabel(Ogre.Vector4(0.55,0.5125,0.07,0.07),"") + self.lifeBarValueLabel.getText().setCaption("100") + self.lifeBarValueLabel.appearOverWidget(self.lifeBar) + ## Mouse Over window - mouseOverWindow = self.mSheet.createWindow("Mouse Over Window",Ogre.Vector4(0.7,0.7,0.3,0.1)) + mouseOverWindow = self.mSheet.createWindow("Mouse Over Window",Ogre.Vector4(0.6,0.7,0.4,0.1)) mouseOverWindow.hideTitlebar() mouseOverLabel = mouseOverWindow.createLabel(Ogre.Vector4(0,0,1,0.5)) - mouseOverLabel.setText("Mouse Over Widget:") + mouseOverLabel.getText().setCaption("Mouse Over Widget:") mouseOverTB = mouseOverWindow.createTextBox(Ogre.Vector4(0,0.5,1,0.5)) mouseOverTB.setReadOnly(True) ## Login Portion - self.mSheet.createLabel(Ogre.Vector4(0.02,0.6,0.2,0.05)).setText("User Name:") - self.mSheet.createLabel(Ogre.Vector4(0.02,0.65,0.2,0.05)).setText("Password:") + self.mSheet.createLabel(Ogre.Vector4(0.02,0.6,0.2,0.05)).getText().setCaption("User Name:") + self.mSheet.createLabel(Ogre.Vector4(0.02,0.65,0.2,0.05)).getText().setCaption("Password:") self.usernameTB = self.mSheet.createTextBox(Ogre.Vector4(0.225,0.6,0.2,0.05)) self.passwordTB = self.mSheet.createTextBox(Ogre.Vector4(0.225,0.65,0.2,0.05)) self.passwordTB.maskUserInput(ord('*')) loginButton = self.mSheet.createButton(Ogre.Vector4(0.125,0.7,0.25,0.07)) - loginButton.setText("Login") - loginButton.addEventHandler(gui.Widget.QGUI_EVENT_MOUSE_BUTTON_UP,self.MakeCallback(self.evtHndlr_login) ) + loginButton.getText().setCaption("Login") + loginButton.addEventHandler(gui.Widget.EVENT_MOUSE_BUTTON_UP,self.MakeCallback(self.evtHndlr_login) ) self.loginResultLabel = self.mSheet.createLabel(Ogre.Vector4(0.0,0.77,0.5,0.05), "") ## Set Text Window self.stWindow = self.mSheet.createWindow(Ogre.Vector4(0.7,0.45,0.3,0.2)) self.stWindow.hide() - self.stWindow.createLabel((0.05,0.3,0.3,0.25)).getText().setCaption("Color:") - - self.stWindow.createLabel(Ogre.Vector4(0.05,0.3,0.3,0.25)).setText("Color:") + self.stWindow.getTitleBar().setCaption("Set Text Color:") + + self.stWindow.createLabel(Ogre.Vector4(0.05,0.3,0.3,0.25)).getText().setCaption("Color:") colorCB = self.stWindow.createComboBox(Ogre.Vector4(0.4,0.3,0.55,0.25)) colorCBdropList = colorCB.getDropDownList() - + colorCBdropList.addListItem("Red") colorCBdropList.addListItem("Green") colorCBdropList.addListItem("Blue") colorCBdropList.addListItem("Black") colorCBdropList.addListItem("White") setTextButton = self.stWindow.createButton(Ogre.Vector4(0.05,0.6,0.9,0.3)) - setTextButton.setText("Apply") - setTextButton.addEventHandler(gui.Widget.QGUI_EVENT_MOUSE_BUTTON_UP,self.MakeCallback(self.evtHndlr_setTextColor) ) - + setTextButton.setCaption("Apply") + setTextButton.addEventHandler(gui.Widget.EVENT_MOUSE_BUTTON_UP,self.MakeCallback(self.evtHndlr_setTextColor) ) + # colorCB->clearList(); + colorCBdropList.removeListItem(2) + def evtHndlr_exitListItem(self, args): ## check if left mouse button is down if(args.button == gui.MB_Left): @@ -337,33 +362,39 @@ currentProgress = self.lifeBar.getProgress() random = Ogre.Math.RangeRandom(currentProgress,1.0) self.lifeBar.setProgress(random) - self.lifeBarValueLabel.setText(str(int(random * 100))) + self.lifeBarValueLabel.getText().setCaption(str(int(random * 100))) return True def evtHndlr_hurt(self, args): - if args.button == gui.MB_Left: - currentProgress = self.lifeBar.getProgress() - random = Ogre.Math.RangeRandom(0.0,currentProgress) - self.lifeBar.setProgress(random) - self.lifeBarValueLabel.setText(str(int(random * 100))) + currentProgress = self.lifeBar.getProgress() + random = Ogre.Math.RangeRandom(0.0,currentProgress) + self.lifeBar.setProgress(random) + self.lifeBarValueLabel.getText().setCaption(str(int(random * 100))) return True def evtHndlr_pbRed(self,args): - self.lifeBar.setMaterial("progressbar.red") + self.lifeBar.setTexture("progressbar.red.png") + self.lifeBar.setProgress(1.0) + self.lifeBar.getText().setCaption("100") + return False def evtHndlr_pbGreen(self, args): - self.lifeBar.setMaterial("progressbar.green") + self.lifeBar.setTexture("progressbar.gree.png") + self.lifeBar.setProgress(1.0) + self.lifeBar.getText().setCaption("100") return True def evtHndlr_pbBlue(self, args): - self.lifeBar.setMaterial("progressbar.blue") + self.lifeBar.setTexture("progressbar.blue.png") + self.lifeBar.setProgress(1.0) + self.lifeBar.getText().setCaption("100") return True def evtHndlr_login(self, args): - if( self.usernameTB.getText() == self.passwordTB.getText() ) : s = "Login Successful." + if( self.usernameTB.getCaption() == self.passwordTB.getCaption() ) : s = "Login Successful." else: s = "Username and/or Password do not match." - self.loginResultLabel.setText(s) + self.loginResultLabel.getText().setCaption(s) return True def evtHndlr_toggleDebugDisplay(self, args): @@ -372,7 +403,7 @@ return True def evtHndlr_setTextWhite(self, args): - self.stWindow.setTextColor(Ogre.ColourValue.White) + self.stWindow.getTitleBar().getText().setColor(Ogre.ColourValue.White) return True def evtHndlr_showSetTextDialog(self, args): @@ -393,7 +424,7 @@ return True def evtHndlr_setTextColor(self, args): - s = self.stWindow.getComboBox(0).getText() + s = self.stWindow.getComboBox(0).getText().getCaption() if( s == "Red" ): c = Ogre.ColourValue.Red elif( s == "Green" ): c = Ogre.ColourValue.Green @@ -401,7 +432,7 @@ elif( s == "Black" ): c = Ogre.ColourValue.Black elif( s == "White" ): c = Ogre.ColourValue.White - self.stWindow.setTextColor(c) + self.stWindow.getTitleBar().getText().setColor(c) return True def _createFrameListener(self): Added: trunk/python-ogre/demos/gui/resources.cfg.quickgui =================================================================== --- trunk/python-ogre/demos/gui/resources.cfg.quickgui (rev 0) +++ trunk/python-ogre/demos/gui/resources.cfg.quickgui 2007-08-12 14:34:59 UTC (rev 372) @@ -0,0 +1,15 @@ +# Resource locations to be added to the 'boostrap' path +# This also contains the minimum you need to use the Ogre example framework +[Bootstrap] +Zip=../media/packs/OgreCore.zip + +# Resource locations to be added to the default path +[General] +FileSystem=../media +FileSystem=../media/materials/scripts +FileSystem=../media/materials/textures +FileSystem=../media/models +FileSystem=../media/Skins +FileSystem=../media/Skins/qgui +FileSystem=../media/Skins/qgui_demo +Zip=../media/packs/cubemapsJS.zip Modified: trunk/python-ogre/demos/nxogre/CakeFramework.py =================================================================== --- trunk/python-ogre/demos/nxogre/CakeFramework.py 2007-08-11 05:55:18 UTC (rev 371) +++ trunk/python-ogre/demos/nxogre/CakeFramework.py 2007-08-12 14:34:59 UTC (rev 372) @@ -445,6 +445,7 @@ self.Camera.setNearClipDistance(0.1) self.RMB=False self.Effects=[] ## we need to keep effects around + self.objects=[] ## hold newly created objects ## Building stuff self.BuildMode = Enum ('BM_NONE', @@ -972,30 +973,30 @@ if (b.getPosition().x == 96 and self.mBuildMode == self.BuildMode.BM_ACTOR and c == 1) : sz = self.BuildNode.getScale() - b = None if (self.BuildMesh == "cube.1m.mesh"): - b = self.Scene.createBody(self.BuildMesh, nxogre.CubeShape(sz.x,sz.y,sz.z), - mxogre.Pose(self.BuildNode.getPosition(), self.BuildNode.getOrientation()), + tempBody = self.Scene.createBody(self.BuildMesh, nxogre.CubeShape(sz.x,sz.y,sz.z), + nxogre.Pose(self.BuildNode.getPosition(), self.BuildNode.getOrientation()), "Density: 100, node-scale:" + str(self.BuildNode.getScale())) elif (self.BuildMesh == "sphere.50cm.mesh"): - b = self.Scene.createBody(self.BuildMesh, nxogre.SphereShape(sz.x * 0.5), + tempBody = self.Scene.createBody(self.BuildMesh, nxogre.SphereShape(sz.x * 0.5), nxogre.Pose(self.BuildNode.getPosition(), self.BuildNode.getOrientation()), "Density: 100, node-scale:" + str(ogre.Vector3(sz.x,sz.x,sz.x))) elif (self.BuildMesh == "convex1.mesh"): - b = self.Scene.createBody(self.BuildMesh, + tempBody = self.Scene.createBody(self.BuildMesh, nxogre.ConvexShape("convex1.mesh", "mesh-scale:" + str(sz)), nxogre.Pose(self.BuildNode.getPosition(), self.BuildNode.getOrientation()), "Density: 100, node-scale:" + str(ogre.Vector3(sz.x,sz.y,sz.z))) self.BuildNode.setVisible(False) self.BuildNode.detachAllObjects() - b.getEntity().setMaterialName(self.BuildMaterials[self.CurrentBuildMaterial]) + tempBody.getEntity().setMaterialName(self.BuildMaterials[self.CurrentBuildMaterial]) e=BetaGUI.AlphaEffect(self.WidgetEdit, 0.25, 1,0,0) self.Gui.addEffect(e) self.Effects.append(e) self.mBuildMode = self.BuildMode.BM_NONE - + self.objects.append(tempBody) + ##//////////////////////////////////////////////////////////////////////////////// if (b.getPosition().x == 0) : if (c == 1) : Modified: trunk/python-ogre/setup.py =================================================================== --- trunk/python-ogre/setup.py 2007-08-11 05:55:18 UTC (rev 371) +++ trunk/python-ogre/setup.py 2007-08-12 14:34:59 UTC (rev 372) @@ -57,13 +57,15 @@ demofiles = GetFileList ( os.path.join (base, "demos") ) PACKAGEDATA = { - "packages": ['ogre', 'ogre.io', 'ogre.io.OIS', 'ogre.renderer', 'ogre.renderer.OGRE', - 'ogre.gui', 'ogre.gui.CEGUI','ogre.sound', 'ogre.sound.OgreAL', + "packages": ['ogre', + 'ogre.io', 'ogre.io.OIS', + 'ogre.renderer', 'ogre.renderer.OGRE', + 'ogre.gui', 'ogre.gui.CEGUI','ogre.gui.QuickGUI', 'ogre.gui.betagui', + 'ogre.sound', 'ogre.sound.OgreAL', 'ogre.physics', 'ogre.physics.ODE', 'ogre.physics.OgreRefApp', 'ogre.physics.OgreOde', 'ogre.physics.OgreNewt', 'ogre.physics.Opcode', - 'ogre.gui.QuickGUI', 'ogre.renderer.OGREdshow', 'ogre.physics.bullet','ogre.physics.PhysX','ogre.physics.NxOgre', - 'ogre.gui.betagui','ogre.addons','ogre.addons.theora', + 'ogre.addons','ogre.addons.theora', 'ogre.addons.ogrevideoffmpeg', 'ogre.addons.ogredshow'], "package_dir": {'': 'packages_'+ PythonVersionString }, "package_data": {'': ['*.pyd', '*.dll', '*.so']} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2007-08-30 11:46:27
|
Revision: 373 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=373&view=rev Author: andy_miller Date: 2007-08-30 04:46:24 -0700 (Thu, 30 Aug 2007) Log Message: ----------- Update to 1.0 release... Modified Paths: -------------- trunk/python-ogre/ThirdParty/vcredist_x86.exe trunk/python-ogre/code_generators/ogre/hand_made_wrappers.py trunk/python-ogre/demos/nxogre/CakeFramework.py trunk/python-ogre/demos/nxogre/config.yaml Modified: trunk/python-ogre/ThirdParty/vcredist_x86.exe =================================================================== (Binary files differ) Modified: trunk/python-ogre/code_generators/ogre/hand_made_wrappers.py =================================================================== --- trunk/python-ogre/code_generators/ogre/hand_made_wrappers.py 2007-08-12 14:34:59 UTC (rev 372) +++ trunk/python-ogre/code_generators/ogre/hand_made_wrappers.py 2007-08-30 11:46:24 UTC (rev 373) @@ -712,8 +712,8 @@ for cls in map_iterators: iter_as_generator_map( cls ) - rt = mb.class_( 'RenderQueueListener' ) - rt.add_wrapper_code ( WRAPPER_WRAPPER_RenderQueueListener ) +# rt = mb.class_( 'RenderQueueListener' ) +# rt.add_wrapper_code ( WRAPPER_WRAPPER_RenderQueueListener ) # cls = mb.class_('Animation').class_('NodeTrackIterator') # iter_as_generator_map( cls ) Modified: trunk/python-ogre/demos/nxogre/CakeFramework.py =================================================================== --- trunk/python-ogre/demos/nxogre/CakeFramework.py 2007-08-12 14:34:59 UTC (rev 372) +++ trunk/python-ogre/demos/nxogre/CakeFramework.py 2007-08-30 11:46:24 UTC (rev 373) @@ -41,21 +41,24 @@ def decorate(self): pass - def cleanup(self): - pass - - def onFrame(self, deltaTime): - pass + def cleanup(self): + pass + + def onFrame(self, deltaTime): + pass - def preStart(self, World): - pass - + def preStart(self, World): + pass + def getCamera(self ): return self.Camera def getSceneManager(self): return self.SceneMgr + + + ## From: http://www.ogre3d.org/phpBB2/viewtopic.php?p=183438#183438 class HighlightQueueListener ( ogre.RenderQueueListener ): @@ -81,15 +84,16 @@ rendersys.setStencilCheckEnabled(True) rendersys.setStencilBufferParams(ogre.CMPF_NOT_EQUAL,1,0xFFFFFFFF, ogre.SOP_KEEP,ogre.SOP_KEEP,ogre.SOP_KEEP,False) + return skipThisInvocation - def renderQueueEnded(self,queueGroupId, invocation,repeatThisInvocation): if (( queueGroupId == 90 ) or ( queueGroupId == 91 )): rendersys = ogre.Root.getSingleton().getRenderSystem() rendersys.setStencilCheckEnabled(False) - rendersys.setStencilBufferParams() + rendersys.setStencilBufferParams() + return repeatThisInvocation ##///////////////////////////////////////////////////////////////////////////// @@ -322,9 +326,8 @@ self.Root.setRenderSystem(self.RenderSystem) self.RenderSystem.setConfigOption("Full Screen", configuration["fullscreen"]) - ##self.RenderSystem.setConfigOption("VSync", configuration["vsync"]) - self.RenderSystem.setConfigOption("VSync", "Yes") - + self.RenderSystem.setConfigOption("VSync", configuration["vsync"]) + if (configuration["device"] == "Direct3D9 Rendering Subsystem"): self.RenderSystem.setConfigOption("Video Mode", configuration["width"] @@ -1162,9 +1165,9 @@ def start(self): self.World = nxogre.World("log: html") - self.Scene = self.World.createScene("Main", self.SceneMgr, "gravity: yes, floor: yes") + self.Scene = self.World.createScene("Main", self.SceneMgr, "gravity: yes, floor: yes, time-step-method: variable") - self.Scene.createBody("cube.1m.mesh", nxogre.CubeShape(1), ogre.Vector3(0,2.5,0), "mass: 10") + self.Scene.createBody("cube.1m.mesh", nxogre.CubeShape(1), ogre.Vector3(0,5,0), "mass: 10") def stop(self): del self.World @@ -1189,15 +1192,10 @@ import exceptions,sys try: application = Sponge_Cake () - print "PRE" application.pre() - print "START" application.start() - print "GETWORLD" application.WorldInstance = application.getWorld() - print "startRendereing" application.startRendering(application) - print "STOP" application.stop() application.post() Modified: trunk/python-ogre/demos/nxogre/config.yaml =================================================================== --- trunk/python-ogre/demos/nxogre/config.yaml 2007-08-12 14:34:59 UTC (rev 372) +++ trunk/python-ogre/demos/nxogre/config.yaml 2007-08-30 11:46:24 UTC (rev 373) @@ -1,8 +1,8 @@ # Graphics -device:dx9 +device:direct3d9 width:640 height:480 -depth:16 +depth:32 aa:0 vsync:No fullscreen:No This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2007-09-06 10:19:03
|
Revision: 374 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=374&view=rev Author: andy_miller Date: 2007-09-06 03:19:05 -0700 (Thu, 06 Sep 2007) Log Message: ----------- Initial 1.1 development. Added Plib (sound and networking) and Theora (video) modules Mods to handle Quickgui updates Code generation handles 'new module' support in Py++ (remove the already registered errors) Mods for NxOgre SVN 33 support Modified Paths: -------------- trunk/python-ogre/PythonOgreConfig_nt.py trunk/python-ogre/code_generators/betagui/generate_code.py trunk/python-ogre/code_generators/cleanbuild.bat trunk/python-ogre/code_generators/nxogre/customization_data.py trunk/python-ogre/code_generators/nxogre/generate_code.py trunk/python-ogre/code_generators/nxogre/python_nxogre.h trunk/python-ogre/code_generators/nxogre/python_nxogre_aliases.h trunk/python-ogre/code_generators/ogre/generate_code.py trunk/python-ogre/code_generators/ogre/hand_made_wrappers.py trunk/python-ogre/code_generators/ogre/python_ogre_aliases.h trunk/python-ogre/code_generators/ogreal/generate_code.py trunk/python-ogre/code_generators/ogredshow/generate_code.py trunk/python-ogre/code_generators/ogrenewt/generate_code.py trunk/python-ogre/code_generators/ogreode/generate_code.py trunk/python-ogre/code_generators/ogrevideoffmpeg/generate_code.py trunk/python-ogre/code_generators/quickgui/generate_code.py trunk/python-ogre/code_generators/quickgui/python_quickgui_aliases.h trunk/python-ogre/code_generators/quickgui/python_quickgui_sizeof.h trunk/python-ogre/code_generators/theora/generate_code.py trunk/python-ogre/environment.py trunk/python-ogre/setup.py Added Paths: ----------- trunk/python-ogre/code_generators/cleanIncrementalbuild.bat trunk/python-ogre/code_generators/plib/ trunk/python-ogre/code_generators/plib/customization_data.py trunk/python-ogre/code_generators/plib/generate_code.py trunk/python-ogre/code_generators/plib/hand_made_wrappers.py trunk/python-ogre/code_generators/plib/python_plib.h trunk/python-ogre/code_generators/plib/python_plib_aliases.h trunk/python-ogre/code_generators/plib/python_plib_sizeof.h trunk/python-ogre/code_generators/plib/register_exceptions.py trunk/python-ogre/demos/theora/ trunk/python-ogre/demos/theora/SampleFramework.py trunk/python-ogre/demos/theora/demo_video.py trunk/python-ogre/demos/theora/plugins.cfg trunk/python-ogre/demos/theora/resources.cfg Modified: trunk/python-ogre/PythonOgreConfig_nt.py =================================================================== --- trunk/python-ogre/PythonOgreConfig_nt.py 2007-08-30 11:46:24 UTC (rev 373) +++ trunk/python-ogre/PythonOgreConfig_nt.py 2007-09-06 10:19:05 UTC (rev 374) @@ -46,6 +46,8 @@ PATH_ogrevideoffmpeg = os.path.join(root_dir, 'ThirdParty','ffmpeg') PATH_ffmpeg= os.path.join(BASE_DIR, 'ffmpeg') PATH_ogredshow = os.path.join(root_dir, 'ThirdParty','dshow') +PATH_plib = os.path.join(BASE_DIR, 'plib') + # # it's time for the SDK version if SDK: @@ -93,6 +95,7 @@ PATH_LIB_ogrevideoffmpeg = PATH_ogrevideoffmpeg PATH_LIB_ffmpeg= os.path.join(PATH_ffmpeg, 'lib') PATH_LIB_ogredshow = PATH_ogredshow +PATH_LIB_plib = PATH_plib if SDK: PATH_LIB_Ogre_CEGUIRenderer = os.path.join( PATH_Ogre, 'lib') @@ -134,6 +137,7 @@ PATH_INCLUDE_ogrevideoffmpeg = PATH_ogrevideoffmpeg PATH_INCLUDE_ffmpeg = os.path.join (PATH_ffmpeg,'include') PATH_INCLUDE_ogredshow = PATH_ogredshow +PATH_INCLUDE_plib = PATH_plib PATH_INCLUDE_OggVorbisTheora = [ os.path.join(BASE_DIR,'ogg','include') ,os.path.join(BASE_DIR, 'vorbis', 'include') Modified: trunk/python-ogre/code_generators/betagui/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/betagui/generate_code.py 2007-08-30 11:46:24 UTC (rev 373) +++ trunk/python-ogre/code_generators/betagui/generate_code.py 2007-09-06 10:19:05 UTC (rev 374) @@ -387,7 +387,8 @@ ) # NOTE THE CHANGE HERE mb.constructors().allow_implicit_conversion = False - + mb.register_module_dependency ( environment.ogre.generated_dir ) + mb.BOOST_PYTHON_MAX_ARITY = 25 mb.classes().always_expose_using_scope = True Added: trunk/python-ogre/code_generators/cleanIncrementalbuild.bat =================================================================== --- trunk/python-ogre/code_generators/cleanIncrementalbuild.bat (rev 0) +++ trunk/python-ogre/code_generators/cleanIncrementalbuild.bat 2007-09-06 10:19:05 UTC (rev 374) @@ -0,0 +1,59 @@ +rem del /Q cache\* +call vcvars32 +rem cd ogre +rem python generate_code.py >1 +rem cd .. +cd ogreode +python generate_code.py >1 +cd .. +cd ogrenewt +python generate_code.py >1 +cd .. +cd ogreal +python generate_code.py >1 +cd .. +cd ogrerefapp +python generate_code.py >1 +cd .. +cd ode +python generate_code.py >1 +cd .. +cd ois +python generate_code.py >1 +cd .. +cd cegui +python generate_code.py >1 +cd .. +cd quickgui +python generate_code.py >1 +cd .. +cd opcode +python generate_code.py >1 +cd .. +cd physx +python generate_code.py >1 +cd .. +cd nxogre +python generate_code.py >1 +cd .. +cd ogredshow +python generate_code.py >1 +cd .. +cd ogrevideoffmpeg +python generate_code.py >1 +cd .. +cd theora +python generate_code.py >1 +cd .. +cd bullet +python generate_code.py >1 +cd .. +cd betagui +python generate_code.py >1 +cd .. +cd plib +python generate_code.py >1 +cd .. +cd .. +scons -i + Modified: trunk/python-ogre/code_generators/cleanbuild.bat =================================================================== --- trunk/python-ogre/code_generators/cleanbuild.bat 2007-08-30 11:46:24 UTC (rev 373) +++ trunk/python-ogre/code_generators/cleanbuild.bat 2007-09-06 10:19:05 UTC (rev 374) @@ -1,5 +1,5 @@ del /Q cache\* -rmdir /s /q ..\generated +echo rmdir /s /q ..\generated cd ogre python generate_code.py >1 cd .. @@ -24,4 +24,8 @@ cd cegui python generate_code.py >1 cd .. +cd quickgui +python generate_code.py >1 +cd .. + Modified: trunk/python-ogre/code_generators/nxogre/customization_data.py =================================================================== --- trunk/python-ogre/code_generators/nxogre/customization_data.py 2007-08-30 11:46:24 UTC (rev 373) +++ trunk/python-ogre/code_generators/nxogre/customization_data.py 2007-09-06 10:19:05 UTC (rev 374) @@ -1,6 +1,7 @@ def header_files( version ): return [ 'NxOgre.h' + ,'NxOgreSkeleton.h' , 'Ogre.h' ,'OgrePlugin.h' ,'NxPhysics.h' Modified: trunk/python-ogre/code_generators/nxogre/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/nxogre/generate_code.py 2007-08-30 11:46:24 UTC (rev 373) +++ trunk/python-ogre/code_generators/nxogre/generate_code.py 2007-09-06 10:19:05 UTC (rev 374) @@ -56,6 +56,17 @@ if c.decl_string.startswith('::NxOgre::Container<') and '*' not in c.decl_string: print "EXCLUDING: ", c c.exclude() + + ### Now some of the functions need to be excluded.. This is too much and could be cut back + ### ie only some of the containers lists fail at compile time + funlist = ['get','has','next','remove'] + if c.decl_string.startswith('::NxOgre::List<'): + for f in funlist: + try: + c.member_function(f).exclude() + print "EXCLUDING: ", c, f + except: + pass for v in c.variables(allow_empty=True): if v.access_type != 'public' : v.exclude() @@ -64,9 +75,6 @@ if t.decl_string.startswith('::NxOgre::Container<') and '*' not in t.decl_string: t.exclude() print "EXCLUDING: ", t -# print dir ( main_ns ) -# for t in main_ns.variables(): -# print t # things not yet implemented in the C source.. excludes=['::NxOgre::Compartment'] @@ -75,26 +83,25 @@ for e in excludes: if e in m.decl_string: m.exclude() -# for c in main_ns.constructors(): -# print c - # problem with a constructor on Shape - main_ns.class_('::NxOgre::Shape').constructor(arg_types=['::NxOgre::ShapeParams']).exclude() - # And coth.. + # problem with a constructor on Cloth main_ns.class_('::NxOgre::Cloth').constructor(arg_types=[None,'::NxClothDesc','::NxMeshData',None,None]).exclude() - - ### Member Functions +# # # +# # # ### Member Functions excludes=[ '::NxOgre::Container<std::string, NxOgre::FluidDrain*>::begin' ,'::NxOgre::Container<std::string, NxOgre::FluidDrain*>::get' ,'::NxOgre::Container<std::string, NxOgre::FluidDrain*>::getFirst' ,'::NxOgre::Container<std::string, NxOgre::FluidDrain*>::next' ,'::NxOgre::Container<std::string, NxOgre::FluidEmitter*>::getFirst' + ,'::NxOgre::List<NxOgre::RemoteDebuggerConnection::Camera>::destroyAndEraseAll' + ,'::NxOgre::List<NxOgre::RemoteDebuggerConnection::Camera>::dumpToConsole' + ,'::NxOgre::UserAllocator::realloc' - ,'::NxOgre::Serialiser::NXU_notifySaveActor' # takes a * * argument - # not yet implemented in source +# # # # not yet implemented in source ,'::NxOgre::WheelSet::attachNewWheel' ,'::NxOgre::WheelSet::createThreeWheelSet' + ,'::NxOgre::WheelSet::createSixWheelSet' ,'::NxOgre::Wheel::addEntity' ,'::NxOgre::Cloth::duplicate' ,'::NxOgre::ClothRayCaster::getClosestCloth' @@ -126,14 +133,9 @@ ,'::NxOgre::Scene::createSphericalJoint' ,'::NxOgre::Scene::createPrismaticJoint' ,'::NxOgre::Scene::createFixedJoint' - ,'::NxOgre::Serialiser::saveScene' - ,'::NxOgre::Serialiser::restoreScene' + ,'::NxOgre::Scene::save' ,'::NxOgre::SoftBody::simulate' ,'::NxOgre::SoftBody::render' - ,'::NxOgre::WheelSet::createSixWheelSet' - ,'::NxOgre::Summary::has' - ,'::NxOgre::ActorBlueprint::setDynamicCollisionModel' - ,'::NxOgre::ActorBlueprint::setCollisionModel' ,'::NxOgre::PhysXDriver::stop' ,'::NxOgre::PhysXDriver::start' ,'::NxOgre::PhysXDriver::reset' @@ -144,36 +146,32 @@ main_ns.member_functions(e).exclude() ### Free Functions - excludes = ['::NxOgre::NxCookTriMeshToDisk' - ,'::NxOgre::NxCookConvexToDisk' - ,'::NxOgre::simulateWorldGeometry'] + excludes = [] for e in excludes: main_ns.free_functions(e).exclude() ## Classes excludes = ['::NxOgre::BaseCharacterHitReport' ,'::NxOgre::CharacterHitReport' + ,'::NxOgre::Blueprints::ActorBlueprint' + ,'::NxOgre::Blueprints::ActorFactory' + ,'::NxOgre::Blueprints::WorldBlueprint' + ,'::NxOgre::Serialiser::SerialiserBase' + ,'::NxOgre::UserAllocator' + ,'::NxOgre::State' + # not yet implemented in source ] for e in excludes: main_ns.class_(e).exclude() - - +# # # +# # # ## I have a challenge that Py++ doesn't recognise these classes by full name (perhaps because they are structs?) ## so I have to look through and match on a class by class basis excludeName = ['Container<NxOgre::Scene::Renderables, float>' ,'List<NxOgre::CharacterHitReport*>' - ,'Container<std::string, NxOgre::RayCastHit>' ,'List<NxOgre::RemoteDebuggerConnection::Camera>' - ,'List<NxOgre::Wheel*>' - ,'NxCookTriMeshToDisk' - ,'NxCookConvexToDisk' - ,'simulateWorldGeometry' - ,'UserAllocator' - ,'ClothVertex' -# ,'Cloth' - ##,'PhysXDriver' - ,'State' + ,'List<NxOgre::Blueprints::ActorBlueprint*>' ] for c in main_ns.classes(): # print c.decl_string @@ -210,7 +208,7 @@ if 'NxVec3' in a.type.decl_string or 'NxQuat' in a.type.decl_string: c.exclude() break - +# # # ############################################################ ## @@ -604,7 +602,10 @@ ) # NOTE THE CHANGE HERE mb.constructors().allow_implicit_conversion = False - + ## This module depends on Ogre and physx + mb.register_module_dependency ( environment.ogre.generated_dir ) + mb.register_module_dependency ( environment.physx.generated_dir ) + mb.BOOST_PYTHON_MAX_ARITY = 25 mb.classes().always_expose_using_scope = True Modified: trunk/python-ogre/code_generators/nxogre/python_nxogre.h =================================================================== --- trunk/python-ogre/code_generators/nxogre/python_nxogre.h 2007-08-30 11:46:24 UTC (rev 373) +++ trunk/python-ogre/code_generators/nxogre/python_nxogre.h 2007-09-06 10:19:05 UTC (rev 374) @@ -1,5 +1,6 @@ #include "NxOgre.h" +#include "NXOgreSkeleton.h" //missing ?? #include "Ogre.h" #include "OgrePlugin.h" #include <NxPhysics.h> Modified: trunk/python-ogre/code_generators/nxogre/python_nxogre_aliases.h =================================================================== --- trunk/python-ogre/code_generators/nxogre/python_nxogre_aliases.h 2007-08-30 11:46:24 UTC (rev 373) +++ trunk/python-ogre/code_generators/nxogre/python_nxogre_aliases.h 2007-09-06 10:19:05 UTC (rev 374) @@ -7,7 +7,23 @@ typedef std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> >,std::basic_string<char, std::char_traits<char>, std::allocator<char> > >\ PairString; - +typedef NxOgre::List<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > ListString; +typedef NxOgre::List<NxOgre::Blueprints::ActorBlueprint*> ListBlueprints; +typedef NxOgre::Container<unsigned, NxOgre::ShapeBlueprint const&> ContainerShapeBlueprint; +typedef NxOgre::Container<std::string, NxOgre::ActorBlueprint> ContainerActorBlueprint; +//typedef NxOgre::Container<NxOgre::Scene::Renderables, float> ContainerSceneRencerables; +typedef std::map<std::basic_string<char, std::char_traits<char>, std::allocator<char> >,float,std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >,std::allocator<std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char> >, float> > >\ + MapStrings; +typedef std::map<unsigned, float, std::less<unsigned>, std::allocator<std::pair<unsigned const, float> > >\ + MapUnsignedFloat; +typedef std::vector<NxOgre::Scene*, std::allocator<NxOgre::Scene*> > VectorScene; +typedef std::list<NxOgre::Blueprints::ActorBlueprint*, std::allocator<NxOgre::Blueprints::ActorBlueprint*> > ListBlueprintsActorBlueprint; +typedef std::list<std::pair<std::string, std::string>, std::allocator<std::pair<std::string, std::string> > >\ + ListPairString; +typedef std::map<std::string, NxOgre::Container<std::string, NxOgre::DominanceGroup*>::Containee, std::less<std::string>, std::allocator<std::pair<std::string const, NxOgre::Container<std::string, NxOgre::DominanceGroup*>::Containee> > >\ + MapContainerDominanceGroup; + + typedef std::map<std::string, NxOgre::Container<std::string, NxOgre::Scene*>::Containee, std::less<std::string> >\ MapContainerScene; typedef std::list<NxOgre::CharacterHitReport*, std::allocator<NxOgre::CharacterHitReport*> > ListCharacterHitReportPtr; @@ -41,7 +57,7 @@ MapContainerTrigger; typedef std::list<NxOgre::RemoteDebuggerConnection::Camera, std::allocator<NxOgre::RemoteDebuggerConnection::Camera> >\ ListRemoteDebuggerConnectionCamera; -typedef std::vector<NxOgre::Summary::Feature> VectorSummaryFeature; +// typedef std::vector<NxOgre::Summary::Feature> VectorSummaryFeature; typedef std::map<unsigned, NxOgre::Container<unsigned, NxOgre::Shape*>::Containee, std::less<unsigned> >\ MapContainerUnsignedShape; typedef std::map<unsigned, NxOgre::Container<unsigned, NxOgre::ErrorReporter*>::Containee, std::less<unsigned> >\ Modified: trunk/python-ogre/code_generators/ogre/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/ogre/generate_code.py 2007-08-30 11:46:24 UTC (rev 373) +++ trunk/python-ogre/code_generators/ogre/generate_code.py 2007-09-06 10:19:05 UTC (rev 374) @@ -543,7 +543,15 @@ }; } """ - +# c = ns.class_( 'PixelBox' ) +# c.add_declaration_code( pixelBox_size ) +# for f in c.mem_funs( 'getData' ): +# f.call_policies = call_policies.return_range( f, 'ImageSize' ) +# f.documentation = "Python-Ogre Modified Return Range \\n" +# if f.has_const: +# f.alias = 'getReadOnlyData' + + image_size = """ namespace{ struct ImageSize{ @@ -916,10 +924,21 @@ """ we modify functions that take void *'s in their argument list to instead take unsigned ints, which allows us to use CTypes buffers """ +# for fun in mb.class_('PixelUtil').member_functions('unpackColour') : +# print "Function:", fun +# for arg in fun.arguments: +# print arg +# print arg.type +# print "Const", declarations.is_const(arg.type) +# print "pointer", declarations.is_pointer(arg.type) +# print "Void", declarations.is_void(arg.type) +# print arg.type.decl_string +# sys.exit() + for fun in mb.member_functions(): arg_position = 0 for arg in fun.arguments: - if declarations.type_traits.is_void_pointer(arg.type): + if arg.type.decl_string == 'void const *' or arg.type.decl_string == 'void *': fun.add_transformation( ft.modify_type(arg_position,_ReturnUnsignedInt ), alias=fun.name ) fun.documentation = docit ("Modified Input Argument to work with CTypes", "Argument "+arg.name+ "(pos:" + str(arg_position)\ Modified: trunk/python-ogre/code_generators/ogre/hand_made_wrappers.py =================================================================== --- trunk/python-ogre/code_generators/ogre/hand_made_wrappers.py 2007-08-30 11:46:24 UTC (rev 373) +++ trunk/python-ogre/code_generators/ogre/hand_made_wrappers.py 2007-09-06 10:19:05 UTC (rev 374) @@ -2,7 +2,23 @@ import environment +WRAPPER_DEFINITION_PixelBox =\ +""" +// return the data buffer - can't be handled 'normally' by Py++ +void * PixelBox_data ( ::Ogre::PixelBox & me ) +{ + return me.data; +} +""" +WRAPPER_REGISTRATION_PixelBox = [ + """def( "getData", &::PixelBox_data,\\ + "Python-Ogre Helper Function: Returns the data buffer.\\n\\ + Input: \\n\\ + Output: A void pointer to the data buffer",\\ + bp::return_value_policy< bp::return_opaque_pointer >());""" + ] + WRAPPER_WRAPPER_RenderQueueListener =\ """ virtual void renderQueueEnded( ::Ogre::uint8 queueGroupId, ::Ogre::String const & invocation, bool & repeatThisInvocation ){ @@ -22,32 +38,6 @@ """ -# WRAPPER_DEFINITION_ShadowRenderable =\ -# """ -# Ogre::ShadowRenderable * ShadowRenderable_castElement(Ogre::ShadowRenderable * r){ -# if( dynamic_cast< Ogre::Region::RegionShadowRenderable * >( r ) ){ -# return (Ogre::Region::RegionShadowRenderable*) r ; -# } -# if( dynamic_cast< Ogre::ManualObject::ManualObjectSectionShadowRenderable * >( r ) ){ -# return (Ogre::ManualObject::ManualObjectSectionShadowRenderable*) r ; -# } -# if( dynamic_cast< Ogre::Entity::EntityShadowRenderable * >( r ) ){ -# return (Ogre::Entity::EntityShadowRenderable*) r ; -# } -# return ( r ); -# } -# -# Ogre::ShadowRenderable* ShadowRenderable_getLightCapRenderable( Ogre::ShadowRenderable & me){ -# return ShadowRenderable_castElement ( me.getLightCapRenderable() ); -# } -# """ -WRAPPER_REGISTRATION_ShadowRenderable = [ - 'def( "getLightCapRenderable", &::ShadowRenderable_getLightCapRenderable,\ - "Python-Ogre Hand Wrapped\\n",\ - bp::return_value_policy< bp::reference_existing_object, bp::default_call_policies >());', - - ] - WRAPPER_DEFINITION_OverlayElement = \ """ @@ -677,6 +667,10 @@ rt.add_declaration_code( WRAPPER_DEFINITION_Node ) apply_reg (rt, WRAPPER_REGISTRATION_Node ) + rt = mb.class_( 'PixelBox' ) + rt.add_declaration_code( WRAPPER_DEFINITION_PixelBox ) + apply_reg (rt, WRAPPER_REGISTRATION_PixelBox ) + # rt = mb.class_( 'ShadowRenderable' ) # rt.add_declaration_code( WRAPPER_DEFINITION_ShadowRenderable ) # apply_reg (rt, WRAPPER_REGISTRATION_ShadowRenderable ) @@ -712,8 +706,8 @@ for cls in map_iterators: iter_as_generator_map( cls ) -# rt = mb.class_( 'RenderQueueListener' ) -# rt.add_wrapper_code ( WRAPPER_WRAPPER_RenderQueueListener ) + rt = mb.class_( 'RenderQueueListener' ) + rt.add_wrapper_code ( WRAPPER_WRAPPER_RenderQueueListener ) # cls = mb.class_('Animation').class_('NodeTrackIterator') # iter_as_generator_map( cls ) Modified: trunk/python-ogre/code_generators/ogre/python_ogre_aliases.h =================================================================== --- trunk/python-ogre/code_generators/ogre/python_ogre_aliases.h 2007-08-30 11:46:24 UTC (rev 373) +++ trunk/python-ogre/code_generators/ogre/python_ogre_aliases.h 2007-09-06 10:19:05 UTC (rev 374) @@ -299,7 +299,7 @@ typedef Ogre::Pose::VertexOffsetMap VertexOffsetMap; typedef Ogre::Pose::VertexOffsetIterator VertexOffsetIterator; typedef Ogre::Pose::ConstVertexOffsetIterator ConstVertexOffsetIterator; -typedef Ogre::PlaneBoundedVolume::PlaneList PlaneList; +typedef Ogre::PlaneBoundedVolume::PlaneList PlaneListBoundedVolume; typedef Ogre::Pass::PassSet PassSet; typedef Ogre::Pass::TextureUnitStateIterator TextureUnitStateIterator; typedef Ogre::Pass::ConstTextureUnitStateIterator ConstTextureUnitStateIterator; Modified: trunk/python-ogre/code_generators/ogreal/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/ogreal/generate_code.py 2007-08-30 11:46:24 UTC (rev 373) +++ trunk/python-ogre/code_generators/ogreal/generate_code.py 2007-09-06 10:19:05 UTC (rev 374) @@ -174,6 +174,8 @@ , indexing_suite_version=2 ) # + mb.register_module_dependency ( environment.ogre.generated_dir ) + # We filter (both include and exclude) specific classes and functions that we want to wrap # filter_declarations (mb) Modified: trunk/python-ogre/code_generators/ogredshow/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/ogredshow/generate_code.py 2007-08-30 11:46:24 UTC (rev 373) +++ trunk/python-ogre/code_generators/ogredshow/generate_code.py 2007-09-06 10:19:05 UTC (rev 374) @@ -462,7 +462,8 @@ ) # NOTE THE CHANGE HERE mb.constructors().allow_implicit_conversion = False - + mb.register_module_dependency ( environment.ogre.generated_dir ) + mb.BOOST_PYTHON_MAX_ARITY = 25 mb.classes().always_expose_using_scope = True Modified: trunk/python-ogre/code_generators/ogrenewt/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/ogrenewt/generate_code.py 2007-08-30 11:46:24 UTC (rev 373) +++ trunk/python-ogre/code_generators/ogrenewt/generate_code.py 2007-09-06 10:19:05 UTC (rev 374) @@ -212,6 +212,8 @@ 'OIS_NONCLIENT_BUILD', 'OIS_STATIC_BUILD'] , indexing_suite_version=2 ) + ## This module depends on Ogre + mb.register_module_dependency ( environment.ogre.generated_dir ) filter_declarations (mb) # # fix shared Ptr's that are defined as references but NOT const... Modified: trunk/python-ogre/code_generators/ogreode/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/ogreode/generate_code.py 2007-08-30 11:46:24 UTC (rev 373) +++ trunk/python-ogre/code_generators/ogreode/generate_code.py 2007-09-06 10:19:05 UTC (rev 374) @@ -37,7 +37,8 @@ def filter_declarations( mb ): global_ns = mb.global_ns global_ns.exclude() - + + global_ns.namespace("std").class_('list<Ogre::Plane, std::allocator<Ogre::Plane> >').exclude() if not environment.ogre.version.startswith("1.2") and os.name =='nt': mb.global_ns.class_( 'vector<Ogre::Vector4, std::allocator<Ogre::Vector4> >' ).exclude( ) @@ -112,9 +113,11 @@ global_ns.namespace( 'Ogre' ).class_('SceneManager').include(already_exposed=True) global_ns.namespace( 'Ogre' ).class_('Matrix4').include(already_exposed=True) global_ns.namespace( 'Ogre' ).class_('Plugin').include(already_exposed=True) -# print "\nCLASSES::: Std" -# for c in global_ns.namespace('std').classes(): -# print c.name, c + print "\nCLASSES::: Std" + for c in global_ns.namespace('std').classes(): + print c.name, c + global_ns.namespace("std").class_('list<Ogre::Plane, std::allocator<Ogre::Plane> >').exclude() + # print "\nCLASSES::: Ode" # for c in global_ns.namespace('OgreOde').classes(): # print c.name, c @@ -180,7 +183,9 @@ , include_paths=environment.ogreode.include_dirs , define_symbols= defined_symbols , indexing_suite_version=2 ) - + + ## This module depends on Ogre + mb.register_module_dependency ( environment.ogre.generated_dir ) filter_declarations (mb) ## we need to handle "ode" return values etc @@ -255,7 +260,7 @@ huge_classes = map( mb.class_, customization_data.huge_classes(environment.ogreode.version) ) print "ABOUT TO SPLIT" - mb.split_module(environment.ogreode.generated_dir, huge_classes) + mb.split_module(environment.ogreode.generated_dir, huge_classes, use_files_sum_repository=False ) if __name__ == '__main__': start_time = time.clock() Modified: trunk/python-ogre/code_generators/ogrevideoffmpeg/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/ogrevideoffmpeg/generate_code.py 2007-08-30 11:46:24 UTC (rev 373) +++ trunk/python-ogre/code_generators/ogrevideoffmpeg/generate_code.py 2007-09-06 10:19:05 UTC (rev 374) @@ -361,7 +361,8 @@ ) # NOTE THE CHANGE HERE mb.constructors().allow_implicit_conversion = False - + mb.register_module_dependency ( environment.ogre.generated_dir ) + mb.BOOST_PYTHON_MAX_ARITY = 25 mb.classes().always_expose_using_scope = True Added: trunk/python-ogre/code_generators/plib/customization_data.py =================================================================== --- trunk/python-ogre/code_generators/plib/customization_data.py (rev 0) +++ trunk/python-ogre/code_generators/plib/customization_data.py 2007-09-06 10:19:05 UTC (rev 374) @@ -0,0 +1,11 @@ + +def header_files( version ): + return [ 'ul.h' + ,'sl.h' + , 'sm.h' + , 'net.h' + ] + +def huge_classes( version ): + return [] + \ No newline at end of file Added: trunk/python-ogre/code_generators/plib/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/plib/generate_code.py (rev 0) +++ trunk/python-ogre/code_generators/plib/generate_code.py 2007-09-06 10:19:05 UTC (rev 374) @@ -0,0 +1,563 @@ +#!/usr/bin/env python +# ----------------------------------------------------------------------------- +# This source file is part of Python-Ogre and is covered by the LGPL +# For the latest info, see http://python-ogre.org/ +# +# ----------------------------------------------------------------------------- + + +import os, sys, time, shutil + +#add environment to the path +sys.path.append( os.path.join( '..', '..' ) ) +#add common utils to the pass +sys.path.append( '..' ) +sys.path.append( '.' ) + +import environment +import common_utils +import customization_data +import hand_made_wrappers +import register_exceptions + +from pygccxml import parser +from pygccxml import declarations +from pyplusplus import messages +from pyplusplus import module_builder +from pyplusplus import decl_wrappers + +from pyplusplus import function_transformers as ft +from pyplusplus.module_builder import call_policies +from pyplusplus.module_creator import sort_algorithms + +import common_utils.extract_documentation as exdoc +import common_utils.var_checker as varchecker +import common_utils.ogre_properties as ogre_properties + +MAIN_NAMESPACE = '' + +## small helper function +def docit ( general, i, o ): + docs = "Python-Ogre Modified Function Call\\n" + general +"\\n" + docs = docs + "Input: " + i + "\\n" + docs = docs + "Output: " + o + "\\n\\\n" + return docs + +############################################################ +## +## Here is where we manually exclude stuff +## +############################################################ + +def ManualExclude ( mb ): + global_ns = mb.global_ns + main_ns = global_ns + + # things not yet implemented in the C source.. + excludes=[] + for c in main_ns.classes(): + for m in c.member_functions(allow_empty=True): + for e in excludes: + if e in m.decl_string: + m.exclude() + + ### Member Functions + excludes=[ #'::slScheduler::waveOutClose' +# ,'::slScheduler::waveOutWrite' +# ,'::slScheduler::waveOutReset' +# ,'::slScheduler::waveOutGetPosition' +# ,'::slScheduler::waveOutPrepareHeader' + '::netMessage::print' # strange / ugly defination + ,'::slSample::getBuffer' # returns char pointer -- needs wrapping + ,'::slSample::getComment' # same.. + # have callbacks and need to be hand wrapped + ,'::slScheduler::loopSample' + ,'::slScheduler::loopMusic' + ,'::slScheduler::playSample' + ,'::slScheduler::playMusic' + # handwrapped to handle python lists instead of c buffers + ,'::netSocket::send' + ,'::netSocket::sendto' + ,'::netSocket::recv' + ,'::netSocket::recvfrom' + ,'::netBuffer::getData' ## returns a char pointer to the data which needs wrapping + ,'::netChannel::send' + ,'::netChannel::recv' + ,'::netMonitorServer::setCommandFunc' ## needs to handle callbacks + + ] + for e in excludes: + print "excluding ", e + main_ns.member_functions(e).exclude() + + ### Free Functions + excludes = [] + for e in excludes: + main_ns.free_functions(e).exclude() + + ## Classes + excludes = [] + for e in excludes: + main_ns.class_(e).exclude() + + + ## I have a challenge that Py++ doesn't recognise these classes by full name (perhaps because they are structs?) + ## so I have to look through and match on a class by class basis + excludeName = [] + for c in main_ns.classes(): + if c.name in excludeName: + c.exclude() + + ### Variables + excludes = [] + for e in excludes: + main_ns.variable(e).exclude() + + ### Typedefs + excludes = [] + for e in excludes: + main_ns.typedefs(e).exclude() + + ### Operators + excludes=[] + for e in excludes: + main_ns.operators(e).exclude() + +# ### Constructors +# for c in main_ns.class_('::plib::Pose').constructors(): ## these hide the working constructors +# for a in c.arguments: +# if 'NxVec3' in a.type.decl_string or 'NxQuat' in a.type.decl_string: +# c.exclude() +# break + + +############################################################ +## +## And there are things that manually need to be INCLUDED +## +############################################################ + +def ManualInclude ( mb ): + global_ns = mb.global_ns + main_ns = global_ns + + includes=['netInit'] + ### Free Functions + for e in includes: + main_ns.free_functions(e).include() + +############################################################ +## +## And things that need manual fixes, but not necessarly hand wrapped +## +############################################################ +def ManualFixes ( mb ): + + global_ns = mb.global_ns + + +############################################################ +## +## And things that need to have their argument and call values fixed. +## ie functions that pass pointers in the argument list and of course we need +## to read the updated values - so instead we pass them back +## as new values in a tuple (ETC ETC) +## +############################################################ + +def ManualTransformations ( mb ): + def _ReturnUnsignedInt( type_ ): + """helper to return an UnsignedInt call for tranformation functions + """ + return declarations.cpptypes.unsigned_int_t() + + global_ns = mb.global_ns + main_ns = global_ns + + def create_output( size ): + return [ ft.output( i ) for i in range( size ) ] + + ## hack to get things working -- needs to be wrapped to handle a python call back + change = ['loopSample', 'loopMusic','playSample','playMusic'] + for fun in change: + f = global_ns.class_('::slScheduler').mem_fun(fun) + f.add_transformation( ft.modify_type('cb',_ReturnUnsignedInt ), alias=fun ) + print "Changed ", f + +############################################################################### +## +## Now for the AUTOMATIC stuff that should just work +## +############################################################################### + + +def AutoExclude( mb ): + """ Automaticaly exclude a range of things that don't convert well from C++ to Python + """ + global_ns = mb.global_ns + main_ns = global_ns + + # vars that are static consts but have their values set in the header file are bad + Remove_Static_Consts ( main_ns ) + + ## Exclude protected and private that are not pure virtual + query = ~declarations.access_type_matcher_t( 'public' ) \ + & ~declarations.virtuality_type_matcher_t( declarations.VIRTUALITY_TYPES.PURE_VIRTUAL ) + non_public_non_pure_virtual = main_ns.calldefs( query ) + non_public_non_pure_virtual.exclude() + + #Virtual functions that return reference could not be overriden from Python + query = declarations.virtuality_type_matcher_t( declarations.VIRTUALITY_TYPES.VIRTUAL ) \ + & declarations.custom_matcher_t( lambda decl: declarations.is_reference( decl.return_type ) ) + try: + main_ns.calldefs( query ).virtuality = declarations.VIRTUALITY_TYPES.NOT_VIRTUAL + except: + pass + +def AutoInclude( mb ): + main_ns = mb.global_ns ## doesn't have it's own namespace.. + validPrefix= ['sl','sm','net','ul'] + + for cls in main_ns.classes(): + for p in validPrefix: + if cls.name.startswith ( p ) and cls.name[len(p)].isupper(): + print "Including class: ", cls.name + cls.include() + + for cls in main_ns.enums(): + for p in validPrefix: + if cls.name.startswith ( p ) and cls.name[len(p)].isupper(): + print "Including enum: ", cls.name + cls.include() + + for cls in main_ns.free_functions(): + print "Free Function:", cls + for p in validPrefix: + if cls.name.startswith ( p ) and cls.name[len(p)].isupper(): + print "Including free function: ", cls.name + cls.include() + + +def AutoFixes ( mb ): + """ now we fix a range of things automatically - typically by going through + the entire name space trying to guess stuff and fix it:) + """ + global_ns = mb.global_ns + main_ns = global_ns + + # arguments passed as refs but not const are not liked by boost + #Fix_Ref_Not_Const ( main_ns ) + + # Functions that have void pointers in their argument list need to change to unsigned int's + Fix_Void_Ptr_Args ( main_ns ) + + # and change functions that return a variety of pointers to instead return unsigned int's + Fix_Pointer_Returns ( main_ns ) + + # functions that need to have implicit conversions turned off + Fix_Implicit_Conversions ( main_ns) + + if os.name =='nt': + Fix_NT( mb ) + elif os.name =='posix': + Fix_Posix( mb ) + + +############################################################################### +## +## here are the helper functions that do much of the work +## +############################################################################### +def Fix_Posix ( mb ): + """ fixup for posix specific stuff -- note only expect to be called on a posix machine + """ + ## we could do more here if need be... + if sys.platform == 'darwin': + pass + elif sys.platform.startswith ('linux'): + pass + + +def Fix_NT ( mb ): + """ fixup for NT systems + """ + + +def Fix_Implicit_Conversions ( mb ): + """By default we disable explicit conversion, however sometimes it makes sense + """ + pass + +def Add_Auto_Conversions( mb ): + pass + + +def Set_Call_Policies( mb ): + """ set the return call policies on classes that this hasn't already been done for. + Set the default policy to deal with pointer/reference return types to reference_existing object + """ + mem_funs = mb.calldefs () + mem_funs.create_with_signature = True #Generated code will not compile on + #MSVC 7.1 if function has throw modifier. + for mem_fun in mem_funs: + if mem_fun.call_policies: + continue + if not mem_fun.call_policies and \ + (declarations.is_reference (mem_fun.return_type) or declarations.is_pointer (mem_fun.return_type) ): + mem_fun.call_policies = call_policies.return_value_policy( + call_policies.reference_existing_object ) + + +def Set_Exception(mb): + pass + #~ """We don't exclude Exception, because it contains functionality, that could + #~ be useful to user. But, we will provide automatic exception translator + #~ """ + #~ Exception = mb.namespace( 'Ogre' ).class_( 'Exception' ) + #~ Exception.include() + #~ Exception.mem_fun('what').exclude() # declared with empty throw + #~ Exception.mem_fun('getNumber').exclude() # declared with empty throw + #~ Exception.translate_exception_to_string( 'PyExc_RuntimeError', 'exc.getFullDescription().c_str()' ) + + +def _ReturnUnsignedInt( type_ ): + """helper to return an UnsignedInt call for tranformation functions + """ + return declarations.cpptypes.unsigned_int_t() + +def Fix_Void_Ptr_Args ( mb ): + """ we modify functions that take void *'s in their argument list to instead take + unsigned ints, which allows us to use CTypes buffers + """ + for fun in mb.member_functions(): + arg_position = 0 + for arg in fun.arguments: + if declarations.type_traits.is_void_pointer(arg.type) or arg.type.decl_string == "void const *": + fun.add_transformation( ft.modify_type(arg_position,_ReturnUnsignedInt ), alias=fun.name ) + fun.documentation = docit ("Modified Input Argument to work with CTypes", + "Argument "+arg.name+ "(pos:" + str(arg_position)\ + +") takes a CTypes.adddressof(xx)", "...") + print "Fixed Void Ptr", fun, arg_position + break + arg_position +=1 + + ## lets go and look for stuff that might be a problem + pointee_types=['unsigned int',' int ', ' float ', ' Real ', 'uchar', 'uint8', + 'unsigned char'] + + function_names=[] + for fun in mb.member_functions(): + if fun.documentation or fun.ignore: continue ## means it's been tweaked somewhere else + for n in function_names: + if n in fun.name: + print "CHECK :", fun + break + arg_position = 0 + for arg in fun.arguments: + if declarations.is_pointer(arg.type): ## and "const" not in arg.type.decl_string: + for i in pointee_types: + if i in arg.type.decl_string: + print '"',arg.type.decl_string, '"' + print "CHECK ", fun, str(arg_position) + fun.documentation=docit("SUSPECT - MAYBE BROKEN", "....", "...") + break + arg_position +=1 + +## NEED To do the same for constructors + for fun in mb.constructors(): + arg_position = 0 + for arg in fun.arguments: + if declarations.is_pointer(arg.type): ## and "const" not in arg.type.decl_string: + for i in pointee_types: + if i in arg.type.decl_string: + print '"',arg.type.decl_string, '"' + print "Excluding: ", fun + fun.exclude() + break + arg_position +=1 + +def Fix_Pointer_Returns ( mb ): + """ Change out functions that return a variety of pointer to base types and instead + have them return the address the pointer is pointing to (the pointer value) + This allow us to use CTypes to handle in memory buffers from Python + + Also - if documentation has been set then ignore the class/function as it means it's been tweaked else where + """ + pointee_types=['unsigned int','int', 'float', 'unsigned char'] + known_names=[] # these are function names we know it's cool to exclude + for fun in mb.member_functions(): + if declarations.is_pointer (fun.return_type) and not fun.documentation: + for i in pointee_types: + if fun.return_type.decl_string.startswith ( i ) and not fun.documentation: + if not fun.name in known_names: + print "Excluding (function):", fun, "as it returns (pointer)", i + fun.exclude() + for fun in mb.member_operators(allow_empty=True): + if declarations.is_pointer (fun.return_type) and not fun.documentation: + for i in pointee_types: + if fun.return_type.decl_string.startswith ( i ) and not fun.documentation: + print "Excluding (operator):", fun + fun.exclude() + + + +def query_containers_with_ptrs(decl): + if not isinstance( decl, declarations.class_types ): + return False + if not decl.indexing_suite: + return False + return declarations.is_pointer( decl.indexing_suite.element_type ) + + +def Remove_Static_Consts ( mb ): + """ linux users have compile problems with vars that are static consts AND have values set in the .h files + we can simply leave these out """ + checker = varchecker.var_checker() + for var in mb.vars(): + if type(var.type) == declarations.cpptypes.const_t: + if checker( var ): + print "Excluding static const ", var + var.exclude() + +# +# the 'main'function +# +def generate_code(): +# messages.disable( +# # Warnings 1020 - 1031 are all about why Py++ generates wrapper for class X +# messages.W1020 +# , messages.W1021 +# , messages.W1022 +# , messages.W1023 +# , messages.W1024 +# , messages.W1025 +# , messages.W1026 +# , messages.W1027 +# , messages.W1028 +# , messages.W1029 +# , messages.W1030 +# , messages.W1031 +# , messages.W1035 +# , messages.W1040 +# , messages.W1038 +# , messages.W1039 +# , messages.W1041 +# , messages.W1036 # pointer to Python immutable member +# , messages.W1033 # unnamed variables +# , messages.W1018 # expose unnamed classes +# , messages.W1049 # returns reference to local variable +# , messages.W1014 # unsupported '=' operator +# ) + # + # Use GCCXML to create the controlling XML file. + # If the cache file (../cache/*.xml) doesn't exist it gets created, otherwise it just gets loaded + # NOTE: If you update the source library code you need to manually delete the cache .XML file + # + xml_cached_fc = parser.create_cached_source_fc( + os.path.join( environment.plib.root_dir, "python_plib.h" ) + , environment.plib.cache_file ) + + defined_symbols = [ ] + if environment._USE_THREADS: + defined_symbols.append('BOOST_HAS_THREADS') + defined_symbols.append('BOOST_HAS_WINTHREADS') + defined_symbols.append( 'VERSION_' + environment.plib.version ) + + undefined_symbols = [] + # + # build the core Py++ system from the GCCXML created source + # + mb = module_builder.module_builder_t( [ xml_cached_fc ] + , gccxml_path=environment.gccxml_bin + , working_directory=environment.root_dir + , include_paths=environment.plib.include_dirs + , define_symbols=defined_symbols + , indexing_suite_version=2 + , cflags=environment.ogre.cflags + ) + # NOTE THE CHANGE HERE + mb.constructors().allow_implicit_conversion = False + + mb.BOOST_PYTHON_MAX_ARITY = 25 + mb.classes().always_expose_using_scope = True + + # + # We filter (both include and exclude) specific classes and functions that we want to wrap + # + global_ns = mb.global_ns + global_ns.exclude() + main_ns = global_ns +# # main_ns.include() + + + AutoInclude ( mb ) + AutoExclude ( mb ) + ManualExclude ( mb ) + ManualInclude ( mb ) + # here we fixup functions that expect to modifiy their 'passed' variables + ManualTransformations ( mb ) + + AutoFixes ( mb ) + ManualFixes ( mb ) + + # + # We need to tell boost how to handle calling (and returning from) certain functions + # + Set_Call_Policies ( mb.global_ns ) + + # + # the manual stuff all done here !!! + # + hand_made_wrappers.apply( mb ) + + NoPropClasses = [""] + for cls in main_ns.classes(): + if cls.name not in NoPropClasses: + cls.add_properties( recognizer=ogre_properties.ogre_property_recognizer_t() ) + + common_utils.add_constants( mb, { 'PROJECT_version' : '"%s"' % environment.plib.version.replace("\n", "\\\n") + , 'python_version' : '"%s"' % sys.version.replace("\n", "\\\n" ) } ) + + ## need to create a welcome doc string for this... + common_utils.add_constants( mb, { '__doc__' : '"plib PROJECT DESCRIPTION"' } ) + + + ########################################################################################## + # + # Creating the code. After this step you should not modify/customize declarations. + # + ########################################################################################## + extractor = exdoc.doc_extractor("") # I'm excluding the UTFstring docs as lots about nothing + mb.build_code_creator (module_name='_plib_' , doc_extractor= extractor ) + + for inc in environment.plib.include_dirs: + mb.code_creator.user_defined_directories.append(inc ) + mb.code_creator.user_defined_directories.append( environment.plib.generated_dir ) + mb.code_creator.replace_included_headers( customization_data.header_files( environment.plib.version ) ) + + huge_classes = map( mb.class_, customization_data.huge_classes( environment.plib.version ) ) + + mb.split_module(environment.plib.generated_dir, huge_classes,use_files_sum_repository=False) + + ## now we need to ensure a series of headers and additional source files are + ## copied to the generaated directory.. + additional_files = [] + paths = [os.path.join(environment.Config.PATH_plib,'src','sl'), + os.path.join(environment.Config.PATH_plib,'src','util'), + os.path.join(environment.Config.PATH_plib,'src','net') + ] + + for p in paths: + additional_files = os.listdir(p) + for f in additional_files: + if f.endswith('cxx') or f.endswith('.h'): + sourcefile = os.path.join(p, f) + destfile = os.path.join(environment.plib.generated_dir, f ) + + if not common_utils.samefile( sourcefile ,destfile ): + shutil.copy( sourcefile, environment.plib.generated_dir ) + print "Updated ", f, "as it was missing or out of date" +if __name__ == '__main__': + start_time = time.clock() + generate_code() + print 'Source code was updated( %f minutes ).' % ( ( time.clock() - start_time )/60 ) Added: trunk/python-ogre/code_generators/plib/hand_made_wrappers.py =================================================================== --- trunk/python-ogre/code_generators/plib/hand_made_wrappers.py (rev 0) +++ trunk/python-ogre/code_generators/plib/hand_made_wrappers.py 2007-09-06 10:19:05 UTC (rev 374) @@ -0,0 +1,304 @@ +import os +import environment + +WRAPPER_DEFINITION_netSocket =\ +""" +int netSocket_send ( netSocket & me, boost::python::list listin, int flags = 0 ) +{ + int index, result; + int size = len(listin); + byte * buffer = new byte [size]; + for (index=0;index<size;index++ ) { + buffer[index] = (byte) boost::python::extract<int> (listin[index]); + } + result = me.send((const void *) buffer, size, flags ); + delete buffer; + return result; +} + +int netSocket_send_str ( netSocket & me, boost::python::str listin, int flags = 0 ) +{ + int index, result; + int size = len(listin); + byte * buffer = new byte[size]; + for (index=0;index<size;index++ ) { + buffer[index] = (byte) boost::python::extract<char> (listin[index]); + } + result = me.send((const void *) buffer, size, flags ); + delete buffer; + return result; +} +int netSocket_sendto ( netSocket & me, boost::python::list listin, int flags, const netAddress* to ) +{ + int index, result; + int size = len(listin); + byte * buffer = new byte[size]; + for (index=0;index<size;index++ ) { + buffer[index] = boost::python::extract<int> (listin[index]); + } + result= me.sendto((const void *) buffer, size, flags, to ); + delete buffer; + return result; +} +int netSocket_sendto_str ( netSocket & me, boost::python::str listin, int flags, const netAddress* to ) +{ + int index, result; + int size = len(listin); + byte * buffer = new byte[size]; + for (index=0;index<size;index++ ) { + buffer[index] = boost::python::extract<char> (listin[index]); + } + result= me.sendto((const void *) buffer, size, flags, to ); + delete buffer; + return result; +} + + +boost::python::list netSocket_recv ( netSocket & me, int MaxSize=20486, int flags = 0 ) +{ + byte * buffer = new byte [MaxSize]; + int length,x; + boost::python::list listout; + length = me.recv ( (void *) buffer, MaxSize, flags); + for (x=0;x<length;x++) { + listout.append ( buffer[x] ); + } + delete buffer; + return listout; +} +boost::python::str netSocket_recv_str ( netSocket & me, int MaxSize=2048, int flags = 0 ) +{ + char * buffer = new char [MaxSize]; + int length; + boost::python::str str_out; + length = me.recv ( (void *) buffer, MaxSize, flags); + if (length > 0 ) + str_out = boost::python::str (buffer, length); + else + str_out = boost::python::str(); + delete buffer; + return str_out; +} + +boost::python::list netSocket_recvfrom ( netSocket & me, int MaxSize, int flags, netAddress* from ) +{ + byte * buffer = new byte [MaxSize]; + int length,x; + boost::python::list listout; + length = me.recvfrom ( (void *) buffer, MaxSize, flags, from); + for (x=0;x<length;x++) { + listout.append ( buffer[x] ); + } + delete buffer; + return listout; +} +boost::python::str netSocket_recvfrom_str ( netSocket & me, int MaxSize, int flags, netAddress* from ) +{ + char * buffer = new char [MaxSize]; + int length; + boost::python::str str_out; + length = me.recvfrom ( (void *) buffer, MaxSize, flags, from); + if (length > 0 ) + str_out = boost::python::str (buffer, length); + else + str_out = boost::python::str(); + delete buffer; + return str_out; +} +""" +WRAPPER_REGISTRATION_netSocket = [ + """def( "send", &::netSocket_send, + ( bp::arg("listin"), bp::arg("flags")=(0) ), + "Python-Ogre Hand Wrapped\\n" );""", + """def( "send", &::netSocket_send_str, + ( bp::arg("listin"), bp::arg("flags")=(0) ), + "Python-Ogre Hand Wrapped\\n" );""", + """def( "sendto", &::netSocket_sendto, + "Python-Ogre Hand Wrapped\\n" );""", + """def( "sendto", &::netSocket_sendto_str, + "Python-Ogre Hand Wrapped\\n" );""", + + """def( "recv", &::netSocket_recv, + ( bp::arg("MaxSize")=(2048), bp::arg("flags")=(0) ), + "Python-Ogre Hand Wrapped\\n" );""", + """def( "recv_str", &::netSocket_recv_str, + ( bp::arg("MaxSize")=(2048), bp::arg("flags")=(0) ), + "Python-Ogre Hand Wrapped\\n" );""", + """def( "recvfrom", &::netSocket_recvfrom, + "Python-Ogre Hand Wrapped\\n" );""", + """def( "recvfrom_str", &::netSocket_recvfrom_str, + "Python-Ogre Hand Wrapped - receives a string\\n" );""", +] + + +WRAPPER_DEFINITION_netBuffer =\ +""" +char * netBuffer_getData(netBuffer & me) { + return me.getData() ; + } + +boost::python::str netBuffer_getData_str(netBuffer & me) { + boost::python::str str_out; + int length = me.getLength(); + if (length > 0) + str_out = boost::python::str( me.getData(), length ); + else + str_out = boost::python::str(); + return str_out; + } +""" +WRAPPER_REGISTRATION_netBuffer = [ + """def( "getData", &::netBuffer_getData, + bp::return_value_policy< bp::return_opaque_pointer >(), + "Python-Ogre Hand Wrapped - returns pointer to data buffer suitable to use with ctypes\\n" );""", + """def( "getData_str", &::netBuffer_getData_str, + "Python-Ogre Hand Wrapped - returns a string containing the buffer data\\n" );""" + ] + + +WRAPPER_DEFINITION_netChannel =\ +""" +int netChannel_send ( netChannel & me, boost::python::list listin, int flags = 0 ) +{ + int index, result; + int size = len(listin); + byte * buffer = new byte [size]; + for (index=0;index<size;index++ ) { + buffer[index] = (byte) boost::python::extract<int> (listin[index]); + } + result = me.send((const void *) buffer, size, flags ); + delete buffer; + return result; +} + +int netChannel_send_str ( netChannel & me, boost::python::str listin, int flags = 0 ) +{ + int index, result; + int size = len(listin); + byte * buffer = new byte[size]; + for (index=0;index<size;index++ ) { + buffer[index] = (byte) boost::python::extract<char> (listin[index]); + } + result = me.send((const void *) buffer, size, flags ); + delete buffer; + return result; +} +boost::python::list netChannel_recv ( netChannel & me, int MaxSize=2048, int flags = 0 ) +{ + byte * buffer = new byte [MaxSize]; + int length,x; + boost::python::list listout; + length = me.recv ( (void *) buffer, MaxSize, flags); + for (x=0;x<length;x++) { + listout.append ( buffer[x] ); + } + delete buffer; + return listout; +} +boost::python::str netChannel_recv_str ( netChannel & me, int MaxSize=2048, int flags = 0 ) +{ + char * buffer = new char [MaxSize]; + int length; + boost::python::str str_out; + length = me.recv ( (void *) buffer, MaxSize, flags); + if (length > 0 ) + str_out = boost::python::str (buffer, length); + else + str_out = boost::python::str(); + delete buffer; + return str_out; +} + +""" +WRAPPER_REGISTRATION_netChannel = [ + """def( "send", &::netChannel_send, + ( bp::arg("listin"), bp::arg("flags")=(0) ), + "Python-Ogre Hand Wrapped\\n" );""", + """def( "send", &::netChannel_send_str, + ( bp::arg("listin"), bp::arg("flags")=(0) ), + "Python-Ogre Hand Wrapped\\n" );""", + """def( "recv", &::netChannel_recv, + ( bp::arg("MaxSize")=(2048), bp::arg("flags")=(0) ), + "Python-Ogre Hand Wrapped\\n" );""", + """def( "recv_str", &::netChannel_recv_str, + ( bp::arg("MaxSize")=(2048), bp::arg("flags")=(0) ), + "Python-Ogre Hand Wrapped\\n" );""", +] + +WRAPPER_DEFINITION_netMonitorServer =\ +""" + void setCommandFunc ( void (*func)(const char*) ) +""" + + +WRAPPER_DEFINITION_slScheduler =\ +""" +int slScheduler_loopSample(slScheduler &me, slSample * s, int pri=0, + slPreemptMode mode=::SL_SAMPLE_MUTE, int magic=0, + PyObject* subscriber=0, std::string const & method="") +{ + return me.loopSample ( s, pri, mode, magic ); // note calling with a null callback +} +int slScheduler_playSample(slScheduler &me, slSample * s, int pri=1, + slPreemptMode mode=::SL_SAMPLE_ABORT, int magic=0, + PyObject* subscriber=0, std::string const & method="") +{ + return me.playSample ( s, pri, mode, magic ); // note calling with a null callback +} +int slScheduler_loopMusic(slScheduler &me, const char *fname, int pri=0, + slPreemptMode mode=::SL_SAMPLE_MUTE, int magic=0, + PyObject* subscriber=0, std::string const & method="") +{ + return me.loopMusic ( fname, pri, mode, magic ); // note calling with a null callback +} +int slScheduler_playMusic(slScheduler &me, const char *fname, int pri=1, + slPreemptMode mode=::SL_SAMPLE_ABORT, int magic=0, + PyObject* subscriber=0, std::string const & method="") +{ + return me.playMusic ( fname, pri, mode, magic ); // note calling with a null callback +} +""" ... [truncated message content] |
From: <and...@us...> - 2007-09-12 13:40:20
|
Revision: 375 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=375&view=rev Author: andy_miller Date: 2007-09-12 06:40:08 -0700 (Wed, 12 Sep 2007) Log Message: ----------- General updates for 1.1 release Support for latest Quickgui and NXogre (from their SVN's) Initial wrapping for navi GUI -- not yet complete however works 'ok' Modified Paths: -------------- trunk/python-ogre/PythonOgreConfig_nt.py trunk/python-ogre/code_generators/nxogre/generate_code.py trunk/python-ogre/code_generators/nxogre/python_nxogre_aliases.h trunk/python-ogre/code_generators/quickgui/generate_code.py trunk/python-ogre/environment.py trunk/python-ogre/scripts/MakeRelease.bat trunk/python-ogre/setup.py Added Paths: ----------- trunk/python-ogre/code_generators/navi/ trunk/python-ogre/code_generators/navi/NxOgre.log.html trunk/python-ogre/code_generators/navi/customization_data.py trunk/python-ogre/code_generators/navi/generate_code.py trunk/python-ogre/code_generators/navi/hand_made_wrappers.py trunk/python-ogre/code_generators/navi/python_navi.h trunk/python-ogre/code_generators/navi/python_navi_aliases.h trunk/python-ogre/code_generators/navi/python_navi_sizeof.h trunk/python-ogre/code_generators/navi/register_exceptions.py trunk/python-ogre/scripts/MakeSnapShot.bat trunk/python-ogre/scripts/PythonOgreInstallCreator.iss.1.0 trunk/python-ogre/scripts/PythonOgreInstallCreator.iss.org trunk/python-ogre/scripts/UpdateDLLs.bat Removed Paths: ------------- trunk/python-ogre/scripts/PythonOgreInstallCreator.iss Modified: trunk/python-ogre/PythonOgreConfig_nt.py =================================================================== --- trunk/python-ogre/PythonOgreConfig_nt.py 2007-09-06 10:19:05 UTC (rev 374) +++ trunk/python-ogre/PythonOgreConfig_nt.py 2007-09-12 13:40:08 UTC (rev 375) @@ -47,7 +47,9 @@ PATH_ffmpeg= os.path.join(BASE_DIR, 'ffmpeg') PATH_ogredshow = os.path.join(root_dir, 'ThirdParty','dshow') PATH_plib = os.path.join(BASE_DIR, 'plib') +PATH_navi = os.path.join(BASE_DIR, 'navi','Navi') + # # it's time for the SDK version if SDK: @@ -96,6 +98,7 @@ PATH_LIB_ffmpeg= os.path.join(PATH_ffmpeg, 'lib') PATH_LIB_ogredshow = PATH_ogredshow PATH_LIB_plib = PATH_plib +PATH_LIB_navi= os.path.join(PATH_navi, 'lib') if SDK: PATH_LIB_Ogre_CEGUIRenderer = os.path.join( PATH_Ogre, 'lib') @@ -138,6 +141,7 @@ PATH_INCLUDE_ffmpeg = os.path.join (PATH_ffmpeg,'include') PATH_INCLUDE_ogredshow = PATH_ogredshow PATH_INCLUDE_plib = PATH_plib +PATH_INCLUDE_navi = os.path.join (PATH_navi,'include') PATH_INCLUDE_OggVorbisTheora = [ os.path.join(BASE_DIR,'ogg','include') ,os.path.join(BASE_DIR, 'vorbis', 'include') Added: trunk/python-ogre/code_generators/navi/NxOgre.log.html =================================================================== --- trunk/python-ogre/code_generators/navi/NxOgre.log.html (rev 0) +++ trunk/python-ogre/code_generators/navi/NxOgre.log.html 2007-09-12 13:40:08 UTC (rev 375) @@ -0,0 +1,29 @@ +<html> + <head> + <title>NxOgre Log - NxOgre 0.9-28</title> + <style> + body {background:#121212;color:white;font-family:Helvetica,sans-serif;font-size:80%;padding-top:1em;} + h2 {font-size:145%;margin:0;padding:0;color:#999;} + h2 small {padding-left:1em;} + div.log {width:75%;margin:0 auto 2em auto;padding:1em 2em 2em 1em;border-left:2px solid #333;background-color:#181818;} + div.conflict {border-left:2px solid hotpink;} + div.error {border-left:2px solid red;} + div.error h2{color:orangered} + div.leak {border-left:2px solid orangered;} + div.debug {border-left:2px solid #333;} + div.debug h2 {font-size:125%;color:#444;} + div.warning {border-left:2px solid SaddleBrown;} + span.item{font-size:85%;background:red;} + small {font-size:95%;color:#333;} + div.et0{border-left:2px solid red;} + div.et99{} + pre {font-size:1.1em;padding:0.5em 0 0 0;margin:0;overflow:auto;} + h1 {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPoAAABPCAMAAAD1NSjJAAAAGFBMVEUKCgr+/v4tLS1VVVWEhITY2Nitra3///+Y5SUzAAAACHRSTlP/////////AN6DvVkAAAAZdEVYdFNvZnR3YXJlAEFkb2JlIEltYWdlUmVhZHlxyWU8AAAF+0lEQVR42u2c2YKkIAxFYzb+/4/nQUGWhMWy26rq4W2qo3hYArmBgfBnC/xtdExl1BC71ZVqEIn4LESE8Dw6bKnwwHi3WvxmIFbZjCLKBO+CvuHd6EC6dQvjm6DLzego27AovAX6Rrei8zZTBN8CXeBG9IxcmOh0p1hOf4Fn0WXs6RbRMXozQgDD6RPLzFj7eXSSoadbQwcZ+jGIlcKj6BAHPtyETjs5zLQPPYsepybfhK5T03hfA/RhdBgN+SX0fabrTS30w+jJL92CzpMjmSb2Uj+PHrTvcJfQZRJpH2v0NPrA062gH7MHJtuIn0YfeLol9GlbfcjPVejQXWdX0HHalsfBw2+gH07H6YR19BnPTTe4eAAAeBG96+lyS0/bgOMPs2tbbG2oN7msqqqcJI2yPjj/iUc8INpuHAEpvYm5lEcadOhEFIZXQHtNk6PXeRo9exGytCE9lD2S2gvVDYCBuImZ5WyeBj0OeR4NeDW7lWKL0CJ6ggK1Q3pp0cUIi3GoFSh66HHI4wDd3H2fP9L03ry0tD9YwEJXQxCQqgutQh66P+RLSzLMOHXSRXTIyFVVNRGpgU5RC0BMQpha5NmbUrca6LEpaYAeg9J2RcNwGZ2TsoEAAQLEsF6NXt9No7R5zHopVmllwt37AyCxZs1jobthTGWJjZmejTG/Nc/Rj1dWkS60mgZZjk1PGyqbpRYI0EF3F/fakiuzfApcQ1cnxmcPvXTp555YPNGPko2J7i3ujVcoPR3k9V1CB9fLqI1emVLsis7SqnHzaKOj7ekay3LLVoSp8+h4PuZ/MdnoZLxKUt+hXx146E4Y400NzbUJeAGd3YfqpZTMvonovbAx7Y0cdNvTGZbnxx7DHZYViGzAd75YLXQNDnontzFCtz2dYQlJ16lYr6D3OostdO6ic0dIYB/d9HSWZfxwqBSHS+idaI8s9NoPo6oqF3PIGT89dMvTmZaHrMiV9XV0DZfRDffhSyMuuuXpTMt864nhJfRetIcWOl6ROsfohqfrjo/qo6+j0+Pohqfrj49ycjyKfmwz2SwyRm/DmPnxMZhuv4PeTer30Q8kgZE2R8bvn43eZGMGvU4fhC7QR68FG8cyBZBtGDAjUJ0bwt+Z6/sRrkGv14LNyMNr8+ij6LgoRvcW9+G6TjW6TqPDu6GX2RjTcq+G6+03TJzIKraDA3S6bV2fRI+jWV30mGqoQ6kqkBuij/zDBXR6Db0IY6zILSkzVVQZZjOtcB6rwNU9PF7Zw0+j557OjdeziBPbKTyTkuUwiNx4HZ1fRM89nafS5ELkslaB3VHVlyqw25yOoyEiIppBzzydJ1tjLh1yUf0YPVcl/UliC1QDdBspNssYPfN0jWUJW+nyk0ejuMnjof8Rs+g9RzMTvjR7utqy1ga5FWiHLr5YCfwcJS+h9xRZWEFPYYydfaHakBdWmJLW1+FlDb2zViS3OoOeIndayLml/uye9s8TQfYry8TzLHrn/BaNFFlzyGthyW6m9fjtTB06R3NS6l+rnEadc9NtFT1OEC/Axll0KJLeYA/3zFCrp0SZidKxcCIiVpGtDfk0HX6IY+toIFlDj3ULn6eyAVIqWmEWvQyAIeuJWuanfMjTNlfICgNFlfk8Ns9r6MVZfFVVzZvaz7QOuj07SyPeWRrI0poj1YDM4L9qHVhE78oVFObRiy8CM7duenngEXw9r80TJUJhGd1vd6Gwgh60QPdccesDAJ2rXseZB2Mhqy9JCUO4gB6AjJpFY5X7FT8iGt04A6RYIAQgRO+Z3RCrZ5lVVY6iykzmtZD4CmYVEdF02K1Ch5lvTgfwzkqzk3O/eg4dUpk2bhOk1+ttI7fPKK+gu0Hrf/T/6M/yMTPbt8O+Ht3nw29H9+/B3H876M3muq/szKqcH4vuXnqbl/U/Fd1Vdng6hfep6GCfbQXebp/qb7eux2RPvoWFGMzd+/8bvBt6kipE9vR4rjDce/vz7XZzNCXmfOdG1mPXu2/8vuEeHg1l55Qpvzx8ASRO13Tya37fj17qGj9WQfiz5R/SFale8MO0+QAAAABJRU5ErkJggg==") top center no-repeat;padding-top:85px;text-align:center;font-size:1.2em;} + a#jump {position:absolute;top:0.5em;right:0.5em;color:white;text-decoration:none;} + a#jump:hover {text-decoration:underline;} + h5 {width:80%;margin:0 auto 2em auto;padding:1.25em 0 0.25em 0;border-bottom:2px solid red;text-align:center;} + div#e {width:90%;margin:0 auto 2em auto;padding:1.25em 0 0 0;font-size:0.9em;text-align:center;} + div#key {margin:0 auto 2em auto;display:table;font-size:0.75em;} div#key span{display:table-cell;margin-left:24px;width:12px;height:1em;font-size:1px;border-left:32px solid #121212;border-right:8px solid #121212;} </style> + </head> +<body> +<h1>Log<br /><small>NxOgre 0.9-28</small></h1><a href="#bottom" id="jump">Jump to bottom</a><div id="key"><span style="background-color:#333;"> </span> Debug <span style="background-color:Indigo;"> </span> Warning<span style="background-color:hotpink;"> </span> Conflict<span style="background-color: red;"> </span> Error <span style="background-color: orangered;"> </span> Leaks</div> Added: trunk/python-ogre/code_generators/navi/customization_data.py =================================================================== --- trunk/python-ogre/code_generators/navi/customization_data.py (rev 0) +++ trunk/python-ogre/code_generators/navi/customization_data.py 2007-09-12 13:40:08 UTC (rev 375) @@ -0,0 +1,9 @@ + +def header_files( version ): + return [ 'navi.h' + + ] + +def huge_classes( version ): + return [] + \ No newline at end of file Added: trunk/python-ogre/code_generators/navi/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/navi/generate_code.py (rev 0) +++ trunk/python-ogre/code_generators/navi/generate_code.py 2007-09-12 13:40:08 UTC (rev 375) @@ -0,0 +1,517 @@ +#!/usr/bin/env python +# ----------------------------------------------------------------------------- +# This source file is part of Python-Ogre and is covered by the LGPL +# For the latest info, see http://python-ogre.org/ +# +# ----------------------------------------------------------------------------- + + +import os, sys, time, shutil + +#add environment to the path +sys.path.append( os.path.join( '..', '..' ) ) +#add common utils to the pass +sys.path.append( '..' ) +sys.path.append( '.' ) + +import environment +import common_utils +import customization_data +import hand_made_wrappers +import register_exceptions + +from pygccxml import parser +from pygccxml import declarations +from pyplusplus import messages +from pyplusplus import module_builder +from pyplusplus import decl_wrappers + +from pyplusplus import function_transformers as ft +from pyplusplus.module_builder import call_policies +from pyplusplus.module_creator import sort_algorithms + +import common_utils.extract_documentation as exdoc +import common_utils.var_checker as varchecker +import common_utils.ogre_properties as ogre_properties + +MAIN_NAMESPACE = 'NaviLibrary' + +## small helper function +def docit ( general, i, o ): + docs = "Python-Ogre Modified Function Call\\n" + general +"\\n" + docs = docs + "Input: " + i + "\\n" + docs = docs + "Output: " + o + "\\n\\\n" + return docs + +############################################################ +## +## Here is where we manually exclude stuff +## +############################################################ + +def ManualExclude ( mb ): + global_ns = mb.global_ns + main_ns = global_ns.namespace( MAIN_NAMESPACE ) + + # things not yet implemented in the C source.. + excludes=[] + for c in main_ns.classes(): + for m in c.member_functions(allow_empty=True): + for e in excludes: + if e in m.decl_string: + m.exclude() + + ### Member Functions + excludes=[ '::NaviLibrary::NaviDataValue::isEmpty' + ,'::NaviLibrary::NaviDataValue::isNumber' ## inline functions + ] + for e in excludes: + print "excluding ", e + main_ns.member_functions(e).exclude() + + ### Free Functions + excludes = [] + for e in excludes: + main_ns.free_functions(e).exclude() + + ## Classes + excludes = [] + for e in excludes: + main_ns.class_(e).exclude() + + + ## I have a challenge that Py++ doesn't recognise these classes by full name (perhaps because they are structs?) + ## so I have to look through and match on a class by class basis + excludeName = [] + for c in main_ns.classes(): + if c.name in excludeName: + c.exclude() + + ### Variables + excludes = [] + for e in excludes: + main_ns.variable(e).exclude() + + ### Typedefs + excludes = [] + for e in excludes: + main_ns.typedefs(e).exclude() + + ### Operators + excludes=[] + for e in excludes: + main_ns.operators(e).exclude() + + main_ns.class_('::NaviLibrary::NaviDataValue').constructor(arg_types=['bool']).exclude() +# ### Constructors +# for c in main_ns.class_('NaviDataValue').constructor(arg_types=['bool']): ## these hide the working constructors +# for a in c.arguments: +# if 'NxVec3' in a.type.decl_string or 'NxQuat' in a.type.decl_string: +# c.exclude() +# break + + +############################################################ +## +## And there are things that manually need to be INCLUDED +## +############################################################ + +def ManualInclude ( mb ): + global_ns = mb.global_ns + main_ns = global_ns.namespace( MAIN_NAMESPACE ) + + includes=[] + ### Free Functions + for e in includes: + main_ns.free_functions(e).include() + +############################################################ +## +## And things that need manual fixes, but not necessarly hand wrapped +## +############################################################ +def ManualFixes ( mb ): + + global_ns = mb.global_ns + + +############################################################ +## +## And things that need to have their argument and call values fixed. +## ie functions that pass pointers in the argument list and of course we need +## to read the updated values - so instead we pass them back +## as new values in a tuple (ETC ETC) +## +############################################################ + +def ManualTransformations ( mb ): + def _ReturnUnsignedInt( type_ ): + """helper to return an UnsignedInt call for tranformation functions + """ + return declarations.cpptypes.unsigned_int_t() + + global_ns = mb.global_ns + main_ns = global_ns.namespace( MAIN_NAMESPACE ) + + def create_output( size ): + return [ ft.output( i ) for i in range( size ) ] + + +############################################################################### +## +## Now for the AUTOMATIC stuff that should just work +## +############################################################################### + + +def AutoExclude( mb ): + """ Automaticaly exclude a range of things that don't convert well from C++ to Python + """ + global_ns = mb.global_ns + main_ns = global_ns.namespace( MAIN_NAMESPACE ) + + # vars that are static consts but have their values set in the header file are bad + Remove_Static_Consts ( main_ns ) + + ## Exclude protected and private that are not pure virtual + query = ~declarations.access_type_matcher_t( 'public' ) \ + & ~declarations.virtuality_type_matcher_t( declarations.VIRTUALITY_TYPES.PURE_VIRTUAL ) + non_public_non_pure_virtual = main_ns.calldefs( query ) + non_public_non_pure_virtual.exclude() + + #Virtual functions that return reference could not be overriden from Python + query = declarations.virtuality_type_matcher_t( declarations.VIRTUALITY_TYPES.VIRTUAL ) \ + & declarations.custom_matcher_t( lambda decl: declarations.is_reference( decl.return_type ) ) + try: + main_ns.calldefs( query ).virtuality = declarations.VIRTUALITY_TYPES.NOT_VIRTUAL + except: + pass + +def AutoInclude( mb ): + global_ns = mb.global_ns + main_ns = global_ns.namespace( MAIN_NAMESPACE ) + + +def AutoFixes ( mb ): + """ now we fix a range of things automatically - typically by going through + the entire name space trying to guess stuff and fix it:) + """ + global_ns = mb.global_ns + main_ns = global_ns.namespace( MAIN_NAMESPACE ) + + # arguments passed as refs but not const are not liked by boost + #Fix_Ref_Not_Const ( main_ns ) + + # Functions that have void pointers in their argument list need to change to unsigned int's + Fix_Void_Ptr_Args ( main_ns ) + + # and change functions that return a variety of pointers to instead return unsigned int's + Fix_Pointer_Returns ( main_ns ) + + # functions that need to have implicit conversions turned off + Fix_Implicit_Conversions ( main_ns) + + if os.name =='nt': + Fix_NT( mb ) + elif os.name =='posix': + Fix_Posix( mb ) + + +############################################################################### +## +## here are the helper functions that do much of the work +## +############################################################################### +def Fix_Posix ( mb ): + """ fixup for posix specific stuff -- note only expect to be called on a posix machine + """ + ## we could do more here if need be... + if sys.platform == 'darwin': + pass + elif sys.platform.startswith ('linux'): + pass + + +def Fix_NT ( mb ): + """ fixup for NT systems + """ + + +def Fix_Implicit_Conversions ( mb ): + """By default we disable explicit conversion, however sometimes it makes sense + """ + pass + +def Add_Auto_Conversions( mb ): + pass + + +def Set_Call_Policies( mb ): + """ set the return call policies on classes that this hasn't already been done for. + Set the default policy to deal with pointer/reference return types to reference_existing object + """ + mem_funs = mb.calldefs () + mem_funs.create_with_signature = True #Generated code will not compile on + #MSVC 7.1 if function has throw modifier. + for mem_fun in mem_funs: + if mem_fun.call_policies: + continue + if not mem_fun.call_policies and \ + (declarations.is_reference (mem_fun.return_type) or declarations.is_pointer (mem_fun.return_type) ): + mem_fun.call_policies = call_policies.return_value_policy( + call_policies.reference_existing_object ) + + +def Set_Exception(mb): + pass + #~ """We don't exclude Exception, because it contains functionality, that could + #~ be useful to user. But, we will provide automatic exception translator + #~ """ + #~ Exception = mb.namespace( 'Ogre' ).class_( 'Exception' ) + #~ Exception.include() + #~ Exception.mem_fun('what').exclude() # declared with empty throw + #~ Exception.mem_fun('getNumber').exclude() # declared with empty throw + #~ Exception.translate_exception_to_string( 'PyExc_RuntimeError', 'exc.getFullDescription().c_str()' ) + + +def _ReturnUnsignedInt( type_ ): + """helper to return an UnsignedInt call for tranformation functions + """ + return declarations.cpptypes.unsigned_int_t() + +def Fix_Void_Ptr_Args ( mb ): + """ we modify functions that take void *'s in their argument list to instead take + unsigned ints, which allows us to use CTypes buffers + """ + for fun in mb.member_functions(): + arg_position = 0 + for arg in fun.arguments: + if declarations.type_traits.is_void_pointer(arg.type) or arg.type.decl_string == "void const *": + fun.add_transformation( ft.modify_type(arg_position,_ReturnUnsignedInt ), alias=fun.name ) + fun.documentation = docit ("Modified Input Argument to work with CTypes", + "Argument "+arg.name+ "(pos:" + str(arg_position)\ + +") takes a CTypes.adddressof(xx)", "...") + print "Fixed Void Ptr", fun, arg_position + break + arg_position +=1 + + ## lets go and look for stuff that might be a problem + pointee_types=['unsigned int',' int ', ' float ', ' Real ', 'uchar', 'uint8', + 'unsigned char'] + + function_names=[] + for fun in mb.member_functions(): + if fun.documentation or fun.ignore: continue ## means it's been tweaked somewhere else + for n in function_names: + if n in fun.name: + print "CHECK :", fun + break + arg_position = 0 + for arg in fun.arguments: + if declarations.is_pointer(arg.type): ## and "const" not in arg.type.decl_string: + for i in pointee_types: + if i in arg.type.decl_string: + print '"',arg.type.decl_string, '"' + print "CHECK ", fun, str(arg_position) + fun.documentation=docit("SUSPECT - MAYBE BROKEN", "....", "...") + break + arg_position +=1 + +## NEED To do the same for constructors + for fun in mb.constructors(): + arg_position = 0 + for arg in fun.arguments: + if declarations.is_pointer(arg.type): ## and "const" not in arg.type.decl_string: + for i in pointee_types: + if i in arg.type.decl_string: + print '"',arg.type.decl_string, '"' + print "Excluding: ", fun + fun.exclude() + break + arg_position +=1 + +def Fix_Pointer_Returns ( mb ): + """ Change out functions that return a variety of pointer to base types and instead + have them return the address the pointer is pointing to (the pointer value) + This allow us to use CTypes to handle in memory buffers from Python + + Also - if documentation has been set then ignore the class/function as it means it's been tweaked else where + """ + pointee_types=['unsigned int','int', 'float', 'unsigned char'] + known_names=[] # these are function names we know it's cool to exclude + for fun in mb.member_functions(): + if declarations.is_pointer (fun.return_type) and not fun.documentation: + for i in pointee_types: + if fun.return_type.decl_string.startswith ( i ) and not fun.documentation: + if not fun.name in known_names: + print "Excluding (function):", fun, "as it returns (pointer)", i + fun.exclude() + for fun in mb.member_operators(allow_empty=True): + if declarations.is_pointer (fun.return_type) and not fun.documentation: + for i in pointee_types: + if fun.return_type.decl_string.startswith ( i ) and not fun.documentation: + print "Excluding (operator):", fun + fun.exclude() + + + +def query_containers_with_ptrs(decl): + if not isinstance( decl, declarations.class_types ): + return False + if not decl.indexing_suite: + return False + return declarations.is_pointer( decl.indexing_suite.element_type ) + + +def Remove_Static_Consts ( mb ): + """ linux users have compile problems with vars that are static consts AND have values set in the .h files + we can simply leave these out """ + checker = varchecker.var_checker() + for var in mb.vars(): + if type(var.type) == declarations.cpptypes.const_t: + if checker( var ): + print "Excluding static const ", var + var.exclude() + +# +# the 'main'function +# +def generate_code(): +# messages.disable( +# # Warnings 1020 - 1031 are all about why Py++ generates wrapper for class X +# messages.W1020 +# , messages.W1021 +# , messages.W1022 +# , messages.W1023 +# , messages.W1024 +# , messages.W1025 +# , messages.W1026 +# , messages.W1027 +# , messages.W1028 +# , messages.W1029 +# , messages.W1030 +# , messages.W1031 +# , messages.W1035 +# , messages.W1040 +# , messages.W1038 +# , messages.W1039 +# , messages.W1041 +# , messages.W1036 # pointer to Python immutable member +# , messages.W1033 # unnamed variables +# , messages.W1018 # expose unnamed classes +# , messages.W1049 # returns reference to local variable +# , messages.W1014 # unsupported '=' operator +# ) + # + # Use GCCXML to create the controlling XML file. + # If the cache file (../cache/*.xml) doesn't exist it gets created, otherwise it just gets loaded + # NOTE: If you update the source library code you need to manually delete the cache .XML file + # + xml_cached_fc = parser.create_cached_source_fc( + os.path.join( environment.navi.root_dir, "python_navi.h" ) + , environment.navi.cache_file ) + + defined_symbols = [ 'OGRE_NONCLIENT_BUILD', 'OGRE_GCC_VISIBILITY'] + if environment._USE_THREADS: + defined_symbols.append('BOOST_HAS_THREADS') + defined_symbols.append('BOOST_HAS_WINTHREADS') + defined_symbols.append( 'VERSION_' + environment.navi.version ) + + undefined_symbols = [] + # + # build the core Py++ system from the GCCXML created source + # + mb = module_builder.module_builder_t( [ xml_cached_fc ] + , gccxml_path=environment.gccxml_bin + , working_directory=environment.root_dir + , include_paths=environment.navi.include_dirs + , define_symbols=defined_symbols + , indexing_suite_version=2 + , cflags=environment.navi.cflags + ) + # NOTE THE CHANGE HERE + mb.constructors().allow_implicit_conversion = False + mb.register_module_dependency ( environment.ogre.generated_dir ) + + mb.BOOST_PYTHON_MAX_ARITY = 25 + mb.classes().always_expose_using_scope = True + + # + # We filter (both include and exclude) specific classes and functions that we want to wrap + # + global_ns = mb.global_ns + global_ns.exclude() + main_ns = global_ns.namespace( MAIN_NAMESPACE ) + main_ns.include() + + + AutoExclude ( mb ) + ManualExclude ( mb ) + AutoInclude ( mb ) + ManualInclude ( mb ) + # here we fixup functions that expect to modifiy their 'passed' variables + ManualTransformations ( mb ) + + AutoFixes ( mb ) + ManualFixes ( mb ) + + + # + # We need to tell boost how to handle calling (and returning from) certain functions + # + Set_Call_Policies ( mb.global_ns ) + + # + # the manual stuff all done here !!! + # + hand_made_wrappers.apply( mb ) + + NoPropClasses = [""] + for cls in main_ns.classes(): + if cls.name not in NoPropClasses: + cls.add_properties( recognizer=ogre_properties.ogre_property_recognizer_t() ) + + common_utils.add_constants( mb, { 'PROJECT_version' : '"%s"' % environment.navi.version.replace("\n", "\\\n") + , 'python_version' : '"%s"' % sys.version.replace("\n", "\\\n" ) } ) + + ## need to create a welcome doc string for this... + common_utils.add_constants( mb, { '__doc__' : '"Navi PROJECT DESCRIPTION"' } ) + + + ########################################################################################## + # + # Creating the code. After this step you should not modify/customize declarations. + # + ########################################################################################## + extractor = exdoc.doc_extractor("") # I'm excluding the UTFstring docs as lots about nothing + mb.build_code_creator (module_name='_navi_' , doc_extractor= extractor ) + + for inc in environment.navi.include_dirs: + mb.code_creator.user_defined_directories.append(inc ) + mb.code_creator.user_defined_directories.append( environment.navi.generated_dir ) + mb.code_creator.replace_included_headers( customization_data.header_files( environment.navi.version ) ) + + huge_classes = map( mb.class_, customization_data.huge_classes( environment.navi.version ) ) + + mb.split_module(environment.navi.generated_dir, huge_classes,use_files_sum_repository=False) + + ## now we need to ensure a series of headers and additional source files are + ## copied to the generaated directory.. + additional_files = [] + paths = [] + + for p in paths: + additional_files = os.listdir(p) + for f in additional_files: + if f.endswith('cpp') or f.endswith('.h'): + sourcefile = os.path.join(p, f) + destfile = os.path.join(environment.navi.generated_dir, f ) + + if not common_utils.samefile( sourcefile ,destfile ): + shutil.copy( sourcefile, environment.navi.generated_dir ) + print "Updated ", f, "as it was missing or out of date" +if __name__ == '__main__': + start_time = time.clock() + generate_code() + print 'Source code was updated( %f minutes ).' % ( ( time.clock() - start_time )/60 ) Added: trunk/python-ogre/code_generators/navi/hand_made_wrappers.py =================================================================== --- trunk/python-ogre/code_generators/navi/hand_made_wrappers.py (rev 0) +++ trunk/python-ogre/code_generators/navi/hand_made_wrappers.py 2007-09-12 13:40:08 UTC (rev 375) @@ -0,0 +1,72 @@ +import os +import environment + + +WRAPPER_DEFINITION_NaviManager = \ +""" +class EventCallback +{ +public: + EventCallback(PyObject* subscriber, std::string const & method) + { + mSubscriber = subscriber; + mMethod = method; + } + + void call(const NaviLibrary::NaviData &naviData) + { + if (mMethod.length() > 0 ) { + boost::python::call_method<void>(mSubscriber, mMethod.c_str(), + static_cast<const NaviLibrary::NaviData&>(naviData) ); + } + else + boost::python::call<void>(mSubscriber, + static_cast<const NaviLibrary::NaviData&>(naviData) ); + } + PyObject* mSubscriber; + std::string mMethod; +}; + + + +void NaviManager_bind(NaviLibrary::NaviManager &me, const std::string &naviName, + const std::string &naviDataName, + PyObject* subscriber, std::string const & method="", + boost::python::list listin= boost::python::list()) +{ + int index; + + // create a new call back function that knows how to call a python function or class method + EventCallback * cb = new EventCallback( subscriber, method); + + // create the necessary Delegate wrapper around this new functions + NaviLibrary::NaviDelegate callback = NaviLibrary::NaviDelegate ( cb, &EventCallback::call ); + + // we allow a list of strings to be passed in and we convert these to a string vector + std::vector<std::string> myVector; + for (index=0;index<len(listin);index++ ) + myVector.push_back ( boost::python::extract<std::string> (listin[index]) ); + + // and finally call the bind function to make it all work + me.bind(naviName, naviDataName, callback, myVector ) ; +} + +""" +WRAPPER_REGISTRATION_NaviManager = [ + """def( "bind", &::NaviManager_bind );""" + +] + + +################################################################################################# +################################################################################################# + +def apply_reg ( class_, code ): + for c in code: + class_.add_registration_code ( c ) + +def apply( mb ): + rt = mb.class_( 'NaviManager' ) + rt.add_declaration_code( WRAPPER_DEFINITION_NaviManager ) + apply_reg (rt, WRAPPER_REGISTRATION_NaviManager ) + \ No newline at end of file Added: trunk/python-ogre/code_generators/navi/python_navi.h =================================================================== --- trunk/python-ogre/code_generators/navi/python_navi.h (rev 0) +++ trunk/python-ogre/code_generators/navi/python_navi.h 2007-09-12 13:40:08 UTC (rev 375) @@ -0,0 +1,19 @@ +#include "navi.h" + +// First we create a magic namespace to hold all our aliases +namespace pyplusplus { namespace aliases { + + #include "python_navi_aliases.h" +} } + +// then we exposed everything needed (and more) to ensure GCCXML makes them visible to Py++ +// +namespace python_plib{ namespace details{ +inline void instantiate(){ + using namespace NaviLibrary; + + #include "python_navi_sizeof.h" + +} } } + + Added: trunk/python-ogre/code_generators/navi/python_navi_aliases.h =================================================================== --- trunk/python-ogre/code_generators/navi/python_navi_aliases.h (rev 0) +++ trunk/python-ogre/code_generators/navi/python_navi_aliases.h 2007-09-12 13:40:08 UTC (rev 375) @@ -0,0 +1,5 @@ +typedef NaviLibrary::NaviUtilities::InlineVector<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >\ + InlineVectorString; +typedef std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > >\ + MapStringString; +typedef std::vector<std::string, std::allocator<std::string> > VectorString; Added: trunk/python-ogre/code_generators/navi/python_navi_sizeof.h =================================================================== --- trunk/python-ogre/code_generators/navi/python_navi_sizeof.h (rev 0) +++ trunk/python-ogre/code_generators/navi/python_navi_sizeof.h 2007-09-12 13:40:08 UTC (rev 375) @@ -0,0 +1,3 @@ + + + Added: trunk/python-ogre/code_generators/navi/register_exceptions.py =================================================================== --- trunk/python-ogre/code_generators/navi/register_exceptions.py (rev 0) +++ trunk/python-ogre/code_generators/navi/register_exceptions.py 2007-09-12 13:40:08 UTC (rev 375) @@ -0,0 +1,137 @@ +import os +import environment +from string import Template + +base_exception = \ +""" +class OgreException(Exception): + def __init__( self, app_error ): + Exception.__init__( self ) + self._pimpl = app_error + + def __str__( self ): + return self._pimpl.getFullDescription() + + def __getattribute__(self, attr): + my_pimpl = super(OgreException, self).__getattribute__("_pimpl") + try: + return getattr(my_pimpl, attr) + except AttributeError: + return super(OgreException,self).__getattribute__(attr) + +_ogre_.OgreException = OgreException +#this one for backward compatability +_ogre_.Exception = OgreException +_ogre_._Exception_.py_err_class = OgreException +""".strip() + +derived_py_exception = \ +""" +class Ogre${err_class}(OgreException): + def __init__( self, app_error ): + OgreException.__init__( self, app_error ) + + def __getattribute__(self, attr): + return super(Ogre${err_class},self).__getattribute__(attr) + +_ogre_._${err_class}_.py_err_class = Ogre${err_class} +_ogre_.Ogre${err_class} = Ogre${err_class} +""".strip() + +register_translator = """${err_class}_exception_translator();""" + +exception_translator = \ +""" + +struct ${err_class}_exception_translator{ + + typedef Ogre::${err_class} exception_type; + typedef ${err_class}_exception_translator translator_type; + + ${err_class}_exception_translator(){ + bp::converter::registry::push_back( &translator_type::convertible + , &translator_type::construct + , bp::type_id<exception_type>() ); + + bp::register_exception_translator<exception_type>(&translator_type::translate); + } + + static void + translate( const exception_type& err ){ + bp::object pimpl_err( err ); + bp::object pyerr_class = pimpl_err.attr( "py_err_class" ); + bp::object pyerr = pyerr_class( pimpl_err ); + PyErr_SetObject( pyerr_class.ptr(), bp::incref( pyerr.ptr() ) ); + } + + //Sometimes, exceptions should be passed back to the library. + static void* + convertible(PyObject* py_obj){ + if( 1 != PyObject_IsInstance( py_obj, PyExc_Exception ) ){ + return 0; + } + + if( !PyObject_HasAttrString( py_obj, "_pimpl" ) ){ + return 0; + } + + bp::object pyerr( bp::handle<>( bp::borrowed( py_obj ) ) ); + bp::object pimpl = bp::getattr( pyerr, "_pimpl" ); + bp::extract<exception_type> type_checker( pimpl ); + if( !type_checker.check() ){ + return 0; + } + return py_obj; + } + + static void + construct( PyObject* py_obj, bp::converter::rvalue_from_python_stage1_data* data){ + typedef bp::converter::rvalue_from_python_storage<exception_type> storage_t; + + bp::object pyerr( bp::handle<>( bp::borrowed( py_obj ) ) ); + bp::object pimpl = bp::getattr( pyerr, "_pimpl" ); + + storage_t* the_storage = reinterpret_cast<storage_t*>( data ); + void* memory_chunk = the_storage->storage.bytes; + exception_type* cpp_err + = new (memory_chunk) exception_type( bp::extract<exception_type>(pimpl) ); + + data->convertible = memory_chunk; + } + +}; +""".strip() + +def substitute( text, **keywd ): + return Template( text ).substitute( **keywd ) + +def register( mb ): + ogre_ns = mb.namespace( 'Ogre' ) + python_part_code = ['import _ogre_'] + + exception = ogre_ns.class_( 'Exception' ) + exception.include() + exception.alias = '_%s_' % exception.name + exception.add_declaration_code( substitute( exception_translator, err_class=exception.name ) ) + exception.add_registration_code( substitute( register_translator, err_class=exception.name ), False ) + python_part_code.append( base_exception ) + + for derived_info in exception.derived: + derived = derived_info.related_class + derived.include() + derived.alias = '_%s_' % derived.name + derived.add_declaration_code( substitute( exception_translator, err_class=derived.name ) ) + derived.add_registration_code( substitute( register_translator, err_class=derived.name ), False ) + python_part_code.append( substitute( derived_py_exception, err_class=derived.name ) ) + + directory_path = environment.ogre.generated_dir + ogre_exceptions = os.path.join( directory_path, '_ogre_exceptions_.py' ) + + if os.path.exists( directory_path ) and not os.path.isdir(directory_path): + raise RuntimeError( 'directory_path should be a path not a file.' ) + if not os.path.exists( directory_path ): + os.makedirs( directory_path ) + + f = file( ogre_exceptions, 'w+' ) + f.write( os.linesep.join( python_part_code ) ) + f.close() Modified: trunk/python-ogre/code_generators/nxogre/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/nxogre/generate_code.py 2007-09-06 10:19:05 UTC (rev 374) +++ trunk/python-ogre/code_generators/nxogre/generate_code.py 2007-09-12 13:40:08 UTC (rev 375) @@ -93,6 +93,11 @@ ,'::NxOgre::Container<std::string, NxOgre::FluidDrain*>::get' ,'::NxOgre::Container<std::string, NxOgre::FluidDrain*>::getFirst' ,'::NxOgre::Container<std::string, NxOgre::FluidDrain*>::next' + ,'::NxOgre::Container<std::string, NxOgre::FluidDrain*>::_begin' + ,'::NxOgre::Container<std::string, NxOgre::FluidDrain*>::_next' + ,'::NxOgre::Container<std::string, NxOgre::FluidEmitter*>::_begin' + ,'::NxOgre::Container<std::string, NxOgre::FluidEmitter*>::_next' + ,'::NxOgre::Container<std::string, NxOgre::FluidEmitter*>::getFirst' ,'::NxOgre::List<NxOgre::RemoteDebuggerConnection::Camera>::destroyAndEraseAll' ,'::NxOgre::List<NxOgre::RemoteDebuggerConnection::Camera>::dumpToConsole' @@ -109,20 +114,24 @@ ,'::NxOgre::Joint::getBreakableMaxTorque' ,'::NxOgre::Joint::getGlobalAxis' ,'::NxOgre::Joint::setGlobalAxis' - ,'::NxOgre::Joint::getType' - ,'::NxOgre::Joint::hasMoreLimitPlanes' - ,'::NxOgre::Joint::purgeLimitPlanes' - ,'::NxOgre::Joint::resetLimitPlaneIterator' - ,'::NxOgre::Joint::addLimitPlane' - ,'::NxOgre::Joint::setBreakable' - ,'::NxOgre::Joint::getGlobalAnchor' - ,'::NxOgre::Joint::setGlobalAnchor' - ,'::NxOgre::Joint::getState' - ,'::NxOgre::Joint::getNextLimitPlane' - ,'::NxOgre::Joint::setLimitPoint' - ,'::NxOgre::Joint::getLimitPoint' - ,'::NxOgre::Joint::getActorA' - ,'::NxOgre::Joint::getActorB' +# # # ,'::NxOgre::Joint::getType' +# ,'::NxOgre::Joint::hasMoreLimitPlanes' +# ,'::NxOgre::Joint::purgeLimitPlanes' +# ,'::NxOgre::Joint::resetLimitPlaneIterator' +# ,'::NxOgre::Joint::addLimitPlane' +# ,'::NxOgre::Joint::setBreakable' +# ,'::NxOgre::Joint::getGlobalAnchor' +# ,'::NxOgre::Joint::setGlobalAnchor' +# ,'::NxOgre::Joint::getState' +# ,'::NxOgre::Joint::getNextLimitPlane' +# ,'::NxOgre::Joint::setLimitPoint' +# ,'::NxOgre::Joint::getLimitPoint' +# ,'::NxOgre::Joint::getActorA' +# ,'::NxOgre::Joint::getActorB' + ,'::NxOgre::JointParams::setSpring' + ,'::NxOgre::JointParams::setMotor' + ,'::NxOgre::JointParams::setLimits' + ,'::NxOgre::JointParams::setJointProjection' ,'::NxOgre::Scene::addMaterialPairsFromFile' ,'::NxOgre::Scene::addMaterialPair' ,'::NxOgre::Fluid::setName' @@ -134,6 +143,8 @@ ,'::NxOgre::Scene::createPrismaticJoint' ,'::NxOgre::Scene::createFixedJoint' ,'::NxOgre::Scene::save' + ,'::NxOgre::Scene::batchDestroyActors' + ,'::NxOgre::SimpleIntersection::getResult' ,'::NxOgre::SoftBody::simulate' ,'::NxOgre::SoftBody::render' ,'::NxOgre::PhysXDriver::stop' @@ -169,6 +180,7 @@ ## I have a challenge that Py++ doesn't recognise these classes by full name (perhaps because they are structs?) ## so I have to look through and match on a class by class basis excludeName = ['Container<NxOgre::Scene::Renderables, float>' + ,'Container<std::string,NxOgre::Actor*>' ,'List<NxOgre::CharacterHitReport*>' ,'List<NxOgre::RemoteDebuggerConnection::Camera>' ,'List<NxOgre::Blueprints::ActorBlueprint*>' Modified: trunk/python-ogre/code_generators/nxogre/python_nxogre_aliases.h =================================================================== --- trunk/python-ogre/code_generators/nxogre/python_nxogre_aliases.h 2007-09-06 10:19:05 UTC (rev 374) +++ trunk/python-ogre/code_generators/nxogre/python_nxogre_aliases.h 2007-09-12 13:40:08 UTC (rev 375) @@ -1,3 +1,6 @@ +typedef std::vector<NxOgre::Joint::LimitPlane,std::allocator<NxOgre::Joint::LimitPlane> > VectorJointLimitPlane; +typedef std::vector<NxOgre::SimplePlane*,std::allocator<NxOgre::SimplePlane*> > VectorSimplePlane; + typedef std::vector<float, std::allocator<float> > VectorFloat; typedef std::vector<std::string, std::allocator<std::string> > VectorString; typedef std::list<std::string> stdString; Modified: trunk/python-ogre/code_generators/quickgui/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/quickgui/generate_code.py 2007-09-06 10:19:05 UTC (rev 374) +++ trunk/python-ogre/code_generators/quickgui/generate_code.py 2007-09-12 13:40:08 UTC (rev 375) @@ -369,8 +369,8 @@ os.path.join( environment.quickgui.root_dir, "python_quickgui.h" ) , environment.quickgui.cache_file ) - defined_symbols = [ 'OGRE_NONCLIENT_BUILD', 'FT2_BUILD_LIBRARY', 'QUICKGUI_EXPORTS', - 'WIN32', 'NDEBUG', 'WINDOWS' ] + defined_symbols = [ 'OGRE_NONCLIENT_BUILD', + 'WIN32', 'NDEBUG', 'WINDOWS' ] ## , 'QUICKGUI_EXPORTS' if environment._USE_THREADS: defined_symbols.append('BOOST_HAS_THREADS') defined_symbols.append('BOOST_HAS_WINTHREADS') @@ -461,17 +461,17 @@ ## now we need to ensure a series of headers and additional source files are ## copied to the generated directory.. - additional_files= os.listdir(environment.Config.PATH_INCLUDE_quickgui) - additional_files=[] - for f in additional_files: - if f.endswith('cpp') or f.endswith('.h'): - sourcefile = os.path.join(environment.Config.PATH_INCLUDE_quickgui, f) - destfile = os.path.join(environment.quickgui.generated_dir, f ) + additional_dirs=[environment.Config.PATH_INCLUDE_quickgui, + os.path.join(environment.Config.PATH_quickgui,'QuickGUI','src')] + for d in additional_dirs: + for f in os.listdir(d): + if f.endswith('cpp') or f.endswith('.h'): + sourcefile = os.path.join(d, f) + destfile = os.path.join(environment.quickgui.generated_dir, f ) + if not common_utils.samefile( sourcefile ,destfile ): + shutil.copy( sourcefile, environment.quickgui.generated_dir ) + print "Updated ", f, "as it was missing or out of date" - if not common_utils.samefile( sourcefile ,destfile ): - shutil.copy( sourcefile, environment.quickgui.generated_dir ) - print "Updated ", f, "as it was missing or out of date" - if __name__ == '__main__': start_time = time.clock() generate_code() Modified: trunk/python-ogre/environment.py =================================================================== --- trunk/python-ogre/environment.py 2007-09-06 10:19:05 UTC (rev 374) +++ trunk/python-ogre/environment.py 2007-09-12 13:40:08 UTC (rev 375) @@ -103,15 +103,64 @@ ###################### ## Hopefully we can make the rest of this 'automagic' ## +class Default: + version = "" + pythonModule = False + moduleName = "" + myHome = "" + myLibraryPaths = [ ] + myLibraries = [ ] + parent = None + children = [] + codeGenerationFlags=[] + dependsOn = [] + compileFlags = [] + linkFlags= [] + includePaths = [] + myIncludes = [] + libaries = myLibraries # a list of the libraries I need plus + mySource = [] # where to get the source - tuples, {'svn|cvs|ftp|http','utl'} + myBuildCmds = [] # commands to build the library with ###################### - +class boost: + version = "3.4" + pythonModule = False + moduleName = "" + myHome = 'boost' + myLibraryPaths = [ 'boost/bin.v2/libs/python2.5/build/msvc-8.0/release/threading-multi' ] + myLibraries = [ 'boost_python-vc80-mt-1_35'] + + parent = None + children = [] + codeGenerationFlags=[] + dependsOn = [] + compileFlags = [] + linkFlags= [] + includePaths = [] + myIncludes = [] + libaries = myLibraries # a list of the libraries I need plus + mySource = ['http://prdownloads.sourceforge.net/boost/boost-jam-3.1.13-1-linuxx86.tgz', + 'http://downloads.sourceforge.net/boost/boost_1_34_0.tar.bz2'] # where to get the source - tuples, {'svn|cvs|ftp|http','utl'} + myBuildCmds = [] # commands to build the library with + class ogre: active = True - version = "1.4" # "1.2" + pythonModule = True + version = "1.4" + myName='ogre' + moduleName='OGRE' cflags = "" - parent = "ogre/renderer" - ModuleName = 'OGRE' + moduleParentLocation = "renderer" + dependsOn = ['boost'] + myLibraryPaths = [] + myLibraries = ['OgreMain'] + libraries = myLibraries + +# for mod in dependsOn: +# libraries += mod.libraries +# + if os.name =='nt': libs=[Config.LIB_Boost, 'OgreMain' ] #, 'OgreGUIRenderer', 'CEGUIBase'] lib_dirs = [ Config.PATH_LIB_Boost @@ -335,7 +384,7 @@ class quickgui: version="0.9.6" parent="ogre/gui" - CCFLAGS = ' /D "WIN32" /D "NDEBUG", /D "WINDOWS" /D "OGRE_PLATFORM_WIN32"' # /D "FT2_BUILD_LIBRARY" + CCFLAGS = ' /D "WIN32" /D "NDEBUG", /D "WINDOWS"' ###/D "OGRE_PLATFORM_WIN32"' # /D "FT2_BUILD_LIBRARY" cflags="" include_dirs = [ Config.PATH_Boost, Config.PATH_INCLUDE_Ogre, @@ -343,14 +392,35 @@ #,Config.PATH_INCLUDE_freetype ] lib_dirs = [Config.PATH_LIB_Boost, - Config.PATH_LIB_Ogre_OgreMain, - Config.PATH_LIB_quickgui + Config.PATH_LIB_Ogre_OgreMain + ##,Config.PATH_LIB_quickgui ] CheckIncludes=[] - libs=[ Config.LIB_Boost, 'OgreMain', 'QuickGUI' ] + libs=[ Config.LIB_Boost, 'OgreMain' ] ModuleName="quickgui" active=True +class navi: + version="0.9" + parent="ogre/gui" + CCFLAGS = '/D "WIN32" /D "NDEBUG", /D "WINDOWS"' + cflags="" + include_dirs = [ Config.PATH_Boost + ,Config.PATH_INCLUDE_Ogre + ,Config.PATH_INCLUDE_navi + ,os.path.join(Config.PATH_navi,'..','Dependencies','win32','llmozlib','include') + ] + lib_dirs = [Config.PATH_LIB_Boost, + Config.PATH_LIB_Ogre_OgreMain + ,Config.PATH_LIB_navi + ,os.path.join(Config.PATH_navi,'..','Dependencies','win32','llmozlib','lib') + ] + CheckIncludes=[] + libs=[ Config.LIB_Boost, 'Navi', 'OgreMain','llmozlib', 'user32', + 'kernel32.lib', 'gdi32.lib', 'winspool.lib', 'comdlg32.lib', 'advapi32.lib', + 'shell32.lib','ole32.lib','oleaut32.lib','uuid.lib' ] + ModuleName="navi" + active=True class betagui: version="0.16" @@ -558,6 +628,7 @@ , 'ogrevideoffmpeg' : ogrevideoffmpeg , 'ogredshow' : ogredshow , 'plib' : plib + , 'navi': navi #, 'raknet' : raknet } Modified: trunk/python-ogre/scripts/MakeRelease.bat =================================================================== --- trunk/python-ogre/scripts/MakeRelease.bat 2007-09-06 10:19:05 UTC (rev 374) +++ trunk/python-ogre/scripts/MakeRelease.bat 2007-09-12 13:40:08 UTC (rev 375) @@ -26,6 +26,7 @@ del ..\..\PythonOgreRelease\1 /s del ..\..\PythonOgreRelease\2 /s del ..\..\PythonOgreRelease\ogre.cfg /s +for /r ..\..\PythonOgreRelease\ %1 in (*) do touch %1 rem rmdir /s /q ..\..\PythonOgreRelease\demos\gui\tofix rem rmdir /s /q ..\..\PythonOgreRelease\demos\ogre\tofix Added: trunk/python-ogre/scripts/MakeSnapShot.bat =================================================================== --- trunk/python-ogre/scripts/MakeSnapShot.bat (rev 0) +++ trunk/python-ogre/scripts/MakeSnapShot.bat 2007-09-12 13:40:08 UTC (rev 375) @@ -0,0 +1,31 @@ +rem echo off +echo +echo ====== Python-Ogre Snap Shot ====== +echo = +rmdir /s /q ..\..\PythonOgreSnapShot +mkdir ..\..\PythonOgreSnapShot\packages_2.5 +mkdir ..\..\PythonOgreSnapShot\plugins +mkdir ..\..\PythonOgreSnapShot\demos +mkdir ..\..\PythonOgreSnapShot\ThirdParty +mkdir ..\..\PythonOgreSnapShot\Tools +mkdir ..\..\PythonOgreSnapShot\docs +xcopy ..\packages_2.5 ..\..\PythonOgreSnapShot\packages_2.5 /s +xcopy ..\plugins ..\..\PythonOgreSnapShot\plugins +copy ..\*.rtf ..\..\PythonOgreSnapShot +copy ..\COPYING ..\..\PythonOgreSnapShot +copy ..\*.gpl ..\..\PythonOgreSnapShot +copy ..\setup.py ..\..\PythonOgreSnapShot + +copy ..\changelog.txt ..\..\PythonOgreSnapShot +del ..\..\PythonOgreSnapShot\*.pyc /s +del ..\..\PythonOgreSnapShot\*.log /s +del ..\..\PythonOgreSnapShot\1 /s +del ..\..\PythonOgreSnapShot\2 /s +del ..\..\PythonOgreSnapShot\ogre.cfg /s +for /r ..\..\PythonOgreSnapShot\ %1 in (*) do touch %1 +rem rmdir /s /q ..\..\PythonOgreSnapShot\demos\gui\tofix +rem rmdir /s /q ..\..\PythonOgreSnapShot\demos\ogre\tofix + + + + Deleted: trunk/python-ogre/scripts/PythonOgreInstallCreator.iss =================================================================== --- trunk/python-ogre/scripts/PythonOgreInstallCreator.iss 2007-09-06 10:19:05 UTC (rev 374) +++ trunk/python-ogre/scripts/PythonOgreInstallCreator.iss 2007-09-12 13:40:08 UTC (rev 375) @@ -1,446 +0,0 @@ -; -; Python-Ogre setup script -; -[Setup] -AppName=Python-Ogre -AppVerName=Python-Ogre 1.0RC2c -DefaultDirName=C:\PythonOgre -DefaultGroupName=Python-Ogre -OutputBaseFilename=PythonOgreInstaller -OutputDir=C:\temp -SourceDir=C:\Development\PythonOgreRelease -VersionInfoDescription=First Installer Release of Python-Ogre -AllowNoIcons=true -AppPublisher=OpenSource -AppPublisherURL=http://www.python-ogre.org -AppSupportURL=http://www.python-ogre.org -AppUpdatesURL=http://www.python-ogre.org -AppVersion=1.0.2.3 -LicenseFile=LICENSE.GPL -Compression=lzma -InfoBeforeFile=InstallWarning.rtf -InfoAfterFile=postinstall.rtf -SolidCompression=true -AppCopyright=LPGL -VersionInfoCompany=OpenSource -VersionInfoTextVersion=1.0RC2c -VersionInfoCopyright=PythonOgre Development Team -RestartIfNeededByRun=false -UninstallDisplayName=PythonOgre -WizardImageFile=compiler:WizModernImage-IS.bmp -WizardSmallImageFile=compiler:WizModernSmallImage-IS.bmp -VersionInfoVersion=1.0.2.3 -[Files] -; base files, demos and tools -Source: *; DestDir: {app} -Source: plugins\*; DestDir: {app}\plugins -Source: tools\*; DestDir: {app}\tools -Source: demos\*; DestDir: {app}\demos; Flags: recursesubdirs -Source: docs\*; DestDir: {app}\docs; Flags: recursesubdirs -; the python modules - in the event we find python -Source: packages_2.5\*; DestDir: {code:GetPythonSiteDir}; Flags: recursesubdirs; Check: SelectedPython('2.5') -Source: packages_2.4\*; DestDir: {code:GetPythonSiteDir}; Flags: recursesubdirs; Check: SelectedPython('2.4') -; the python modules again - if we don't find python we install both versions in the app directory -Source: packages_2.5\*; DestDir: {app}\packages_2.5; Flags: recursesubdirs; Check: NoPythonFound -Source: packages_2.4\*; DestDir: {app}\packages_2.4; Flags: recursesubdirs; Check: NoPythonFound -; -; we need to remove the .pyc files when we uninstall -; -Source: ThirdParty\dxwebsetup.exe; DestDir: {app}\ThirdParty -Source: ThirdParty\vcredist_x86.exe; DestDir: {app}\ThirdParty - -[UninstallDelete] -Type: filesandordirs; Name: {code:GetPythonSiteDir}\ogre\*.pyc -Type: filesandordirs; Name: {code:GetPythonSiteDir}\ogre\renderer\*.pyc -Type: filesandordirs; Name: {code:GetPythonSiteDir}\ogre\renderer\OGRE\*.pyc -Type: filesandordirs; Name: {code:GetPythonSiteDir}\ogre\io\*.pyc -Type: filesandordirs; Name: {code:GetPythonSiteDir}\ogre\io\OIS\*.pyc -Type: filesandordirs; Name: {code:GetPythonSiteDir}\ogre\gui\*.pyc -Type: filesandordirs; Name: {code:GetPythonSiteDir}\ogre\gui\CEGUI\*.pyc -Type: filesandordirs; Name: {code:GetPythonSiteDir}\ogre\gui\QuickGUI\*.pyc -Type: filesandordirs; Name: {code:GetPythonSiteDir}\ogre\sound\*.pyc -Type: filesandordirs; Name: {code:GetPythonSiteDir}\ogre\sound\OgreAL\*.pyc -Type: filesandordirs; Name: {code:GetPythonSiteDir}\ogre\physics\*.pyc -Type: filesandordirs; Name: {code:GetPythonSiteDir}\ogre\physics\OgreRefApp\*.pyc -Type: filesandordirs; Name: {code:GetPythonSiteDir}\ogre\physics\ODE\*.pyc -Type: filesandordirs; Name: {code:GetPythonSiteDir}\ogre\physics\OgreOde\*.pyc -Type: filesandordirs; Name: {code:GetPythonSiteDir}\ogre\physics\OgreNewt\*.pyc - -Type: files; Name: {app}\demos\CEGUI\*.pyc -Type: files; Name: {app}\demos\CEGUI\*.log -Type: files; Name: {app}\demos\GUI\*.pyc -Type: files; Name: {app}\demos\GUI\*.log -Type: files; Name: {app}\demos\ogre\*.pyc -Type: files; Name: {app}\demos\ogre\*.log -Type: files; Name: {app}\demos\ogreode\*.pyc -Type: files; Name: {app}\demos\ogreode\*.log -Type: files; Name: {app}\demos\ogrenewt\*.pyc -Type: files; Name: {app}\demos\ogrenewt\*.log -Type: files; Name: {app}\demos\ogreal\*.pyc -Type: files; Name: {app}\demos\ogreal\*.log -Type: files; Name: {app}\demos\ode\*.pyc -Type: files; Name: {app}\demos\ode\*.log -Type: files; Name: {app}\demos\CEGUI\*.cfg -Type: files; Name: {app}\demos\GUI\*.cfg -Type: files; Name: {app}\demos\ogre\*.cfg -Type: files; Name: {app}\demos\ogreode\*.cfg -Type: files; Name: {app}\demos\ogrenewt\*.cfg -Type: files; Name: {app}\demos\ogreal\*.cfg -Type: files; Name: {app}\demos\ode\*.cfg -Type: dirifempty; Name: {app}\demos\CEGUI -Type: dirifempty; Name: {app}\demos\GUI -Type: dirifempty; Name: {app}\demos\ogre -Type: dirifempty; Name: {app}\demos\ogreode -Type: dirifempty; Name: {app}\demos\ogrenewt -Type: dirifempty; Name: {app}\demos\ogreal -Type: dirifempty; Name: {app}\demos\ode -Type: dirifempty; Name: {app}\demos -Type: dirifempty; Name: {app} - -; -; I REALLY DON'T like doing this but if people have used a previous version of Python-Ogre -; I need to remove it to force any existing source code to fail and hence have them -; update to the new directory structure.. -; being very conservative in this!!!!!!!!!!!!! -; -[InstallDelete] -Type: files; Name: {code:GetPythonSiteDir}\Ogre\*.pyd -Type: files; Name: {code:GetPythonSiteDir}\OIS\*.pyd -Type: files; Name: {code:GetPythonSiteDir}\GUI\*.pyd -Type: files; Name: {code:GetPythonSiteDir}\OgreOde\*.pyd -Type: files; Name: {code:GetPythonSiteDir}\OgreNewt\*.pyd -Type: files; Name: {code:GetPythonSiteDir}\OgreAL\*.pyd -Type: files; Name: {code:GetPythonSiteDir}\OgreRefApp\*.pyd -Type: files; Name: {code:GetPythonSiteDir}\ODE\*.pyd -Type: files; Name: {code:GetPythonSiteDir}\FMOD\*.pyd - -Type: files; Name: {code:GetPythonSiteDir}\Ogre\*.dll -Type: files; Name: {code:GetPythonSiteDir}\OIS\*.dll -Type: files; Name: {code:GetPythonSiteDir}\GUI\*.dll -Type: files; Name: {code:GetPythonSiteDir}\OgreOde\*.dll -Type: files; Name: {code:GetPythonSiteDir}\OgreNewt\*.dll -Type: files; Name: {code:GetPythonSiteDir}\OgreAL\*.dll -Type: files; Name: {code:GetPythonSiteDir}\OgreRefApp\*.dll -Type: files; Name: {code:GetPythonSiteDir}\ODE\*.dll -Type: files; Name: {code:GetPythonSiteDir}\FMOD\*.dll - -Type: files; Name: {code:GetPythonSiteDir}\Ogre\_*.p* -Type: files; Name: {code:GetPythonSiteDir}\OIS\_*.p* -Type: files; Name: {code:GetPythonSiteDir}\GUI\_*.p* -Type: files; Name: {code:GetPythonSiteDir}\OgreOde\_*.p* -Type: files; Name: {code:GetPythonSiteDir}\OgreNewt\_*.p* -Type: files; Name: {code:GetPythonSiteDir}\OgreAL\_*.p* -Type: files; Name: {code:GetPythonSiteDir}\OgreRefApp\_*.p* -Type: files; Name: {code:GetPythonSiteDir}\ODE\_*.p* -Type: files; Name: {code:GetPythonSiteDir}\FMOD\_*.p* - -Type: files; Name: {code:GetPythonSiteDir}\Ogre\sf_*.* - -Type: files; Name: {code:GetPythonSiteDir}\Ogre -Type: files; Name: {code:GetPythonSiteDir}\OIS -Type: files; Name: {code:GetPythonSiteDir}\GUI -Type: files; Name: {code:GetPythonSiteDir}\OgreOde -Type: files; Name: {code:GetPythonSiteDir}\OgreNewt -Type: files; Name: {code:GetPythonSiteDir}\OgreAL -Type: files; Name: {code:GetPythonSiteDir}\OgreRefApp -Type: files; Name: {code:GetPythonSiteDir}\ODE -Type: files; Name: {code:GetPythonSiteDir}\FMOD - -Type: dirifempty; Name: {code:GetPythonSiteDir}\Ogre -Type: dirifempty; Name: {code:GetPythonSiteDir}\OIS -Type: dirifempty; Name: {code:GetPythonSiteDir}\GUI -Type: dirifempty; Name: {code:GetPythonSiteDir}\OgreOde -Type: dirifempty; Name: {code:GetPythonSiteDir}\OgreNewt -Type: dirifempty; Name: {code:GetPythonSiteDir}\OgreAL -Type: dirifempty; Name: {code:GetPythonSiteDir}\OgreRefApp -Type: dirifempty; Name: {code:GetPythonSiteDir}\ODE - -[Icons] -Name: {group}\Ogre Demos\Bezier; Filename: {code:GetPythonExe}; Parameters: Demo_Bezier.py; WorkingDir: {app}\Demos\Ogre -Name: {group}\Ogre Demos\BSP; Filename: {code:GetPythonExe}; Parameters: Demo_BSP.py; WorkingDir: {app}\Demos\Ogre -Name: {group}\Ogre Demos\BSP_Collision; Filename: {code:GetPythonExe}; Parameters: Demo_BspCollision.py; WorkingDir: {app}\Demos\Ogre -Name: {group}\Ogre Demos\Camera Tracking; Filename: {code:GetPythonExe}; Parameters: Demo_CameraTracking.py; WorkingDir: {app}\Demos\Ogre -Name: {group}\Ogre Demos\CEL Shading; Filename: {code:GetPythonExe}; Parameters: Demo_CelShading.py; WorkingDir: {app}\Demos\Ogre -Name: {group}\Ogre Demos\Compositor; Filename: {code:GetPythonExe}; Parameters: Demo_Compositor.py; WorkingDir: {app}\Demos\Ogre -Name: {group}\Ogre Demos\ENV Map; Filename: {code:GetPythonExe}; Parameters: Demo_EnvMap.py; WorkingDir: {app}\Demos\Ogre -Name: {group}\Ogre Demos\Facial; Filename: {code:GetPythonExe}; Parameters: Demo_Facial.py; WorkingDir: {app}\Demos\Ogre -Name: {group}\Ogre ... [truncated message content] |
From: <and...@us...> - 2007-09-17 01:26:59
|
Revision: 376 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=376&view=rev Author: andy_miller Date: 2007-09-16 18:27:01 -0700 (Sun, 16 Sep 2007) Log Message: ----------- Added access to CEGUI.Window.setUserData and getUserData Further NXOgre updates Fix for correct QuickGui compiling and support for latest SVN Modified Paths: -------------- trunk/python-ogre/code_generators/cegui/generate_code.py trunk/python-ogre/code_generators/cegui/hand_made_wrappers.py trunk/python-ogre/code_generators/nxogre/generate_code.py trunk/python-ogre/code_generators/nxogre/python_nxogre_aliases.h trunk/python-ogre/code_generators/ogrenewt/hand_made_wrappers.py trunk/python-ogre/code_generators/quickgui/generate_code.py trunk/python-ogre/environment.py Modified: trunk/python-ogre/code_generators/cegui/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/cegui/generate_code.py 2007-09-12 13:40:08 UTC (rev 375) +++ trunk/python-ogre/code_generators/cegui/generate_code.py 2007-09-17 01:27:01 UTC (rev 376) @@ -145,6 +145,10 @@ print "Excluding Iterator", cls.name CEGUI_ns.class_('OgreCEGUIResourceProvider').exclude() # it's _ogrePrivate.. + ## Replaced these with 'useful' functions in the handwrappers - take and return python objects + CEGUI_ns.class_( "Window" ).member_functions("setUserData").exclude() + CEGUI_ns.class_( "Window" ).member_functions("getUserData").exclude() + global_ns.namespace( 'Ogre' ).class_('SceneManager').include(already_exposed=True) global_ns.namespace( 'Ogre' ).class_('RenderWindow').include(already_exposed=True) Modified: trunk/python-ogre/code_generators/cegui/hand_made_wrappers.py =================================================================== --- trunk/python-ogre/code_generators/cegui/hand_made_wrappers.py 2007-09-12 13:40:08 UTC (rev 375) +++ trunk/python-ogre/code_generators/cegui/hand_made_wrappers.py 2007-09-17 01:27:01 UTC (rev 376) @@ -353,7 +353,31 @@ bp::return_value_policy< bp::reference_existing_object, bp::default_call_policies >()); """ +WRAPPER_DEFINITION_Window=\ +""" +void +Window_setUserData ( ::CEGUI::Window & me, PyObject * data ) { + me.setUserData ( data ); + } + +PyObject * +Window_getUserData ( ::CEGUI::Window & me) { + void * data = me.getUserData ( ); + Py_INCREF( (PyObject *) data ); // I'm passing a reference to this object so better inc the ref :) + return (PyObject *) data; + } +""" + +WRAPPER_REGISTRATION_Window =[ + 'def ("setUserData", &::Window_setUserData );', + 'def ("getUserData", &::Window_getUserData);' + ] + +def apply_reg ( class_, code ): + for c in code: + class_.add_registration_code ( c ) + def apply( mb ): # # mb.add_declaration_code( WRAPPER_DEFINITION_General ) # # mb.add_registration_code( WRAPPER_REGISTRATION_General ) @@ -365,3 +389,7 @@ rt = mb.class_( 'String' ) rt.add_declaration_code( WRAPPER_DEFINITION_String ) rt.add_registration_code( WRAPPER_REGISTRATION_String ) + + rt = mb.class_( 'Window' ) + rt.add_declaration_code( WRAPPER_DEFINITION_Window ) + apply_reg( rt, WRAPPER_REGISTRATION_Window ) Modified: trunk/python-ogre/code_generators/nxogre/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/nxogre/generate_code.py 2007-09-12 13:40:08 UTC (rev 375) +++ trunk/python-ogre/code_generators/nxogre/generate_code.py 2007-09-17 01:27:01 UTC (rev 376) @@ -102,6 +102,17 @@ ,'::NxOgre::List<NxOgre::RemoteDebuggerConnection::Camera>::destroyAndEraseAll' ,'::NxOgre::List<NxOgre::RemoteDebuggerConnection::Camera>::dumpToConsole' + +# ,'::NxOgre::Container<std::string, NxOgre::Joint*>::dumpToConsole' +# ,'::NxOgre::Container<std::string, NxOgre::Joint*>::count' +# ,'::NxOgre::Container<std::string, NxOgre::Joint*>::empty' +# ,'::NxOgre::Container<std::string, NxOgre::Joint*>::insert' +# ,'::NxOgre::Container<std::string, NxOgre::Joint*>::lock' +# ,'::NxOgre::Container<std::string, NxOgre::Joint*>::isLocked' +# ,'::NxOgre::Container<std::string, NxOgre::Joint*>::has' +# ,'::NxOgre::Container<std::string, NxOgre::Joint*>::getFirst' + + ,'::NxOgre::UserAllocator::realloc' # # # # not yet implemented in source ,'::NxOgre::WheelSet::attachNewWheel' @@ -155,7 +166,13 @@ for e in excludes: print "excluding ", e main_ns.member_functions(e).exclude() - + + ## this is probably excessive :) + names = ['_begin','_end', '_atEnd', '_next'] + for f in main_ns.member_functions(): + if f.name in names: + print "excuding MF:", f.name, f + f.exclude() ### Free Functions excludes = [] for e in excludes: @@ -170,7 +187,7 @@ ,'::NxOgre::Serialiser::SerialiserBase' ,'::NxOgre::UserAllocator' ,'::NxOgre::State' - + # not yet implemented in source ] for e in excludes: @@ -180,15 +197,17 @@ ## I have a challenge that Py++ doesn't recognise these classes by full name (perhaps because they are structs?) ## so I have to look through and match on a class by class basis excludeName = ['Container<NxOgre::Scene::Renderables, float>' - ,'Container<std::string,NxOgre::Actor*>' + ,'Container<std::string, NxOgre::Actor*>' ,'List<NxOgre::CharacterHitReport*>' ,'List<NxOgre::RemoteDebuggerConnection::Camera>' ,'List<NxOgre::Blueprints::ActorBlueprint*>' + ,'Container<std::string, NxOgre::Joint*>' ] for c in main_ns.classes(): # print c.decl_string -# print c.name + print ("Checking:",c.name) if c.name in excludeName: + print ("SPECIAL excluding ", c.name) c.exclude() # a temporary fix for container based classes -- still an issue with them though... # AND this is an overkill -- not all classes need these removed... Modified: trunk/python-ogre/code_generators/nxogre/python_nxogre_aliases.h =================================================================== --- trunk/python-ogre/code_generators/nxogre/python_nxogre_aliases.h 2007-09-12 13:40:08 UTC (rev 375) +++ trunk/python-ogre/code_generators/nxogre/python_nxogre_aliases.h 2007-09-17 01:27:01 UTC (rev 376) @@ -96,8 +96,6 @@ typedef NxOgre::Container<NxOgre::NxString, NxOgre::FluidDrain*> FluidDrains; typedef NxOgre::Container<NxOgre::NxString, NxOgre::FluidEmitter*> FluidEmitters; typedef NxOgre::Container<NxOgre::NxString, NxOgre::SoftBody*> SoftBodies; -// typedef std::map<NxOgre::TI, NxOgre::Containee > Type; -// typedef std::list<NxOgre::TT> Type; typedef std::pair<NxOgre::NxString,NxOgre::NxString> Parameter; typedef std::vector<Parameter> Parameters; typedef Ogre::String NxString; @@ -109,7 +107,7 @@ typedef NxOgre::Container<NxOgre::NxString, NxOgre::Cloth*> Cloths; typedef NxOgre::Container<NxOgre::NxErrorIndex, NxOgre::ErrorReporter*> ErrorReporterList; typedef NxOgre::Container<NxOgre::NxString, NxOgre::Helper*> Helpers; -typedef NxOgre::Container<NxOgre::NxString, NxOgre::Joint*> Joints; +typedef NxOgre::Container<NxOgre::NxString, NxOgre::Joint*> JointsClass; typedef NxOgre::Container<NxOgre::NxString, NxOgre::Material*> MaterialList; // typedef NxOgre::Container<NxOgre::NxMaterialIndex, NxOgre::Material*> MaterialListByIndex; // typedef NxOgre::Container<NxOgre::NxString, NxOgre::NxMaterialIndex> MaterialPair; @@ -127,3 +125,7 @@ typedef std::vector<std::pair<Ogre::Vector3, unsigned>, std::allocator<std::pair<Ogre::Vector3, unsigned> > > VectorPairVector3; typedef std::set<Ogre::Entity*,std::less<Ogre::Entity*>,std::allocator<Ogre::Entity*> > SetEntity; typedef NxOgre::Material NxOgreMaterial; +typedef std::map<unsigned, NxOgre::Container<unsigned, NxOgre::Joint*>::Containee, std::less<unsigned>, std::allocator<std::pair<unsigned const, NxOgre::Container<unsigned, NxOgre::Joint*>::Containee> > >\ + MapContainerJointContainee; +typedef std::map<unsigned short, NxOgre::Container<unsigned short, NxOgre::DominanceGroup*>::Containee, std::less<unsigned short>, std::allocator<std::pair<unsigned short const, NxOgre::Container<unsigned short, NxOgre::DominanceGroup*>::Containee> > >\ + MapContainerDominanceGroupContainee; \ No newline at end of file Modified: trunk/python-ogre/code_generators/ogrenewt/hand_made_wrappers.py =================================================================== --- trunk/python-ogre/code_generators/ogrenewt/hand_made_wrappers.py 2007-09-12 13:40:08 UTC (rev 375) +++ trunk/python-ogre/code_generators/ogrenewt/hand_made_wrappers.py 2007-09-17 01:27:01 UTC (rev 376) @@ -449,6 +449,7 @@ cs = mb.namespace( 'BasicJoints' ).class_("Slider" ) cs.add_declaration_code( WRAPPER_DEFINITION_Slider ) apply_reg (cs, WRAPPER_REGISTRATION_Slider ) + cs = mb.namespace( 'BasicJoints' ).class_("Universal" ) cs.add_declaration_code( WRAPPER_DEFINITION_Universal ) apply_reg (cs, WRAPPER_REGISTRATION_Universal ) Modified: trunk/python-ogre/code_generators/quickgui/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/quickgui/generate_code.py 2007-09-12 13:40:08 UTC (rev 375) +++ trunk/python-ogre/code_generators/quickgui/generate_code.py 2007-09-17 01:27:01 UTC (rev 376) @@ -77,7 +77,7 @@ excludes=[\ '::QuickGUI::QuadContainer::_populateRenderObjectList' ,'::QuickGUI::QuadContainer::_updateRenderQueue' - ,'::QuickGUI::GUIManager::getDefaultFont' + ##,'::QuickGUI::GUIManager::getDefaultFont' ] for e in excludes: print "excluding function", e Modified: trunk/python-ogre/environment.py =================================================================== --- trunk/python-ogre/environment.py 2007-09-12 13:40:08 UTC (rev 375) +++ trunk/python-ogre/environment.py 2007-09-17 01:27:01 UTC (rev 376) @@ -152,6 +152,7 @@ moduleName='OGRE' cflags = "" moduleParentLocation = "renderer" + parent = "ogre/renderer" dependsOn = ['boost'] myLibraryPaths = [] myLibraries = ['OgreMain'] @@ -384,7 +385,8 @@ class quickgui: version="0.9.6" parent="ogre/gui" - CCFLAGS = ' /D "WIN32" /D "NDEBUG", /D "WINDOWS"' ###/D "OGRE_PLATFORM_WIN32"' # /D "FT2_BUILD_LIBRARY" + ## note the defined for _QuickGUIExport forces non dll usage + CCFLAGS = ' /D WIN32 /D NDEBUG /D WINDOWS /D _QuickGUIExport="" ' cflags="" include_dirs = [ Config.PATH_Boost, Config.PATH_INCLUDE_Ogre, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2007-09-17 07:09:03
|
Revision: 379 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=379&view=rev Author: andy_miller Date: 2007-09-17 00:09:05 -0700 (Mon, 17 Sep 2007) Log Message: ----------- Linux updates Modified Paths: -------------- trunk/python-ogre/PythonOgreConfig_posix.py trunk/python-ogre/environment.py Modified: trunk/python-ogre/PythonOgreConfig_posix.py =================================================================== --- trunk/python-ogre/PythonOgreConfig_posix.py 2007-09-17 04:21:58 UTC (rev 378) +++ trunk/python-ogre/PythonOgreConfig_posix.py 2007-09-17 07:09:05 UTC (rev 379) @@ -4,16 +4,16 @@ ## Boost stuff ## path to the root of your boost dir, should have 'libs', 'boost' subdirectories module_dir = os.path.abspath(os.path.dirname(__file__) )## The root directory is where this module is located - ## lets assume that the base development directory is one level higher BASE_DIR,ignore = os.path.split(module_dir) ## r'/home/andy/development' -ROOT_DIR = os.path.join(BASE_DIR,'root') +ROOT_DIR = os.path.join(BASE_DIR,'root') +root_dir = os.path.abspath(os.path.dirname(__file__) )## The root directory is where this module is located +LOCAL_LIB = os.path.join(ROOT_DIR,'usr/lib') +LOCAL_INCLUDE = os.path.join(ROOT_DIR, 'usr/include') -LOCAL_LIB = os.path.join(ROOT_DIR,'/usr/lib') -LOCAL_INCLUDE = os.path.join(ROOT_DIR, '/usr/include') -PATH_Boost = os.path.join(LOCAL_INCLUDE, 'boost_1_34') +PATH_Boost = os.path.join(LOCAL_INCLUDE, 'boost-1_34') # PATH_LIB_Boost = LOCAL_LIB @@ -29,21 +29,29 @@ # # ## Parent directories of the libraries PATH_Ogre = os.path.join(BASE_DIR,'ogrenew') -# # PATH_OgreAddons = os.path.join(BASE_DIR, 'OgreAddons') -# # PATH_CEGUI = os.path.join(BASE_DIR, 'CEGUI-0.5.0') -# # PATH_OIS = os.path.join(BASE_DIR, 'ois-1.0RC1') -# # PATH_Newton = os.path.join(BASE_DIR, 'newtonsdk/sdk') +PATH_OgreAddons = os.path.join(BASE_DIR, 'OgreAddons') +PATH_CEGUI = os.path.join(BASE_DIR, 'CEGUI-0.5.0') +PATH_OIS = os.path.join(BASE_DIR, 'ois-1.0RC1') +PATH_Newton = os.path.join(BASE_DIR, 'newtonSDK/sdk') # # PATH_FMOD = os.path.join(BASE_DIR, 'fmod') -# # PATH_ODE = os.path.join(BASE_DIR, 'opende/trunk') -# # PATH_OGREAL= os.path.join(BASE_DIR, 'ogreal/trunk/OgreAL-Eihort') -# # PATH_OGG = os.path.join(BASE_DIR, 'ogg') -# # PATH_VORBIS= os.path.join(BASE_DIR, 'vorbis') -# # PATH_OPENAL= os.path.join(BASE_DIR, 'openal') -# # PATH_ALUT= os.path.join(BASE_DIR, 'freealut') +PATH_ODE = os.path.join(BASE_DIR, 'ode-0.8') +PATH_OGREAL= os.path.join(BASE_DIR, 'OgreAL') +PATH_OGG = os.path.join(BASE_DIR, 'ogg') +PATH_VORBIS= os.path.join(BASE_DIR, 'vorbis') +PATH_OPENAL= os.path.join(BASE_DIR, 'openal') +PATH_ALUT= os.path.join(BASE_DIR, 'freealut') PATH_OgreOde= os.path.join(BASE_DIR, 'OgreAddons/ogreode') PATH_betagui= os.path.join(BASE_DIR, 'betagui') # PATH_raknet= os.path.join(BASE_DIR, 'RakNet') PATH_simplegui= os.path.join(module_dir, 'ThirdParty/simplegui') +PATH_quickgui= os.path.join(BASE_DIR, 'Quickgui') ## note test for Quickgui SVN version +PATH_plib = os.path.join(BASE_DIR, 'plib') +PATH_navi = os.path.join(BASE_DIR, 'navi','Navi') +PATH_NxOgre= os.path.join(BASE_DIR, 'nxogre/NxOgre') +PATH_PhysX= os.path.join(BASE_DIR, 'AGEIA Technologies/SDK/v2.7.2/SDKs') +PATH_Theora= os.path.join(PATH_OgreAddons,'videoplugin','TheoraVideo') +PATH_ogrevideoffmpeg = os.path.join(root_dir, 'ThirdParty','ffmpeg') +PATH_ffmpeg= os.path.join(BASE_DIR, 'ffmpeg') @@ -61,6 +69,7 @@ PATH_LIB_Ogre_CEGUIRenderer = os.path.join( LOCAL_LIB ) #, 'Samples/Common/CEGUIRenderer/lib') PATH_LIB_Ogre_OgreMain= os.path.join( LOCAL_LIB ) # PATH_Ogre, 'OgreMain/lib/Release' ) PATH_LIB_Ogre_Dependencies = os.path.join( LOCAL_LIB ) # , 'Dependencies/lib/Release') +PATH_LIB_quickgui = os.path.join(PATH_quickgui, 'bin') @@ -77,7 +86,16 @@ PATH_LIB_OgreAL = os.path.join( LOCAL_LIB ) #PATH_OGREAL, 'lib/Release' ) PATH_LIB_betagui = PATH_betagui PATH_LIB_simplegui = PATH_simplegui -# PATH_LIB_raknet = os.path.join( LOCAL_LIB ) #PATH_raknet, 'Lib' ) +# PATH_LIB_raknet = os.path.join( LOCAL_LIB ) #PATH_raknet, 'Lib' ) +PATH_LIB_OPCODE = os.path.join( LOCAL_LIB ) +PATH_LIB_Bullet = os.path.join( LOCAL_LIB ) +PATH_LIB_plib = PATH_plib +PATH_LIB_navi= os.path.join(PATH_navi, 'lib') +PATH_LIB_NxOgre= os.path.join(LOCAL_LIB ) +PATH_LIB_PhysX = os.path.join(PATH_PhysX,'lib/win32') +PATH_LIB_Theora= os.path.join(PATH_Theora, 'bin', 'Release') +PATH_LIB_ogrevideoffmpeg = PATH_ogrevideoffmpeg +PATH_LIB_ffmpeg= os.path.join(PATH_ffmpeg, 'lib') PATH_INCLUDE_Ogre= os.path.join(LOCAL_INCLUDE,'OGRE') # os.path.join(PATH_Ogre,'OgreMain/include') @@ -90,6 +108,7 @@ PATH_INCLUDE_ODE = os.path.join(LOCAL_INCLUDE,'ODE') #os.path.join( PATH_ODE, 'include') PATH_INCLUDE_ODESOURCE = '' # os.path.join( PATH_ODE, 'ode/src') +PATH_INCLUDE_quickgui = os.path.join(PATH_quickgui,'QuickGUI','include') PATH_INCLUDE_OgreAL = ''# os.path.join( PATH_OGREAL, 'include' ) PATH_INCLUDE_OPENAL = ''# os.path.join( PATH_OPENAL, 'include') @@ -100,8 +119,32 @@ PATH_INCLUDE_OgreOde = os.path.join( PATH_OgreOde,'include') PATH_INCLUDE_OgreOdePrefab= os.path.join( PATH_OgreOde,'prefab/include') PATH_INCLUDE_OgreOdeLoader= os.path.join( PATH_OgreOde,'loader/include') +PATH_INCLUDE_NxOgre= os.path.join(PATH_NxOgre, 'include') PATH_INCLUDE_betagui = PATH_betagui PATH_INCLUDE_simplegui = PATH_simplegui # PATH_INCLUDE_raknet = os.path.join(PATH_raknet, 'Source' ) -PATH_INCLUDE_Ogre_CEGUIRenderer = os.path.join( PATH_Ogre, 'samples/Common/CEGUIRenderer/include') +PATH_INCLUDE_Ogre_CEGUIRenderer = os.path.join( PATH_Ogre, 'samples/Common/CEGUIRenderer/include') +PATH_INCLUDE_OPCODE = os.path.join( LOCAL_INCLUDE ) +PATH_INCLUDE_Bullet = os.path.join( LOCAL_INCLUDE ) +PATH_INCLUDE_navi = os.path.join (PATH_navi,'include') +PATH_INCLUDE_plib = PATH_plib +PATH_INCLUDE_Theora = os.path.join (PATH_Theora,'include') +PATH_INCLUDE_ogrevideoffmpeg = PATH_ogrevideoffmpeg +PATH_INCLUDE_ffmpeg = os.path.join (PATH_ffmpeg,'include') +PATH_INCLUDE_plib = PATH_plib +PATH_INCLUDE_navi = os.path.join (PATH_navi,'include') + +PATH_INCLUDE_OggVorbisTheora = [ os.path.join(BASE_DIR,'ogg','include') + ,os.path.join(BASE_DIR, 'vorbis', 'include') + ,os.path.join(PATH_OgreAddons,'videoplugin','theora','include') + ,os.path.join(PATH_OgreAddons,'videoplugin','ptypes-1.8.3','include') + ] + +PATH_INCLUDE_PhysX= [ os.path.join(PATH_PhysX, 'Physics','include') + ,os.path.join(PATH_PhysX, 'Cooking','include') + ,os.path.join(PATH_PhysX, 'Foundation','include') + ,os.path.join(PATH_PhysX, 'PhysXLoader','include') + ,os.path.join(PATH_PhysX, 'NxCharacter','include') + ,os.path.join(PATH_PhysX, 'NxExtensions','include') + ] Modified: trunk/python-ogre/environment.py =================================================================== --- trunk/python-ogre/environment.py 2007-09-17 04:21:58 UTC (rev 378) +++ trunk/python-ogre/environment.py 2007-09-17 07:09:05 UTC (rev 379) @@ -366,22 +366,6 @@ ModuleName='OgreOde' active=True -class fmod: - version= "4.06" - parent = "ogre/sound" - include_dirs=[Config.PATH_Boost - ,Config.PATH_INCLUDE_FMOD - ] - lib_dirs = [ Config.PATH_LIB_Boost - ,Config.PATH_LIB_FMOD - ] - - CCFLAGS = ' /D "NDEBUG" /D "WIN32" /D "_MBCS" ' - ModuleName = 'FMOD' - CheckIncludes = ['fmod.h'] - active=False - - class quickgui: version="0.9.6" parent="ogre/gui" @@ -588,22 +572,27 @@ ModuleName="ogrevideoffmpeg" active=True -class ogredshow: +class ogredshow: version="0.1" parent="ogre/addons" cflags = "" - include_dirs = [ Config.PATH_Boost, - Config.PATH_INCLUDE_Ogre, - Config.PATH_INCLUDE_ogredshow - ] - lib_dirs = [Config.PATH_LIB_Boost, - Config.PATH_LIB_Ogre_OgreMain, - Config.PATH_LIB_ogredshow - ] - CheckIncludes=[] - libs=[ Config.LIB_Boost, 'OgreMain','Strmiids' , 'ole32'] ModuleName="ogredshow" - active=True + if os.name == "nt": + include_dirs = [ Config.PATH_Boost, + Config.PATH_INCLUDE_Ogre, + Config.PATH_INCLUDE_ogredshow + ] + lib_dirs = [Config.PATH_LIB_Boost, + Config.PATH_LIB_Ogre_OgreMain, + Config.PATH_LIB_ogredshow + ] + CheckIncludes=[] + libs=[ Config.LIB_Boost, 'OgreMain','Strmiids' , 'ole32'] + active=True + else: + active=False + + ############################################################################################ ## Here is the master list.... @@ -617,7 +606,6 @@ , 'newton' : newton , 'ogrerefapp' : ogrerefapp , 'ogrenewt' : ogrenewt - , 'fmod' : fmod , 'ogreode' : ogreode , 'ogreal' : ogreal , 'quickgui' : quickgui This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2007-09-19 10:11:12
|
Revision: 384 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=384&view=rev Author: andy_miller Date: 2007-09-19 03:11:11 -0700 (Wed, 19 Sep 2007) Log Message: ----------- Further Linux build improvements - typos in CEGUI/ode/quickgui paths Reordered the code generation and build to only do ogre, OIS, CEGUI, ogrerefapp, and quickgui Modified Paths: -------------- trunk/python-ogre/PythonOgreConfig_posix.py trunk/python-ogre/scripts/06-GenerateCode.sh trunk/python-ogre/scripts/07-BuildModules.sh Modified: trunk/python-ogre/PythonOgreConfig_posix.py =================================================================== --- trunk/python-ogre/PythonOgreConfig_posix.py 2007-09-18 12:15:39 UTC (rev 383) +++ trunk/python-ogre/PythonOgreConfig_posix.py 2007-09-19 10:11:11 UTC (rev 384) @@ -44,7 +44,7 @@ PATH_betagui= os.path.join(BASE_DIR, 'betagui') # PATH_raknet= os.path.join(BASE_DIR, 'RakNet') PATH_simplegui= os.path.join(module_dir, 'ThirdParty/simplegui') -PATH_quickgui= os.path.join(BASE_DIR, 'Quickgui') ## note test for Quickgui SVN version +PATH_quickgui= os.path.join(BASE_DIR, 'quickgui') ## note test for Quickgui SVN version PATH_plib = os.path.join(BASE_DIR, 'plib') PATH_navi = os.path.join(BASE_DIR, 'navi','Navi') PATH_NxOgre= os.path.join(BASE_DIR, 'nxogre/NxOgre') @@ -105,7 +105,7 @@ PATH_INCLUDE_OgreRefApp = os.path.join(PATH_Ogre,'ReferenceApplication/ReferenceAppLayer/include') PATH_INCLUDE_OgreNewt = os.path.join(LOCAL_INCLUDE,'OgreNewt') #os.path.join(PATH_OgreAddons,'ogrenewt/OgreNewt_Main/inc') PATH_INCLUDE_CEGUI = os.path.join(LOCAL_INCLUDE,'CEGUI') #os.path.join(PATH_CEGUI, r'include/CEGUI') -PATH_INCLUDE_ODE = os.path.join(LOCAL_INCLUDE,'ODE') #os.path.join( PATH_ODE, 'include') +PATH_INCLUDE_ODE = os.path.join(LOCAL_INCLUDE,'ode') #os.path.join( PATH_ODE, 'include') PATH_INCLUDE_ODESOURCE = '' # os.path.join( PATH_ODE, 'ode/src') PATH_INCLUDE_quickgui = os.path.join(PATH_quickgui,'QuickGUI','include') @@ -124,7 +124,7 @@ PATH_INCLUDE_betagui = PATH_betagui PATH_INCLUDE_simplegui = PATH_simplegui # PATH_INCLUDE_raknet = os.path.join(PATH_raknet, 'Source' ) -PATH_INCLUDE_Ogre_CEGUIRenderer = os.path.join( PATH_Ogre, 'samples/Common/CEGUIRenderer/include') +PATH_INCLUDE_Ogre_CEGUIRenderer = os.path.join( PATH_Ogre, 'Samples/Common/CEGUIRenderer/include') PATH_INCLUDE_OPCODE = os.path.join( LOCAL_INCLUDE ) PATH_INCLUDE_Bullet = os.path.join( LOCAL_INCLUDE ) PATH_INCLUDE_navi = os.path.join (PATH_navi,'include') Modified: trunk/python-ogre/scripts/06-GenerateCode.sh =================================================================== --- trunk/python-ogre/scripts/06-GenerateCode.sh 2007-09-18 12:15:39 UTC (rev 383) +++ trunk/python-ogre/scripts/06-GenerateCode.sh 2007-09-19 10:11:11 UTC (rev 384) @@ -5,18 +5,15 @@ source ./config.sh echo "=== generating code ===" +cd python-ogre/code_generators echo ' -- creating OGRE code' -cd python-ogre/code_generators/ogre +cd ogre python generate_code.py > build.out cd .. echo ' -- creating OGRErefapp code' cd ogrerefapp python generate_code.py > build.out cd .. -#echo ' -- creating OgreAL code' -#cd ogreal -#python generate_code.py > build.out -#cd .. echo ' -- creating quickgui code' cd quickgui python generate_code.py > build.out @@ -25,21 +22,25 @@ cd ois python generate_code.py > build.out cd .. -echo ' -- creating OGREode code' -cd ogreode +echo ' -- creating CEGUI code' +cd cegui python generate_code.py > build.out -cd .. +cd .. +#echo ' -- creating OgreAL code' +#cd ogreal +#python generate_code.py > build.out +#cd .. +#echo ' -- creating OGREode code' +#cd ogreode +#python generate_code.py > build.out +#cd .. #echo ' -- creating OGREnewt code' #cd ogrenewt #python generate_code.py > build.out #cd .. -echo ' -- creating ode code' -cd ode -python generate_code.py > build.out -cd .. -echo ' -- creating CEGUI code' -cd cegui -python generate_code.py > build.out +#echo ' -- creating ode code' +#cd ode +#python generate_code.py > build.out cd $INSTALL_DIR echo echo "=== done building code ===" Modified: trunk/python-ogre/scripts/07-BuildModules.sh =================================================================== --- trunk/python-ogre/scripts/07-BuildModules.sh 2007-09-18 12:15:39 UTC (rev 383) +++ trunk/python-ogre/scripts/07-BuildModules.sh 2007-09-19 10:11:11 UTC (rev 384) @@ -9,5 +9,6 @@ # cd python-ogre scons PROJECTS=ogre,ois,quickgui,cegui,ogrerefapp +python setup.py install cd .. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2007-09-22 05:01:36
|
Revision: 386 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=386&view=rev Author: andy_miller Date: 2007-09-21 22:01:38 -0700 (Fri, 21 Sep 2007) Log Message: ----------- Clean up -- moving source into the PythonOgre thirdparty area (plib, ogreal, etc) to make building simpler Modified Paths: -------------- trunk/python-ogre/PythonOgreConfig_nt.py trunk/python-ogre/PythonOgreConfig_posix.py trunk/python-ogre/code_generators/ogre/hand_made_wrappers.py trunk/python-ogre/code_generators/ogreal/generate_code.py trunk/python-ogre/code_generators/ogreode/generate_code.py trunk/python-ogre/code_generators/plib/generate_code.py trunk/python-ogre/code_generators/quickgui/generate_code.py trunk/python-ogre/environment.py Modified: trunk/python-ogre/PythonOgreConfig_nt.py =================================================================== --- trunk/python-ogre/PythonOgreConfig_nt.py 2007-09-20 07:09:24 UTC (rev 385) +++ trunk/python-ogre/PythonOgreConfig_nt.py 2007-09-22 05:01:38 UTC (rev 386) @@ -1,112 +1,92 @@ import os SDK=True ## set to true if buiding from 1.4 release source... -BASE_DIR = 'c:/development' -root_dir = os.path.abspath(os.path.dirname(__file__) )## The root directory is where this module is located +## The root directory is where this module is located +module_dir = os.path.abspath(os.path.dirname(__file__) ) +BASE_DIR, ignore = os.path.split(module_dir) -## Boost stuff ## path to the root of your boost dir, should have 'libs', 'boost' subdirectories PATH_Boost = os.path.join(BASE_DIR, 'boost') ## Path to your boost_pythonxxxx lib file PATH_LIB_Boost = os.path.join(BASE_DIR, 'boost/bin.v2/libs/python2.5/build/msvc-8.0/release/threading-multi') -## PATH_LIB_Boost = os.path.join(BASE_DIR, 'boost/bin.v2/libs/python2.4/build/msvc-7.1/release/threading-multi') ## and the name of the boost python library -LIB_Boost = r'boost_python-vc71-mt-1_35' LIB_Boost = r'boost_python-vc80-mt-1_35' + # We need to know where to find gccxml...... gccxml_bin = os.path.join(BASE_DIR, 'gccxml/bin/release/gccxml.exe') # and the Py++ directory as sometimes we need access to the code repository there pyplusplus_install_dir = os.path.join(BASE_DIR, 'pygccxml') ## Parent directories of the libraries -PATH_Ogre = os.path.join(BASE_DIR,'Ogrenew') +PATH_THIRDPARTY = os.path.join(module_dir, 'ThirdParty' ) +PATH_Ogre = os.path.join(BASE_DIR, 'ogrenew') PATH_OgreAddons = os.path.join(BASE_DIR, 'OgreAddons') -PATH_CEGUI = os.path.join(BASE_DIR, 'cegui-0.5.0') -PATH_OIS = os.path.join(BASE_DIR, 'ois') +PATH_CEGUI = os.path.join(BASE_DIR, 'CEGUI-0.5.0') +PATH_OIS = os.path.join(BASE_DIR, 'ois-1.0RC1') PATH_Newton = os.path.join(BASE_DIR, 'newtonsdk','sdk') PATH_FMOD = os.path.join(BASE_DIR, 'fmod') PATH_ODE = os.path.join(BASE_DIR, 'ode-0.8') -PATH_OGREAL= os.path.join(BASE_DIR, 'ogreal') PATH_OGG = os.path.join(BASE_DIR, 'ogg') PATH_VORBIS= os.path.join(BASE_DIR, 'vorbis') PATH_OPENAL= os.path.join(BASE_DIR, 'openal') PATH_ALUT= os.path.join(BASE_DIR, 'freealut') PATH_OgreOde= os.path.join(BASE_DIR, 'OgreAddons','ogreode') -PATH_raknet= os.path.join(BASE_DIR, 'RakNet') -PATH_OPCODE= os.path.join(BASE_DIR, 'Opcode') -PATH_quickgui= os.path.join(root_dir, 'ThirdParty','quickgui') -PATH_quickgui= os.path.join(BASE_DIR, 'Quickgui') ## note test for Quickgui SVN version -PATH_betagui= os.path.join(root_dir, 'ThirdParty','betagui') -PATH_NxOgre= os.path.join(BASE_DIR, 'nxogre/NxOgre') -PATH_Bullet= os.path.join(BASE_DIR, 'bullet-2.52') -PATH_PhysX= "c:/program files/AGEIA Technologies/SDK/v2.7.2/SDKs" -PATH_Theora= os.path.join(PATH_OgreAddons,'videoplugin','TheoraVideo') -PATH_Dshow= os.path.join(root_dir, 'ThirdParty','dshow') -PATH_ogrevideoffmpeg = os.path.join(root_dir, 'ThirdParty','ffmpeg') -PATH_ffmpeg= os.path.join(BASE_DIR, 'ffmpeg') -PATH_ogredshow = os.path.join(root_dir, 'ThirdParty','dshow') -PATH_plib = os.path.join(BASE_DIR, 'plib') -PATH_navi = os.path.join(BASE_DIR, 'navi','Navi') +PATH_OGREAL= os.path.join(PATH_THIRDPARTY,,'ogreal') +PATH_OPCODE= os.path.join(PATH_THIRDPARTY,'opcode') +PATH_quickgui= os.path.join(PATH_THIRDPARTY,'quickgui') +PATH_betagui= os.path.join(PATH_THIRDPARTY,'betagui') +PATH_ogredshow = os.path.join(PATH_THIRDPARTY,'dshow') +PATH_plib = os.path.join(PATH_THIRDPARTY, 'plib') +PATH_ogrevideoffmpeg = os.path.join(PATH_THIRDPARTY,'ffmpeg') +PATH_NxOgre= os.path.join(BASE_DIR, 'nxogre/NxOgre') +PATH_Bullet= os.path.join(BASE_DIR, 'bullet-2.52') +PATH_PhysX= "c:/program files/AGEIA Technologies/SDK/v2.7.2/SDKs" +PATH_Theora= os.path.join(PATH_OgreAddons,'videoplugin','TheoraVideo') +PATH_ffmpeg= os.path.join(BASE_DIR, 'ffmpeg') +PATH_navi = os.path.join(BASE_DIR, 'navi','Navi') # # it's time for the SDK version if SDK: - PATH_Ogre = os.path.join(BASE_DIR, 'Ogrenew') - PATH_OgreAddons = os.path.join(BASE_DIR, 'OgreAddons') PATH_CEGUI = os.path.join(BASE_DIR, 'Ogrenew') PATH_OIS = os.path.join(BASE_DIR, 'Ogrenew') - PATH_ODE = os.path.join(BASE_DIR, 'ode-0.8') - PATH_OgreOde= os.path.join(BASE_DIR, 'OgreAddons','ogreode') - - - -## Overrides - this is needed as libs isn't defined in enirvonment for fmod.. -# # class fmod: -# # version= "4.06" -# # libs=[LIB_Boost, 'fmodexL_vc'] -# # ##libs=[Config.LIB_Boost, 'libfmodex'] ##posix - + ### ### these paths assume you've left all the directory structure as standard ### Override anything that is different ### -PATH_LIB_Ogre_CEGUIRenderer = os.path.join( PATH_Ogre, 'Samples/Common/CEGUIRenderer/lib') +PATH_LIB_Ogre_CEGUIRenderer = os.path.join( PATH_Ogre, 'Samples/Common/CEGUIRenderer/lib') PATH_LIB_Ogre_OgreMain= os.path.join( PATH_Ogre, 'lib' ) PATH_LIB_Ogre_Dependencies = os.path.join( PATH_Ogre, 'Dependencies/lib/Release') -PATH_LIB_OgreRefApp = os.path.join( PATH_Ogre, 'ReferenceApplication/ReferenceAppLayer/lib/Release') -PATH_LIB_OgreNewt = os.path.join(PATH_OgreAddons, r'ogrenewt/OgreNewt_Main/lib/Release') -PATH_LIB_Newton = os.path.join(PATH_Newton ,'dll') ##NOTE Posix platforms this lives in 'lib-mt' -PATH_LIB_OIS = os.path.join(PATH_OIS, 'dll') ## NOTE Posix platforms this lives in'lib' not 'dll' -PATH_LIB_CEGUI = os.path.join ( PATH_CEGUI, 'lib' ) +PATH_LIB_OgreRefApp = os.path.join( PATH_Ogre, 'lib') +PATH_LIB_OgreNewt = os.path.join( PATH_OgreAddons, 'ogrenewt/OgreNewt_Main/lib/Release') +PATH_LIB_Newton = os.path.join( PATH_Newton ,'dll') ##NOTE Posix platforms this lives in 'lib-mt' +PATH_LIB_OIS = os.path.join( PATH_OIS, 'dll') ## NOTE Posix platforms this lives in'lib' not 'dll' +PATH_LIB_CEGUI = os.path.join( PATH_CEGUI, 'lib' ) PATH_LIB_ODE = os.path.join( PATH_ODE, 'lib/releaselib')## probable releaselib for posix +PATH_LIB_OPCODE = os.path.join( PATH_OPCODE ) PATH_LIB_OgreOde = os.path.join( PATH_OgreOde, 'lib/Release') -PATH_LIB_OPCODE = os.path.join( PATH_OPCODE, 'Release') PATH_LIB_OgreOdePrefab = os.path.join( PATH_OgreOde, 'prefab/lib/Release' ) PATH_LIB_OgreOdeLoader = os.path.join( PATH_OgreOde, 'loader/lib/Release' ) -PATH_LIB_FMOD = os.path.join(PATH_FMOD, 'api/lib') -PATH_LIB_OgreAL = os.path.join(PATH_OGREAL, 'lib/Release' ) -PATH_LIB_betagui = PATH_betagui -PATH_LIB_quickgui = os.path.join(PATH_quickgui, 'bin') -PATH_LIB_raknet = os.path.join(PATH_raknet, 'Lib' ) +PATH_LIB_OgreAL = os.path.join( PATH_OGREAL)#, 'lib/Release' ) +PATH_LIB_betagui = PATH_betagui +PATH_LIB_quickgui = PATH_quickgui PATH_LIB_NxOgre= os.path.join(PATH_NxOgre, 'lib') -PATH_LIB_PhysX = os.path.join(PATH_PhysX,'lib/win32') -PATH_LIB_Bullet = os.path.join(PATH_Bullet, 'out/release8/libs' ) -PATH_LIB_Theora= os.path.join(PATH_Theora, 'bin', 'Release') -PATH_LIB_ogrevideoffmpeg = PATH_ogrevideoffmpeg +PATH_LIB_PhysX = os.path.join(PATH_PhysX,'lib/win32') +PATH_LIB_Bullet = os.path.join(PATH_Bullet, 'out/release8/libs' ) +PATH_LIB_Theora= os.path.join(PATH_Theora, 'bin', 'Release') +PATH_LIB_ogrevideoffmpeg = PATH_ogrevideoffmpeg PATH_LIB_ffmpeg= os.path.join(PATH_ffmpeg, 'lib') -PATH_LIB_ogredshow = PATH_ogredshow -PATH_LIB_plib = PATH_plib -PATH_LIB_navi= os.path.join(PATH_navi, 'lib') +PATH_LIB_ogredshow = PATH_ogredshow +PATH_LIB_plib = PATH_plib +PATH_LIB_navi= os.path.join(PATH_navi, 'lib') if SDK: - PATH_LIB_Ogre_CEGUIRenderer = os.path.join( PATH_Ogre, 'lib') - PATH_LIB_Ogre_OgreMain= os.path.join( PATH_Ogre, 'lib' ) - PATH_LIB_Ogre_Dependencies = os.path.join( PATH_Ogre, 'Dependencies/lib/Release') - PATH_LIB_OgreRefApp = os.path.join( PATH_Ogre, 'lib') - PATH_LIB_OIS = os.path.join(PATH_Ogre, 'Dependencies/lib/Release') ## NOTE Posix platforms this lives in'lib' not 'dll' - PATH_LIB_CEGUI = os.path.join ( PATH_Ogre, r'lib' ) + PATH_LIB_Ogre_CEGUIRenderer = os.path.join( PATH_Ogre, 'lib') + PATH_LIB_OIS = os.path.join( PATH_Ogre, 'Dependencies/lib/Release') ## NOTE Posix platforms this lives in'lib' not 'dll' + PATH_LIB_CEGUI = os.path.join( PATH_Ogre, 'lib' ) @@ -115,14 +95,14 @@ PATH_INCLUDE_OIS = os.path.join(PATH_OIS,'includes') ## Note the plural include's PATH_INCLUDE_OgreRefApp = os.path.join(PATH_Ogre,'ReferenceApplication/ReferenceAppLayer/include') PATH_INCLUDE_OgreNewt = os.path.join(PATH_OgreAddons,'ogrenewt/OgreNewt_Main/inc') -PATH_INCLUDE_CEGUI = os.path.join(PATH_CEGUI, r'include/CEGUI') +PATH_INCLUDE_CEGUI = os.path.join(PATH_CEGUI, 'include/CEGUI') PATH_INCLUDE_ODE = os.path.join( PATH_ODE, 'include') PATH_INCLUDE_OPCODE = PATH_OPCODE -PATH_INCLUDE_ODESOURCE = os.path.join( PATH_ODE, 'ode/src') -PATH_INCLUDE_OgreAL = os.path.join( PATH_OGREAL, 'include' ) +PATH_INCLUDE_ODESOURCE = os.path.join( PATH_ODE, 'ode/src') +PATH_INCLUDE_OgreAL = os.path.join( PATH_OGREAL)#, 'include' ) PATH_INCLUDE_OPENAL = os.path.join( PATH_OPENAL, 'include') -PATH_INCLUDE_OGG= os.path.join( PATH_OGG, r'include' ) -PATH_INCLUDE_VORBIS= os.path.join( PATH_VORBIS, r'include' ) +PATH_INCLUDE_OGG= os.path.join( PATH_OGG, 'include' ) +PATH_INCLUDE_VORBIS= os.path.join( PATH_VORBIS, 'include' ) PATH_INCLUDE_ALUT= os.path.join( PATH_ALUT, 'include' ) PATH_INCLUDE_OgreOde = os.path.join( PATH_OgreOde,'include') PATH_INCLUDE_OgreOdePrefab= os.path.join( PATH_OgreOde,'prefab/include') @@ -130,18 +110,16 @@ PATH_INCLUDE_FMOD = os.path.join(PATH_FMOD, 'api/inc') PATH_INCLUDE_Ogre_CEGUIRenderer = os.path.join( PATH_Ogre, 'samples/Common/CEGUIRenderer/include') PATH_INCLUDE_quickgui = os.path.join(PATH_quickgui,'QuickGUI','include') -PATH_INCLUDE_raknet = os.path.join(PATH_raknet, 'Source' ) PATH_INCLUDE_NxOgre= os.path.join(PATH_NxOgre, 'include') PATH_INCLUDE_Bullet= os.path.join(PATH_Bullet, 'src') -PATH_INCLUDE_freetype= os.path.join(PATH_INCLUDE_quickgui,'FreeType2.3.5') -PATH_INCLUDE_betagui = PATH_betagui -PATH_INCLUDE_Dshow= PATH_Dshow -PATH_INCLUDE_Theora = os.path.join (PATH_Theora,'include') +PATH_INCLUDE_freetype= os.path.join(PATH_INCLUDE_quickgui,'FreeType2.3.5') +PATH_INCLUDE_betagui = PATH_betagui +PATH_INCLUDE_Theora = os.path.join (PATH_Theora,'include') PATH_INCLUDE_ogrevideoffmpeg = PATH_ogrevideoffmpeg -PATH_INCLUDE_ffmpeg = os.path.join (PATH_ffmpeg,'include') -PATH_INCLUDE_ogredshow = PATH_ogredshow -PATH_INCLUDE_plib = PATH_plib -PATH_INCLUDE_navi = os.path.join (PATH_navi,'include') +PATH_INCLUDE_ffmpeg = os.path.join (PATH_ffmpeg,'include') +PATH_INCLUDE_ogredshow = PATH_ogredshow +PATH_INCLUDE_plib = PATH_plib +PATH_INCLUDE_navi = os.path.join (PATH_navi,'include') PATH_INCLUDE_OggVorbisTheora = [ os.path.join(BASE_DIR,'ogg','include') ,os.path.join(BASE_DIR, 'vorbis', 'include') @@ -158,9 +136,7 @@ ] if SDK: - PATH_INCLUDE_Ogre= os.path.join(PATH_Ogre,'OgreMain/include') PATH_INCLUDE_OIS = os.path.join(PATH_Ogre,'Dependencies/include/OIS') ## Note the plural include's -# PATH_INCLUDE_OgreRefApp = os.path.join(PATH_Ogre,'samples/refapp/include') PATH_INCLUDE_CEGUI = os.path.join(PATH_Ogre, 'Dependencies/include/CEGUI') \ No newline at end of file Modified: trunk/python-ogre/PythonOgreConfig_posix.py =================================================================== --- trunk/python-ogre/PythonOgreConfig_posix.py 2007-09-20 07:09:24 UTC (rev 385) +++ trunk/python-ogre/PythonOgreConfig_posix.py 2007-09-22 05:01:38 UTC (rev 386) @@ -1,17 +1,16 @@ import sys,os - ## Boost stuff ## path to the root of your boost dir, should have 'libs', 'boost' subdirectories module_dir = os.path.abspath(os.path.dirname(__file__) )## The root directory is where this module is located ## lets assume that the base development directory is one level higher BASE_DIR,ignore = os.path.split(module_dir) ## r'/home/andy/development' -ROOT_DIR = os.path.join(BASE_DIR,'root') +ROOT_DIR = os.path.join(BASE_DIR,'root') root_dir = os.path.abspath(os.path.dirname(__file__) )## The root directory is where this module is located LOCAL_LIB = os.path.join(ROOT_DIR,'usr/lib') -LOCAL_INCLUDE = os.path.join(ROOT_DIR, 'usr/include') +LOCAL_INCLUDE = os.path.join(ROOT_DIR, 'usr/include') PATH_Boost = os.path.join(LOCAL_INCLUDE, 'boost-1_34') @@ -28,78 +27,64 @@ # # ## Parent directories of the libraries +PATH_THIRDPARTY = os.path.join(module_dir, 'ThirdParty' ) PATH_Ogre = os.path.join(BASE_DIR,'ogrenew') PATH_OgreAddons = os.path.join(BASE_DIR, 'OgreAddons') PATH_CEGUI = os.path.join(BASE_DIR, 'CEGUI-0.5.0') PATH_OIS = os.path.join(BASE_DIR, 'ois-1.0RC1') -PATH_Newton = os.path.join(BASE_DIR, 'newtonSDK/sdk') -# # PATH_FMOD = os.path.join(BASE_DIR, 'fmod') +PATH_Newton = os.path.join(BASE_DIR, 'newtonSDK','sdk') PATH_ODE = os.path.join(BASE_DIR, 'ode-0.8') -PATH_OGREAL= os.path.join(BASE_DIR, 'OgreAL') PATH_OGG = os.path.join(BASE_DIR, 'ogg') PATH_VORBIS= os.path.join(BASE_DIR, 'vorbis') PATH_OPENAL= os.path.join(BASE_DIR, 'openal') PATH_ALUT= os.path.join(BASE_DIR, 'freealut') -PATH_OgreOde= os.path.join(BASE_DIR, 'OgreAddons/ogreode') -PATH_betagui= os.path.join(BASE_DIR, 'betagui') -# PATH_raknet= os.path.join(BASE_DIR, 'RakNet') -PATH_simplegui= os.path.join(module_dir, 'ThirdParty/simplegui') -PATH_quickgui= os.path.join(BASE_DIR, 'quickgui') ## note test for Quickgui SVN version -PATH_plib = os.path.join(BASE_DIR, 'plib') -PATH_navi = os.path.join(BASE_DIR, 'navi','Navi') -PATH_NxOgre= os.path.join(BASE_DIR, 'nxogre/NxOgre') -PATH_PhysX= os.path.join(BASE_DIR, 'AGEIA Technologies/SDK/v2.7.2/SDKs') -PATH_Theora= os.path.join(PATH_OgreAddons,'videoplugin','TheoraVideo') -PATH_ogrevideoffmpeg = os.path.join(root_dir, 'ThirdParty','ffmpeg') -PATH_ffmpeg= os.path.join(BASE_DIR, 'ffmpeg') +PATH_OgreOde= os.path.join(BASE_DIR, 'OgreAddons','ogreode') +PATH_OGREAL= os.path.join(PATH_THIRDPARTY,,'ogreal') +PATH_OPCODE= os.path.join(PATH_THIRDPARTY,'opcode') +PATH_quickgui= os.path.join(PATH_THIRDPARTY,'quickgui') +PATH_betagui= os.path.join(PATH_THIRDPARTY,'betagui') +PATH_ogredshow = os.path.join(PATH_THIRDPARTY,'dshow') +PATH_plib = os.path.join(PATH_THIRDPARTY, 'plib') +PATH_ogrevideoffmpeg = os.path.join(PATH_THIRDPARTY,'ffmpeg') +PATH_NxOgre= os.path.join(BASE_DIR, 'nxogre/NxOgre') +PATH_Bullet= os.path.join(BASE_DIR, 'bullet-2.52') +PATH_PhysX= os.path.join(BASE_DIR, 'AGEIA Technologies/SDK/v2.7.2/SDKs') +PATH_Theora= os.path.join(PATH_OgreAddons,'videoplugin','TheoraVideo') +PATH_ffmpeg= os.path.join(BASE_DIR, 'ffmpeg') +PATH_navi = os.path.join(BASE_DIR, 'navi','Navi') - - -# # # Overrides - this is needed as libs isn't defined in enirvonment for fmod.. -# # #class fmod: -# # # version= "4.06" -# # # libs=[LIB_Boost, 'fmodexL_vc'] -# # ##libs=[Config.LIB_Boost, 'libfmodex'] ##posix - -# # ### -# # ### these paths assume you've left all the directory structure as standard -# # ### Override anything that is different -# # ### +### +### these paths assume you've left all the directory structure as standard +### Override anything that is different +### PATH_LIB_Ogre_CEGUIRenderer = os.path.join( LOCAL_LIB ) #, 'Samples/Common/CEGUIRenderer/lib') PATH_LIB_Ogre_OgreMain= os.path.join( LOCAL_LIB ) # PATH_Ogre, 'OgreMain/lib/Release' ) PATH_LIB_Ogre_Dependencies = os.path.join( LOCAL_LIB ) # , 'Dependencies/lib/Release') -PATH_LIB_quickgui = os.path.join(PATH_quickgui, 'bin') - - - PATH_LIB_OgreRefApp = os.path.join( LOCAL_LIB ) # PATH_Ogre, 'ReferenceApplication/ReferenceAppLayer/lib/Release') PATH_LIB_OgreNewt = os.path.join( LOCAL_LIB ) #PATH_OgreAddons, r'ogrenewt/OgreNewt_Main/lib/Release') PATH_LIB_Newton = os.path.join( LOCAL_LIB ) # PATH_Newton ,'dll') ##NOTE Posix platforms this lives in 'lib-mt' PATH_LIB_OIS = os.path.join( LOCAL_LIB ) #PATH_OIS, 'dll') ## NOTE Posix platforms this lives in'lib' not 'dll' -PATH_LIB_CEGUI = os.path.join ( LOCAL_LIB ) #PATH_Ogre, r'Dependencies/lib/Release' ) +PATH_LIB_CEGUI = os.path.join( LOCAL_LIB ) #PATH_Ogre, r'Dependencies/lib/Release' ) PATH_LIB_ODE = os.path.join( LOCAL_LIB ) #PATH_ODE, 'lib/releasedll')## probable releaselib for posix +PATH_LIB_OPCODE = os.path.join( PATH_OPCODE ) PATH_LIB_OgreOde = os.path.join( LOCAL_LIB ) #PATH_OgreOde, 'lib/Release') PATH_LIB_OgreOdePrefab = os.path.join( LOCAL_LIB ) #PATH_OgreOde, 'prefab/lib/Release' ) PATH_LIB_OgreOdeLoader = os.path.join( LOCAL_LIB ) #PATH_OgreOde, 'loader/lib/Release' ) - PATH_LIB_OgreAL = os.path.join( LOCAL_LIB ) #PATH_OGREAL, 'lib/Release' ) PATH_LIB_betagui = PATH_betagui -PATH_LIB_simplegui = PATH_simplegui -# PATH_LIB_raknet = os.path.join( LOCAL_LIB ) #PATH_raknet, 'Lib' ) -PATH_LIB_OPCODE = os.path.join( LOCAL_LIB ) -PATH_LIB_Bullet = os.path.join( LOCAL_LIB ) -PATH_LIB_plib = PATH_plib -PATH_LIB_navi= os.path.join(PATH_navi, 'lib') +PATH_LIB_quickgui = PATH_quickgui +PATH_LIB_Bullet = os.path.join( LOCAL_LIB ) +PATH_LIB_plib = PATH_plib +PATH_LIB_navi= os.path.join(PATH_navi, 'lib') PATH_LIB_NxOgre= os.path.join(LOCAL_LIB ) -PATH_LIB_PhysX = os.path.join(PATH_PhysX,'lib/win32') -PATH_LIB_Theora= os.path.join(PATH_Theora, 'bin', 'Release') -PATH_LIB_ogrevideoffmpeg = PATH_ogrevideoffmpeg +PATH_LIB_PhysX = os.path.join(LOCAL_LIB) +PATH_LIB_Theora= os.path.join(PATH_Theora, 'bin', 'Release') +PATH_LIB_ogrevideoffmpeg = PATH_ogrevideoffmpeg PATH_LIB_ffmpeg= os.path.join(PATH_ffmpeg, 'lib') PATH_INCLUDE_Ogre= os.path.join(LOCAL_INCLUDE,'OGRE') # os.path.join(PATH_Ogre,'OgreMain/include') - PATH_INCLUDE_Ogre_Dependencies = PATH_INCLUDE_Ogre # os.path.join( PATH_Ogre, 'Dependencies/include') PATH_INCLUDE_OIS = os.path.join(LOCAL_INCLUDE,'OIS') #os.path.join(PATH_OIS,'includes') ## Note the plural include's PATH_INCLUDE_OgreRefApp = os.path.join(PATH_Ogre,'ReferenceApplication/ReferenceAppLayer/include') @@ -107,33 +92,27 @@ PATH_INCLUDE_CEGUI = os.path.join(LOCAL_INCLUDE,'CEGUI') #os.path.join(PATH_CEGUI, r'include/CEGUI') PATH_INCLUDE_ODE = os.path.join(LOCAL_INCLUDE,'ode') #os.path.join( PATH_ODE, 'include') PATH_INCLUDE_ODESOURCE = '' # os.path.join( PATH_ODE, 'ode/src') - -PATH_INCLUDE_quickgui = os.path.join(PATH_quickgui,'QuickGUI','include') - -PATH_INCLUDE_OgreAL = ''# os.path.join( PATH_OGREAL, 'include' ) -PATH_INCLUDE_OPENAL = ''# os.path.join( PATH_OPENAL, 'include') -PATH_INCLUDE_OGG= ''# os.path.join( PATH_OGG, r'include' ) -PATH_INCLUDE_VORBIS= ''# os.path.join( PATH_VORBIS, r'include' ) -PATH_INCLUDE_ALUT= ''# os.path.join( PATH_ALUT, 'include' ) - +PATH_INCLUDE_quickgui = PATH_quickgui +PATH_INCLUDE_OgreAL = PATH_OGREAL +PATH_INCLUDE_OPENAL = os.path.join( PATH_OPENAL, 'include') +PATH_INCLUDE_OGG= os.path.join( PATH_OGG, 'include' ) +PATH_INCLUDE_VORBIS= os.path.join( PATH_VORBIS, 'include' ) +PATH_INCLUDE_ALUT= os.path.join( PATH_ALUT, 'include' ) PATH_INCLUDE_OgreOde = os.path.join( PATH_OgreOde,'include') PATH_INCLUDE_OgreOdePrefab= os.path.join( PATH_OgreOde,'prefab/include') PATH_INCLUDE_OgreOdeLoader= os.path.join( PATH_OgreOde,'loader/include') PATH_INCLUDE_NxOgre= os.path.join(PATH_NxOgre, 'include') - PATH_INCLUDE_betagui = PATH_betagui -PATH_INCLUDE_simplegui = PATH_simplegui -# PATH_INCLUDE_raknet = os.path.join(PATH_raknet, 'Source' ) PATH_INCLUDE_Ogre_CEGUIRenderer = os.path.join( PATH_Ogre, 'Samples/Common/CEGUIRenderer/include') PATH_INCLUDE_OPCODE = os.path.join( LOCAL_INCLUDE ) PATH_INCLUDE_Bullet = os.path.join( LOCAL_INCLUDE ) -PATH_INCLUDE_navi = os.path.join (PATH_navi,'include') -PATH_INCLUDE_plib = PATH_plib -PATH_INCLUDE_Theora = os.path.join (PATH_Theora,'include') +PATH_INCLUDE_navi = os.path.join (PATH_navi,'include') +PATH_INCLUDE_plib = PATH_plib +PATH_INCLUDE_Theora = os.path.join (PATH_Theora,'include') PATH_INCLUDE_ogrevideoffmpeg = PATH_ogrevideoffmpeg -PATH_INCLUDE_ffmpeg = os.path.join (PATH_ffmpeg,'include') -PATH_INCLUDE_plib = PATH_plib -PATH_INCLUDE_navi = os.path.join (PATH_navi,'include') +PATH_INCLUDE_ffmpeg = os.path.join (PATH_ffmpeg,'include') +PATH_INCLUDE_plib = PATH_plib +PATH_INCLUDE_navi = os.path.join (PATH_navi,'include') PATH_INCLUDE_OggVorbisTheora = [ os.path.join(BASE_DIR,'ogg','include') ,os.path.join(BASE_DIR, 'vorbis', 'include') @@ -147,4 +126,4 @@ ,os.path.join(PATH_PhysX, 'PhysXLoader','include') ,os.path.join(PATH_PhysX, 'NxCharacter','include') ,os.path.join(PATH_PhysX, 'NxExtensions','include') - ] + ] Modified: trunk/python-ogre/code_generators/ogre/hand_made_wrappers.py =================================================================== --- trunk/python-ogre/code_generators/ogre/hand_made_wrappers.py 2007-09-20 07:09:24 UTC (rev 385) +++ trunk/python-ogre/code_generators/ogre/hand_made_wrappers.py 2007-09-22 05:01:38 UTC (rev 386) @@ -707,7 +707,7 @@ iter_as_generator_map( cls ) rt = mb.class_( 'RenderQueueListener' ) -# # # # # # # # rt.add_wrapper_code ( WRAPPER_WRAPPER_RenderQueueListener ) + rt.add_wrapper_code ( WRAPPER_WRAPPER_RenderQueueListener ) # cls = mb.class_('Animation').class_('NodeTrackIterator') # iter_as_generator_map( cls ) Modified: trunk/python-ogre/code_generators/ogreal/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/ogreal/generate_code.py 2007-09-20 07:09:24 UTC (rev 385) +++ trunk/python-ogre/code_generators/ogreal/generate_code.py 2007-09-22 05:01:38 UTC (rev 386) @@ -237,7 +237,24 @@ # if not os.path.exists( os.path.join(environment.ogreal.generated_dir, 'py_shared_ptr.h' ) ): # shutil.copy( os.path.join( environment.shared_ptr_dir, 'py_shared_ptr.h' ) # , environment.ogreal.generated_dir ) - + ## now we need to ensure a series of headers and additional source files are + ## copied to the generated directory.. Also cope with sub directories + additional_dirs=[ + [os.path.join(environment.Config.root_dir, 'ThirdParty', 'ogreal'),''], +# [os.path.join(environment.Config.root_dir, 'ThirdParty', 'ogreal', 'extra'),''], +# [os.path.join(environment.Config.root_dir, 'ThirdParty', 'ogreal', 'extra','ogg'),'ogg'], +# # [os.path.join(environment.Config.root_dir, 'ThirdParty', 'ogreal', 'extra','vorbis'),'vorbis'], + ] + for d,d1 in additional_dirs: + for f in os.listdir(d): + if f.endswith('cpp') or f.endswith('.h') or f.endswith('.c'): + sourcefile = os.path.join(d, f) + destfile = os.path.join(environment.ogreal.generated_dir, d1, f ) + if not os.path.exists ( os.path.join(environment.ogreal.generated_dir, d1 ) ): + os.mkdir ( os.path.join(environment.ogreal.generated_dir, d1 ) ) + if not common_utils.samefile( sourcefile ,destfile ): + shutil.copy( sourcefile, environment.ogreal.generated_dir ) + print "Updated ", f, "as it was missing or out of date" if __name__ == '__main__': start_time = time.clock() generate_code() Modified: trunk/python-ogre/code_generators/ogreode/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/ogreode/generate_code.py 2007-09-20 07:09:24 UTC (rev 385) +++ trunk/python-ogre/code_generators/ogreode/generate_code.py 2007-09-22 05:01:38 UTC (rev 386) @@ -113,9 +113,9 @@ global_ns.namespace( 'Ogre' ).class_('SceneManager').include(already_exposed=True) global_ns.namespace( 'Ogre' ).class_('Matrix4').include(already_exposed=True) global_ns.namespace( 'Ogre' ).class_('Plugin').include(already_exposed=True) - print "\nCLASSES::: Std" - for c in global_ns.namespace('std').classes(): - print c.name, c +# print "\nCLASSES::: Std" +# for c in global_ns.namespace('std').classes(): +# print c.name, c global_ns.namespace("std").class_('list<Ogre::Plane, std::allocator<Ogre::Plane> >').exclude() # print "\nCLASSES::: Ode" Modified: trunk/python-ogre/code_generators/plib/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/plib/generate_code.py 2007-09-20 07:09:24 UTC (rev 385) +++ trunk/python-ogre/code_generators/plib/generate_code.py 2007-09-22 05:01:38 UTC (rev 386) @@ -542,9 +542,7 @@ ## now we need to ensure a series of headers and additional source files are ## copied to the generaated directory.. additional_files = [] - paths = [os.path.join(environment.Config.PATH_plib,'src','sl'), - os.path.join(environment.Config.PATH_plib,'src','util'), - os.path.join(environment.Config.PATH_plib,'src','net') + paths = [environment.Config.PATH_plib ] for p in paths: Modified: trunk/python-ogre/code_generators/quickgui/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/quickgui/generate_code.py 2007-09-20 07:09:24 UTC (rev 385) +++ trunk/python-ogre/code_generators/quickgui/generate_code.py 2007-09-22 05:01:38 UTC (rev 386) @@ -77,7 +77,8 @@ excludes=[\ '::QuickGUI::QuadContainer::_populateRenderObjectList' ,'::QuickGUI::QuadContainer::_updateRenderQueue' - ##,'::QuickGUI::GUIManager::getDefaultFont' + ,'::QuickGUI::HorizontalTrackBar::_getButtonSize' + ,'::QuickGUI::List::getNumberOfListItems' ] for e in excludes: print "excluding function", e Modified: trunk/python-ogre/environment.py =================================================================== --- trunk/python-ogre/environment.py 2007-09-20 07:09:24 UTC (rev 385) +++ trunk/python-ogre/environment.py 2007-09-22 05:01:38 UTC (rev 386) @@ -27,7 +27,7 @@ print __file__, "LOG::", instring PythonOgreMajorVersion = "1" -PythonOgreMinorVersion = "0" # change to 0.7 due to lowercase properties +PythonOgreMinorVersion = "1" # change to 0.7 due to lowercase properties PythonOgrePatchVersion = "0" @@ -370,7 +370,7 @@ version="0.9.6" parent="ogre/gui" ## note the defined for _QuickGUIExport forces non dll usage - CCFLAGS = ' /D WIN32 /D NDEBUG /D WINDOWS /D _QuickGUIExport="" ' + CCFLAGS = ' -DWIN32 -DNDEBUG -DWINDOWS -D_QuickGUIExport="" ' cflags="" include_dirs = [ Config.PATH_Boost, Config.PATH_INCLUDE_Ogre, @@ -389,7 +389,7 @@ class navi: version="0.9" parent="ogre/gui" - CCFLAGS = '/D "WIN32" /D "NDEBUG", /D "WINDOWS"' + CCFLAGS = '-D"WIN32" -D"NDEBUG", -D"WINDOWS"' cflags="" include_dirs = [ Config.PATH_Boost ,Config.PATH_INCLUDE_Ogre @@ -411,7 +411,7 @@ class betagui: version="0.16" parent="ogre/gui" - CCFLAGS = ' ' # /D "FT2_BUILD_LIBRARY" + CCFLAGS = ' ' # -D"FT2_BUILD_LIBRARY" cflags="" include_dirs = [ Config.PATH_Boost, Config.PATH_INCLUDE_Ogre, @@ -438,7 +438,7 @@ for d in Config.PATH_INCLUDE_PhysX: include_dirs.append( d ) if os.name == 'nt': - CCFLAGS = ' /D "WIN32" ' + CCFLAGS = ' -D"WIN32" ' lib_dirs = [Config.PATH_LIB_Boost, Config.PATH_LIB_Ogre_OgreMain, @@ -463,7 +463,7 @@ include_dirs.append( d ) if os.name == 'nt': - CCFLAGS = ' /D "WIN32" ' + CCFLAGS = ' -D"WIN32" ' lib_dirs = [Config.PATH_LIB_Boost, Config.PATH_LIB_Ogre_OgreMain, @@ -478,12 +478,11 @@ version="1.8.4" parent="ogre/addons" cflags="" - CCFLAGS = ' /D "_CRT_SECURE_NO_WARNINGS" ' + CCFLAGS = ' -D"_CRT_SECURE_NO_WARNINGS" ' include_dirs= [ Config.PATH_INCLUDE_plib, - os.path.join ( Config.PATH_INCLUDE_plib,"..") # needed as net.h includes via plib/xxxx + Config.PATH_THIRDPARTY # needed as net.h includes via plib/xxxx ] lib_dirs = [ Config.PATH_LIB_Boost, - Config.PATH_LIB_plib ] ModuleName = "plib" CheckIncludes=[] @@ -504,7 +503,7 @@ for d in Config.PATH_INCLUDE_PhysX: include_dirs.append( d ) if os.name == 'nt': - CCFLAGS = ' /D "WIN32" ' + CCFLAGS = ' -D"WIN32" ' lib_dirs = [Config.PATH_LIB_Boost, Config.PATH_LIB_Ogre_OgreMain, @@ -514,22 +513,9 @@ libs=[ Config.LIB_Boost, 'NxCharacter', 'NxCooking', 'NxExtensions', 'PhysXLoader' ] ModuleName="PhysX" active=True -# class raknet: -# version="1.0" -# parent="ogre/network" -# cflags = "" -# include_dirs = [ Config.PATH_Boost, -# Config.PATH_INCLUDE_raknet -# ] -# lib_dirs = [Config.PATH_LIB_Boost, -# Config.PATH_LIB_raknet -# ] -# CheckIncludes=[] -# libs=[ Config.LIB_Boost, 'RakNetLibStatic' ] # could use RakNetDll -# ModuleName="raknet" -# active=True class ogreal: + ## changes to compile ogreal as part of Python-Ogre to make it easier under linux version="0.3" parent = "ogre/sound" @@ -540,12 +526,29 @@ , Config.PATH_INCLUDE_VORBIS , Config.PATH_INCLUDE_OPENAL , Config.PATH_INCLUDE_ALUT - ] - lib_dirs = [ Config.PATH_LIB_Boost - ,Config.PATH_LIB_Ogre_OgreMain - , Config.PATH_LIB_OgreAL + ] + if os.name=='nt': + lib_dirs = [ Config.PATH_LIB_Boost + ,Config.PATH_LIB_Ogre_OgreMain + ,os.path.join(Config.PATH_OGG, 'win32', 'Static_Release') + ,os.path.join(Config.PATH_VORBIS, 'win32','Vorbis_Static_Release') + ,os.path.join(Config.PATH_VORBIS, 'win32','VorbisEnc_Static_Release') + ,os.path.join(Config.PATH_VORBIS, 'win32','VorbisFile_Static_Release') + ,os.path.join(Config.PATH_OPENAL, 'libs','Win32') + ,os.path.join(Config.PATH_ALUT, 'lib') ] - libs=[Config.LIB_Boost, 'OgreMain', 'OgreAL'] + else: + lib_dirs = [ Config.PATH_LIB_Boost + ,Config.PATH_LIB_Ogre_OgreMain + ] + + if os.name =='nt': + CCFLAGS = ' -DOgreAL_Export="" -DWIN32 -DNDEBUG -D_LIB -D_WIN32 -D_WINDOWS -DVORBIS_IEEE_FLOAT32 -D_USE_NON_INTEL_COMPILER ' + libs=[Config.LIB_Boost, 'OgreMain', + 'ogg_static', + 'alut', + 'vorbis_static','vorbisfile_static','vorbisenc_static', + 'OpenAL32', 'EFX-Util'] ## 'OgreAL' -- going to compile OgreAL ourselves ModuleName = 'OgreAL' CheckIncludes = ['OgreAL.h'] active=True @@ -572,27 +575,22 @@ ModuleName="ogrevideoffmpeg" active=True -class ogredshow: +class ogredshow: version="0.1" parent="ogre/addons" cflags = "" + include_dirs = [ Config.PATH_Boost, + Config.PATH_INCLUDE_Ogre, + Config.PATH_INCLUDE_ogredshow + ] + lib_dirs = [Config.PATH_LIB_Boost, + Config.PATH_LIB_Ogre_OgreMain, + Config.PATH_LIB_ogredshow + ] + CheckIncludes=[] + libs=[ Config.LIB_Boost, 'OgreMain','Strmiids' , 'ole32'] ModuleName="ogredshow" - if os.name == "nt": - include_dirs = [ Config.PATH_Boost, - Config.PATH_INCLUDE_Ogre, - Config.PATH_INCLUDE_ogredshow - ] - lib_dirs = [Config.PATH_LIB_Boost, - Config.PATH_LIB_Ogre_OgreMain, - Config.PATH_LIB_ogredshow - ] - CheckIncludes=[] - libs=[ Config.LIB_Boost, 'OgreMain','Strmiids' , 'ole32'] - active=True - else: - active=False - - + active=True ############################################################################################ ## Here is the master list.... @@ -619,7 +617,6 @@ , 'ogredshow' : ogredshow , 'plib' : plib , 'navi': navi - #, 'raknet' : raknet } # This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2007-09-22 05:03:26
|
Revision: 387 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=387&view=rev Author: andy_miller Date: 2007-09-21 22:03:29 -0700 (Fri, 21 Sep 2007) Log Message: ----------- typos... Modified Paths: -------------- trunk/python-ogre/PythonOgreConfig_nt.py trunk/python-ogre/PythonOgreConfig_posix.py Modified: trunk/python-ogre/PythonOgreConfig_nt.py =================================================================== --- trunk/python-ogre/PythonOgreConfig_nt.py 2007-09-22 05:01:38 UTC (rev 386) +++ trunk/python-ogre/PythonOgreConfig_nt.py 2007-09-22 05:03:29 UTC (rev 387) @@ -32,7 +32,7 @@ PATH_OPENAL= os.path.join(BASE_DIR, 'openal') PATH_ALUT= os.path.join(BASE_DIR, 'freealut') PATH_OgreOde= os.path.join(BASE_DIR, 'OgreAddons','ogreode') -PATH_OGREAL= os.path.join(PATH_THIRDPARTY,,'ogreal') +PATH_OGREAL= os.path.join(PATH_THIRDPARTY,'ogreal') PATH_OPCODE= os.path.join(PATH_THIRDPARTY,'opcode') PATH_quickgui= os.path.join(PATH_THIRDPARTY,'quickgui') PATH_betagui= os.path.join(PATH_THIRDPARTY,'betagui') Modified: trunk/python-ogre/PythonOgreConfig_posix.py =================================================================== --- trunk/python-ogre/PythonOgreConfig_posix.py 2007-09-22 05:01:38 UTC (rev 386) +++ trunk/python-ogre/PythonOgreConfig_posix.py 2007-09-22 05:03:29 UTC (rev 387) @@ -39,7 +39,7 @@ PATH_OPENAL= os.path.join(BASE_DIR, 'openal') PATH_ALUT= os.path.join(BASE_DIR, 'freealut') PATH_OgreOde= os.path.join(BASE_DIR, 'OgreAddons','ogreode') -PATH_OGREAL= os.path.join(PATH_THIRDPARTY,,'ogreal') +PATH_OGREAL= os.path.join(PATH_THIRDPARTY,'ogreal') PATH_OPCODE= os.path.join(PATH_THIRDPARTY,'opcode') PATH_quickgui= os.path.join(PATH_THIRDPARTY,'quickgui') PATH_betagui= os.path.join(PATH_THIRDPARTY,'betagui') This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2007-09-22 13:44:22
|
Revision: 389 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=389&view=rev Author: andy_miller Date: 2007-09-22 06:44:26 -0700 (Sat, 22 Sep 2007) Log Message: ----------- Updates for latest bullet version Modified Paths: -------------- trunk/python-ogre/PythonOgreConfig_nt.py trunk/python-ogre/PythonOgreConfig_posix.py trunk/python-ogre/code_generators/bullet/generate_code.py trunk/python-ogre/code_generators/bullet/hand_made_wrappers.py trunk/python-ogre/environment.py Modified: trunk/python-ogre/PythonOgreConfig_nt.py =================================================================== --- trunk/python-ogre/PythonOgreConfig_nt.py 2007-09-22 11:41:04 UTC (rev 388) +++ trunk/python-ogre/PythonOgreConfig_nt.py 2007-09-22 13:44:26 UTC (rev 389) @@ -40,7 +40,7 @@ PATH_plib = os.path.join(PATH_THIRDPARTY, 'plib') PATH_ogrevideoffmpeg = os.path.join(PATH_THIRDPARTY,'ffmpeg') PATH_NxOgre= os.path.join(BASE_DIR, 'nxogre/NxOgre') -PATH_Bullet= os.path.join(BASE_DIR, 'bullet-2.52') +PATH_Bullet= os.path.join(BASE_DIR, 'bullet-2.62') PATH_PhysX= "c:/program files/AGEIA Technologies/SDK/v2.7.2/SDKs" PATH_Theora= os.path.join(PATH_OgreAddons,'videoplugin','TheoraVideo') PATH_ffmpeg= os.path.join(BASE_DIR, 'ffmpeg') Modified: trunk/python-ogre/PythonOgreConfig_posix.py =================================================================== --- trunk/python-ogre/PythonOgreConfig_posix.py 2007-09-22 11:41:04 UTC (rev 388) +++ trunk/python-ogre/PythonOgreConfig_posix.py 2007-09-22 13:44:26 UTC (rev 389) @@ -47,7 +47,7 @@ PATH_plib = os.path.join(PATH_THIRDPARTY, 'plib') PATH_ogrevideoffmpeg = os.path.join(PATH_THIRDPARTY,'ffmpeg') PATH_NxOgre= os.path.join(BASE_DIR, 'nxogre/NxOgre') -PATH_Bullet= os.path.join(BASE_DIR, 'bullet-2.52') +PATH_Bullet= os.path.join(BASE_DIR, 'bullet-2.62') PATH_PhysX= os.path.join(BASE_DIR, 'AGEIA Technologies/SDK/v2.7.2/SDKs') PATH_Theora= os.path.join(PATH_OgreAddons,'videoplugin','TheoraVideo') PATH_ffmpeg= os.path.join(BASE_DIR, 'ffmpeg') Modified: trunk/python-ogre/code_generators/bullet/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/bullet/generate_code.py 2007-09-22 11:41:04 UTC (rev 388) +++ trunk/python-ogre/code_generators/bullet/generate_code.py 2007-09-22 13:44:26 UTC (rev 389) @@ -80,6 +80,17 @@ ,'::btCapsuleShape::localGetSupportingVertexWithoutMargin' ,'::btCapsuleShape::batchedUnitVectorGetSupportingVertexWithoutMargin' + ,'::btAxisSweep3Internal<unsigned short>::createProxy' + ,'::btAxisSweep3Internal<unsigned>::createProxy' + ,'::btBU_Simplex1to4::getName' + ,'::btBoxShape::getName' + ,'::btBvhTriangleMeshShape::getName' + ##,'::btConcaveShape::getName' + ,'::btDispatcher::getInternalManifoldPointer' + ,'::btAxisSweep3Internal<unsigned>::processAllOverlappingPairs' + ,'::btAxisSweep3Internal<unsigned short>::processAllOverlappingPairs' + + ] for e in excludes: print "excluding function", e @@ -94,7 +105,13 @@ ,'btAlignedAllocator<btPersistentManifold*, 16>' ,'btAlignedAllocator<btTypedConstraint*, 16>' ,'btAlignedAllocator<btRaycastVehicle*, 16>' + # these are being excluded becasue they keep including functions from their parent class + # instead of specifing 'bases' ,'btCapsuleShape' ## fix later + ,'btConcaveShape' + ,'btConvexInternalShape' + ,'btConvexShape' + ,'btPolyhedralConvexShape' ] for e in excludes: print "excluding class", e @@ -321,19 +338,18 @@ """ for fun in mb.member_functions(): arg_position = 0 - trans=[] - desc="" for arg in fun.arguments: - if declarations.type_traits.is_void_pointer(arg.type): - trans.append( ft.modify_type(arg_position,_ReturnUnsignedInt ) ) - desc = desc + arg.name + "(pos:" + str(arg_position)+"), " + if arg.type.decl_string == 'void const *' or arg.type.decl_string == 'void *': + fun.add_transformation( ft.modify_type(arg_position,_ReturnUnsignedInt ), alias=fun.name ) + fun.documentation = docit ("Modified Input Argument to work with CTypes", + "Argument "+arg.name+ "(pos:" + str(arg_position)\ + +") takes a CTypes.adddressof(xx)", "...") + #print "Fixed Void Ptr", fun, arg_position + break arg_position +=1 - if trans: - fun.add_transformation ( * trans ) - fun.documentation = docit ("Modified Input Argument to work with CTypes", - "Argument "+ desc + " takes a CTypes.adddressof(xx)", "...") + ## lets go and look for stuff that might be a problem - pointee_types=['unsigned int',' int ', ' float ', ' Real ', 'uchar', 'uint8', + pointee_types=['unsigned int',' int ', ' char', ' float ', ' Real ', 'uchar', 'uint8', 'unsigned char'] function_names=[] @@ -353,7 +369,7 @@ fun.documentation=docit("SUSPECT - MAYBE BROKEN", "....", "...") break arg_position +=1 - + ## NEED To do the same for constructors for fun in mb.constructors(): arg_position = 0 @@ -376,10 +392,11 @@ Also - if documentation has been set then ignore the class/function as it means it's been tweaked else where """ - pointee_types=['unsigned int','int','float', 'unsigned char']# , 'char' ,'int'] + pointee_types=['unsigned int','int','float', 'char', 'unsigned char']# , 'char' ,'int'] known_names=[] # these are function names we know it's cool to exclude for fun in mb.member_functions(): - if declarations.is_pointer (fun.return_type) and not fun.documentation: + + if declarations.is_pointer (fun.return_type): ## and not fun.documentation: for i in pointee_types: if fun.return_type.decl_string.startswith ( i ) and not fun.documentation: if not fun.name in known_names: @@ -452,7 +469,7 @@ os.path.join( environment.bullet.root_dir, "python_bullet.h" ) , environment.bullet.cache_file ) - defined_symbols = ['BULLET_EXPORTS'] #, 'OPC_USE_CALLBACKS' ] + defined_symbols = ['BULLET_EXPORTS'] # defined_symbols.append( 'VERSION_' + environment.bullet.version ) # @@ -464,7 +481,7 @@ , include_paths=environment.bullet.include_dirs , define_symbols=defined_symbols , indexing_suite_version=2 - , cflags=environment.ogre.cflags + , cflags=environment.bullet.cflags ) # NOTE THE CHANGE HERE mb.constructors().allow_implicit_conversion = False @@ -502,9 +519,9 @@ NoPropClasses = [""] main_ns = global_ns - for cls in main_ns.classes(): - if cls.name not in NoPropClasses: - cls.add_properties( recognizer=ogre_properties.ogre_property_recognizer_t() ) +# for cls in main_ns.classes(): +# if cls.name not in NoPropClasses: +# cls.add_properties( recognizer=ogre_properties.ogre_property_recognizer_t() ) common_utils.add_constants( mb, { 'bullet_version' : '"%s"' % environment.bullet.version.replace("\n", "\\\n") , 'python_version' : '"%s"' % sys.version.replace("\n", "\\\n" ) } ) @@ -530,23 +547,7 @@ mb.split_module(environment.bullet.generated_dir, huge_classes, use_files_sum_repository=False) - ## now we need to ensure a series of headers and additional source files are - ## copied to the generaated directory.. -# additional_files=[ -# os.path.join( environment.shared_ptr_dir, 'py_shared_ptr.h'), -# os.path.join( os.path.abspath(os.path.dirname(__file__) ), 'python_ogre_masterlist.h' ), -# os.path.join( os.path.abspath(os.path.dirname(__file__) ), 'generators.h' ), -# os.path.join( os.path.abspath(os.path.dirname(__file__) ), 'custom_rvalue.cpp' ), -# os.path.join( environment.include_dir, 'tuples.hpp' ) -# ] -# for sourcefile in additional_files: -# p,filename = os.path.split(sourcefile) -# destfile = os.path.join(environment.ogre.generated_dir, filename ) -# -# if not common_utils.samefile( sourcefile ,destfile ): -# shutil.copy( sourcefile, environment.ogre.generated_dir ) -# print "Updated ", filename, "as it was missing or out of date" - + if __name__ == '__main__': start_time = time.clock() generate_code() Modified: trunk/python-ogre/code_generators/bullet/hand_made_wrappers.py =================================================================== --- trunk/python-ogre/code_generators/bullet/hand_made_wrappers.py 2007-09-22 11:41:04 UTC (rev 388) +++ trunk/python-ogre/code_generators/bullet/hand_made_wrappers.py 2007-09-22 13:44:26 UTC (rev 389) @@ -1,8 +1,21 @@ import os import environment - - +WRAPPER_WRAPPER_getName =\ +""" + virtual char * getName( ) const { + bp::override func_getName = this->get_override( "getName" ); + return func_getName( ); + } +""" +WRAPPER_WRAPPER_getInternalManifoldPointer =\ +""" + virtual ::btPersistentManifold * * getInternalManifoldPointer( ){ + bp::override func_getInternalManifoldPointer = this->get_override( "getInternalManifoldPointer" ); + return func_getInternalManifoldPointer( ); + } + """ + ################################################################################################# ################################################################################################# @@ -11,5 +24,11 @@ class_.add_registration_code ( c ) def apply( mb ): - pass - \ No newline at end of file + + rt = mb.class_( 'btCollisionShape' ) + rt.add_wrapper_code ( WRAPPER_WRAPPER_getName ) + rt = mb.class_( 'btConcaveShape' ) + rt.add_wrapper_code ( WRAPPER_WRAPPER_getName ) + rt = mb.class_( 'btDispatcher' ) + rt.add_wrapper_code ( WRAPPER_WRAPPER_getInternalManifoldPointer ) +# \ No newline at end of file Modified: trunk/python-ogre/environment.py =================================================================== --- trunk/python-ogre/environment.py 2007-09-22 11:41:04 UTC (rev 388) +++ trunk/python-ogre/environment.py 2007-09-22 13:44:26 UTC (rev 389) @@ -312,7 +312,7 @@ include_dirs = [ Config.PATH_Boost , Config.PATH_INCLUDE_OPCODE ] - CCFLAGS = ' -DBAN_OPCODE_AUTOLINK, -DICE_NO_DLL ' + CCFLAGS = ' -DBAN_OPCODE_AUTOLINK -DICE_NO_DLL ' ModuleName = 'Opcode' CheckIncludes = ['boost/python.hpp', 'Opcode.h'] active=True @@ -331,7 +331,9 @@ ModuleName = 'bullet' CheckIncludes = ['boost/python.hpp'] active=True + cflags = "" + class newton: version= "1.0" active=False This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2007-09-23 07:22:46
|
Revision: 391 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=391&view=rev Author: andy_miller Date: 2007-09-23 00:22:47 -0700 (Sun, 23 Sep 2007) Log Message: ----------- More Linux fixes - plib and opcode Modified Paths: -------------- trunk/python-ogre/PythonOgreConfig_posix.py trunk/python-ogre/code_generators/opcode/generate_code.py trunk/python-ogre/code_generators/plib/generate_code.py trunk/python-ogre/code_generators/plib/hand_made_wrappers.py trunk/python-ogre/environment.py Modified: trunk/python-ogre/PythonOgreConfig_posix.py =================================================================== --- trunk/python-ogre/PythonOgreConfig_posix.py 2007-09-23 03:40:15 UTC (rev 390) +++ trunk/python-ogre/PythonOgreConfig_posix.py 2007-09-23 07:22:47 UTC (rev 391) @@ -34,11 +34,11 @@ PATH_OIS = os.path.join(BASE_DIR, 'ois-1.0RC1') PATH_Newton = os.path.join(BASE_DIR, 'newtonSDK','sdk') PATH_ODE = os.path.join(BASE_DIR, 'ode-0.8') -PATH_OGG = os.path.join(BASE_DIR, 'ogg') -PATH_VORBIS= os.path.join(BASE_DIR, 'vorbis') -PATH_OPENAL= os.path.join(BASE_DIR, 'openal') -PATH_ALUT= os.path.join(BASE_DIR, 'freealut') -PATH_OgreOde= os.path.join(BASE_DIR, 'OgreAddons','ogreode') +PATH_OGG = os.path.join(BASE_DIR, 'libogg-1.1.3') +PATH_VORBIS= os.path.join(BASE_DIR, 'libvorbis-1.2.0') +PATH_OPENAL= os.path.join(BASE_DIR, 'openal-0.0.8') +PATH_ALUT= os.path.join(BASE_DIR, 'freealut-1.1.0') +PATH_OgreOde= os.path.join(PATH_OgreAddons,'ogreode') PATH_OGREAL= os.path.join(PATH_THIRDPARTY,'ogreal') PATH_OPCODE= os.path.join(PATH_THIRDPARTY,'opcode') PATH_quickgui= os.path.join(PATH_THIRDPARTY,'quickgui') @@ -94,10 +94,10 @@ PATH_INCLUDE_ODESOURCE = '' # os.path.join( PATH_ODE, 'ode/src') PATH_INCLUDE_quickgui = PATH_quickgui PATH_INCLUDE_OgreAL = PATH_OGREAL -PATH_INCLUDE_OPENAL = os.path.join( PATH_OPENAL, 'include') -PATH_INCLUDE_OGG= os.path.join( PATH_OGG, 'include' ) -PATH_INCLUDE_VORBIS= os.path.join( PATH_VORBIS, 'include' ) -PATH_INCLUDE_ALUT= os.path.join( PATH_ALUT, 'include' ) +PATH_INCLUDE_OPENAL = os.path.join( LOCAL_INCLUDE ) #os.path.join( PATH_OPENAL, 'include') +PATH_INCLUDE_OGG= os.path.join( LOCAL_INCLUDE,'ogg' ) #os.path.join( PATH_OGG, 'include' ) +PATH_INCLUDE_VORBIS= os.path.join( LOCAL_INCLUDE,'vorbis' ) #os.path.join( PATH_VORBIS, 'include' ) +PATH_INCLUDE_ALUT= os.path.join( LOCAL_INCLUDE ) #os.path.join( PATH_ALUT, 'include' ) PATH_INCLUDE_OgreOde = os.path.join( PATH_OgreOde,'include') PATH_INCLUDE_OgreOdePrefab= os.path.join( PATH_OgreOde,'prefab/include') PATH_INCLUDE_OgreOdeLoader= os.path.join( PATH_OgreOde,'loader/include') Modified: trunk/python-ogre/code_generators/opcode/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/opcode/generate_code.py 2007-09-23 03:40:15 UTC (rev 390) +++ trunk/python-ogre/code_generators/opcode/generate_code.py 2007-09-23 07:22:47 UTC (rev 391) @@ -474,7 +474,7 @@ os.path.join( environment.opcode.root_dir, "python_opcode.h" ) , environment.opcode.cache_file ) - defined_symbols = ['OPCODE_EXPORTS', 'ICE_NO_DLL'] #, 'OPC_USE_CALLBACKS' ] + defined_symbols = ['OPCODE_EXPORTS'] #, 'ICE_NO_DLL'] #, 'OPC_USE_CALLBACKS' ] defined_symbols.append( 'VERSION_' + environment.opcode.version ) # Modified: trunk/python-ogre/code_generators/plib/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/plib/generate_code.py 2007-09-23 03:40:15 UTC (rev 390) +++ trunk/python-ogre/code_generators/plib/generate_code.py 2007-09-23 07:22:47 UTC (rev 391) @@ -41,7 +41,7 @@ docs = "Python-Ogre Modified Function Call\\n" + general +"\\n" docs = docs + "Input: " + i + "\\n" docs = docs + "Output: " + o + "\\n\\\n" - return docs + return '"'+docs+'"' ############################################################ ## @@ -528,7 +528,7 @@ # ########################################################################################## extractor = exdoc.doc_extractor("") # I'm excluding the UTFstring docs as lots about nothing - mb.build_code_creator (module_name='_plib_' , doc_extractor= extractor ) + mb.build_code_creator (module_name='_plib_' ) ## no docs as issues here, doc_extractor= extractor ) for inc in environment.plib.include_dirs: mb.code_creator.user_defined_directories.append(inc ) Modified: trunk/python-ogre/code_generators/plib/hand_made_wrappers.py =================================================================== --- trunk/python-ogre/code_generators/plib/hand_made_wrappers.py 2007-09-23 03:40:15 UTC (rev 390) +++ trunk/python-ogre/code_generators/plib/hand_made_wrappers.py 2007-09-23 07:22:47 UTC (rev 391) @@ -7,9 +7,9 @@ { int index, result; int size = len(listin); - byte * buffer = new byte [size]; + unsigned char * buffer = new unsigned char [size]; for (index=0;index<size;index++ ) { - buffer[index] = (byte) boost::python::extract<int> (listin[index]); + buffer[index] = (unsigned char) boost::python::extract<int> (listin[index]); } result = me.send((const void *) buffer, size, flags ); delete buffer; @@ -20,9 +20,9 @@ { int index, result; int size = len(listin); - byte * buffer = new byte[size]; + unsigned char * buffer = new unsigned char[size]; for (index=0;index<size;index++ ) { - buffer[index] = (byte) boost::python::extract<char> (listin[index]); + buffer[index] = (unsigned char) boost::python::extract<char> (listin[index]); } result = me.send((const void *) buffer, size, flags ); delete buffer; @@ -32,7 +32,7 @@ { int index, result; int size = len(listin); - byte * buffer = new byte[size]; + unsigned char * buffer = new unsigned char[size]; for (index=0;index<size;index++ ) { buffer[index] = boost::python::extract<int> (listin[index]); } @@ -44,7 +44,7 @@ { int index, result; int size = len(listin); - byte * buffer = new byte[size]; + unsigned char * buffer = new unsigned char[size]; for (index=0;index<size;index++ ) { buffer[index] = boost::python::extract<char> (listin[index]); } @@ -56,7 +56,7 @@ boost::python::list netSocket_recv ( netSocket & me, int MaxSize=20486, int flags = 0 ) { - byte * buffer = new byte [MaxSize]; + unsigned char * buffer = new unsigned char [MaxSize]; int length,x; boost::python::list listout; length = me.recv ( (void *) buffer, MaxSize, flags); @@ -82,7 +82,7 @@ boost::python::list netSocket_recvfrom ( netSocket & me, int MaxSize, int flags, netAddress* from ) { - byte * buffer = new byte [MaxSize]; + unsigned char * buffer = new unsigned char [MaxSize]; int length,x; boost::python::list listout; length = me.recvfrom ( (void *) buffer, MaxSize, flags, from); @@ -162,9 +162,9 @@ { int index, result; int size = len(listin); - byte * buffer = new byte [size]; + unsigned char * buffer = new unsigned char [size]; for (index=0;index<size;index++ ) { - buffer[index] = (byte) boost::python::extract<int> (listin[index]); + buffer[index] = (unsigned char) boost::python::extract<int> (listin[index]); } result = me.send((const void *) buffer, size, flags ); delete buffer; @@ -175,9 +175,9 @@ { int index, result; int size = len(listin); - byte * buffer = new byte[size]; + unsigned char * buffer = new unsigned char[size]; for (index=0;index<size;index++ ) { - buffer[index] = (byte) boost::python::extract<char> (listin[index]); + buffer[index] = (unsigned char) boost::python::extract<char> (listin[index]); } result = me.send((const void *) buffer, size, flags ); delete buffer; @@ -185,7 +185,7 @@ } boost::python::list netChannel_recv ( netChannel & me, int MaxSize=2048, int flags = 0 ) { - byte * buffer = new byte [MaxSize]; + unsigned char * buffer = new unsigned char [MaxSize]; int length,x; boost::python::list listout; length = me.recv ( (void *) buffer, MaxSize, flags); @@ -301,4 +301,4 @@ rt = mb.class_( 'netBuffer' ) rt.add_declaration_code( WRAPPER_DEFINITION_netBuffer ) apply_reg (rt, WRAPPER_REGISTRATION_netBuffer ) - \ No newline at end of file + Modified: trunk/python-ogre/environment.py =================================================================== --- trunk/python-ogre/environment.py 2007-09-23 03:40:15 UTC (rev 390) +++ trunk/python-ogre/environment.py 2007-09-23 07:22:47 UTC (rev 391) @@ -317,7 +317,9 @@ lib_dirs = [ Config.PATH_LIB_Boost ] include_dirs = [ Config.PATH_Boost - , Config.PATH_INCLUDE_OPCODE + , Config.PATH_INCLUDE_OPCODE + , os.path.join(Config.PATH_INCLUDE_OPCODE, 'Ice' ) + ] CCFLAGS = ' -DBAN_OPCODE_AUTOLINK -DICE_NO_DLL ' ModuleName = 'Opcode' This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2007-09-23 08:38:08
|
Revision: 392 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=392&view=rev Author: andy_miller Date: 2007-09-23 01:38:07 -0700 (Sun, 23 Sep 2007) Log Message: ----------- More Linux Updates - OgreOde fixed, Newline to Quickqui file to remove warning Modified Paths: -------------- trunk/python-ogre/ThirdParty/quickgui/QuickGUIExportDLL.h trunk/python-ogre/code_generators/ogreode/generate_code.py trunk/python-ogre/environment.py Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIExportDLL.h =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIExportDLL.h 2007-09-23 07:22:47 UTC (rev 391) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIExportDLL.h 2007-09-23 08:38:07 UTC (rev 392) @@ -13,4 +13,5 @@ #endif #endif -#endif \ No newline at end of file +#endif + Modified: trunk/python-ogre/code_generators/ogreode/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/ogreode/generate_code.py 2007-09-23 07:22:47 UTC (rev 391) +++ trunk/python-ogre/code_generators/ogreode/generate_code.py 2007-09-23 08:38:07 UTC (rev 392) @@ -239,8 +239,8 @@ for cls in mb.global_ns.namespace(ns).classes(): cls.add_properties( recognizer=ogre_properties.ogre_property_recognizer_t() ) - common_utils.add_constants( mb, { 'ogreode_version' : '"%s"' % environment.ogreode.version - , 'python_version' : '"%s"' % sys.version } ) + common_utils.add_constants( mb, { 'ogreode_version' : '"%s"' % environment.ogreode.version.replace("\n", "\\\n") + , 'python_version' : '"%s"' % sys.version.replace("\n", "\\\n" ) } ) for ns in namespaces: for cls in mb.global_ns.namespace(ns).classes(): process_warnings.go ( cls ) Modified: trunk/python-ogre/environment.py =================================================================== --- trunk/python-ogre/environment.py 2007-09-23 07:22:47 UTC (rev 391) +++ trunk/python-ogre/environment.py 2007-09-23 08:38:07 UTC (rev 392) @@ -246,7 +246,7 @@ active=True version = "1.0" parent = "ogre/physics" - libs = ['newton', Config.LIB_Boost, 'OgreNewt_Main', 'OgreMain'] + libs = ['Newton', Config.LIB_Boost, 'OgreNewt_Main', 'OgreMain'] include_dirs = [Config.PATH_Boost , Config.PATH_Newton # only one path for Newton , Config.PATH_INCLUDE_Ogre This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2007-09-22 11:41:01
|
Revision: 388 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=388&view=rev Author: andy_miller Date: 2007-09-22 04:41:04 -0700 (Sat, 22 Sep 2007) Log Message: ----------- Opcode now part of the "thirdparty source tree, as is quickgui, ogreal, plib etc Modified Paths: -------------- trunk/python-ogre/ThirdParty/quickgui/QuickGUI.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIButton.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIButton.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIComboBox.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIComboBox.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIEventArgs.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIExportDLL.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIImage.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIImage.h trunk/python-ogre/ThirdParty/quickgui/QuickGUILabel.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUILabel.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIList.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIList.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIListItem.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIListItem.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIManager.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIManager.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIMemberFunctionPointer.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIMenu.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIMenu.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIMenuList.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIMenuList.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIMouseCursor.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIMouseCursor.h trunk/python-ogre/ThirdParty/quickgui/QuickGUINStateButton.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUINStateButton.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIPanel.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIPanel.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIProgressBar.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIProgressBar.h trunk/python-ogre/ThirdParty/quickgui/QuickGUISheet.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUISheet.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIText.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIText.h trunk/python-ogre/ThirdParty/quickgui/QuickGUITextBox.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUITextBox.h trunk/python-ogre/ThirdParty/quickgui/QuickGUITitleBar.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUITitleBar.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIWidget.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIWidget.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIWindow.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIWindow.h trunk/python-ogre/code_generators/bullet/generate_code.py trunk/python-ogre/code_generators/bullet/python_bullet_aliases.h trunk/python-ogre/code_generators/ogre/hand_made_wrappers.py trunk/python-ogre/code_generators/opcode/generate_code.py trunk/python-ogre/environment.py trunk/python-ogre/scripts/01-RetrieveSource.sh trunk/python-ogre/scripts/02-ExtractAndPatch.sh trunk/python-ogre/scripts/06-GenerateCode.sh Added Paths: ----------- trunk/python-ogre/ThirdParty/ogreal/ trunk/python-ogre/ThirdParty/ogreal/Makefile.am trunk/python-ogre/ThirdParty/ogreal/OgreAL.h trunk/python-ogre/ThirdParty/ogreal/OgreALListener.cpp trunk/python-ogre/ThirdParty/ogreal/OgreALListener.h trunk/python-ogre/ThirdParty/ogreal/OgreALOggSound.cpp trunk/python-ogre/ThirdParty/ogreal/OgreALOggSound.h trunk/python-ogre/ThirdParty/ogreal/OgreALOggSoundStream.cpp trunk/python-ogre/ThirdParty/ogreal/OgreALOggSoundStream.h trunk/python-ogre/ThirdParty/ogreal/OgreALPrereqs.h trunk/python-ogre/ThirdParty/ogreal/OgreALSound.cpp trunk/python-ogre/ThirdParty/ogreal/OgreALSound.h trunk/python-ogre/ThirdParty/ogreal/OgreALSoundManager.cpp trunk/python-ogre/ThirdParty/ogreal/OgreALSoundManager.h trunk/python-ogre/ThirdParty/ogreal/OgreALSoundStream.cpp trunk/python-ogre/ThirdParty/ogreal/OgreALSoundStream.h trunk/python-ogre/ThirdParty/ogreal/OgreALWavSound.cpp trunk/python-ogre/ThirdParty/ogreal/OgreALWavSound.h trunk/python-ogre/ThirdParty/opcode/ trunk/python-ogre/ThirdParty/opcode/Ice/ trunk/python-ogre/ThirdParty/opcode/Ice/IceAABB.cpp trunk/python-ogre/ThirdParty/opcode/Ice/IceAABB.h trunk/python-ogre/ThirdParty/opcode/Ice/IceAxes.h trunk/python-ogre/ThirdParty/opcode/Ice/IceBoundingSphere.h trunk/python-ogre/ThirdParty/opcode/Ice/IceContainer.cpp trunk/python-ogre/ThirdParty/opcode/Ice/IceContainer.h trunk/python-ogre/ThirdParty/opcode/Ice/IceFPU.h trunk/python-ogre/ThirdParty/opcode/Ice/IceHPoint.cpp trunk/python-ogre/ThirdParty/opcode/Ice/IceHPoint.h trunk/python-ogre/ThirdParty/opcode/Ice/IceIndexedTriangle.cpp trunk/python-ogre/ThirdParty/opcode/Ice/IceIndexedTriangle.h trunk/python-ogre/ThirdParty/opcode/Ice/IceLSS.h trunk/python-ogre/ThirdParty/opcode/Ice/IceMatrix3x3.cpp trunk/python-ogre/ThirdParty/opcode/Ice/IceMatrix3x3.h trunk/python-ogre/ThirdParty/opcode/Ice/IceMatrix4x4.cpp trunk/python-ogre/ThirdParty/opcode/Ice/IceMatrix4x4.h trunk/python-ogre/ThirdParty/opcode/Ice/IceMemoryMacros.h trunk/python-ogre/ThirdParty/opcode/Ice/IceOBB.cpp trunk/python-ogre/ThirdParty/opcode/Ice/IceOBB.h trunk/python-ogre/ThirdParty/opcode/Ice/IcePairs.h trunk/python-ogre/ThirdParty/opcode/Ice/IcePlane.cpp trunk/python-ogre/ThirdParty/opcode/Ice/IcePlane.h trunk/python-ogre/ThirdParty/opcode/Ice/IcePoint.cpp trunk/python-ogre/ThirdParty/opcode/Ice/IcePoint.h trunk/python-ogre/ThirdParty/opcode/Ice/IcePreprocessor.h trunk/python-ogre/ThirdParty/opcode/Ice/IceRandom.cpp trunk/python-ogre/ThirdParty/opcode/Ice/IceRandom.h trunk/python-ogre/ThirdParty/opcode/Ice/IceRay.cpp trunk/python-ogre/ThirdParty/opcode/Ice/IceRay.h trunk/python-ogre/ThirdParty/opcode/Ice/IceRevisitedRadix.cpp trunk/python-ogre/ThirdParty/opcode/Ice/IceRevisitedRadix.h trunk/python-ogre/ThirdParty/opcode/Ice/IceSegment.cpp trunk/python-ogre/ThirdParty/opcode/Ice/IceSegment.h trunk/python-ogre/ThirdParty/opcode/Ice/IceTriangle.cpp trunk/python-ogre/ThirdParty/opcode/Ice/IceTriangle.h trunk/python-ogre/ThirdParty/opcode/Ice/IceTrilist.h trunk/python-ogre/ThirdParty/opcode/Ice/IceTypes.h trunk/python-ogre/ThirdParty/opcode/Ice/IceUtils.cpp trunk/python-ogre/ThirdParty/opcode/Ice/IceUtils.h trunk/python-ogre/ThirdParty/opcode/IceAABB.cpp trunk/python-ogre/ThirdParty/opcode/IceAABB.h trunk/python-ogre/ThirdParty/opcode/IceAxes.h trunk/python-ogre/ThirdParty/opcode/IceBoundingSphere.h trunk/python-ogre/ThirdParty/opcode/IceContainer.cpp trunk/python-ogre/ThirdParty/opcode/IceContainer.h trunk/python-ogre/ThirdParty/opcode/IceFPU.h trunk/python-ogre/ThirdParty/opcode/IceHPoint.cpp trunk/python-ogre/ThirdParty/opcode/IceHPoint.h trunk/python-ogre/ThirdParty/opcode/IceIndexedTriangle.cpp trunk/python-ogre/ThirdParty/opcode/IceIndexedTriangle.h trunk/python-ogre/ThirdParty/opcode/IceLSS.h trunk/python-ogre/ThirdParty/opcode/IceMatrix3x3.cpp trunk/python-ogre/ThirdParty/opcode/IceMatrix3x3.h trunk/python-ogre/ThirdParty/opcode/IceMatrix4x4.cpp trunk/python-ogre/ThirdParty/opcode/IceMatrix4x4.h trunk/python-ogre/ThirdParty/opcode/IceMemoryMacros.h trunk/python-ogre/ThirdParty/opcode/IceOBB.cpp trunk/python-ogre/ThirdParty/opcode/IceOBB.h trunk/python-ogre/ThirdParty/opcode/IcePairs.h trunk/python-ogre/ThirdParty/opcode/IcePlane.cpp trunk/python-ogre/ThirdParty/opcode/IcePlane.h trunk/python-ogre/ThirdParty/opcode/IcePoint.cpp trunk/python-ogre/ThirdParty/opcode/IcePoint.h trunk/python-ogre/ThirdParty/opcode/IcePreprocessor.h trunk/python-ogre/ThirdParty/opcode/IceRandom.cpp trunk/python-ogre/ThirdParty/opcode/IceRandom.h trunk/python-ogre/ThirdParty/opcode/IceRay.cpp trunk/python-ogre/ThirdParty/opcode/IceRay.h trunk/python-ogre/ThirdParty/opcode/IceRevisitedRadix.cpp trunk/python-ogre/ThirdParty/opcode/IceRevisitedRadix.h trunk/python-ogre/ThirdParty/opcode/IceSegment.cpp trunk/python-ogre/ThirdParty/opcode/IceSegment.h trunk/python-ogre/ThirdParty/opcode/IceTriangle.cpp trunk/python-ogre/ThirdParty/opcode/IceTriangle.h trunk/python-ogre/ThirdParty/opcode/IceTrilist.h trunk/python-ogre/ThirdParty/opcode/IceTypes.h trunk/python-ogre/ThirdParty/opcode/IceUtils.cpp trunk/python-ogre/ThirdParty/opcode/IceUtils.h trunk/python-ogre/ThirdParty/opcode/OPC_AABBCollider.cpp trunk/python-ogre/ThirdParty/opcode/OPC_AABBCollider.h trunk/python-ogre/ThirdParty/opcode/OPC_AABBTree.cpp trunk/python-ogre/ThirdParty/opcode/OPC_AABBTree.h trunk/python-ogre/ThirdParty/opcode/OPC_BaseModel.cpp trunk/python-ogre/ThirdParty/opcode/OPC_BaseModel.h trunk/python-ogre/ThirdParty/opcode/OPC_BoxBoxOverlap.h trunk/python-ogre/ThirdParty/opcode/OPC_BoxPruning.cpp trunk/python-ogre/ThirdParty/opcode/OPC_BoxPruning.h trunk/python-ogre/ThirdParty/opcode/OPC_Collider.cpp trunk/python-ogre/ThirdParty/opcode/OPC_Collider.h trunk/python-ogre/ThirdParty/opcode/OPC_Common.cpp trunk/python-ogre/ThirdParty/opcode/OPC_Common.h trunk/python-ogre/ThirdParty/opcode/OPC_HybridModel.cpp trunk/python-ogre/ThirdParty/opcode/OPC_HybridModel.h trunk/python-ogre/ThirdParty/opcode/OPC_IceHook.h trunk/python-ogre/ThirdParty/opcode/OPC_LSSAABBOverlap.h trunk/python-ogre/ThirdParty/opcode/OPC_LSSCollider.cpp trunk/python-ogre/ThirdParty/opcode/OPC_LSSCollider.h trunk/python-ogre/ThirdParty/opcode/OPC_LSSTriOverlap.h trunk/python-ogre/ThirdParty/opcode/OPC_MeshInterface.cpp trunk/python-ogre/ThirdParty/opcode/OPC_MeshInterface.h trunk/python-ogre/ThirdParty/opcode/OPC_Model.cpp trunk/python-ogre/ThirdParty/opcode/OPC_Model.h trunk/python-ogre/ThirdParty/opcode/OPC_OBBCollider.cpp trunk/python-ogre/ThirdParty/opcode/OPC_OBBCollider.h trunk/python-ogre/ThirdParty/opcode/OPC_OptimizedTree.cpp trunk/python-ogre/ThirdParty/opcode/OPC_OptimizedTree.h trunk/python-ogre/ThirdParty/opcode/OPC_Picking.cpp trunk/python-ogre/ThirdParty/opcode/OPC_Picking.h trunk/python-ogre/ThirdParty/opcode/OPC_PlanesAABBOverlap.h trunk/python-ogre/ThirdParty/opcode/OPC_PlanesCollider.cpp trunk/python-ogre/ThirdParty/opcode/OPC_PlanesCollider.h trunk/python-ogre/ThirdParty/opcode/OPC_PlanesTriOverlap.h trunk/python-ogre/ThirdParty/opcode/OPC_RayAABBOverlap.h trunk/python-ogre/ThirdParty/opcode/OPC_RayCollider.cpp trunk/python-ogre/ThirdParty/opcode/OPC_RayCollider.h trunk/python-ogre/ThirdParty/opcode/OPC_RayTriOverlap.h trunk/python-ogre/ThirdParty/opcode/OPC_Settings.h trunk/python-ogre/ThirdParty/opcode/OPC_SphereAABBOverlap.h trunk/python-ogre/ThirdParty/opcode/OPC_SphereCollider.cpp trunk/python-ogre/ThirdParty/opcode/OPC_SphereCollider.h trunk/python-ogre/ThirdParty/opcode/OPC_SphereTriOverlap.h trunk/python-ogre/ThirdParty/opcode/OPC_SweepAndPrune.cpp trunk/python-ogre/ThirdParty/opcode/OPC_SweepAndPrune.h trunk/python-ogre/ThirdParty/opcode/OPC_TreeBuilders.cpp trunk/python-ogre/ThirdParty/opcode/OPC_TreeBuilders.h trunk/python-ogre/ThirdParty/opcode/OPC_TreeCollider.cpp trunk/python-ogre/ThirdParty/opcode/OPC_TreeCollider.h trunk/python-ogre/ThirdParty/opcode/OPC_TriBoxOverlap.h trunk/python-ogre/ThirdParty/opcode/OPC_TriTriOverlap.h trunk/python-ogre/ThirdParty/opcode/OPC_VolumeCollider.cpp trunk/python-ogre/ThirdParty/opcode/OPC_VolumeCollider.h trunk/python-ogre/ThirdParty/opcode/Opcode.cpp trunk/python-ogre/ThirdParty/opcode/Opcode.h trunk/python-ogre/ThirdParty/opcode/Opcode.ncb trunk/python-ogre/ThirdParty/opcode/Opcode.opt trunk/python-ogre/ThirdParty/opcode/Opcode.plg trunk/python-ogre/ThirdParty/opcode/Opcode.sln trunk/python-ogre/ThirdParty/opcode/Opcode.vcproj trunk/python-ogre/ThirdParty/opcode/Opcode.vcproj.JNPR.amiller.user trunk/python-ogre/ThirdParty/opcode/StdAfx.cpp trunk/python-ogre/ThirdParty/opcode/StdAfx.h trunk/python-ogre/ThirdParty/plib/ trunk/python-ogre/ThirdParty/plib/README trunk/python-ogre/ThirdParty/plib/net.dsp trunk/python-ogre/ThirdParty/plib/net.h trunk/python-ogre/ThirdParty/plib/netBuffer.cxx trunk/python-ogre/ThirdParty/plib/netBuffer.h trunk/python-ogre/ThirdParty/plib/netChannel.cxx trunk/python-ogre/ThirdParty/plib/netChannel.h trunk/python-ogre/ThirdParty/plib/netChat.cxx trunk/python-ogre/ThirdParty/plib/netChat.h trunk/python-ogre/ThirdParty/plib/netMessage.cxx trunk/python-ogre/ThirdParty/plib/netMessage.h trunk/python-ogre/ThirdParty/plib/netMonitor.cxx trunk/python-ogre/ThirdParty/plib/netMonitor.h trunk/python-ogre/ThirdParty/plib/netSocket.cxx trunk/python-ogre/ThirdParty/plib/netSocket.h trunk/python-ogre/ThirdParty/plib/sl.dsp trunk/python-ogre/ThirdParty/plib/sl.h trunk/python-ogre/ThirdParty/plib/slDSP.cxx trunk/python-ogre/ThirdParty/plib/slEnvelope.cxx trunk/python-ogre/ThirdParty/plib/slMODPlayer.cxx trunk/python-ogre/ThirdParty/plib/slMODPrivate.h trunk/python-ogre/ThirdParty/plib/slMODdacio.cxx trunk/python-ogre/ThirdParty/plib/slMODfile.cxx trunk/python-ogre/ThirdParty/plib/slMODfile.h trunk/python-ogre/ThirdParty/plib/slMODinst.cxx trunk/python-ogre/ThirdParty/plib/slMODnote.cxx trunk/python-ogre/ThirdParty/plib/slPlayer.cxx trunk/python-ogre/ThirdParty/plib/slPortability.h trunk/python-ogre/ThirdParty/plib/slSample.cxx trunk/python-ogre/ThirdParty/plib/slSamplePlayer.cxx trunk/python-ogre/ThirdParty/plib/slScheduler.cxx trunk/python-ogre/ThirdParty/plib/sm.h trunk/python-ogre/ThirdParty/plib/smMixer.cxx trunk/python-ogre/ThirdParty/plib/ul.cxx trunk/python-ogre/ThirdParty/plib/ul.dsp trunk/python-ogre/ThirdParty/plib/ul.h trunk/python-ogre/ThirdParty/plib/ulClock.cxx trunk/python-ogre/ThirdParty/plib/ulError.cxx trunk/python-ogre/ThirdParty/plib/ulLinkedList.cxx trunk/python-ogre/ThirdParty/plib/ulList.cxx trunk/python-ogre/ThirdParty/plib/ulLocal.h trunk/python-ogre/ThirdParty/plib/ulRTTI.cxx trunk/python-ogre/ThirdParty/plib/ulRTTI.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIHorizontalScrollBar.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIHorizontalScrollBar.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIHorizontalTrackBar.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIHorizontalTrackBar.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIPoint.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIPoint.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIQuad.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIQuad.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIQuadContainer.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIQuadContainer.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIRect.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIRect.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIScrollPane.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIScrollPane.h trunk/python-ogre/ThirdParty/quickgui/QuickGUISize.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUISize.h trunk/python-ogre/ThirdParty/quickgui/QuickGUISkinSet.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUISkinSet.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIUtility.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIUtility.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIVertex.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIVertexBuffer.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIVertexBuffer.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIVerticalScrollBar.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIVerticalScrollBar.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIVerticalTrackBar.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIVerticalTrackBar.h Added: trunk/python-ogre/ThirdParty/ogreal/Makefile.am =================================================================== --- trunk/python-ogre/ThirdParty/ogreal/Makefile.am (rev 0) +++ trunk/python-ogre/ThirdParty/ogreal/Makefile.am 2007-09-22 11:41:04 UTC (rev 388) @@ -0,0 +1 @@ +pkginclude_HEADERS = OgreAL.h OgreALListener.h OgreALOggSound.h OgreALOggSoundStream.h OgreALPrereqs.h OgreALSound.h OgreALSoundManager.h OgreALSoundStream.h OgreALWavSound.h Added: trunk/python-ogre/ThirdParty/ogreal/OgreAL.h =================================================================== --- trunk/python-ogre/ThirdParty/ogreal/OgreAL.h (rev 0) +++ trunk/python-ogre/ThirdParty/ogreal/OgreAL.h 2007-09-22 11:41:04 UTC (rev 388) @@ -0,0 +1,44 @@ +/*---------------------------------------------------------------------------*\ +** This source file is part of OgreAL ** +** an OpenAL plugin for the Ogre Rendering Engine. ** +** ** +** Copyright 2006 Casey Borders ** +** ** +** OgreAL is free software; you can redistribute it and/or modify it under ** +** the terms of the GNU Lesser General Public License as published by the ** +** Free Software Foundation; either version 2, or (at your option) any later ** +** version. ** +** ** +** The developer really likes screenshots and while he recognises that the ** +** fact that this is an AUDIO plugin means that the fruits of his labor will ** +** never been seen in these images he would like to kindly ask that you send ** +** screenshots of your application using his library to ** +** scr...@mo... ** +** ** +** Please bear in mind that the sending of these screenshots means that you ** +** are agreeing to allow the developer to display them in the media of his ** +** choice. They will, however, be fully credited to the person sending the ** +** email or, if you wish them to be credited differently, please state that ** +** in the body of the email. ** +** ** +** OgreAL 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 GNU General Public License for ** +** more details. ** +** ** +** You should have received a copy of the GNU General Public License along ** +** with OgreAL; see the file LICENSE. If not, write to the ** +** Free Software Foundation, Inc., ** +** 59 Temple Place - Suite 330, ** +** Boston, MA 02111-1307, USA. ** +\*---------------------------------------------------------------------------*/ + +#ifndef _OGRE_AL_H_ +#define _OGRE_AL_H_ + +#include "OgreALListener.h" +#include "OgreALOggSound.h" +#include "OgreALSound.h" +#include "OgreALSoundManager.h" + +#endif Added: trunk/python-ogre/ThirdParty/ogreal/OgreALListener.cpp =================================================================== --- trunk/python-ogre/ThirdParty/ogreal/OgreALListener.cpp (rev 0) +++ trunk/python-ogre/ThirdParty/ogreal/OgreALListener.cpp 2007-09-22 11:41:04 UTC (rev 388) @@ -0,0 +1,260 @@ +/*---------------------------------------------------------------------------*\ +** This source file is part of OgreAL ** +** an OpenAL plugin for the Ogre Rendering Engine. ** +** ** +** Copyright 2006 Casey Borders ** +** ** +** OgreAL is free software; you can redistribute it and/or modify it under ** +** the terms of the GNU Lesser General Public License as published by the ** +** Free Software Foundation; either version 2, or (at your option) any later ** +** version. ** +** ** +** The developer really likes screenshots and while he recognises that the ** +** fact that this is an AUDIO plugin means that the fruits of his labor will ** +** never been seen in these images he would like to kindly ask that you send ** +** screenshots of your application using his library to ** +** scr...@mo... ** +** ** +** Please bear in mind that the sending of these screenshots means that you ** +** are agreeing to allow the developer to display them in the media of his ** +** choice. They will, however, be fully credited to the person sending the ** +** email or, if you wish them to be credited differently, please state that ** +** in the body of the email. ** +** ** +** OgreAL 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 GNU General Public License for ** +** more details. ** +** ** +** You should have received a copy of the GNU General Public License along ** +** with OgreAL; see the file LICENSE. If not, write to the ** +** Free Software Foundation, Inc., ** +** 59 Temple Place - Suite 330, ** +** Boston, MA 02111-1307, USA. ** +\*---------------------------------------------------------------------------*/ + +#include "OgreALListener.h" + +template<> OgreAL::Listener* Ogre::Singleton<OgreAL::Listener>::ms_Singleton = 0; + +namespace OgreAL { + Listener::Listener() : + mGain(1.0), + mPosition(Ogre::Vector3::ZERO), + mDirection(Ogre::Vector3::NEGATIVE_UNIT_Z), + mVelocity(Ogre::Vector3::ZERO), + mUp(Ogre::Vector3::UNIT_Y), + mDerivedPosition(Ogre::Vector3::ZERO), + mDerivedDirection(Ogre::Vector3::NEGATIVE_UNIT_Z) + { + mParentNode = NULL; + mLocalTransformDirty = false; + initListener(); + } + + Listener::Listener(const Ogre::String& name) : + Ogre::MovableObject(name), + mGain(1.0), + mPosition(Ogre::Vector3::ZERO), + mDirection(Ogre::Vector3::NEGATIVE_UNIT_Z), + mVelocity(Ogre::Vector3::ZERO), + mUp(Ogre::Vector3::UNIT_Y), + mDerivedPosition(Ogre::Vector3::ZERO), + mDerivedDirection(Ogre::Vector3::NEGATIVE_UNIT_Z) + { + mParentNode = NULL; + initListener(); + } + + Listener::~Listener() + {} + + Listener* Listener::getSingletonPtr(void) + { + return ms_Singleton; + } + + Listener& Listener::getSingleton(void) + { + assert( ms_Singleton ); return ( *ms_Singleton ); + } + + void Listener::setGain(Ogre::Real gain) + { + mGain = gain; + alListenerf(AL_GAIN, mGain); + } + + void Listener::setPosition(Ogre::Real x, Ogre::Real y, Ogre::Real z) + { + mPosition.x = x; + mPosition.y = y; + mPosition.z = z; + mLocalTransformDirty = true; + } + + void Listener::setPosition(const Ogre::Vector3& vec) + { + mPosition = vec; + mLocalTransformDirty = true; + } + + const Ogre::Vector3& Listener::getPosition() const + { + return mPosition; + } + + void Listener::setDirection(Ogre::Real x, Ogre::Real y, Ogre::Real z) + { + mDirection.x = x; + mDirection.y = y; + mDirection.z = z; + mLocalTransformDirty = true; + } + + void Listener::setDirection(const Ogre::Vector3& vec) + { + mDirection = vec; + mLocalTransformDirty = true; + } + + const Ogre::Vector3& Listener::getDirection() const + { + return mDirection; + } + + void Listener::setVelocity(Ogre::Real x, Ogre::Real y, Ogre::Real z) + { + mVelocity.x = x; + mVelocity.y = y; + mVelocity.z = z; + alListener3f(AL_VELOCITY, mVelocity.x, mVelocity.y, mVelocity.z); + } + + void Listener::setVelocity(const Ogre::Vector3& vec) + { + mVelocity = vec; + alListener3f(AL_VELOCITY, mVelocity.x, mVelocity.y, mVelocity.z); + } + + const Ogre::Vector3& Listener::getVelocity() const + { + return mVelocity; + } + + const Ogre::Vector3& Listener::getDerivedPosition(void) const + { + update(); + return mDerivedPosition; + } + + const Ogre::Vector3& Listener::getDerivedDirection(void) const + { + update(); + return mDerivedPosition; + } + + void Listener::initListener() + { + mOrientation[0]= mDirection.x; // Forward.x + mOrientation[1]= mDirection.y; // Forward.y + mOrientation[2]= mDirection.z; // Forward.z + + mOrientation[3]= mUp.x; // Up.x + mOrientation[4]= mUp.y; // Up.y + mOrientation[5]= mUp.z; // Up.z + + alListener3f(AL_POSITION, mPosition.x, mPosition.y, mPosition.z); + alListenerfv(AL_ORIENTATION, mOrientation); + alListenerf (AL_GAIN, 1.0f); + alListener3f(AL_VELOCITY, 0.0f, 0.0f, 0.0f); + } + + void Listener::update() const + { + if (mParentNode) + { + if (!(mParentNode->_getDerivedOrientation() == mLastParentOrientation && + mParentNode->_getDerivedPosition() == mLastParentPosition) + || mLocalTransformDirty) + { + // Ok, we're out of date with SceneNode we're attached to + mLastParentOrientation = mParentNode->_getDerivedOrientation(); + mLastParentPosition = mParentNode->_getDerivedPosition(); + mDerivedDirection = mLastParentOrientation * mDirection; + mDerivedPosition = (mLastParentOrientation * mPosition) + mLastParentPosition; + } + } + else + { + mDerivedPosition = mPosition; + mDerivedDirection = mDirection; + } + + mLocalTransformDirty = false; + } + + void Listener::updateListener() + { + update(); + if(mParentNode) + { + mPosition = mLastParentPosition; + mDirection = mLastParentOrientation.zAxis(); + mUp = mLastParentOrientation.yAxis(); + } + alListener3f(AL_POSITION, mPosition.x, mPosition.y, mPosition.z); + mOrientation[0]= -mDirection.x; // Forward.x + mOrientation[1]= -mDirection.y; // Forward.y + mOrientation[2]= -mDirection.z; // Forward.z + + mOrientation[3]= mUp.x; // Up.x + mOrientation[4]= mUp.y; // Up.y + mOrientation[5]= mUp.z; // Up.z + alListenerfv(AL_ORIENTATION, mOrientation); + } + + const Ogre::String& Listener::getMovableType() const + { + return ListenerFactory::FACTORY_TYPE_NAME; + } + + const Ogre::AxisAlignedBox& Listener::getBoundingBox() const + { + // Null, Sounds are not visible + static Ogre::AxisAlignedBox box; + return box; + } + + void Listener::_updateRenderQueue(Ogre::RenderQueue* queue) + { + // Do Nothing + } + + void Listener::_notifyAttached(Ogre::Node* parent, bool isTagPoint) + { + mParentNode = parent; + } + + Ogre::String ListenerFactory::FACTORY_TYPE_NAME = "OgreAL_Listener"; + + const Ogre::String& ListenerFactory::getType(void) const + { + return FACTORY_TYPE_NAME; + } + + Ogre::MovableObject* ListenerFactory::createInstanceImpl(const Ogre::String& name, + const Ogre::NameValuePairList* params) + { + Listener *listener = Listener::getSingletonPtr(); + if(listener) + return listener; + else + return new Listener(name); + } + + void ListenerFactory::destroyInstance(Ogre::MovableObject* obj) + { + delete obj; + } +} Added: trunk/python-ogre/ThirdParty/ogreal/OgreALListener.h =================================================================== --- trunk/python-ogre/ThirdParty/ogreal/OgreALListener.h (rev 0) +++ trunk/python-ogre/ThirdParty/ogreal/OgreALListener.h 2007-09-22 11:41:04 UTC (rev 388) @@ -0,0 +1,192 @@ +/*---------------------------------------------------------------------------*\ +** This source file is part of OgreAL ** +** an OpenAL plugin for the Ogre Rendering Engine. ** +** ** +** Copyright 2006 Casey Borders ** +** ** +** OgreAL is free software; you can redistribute it and/or modify it under ** +** the terms of the GNU Lesser General Public License as published by the ** +** Free Software Foundation; either version 2, or (at your option) any later ** +** version. ** +** ** +** The developer really likes screenshots and while he recognises that the ** +** fact that this is an AUDIO plugin means that the fruits of his labor will ** +** never been seen in these images he would like to kindly ask that you send ** +** screenshots of your application using his library to ** +** scr...@mo... ** +** ** +** Please bear in mind that the sending of these screenshots means that you ** +** are agreeing to allow the developer to display them in the media of his ** +** choice. They will, however, be fully credited to the person sending the ** +** email or, if you wish them to be credited differently, please state that ** +** in the body of the email. ** +** ** +** OgreAL 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 GNU General Public License for ** +** more details. ** +** ** +** You should have received a copy of the GNU General Public License along ** +** with OgreAL; see the file LICENSE. If not, write to the ** +** Free Software Foundation, Inc., ** +** 59 Temple Place - Suite 330, ** +** Boston, MA 02111-1307, USA. ** +\*---------------------------------------------------------------------------*/ + +#ifndef _OGRE_AL_LISTENER_H_ +#define _OGRE_AL_LISTENER_H_ + +#include "OgreALPrereqs.h" + +namespace OgreAL { + /** + * Listener. + * @remarks + * There is only ever one listener in the scene and it is created + * when the SoundManager is initialized. To get the reference to + * the listener use SoundManager::getListener. The listener can + * be attached to an Ogre::SceneNode or placed at some point in space. + * + * @see Ogre::MovableObject + * @see Ogre::Singleton + */ + class OgreAL_Export Listener : public Ogre::MovableObject, protected Ogre::Singleton<Listener> + { + protected: + /* + ** Constructors are protected to enforce the use of the + ** factory via SoundManager::createListener + */ + + /** Default Constructor. */ + Listener(); + /** Normal Constructor. Should not be called directly! Use SoundManager::getListener */ + Listener(const Ogre::String& name); + + public: + /** Standard Destructor */ + virtual ~Listener(); + + /** Returns the Listener singleton object */ + static Listener& getSingleton(); + /** Returns a pointer to the Listener singleton object */ + static Listener* getSingletonPtr(); + + /** + * Sets the gain. + * @param gain The gain where 1.0 is full volume and 0.0 is off + * @note Gain should be positive + */ + void setGain(Ogre::Real gain); + /** Returns the gain. */ + Ogre::Real getGain() const {return mGain;} + /** + * Sets the position of the listener. + * @param x The x part of the position + * @param y The y part of the position + * @param z The z part of the position + * @note The position will be overridden if the listener is attached to a SceneNode + */ + void setPosition(Ogre::Real x, Ogre::Real y, Ogre::Real z); + /** + * Sets the position of the listener. + * @param vec The new postion for the listener. + * @note The position will be overridden if the listener is attached to a SceneNode + */ + void setPosition(const Ogre::Vector3& vec); + /** Returns the position of the sound. */ + const Ogre::Vector3& getPosition() const; + /** + * Sets the direction of the listener. + * @param x The x part of the direction vector + * @param y The y part of the direction vector + * @param z The z part of the direction vector + * @note The direction will be overridden if the listener is attached to a SceneNode + */ + void setDirection(Ogre::Real x, Ogre::Real y, Ogre::Real z); + /** + * Sets the direction of the listener. + * @param vec The direction vector. + * @note The direction will be overridden if the listener is attached to a SceneNode + */ + void setDirection(const Ogre::Vector3& vec); + /** Returns the direction of the sound. */ + const Ogre::Vector3& getDirection() const; + /** + * Sets the velocity of the listener. + * @param x The x part of the velocity vector + * @param y The y part of the velocity vector + * @param z The z part of the velocity vector + */ + void setVelocity(Ogre::Real x, Ogre::Real y, Ogre::Real z); + /** + * Sets the velocity of the listener. + * @param vec The velocity vector. + */ + void setVelocity(const Ogre::Vector3& vec); + /** Returns the velocity of the sound. */ + const Ogre::Vector3& getVelocity() const; + /** Returns the position of the sound including any transform from nodes it is attached to. */ + const Ogre::Vector3& getDerivedPosition() const; + /** Returns the direction of the sound including any transform from nodes it is attached to. */ + const Ogre::Vector3& getDerivedDirection() const; + + /** Overridden from MovableObject */ + const Ogre::String& getMovableType() const; + /** Overridden from MovableObject */ + const Ogre::AxisAlignedBox& getBoundingBox() const; + /** Overridden from MovableObject */ + Ogre::Real getBoundingRadius() const {return 0; /* Not Visible */} + /** Overridden from MovableObject */ + void _updateRenderQueue(Ogre::RenderQueue* queue); + /** Overridden from MovableObject */ + void _notifyAttached(Ogre::Node* parent, bool isTagPoint = false); + + protected: + /// Internal method for synchronising with parent node (if any) + virtual void update() const; + /// This is called each frame to update the position, direction, etc + void updateListener(); + /// Convienance method to reset the sound state + void initListener(); + + /// Postion taking into account the parent node + mutable Ogre::Vector3 mDerivedPosition; + /// Direction taking into account the parent node + mutable Ogre::Vector3 mDerivedDirection; + /// Stored versions of parent orientation + mutable Ogre::Quaternion mLastParentOrientation; + /// Stored versions of parent position + mutable Ogre::Vector3 mLastParentPosition; + + Ogre::Real mGain; + Ogre::Vector3 mPosition; + Ogre::Vector3 mDirection; + Ogre::Vector3 mVelocity; + Ogre::Vector3 mUp; + ALfloat mOrientation[6]; + /// Is the local transform dirty? + mutable bool mLocalTransformDirty; + + friend class SoundManager; + friend class ListenerFactory; + }; + + /** Factory object for creating the listener */ + class OgreAL_Export ListenerFactory : public Ogre::MovableObjectFactory + { + public: + ListenerFactory() {} + ~ListenerFactory() {} + + static Ogre::String FACTORY_TYPE_NAME; + + const Ogre::String& getType() const; + void destroyInstance(Ogre::MovableObject* obj); + + protected: + Ogre::MovableObject* createInstanceImpl(const Ogre::String& name, + const Ogre::NameValuePairList* params = 0); + }; +} // Namespace +#endif Added: trunk/python-ogre/ThirdParty/ogreal/OgreALOggSound.cpp =================================================================== --- trunk/python-ogre/ThirdParty/ogreal/OgreALOggSound.cpp (rev 0) +++ trunk/python-ogre/ThirdParty/ogreal/OgreALOggSound.cpp 2007-09-22 11:41:04 UTC (rev 388) @@ -0,0 +1,161 @@ +/*---------------------------------------------------------------------------*\ +** This source file is part of OgreAL ** +** an OpenAL plugin for the Ogre Rendering Engine. ** +** ** +** Copyright 2006 Casey Borders ** +** ** +** OgreAL is free software; you can redistribute it and/or modify it under ** +** the terms of the GNU Lesser General Public License as published by the ** +** Free Software Foundation; either version 2, or (at your option) any later ** +** version. ** +** ** +** The developer really likes screenshots and while he recognises that the ** +** fact that this is an AUDIO plugin means that the fruits of his labor will ** +** never been seen in these images he would like to kindly ask that you send ** +** screenshots of your application using his library to ** +** scr...@mo... ** +** ** +** Please bear in mind that the sending of these screenshots means that you ** +** are agreeing to allow the developer to display them in the media of his ** +** choice. They will, however, be fully credited to the person sending the ** +** email or, if you wish them to be credited differently, please state that ** +** in the body of the email. ** +** ** +** OgreAL 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 GNU General Public License for ** +** more details. ** +** ** +** You should have received a copy of the GNU General Public License along ** +** with OgreAL; see the file LICENSE. If not, write to the ** +** Free Software Foundation, Inc., ** +** 59 Temple Place - Suite 330, ** +** Boston, MA 02111-1307, USA. ** +\*---------------------------------------------------------------------------*/ + +#include "OgreALOggSound.h" +#include "OgreALSoundManager.h" + +namespace OgreAL { + OggSound::OggSound(const Ogre::String& name, const Ogre::String& soundFile, bool loop, AudioFormat format) : + Sound(name, soundFile), + mOggFile(0), + mVorbisInfo(0), + mVorbisComment(0) + { + if(!(mOggFile = fopen(soundFile.c_str(), "rb"))) + { + throw Ogre::Exception(1, "Could not open Ogg file.", "OgreAL::OggSound::ctor"); + } + + if(ov_open(mOggFile, &mOggStream, NULL, 0) < 0) + { + fclose(mOggFile); + throw Ogre::Exception(1, "Could not open Ogg stream.", "OgreAL::OggSound::ctor"); + } + + mVorbisInfo = ov_info(&mOggStream, -1); + + unsigned long channels = mVorbisInfo->channels; + mFreq = mVorbisInfo->rate; + mLoop = loop; + + if(channels == 1) + { + mFormat = AL_FORMAT_MONO16; + // Set BufferSize to 250ms (Frequency * 2 (16bit) divided by 4 (quarter of a second)) + mBufferSize = mFreq >> 1; + // IMPORTANT : The Buffer Size must be an exact multiple of the BlockAlignment ... + mBufferSize -= (mBufferSize % 2); + } + else if(channels == 2) + { + mFormat = AL_FORMAT_STEREO16; + // Set BufferSize to 250ms (Frequency * 4 (16bit stereo) divided by 4 (quarter of a second)) + mBufferSize = mFreq; + // IMPORTANT : The Buffer Size must be an exact multiple of the BlockAlignment ... + mBufferSize -= (mBufferSize % 4); + } + else if(channels == 4) + { + mFormat = alGetEnumValue("AL_FORMAT_QUAD16"); + // Set BufferSize to 250ms (Frequency * 8 (16bit 4-channel) divided by 4 (quarter of a second)) + mBufferSize = mFreq * 2; + // IMPORTANT : The Buffer Size must be an exact multiple of the BlockAlignment ... + mBufferSize -= (mBufferSize % 8); + } + else if(channels == 6) + { + mFormat = alGetEnumValue("AL_FORMAT_51CHN16"); + // Set BufferSize to 250ms (Frequency * 12 (16bit 6-channel) divided by 4 (quarter of a second)) + mBufferSize = mFreq * 3; + // IMPORTANT : The Buffer Size must be an exact multiple of the BlockAlignment ... + mBufferSize -= (mBufferSize % 12); + } + else if(channels == 7) + { + mFormat = alGetEnumValue("AL_FORMAT_61CHN16"); + // Set BufferSize to 250ms (Frequency * 16 (16bit 7-channel) divided by 4 (quarter of a second)) + mBufferSize = mFreq * 4; + // IMPORTANT : The Buffer Size must be an exact multiple of the BlockAlignment ... + mBufferSize -= (mBufferSize % 16); + } + else if(channels == 8) + { + mFormat = alGetEnumValue("AL_FORMAT_71CHN16"); + // Set BufferSize to 250ms (Frequency * 20 (16bit 8-channel) divided by 4 (quarter of a second)) + mBufferSize = mFreq * 5; + // IMPORTANT : The Buffer Size must be an exact multiple of the BlockAlignment ... + mBufferSize -= (mBufferSize % 20); + } + else + { + // Couldn't determine buffer format so log the error and default to mono + Ogre::LogManager::getSingleton().logMessage("!!WARNING!! Could not determine buffer format! Defaulting to MONO"); + + mFormat = AL_FORMAT_MONO16; + // Set BufferSize to 250ms (Frequency * 2 (16bit) divided by 4 (quarter of a second)) + mBufferSize = mFreq >> 1; + // IMPORTANT : The Buffer Size must be an exact multiple of the BlockAlignment ... + mBufferSize -= (mBufferSize % 2); + } + + alGenBuffers(1, &mBuffer); + int currSection; + long size = 0; + char data[4096*8]; + std::vector<char> buffer; + do + { + size = ov_read(&mOggStream, data, sizeof(data), 0, 2, 1, &currSection); + buffer.insert(buffer.end(), data, data + size); + }while(size > 0); + + ov_clear(&mOggStream); + alBufferData(mBuffer, mFormat, &buffer[0], static_cast<ALsizei>(buffer.size()), mFreq); + + createAndBindSource(); + } + + OggSound::~OggSound() + {} + + Ogre::String OggSound::errorToString(int error) const + { + switch(error) + { + case OV_EREAD: + return Ogre::String("Read from media."); + case OV_ENOTVORBIS: + return Ogre::String("Not Vorbis data."); + case OV_EVERSION: + return Ogre::String("Vorbis version mismatch."); + case OV_EBADHEADER: + return Ogre::String("Invalid Vorbis header."); + case OV_EFAULT: + return Ogre::String("Internal logic fault (bug or heap/stack corruption."); + default: + return Sound::errorToString(error); + } + } +} // Namespace Added: trunk/python-ogre/ThirdParty/ogreal/OgreALOggSound.h =================================================================== --- trunk/python-ogre/ThirdParty/ogreal/OgreALOggSound.h (rev 0) +++ trunk/python-ogre/ThirdParty/ogreal/OgreALOggSound.h 2007-09-22 11:41:04 UTC (rev 388) @@ -0,0 +1,91 @@ +/*---------------------------------------------------------------------------*\ +** This source file is part of OgreAL ** +** an OpenAL plugin for the Ogre Rendering Engine. ** +** ** +** Copyright 2006 Casey Borders ** +** ** +** OgreAL is free software; you can redistribute it and/or modify it under ** +** the terms of the GNU Lesser General Public License as published by the ** +** Free Software Foundation; either version 2, or (at your option) any later ** +** version. ** +** ** +** The developer really likes screenshots and while he recognises that the ** +** fact that this is an AUDIO plugin means that the fruits of his labor will ** +** never been seen in these images he would like to kindly ask that you send ** +** screenshots of your application using his library to ** +** scr...@mo... ** +** ** +** Please bear in mind that the sending of these screenshots means that you ** +** are agreeing to allow the developer to display them in the media of his ** +** choice. They will, however, be fully credited to the person sending the ** +** email or, if you wish them to be credited differently, please state that ** +** in the body of the email. ** +** ** +** OgreAL 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 GNU General Public License for ** +** more details. ** +** ** +** You should have received a copy of the GNU General Public License along ** +** with OgreAL; see the file LICENSE. If not, write to the ** +** Free Software Foundation, Inc., ** +** 59 Temple Place - Suite 330, ** +** Boston, MA 02111-1307, USA. ** +\*---------------------------------------------------------------------------*/ + +#ifndef _OGRE_AL_OGG_SOUND_H_ +#define _OGRE_AL_OGG_SOUND_H_ + +#include <string> +#include <vector> + +#include "ogg/ogg.h" +#include "vorbis/codec.h" +#include "vorbis/vorbisfile.h" +#include "OgreALPrereqs.h" +#include "OgreALSound.h" + +namespace OgreAL { + /** + * OggSound. + * @note + * This object is only to be instantiated using the SoundManager::createSound + * method. + * @remark This is a sound that plays OggVorbis files + * + * @see OgreAL::Sound + */ + class OgreAL_Export OggSound : public Sound + { + protected: + /* + ** Constructor is protected to enforce the use of the + ** factory via SoundManager::createSound + */ + + /** + * Constructor. + * @param name The name used to reference this sound + * @param soundFile The name of the file to load + * @param loop Should the sound loop once it has played + */ + OggSound(const Ogre::String& name, const Ogre::String& soundFile, bool loop, AudioFormat format); + + public: + /** Standard Destructor. */ + virtual ~OggSound(); + + protected: + /// Translate the OpenAL error code to a string + virtual Ogre::String errorToString(int error) const; + + friend class SoundFactory; + + private: + FILE* mOggFile; // file handle + OggVorbis_File mOggStream; // stream handle + vorbis_info* mVorbisInfo; // some formatting data + vorbis_comment* mVorbisComment; // user comments + }; +} // Namespace +#endif Added: trunk/python-ogre/ThirdParty/ogreal/OgreALOggSoundStream.cpp =================================================================== --- trunk/python-ogre/ThirdParty/ogreal/OgreALOggSoundStream.cpp (rev 0) +++ trunk/python-ogre/ThirdParty/ogreal/OgreALOggSoundStream.cpp 2007-09-22 11:41:04 UTC (rev 388) @@ -0,0 +1,295 @@ +/*---------------------------------------------------------------------------*\ +** This source file is part of OgreAL ** +** an OpenAL plugin for the Ogre Rendering Engine. ** +** ** +** Copyright 2006 Casey Borders ** +** ** +** OgreAL is free software; you can redistribute it and/or modify it under ** +** the terms of the GNU Lesser General Public License as published by the ** +** Free Software Foundation; either version 2, or (at your option) any later ** +** version. ** +** ** +** The developer really likes screenshots and while he recognises that the ** +** fact that this is an AUDIO plugin means that the fruits of his labor will ** +** never been seen in these images he would like to kindly ask that you send ** +** screenshots of your application using his library to ** +** scr...@mo... ** +** ** +** Please bear in mind that the sending of these screenshots means that you ** +** are agreeing to allow the developer to display them in the media of his ** +** choice. They will, however, be fully credited to the person sending the ** +** email or, if you wish them to be credited differently, please state that ** +** in the body of the email. ** +** ** +** OgreAL 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 GNU General Public License for ** +** more details. ** +** ** +** You should have received a copy of the GNU General Public License along ** +** with OgreAL; see the file LICENSE. If not, write to the ** +** Free Software Foundation, Inc., ** +** 59 Temple Place - Suite 330, ** +** Boston, MA 02111-1307, USA. ** +\*---------------------------------------------------------------------------*/ + +#include "OgreALOggSoundStream.h" +#include "OgreALSoundManager.h" + +namespace OgreAL { + OggSoundStream::OggSoundStream(const Ogre::String& name, const Ogre::String& soundFile, bool loop, AudioFormat format) : + SoundStream(name, soundFile), + mOggFile(0), + mVorbisInfo(0), + mVorbisComment(0) + { + if(!(mOggFile = fopen(soundFile.c_str(), "rb"))) + { + throw Ogre::Exception(1, "Could not open Ogg file.", "OgreAL::OggSound::ctor"); + } + + if(ov_open(mOggFile, &mOggStream, NULL, 0) < 0) + { + fclose(mOggFile); + throw Ogre::Exception(1, "Could not open Ogg stream. ", "OgreAL::OggSound::ctor"); + } + + mVorbisInfo = ov_info(&mOggStream, -1); + + unsigned long channels = mVorbisInfo->channels; + mFreq = mVorbisInfo->rate; + mLoop = loop; + + if(channels == 1) + { + mFormat = AL_FORMAT_MONO16; + // Set BufferSize to 250ms (Frequency * 2 (16bit) divided by 4 (quarter of a second)) + mBufferSize = mFreq >> 1; + // IMPORTANT : The Buffer Size must be an exact multiple of the BlockAlignment ... + mBufferSize -= (mBufferSize % 2); + } + else if(channels == 2) + { + mFormat = AL_FORMAT_STEREO16; + // Set BufferSize to 250ms (Frequency * 4 (16bit stereo) divided by 4 (quarter of a second)) + mBufferSize = mFreq; + // IMPORTANT : The Buffer Size must be an exact multiple of the BlockAlignment ... + mBufferSize -= (mBufferSize % 4); + } + else if(channels == 4) + { + mFormat = alGetEnumValue("AL_FORMAT_QUAD16"); + // Set BufferSize to 250ms (Frequency * 8 (16bit 4-channel) divided by 4 (quarter of a second)) + mBufferSize = mFreq * 2; + // IMPORTANT : The Buffer Size must be an exact multiple of the BlockAlignment ... + mBufferSize -= (mBufferSize % 8); + } + else if(channels == 6) + { + mFormat = alGetEnumValue("AL_FORMAT_51CHN16"); + // Set BufferSize to 250ms (Frequency * 12 (16bit 6-channel) divided by 4 (quarter of a second)) + mBufferSize = mFreq * 3; + // IMPORTANT : The Buffer Size must be an exact multiple of the BlockAlignment ... + mBufferSize -= (mBufferSize % 12); + } + else if(channels == 7) + { + mFormat = alGetEnumValue("AL_FORMAT_61CHN16"); + // Set BufferSize to 250ms (Frequency * 16 (16bit 7-channel) divided by 4 (quarter of a second)) + mBufferSize = mFreq * 4; + // IMPORTANT : The Buffer Size must be an exact multiple of the BlockAlignment ... + mBufferSize -= (mBufferSize % 16); + } + else if(channels == 8) + { + mFormat = alGetEnumValue("AL_FORMAT_71CHN16"); + // Set BufferSize to 250ms (Frequency * 20 (16bit 8-channel) divided by 4 (quarter of a second)) + mBufferSize = mFreq * 5; + // IMPORTANT : The Buffer Size must be an exact multiple of the BlockAlignment ... + mBufferSize -= (mBufferSize % 20); + } + else + { + // Couldn't determine buffer format so log the error and default to mono + Ogre::LogManager::getSingleton().logMessage("!!WARNING!! Could not determine buffer format! Defaulting to MONO"); + + mFormat = AL_FORMAT_MONO16; + // Set BufferSize to 250ms (Frequency * 2 (16bit) divided by 4 (quarter of a second)) + mBufferSize = mFreq >> 1; + // IMPORTANT : The Buffer Size must be an exact multiple of the BlockAlignment ... + mBufferSize -= (mBufferSize % 2); + } + + alGenBuffers(2, mBuffers); + alGenSources(1, &mSource); + checkError(__FUNCTION__); + + if(SoundManager::getSingleton().xRamSupport()) + { + SoundManager::getSingleton().eaxSetBufferMode(2, mBuffers, SoundManager::xRamAccessible); + } + + for(int i = 0; i < 2; i++) + { + if(!stream(mBuffers[i])) + { + throw Ogre::Exception(1, "Could not open Ogg file.", "OgreAL::OggSound::ctor"); + } + } + + alSourceQueueBuffers(mSource, 2, mBuffers); + checkError(__FUNCTION__); + + initSource(); + + // There is an issue with looping Ogg streams in OpenAL + // so we'll do it manually in the update method + alSourcei(mSource, AL_LOOPING, AL_FALSE); + checkError(__FUNCTION__); + } + + OggSoundStream::~OggSoundStream() + { + emptyQueue(); + alDeleteBuffers(2, mBuffers); + ov_clear(&mOggStream); + + mOggFile = 0; + mVorbisInfo = 0; + mVorbisComment = 0; + } + + bool OggSoundStream::play() + { + if(isPlaying()) + { + return true; + } + else if(isStopped()) + { + for(int i = 0; i < 2; i++) + { + if(!stream(mBuffers[i])) return false; + } + + alSourceQueueBuffers(mSource, 2, mBuffers); + alSourcePlay(mSource); + checkError(__FUNCTION__); + return true; + } + else + { + alSourcePlay(mSource); + checkError(__FUNCTION__); + return true; + } + } + + bool OggSoundStream::stop() + { + if(isStopped() || isInitial()) return true; + + int queued; + alGetSourcei(mSource, AL_BUFFERS_QUEUED, &queued); + checkError(__FUNCTION__); + alSourceStop(mSource); + checkError(__FUNCTION__); + alSourceUnqueueBuffers(mSource, queued, mBuffers); + checkError(__FUNCTION__); + + ov_time_seek(&mOggStream, 0); + + return true; + } + + bool OggSoundStream::_updateSound() + { + // Call the parent method to update the position + Sound::_updateSound(); + + // Update the stream + int processed; + bool active = true; + + alGetSourcei(mSource, AL_BUFFERS_PROCESSED, &processed); + checkError(__FUNCTION__); + + while(processed--) + { + ALuint buffer; + + alSourceUnqueueBuffers(mSource, 1, &buffer); + checkError(__FUNCTION__); + + active = stream(buffer); + + alSourceQueueBuffers(mSource, 1, &buffer); + checkError(__FUNCTION__); + + if(!active) + { + if(mLoop) + { + active = true; + ov_time_seek(&mOggStream, 0); + } + else + { + stop(); + } + } + } + + return active; + } + + bool OggSoundStream::stream(ALuint buffer) + { + char *data = new char[mBufferSize]; + int size = 0; + int section; + int result; + + while(size < mBufferSize) + { + result = ov_read(&mOggStream, data+size, mBufferSize-size, 0, 2, 1, §ion); + + if(result > 0) + size += result; + else + if(result < 0) + throw Ogre::Exception(6, "Ogg Error: " + errorToString(result), "OgreAL::OggSoundStream::stream"); + else + break; + } + + checkError(__FUNCTION__); + + if(size == 0) + return false; + + alBufferData(buffer, mFormat, data, size, mFreq); + checkError(__FUNCTION__); + + return true; + } + + Ogre::String OggSoundStream::errorToString(int error) const + { + switch(error) + { + case OV_EREAD: + return Ogre::String("Read from media."); + case OV_ENOTVORBIS: + return Ogre::String("Not Vorbis data."); + case OV_EVERSION: + return Ogre::String("Vorbis version mismatch."); + case OV_EBADHEADER: + return Ogre::String("Invalid Vorbis header."); + case OV_EFAULT: + return Ogre::String("Internal logic fault (bug or heap/stack corruption."); + default: + return Sound::errorToString(error); + } + } +} // Namespace Added: trunk/python-ogre/ThirdParty/ogreal/OgreALOggSoundStream.h =================================================================== --- trunk/python-ogre/ThirdParty/ogreal/OgreALOggSoundStream.h (rev 0) +++ trunk/python-ogre/ThirdParty/ogreal/OgreALOggSoundStream.h 2007-09-22 11:41:04 UTC (rev 388) @@ -0,0 +1,100 @@ +/*---------------------------------------------------------------------------*\ +** This source file is part of OgreAL ** +** an OpenAL plugin for the Ogre Rendering Engine. ** +** ** +** Copyright 2006 Casey Borders ** +** ** +** OgreAL is free software; you can redistribute it and/or modify it under ** +** the terms of the GNU Lesser General Public License as published by the ** +** Free Software Foundation; either version 2, or (at your option) any later ** +** version. ** +** ** +** The developer really likes screenshots and while he recognises that the ** +** fact that this is an AUDIO plugin means that the fruits of his labor will ** +** never been seen in these images he would like to kindly ... [truncated message content] |
From: <and...@us...> - 2007-09-23 03:40:12
|
Revision: 390 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=390&view=rev Author: andy_miller Date: 2007-09-22 20:40:15 -0700 (Sat, 22 Sep 2007) Log Message: ----------- more Linux updates Modified Paths: -------------- trunk/python-ogre/PythonOgreConfig_posix.py trunk/python-ogre/SConstruct trunk/python-ogre/ThirdParty/opcode/IceAABB.cpp trunk/python-ogre/ThirdParty/opcode/IceAABB.h trunk/python-ogre/ThirdParty/opcode/IceAxes.h trunk/python-ogre/ThirdParty/opcode/IceBoundingSphere.h trunk/python-ogre/ThirdParty/opcode/IceContainer.cpp trunk/python-ogre/ThirdParty/opcode/IceContainer.h trunk/python-ogre/ThirdParty/opcode/IceFPU.h trunk/python-ogre/ThirdParty/opcode/IceHPoint.cpp trunk/python-ogre/ThirdParty/opcode/IceHPoint.h trunk/python-ogre/ThirdParty/opcode/IceIndexedTriangle.cpp trunk/python-ogre/ThirdParty/opcode/IceIndexedTriangle.h trunk/python-ogre/ThirdParty/opcode/IceLSS.h trunk/python-ogre/ThirdParty/opcode/IceMatrix3x3.cpp trunk/python-ogre/ThirdParty/opcode/IceMatrix3x3.h trunk/python-ogre/ThirdParty/opcode/IceMatrix4x4.cpp trunk/python-ogre/ThirdParty/opcode/IceMatrix4x4.h trunk/python-ogre/ThirdParty/opcode/IceMemoryMacros.h trunk/python-ogre/ThirdParty/opcode/IceOBB.cpp trunk/python-ogre/ThirdParty/opcode/IceOBB.h trunk/python-ogre/ThirdParty/opcode/IcePairs.h trunk/python-ogre/ThirdParty/opcode/IcePlane.cpp trunk/python-ogre/ThirdParty/opcode/IcePlane.h trunk/python-ogre/ThirdParty/opcode/IcePoint.cpp trunk/python-ogre/ThirdParty/opcode/IcePoint.h trunk/python-ogre/ThirdParty/opcode/IcePreprocessor.h trunk/python-ogre/ThirdParty/opcode/IceRandom.cpp trunk/python-ogre/ThirdParty/opcode/IceRandom.h trunk/python-ogre/ThirdParty/opcode/IceRay.cpp trunk/python-ogre/ThirdParty/opcode/IceRay.h trunk/python-ogre/ThirdParty/opcode/IceRevisitedRadix.cpp trunk/python-ogre/ThirdParty/opcode/IceRevisitedRadix.h trunk/python-ogre/ThirdParty/opcode/IceSegment.cpp trunk/python-ogre/ThirdParty/opcode/IceSegment.h trunk/python-ogre/ThirdParty/opcode/IceTriangle.cpp trunk/python-ogre/ThirdParty/opcode/IceTriangle.h trunk/python-ogre/ThirdParty/opcode/IceTrilist.h trunk/python-ogre/ThirdParty/opcode/IceTypes.h trunk/python-ogre/ThirdParty/opcode/IceUtils.cpp trunk/python-ogre/ThirdParty/opcode/IceUtils.h trunk/python-ogre/ThirdParty/opcode/OPC_BoxPruning.cpp trunk/python-ogre/ThirdParty/opcode/OPC_BoxPruning.h trunk/python-ogre/ThirdParty/opcode/OPC_IceHook.h trunk/python-ogre/ThirdParty/opcode/OPC_MeshInterface.cpp trunk/python-ogre/ThirdParty/opcode/OPC_Model.cpp trunk/python-ogre/ThirdParty/opcode/Opcode.h trunk/python-ogre/ThirdParty/opcode/Opcode.ncb trunk/python-ogre/ThirdParty/opcode/Opcode.opt trunk/python-ogre/ThirdParty/opcode/Opcode.plg trunk/python-ogre/ThirdParty/opcode/Opcode.vcproj trunk/python-ogre/code_generators/cegui/customization_data.py trunk/python-ogre/code_generators/ogre/generate_code.py trunk/python-ogre/code_generators/ogre/python_ogre_aliases.h trunk/python-ogre/code_generators/opcode/generate_code.py trunk/python-ogre/code_generators/quickgui/generate_code.py trunk/python-ogre/environment.py Modified: trunk/python-ogre/PythonOgreConfig_posix.py =================================================================== --- trunk/python-ogre/PythonOgreConfig_posix.py 2007-09-22 13:44:26 UTC (rev 389) +++ trunk/python-ogre/PythonOgreConfig_posix.py 2007-09-23 03:40:15 UTC (rev 390) @@ -29,7 +29,7 @@ # # ## Parent directories of the libraries PATH_THIRDPARTY = os.path.join(module_dir, 'ThirdParty' ) PATH_Ogre = os.path.join(BASE_DIR,'ogrenew') -PATH_OgreAddons = os.path.join(BASE_DIR, 'OgreAddons') +PATH_OgreAddons = os.path.join(BASE_DIR, 'ogreaddons') PATH_CEGUI = os.path.join(BASE_DIR, 'CEGUI-0.5.0') PATH_OIS = os.path.join(BASE_DIR, 'ois-1.0RC1') PATH_Newton = os.path.join(BASE_DIR, 'newtonSDK','sdk') @@ -104,10 +104,12 @@ PATH_INCLUDE_NxOgre= os.path.join(PATH_NxOgre, 'include') PATH_INCLUDE_betagui = PATH_betagui PATH_INCLUDE_Ogre_CEGUIRenderer = os.path.join( PATH_Ogre, 'Samples/Common/CEGUIRenderer/include') -PATH_INCLUDE_OPCODE = os.path.join( LOCAL_INCLUDE ) +PATH_INCLUDE_OPCODE = os.path.join( PATH_OPCODE ) PATH_INCLUDE_Bullet = os.path.join( LOCAL_INCLUDE ) PATH_INCLUDE_navi = os.path.join (PATH_navi,'include') -PATH_INCLUDE_plib = PATH_plib +PATH_INCLUDE_plib = PATH_plib +PATH_INCLUDE_ogredshow = PATH_ogredshow + PATH_INCLUDE_Theora = os.path.join (PATH_Theora,'include') PATH_INCLUDE_ogrevideoffmpeg = PATH_ogrevideoffmpeg PATH_INCLUDE_ffmpeg = os.path.join (PATH_ffmpeg,'include') Modified: trunk/python-ogre/SConstruct =================================================================== --- trunk/python-ogre/SConstruct 2007-09-22 13:44:26 UTC (rev 389) +++ trunk/python-ogre/SConstruct 2007-09-23 03:40:15 UTC (rev 390) @@ -60,15 +60,15 @@ if os.sys.platform <> 'darwin': CCFLAGS = ' `pkg-config --cflags OGRE` ' CCFLAGS += ' -I' - CCFLAGS += ' -O3 -I./ -fvisibility=hidden -finline-limit=20 ' - CCFLAGS += ' -DOGRE_GCC_VISIBILITY ' # -fvisibility-inlines-hidden + CCFLAGS += ' -O3 -I./ ' # -fvisibility=hidden -finline-limit=20 ' + #CCFLAGS += ' -DOGRE_GCC_VISIBILITY ' # -fvisibility-inlines-hidden else: CCFLAGS = ' -I -pipe -Os -I./' return CCFLAGS def get_source_files(_dir): try: - source_files = filter( lambda s: s.endswith( '.cpp' ), os.listdir(_dir) ) + source_files = filter( lambda s: (s.endswith( '.cpp' ) or s.endswith( '.cxx' ) or s.endswith( '.c' )), os.listdir(_dir) ) except OSError,e: print 'WARNING: Generate the sources this directory: "%s"' % _dir raise e @@ -90,10 +90,10 @@ # Let us select the projects to build possible_projects = ['ogre' , 'ois', 'ogrerefapp', 'ogrenewt', 'cegui', 'ode',\ 'ogreode', 'ogreal', 'quickgui', 'opcode', 'nxogre', 'bullet', 'physx', 'betagui','theora',\ - 'ogrevideoffmpeg', 'ogredshow' ] # , 'raknet' + 'ogrevideoffmpeg', 'ogredshow', 'plib' ] # , 'raknet' default_projects = ['ogre' , 'ois', 'ogrerefapp', 'ogrenewt', 'cegui', 'ode',\ 'ogreode', 'ogreal', 'quickgui', 'opcode', 'nxogre', 'bullet', 'physx', 'betagui','theora',\ - 'ogrevideoffmpeg', 'ogredshow' ] + 'ogrevideoffmpeg', 'ogredshow', 'plib' ] # This lets you call scons like: 'scons PROJECTS=ogre,cegui' opts = Options('custom.py') @@ -155,11 +155,10 @@ ## ugly hack - scons returns a list of targets from SharedLibrary - we have to choose the one we want index = 0 # this is the index into a list of targets - '0' should be the platform default - + if os.name=='nt': + _env.AddPostAction(package,\ + 'mt.exe -nologo -manifest %(name)s.manifest -outputresource:%(name)s;2' % { 'name':package[index] } ) ## and lets have it install the output into the 'package_dir_name/ModuleName' dir and rename to the PydName - _env.AddPostAction(package,\ - 'mt.exe -nologo -manifest %(name)s.manifest -outputresource:%(name)s;2' % { 'name':package[index] } ) - _env.InstallAs(os.path.join(environment.package_dir_name, cls.parent, cls.ModuleName, cls.PydName), package[index] ) Modified: trunk/python-ogre/ThirdParty/opcode/IceAABB.cpp =================================================================== --- trunk/python-ogre/ThirdParty/opcode/IceAABB.cpp 2007-09-22 13:44:26 UTC (rev 389) +++ trunk/python-ogre/ThirdParty/opcode/IceAABB.cpp 2007-09-23 03:40:15 UTC (rev 390) @@ -1,7 +1,7 @@ /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** * Contains AABB-related code. - * \file IceAABB.cpp + * \file .Ice/AABB.cpp * \author Pierre Terdiman * \date January, 29, 2000 */ @@ -20,7 +20,7 @@ // Precompiled Header #include "Stdafx.h" -using namespace IceMaths; +using namespace.Ice/Maths; /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** Modified: trunk/python-ogre/ThirdParty/opcode/IceAABB.h =================================================================== --- trunk/python-ogre/ThirdParty/opcode/IceAABB.h 2007-09-22 13:44:26 UTC (rev 389) +++ trunk/python-ogre/ThirdParty/opcode/IceAABB.h 2007-09-23 03:40:15 UTC (rev 390) @@ -1,7 +1,7 @@ /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** * Contains AABB-related code. (axis-aligned bounding box) - * \file IceAABB.h + * \file .Ice/AABB.h * \author Pierre Terdiman * \date January, 13, 2000 */ Modified: trunk/python-ogre/ThirdParty/opcode/IceAxes.h =================================================================== --- trunk/python-ogre/ThirdParty/opcode/IceAxes.h 2007-09-22 13:44:26 UTC (rev 389) +++ trunk/python-ogre/ThirdParty/opcode/IceAxes.h 2007-09-23 03:40:15 UTC (rev 390) @@ -1,7 +1,7 @@ /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** * Contains axes definition. - * \file IceAxes.h + * \file .Ice/Axes.h * \author Pierre Terdiman * \date January, 29, 2000 */ Modified: trunk/python-ogre/ThirdParty/opcode/IceBoundingSphere.h =================================================================== --- trunk/python-ogre/ThirdParty/opcode/IceBoundingSphere.h 2007-09-22 13:44:26 UTC (rev 389) +++ trunk/python-ogre/ThirdParty/opcode/IceBoundingSphere.h 2007-09-23 03:40:15 UTC (rev 390) @@ -1,7 +1,7 @@ /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** * Contains code to compute the minimal bounding sphere. - * \file IceBoundingSphere.h + * \file .Ice/BoundingSphere.h * \author Pierre Terdiman * \date January, 29, 2000 */ Modified: trunk/python-ogre/ThirdParty/opcode/IceContainer.cpp =================================================================== --- trunk/python-ogre/ThirdParty/opcode/IceContainer.cpp 2007-09-22 13:44:26 UTC (rev 389) +++ trunk/python-ogre/ThirdParty/opcode/IceContainer.cpp 2007-09-23 03:40:15 UTC (rev 390) @@ -1,7 +1,7 @@ /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** * Contains a simple container class. - * \file IceContainer.cpp + * \file .Ice/Container.cpp * \author Pierre Terdiman * \date February, 5, 2000 */ @@ -24,7 +24,7 @@ // Precompiled Header #include "Stdafx.h" -using namespace IceCore; +using namespace.Ice/Core; // Static members #ifdef CONTAINER_STATS Modified: trunk/python-ogre/ThirdParty/opcode/IceContainer.h =================================================================== --- trunk/python-ogre/ThirdParty/opcode/IceContainer.h 2007-09-22 13:44:26 UTC (rev 389) +++ trunk/python-ogre/ThirdParty/opcode/IceContainer.h 2007-09-23 03:40:15 UTC (rev 390) @@ -1,7 +1,7 @@ /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** * Contains a simple container class. - * \file IceContainer.h + * \file .Ice/Container.h * \author Pierre Terdiman * \date February, 5, 2000 */ Modified: trunk/python-ogre/ThirdParty/opcode/IceFPU.h =================================================================== --- trunk/python-ogre/ThirdParty/opcode/IceFPU.h 2007-09-22 13:44:26 UTC (rev 389) +++ trunk/python-ogre/ThirdParty/opcode/IceFPU.h 2007-09-23 03:40:15 UTC (rev 390) @@ -1,7 +1,7 @@ /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** * Contains FPU related code. - * \file IceFPU.h + * \file .Ice/FPU.h * \author Pierre Terdiman * \date April, 4, 2000 */ Modified: trunk/python-ogre/ThirdParty/opcode/IceHPoint.cpp =================================================================== --- trunk/python-ogre/ThirdParty/opcode/IceHPoint.cpp 2007-09-22 13:44:26 UTC (rev 389) +++ trunk/python-ogre/ThirdParty/opcode/IceHPoint.cpp 2007-09-23 03:40:15 UTC (rev 390) @@ -1,7 +1,7 @@ /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** * Contains code for homogeneous points. - * \file IceHPoint.cpp + * \file .Ice/HPoint.cpp * \author Pierre Terdiman * \date April, 4, 2000 */ @@ -28,7 +28,7 @@ // Precompiled Header #include "Stdafx.h" -using namespace IceMaths; +using namespace.Ice/Maths; /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Point Mul = HPoint * Matrix3x3; Modified: trunk/python-ogre/ThirdParty/opcode/IceHPoint.h =================================================================== --- trunk/python-ogre/ThirdParty/opcode/IceHPoint.h 2007-09-22 13:44:26 UTC (rev 389) +++ trunk/python-ogre/ThirdParty/opcode/IceHPoint.h 2007-09-23 03:40:15 UTC (rev 390) @@ -1,7 +1,7 @@ /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** * Contains code for homogeneous points. - * \file IceHPoint.h + * \file .Ice/HPoint.h * \author Pierre Terdiman * \date April, 4, 2000 */ Modified: trunk/python-ogre/ThirdParty/opcode/IceIndexedTriangle.cpp =================================================================== --- trunk/python-ogre/ThirdParty/opcode/IceIndexedTriangle.cpp 2007-09-22 13:44:26 UTC (rev 389) +++ trunk/python-ogre/ThirdParty/opcode/IceIndexedTriangle.cpp 2007-09-23 03:40:15 UTC (rev 390) @@ -1,7 +1,7 @@ /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** * Contains a handy indexed triangle class. - * \file IceIndexedTriangle.cpp + * \file .Ice/IndexedTriangle.cpp * \author Pierre Terdiman * \date January, 17, 2000 */ @@ -11,7 +11,7 @@ // Precompiled Header #include "Stdafx.h" -using namespace IceMaths; +using namespace.Ice/Maths; /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** Modified: trunk/python-ogre/ThirdParty/opcode/IceIndexedTriangle.h =================================================================== --- trunk/python-ogre/ThirdParty/opcode/IceIndexedTriangle.h 2007-09-22 13:44:26 UTC (rev 389) +++ trunk/python-ogre/ThirdParty/opcode/IceIndexedTriangle.h 2007-09-23 03:40:15 UTC (rev 390) @@ -1,7 +1,7 @@ /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** * Contains a handy indexed triangle class. - * \file IceIndexedTriangle.h + * \file .Ice/IndexedTriangle.h * \author Pierre Terdiman * \date January, 17, 2000 */ Modified: trunk/python-ogre/ThirdParty/opcode/IceLSS.h =================================================================== --- trunk/python-ogre/ThirdParty/opcode/IceLSS.h 2007-09-22 13:44:26 UTC (rev 389) +++ trunk/python-ogre/ThirdParty/opcode/IceLSS.h 2007-09-23 03:40:15 UTC (rev 390) @@ -1,7 +1,7 @@ /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** * Contains code for line-swept spheres. - * \file IceLSS.h + * \file .Ice/LSS.h * \author Pierre Terdiman * \date April, 4, 2000 */ Modified: trunk/python-ogre/ThirdParty/opcode/IceMatrix3x3.cpp =================================================================== --- trunk/python-ogre/ThirdParty/opcode/IceMatrix3x3.cpp 2007-09-22 13:44:26 UTC (rev 389) +++ trunk/python-ogre/ThirdParty/opcode/IceMatrix3x3.cpp 2007-09-23 03:40:15 UTC (rev 390) @@ -1,7 +1,7 @@ /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** * Contains code for 3x3 matrices. - * \file IceMatrix3x3.cpp + * \file .Ice/Matrix3x3.cpp * \author Pierre Terdiman * \date April, 4, 2000 */ @@ -35,7 +35,7 @@ // Precompiled Header #include "Stdafx.h" -using namespace IceMaths; +using namespace.Ice/Maths; // Cast operator Matrix3x3::operator Matrix4x4() const Modified: trunk/python-ogre/ThirdParty/opcode/IceMatrix3x3.h =================================================================== --- trunk/python-ogre/ThirdParty/opcode/IceMatrix3x3.h 2007-09-22 13:44:26 UTC (rev 389) +++ trunk/python-ogre/ThirdParty/opcode/IceMatrix3x3.h 2007-09-23 03:40:15 UTC (rev 390) @@ -1,7 +1,7 @@ /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** * Contains code for 3x3 matrices. - * \file IceMatrix3x3.h + * \file .Ice/Matrix3x3.h * \author Pierre Terdiman * \date April, 4, 2000 */ Modified: trunk/python-ogre/ThirdParty/opcode/IceMatrix4x4.cpp =================================================================== --- trunk/python-ogre/ThirdParty/opcode/IceMatrix4x4.cpp 2007-09-22 13:44:26 UTC (rev 389) +++ trunk/python-ogre/ThirdParty/opcode/IceMatrix4x4.cpp 2007-09-23 03:40:15 UTC (rev 390) @@ -1,7 +1,7 @@ /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** * Contains code for 4x4 matrices. - * \file IceMatrix4x4.cpp + * \file .Ice/Matrix4x4.cpp * \author Pierre Terdiman * \date April, 4, 2000 */ @@ -38,7 +38,7 @@ // Precompiled Header #include "Stdafx.h" -using namespace IceMaths; +using namespace.Ice/Maths; /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** @@ -51,7 +51,7 @@ * \param src [in] source matrix */ /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -ICEMATHS_API void IceMaths::InvertPRMatrix(Matrix4x4& dest, const Matrix4x4& src) +ICEMATHS_API void.Ice/Maths::InvertPRMatrix(Matrix4x4& dest, const Matrix4x4& src) { dest.m[0][0] = src.m[0][0]; dest.m[1][0] = src.m[0][1]; Modified: trunk/python-ogre/ThirdParty/opcode/IceMatrix4x4.h =================================================================== --- trunk/python-ogre/ThirdParty/opcode/IceMatrix4x4.h 2007-09-22 13:44:26 UTC (rev 389) +++ trunk/python-ogre/ThirdParty/opcode/IceMatrix4x4.h 2007-09-23 03:40:15 UTC (rev 390) @@ -1,7 +1,7 @@ /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** * Contains code for 4x4 matrices. - * \file IceMatrix4x4.h + * \file .Ice/Matrix4x4.h * \author Pierre Terdiman * \date April, 4, 2000 */ Modified: trunk/python-ogre/ThirdParty/opcode/IceMemoryMacros.h =================================================================== --- trunk/python-ogre/ThirdParty/opcode/IceMemoryMacros.h 2007-09-22 13:44:26 UTC (rev 389) +++ trunk/python-ogre/ThirdParty/opcode/IceMemoryMacros.h 2007-09-23 03:40:15 UTC (rev 390) @@ -1,7 +1,7 @@ /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** * Contains all memory macros. - * \file IceMemoryMacros.h + * \file .Ice/MemoryMacros.h * \author Pierre Terdiman * \date April, 4, 2000 */ @@ -98,7 +98,7 @@ #define SAFE_DESTRUCT(x) if (x) { (x)->SelfDestruct(); (x) = null; } //!< Safe ICE-style release #ifdef __ICEERROR_H__ - #define CHECKALLOC(x) if(!x) return SetIceError("Out of memory.", EC_OUT_OF_MEMORY); //!< Standard alloc checking. HANDLE WITH CARE. + #define CHECKALLOC(x) if(!x) return Se.Ice/Error("Out of memory.", EC_OUT_OF_MEMORY); //!< Standard alloc checking. HANDLE WITH CARE. #else #define CHECKALLOC(x) if(!x) return false; #endif Modified: trunk/python-ogre/ThirdParty/opcode/IceOBB.cpp =================================================================== --- trunk/python-ogre/ThirdParty/opcode/IceOBB.cpp 2007-09-22 13:44:26 UTC (rev 389) +++ trunk/python-ogre/ThirdParty/opcode/IceOBB.cpp 2007-09-23 03:40:15 UTC (rev 390) @@ -1,7 +1,7 @@ /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** * Contains OBB-related code. - * \file IceOBB.cpp + * \file .Ice/OBB.cpp * \author Pierre Terdiman * \date January, 29, 2000 */ @@ -20,7 +20,7 @@ // Precompiled Header #include "Stdafx.h" -using namespace IceMaths; +using namespace.Ice/Maths; /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** Modified: trunk/python-ogre/ThirdParty/opcode/IceOBB.h =================================================================== --- trunk/python-ogre/ThirdParty/opcode/IceOBB.h 2007-09-22 13:44:26 UTC (rev 389) +++ trunk/python-ogre/ThirdParty/opcode/IceOBB.h 2007-09-23 03:40:15 UTC (rev 390) @@ -1,7 +1,7 @@ /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** * Contains OBB-related code. (oriented bounding box) - * \file IceOBB.h + * \file .Ice/OBB.h * \author Pierre Terdiman * \date January, 13, 2000 */ Modified: trunk/python-ogre/ThirdParty/opcode/IcePairs.h =================================================================== --- trunk/python-ogre/ThirdParty/opcode/IcePairs.h 2007-09-22 13:44:26 UTC (rev 389) +++ trunk/python-ogre/ThirdParty/opcode/IcePairs.h 2007-09-23 03:40:15 UTC (rev 390) @@ -1,7 +1,7 @@ /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** * Contains a simple pair class. - * \file IcePairs.h + * \file .Ice/Pairs.h * \author Pierre Terdiman * \date January, 13, 2003 */ Modified: trunk/python-ogre/ThirdParty/opcode/IcePlane.cpp =================================================================== --- trunk/python-ogre/ThirdParty/opcode/IcePlane.cpp 2007-09-22 13:44:26 UTC (rev 389) +++ trunk/python-ogre/ThirdParty/opcode/IcePlane.cpp 2007-09-23 03:40:15 UTC (rev 390) @@ -1,7 +1,7 @@ /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** * Contains code for planes. - * \file IcePlane.cpp + * \file .Ice/Plane.cpp * \author Pierre Terdiman * \date April, 4, 2000 */ @@ -20,7 +20,7 @@ // Precompiled Header #include "Stdafx.h" -using namespace IceMaths; +using namespace.Ice/Maths; /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** Modified: trunk/python-ogre/ThirdParty/opcode/IcePlane.h =================================================================== --- trunk/python-ogre/ThirdParty/opcode/IcePlane.h 2007-09-22 13:44:26 UTC (rev 389) +++ trunk/python-ogre/ThirdParty/opcode/IcePlane.h 2007-09-23 03:40:15 UTC (rev 390) @@ -1,7 +1,7 @@ /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** * Contains code for planes. - * \file IcePlane.h + * \file .Ice/Plane.h * \author Pierre Terdiman * \date April, 4, 2000 */ Modified: trunk/python-ogre/ThirdParty/opcode/IcePoint.cpp =================================================================== --- trunk/python-ogre/ThirdParty/opcode/IcePoint.cpp 2007-09-22 13:44:26 UTC (rev 389) +++ trunk/python-ogre/ThirdParty/opcode/IcePoint.cpp 2007-09-23 03:40:15 UTC (rev 390) @@ -1,7 +1,7 @@ /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** * Contains code for 3D vectors. - * \file IcePoint.cpp + * \file .Ice/Point.cpp * \author Pierre Terdiman * \date April, 4, 2000 */ @@ -48,7 +48,7 @@ // Precompiled Header #include "Stdafx.h" -using namespace IceMaths; +using namespace.Ice/Maths; /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** Modified: trunk/python-ogre/ThirdParty/opcode/IcePoint.h =================================================================== --- trunk/python-ogre/ThirdParty/opcode/IcePoint.h 2007-09-22 13:44:26 UTC (rev 389) +++ trunk/python-ogre/ThirdParty/opcode/IcePoint.h 2007-09-23 03:40:15 UTC (rev 390) @@ -1,7 +1,7 @@ /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** * Contains code for 3D vectors. - * \file IcePoint.h + * \file .Ice/Point.h * \author Pierre Terdiman * \date April, 4, 2000 */ Modified: trunk/python-ogre/ThirdParty/opcode/IcePreprocessor.h =================================================================== --- trunk/python-ogre/ThirdParty/opcode/IcePreprocessor.h 2007-09-22 13:44:26 UTC (rev 389) +++ trunk/python-ogre/ThirdParty/opcode/IcePreprocessor.h 2007-09-23 03:40:15 UTC (rev 390) @@ -1,7 +1,7 @@ /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** * Contains preprocessor stuff. This should be the first included header. - * \file IcePreprocessor.h + * \file .Ice/Preprocessor.h * \author Pierre Terdiman * \date April, 4, 2000 */ Modified: trunk/python-ogre/ThirdParty/opcode/IceRandom.cpp =================================================================== --- trunk/python-ogre/ThirdParty/opcode/IceRandom.cpp 2007-09-22 13:44:26 UTC (rev 389) +++ trunk/python-ogre/ThirdParty/opcode/IceRandom.cpp 2007-09-23 03:40:15 UTC (rev 390) @@ -1,7 +1,7 @@ /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** * Contains code for random generators. - * \file IceRandom.cpp + * \file .Ice/Random.cpp * \author Pierre Terdiman * \date August, 9, 2001 */ @@ -11,14 +11,14 @@ // Precompiled Header #include "Stdafx.h" -using namespace IceCore; +using namespace.Ice/Core; -void IceCore:: SRand(udword seed) +void.Ice/Core:: SRand(udword seed) { srand(seed); } -udword IceCore::Rand() +udword.Ice/Core::Rand() { return rand(); } @@ -26,7 +26,7 @@ static BasicRandom gRandomGenerator(42); -udword IceCore::GetRandomIndex(udword max_index) +udword.Ice/Core::GetRandomIndex(udword max_index) { // We don't use rand() since it's limited to RAND_MAX udword Index = gRandomGenerator.Randomize(); Modified: trunk/python-ogre/ThirdParty/opcode/IceRandom.h =================================================================== --- trunk/python-ogre/ThirdParty/opcode/IceRandom.h 2007-09-22 13:44:26 UTC (rev 389) +++ trunk/python-ogre/ThirdParty/opcode/IceRandom.h 2007-09-23 03:40:15 UTC (rev 390) @@ -1,7 +1,7 @@ /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** * Contains code for random generators. - * \file IceRandom.h + * \file .Ice/Random.h * \author Pierre Terdiman * \date August, 9, 2001 */ Modified: trunk/python-ogre/ThirdParty/opcode/IceRay.cpp =================================================================== --- trunk/python-ogre/ThirdParty/opcode/IceRay.cpp 2007-09-22 13:44:26 UTC (rev 389) +++ trunk/python-ogre/ThirdParty/opcode/IceRay.cpp 2007-09-23 03:40:15 UTC (rev 390) @@ -1,7 +1,7 @@ /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** * Contains code for rays. - * \file IceRay.cpp + * \file .Ice/Ray.cpp * \author Pierre Terdiman * \date April, 4, 2000 */ @@ -61,7 +61,7 @@ // Precompiled Header #include "Stdafx.h" -using namespace IceMaths; +using namespace.Ice/Maths; float Ray::SquareDistance(const Point& point, float* t) const { Modified: trunk/python-ogre/ThirdParty/opcode/IceRay.h =================================================================== --- trunk/python-ogre/ThirdParty/opcode/IceRay.h 2007-09-22 13:44:26 UTC (rev 389) +++ trunk/python-ogre/ThirdParty/opcode/IceRay.h 2007-09-23 03:40:15 UTC (rev 390) @@ -1,7 +1,7 @@ /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** * Contains code for rays. - * \file IceRay.h + * \file .Ice/Ray.h * \author Pierre Terdiman * \date April, 4, 2000 */ Modified: trunk/python-ogre/ThirdParty/opcode/IceRevisitedRadix.cpp =================================================================== --- trunk/python-ogre/ThirdParty/opcode/IceRevisitedRadix.cpp 2007-09-22 13:44:26 UTC (rev 389) +++ trunk/python-ogre/ThirdParty/opcode/IceRevisitedRadix.cpp 2007-09-23 03:40:15 UTC (rev 390) @@ -1,7 +1,7 @@ /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** * Contains source code from the article "Radix Sort Revisited". - * \file IceRevisitedRadix.cpp + * \file .Ice/RevisitedRadix.cpp * \author Pierre Terdiman * \date April, 4, 2000 */ @@ -51,7 +51,7 @@ // Precompiled Header #include "Stdafx.h" -using namespace IceCore; +using namespace.Ice/Core; #define INVALIDATE_RANKS mCurrentSize|=0x80000000 #define VALIDATE_RANKS mCurrentSize&=0x7fffffff Modified: trunk/python-ogre/ThirdParty/opcode/IceRevisitedRadix.h =================================================================== --- trunk/python-ogre/ThirdParty/opcode/IceRevisitedRadix.h 2007-09-22 13:44:26 UTC (rev 389) +++ trunk/python-ogre/ThirdParty/opcode/IceRevisitedRadix.h 2007-09-23 03:40:15 UTC (rev 390) @@ -1,7 +1,7 @@ /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** * Contains source code from the article "Radix Sort Revisited". - * \file IceRevisitedRadix.h + * \file .Ice/RevisitedRadix.h * \author Pierre Terdiman * \date April, 4, 2000 */ Modified: trunk/python-ogre/ThirdParty/opcode/IceSegment.cpp =================================================================== --- trunk/python-ogre/ThirdParty/opcode/IceSegment.cpp 2007-09-22 13:44:26 UTC (rev 389) +++ trunk/python-ogre/ThirdParty/opcode/IceSegment.cpp 2007-09-23 03:40:15 UTC (rev 390) @@ -1,7 +1,7 @@ /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** * Contains code for segments. - * \file IceSegment.cpp + * \file .Ice/Segment.cpp * \author Pierre Terdiman * \date April, 4, 2000 */ @@ -24,7 +24,7 @@ // Precompiled Header #include "Stdafx.h" -using namespace IceMaths; +using namespace.Ice/Maths; float Segment::SquareDistance(const Point& point, float* t) const { Modified: trunk/python-ogre/ThirdParty/opcode/IceSegment.h =================================================================== --- trunk/python-ogre/ThirdParty/opcode/IceSegment.h 2007-09-22 13:44:26 UTC (rev 389) +++ trunk/python-ogre/ThirdParty/opcode/IceSegment.h 2007-09-23 03:40:15 UTC (rev 390) @@ -1,7 +1,7 @@ /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** * Contains code for segments. - * \file IceSegment.h + * \file .Ice/Segment.h * \author Pierre Terdiman * \date April, 4, 2000 */ Modified: trunk/python-ogre/ThirdParty/opcode/IceTriangle.cpp =================================================================== --- trunk/python-ogre/ThirdParty/opcode/IceTriangle.cpp 2007-09-22 13:44:26 UTC (rev 389) +++ trunk/python-ogre/ThirdParty/opcode/IceTriangle.cpp 2007-09-23 03:40:15 UTC (rev 390) @@ -1,7 +1,7 @@ /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** * Contains a handy triangle class. - * \file IceTriangle.cpp + * \file .Ice/Triangle.cpp * \author Pierre Terdiman * \date January, 17, 2000 */ @@ -11,7 +11,7 @@ // Precompiled Header #include "Stdafx.h" -using namespace IceMaths; +using namespace.Ice/Maths; /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** Modified: trunk/python-ogre/ThirdParty/opcode/IceTriangle.h =================================================================== --- trunk/python-ogre/ThirdParty/opcode/IceTriangle.h 2007-09-22 13:44:26 UTC (rev 389) +++ trunk/python-ogre/ThirdParty/opcode/IceTriangle.h 2007-09-23 03:40:15 UTC (rev 390) @@ -1,7 +1,7 @@ /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** * Contains a handy triangle class. - * \file IceTriangle.h + * \file .Ice/Triangle.h * \author Pierre Terdiman * \date January, 17, 2000 */ Modified: trunk/python-ogre/ThirdParty/opcode/IceTrilist.h =================================================================== --- trunk/python-ogre/ThirdParty/opcode/IceTrilist.h 2007-09-22 13:44:26 UTC (rev 389) +++ trunk/python-ogre/ThirdParty/opcode/IceTrilist.h 2007-09-23 03:40:15 UTC (rev 390) @@ -1,7 +1,7 @@ /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** * Contains code for a triangle container. - * \file IceTrilist.h + * \file .Ice/Trilist.h * \author Pierre Terdiman * \date April, 4, 2000 */ Modified: trunk/python-ogre/ThirdParty/opcode/IceTypes.h =================================================================== --- trunk/python-ogre/ThirdParty/opcode/IceTypes.h 2007-09-22 13:44:26 UTC (rev 389) +++ trunk/python-ogre/ThirdParty/opcode/IceTypes.h 2007-09-23 03:40:15 UTC (rev 390) @@ -1,7 +1,7 @@ /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** * Contains custom types. - * \file IceTypes.h + * \file .Ice/Types.h * \author Pierre Terdiman * \date April, 4, 2000 */ Modified: trunk/python-ogre/ThirdParty/opcode/IceUtils.cpp =================================================================== --- trunk/python-ogre/ThirdParty/opcode/IceUtils.cpp 2007-09-22 13:44:26 UTC (rev 389) +++ trunk/python-ogre/ThirdParty/opcode/IceUtils.cpp 2007-09-23 03:40:15 UTC (rev 390) @@ -1,7 +1,7 @@ /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** * Contains misc. useful macros & defines. - * \file IceUtils.cpp + * \file .Ice/Utils.cpp * \author Pierre Terdiman (collected from various sources) * \date April, 4, 2000 */ @@ -11,7 +11,7 @@ // Precompiled Header #include "Stdafx.h" -using namespace IceCore; +using namespace.Ice/Core; /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** @@ -21,7 +21,7 @@ * \return the best alignment (e.g. 1 for odd addresses, etc) */ /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -udword IceCore::Alignment(udword address) +udword.Ice/Core::Alignment(udword address) { // Returns 0 for null addresses if(!address) return 0; Modified: trunk/python-ogre/ThirdParty/opcode/IceUtils.h =================================================================== --- trunk/python-ogre/ThirdParty/opcode/IceUtils.h 2007-09-22 13:44:26 UTC (rev 389) +++ trunk/python-ogre/ThirdParty/opcode/IceUtils.h 2007-09-23 03:40:15 UTC (rev 390) @@ -1,7 +1,7 @@ /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** * Contains misc. useful macros & defines. - * \file IceUtils.h + * \file .Ice/Utils.h * \author Pierre Terdiman (collected from various sources) * \date April, 4, 2000 */ Modified: trunk/python-ogre/ThirdParty/opcode/OPC_BoxPruning.cpp =================================================================== --- trunk/python-ogre/ThirdParty/opcode/OPC_BoxPruning.cpp 2007-09-22 13:44:26 UTC (rev 389) +++ trunk/python-ogre/ThirdParty/opcode/OPC_BoxPruning.cpp 2007-09-23 03:40:15 UTC (rev 390) @@ -9,7 +9,7 @@ /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** * Contains code for box pruning. - * \file IceBoxPruning.cpp + * \file .Ice/BoxPruning.cpp * \author Pierre Terdiman * \date January, 29, 2000 */ Modified: trunk/python-ogre/ThirdParty/opcode/OPC_BoxPruning.h =================================================================== --- trunk/python-ogre/ThirdParty/opcode/OPC_BoxPruning.h 2007-09-22 13:44:26 UTC (rev 389) +++ trunk/python-ogre/ThirdParty/opcode/OPC_BoxPruning.h 2007-09-23 03:40:15 UTC (rev 390) @@ -9,7 +9,7 @@ /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** * Contains code for box pruning. - * \file IceBoxPruning.h + * \file .Ice/BoxPruning.h * \author Pierre Terdiman * \date January, 29, 2000 */ Modified: trunk/python-ogre/ThirdParty/opcode/OPC_IceHook.h =================================================================== --- trunk/python-ogre/ThirdParty/opcode/OPC_IceHook.h 2007-09-22 13:44:26 UTC (rev 389) +++ trunk/python-ogre/ThirdParty/opcode/OPC_IceHook.h 2007-09-23 03:40:15 UTC (rev 390) @@ -26,45 +26,45 @@ #define ICE_COMPILE_TIME_ASSERT(exp) extern char ICE_Dummy[ (exp) ? 1 : -1 ] #define Log {} - #define SetIceError false + #define Se.Ice/Error false #define EC_OUTOFMEMORY "Out of memory" - #include ".\Ice\IcePreprocessor.h" + #include "..Ice/\IcePreprocessor.h" #undef ICECORE_API #define ICECORE_API OPCODE_API - #include ".\Ice\IceTypes.h" - #include ".\Ice\IceFPU.h" - #include ".\Ice\IceMemoryMacros.h" + #include "..Ice/\IceTypes.h" + #include "..Ice/\IceFPU.h" + #include "..Ice/\IceMemoryMacros.h" - namespace IceCore + namespace.Ice/Core { - #include ".\Ice\IceUtils.h" - #include ".\Ice\IceContainer.h" - #include ".\Ice\IcePairs.h" - #include ".\Ice\IceRevisitedRadix.h" - #include ".\Ice\IceRandom.h" + #include "..Ice/\IceUtils.h" + #include "..Ice/\IceContainer.h" + #include "..Ice/\IcePairs.h" + #include "..Ice/\IceRevisitedRadix.h" + #include "..Ice/\IceRandom.h" } - using namespace IceCore; + using namespace.Ice/Core; #define ICEMATHS_API OPCODE_API - namespace IceMaths + namespace.Ice/Maths { - #include ".\Ice\IceAxes.h" - #include ".\Ice\IcePoint.h" - #include ".\Ice\IceHPoint.h" - #include ".\Ice\IceMatrix3x3.h" - #include ".\Ice\IceMatrix4x4.h" - #include ".\Ice\IcePlane.h" - #include ".\Ice\IceRay.h" - #include ".\Ice\IceIndexedTriangle.h" - #include ".\Ice\IceTriangle.h" - #include ".\Ice\IceTriList.h" - #include ".\Ice\IceAABB.h" - #include ".\Ice\IceOBB.h" - #include ".\Ice\IceBoundingSphere.h" - #include ".\Ice\IceSegment.h" - #include ".\Ice\IceLSS.h" + #include "..Ice/\IceAxes.h" + #include "..Ice/\IcePoint.h" + #include "..Ice/\IceHPoint.h" + #include "..Ice/\IceMatrix3x3.h" + #include "..Ice/\IceMatrix4x4.h" + #include "..Ice/\IcePlane.h" + #include "..Ice/\IceRay.h" + #include "..Ice/\IceIndexedTriangle.h" + #include "..Ice/\IceTriangle.h" + #include "..Ice/\IceTriList.h" + #include "..Ice/\IceAABB.h" + #include "..Ice/\IceOBB.h" + #include "..Ice/\IceBoundingSphere.h" + #include "..Ice/\IceSegment.h" + #include "..Ice/\IceLSS.h" } - using namespace IceMaths; + using namespace.Ice/Maths; Modified: trunk/python-ogre/ThirdParty/opcode/OPC_MeshInterface.cpp =================================================================== --- trunk/python-ogre/ThirdParty/opcode/OPC_MeshInterface.cpp 2007-09-22 13:44:26 UTC (rev 389) +++ trunk/python-ogre/ThirdParty/opcode/OPC_MeshInterface.cpp 2007-09-23 03:40:15 UTC (rev 390) @@ -210,7 +210,7 @@ /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// bool MeshInterface::SetCallback(RequestCallback callback, void* user_data) { - if(!callback) return SetIceError("MeshInterface::SetCallback: callback pointer is null"); + if(!callback) return Se.Ice/Error("MeshInterface::SetCallback: callback pointer is null"); mObjCallback = callback; mUserData = user_data; @@ -227,7 +227,7 @@ /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// bool MeshInterface::SetPointers(const IndexedTriangle* tris, const Point* verts) { - if(!tris || !verts) return SetIceError("MeshInterface::SetPointers: pointer is null", null); + if(!tris || !verts) return Se.Ice/Error("MeshInterface::SetPointers: pointer is null", null); mTris = tris; mVerts = verts; @@ -244,8 +244,8 @@ /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// bool MeshInterface::SetStrides(udword tri_stride, udword vertex_stride) { - if(tri_stride<sizeof(IndexedTriangle)) return SetIceError("MeshInterface::SetStrides: invalid triangle stride", null); - if(vertex_stride<sizeof(Point)) return SetIceError("MeshInterface::SetStrides: invalid vertex stride", null); + if(tri_stride<sizeof(IndexedTriangle)) return Se.Ice/Error("MeshInterface::SetStrides: invalid triangle stride", null); + if(vertex_stride<sizeof(Point)) return Se.Ice/Error("MeshInterface::SetStrides: invalid vertex stride", null); mTriStride = tri_stride; mVertexStride = vertex_stride; Modified: trunk/python-ogre/ThirdParty/opcode/OPC_Model.cpp =================================================================== --- trunk/python-ogre/ThirdParty/opcode/OPC_Model.cpp 2007-09-22 13:44:26 UTC (rev 389) +++ trunk/python-ogre/ThirdParty/opcode/OPC_Model.cpp 2007-09-23 03:40:15 UTC (rev 390) @@ -142,7 +142,7 @@ if(!create.mIMesh || !create.mIMesh->IsValid()) return false; // For this model, we only support complete trees - if(create.mSettings.mLimit!=1) return SetIceError("OPCODE WARNING: supports complete trees only! Use mLimit = 1.\n", null); + if(create.mSettings.mLimit!=1) return Se.Ice/Error("OPCODE WARNING: supports complete trees only! Use mLimit = 1.\n", null); // Look for degenerate faces. udword NbDegenerate = create.mIMesh->CheckTopology(); Modified: trunk/python-ogre/ThirdParty/opcode/Opcode.h =================================================================== --- trunk/python-ogre/ThirdParty/opcode/Opcode.h 2007-09-22 13:44:26 UTC (rev 389) +++ trunk/python-ogre/ThirdParty/opcode/Opcode.h 2007-09-23 03:40:15 UTC (rev 390) @@ -22,21 +22,8 @@ /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Compilation messages -#if defined(OPCODE_EXPORTS) - #pragma message("Compiling OPCODE") -#elif !defined(OPCODE_EXPORTS) - #pragma message("Using OPCODE") - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // Automatic linking - #ifndef BAN_OPCODE_AUTOLINK - #ifdef _DEBUG - #pragma comment(lib, "Opcode_D.lib") - #else - #pragma comment(lib, "Opcode.lib") - #endif - #endif -#endif + /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Preprocessor #ifndef ICE_NO_DLL @@ -49,7 +36,7 @@ #define OPCODE_API #endif - #include "OPC_IceHook.h" + #include "OPC.Ice/Hook.h" namespace Opcode { Modified: trunk/python-ogre/ThirdParty/opcode/Opcode.ncb =================================================================== (Binary files differ) Modified: trunk/python-ogre/ThirdParty/opcode/Opcode.opt =================================================================== (Binary files differ) Modified: trunk/python-ogre/ThirdParty/opcode/Opcode.plg =================================================================== --- trunk/python-ogre/ThirdParty/opcode/Opcode.plg 2007-09-22 13:44:26 UTC (rev 389) +++ trunk/python-ogre/ThirdParty/opcode/Opcode.plg 2007-09-23 03:40:15 UTC (rev 390) @@ -9,48 +9,48 @@ Creating temporary file "F:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP245.tmp" with contents [ /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "OPCODE_EXPORTS" /Fp"Release/Opcode.pch" /Yu"stdafx.h" /Fo"Release/" /Fd"Release/" /FD /QIfist /c -"Y:\APIs\Ice\OpcodeDistrib\Opcode\OPC_BaseModel.cpp" -"Y:\APIs\Ice\OpcodeDistrib\Opcode\OPC_HybridModel.cpp" -"Y:\APIs\Ice\OpcodeDistrib\Opcode\OPC_Model.cpp" -"Y:\APIs\Ice\OpcodeDistrib\Opcode\Opcode.cpp" -"Y:\APIs\Ice\OpcodeDistrib\Opcode\OPC_Collider.cpp" -"Y:\APIs\Ice\OpcodeDistrib\Opcode\OPC_VolumeCollider.cpp" -"Y:\APIs\Ice\OpcodeDistrib\Opcode\OPC_AABBCollider.cpp" -"Y:\APIs\Ice\OpcodeDistrib\Opcode\OPC_LSSCollider.cpp" -"Y:\APIs\Ice\OpcodeDistrib\Opcode\OPC_OBBCollider.cpp" -"Y:\APIs\Ice\OpcodeDistrib\Opcode\OPC_PlanesCollider.cpp" -"Y:\APIs\Ice\OpcodeDistrib\Opcode\OPC_RayCollider.cpp" -"Y:\APIs\Ice\OpcodeDistrib\Opcode\OPC_SphereCollider.cpp" -"Y:\APIs\Ice\OpcodeDistrib\Opcode\OPC_TreeCollider.cpp" -"Y:\APIs\Ice\OpcodeDistrib\Opcode\OPC_AABBTree.cpp" -"Y:\APIs\Ice\OpcodeDistrib\Opcode\OPC_Common.cpp" -"Y:\APIs\Ice\OpcodeDistrib\Opcode\OPC_MeshInterface.cpp" -"Y:\APIs\Ice\OpcodeDistrib\Opcode\OPC_OptimizedTree.cpp" -"Y:\APIs\Ice\OpcodeDistrib\Opcode\OPC_TreeBuilders.cpp" -"Y:\APIs\Ice\OpcodeDistrib\Opcode\OPC_BoxPruning.cpp" -"Y:\APIs\Ice\OpcodeDistrib\Opcode\OPC_SweepAndPrune.cpp" -"Y:\APIs\Ice\OpcodeDistrib\Opcode\OPC_Picking.cpp" -"Y:\APIs\Ice\OpcodeDistrib\Opcode\Ice\IceAABB.cpp" -"Y:\APIs\Ice\OpcodeDistrib\Opcode\Ice\IceContainer.cpp" -"Y:\APIs\Ice\OpcodeDistrib\Opcode\Ice\IceHPoint.cpp" -"Y:\APIs\Ice\OpcodeDistrib\Opcode\Ice\IceIndexedTriangle.cpp" -"Y:\APIs\Ice\OpcodeDistrib\Opcode\Ice\IceMatrix3x3.cpp" -"Y:\APIs\Ice\OpcodeDistrib\Opcode\Ice\IceMatrix4x4.cpp" -"Y:\APIs\Ice\OpcodeDistrib\Opcode\Ice\IceOBB.cpp" -"Y:\APIs\Ice\OpcodeDistrib\Opcode\Ice\IcePlane.cpp" -"Y:\APIs\Ice\OpcodeDistrib\Opcode\Ice\IcePoint.cpp" -"Y:\APIs\Ice\OpcodeDistrib\Opcode\Ice\IceRandom.cpp" -"Y:\APIs\Ice\OpcodeDistrib\Opcode\Ice\IceRay.cpp" -"Y:\APIs\Ice\OpcodeDistrib\Opcode\Ice\IceRevisitedRadix.cpp" -"Y:\APIs\Ice\OpcodeDistrib\Opcode\Ice\IceSegment.cpp" -"Y:\APIs\Ice\OpcodeDistrib\Opcode\Ice\IceTriangle.cpp" -"Y:\APIs\Ice\OpcodeDistrib\Opcode\Ice\IceUtils.cpp" +"Y:\APIs.Ice/\OpcodeDistrib\Opcode\OPC_BaseModel.cpp" +"Y:\APIs.Ice/\OpcodeDistrib\Opcode\OPC_HybridModel.cpp" +"Y:\APIs.Ice/\OpcodeDistrib\Opcode\OPC_Model.cpp" +"Y:\APIs.Ice/\OpcodeDistrib\Opcode\Opcode.cpp" +"Y:\APIs.Ice/\OpcodeDistrib\Opcode\OPC_Collider.cpp" +"Y:\APIs.Ice/\OpcodeDistrib\Opcode\OPC_VolumeCollider.cpp" +"Y:\APIs.Ice/\OpcodeDistrib\Opcode\OPC_AABBCollider.cpp" +"Y:\APIs.Ice/\OpcodeDistrib\Opcode\OPC_LSSCollider.cpp" +"Y:\APIs.Ice/\OpcodeDistrib\Opcode\OPC_OBBCollider.cpp" +"Y:\APIs.Ice/\OpcodeDistrib\Opcode\OPC_PlanesCollider.cpp" +"Y:\APIs.Ice/\OpcodeDistrib\Opcode\OPC_RayCollider.cpp" +"Y:\APIs.Ice/\OpcodeDistrib\Opcode\OPC_SphereCollider.cpp" +"Y:\APIs.Ice/\OpcodeDistrib\Opcode\OPC_TreeCollider.cpp" +"Y:\APIs.Ice/\OpcodeDistrib\Opcode\OPC_AABBTree.cpp" +"Y:\APIs.Ice/\OpcodeDistrib\Opcode\OPC_Common.cpp" +"Y:\APIs.Ice/\OpcodeDistrib\Opcode\OPC_MeshInterface.cpp" +"Y:\APIs.Ice/\OpcodeDistrib\Opcode\OPC_OptimizedTree.cpp" +"Y:\APIs.Ice/\OpcodeDistrib\Opcode\OPC_TreeBuilders.cpp" +"Y:\APIs.Ice/\OpcodeDistrib\Opcode\OPC_BoxPruning.cpp" +"Y:\APIs.Ice/\OpcodeDistrib\Opcode\OPC_SweepAndPrune.cpp" +"Y:\APIs.Ice/\OpcodeDistrib\Opcode\OPC_Picking.cpp" +"Y:\APIs.Ice/\OpcodeDistrib\Opcode\Ice\IceAABB.cpp" +"Y:\APIs.Ice/\OpcodeDistrib\Opcode\Ice\IceContainer.cpp" +"Y:\APIs.Ice/\OpcodeDistrib\Opcode\Ice\IceHPoint.cpp" +"Y:\APIs.Ice/\OpcodeDistrib\Opcode\Ice\IceIndexedTriangle.cpp" +"Y:\APIs.Ice/\OpcodeDistrib\Opcode\Ice\IceMatrix3x3.cpp" +"Y:\APIs.Ice/\OpcodeDistrib\Opcode\Ice\IceMatrix4x4.cpp" +"Y:\APIs.Ice/\OpcodeDistrib\Opcode\Ice\IceOBB.cpp" +"Y:\APIs.Ice/\OpcodeDistrib\Opcode\Ice\IcePlane.cpp" +"Y:\APIs.Ice/\OpcodeDistrib\Opcode\Ice\IcePoint.cpp" +"Y:\APIs.Ice/\OpcodeDistrib\Opcode\Ice\IceRandom.cpp" +"Y:\APIs.Ice/\OpcodeDistrib\Opcode\Ice\IceRay.cpp" +"Y:\APIs.Ice/\OpcodeDistrib\Opcode\Ice\IceRevisitedRadix.cpp" +"Y:\APIs.Ice/\OpcodeDistrib\Opcode\Ice\IceSegment.cpp" +"Y:\APIs.Ice/\OpcodeDistrib\Opcode\Ice\IceTriangle.cpp" +"Y:\APIs.Ice/\OpcodeDistrib\Opcode\Ice\IceUtils.cpp" ] Creating command line "cl.exe @F:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP245.tmp" Creating temporary file "F:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP246.tmp" with contents [ /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "OPCODE_EXPORTS" /Fp"Release/Opcode.pch" /Yc"stdafx.h" /Fo"Release/" /Fd"Release/" /FD /QIfist /c -"Y:\APIs\Ice\OpcodeDistrib\Opcode\StdAfx.cpp" +"Y:\APIs.Ice/\OpcodeDistrib\Opcode\StdAfx.cpp" ] Creating command line "cl.exe @F:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP246.tmp" Creating temporary file "F:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP247.tmp" with contents @@ -78,21 +78,21 @@ .\Release\OPC_BoxPruning.obj .\Release\OPC_SweepAndPrune.obj .\Release\OPC_Picking.obj -.\Release\IceAABB.obj -.\Release\IceContainer.obj -.\Release\IceHPoint.obj -.\Release\IceIndexedTriangle.obj -.\Release\IceMatrix3x3.obj -.\Release\IceMatrix4x4.obj -.\Release\IceOBB.obj -.\Release\IcePlane.obj -.\Release\IcePoint.obj -.\Release\IceRandom.obj -.\Release\IceRay.obj -.\Release\IceRevisitedRadix.obj -.\Release\IceSegment.obj -.\Release\IceTriangle.obj -.\Release\IceUtils.obj +.\Release.Ice/AABB.obj +.\Release.Ice/Container.obj +.\Release.Ice/HPoint.obj +.\Release.Ice/IndexedTriangle.obj +.\Release.Ice/Matrix3x3.obj +.\Release.Ice/Matrix4x4.obj +.\Release.Ice/OBB.obj +.\Release.Ice/Plane.obj +.\Release.Ice/Point.obj +.\Release.Ice/Random.obj +.\Release.Ice/Ray.obj +.\Release.Ice/RevisitedRadix.obj +.\Release.Ice/Segment.obj +.\Release.Ice/Triangle.obj +.\Release.Ice/Utils.obj ] Creating command line "link.exe @F:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP247.tmp" <h3>Output Window</h3> Modified: trunk/python-ogre/ThirdParty/opcode/Opcode.vcproj =================================================================== --- trunk/python-ogre/ThirdParty/opcode/Opcode.vcproj 2007-09-22 13:44:26 UTC (rev 389) +++ trunk/python-ogre/ThirdParty/opcode/Opcode.vcproj 2007-09-23 03:40:15 UTC (rev 390) @@ -263,7 +263,7 @@ > </File> <File - RelativePath="OPC_IceHook.h" + RelativePath="OPC.Ice/Hook.h" > </File> <File @@ -826,10 +826,10 @@ </File> </Filter> <Filter - Name="Ice" + Name=.Ice/" > <File - RelativePath="Ice\IceAABB.cpp" + RelativePath=.Ice/\IceAABB.cpp" > <FileConfiguration Name="Release|Win32" @@ -849,19 +849,19 @@ </FileConfiguration> </File> <File - RelativePath="Ice\IceAABB.h" + RelativePath=.Ice/\IceAABB.h" > </File> <File - RelativePath="Ice\IceAxes.h" + RelativePath=.Ice/\IceAxes.h" > </File> <File - RelativePath="Ice\IceBoundingSphere.h" + RelativePath=.Ice/\IceBoundingSphere.h" > </File> <File - RelativePath="Ice\IceContainer.cpp" + RelativePath=.Ice/\IceContainer.cpp" > <FileConfiguration Name="Release|Win32" @@ -881,15 +881,15 @@ </FileConfiguration> </File> <File - RelativePath="Ice\IceContainer.h" + RelativePath=.Ice/\IceContainer.h" > </File> <File - RelativePath="Ice\IceFPU.h" + RelativePath=.Ice/\IceFPU.h" > </File> <File - RelativePath="Ice\IceHPoint.cpp" + RelativePath=.Ice/\IceHPoint.cpp" > <FileConfiguration Name="Release|Win32" @@ -909,11 +909,11 @@ </FileConfiguration> </File> <File - RelativePath="Ice\IceHPoint.h" + RelativePath=.Ice/\IceHPoint.h" > </File> <File - RelativePath="Ice\IceIndexedTriangle.cpp" + RelativePath=.Ice/\IceIndexedTriangle.cpp" > <FileConfiguration Name="Release|Win32" @@ -933,15 +933,15 @@ </FileConfiguration> </File> <File - RelativePath="Ice\IceIndexedTriangle.h" + RelativePath=.Ice/\IceIndexedTriangle.h" > </File> <File - RelativePath="Ice\IceLSS.h" + RelativePath=.Ice/\IceLSS.h" > </File> <File - RelativePath="Ice\IceMatrix3x3.cpp" + RelativePath=.Ice/\IceMatrix3x3.cpp" > <FileConfiguration Name="Release|Win32" @@ -961,11 +961,11 @@ </FileConfiguration> </File> <File - RelativePath="Ice\IceMatrix3x3.h" + RelativePath=.Ice/\IceMatrix3x3.h" > </File> <File - RelativePath="Ice\IceMatrix4x4.cpp" + RelativePath=.Ice/\IceMatrix4x4.cpp" > <FileConfiguration Name="Release|Win32" @@ -985,15 +985,15 @@ </FileConfiguration> </File> <File - RelativePath="Ice\IceMatrix4x4.h" + RelativePath=.Ice/\IceMatrix4x4.h" > </File> <File - RelativePath="Ice\IceMemoryMacros.h" + RelativePath=.Ice/\IceMemoryMacros.h" > </File> <File - RelativePath="Ice\IceOBB.cpp" + RelativePath=.Ice/\IceOBB.cpp" > <FileConfiguration Name="Release|Win32" @@ -1013,15 +1013,15 @@ </FileConfiguration> </File> <File - RelativePath="Ice\IceOBB.h" + RelativePath=.Ice/\IceOBB.h" > </File> <File - RelativePath="Ice\IcePairs.h" + RelativePath=.Ice/\IcePairs.h" > </File> <File - RelativePath="Ice\IcePlane.cpp" + RelativePath=.Ice/\IcePlane.cpp" > <FileConfiguration Name="Release|Win32" @@ -1041,11 +1041,11 @@ </FileConfiguration> </File> <File - RelativePath="Ice\IcePlane.h" + RelativePath=.Ice/\IcePlane.h" > </File> <File - RelativePath="Ice\IcePoint.cpp" + RelativePath=.Ice/\IcePoint.cpp" > <FileConfiguration Name="Release|Win32" @@ -1065,15 +1065,15 @@ </FileConfiguration> </File> <File - RelativePath="Ice\IcePoint.h" + RelativePath=.Ice/\IcePoint.h" > </File> <File - RelativePath="Ice\IcePreprocessor.h" + RelativePath=.Ice/\IcePreprocessor.h" > </File> <File - RelativePath="Ice\IceRandom.cpp" + RelativePath=.Ice/\IceRandom.cpp" > <FileConfiguration Name="Release|Win32" @@ -1093,11 +1093,11 @@ </FileConfiguration> </File> <File - RelativePath="Ice\IceRandom.h" + RelativePath=.Ice/\IceRandom.h" > </File> <File - RelativePath="Ice\IceRay.cpp" + RelativePath=.Ice/\IceRay.cpp" > <FileConfiguration Name="Release|Win32" @@ -1117,11 +1117,11 @@ </FileConfiguration> </File> <File - RelativePath="Ice\IceRay.h" + RelativePath=.Ice/\IceRay.h" > </File> <File - RelativePath="Ice\IceRevisitedRadix.cpp" + RelativePath=.Ice/\IceRevisitedRadix.cpp" > <FileConfiguration Name="Release|Win32" @@ -1141,11 +1141,11 @@ </FileConfiguration> </File> <File - RelativePath="Ice\IceRevisitedRadix.h" + RelativePath=.Ice/\IceRevisitedRadix.h" > </File> <File - RelativePath="Ice\IceSegment.cpp" + RelativePath=.Ice/\IceSegment.cpp" > <FileConfiguration Name="Release|Win32" @@ -1165,11 +1165,11 @@ </FileConfiguration> </File> <File - RelativePath="Ice\IceSegment.h" + RelativePath=.Ice/\IceSegment.h" > </File> <File - RelativePath="Ice\IceTriangle.cpp" + RelativePath=.Ice/\IceTriangle.cpp" > <FileConfiguration Name="Release|Win32" @@ -1189,19 +1189,19 @@ </FileConfiguration> </File> <File - RelativePath="Ice\IceTriangle.h" + RelativePath=.Ice/\IceTriangle.h" > </File> <File - RelativePath="Ice\IceTrilist.h" + RelativePath=.Ice/\IceTrilist.h" > </File> <File - RelativePath="Ice\IceTypes.h" + RelativePat... [truncated message content] |
From: <and...@us...> - 2007-09-23 14:36:01
|
Revision: 393 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=393&view=rev Author: andy_miller Date: 2007-09-23 07:36:03 -0700 (Sun, 23 Sep 2007) Log Message: ----------- more opcode and cleanup after linux work Modified Paths: -------------- trunk/python-ogre/ThirdParty/opcode/OPC_BoxPruning.cpp trunk/python-ogre/ThirdParty/opcode/OPC_BoxPruning.h trunk/python-ogre/ThirdParty/opcode/OPC_IceHook.h trunk/python-ogre/ThirdParty/opcode/OPC_MeshInterface.cpp trunk/python-ogre/ThirdParty/opcode/OPC_MeshInterface.h trunk/python-ogre/ThirdParty/opcode/OPC_Model.cpp trunk/python-ogre/ThirdParty/opcode/Opcode.h trunk/python-ogre/ThirdParty/opcode/Opcode.ncb trunk/python-ogre/ThirdParty/opcode/Opcode.opt trunk/python-ogre/ThirdParty/opcode/Opcode.plg trunk/python-ogre/ThirdParty/opcode/Opcode.vcproj trunk/python-ogre/code_generators/ogre/generate_code.py trunk/python-ogre/code_generators/ogreal/generate_code.py trunk/python-ogre/code_generators/opcode/generate_code.py Removed Paths: ------------- trunk/python-ogre/ThirdParty/opcode/IceAABB.cpp trunk/python-ogre/ThirdParty/opcode/IceAABB.h trunk/python-ogre/ThirdParty/opcode/IceAxes.h trunk/python-ogre/ThirdParty/opcode/IceBoundingSphere.h trunk/python-ogre/ThirdParty/opcode/IceContainer.cpp trunk/python-ogre/ThirdParty/opcode/IceContainer.h trunk/python-ogre/ThirdParty/opcode/IceFPU.h trunk/python-ogre/ThirdParty/opcode/IceHPoint.cpp trunk/python-ogre/ThirdParty/opcode/IceHPoint.h trunk/python-ogre/ThirdParty/opcode/IceIndexedTriangle.cpp trunk/python-ogre/ThirdParty/opcode/IceIndexedTriangle.h trunk/python-ogre/ThirdParty/opcode/IceLSS.h trunk/python-ogre/ThirdParty/opcode/IceMatrix3x3.cpp trunk/python-ogre/ThirdParty/opcode/IceMatrix3x3.h trunk/python-ogre/ThirdParty/opcode/IceMatrix4x4.cpp trunk/python-ogre/ThirdParty/opcode/IceMatrix4x4.h trunk/python-ogre/ThirdParty/opcode/IceMemoryMacros.h trunk/python-ogre/ThirdParty/opcode/IceOBB.cpp trunk/python-ogre/ThirdParty/opcode/IceOBB.h trunk/python-ogre/ThirdParty/opcode/IcePairs.h trunk/python-ogre/ThirdParty/opcode/IcePlane.cpp trunk/python-ogre/ThirdParty/opcode/IcePlane.h trunk/python-ogre/ThirdParty/opcode/IcePoint.cpp trunk/python-ogre/ThirdParty/opcode/IcePoint.h trunk/python-ogre/ThirdParty/opcode/IcePreprocessor.h trunk/python-ogre/ThirdParty/opcode/IceRandom.cpp trunk/python-ogre/ThirdParty/opcode/IceRandom.h trunk/python-ogre/ThirdParty/opcode/IceRay.cpp trunk/python-ogre/ThirdParty/opcode/IceRay.h trunk/python-ogre/ThirdParty/opcode/IceRevisitedRadix.cpp trunk/python-ogre/ThirdParty/opcode/IceRevisitedRadix.h trunk/python-ogre/ThirdParty/opcode/IceSegment.cpp trunk/python-ogre/ThirdParty/opcode/IceSegment.h trunk/python-ogre/ThirdParty/opcode/IceTriangle.cpp trunk/python-ogre/ThirdParty/opcode/IceTriangle.h trunk/python-ogre/ThirdParty/opcode/IceTrilist.h trunk/python-ogre/ThirdParty/opcode/IceTypes.h trunk/python-ogre/ThirdParty/opcode/IceUtils.cpp trunk/python-ogre/ThirdParty/opcode/IceUtils.h Deleted: trunk/python-ogre/ThirdParty/opcode/IceAABB.cpp =================================================================== --- trunk/python-ogre/ThirdParty/opcode/IceAABB.cpp 2007-09-23 08:38:07 UTC (rev 392) +++ trunk/python-ogre/ThirdParty/opcode/IceAABB.cpp 2007-09-23 14:36:03 UTC (rev 393) @@ -1,405 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Contains AABB-related code. - * \file .Ice/AABB.cpp - * \author Pierre Terdiman - * \date January, 29, 2000 - */ -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * AABB class. - * \class AABB - * \author Pierre Terdiman - * \version 1.0 - */ -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// Precompiled Header -#include "Stdafx.h" - -using namespace.Ice/Maths; - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Computes the sum of two AABBs. - * \param aabb [in] the other AABB - * \return Self-Reference - */ -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -AABB& AABB::Add(const AABB& aabb) -{ - // Compute new min & max values - Point Min; GetMin(Min); - Point Tmp; aabb.GetMin(Tmp); - Min.Min(Tmp); - - Point Max; GetMax(Max); - aabb.GetMax(Tmp); - Max.Max(Tmp); - - // Update this - SetMinMax(Min, Max); - return *this; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Makes a cube from the AABB. - * \param cube [out] the cube AABB - * \return cube edge length - */ -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -float AABB::MakeCube(AABB& cube) const -{ - Point Ext; GetExtents(Ext); - float Max = Ext.Max(); - - Point Cnt; GetCenter(Cnt); - cube.SetCenterExtents(Cnt, Point(Max, Max, Max)); - return Max; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Makes a sphere from the AABB. - * \param sphere [out] sphere containing the AABB - */ -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -void AABB::MakeSphere(Sphere& sphere) const -{ - GetExtents(sphere.mCenter); - sphere.mRadius = sphere.mCenter.Magnitude() * 1.00001f; // To make sure sphere::Contains(*this) succeeds - GetCenter(sphere.mCenter); -} - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Checks a box is inside another box. - * \param box [in] the other AABB - * \return true if current box is inside input box - */ -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -bool AABB::IsInside(const AABB& box) const -{ - if(box.GetMin(0)>GetMin(0)) return false; - if(box.GetMin(1)>GetMin(1)) return false; - if(box.GetMin(2)>GetMin(2)) return false; - if(box.GetMax(0)<GetMax(0)) return false; - if(box.GetMax(1)<GetMax(1)) return false; - if(box.GetMax(2)<GetMax(2)) return false; - return true; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Computes the AABB planes. - * \param planes [out] 6 planes surrounding the box - * \return true if success - */ -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -bool AABB::ComputePlanes(Plane* planes) const -{ - // Checkings - if(!planes) return false; - - Point Center, Extents; - GetCenter(Center); - GetExtents(Extents); - - // Writes normals - planes[0].n = Point(1.0f, 0.0f, 0.0f); - planes[1].n = Point(-1.0f, 0.0f, 0.0f); - planes[2].n = Point(0.0f, 1.0f, 0.0f); - planes[3].n = Point(0.0f, -1.0f, 0.0f); - planes[4].n = Point(0.0f, 0.0f, 1.0f); - planes[5].n = Point(0.0f, 0.0f, -1.0f); - - // Compute a point on each plane - Point p0 = Point(Center.x+Extents.x, Center.y, Center.z); - Point p1 = Point(Center.x-Extents.x, Center.y, Center.z); - Point p2 = Point(Center.x, Center.y+Extents.y, Center.z); - Point p3 = Point(Center.x, Center.y-Extents.y, Center.z); - Point p4 = Point(Center.x, Center.y, Center.z+Extents.z); - Point p5 = Point(Center.x, Center.y, Center.z-Extents.z); - - // Compute d - planes[0].d = -(planes[0].n|p0); - planes[1].d = -(planes[1].n|p1); - planes[2].d = -(planes[2].n|p2); - planes[3].d = -(planes[3].n|p3); - planes[4].d = -(planes[4].n|p4); - planes[5].d = -(planes[5].n|p5); - - return true; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Computes the aabb points. - * \param pts [out] 8 box points - * \return true if success - */ -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -bool AABB::ComputePoints(Point* pts) const -{ - // Checkings - if(!pts) return false; - - // Get box corners - Point min; GetMin(min); - Point max; GetMax(max); - - // 7+------+6 0 = --- - // /| /| 1 = +-- - // / | / | 2 = ++- - // / 4+---/--+5 3 = -+- - // 3+------+2 / y z 4 = --+ - // | / | / | / 5 = +-+ - // |/ |/ |/ 6 = +++ - // 0+------+1 *---x 7 = -++ - - // Generate 8 corners of the bbox - pts[0] = Point(min.x, min.y, min.z); - pts[1] = Point(max.x, min.y, min.z); - pts[2] = Point(max.x, max.y, min.z); - pts[3] = Point(min.x, max.y, min.z); - pts[4] = Point(min.x, min.y, max.z); - pts[5] = Point(max.x, min.y, max.z); - pts[6] = Point(max.x, max.y, max.z); - pts[7] = Point(min.x, max.y, max.z); - - return true; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Gets vertex normals. - * \param pts [out] 8 box points - * \return true if success - */ -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -const Point* AABB::GetVertexNormals() const -{ - static float VertexNormals[] = - { - -INVSQRT3, -INVSQRT3, -INVSQRT3, - INVSQRT3, -INVSQRT3, -INVSQRT3, - INVSQRT3, INVSQRT3, -INVSQRT3, - -INVSQRT3, INVSQRT3, -INVSQRT3, - -INVSQRT3, -INVSQRT3, INVSQRT3, - INVSQRT3, -INVSQRT3, INVSQRT3, - INVSQRT3, INVSQRT3, INVSQRT3, - -INVSQRT3, INVSQRT3, INVSQRT3 - }; - return (const Point*)VertexNormals; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Returns edges. - * \return 24 indices (12 edges) indexing the list returned by ComputePoints() - */ -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -const udword* AABB::GetEdges() const -{ - static udword Indices[] = { - 0, 1, 1, 2, 2, 3, 3, 0, - 7, 6, 6, 5, 5, 4, 4, 7, - 1, 5, 6, 2, - 3, 7, 4, 0 - }; - return Indices; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Returns edge normals. - * \return edge normals in local space - */ -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -const Point* AABB::GetEdgeNormals() const -{ - static float EdgeNormals[] = - { - 0, -INVSQRT2, -INVSQRT2, // 0-1 - INVSQRT2, 0, -INVSQRT2, // 1-2 - 0, INVSQRT2, -INVSQRT2, // 2-3 - -INVSQRT2, 0, -INVSQRT2, // 3-0 - - 0, INVSQRT2, INVSQRT2, // 7-6 - INVSQRT2, 0, INVSQRT2, // 6-5 - 0, -INVSQRT2, INVSQRT2, // 5-4 - -INVSQRT2, 0, INVSQRT2, // 4-7 - - INVSQRT2, -INVSQRT2, 0, // 1-5 - INVSQRT2, INVSQRT2, 0, // 6-2 - -INVSQRT2, INVSQRT2, 0, // 3-7 - -INVSQRT2, -INVSQRT2, 0 // 4-0 - }; - return (const Point*)EdgeNormals; -} - -// =========================================================================== -// (C) 1996-98 Vienna University of Technology -// =========================================================================== -// NAME: bboxarea -// TYPE: c++ code -// PROJECT: Bounding Box Area -// CONTENT: Computes area of 2D projection of 3D oriented bounding box -// VERSION: 1.0 -// =========================================================================== -// AUTHORS: ds Dieter Schmalstieg -// ep Erik Pojar -// =========================================================================== -// HISTORY: -// -// 19-sep-99 15:23:03 ds last modification -// 01-dec-98 15:23:03 ep created -// =========================================================================== - -//---------------------------------------------------------------------------- -// SAMPLE CODE STARTS HERE -//---------------------------------------------------------------------------- - -// NOTE: This sample program requires OPEN INVENTOR! - -//indexlist: this table stores the 64 possible cases of classification of -//the eyepoint with respect to the 6 defining planes of the bbox (2^6=64) -//only 26 (3^3-1, where 1 is "inside" cube) of these cases are valid. -//the first 6 numbers in each row are the indices of the bbox vertices that -//form the outline of which we want to compute the area (counterclockwise -//ordering), the 7th entry means the number of vertices in the outline. -//there are 6 cases with a single face and and a 4-vertex outline, and -//20 cases with 2 or 3 faces and a 6-vertex outline. a value of 0 indicates -//an invalid case. - - -// Original list was made of 7 items, I added an 8th element: -// - to padd on a cache line -// - to repeat the first entry to avoid modulos -// -// I also replaced original ints with sbytes. - -static const sbyte gIndexList[64][8] = -{ - {-1,-1,-1,-1,-1,-1,-1, 0}, // 0 inside - { 0, 4, 7, 3, 0,-1,-1, 4}, // 1 left - { 1, 2, 6, 5, 1,-1,-1, 4}, // 2 right - {-1,-1,-1,-1,-1,-1,-1, 0}, // 3 - - { 0, 1, 5, 4, 0,-1,-1, 4}, // 4 bottom - { 0, 1, 5, 4, 7, 3, 0, 6}, // 5 bottom, left - { 0, 1, 2, 6, 5, 4, 0, 6}, // 6 bottom, right - {-1,-1,-1,-1,-1,-1,-1, 0}, // 7 - - { 2, 3, 7, 6, 2,-1,-1, 4}, // 8 top - { 0, 4, 7, 6, 2, 3, 0, 6}, // 9 top, left - { 1, 2, 3, 7, 6, 5, 1, 6}, //10 top, right - {-1,-1,-1,-1,-1,-1,-1, 0}, //11 - - {-1,-1,-1,-1,-1,-1,-1, 0}, //12 - - {-1,-1,-1,-1,-1,-1,-1, 0}, //13 - - {-1,-1,-1,-1,-1,-1,-1, 0}, //14 - - {-1,-1,-1,-1,-1,-1,-1, 0}, //15 - - { 0, 3, 2, 1, 0,-1,-1, 4}, //16 front - { 0, 4, 7, 3, 2, 1, 0, 6}, //17 front, left - { 0, 3, 2, 6, 5, 1, 0, 6}, //18 front, right - {-1,-1,-1,-1,-1,-1,-1, 0}, //19 - - { 0, 3, 2, 1, 5, 4, 0, 6}, //20 front, bottom - { 1, 5, 4, 7, 3, 2, 1, 6}, //21 front, bottom, left - { 0, 3, 2, 6, 5, 4, 0, 6}, //22 front, bottom, right - {-1,-1,-1,-1,-1,-1,-1, 0}, //23 - - { 0, 3, 7, 6, 2, 1, 0, 6}, //24 front, top - { 0, 4, 7, 6, 2, 1, 0, 6}, //25 front, top, left - { 0, 3, 7, 6, 5, 1, 0, 6}, //26 front, top, right - {-1,-1,-1,-1,-1,-1,-1, 0}, //27 - - {-1,-1,-1,-1,-1,-1,-1, 0}, //28 - - {-1,-1,-1,-1,-1,-1,-1, 0}, //29 - - {-1,-1,-1,-1,-1,-1,-1, 0}, //30 - - {-1,-1,-1,-1,-1,-1,-1, 0}, //31 - - { 4, 5, 6, 7, 4,-1,-1, 4}, //32 back - { 0, 4, 5, 6, 7, 3, 0, 6}, //33 back, left - { 1, 2, 6, 7, 4, 5, 1, 6}, //34 back, right - {-1,-1,-1,-1,-1,-1,-1, 0}, //35 - - { 0, 1, 5, 6, 7, 4, 0, 6}, //36 back, bottom - { 0, 1, 5, 6, 7, 3, 0, 6}, //37 back, bottom, left - { 0, 1, 2, 6, 7, 4, 0, 6}, //38 back, bottom, right - {-1,-1,-1,-1,-1,-1,-1, 0}, //39 - - { 2, 3, 7, 4, 5, 6, 2, 6}, //40 back, top - { 0, 4, 5, 6, 2, 3, 0, 6}, //41 back, top, left - { 1, 2, 3, 7, 4, 5, 1, 6}, //42 back, top, right - {-1,-1,-1,-1,-1,-1,-1, 0}, //43 invalid - {-1,-1,-1,-1,-1,-1,-1, 0}, //44 invalid - {-1,-1,-1,-1,-1,-1,-1, 0}, //45 invalid - {-1,-1,-1,-1,-1,-1,-1, 0}, //46 invalid - {-1,-1,-1,-1,-1,-1,-1, 0}, //47 invalid - {-1,-1,-1,-1,-1,-1,-1, 0}, //48 invalid - {-1,-1,-1,-1,-1,-1,-1, 0}, //49 invalid - {-1,-1,-1,-1,-1,-1,-1, 0}, //50 invalid - {-1,-1,-1,-1,-1,-1,-1, 0}, //51 invalid - {-1,-1,-1,-1,-1,-1,-1, 0}, //52 invalid - {-1,-1,-1,-1,-1,-1,-1, 0}, //53 invalid - {-1,-1,-1,-1,-1,-1,-1, 0}, //54 invalid - {-1,-1,-1,-1,-1,-1,-1, 0}, //55 invalid - {-1,-1,-1,-1,-1,-1,-1, 0}, //56 invalid - {-1,-1,-1,-1,-1,-1,-1, 0}, //57 invalid - {-1,-1,-1,-1,-1,-1,-1, 0}, //58 invalid - {-1,-1,-1,-1,-1,-1,-1, 0}, //59 invalid - {-1,-1,-1,-1,-1,-1,-1, 0}, //60 invalid - {-1,-1,-1,-1,-1,-1,-1, 0}, //61 invalid - {-1,-1,-1,-1,-1,-1,-1, 0}, //62 invalid - {-1,-1,-1,-1,-1,-1,-1, 0} //63 invalid -}; - -const sbyte* AABB::ComputeOutline(const Point& local_eye, sdword& num) const -{ - // Get box corners - Point min; GetMin(min); - Point max; GetMax(max); - - // Compute 6-bit code to classify eye with respect to the 6 defining planes of the bbox - int pos = ((local_eye.x < min.x) ? 1 : 0) // 1 = left - + ((local_eye.x > max.x) ? 2 : 0) // 2 = right - + ((local_eye.y < min.y) ? 4 : 0) // 4 = bottom - + ((local_eye.y > max.y) ? 8 : 0) // 8 = top - + ((local_eye.z < min.z) ? 16 : 0) // 16 = front - + ((local_eye.z > max.z) ? 32 : 0); // 32 = back - - // Look up number of vertices in outline - num = (sdword)gIndexList[pos][7]; - // Zero indicates invalid case - if(!num) return null; - - return &gIndexList[pos][0]; -} - -// calculateBoxArea: computes the screen-projected 2D area of an oriented 3D bounding box - -//const Point& eye, //eye point (in bbox object coordinates) -//const AABB& box, //3d bbox -//const Matrix4x4& mat, //free transformation for bbox -//float width, float height, int& num) -float AABB::ComputeBoxArea(const Point& eye, const Matrix4x4& mat, float width, float height, sdword& num) const -{ - const sbyte* Outline = ComputeOutline(eye, num); - if(!Outline) return -1.0f; - - // Compute box vertices - Point vertexBox[8], dst[8]; - ComputePoints(vertexBox); - - // Transform all outline corners into 2D screen space - for(sdword i=0;i<num;i++) - { - HPoint Projected; - vertexBox[Outline[i]].ProjectToScreen(width, height, mat, Projected); - dst[i] = Projected; - } - - float Sum = (dst[num-1][0] - dst[0][0]) * (dst[num-1][1] + dst[0][1]); - - for(int i=0; i<num-1; i++) - Sum += (dst[i][0] - dst[i+1][0]) * (dst[i][1] + dst[i+1][1]); - - return Sum * 0.5f; //return computed value corrected by 0.5 -} Deleted: trunk/python-ogre/ThirdParty/opcode/IceAABB.h =================================================================== --- trunk/python-ogre/ThirdParty/opcode/IceAABB.h 2007-09-23 08:38:07 UTC (rev 392) +++ trunk/python-ogre/ThirdParty/opcode/IceAABB.h 2007-09-23 14:36:03 UTC (rev 393) @@ -1,505 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Contains AABB-related code. (axis-aligned bounding box) - * \file .Ice/AABB.h - * \author Pierre Terdiman - * \date January, 13, 2000 - */ -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// Include Guard -#ifndef __ICEAABB_H__ -#define __ICEAABB_H__ - - // Forward declarations - class Sphere; - -//! Declarations of type-independent methods (most of them implemented in the .cpp) -#define AABB_COMMON_METHODS \ - AABB& Add(const AABB& aabb); \ - float MakeCube(AABB& cube) const; \ - void MakeSphere(Sphere& sphere) const; \ - const sbyte* ComputeOutline(const Point& local_eye, sdword& num) const; \ - float ComputeBoxArea(const Point& eye, const Matrix4x4& mat, float width, float height, sdword& num) const; \ - bool IsInside(const AABB& box) const; \ - bool ComputePlanes(Plane* planes) const; \ - bool ComputePoints(Point* pts) const; \ - const Point* GetVertexNormals() const; \ - const udword* GetEdges() const; \ - const Point* GetEdgeNormals() const; \ - inline_ BOOL ContainsPoint(const Point& p) const \ - { \ - if(p.x > GetMax(0) || p.x < GetMin(0)) return FALSE; \ - if(p.y > GetMax(1) || p.y < GetMin(1)) return FALSE; \ - if(p.z > GetMax(2) || p.z < GetMin(2)) return FALSE; \ - return TRUE; \ - } - - enum AABBType - { - AABB_RENDER = 0, //!< AABB used for rendering. Not visible == not rendered. - AABB_UPDATE = 1, //!< AABB used for dynamic updates. Not visible == not updated. - - AABB_FORCE_DWORD = 0x7fffffff, - }; - -#ifdef USE_MINMAX - - struct ICEMATHS_API ShadowAABB - { - Point mMin; - Point mMax; - }; - - class ICEMATHS_API AABB - { - public: - //! Constructor - inline_ AABB() {} - //! Destructor - inline_ ~AABB() {} - - //! Type-independent methods - AABB_COMMON_METHODS; - - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - /** - * Setups an AABB from min & max vectors. - * \param min [in] the min point - * \param max [in] the max point - */ - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - void SetMinMax(const Point& min, const Point& max) { mMin = min; mMax = max; } - - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - /** - * Setups an AABB from center & extents vectors. - * \param c [in] the center point - * \param e [in] the extents vector - */ - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - void SetCenterExtents(const Point& c, const Point& e) { mMin = c - e; mMax = c + e; } - - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - /** - * Setups an empty AABB. - */ - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - void SetEmpty() { Point p(MIN_FLOAT, MIN_FLOAT, MIN_FLOAT); mMin = -p; mMax = p;} - - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - /** - * Setups a point AABB. - */ - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - void SetPoint(const Point& pt) { mMin = mMax = pt; } - - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - /** - * Gets the size of the AABB. The size is defined as the longest extent. - * \return the size of the AABB - */ - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - float GetSize() const { Point e; GetExtents(e); return e.Max(); } - - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - /** - * Extends the AABB. - * \param p [in] the next point - */ - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - void Extend(const Point& p) - { - if(p.x > mMax.x) mMax.x = p.x; - if(p.x < mMin.x) mMin.x = p.x; - - if(p.y > mMax.y) mMax.y = p.y; - if(p.y < mMin.y) mMin.y = p.y; - - if(p.z > mMax.z) mMax.z = p.z; - if(p.z < mMin.z) mMin.z = p.z; - } - // Data access - - //! Get min point of the box - inline_ void GetMin(Point& min) const { min = mMin; } - //! Get max point of the box - inline_ void GetMax(Point& max) const { max = mMax; } - - //! Get component of the box's min point along a given axis - inline_ float GetMin(udword axis) const { return mMin[axis]; } - //! Get component of the box's max point along a given axis - inline_ float GetMax(udword axis) const { return mMax[axis]; } - - //! Get box center - inline_ void GetCenter(Point& center) const { center = (mMax + mMin)*0.5f; } - //! Get box extents - inline_ void GetExtents(Point& extents) const { extents = (mMax - mMin)*0.5f; } - - //! Get component of the box's center along a given axis - inline_ float GetCenter(udword axis) const { return (mMax[axis] + mMin[axis])*0.5f; } - //! Get component of the box's extents along a given axis - inline_ float GetExtents(udword axis) const { return (mMax[axis] - mMin[axis])*0.5f; } - - //! Get box diagonal - inline_ void GetDiagonal(Point& diagonal) const { diagonal = mMax - mMin; } - inline_ float GetWidth() const { return mMax.x - mMin.x; } - inline_ float GetHeight() const { return mMax.y - mMin.y; } - inline_ float GetDepth() const { return mMax.z - mMin.z; } - - //! Volume - inline_ float GetVolume() const { return GetWidth() * GetHeight() * GetDepth(); } - - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - /** - * Computes the intersection between two AABBs. - * \param a [in] the other AABB - * \return true on intersection - */ - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - inline_ BOOL Intersect(const AABB& a) const - { - if(mMax.x < a.mMin.x - || a.mMax.x < mMin.x - || mMax.y < a.mMin.y - || a.mMax.y < mMin.y - || mMax.z < a.mMin.z - || a.mMax.z < mMin.z) return FALSE; - - return TRUE; - } - - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - /** - * Computes the 1D-intersection between two AABBs, on a given axis. - * \param a [in] the other AABB - * \param axis [in] the axis (0, 1, 2) - * \return true on intersection - */ - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - inline_ BOOL Intersect(const AABB& a, udword axis) const - { - if(mMax[axis] < a.mMin[axis] || a.mMax[axis] < mMin[axis]) return FALSE; - return TRUE; - } - - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - /** - * Recomputes the AABB after an arbitrary transform by a 4x4 matrix. - * Original code by Charles Bloom on the GD-Algorithm list. (I slightly modified it) - * \param mtx [in] the transform matrix - * \param aabb [out] the transformed AABB [can be *this] - */ - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - inline_ void Rotate(const Matrix4x4& mtx, AABB& aabb) const - { - // The three edges transformed: you can efficiently transform an X-only vector - // by just getting the "X" column of the matrix - Point vx,vy,vz; - mtx.GetRow(0, vx); vx *= (mMax.x - mMin.x); - mtx.GetRow(1, vy); vy *= (mMax.y - mMin.y); - mtx.GetRow(2, vz); vz *= (mMax.z - mMin.z); - - // Transform the min point - aabb.mMin = aabb.mMax = mMin * mtx; - - // Take the transformed min & axes and find new extents - // Using CPU code in the right place is faster... - if(IS_NEGATIVE_FLOAT(vx.x)) aabb.mMin.x += vx.x; else aabb.mMax.x += vx.x; - if(IS_NEGATIVE_FLOAT(vx.y)) aabb.mMin.y += vx.y; else aabb.mMax.y += vx.y; - if(IS_NEGATIVE_FLOAT(vx.z)) aabb.mMin.z += vx.z; else aabb.mMax.z += vx.z; - if(IS_NEGATIVE_FLOAT(vy.x)) aabb.mMin.x += vy.x; else aabb.mMax.x += vy.x; - if(IS_NEGATIVE_FLOAT(vy.y)) aabb.mMin.y += vy.y; else aabb.mMax.y += vy.y; - if(IS_NEGATIVE_FLOAT(vy.z)) aabb.mMin.z += vy.z; else aabb.mMax.z += vy.z; - if(IS_NEGATIVE_FLOAT(vz.x)) aabb.mMin.x += vz.x; else aabb.mMax.x += vz.x; - if(IS_NEGATIVE_FLOAT(vz.y)) aabb.mMin.y += vz.y; else aabb.mMax.y += vz.y; - if(IS_NEGATIVE_FLOAT(vz.z)) aabb.mMin.z += vz.z; else aabb.mMax.z += vz.z; - } - - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - /** - * Checks the AABB is valid. - * \return true if the box is valid - */ - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - inline_ BOOL IsValid() const - { - // Consistency condition for (Min, Max) boxes: min < max - if(mMin.x > mMax.x) return FALSE; - if(mMin.y > mMax.y) return FALSE; - if(mMin.z > mMax.z) return FALSE; - return TRUE; - } - - //! Operator for AABB *= float. Scales the extents, keeps same center. - inline_ AABB& operator*=(float s) - { - Point Center; GetCenter(Center); - Point Extents; GetExtents(Extents); - SetCenterExtents(Center, Extents * s); - return *this; - } - - //! Operator for AABB /= float. Scales the extents, keeps same center. - inline_ AABB& operator/=(float s) - { - Point Center; GetCenter(Center); - Point Extents; GetExtents(Extents); - SetCenterExtents(Center, Extents / s); - return *this; - } - - //! Operator for AABB += Point. Translates the box. - inline_ AABB& operator+=(const Point& trans) - { - mMin+=trans; - mMax+=trans; - return *this; - } - private: - Point mMin; //!< Min point - Point mMax; //!< Max point - }; - -#else - - class ICEMATHS_API AABB - { - public: - //! Constructor - inline_ AABB() {} - //! Destructor - inline_ ~AABB() {} - - //! Type-independent methods - AABB_COMMON_METHODS; - - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - /** - * Setups an AABB from min & max vectors. - * \param min [in] the min point - * \param max [in] the max point - */ - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - void SetMinMax(const Point& min, const Point& max) { mCenter = (max + min)*0.5f; mExtents = (max - min)*0.5f; } - - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - /** - * Setups an AABB from center & extents vectors. - * \param c [in] the center point - * \param e [in] the extents vector - */ - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - void SetCenterExtents(const Point& c, const Point& e) { mCenter = c; mExtents = e; } - - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - /** - * Setups an empty AABB. - */ - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - void SetEmpty() { mCenter.Zero(); mExtents.Set(MIN_FLOAT, MIN_FLOAT, MIN_FLOAT);} - - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - /** - * Setups a point AABB. - */ - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - void SetPoint(const Point& pt) { mCenter = pt; mExtents.Zero(); } - - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - /** - * Gets the size of the AABB. The size is defined as the longest extent. - * \return the size of the AABB - */ - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - float GetSize() const { return mExtents.Max(); } - - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - /** - * Extends the AABB. - * \param p [in] the next point - */ - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - void Extend(const Point& p) - { - Point Max = mCenter + mExtents; - Point Min = mCenter - mExtents; - - if(p.x > Max.x) Max.x = p.x; - if(p.x < Min.x) Min.x = p.x; - - if(p.y > Max.y) Max.y = p.y; - if(p.y < Min.y) Min.y = p.y; - - if(p.z > Max.z) Max.z = p.z; - if(p.z < Min.z) Min.z = p.z; - - SetMinMax(Min, Max); - } - // Data access - - //! Get min point of the box - inline_ void GetMin(Point& min) const { min = mCenter - mExtents; } - //! Get max point of the box - inline_ void GetMax(Point& max) const { max = mCenter + mExtents; } - - //! Get component of the box's min point along a given axis - inline_ float GetMin(udword axis) const { return mCenter[axis] - mExtents[axis]; } - //! Get component of the box's max point along a given axis - inline_ float GetMax(udword axis) const { return mCenter[axis] + mExtents[axis]; } - - //! Get box center - inline_ void GetCenter(Point& center) const { center = mCenter; } - //! Get box extents - inline_ void GetExtents(Point& extents) const { extents = mExtents; } - - //! Get component of the box's center along a given axis - inline_ float GetCenter(udword axis) const { return mCenter[axis]; } - //! Get component of the box's extents along a given axis - inline_ float GetExtents(udword axis) const { return mExtents[axis]; } - - //! Get box diagonal - inline_ void GetDiagonal(Point& diagonal) const { diagonal = mExtents * 2.0f; } - inline_ float GetWidth() const { return mExtents.x * 2.0f; } - inline_ float GetHeight() const { return mExtents.y * 2.0f; } - inline_ float GetDepth() const { return mExtents.z * 2.0f; } - - //! Volume - inline_ float GetVolume() const { return mExtents.x * mExtents.y * mExtents.z * 8.0f; } - - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - /** - * Computes the intersection between two AABBs. - * \param a [in] the other AABB - * \return true on intersection - */ - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - inline_ BOOL Intersect(const AABB& a) const - { - float tx = mCenter.x - a.mCenter.x; float ex = a.mExtents.x + mExtents.x; if(AIR(tx) > IR(ex)) return FALSE; - float ty = mCenter.y - a.mCenter.y; float ey = a.mExtents.y + mExtents.y; if(AIR(ty) > IR(ey)) return FALSE; - float tz = mCenter.z - a.mCenter.z; float ez = a.mExtents.z + mExtents.z; if(AIR(tz) > IR(ez)) return FALSE; - return TRUE; - } - - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - /** - * The standard intersection method from Gamasutra. Just here to check its speed against the one above. - * \param a [in] the other AABB - * \return true on intersection - */ - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - inline_ bool GomezIntersect(const AABB& a) - { - Point T = mCenter - a.mCenter; // Vector from A to B - return ((fabsf(T.x) <= (a.mExtents.x + mExtents.x)) - && (fabsf(T.y) <= (a.mExtents.y + mExtents.y)) - && (fabsf(T.z) <= (a.mExtents.z + mExtents.z))); - } - - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - /** - * Computes the 1D-intersection between two AABBs, on a given axis. - * \param a [in] the other AABB - * \param axis [in] the axis (0, 1, 2) - * \return true on intersection - */ - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - inline_ BOOL Intersect(const AABB& a, udword axis) const - { - float t = mCenter[axis] - a.mCenter[axis]; - float e = a.mExtents[axis] + mExtents[axis]; - if(AIR(t) > IR(e)) return FALSE; - return TRUE; - } - - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - /** - * Recomputes the AABB after an arbitrary transform by a 4x4 matrix. - * \param mtx [in] the transform matrix - * \param aabb [out] the transformed AABB [can be *this] - */ - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - inline_ void Rotate(const Matrix4x4& mtx, AABB& aabb) const - { - // Compute new center - aabb.mCenter = mCenter * mtx; - - // Compute new extents. FPU code & CPU code have been interleaved for improved performance. - Point Ex(mtx.m[0][0] * mExtents.x, mtx.m[0][1] * mExtents.x, mtx.m[0][2] * mExtents.x); - IR(Ex.x)&=0x7fffffff; IR(Ex.y)&=0x7fffffff; IR(Ex.z)&=0x7fffffff; - - Point Ey(mtx.m[1][0] * mExtents.y, mtx.m[1][1] * mExtents.y, mtx.m[1][2] * mExtents.y); - IR(Ey.x)&=0x7fffffff; IR(Ey.y)&=0x7fffffff; IR(Ey.z)&=0x7fffffff; - - Point Ez(mtx.m[2][0] * mExtents.z, mtx.m[2][1] * mExtents.z, mtx.m[2][2] * mExtents.z); - IR(Ez.x)&=0x7fffffff; IR(Ez.y)&=0x7fffffff; IR(Ez.z)&=0x7fffffff; - - aabb.mExtents.x = Ex.x + Ey.x + Ez.x; - aabb.mExtents.y = Ex.y + Ey.y + Ez.y; - aabb.mExtents.z = Ex.z + Ey.z + Ez.z; - } - - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - /** - * Checks the AABB is valid. - * \return true if the box is valid - */ - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - inline_ BOOL IsValid() const - { - // Consistency condition for (Center, Extents) boxes: Extents >= 0 - if(IS_NEGATIVE_FLOAT(mExtents.x)) return FALSE; - if(IS_NEGATIVE_FLOAT(mExtents.y)) return FALSE; - if(IS_NEGATIVE_FLOAT(mExtents.z)) return FALSE; - return TRUE; - } - - //! Operator for AABB *= float. Scales the extents, keeps same center. - inline_ AABB& operator*=(float s) { mExtents*=s; return *this; } - - //! Operator for AABB /= float. Scales the extents, keeps same center. - inline_ AABB& operator/=(float s) { mExtents/=s; return *this; } - - //! Operator for AABB += Point. Translates the box. - inline_ AABB& operator+=(const Point& trans) - { - mCenter+=trans; - return *this; - } - private: - Point mCenter; //!< AABB Center - Point mExtents; //!< x, y and z extents - }; - -#endif - - inline_ void ComputeMinMax(const Point& p, Point& min, Point& max) - { - if(p.x > max.x) max.x = p.x; - if(p.x < min.x) min.x = p.x; - - if(p.y > max.y) max.y = p.y; - if(p.y < min.y) min.y = p.y; - - if(p.z > max.z) max.z = p.z; - if(p.z < min.z) min.z = p.z; - } - - inline_ void ComputeAABB(AABB& aabb, const Point* list, udword nb_pts) - { - if(list) - { - Point Maxi(MIN_FLOAT, MIN_FLOAT, MIN_FLOAT); - Point Mini(MAX_FLOAT, MAX_FLOAT, MAX_FLOAT); - while(nb_pts--) - { -// _prefetch(list+1); // off by one ? - ComputeMinMax(*list++, Mini, Maxi); - } - aabb.SetMinMax(Mini, Maxi); - } - } - -#endif // __ICEAABB_H__ Deleted: trunk/python-ogre/ThirdParty/opcode/IceAxes.h =================================================================== --- trunk/python-ogre/ThirdParty/opcode/IceAxes.h 2007-09-23 08:38:07 UTC (rev 392) +++ trunk/python-ogre/ThirdParty/opcode/IceAxes.h 2007-09-23 14:36:03 UTC (rev 393) @@ -1,54 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Contains axes definition. - * \file .Ice/Axes.h - * \author Pierre Terdiman - * \date January, 29, 2000 - */ -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// Include Guard -#ifndef __ICEAXES_H__ -#define __ICEAXES_H__ - - enum PointComponent - { - X = 0, - Y = 1, - Z = 2, - W = 3, - - FORCE_DWORD = 0x7fffffff - }; - - enum AxisOrder - { - AXES_XYZ = (X)|(Y<<2)|(Z<<4), - AXES_XZY = (X)|(Z<<2)|(Y<<4), - AXES_YXZ = (Y)|(X<<2)|(Z<<4), - AXES_YZX = (Y)|(Z<<2)|(X<<4), - AXES_ZXY = (Z)|(X<<2)|(Y<<4), - AXES_ZYX = (Z)|(Y<<2)|(X<<4), - - AXES_FORCE_DWORD = 0x7fffffff - }; - - class ICEMATHS_API Axes - { - public: - - inline_ Axes(AxisOrder order) - { - mAxis0 = (order ) & 3; - mAxis1 = (order>>2) & 3; - mAxis2 = (order>>4) & 3; - } - inline_ ~Axes() {} - - udword mAxis0; - udword mAxis1; - udword mAxis2; - }; - -#endif // __ICEAXES_H__ Deleted: trunk/python-ogre/ThirdParty/opcode/IceBoundingSphere.h =================================================================== --- trunk/python-ogre/ThirdParty/opcode/IceBoundingSphere.h 2007-09-23 08:38:07 UTC (rev 392) +++ trunk/python-ogre/ThirdParty/opcode/IceBoundingSphere.h 2007-09-23 14:36:03 UTC (rev 393) @@ -1,142 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Contains code to compute the minimal bounding sphere. - * \file .Ice/BoundingSphere.h - * \author Pierre Terdiman - * \date January, 29, 2000 - */ -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// Include Guard -#ifndef __ICEBOUNDINGSPHERE_H__ -#define __ICEBOUNDINGSPHERE_H__ - - enum BSphereMethod - { - BS_NONE, - BS_GEMS, - BS_MINIBALL, - - BS_FORCE_DWORD = 0x7fffffff - }; - - class ICEMATHS_API Sphere - { - public: - //! Constructor - inline_ Sphere() {} - //! Constructor - inline_ Sphere(const Point& center, float radius) : mCenter(center), mRadius(radius) {} - //! Constructor - Sphere(udword nb_verts, const Point* verts); - //! Copy constructor - inline_ Sphere(const Sphere& sphere) : mCenter(sphere.mCenter), mRadius(sphere.mRadius) {} - //! Destructor - inline_ ~Sphere() {} - - BSphereMethod Compute(udword nb_verts, const Point* verts); - bool FastCompute(udword nb_verts, const Point* verts); - - // Access methods - inline_ const Point& GetCenter() const { return mCenter; } - inline_ float GetRadius() const { return mRadius; } - - inline_ const Point& Center() const { return mCenter; } - inline_ float Radius() const { return mRadius; } - - inline_ Sphere& Set(const Point& center, float radius) { mCenter = center; mRadius = radius; return *this; } - inline_ Sphere& SetCenter(const Point& center) { mCenter = center; return *this; } - inline_ Sphere& SetRadius(float radius) { mRadius = radius; return *this; } - - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - /** - * Tests if a point is contained within the sphere. - * \param p [in] the point to test - * \return true if inside the sphere - */ - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - inline_ bool Contains(const Point& p) const - { - return mCenter.SquareDistance(p) <= mRadius*mRadius; - } - - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - /** - * Tests if a sphere is contained within the sphere. - * \param sphere [in] the sphere to test - * \return true if inside the sphere - */ - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - inline_ bool Contains(const Sphere& sphere) const - { - // If our radius is the smallest, we can't possibly contain the other sphere - if(mRadius < sphere.mRadius) return false; - // So r is always positive or null now - float r = mRadius - sphere.mRadius; - return mCenter.SquareDistance(sphere.mCenter) <= r*r; - } - - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - /** - * Tests if a box is contained within the sphere. - * \param aabb [in] the box to test - * \return true if inside the sphere - */ - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - inline_ BOOL Contains(const AABB& aabb) const - { - // I assume if all 8 box vertices are inside the sphere, so does the whole box. - // Sounds ok but maybe there's a better way? - float R2 = mRadius * mRadius; -#ifdef USE_MIN_MAX - const Point& Max = ((ShadowAABB&)&aabb).mMax; - const Point& Min = ((ShadowAABB&)&aabb).mMin; -#else - Point Max; aabb.GetMax(Max); - Point Min; aabb.GetMin(Min); -#endif - Point p; - p.x=Max.x; p.y=Max.y; p.z=Max.z; if(mCenter.SquareDistance(p)>=R2) return FALSE; - p.x=Min.x; if(mCenter.SquareDistance(p)>=R2) return FALSE; - p.x=Max.x; p.y=Min.y; if(mCenter.SquareDistance(p)>=R2) return FALSE; - p.x=Min.x; if(mCenter.SquareDistance(p)>=R2) return FALSE; - p.x=Max.x; p.y=Max.y; p.z=Min.z; if(mCenter.SquareDistance(p)>=R2) return FALSE; - p.x=Min.x; if(mCenter.SquareDistance(p)>=R2) return FALSE; - p.x=Max.x; p.y=Min.y; if(mCenter.SquareDistance(p)>=R2) return FALSE; - p.x=Min.x; if(mCenter.SquareDistance(p)>=R2) return FALSE; - - return TRUE; - } - - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - /** - * Tests if the sphere intersects another sphere - * \param sphere [in] the other sphere - * \return true if spheres overlap - */ - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - inline_ bool Intersect(const Sphere& sphere) const - { - float r = mRadius + sphere.mRadius; - return mCenter.SquareDistance(sphere.mCenter) <= r*r; - } - - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - /** - * Checks the sphere is valid. - * \return true if the box is valid - */ - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - inline_ BOOL IsValid() const - { - // Consistency condition for spheres: Radius >= 0.0f - if(mRadius < 0.0f) return FALSE; - return TRUE; - } - public: - Point mCenter; //!< Sphere center - float mRadius; //!< Sphere radius - }; - -#endif // __ICEBOUNDINGSPHERE_H__ Deleted: trunk/python-ogre/ThirdParty/opcode/IceContainer.cpp =================================================================== --- trunk/python-ogre/ThirdParty/opcode/IceContainer.cpp 2007-09-23 08:38:07 UTC (rev 392) +++ trunk/python-ogre/ThirdParty/opcode/IceContainer.cpp 2007-09-23 14:36:03 UTC (rev 393) @@ -1,345 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Contains a simple container class. - * \file .Ice/Container.cpp - * \author Pierre Terdiman - * \date February, 5, 2000 - */ -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Contains a list of 32-bits values. - * Use this class when you need to store an unknown number of values. The list is automatically - * resized and can contains 32-bits entities (dwords or floats) - * - * \class Container - * \author Pierre Terdiman - * \version 1.0 - * \date 08.15.98 -*/ -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// Precompiled Header -#include "Stdafx.h" - -using namespace.Ice/Core; - -// Static members -#ifdef CONTAINER_STATS -udword Container::mNbContainers = 0; -udword Container::mUsedRam = 0; -#endif - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Constructor. No entries allocated there. - */ -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -Container::Container() : mMaxNbEntries(0), mCurNbEntries(0), mEntries(null), mGrowthFactor(2.0f) -{ -#ifdef CONTAINER_STATS - mNbContainers++; - mUsedRam+=sizeof(Container); -#endif -} - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Constructor. Also allocates a given number of entries. - */ -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -Container::Container(udword size, float growth_factor) : mMaxNbEntries(0), mCurNbEntries(0), mEntries(null), mGrowthFactor(growth_factor) -{ -#ifdef CONTAINER_STATS - mNbContainers++; - mUsedRam+=sizeof(Container); -#endif - SetSize(size); -} - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Copy constructor. - */ -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -Container::Container(const Container& object) : mMaxNbEntries(0), mCurNbEntries(0), mEntries(null), mGrowthFactor(2.0f) -{ -#ifdef CONTAINER_STATS - mNbContainers++; - mUsedRam+=sizeof(Container); -#endif - *this = object; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Destructor. Frees everything and leaves. - */ -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -Container::~Container() -{ - Empty(); -#ifdef CONTAINER_STATS - mNbContainers--; - mUsedRam-=GetUsedRam(); -#endif -} - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Clears the container. All stored values are deleted, and it frees used ram. - * \see Reset() - * \return Self-Reference - */ -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -Container& Container::Empty() -{ -#ifdef CONTAINER_STATS - mUsedRam-=mMaxNbEntries*sizeof(udword); -#endif - DELETEARRAY(mEntries); - mCurNbEntries = mMaxNbEntries = 0; - return *this; -} - -///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////... [truncated message content] |
From: <and...@us...> - 2007-09-28 14:45:17
|
Revision: 396 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=396&view=rev Author: andy_miller Date: 2007-09-28 07:45:20 -0700 (Fri, 28 Sep 2007) Log Message: ----------- Linux updates Modified Paths: -------------- trunk/python-ogre/code_generators/plib/generate_code.py trunk/python-ogre/scripts/06-GenerateCode.sh trunk/python-ogre/scripts/07-BuildModules.sh trunk/python-ogre/scripts/master.sh Modified: trunk/python-ogre/code_generators/plib/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/plib/generate_code.py 2007-09-28 01:48:44 UTC (rev 395) +++ trunk/python-ogre/code_generators/plib/generate_code.py 2007-09-28 14:45:20 UTC (rev 396) @@ -93,7 +93,9 @@ ,'::ssgTexture::getFilename' ,'::ssgVtxArray::getIndex' ## returns a short ,'::ssgLoaderOptions::make_path' - ,'::ssgBase::copy_from' + ,'::ssgBase::copy_from' + + ,'::ulLinkedList::unlinkNode' @@ -110,6 +112,8 @@ ,'::ulGetError' ,'::ulMakePath' ,'::ulOpenDir' + ,'::ulCloseDir' + ,'::ulReadDir' ,'::ulStrDup' ,'::ssgSavePOV' ,'::ssgConvertTexture' Modified: trunk/python-ogre/scripts/06-GenerateCode.sh =================================================================== --- trunk/python-ogre/scripts/06-GenerateCode.sh 2007-09-28 01:48:44 UTC (rev 395) +++ trunk/python-ogre/scripts/06-GenerateCode.sh 2007-09-28 14:45:20 UTC (rev 396) @@ -5,35 +5,59 @@ source ./config.sh echo "=== generating code ===" +echo "=== generating code ===" >> $INSTALL_DIR/log.out cd python-ogre/code_generators echo ' -- creating OGRE code' +echo ' -- creating OGRE code' >> $INSTALL_DIR/log.out cd ogre python generate_code.py > build.out cd .. echo ' -- creating OGRErefapp code' +echo ' -- creating OGRErefapp code'>> $INSTALL_DIR/log.out cd ogrerefapp python generate_code.py > build.out cd .. echo ' -- creating quickgui code' +echo ' -- creating quickgui code'>> $INSTALL_DIR/log.out cd quickgui python generate_code.py > build.out cd .. echo ' -- creating OIS code' +echo ' -- creating OIS code'>> $INSTALL_DIR/log.out cd ois python generate_code.py > build.out cd .. echo ' -- creating CEGUI code' +echo ' -- creating CEGUI code'>> $INSTALL_DIR/log.out cd cegui python generate_code.py > build.out cd .. echo ' -- creating OgreAL code' +echo ' -- creating OgreAL code'>> $INSTALL_DIR/log.out cd ogreal python generate_code.py > build.out cd .. -#echo ' -- creating OGREode code' -#cd ogreode -#python generate_code.py > build.out -#cd .. +echo ' -- creating OGREode code' +echo ' -- creating OGREode code'>> $INSTALL_DIR/log.out +cd ogreode +python generate_code.py > build.out +cd .. +echo ' -- creating OpCode code' +echo ' -- creating OpCode code'>> $INSTALL_DIR/log.out +cd opcode +python generate_code.py > build.out +cd .. +echo ' -- creating PLIB code' +echo ' -- creating PLIB code'>> $INSTALL_DIR/log.out +cd plib +python generate_code.py > build.out +cd .. +echo ' -- creating Theora code' +echo ' -- creating Theora code'>> $INSTALL_DIR/log.out +cd theora +python generate_code.py > build.out +cd .. + #echo ' -- creating OGREnewt code' #cd ogrenewt #python generate_code.py > build.out @@ -44,3 +68,5 @@ cd $INSTALL_DIR echo echo "=== done building code ===" +echo "=== done building code ===">> $INSTALL_DIR/log.out + Modified: trunk/python-ogre/scripts/07-BuildModules.sh =================================================================== --- trunk/python-ogre/scripts/07-BuildModules.sh 2007-09-28 01:48:44 UTC (rev 395) +++ trunk/python-ogre/scripts/07-BuildModules.sh 2007-09-28 14:45:20 UTC (rev 396) @@ -8,7 +8,8 @@ # compile code # cd python-ogre -scons PROJECTS=ogre,ois,quickgui,cegui,ogrerefapp -python setup.py install +scons PROJECTS=ogre,ois,quickgui,cegui,plib,ogreode +#,ogrerefapp +python setup.py install --prefix=$PREFIX cd .. Modified: trunk/python-ogre/scripts/master.sh =================================================================== --- trunk/python-ogre/scripts/master.sh 2007-09-28 01:48:44 UTC (rev 395) +++ trunk/python-ogre/scripts/master.sh 2007-09-28 14:45:20 UTC (rev 396) @@ -1,13 +1,12 @@ #!/bin/bash # Part of the Python-Ogre installation - # Run them all :) -source ./00-PreReqs.sh -source ./01-RetrieveSource.sh -source ./02-ExtractAndPatch.sh -source ./03-BuildBaseLibs.sh -source ./04-BuildAdditionalLibs.sh -source ./05-BuildTools.sh +#source ./00-PreReqs.sh +#source ./01-RetrieveSource.sh +#source ./02-ExtractAndPatch.sh +#source ./03-BuildBaseLibs.sh +#source ./05-BuildTools.sh +#source ./04-BuildAdditionalLibs.sh source ./06-GenerateCode.sh source ./07-BuildModules.sh This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2007-09-29 06:46:27
|
Revision: 399 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=399&view=rev Author: andy_miller Date: 2007-09-28 23:46:30 -0700 (Fri, 28 Sep 2007) Log Message: ----------- OgreNewt now compiles under Linux Modified Paths: -------------- trunk/python-ogre/ThirdParty/opcode/Ice/IceTypes.h trunk/python-ogre/ThirdParty/opcode/OPC_IceHook.h trunk/python-ogre/code_generators/opcode/generate_code.py trunk/python-ogre/environment.py trunk/python-ogre/scripts/02-ExtractAndPatch.sh trunk/python-ogre/scripts/06-GenerateCode.sh trunk/python-ogre/scripts/07-BuildModules.sh Modified: trunk/python-ogre/ThirdParty/opcode/Ice/IceTypes.h =================================================================== --- trunk/python-ogre/ThirdParty/opcode/Ice/IceTypes.h 2007-09-28 15:31:47 UTC (rev 398) +++ trunk/python-ogre/ThirdParty/opcode/Ice/IceTypes.h 2007-09-29 06:46:30 UTC (rev 399) @@ -63,8 +63,8 @@ typedef unsigned short uword; //!< sizeof(uword) must be 2 typedef signed int sdword; //!< sizeof(sdword) must be 4 typedef unsigned int udword; //!< sizeof(udword) must be 4 - typedef signed __int64 sqword; //!< sizeof(sqword) must be 8 - typedef unsigned __int64 uqword; //!< sizeof(uqword) must be 8 + typedef signed long long sqword; //!< sizeof(sqword) must be 8 + typedef unsigned long long uqword; //!< sizeof(uqword) must be 8 typedef float float32; //!< sizeof(float32) must be 4 typedef double float64; //!< sizeof(float64) must be 4 @@ -137,7 +137,7 @@ #define ONE_OVER_RAND_MAX (1.0f / float(RAND_MAX)) //!< Inverse of the max possible value returned by rand() - typedef int (__stdcall* PROC)(); //!< A standard procedure call. + //typedef int (__stdcall* PROC)(); //!< A standard procedure call. typedef bool (*ENUMERATION)(udword value, udword param, udword context); //!< ICE standard enumeration call typedef void** VTABLE; //!< A V-Table. Modified: trunk/python-ogre/ThirdParty/opcode/OPC_IceHook.h =================================================================== --- trunk/python-ogre/ThirdParty/opcode/OPC_IceHook.h 2007-09-28 15:31:47 UTC (rev 398) +++ trunk/python-ogre/ThirdParty/opcode/OPC_IceHook.h 2007-09-29 06:46:30 UTC (rev 399) @@ -18,7 +18,7 @@ #include <assert.h> #include <string.h> #include <float.h> - #include <Math.h> + #include <math.h> #ifndef ASSERT #define ASSERT(exp) {} @@ -29,42 +29,42 @@ #define SetIceError false #define EC_OUTOFMEMORY "Out of memory" - #include ".\Ice\IcePreprocessor.h" + #include "./Ice/IcePreprocessor.h" #undef ICECORE_API #define ICECORE_API OPCODE_API - #include ".\Ice\IceTypes.h" - #include ".\Ice\IceFPU.h" - #include ".\Ice\IceMemoryMacros.h" + #include "./Ice/IceTypes.h" + #include "./Ice/IceFPU.h" + #include "./Ice/IceMemoryMacros.h" namespace IceCore { - #include ".\Ice\IceUtils.h" - #include ".\Ice\IceContainer.h" - #include ".\Ice\IcePairs.h" - #include ".\Ice\IceRevisitedRadix.h" - #include ".\Ice\IceRandom.h" + #include "./Ice/IceUtils.h" + #include "./Ice/IceContainer.h" + #include "./Ice/IcePairs.h" + #include "./Ice/IceRevisitedRadix.h" + #include "./Ice/IceRandom.h" } using namespace IceCore; #define ICEMATHS_API OPCODE_API namespace IceMaths { - #include ".\Ice\IceAxes.h" - #include ".\Ice\IcePoint.h" - #include ".\Ice\IceHPoint.h" - #include ".\Ice\IceMatrix3x3.h" - #include ".\Ice\IceMatrix4x4.h" - #include ".\Ice\IcePlane.h" - #include ".\Ice\IceRay.h" - #include ".\Ice\IceIndexedTriangle.h" - #include ".\Ice\IceTriangle.h" - #include ".\Ice\IceTriList.h" - #include ".\Ice\IceAABB.h" - #include ".\Ice\IceOBB.h" - #include ".\Ice\IceBoundingSphere.h" - #include ".\Ice\IceSegment.h" - #include ".\Ice\IceLSS.h" + #include "./Ice/IceAxes.h" + #include "./Ice/IcePoint.h" + #include "./Ice/IceHPoint.h" + #include "./Ice/IceMatrix3x3.h" + #include "./Ice/IceMatrix4x4.h" + #include "./Ice/IcePlane.h" + #include "./Ice/IceRay.h" + #include "./Ice/IceIndexedTriangle.h" + #include "./Ice/IceTriangle.h" + #include "./Ice/IceTrilist.h" + #include "./Ice/IceAABB.h" + #include "./Ice/IceOBB.h" + #include "./Ice/IceBoundingSphere.h" + #include "./Ice/IceSegment.h" + #include "./Ice/IceLSS.h" } using namespace IceMaths; Modified: trunk/python-ogre/code_generators/opcode/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/opcode/generate_code.py 2007-09-28 15:31:47 UTC (rev 398) +++ trunk/python-ogre/code_generators/opcode/generate_code.py 2007-09-29 06:46:30 UTC (rev 399) @@ -40,9 +40,9 @@ ## small helper function def docit ( general, i, o ): - docs = "Python-Ogre (Opcode) Modified Function Call\\n" + general +"\\n" + docs = "\"Python-Ogre (Opcode) Modified Function Call\\n" + general +"\\n" docs = docs + "Input: " + i + "\\n" - docs = docs + "Output: " + o + "\\n\\\n" + docs = docs + "Output: " + o + "\\n\\\n\"" return docs ############################################################ @@ -475,7 +475,7 @@ os.path.join( environment.opcode.root_dir, "python_opcode.h" ) , environment.opcode.cache_file ) - defined_symbols = ['OPCODE_EXPORTS'] #, 'ICE_NO_DLL'] #, 'OPC_USE_CALLBACKS' ] + defined_symbols = ['OPCODE_EXPORTS', 'ICE_NO_DLL'] #, 'OPC_USE_CALLBACKS' ] defined_symbols.append( 'VERSION_' + environment.opcode.version ) # @@ -578,7 +578,7 @@ # ########################################################################################## extractor = exdoc.doc_extractor("") # I'm excluding the UTFstring docs as lots about nothing - mb.build_code_creator (module_name='_opcode_' , doc_extractor= extractor ) + mb.build_code_creator (module_name='_opcode_') ## , doc_extractor= extractor ) for inc in environment.opcode.include_dirs: mb.code_creator.user_defined_directories.append(inc ) Modified: trunk/python-ogre/environment.py =================================================================== --- trunk/python-ogre/environment.py 2007-09-28 15:31:47 UTC (rev 398) +++ trunk/python-ogre/environment.py 2007-09-29 06:46:30 UTC (rev 399) @@ -248,8 +248,11 @@ class ogrenewt: active=True version = "1.0" - parent = "ogre/physics" - libs = ['Newton', Config.LIB_Boost, 'OgreNewt_Main', 'OgreMain'] + parent = "ogre/physics" + if os.name=="nt": + libs = ['Newton', Config.LIB_Boost, 'OgreNewt_Main', 'OgreMain'] + else: + libs = ['Newton', Config.LIB_Boost, 'OgreNewt', 'OgreMain'] include_dirs = [Config.PATH_Boost , Config.PATH_Newton # only one path for Newton , Config.PATH_INCLUDE_Ogre Modified: trunk/python-ogre/scripts/02-ExtractAndPatch.sh =================================================================== --- trunk/python-ogre/scripts/02-ExtractAndPatch.sh 2007-09-28 15:31:47 UTC (rev 398) +++ trunk/python-ogre/scripts/02-ExtractAndPatch.sh 2007-09-29 06:46:30 UTC (rev 399) @@ -59,7 +59,9 @@ # # Install Newton # -echo " -- Installing Newton to OgreNewt and root" +echo " -- Patching and Installing Newton " +# patch to include stddef.h as size_t isn't defined in Newton.h +patch -s -i ./python-ogre/patch/Newton.patch -p0 cp newtonSDK/sdk/Newton.h $PREFIX/include cp newtonSDK/sdk/*.a $PREFIX/lib cp newtonSDK/sdk/*.a ogreaddons/ogrenewt Modified: trunk/python-ogre/scripts/06-GenerateCode.sh =================================================================== --- trunk/python-ogre/scripts/06-GenerateCode.sh 2007-09-28 15:31:47 UTC (rev 398) +++ trunk/python-ogre/scripts/06-GenerateCode.sh 2007-09-29 06:46:30 UTC (rev 399) @@ -3,10 +3,16 @@ # master config setup source ./config.sh - echo "=== generating code ===" echo "=== generating code ===" >> $INSTALL_DIR/log.out cd python-ogre/code_generators +if [ $1 != "" ] +then + cd $1 + python generate_code.py > build.out + cd .. +else + echo ' -- creating OGRE code' echo ' -- creating OGRE code' >> $INSTALL_DIR/log.out cd ogre @@ -57,14 +63,16 @@ cd theora python generate_code.py > build.out cd .. - -#echo ' -- creating OGREnewt code' -#cd ogrenewt -#python generate_code.py > build.out -#cd .. +echo ' -- creating OGREnewt code' +echo ' -- creating OGREnewt code' >> $INSTALL_DIR/log.out +cd ogrenewt +python generate_code.py > build.out +cd .. #echo ' -- creating ode code' #cd ode #python generate_code.py > build.out + +fi cd $INSTALL_DIR echo echo "=== done building code ===" Modified: trunk/python-ogre/scripts/07-BuildModules.sh =================================================================== --- trunk/python-ogre/scripts/07-BuildModules.sh 2007-09-28 15:31:47 UTC (rev 398) +++ trunk/python-ogre/scripts/07-BuildModules.sh 2007-09-29 06:46:30 UTC (rev 399) @@ -8,7 +8,13 @@ # compile code # cd python-ogre -scons PROJECTS=ogre,ois,quickgui,cegui,plib,ogreode +if [ $1 != "" ] +then + scons PROJECTS=$1 +else + scons PROJECTS=ogre,ois,quickgui,cegui,plib,ogreode,ogrenewt +fi +#ogre,ois,quickgui,cegui,plib,ogreode #,ogrerefapp python setup.py install --prefix=$PREFIX cd .. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2007-09-28 01:48:44
|
Revision: 395 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=395&view=rev Author: andy_miller Date: 2007-09-27 18:48:44 -0700 (Thu, 27 Sep 2007) Log Message: ----------- Plib updates Media updates for ogreode/media Modified Paths: -------------- trunk/python-ogre/PythonOgreConfig_nt.py trunk/python-ogre/ThirdParty/quickgui/QuickGUIExportDLL.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIHorizontalScrollBar.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUILabel.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIList.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIList.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIManager.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIManager.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIScrollPane.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIScrollPane.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIText.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUITitleBar.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIVerticalScrollBar.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIWidget.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIWidget.h trunk/python-ogre/code_generators/cleanIncrementalbuild.bat trunk/python-ogre/code_generators/plib/customization_data.py trunk/python-ogre/code_generators/plib/generate_code.py trunk/python-ogre/code_generators/plib/hand_made_wrappers.py trunk/python-ogre/code_generators/plib/python_plib.h trunk/python-ogre/demos/ogreode/resources.cfg trunk/python-ogre/environment.py trunk/python-ogre/packages_2.5/ogre/__init__.py trunk/python-ogre/packages_2.5/ogre/gui/CEGUI/__init__.py trunk/python-ogre/packages_2.5/ogre/gui/QuickGUI/__init__.py trunk/python-ogre/packages_2.5/ogre/gui/betagui/__init__.py trunk/python-ogre/packages_2.5/ogre/io/OIS/__init__.py trunk/python-ogre/packages_2.5/ogre/physics/NxOgre/__init__.py trunk/python-ogre/packages_2.5/ogre/physics/OgreNewt/__init__.py trunk/python-ogre/packages_2.5/ogre/physics/PhysX/__init__.py trunk/python-ogre/packages_2.5/ogre/renderer/OGRE/__init__.py trunk/python-ogre/packages_2.5/ogre/renderer/OGRE/sf_OIS.py Added Paths: ----------- trunk/python-ogre/ThirdParty/plib/Makefile.am trunk/python-ogre/ThirdParty/plib/Makefile.in trunk/python-ogre/ThirdParty/plib/pcx.h trunk/python-ogre/ThirdParty/plib/sg.cxx trunk/python-ogre/ThirdParty/plib/sg.dsp trunk/python-ogre/ThirdParty/plib/sg.h trunk/python-ogre/ThirdParty/plib/sg.vcproj trunk/python-ogre/ThirdParty/plib/sg.vcproj.JNPR.amiller.user trunk/python-ogre/ThirdParty/plib/sgIsect.cxx trunk/python-ogre/ThirdParty/plib/sgPerlinNoise.cxx trunk/python-ogre/ThirdParty/plib/sgd.cxx trunk/python-ogre/ThirdParty/plib/sgdIsect.cxx trunk/python-ogre/ThirdParty/plib/ssg.cxx trunk/python-ogre/ThirdParty/plib/ssg.dsp trunk/python-ogre/ThirdParty/plib/ssg.h trunk/python-ogre/ThirdParty/plib/ssg.vcproj trunk/python-ogre/ThirdParty/plib/ssg.vcproj.JNPR.amiller.user trunk/python-ogre/ThirdParty/plib/ssg3ds.h trunk/python-ogre/ThirdParty/plib/ssgAnimTransform.cxx trunk/python-ogre/ThirdParty/plib/ssgAnimation.cxx trunk/python-ogre/ThirdParty/plib/ssgAxisTransform.cxx trunk/python-ogre/ThirdParty/plib/ssgBase.cxx trunk/python-ogre/ThirdParty/plib/ssgBaseTransform.cxx trunk/python-ogre/ThirdParty/plib/ssgBranch.cxx trunk/python-ogre/ThirdParty/plib/ssgContext.cxx trunk/python-ogre/ThirdParty/plib/ssgCutout.cxx trunk/python-ogre/ThirdParty/plib/ssgDList.cxx trunk/python-ogre/ThirdParty/plib/ssgEntity.cxx trunk/python-ogre/ThirdParty/plib/ssgIO.cxx trunk/python-ogre/ThirdParty/plib/ssgInvisible.cxx trunk/python-ogre/ThirdParty/plib/ssgIsect.cxx trunk/python-ogre/ThirdParty/plib/ssgKeyFlier.h trunk/python-ogre/ThirdParty/plib/ssgLeaf.cxx trunk/python-ogre/ThirdParty/plib/ssgList.cxx trunk/python-ogre/ThirdParty/plib/ssgLoad.cxx trunk/python-ogre/ThirdParty/plib/ssgLoad3ds.cxx trunk/python-ogre/ThirdParty/plib/ssgLoadAC.cxx trunk/python-ogre/ThirdParty/plib/ssgLoadASC.cxx trunk/python-ogre/ThirdParty/plib/ssgLoadASE.cxx trunk/python-ogre/ThirdParty/plib/ssgLoadATG.cxx trunk/python-ogre/ThirdParty/plib/ssgLoadBMP.cxx trunk/python-ogre/ThirdParty/plib/ssgLoadDOF.cxx trunk/python-ogre/ThirdParty/plib/ssgLoadDXF.cxx trunk/python-ogre/ThirdParty/plib/ssgLoadFLT.cxx trunk/python-ogre/ThirdParty/plib/ssgLoadIV.cxx trunk/python-ogre/ThirdParty/plib/ssgLoadM.cxx trunk/python-ogre/ThirdParty/plib/ssgLoadMD2.cxx trunk/python-ogre/ThirdParty/plib/ssgLoadMDL.cxx trunk/python-ogre/ThirdParty/plib/ssgLoadMDL.h trunk/python-ogre/ThirdParty/plib/ssgLoadMDL_BGLTexture.cxx trunk/python-ogre/ThirdParty/plib/ssgLoadOBJ.cxx trunk/python-ogre/ThirdParty/plib/ssgLoadOFF.cxx trunk/python-ogre/ThirdParty/plib/ssgLoadPCX.cxx trunk/python-ogre/ThirdParty/plib/ssgLoadPNG.cxx trunk/python-ogre/ThirdParty/plib/ssgLoadSGI.cxx trunk/python-ogre/ThirdParty/plib/ssgLoadSSG.cxx trunk/python-ogre/ThirdParty/plib/ssgLoadStrip.cxx trunk/python-ogre/ThirdParty/plib/ssgLoadTGA.cxx trunk/python-ogre/ThirdParty/plib/ssgLoadTRI.cxx trunk/python-ogre/ThirdParty/plib/ssgLoadTexture.cxx trunk/python-ogre/ThirdParty/plib/ssgLoadVRML.h trunk/python-ogre/ThirdParty/plib/ssgLoadVRML1.cxx trunk/python-ogre/ThirdParty/plib/ssgLoadX.cxx trunk/python-ogre/ThirdParty/plib/ssgLoadXPlaneObj.cxx trunk/python-ogre/ThirdParty/plib/ssgLoaderWriterStuff.cxx trunk/python-ogre/ThirdParty/plib/ssgLoaderWriterStuff.h trunk/python-ogre/ThirdParty/plib/ssgLocal.h trunk/python-ogre/ThirdParty/plib/ssgMSFSPalette.h trunk/python-ogre/ThirdParty/plib/ssgOptimiser.cxx trunk/python-ogre/ThirdParty/plib/ssgParser.cxx trunk/python-ogre/ThirdParty/plib/ssgParser.h trunk/python-ogre/ThirdParty/plib/ssgRangeSelector.cxx trunk/python-ogre/ThirdParty/plib/ssgRoot.cxx trunk/python-ogre/ThirdParty/plib/ssgSave3ds.cxx trunk/python-ogre/ThirdParty/plib/ssgSaveAC.cxx trunk/python-ogre/ThirdParty/plib/ssgSaveASC.cxx trunk/python-ogre/ThirdParty/plib/ssgSaveASE.cxx trunk/python-ogre/ThirdParty/plib/ssgSaveATG.cxx trunk/python-ogre/ThirdParty/plib/ssgSaveDXF.cxx trunk/python-ogre/ThirdParty/plib/ssgSaveFLT.cxx trunk/python-ogre/ThirdParty/plib/ssgSaveIV.cxx trunk/python-ogre/ThirdParty/plib/ssgSaveM.cxx trunk/python-ogre/ThirdParty/plib/ssgSaveOBJ.cxx trunk/python-ogre/ThirdParty/plib/ssgSaveOFF.cxx trunk/python-ogre/ThirdParty/plib/ssgSaveQHI.cxx trunk/python-ogre/ThirdParty/plib/ssgSaveTRI.cxx trunk/python-ogre/ThirdParty/plib/ssgSaveVRML1.cxx trunk/python-ogre/ThirdParty/plib/ssgSaveX.cxx trunk/python-ogre/ThirdParty/plib/ssgSelector.cxx trunk/python-ogre/ThirdParty/plib/ssgSimpleList.cxx trunk/python-ogre/ThirdParty/plib/ssgSimpleState.cxx trunk/python-ogre/ThirdParty/plib/ssgState.cxx trunk/python-ogre/ThirdParty/plib/ssgStateSelector.cxx trunk/python-ogre/ThirdParty/plib/ssgStateTables.cxx trunk/python-ogre/ThirdParty/plib/ssgStatistics.cxx trunk/python-ogre/ThirdParty/plib/ssgStats.cxx trunk/python-ogre/ThirdParty/plib/ssgTexTrans.cxx trunk/python-ogre/ThirdParty/plib/ssgTexture.cxx trunk/python-ogre/ThirdParty/plib/ssgTransform.cxx trunk/python-ogre/ThirdParty/plib/ssgTween.cxx trunk/python-ogre/ThirdParty/plib/ssgTweenController.cxx trunk/python-ogre/ThirdParty/plib/ssgVTable.cxx trunk/python-ogre/ThirdParty/plib/ssgVertSplitter.cxx trunk/python-ogre/ThirdParty/plib/ssgVertSplitter.h trunk/python-ogre/ThirdParty/plib/ssgVtxArray.cxx trunk/python-ogre/ThirdParty/plib/ssgVtxTable.cxx trunk/python-ogre/ThirdParty/plib/ssgconf.h trunk/python-ogre/demos/ogreode/media/ trunk/python-ogre/demos/ogreode/media/OgreMeshUpgrade.log trunk/python-ogre/demos/ogreode/media/Terrain01.raw trunk/python-ogre/demos/ogreode/media/Terrain02.raw trunk/python-ogre/demos/ogreode/media/Terrain03.raw trunk/python-ogre/demos/ogreode/media/Terrain04.raw trunk/python-ogre/demos/ogreode/media/Terrain05.raw trunk/python-ogre/demos/ogreode/media/autoterraintexture.cg trunk/python-ogre/demos/ogreode/media/jeep.ogreode trunk/python-ogre/demos/ogreode/media/landscape.cfg trunk/python-ogre/demos/ogreode/media/landscape1.cfg trunk/python-ogre/demos/ogreode/media/landscape2.cfg trunk/python-ogre/demos/ogreode/media/landscape3.cfg trunk/python-ogre/demos/ogreode/media/landscape4.cfg trunk/python-ogre/demos/ogreode/media/landscape5.cfg trunk/python-ogre/demos/ogreode/media/materials/ trunk/python-ogre/demos/ogreode/media/materials/scripts/ trunk/python-ogre/demos/ogreode/media/materials/scripts/apache_body.material trunk/python-ogre/demos/ogreode/media/materials/scripts/autoterraintexture.material trunk/python-ogre/demos/ogreode/media/materials/scripts/ball.material trunk/python-ogre/demos/ogreode/media/materials/scripts/capsule.material trunk/python-ogre/demos/ogreode/media/materials/scripts/crate.material trunk/python-ogre/demos/ogreode/media/materials/scripts/door.material trunk/python-ogre/demos/ogreode/media/materials/scripts/gun.material trunk/python-ogre/demos/ogreode/media/materials/scripts/jeep_body.material trunk/python-ogre/demos/ogreode/media/materials/scripts/jeep_wheell.material trunk/python-ogre/demos/ogreode/media/materials/scripts/jeep_wheelr.material trunk/python-ogre/demos/ogreode/media/materials/scripts/kk3d.material trunk/python-ogre/demos/ogreode/media/materials/scripts/landscape.material trunk/python-ogre/demos/ogreode/media/materials/scripts/main_rotor.material trunk/python-ogre/demos/ogreode/media/materials/scripts/plane.material trunk/python-ogre/demos/ogreode/media/materials/scripts/racingcircuit.material trunk/python-ogre/demos/ogreode/media/materials/scripts/scooby_body.material trunk/python-ogre/demos/ogreode/media/materials/scripts/scooby_wheel.material trunk/python-ogre/demos/ogreode/media/materials/scripts/tail_rotor.material trunk/python-ogre/demos/ogreode/media/materials/scripts/target.material trunk/python-ogre/demos/ogreode/media/materials/scripts/zombie.material trunk/python-ogre/demos/ogreode/media/materials/textures/ trunk/python-ogre/demos/ogreode/media/materials/textures/apache.png trunk/python-ogre/demos/ogreode/media/materials/textures/ball.png trunk/python-ogre/demos/ogreode/media/materials/textures/barrelside.tga trunk/python-ogre/demos/ogreode/media/materials/textures/bigflame.png trunk/python-ogre/demos/ogreode/media/materials/textures/black.png trunk/python-ogre/demos/ogreode/media/materials/textures/capsule.png trunk/python-ogre/demos/ogreode/media/materials/textures/chasis.jpg trunk/python-ogre/demos/ogreode/media/materials/textures/chasis_a.jpg trunk/python-ogre/demos/ogreode/media/materials/textures/concrete.tga trunk/python-ogre/demos/ogreode/media/materials/textures/crate.png trunk/python-ogre/demos/ogreode/media/materials/textures/curb.tga trunk/python-ogre/demos/ogreode/media/materials/textures/desert07_BK.jpg trunk/python-ogre/demos/ogreode/media/materials/textures/desert07_DN.jpg trunk/python-ogre/demos/ogreode/media/materials/textures/desert07_FR.jpg trunk/python-ogre/demos/ogreode/media/materials/textures/desert07_LF.jpg trunk/python-ogre/demos/ogreode/media/materials/textures/desert07_RT.jpg trunk/python-ogre/demos/ogreode/media/materials/textures/desert07_UP.jpg trunk/python-ogre/demos/ogreode/media/materials/textures/devimg1.tga trunk/python-ogre/demos/ogreode/media/materials/textures/door.png trunk/python-ogre/demos/ogreode/media/materials/textures/drpetter1.tga trunk/python-ogre/demos/ogreode/media/materials/textures/explosion.png trunk/python-ogre/demos/ogreode/media/materials/textures/fence.tga trunk/python-ogre/demos/ogreode/media/materials/textures/flare.png trunk/python-ogre/demos/ogreode/media/materials/textures/flaretrail.png trunk/python-ogre/demos/ogreode/media/materials/textures/forest.tga trunk/python-ogre/demos/ogreode/media/materials/textures/grass.jpg trunk/python-ogre/demos/ogreode/media/materials/textures/grass.tga trunk/python-ogre/demos/ogreode/media/materials/textures/gun.jpg trunk/python-ogre/demos/ogreode/media/materials/textures/jeep_terrain.png trunk/python-ogre/demos/ogreode/media/materials/textures/jeep_wheel.jpg trunk/python-ogre/demos/ogreode/media/materials/textures/red_jeep.jpg trunk/python-ogre/demos/ogreode/media/materials/textures/rocks.jpg trunk/python-ogre/demos/ogreode/media/materials/textures/ruedas.jpg trunk/python-ogre/demos/ogreode/media/materials/textures/sand.tga trunk/python-ogre/demos/ogreode/media/materials/textures/skybox_bk.jpg trunk/python-ogre/demos/ogreode/media/materials/textures/skybox_dn.jpg trunk/python-ogre/demos/ogreode/media/materials/textures/skybox_fr.jpg trunk/python-ogre/demos/ogreode/media/materials/textures/skybox_lf.jpg trunk/python-ogre/demos/ogreode/media/materials/textures/skybox_rt.jpg trunk/python-ogre/demos/ogreode/media/materials/textures/skybox_up.jpg trunk/python-ogre/demos/ogreode/media/materials/textures/smoke.png trunk/python-ogre/demos/ogreode/media/materials/textures/soil_wall.jpg trunk/python-ogre/demos/ogreode/media/materials/textures/streak.png trunk/python-ogre/demos/ogreode/media/materials/textures/target.png trunk/python-ogre/demos/ogreode/media/materials/textures/tarmac2.tga trunk/python-ogre/demos/ogreode/media/materials/textures/tarmac2finish.tga trunk/python-ogre/demos/ogreode/media/materials/textures/tarmac2stage.tga trunk/python-ogre/demos/ogreode/media/materials/textures/tiled_floor.jpg trunk/python-ogre/demos/ogreode/media/materials/textures/ventanas.jpg trunk/python-ogre/demos/ogreode/media/materials/textures/zombie.jpg trunk/python-ogre/demos/ogreode/media/models/ trunk/python-ogre/demos/ogreode/media/models/apache_body.mesh trunk/python-ogre/demos/ogreode/media/models/ball.mesh trunk/python-ogre/demos/ogreode/media/models/capsule.mesh trunk/python-ogre/demos/ogreode/media/models/crate.mesh trunk/python-ogre/demos/ogreode/media/models/door.mesh trunk/python-ogre/demos/ogreode/media/models/gun.mesh trunk/python-ogre/demos/ogreode/media/models/jeep_body.mesh trunk/python-ogre/demos/ogreode/media/models/jeep_wheell.mesh trunk/python-ogre/demos/ogreode/media/models/jeep_wheelr.mesh trunk/python-ogre/demos/ogreode/media/models/landscape.mesh trunk/python-ogre/demos/ogreode/media/models/main_rotor.mesh trunk/python-ogre/demos/ogreode/media/models/plane.mesh trunk/python-ogre/demos/ogreode/media/models/racingcircuit.mesh trunk/python-ogre/demos/ogreode/media/models/scooby_body.mesh trunk/python-ogre/demos/ogreode/media/models/scooby_wheell.mesh trunk/python-ogre/demos/ogreode/media/models/scooby_wheelr.mesh trunk/python-ogre/demos/ogreode/media/models/tail_rotor.mesh trunk/python-ogre/demos/ogreode/media/models/zombie_small.mesh trunk/python-ogre/demos/ogreode/media/myExplosion.particle trunk/python-ogre/demos/ogreode/media/ninja.ogreode trunk/python-ogre/demos/ogreode/media/ogreodedemos.overlay trunk/python-ogre/demos/ogreode/media/ogreodedemos.particle trunk/python-ogre/demos/ogreode/media/robot.ogreode trunk/python-ogre/demos/ogreode/media/simplescenes.ogreode trunk/python-ogre/demos/ogreode/media/subaru.ogreode trunk/python-ogre/demos/ogreode/media/zombie.ogreode trunk/python-ogre/demos/ogreode/media/zombie_auto.ogreode trunk/python-ogre/demos/ogreode/media/zombie_small.skeleton trunk/python-ogre/packages_2.5/ogre/addons/plib/ trunk/python-ogre/packages_2.5/ogre/addons/plib/__init__.py trunk/python-ogre/packages_2.5/ogre/gui/navi/ trunk/python-ogre/packages_2.5/ogre/gui/navi/__init__.py Removed Paths: ------------- trunk/python-ogre/ThirdParty/quickgui/QuickGUIEventArgs.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIPrerequisites.h trunk/python-ogre/ThirdParty/quickgui/QuickGUITextCursor.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUITextCursor.h trunk/python-ogre/ThirdParty/quickgui/QuickGUITrackBar.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUITrackBar.h Modified: trunk/python-ogre/PythonOgreConfig_nt.py =================================================================== --- trunk/python-ogre/PythonOgreConfig_nt.py 2007-09-23 14:36:43 UTC (rev 394) +++ trunk/python-ogre/PythonOgreConfig_nt.py 2007-09-28 01:48:44 UTC (rev 395) @@ -109,7 +109,7 @@ PATH_INCLUDE_OgreOdeLoader= os.path.join( PATH_OgreOde,'loader/include') PATH_INCLUDE_FMOD = os.path.join(PATH_FMOD, 'api/inc') PATH_INCLUDE_Ogre_CEGUIRenderer = os.path.join( PATH_Ogre, 'samples/Common/CEGUIRenderer/include') -PATH_INCLUDE_quickgui = os.path.join(PATH_quickgui,'QuickGUI','include') +PATH_INCLUDE_quickgui = PATH_quickgui PATH_INCLUDE_NxOgre= os.path.join(PATH_NxOgre, 'include') PATH_INCLUDE_Bullet= os.path.join(PATH_Bullet, 'src') PATH_INCLUDE_freetype= os.path.join(PATH_INCLUDE_quickgui,'FreeType2.3.5') Added: trunk/python-ogre/ThirdParty/plib/Makefile.am =================================================================== --- trunk/python-ogre/ThirdParty/plib/Makefile.am (rev 0) +++ trunk/python-ogre/ThirdParty/plib/Makefile.am 2007-09-28 01:48:44 UTC (rev 395) @@ -0,0 +1,16 @@ +if BUILD_SG + +lib_LIBRARIES = libplibsg.a + +include_HEADERS = sg.h + +libplibsg_a_SOURCES = sg.cxx sgd.cxx \ + sgIsect.cxx sgdIsect.cxx \ + sgPerlinNoise.cxx + +INCLUDES = -I$(top_srcdir)/src/util + +endif + +EXTRA_DIST = sg.dsp + Added: trunk/python-ogre/ThirdParty/plib/Makefile.in =================================================================== --- trunk/python-ogre/ThirdParty/plib/Makefile.in (rev 0) +++ trunk/python-ogre/ThirdParty/plib/Makefile.in 2007-09-28 01:48:44 UTC (rev 395) @@ -0,0 +1,486 @@ +# Makefile.in generated by automake 1.8.3 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +SOURCES = $(libplibsg_a_SOURCES) + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = ../.. +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +host_triplet = @host@ +subdir = src/sg +DIST_COMMON = $(am__include_HEADERS_DIST) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(mkdir_p) +CONFIG_CLEAN_FILES = +AR = ar +ARFLAGS = cru +am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)" +libLIBRARIES_INSTALL = $(INSTALL_DATA) +LIBRARIES = $(lib_LIBRARIES) +libplibsg_a_AR = $(AR) $(ARFLAGS) +libplibsg_a_LIBADD = +am__libplibsg_a_SOURCES_DIST = sg.cxx sgd.cxx sgIsect.cxx sgdIsect.cxx \ + sgPerlinNoise.cxx +@BUILD_SG_TRUE@am_libplibsg_a_OBJECTS = sg.$(OBJEXT) sgd.$(OBJEXT) \ +@BUILD_SG_TRUE@ sgIsect.$(OBJEXT) sgdIsect.$(OBJEXT) \ +@BUILD_SG_TRUE@ sgPerlinNoise.$(OBJEXT) +libplibsg_a_OBJECTS = $(am_libplibsg_a_OBJECTS) +DEFAULT_INCLUDES = -I. -I$(srcdir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/sg.Po ./$(DEPDIR)/sgIsect.Po \ +@AMDEP_TRUE@ ./$(DEPDIR)/sgPerlinNoise.Po ./$(DEPDIR)/sgd.Po \ +@AMDEP_TRUE@ ./$(DEPDIR)/sgdIsect.Po +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ + -o $@ +SOURCES = $(libplibsg_a_SOURCES) +DIST_SOURCES = $(am__libplibsg_a_SOURCES_DIST) +am__include_HEADERS_DIST = sg.h +includeHEADERS_INSTALL = $(INSTALL_HEADER) +HEADERS = $(include_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BUILD_FNT_FALSE = @BUILD_FNT_FALSE@ +BUILD_FNT_TRUE = @BUILD_FNT_TRUE@ +BUILD_JS_FALSE = @BUILD_JS_FALSE@ +BUILD_JS_TRUE = @BUILD_JS_TRUE@ +BUILD_NET_FALSE = @BUILD_NET_FALSE@ +BUILD_NET_TRUE = @BUILD_NET_TRUE@ +BUILD_PSL_FALSE = @BUILD_PSL_FALSE@ +BUILD_PSL_TRUE = @BUILD_PSL_TRUE@ +BUILD_PUAUX_FALSE = @BUILD_PUAUX_FALSE@ +BUILD_PUAUX_TRUE = @BUILD_PUAUX_TRUE@ +BUILD_PUI_FALSE = @BUILD_PUI_FALSE@ +BUILD_PUI_TRUE = @BUILD_PUI_TRUE@ +BUILD_PW_FALSE = @BUILD_PW_FALSE@ +BUILD_PW_TRUE = @BUILD_PW_TRUE@ +BUILD_SG_FALSE = @BUILD_SG_FALSE@ +BUILD_SG_TRUE = @BUILD_SG_TRUE@ +BUILD_SL_FALSE = @BUILD_SL_FALSE@ +BUILD_SL_TRUE = @BUILD_SL_TRUE@ +BUILD_SSGAUX_FALSE = @BUILD_SSGAUX_FALSE@ +BUILD_SSGAUX_TRUE = @BUILD_SSGAUX_TRUE@ +BUILD_SSG_FALSE = @BUILD_SSG_FALSE@ +BUILD_SSG_TRUE = @BUILD_SSG_TRUE@ +BUILD_UL_FALSE = @BUILD_UL_FALSE@ +BUILD_UL_TRUE = @BUILD_UL_TRUE@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +ac_ct_STRIP = @ac_ct_STRIP@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = @datadir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +@BUILD_SG_TRUE@lib_LIBRARIES = libplibsg.a +@BUILD_SG_TRUE@include_HEADERS = sg.h +@BUILD_SG_TRUE@libplibsg_a_SOURCES = sg.cxx sgd.cxx \ +@BUILD_SG_TRUE@ sgIsect.cxx sgdIsect.cxx \ +@BUILD_SG_TRUE@ sgPerlinNoise.cxx + +@BUILD_SG_TRUE@INCLUDES = -I$(top_srcdir)/src/util +EXTRA_DIST = sg.dsp +all: all-am + +.SUFFIXES: +.SUFFIXES: .cxx .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/sg/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/sg/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +install-libLIBRARIES: $(lib_LIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" + @list='$(lib_LIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " $(libLIBRARIES_INSTALL) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ + $(libLIBRARIES_INSTALL) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ + else :; fi; \ + done + @$(POST_INSTALL) + @list='$(lib_LIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + p="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " $(RANLIB) '$(DESTDIR)$(libdir)/$$p'"; \ + $(RANLIB) "$(DESTDIR)$(libdir)/$$p"; \ + else :; fi; \ + done + +uninstall-libLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LIBRARIES)'; for p in $$list; do \ + p="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " rm -f '$(DESTDIR)$(libdir)/$$p'"; \ + rm -f "$(DESTDIR)$(libdir)/$$p"; \ + done + +clean-libLIBRARIES: + -test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES) +libplibsg.a: $(libplibsg_a_OBJECTS) $(libplibsg_a_DEPENDENCIES) + -rm -f libplibsg.a + $(libplibsg_a_AR) libplibsg.a $(libplibsg_a_OBJECTS) $(libplibsg_a_LIBADD) + $(RANLIB) libplibsg.a + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sg.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sgIsect.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sgPerlinNoise.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sgd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sgdIsect.Po@am__quote@ + +.cxx.o: +@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cxx.obj: +@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ +@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +uninstall-info-am: +install-includeHEADERS: $(include_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)" + @list='$(include_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \ + $(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \ + done + +uninstall-includeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(include_HEADERS)'; for p in $$list; do \ + f="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \ + rm -f "$(DESTDIR)$(includedir)/$$f"; \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(ETAGS_ARGS)$$tags$$unique" \ + || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-includeHEADERS + +install-exec-am: install-libLIBRARIES + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-includeHEADERS uninstall-info-am \ + uninstall-libLIBRARIES + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-exec install-exec-am \ + install-includeHEADERS install-info install-info-am \ + install-libLIBRARIES install-man install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-includeHEADERS uninstall-info-am \ + uninstall-libLIBRARIES + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: Added: trunk/python-ogre/ThirdParty/plib/pcx.h =================================================================== --- trunk/python-ogre/ThirdParty/plib/pcx.h (rev 0) +++ trunk/python-ogre/ThirdParty/plib/pcx.h 2007-09-28 01:48:44 UTC (rev 395) @@ -0,0 +1,86 @@ +// Loading of the PCX texture file format +// +// This file is used for both PLIB and for BoB. +// +// Written by Wolfram Kuss in december 2003 +// +// This file is published as public domain + + +struct pcxHeaderType + { + char manufacturer; // always 10 + char version; // usually 5 + char encoding; // 1 = RLE + char bitsPerPixel; // number of bits to represent a pixel + short x, y; // upper left coordinates + short xmax, ymax; + short hDPI, vDPI; // DPI + char egaPalette[48]; // obsolete + char reserved; // unused, always 0 + char nColorPlanes; // number of color planes. not implemented yet? + short bytesPerLine; // bytes per scan line. not implemented yet? todo kludge + short paletteInfo; // colored or grey scale. not implemented yet? + short hScreenSize, cScreenSize; + char padding[54]; // reserved, always 0 + }; + + +#define READ_BYTE (buffer[0]); buffer++; +#define READ_SHORT ((((unsigned long)buffer[0])<<8) + buffer[1]); buffer += 2; +#define READ_LONG ((((unsigned long)buffer[0])<<24) + (((unsigned long)buffer[1])<<16) + (((unsigned long)buffer[2])<<8) + buffer[3]); buffer += 4; + + +// It is bad style to have a function inside a header file, but this way there is only one file +// I need to "synchronise" between PLIB and BoB. + +static int ReadPCXBody(UByte*& buffer, pcxHeaderType *ppcxHeader, UByte * pBody) +// returns TRUE on success. +// reads from buffer (which will normally just hold the file contents, but in memory, +// writes to pBody, which must have been allocated +{ + unsigned short x,y; + + if ((ppcxHeader->bitsPerPixel != 8) // unsupported pcx + || (ppcxHeader->encoding>1) // invalid PCX + // || (pcxHeader.nColorPlanes != 1) // unsupported pcx + || (ppcxHeader->manufacturer != 10)) // invalid pcx + return (FALSE); + + unsigned short width = ppcxHeader->xmax-ppcxHeader->x+1; + + x=0; y=0; // upper left coordinates + for(;;) + { + UByte color = READ_BYTE; + if ((color &0xC0) != 0xC0) // uncompressed? + { + *pBody++ = color; + x++; + if (x >= width) + { x=0; y++; // next line + if(y > ppcxHeader->ymax-ppcxHeader->y) + break; + } + } + else + { + UByte counter, length = color & 0x3F; // number of times next byte repeated + color = READ_BYTE; + for (counter=0; counter<length; counter++) + { + *pBody++ = color; + x++; + if (x >= width) + { x=0; y++; // next line + counter=length; + if(y > ppcxHeader->ymax-ppcxHeader->y) + break; // breaks for (counter=0; counte... + } + } + if(y > ppcxHeader->ymax-ppcxHeader->y) + break; // breaks for(;;) + } + } + return TRUE; +} Added: trunk/python-ogre/ThirdParty/plib/sg.cxx =================================================================== --- trunk/python-ogre/ThirdParty/plib/sg.cxx (rev 0) +++ trunk/python-ogre/ThirdParty/plib/sg.cxx 2007-09-28 01:48:44 UTC (rev 395) @@ -0,0 +1,2063 @@ +/* + PLIB - A Suite of Portable Game Libraries + Copyright (C) 1998,2002 Steve Baker + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library 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 GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + For further information visit http://plib.sourceforge.net + + $Id: sg.cxx,v 1.44 2004/08/05 01:07:09 puggles Exp $ +*/ + + +#include "sg.h" + +sgVec3 _sgGravity = { 0.0f, 0.0f, -9.8f } ; + +void sgVectorProductVec3 ( sgVec3 dst, const sgVec3 a, const sgVec3 b ) +{ + dst[0] = a[1] * b[2] - a[2] * b[1] ; + dst[1] = a[2] * b[0] - a[0] * b[2] ; + dst[2] = a[0] * b[1] - a[1] * b[0] ; +} + +inline SGfloat _sgClampToUnity ( const SGfloat x ) +{ + if ( x > SG_ONE ) return SG_ONE ; + if ( x < -SG_ONE ) return -SG_ONE ; + return x ; +} + +int sgCompare3DSqdDist( const sgVec3 v1, const sgVec3 v2, const SGfloat sqd_dist ) +{ + sgVec3 tmp ; + + sgSubVec3 ( tmp, v2, v1 ) ; + + SGfloat sqdist = tmp[0] * tmp[0] + tmp[1] * tmp[1] + tmp[2] * tmp[2] ; + + if ( sqdist > sqd_dist ) return 1 ; + if ( sqdist < sqd_dist ) return -1 ; + return 0 ; +} + +void sgMakeRotMat4( sgMat4 mat, const SGfloat angle, const sgVec3 axis ) +{ + sgVec3 ax ; + sgNormalizeVec3 ( ax, axis ) ; + + SGfloat temp_angle = angle * SG_DEGREES_TO_RADIANS ; + SGfloat s = (SGfloat) sin ( temp_angle ) ; + SGfloat c = (SGfloat) cos ( temp_angle ) ; + SGfloat t = SG_ONE - c ; + + mat[0][0] = t * ax[0] * ax[0] + c ; + mat[0][1] = t * ax[0] * ax[1] + s * ax[2] ; + mat[0][2] = t * ax[0] * ax[2] - s * ax[1] ; + mat[0][3] = SG_ZERO ; + + mat[1][0] = t * ax[1] * ax[0] - s * ax[2] ; + mat[1][1] = t * ax[1] * ax[1] + c ; + mat[1][2] = t * ax[1] * ax[2] + s * ax[0] ; + mat[1][3] = SG_ZERO ; + + mat[2][0] = t * ax[2] * ax[0] + s * ax[1] ; + mat[2][1] = t * ax[2] * ax[1] - s * ax[0] ; + mat[2][2] = t * ax[2] * ax[2] + c ; + mat[2][3] = SG_ZERO ; + + mat[3][0] = SG_ZERO ; + mat[3][1] = SG_ZERO ; + mat[3][2] = SG_ZERO ; + mat[3][3] = SG_ONE ; +} + + + + +void sgMakePickMatrix( sgMat4 mat, sgFloat x, sgFloat y, + sgFloat width, sgFloat height, sgVec4 viewport ) +{ + sgFloat sx = viewport[2] / width ; + sgFloat sy = viewport[3] / height ; + sgFloat tx = ( viewport[2] + SG_TWO * (viewport[0] - x) ) / width ; + sgFloat ty = ( viewport[3] + SG_TWO * (viewport[1] - y) ) / height ; + + mat[0][0] = sx ; + mat[0][1] = SG_ZERO ; + mat[0][2] = SG_ZERO ; + mat[0][3] = SG_ZERO ; + + mat[1][0] = SG_ZERO ; + mat[1][1] = sy ; + mat[1][2] = SG_ZERO ; + mat[1][3] = SG_ZERO ; + + mat[2][0] = SG_ZERO ; + mat[2][1] = SG_ZERO ; + mat[2][2] = SG_ONE ; + mat[2][3] = SG_ZERO ; + + mat[3][0] = tx ; + mat[3][1] = ty ; + mat[3][2] = SG_ZERO ; + mat[3][3] = SG_ONE ; +} + + + +void sgMakeLookAtMat4 ( sgMat4 dst, const sgVec3 eye, + const sgVec3 center, + const sgVec3 up ) +{ + // Caveats: + // 1) In order to compute the line of sight, the eye point must not be equal + // to the center point. + // 2) The up vector must not be parallel to the line of sight from the eye + // to the center point. + + /* Compute the direction vectors */ + sgVec3 x,y,z; + + /* Y vector = center - eye */ + sgSubVec3 ( y, center, eye ) ; + + /* Z vector = up */ + sgCopyVec3 ( z, up ) ; + + /* X vector = Y cross Z */ + sgVectorProductVec3 ( x, y, z ) ; + + /* Recompute Z = X cross Y */ + sgVectorProductVec3 ( z, x, y ) ; + + /* Normalize everything */ + sgNormaliseVec3 ( x ) ; + sgNormaliseVec3 ( y ) ; + sgNormaliseVec3 ( z ) ; + + /* Build the matrix */ + sgSetVec4 ( dst[0], x[0], x[1], x[2], SG_ZERO ) ; + sgSetVec4 ( dst[1], y[0], y[1], y[2], SG_ZERO ) ; + sgSetVec4 ( dst[2], z[0], z[1], z[2], SG_ZERO ) ; + sgSetVec4 ( dst[3], eye[0], eye[1], eye[2], SG_ONE ) ; +} + +// -dw- inconsistent linkage! + +float sgTriArea( sgVec3 p0, sgVec3 p1, sgVec3 p2 ) +{ + /* + From comp.graph.algorithms FAQ + + 2A(P) = abs(N.(sum_{i=0}^{n-1}(v_i x v_{i+1}))) + This is an optimized version for a triangle + but easily extended for planar polygon's with more sides + by passing in the number of sides and the vv array + sgTriArea( int nsides, float **vv ) + and changing the normal calculation and the for loop appropriately + sgMakeNormal( norm, vv[0], vv[1], vv[2] ) + for( int i=0; i<n; i++ ) + */ + + sgVec3 sum; + sgZeroVec3( sum ); + + sgVec3 norm; + sgMakeNormal( norm, p0, p1, p2 ); + + float *vv[3]; + vv[0] = p0; + vv[1] = p1; + vv[2] = p2; + + for( int i=0; i<3; i++ ) + { + int ii = (i+1) % 3; + + sum[0] += (vv[i][1] * vv[ii][2] - vv[i][2] * vv[ii][1]) ; + sum[1] += (vv[i][2] * vv[ii][0] - vv[i][0] * vv[ii][2]) ; + sum[2] += (vv[i][0] * vv[ii][1] - vv[i][1] * vv[ii][0]) ; + } + + float area = sgAbs ( sgScalarProductVec3 ( norm, sum ) ) ; + + return area / 2.0f ; +} + +/***************************************************\ +* functions to get the angle between two vectors * +\***************************************************/ + +SGfloat sgAngleBetweenVec3 ( sgVec3 v1, sgVec3 v2 ) +{ + sgVec3 nv1, nv2 ; + + sgNormalizeVec3 ( nv1, v1 ) ; + sgNormalizeVec3 ( nv2, v2 ) ; + return sgAngleBetweenNormalizedVec3 ( nv1, nv2 ) ; +} + +SGfloat sgAngleBetweenNormalizedVec3 (sgVec3 first, sgVec3 second, sgVec3 normal) +{ + // result is in the range 0..360 degrees + // + // Attention: first and second have to be normalized + // the normal is needed to decide between for example 0.123 + // looking "from one side" and -0.123 looking fomr the other + + SGfloat myCos, abs1, abs2, SProduct, deltaAngle, myNorm; + + if((normal[0]==0) && (normal[1]==0) && (normal[2]==0)) + { + ulSetError ( UL_WARNING, "sgGetAngleBetweenVectors: Normal is zero."); + return 0.0 ; + } + + sgVec3 temp; + + sgVectorProductVec3( temp, first, second); + + myNorm = sgLengthVec3 ( temp ); + + if ( (sgScalarProductVec3(temp, normal))<0 ) + myNorm = -myNorm; + + if ( myNorm < -0.99999 ) + deltaAngle = -SG_PI*0.5; + else + if ( myNorm > 0.99999 ) + deltaAngle = SG_PI*0.5; + else + deltaAngle = (SGfloat)asin((double)myNorm); + + // deltaAngle is in the range -SG_PI*0.5 to +SG_PI*0.5 here + // However, the correct result could also be + // deltaAngleS := pi - deltaAngle + // Please note that: + // cos(deltaAngleS)=cos(pi-deltaAngle)=-cos(deltaAngle) + // So, the question is whether + or - cos(deltaAngle) + // is sgScalarProductVec3(first, second) + + if ( deltaAngle < 0 ) + deltaAngle = deltaAngle + 2*SG_PI; // unnessecary? + + SProduct = sgScalarProductVec3(first, second); + myCos = (SGfloat) cos(deltaAngle); + + abs1 = SProduct - myCos; + abs2 = SProduct + myCos; + + if ( abs1 < 0 ) abs1 = -abs1 ; + if ( abs2 < 0 ) abs2 = -abs2 ; + + assert( (abs1 < 0.1) || (abs2 < 0.1) ) ; + + if ( abs2 < abs1 ) + { + // deltaAngleS is the correct result + + if ( deltaAngle <= SG_PI ) + deltaAngle = SG_PI - deltaAngle ; + else + deltaAngle = 3*SG_PI - deltaAngle ; + } + + assert ( deltaAngle >= 0.0 ) ; + assert ( deltaAngle <= 2.0*SG_PI ) ; + + return deltaAngle * SG_RADIANS_TO_DEGREES ; +} + + +SGfloat sgAngleBetweenVec3 ( sgVec3 v1, sgVec3 v2, sgVec3 normal ) +{ + // nornmal has to be normalized. + sgVec3 nv1, nv2 ; + + sgNormalizeVec3 ( nv1, v1 ) ; + sgNormalizeVec3 ( nv2, v2 ) ; + return sgAngleBetweenNormalizedVec3 ( nv1, nv2, normal ) ; +} + + +/*********************\ +* sgBox routines * +\*********************/ + + +void sgBox::extend ( const sgVec3 v ) +{ + if ( isEmpty () ) + { + sgCopyVec3 ( min, v ) ; + sgCopyVec3 ( max, v ) ; + } + else + { + if ( v[0] < min[0] ) min[0] = v[0] ; + if ( v[1] < min[1] ) min[1] = v[1] ; + if ( v[2] < min[2] ) min[2] = v[2] ; + if ( v[0] > max[0] ) max[0] = v[0] ; + if ( v[1] > max[1] ) max[1] = v[1] ; + if ( v[2] > max[2] ) max[2] = v[2] ; + } +} + + +void sgBox::extend ( const sgBox *b ) +{ + if ( b -> isEmpty () ) + return ; + + if ( isEmpty () ) + { + sgCopyVec3 ( min, b->getMin() ) ; + sgCopyVec3 ( max, b->getMax() ) ; + } + else + { + extend ( b->getMin() ) ; + extend ( b->getMax() ) ; + } +} + + +void sgBox::extend ( const sgSphere *s ) +{ + if ( s -> isEmpty () ) + return ; + + /* + In essence, this extends around a box around the sphere - which + is still a perfect solution because both boxes are axially aligned. + */ + + sgVec3 x ; + + sgSetVec3 ( x, s->getCenter()[0]+s->getRadius(), + s->getCenter()[1]+s->getRadius(), + s->getCenter()[2]+s->getRadius() ) ; + extend ( x ) ; + + sgSetVec3 ( x, s->getCenter()[0]-s->getRadius(), + s->getCenter()[1]-s->getRadius(), + s->getCenter()[2]-s->getRadius() ) ; + extend ( x ) ; +} + + +int sgBox::intersects ( const sgVec4 plane ) const +{ + /* + Save multiplies by not redoing Ax+By+Cz+D for each point. + */ + + SGfloat Ax_min = plane[0] * min[0] ; + SGfloat By_min = plane[1] * min[1] ; + SGfloat Cz_min_plus_D = plane[2] * min[2] + plane[3] ; + + SGfloat Ax_max = plane[0] * max[0] ; + SGfloat By_max = plane[1] * max[1] ; + SGfloat Cz_max_plus_D = plane[2] * max[2] + plane[3] ; + + /* + Count the number of vertices on the positive side of the plane. + */ + + int count = ( Ax_min + By_min + Cz_min_plus_D > SG_ZERO ) + + ( Ax_min + By_min + Cz_max_plus_D > SG_ZERO ) + + ( Ax_min + By_max + Cz_min_plus_D > SG_ZERO ) + + ( Ax_min + By_max + Cz_max_plus_D > SG_ZERO ) + + ( Ax_max + By_min + Cz_min_plus_D > SG_ZERO ) + + ( Ax_max + By_min + Cz_max_plus_D > SG_ZERO ) + + ( Ax_max + By_max + Cz_min_plus_D > SG_ZERO ) + + ( Ax_max + By_max + Cz_max_plus_D > SG_ZERO ) ; + + /* + The plane intersects the box unless all 8 are positive + or none of them are positive. + */ + + return count != 0 && count != 8 ; +} + + + +/**********************\ +* sgSphere routines * +\**********************/ + +void sgSphere::extend ( const sgVec3 v ) +{ + if ( isEmpty () ) + { + sgCopyVec3 ( center, v ) ; + radius = SG_ZERO ; + return ; + } + + SGfloat d = sgDistanceVec3 ( center, v ) ; + + if ( d <= radius ) /* Point is already inside sphere */ + return ; + + SGfloat new_radius = (radius + d) / SG_TWO ; /* Grow radius */ + + SGfloat ratio = (new_radius - radius) / d ; + + center[0] += (v[0]-center[0]) * ratio ; /* Move center */ + center[1] += (v[1]-center[1]) * ratio ; + center[2] += (v[2]-center[2]) * ratio ; + + radius = new_radius ; +} + + +void sgSphere::extend ( const sgBox *b ) +{ + if ( b -> isEmpty () ) + return ; + + if ( isEmpty() ) + { + sgAddVec3 ( center, b->getMin(), b->getMax() ) ; + sgScaleVec3 ( center, SG_HALF ) ; + radius = sgDistanceVec3 ( center, b->getMax() ) ; + return ; + } + + /* + I can't think of a faster way to get an + utterly minimal sphere. + + The tighter algorithm:- enclose each + of eight vertices of the box in turn - it + looks like being pretty costly. + [8 sqrt()'s] + + The looser algorithm:- enclose the box + with an empty sphere and then do a + sphere-extend-sphere. This algorithm + does well for close-to-cube boxes, but + makes very poor spheres for long, thin + boxes. + [2 sqrt()'s] + */ + +#ifdef DONT_REALLY_NEED_A_TIGHT_SPHERE_EXTEND_BOX + + /* LOOSER/FASTER sphere-around-sphere-around-box */ + sgSphere s ; + s.empty () ; + s.enclose ( b ) ; /* Fast because s is empty */ + enclose ( s ) ; + +#else + + /* TIGHTER/EXPENSIVE sphere-around-eight-points */ + sgVec3 x ; + extend ( b->getMin() ) ; + sgSetVec3 ( x, b->getMin()[0],b->getMin()[1],b->getMax()[2] ) ; extend ( x ) ; + sgSetVec3 ( x, b->getMin()[0],b->getMax()[1],b->getMin()[2] ) ; extend ( x ) ; + sgSetVec3 ( x, b->getMin()[0],b->getMax()[1],b->getMax()[2] ) ; extend ( x ) ; + sgSetVec3 ( x, b->getMax()[0],b->getMin()[1],b->getMin()[2] ) ; extend ( x ) ; + sgSetVec3 ( x, b->getMax()[0],b->getMin()[1],b->getMax()[2] ) ; extend ( x ) ; + sgSetVec3 ( x, b->getMax()[0],b->getMax()[1],b->getMin()[2] ) ; extend ( x ) ; + extend ( b->getMax() ) ; +#endif +} + + +void sgSphere::extend ( const sgSphere *s ) +{ + if ( s->isEmpty () ) + return ; + + if ( isEmpty () ) + { + sgCopyVec3 ( center, s->getCenter() ) ; + radius = s->getRadius() ; + return ; + } + + /* + d == The distance between the sphere centers + */ + + SGfloat d = sgDistanceVec3 ( center, s->getCenter() ) ; + + if ( d + s->getRadius() <= radius ) /* New sphere is already inside this one */ + return ; + + if ( d + radius <= s->getRadius() ) /* New sphere completely contains this one */ + { + sgCopyVec3 ( center, s->getCenter() ) ; + radius = s->getRadius() ; + return ; + } + + /* + Build a new sphere that completely contains the other two: + + The center point lies halfway along the line between + the furthest points on the edges of the two spheres. + Computing those two points is ugly - so we'll use similar + triangles + */ + + SGfloat new_radius = (radius + d + s->getRadius() ) / SG_TWO ; + + SGfloat ratio = ( new_radius - radius ) / d ; + + center[0] += ( s->getCenter()[0] - center[0] ) * ratio ; + center[1] += ( s->getCenter()[1] - center[1] ) * ratio ; + center[2] += ( s->getCenter()[2] - center[2] ) * ratio ; + radius = new_radius ; +} + + +int sgSphere::intersects ( const sgBox *b ) const +{ + sgVec3 closest ; + + if ( b->getMin()[0] > center[0] ) closest[0] = b->getMin()[0] ; else + if ( b->getMax()[0] < center[0] ) closest[0] = b->getMax()[0] ; else + closest[0] = center[0] ; + + if ( b->getMin()[1] > center[1] ) closest[1] = b->getMin()[1] ; else + if ( b->getMax()[1] < center[1] ) closest[1] = b->getMax()[1] ; else + closest[1] = center[1] ; + + if ( b->getMin()[2] > center[2] ) closest[2] = b->getMin()[2] ; else + if ( b->getMax()[2] < center[2] ) closest[2] = b->getMax()[2] ; else + closest[2] = center[2] ; + + return sgCompare3DSqdDist ( closest, center, sgSquare ( radius ) ) <= 0 ; +} + + +/************************\ +* sgFrustum routines * +\************************/ + +void sgFrustum::update () +{ + if ( fabs ( ffar - nnear ) < 0.1 ) + { + ulSetError ( UL_WARNING, "sgFrustum: Can't support depth of view <0.1 units."); + return ; + } + + if ( hfov != SG_ZERO && vfov != SG_ZERO ) + { + if ( fabs ( hfov ) < 0.1 || fabs ( vfov ) < 0.1 ) + { + ulSetError ( UL_WARNING, ortho ? + "sgFrustum: Can't support width or height <0.1 units." : + "sgFrustum: Can't support fields of view narrower than 0.1 degrees." ) ; + return ; + } + + if ( ortho ) + { + right = SG_HALF * hfov ; + top = SG_HALF * vfov ; + } + else + { + right = nnear * (SGfloat) tan ( hfov * SG_DEGREES_TO_RADIANS / SG_TWO ) ; + top = nnear * (SGfloat) tan ( vfov * SG_DEGREES_TO_RADIANS / SG_TWO ) ; + } + + left = -right ; + bot = -top ; + } + + + /* Compute the projection matrix */ + + SGfloat width = right - left ; + SGfloat height = top - bot ; + SGfloat depth = ffar - nnear ; + + if ( ortho ) + { + /* orthographic */ + + mat[0][0] = SG_TWO / width ; + mat[0][1] = SG_ZERO ; + mat[0][2] = SG_ZERO ; + mat[0][3] = SG_ZERO ; + + mat[1][0] = SG_ZERO ; + mat[1][1] = SG_TWO / height ; + mat[1][2] = SG_ZERO ; + mat[1][3] = SG_ZERO ; + + mat[2][0] = SG_ZERO ; + mat[2][1] = SG_ZERO ; + mat[2][2] = -SG_TWO / depth ; + mat[2][3] = SG_ZERO ; + + mat[3][0] = -( left + right ) / width ; + mat[3][1] = -( bot + top ) / height ; + mat[3][2] = -( nnear + ffar ) / depth ; + mat[3][3] = SG_ONE ; + } + else + { + /* perspective */ + + mat[0][0] = SG_TWO * nnear / width ; + mat[0][1] = SG_ZERO ; + mat[0][2] = SG_ZERO ; + mat[0][3] = SG_ZERO ; + + mat[1][0] = SG_ZERO ; + mat[1][1] = SG_TWO * nnear / height ; + mat[1][2] = SG_ZERO ; + mat[1][3] = SG_ZERO ; + + mat[2][0] = ( right + left ) / width ; + mat[2][1] = ( top + bot ) / height ; + mat[2][2] = -( ffar + nnear ) / depth ; + mat[2][3] = -SG_ONE ; + + mat[3][0] = SG_ZERO ; + mat[3][1] = SG_ZERO ; + mat[3][2] = -SG_TWO * nnear * ffar / depth ; + mat[3][3] = SG_ZERO ; + } + + + /* + * The clip planes are derived from the projection matrix. + * + * After projection (in clip coordinates), the clip planes are simply: + * + * left: ( 1, 0, 0, 1 ) + * right: ( -1, 0, 0, 1 ) + * bottom: ( 0, 1, 0, 1 ) + * top: ( 0, -1, 0, 1 ) + * near: ( 0, 0, 1, 1 ) + * far: ( 0, 0, -1, 1 ) + * + * These can easily be transformed *backwards* by + * multiplying by the transposed projection matrix, i.e: + * + * ( A ) ( A') + * ( B ) = mat^T ( B') + * ( C ) ( C') + * ( D ) ( D') + * + * where (A',B',C',D') represents a plane in clip coordinates, + * and (A,B,C,D) is the same plane expressed in eye coordinates. + */ + + sgSetVec4( plane[ SG_LEFT_PLANE ], SG_ONE, SG_ZERO, SG_ZERO, SG_ONE ); + sgSetVec4( plane[ SG_RIGHT_PLANE ], -SG_ONE, SG_ZERO, SG_ZERO, SG_ONE ); + sgSetVec4( plane[ SG_BOT_PLANE ], SG_ZERO, SG_ONE, SG_ZERO, SG_ONE ); + sgSetVec4( plane[ SG_TOP_PLANE ], SG_ZERO, -SG_ONE, SG_ZERO, SG_ONE ); + sgSetVec4( plane[ SG_NEAR_PLANE ], SG_ZERO, SG_ZERO, SG_ONE, SG_ONE ); + sgSetVec4( plane[ SG_FAR_PLANE ], SG_ZERO, SG_ZERO, -SG_ONE, SG_ONE ); + + for ( int i = 0 ; i < 6 ; i++ ) + { + sgVec4 tmp ; + + for ( int j = 0 ; j < 4 ; j++ ) + tmp[j] = sgScalarProductVec4 ( plane[i], mat[j] ) ; + + sgScaleVec4 ( plane[i], tmp, SG_ONE / sgLengthVec3 ( tmp ) ) ; + } +} + + + +#define OC_LEFT_SHIFT 0 +#define OC_RIGHT_SHIFT 1 +#define OC_TOP_SHIFT 2 +#define OC_BOT_SHIFT 3 +#define OC_NEAR_SHIFT 4 +#define OC_FAR_SHIFT 5 + +#define OC_ALL_ON_SCREEN 0x3F +#define OC_OFF_TRF ((1<<OC_TOP_SHIFT)|(1<<OC_RIGHT_SHIFT)|(1<<OC_FAR_SHIFT)) +#define OC_OFF_BLN ((1<<OC_BOT_SHIFT)|(1<<OC_LEFT_SHIFT)|(1<<OC_NEAR_SHIFT)) + +int sgFrustum::getOutcode ( const sgVec3 pt ) const +{ + /* Transform the point by the Frustum's transform. */ + + sgVec4 tmp ; + + tmp [ 0 ] = pt [ 0 ] ; + tmp [ 1 ] = pt [ 1 ] ; + tmp [ 2 ] = pt [ 2 ] ; + tmp [ 3 ] = SG_ONE ; + + sgXformPnt4 ( tmp, tmp, mat ) ; + + /* + No need to divide by the 'w' component since we are only checking for + results in the range 0..1 + */ + + return (( tmp[0] <= tmp[3] ) << OC_RIGHT_SHIFT ) | + (( tmp[0] >= -tmp[3] ) << OC_LEFT_SHIFT ) | + (( tmp[1] <= tmp[3] ) << OC_TOP_SHIFT ) | + (( tmp[1] >= -tmp[3] ) << OC_BOT_SHIFT ) | + (( tmp[2] <= tmp[3] ) << OC_FAR_SHIFT ) | + (( tmp[2] >= -tmp[3] ) << OC_NEAR_SHIFT ) ; +} + +int sgFrustum::contains ( const sgVec3 pt ) const +{ + return getOutcode ( pt ) == OC_ALL_ON_SCREEN ; +} + + +int sgFrustum::contains ( const sgSphere *s ) const +{ + + const SGfloat *center = s->getCenter() ; + const SGfloat radius = s->getRadius() ; + + /* + Lop off half the database (roughly) with a quick near-plane test - and + lop off a lot more with a quick far-plane test + */ + + if ( -center[2] + radius < nnear || -center[2] - radius > ffar ) + return SG_OUTSIDE ; + + /* + OK, so the sphere lies between near and far. + + Measure the distance of the center point from the four sides of the frustum, + if it's outside by more than the radius then it's history. + + It's tempting to do a quick test to see if the center point is + onscreen using sgFrustumContainsPt - but that takes a matrix transform + which is 16 multiplies and 12 adds - versus this test which does the + whole task using only 12 multiplies and 8 adds. + */ + + /* + A few operations are saved by observing that certain values in the plane + equations are zero or one. These are specific to orthographic and perspective + projections respectively. + */ + + SGfloat sp1, sp2, sp3, sp4 ; + + if ( ortho ) + { + /* + left: ( 1, 0, 0, x ) + right: ( -1, 0, 0, x ) + bottom: ( 0, 1, 0, x ) + top: ( 0, -1, 0, x ) + */ + sp1 = plane[ SG_LEFT_PLANE ][3] + center[0] ; + sp2 = plane[ SG_RIGHT_PLANE ][3] - center[0] ; + sp3 = plane[ SG_BOT_PLANE ][3] + center[1] ; + sp4 = plane[ SG_TOP_PLANE ][3] - center[1] ; + } + else + { + /* + left: ( x, 0, x, 0 ) + right: ( x, 0, x, 0 ) + bottom: ( 0, x, x, 0 ) + top: ( 0, x, x, 0 ) + */ + sp1 = plane[ SG_LEFT_PLANE ][0] * center[0] + plane[ SG_LEFT_PLANE ][2] * center[2] ; + sp2 = plane[ SG_RIGHT_PLANE ][0] * center[0] + plane[ SG_RIGHT_PLANE ][2] * center[2] ; + sp3 = plane[ SG_BOT_PLANE ][1] * center[1] + plane[ SG_BOT_PLANE ][2] * center[2] ; + sp4 = plane[ SG_TOP_PLANE ][1] * center[1] + plane[ SG_TOP_PLANE ][2] * center[2] ; + } + + /* + Note: in the general case, we would have to do: + + sp1 = sgScalarProductVec3 ( left_plane, center ) + left_plane[3] ; + sp2 = sgScalarProductVec3 ( right_plane, center ) + right_plane[3] ; + ... + sp6 = sgScalarProductVec3 ( far_plane, center ) + far_plane[3] ; + */ + + + if ( -sp1 > radius || -sp2 > radius || -sp3 > radius || -sp4 > radius ) + return SG_OUTSIDE ; + + /* + If it's inside by more than the radius then it's *completely* inside + and we can save time elsewhere if we know that for sure. + */ + + if ( sp1 >= radius && sp2 >= radius && sp3 >= r... [truncated message content] |
From: <and...@us...> - 2007-09-28 15:31:43
|
Revision: 398 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=398&view=rev Author: andy_miller Date: 2007-09-28 08:31:47 -0700 (Fri, 28 Sep 2007) Log Message: ----------- Updates for plib to save files correctly under windows (file open with "w" instead of "wa") Removed a couple of problem functions under linux compile Updated to latest quickgui SVN 162 Modified Paths: -------------- trunk/python-ogre/ThirdParty/plib/ssgSaveAC.cxx trunk/python-ogre/ThirdParty/plib/ssgSaveASC.cxx trunk/python-ogre/ThirdParty/plib/ssgSaveASE.cxx trunk/python-ogre/ThirdParty/plib/ssgSaveDXF.cxx trunk/python-ogre/ThirdParty/plib/ssgSaveOBJ.cxx trunk/python-ogre/ThirdParty/plib/ssgSaveTRI.cxx trunk/python-ogre/ThirdParty/quickgui/QuickGUIButton.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIButton.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIComboBox.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIComboBox.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIHorizontalScrollBar.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIHorizontalScrollBar.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIHorizontalTrackBar.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIHorizontalTrackBar.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIImage.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIImage.h trunk/python-ogre/ThirdParty/quickgui/QuickGUILabel.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUILabel.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIList.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIList.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIListItem.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIListItem.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIManager.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIManager.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIMenu.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIMenu.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIMenuList.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIMenuList.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIMouseCursor.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIMouseCursor.h trunk/python-ogre/ThirdParty/quickgui/QuickGUINStateButton.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUINStateButton.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIPanel.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIPanel.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIPoint.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIProgressBar.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIProgressBar.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIQuad.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIQuad.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIRect.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIRect.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIScrollPane.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIScrollPane.h trunk/python-ogre/ThirdParty/quickgui/QuickGUISheet.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUISheet.h trunk/python-ogre/ThirdParty/quickgui/QuickGUISize.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIText.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIText.h trunk/python-ogre/ThirdParty/quickgui/QuickGUITextBox.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUITextBox.h trunk/python-ogre/ThirdParty/quickgui/QuickGUITitleBar.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUITitleBar.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIVerticalScrollBar.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIVerticalScrollBar.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIVerticalTrackBar.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIVerticalTrackBar.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIWidget.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIWidget.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIWindow.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIWindow.h trunk/python-ogre/code_generators/plib/generate_code.py trunk/python-ogre/code_generators/plib/hand_made_wrappers.py Removed Paths: ------------- trunk/python-ogre/ThirdParty/plib/Makefile.am trunk/python-ogre/ThirdParty/plib/Makefile.in trunk/python-ogre/ThirdParty/plib/sg.vcproj.JNPR.amiller.user trunk/python-ogre/ThirdParty/plib/ssg.vcproj.JNPR.amiller.user Deleted: trunk/python-ogre/ThirdParty/plib/Makefile.am =================================================================== --- trunk/python-ogre/ThirdParty/plib/Makefile.am 2007-09-28 14:52:54 UTC (rev 397) +++ trunk/python-ogre/ThirdParty/plib/Makefile.am 2007-09-28 15:31:47 UTC (rev 398) @@ -1,16 +0,0 @@ -if BUILD_SG - -lib_LIBRARIES = libplibsg.a - -include_HEADERS = sg.h - -libplibsg_a_SOURCES = sg.cxx sgd.cxx \ - sgIsect.cxx sgdIsect.cxx \ - sgPerlinNoise.cxx - -INCLUDES = -I$(top_srcdir)/src/util - -endif - -EXTRA_DIST = sg.dsp - Deleted: trunk/python-ogre/ThirdParty/plib/Makefile.in =================================================================== --- trunk/python-ogre/ThirdParty/plib/Makefile.in 2007-09-28 14:52:54 UTC (rev 397) +++ trunk/python-ogre/ThirdParty/plib/Makefile.in 2007-09-28 15:31:47 UTC (rev 398) @@ -1,486 +0,0 @@ -# Makefile.in generated by automake 1.8.3 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - - -SOURCES = $(libplibsg_a_SOURCES) - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../.. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -host_triplet = @host@ -subdir = src/sg -DIST_COMMON = $(am__include_HEADERS_DIST) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(mkdir_p) -CONFIG_CLEAN_FILES = -AR = ar -ARFLAGS = cru -am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)" -libLIBRARIES_INSTALL = $(INSTALL_DATA) -LIBRARIES = $(lib_LIBRARIES) -libplibsg_a_AR = $(AR) $(ARFLAGS) -libplibsg_a_LIBADD = -am__libplibsg_a_SOURCES_DIST = sg.cxx sgd.cxx sgIsect.cxx sgdIsect.cxx \ - sgPerlinNoise.cxx -@BUILD_SG_TRUE@am_libplibsg_a_OBJECTS = sg.$(OBJEXT) sgd.$(OBJEXT) \ -@BUILD_SG_TRUE@ sgIsect.$(OBJEXT) sgdIsect.$(OBJEXT) \ -@BUILD_SG_TRUE@ sgPerlinNoise.$(OBJEXT) -libplibsg_a_OBJECTS = $(am_libplibsg_a_OBJECTS) -DEFAULT_INCLUDES = -I. -I$(srcdir) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/sg.Po ./$(DEPDIR)/sgIsect.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/sgPerlinNoise.Po ./$(DEPDIR)/sgd.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/sgdIsect.Po -CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -CXXLD = $(CXX) -CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ - -o $@ -SOURCES = $(libplibsg_a_SOURCES) -DIST_SOURCES = $(am__libplibsg_a_SOURCES_DIST) -am__include_HEADERS_DIST = sg.h -includeHEADERS_INSTALL = $(INSTALL_HEADER) -HEADERS = $(include_HEADERS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BUILD_FNT_FALSE = @BUILD_FNT_FALSE@ -BUILD_FNT_TRUE = @BUILD_FNT_TRUE@ -BUILD_JS_FALSE = @BUILD_JS_FALSE@ -BUILD_JS_TRUE = @BUILD_JS_TRUE@ -BUILD_NET_FALSE = @BUILD_NET_FALSE@ -BUILD_NET_TRUE = @BUILD_NET_TRUE@ -BUILD_PSL_FALSE = @BUILD_PSL_FALSE@ -BUILD_PSL_TRUE = @BUILD_PSL_TRUE@ -BUILD_PUAUX_FALSE = @BUILD_PUAUX_FALSE@ -BUILD_PUAUX_TRUE = @BUILD_PUAUX_TRUE@ -BUILD_PUI_FALSE = @BUILD_PUI_FALSE@ -BUILD_PUI_TRUE = @BUILD_PUI_TRUE@ -BUILD_PW_FALSE = @BUILD_PW_FALSE@ -BUILD_PW_TRUE = @BUILD_PW_TRUE@ -BUILD_SG_FALSE = @BUILD_SG_FALSE@ -BUILD_SG_TRUE = @BUILD_SG_TRUE@ -BUILD_SL_FALSE = @BUILD_SL_FALSE@ -BUILD_SL_TRUE = @BUILD_SL_TRUE@ -BUILD_SSGAUX_FALSE = @BUILD_SSGAUX_FALSE@ -BUILD_SSGAUX_TRUE = @BUILD_SSGAUX_TRUE@ -BUILD_SSG_FALSE = @BUILD_SSG_FALSE@ -BUILD_SSG_TRUE = @BUILD_SSG_TRUE@ -BUILD_UL_FALSE = @BUILD_UL_FALSE@ -BUILD_UL_TRUE = @BUILD_UL_TRUE@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -RANLIB = @RANLIB@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -datadir = @datadir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -@BUILD_SG_TRUE@lib_LIBRARIES = libplibsg.a -@BUILD_SG_TRUE@include_HEADERS = sg.h -@BUILD_SG_TRUE@libplibsg_a_SOURCES = sg.cxx sgd.cxx \ -@BUILD_SG_TRUE@ sgIsect.cxx sgdIsect.cxx \ -@BUILD_SG_TRUE@ sgPerlinNoise.cxx - -@BUILD_SG_TRUE@INCLUDES = -I$(top_srcdir)/src/util -EXTRA_DIST = sg.dsp -all: all-am - -.SUFFIXES: -.SUFFIXES: .cxx .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/sg/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu src/sg/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-libLIBRARIES: $(lib_LIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" - @list='$(lib_LIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - f="`echo $$p | sed -e 's|^.*/||'`"; \ - echo " $(libLIBRARIES_INSTALL) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ - $(libLIBRARIES_INSTALL) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ - else :; fi; \ - done - @$(POST_INSTALL) - @list='$(lib_LIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - p="`echo $$p | sed -e 's|^.*/||'`"; \ - echo " $(RANLIB) '$(DESTDIR)$(libdir)/$$p'"; \ - $(RANLIB) "$(DESTDIR)$(libdir)/$$p"; \ - else :; fi; \ - done - -uninstall-libLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(lib_LIBRARIES)'; for p in $$list; do \ - p="`echo $$p | sed -e 's|^.*/||'`"; \ - echo " rm -f '$(DESTDIR)$(libdir)/$$p'"; \ - rm -f "$(DESTDIR)$(libdir)/$$p"; \ - done - -clean-libLIBRARIES: - -test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES) -libplibsg.a: $(libplibsg_a_OBJECTS) $(libplibsg_a_DEPENDENCIES) - -rm -f libplibsg.a - $(libplibsg_a_AR) libplibsg.a $(libplibsg_a_OBJECTS) $(libplibsg_a_LIBADD) - $(RANLIB) libplibsg.a - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sg.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sgIsect.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sgPerlinNoise.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sgd.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sgdIsect.Po@am__quote@ - -.cxx.o: -@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< - -.cxx.obj: -@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` -uninstall-info-am: -install-includeHEADERS: $(include_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)" - @list='$(include_HEADERS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f="`echo $$p | sed -e 's|^.*/||'`"; \ - echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \ - $(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \ - done - -uninstall-includeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(include_HEADERS)'; for p in $$list; do \ - f="`echo $$p | sed -e 's|^.*/||'`"; \ - echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \ - rm -f "$(DESTDIR)$(includedir)/$$f"; \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(ETAGS_ARGS)$$tags$$unique" \ - || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LIBRARIES) $(HEADERS) -installdirs: - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libLIBRARIES mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-includeHEADERS - -install-exec-am: install-libLIBRARIES - -install-info: install-info-am - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-includeHEADERS uninstall-info-am \ - uninstall-libLIBRARIES - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libLIBRARIES ctags distclean distclean-compile \ - distclean-generic distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-exec install-exec-am \ - install-includeHEADERS install-info install-info-am \ - install-libLIBRARIES install-man install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ - uninstall-am uninstall-includeHEADERS uninstall-info-am \ - uninstall-libLIBRARIES - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: Deleted: trunk/python-ogre/ThirdParty/plib/sg.vcproj.JNPR.amiller.user =================================================================== --- trunk/python-ogre/ThirdParty/plib/sg.vcproj.JNPR.amiller.user 2007-09-28 14:52:54 UTC (rev 397) +++ trunk/python-ogre/ThirdParty/plib/sg.vcproj.JNPR.amiller.user 2007-09-28 15:31:47 UTC (rev 398) @@ -1,65 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?> -<VisualStudioUserFile - ProjectType="Visual C++" - Version="8.00" - ShowAllFiles="false" - > - <Configurations> - <Configuration - Name="Debug|Win32" - > - <DebugSettings - Command="" - WorkingDirectory="" - CommandArguments="" - Attach="false" - DebuggerType="3" - Remote="1" - RemoteMachine="AMILLER-X31-1" - RemoteCommand="" - HttpUrl="" - PDBPath="" - SQLDebugging="" - Environment="" - EnvironmentMerge="true" - DebuggerFlavor="" - MPIRunCommand="" - MPIRunArguments="" - MPIRunWorkingDirectory="" - ApplicationCommand="" - ApplicationArguments="" - ShimCommand="" - MPIAcceptMode="" - MPIAcceptFilter="" - /> - </Configuration> - <Configuration - Name="Release|Win32" - > - <DebugSettings - Command="" - WorkingDirectory="" - CommandArguments="" - Attach="false" - DebuggerType="3" - Remote="1" - RemoteMachine="AMILLER-X31-1" - RemoteCommand="" - HttpUrl="" - PDBPath="" - SQLDebugging="" - Environment="" - EnvironmentMerge="true" - DebuggerFlavor="" - MPIRunCommand="" - MPIRunArguments="" - MPIRunWorkingDirectory="" - ApplicationCommand="" - ApplicationArguments="" - ShimCommand="" - MPIAcceptMode="" - MPIAcceptFilter="" - /> - </Configuration> - </Configurations> -</VisualStudioUserFile> Deleted: trunk/python-ogre/ThirdParty/plib/ssg.vcproj.JNPR.amiller.user =================================================================== --- trunk/python-ogre/ThirdParty/plib/ssg.vcproj.JNPR.amiller.user 2007-09-28 14:52:54 UTC (rev 397) +++ trunk/python-ogre/ThirdParty/plib/ssg.vcproj.JNPR.amiller.user 2007-09-28 15:31:47 UTC (rev 398) @@ -1,65 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?> -<VisualStudioUserFile - ProjectType="Visual C++" - Version="8.00" - ShowAllFiles="false" - > - <Configurations> - <Configuration - Name="Debug|Win32" - > - <DebugSettings - Command="" - WorkingDirectory="" - CommandArguments="" - Attach="false" - DebuggerType="3" - Remote="1" - RemoteMachine="AMILLER-X31-1" - RemoteCommand="" - HttpUrl="" - PDBPath="" - SQLDebugging="" - Environment="" - EnvironmentMerge="true" - DebuggerFlavor="" - MPIRunCommand="" - MPIRunArguments="" - MPIRunWorkingDirectory="" - ApplicationCommand="" - ApplicationArguments="" - ShimCommand="" - MPIAcceptMode="" - MPIAcceptFilter="" - /> - </Configuration> - <Configuration - Name="Release|Win32" - > - <DebugSettings - Command="" - WorkingDirectory="" - CommandArguments="" - Attach="false" - DebuggerType="3" - Remote="1" - RemoteMachine="AMILLER-X31-1" - RemoteCommand="" - HttpUrl="" - PDBPath="" - SQLDebugging="" - Environment="" - EnvironmentMerge="true" - DebuggerFlavor="" - MPIRunCommand="" - MPIRunArguments="" - MPIRunWorkingDirectory="" - ApplicationCommand="" - ApplicationArguments="" - ShimCommand="" - MPIAcceptMode="" - MPIAcceptFilter="" - /> - </Configuration> - </Configurations> -</VisualStudioUserFile> Modified: trunk/python-ogre/ThirdParty/plib/ssgSaveAC.cxx =================================================================== --- trunk/python-ogre/ThirdParty/plib/ssgSaveAC.cxx 2007-09-28 14:52:54 UTC (rev 397) +++ trunk/python-ogre/ThirdParty/plib/ssgSaveAC.cxx 2007-09-28 15:31:47 UTC (rev 398) @@ -179,7 +179,7 @@ { int i ; - save_fd = fopen ( filename, "wa" ) ; + save_fd = fopen ( filename, "w" ) ; if ( save_fd == NULL ) { Modified: trunk/python-ogre/ThirdParty/plib/ssgSaveASC.cxx =================================================================== --- trunk/python-ogre/ThirdParty/plib/ssgSaveASC.cxx 2007-09-28 14:52:54 UTC (rev 397) +++ trunk/python-ogre/ThirdParty/plib/ssgSaveASC.cxx 2007-09-28 15:31:47 UTC (rev 398) @@ -209,7 +209,7 @@ int ssgSaveASC ( const char *filename, ssgEntity *ent ) { - save_fd = fopen ( filename, "wa" ) ; + save_fd = fopen ( filename, "w" ) ; if ( save_fd == NULL ) { Modified: trunk/python-ogre/ThirdParty/plib/ssgSaveASE.cxx =================================================================== --- trunk/python-ogre/ThirdParty/plib/ssgSaveASE.cxx 2007-09-28 14:52:54 UTC (rev 397) +++ trunk/python-ogre/ThirdParty/plib/ssgSaveASE.cxx 2007-09-28 15:31:47 UTC (rev 398) @@ -327,7 +327,7 @@ int ssgSaveASE ( const char *filename, ssgEntity *ent ) { - save_fd = fopen ( filename, "wa" ) ; + save_fd = fopen ( filename, "w" ) ; if ( save_fd == NULL ) { Modified: trunk/python-ogre/ThirdParty/plib/ssgSaveDXF.cxx =================================================================== --- trunk/python-ogre/ThirdParty/plib/ssgSaveDXF.cxx 2007-09-28 14:52:54 UTC (rev 397) +++ trunk/python-ogre/ThirdParty/plib/ssgSaveDXF.cxx 2007-09-28 15:31:47 UTC (rev 398) @@ -126,7 +126,7 @@ int ssgSaveDXF ( const char *filename, ssgEntity *ent ) { - fileout = fopen ( filename, "wa" ) ; + fileout = fopen ( filename, "w" ) ; if ( fileout == NULL ) { Modified: trunk/python-ogre/ThirdParty/plib/ssgSaveOBJ.cxx =================================================================== --- trunk/python-ogre/ThirdParty/plib/ssgSaveOBJ.cxx 2007-09-28 14:52:54 UTC (rev 397) +++ trunk/python-ogre/ThirdParty/plib/ssgSaveOBJ.cxx 2007-09-28 15:31:47 UTC (rev 398) @@ -178,7 +178,7 @@ John Burkardt */ { - fileout = fopen ( filename, "wa" ) ; + fileout = fopen ( filename, "w" ) ; if ( fileout == NULL ) { Modified: trunk/python-ogre/ThirdParty/plib/ssgSaveTRI.cxx =================================================================== --- trunk/python-ogre/ThirdParty/plib/ssgSaveTRI.cxx 2007-09-28 14:52:54 UTC (rev 397) +++ trunk/python-ogre/ThirdParty/plib/ssgSaveTRI.cxx 2007-09-28 15:31:47 UTC (rev 398) @@ -96,7 +96,7 @@ */ { - fileout = fopen ( filename, "wa" ) ; + fileout = fopen ( filename, "w" ) ; if ( fileout == NULL ) { Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIButton.cpp =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIButton.cpp 2007-09-28 14:52:54 UTC (rev 397) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIButton.cpp 2007-09-28 15:31:47 UTC (rev 398) @@ -5,14 +5,14 @@ namespace QuickGUI { - Button::Button(const Ogre::String& name, Type type, const Rect& dimensions, GuiMetricsMode pMode, GuiMetricsMode sMode, Ogre::String texture, QuadContainer* container, Widget* ParentWidget, GUIManager* gm) : - Label(name,type,dimensions,pMode,sMode,texture,container,ParentWidget,gm), + Button::Button(const Ogre::String& name, Type type, const Rect& pixelDimensions, Ogre::String texture, QuadContainer* container, Widget* ParentWidget, GUIManager* gm) : + Label(name,type,pixelDimensions,texture,container,ParentWidget,gm), mButtonDown(false) { // Other widgets call this constructor, and they handle quad/quadcontainer their own way. if(mWidgetType == TYPE_BUTTON) { - mQuad->setLayer(Quad::LAYER_CHILD); + mQuad->setLayer(mParentWidget->getQuad()->getLayer()); } mButtonDownTexture = mTextureName + ".down" + mTextureExtension; Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIButton.h =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIButton.h 2007-09-28 14:52:54 UTC (rev 397) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIButton.h 2007-09-28 15:31:47 UTC (rev 398) @@ -39,7 +39,7 @@ @param ParentWidget parent widget which created this widget. */ - Button(const Ogre::String& name, Type type, const Rect& dimensions, GuiMetricsMode pMode, GuiMetricsMode sMode, Ogre::String texture, QuadContainer* container, Widget* ParentWidget, GUIManager* gm); + Button(const Ogre::String& name, Type type, const Rect& pixelDimensions, Ogre::String texture, QuadContainer* container, Widget* ParentWidget, GUIManager* gm); /** * Useful when you want to simulate the button being pressed down by the mouse. Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIComboBox.cpp =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIComboBox.cpp 2007-09-28 14:52:54 UTC (rev 397) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIComboBox.cpp 2007-09-28 15:31:47 UTC (rev 398) @@ -4,8 +4,8 @@ namespace QuickGUI { - ComboBox::ComboBox(const Ogre::String& name, Type type, const Rect& dimensions, GuiMetricsMode pMode, GuiMetricsMode sMode, Ogre::String texture, QuadContainer* container, Widget* ParentWidget, GUIManager* gm) : - Label(name,type,dimensions,pMode,sMode,texture,container,ParentWidget,gm) + ComboBox::ComboBox(const Ogre::String& name, Type type, const Rect& pixelDimensions, Ogre::String texture, QuadContainer* container, Widget* ParentWidget, GUIManager* gm) : + Label(name,type,pixelDimensions,texture,container,ParentWidget,gm) { // Other widgets call this constructor, and they handle quad/quadcontainer their own way. if(mWidgetType == TYPE_COMBOBOX) @@ -19,24 +19,16 @@ addEventHandler(EVENT_MOUSE_BUTTON_DOWN,&ComboBox::onMouseButtonDown,this); addEventHandler(EVENT_MOUSE_BUTTON_UP,&ComboBox::onMouseButtonUp,this); - // Create CloseButton - remember to position it relative to it's parent (TitleBar) - // Height of the Title Bar - Ogre::Real height = (mAbsoluteDimensions.height / mAbsoluteDimensions.width); - // Button has same height as width - Make the button slightly smaller that the titlebar height - Ogre::Real buttonHeight = 0.8; - Ogre::Real buttonWidth = (height * buttonHeight); - // Make a 5 pixel buffer - Ogre::Real buffer = 5.0 / mPixelDimensions.width; - Rect bDimensions = Rect((1 - (buttonWidth + buffer)),0.1,buttonWidth,buttonHeight); - mButton = new Button(mInstanceName+".ComboButton",TYPE_BUTTON,bDimensions,QGUI_GMM_RELATIVE,QGUI_GMM_RELATIVE,mTextureName + ".button" + mTextureExtension,mQuadContainer,this,mGUIManager); + Ogre::Real ButtonSize = mSize.height - 4; + mButton = new Button(mInstanceName+".ComboButton",TYPE_BUTTON,Rect(mSize.width - ButtonSize - 2,2,ButtonSize,ButtonSize),mTextureName + ".button" + mTextureExtension,mQuadContainer,this,mGUIManager); mButton->addEventHandler(Widget::EVENT_MOUSE_BUTTON_DOWN,&ComboBox::toggleDropDownListVisibility,this); mButton->addEventHandler(Widget::EVENT_MOUSE_BUTTON_UP,&ComboBox::applyButtonDownImage,this); mButton->addEventHandler(Widget::EVENT_MOUSE_ENTER,&ComboBox::applyButtonDownImage,this); mButton->addEventHandler(Widget::EVENT_MOUSE_LEAVE,&ComboBox::applyButtonDownImage,this); - mTextBoundsRelativeSize = Size(1 - buttonWidth,1); + mTextBoundsPixelSize = Size(mSize.width - ButtonSize - 2,mSize.height); - mList = new List(mInstanceName+".List",TYPE_LIST,Rect(0,1,1,0),QGUI_GMM_RELATIVE,QGUI_GMM_RELATIVE,mTextureName + ".list" + mTextureExtension,mQuadContainer,this,mGUIManager); + mList = new List(mInstanceName+".List",TYPE_LIST,Rect(0,mSize.height,mSize.width,0),mTextureName + ".list" + mTextureExtension,mQuadContainer,this,mGUIManager); mList->setShowWithParent(false); mList->setOffset(mOffset + 2); mList->hide(); Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIComboBox.h =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIComboBox.h 2007-09-28 14:52:54 UTC (rev 397) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIComboBox.h 2007-09-28 15:31:47 UTC (rev 398) @@ -43,7 +43,7 @@ @param ParentWidget parent widget which created this widget. */ - ComboBox(const Ogre::String& name, Type type, const Rect& dimensions, GuiMetricsMode pMode, GuiMetricsMode sMode, Ogre::String texture, QuadContainer* container, Widget* ParentWidget, GUIManager* gm); + ComboBox(const Ogre::String& name, Type type, const Rect& pixelDimensions, Ogre::String texture, QuadContainer* container, Widget* ParentWidget, GUIManager* gm); /* * Event Handler tied to ListItems, causing them to hide lists on mouse button up. Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIHorizontalScrollBar.cpp =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIHorizontalScrollBar.cpp 2007-09-28 14:52:54 UTC (rev 397) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIHorizontalScrollBar.cpp 2007-09-28 15:31:47 UTC (rev 398) @@ -3,22 +3,19 @@ namespace QuickGUI { - HorizontalScrollBar::HorizontalScrollBar(const Ogre::String& name, Type type, const Rect& dimensions, GuiMetricsMode pMode, GuiMetricsMode sMode, const Ogre::String& texture, QuadContainer* container, Widget* ParentWidget, GUIManager* gm) : - Image(name,type,dimensions,pMode,sMode,texture,container,ParentWidget,gm), + HorizontalScrollBar::HorizontalScrollBar(const Ogre::String& name, Type type, const Rect& pixelDimensions, const Ogre::String& texture, QuadContainer* container, Widget* ParentWidget, GUIManager* gm) : + Image(name,type,pixelDimensions,texture,container,ParentWidget,gm), mMinSliderPosition(0), mMaxSliderPosition(1), - mSliderPixelHeight(mPixelDimensions.height), - mScrollButtonPixelSize(Size(mPixelDimensions.height,mPixelDimensions.height)), mMouseDownOnTrack(false), mSmallChange(0.1), mLargeChange(0.4), - mRelativeSliderPosition(Point::ZERO), mRepeatTimer(0), mScrollRepeatTime(0.5) { if(mWidgetType == TYPE_SCROLLBAR_HORIZONTAL) { - mQuad->setLayer(Quad::LAYER_CHILD); + mQuad->setLayer(mParentWidget->getQuad()->getLayer()); } addEventHandler(EVENT_MOUSE_BUTTON_DOWN,&HorizontalScrollBar::onMouseDownOnTrack,this); @@ -30,30 +27,29 @@ mScrollLeftTextureName = mTextureName + ".left" + mTextureExtension; mScrollRightTextureName = mTextureName + ".right" + mTextureExtension; - mSlider = new Button(mInstanceName+".Slider",TYPE_BUTTON,Rect(0,0,1,1),QGUI_GMM_RELATIVE,QGUI_GMM_RELATIVE,mSliderTextureName,mQuadContainer,this,mGUIManager); + mSlider = new Button(mInstanceName+".Slider",TYPE_BUTTON,Rect(0,0,mSize.height,mSize.height),mSliderTextureName,mQuadContainer,this,mGUIManager); mSlider->enableDragging(true); mSlider->constrainDragging(true,false); - mSlider->getQuad()->setLayer(mQuad->getLayer()); mSlider->addEventHandler(EVENT_DRAGGED,&HorizontalScrollBar::onSliderDragged,this); - Ogre::Real scrollBarHeight = mPixelDimensions.height; - mScrollLeft1 = new Button(mInstanceName+".Left1",TYPE_BUTTON,Rect(0,0,scrollBarHeight,scrollBarHeight),QGUI_GMM_PIXELS,QGUI_GMM_PIXELS,mScrollLeftTextureName,mQuadContainer,this,mGUIManager); - mScrollLeft1->getQuad()->setLayer(mQuad->getLayer()); + Ogre::Real scrollBarHeight = mSize.height; + mScrollLeft1 = new Button(mInstanceName+".Left1",TYPE_BUTTON,Rect(0,0,mSize.height,mSize.height),mScrollLeftTextureName,mQuadContainer,this,mGUIManager); + mScrollLeft1->setShowWithParent(false); mScrollLeft1->hide(); mScrollLeft1->addEventHandler(EVENT_MOUSE_BUTTON_DOWN,&HorizontalScrollBar::onScrollLeftDown,this); - mScrollLeft2 = new Button(mInstanceName+".Left2",TYPE_BUTTON,Rect(0,0,scrollBarHeight,scrollBarHeight),QGUI_GMM_PIXELS,QGUI_GMM_PIXELS,mScrollLeftTextureName,mQuadContainer,this,mGUIManager); - mScrollLeft2->getQuad()->setLayer(mQuad->getLayer()); + mScrollLeft2 = new Button(mInstanceName+".Left2",TYPE_BUTTON,Rect(0,0,mSize.height,mSize.height),mScrollLeftTextureName,mQuadContainer,this,mGUIManager); + mScrollLeft2->setShowWithParent(false); mScrollLeft2->hide(); mScrollLeft2->addEventHandler(EVENT_MOUSE_BUTTON_DOWN,&HorizontalScrollBar::onScrollLeftDown,this); - mScrollRight1 = new Button(mInstanceName+".Right1",TYPE_BUTTON,Rect(0,0,scrollBarHeight,scrollBarHeight),QGUI_GMM_PIXELS,QGUI_GMM_PIXELS,mScrollRightTextureName,mQuadContainer,this,mGUIManager); - mScrollRight1->getQuad()->setLayer(mQuad->getLayer()); + mScrollRight1 = new Button(mInstanceName+".Right1",TYPE_BUTTON,Rect(0,0,mSize.height,mSize.height),mScrollRightTextureName,mQuadContainer,this,mGUIManager); + mScrollRight1->setShowWithParent(false); mScrollRight1->hide(); mScrollRight1->addEventHandler(EVENT_MOUSE_BUTTON_DOWN,&HorizontalScrollBar::onScrollRightDown,this); - mScrollRight2 = new Button(mInstanceName+".Right2",TYPE_BUTTON,Rect(0,0,scrollBarHeight,scrollBarHeight),QGUI_GMM_PIXELS,QGUI_GMM_PIXELS,mScrollRightTextureName,mQuadContainer,this,mGUIManager); - mScrollRight2->getQuad()->setLayer(mQuad->getLayer()); + mScrollRight2 = new Button(mInstanceName+".Right2",TYPE_BUTTON,Rect(0,0,mSize.height,mSize.height),mScrollRightTextureName,mQuadContainer,this,mGUIManager); + mScrollRight2->setShowWithParent(false); mScrollRight2->hide(); mScrollRight2->addEventHandler(EVENT_MOUSE_BUTTON_DOWN,&HorizontalScrollBar::onScrollRightDown,this); @@ -74,23 +70,21 @@ mSlider->setXPosition(mMinSliderPosition); else if(sliderEnd > mMaxSliderPosition) mSlider->setXPosition(mMaxSliderPosition - mSlider->getWidth()); - - mRelativeSliderPosition = mSlider->getPosition(); } void HorizontalScrollBar::_positionScrollButtons() { Rect leftDimensions = mScrollLeft1->getDimensions(); Rect rightDimensions = mScrollRight1->getDimensions(); - mScrollLeft1->setPosition(0,0.5 - (leftDimensions.height/2.0)); - mScrollRight1->setPosition(leftDimensions.width,0.5 - (rightDimensions.height/2.0)); - mScrollLeft2->setPosition(1 - rightDimensions.width - leftDimensions.width,0.5 - (leftDimensions.height/2.0)); - mScrollRight2->setPosition(1 - rightDimensions.width,0.5 - (rightDimensions.height/2.0)); + mScrollLeft1->setPosition(0,(mSize.height/2.0) - (leftDimensions.height/2.0)); + mScrollRight1->setPosition(leftDimensions.width,(mSize.height/2.0) - (rightDimensions.height/2.0)); + mScrollLeft2->setPosition(mSize.width - rightDimensions.width - leftDimensions.width,(mSize.height/2.0) - (leftDimensions.height/2.0)); + mScrollRight2->setPosition(mSize.width - rightDimensions.width,(mSize.height/2.0) - (rightDimensions.height/2.0)); } void HorizontalScrollBar::_scroll(Ogre::Real change, ScrollEventArgs args) { - mSlider->move(change,0); + mSlider->moveX(change * mSize.width); _constrainSlider(); @@ -101,12 +95,9 @@ void HorizontalScrollBar::_setValue(Ogre::Real value) { - if( value < 0.0 ) - value = 0.0; - if( value > (mMaxSliderPosition - mSlider->getWidth()) ) - value = (mMaxSliderPosition - mSlider->getWidth()); + Ogre::Real pixelX = (value * (mMaxSliderPosition - mMinSliderPosition)) + mMinSliderPosition; - mSlider->setXPosition(mMinSliderPosition + value); + mSlider->setXPosition(pixelX); _constrainSlider(); } @@ -167,28 +158,19 @@ return mScrollRepeatTime; } - Size HorizontalScrollBar::getScrollButtonSize(GuiMetricsMode mode) + Size HorizontalScrollBar::getScrollButtonSize() { - switch(mode) - { - case QGUI_GMM_ABSOLUTE: - return Size(mScrollButtonPixelSize.width / mGUIManager->getViewportWidth(),mScrollButtonPixelSize.height / mGUIManager->getViewportHeight()); - case QGUI_GMM_PIXELS: - return mScrollButtonPixelSize; - case QGUI_GMM_RELATIVE: - default: - return Size(mScrollButtonPixelSize.width / mPixelDimensions.width,mScrollButtonPixelSize.height / mPixelDimensions.height); - } + return mScrollLeft1->getSize(); } - Ogre::Real HorizontalScrollBar::getSliderHeight(GuiMetricsMode mode) + Ogre::Real HorizontalScrollBar::getSliderHeight() { - return mSlider->getHeight(mode); + return mSlider->getHeight(); } - Ogre::Real HorizontalScrollBar::getSliderWidth(GuiMetricsMode mode) + Ogre::Real HorizontalScrollBar::getSliderWidth() { - return mSlider->getWidth(mode); + return mSlider->getWidth(); } Ogre::Real HorizontalScrollBar::getSmallChange() @@ -199,10 +181,6 @@ Ogre::Real HorizontalScrollBar::getValue() { Ogre::Real retVal = ((mSlider->getXPosition() - mMinSliderPosition) / (mMaxSliderPosition - mMinSliderPosition)); - - if(retVal < 0) - retVal = 0; - return retVal; } @@ -212,9 +190,11 @@ { mMouseDownOnTrack = true; + Point mousePosition = dynamic_cast<const MouseEventArgs&>(args).position - getScreenPosition(); + ScrollEventArgs scrollArgs(this); // if mouse clicked left of track, scroll left. - if(dynamic_cast<const MouseEventArgs&>(args).position.x < mSlider->getXPosition(QGUI_GMM_PIXELS)) + if(mousePosition.x < mSlider->getXPosition()) { scrollArgs.sliderIncreasedPosition = false; _scroll(-mLargeChange,scrollArgs); @@ -244,7 +224,6 @@ void HorizontalScrollBar::onSizeChanged(const EventArgs& args) { - mSlider->setWidth(mSlider->getWidth()); _positionScrollButtons(); _constrainSlider(); } @@ -272,8 +251,7 @@ void HorizontalScrollBar::onSliderDragged(const EventArgs& args) { ScrollEventArgs scrollArgs(this); - Point currentRelativeSliderPosition = dynamic_cast<const WidgetEventArgs&>(args).widget->getPosition(); - if(currentRelativeSliderPosition.x < mRelativeSliderPosition.x) + if(dynamic_cast<const MouseEventArgs&>(args).moveDelta.x < 0) scrollArgs.sliderIncreasedPosition = false; else scrollArgs.sliderIncreasedPosition = true; @@ -328,7 +306,7 @@ { Rect temp = mScrollRight1->getDimensions(); mMinSliderPosition = temp.x + temp.width; - mMaxSliderPosition = 1.0; + mMaxSliderPosition = mSize.width; } break; case BUTTON_LAYOUT_ADJACENT_RIGHT: @@ -367,7 +345,7 @@ break; case BUTTON_LAYOUT_NONE: mMinSliderPosition = 0.0; - mMaxSliderPosition = 1.0; + mMaxSliderPosition = mSize.width; break; case BUTTON_LAYOUT_OPPOSITE: { @@ -380,8 +358,6 @@ break; } - // adjust slider size to fit within the new region: (mMinSliderPosition to mMaxSliderPosition) - mSlider->setWidth(mSlider->getWidth() * (mMaxSliderPosition - mMinSliderPosition)); _constrainSlider(); if(mVisible) @@ -399,17 +375,14 @@ mLargeChange = change; } - void HorizontalScrollBar::setScrollButtonSize(Size s, GuiMetricsMode mode) + void HorizontalScrollBar::setScrollButtonSize(Size pixelSize) { - mScrollLeft1->setSize(s,mode); - mScrollLeft2->setSize(s,mode); - mScrollRight1->setSize(s,mode); - mScrollRight2->setSize(s,mode); + mScrollLeft1->setSize(pixelSize); + mScrollLeft2->setSize(pixelSize); + mScrollRight1->setSize(pixelSize); + mScrollRight2->setSize(pixelSize); _positionScrollButtons(); - - mScrollButtonPixelSize = mScrollLeft1->getSize(QGUI_GMM_PIXELS); - setButtonLayout(mButtonLayout); } @@ -418,16 +391,15 @@ mScrollRepeatTime = timeInSeconds; } - void HorizontalScrollBar::setSliderHeight(Ogre::Real height, GuiMetricsMode mode) + void HorizontalScrollBar::setSliderHeight(Ogre::Real pixelHeight) { - mSlider->setHeight(height,mode); - mSlider->setYPosition(0.5 - (mSlider->getHeight()/2.0)); - mSliderPixelHeight = mSlider->getHeight(QGUI_GMM_PIXELS); + mSlider->setHeight(pixelHeight); + mSlider->setYPosition((mSize.height/2.0) - (mSlider->getHeight()/2.0)); } - void HorizontalScrollBar::setSliderWidth(Ogre::Real relativeWidth) + void HorizontalScrollBar::setSliderWidth(Ogre::Real pixelWidth) { - mSlider->setWidth(relativeWidth * (mMaxSliderPosition - mMinSliderPosition)); + mSlider->setWidth(pixelWidth * (mMaxSliderPosition - mMinSliderPosition)); _constrainSlider(); } @@ -438,12 +410,14 @@ void HorizontalScrollBar::setValue(Ogre::Real value) { + value = (value * mSize.width) + mMinSliderPosition; + if( value < 0.0 ) value = 0.0; if( value > (mMaxSliderPosition - mSlider->getWidth()) ) value = (mMaxSliderPosition - mSlider->getWidth()); - mSlider->setXPosition(mMinSliderPosition + value); + mSlider->setXPosition(value); ScrollEventArgs scrollArgs(this); Ogre::Real currentValue = getValue(); @@ -457,29 +431,8 @@ void HorizontalScrollBar::show() { - mQuad->setVisible(true); - - // show children, except for Windows and lists of MenuList or ComboBox Widget. - std::vector<Widget*>::iterator it; - for( it = mChildWidgets.begin(); it != mChildWidgets.end(); ++it ) - { - if( ((*it)->getWidgetType() == TYPE_BUTTON) && - ((*it)->getInstanceName() != mSlider->getInstanceName()) ) - continue; - - (*it)->show(); - } - + Image::show(); _showButtons(); - - // Only fire event if we change visibility. If we were already visible, don't fire. - if(!mVisible) - { - WidgetEventArgs args(this); - fireEvent(EVENT_SHOWN,args); - } - - mVisible = true; } void HorizontalScrollBar::timeElapsed(Ogre::Real time) Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIHorizontalScrollBar.h =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIHorizontalScrollBar.h 2007-09-28 14:52:54 UTC (rev 397) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIHorizontalScrollBar.h 2007-09-28 15:31:47 UTC (rev 398) @@ -6,7 +6,7 @@ namespace QuickGUI { - class HorizontalScrollBar : + class _QuickGUIExport HorizontalScrollBar : public Image { public: @@ -41,7 +41,7 @@ @note Vertical or Horizontal TrackBars are derived from a comparison between width and height. */ - HorizontalScrollBar(const Ogre::String& name, Type type, const Rect& dimensions, GuiMetricsMode pMode, GuiMetricsMode sMode, const Ogre::String& texture, QuadContainer* container, Widget* ParentWidget, GUIManager* gm); + HorizontalScrollBar(const Ogre::String& name, Type type, const Rect& pixelDimensions, const Ogre::String& texture, QuadContainer* container, Widget* ParentWidget, GUIManager* gm); // Same as setValue, except that the scroll event is not fired. void _setValue(Ogre::Real value); @@ -62,9 +62,9 @@ * before another scroll occurs. */ Ogre::Real getRepeatTime(); - Size getScrollButtonSize(GuiMetricsMode mode = QGUI_GMM_RELATIVE); - Ogre::Real getSliderHeight(GuiMetricsMode mode = QGUI_GMM_RELATIVE); - Ogre::Real getSliderWidth(GuiMetricsMode mode = QGUI_GMM_RELATIVE); + Size getScrollButtonSize(); + Ogre::Real getSliderHeight(); + Ogre::Real getSliderWidth(); Ogre::Real getSmallChange(); /** * Gets the numerical value representing the position of the left end of the slider, relative to the track bounds. @@ -82,13 +82,13 @@ void setBaseTexture(const Ogre::String& textureName); void setButtonLayout(ButtonLayout layout); void setLargeChange(Ogre::Real change); - void setScrollButtonSize(Size s, GuiMetricsMode mode = QGUI_GMM_RELATIVE); + void setScrollButtonSize(Size s); /** * Sets the amount of time the left mouse button is down over a button or bar * before another scroll occurs. */ void setScrollRepeatTime(Ogre::Real timeInSeconds); - void setSliderHeight(Ogre::Real height, GuiMetricsMode mode = QGUI_GMM_RELATIVE); + void setSliderHeight(Ogre::Real height); void setSmallChange(Ogre::Real change); /** * Sets the numerical value representing the position of the left end of the slider, relative to the track bounds. @@ -108,7 +108,7 @@ Ogre::Real mRepeatTimer; // last recorded slider position - Point mRelativeSliderPosition; + Point mSliderPosition; Ogre::Real mMinSliderPosition; Ogre::Real mMaxSliderPosition; @@ -120,7 +120,6 @@ Button* mSlider; Ogre::String mSliderTextureName; - Ogre::Real mSliderPixelHeight; void setSliderWidth(Ogre::Real relativeWidth); void _constrainSlider(); @@ -128,7 +127,6 @@ Ogre::String mScrollLeftTextureName; Ogre::String mScrollRightTextureName; - Size mScrollButtonPixelSize; Button* mScrollLeft1; Button* mScrollLeft2; Button* mScrollRight1; Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIHorizontalTrackBar.cpp =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIHorizontalTrackBar.cpp 2007-09-28 14:52:54 UTC (rev 397) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIHorizontalTrackBar.cpp 2007-09-28 15:31:47 UTC (rev 398) @@ -3,31 +3,28 @@ namespace QuickGUI { - HorizontalTrackBar::HorizontalTrackBar(const Ogre::String& name, Type type, const Rect& dimensions, GuiMetricsMode pMode, GuiMetricsMode sMode, Ogre::String texture, QuadContainer* container, Widget* ParentWidget, GUIManager* gm) : - Image(name,type,dimensions,pMode,sMode,texture,container,ParentWidget,gm), + HorizontalTrackBar::HorizontalTrackBar(const Ogre::String& name, Type type, const Rect& pixelDimensions, Ogre::String texture, QuadContainer* container, Widget* ParentWidget, GUIManager* gm) : + Image(name,type,pixelDimensions,texture,container,ParentWidget,gm), mNumRegions(1), mCurrentValue(0), - mMouseDownOnSlider(false), mLargeChange(3) { // Other widgets call this constructor, and they handle quad/quadcontainer their own way. if(mWidgetType == TYPE_TRACKBAR_HORIZONTAL) { - mQuad->setLayer(Quad::LAYER_CHILD); + mQuad->setLayer(mParentWidget->getQuad()->getLayer()); } addEventHandler(EVENT_MOUSE_BUTTON_DOWN,&HorizontalTrackBar::onMouseButtonDown,this); // Creat slider button at the beginning of the HorizontalTrackBar, whether horizonal (left) or vertical (bot) - mSliderButton = new Button(mInstanceName+".SliderButton",TYPE_BUTTON,Rect(0,0,13,mPixelDimensions.height),QGUI_GMM_RELATIVE,QGUI_GMM_PIXELS,mSliderTextureName,mQuadContainer,this,mGUIManager); + mSliderButton = new Button(mInstanceName+".SliderButton",TYPE_BUTTON,Rect(0,0,13,mSize.height),mSliderTextureName,mQuadContainer,this,mGUIManager); mSliderButton->enableDragging(true); mSliderButton->constrainDragging(true,false); mSliderButton->addEventHandler(EVENT_DRAGGED,&HorizontalTrackBar::onSliderDragged,this); mSliderButton->addEventHandler(EVENT_MOUSE_BUTTON_DOWN,&HorizontalTrackBar::onMouseDownOnSlider,this); mSliderButton->addEventHandler(EVENT_MOUSE_BUTTON_UP,&HorizontalTrackBar::onMouseUpOnSlider,this); mSliderButton->addEventHandler(EVENT_LOSE_FOCUS,&HorizontalTrackBar::onMouseUpOnSlider,this); - - mRelativeSliderSize = mSliderButton->getSize(); _getSliderPositions(); @@ -52,10 +49,11 @@ { mSliderPositions.clear(); - Ogre::Real trackLength = 1 - mRelativeSliderSize.width; + Ogre::Real sliderPixelWidth = mSliderButton->getWidth(); + Ogre::Real trackLength = mSize.width - sliderPixelWidth; mRegionLength = trackLength / mNumRegions; - Ogre::Real xStart = (mRelativeSliderSize.width/2.0); + Ogre::Real xStart = (sliderPixelWidth/2.0); mSliderPositions.push_back(xStart); for( int i = 0; i < mNumRegions; ++i ) { @@ -70,9 +68,7 @@ int HorizontalTrackBar::getClosestSliderPosition(const Point& pixelPoint) { - Point p = pixelPoint; - p.x = (p.x - mPixelDimensions.x) / mPixelDimensions.width; - p.y = (p.y - mPixelDimensions.y) / mPixelDimensions.height; + Point p = pixelPoint - getScreenPosition(); if( p.x <= mSliderPositions[0] ) return 0; @@ -115,15 +111,12 @@ } void HorizontalTrackBar::onMouseDownOnSlider(const EventArgs& args) - { - mMouseDownOnSlider = true; - + { mSliderButton->lockTexture(); } void HorizontalTrackBar::onMouseUpOnSlider(const EventArgs& args) { - mMouseDownOnSlider = false; mSliderButton->unlockTexture(); if(mGUIManager->getMouseOverWidget()->getInstanceName() != mSliderButton->getInstanceName()) @@ -135,12 +128,11 @@ void HorizontalTrackBar::onMouseButtonDown(const EventArgs& args) { Point mousePos = dynamic_cast<const MouseEventArgs&>(args).position; - mousePos.x = (mousePos.x - mPixelDimensions.x) / mPixelDimensions.width; - mousePos.y = (mousePos.y - mPixelDimensions.y) / mPixelDimensions.height; + mousePos = mousePos - getScreenPosition(); - if( (mousePos.x > (mSliderPositions[mCurrentValue] + ((mRegionLength + mRelativeSliderSize.width)/2.0))) && (mCurrentValue < mNumRegions) ) + if( (mousePos.x > (mSliderPositions[mCurrentValue] + ((mRegionLength + mSliderButton->getWidth())/2.0))) && (mCurrentValue < mNumRegions) ) setValue(mCurrentValue + mLargeChange); - else if( (mousePos.x < (mSliderPositions[mCurrentValue] - ((mRegionLength - mRelativeSliderSize.width)/2.0))) && (mCurrentValue > 0) ) + else if( (mousePos.x < (mSliderPositions[mCurrentValue] - ((mRegionLength - mSliderButton->getWidth())/2.0))) && (mCurrentValue > 0) ) setValue(mCurrentValue - mLargeChange); } @@ -183,10 +175,9 @@ setNumRegions(NumTicks - 1); } - void HorizontalTrackBar::setSliderSize(Size s, GuiMetricsMode mode) + void HorizontalTrackBar::setSliderSize(Size pixelSize) { - mSliderButton->setSize(s,mode); - mRelativeSliderSize = mSliderButton->getSize(); + mSliderButton->setSize(pixelSize); } void HorizontalTrackBar::setTexture(const Ogre::String& textureName, bool updateBaseTexture) @@ -205,7 +196,7 @@ mCurrentValue = Value; - mSliderButton->setXPosition(mSliderPositions[mCurrentValue] - (mRelativeSliderSize.width/2.0)); + mSliderButton->setXPosition(mSliderPositions[mCurrentValue] - (mSliderButton->getWidth()/2.0)); WidgetEventArgs e(this); e.handled = false; Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIHorizontalTrackBar.h =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIHorizontalTrackBar.h 2007-09-28 14:52:54 UTC (rev 397) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIHorizontalTrackBar.h 2007-09-28 15:31:47 UTC (rev 398) @@ -38,7 +38,7 @@ @note Vertical or Horizontal TrackBars are derived from a comparison between width and height. */ - HorizontalTrackBar(const Ogre::String& name, Type type, const Rect& dimensions, GuiMetricsMode pMode, GuiMetricsMode sMode, Ogre::String texture, QuadContainer* container, Widget* ParentWidget, GUIManager* gm); + HorizontalTrackBar(const Ogre::String& name, Type type, const Rect& pixelDimensions, Ogre::String texture, QuadContainer* container, Widget* ParentWidget, GUIManager* gm); /** * Add user defined event that will be called when amount of progress has changed. @@ -99,7 +99,7 @@ * Sets the number of positions Slider can be moved to. Related to setNumRegions. */ void setNumTicks(unsigned int NumTicks); - void setSliderSize(Size s, GuiMetricsMode mode = QGUI_GMM_RELATIVE); + void setSliderSize(Size pixelSize); /** * Applies the texture to the Quad if exists in some form, and updates the Image used for * transparency picking. @@ -131,9 +131,6 @@ // ----- SLIDER BUTTON PROPERTIES -------------------- Button* mSliderButton; Ogre::String mSliderTextureName; - Size mRelativeSliderSize; - // Each region has a beggining and end. mCurrentPos tracks where slider is. - int mSliderIndex; void _getButtonSize(); void onSliderDragged(const EventArgs& args); @@ -141,10 +138,6 @@ // ----- EVENT HANDLERS -------------------- void onMouseDownOnSlider(const EventArgs& args); void onMouseUpOnSlider(const EventArgs& args); - - bool mMouseDownOnSlider; - // Record the difference in index positions between the slider and cursor, when cursor goes down. - int mMouseDownSliderDifference; std::vector<MemberFunctionSlot*> mOnValueChangedHandlers; }; Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIImage.cpp =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIImage.cpp 2007-09-28 14:52:54 UTC (rev 397) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIImage.cpp 2007-09-28 15:31:47 UTC (rev 398) @@ -2,8 +2,8 @@ namespace QuickGUI { - Image::Image(const Ogre::String& name, Type type, const Rect& dimensions, GuiMetricsMode pMode, GuiMetricsMode sMode, Ogre::String texture, QuadContainer* container, Widget* ParentWidget, GUIManager* gm) : - Widget(name,type,dimensions,pMode,sMode,texture,container,ParentWidget,gm) + Image::Image(const Ogre::String& name, Type type, const Rect& pixelDimensions, Ogre::String texture, QuadContainer* container, Widget* ParentWidget, GUIManager* gm) : + Widget(name,type,pixelDimensions,texture,container,ParentWidget,gm) { // Other widgets call this constructor, and they handle quad/quadcontainer their own way. if(mWidgetType == TYPE_IMAGE) Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIImage.h =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIImage.h 2007-09-28 14:52:54 UTC (rev 397) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIImage.h 2007-09-28 15:31:47 UTC (rev 398) @@ -31,7 +31,7 @@ @param ParentWidget parent widget which created this widget. */ - Image(const Ogre::String& name, Type type, const Rect& dimensions, GuiMetricsMode pMode, GuiMetricsMode sMode, Ogre::String texture, QuadContainer* container, Widget* ParentWidget, GUIManager* gm); + Image(const Ogre::String& name, Type type, const Rect& pixelDimensions, Ogre::String texture, QuadContainer* container, Widget* ParentWidget, GUIManager* gm); protected: virtual ~Image(); Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUILabel.cpp =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUILabel.cpp 2007-09-28 14:52:54 UTC (rev 397) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUILabel.cpp 2007-09-28 15:31:47 UTC (rev 398) @@ -3,14 +3,13 @@ namespace QuickGUI { - Label::Label(const Ogre::String& name, Type type, const Rect& dimensions, GuiMetricsMode pMode, GuiMetricsMode sMode, Ogre::String texture, QuadContainer* container, Widget* ParentWidget, GUIManager* gm) : - Image(name,type,dimensions,pMode,sMode,texture,container,ParentWidget,gm), + Label::Label(const Ogre::String& name, Type type, const Rect& pixelDimensions, Ogre::String texture, QuadContainer* container, Widget* ParentWidget, GUIManager* gm) : + Image(name,type,pixelDimensions,texture,container,ParentWidget,gm), mDefaultTexture(mTextureName), mVerticalAlignment(QGUI_VA_MID), mHorizontalAlignment(QGUI_HA_MID), - mTextBoundsRelativeOffset(Point::ZERO), - mTextBoundsRelativeSize(Size(1,1)), - mTextBoundsAbsoluteDimensions(mAbsoluteDimensions), + mTextBoundsPixelOffset(Point::ZERO), + mTextBoundsPixelSize(Size(pixelDimensions.width,pixelDimensions.height)), mTextColor(Ogre::ColourValue::White), mDisabledTextColor(Ogre::ColourValue(0.75,0.75,0.75,1)) { @@ -19,8 +18,8 @@ // Other widgets call this constructor, and they handle quad/quadcontainer their own way. if(mWidgetType == TYPE_LABEL) { - mQuad->setLayer(Quad::LAYER_CHILD); - mText->setLayer(Quad::LAYER_CHILD); + mQuad->setLayer(mParentWidget->getQuad()->getLayer());... [truncated message content] |
From: <and...@us...> - 2007-09-29 11:18:44
|
Revision: 400 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=400&view=rev Author: andy_miller Date: 2007-09-29 04:18:47 -0700 (Sat, 29 Sep 2007) Log Message: ----------- More code moved into common_utils/__init__.py Added OgreBullet support -- seperate Collision and Dynamic modules (OgreBulletC & OgreBulletD) Modified Paths: -------------- trunk/python-ogre/PythonOgreConfig_nt.py trunk/python-ogre/PythonOgreConfig_posix.py trunk/python-ogre/SConstruct trunk/python-ogre/code_generators/common_utils/__init__.py trunk/python-ogre/code_generators/common_utils/extract_documentation.py trunk/python-ogre/code_generators/ogre/generate_code.py trunk/python-ogre/code_generators/opcode/generate_code.py trunk/python-ogre/code_generators/template/generate_code.py trunk/python-ogre/environment.py trunk/python-ogre/setup.py Added Paths: ----------- trunk/python-ogre/code_generators/ogrebulletc/ trunk/python-ogre/code_generators/ogrebulletc/customization_data.py trunk/python-ogre/code_generators/ogrebulletc/generate_code.py trunk/python-ogre/code_generators/ogrebulletc/hand_made_wrappers.py trunk/python-ogre/code_generators/ogrebulletc/python_ogrebullet.h trunk/python-ogre/code_generators/ogrebulletc/python_ogrebullet_aliases.h trunk/python-ogre/code_generators/ogrebulletc/python_ogrebullet_sizeof.h trunk/python-ogre/code_generators/ogrebulletd/ trunk/python-ogre/code_generators/ogrebulletd/customization_data.py trunk/python-ogre/code_generators/ogrebulletd/generate_code.py trunk/python-ogre/code_generators/ogrebulletd/hand_made_wrappers.py trunk/python-ogre/code_generators/ogrebulletd/python_ogrebullet.h trunk/python-ogre/code_generators/ogrebulletd/python_ogrebullet_aliases.h trunk/python-ogre/code_generators/ogrebulletd/python_ogrebullet_sizeof.h trunk/python-ogre/packages_2.5/ogre/physics/OgreBulletC/ trunk/python-ogre/packages_2.5/ogre/physics/OgreBulletC/__init__.py trunk/python-ogre/packages_2.5/ogre/physics/OgreBulletD/ trunk/python-ogre/packages_2.5/ogre/physics/OgreBulletD/__init__.py Modified: trunk/python-ogre/PythonOgreConfig_nt.py =================================================================== --- trunk/python-ogre/PythonOgreConfig_nt.py 2007-09-29 06:46:30 UTC (rev 399) +++ trunk/python-ogre/PythonOgreConfig_nt.py 2007-09-29 11:18:47 UTC (rev 400) @@ -31,7 +31,9 @@ PATH_VORBIS= os.path.join(BASE_DIR, 'vorbis') PATH_OPENAL= os.path.join(BASE_DIR, 'openal') PATH_ALUT= os.path.join(BASE_DIR, 'freealut') -PATH_OgreOde= os.path.join(BASE_DIR, 'OgreAddons','ogreode') +PATH_OgreOde= os.path.join(BASE_DIR, PATH_OgreAddons,'ogreode') +PATH_OgreBullet= os.path.join(PATH_OgreAddons,'ogrebullet') + PATH_OGREAL= os.path.join(PATH_THIRDPARTY,'ogreal') PATH_OPCODE= os.path.join(PATH_THIRDPARTY,'opcode') PATH_quickgui= os.path.join(PATH_THIRDPARTY,'quickgui') @@ -68,6 +70,7 @@ PATH_LIB_ODE = os.path.join( PATH_ODE, 'lib/releaselib')## probable releaselib for posix PATH_LIB_OPCODE = os.path.join( PATH_OPCODE ) PATH_LIB_OgreOde = os.path.join( PATH_OgreOde, 'lib/Release') +PATH_LIB_OgreBullet = os.path.join( PATH_OgreBullet, 'lib/Release') PATH_LIB_OgreOdePrefab = os.path.join( PATH_OgreOde, 'prefab/lib/Release' ) PATH_LIB_OgreOdeLoader = os.path.join( PATH_OgreOde, 'loader/lib/Release' ) PATH_LIB_OgreAL = os.path.join( PATH_OGREAL)#, 'lib/Release' ) @@ -104,6 +107,10 @@ PATH_INCLUDE_OGG= os.path.join( PATH_OGG, 'include' ) PATH_INCLUDE_VORBIS= os.path.join( PATH_VORBIS, 'include' ) PATH_INCLUDE_ALUT= os.path.join( PATH_ALUT, 'include' ) +PATH_INCLUDE_OgreBullet = [ + os.path.join( PATH_OgreBullet,'Collisions','include') + ,os.path.join( PATH_OgreBullet,'Dynamics','include') + ] PATH_INCLUDE_OgreOde = os.path.join( PATH_OgreOde,'include') PATH_INCLUDE_OgreOdePrefab= os.path.join( PATH_OgreOde,'prefab/include') PATH_INCLUDE_OgreOdeLoader= os.path.join( PATH_OgreOde,'loader/include') Modified: trunk/python-ogre/PythonOgreConfig_posix.py =================================================================== --- trunk/python-ogre/PythonOgreConfig_posix.py 2007-09-29 06:46:30 UTC (rev 399) +++ trunk/python-ogre/PythonOgreConfig_posix.py 2007-09-29 11:18:47 UTC (rev 400) @@ -39,6 +39,8 @@ PATH_OPENAL= os.path.join(BASE_DIR, 'openal-0.0.8') PATH_ALUT= os.path.join(BASE_DIR, 'freealut-1.1.0') PATH_OgreOde= os.path.join(PATH_OgreAddons,'ogreode') +PATH_OgreBullet= os.path.join(PATH_OgreAddons,'ogrebullet') + PATH_OGREAL= os.path.join(PATH_THIRDPARTY,'ogreal') PATH_OPCODE= os.path.join(PATH_THIRDPARTY,'opcode') PATH_quickgui= os.path.join(PATH_THIRDPARTY,'quickgui') @@ -73,6 +75,8 @@ PATH_LIB_OgreOdeLoader = os.path.join( LOCAL_LIB ) #PATH_OgreOde, 'loader/lib/Release' ) PATH_LIB_OgreAL = os.path.join( LOCAL_LIB ) #PATH_OGREAL, 'lib/Release' ) PATH_LIB_betagui = PATH_betagui +PATH_LIB_OgreBullet = os.path.join( PATH_OgreBullet, 'lib/Release') + PATH_LIB_quickgui = PATH_quickgui PATH_LIB_Bullet = os.path.join( LOCAL_LIB ) PATH_LIB_plib = PATH_plib @@ -101,13 +105,17 @@ PATH_INCLUDE_OgreOde = os.path.join( PATH_OgreOde,'include') PATH_INCLUDE_OgreOdePrefab= os.path.join( PATH_OgreOde,'prefab/include') PATH_INCLUDE_OgreOdeLoader= os.path.join( PATH_OgreOde,'loader/include') +PATH_INCLUDE_OgreBullet = [ + os.path.join( PATH_OgreBullet,'Collisions','include') + ,os.path.join( PATH_OgreBullet,'Dynamics','include') + ] PATH_INCLUDE_NxOgre= os.path.join(PATH_NxOgre, 'include') PATH_INCLUDE_betagui = PATH_betagui PATH_INCLUDE_Ogre_CEGUIRenderer = os.path.join( PATH_Ogre, 'Samples/Common/CEGUIRenderer/include') PATH_INCLUDE_OPCODE = os.path.join( PATH_OPCODE ) PATH_INCLUDE_Bullet = os.path.join( LOCAL_INCLUDE ) PATH_INCLUDE_navi = os.path.join (PATH_navi,'include') -PATH_INCLUDE_plib = PATH_plib +PATH_INCLUDE_plib = PATH_plib PATH_INCLUDE_ogredshow = PATH_ogredshow PATH_INCLUDE_Theora = os.path.join (PATH_Theora,'include') Modified: trunk/python-ogre/SConstruct =================================================================== --- trunk/python-ogre/SConstruct 2007-09-29 06:46:30 UTC (rev 399) +++ trunk/python-ogre/SConstruct 2007-09-29 11:18:47 UTC (rev 400) @@ -60,15 +60,15 @@ if os.sys.platform <> 'darwin': CCFLAGS = ' `pkg-config --cflags OGRE` ' CCFLAGS += ' -I' - CCFLAGS += ' -O3 -I./ ' # -fvisibility=hidden -finline-limit=20 ' - #CCFLAGS += ' -DOGRE_GCC_VISIBILITY ' # -fvisibility-inlines-hidden + CCFLAGS += ' -O3 -I./ -fvisibility=hidden -finline-limit=20 ' + CCFLAGS += ' -DOGRE_GCC_VISIBILITY ' # -fvisibility-inlines-hidden else: CCFLAGS = ' -I -pipe -Os -I./' return CCFLAGS def get_source_files(_dir): try: - source_files = filter( lambda s: (s.endswith( '.cpp' ) or s.endswith( '.cxx' ) or s.endswith( '.c' )), os.listdir(_dir) ) + source_files = filter( lambda s: (s.endswith( '.cpp' ) or s.endswith('.cxx') or s.endswith('.c') ), os.listdir(_dir) ) except OSError,e: print 'WARNING: Generate the sources this directory: "%s"' % _dir raise e @@ -90,10 +90,10 @@ # Let us select the projects to build possible_projects = ['ogre' , 'ois', 'ogrerefapp', 'ogrenewt', 'cegui', 'ode',\ 'ogreode', 'ogreal', 'quickgui', 'opcode', 'nxogre', 'bullet', 'physx', 'betagui','theora',\ - 'ogrevideoffmpeg', 'ogredshow', 'plib' ] # , 'raknet' + 'ogrevideoffmpeg', 'ogredshow', 'plib', 'navi', 'ogrebulletc', 'ogrebulletd' ] # , 'raknet' default_projects = ['ogre' , 'ois', 'ogrerefapp', 'ogrenewt', 'cegui', 'ode',\ 'ogreode', 'ogreal', 'quickgui', 'opcode', 'nxogre', 'bullet', 'physx', 'betagui','theora',\ - 'ogrevideoffmpeg', 'ogredshow', 'plib' ] + 'ogrevideoffmpeg', 'ogredshow', 'plib', 'navi', 'ogrebulletc', 'ogrebulletd' ] # This lets you call scons like: 'scons PROJECTS=ogre,cegui' opts = Options('custom.py') @@ -155,10 +155,11 @@ ## ugly hack - scons returns a list of targets from SharedLibrary - we have to choose the one we want index = 0 # this is the index into a list of targets - '0' should be the platform default - if os.name=='nt': - _env.AddPostAction(package,\ - 'mt.exe -nologo -manifest %(name)s.manifest -outputresource:%(name)s;2' % { 'name':package[index] } ) + ## and lets have it install the output into the 'package_dir_name/ModuleName' dir and rename to the PydName + _env.AddPostAction(package,\ + 'mt.exe -nologo -manifest %(name)s.manifest -outputresource:%(name)s;2' % { 'name':package[index] } ) + _env.InstallAs(os.path.join(environment.package_dir_name, cls.parent, cls.ModuleName, cls.PydName), package[index] ) Modified: trunk/python-ogre/code_generators/common_utils/__init__.py =================================================================== --- trunk/python-ogre/code_generators/common_utils/__init__.py 2007-09-29 06:46:30 UTC (rev 399) +++ trunk/python-ogre/code_generators/common_utils/__init__.py 2007-09-29 11:18:47 UTC (rev 400) @@ -2,7 +2,13 @@ import shared_ptr from pygccxml import declarations from pyplusplus.decl_wrappers import property_t +from pyplusplus import function_transformers as ft +from pyplusplus.module_builder import call_policies + +import var_checker as varchecker +import ogre_properties as ogre_properties + def configure_shared_ptr( mb ): exposer = shared_ptr.exposer_t( mb ) exposer.expose() @@ -166,5 +172,175 @@ ## so now return the function call return name[start:end] +def docit ( general, i, o ): + """ helper function to generate a semi nice documentation string + """ + docs = "Python-Ogre Modified Function Call\\n" + general +"\\n" + docs = docs + "Input: " + i + "\\n" + docs = docs + "Output: " + o + "\\n\\\n" + return docs +def Auto_Document ( mb, namespace=None ): + """Indicate that the functions being exposed are declated protected or private in the C++ code + this should warn people to be careful using them :) """ + global_ns = mb.global_ns + if namespace: + main_ns = global_ns.namespace( namespace ) + else: + main_ns = global_ns + query = declarations.access_type_matcher_t( 'private' ) + for c in main_ns.calldefs( query, allow_empty=True ): +# print "PRIVATE:", c + s = c.documentation + if not s: + s = "" + c.documentation="<<private declaration>>\\n"+s + query = declarations.access_type_matcher_t( 'protected' ) + for c in main_ns.calldefs( query, allow_empty=True ): +# print "PROTECTED:", c + s = c.documentation + if not s: + s = "" + c.documentation="<<protected declaration>>\\n"+s + +def Fix_Void_Ptr_Args ( mb, pointee_types=['unsigned int','int', 'float', 'unsigned char', 'char'], ignore_names=[] ): + """ we modify functions that take void *'s in their argument list to instead take + unsigned ints, which allows us to use CTypes buffers + """ + def fixVoids ( fun ): + arg_position = 0 + trans=[] + desc="" + for arg in fun.arguments: + if arg.type.decl_string == 'void const *' or arg.type.decl_string == 'void *': + trans.append( ft.modify_type(arg_position,_ReturnUnsignedInt ) ) + desc = desc +"Argument: "+arg.name+ "( pos:" + str(arg_position) +") takes a CTypes.addressof(xx). " + arg_position +=1 + if trans: + print "Tranformation applied to ", fun, desc + fun.add_transformation ( * trans , **{"alias":fun.name} ) + fun.documentation = docit ("Modified Input Argument to work with CTypes", + desc, "...") + + for fun in mb.member_functions(): + fixVoids ( fun ) + + for fun in mb.constructors(): + fixVoids ( fun ) + + + ## lets go and look for stuff that might be a problem + def fixPointerTypes ( fun, pointee_types=[], ignore_names=[], Exclude=False ): + if fun.documentation or fun.ignore: return ## means it's been tweaked somewhere else + for n in ignore_names: + if n in fun.name: + return + for arg in fun.arguments: + if declarations.is_pointer(arg.type): ## and "const" not in arg.type.decl_string: + for i in pointee_types: + if i in arg.type.decl_string: + if Exclude: + print "Excluding:", fun," due to pointer argument", arg.type.decl_string + fun.exclude() + return + else: + print "Function has pointer argument: ", fun, arg.type.decl_string + fun.documentation=docit("SUSPECT - MAYBE BROKEN due to pointer argument", "....", "...") + return + + for fun in mb.member_functions(): + fixPointerTypes ( fun, pointee_types, ignore_names ) + for fun in mb.constructors(): + fixPointerTypes ( fun, pointee_types, [], Exclude=True ) + + +def Fix_Pointer_Returns ( mb, pointee_types=['unsigned int','int', 'float','char','unsigned char'], known_names=[] ): + """ Change out functions that return a variety of pointer to base types and instead + have them return the address the pointer is pointing to (the pointer value) + This allow us to use CTypes to handle in memory buffers from Python + + Also - if documentation has been set then ignore the class/function as it means it's been tweaked else where + """ + for fun in mb.member_functions( allow_empty = True ): + if declarations.is_pointer (fun.return_type) and not fun.documentation: + for i in pointee_types: + if fun.return_type.decl_string.startswith ( i ) and not fun.documentation: + if not fun.name in known_names: + print "Excluding (function):", fun, "as it returns (pointer)", i + fun.exclude() + for fun in mb.member_operators( allow_empty = True ): + if declarations.is_pointer (fun.return_type) and not fun.documentation: + for i in pointee_types: + if fun.return_type.decl_string.startswith ( i ) and not fun.documentation: + print "Excluding (operator):", fun + fun.exclude() + +def AutoExclude( mb, MAIN_NAMESPACE=None ): + """ Automaticaly exclude a range of things that don't convert well from C++ to Python + """ + global_ns = mb.global_ns + if MAIN_NAMESPACE: + main_ns = global_ns.namespace( MAIN_NAMESPACE ) + else: + main_ns = global_ns + + # vars that are static consts but have their values set in the header file are bad + Remove_Static_Consts ( main_ns ) + + ## Exclude protected and private that are not pure virtual + try: + query = declarations.access_type_matcher_t( 'private' ) \ + & ~declarations.virtuality_type_matcher_t( declarations.VIRTUALITY_TYPES.PURE_VIRTUAL ) + non_public_non_pure_virtual = main_ns.calldefs( query ) + non_public_non_pure_virtual.exclude() + except: + pass + + #Virtual functions that return reference could not be overriden from Python + try: + query = declarations.virtuality_type_matcher_t( declarations.VIRTUALITY_TYPES.VIRTUAL ) \ + & declarations.custom_matcher_t( lambda decl: declarations.is_reference( decl.return_type ) ) + main_ns.calldefs( query ).virtuality = declarations.VIRTUALITY_TYPES.NOT_VIRTUAL + except: + pass + +def AutoInclude( mb, MAIN_NAMESPACE=None ): + global_ns = mb.global_ns + if MAIN_NAMESPACE: + main_ns = global_ns.namespace( MAIN_NAMESPACE ) + else: + main_ns = global_ns + +def Set_DefaultCall_Policies( mb ): + """ set the return call policies on classes that this hasn't already been done for. + Set the default policy to deal with pointer/reference return types to reference_existing object + """ + mem_funs = mb.calldefs () + mem_funs.create_with_signature = True #Generated code will not compile on + #MSVC 7.1 if function has throw modifier. + for mem_fun in mem_funs: + if mem_fun.call_policies: + continue + if not mem_fun.call_policies and \ + (declarations.is_reference (mem_fun.return_type) or declarations.is_pointer (mem_fun.return_type) ): + mem_fun.call_policies = call_policies.return_value_policy( + call_policies.reference_existing_object ) + +def Remove_Static_Consts ( mb ): + """ linux users have compile problems with vars that are static consts AND have values set in the .h files + we can simply leave these out + This function is not currently used as source was fixed..""" + checker = varchecker.var_checker() + for var in mb.vars(): + if type(var.type) == declarations.cpptypes.const_t: + if checker( var ): + print "Excluding static const ", var + var.exclude() + +def Fix_Implicit_Conversions ( mb, ImplicitClasses=[] ): + """By default we disable explicit conversion, however sometimes it makes sense + """ + for className in ImplicitClasses: + mb.class_(className).constructors().allow_implicit_conversion = True + \ No newline at end of file Modified: trunk/python-ogre/code_generators/common_utils/extract_documentation.py =================================================================== --- trunk/python-ogre/code_generators/common_utils/extract_documentation.py 2007-09-29 06:46:30 UTC (rev 399) +++ trunk/python-ogre/code_generators/common_utils/extract_documentation.py 2007-09-29 11:18:47 UTC (rev 400) @@ -11,7 +11,7 @@ extracts doxigen styled documentation from source or generates from description """ - def __init__(self, startswith, outfile="documentation.dox"): + def __init__(self, startswith="", outfile="documentation.dox"): #for caching source self.file_name = None self.source = None Modified: trunk/python-ogre/code_generators/ogre/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/ogre/generate_code.py 2007-09-29 06:46:30 UTC (rev 399) +++ trunk/python-ogre/code_generators/ogre/generate_code.py 2007-09-29 11:18:47 UTC (rev 400) @@ -41,14 +41,12 @@ import common_utils.extract_documentation as exdoc import common_utils.var_checker as varchecker import common_utils.ogre_properties as ogre_properties -HACK = True -## small helper function -def docit ( general, i, o ): - docs = "Python-Ogre Modified Function Call\\n" + general +"\\n" - docs = docs + "Input: " + i + "\\n" - docs = docs + "Output: " + o + "\\n\\\n" - return docs +from common_utils import docit +HACK = True + +MAIN_NAMESPACE = 'Ogre' + ############################################################ ## ## Here is where we manually exclude stuff from Ogre - @@ -57,10 +55,13 @@ def ManualExclude ( mb ): global_ns = mb.global_ns - ogre_ns = global_ns.namespace( 'Ogre' ) + if MAIN_NAMESPACE: + main_ns = global_ns.namespace( MAIN_NAMESPACE ) + else: + main_ns = global_ns ## Specifically remove functions that we have wrapped in hand_made_wrappers.py - ogre_ns.class_( "RenderTarget" ).member_functions( 'getCustomAttribute' ).exclude() + main_ns.class_( "RenderTarget" ).member_functions( 'getCustomAttribute' ).exclude() # hand made wrapper to return correct types global_ns.class_('::Ogre::ResourceManager').mem_fun('getByName').exclude() @@ -91,69 +92,69 @@ ## Now get rid of a wide range of classes as defined earlier in startswith... for prefix in startswith: ### NOTE the PREFIX is used here !!!! - classes = ogre_ns.classes( common_utils.decl_starts_with(prefix), allow_empty=True) + classes = main_ns.classes( common_utils.decl_starts_with(prefix), allow_empty=True) classes.exclude() #AJM Set of functions in Particle system that don't get wrapped properly.. Rechecked 30Nov06 AJM ## Other 'Cmd..' classes are defined as _OgrePrivate, whereas these are not in the head file - PartSys = ogre_ns.class_( "ParticleSystem" ) + PartSys = main_ns.class_( "ParticleSystem" ) PartSys.class_( "CmdIterationInterval" ).exclude() PartSys.class_( "CmdLocalSpace" ).exclude() PartSys.class_( "CmdNonvisibleTimeout" ).exclude() PartSys.class_( "CmdSorted" ).exclude() ## Functions defined in .h files but not implemented in source files -# ogre_ns.class_('Root').mem_fun('termHandler').exclude() -# ogre_ns.class_( "StaticGeometry" ).class_("Region").member_functions('getLights').exclude() +# main_ns.class_('Root').mem_fun('termHandler').exclude() +# main_ns.class_( "StaticGeometry" ).class_("Region").member_functions('getLights').exclude() #exclude GpuLogicalIndexUseMap NOTE: Example use of Py++ to exclude a special variable........ - GpuLogicalBufferStruct = ogre_ns.class_( 'GpuLogicalBufferStruct' ) + GpuLogicalBufferStruct = main_ns.class_( 'GpuLogicalBufferStruct' ) GpuLogicalBufferStruct.variable( 'map' ).exclude() ## THIS IS A UNION - ogre_ns.class_('GpuProgramParameters').class_('AutoConstantEntry').variable('data').exclude() - v = ogre_ns.class_('GpuProgramParameters').class_('AutoConstantEntry').variable('fData') + main_ns.class_('GpuProgramParameters').class_('AutoConstantEntry').variable('data').exclude() + v = main_ns.class_('GpuProgramParameters').class_('AutoConstantEntry').variable('fData') v.exclude() # functions that take pointers to pointers - ogre_ns.class_( 'VertexElement').member_functions('baseVertexPointerToElement').exclude() ## now as a transformed funct + main_ns.class_( 'VertexElement').member_functions('baseVertexPointerToElement').exclude() ## now as a transformed funct mb.global_ns.mem_fun('::Ogre::InstancedGeometry::BatchInstance::getObjectsAsArray').exclude() #all constructors in this class are private, also some of them are public. - ogre_ns.free_functions ('any_cast').exclude () #not relevant for Python + main_ns.free_functions ('any_cast').exclude () #not relevant for Python #AttribParserList is a map from string to function pointer, this class could not be exposed - AttribParserList = ogre_ns.typedef( name="AttribParserList" ) + AttribParserList = main_ns.typedef( name="AttribParserList" ) declarations.class_traits.get_declaration( AttribParserList ).exclude() ## AJM Error at compile time - errors when compiling or linking - ogre_ns.calldefs ('peekNextPtr').exclude () - ogre_ns.calldefs ('peekNextValuePtr').exclude () #in many of the Iterator classes + main_ns.calldefs ('peekNextPtr').exclude () + main_ns.calldefs ('peekNextValuePtr').exclude () #in many of the Iterator classes - ogre_ns.class_( "ErrorDialog" ).exclude() # doesn't exist for link time - ogre_ns.class_( 'CompositorInstance').class_('RenderSystemOperation').exclude() # doesn't exist for link time - ogre_ns.class_( 'CompositorChain').mem_fun('_queuedOperation').exclude() #needs RenderSystemOperation + main_ns.class_( "ErrorDialog" ).exclude() # doesn't exist for link time + main_ns.class_( 'CompositorInstance').class_('RenderSystemOperation').exclude() # doesn't exist for link time + main_ns.class_( 'CompositorChain').mem_fun('_queuedOperation').exclude() #needs RenderSystemOperation ## changes due to expanded header file input try: - ogre_ns.class_('OptimisedUtil').mem_fun('softwareVertexSkinning').exclude # this isn't in the LINUX include for 1.4.1 + main_ns.class_('OptimisedUtil').mem_fun('softwareVertexSkinning').exclude # this isn't in the LINUX include for 1.4.1 except: pass - ogre_ns.class_('ShadowVolumeExtrudeProgram').variable('programNames').exclude() #funky string[8] problem + main_ns.class_('ShadowVolumeExtrudeProgram').variable('programNames').exclude() #funky string[8] problem ## now for problem areas in the new unicode string handling - just excluding without 'thought' :) ## the variables are not present in the source (to check) ## most of the functions return pointers to 'stuff' that isn't handled at compile time - ogre_ns.class_('UTFString').variable('mVoidBuffer').exclude() - ogre_ns.class_('UTFString').variable('mStrBuffer').exclude() - ogre_ns.class_('UTFString').variable('mWStrBuffer').exclude() - ogre_ns.class_('UTFString').variable('mUTF32StrBuffer').exclude() - ogre_ns.class_('UTFString').member_functions('at').exclude() - ogre_ns.class_('UTFString').mem_fun('c_str').exclude() - ogre_ns.class_('UTFString').mem_fun('data').exclude() - ogre_ns.class_('UTFString').mem_fun('asUTF32_c_str').exclude() + main_ns.class_('UTFString').variable('mVoidBuffer').exclude() + main_ns.class_('UTFString').variable('mStrBuffer').exclude() + main_ns.class_('UTFString').variable('mWStrBuffer').exclude() + main_ns.class_('UTFString').variable('mUTF32StrBuffer').exclude() + main_ns.class_('UTFString').member_functions('at').exclude() + main_ns.class_('UTFString').mem_fun('c_str').exclude() + main_ns.class_('UTFString').mem_fun('data').exclude() + main_ns.class_('UTFString').mem_fun('asUTF32_c_str').exclude() ## missing symbols at link time, including constructor and destructor! global_ns.class_('::Ogre::InstancedGeometry::MaterialBucket').mem_fun('getGeometryBucketList').exclude() @@ -176,21 +177,51 @@ # global_ns.class_('::Ogre::RenderQueueListener').mem_fun('renderQueueEnded').exclude() ## as we now include all protected functions tere are a couple of problem areas that popped up - ogre_ns.constructor("IndexData",arg_types=['::Ogre::IndexData const &']).exclude() + main_ns.constructor("IndexData",arg_types=['::Ogre::IndexData const &']).exclude() global_ns.class_('::Ogre::OverlayManager').\ mem_fun('destroyOverlayElementImpl', arg_types=['::Ogre::OverlayElement *',None] ).exclude() ## change due to CVS Ogre update (Thanks Dermont) - AttribParserList = ogre_ns.typedef( name="AttribParserList" ) + AttribParserList = main_ns.typedef( name="AttribParserList" ) declarations.class_traits.get_declaration( AttribParserList ).exclude() - ogre_ns.class_( 'MaterialSerializer' ).mem_fun('invokeParser').exclude() + main_ns.class_( 'MaterialSerializer' ).mem_fun('invokeParser').exclude() - ogre_ns.class_('OverlayManager' ).mem_fun('parseNewElement').exclude() + main_ns.class_('OverlayManager' ).mem_fun('parseNewElement').exclude() + #Exclude non default constructors of iterator classes. + for cls in main_ns.classes(): + if not declarations.templates.is_instantiation( cls.name ): + continue + name = declarations.templates.name( cls.name ) + if not name.endswith( 'Iterator' ): + continue + #default constructor does not have arguments + constructors = cls.constructors( lambda decl: bool( decl.arguments ) + , allow_empty=True + , recursive=False ) + constructors.exclude() + # and while we are here we have problems with '=' on these classes + try: + cls.operator('=').exclude() + except: + pass + ## Remove private classes , and those that are internal to Ogre... + private_decls = common_utils.private_decls_t(environment.ogre.include_dirs) + for cls in main_ns.classes(): + if private_decls.is_private( cls ): + cls.exclude() + print '{*} class "%s" is marked as private' % cls.decl_string + for func in main_ns.calldefs(): + if private_decls.is_private( func ): + if func.virtuality == declarations.VIRTUALITY_TYPES.PURE_VIRTUAL: + continue + func.exclude() + print '{*} function "%s" is marked as internal' % declarations.full_name( func ) + ############################################################ ## ## And there are things that manually need to be INCLUDED @@ -199,10 +230,10 @@ def ManualInclude ( mb ): global_ns = mb.global_ns - ogre_ns = global_ns.namespace( 'Ogre' ) + main_ns = global_ns.namespace( MAIN_NAMESPACE ) ## It's a structure that doesn't get included by default... - ogre_ns.class_("VertexBoneAssignment_s").include() + main_ns.class_("VertexBoneAssignment_s").include() # A couple of Std's that need exposing std_ns = global_ns.namespace("std") std_ns.class_("pair<unsigned, unsigned>").include() @@ -212,7 +243,7 @@ #RenderOperation class is marked as private, but I think this is a mistake - ogre_ns.class_('RenderOperation').include() + main_ns.class_('RenderOperation').include() ## Now we find all << operators and expose them as __str__ methods.. Makes "print xx" work nicely ## we simply include any relevant << operators and Py++/Boost does the work for us @@ -245,11 +276,11 @@ def ManualFixes ( mb ): global_ns = mb.global_ns - ogre_ns = global_ns.namespace( 'Ogre' ) + main_ns = global_ns.namespace( MAIN_NAMESPACE ) # return arrays ## const Vector3* ---- - for f in ogre_ns.mem_funs( return_type='::Ogre::Vector3 const *', allow_empty=True): + for f in main_ns.mem_funs( return_type='::Ogre::Vector3 const *', allow_empty=True): if f.name.startswith("get") and "Corner" in f.name: f.call_policies = call_policies.convert_array_to_tuple( 8, call_policies.memory_managers.none ) f.include() @@ -257,17 +288,17 @@ ### NOTE that we "include" things here again as they've probably been excluded in AutoFixes.. ## this one points to an array of [2] floats - c =ogre_ns.class_('BillboardChain').mem_fun('getOtherTextureCoordRange') + c =main_ns.class_('BillboardChain').mem_fun('getOtherTextureCoordRange') c.call_policies = call_policies.convert_array_to_tuple( 2, call_policies.memory_managers.none ) c.include() c.documentation=docit ("Return Type Change", "None", "Tuple with 2 floats's") ## and these ones return - c = ogre_ns.class_('Matrix4').operators('[]') + c = main_ns.class_('Matrix4').operators('[]') c.call_policies= call_policies.convert_array_to_tuple( 4, call_policies.memory_managers.none ) c.include() c.documentation=docit ("Return Type Change", "None", "Tuple with 4 floats's (the matrix 'line')") - c = ogre_ns.class_('Matrix3').operators('[]') + c = main_ns.class_('Matrix3').operators('[]') c.call_policies= call_policies.convert_array_to_tuple( 3, call_policies.memory_managers.none ) c.include() c.documentation=docit ("Return Type Change", "None", "Tuple with 3 floats's (the matrix 'line')") @@ -275,11 +306,11 @@ #VertexCacheProfiler constructor uses enum that will be defined later. #I will replace second default value to be int instead of enum #arg_types=[None,None] - 2 arguments, with whatever type - VertexCacheProfiler = ogre_ns.constructor( 'VertexCacheProfiler', arg_types=[None,None] ) + VertexCacheProfiler = main_ns.constructor( 'VertexCacheProfiler', arg_types=[None,None] ) VertexCacheProfiler.arguments[1].default_value = "int(%s)" % VertexCacheProfiler.arguments[1].default_value ### General fixes..... really only needed in Linux, but no harm in Windows - c = mb.namespace( 'Ogre' ).class_( 'Skeleton' ) + c = mb.namespace( MAIN_NAMESPACE ).class_( 'Skeleton' ) c.mem_fun( '_mergeSkeletonAnimations' ).arguments[-1].default_value = '::Ogre::StringVector()' @@ -321,7 +352,7 @@ # # # ensure functions that take UTFString can also take a python string -# # utf = ogre_ns.class_( 'UTFString' ) +# # utf = main_ns.class_( 'UTFString' ) # # def has_utf_type( utf, var ): # # res = declarations.is_same( utf, declarations.remove_const( var.type ) ) # # # # if "String" in var.type.decl_string: @@ -336,8 +367,8 @@ # # if res: # # print "UTFFIX", utf,var,var.type # # return res -# # ogre_ns.variables( lambda var: has_utf_type( utf, var ) ).use_make_functions = True -# # #ogre_ns.variables( lambda var: has_utf_type( utf, var ) ).apply_smart_ptr_wa = True +# # main_ns.variables( lambda var: has_utf_type( utf, var ) ).use_make_functions = True +# # #main_ns.variables( lambda var: has_utf_type( utf, var ) ).apply_smart_ptr_wa = True ## need some help here as the function overloads are causing issues f = global_ns.class_('::Ogre::GpuProgramParameters').\ @@ -350,19 +381,19 @@ f = global_ns.class_('::Ogre::GpuProgramParameters').\ mem_fun('setNamedConstant', arg_types=['::Ogre::String const &','float const *', None, None] ) - f.add_transformation( ft.modify_type('val',_ReturnUnsignedInt ), alias='setNamedConstantFloat' ) + f.add_transformation( ft.modify_type('val',common_utils._ReturnUnsignedInt ), alias='setNamedConstantFloat' ) f.documentation = docit ("Modified Input Argument (val) to work with CTypes", "Argument val takes a CTypes.adddressof(xx)", "...") f = global_ns.class_('::Ogre::GpuProgramParameters').\ mem_fun('setNamedConstant', arg_types=['::Ogre::String const &','double const *', None, None] ) - f.add_transformation( ft.modify_type('val',_ReturnUnsignedInt ), alias='setNamedConstantDouble' ) + f.add_transformation( ft.modify_type('val',common_utils._ReturnUnsignedInt ), alias='setNamedConstantDouble' ) f.documentation = docit ("Modified Input Argument (val) to work with CTypes", "Argument val takes a CTypes.adddressof(xx)", "...") f = global_ns.class_('::Ogre::GpuProgramParameters').\ mem_fun('setNamedConstant', arg_types=['::Ogre::String const &','int const *', None, None] ) - f.add_transformation( ft.modify_type('val',_ReturnUnsignedInt ), alias='setNamedConstantInt' ) + f.add_transformation( ft.modify_type('val',common_utils._ReturnUnsignedInt ), alias='setNamedConstantInt' ) f.documentation = docit ("Modified Input Argument (val) to work with CTypes", "Argument val takes a CTypes.adddressof(xx)", "...") @@ -396,7 +427,7 @@ ############################################################ def ManualTransformations ( mb ): - ns = mb.global_ns.namespace ('Ogre') + ns = mb.global_ns.namespace ( MAIN_NAMESPACE ) def create_output( size ): return [ ft.output( i ) for i in range( size ) ] @@ -629,121 +660,52 @@ ############################################################################### -def AutoExclude( mb ): - """ Automaticaly exclude a range of things that don't convert well from C++ to Python - """ - global_ns = mb.global_ns - ogre_ns = global_ns.namespace( 'Ogre' ) - - # vars that are static consts but have their values set in the header file are bad - Remove_Static_Consts ( ogre_ns ) - - ## Remove private classes , and those that are internal to Ogre... - private_decls = common_utils.private_decls_t(environment.ogre.include_dirs) - for cls in ogre_ns.classes(): - if private_decls.is_private( cls ): - cls.exclude() - print '{*} class "%s" is marked as private' % cls.decl_string - - for func in ogre_ns.calldefs(): - if private_decls.is_private( func ): - if func.virtuality == declarations.VIRTUALITY_TYPES.PURE_VIRTUAL: - continue - func.exclude() - print '{*} function "%s" is marked as internal' % declarations.full_name( func ) - - ## Exclude protected and private that are not pure virtual - query = ~declarations.access_type_matcher_t( 'public' ) \ - & ~declarations.virtuality_type_matcher_t( declarations.VIRTUALITY_TYPES.PURE_VIRTUAL ) - query = declarations.access_type_matcher_t( 'private' ) \ - & ~declarations.virtuality_type_matcher_t( declarations.VIRTUALITY_TYPES.PURE_VIRTUAL ) - non_public_non_pure_virtual = ogre_ns.calldefs( query ) - non_public_non_pure_virtual.exclude() - - #Virtual functions that return reference could not be overriden from Python - query = declarations.virtuality_type_matcher_t( declarations.VIRTUALITY_TYPES.VIRTUAL ) \ - & declarations.custom_matcher_t( lambda decl: declarations.is_reference( decl.return_type ) ) - ogre_ns.calldefs( query ).virtuality = declarations.VIRTUALITY_TYPES.NOT_VIRTUAL - - #Exclude non default constructors of iterator classes. - for cls in ogre_ns.classes(): - if not declarations.templates.is_instantiation( cls.name ): - continue - name = declarations.templates.name( cls.name ) - if not name.endswith( 'Iterator' ): - continue - #default constructor does not have arguments - constructors = cls.constructors( lambda decl: bool( decl.arguments ) - , allow_empty=True - , recursive=False ) - constructors.exclude() - # and while we are here we have problems with '=' on these classes - try: - cls.operator('=').exclude() - except: - pass - -def AutoInclude( mb ): - pass - - -def AutoFixes ( mb ): +def AutoFixes ( mb, MAIN_NAMESPACE ): """ now we fix a range of things automatically - typically by going through the entire name space trying to guess stuff and fix it:) - """ + """ global_ns = mb.global_ns - ogre_ns = global_ns.namespace( 'Ogre' ) + if MAIN_NAMESPACE: + main_ns = global_ns.namespace( MAIN_NAMESPACE ) + else: + main_ns = global_ns # arguments passed as refs but not const are not liked by boost - Fix_Ref_Not_Const ( ogre_ns ) + Fix_Ref_Not_Const ( main_ns ) - # Functions that have void pointers in their argument list need to change to unsigned int's - Fix_Void_Ptr_Args ( ogre_ns ) - # Allow conversion between Vectors/Colourvalue etc and Python lists Add_Auto_Conversions( mb ) # now we fix up the smart pointers ... - Set_Smart_Pointers ( ogre_ns ) + Set_Smart_Pointers ( main_ns ) + # Functions that have void pointers in their argument list need to change to unsigned int's + pointee_types=['unsigned int','int', 'float', '::Ogre::Real', '::Ogre::uchar', '::Ogre::uint8', + 'unsigned char', 'char', 'Matrices', 'Vertices'] + ignore_names=['Matrices', 'Vertices'] + common_utils.Fix_Void_Ptr_Args ( main_ns, pointee_types, ignore_names ) + # and change functions that return a variety of pointers to instead return unsigned int's - Fix_Pointer_Returns ( ogre_ns ) + pointee_types=['unsigned int','int', 'float', '::Ogre::Real', '::Ogre::uchar', '::Ogre::uint8', 'unsigned char', 'char'] + ignore_names=['ptr', 'useCountPointer'] # these are function names we know it's cool to exclude + common_utils.Fix_Pointer_Returns ( main_ns, pointee_types, ignore_names ) # functions that need to have implicit conversions turned off - Fix_Implicit_Conversions ( ogre_ns) + ImplicitClasses=['Radian','Degree', 'TimeIndex', 'LiSPSMShadowCameraSetup' ] + common_utils.Fix_Implicit_Conversions ( main_ns, ImplicitClasses ) if os.name =='nt': Fix_NT( mb ) elif os.name =='posix': Fix_Posix( mb ) - Auto_Document( mb ) + common_utils.Auto_Document( mb, MAIN_NAMESPACE ) ############################################################################### ## ## here are the helper functions that do much of the work ## ############################################################################### -def Auto_Document ( mb ): - """Indicate that the functions being exposed are declated protected or private in the C++ code - this should warn people to be careful using them :) """ - global_ns = mb.global_ns - ogre_ns = global_ns.namespace( 'Ogre' ) - - query = declarations.access_type_matcher_t( 'private' ) - for c in ogre_ns.calldefs( query, allow_empty=True ): - print "PRIVATE:", c - s = c.documentation - if not s: - s = "" - c.documentation="<<private declaration>>\\n"+s - query = declarations.access_type_matcher_t( 'protected' ) - for c in ogre_ns.calldefs( query, allow_empty=True ): - print "PROTECTED:", c - s = c.documentation - if not s: - s = "" - c.documentation="<<protected declaration>>\\n"+s def Fix_Posix ( mb ): @@ -757,18 +719,18 @@ mb.global_ns.class_('vector<int, std::allocator<int> >').alias='VectorInt' mb.global_ns.class_('vector<std::pair<unsigned, unsigned>, std::allocator<std::pair<unsigned, unsigned> > >').alias='VectorUnsignedUnsigned' #as reported by mike with linux:bp::arg("flags")=(std::_Ios_Fmtflags)0 - mb.namespace( 'Ogre' ).class_('StringConverter').member_functions('toString').exclude() + mb.namespace( MAIN_NAMESPACE ).class_('StringConverter').member_functions('toString').exclude() ## grab the operator== and operator!= and exclude them ## NOTE: Defination for these are "extern bool..." so I wonder if we should exclude any "extern" operators - for o in mb.namespace('Ogre').free_operators(arg_types=['::Ogre::ShadowTextureConfig const &', + for o in mb.namespace( MAIN_NAMESPACE ).free_operators(arg_types=['::Ogre::ShadowTextureConfig const &', '::Ogre::ShadowTextureConfig const &'], allow_empty=True): o.exclude() ## And even though we have excluded the operators we also need to exclude the equality ## otherwise it causes undefined symbols __ZN4OgreeqERKNS_19ShadowTextureConfigES2_ ## -- change file is --_ShadowTextureConfig__value_traits.pypp.hpp - c = mb.namespace( 'Ogre' ).class_( 'ShadowTextureConfig' ) + c = mb.namespace( MAIN_NAMESPACE ).class_( 'ShadowTextureConfig' ) c.equality_comparable = False ## handle a problem hashmap @@ -781,7 +743,7 @@ """ fixup for NT systems """ mb.global_ns.class_( 'vector<Ogre::Vector4, std::allocator<Ogre::Vector4> >' ).exclude( ) - Skeleton = mb.namespace( 'Ogre' ).class_( 'Skeleton' ).constructors().exclude() + Skeleton = mb.namespace( MAIN_NAMESPACE ).class_( 'Skeleton' ).constructors().exclude() ## handle the hashmaps -- TODO FIX under LINUX ??? stdex_ns = mb.global_ns.namespace("stdext") @@ -795,22 +757,7 @@ _iobuf = mb.global_ns.class_("_iobuf")# need the file handle in Ogre::FileHandleDataStream::FileHandleDataStream _iobuf.opaque = True - - -def Fix_Implicit_Conversions ( mb ): - """By default we disable explicit conversion, however sometimes it makes sense - """ - ImplicitClasses=['Radian','Degree', 'TimeIndex', 'LiSPSMShadowCameraSetup' ] - # AnimationStateControllerValue, Any, SceneQuery, - # BorderRenderable, SceneNode, CompositionPass, CompositionTargetPass, CompositionTechnique - # CompositorChain, CompositorInstance::TargetOperation, TextureUnitState, DefaultAxisAlignedBoxSceneQuery - # DefaultIntersectionSceneQuery, DefaultPlaneBoundedVolumeListSceneQuery, DefaultRaySceneQuery - # DefaultSphereSceneQuery, DefaultSceneManager, - for className in ImplicitClasses: - mb.class_(className).constructors().allow_implicit_conversion = True - - def Fix_Ref_Not_Const ( mb ): """ we have problems with sharedpointer arguments that are defined as references but are NOT const. Boost doesn't understand how to match them and you get a C++ Signature match fails. @@ -855,23 +802,6 @@ custom_rvalue_path = os.path.join( os.path.abspath(os.path.dirname(__file__) ) , 'custom_rvalue.cpp' ) - - -def Set_Call_Policies( mb ): - """ set the return call policies on classes that this hasn't already been done for. - Set the default policy to deal with pointer/reference return types to reference_existing object - """ - mem_funs = mb.calldefs () - mem_funs.create_with_signature = True #Generated code will not compile on - #MSVC 7.1 if function has throw modifier. - for mem_fun in mem_funs: - if mem_fun.call_policies: - continue - if not mem_fun.call_policies and \ - (declarations.is_reference (mem_fun.return_type) or declarations.is_pointer (mem_fun.return_type) ): - mem_fun.call_policies = call_policies.return_value_policy( - call_policies.reference_existing_object ) - def Set_Smart_Pointers( mb ): """ we need to identify 'smart pointers' which are any of the SharedPtr classes @@ -907,7 +837,7 @@ #~ """We don't exclude Exception, because it contains functionality, that could #~ be useful to user. But, we will provide automatic exception translator #~ """ - #~ Exception = mb.namespace( 'Ogre' ).class_( 'Exception' ) + #~ Exception = mb.namespace( MAIN_NAMESPACE ).class_( 'Exception' ) #~ Exception.include() #~ Exception.mem_fun('what').exclude() # declared with empty throw #~ Exception.mem_fun('getNumber').exclude() # declared with empty throw @@ -917,138 +847,7 @@ #~ # # for c in Exception.constructors(arg_types=[None]): #~ # # c.exclude() ## exclude the first constructor.. #~ # # break - - -def _ReturnUnsignedInt( type_ ): - """helper to return an UnsignedInt call for tranformation functions - """ - return declarations.cpptypes.unsigned_int_t() - -def Fix_Void_Ptr_Args ( mb ): - """ we modify functions that take void *'s in their argument list to instead take - unsigned ints, which allows us to use CTypes buffers - """ -# for fun in mb.class_('PixelUtil').member_functions('unpackColour') : -# print "Function:", fun -# for arg in fun.arguments: -# print arg -# print arg.type -# print "Const", declarations.is_const(arg.type) -# print "pointer", declarations.is_pointer(arg.type) -# print "Void", declarations.is_void(arg.type) -# print arg.type.decl_string -# sys.exit() - - for fun in mb.member_functions(): - arg_position = 0 - for arg in fun.arguments: - if arg.type.decl_string == 'void const *' or arg.type.decl_string == 'void *': - fun.add_transformation( ft.modify_type(arg_position,_ReturnUnsignedInt ), alias=fun.name ) - fun.documentation = docit ("Modified Input Argument to work with CTypes", - "Argument "+arg.name+ "(pos:" + str(arg_position)\ - +") takes a CTypes.adddressof(xx)", "...") - #print "Fixed Void Ptr", fun, arg_position - break - arg_position +=1 - - ## lets go and look for stuff that might be a problem - pointee_types=['unsigned int','int', 'float', '::Ogre::Real', '::Ogre::uchar', '::Ogre::uint8', - 'unsigned char', 'Matrices', 'Vertices'] - function_names=['Matrices', 'Vertices'] - for fun in mb.member_functions(): - if fun.documentation or fun.ignore: continue ## means it's been tweaked somewhere else - for n in function_names: - if n in fun.name: - print "CHECK :", fun - break - arg_position = 0 - for arg in fun.arguments: - if declarations.is_pointer(arg.type): ## and "const" not in arg.type.decl_string: - for i in pointee_types: - if i in arg.type.decl_string: - print "CHECK ", fun, str(arg_position) - fun.documentation=docit("SUSPECT - MAYBE BROKEN", "....", "...") - break - arg_position +=1 -## NEED To do the same for constructors - for fun in mb.constructors(): - arg_position = 0 - for arg in fun.arguments: - if declarations.is_pointer(arg.type): ## and "const" not in arg.type.decl_string: - for i in pointee_types: - if i in arg.type.decl_string: - print "Excluding: ", fun - fun.exclude() - break - arg_position +=1 - - - ## Now we look for pointers to particular types and decide what to do with them?? -# # # pointee_types=['unsigned int','int', 'float', '::Ogre::Real', '::Ogre::uchar', '::Ogre::uint8', -# # # 'unsigned char', '::Ogre::Matrix4'] -# # # for fun in mb.member_functions(): -# # # arg_position = 0 -# # # trans=[] -# # # desc="" -# # # for arg in fun.arguments: -# # # if declarations.is_pointer(arg.type) and "const" not in arg.type.decl_string: -# # # for i in pointee_types: -# # # if arg.type.decl_string.startswith ( i ): -# # # trans.append(ft.output (arg_position ) ) -# # # desc = desc + " Transform " + arg.name + " (position:" + str(arg_position) +") as an output." -# # # break -# # # arg_position +=1 -# # # if trans: -# # # print "Tranformation applied to ", fun, desc -# # # fun.add_transformation ( * trans ) -# # # fun.documentation = "Python-Ogre: Function Modified\\n\\\n" + desc - - - -def Fix_Pointer_Returns ( mb ): - """ Change out functions that return a variety of pointer to base types and instead - have them return the address the pointer is pointing to (the pointer value) - This allow us to use CTypes to handle in memory buffers from Python - - Also - if documentation has been set then ignore the class/function as it means it's been tweaked else where - """ - pointee_types=['unsigned int','int', 'float', '::Ogre::Real', '::Ogre::uchar', '::Ogre::uint8', 'unsigned char'] - known_names=['ptr', 'useCountPointer'] # these are function names we know it's cool to exclude - for fun in mb.member_functions(): - if declarations.is_pointer (fun.return_type) and not fun.documentation: - for i in pointee_types: - if fun.return_type.decl_string.startswith ( i ) and not fun.documentation: - if not fun.name in known_names: - print "Excluding (function):", fun, "as it returns (pointer)", i - fun.exclude() - for fun in mb.member_operators(): - if declarations.is_pointer (fun.return_type) and not fun.documentation: - for i in pointee_types: - if fun.return_type.decl_string.startswith ( i ) and not fun.documentation: - print "Excluding (operator):", fun - fun.exclude() - - - -def query_containers_with_ptrs(decl): - if not isinstance( decl, declarations.class_types ): - return False - if not decl.indexing_suite: - return False - return declarations.is_pointer( decl.indexing_suite.element_type ) - - -def Remove_Static_Consts ( mb ): - """ linux users have compile problems with vars that are static consts AND have values set in the .h files - we can simply leave these out """ - checker = varchecker.var_checker() - for var in mb.vars(): - if type(var.type) == declarations.cpptypes.const_t: - if checker( var ): - print "Excluding static const ", var - var.exclude() - # # the 'main'function # @@ -1069,8 +868,8 @@ , messages.W1031 , messages.W1035 , messages.W1040 + , messages.W1041 # overlapping names when creating a property , messages.W1038 -# # , messages.W1041 # properties that aren't exposed , messages.W1036 # pointer to Python immutable member , messages.W1033 # unnamed variables , messages.W1018 # expose unnamed classes @@ -1116,29 +915,25 @@ # global_ns = mb.global_ns global_ns.exclude() - ogre_ns = global_ns.namespace( 'Ogre' ) - ogre_ns.include() + main_ns = global_ns.namespace( MAIN_NAMESPACE ) + main_ns.include() -# # ogre_ns.class_( "StaticGeometry" ).class_("Region").include() -# # ogre_ns.class_( "StaticGeometry" ).class_("LODBucket").include() -# # ogre_ns.class_( "StaticGeometry" ).class_("MaterialBucket").include() - - AutoExclude ( mb ) + + common_utils.AutoExclude ( mb, MAIN_NAMESPACE ) ManualExclude ( mb ) - AutoInclude ( mb ) + common_utils.AutoInclude ( mb, MAIN_NAMESPACE ) ManualInclude ( mb ) # here we fixup functions that expect to modifiy their 'passed' variables ManualTransformations ( mb ) ManualAlias ( mb ) - AutoFixes ( mb ) + AutoFixes ( mb, MAIN_NAMESPACE ) ManualFixes ( mb ) - #Py++ can not expose static pointer member variables - ogre_ns.vars( 'ms_Singleton' ).disable_warnings( messages.W1035 ) + main_ns.vars( 'ms_Singleton' ).disable_warnings( messages.W1035 ) # Ogre is "special" in that some classes are unnnamed and need fixing - common_utils.fix_unnamed_classes( ogre_ns.classes( name='' ), 'Ogre' ) + common_utils.fix_unnamed_classes( main_ns.classes( name='' ), 'Ogre' ) common_utils.configure_shared_ptr(mb) @@ -1147,19 +942,15 @@ # # We need to tell boost how to handle calling (and returning from) certain functions # - Set_Call_Policies ( mb.global_ns.namespace ('Ogre') ) + common_utils.Set_DefaultCall_Policies ( mb.global_ns.namespace ( MAIN_NAMESPACE ) ) # # the manual stuff all done here !!! # hand_made_wrappers.apply( mb ) -# # cls= ogre_ns.class_( "Camera" ) -# # cls.add_properties( recognizer=ogre_properties.ogre_property_recognizer_t() ) -# # sys.exit() -# # NoPropClasses = ["UTFString"] - for cls in ogre_ns.classes(): + for cls in main_ns.classes(): if cls.name not in NoPropClasses: cls.add_properties( recognizer=ogre_properties.ogre_property_recognizer_t() ) common_utils.remove_DuplicateProperties ( cls ) @@ -1177,7 +968,7 @@ # Creating the code. After this step you should not modify/customize declarations. # ########################################################################################## - extractor = exdoc.doc_extractor( "Ogre" ) # I'm excluding the UTFstring docs as lots about nothing + extractor = exdoc.doc_extractor( "Ogre" ) mb.build_code_creator (module_name='_ogre_' , doc_extractor= extractor ) for inc in environment.ogre.include_dirs: Added: trunk/python-ogre/code_generators/ogrebulletc/customization_data.py =================================================================== --- trunk/python-ogre/code_generators/ogrebulletc/customization_data.py (rev 0) +++ trunk/python-ogre/code_generators/ogrebulletc/customization_data.py 2007-09-29 11:18:47 UTC (rev 400) @@ -0,0 +1,7 @@ + +def header_files( version ): + return [ 'OgreBulletCollisions.h'] + +def huge_classes( version ): + return [] + \ No newline at end of file Added: trunk/python-ogre/code_generators/ogrebulletc/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/ogrebulletc/generate_code.py (rev 0) +++ trunk/python-ogre/code_generators/ogrebulletc/generate_code.py 2007-09-29 11:18:47 UTC (rev 400) @@ -0,0 +1,292 @@ +#!/usr/bin/env python +# ----------------------------------------------------------------------------- +# This source file is part of Python-Ogre and is covered by the LGPL +# For the latest info, see http://python-ogre.org/ +# +# ----------------------------------------------------------------------------- + +## STARTER TEMPLATE.. +## replace ogrebullet with lowercase project name +## set MAIN_NAMESPACE +## rename and configure .h files + + +import os, sys, time, shutil + +#add environment to the path +sys.path.append( os.path.join( '..', '..' ) ) +#add common utils to the pass +sys.path.append( '..' ) +sys.path.append( '.' ) + +import environment +import common_utils +import customization_data +import hand_made_wrappers + +from pygccxml import parser +from pygccxml import declarations +from pyplusplus import messages +from pyplusplus import module_builder +from pyplusplus import decl_wrappers + +from pyplusplus import function_transformers as ft +from pyplusplus.module_builder import call_policies +from pyplusplus.module_creator import sort_algorithms + +import common_utils.extract_documentation as exdoc +import common_utils.var_checker as varchecker +import common_utils.ogre_properties as ogre_properties +from common_utils import docit + +MAIN_NAMESPACE = 'OgreBulletCollisions' + +############################################################ +## +## Here is where we manually exclude stuff +## +############################################################ + +def ManualExclude ( mb ): + global_ns = mb.global_ns + if MAIN_NAMESPACE: + main_ns = global_ns.namespace( MAIN_NAMESPACE ) + else: + main_ns = global_ns + +############################################################ +## +## And there are things that manually need to be INCLUDED +## +############################################################ + +def ManualInclude ( mb ): + global_ns = mb.global_ns + if MAIN_NAMESPACE: + main_ns = global_ns.namespace( MAIN_NAMESPACE ) + else: + main_ns = global_ns + +############################################################ +## +## And things that need manual fixes, but not necessarly hand wrapped +## +############################################################ +def ManualFixes ( mb ): + global_ns = mb.global_ns + if MAIN_NAMESPACE: + main_ns = global_ns.namespace( MAIN_NAMESPACE ) + else: + main_ns = global_ns + +############################################################ +## +## And things that need to have their argument and call values fixed. +## ie functions that pass pointers in the argument list and of course we need +## to read the updated values - so instead we pass them back +## as new values in a tuple (ETC ETC) +## +############################################################ + +def ManualTransformations ( mb ): + global_ns = mb.global_ns + if MAIN_NAMESPACE: + main_ns = global_ns.namespace( MAIN_NAMESPACE ) + else: + main_ns = global_ns + + def create_output( size ): + return [ ft.output( i ) for i in range( size ) ] + + ... [truncated message content] |
From: <and...@us...> - 2007-09-30 01:40:45
|
Revision: 402 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=402&view=rev Author: andy_miller Date: 2007-09-29 18:40:48 -0700 (Sat, 29 Sep 2007) Log Message: ----------- more Linux fixes -- ogreal now compiles/builds Modified Paths: -------------- trunk/python-ogre/SConstruct trunk/python-ogre/code_generators/common_utils/extract_documentation.py trunk/python-ogre/code_generators/ode/customization_data.py trunk/python-ogre/code_generators/ogreal/generate_code.py trunk/python-ogre/environment.py trunk/python-ogre/scripts/00-PreReqs.sh trunk/python-ogre/scripts/01-RetrieveSource.sh trunk/python-ogre/scripts/02-ExtractAndPatch.sh trunk/python-ogre/scripts/04-BuildAdditionalLibs.sh trunk/python-ogre/scripts/06-GenerateCode.sh trunk/python-ogre/scripts/07-BuildModules.sh trunk/python-ogre/scripts/master.sh Modified: trunk/python-ogre/SConstruct =================================================================== --- trunk/python-ogre/SConstruct 2007-09-30 00:45:10 UTC (rev 401) +++ trunk/python-ogre/SConstruct 2007-09-30 01:40:48 UTC (rev 402) @@ -155,10 +155,13 @@ ## ugly hack - scons returns a list of targets from SharedLibrary - we have to choose the one we want index = 0 # this is the index into a list of targets - '0' should be the platform default - - ## and lets have it install the output into the 'package_dir_name/ModuleName' dir and rename to the PydName - _env.AddPostAction(package,\ - 'mt.exe -nologo -manifest %(name)s.manifest -outputresource:%(name)s;2' % { 'name':package[index] } ) + if os.name=="nt": + ## and lets have it install the output into the 'package_dir_name/ModuleName' dir and rename to the PydName + _env.AddPostAction(package,\ + 'mt.exe -nologo -manifest %(name)s.manifest -outputresource:%(name)s;2' % { 'name':package[index] } ) + else: + _env.AddPostAction(package,\ + 'strip -g -S -d --strip-debug -s %(name)s' % { 'name':package[index] } ) _env.InstallAs(os.path.join(environment.package_dir_name, cls.parent, cls.ModuleName, cls.PydName), Modified: trunk/python-ogre/code_generators/common_utils/extract_documentation.py =================================================================== --- trunk/python-ogre/code_generators/common_utils/extract_documentation.py 2007-09-30 00:45:10 UTC (rev 401) +++ trunk/python-ogre/code_generators/common_utils/extract_documentation.py 2007-09-30 01:40:48 UTC (rev 402) @@ -245,4 +245,4 @@ print doc_extractor("")(x_decl("myfunc(int x, int y)","c:/development/ocvs/ogrenew/ogremain/include/OgreSceneManager.h",218)) print doc_extractor("")(x_decl("","c:/development/ocvs/ogrenew/ogremain/include/OgreSceneManager.h",223)) - print doc_extractor("")(x_decl("","c:/development/CEGUI-0.5.0/include/CEGUIEvent.h",139)) \ No newline at end of file + print doc_extractor("")(x_decl("","c:/development/CEGUI-0.5.0/include/CEGUIEvent.h",139)) Modified: trunk/python-ogre/code_generators/ode/customization_data.py =================================================================== --- trunk/python-ogre/code_generators/ode/customization_data.py 2007-09-30 00:45:10 UTC (rev 401) +++ trunk/python-ogre/code_generators/ode/customization_data.py 2007-09-30 01:40:48 UTC (rev 402) @@ -2,7 +2,7 @@ return [ 'ode/ode.h', 'ode/odecpp.h', 'ode/odecpp_collision.h', - 'Opcode.h', + ##'Opcode.h', 'return_pointee_value.hpp' ] Modified: trunk/python-ogre/code_generators/ogreal/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/ogreal/generate_code.py 2007-09-30 00:45:10 UTC (rev 401) +++ trunk/python-ogre/code_generators/ogreal/generate_code.py 2007-09-30 01:40:48 UTC (rev 402) @@ -223,7 +223,7 @@ # ########################################################################################## extractor = exdoc.doc_extractor("") - mb.build_code_creator (module_name='_ogreal_' , doc_extractor= extractor) + mb.build_code_creator (module_name='_ogreal_' ) #, doc_extractor= extractor) for inc in environment.ogreal.include_dirs: mb.code_creator.user_defined_directories.append(inc ) Modified: trunk/python-ogre/environment.py =================================================================== --- trunk/python-ogre/environment.py 2007-09-30 00:45:10 UTC (rev 401) +++ trunk/python-ogre/environment.py 2007-09-30 01:40:48 UTC (rev 402) @@ -545,12 +545,19 @@ ] if os.name =='nt': - CCFLAGS = ' -DOgreAL_Export="" -DWIN32 -DNDEBUG -D_LIB -D_WIN32 -D_WINDOWS -DVORBIS_IEEE_FLOAT32 -D_USE_NON_INTEL_COMPILER ' - libs=[Config.LIB_Boost, 'OgreMain', - 'ogg_static', - 'alut', - 'vorbis_static','vorbisfile_static','vorbisenc_static', - 'OpenAL32', 'EFX-Util'] ## 'OgreAL' -- going to compile OgreAL ourselves + CCFLAGS = ' -DOgreAL_Export="" -DWIN32 -DNDEBUG -D_LIB -D_WIN32 -D_WINDOWS -DVORBIS_IEEE_FLOAT32 -D_USE_NON_INTEL_COMPILER ' + if os.name=="nt": + libs=[Config.LIB_Boost, 'OgreMain', + 'ogg_static', + 'alut', + 'vorbis_static','vorbisfile_static','vorbisenc_static', + 'OpenAL32', 'EFX-Util'] ## 'OgreAL' -- going to compile OgreAL ourselves + else: + libs=[Config.LIB_Boost, 'OgreMain', + 'ogg', + 'alut', + 'vorbis','vorbisfile','vorbisenc', + 'openal' ] ## 'OgreAL' -- going to compile OgreAL ourselves ModuleName = 'OgreAL' CheckIncludes = ['OgreAL.h'] active=True Modified: trunk/python-ogre/scripts/00-PreReqs.sh =================================================================== --- trunk/python-ogre/scripts/00-PreReqs.sh 2007-09-30 00:45:10 UTC (rev 401) +++ trunk/python-ogre/scripts/00-PreReqs.sh 2007-09-30 01:40:48 UTC (rev 402) @@ -3,4 +3,4 @@ sudo apt-get install g++ libfreetype6-dev libpcre3-dev autoconf automake1.9 libgl1-mesa-dev libx11-dev \ libglut3-dev libtool libxaw7-dev libxxf86vm-dev \ libxrandr-dev cvs subversion libxt-dev libexpat1-dev python python-dev \ -python-celementtree libglew-dev libzzip-dev scons +python-celementtree libglew-dev libzzip-dev Modified: trunk/python-ogre/scripts/01-RetrieveSource.sh =================================================================== --- trunk/python-ogre/scripts/01-RetrieveSource.sh 2007-09-30 00:45:10 UTC (rev 401) +++ trunk/python-ogre/scripts/01-RetrieveSource.sh 2007-09-30 01:40:48 UTC (rev 402) @@ -24,19 +24,15 @@ $WGET http://www.newtondynamics.com/downloads/newtonLinux-1.53.tar.gz $WGET http://www.openal.org/openal_webstf/downloads/openal-0.0.8.tar.gz $WGET http://www.openal.org/openal_webstf/downloads/freealut-1.1.0.tar.gz +$WGET http://downloads.xiph.org/releases/ogg/libogg-1.1.3.tar.gz +$WGET http://downloads.xiph.org/releases/vorbis/libvorbis-1.2.0.tar.gz ##$WGET http://devfiles.ageia.com/Physx_2.7.2_SDK_CoreLinux_deb.tar.gz popd cd $INSTALL_DIR -echo " -- getting OgreAL" -# svn co https://ogreal.svn.sourceforge.net/svnroot/ogreal/trunk/OgreAL-Eihort OgreAL -echo " -- getting NxOgre" -svn co http://latest.nxogre.org/nxogre3/ NxOgre echo " -- getting pygccxml" svn co https://pygccxml.svn.sourceforge.net/svnroot/pygccxml pygccxml echo " -- getting python-ogre" svn co https://python-ogre.svn.sourceforge.net/svnroot/python-ogre/trunk/python-ogre python-ogre -echo " -- getting quickgui" -# svn co --username anyone --password nopassword svn://www.stellarcommand.com/QuickGUI/trunk/src/ quickgui echo " -- getting gccxml" cvs -z3 -q -d :pserver:an...@ww...:/cvsroot/GCC_XML co gccxml echo " -- getting ogreode" @@ -45,7 +41,10 @@ cvs -z3 -q -d :pserver:ano...@cv...:/cvsroot/ogre co -P ogreaddons/ogrenewt echo " -- getting videoplugins" cvs -z3 -q -d :pserver:ano...@cv...:/cvsroot/ogre co -P ogreaddons/videoplugin - +echo " -- getting ogrebullet" +cvs -z3 -q -d :pserver:ano...@cv...:/cvsroot/ogre co -P ogreaddons/ogrebullet +echo " -- getting NxOgre" +svn co http://latest.nxogre.org/nxogre3/ NxOgre echo "" echo "======= Sources Retrieved =======" echo "" Modified: trunk/python-ogre/scripts/02-ExtractAndPatch.sh =================================================================== --- trunk/python-ogre/scripts/02-ExtractAndPatch.sh 2007-09-30 00:45:10 UTC (rev 401) +++ trunk/python-ogre/scripts/02-ExtractAndPatch.sh 2007-09-30 01:40:48 UTC (rev 402) @@ -21,6 +21,11 @@ unzip -q -o $DOWNLOADS/ode-src-0.8.zip echo " -- Unpacking bullet" tar zxf $DOWNLOADS/bullet-2.62a.tgz +echo " -- Unpacking OgreAL Support" +tar zxf $DOWNLOADS/libogg-1.1.3.tar.gz +tar zxf $DOWNLOADS/libvorbis-1.2.0.tar.gz +tar zxf $DOWNLOADS/freealut-1.1.0.tar.gz +tar zxf $DOWNLOADS/openal-0.0.8.tar.gz echo " -- Unpacking CG" pushd $ROOT Modified: trunk/python-ogre/scripts/04-BuildAdditionalLibs.sh =================================================================== --- trunk/python-ogre/scripts/04-BuildAdditionalLibs.sh 2007-09-30 00:45:10 UTC (rev 401) +++ trunk/python-ogre/scripts/04-BuildAdditionalLibs.sh 2007-09-30 01:40:48 UTC (rev 402) @@ -28,3 +28,40 @@ # # OgreAl # +echo " -- Building OgreAL - libogg" +pushd libogg-1.1.3 +./configure --prefix=$PREFIX +make +make install +popd + +echo " -- Building OgreAL - libvorbis" +pushd libvorbis-1.2.0 +./configure --prefix=$PREFIX +make +make install +popd + +echo " -- Building OgreAL - openal" +pushd openal-0.0.8 +./autogen.sh +./configure --prefix=$PREFIX +make +make install +popd + +echo " -- Building OgreAL - freealut" +pushd freealut-1.1.0 +./autogen.sh +./configure --prefix=$PREFIX +## ugly hack as the make files in freealut don't really handle a non standard prefix +cp $PREFIX/include/AL/* ./include/AL +make +make install +popd + +# +# Bullet +# +##pushd bullet-2.62a + Modified: trunk/python-ogre/scripts/06-GenerateCode.sh =================================================================== --- trunk/python-ogre/scripts/06-GenerateCode.sh 2007-09-30 00:45:10 UTC (rev 401) +++ trunk/python-ogre/scripts/06-GenerateCode.sh 2007-09-30 01:40:48 UTC (rev 402) @@ -48,11 +48,6 @@ cd ogreode python generate_code.py > build.out cd .. -echo ' -- creating OpCode code' -echo ' -- creating OpCode code'>> $INSTALL_DIR/log.out -cd opcode -python generate_code.py > build.out -cd .. echo ' -- creating PLIB code' echo ' -- creating PLIB code'>> $INSTALL_DIR/log.out cd plib @@ -68,10 +63,10 @@ cd ogrenewt python generate_code.py > build.out cd .. -#echo ' -- creating ode code' -#cd ode -#python generate_code.py > build.out - +echo ' -- creating ode code' +cd ode +python generate_code.py > build.out +cd .. fi cd $INSTALL_DIR echo Modified: trunk/python-ogre/scripts/07-BuildModules.sh =================================================================== --- trunk/python-ogre/scripts/07-BuildModules.sh 2007-09-30 00:45:10 UTC (rev 401) +++ trunk/python-ogre/scripts/07-BuildModules.sh 2007-09-30 01:40:48 UTC (rev 402) @@ -12,10 +12,10 @@ then scons PROJECTS=$1 else - scons PROJECTS=ogre,ois,quickgui,cegui,plib,ogreode,ogrenewt + scons PROJECTS=ogre,ois,quickgui,cegui,plib,ogreode,ogrenewt,ogreal fi -#ogre,ois,quickgui,cegui,plib,ogreode -#,ogrerefapp +#opcode -- not really suited to a linux build -- lots of work needed ? +# python setup.py install --prefix=$PREFIX cd .. Modified: trunk/python-ogre/scripts/master.sh =================================================================== --- trunk/python-ogre/scripts/master.sh 2007-09-30 00:45:10 UTC (rev 401) +++ trunk/python-ogre/scripts/master.sh 2007-09-30 01:40:48 UTC (rev 402) @@ -1,12 +1,12 @@ #!/bin/bash # Part of the Python-Ogre installation # Run them all :) -#source ./00-PreReqs.sh -#source ./01-RetrieveSource.sh -#source ./02-ExtractAndPatch.sh -#source ./03-BuildBaseLibs.sh -#source ./05-BuildTools.sh -#source ./04-BuildAdditionalLibs.sh +source ./00-PreReqs.sh +source ./01-RetrieveSource.sh +source ./02-ExtractAndPatch.sh +source ./05-BuildTools.sh +source ./03-BuildBaseLibs.sh +source ./04-BuildAdditionalLibs.sh source ./06-GenerateCode.sh source ./07-BuildModules.sh This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2007-10-01 15:10:34
|
Revision: 404 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=404&view=rev Author: andy_miller Date: 2007-10-01 08:10:25 -0700 (Mon, 01 Oct 2007) Log Message: ----------- Updated Quickgui and Demo/Media files/layout Extra media directory for demos needing video and sound.. Modified Paths: -------------- trunk/python-ogre/ThirdParty/quickgui/QuickGUIComboBox.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIHorizontalScrollBar.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUILabel.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUILabel.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIList.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIList.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIListItem.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIListItem.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIManager.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIManager.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIMenuList.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIMouseCursor.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIPoint.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIProgressBar.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIProgressBar.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIQuad.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIQuad.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIRect.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIScrollPane.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIScrollPane.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIText.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIText.h trunk/python-ogre/ThirdParty/quickgui/QuickGUITextBox.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUITitleBar.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIVerticalScrollBar.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIWidget.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIWidget.h trunk/python-ogre/demos/dshow/resources.cfg trunk/python-ogre/demos/ffmpeg/resources.cfg trunk/python-ogre/demos/theora/resources.cfg Added Paths: ----------- trunk/python-ogre/ThirdParty/quickgui/QuickGUIBorder.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIBorder.h trunk/python-ogre/demos/media_extra/ trunk/python-ogre/demos/media_extra/clock.ogg trunk/python-ogre/demos/media_extra/fish.avi trunk/python-ogre/demos/media_extra/liberty.mid trunk/python-ogre/demos/qgui/ trunk/python-ogre/demos/qgui/Demo_QuickGUI01.py trunk/python-ogre/demos/qgui/SampleFramework.py trunk/python-ogre/demos/qgui/media/ trunk/python-ogre/demos/qgui/media/fonts/ trunk/python-ogre/demos/qgui/media/fonts/ACMESA.TTF trunk/python-ogre/demos/qgui/media/fonts/acmesa.fontdef trunk/python-ogre/demos/qgui/media/materials/ trunk/python-ogre/demos/qgui/media/materials/scripts/ trunk/python-ogre/demos/qgui/media/materials/scripts/Example.material trunk/python-ogre/demos/qgui/media/materials/textures/ trunk/python-ogre/demos/qgui/media/materials/textures/evening_BK.jpg trunk/python-ogre/demos/qgui/media/materials/textures/evening_DN.jpg trunk/python-ogre/demos/qgui/media/materials/textures/evening_FR.jpg trunk/python-ogre/demos/qgui/media/materials/textures/evening_LF.jpg trunk/python-ogre/demos/qgui/media/materials/textures/evening_RT.jpg trunk/python-ogre/demos/qgui/media/materials/textures/evening_UP.jpg trunk/python-ogre/demos/qgui/media/materials/textures/ogrelogo.png trunk/python-ogre/demos/qgui/media/materials/textures/r2skin.jpg trunk/python-ogre/demos/qgui/media/materials/textures/rockwall.tga trunk/python-ogre/demos/qgui/media/materials/textures/temp.png trunk/python-ogre/demos/qgui/media/models/ trunk/python-ogre/demos/qgui/media/models/robot.mesh trunk/python-ogre/demos/qgui/media/models/robot.skeleton trunk/python-ogre/demos/qgui/media/packs/ trunk/python-ogre/demos/qgui/media/packs/OgreCore.zip trunk/python-ogre/demos/qgui/media/packs/cubemapsJS.zip trunk/python-ogre/demos/qgui/media/skins/ trunk/python-ogre/demos/qgui/media/skins/qgui/ trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.disabled.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.down.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.over.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.checked.down.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.checked.over.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.checked.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.combobox.button.down.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.combobox.button.over.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.combobox.button.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.combobox.down.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.combobox.list.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.combobox.over.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.combobox.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.image.border.bottom.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.image.border.right.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.image.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.label.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.list.highlight.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.list.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.menu.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.menulist.button.down.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.menulist.button.over.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.menulist.list.border.bottom.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.menulist.list.border.left.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.menulist.list.border.right.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.menulist.list.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.panel.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.pointer.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.progressbar.bar.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.progressbar.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.scrollbar.horizontal.left.down.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.scrollbar.horizontal.left.over.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.scrollbar.horizontal.left.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.scrollbar.horizontal.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.scrollbar.horizontal.right.down.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.scrollbar.horizontal.right.over.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.scrollbar.horizontal.right.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.scrollbar.horizontal.slider.down.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.scrollbar.horizontal.slider.over.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.scrollbar.horizontal.slider.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.scrollbar.vertical.down.down.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.scrollbar.vertical.down.over.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.scrollbar.vertical.down.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.scrollbar.vertical.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.scrollbar.vertical.slider.down.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.scrollbar.vertical.slider.over.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.scrollbar.vertical.slider.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.scrollbar.vertical.up.down.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.scrollbar.vertical.up.over.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.scrollbar.vertical.up.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.textbox.border.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.textbox.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.textbox.textcursor.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.textcursor.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.trackbar.horizontal.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.trackbar.horizontal.slider.down.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.trackbar.horizontal.slider.over.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.trackbar.horizontal.slider.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.trackbar.vertical.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.trackbar.vertical.slider.down.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.trackbar.vertical.slider.over.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.trackbar.vertical.slider.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.unchecked.down.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.unchecked.over.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.unchecked.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.window.border.bottom.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.window.border.bottomleft.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.window.border.bottomright.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.window.border.left.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.window.border.right.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.window.border.top.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.window.border.topleft.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.window.border.topright.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.window.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.window.titlebar.button.down.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.window.titlebar.button.over.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.window.titlebar.button.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.window.titlebar.png trunk/python-ogre/demos/qgui/media/skins/qgui_demo/ trunk/python-ogre/demos/qgui/media/skins/qgui_demo/listitem.blue.png trunk/python-ogre/demos/qgui/media/skins/qgui_demo/listitem.green.png trunk/python-ogre/demos/qgui/media/skins/qgui_demo/listitem.red.png trunk/python-ogre/demos/qgui/media/skins/qgui_demo/pointmode.png trunk/python-ogre/demos/qgui/media/skins/qgui_demo/progressbar.blue.bar.png trunk/python-ogre/demos/qgui/media/skins/qgui_demo/progressbar.blue.png trunk/python-ogre/demos/qgui/media/skins/qgui_demo/progressbar.green.bar.png trunk/python-ogre/demos/qgui/media/skins/qgui_demo/progressbar.green.png trunk/python-ogre/demos/qgui/media/skins/qgui_demo/progressbar.red.bar.png trunk/python-ogre/demos/qgui/media/skins/qgui_demo/progressbar.red.png trunk/python-ogre/demos/qgui/media/skins/qgui_demo/properties.down.png trunk/python-ogre/demos/qgui/media/skins/qgui_demo/properties.over.png trunk/python-ogre/demos/qgui/media/skins/qgui_demo/properties.png trunk/python-ogre/demos/qgui/media/skins/qgui_demo/solidmode.png trunk/python-ogre/demos/qgui/media/skins/qgui_demo/wireframemode.png trunk/python-ogre/demos/qgui/plugins.cfg trunk/python-ogre/demos/qgui/resources.cfg trunk/python-ogre/demos/theora/ogre.cfg Removed Paths: ------------- trunk/python-ogre/demos/gui/ Added: trunk/python-ogre/ThirdParty/quickgui/QuickGUIBorder.cpp =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIBorder.cpp (rev 0) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIBorder.cpp 2007-10-01 15:10:25 UTC (rev 404) @@ -0,0 +1,93 @@ +#include "QuickGUIBorder.h" +#include "QuickGUIManager.h" + +namespace QuickGUI +{ + Border::Border(const Ogre::String& name, Type type, BorderType bType, const Rect& pixelDimensions, Ogre::String texture, QuadContainer* container, Widget* ParentWidget, GUIManager* gm) : + Image(name,type,pixelDimensions,texture,container,ParentWidget,gm), + mBorderType(bType) + { + mDraggingEnabled = true; + mWidgetToDrag = NULL; + + switch(bType) + { + case BORDER_TYPE_TOP_LEFT: + mHorizontalAnchor = ANCHOR_HORIZONTAL_LEFT; + mVerticalAnchor = ANCHOR_VERTICAL_TOP; + break; + case BORDER_TYPE_TOP_RIGHT: + mHorizontalAnchor = ANCHOR_HORIZONTAL_RIGHT; + mVerticalAnchor = ANCHOR_VERTICAL_TOP; + break; + case BORDER_TYPE_BOTTOM_LEFT: + mHorizontalAnchor = ANCHOR_HORIZONTAL_LEFT; + mVerticalAnchor = ANCHOR_VERTICAL_BOTTOM; + break; + case BORDER_TYPE_BOTTOM_RIGHT: + mHorizontalAnchor = ANCHOR_HORIZONTAL_RIGHT; + mVerticalAnchor = ANCHOR_VERTICAL_BOTTOM; + break; + case BORDER_TYPE_LEFT: + mHorizontalAnchor = ANCHOR_HORIZONTAL_LEFT; + mVerticalAnchor = ANCHOR_VERTICAL_TOP_BOTTOM; + break; + case BORDER_TYPE_TOP: + mHorizontalAnchor = ANCHOR_HORIZONTAL_LEFT_RIGHT; + mVerticalAnchor = ANCHOR_VERTICAL_TOP; + break; + case BORDER_TYPE_RIGHT: + mHorizontalAnchor = ANCHOR_HORIZONTAL_RIGHT; + mVerticalAnchor = ANCHOR_VERTICAL_TOP_BOTTOM; + break; + case BORDER_TYPE_BOTTOM: + mHorizontalAnchor = ANCHOR_HORIZONTAL_LEFT_RIGHT; + mVerticalAnchor = ANCHOR_VERTICAL_BOTTOM; + break; + } + + addEventHandler(EVENT_DRAGGED,&Border::onDragged,this); + } + + Border::~Border() + { + } + + void Border::onDragged(const EventArgs& args) + { + const MouseEventArgs mea = dynamic_cast<const MouseEventArgs&>(args); + + switch(mBorderType) + { + case BORDER_TYPE_TOP_LEFT: + mParentWidget->setScreenPosition(mea.position.x,mea.position.y); + mParentWidget->setSize(mParentWidget->getWidth() - mea.moveDelta.x,mParentWidget->getHeight() - mea.moveDelta.y); + break; + case BORDER_TYPE_TOP_RIGHT: + mParentWidget->setScreenYPosition(mea.position.y); + mParentWidget->setSize(mParentWidget->getWidth() + mea.moveDelta.x,mParentWidget->getHeight() - mea.moveDelta.y); + break; + case BORDER_TYPE_BOTTOM_LEFT: + mParentWidget->setScreenXPosition(mea.position.x); + mParentWidget->setSize(mParentWidget->getWidth() - mea.moveDelta.x,mParentWidget->getHeight() + mea.moveDelta.y); + break; + case BORDER_TYPE_BOTTOM_RIGHT: + mParentWidget->setSize(mParentWidget->getWidth() + mea.moveDelta.x,mParentWidget->getHeight() + mea.moveDelta.y); + break; + case BORDER_TYPE_LEFT: + mParentWidget->setScreenXPosition(mea.position.x); + mParentWidget->setWidth(mParentWidget->getWidth() - mea.moveDelta.x); + break; + case BORDER_TYPE_TOP: + mParentWidget->setScreenYPosition(mea.position.y); + mParentWidget->setHeight(mParentWidget->getHeight() - mea.moveDelta.y); + break; + case BORDER_TYPE_RIGHT: + mParentWidget->setWidth(mParentWidget->getWidth() + mea.moveDelta.x); + break; + case BORDER_TYPE_BOTTOM: + mParentWidget->setHeight(mParentWidget->getHeight() + mea.moveDelta.y); + break; + } + } +} Added: trunk/python-ogre/ThirdParty/quickgui/QuickGUIBorder.h =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIBorder.h (rev 0) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIBorder.h 2007-10-01 15:10:25 UTC (rev 404) @@ -0,0 +1,57 @@ +#ifndef QUICKGUIBORDER_H +#define QUICKGUIBORDER_H + +#include "QuickGUIImage.h" + +namespace QuickGUI +{ + /** Represents a simple Imagel. + @remarks + Pretty much a Label, but without text. + @note + Images also support Render To Texture. + */ + class _QuickGUIExport Border : + public Image + { + public: + enum BorderType + { + BORDER_TYPE_TOP_LEFT = 0, + BORDER_TYPE_TOP_RIGHT , + BORDER_TYPE_BOTTOM_LEFT , + BORDER_TYPE_BOTTOM_RIGHT , + BORDER_TYPE_LEFT , + BORDER_TYPE_TOP , + BORDER_TYPE_RIGHT , + BORDER_TYPE_BOTTOM + }; + public: + /** Constructor + @param + name The name to be given to the widget (must be unique). + @param + dimensions The x Position, y Position, width and height of the widget. + @param + positionMode The GuiMetricsMode for the values given for the position. (absolute/relative/pixel) + @param + sizeMode The GuiMetricsMode for the values given for the size. (absolute/relative/pixel) + @param + material Ogre material defining the widget image. + @param + group QuadContainer containing this widget. + @param + ParentWidget parent widget which created this widget. + */ + Border(const Ogre::String& name, Type type, BorderType bType, const Rect& pixelDimensions, Ogre::String texture, QuadContainer* container, Widget* ParentWidget, GUIManager* gm); + + protected: + virtual ~Border(); + + BorderType mBorderType; + + void onDragged(const EventArgs& args); + }; +} + +#endif Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIComboBox.cpp =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIComboBox.cpp 2007-09-30 06:39:33 UTC (rev 403) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIComboBox.cpp 2007-10-01 15:10:25 UTC (rev 404) @@ -29,6 +29,7 @@ mTextBoundsPixelSize = Size(mSize.width - ButtonSize - 2,mSize.height); mList = new List(mInstanceName+".List",TYPE_LIST,Rect(0,mSize.height,mSize.width,0),mTextureName + ".list" + mTextureExtension,mQuadContainer,this,mGUIManager); + mList->_setClippingWidget(mParentSheet); mList->setShowWithParent(false); mList->setOffset(mOffset + 2); mList->hide(); Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIHorizontalScrollBar.cpp =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIHorizontalScrollBar.cpp 2007-09-30 06:39:33 UTC (rev 403) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIHorizontalScrollBar.cpp 2007-10-01 15:10:25 UTC (rev 404) @@ -6,7 +6,7 @@ HorizontalScrollBar::HorizontalScrollBar(const Ogre::String& name, Type type, const Rect& pixelDimensions, const Ogre::String& texture, QuadContainer* container, Widget* ParentWidget, GUIManager* gm) : Image(name,type,pixelDimensions,texture,container,ParentWidget,gm), mMinSliderPosition(0), - mMaxSliderPosition(1), + mMaxSliderPosition(mSize.width), mMouseDownOnTrack(false), mSmallChange(0.1), mLargeChange(0.4), @@ -54,6 +54,8 @@ mScrollRight2->addEventHandler(EVENT_MOUSE_BUTTON_DOWN,&HorizontalScrollBar::onScrollRightDown,this); _positionScrollButtons(); + setButtonLayout(BUTTON_LAYOUT_OPPOSITE); + _constrainSlider(); } HorizontalScrollBar::~HorizontalScrollBar() @@ -410,22 +412,21 @@ void HorizontalScrollBar::setValue(Ogre::Real value) { - value = (value * mSize.width) + mMinSliderPosition; - - if( value < 0.0 ) - value = 0.0; - if( value > (mMaxSliderPosition - mSlider->getWidth()) ) - value = (mMaxSliderPosition - mSlider->getWidth()); - - mSlider->setXPosition(value); - ScrollEventArgs scrollArgs(this); - Ogre::Real currentValue = getValue(); - if( value < currentValue ) + if(value < getValue()) scrollArgs.sliderIncreasedPosition = false; else scrollArgs.sliderIncreasedPosition = true; + Ogre::Real pixelX = (value * (mMaxSliderPosition - mMinSliderPosition)) + mMinSliderPosition; + + if( pixelX < 0.0 ) + pixelX = 0.0; + if( pixelX > (mMaxSliderPosition - mSlider->getWidth()) ) + pixelX = (mMaxSliderPosition - mSlider->getWidth()); + + mSlider->setXPosition(pixelX); + _scroll(0,scrollArgs); } Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUILabel.cpp =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUILabel.cpp 2007-09-30 06:39:33 UTC (rev 403) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUILabel.cpp 2007-10-01 15:10:25 UTC (rev 404) @@ -6,8 +6,8 @@ Label::Label(const Ogre::String& name, Type type, const Rect& pixelDimensions, Ogre::String texture, QuadContainer* container, Widget* ParentWidget, GUIManager* gm) : Image(name,type,pixelDimensions,texture,container,ParentWidget,gm), mDefaultTexture(mTextureName), - mVerticalAlignment(QGUI_VA_MID), - mHorizontalAlignment(QGUI_HA_MID), + mVerticalAlignment(VA_MID), + mHorizontalAlignment(HA_MID), mTextBoundsPixelOffset(Point::ZERO), mTextBoundsPixelSize(Size(pixelDimensions.width,pixelDimensions.height)), mTextColor(Ogre::ColourValue::White), @@ -30,7 +30,6 @@ void Label::alignText() { - //return; Rect textDimensions = mText->getDimensions(); // 1 pixel buffer used Ogre::Real horizontalBuffer = 1.0 / mGUIManager->getViewportWidth(); @@ -39,21 +38,21 @@ Rect textBounds = getTextBounds(); // Horizontal alignment - if( mHorizontalAlignment == QGUI_HA_LEFT ) + if( mHorizontalAlignment == HA_LEFT ) mText->setPosition(Point(textBounds.x + horizontalBuffer,textDimensions.y)); - else if( mHorizontalAlignment == QGUI_HA_MID ) + else if( mHorizontalAlignment == HA_MID ) mText->setPosition(Point(textBounds.x + ((textBounds.width / 2.0) - (textDimensions.width / 2.0)),textDimensions.y)); - else if( mHorizontalAlignment == QGUI_HA_RIGHT ) + else if( mHorizontalAlignment == HA_RIGHT ) mText->setPosition(Point(textBounds.x + textBounds.width - (horizontalBuffer + textDimensions.width),textDimensions.y)); textDimensions = mText->getDimensions(); // Vertical alignment - if( mVerticalAlignment == QGUI_VA_TOP ) + if( mVerticalAlignment == VA_TOP ) mText->setPosition(Point(textDimensions.x,textBounds.y + verticalBuffer)); - else if( mVerticalAlignment == QGUI_VA_MID ) + else if( mVerticalAlignment == VA_MID ) mText->setPosition(Point(textDimensions.x,textBounds.y + ((textBounds.height / 2.0) - (textDimensions.height / 2.0)))); - else if( mVerticalAlignment == QGUI_VA_BOTTOM ) + else if( mVerticalAlignment == VA_BOTTOM ) mText->setPosition(Point(textDimensions.x,textBounds.y + textBounds.height - (verticalBuffer + textDimensions.height))); } @@ -84,7 +83,7 @@ Rect Label::getTextBounds() { - return Rect(getScreenPosition() + mTextBoundsPixelOffset,mTextBoundsPixelSize); + return Rect(getScreenPosition() + getScrollOffset() + mTextBoundsPixelOffset,mTextBoundsPixelSize); } void Label::hide() @@ -97,13 +96,14 @@ { Image::onPositionChanged(args); - mText->refresh(); + mText->redraw(); alignText(); } void Label::onSizeChanged(const EventArgs& args) { - mText->refresh(); + Image::onSizeChanged(args); + mText->redraw(); alignText(); } @@ -133,7 +133,7 @@ { Image::setPosition(pixelX,pixelY); - mText->refresh(); + mText->redraw(); alignText(); } @@ -146,7 +146,7 @@ { Image::setSize(pixelWidth,pixelHeight); - mText->refresh(); + mText->redraw(); alignText(); } @@ -155,15 +155,15 @@ Label::setSize(pixelSize.width,pixelSize.height); } - void Label::setCaption(const Ogre::UTFString& caption) + void Label::redraw() { - mText->setCaption(caption); + Image::redraw(); + alignText(); } - void Label::setClippingRect(const Rect& pixelDimensions) + void Label::setCaption(const Ogre::UTFString& caption) { - Image::setClippingRect(pixelDimensions); - mText->setClippingRect(pixelDimensions); + mText->setCaption(caption); } void Label::setDisabledTextColor(const Ogre::ColourValue& c) Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUILabel.h =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUILabel.h 2007-09-30 06:39:33 UTC (rev 403) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUILabel.h 2007-10-01 15:10:25 UTC (rev 404) @@ -17,6 +17,27 @@ public Image { public: + /** + * Useful for widgets horizontally aligning child widgets, for example a + * TitleBar aligning its label widget + */ + enum HorizontalAlignment + { + HA_LEFT = 0, + HA_MID , + HA_RIGHT + }; + /** + * Useful for widgets vertically aligning child widgets, for example a + * TitleBar aligning its label widget + */ + enum VerticalAlignment + { + VA_TOP = 0, + VA_MID , + VA_BOTTOM + }; + public: /** Constructor @param name The name to be given to the widget (must be unique). @@ -34,7 +55,7 @@ ParentWidget parent widget which created this widget. */ Label(const Ogre::String& name, Type type, const Rect& pixelDimensions, Ogre::String texture, QuadContainer* container, Widget* ParentWidget, GUIManager* gm); - + /** * Aligns the child Label widget horizontally and vertically */ @@ -66,11 +87,14 @@ void onPositionChanged(const EventArgs& args); void onSizeChanged(const EventArgs& args); /** + * Force updating of the Widget's Quad position on screen. + */ + void redraw(); + /** * Convenience method. For advance text use, use getText function to * get a reference to the Text object. */ virtual void setCaption(const Ogre::UTFString& caption); - virtual void setClippingRect(const Rect& pixelDimensions); /** * Sets the color of the text when the widget is disabled. */ Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIList.cpp =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIList.cpp 2007-09-30 06:39:33 UTC (rev 403) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIList.cpp 2007-10-01 15:10:25 UTC (rev 404) @@ -9,30 +9,28 @@ mAutoNameListItemCount(0), mAutoSizeHeight(false), mNumberOfVisibleItems(5), - mItemPixelHeight(20) + mItemPixelHeight(20), + mScrollPane(NULL) { // Other widgets call this constructor, and they handle quad/quadcontainer their own way. if(mWidgetType == TYPE_LIST) { mQuad->setLayer(mParentWidget->getQuad()->getLayer()); - - mScrollPane = new ScrollPane(mInstanceName+".ScrollPane",TYPE_SCROLL_PANE,mQuadContainer,this,mGUIManager); - mScrollPane->disable(); } - mInheritClippingRect = false; - if(mSize.height <= 0) mAutoSizeHeight = true; else { mNumberOfVisibleItems = ((mSize.width / mItemPixelHeight) + 1.0); + setHeight(mNumberOfVisibleItems * mItemPixelHeight); + mScrollPane = new ScrollPane(mInstanceName+".ScrollPane",TYPE_SCROLL_PANE,mQuadContainer,this,mGUIManager); } mHighlightTexture = mParentSheet->getDefaultSkin() + ".list.highlight" + mTextureExtension; // create highlight container for the list - mHighlightPanel = new Quad(mInstanceName+".HighlightPanel",mGUIManager); + mHighlightPanel = new Quad(mInstanceName+".HighlightPanel",this); mHighlightPanel->setLayer(mQuad->getLayer()); mHighlightPanel->setTexture(mHighlightTexture); // offset + 3, to be able to show over ListItems with Images and Buttons and Text @@ -52,6 +50,12 @@ delete mHighlightPanel; } + void List::_setClippingWidget(Widget* w) + { + mQuad->setClippingWidget(w); + mHighlightPanel->setClippingWidget(w); + } + ListItem* List::addListItem(const Ogre::UTFString& text) { Ogre::String name = mInstanceName + ".ListItem" + Ogre::StringConverter::toString(mAutoNameListItemCount); @@ -114,9 +118,8 @@ void List::hide() { + Image::hide(); mHighlightPanel->setVisible(false); - - Image::hide(); } void List::hideHighlight() @@ -126,7 +129,7 @@ void List::highlightListItem(ListItem* i) { - mHighlightPanel->setPosition(i->getScreenPosition()); + mHighlightPanel->setPosition(i->getScreenPosition() + i->getScrollOffset()); mHighlightPanel->setSize(i->getSize()); mHighlightPanel->setVisible(true); } @@ -174,8 +177,12 @@ void List::setAutoSizeHeight() { - mScrollPane->setSize(1,1); - mScrollPane->disable(); + if(mScrollPane != NULL) + { + mScrollPane->setSize(mSize); + mScrollPane->disable(); + } + mAutoSizeHeight = true; setHeight(static_cast<int>(mItems.size()) * mItemPixelHeight); } @@ -204,9 +211,28 @@ void List::setNumberOfVisibleItems(unsigned int number) { + mAutoSizeHeight = false; + mNumberOfVisibleItems = number; setHeight(mItemPixelHeight * mNumberOfVisibleItems); + + if(mScrollPane == NULL) + { + mScrollPane = new ScrollPane(mInstanceName+".ScrollPane",TYPE_SCROLL_PANE,mQuadContainer,this,mGUIManager); + + // Add any already existing children to ScrollPane's list of managed widgets. + std::vector<Widget*>::iterator it; + for( it = mChildWidgets.begin(); it != mChildWidgets.end(); ++it ) + { + mScrollPane->manageWidget((*it)); + } + } + else + { + mScrollPane->enable(); + mScrollPane->_determinePaneBounds(); + } } void List::setSize(const Ogre::Real& pixelWidth, const Ogre::Real& pixelHeight) Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIList.h =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIList.h 2007-09-30 06:39:33 UTC (rev 403) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIList.h 2007-10-01 15:10:25 UTC (rev 404) @@ -40,6 +40,7 @@ */ List(const Ogre::String& name, Type type, const Rect& pixelDimensions, Ogre::String texture, QuadContainer* container, Widget* ParentWidget, GUIManager* gm); + void _setClippingWidget(Widget* w); /** * Adds (and creates) a ListItem and adds it to the List. * Note that a pointer to the created List Item is returned. Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIListItem.cpp =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIListItem.cpp 2007-09-30 06:39:33 UTC (rev 403) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIListItem.cpp 2007-10-01 15:10:25 UTC (rev 404) @@ -10,14 +10,17 @@ mImage(0), mButton(0), mPropogateImageMouseEvents(true), - mPropogateButtonMouseEvents(true) + mPropogateButtonMouseEvents(true), + mClippingWidget(ParentWidget) { // Other widgets call this constructor, and they handle quad/quadcontainer their own way. if(mWidgetType == TYPE_LISTITEM) { mQuad->setLayer(mParentWidget->getQuad()->getLayer()); + mQuad->setClippingWidget(mClippingWidget); mText->setLayer(mQuad->getLayer()); mText->setOffset(mOffset+2); + mText->_clipToWidgetDimensions(mClippingWidget); } addEventHandler(EVENT_MOUSE_ENTER,&ListItem::onMouseEnters,this); @@ -39,6 +42,7 @@ mButton = new NStateButton(mInstanceName+".NStateButton",TYPE_BUTTON,pixelDimensions,mQuadContainer,this,mGUIManager); mButton->getQuad()->setLayer(mQuad->getLayer()); + mButton->getQuad()->setClippingWidget(mClippingWidget); if(mPropogateButtonMouseEvents) { @@ -61,6 +65,7 @@ mImage = new Image(mInstanceName+".Image",TYPE_IMAGE,pixelDimensions,texture,mQuadContainer,this,mGUIManager); mImage->getQuad()->setLayer(mQuad->getLayer()); + mImage->getQuad()->setClippingWidget(mClippingWidget); if(mPropogateImageMouseEvents) { Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIListItem.h =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIListItem.h 2007-09-30 06:39:33 UTC (rev 403) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIListItem.h 2007-10-01 15:10:25 UTC (rev 404) @@ -97,6 +97,8 @@ protected: virtual ~ListItem(); + Widget* mClippingWidget; + Image* mImage; NStateButton* mButton; Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIManager.cpp =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIManager.cpp 2007-09-30 06:39:33 UTC (rev 403) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIManager.cpp 2007-10-01 15:10:25 UTC (rev 404) @@ -12,7 +12,8 @@ mQueueID(Ogre::RENDER_QUEUE_OVERLAY), mMouseCursor(0), mSceneManager(0), - mDraggingWidget(false) + mDraggingWidget(false), + mDebugString("") { mWidgetNames.clear(); @@ -217,6 +218,11 @@ return mActiveSheet; } + Ogre::String GUIManager::getDebugString() + { + return mDebugString; + } + Sheet* GUIManager::getDefaultSheet() { return mDefaultSheet; @@ -590,6 +596,11 @@ mActiveWidget->fireEvent(Widget::EVENT_GAIN_FOCUS,args); } + void GUIManager::setDebugString(const Ogre::String s) + { + mDebugString = s; + } + void GUIManager::setRenderQueueID(Ogre::uint8 id) { mQueueID = id; Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIManager.h =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIManager.h 2007-09-30 06:39:33 UTC (rev 403) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIManager.h 2007-10-01 15:10:25 UTC (rev 404) @@ -85,6 +85,7 @@ * Returns the sheet currently being used, whether shown or hidden. */ Sheet* getActiveSheet(); + Ogre::String getDebugString(); /** * Returns the default sheet, automatically created with the GUI manager. */ @@ -163,6 +164,7 @@ * Activates the widget w, and deactivates the previously active widget. (if exists) */ void setActiveWidget(Widget* w); + void setDebugString(const Ogre::String s); /* * Sets the Render Queue Group to render on. By default, this is RENDER_QUEUE_OVERLAY. */ @@ -226,6 +228,8 @@ std::list<Sheet*> mSheets; int mAutoNameSheetCounter; + Ogre::String mDebugString; + // list of widgets to delete on next frame. std::vector<Widget*> mFreeList; Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIMenuList.cpp =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIMenuList.cpp 2007-09-30 06:39:33 UTC (rev 403) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIMenuList.cpp 2007-10-01 15:10:25 UTC (rev 404) @@ -23,6 +23,7 @@ // create list mList = new List(mInstanceName+".List",TYPE_LIST,Rect(0,mSize.height,mSize.width,0),mTextureName + ".list" + mTextureExtension,mQuadContainer,this,mGUIManager); + mList->_setClippingWidget(mParentSheet); mList->setShowWithParent(false); mList->hide(); mList->addEventHandler(EVENT_CHILD_ADDED,&MenuList::addDefaultListItemHandler,this); Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIMouseCursor.cpp =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIMouseCursor.cpp 2007-09-30 06:39:33 UTC (rev 403) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIMouseCursor.cpp 2007-10-01 15:10:25 UTC (rev 404) @@ -73,8 +73,10 @@ // even if its within bounds. else { - if(mVisible) show(); - else hide(); + if(mVisible) + show(); + else + hide(); } // Perform the actual moving of the mouse quad Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIPoint.h =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIPoint.h 2007-09-30 06:39:33 UTC (rev 403) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIPoint.h 2007-10-01 15:10:25 UTC (rev 404) @@ -53,6 +53,16 @@ return Point(x + p.x,y + p.y); } + inline Point operator + ( const Size& s ) const + { + return Point(x + s.width,y + s.height); + } + + inline Point operator += ( const Size& s ) const + { + return Point(x + s.width,y + s.height); + } + inline Point operator - ( const Point& p ) const { return Point(x - p.x,y - p.y); Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIProgressBar.cpp =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIProgressBar.cpp 2007-09-30 06:39:33 UTC (rev 403) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIProgressBar.cpp 2007-10-01 15:10:25 UTC (rev 404) @@ -40,7 +40,7 @@ Ogre::TU_STATIC); } - mBarPanel = new Quad(mInstanceName+".BarPanel",mGUIManager); + mBarPanel = new Quad(mInstanceName+".BarPanel",this); mBarPanel->setPosition(getScreenPosition()); mBarPanel->setSize(mSize); mBarPanel->setOffset(mOffset+1); @@ -238,10 +238,16 @@ mBarPanel->setSize(mSize); } + void ProgressBar::redraw() + { + Image::redraw(); + mBarPanel->setPosition(mQuad->getPosition()); + } + void ProgressBar::setClippingRect(const Rect& r) { - Image::setClippingRect(r); - mBarPanel->setClippingRect(r); +// Image::setClippingRect(r); +// mBarPanel->setClippingRect(r); } void ProgressBar::setFillDirection(FillDirection d) Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIProgressBar.h =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIProgressBar.h 2007-09-30 06:39:33 UTC (rev 403) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIProgressBar.h 2007-10-01 15:10:25 UTC (rev 404) @@ -77,6 +77,10 @@ void onProgressChanged(const WidgetEventArgs& e); void onPositionChanged(const EventArgs& args); void onSizeChanged(const EventArgs& args); + /** + * Force updating of the Widget's Quad position on screen. + */ + void redraw(); void setClippingRect(const Rect& r); void setFillDirection(FillDirection d); /** Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIQuad.cpp =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIQuad.cpp 2007-09-30 06:39:33 UTC (rev 403) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIQuad.cpp 2007-10-01 15:10:25 UTC (rev 404) @@ -6,8 +6,43 @@ namespace QuickGUI { + Quad::Quad(const Ogre::String& id, Widget* owner) : + mID(id), + mOwner(owner), + mGUIManager(owner->getGUIManager()), + mQuadContainer(NULL), + mLayer(LAYER_CHILD), + mColorChanged(false), + mDimensionsChanged(false), + mTextureChanged(false), + mTextureCoordsChanged(false), + mOffsetChanged(false), + mAddedToRenderGroup(false), + mTextureName(""), + mOffset(0), + mPixelDimensions(Rect::ZERO), + mTextureCoordinates(Ogre::Vector4(0,0,1,1)), + mVisible(true), + mTopColor(Ogre::ColourValue::White), + mBottomColor(Ogre::ColourValue::White) + { + mRenderSystem = Ogre::Root::getSingleton().getRenderSystem(); + mVertices.resize(6); + _updateVertexColor(); + + if(mOwner->getParentPanel() != NULL) + mClippingWidget = mOwner->getParentPanel(); + else if(mOwner->getParentWindow() != NULL) + mClippingWidget = mOwner->getParentWindow(); + else if(mOwner->getParentSheet() != NULL) + mClippingWidget = mOwner->getParentSheet(); + else + mClippingWidget = mOwner; + } + Quad::Quad(const Ogre::String& id, GUIManager* gm) : mID(id), + mOwner(NULL), mGUIManager(gm), mQuadContainer(NULL), mLayer(LAYER_CHILD), @@ -24,8 +59,9 @@ mVisible(true), mTopColor(Ogre::ColourValue::White), mBottomColor(Ogre::ColourValue::White), - mHiddenViaClipping(false), - mClippingRect(Rect(0,0,gm->getViewportWidth(),gm->getViewportHeight())) + mClippingWidget(NULL), + mDimensionsViaClipping(mPixelDimensions), + mTextureCoordinatesViaClipping(mTextureCoordinates) { mRenderSystem = Ogre::Root::getSingleton().getRenderSystem(); mVertices.resize(6); @@ -40,23 +76,36 @@ void Quad::_clip() { - if(insideRect(mClippingRect)) + if(mClippingWidget == NULL) { mDimensionsViaClipping = mPixelDimensions; _computeVertices(); + mTextureCoordinatesViaClipping = mTextureCoordinates; + _updateTextureCoords(); + _notifyQuadContainerNeedsUpdate(); + return; + } + Rect clippingRect = getClippingRect(); + + if(mPixelDimensions.inside(clippingRect)) + { + mDimensionsViaClipping = mPixelDimensions; + _computeVertices(); + mTextureCoordinatesViaClipping = mTextureCoordinates; _updateTextureCoords(); - if(mHiddenViaClipping) - { - setVisible(true); - mHiddenViaClipping = false; - } + if(mOwner->isVisible()) + mVisible = true; + else + mVisible = false; + + _notifyQuadContainerNeedsUpdate(); } - else if(intersectsRect(mClippingRect)) + else if(mPixelDimensions.intersectsRect(clippingRect)) { - mDimensionsViaClipping = getRectIntersection(mClippingRect); + mDimensionsViaClipping = mPixelDimensions.getIntersection(clippingRect); _computeVertices(); // calculate distance between top/bottom and left/right of the UV coords. @@ -70,11 +119,12 @@ _updateTextureCoords(); - if(mHiddenViaClipping) - { - setVisible(true); - mHiddenViaClipping = false; - } + if(mOwner->isVisible()) + mVisible = true; + else + mVisible = false; + + _notifyQuadContainerNeedsUpdate(); } else // Quad is outside clipping region. { @@ -84,11 +134,8 @@ mTextureCoordinatesViaClipping = mTextureCoordinates; _updateTextureCoords(); - if(mVisible) - { - mHiddenViaClipping = true; - setVisible(false); - } + mVisible = false; + _notifyQuadContainerNeedsUpdate(); } } @@ -137,6 +184,7 @@ mColorChanged = false; mDimensionsChanged = false; mTextureChanged = false; + mTextureCoordsChanged = false; mOffsetChanged = false; } @@ -228,64 +276,39 @@ mAddedToRenderGroup = true; } - bool Quad::dimensionsChanged() + void Quad::setClippingWidget(Widget* w) { - return mDimensionsChanged; + mClippingWidget = w; } - Rect Quad::getDimensions() + bool Quad::dimensionsChanged() { - return mPixelDimensions; + return mDimensionsChanged; } - Ogre::String Quad::getID() + Rect Quad::getClippingRect() { - return mID; + return Rect(mClippingWidget->getScreenPosition() + mClippingWidget->getScrollOffset(), mClippingWidget->getSize()); } - Quad::Layer Quad::getLayer() + Widget* Quad::getClippingWidget() { - return mLayer; + return mClippingWidget; } - Rect Quad::getRectIntersection(const Rect& r) + Rect Quad::getDimensions() { - Rect retVal = Rect::ZERO; - - if(intersectsRect(r)) - { - retVal.x = std::max(mPixelDimensions.x,r.x); - retVal.y = std::max(mPixelDimensions.y,r.y); - retVal.width = std::min(mPixelDimensions.x + mPixelDimensions.width, r.x + r.width) - retVal.x; - retVal.height = std::min(mPixelDimensions.y + mPixelDimensions.height, r.y + r.height) - retVal.y; - } - - return retVal; + return mPixelDimensions; } - bool Quad::insideRect(const Rect& r) + Ogre::String Quad::getID() { - if( (mPixelDimensions.x >= r.x) && - (mPixelDimensions.y >= r.y) && - ((mPixelDimensions.x + mPixelDimensions.width) <= (r.x + r.width)) && - ((mPixelDimensions.y + mPixelDimensions.height) <= (r.y + r.height)) ) - return true; - - return false; + return mID; } - bool Quad::intersectsRect(const Rect& r) + Quad::Layer Quad::getLayer() { - // if our left side is greater than r's right side, or our right side is less than r's left side, intersection is not possible. - if( (mPixelDimensions.x > (r.x + r.width)) || ((mPixelDimensions.x + mPixelDimensions.width) < r.x) ) - return false; - - // if our top is greater than r's bottom, or our bottom is less than r's top, intersection is not possible. - if( (mPixelDimensions.y > (r.y + r.height)) || ((mPixelDimensions.y + mPixelDimensions.height) < r.y) ) - return false; - - // If the above conditions are not met, than there must be overlap between our dimensions and r's dimensions. - return true; + return mLayer; } bool Quad::isPointWithinBounds(const Point& pixelPosition) @@ -349,12 +372,6 @@ mAddedToRenderGroup = false; } - void Quad::setClippingRect(const Rect& r) - { - mClippingRect = r; - _clip(); - } - void Quad::setColor(const Ogre::ColourValue& color) { setColor(color,color); @@ -378,8 +395,6 @@ mDimensionsChanged = true; _clip(); - - _notifyQuadContainerNeedsUpdate(); } void Quad::setHeight(Ogre::Real pixelHeight) @@ -389,8 +404,6 @@ mDimensionsChanged = true; _clip(); - - _notifyQuadContainerNeedsUpdate(); } void Quad::setLayer(Layer l) @@ -419,8 +432,6 @@ mDimensionsChanged = true; _clip(); - - _notifyQuadContainerNeedsUpdate(); } void Quad::setSize(const Size& pixelSize) @@ -431,8 +442,6 @@ mDimensionsChanged = true; _clip(); - - _notifyQuadContainerNeedsUpdate(); } void Quad::setTexture(const Ogre::String& textureName) @@ -478,8 +487,6 @@ mTextureCoordsChanged = true; _clip(); - - _notifyQuadContainerNeedsUpdate(); } void Quad::setTextureCoordinates(const Ogre::FloatRect& textureCoordinates) @@ -491,7 +498,11 @@ { mVisible = visible; - _notifyQuadContainerNeedsUpdate(); + // Only clip when becoming visible + if(mVisible) + _clip(); + else + _notifyQuadContainerNeedsUpdate(); } void Quad::setWidth(Ogre::Real pixelWidth) @@ -501,8 +512,6 @@ mDimensionsChanged = true; _clip(); - - _notifyQuadContainerNeedsUpdate(); } void Quad::setXPosition(Ogre::Real pixelX) @@ -512,8 +521,6 @@ mDimensionsChanged = true; _clip(); - - _notifyQuadContainerNeedsUpdate(); } void Quad::setYPosition(Ogre::Real pixelY) @@ -523,8 +530,6 @@ mDimensionsChanged = true; _clip(); - - _notifyQuadContainerNeedsUpdate(); } bool Quad::textureChanged() Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIQuad.h =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIQuad.h 2007-09-30 06:39:33 UTC (rev 403) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIQuad.h 2007-10-01 15:10:25 UTC (rev 404) @@ -16,6 +16,7 @@ // forward declaration class QuadContainer; class GUIManager; + class Widget; class _QuickGUIExport Quad { @@ -29,6 +30,7 @@ LAYER_MENU }; public: + Quad(const Ogre::String& id, Widget* owner); Quad(const Ogre::String& id, GUIManager* gm); ~Quad(); @@ -43,10 +45,11 @@ bool dimensionsChanged(); + Rect getClippingRect(); + Widget* getClippingWidget(); Rect getDimensions(); Ogre::String getID(); Layer getLayer(); - Rect getRectIntersection(const Rect& r); Ogre::String getTextureName(); std::vector<Vertex>* getVertices(); int getNumberOfVertices(); @@ -54,15 +57,13 @@ Point getPosition(); Size getSize(); - bool insideRect(const Rect& r); - bool intersectsRect(const Rect& r); bool isPointWithinBounds(const Point& pixelPosition); void removeFromRenderObjectGroup(); + void setClippingWidget(Widget* w); void setColor(const Ogre::ColourValue& color); void setColor(const Ogre::ColourValue& topColor, const Ogre::ColourValue& botColor); - void setClippingRect(const Rect& r); void setDimensions(const Rect& pixelDimensions); void setHeight(Ogre::Real pixelHeight); void setLayer(Layer l); @@ -84,6 +85,7 @@ bool offsetChanged(); protected: + Widget* mOwner; GUIManager* mGUIManager; QuadContainer* mQuadContainer; Ogre::RenderSystem* mRenderSystem; @@ -102,9 +104,8 @@ Ogre::ColourValue mTopColor; Ogre::ColourValue mBottomColor; - Rect mClippingRect; + Widget* mClippingWidget; // Store changes made via Clipping. - bool mHiddenViaClipping; Rect mDimensionsViaClipping; Ogre::Vector4 mTextureCoordinatesViaClipping; Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIRect.cpp =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIRect.cpp 2007-09-30 06:39:33 UTC (rev 403) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIRect.cpp 2007-10-01 15:10:25 UTC (rev 404) @@ -55,11 +55,11 @@ bool Rect::intersectsRect(const Rect& r) { // if our left side is greater than r's right side, or our right side is less than r's left side, intersection is not possible. - if( (x > (r.x + r.width)) || ((x + width) < r.x) ) + if( (x >= (r.x + r.width)) || ((x + width) <= r.x) ) return false; // if our top is greater than r's bottom, or our bottom is less than r's top, intersection is not possible. - if( (y > (r.y + r.height)) || ((y + height) < r.y) ) + if( (y >= (r.y + r.height)) || ((y + height) <= r.y) ) return false; // If the above conditions are not met, than there must be overlap between our dimensions and r's dimensions. Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIScrollPane.cpp =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIScrollPane.cpp 2007-09-30 06:39:33 UTC (rev 403) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIScrollPane.cpp 2007-10-01 15:10:25 UTC (rev 404) @@ -4,7 +4,7 @@ namespace QuickGUI { ScrollPane::ScrollPane(const Ogre::String& instanceName, Type type, QuadContainer* container, Widget* ParentWidget, GUIManager* gm) : - Widget(instanceName,type,Rect(0,0,1,1),"",container,ParentWidget,gm), + Widget(instanceName,type,Rect(Point(0,0),ParentWidget->getSize()),"",container,ParentWidget,gm), mScrollBarWidth(20), mHorizontalButtonLayout(HorizontalScrollBar::BUTTON_LAYOUT_OPPOSITE), mVerticalButtonLayout(VerticalScrollBar::BUTTON_LAYOUT_OPPOSITE), @@ -32,21 +32,27 @@ Rect parentPixelSize = mParentWidget->getDimensions(); mTopBar = new HorizontalScrollBar(parentName+".TopScrollBar",TYPE_SCROLLBAR_HORIZONTAL,Rect(mScrollBarWidth,0,parentPixelSize.width - (mScrollBarWidth*2.0),mScrollBarWidth),skinSet+".scrollbar.horizontal.png",container,mParentWidget,gm); + mTopBar->setHorizontalAnchor(ANCHOR_HORIZONTAL_LEFT_RIGHT); mTopBar->setShowWithParent(false); mTopBar->hide(); mTopBar->addOnScrollEventHandler(&ScrollPane::onHorizontalScroll,this); mBottomBar = new HorizontalScrollBar(parentName+".BottomScrollBar",TYPE_SCROLLBAR_HORIZONTAL,Rect(mScrollBarWidth,parentPixelSize.height - mScrollBarWidth,parentPixelSize.width - (mScrollBarWidth*2.0),mScrollBarWidth),skinSet+".scrollbar.horizontal.png",container,mParentWidget,gm); + mBottomBar->setHorizontalAnchor(ANCHOR_HORIZONTAL_LEFT_RIGHT); + mBottomBar->setVerticalAnchor(ANCHOR_VERTICAL_BOTTOM); mBottomBar->setShowWithParent(false); mBottomBar->hide(); mBottomBar->addOnScrollEventHandler(&ScrollPane::onHorizontalScroll,this); mLeftBar = new VerticalScrollBar(parentName+".LeftScrollBar",TYPE_SCROLLBAR_VERTICAL,Rect(0,mScrollBarWidth,mScrollBarWidth,parentPixelSize.height - (mScrollBarWidth*2.0)),skinSet+".scrollbar.vertical.png",container,mParentWidget,gm); + mLeftBar->setVerticalAnchor(ANCHOR_VERTICAL_TOP_BOTTOM); mLeftBar->setShowWithParent(false); mLeftBar->hide(); mLeftBar->addOnScrollEventHandler(&ScrollPane::onVerticalScroll,this); mRightBar = new VerticalScrollBar(parentName+".RightScrollBar",TYPE_SCROLLBAR_VERTICAL,Rect(parentPixelSize.width - mScrollBarWidth,mScrollBarWidth,mScrollBarWidth,parentPixelSize.height - (mScrollBarWidth*2.0)),skinSet+".scrollbar.vertical.png",container,mParentWidget,gm); + mRightBar->setHorizontalAnchor(ANCHOR_HORIZONTAL_RIGHT); + mRightBar->setVerticalAnchor(ANCHOR_VERTICAL_TOP_BOTTOM); mRightBar->setShowWithParent(false); mRightBar->hide(); mRightBar->addOnScrollEventHandler(&ScrollPane::onVerticalScroll,this); @@ -186,20 +192,22 @@ void ScrollPane::_showHScrollBars() { + bool parentVisible = mParentWidget->isVisible(); + switch(mHorizontalBarLayout) { case HORIZONTAL_BAR_LAYOUT_TOP: - if(!mTopBar->isVisible()) + if(!mTopBar->isVisible() && parentVisible) mTopBar->show(); break; case HORIZONTAL_BAR_LAYOUT_BOTTOM: - if(!mBottomBar->isVisible()) + if(!mBottomBar->isVisible() && parentVisible) mBottomBar->show(); break; case HORIZONTAL_BAR_LAYOUT_BOTH: - if(!mTopBar->isVisible()) + if(!mTopBar->isVisible() && parentVisible) mTopBar->show(); - if(!mBottomBar->isVisible()) + if(!mBottomBar->isVisible() && parentVisible) mBottomBar->show(); break; case HORIZONTAL_BAR_LAYOUT_NONE: @@ -210,20 +218,22 @@ void ScrollPane::_showVScrollBars() { + bool parentVisible = mParentWidget->isVisible(); + switch(mVerticalBarLayout) { case VERTICAL_BAR_LAYOUT_LEFT: - if(!mLeftBar->isVisible()) + if(!mLeftBar->isVisible() && parentVisible) mLeftBar->show(); break; case VERTICAL_BAR_LAYOUT_RIGHT: - if(!mRightBar->isVisible()) + if(!mRightBar->isVisible() && parentVisible) mRightBar->show(); break; case VERTICAL_BAR_LAYOUT_BOTH: - if(!mLeftBar->isVisible()) + if(!mLeftBar->isVisible() && parentVisible) mLeftBar->show(); - if(!mRightBar->isVisible()) + if(!mRightBar->isVisible() && parentVisible) mRightBar->show(); break; case VERTICAL_BAR_LAYOUT_NONE: @@ -319,23 +329,23 @@ return mVerticalButtonLayout; } - void ScrollPane::onChildAddedToParent(const EventArgs& args) + void ScrollPane::manageWidget(Widget* w) { - Widget* w = dynamic_cast<const WidgetEventArgs&>(args).widget; - if((w->getWidgetType() == TYPE_TITLEBAR) || (w->getWidgetType() == TYPE_MENU)) return; - w->setClippingRect(mParentWidget->getDimensions()); + w->addEventHandler(EVENT_MOUSE_BUTTON_DOWN,&ScrollPane::onChildClicked,this); - if(w->getWidgetType() == TYPE_TEXTBOX) - w->addEventHandler(EVENT_GAIN_FOCUS,&ScrollPane::onChildTextBoxGainedFocus,this); - mManagedWidgets.push_back(w); _determinePaneBounds(); } + void ScrollPane::onChildAddedToParent(const EventArgs& args) + { + manageWidget(dynamic_cast<const WidgetEventArgs&>(args).widget); + } + void ScrollPane::onChildRemovedFromParent(const EventArgs& args) { Widget* w = dynamic_cast<const WidgetEventArgs&>(args).widget; @@ -354,18 +364,13 @@ _determinePaneBounds(); } - void ScrollPane::onChildTextBoxGainedFocus(const EventArgs& args) + void ScrollPane::onChildClicked(const EventArgs& args) { + scrollIntoView(dynamic_cast<const WidgetEventArgs&>(args).widget); } void ScrollPane::onParentPositionChanged(const EventArgs& args) { - if(!mEnabled) - return; - - std::vector<Widget*>::iterator it; - for( it = mManagedWidgets.begin(); it != mManagedWidgets.end(); ++it ) - (*it)->setClippingRect(mParentWidget->getDimensions()); } void ScrollPane::onParentSizeChanged(const EventArgs& args) @@ -389,16 +394,14 @@ mTopBar->_setValue(mBottomBar->getValue()); // Move Scroll Pane - Ogre::Real topValue = mTopBar->getValue(); - Ogre::Real botValue = mBottomBar->getValue(); - setXPosition(-(topValue) * mSize.width); + setXPosition(-(mTopBar->getValue()) * mSize.width); + // Get parent's on-screen dimensions. + Rect parentDimensions(mParentWidget->getScreenPosition() + mParentWidget->getScrollOffset(),mParentWidget->getSize()); + std::vector<Widget*>::iterator it; for( it = mManagedWidgets.begin(); it != mManagedWidgets.end(); ++it ) { - // In the event of scroll panes inside scroll panes, moving a scroll pane will move the inner scroll panes. - // In this case, we need to update the clipping rect. - (*it)->setClippingRect(mParentWidget->getDimensions()); (*it)->_setScrollXOffset(mPosition.x); } } @@ -426,12 +429,12 @@ // Move Scroll Pane setYPosition(-(mLeftBar->getValue()) * mSize.height); + // Get parent's on-screen dimensions. + Rect parentDimensions(mParentWidget->getScreenPosition() + mParentWidget->getScrollOffset(),mParentWidget->getSize()); + std::vector<Widget*>::iterator it; for( it = mManagedWidgets.begin(); it != mManagedWidgets.end(); ++it ) { - // In the event of scroll panes inside scroll panes, moving a scroll pane will move the inner scroll panes. - // In this case, we need to update the clipping rect. - (*it)->setClippingRect(mParentWidget->getDimensions()); (*it)->_setScrollYOffset(mPosition.y); } } @@ -452,43 +455,36 @@ void ScrollPane::scrollIntoView(Widget* w) { - if((mParentWidget->getWidgetType() == TYPE_LIST) && dynamic_cast<List*>(mParentWidget)->getAutoSizeHeight()) - return; - Rect wDimensions(w->getScreenPosition(),w->getSize()); if(!wDimensions.inside(Rect(getScreenPosition(),mSize))) return; - Point screenPos = getScreenPosition(); - Ogre::Real leftX = ((wDimensions.x - screenPos.x) / mSize.width); - Ogre::Real rightX = (((wDimensions.x + wDimensions.width) - screenPos.x) / mSize.width); + Point parentPosition = mParentWidget->getPosition(); + Size parentSize = mParentWidget->getSize(); + Point parentScreenPos = mParentWidget->getScreenPosition() + mParentWidget->getScrollOffset(); + Point widgetPosition = w->getPosition(); + Size widgetSize = w->getSize(); + Point widgetScreenPos = w->getScreenPosition() + w->getScrollOffset(); + // see if we will be scrolling left, right, or not at all - Ogre::Real hSliderValue = mTopBar->getValue(); - if( leftX < hSliderValue ) + if( widgetScreenPos.x < parentScreenPos.x ) { - // Only need to set value of one, callbacks will sync the other scrollbar. - mTopBar->setValue(leftX); + mTopBar->setValue(widgetPosition.x / mSize.width); } - else if( rightX > (hSliderValue + mTopBar->getSliderWidth()) ) + else if( (widgetScreenPos.x + wDimensions.width) > (parentScreenPos.x + parentSize.width) ) { - // Only need to set value of one, callbacks will sync the other scrollbar. - mTopBar->setValue(rightX * (1 - mTopBar->getSliderWidth())); + mTopBar->setValue((widgetPosition.x + wDimensions.width) / mSize.width); } - Ogre::Real topY = ((wDimensions.y - screenPos.y) / mSize.height); - Ogre::Real botY = (((wDimensions.y + wDimensions.height) - screenPos.y) / mSize.height); // see if we will be scrolling up, down, or not at all - Ogre::Real vSliderValue = mLeftBar->getValue(); - if( topY < vSliderValue ) + if( widgetScreenPos.y < parentScreenPos.y ) { - // Only need to set value of one, callbacks will sync the other scrollbar. - mLeftBar->setValue(topY); + mLeftBar->setValue((parentPosition.y - widgetPosition.y) / mSize.height); } - else if( botY > (vSliderValue + mLeftBar->getSliderHeight()) ) + else if( (widgetScreenPos.y + wDimensions.height) > (parentScreenPos.y + parentSize.height) ) { - // Only need to set value of one, callbacks will sync the other scrollbar. - mLeftBar->setValue(botY - mLeftBar->getSliderHeight()); + mLeftBar->setValue((widgetPosition.y + wDimensions.height) / mSize.height); } } Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIScrollPane.h =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIScrollPane.h 2007-09-30 06:39:33 UTC (rev 403) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIScrollPane.h 2007-10-01 15:10:25 UTC (rev 404) @@ -54,6 +54,8 @@ ScrollPane(const Ogre::String& instanceName, Type type, QuadContainer* container, Widget* ParentWidget, GUIManager* gm); ~ScrollPane(); + // When widgets become managed/unmanaged, the pane may grow or shrink. + void _determinePaneBounds(); /** * Disable Widget, making it unresponsive to events. * NOTE: Sheets cannot be disabled. @@ -72,6 +74,8 @@ HorizontalScrollBar* getTopScrollBar(); VerticalScrollBar::ButtonLayout getVerticalButtonLayout(); + void manageWidget(Widget* w); + /** * Scrolls the Pane so that the given widget is in view. */ @@ -98,7 +102,7 @@ void onChildAddedToParent(const EventArgs& args); void onChildRemovedFromParent(const EventArgs& args); - void onChildTextBoxGainedFocus(const EventArgs& args); + void onChildClicked(const EventArgs& args); void onParentSizeChanged(const EventArgs& args); void onParentPositionChanged(const EventArgs& args); void onHorizontalScroll(const EventArgs& args); @@ -110,8 +114,6 @@ void _syncBarWithParentDimensions(); std::vector<Widget*> mManagedWidgets; - // When widgets become managed/unmanaged, the pane may grow or shrink. - void _determinePaneBounds(); // Inherited functions that need to have their access level changed from public. protected: Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIText.cpp =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIText.cpp 2007-09-30 06:39:33 UTC (rev 403) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIText.cpp 2007-10-01 15:10:25 UTC (rev 404) @@ -19,15 +19,23 @@ mSelectEnd(-1), mLineSpacing(1.0) { - mClippingRect = mOwner->getClippingRect(); mOffset = owner->getOffset() + 1; mGUIManager = owner->getGUIManag... [truncated message content] |
From: <and...@us...> - 2007-10-03 03:55:27
|
Revision: 405 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=405&view=rev Author: andy_miller Date: 2007-10-02 20:55:30 -0700 (Tue, 02 Oct 2007) Log Message: ----------- Added Forests (new landscape scene manager) Cleaned up video demos (fixed Theora) Minor demo fixes Modified Paths: -------------- trunk/python-ogre/ChangeLog.txt trunk/python-ogre/PythonOgreConfig_nt.py trunk/python-ogre/PythonOgreConfig_posix.py trunk/python-ogre/SConstruct trunk/python-ogre/code_generators/theora/generate_code.py trunk/python-ogre/code_generators/theora/hand_made_wrappers.py trunk/python-ogre/demos/dshow/Demo_Video.py trunk/python-ogre/demos/ffmpeg/Demo_Video.py trunk/python-ogre/demos/ogre/Demo_Fresnel.py trunk/python-ogre/demos/ogre/Demo_Terrain.py trunk/python-ogre/demos/theora/demo_video.py trunk/python-ogre/environment.py trunk/python-ogre/scripts/MakeRelease.bat trunk/python-ogre/scripts/UpdateDLLs.bat trunk/python-ogre/scripts/epydoc_config trunk/python-ogre/setup.py Added Paths: ----------- trunk/python-ogre/code_generators/ogreforests/ trunk/python-ogre/code_generators/ogreforests/customization_data.py trunk/python-ogre/code_generators/ogreforests/generate_code.py trunk/python-ogre/code_generators/ogreforests/hand_made_wrappers.py trunk/python-ogre/code_generators/ogreforests/python_forests.h trunk/python-ogre/code_generators/ogreforests/python_forests_aliases.h trunk/python-ogre/code_generators/ogreforests/python_forests_sizeof.h trunk/python-ogre/demos/ogre/Demo_NetworkClient.py trunk/python-ogre/demos/ogre/Demo_NetworkServer.py trunk/python-ogre/demos/ogre/Demo_OgreCollision02.py trunk/python-ogre/demos/ogreforests/ trunk/python-ogre/demos/ogreforests/Application.cpp trunk/python-ogre/demos/ogreforests/Application.h trunk/python-ogre/demos/ogreforests/Demo_Forest.py trunk/python-ogre/demos/ogreforests/Impostor.General.tree2.mesh.png trunk/python-ogre/demos/ogreforests/SampleFramework.py trunk/python-ogre/demos/ogreforests/media/ trunk/python-ogre/demos/ogreforests/media/grass/ trunk/python-ogre/demos/ogreforests/media/grass/grass.material trunk/python-ogre/demos/ogreforests/media/grass/grass.png trunk/python-ogre/demos/ogreforests/media/grass/grass2.png trunk/python-ogre/demos/ogreforests/media/terrains/ trunk/python-ogre/demos/ogreforests/media/terrains/densitymap.png trunk/python-ogre/demos/ogreforests/media/terrains/terrain.cfg trunk/python-ogre/demos/ogreforests/media/terrains/terrain.png trunk/python-ogre/demos/ogreforests/media/terrains/terrain_detail.jpg trunk/python-ogre/demos/ogreforests/media/terrains/terrain_texture.jpg trunk/python-ogre/demos/ogreforests/media/trees/ trunk/python-ogre/demos/ogreforests/media/trees/Leaves.png trunk/python-ogre/demos/ogreforests/media/trees/Pine1.mesh trunk/python-ogre/demos/ogreforests/media/trees/PineLeaves.png trunk/python-ogre/demos/ogreforests/media/trees/tree.material trunk/python-ogre/demos/ogreforests/media/trees/tree.mesh trunk/python-ogre/demos/ogreforests/media/trees/tree2.mesh trunk/python-ogre/demos/ogreforests/media/trees/wood7.jpg trunk/python-ogre/demos/ogreforests/ogre.cfg trunk/python-ogre/demos/ogreforests/plugins.cfg trunk/python-ogre/demos/ogreforests/resources.cfg trunk/python-ogre/demos/ogreode/Demo_GranTurism.py trunk/python-ogre/demos/plib/ trunk/python-ogre/demos/plib/Demo_Client.py trunk/python-ogre/demos/plib/Demo_Server.py trunk/python-ogre/demos/plib/Demo_Sound.py trunk/python-ogre/demos/plib/Demo_httpget.py trunk/python-ogre/demos/plib/NETrecv1.py trunk/python-ogre/demos/plib/NETsend1.py trunk/python-ogre/demos/qgui/ogre.cfg Removed Paths: ------------- trunk/python-ogre/demos/ogreode/media/OgreMeshUpgrade.log Modified: trunk/python-ogre/ChangeLog.txt =================================================================== --- trunk/python-ogre/ChangeLog.txt 2007-10-01 15:10:25 UTC (rev 404) +++ trunk/python-ogre/ChangeLog.txt 2007-10-03 03:55:30 UTC (rev 405) @@ -1,3 +1,24 @@ +xxx 2007: Version 1.1 Release +=============================== +* Built with Ogre 1.4.4+ +* Added Theora module for video playback +* Code generated with updated Py++ that fixes 'already exposed' issues with multiple modules +* Updated QuickGui - SVN +* Updated NxOgre using version 0.9-38 +* Added initial Plib support - Sound and Networking + subset of ssg +* Bug fix to OgreAL to fix ogg playback and general stability +* Ogre code generation improvements - Ctype support for 'void const *' (changed to unsigned int) + previous version only modified 'void *' (missed the const variables) + Fixed cases where multiple void *'s in argument list - only first one was being fixed + Moved common functions into common_utils so single place to fix -- need to implement for other modules +* added helper function for PixelBox ("getData") to give access to the data variable +* updated the vcredist files to the current version +* updated NxOgre config and framework (bug fixes) +* Added "navi" gui support - Now this REALLY needs Python built with VC8 and so IS BUGGY + all current python binaries for Windows are built with VC7 with an older MSVC runtime library that conflicts + with the javascript interpreter thats part of the Mozilla libraries +* demos/media is now the standard OgreSDK media directory + where necessary each demo directory has a ./media directory for additional 'demo' media August 10 2007: Version 1.0 - Release ============================================ Modified: trunk/python-ogre/PythonOgreConfig_nt.py =================================================================== --- trunk/python-ogre/PythonOgreConfig_nt.py 2007-10-01 15:10:25 UTC (rev 404) +++ trunk/python-ogre/PythonOgreConfig_nt.py 2007-10-03 03:55:30 UTC (rev 405) @@ -33,6 +33,7 @@ PATH_ALUT= os.path.join(BASE_DIR, 'freealut') PATH_OgreOde= os.path.join(BASE_DIR, PATH_OgreAddons,'ogreode') PATH_OgreBullet= os.path.join(PATH_OgreAddons,'ogrebullet') +PATH_ogreforests= os.path.join(PATH_OgreAddons,'forests') PATH_OGREAL= os.path.join(PATH_THIRDPARTY,'ogreal') PATH_OPCODE= os.path.join(PATH_THIRDPARTY,'opcode') @@ -127,6 +128,7 @@ PATH_INCLUDE_ogredshow = PATH_ogredshow PATH_INCLUDE_plib = PATH_plib PATH_INCLUDE_navi = os.path.join (PATH_navi,'include') +PATH_INCLUDE_ogreforests = os.path.join (PATH_ogreforests,'include') PATH_INCLUDE_OggVorbisTheora = [ os.path.join(BASE_DIR,'ogg','include') ,os.path.join(BASE_DIR, 'vorbis', 'include') Modified: trunk/python-ogre/PythonOgreConfig_posix.py =================================================================== --- trunk/python-ogre/PythonOgreConfig_posix.py 2007-10-01 15:10:25 UTC (rev 404) +++ trunk/python-ogre/PythonOgreConfig_posix.py 2007-10-03 03:55:30 UTC (rev 405) @@ -40,6 +40,7 @@ PATH_ALUT= os.path.join(BASE_DIR, 'freealut-1.1.0') PATH_OgreOde= os.path.join(PATH_OgreAddons,'ogreode') PATH_OgreBullet= os.path.join(PATH_OgreAddons,'ogrebullet') +PATH_ogreforests= os.path.join(PATH_OgreAddons,'forests') PATH_OGREAL= os.path.join(PATH_THIRDPARTY,'ogreal') PATH_OPCODE= os.path.join(PATH_THIRDPARTY,'opcode') @@ -117,6 +118,7 @@ PATH_INCLUDE_navi = os.path.join (PATH_navi,'include') PATH_INCLUDE_plib = PATH_plib PATH_INCLUDE_ogredshow = PATH_ogredshow +PATH_INCLUDE_ogreforests = os.path.join (PATH_ogreforests,'include') PATH_INCLUDE_Theora = os.path.join (PATH_Theora,'include') PATH_INCLUDE_ogrevideoffmpeg = PATH_ogrevideoffmpeg Modified: trunk/python-ogre/SConstruct =================================================================== --- trunk/python-ogre/SConstruct 2007-10-01 15:10:25 UTC (rev 404) +++ trunk/python-ogre/SConstruct 2007-10-03 03:55:30 UTC (rev 405) @@ -60,7 +60,7 @@ if os.sys.platform <> 'darwin': CCFLAGS = ' `pkg-config --cflags OGRE` ' CCFLAGS += ' -I' - CCFLAGS += ' -O3 -I./ '##### -fvisibility=hidden -finline-limit=20 ' + CCFLAGS += ' -O3 -I./ -fvisibility=hidden -finline-limit=20 ' CCFLAGS += ' -DOGRE_GCC_VISIBILITY ' # -fvisibility-inlines-hidden else: CCFLAGS = ' -I -pipe -Os -I./' @@ -90,10 +90,12 @@ # Let us select the projects to build possible_projects = ['ogre' , 'ois', 'ogrerefapp', 'ogrenewt', 'cegui', 'ode',\ 'ogreode', 'ogreal', 'quickgui', 'opcode', 'nxogre', 'bullet', 'physx', 'betagui','theora',\ - 'ogrevideoffmpeg', 'ogredshow', 'plib', 'navi', 'ogrebulletc', 'ogrebulletd' ] # , 'raknet' + 'ogrevideoffmpeg', 'ogredshow', 'plib', 'ogrebulletc', 'ogrebulletd', + 'ogreforests' ] # , 'raknet', 'navi', default_projects = ['ogre' , 'ois', 'ogrerefapp', 'ogrenewt', 'cegui', 'ode',\ 'ogreode', 'ogreal', 'quickgui', 'opcode', 'nxogre', 'bullet', 'physx', 'betagui','theora',\ - 'ogrevideoffmpeg', 'ogredshow', 'plib', 'navi', 'ogrebulletc', 'ogrebulletd' ] + 'ogrevideoffmpeg', 'ogredshow', 'plib', 'ogrebulletc', 'ogrebulletd', + 'ogreforests' ] # 'navi', # This lets you call scons like: 'scons PROJECTS=ogre,cegui' opts = Options('custom.py') @@ -155,13 +157,10 @@ ## ugly hack - scons returns a list of targets from SharedLibrary - we have to choose the one we want index = 0 # this is the index into a list of targets - '0' should be the platform default - if os.name=="nt": - ## and lets have it install the output into the 'package_dir_name/ModuleName' dir and rename to the PydName - _env.AddPostAction(package,\ - 'mt.exe -nologo -manifest %(name)s.manifest -outputresource:%(name)s;2' % { 'name':package[index] } ) - else: - _env.AddPostAction(package,\ - 'strip -g -S -d --strip-debug -s %(name)s' % { 'name':package[index] } ) + + ## and lets have it install the output into the 'package_dir_name/ModuleName' dir and rename to the PydName + _env.AddPostAction(package,\ + 'mt.exe -nologo -manifest %(name)s.manifest -outputresource:%(name)s;2' % { 'name':package[index] } ) _env.InstallAs(os.path.join(environment.package_dir_name, cls.parent, cls.ModuleName, cls.PydName), Added: trunk/python-ogre/code_generators/ogreforests/customization_data.py =================================================================== --- trunk/python-ogre/code_generators/ogreforests/customization_data.py (rev 0) +++ trunk/python-ogre/code_generators/ogreforests/customization_data.py 2007-10-03 03:55:30 UTC (rev 405) @@ -0,0 +1,12 @@ + +def header_files( version ): + return [ "GrassLoader.h" + ,"TreeLoader3D.h" + ,"TreeLoader2D.h" + ,"BatchPage.h" + ,"ImpostorPage.h" + ] + +def huge_classes( version ): + return [] + \ No newline at end of file Added: trunk/python-ogre/code_generators/ogreforests/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/ogreforests/generate_code.py (rev 0) +++ trunk/python-ogre/code_generators/ogreforests/generate_code.py 2007-10-03 03:55:30 UTC (rev 405) @@ -0,0 +1,349 @@ +#!/usr/bin/env python +# ----------------------------------------------------------------------------- +# This source file is part of Python-Ogre and is covered by the LGPL +# For the latest info, see http://python-ogre.org/ +# +# ----------------------------------------------------------------------------- + +## STARTER TEMPLATE.. +## replace ogreforests with lowercase ogreforests name +## set MAIN_NAMESPACE +## rename and configure .h files + + +import os, sys, time, shutil + +#add environment to the path +sys.path.append( os.path.join( '..', '..' ) ) +#add common utils to the pass +sys.path.append( '..' ) +sys.path.append( '.' ) + +import environment +import common_utils +import customization_data +import hand_made_wrappers + +from pygccxml import parser +from pygccxml import declarations +from pyplusplus import messages +from pyplusplus import module_builder +from pyplusplus import decl_wrappers + +from pyplusplus import function_transformers as ft +from pyplusplus.module_builder import call_policies +from pyplusplus.module_creator import sort_algorithms + +import common_utils.extract_documentation as exdoc +import common_utils.var_checker as varchecker +import common_utils.ogre_properties as ogre_properties +from common_utils import docit + +MAIN_NAMESPACE = '' + +############################################################ +## +## Here is where we manually exclude stuff +## +############################################################ + +def ManualExclude ( mb ): + global_ns = mb.global_ns + if MAIN_NAMESPACE: + main_ns = global_ns.namespace( MAIN_NAMESPACE ) + else: + main_ns = global_ns + + Exclude= ['::TreeRef::getScale' + ] + for c in Exclude: + print "Excluding:",c + main_ns.member_functions( c ).exclude() + +############################################################ +## +## And there are things that manually need to be INCLUDED +## +############################################################ + +def ManualInclude ( mb ): + global_ns = mb.global_ns + if MAIN_NAMESPACE: + main_ns = global_ns.namespace( MAIN_NAMESPACE ) + else: + main_ns = global_ns + + Include=["::BatchedGeometry" +# ,"::SubBatch" + ,"::BatchPage" + ,"::GrassLayer" + ,"::GrassLoader" + ,"::GrassPage" +# ,"::ImpostorBatch" +# ,"::ImpostorTexture" +# ,"::ImpostorPage" + ,"::GeometryPageManager" + ,"::PageLoader" + ,"::PagedGeometry" + ,"::GeometryPage" +# ,"::StaticBillboard" +# ,"::StaticBillboardSet" +# ,"::SBMaterialRef" + ,"::TreeIterator3D" + ,"::TreeIterator2D" + ,"::TreeLoader2D" + ,"::TreeRef" + ,"::TreeIterator2D" + ,"::TreeLoader3D" + ] + for c in Include: + print "Including:",c + main_ns.class_( c ).include() + + Include=["::GrassTechnique" + ,"::FadeTechnique" + ,"::MapChannel" + ,"::MapFilter" +# ,"::ImpostorBlendMode" +# ,"::BillboardMethod" + ] + for c in Include: + print "Including:",c + main_ns.enums( c ).include() + + Include=[ + ] + for c in Include: + main_ns.typedefs( c ).include() + +# for t in main_ns.typedefs(): +# print "td", t + +############################################################ +## +## And things that need manual fixes, but not necessarly hand wrapped +## +############################################################ +def ManualFixes ( mb ): + global_ns = mb.global_ns + if MAIN_NAMESPACE: + main_ns = global_ns.namespace( MAIN_NAMESPACE ) + else: + main_ns = global_ns + +############################################################ +## +## And things that need to have their argument and call values fixed. +## ie functions that pass pointers in the argument list and of course we need +## to read the updated values - so instead we pass them back +## as new values in a tuple (ETC ETC) +## +############################################################ + +def ManualTransformations ( mb ): + global_ns = mb.global_ns + if MAIN_NAMESPACE: + main_ns = global_ns.namespace( MAIN_NAMESPACE ) + else: + main_ns = global_ns + + def create_output( size ): + return [ ft.output( i ) for i in range( size ) ] + + +############################################################################### +## +## Now for the AUTOMATIC stuff that should just work +## +############################################################################### + +def AutoFixes ( mb, MAIN_NAMESPACE ): + """ now we fix a range of things automatically - typically by going through + the entire name space trying to guess stuff and fix it:) + """ + global_ns = mb.global_ns + if MAIN_NAMESPACE: + main_ns = global_ns.namespace( MAIN_NAMESPACE ) + else: + main_ns = global_ns + + # Functions that have void pointers in their argument list need to change to unsigned int's + pointee_types=[] + ignore_names=[] + common_utils.Fix_Void_Ptr_Args ( main_ns ) # , pointee_types, ignore_names ) + + # and change functions that return a variety of pointers to instead return unsigned int's + pointee_types=[] + ignore_names=[] # these are function names we know it's cool to exclude + common_utils.Fix_Pointer_Returns ( main_ns ) # , pointee_types, ignore_names ) + + # functions that need to have implicit conversions turned off + ImplicitClasses=[] + common_utils.Fix_Implicit_Conversions ( main_ns, ImplicitClasses ) + + if os.name =='nt': + Fix_NT( mb ) + elif os.name =='posix': + Fix_Posix( mb ) + + common_utils.Auto_Document( mb, MAIN_NAMESPACE ) + + +############################################################################### +## +## here are the helper functions that do much of the work +## +############################################################################### +def Fix_Posix ( mb ): + """ fixup for posix specific stuff -- note only expect to be called on a posix machine + """ + ## we could do more here if need be... + if sys.platform == 'darwin': + pass + elif sys.platform.startswith ('linux'): + pass + + +def Fix_NT ( mb ): + """ fixup for NT systems + """ + + +# +# the 'main'function +# +def generate_code(): + messages.disable( +# Warnings 1020 - 1031 are all about why Py++ generates wrapper for class X + messages.W1020 + , messages.W1021 + , messages.W1022 + , messages.W1023 + , messages.W1024 + , messages.W1025 + , messages.W1026 + , messages.W1027 + , messages.W1028 + , messages.W1029 + , messages.W1030 + , messages.W1031 + , messages.W1035 + , messages.W1040 + , messages.W1038 + , messages.W1041 + , messages.W1036 # pointer to Python immutable member + , messages.W1033 # unnamed variables + , messages.W1018 # expose unnamed classes + , messages.W1049 # returns reference to local variable + , messages.W1014 # unsupported '=' operator + ) + # + # Use GCCXML to create the controlling XML file. + # If the cache file (../cache/*.xml) doesn't exist it gets created, otherwise it just gets loaded + # NOTE: If you update the source library code you need to manually delete the cache .XML file + # + xml_cached_fc = parser.create_cached_source_fc( + os.path.join( environment.ogreforests.root_dir, "python_forests.h" ) + , environment.ogreforests.cache_file ) + + defined_symbols = ['OGRE_NONCLIENT_BUILD', 'WIN32', "GCCXML_BUG" ] + defined_symbols.append( 'VERSION_' + environment.ogreforests.version ) + + # + # build the core Py++ system from the GCCXML created source + # + mb = module_builder.module_builder_t( [ xml_cached_fc ] + , gccxml_path=environment.gccxml_bin + , working_directory=environment.root_dir + , include_paths=environment.ogreforests.include_dirs + , define_symbols=defined_symbols + , indexing_suite_version=2 + , cflags=environment.ogreforests.cflags + ) + + # if this module depends on another set it here + ## mb.register_module_dependency ( environment.ogre.generated_dir ) + + # normally implicit conversions work OK, however they can cause strange things to happen so safer to leave off + mb.constructors().allow_implicit_conversion = False + mb.register_module_dependency ( environment.ogre.generated_dir ) + + mb.BOOST_PYTHON_MAX_ARITY = 25 + mb.classes().always_expose_using_scope = True + + # + # We filter (both include and exclude) specific classes and functions that we want to wrap + # + global_ns = mb.global_ns + global_ns.exclude() + if MAIN_NAMESPACE: + main_ns = global_ns.namespace( MAIN_NAMESPACE ) + else: + main_ns = global_ns + + main_ns.exclude() ## no namespace so start with everything excluded + + common_utils.AutoExclude ( mb, MAIN_NAMESPACE ) + common_utils.AutoInclude ( mb, MAIN_NAMESPACE ) + ManualInclude ( mb ) + ManualExclude ( mb ) + # here we fixup functions that expect to modifiy their 'passed' variables + ManualTransformations ( mb ) + AutoFixes ( mb, MAIN_NAMESPACE ) + ManualFixes ( mb ) + # + # We need to tell boost how to handle calling (and returning from) certain functions + # + common_utils.Set_DefaultCall_Policies ( main_ns ) + + # + # the manual stuff all done here !!! + # + hand_made_wrappers.apply( mb ) + + NoPropClasses = [""] + for cls in main_ns.classes(): + if cls.name not in NoPropClasses: + cls.add_properties( recognizer=ogre_properties.ogre_property_recognizer_t() ) + + common_utils.add_constants( mb, { 'ogreforests_version' : '"%s"' % environment.ogreforests.version.replace("\n", "\\\n") + , 'python_version' : '"%s"' % sys.version.replace("\n", "\\\n" ) } ) + + ## need to create a welcome doc string for this... + common_utils.add_constants( mb, { '__doc__' : '"ogreforests DESCRIPTION"' } ) + + + ########################################################################################## + # + # Creating the code. After this step you should not modify/customize declarations. + # + ########################################################################################## + extractor = exdoc.doc_extractor() # I'm excluding the UTFstring docs as lots about nothing + mb.build_code_creator (module_name='_ogreforests_' , doc_extractor= extractor ) + + for inc in environment.ogreforests.include_dirs: + mb.code_creator.user_defined_directories.append(inc ) + mb.code_creator.user_defined_directories.append( environment.ogreforests.generated_dir ) + mb.code_creator.replace_included_headers( customization_data.header_files( environment.ogreforests.version ) ) + + huge_classes = map( mb.class_, customization_data.huge_classes( environment.ogreforests.version ) ) + + mb.split_module(environment.ogreforests.generated_dir, huge_classes, use_files_sum_repository=False) + + ## now we need to ensure a series of headers and additional source files are + ## copied to the generated directory.. + additional_dirs=[environment.Config.PATH_INCLUDE_ogreforests, + os.path.join (environment.Config.PATH_ogreforests, 'source') ] + for d in additional_dirs: + for f in os.listdir(d): + if f.endswith('cpp') or f.endswith('.h'): + sourcefile = os.path.join(d, f) + destfile = os.path.join(environment.ogreforests.generated_dir, f ) + if not common_utils.samefile( sourcefile ,destfile ): + shutil.copy( sourcefile, environment.ogreforests.generated_dir ) + print "Updated ", f, "as it was missing or out of date" + +if __name__ == '__main__': + start_time = time.clock() + generate_code() + print 'Source code was updated( %f minutes ).' % ( ( time.clock() - start_time )/60 ) Added: trunk/python-ogre/code_generators/ogreforests/hand_made_wrappers.py =================================================================== --- trunk/python-ogre/code_generators/ogreforests/hand_made_wrappers.py (rev 0) +++ trunk/python-ogre/code_generators/ogreforests/hand_made_wrappers.py 2007-10-03 03:55:30 UTC (rev 405) @@ -0,0 +1,96 @@ +import os +import environment + +WRAPPER_DEFINITION_TreeLoader2D = \ +""" +static PyObject* mSubscriber_tree; +static std::string mName_tree; +Ogre::Real HelperHeightFunction_Tree2D ( Ogre::Real x, Ogre::Real z) { + Ogre::Real y; + if (mName_tree.length() == 0 ) + y = boost::python::call<Ogre::Real>(mSubscriber_tree, x, z); + else + y = boost::python::call_method<Ogre::Real>(mSubscriber_tree, mName_tree.c_str(), x, z); + return y; + } + +void TreeLoader2D_setHeightFunction( TreeLoader2D & me, PyObject* function, std::string name="" ) { + mSubscriber_tree = function; + mName_tree = name; + me.setHeightFunction ( &HelperHeightFunction_Tree2D ); + } +""" + +WRAPPER_DEFINITION_GrassLoader = \ +""" +static PyObject* mSubscriber_grass; +static std::string mName_grass; +Ogre::Real HelperHeightFunction_Grass ( Ogre::Real x, Ogre::Real z) { + Ogre::Real y; + if (mName_grass.length() == 0 ) + y = boost::python::call<Ogre::Real>(mSubscriber_grass, x, z); + else + y = boost::python::call_method<Ogre::Real>(mSubscriber_grass, mName_grass.c_str(), x, z); + return y; + } + +void GrassLoader_setHeightFunction( GrassLoader & me, PyObject* function, std::string name="" ) { + mSubscriber_grass = function; + mName_grass = name; + me.setHeightFunction ( &HelperHeightFunction_Grass ); + } +""" + +WRAPPER_REGISTRATION_TreeLoader2D =[ + 'def ("setHeightFunction", &::TreeLoader2D_setHeightFunction );' + ] + +WRAPPER_REGISTRATION_GrassLoader =[ + 'def ("setHeightFunction", &::GrassLoader_setHeightFunction );' + ] + + + +WRAPPER_DEFINITION_PagedGeometry = \ +""" +void PagedGeometry_addDetailLevel_ImpostorPage( PagedGeometry & me, Ogre::Real maxRange, Ogre::Real transitionLength = 0) { + me.addDetailLevel<ImpostorPage>(maxRange, transitionLength); + } +void PagedGeometry_addDetailLevel_BatchPage( PagedGeometry & me, Ogre::Real maxRange, Ogre::Real transitionLength = 0) { + me.addDetailLevel<BatchPage>(maxRange, transitionLength); + } +void PagedGeometry_addDetailLevel_GrassPage( PagedGeometry & me, Ogre::Real maxRange, Ogre::Real transitionLength = 0) { + me.addDetailLevel<GrassPage>(maxRange, transitionLength); + } +""" +WRAPPER_REGISTRATION_PagedGeometry =[ + 'def ("addDetailLevelBatchPage", &::PagedGeometry_addDetailLevel_BatchPage,\ + (bp::arg("maxRange"), bp::arg("transitionLength")=0.0 ));' + ,'def ("addDetailLevelImpostorPage", &::PagedGeometry_addDetailLevel_ImpostorPage,\ + (bp::arg("maxRange"), bp::arg("transitionLength")=0.0 ));' + ,'def ("addDetailLevelGrassPage", &::PagedGeometry_addDetailLevel_GrassPage,\ + (bp::arg("maxRange"), bp::arg("transitionLength")=0.0 ));' + ] + + +################################################################################################# +################################################################################################# + +def apply_reg ( class_, code ): + for c in code: + class_.add_registration_code ( c ) + +def apply( mb ): + rt = mb.class_( 'GrassLoader' ) + rt.add_declaration_code( WRAPPER_DEFINITION_GrassLoader ) + apply_reg (rt, WRAPPER_REGISTRATION_GrassLoader ) + + rt = mb.class_( 'TreeLoader2D' ) + rt.add_declaration_code( WRAPPER_DEFINITION_TreeLoader2D ) + apply_reg (rt, WRAPPER_REGISTRATION_TreeLoader2D ) + + rt = mb.class_( 'PagedGeometry' ) + rt.add_declaration_code( WRAPPER_DEFINITION_PagedGeometry ) + apply_reg (rt, WRAPPER_REGISTRATION_PagedGeometry ) + + \ No newline at end of file Added: trunk/python-ogre/code_generators/ogreforests/python_forests.h =================================================================== --- trunk/python-ogre/code_generators/ogreforests/python_forests.h (rev 0) +++ trunk/python-ogre/code_generators/ogreforests/python_forests.h 2007-10-03 03:55:30 UTC (rev 405) @@ -0,0 +1,26 @@ +#include <string> +#include "PagedGeometry.h" +#include "GrassLoader.h" + +#include "TreeLoader3D.h" +#include "TreeLoader2D.h" +#include "BatchPage.h" +#include "ImpostorPage.h" + + +// First we create a magic namespace to hold all our aliases +namespace pyplusplus { namespace aliases { + + #include "python_forests_aliases.h" +} } + +// then we exposed everything needed (and more) to ensure GCCXML makes them visible to Py++ +// +namespace python_forests{ namespace details{ +inline void instantiate(){ + //using namespace OGRE; + #include "python_forests_sizeof.h" + +} } } + + Added: trunk/python-ogre/code_generators/ogreforests/python_forests_aliases.h =================================================================== --- trunk/python-ogre/code_generators/ogreforests/python_forests_aliases.h (rev 0) +++ trunk/python-ogre/code_generators/ogreforests/python_forests_aliases.h 2007-10-03 03:55:30 UTC (rev 405) @@ -0,0 +1,16 @@ +// typedef name nicename; +typedef std::list<GrassLayer*, std::allocator<GrassLayer*> > listGrassLayer; +typedef std::map<Ogre::String, Ogre::MaterialPtr> FadedMaterialMap; +typedef Ogre::TRect<float> TBounds; +typedef std::list<GeometryPage*> TPGeometryPages; +typedef std::map<Ogre::Material*, SBMaterialRef*> SBMaterialRefList; +typedef std::map<Ogre::String, Ogre::MaterialPtr> FadedMaterialMap; +typedef std::list<GeometryPageManager*, std::allocator<GeometryPageManager*> > listGeometryPageManager; +// typedef std::map<Ogre::Entity*, std::vector<TreeDef>*>::iterator PageGridListIterator; +// typedef std::pair<Ogre::Entity*, std::vector<TreeDef>*> PageGridListValue; +// typedef std::map<Ogre::Entity*, std::vector<TreeDef>*>::iterator PageGridListIterator; +// typedef std::pair<Ogre::Entity*, std::vector<TreeDef>*> PageGridListValue; +// typedef std::vector<QueuedMesh>::iterator MeshQueueIterator; +// typedef std::vector<QueuedMesh> MeshQueue; +// typedef std::map<Ogre::String, SubBatch*> SubBatchMap; //Stores a list of GeomBatch'es, using a format string (generated with getGeometryFormatString()) as the key value +// typedef Ogre::MapIterator<SubBatchMap> SubBatchIterator; Added: trunk/python-ogre/code_generators/ogreforests/python_forests_sizeof.h =================================================================== --- trunk/python-ogre/code_generators/ogreforests/python_forests_sizeof.h (rev 0) +++ trunk/python-ogre/code_generators/ogreforests/python_forests_sizeof.h 2007-10-03 03:55:30 UTC (rev 405) @@ -0,0 +1,10 @@ +// sizeof ( variable ); +sizeof (std::list<GrassLayer*, std::allocator<GrassLayer*> > ); +sizeof (std::map<Ogre::String, Ogre::MaterialPtr> ); +sizeof (Ogre::TRect<float> ); +sizeof (std::list<GeometryPage*> ); +sizeof (std::map<Ogre::Material*, SBMaterialRef*> ); +sizeof (std::map<Ogre::String, Ogre::MaterialPtr> ); +sizeof (std::list<GeometryPageManager*, std::allocator<GeometryPageManager*> > ); + + Modified: trunk/python-ogre/code_generators/theora/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/theora/generate_code.py 2007-10-01 15:10:25 UTC (rev 404) +++ trunk/python-ogre/code_generators/theora/generate_code.py 2007-10-03 03:55:30 UTC (rev 405) @@ -129,15 +129,15 @@ if cls.name.startswith('Cmd'): cls.exclude() - c = main_ns.class_('::Ogre::TheoraVideoController') - print dir ( c ) - print c.bases - for i in c.bases: - print "Base: ", i - print dir (i) +# # c = main_ns.class_('::Ogre::TheoraVideoController') +# # print dir ( c ) +# # print c.bases +# # for i in c.bases: +# # print "Base: ", i +# # print dir (i) - main_ns.enum('::Ogre::eTexturePlayMode').include(already_exposed=True) - main_ns.enum('::Ogre::eAudioSampleFormat').include(already_exposed=True) + main_ns.enum('::Ogre::eTexturePlayMode').include() + main_ns.enum('::Ogre::eAudioSampleFormat').include() main_ns.class_('::Ogre::RingBuffer').include(already_exposed=True) main_ns.class_('::Ogre::TexturePtr').include(already_exposed=True) @@ -506,7 +506,8 @@ # We need to tell boost how to handle calling (and returning from) certain functions # Set_Call_Policies ( mb.global_ns.namespace (MAIN_NAMESPACE) ) - + c = main_ns.class_('::Ogre::ExternalTextureSource' ).include(already_exposed=True) + # # the manual stuff all done here !!! # Modified: trunk/python-ogre/code_generators/theora/hand_made_wrappers.py =================================================================== --- trunk/python-ogre/code_generators/theora/hand_made_wrappers.py 2007-10-01 15:10:25 UTC (rev 404) +++ trunk/python-ogre/code_generators/theora/hand_made_wrappers.py 2007-10-03 03:55:30 UTC (rev 405) @@ -6,7 +6,14 @@ Ogre::TheoraVideoController * General_castAsVideoController( Ogre::ExternalTextureSource* e ){ return (Ogre::TheoraVideoController*) e; } - + +Ogre::TheoraVideoController * Get_Controller( void ) { + Ogre::TheoraVideoController * mVideoControl = static_cast<Ogre::TheoraVideoController*> + (Ogre::ExternalTextureSourceManager::getSingleton(). + getExternalTextureSource("ogg_video")); + return mVideoControl; + } + Ogre::TheoraVideoController * General_Init( void ) { Ogre::TheoraVideoController * mVideoControl = static_cast<Ogre::TheoraVideoController*> (Ogre::ExternalTextureSourceManager::getSingleton(). @@ -54,6 +61,11 @@ Input: None\\n\\ Ouput: ",\ bp::return_value_policy< bp::reference_existing_object, bp::default_call_policies >());""" + """bp::def( "getVideoController", &Get_Controller, + "Python-Ogre Helper Function: Get a Video Controller .\\n\\ + Input: None\\n\\ + Ouput: ",\ + bp::return_value_policy< bp::reference_existing_object, bp::default_call_policies >());""" ] ################################################################################################# @@ -64,7 +76,8 @@ class_.add_registration_code ( c ) def apply( mb ): - mb.add_declaration_code( WRAPPER_DEFINITION_General ) - apply_reg (mb, WRAPPER_REGISTRATION_General ) + return +# # mb.add_declaration_code( WRAPPER_DEFINITION_General ) +# # apply_reg (mb, WRAPPER_REGISTRATION_General ) \ No newline at end of file Modified: trunk/python-ogre/demos/dshow/Demo_Video.py =================================================================== --- trunk/python-ogre/demos/dshow/Demo_Video.py 2007-10-01 15:10:25 UTC (rev 404) +++ trunk/python-ogre/demos/dshow/Demo_Video.py 2007-10-03 03:55:30 UTC (rev 405) @@ -23,18 +23,12 @@ light = sceneManager.createLight('MainLight') light.setPosition (20, 80, 150) - self.dshowMovieTextureSystem = OgreDshow.DirectShowMovieTexture(321,321) - movieName = "/downloads/vf2.avi" - movieName = "c:/temp/apple.wmv" + self.dshowMovieTextureSystem = OgreDshow.DirectShowMovieTexture(160,120) ## get this right for scaling + movieName = "../media_extra/fish.avi" self.dshowMovieTextureSystem.loadMovie(movieName) self.dshowMovieTextureSystem.playMovie() - -# self._createScalingPlane() -# self._createScrollingKnot() - #self._createWateryPlane() -# self._createVideoPlane() skyMaterial = ogre.MaterialManager.getSingleton() #get the material manager pointer skyMaterial = skyMaterial.create('SkyMat', ogre.ResourceGroupManager.DEFAULT_RESOURCE_GROUP_NAME ) skyMaterial.lightingEnabled = False @@ -43,7 +37,7 @@ textureUnitState.setScrollAnimation(0.15, 0) sceneManager.setSkyDome(True, 'SkyMat', -5.0, 2.0) -# + c = sceneManager.createEntity("cubo", "cube.mesh") n = sceneManager.getRootSceneNode().createChildSceneNode() n.attachObject(c) @@ -56,41 +50,10 @@ tex=mat.getTechnique(0).getPass(0).getTextureUnitState(0) tex.setTextureName( self.dshowMovieTextureSystem.getMovieTexture().getName()) - - def _createScalingPlane(self): - entity = self.sceneManager.createEntity('Plane', ogre.SceneManager.PT_PLANE) - entity.setMaterialName('Examples/TextureEffect1') - node = self.sceneManager.getRootSceneNode().createChildSceneNode(ogre.Vector3(-250, -40, -100)) - node.attachObject(entity) - - def _createScrollingKnot(self): - entity = self.sceneManager.createEntity('Knot', 'knot.mesh') - entity.setMaterialName('Examples/TextureEffect2') - node = self.sceneManager.getRootSceneNode().createChildSceneNode(ogre.Vector3(200, 50, 150)) - node.attachObject(entity) - - def _createWateryPlane(self): - entity = self.sceneManager.createEntity('WaterPlane', ogre.SceneManager.PT_PLANE) - entity.setMaterialName('Examples/TextureEffect3') - node = self.sceneManager.getRootSceneNode().attachObject(entity) - - def _createVideoPlane(self): - entity = self.sceneManager.createEntity('WaterPlane', ogre.SceneManager.PT_PLANE) - entity.setMaterialName('Examples/Rockwall') - node = self.sceneManager.getRootSceneNode().attachObject(entity) - - mat=ogre.MaterialManager.getSingleton().getByName('Examples/Rockwall') - tex=mat.getTechnique(0).getPass(0).getTextureUnitState(0) - tex.setTextureName( - self.dshowMovieTextureSystem.getMovieTexture().getName()) - - - def _createFrameListener(self): self.frameListener = VideoListener(self.renderWindow, self.camera, self.dshowMovieTextureSystem) self.root.addFrameListener(self.frameListener) - def __del__(self): self.dshowMovieTextureSystem.stopMovie() @@ -103,11 +66,13 @@ sf.FrameListener.__init__(self, renderWindow, camera) def frameStarted(self, frameEvent): - self.video.updateMovieTexture() + if not self.video.isPlayingMovie(): + self.video.rewindMovie() + self.video.playMovie() + else: + self.video.updateMovieTexture() return sf.FrameListener.frameStarted(self, frameEvent) - - if __name__ == '__main__': try: application = VideoApplication() Modified: trunk/python-ogre/demos/ffmpeg/Demo_Video.py =================================================================== --- trunk/python-ogre/demos/ffmpeg/Demo_Video.py 2007-10-01 15:10:25 UTC (rev 404) +++ trunk/python-ogre/demos/ffmpeg/Demo_Video.py 2007-10-03 03:55:30 UTC (rev 405) @@ -51,7 +51,7 @@ n.setPosition(ogre.Vector3(i*250, 0, 0)) #self.cubeEntities.append(c) - v = VIDEO.cVideoPlayer("videoMaterial" + str(i), "apple.wmv") + v = VIDEO.cVideoPlayer("videoMaterial" + str(i), "fish.avi") #v = VIDEO.cVideoPlayer("videoMaterial" + str(i), "test.divx") v.setLoop(True) self.videoPlayer.append(v) Modified: trunk/python-ogre/demos/ogre/Demo_Fresnel.py =================================================================== --- trunk/python-ogre/demos/ogre/Demo_Fresnel.py 2007-10-01 15:10:25 UTC (rev 404) +++ trunk/python-ogre/demos/ogre/Demo_Fresnel.py 2007-10-03 03:55:30 UTC (rev 405) @@ -38,15 +38,15 @@ def preRenderTargetUpdate(self,evt): #Hide plane and objects above the water - self.planeEnt.visible = False + self.planeEnt.setVisible ( False ) for e in self.aboveWaterEnts: - e.visible = False + e.setVisible ( False ) def postRenderTargetUpdate(self,evt): #Show plane and objects above the water - self.planeEnt.visible = True + self.planeEnt.setVisible ( True ) for e in self.aboveWaterEnts: - e.visible = True + e.setVisible ( True ) # Reflection Render Target Listener class ReflectionTextureListener(ogre.RenderTargetListener): @@ -60,16 +60,16 @@ def preRenderTargetUpdate(self,evt): #Hide plane and objects above the water - self.planeEnt.visible = False + self.planeEnt.setVisible ( False ) for e in self.belowWaterEnts: - e.setVisible ( False ) ##.visible to setVisible + e.setVisible ( False ) self.cam.enableReflection(self.reflectionPlane) def postRenderTargetUpdate(self,evt): #Show plane and objects above the water - self.planeEnt.visible = True + self.planeEnt.setVisible ( True ) for e in self.belowWaterEnts: - e.setVisible ( True ) # .visible to setVisible + e.setVisible ( True ) self.cam.disableReflection() class FresnelFrameListener(sf.FrameListener): @@ -165,15 +165,15 @@ # check graphics card capabilities capabilities = ogre.Root.getSingleton().getRenderSystem().getCapabilities() - if not capabilities.hasCapability(ogre.RSC_VERTEX_PROGRAM) or not capabilities.hasCapability(ogre.RSC_FRAGMENT_PROGRAM): - raise ogre.Exception(1, 'Your card does not support vertex and fragment programs, so cannot run this demo. Sorry!', 'fresneldemo.py') - - else: - if (ogre.GpuProgramManager.getSingleton().isSyntaxSupported("arbfp1") and - ogre.GpuProgramManager.getSingleton().isSyntaxSupported("ps_2_0") and - ogre.GpuProgramManager.getSingleton().isSyntaxSupported("ps_1_4")): - - raise ogre.Exception(1, 'Your card does not support advanced fragment programs, so cannot run this demo. Sorry!', 'fresneldemo.py') +# if not capabilities.hasCapability(ogre.RSC_VERTEX_PROGRAM) or not capabilities.hasCapability(ogre.RSC_FRAGMENT_PROGRAM): +# raise ogre.Exception(1, 'Your card does not support vertex and fragment programs, so cannot run this demo. Sorry!', 'fresneldemo.py') +# +# else: +# if (ogre.GpuProgramManager.getSingleton().isSyntaxSupported("arbfp1") and +# ogre.GpuProgramManager.getSingleton().isSyntaxSupported("ps_2_0") and +# ogre.GpuProgramManager.getSingleton().isSyntaxSupported("ps_1_4")): +# +# raise ogre.Exception(1, 'Your card does not support advanced fragment programs, so cannot run this demo. Sorry!', 'fresneldemo.py') theCam = self.camera self.camera.setPosition (-50,125,760) @@ -233,6 +233,7 @@ (0, 0, 1)) self.planeEnt = sceneManager.createEntity( "plane", "ReflectPlane" ) + print "\n\n", self.planeEnt, "\n",dir(self.planeEnt ) self.planeEnt.setMaterialName("Examples/FresnelReflectionRefraction") Added: trunk/python-ogre/demos/ogre/Demo_NetworkClient.py =================================================================== --- trunk/python-ogre/demos/ogre/Demo_NetworkClient.py (rev 0) +++ trunk/python-ogre/demos/ogre/Demo_NetworkClient.py 2007-10-03 03:55:30 UTC (rev 405) @@ -0,0 +1,26 @@ +""" +VERY simple and crude client code. +Assumes there is a server that will echo the sent data and when it's time to close +the server will send "Done" + +""" + +import socket as s + +if __name__ == "__main__": + # we need to send (and recieve) data on the local machine using port 4444 + (family, socktype, proto, canonname, sockaddr) = s.getaddrinfo ( "127.0.0.1",4444)[0] #s.gethostname(), 4444 )[0] + + socket = s.socket( s.AF_INET, s.SOCK_DGRAM ) # create the client socket, note I'm testing with UDP traffic + socket.connect ( sockaddr ) + loop = True + count = 0 + while loop: + socket.send ( str(count) + " hello out there") + incomming = socket.recv ( 256 ) + print "Received:", incomming + if incomming == "Done": ## special -- it's up to the server to decided when we are done... + loop = False + count += 1 + socket.close() + \ No newline at end of file Added: trunk/python-ogre/demos/ogre/Demo_NetworkServer.py =================================================================== --- trunk/python-ogre/demos/ogre/Demo_NetworkServer.py (rev 0) +++ trunk/python-ogre/demos/ogre/Demo_NetworkServer.py 2007-10-03 03:55:30 UTC (rev 405) @@ -0,0 +1,41 @@ +""" +VERY simple and crude Python server + +Receives data in a none state ful fashion -- loops as an echo server for a while +and after 10 loops sends a 'Done' to the client and tells the server to stop + +""" + +import socket as s +import SocketServer as ss + +class Handler ( ss.BaseRequestHandler ): + def handle ( self ): + datain = self.request[0] # get the input string + s=datain.split() ## Assume input data is <count><space><rest of info> + count = int ( s[0] ) + + sock = self.request[1] ## this is the incomming socket + + ## because this is a UDP demo we need to connect to send info back + ## I suspect this isn't needed if we use TCP server + sock.connect ( self.client_address ) + + if count > 10: # we are only looping 10 times + sock.send ("Done") + self.server.closenow = True # tell the server we are done.. + else: + sock.send ( "Back at you: " + datain) ## send data back + + +class Server(ss.ThreadingMixIn, ss.UDPServer): pass + +if __name__ == "__main__": + # we create a server on the local machine listening to port 4444.. + # could also use "localhost" instead of gethostname() + (family, socktype, proto, canonname, sockaddr) = s.getaddrinfo ( "127.0.0.1", 4444 )[0] + myServer = Server ( sockaddr, Handler ) + myServer.closenow = False + + while not myServer.closenow: + myServer.handle_request() Added: trunk/python-ogre/demos/ogre/Demo_OgreCollision02.py =================================================================== --- trunk/python-ogre/demos/ogre/Demo_OgreCollision02.py (rev 0) +++ trunk/python-ogre/demos/ogre/Demo_OgreCollision02.py 2007-10-03 03:55:30 UTC (rev 405) @@ -0,0 +1,223 @@ +## +## This is a very ugly hack in progress to test collisions (without Physics) +## +## It uses the Ogre Intersection Query functions with the intention of extending it +## to use Opcode to see if there is a performance difference +## + +import ogre.renderer.OGRE as ogre +import ogre.physics.ODE as ode + +import SampleFramework as sf +import random, sys +from math import * + +NUMBOXES=300 +TypeOgre=0 +TypeODE=1 + +AppType = TypeODE + +class OgreCollideApplication(sf.Application): + # + # first lets create a nice scene with a floor plane (that also get's collided + # + def _createScene(self): + sceneManager = self.sceneManager + ## Set ambient light + sceneManager.setAmbientLight ( (0.6, 0.6, 0.6) ) + + ## Create a skydome + sceneManager.setSkyDome (True, "Examples/CloudySky",5,8) + light = sceneManager.createLight('MainLight') + light.setPosition (20, 80, 50) + + # create the floor + plane = ogre.Plane() + plane.normal = ogre.Vector3.UNIT_Y + plane.d = 200 + mm = ogre.MeshManager.getSingleton() + mm.createPlane('FloorPlane', 'General', plane, 200000.0, 200000.0, + 20, 20, True, 1, 50, 50, ogre.Vector3.UNIT_Z) + entity = sceneManager.createEntity('floor', 'FloorPlane') + entity.setMaterialName('Examples/RustySteel') + sceneManager.getRootSceneNode().createChildSceneNode().attachObject(entity) + + # create the camera node & attach camera + cameraNode = sceneManager.getRootSceneNode().createChildSceneNode() + cameraNode.attachObject(self.camera) + + # how many barrels and pallets do we want + self.numBoxes = NUMBOXES + + # we need a framelistener to make life easy + def _createFrameListener(self): + self.frameListener = OgreCollideListener(self.renderWindow, self.camera, self.sceneManager, self.numBoxes) + self.root.addFrameListener(self.frameListener) + + + +class OgreCollideQueryListener(ogre.IntersectionSceneQueryListener): + """ the listener that gets called for each pair of intersecting objects """ + def __init__ ( self ): + ogre.IntersectionSceneQueryListener.__init__ ( self ) + + def queryResult ( self, first, second ): + """ the actual function that gets called - for the demo I simply change the material type + so we see the collisions - except I don't change the floor material""" + if first.name != "floor": + first.setMaterialName('Examples/Chrome') + if second.name != "floor": + second.setMaterialName('Examples/TextureEffect2') + return True + +class OgreCollideListener(sf.FrameListener): + """ the frame listener we are using""" + + def __init__(self, renderWindow, camera, sm, num): + sf.FrameListener.__init__(self, renderWindow, camera) + # Create an intersection query + self.intersectSceneQuery = sm.createIntersectionQuery() + # and a listener to receive the results + self.querylistener = OgreCollideQueryListener() + + # I then create a range of crates and barrels to test with + self.numBoxes = num + self.sceneManager = sm + self.CreateBoxes ( num ) + self.frametime = 0 + + if AppType == TypeODE: + self.SetupODE() + + def SetupODE(self): + # Create a world object + self.world = ode.dWorld() + self.world.setGravity( 0,-9.81,0 ) + self.world.setERP(0.8) + self.world.setCFM(1E-5) + + # Create a space object + self.space = ode.CreateSimpleSpace() + + # Create a plane geom which prevent the objects from falling forever + self.floor = ode.dPlane(space.id(), 0.0, 1.0, 0.0, 0.0) + + # A list with ODE bodies + self.odebodies = [] + + # A joint group for the contact joints that are generated whenever + # two bodies collide + self.contactgroup = ode.dJointGroup() + + def frameStarted(self, frameEvent): + """ called each frame (at the start), check if it's time to do collision checking and + if so do it, otherwise pass through""" + self.frametime += frameEvent.timeSinceLastFrame + + if AppType == TypeOgre: + # for performance reasons lets check for collisions about 5 times a second + if self.frametime > 0.2: + self.ResetBoxes() + self.intersectSceneQuery.execute( self.querylistener ) + self.frametime = 0 + elif AppType == TypeODE: + # Detect collisions and create contact joints + self.space.collide((self.world,self.contactgroup), self, "ODE_callback") + + # Simulation step + self.world.step(self.frametime) + + # Remove all contact joints + contactgroup.empty() + return sf.FrameListener.frameStarted(self, frameEvent) + + # Collision callback + def ODE_callback(self,args, geom1, geom2): + """Callback function for the collide() method. + + This function checks if the given geoms do collide and + creates contact joints if they do. + """ + # Check if the objects do collide + contacts = ode.dCollide(geom1, geom2) + # Create contact joints + world,contactgroup = args + for c in contacts: + c.setBounce(0.2) + c.setMu(5000) + j = ode.ContactJoint(world, contactgroup, c) + j.attach(geom1.getBody(), geom2.getBody()) + + def frameEnded ( self, ev ): + """and at the end of the frame we update the objects positions in preparation for the + next frame""" + self.UpdateBoxes(ev.timeSinceLastFrame) + return sf.FrameListener.frameEnded(self, ev) + + def CreateBoxes (self, num): + self.numBoxes=num + self._bodies=[] + names = ['WoodPallet','Barrel'] + self.mBoxTime = [] #new float[mNbBoxes] + self.nodes = [] + self.mSpeed = .000001 + self.mAmplitude = .5 + for i in range ( self.numBoxes ): + ## Create the visual representation (the Ogre entity and scene node) + name = "object" + str(i) + entity = self.sceneManager.createEntity(name, names[i % len(names)] + ".mesh") + node = self.sceneManager.getRootSceneNode().createChildSceneNode(name) + node.attachObject(entity) + entity.setNormaliseNormals(True) + entity.setCastShadows(True) + ## Pick a size + scale= 100 + size = ogre.Vector3((random.random() * 0.5 + 0.1) * scale, + (random.random() * 0.5 + 0.1) * scale, + (random.random() * 0.5 + 0.1) * scale) + position = ogre.Vector3((random.random() -0.5 ) * 800.0, + (random.random() - 0.5 ) * 500.0, + (random.random() - 0.5 ) * 800.0) + + node.setScale (size.x * 0.1,size.y * 0.1,size.z * 0.1) + node.setPosition (position) + + # we need access to the entity and nodes to reset the material + self._bodies.append ( entity) + self.nodes.append( node) + self.mBoxTime.append ( 10.0*random.random() ) + + def ResetBoxes(self): + """ set the objects back to their original materials + """ + for i in range ( self.numBoxes): + if i % 2 : + self._bodies[i].setMaterialName('RustyBarrel') + else: + self._bodies[i].setMaterialName('WoodPallet') + + def UpdateBoxes(self, timesincelastframe): + """ move the objects in an interesting way :) """ + for i in range ( self.numBoxes): + self.mBoxTime[i] += timesincelastframe * 0.001 # self.mSpeed + Center = ogre.Vector3() + n = self.nodes[i] + Center.x = cos(self.mBoxTime[i]*2.17)*self.mAmplitude + sin(self.mBoxTime[i])*self.mAmplitude*0.5 + Center.y = cos(self.mBoxTime[i]*1.38)*self.mAmplitude + sin(self.mBoxTime[i]*self.mAmplitude) + Center.z = sin(self.mBoxTime[i]*0.777)*self.mAmplitude + pos = n.Position + pos.x += Center.x + pos.y += Center.y + pos.z += Center.y + n.Position = pos + + +if __name__ == '__main__': + try: + application = OgreCollideApplication() + application.go() + except ogre.OgreException, e: + print e + + Modified: trunk/python-ogre/demos/ogre/Demo_Terrain.py =================================================================== --- trunk/python-ogre/demos/ogre/Demo_Terrain.py 2007-10-01 15:10:25 UTC (rev 404) +++ trunk/python-ogre/demos/ogre/Demo_Terrain.py 2007-10-03 03:55:30 UTC (rev 405) @@ -18,24 +18,7 @@ self.sceneManager = self.root.createSceneManager(ogre.ST_GENERIC) self.sceneManager = self.root.createSceneManager(ogre.ST_EXTERIOR_CLOSE) - def _createCamera(self): - self.camera = self.sceneManager.createCamera('PlayerCam') - self.camera.setPosition (ogre.Vector3(128, 25, 128)) - self.camera.setPosition (128, 25, 128) - self.camera.position = ogre.Vector3(128, 25, 128) - self.camera.position = (128, 25, 128) - self.camera.position = [128, 25, 128] - self.camera.position = 128, 25, 128 - - self.camera.lookAt(0, 0, -300) - self.camera.NearClipDistance = 1 - # infinte far clip plane? - #if self.root.renderSystem.capabilities.hasCapability(ogre.RSC_INFINITE_FAR_PLANE): - #self.camera.farClipDistance = 0 - #else: - self.camera.FarClipDistance = 1000 - def _createScene(self): sceneManager = self.sceneManager camera = self.camera Added: trunk/python-ogre/demos/ogreforests/Application.cpp =================================================================== --- trunk/python-ogre/demos/ogreforests/Application.cpp (rev 0) +++ trunk/python-ogre/demos/ogreforests/Application.cpp 2007-10-03 03:55:30 UTC (rev 405) @@ -0,0 +1,359 @@ +/*----------------------------------------------------------------------------- +WARNING!!! main.cpp, Appliation.h, and Appliation.cpp are TEMPORARY source files +that demonstrate PagedGeometry. They are extremely messy, unstructured, and they +should NOT be taken as an example. This is the beta version of PagedGeometry 1.0 +and does not include the examples and tutorials that the final version will have. +-----------------------------------------------------------------------------*/ + +//Application.cpp +//------------------------------------------------------------------------------------- + +#include "Application.h" +#include "ExampleFrameListener.h" + +#include "OgreRoot.h" +#include "OgreFrameListener.h" +#include "OgreCamera.h" +#include "OgreRenderWindow.h" +#include "OgreSceneManager.h" +#include "OgreSceneQuery.h" +#include "OgreRay.h" +using namespace Ogre; + +#include "PagedGeometry.h" +#include "ImpostorPage.h" +#include "BatchPage.h" + +#include "TreeLoader2D.h" +#include "TreeLoader3D.h" +#include "GrassLoader.h" + + +//Global pointer to the Application object +Application *app; +std::string mResourcePath; + +bool GrassFrameListener::frameStarted(const FrameEvent& evt) +{ + app->trees->update(); + app->grass->update(); + grassloader->updateAnimation(); + return true; +} + +//Standard constructor +Application::Application() +{ + frameListener = 0; + root = 0; + + //set resource path depending on platform + mResourcePath = getResourcePath(); +} + +//Standard destructor +Application::~Application() +{ + if (frameListener) + delete frameListener; + if (root) + delete root; +} + +//Starts application. Called automatically from main() +void Application::go() +{ + //Initialize + if (!setup()) + return; + + //Load world + createScene(); + + //Start render loop + root->startRendering(); + + //Unload world + destroyScene(); +} + +//Initializes OGRE scene manager, resources, cameras, viewports, etc. +bool Application::setup() +{ + //Create Ogre::Root + root = new Root(); + + // OSX does not have a working config dialog at the moment + #if OGRE_PLATFORM == OGRE_PLATFORM_APPLE + root->loadPlugin("RenderSystem_GL"); + root->loadPlugin("Plugin_CgProgramManager"); + root->loadPlugin("Plugin_BSPSceneManager"); + root->loadPlugin("Plugin_OctreeSceneManager"); + root->setRenderSystem(root->getAvailableRenderers()->front()); + root->getRenderSystem()->setConfigOption("RTT Preferred Mode", "RTT"); + root->getRenderSystem()->setConfigOption("Full Screen", "No"); + root->getRenderSystem()->setConfigOption("Video Mode", "800 x 600"); + window = root->initialise(true); + #else +... [truncated message content] |
From: <and...@us...> - 2007-10-03 04:10:33
|
Revision: 406 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=406&view=rev Author: andy_miller Date: 2007-10-02 21:10:32 -0700 (Tue, 02 Oct 2007) Log Message: ----------- Missing files -- Navi Demo.. Added Paths: ----------- trunk/python-ogre/README trunk/python-ogre/convert.sed trunk/python-ogre/demos/media_extra/fish.ogg trunk/python-ogre/demos/media_extra/test.tst trunk/python-ogre/demos/navi/ trunk/python-ogre/demos/navi/Demo1_navi.py trunk/python-ogre/demos/navi/Demo_navi.py trunk/python-ogre/demos/navi/SampleFramework.py trunk/python-ogre/demos/navi/media.cfg trunk/python-ogre/demos/navi/ogre.cfg trunk/python-ogre/demos/navi/plugins.cfg trunk/python-ogre/demos/navi/resources.cfg trunk/python-ogre/demos/ogre/tests/Test_ManualMeshes.py trunk/python-ogre/demos/ogre/tests/Test_RenderOneFrame.py trunk/python-ogre/demos/ogre/tests/Test_WriteToTexture.py Added: trunk/python-ogre/README =================================================================== --- trunk/python-ogre/README (rev 0) +++ trunk/python-ogre/README 2007-10-03 04:10:32 UTC (rev 406) @@ -0,0 +1,23 @@ +Please see http://python-ogre.python.hosting.com for info + +----- + +Copyright 2006-2007 The Python-Ogre Team. + +This file is part of Python-Ogre + +Python-Ogre is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +Python-Ogre 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 +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with Python-Ogre; see the file COPYING. If not, write to +the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. + Added: trunk/python-ogre/convert.sed =================================================================== --- trunk/python-ogre/convert.sed (rev 0) +++ trunk/python-ogre/convert.sed 2007-10-03 04:10:32 UTC (rev 406) @@ -0,0 +1,25 @@ +# sedscript to convert C++ Ogre programs t0 python +# simple stuff - comments, -> and :: to ., true/false spelling, remove ;, remove trailing 'f' on floats +s/\-\>/\./ +s/\/\//##/ +s/\-\>/\./ +s/\:\:/\./ +s/true/True/ +s/false/False/ +s/NULL/None/ +s/this/self/ +s/;/ / +s/const// +#s/\(^W*\)Ogre::^w+\(^W*\)/\1/ +s/\([0-9]\)f/\1/ +# put trailing : after if and else +s/\(^\W*if.*$\)/\1:/ +s/\(^\W*else.*$\)/\1:/ +# open and closing braces on their own lines get removed +s/^\W*{\W*$// +s/^\W*}\W*$// + +# (r'^[\W]*{[\W]*$\n',''), +# (r'^[\W]*}[\W]*$\n',''), + #(r'void \W*(\w+)\(','def $1('), +## (r'^/\*.*\*/', 'special3') Added: trunk/python-ogre/demos/media_extra/fish.ogg =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/media_extra/fish.ogg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/media_extra/test.tst =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/media_extra/test.tst ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/navi/Demo1_navi.py =================================================================== --- trunk/python-ogre/demos/navi/Demo1_navi.py (rev 0) +++ trunk/python-ogre/demos/navi/Demo1_navi.py 2007-10-03 04:10:32 UTC (rev 406) @@ -0,0 +1,407 @@ +# For the latest inf +# +# You may use this sample code for anything you like, it is not covered by the +# LGPL. +# ----------------------------------------------------------------------------- +import ogre.renderer.OGRE as ogre +import ogre.gui.navi as navi +import ogre.io.OIS as OIS +import SampleFramework as sf + + +naviMgr = navi.NaviManager.Get() + +class NaviDemo(): + def __init__(self): + self.shouldQuit = False + self.renderWin = 0 + self.sceneMgr = 0 + + + def Startup( self ): + root = ogre.Root("./plugins.cfg", "./ogre.cfg", "./ogre.log") + if not root.restoreConfig(): + self.shouldQuit = not root.showConfigDialog() + if self.shouldQuit: + return + root.saveConfig() + self.root = root + self.renderWin = root.initialise(True, "NaviDemo") + + self.sceneMgr = root.createSceneManager("TerrainSceneManager", "NaviDemoSceneMgr") + self.sceneMgr.setAmbientLight(ogre.ColourValue(1, 1, 1)) + self.sceneMgr.setShadowTechnique(ogre.SHADOWTYPE_TEXTURE_ADDITIVE) + self.sceneMgr.setFog( ogre.FOG_LINEAR, ogre.ColourValue(0.9, 0.9, 1), 0.0, 0, 1550 ) + + camera = self.sceneMgr.createCamera("MainCam") + camera.setPosition(0,10,-15) + camera.lookAt(0, 0, 30) + viewport = self.renderWin.addViewport(camera) + viewport.setBackgroundColour(ogre.ColourValue(0.5, 0.5, 0.5)) + camera.setAspectRatio(viewport.getActualWidth() / viewport.getActualHeight()) + camera.setFarClipDistance( 1000 ) + camera.setNearClipDistance( 1 ) + camNode = self.sceneMgr.getRootSceneNode().createChildSceneNode("camNode") + camNode.attachObject(camera) + + if (root.getRenderSystem().getCapabilities().hasCapability(ogre.RSC_INFINITE_FAR_PLANE)): + camera.setFarClipDistance(0) + + light = self.sceneMgr.createLight( "Sun" ) + light.setType( ogre.Light.LT_DIRECTIONAL ) + light.setDiffuseColour( ogre.ColourValue( .82, .81, .7 ) ) + light.setSpecularColour( ogre.ColourValue( .82, .81, .7 ) ) + light.setDirection( ogre.Vector3( 0, -1, 1 ) ) + + self.parseResources() + + self.sceneMgr.setSkyDome( True, "CloudySky", 5, 6, 8 ) + + + ## Startup, create, and manage Navis + naviMgr.Startup(self.renderWin) + + naviMgr.createNavi("menubar", "local://menubar.html", navi.NaviPosition(navi.BottomCenter), 1024, 128, False) + naviMgr.setNaviMask("menubar", "navimenu_bg.png") +# # naviMgr.bind("menubar", "turnOn", NaviDelegate(this, &NaviDemo.turnOn), Strings("name")) +# # naviMgr.bind("menubar", "turnOff", NaviDelegate(this, &NaviDemo.turnOff), Strings("name")) +# # naviMgr.bind("menubar", "hpChange", NaviDelegate(this, &NaviDemo.hpChange), Strings("direction")) +# +# naviMgr.createNavi("status", "local:##status.html", navi.NaviPosition(0, 0), 512, 256, True, False) +# naviMgr.setNaviMask("status", "status_bg.png") +# # naviMgr.bind("status", "levelChanged", NaviDelegate(this, &NaviDemo.levelChanged), Strings("#level")) +# +# naviMgr.createNavi("chat", "http:##navi.agelessanime.com/chat", navi.NaviPosition(navi.BottomLeft, 40, -150), 512, 256, True, False) +# naviMgr.setNaviMask("chat", "navichat_bg.png") +# naviMgr.setNaviColorKey("chat", "#19001a", 0.7) +# # naviMgr.bind("chat", "messageSent", NaviDelegate(this, &NaviDemo.messageSent), Strings("nick")("message")) +# +# naviMgr.createNavi("equip", "local:##equip.html", navi.NaviPosition(navi.Right), 256, 512, True, False) +# naviMgr.setNaviMask("equip", "naviequip_bg.png") +# # naviMgr.bind("equip", "itemEquipped", NaviDelegate(this, &NaviDemo.itemEquipped), Strings("name")) +# +# ## Startup NaviMouse and create the cursors +# mouse = naviMgr.StartupMouse() +# mouse.createCursor("defaultCursor", 3, 2).addFrame(0, "cursor1.png") +# mouse.setDefaultCursor("defaultCursor") +# +# ## If you define a "move" cursor, NaviMouse will automatically use that when you move a Navi +# moveCursor = mouse.createCursor("move", 19, 19) +# moveCursor.addFrame(0, "cursorMove.png") +# + ## Create the ground + plane = ogre.Plane ( ogre.Vector3.UNIT_Y, 0) + ogre.MeshManager.getSingleton().createPlane("ground", + ogre.ResourceGroupManager.DEFAULT_RESOURCE_GROUP_NAME, plane, + 1500,1500,1,1,True,1,9,9,ogre.Vector3.UNIT_Z) + ent = self.sceneMgr.createEntity( "GroundEntity", "ground" ) + self.sceneMgr.getRootSceneNode().createChildSceneNode("GroundNode").attachObject(ent) + ent.setMaterialName("Terrain") + ent.setCastShadows(False) + + ## Create the Blue Knot + ent = self.sceneMgr.createEntity( "BlueMetalKnot", "knot.mesh" ) + ent.setMaterialName("Knot") + ent.setCastShadows( True ) + + ## Position and scale the Blue Knot + node = self.sceneMgr.getRootSceneNode().createChildSceneNode("KnotNode", ogre.Vector3(0, 12, 45)) + node.attachObject( ent ) + node.scale=(.07, .07, .07) + print "Done Startup" + + ##loadInputSystem() + + ##Ogre.WindowEventUtilities.addWindowEventListener(self.renderWin, this) + + def turnOn(naviData): + naviName = naviData["name"].str() + + if(naviName == "quit"): + self.shouldQuit = True + else: + naviMgr.resetNaviPosition(naviName) + naviMgr.showNavi(naviName, True) + + def turnOff(naviData): + naviMgr.hideNavi(naviData["name"].str(), True) + +# # # def hpChange(const NaviData &naviData) +# # # { +# # # static short curHP = 100 +# # # +# # # if(naviData["direction"].str() == "up") +# # # { +# # # curHP += (rand() % 30) + 1 +# # # if(curHP > 100) curHP = 100 +# # # std.stringstream setHP +# # # setHP << "setHP(" << curHP << ")" +# # # naviMgr.naviEvaluateJS("status", setHP.str()) +# # # } +# # # else +# # # { +# # # curHP -= (rand() % 30) + 1 +# # # if(curHP < 0) curHP = 0 +# # # std.stringstream setHP +# # # setHP << "setHP(" << curHP << ")" +# # # naviMgr.naviEvaluateJS("status", setHP.str()) +# # # } +# # # +# # # std.stringstream hpMsg +# # # hpMsg << "Navi Menubar: Current HP is now " << curHP << "%" +# # # +# # # LogManager.getSingleton().logMessage(hpMsg.str()) +# # # } +# # # +# # # void NaviDemo.messageSent(const NaviData &naviData) +# # # { +# # # naviMgr.naviEvaluateJS("status", "$('playerName').innerHTML = '" + naviData["nick"].str() + "'") +# # # LogManager.getSingleton().logMessage("Navi Chat: " + naviData["message"].str()) +# # # } +# # # +# # # void NaviDemo.itemEquipped(const NaviData &naviData) +# # # { +# # # LogManager.getSingleton().logMessage("Navi Equip: Item '" + naviData["name"].str() + "' equipped!") +# # # } +# # # +# # # void NaviDemo.levelChanged(const NaviData &naviData) +# # # { +# # # int level = naviData["level"].toInt() +# # # +# # # std.stringstream levelMsg +# # # levelMsg << "Navi Status: Level has been changed to: " << level << ", double that is: " << level * 2 +# # # +# # # LogManager.getSingleton().logMessage(levelMsg.str()) +# # # } + + def Update(self): + navi.NaviManager.Get().Update() + self.root.renderOneFrame() + self.updateStats() + ogre.WindowEventUtilities.messagePump() + ##InputManager.getSingletonPtr().capture() + + + + def Shutdown(self): + navi.NaviManager.Get().Shutdown() + ogre.Root.getSingleton().shutdown() + + def parseResources(self): + config = ogre.ConfigFile() + config.load('resources.cfg' ) + seci = config.getSectionIterator() + while seci.hasMoreElements(): + SectionName = seci.peekNextKey() + Section = seci.getNext() + for item in Section: + ogre.ResourceGroupManager.getSingleton().\ + addResourceLocation(item.value, item.key, SectionName) + ogre.ResourceGroupManager.getSingleton().initialiseAllResourceGroups() + + +# /* void NaviDemo.loadInputSystem() +# { +# inputMgr = InputManager.getSingletonPtr() +# inputMgr.initialise(self.renderWin) +# inputMgr.addMouseListener(this, "NaviDemoMouseListener") +# inputMgr.addKeyListener(this, "NaviDemoKeyListener") +# }*/ + + def updateStats(self): + return + +if __name__ == '__main__': + try: + demo = NaviDemo() + demo.Startup() + + while not demo.shouldQuit: + demo.Update() + except ogre.OgreException, e: + print e + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Added: trunk/python-ogre/demos/navi/Demo_navi.py =================================================================== --- trunk/python-ogre/demos/navi/Demo_navi.py (rev 0) +++ trunk/python-ogre/demos/navi/Demo_navi.py 2007-10-03 04:10:32 UTC (rev 406) @@ -0,0 +1,150 @@ +# This code is in the Public Domain +# ----------------------------------------------------------------------------- +# This source file is part of Python-Ogre +# For the latest info, see http:##python-ogre.org/ +# +# It is likely based on original code from OGRE and/or PyOgre +# For the latest info, see http:##www.ogre3d.org/ +# +# You may use this sample code for anything you like, it is not covered by the +# LGPL. +# ----------------------------------------------------------------------------- +import ogre.renderer.OGRE as ogre +import ogre.gui.navi as navi +import ogre.io.OIS as OIS +import SampleFramework as sf +import random + +class NaviApplication(sf.Application, ogre.WindowEventListener): + def _createScene(self): + sceneManager = self.sceneManager + camera = self.camera + self.naviMgr = navi.NaviManager.Get() + self.shouldQuit = False # flag to allow the app to do a shutdown + + sceneManager.ambientLight = ogre.ColourValue(0.5, 0.5, 0.5) + sceneManager.setSkyDome(True, 'CloudySky', 5.0, 6, 8,) + light = sceneManager.createLight( "Sun" ) + light.setType( ogre.Light.LT_DIRECTIONAL ) + light.setDiffuseColour( ogre.ColourValue( .82, .81, .7 ) ) + light.setSpecularColour( ogre.ColourValue( .82, .81, .7 ) ) + light.setDirection( ogre.Vector3( 0, -1, -1 ) ) + + ## Create the Blue Knot + ent = sceneManager.createEntity( "BlueMetalKnot", "knot.mesh" ) + ent.setMaterialName("Knot") + ent.setCastShadows( True ) + + ## Position and scale the Blue Knot + node = sceneManager.getRootSceneNode().createChildSceneNode("KnotNode", ogre.Vector3(0, 0, 400)) + node.attachObject( ent ) + node.scale=(.2, .2, .2) + + ## Startup, create, and manage Navis + self.naviMgr.Startup(self.renderWindow) + + self.naviMgr.createNavi("menubar", "local://menubar.html", navi.NaviPosition(navi.BottomCenter), 1024, 128, False) + self.naviMgr.setNaviMask("menubar", "navimenu_bg.png") + self.naviMgr.bind("menubar", "turnOn", self, "turnOn", ["name"] ) + self.naviMgr.bind("menubar", "turnOff", self, "turnOff", ["name"] ) + self.naviMgr.bind("menubar", "hpChange", self,"hpChange", ["direction"] ) + + self.naviMgr.createNavi("status", "local://status.html", navi.NaviPosition(0, 0), 512, 256, True, False) + self.naviMgr.setNaviMask("status", "status_bg.png") + self.naviMgr.bind("status", "levelChanged", self,"levelChanged", ["#level"]) + + self.naviMgr.createNavi("chat", "http://navi.agelessanime.com/chat", navi.NaviPosition(navi.BottomLeft, 40, -150), 512, 256, True, False) + self.naviMgr.setNaviMask("chat", "navichat_bg.png") + self.naviMgr.setNaviColorKey("chat", "#19001a", 0.7) + self.naviMgr.bind("chat", "messageSent", self, "messageSent", ["nick","message"]) + + self.naviMgr.createNavi("equip", "local://equip.html", navi.NaviPosition(navi.Right), 256, 512, True, False) + self.naviMgr.setNaviMask("equip", "naviequip_bg.png") + self.naviMgr.bind("equip", "itemEquipped", self, "itemEquipped", ["name"]) + + ## Startup NaviMouse and create the cursors + mouse = self.naviMgr.StartupMouse() + mouse.createCursor("defaultCursor", 3, 2).addFrame(0, "cursor1.png") + mouse.setDefaultCursor("defaultCursor") + + ## If you define a "move" cursor, NaviMouse will automatically use that when you move a Navi + moveCursor = mouse.createCursor("move", 19, 19) + moveCursor.addFrame(0, "cursorMove.png") + self.curHP = 100 + + def turnOn(self, naviData): + naviName = naviData["name"].str() + if(naviName == "quit"): + self.shouldQuit = True + else: + self.naviMgr.resetNaviPosition(naviName) + self.naviMgr.showNavi(naviName, True) + + def turnOff(self, naviData): + self.naviMgr.hideNavi(naviData["name"].str(), True) + + def hpChange(self,naviData): + print "HPCHANGE" + if naviData["direction"].str() == "up": + self.curHP += (random.random() % 30) + 1 + if self.curHP > 100: self.curHP = 100 + self.naviMgr.naviEvaluateJS("status", "setHP(" + str(self.curHP)+")" ) + else: + self.curHP -= (random.random() % 30) + 1 + if self.curHP < 0: self.curHP = 0 + self.naviMgr.naviEvaluateJS("status", "setHP(" + str(self.curHP)+")" ) + + ogre.LogManager.getSingleton().logMessage("Navi Menubar: Current HP is now " + str(self.curHP)+"%") + + def messageSent(self, naviData): + self.naviMgr.naviEvaluateJS("status", "$('playerName').innerHTML = '" + naviData["nick"].str() + "'") + ogre.LogManager.getSingleton().logMessage("Navi Chat: " + naviData["message"].str()) + + def itemEquipped(self, naviData): + ogre.LogManager.getSingleton().logMessage("Navi Equip: Item '" + naviData["name"].str() + "' equipped!") + + def levelChanged(seld, naviData): + level = naviData["level"].toInt() +# levelMsg << "Navi Status: Level has been changed to: " << level << ", double that is: " << level * 2 +# LogManager.getSingleton().logMessage(levelMsg.str()) + + def _createFrameListener(self): + self.frameListener = frameListener(self.renderWindow, self.camera, self) + self.root.addFrameListener(self.frameListener) + +class frameListener(sf.FrameListener, OIS.MouseListener, OIS.KeyListener): + def __init__(self, renderWindow, camera,app): + sf.FrameListener.__init__(self, renderWindow, camera) + self.showDebugOverlay(False) # don't show the overlay + OIS.KeyListener.__init__(self) + OIS.MouseListener.__init__(self) + self.app = app + self.Mouse.setEventCallback(self) + self.MenuMode = True # stops the mouse moving the background + self.Keyboard.setEventCallback(self) + + def mouseMoved(self,arg): + if(arg.get_state().Z.rel != 0): + navi.NaviManager.Get().injectMouseWheel(arg.get_state().Z.rel) + return navi.NaviManager.Get().injectMouseMove(arg.get_state().X.abs, arg.get_state().Y.abs) + + def mousePressed(self, arg, id): + return navi.NaviManager.Get().injectMouseDown(id) + + def mouseReleased(self, arg, id): + return navi.NaviManager.Get().injectMouseUp(id) + + def frameStarted(self, frameEvent): + navi.NaviManager.Get().Update() + ret = sf.FrameListener.frameStarted(self, frameEvent) + if self.app.shouldQuit == True: ret = False # force the exit + if not ret: # we've been asked to exit + navi.NaviManager.Get().Shutdown() + return ret + +if __name__ == '__main__': + try: + application = NaviApplication() + application.go() + except ogre.OgreException, e: + print e Added: trunk/python-ogre/demos/navi/SampleFramework.py =================================================================== --- trunk/python-ogre/demos/navi/SampleFramework.py (rev 0) +++ trunk/python-ogre/demos/navi/SampleFramework.py 2007-10-03 04:10:32 UTC (rev 406) @@ -0,0 +1,14 @@ +# This code is in the Public Domain +# + +import ogre.renderer.OGRE as ogre + +# We don't use the verisons but it's nice to set them up... +ogre.OgreVersion = ogre.GetOgreVersion() +ogre.OgreVersionString = ogre.OgreVersion[0] + ogre.OgreVersion[1] + ogre.OgreVersion[2] +ogre.PythonOgreVersion = ogre.GetPythonOgreVersion() + +from ogre.renderer.OGRE.sf_OIS import * + + + Added: trunk/python-ogre/demos/navi/media.cfg =================================================================== --- trunk/python-ogre/demos/navi/media.cfg (rev 0) +++ trunk/python-ogre/demos/navi/media.cfg 2007-10-03 04:10:32 UTC (rev 406) @@ -0,0 +1 @@ + Added: trunk/python-ogre/demos/navi/ogre.cfg =================================================================== --- trunk/python-ogre/demos/navi/ogre.cfg (rev 0) +++ trunk/python-ogre/demos/navi/ogre.cfg 2007-10-03 04:10:32 UTC (rev 406) @@ -0,0 +1,19 @@ +Render System=Direct3D9 Rendering Subsystem + +[Direct3D9 Rendering Subsystem] +Allow NVPerfHUD=No +Anti aliasing=None +Floating-point mode=Fastest +Full Screen=No +Rendering Device=ATI MOBILITY RADEON +VSync=No +Video Mode=800 x 600 @ 32-bit colour + +[OpenGL Rendering Subsystem] +Colour Depth=32 +Display Frequency=N/A +FSAA=0 +Full Screen=No +RTT Preferred Mode=FBO +VSync=No +Video Mode=640 x 480 Added: trunk/python-ogre/demos/navi/plugins.cfg =================================================================== --- trunk/python-ogre/demos/navi/plugins.cfg (rev 0) +++ trunk/python-ogre/demos/navi/plugins.cfg 2007-10-03 04:10:32 UTC (rev 406) @@ -0,0 +1,14 @@ +# Defines plugins to load + +# Define plugin folder +PluginFolder=../../plugins + +# Define plugins +Plugin=RenderSystem_Direct3D9 +Plugin=RenderSystem_GL +Plugin=Plugin_ParticleFX +Plugin=Plugin_BSPSceneManager +Plugin=Plugin_OctreeSceneManager +Plugin=Plugin_CgProgramManager + + Added: trunk/python-ogre/demos/navi/resources.cfg =================================================================== --- trunk/python-ogre/demos/navi/resources.cfg (rev 0) +++ trunk/python-ogre/demos/navi/resources.cfg 2007-10-03 04:10:32 UTC (rev 406) @@ -0,0 +1,9 @@ +# Resource locations to be added to the 'boostrap' path +# This also contains the minimum you need to use the Ogre example framework +[Bootstrap] +Zip=../media/packs/OgreCore.zip + +# Resource locations to be added to the default path +[General] +FileSystem=Media +FileSystem=NaviLocal Added: trunk/python-ogre/demos/ogre/tests/Test_ManualMeshes.py =================================================================== --- trunk/python-ogre/demos/ogre/tests/Test_ManualMeshes.py (rev 0) +++ trunk/python-ogre/demos/ogre/tests/Test_ManualMeshes.py 2007-10-03 04:10:32 UTC (rev 406) @@ -0,0 +1,209 @@ +import ogre.renderer.OGRE as ogre +import sys +import SampleFramework +import math + +class ManuallyDefinedMesh: + def __init__(self,Name, Vertices_Pos, Vertices_Norm, Faces, Vertices_Colour=None, CreateImediately=True): + """ An experimental class to define meshes programatically + 'Name' is the name by which the mesh will be referenced + Vertices_Pos, Vertices_Norm are botj lists of triplets + Faces is a simple list of vertex indices + Vertices_Colour is an optional list of ogre.ColourValue's + You can delay the mesh loading by setting 'CreateImediately' to False + Even if you assign colors to your vertexes, you will have to assign a + material to each entity created based on this mesh.""" + + assert len(Vertices_Pos)==len(Vertices_Norm) + assert (len(Faces)%3)==0 #Each face is defined by 3 consecutive vertex indices + + if Vertices_Colour is not None : + assert len(Vertices_Pos)==len(Vertices_Colour) + + meshMgr = ogre.MeshManager.getSingleton() + self.mesh = mesh = meshMgr.createManual(Name, ogre.ResourceGroupManager.DEFAULT_RESOURCE_GROUP_NAME) + self.subMesh = subMesh = mesh.createSubMesh() + + POSITION_ELEMENT = 0 + NORMAL_ELEMENT = 1 + UV_ELEMENT = 2 + COLOUR_ELEMENT = 0 + + self.Vertices_Pos = Vertices_Pos + self.Vertices_Norm = Vertices_Norm + self.Vertices_Colour = Vertices_Colour + + # ?????????????? / Not sure about this, without the get crash + mesh.sharedVertexData = ogre.VertexData() + mesh.sharedVertexData.vertexCount = len(Vertices_Pos) + + #work-around to prevent destruction + self.sharedVertexData = mesh.sharedVertexData + + declaration = mesh.sharedVertexData.vertexDeclaration + offset = 0 + offset += ogre.VertexElement.getTypeSize(ogre.VET_FLOAT3) + declaration.addElement(0, offset, ogre.VET_FLOAT3, ogre.VES_POSITION) + offset += ogre.VertexElement.getTypeSize(ogre.VET_FLOAT3) + + declaration.addElement(0, offset, ogre.VET_FLOAT3, ogre.VES_NORMAL) + offset += ogre.VertexElement.getTypeSize(ogre.VET_FLOAT3) + + hBuffMgr = ogre.HardwareBufferManager.getSingleton() + vbuf = hBuffMgr.createVertexBuffer(offset, mesh.sharedVertexData.vertexCount, + ogre.HardwareBuffer.HBU_STATIC_WRITE_ONLY) + + +# # pVertex = vbuf.lock(declaration, ogre.HardwareBuffer.HBL_DISCARD) + pVertex = vbuf.lock(ogre.HardwareBuffer.HBL_DISCARD) + + + #loop through the position array + for i in range(len(Vertices_Pos)): + vx, vy, vz = Vertices_Pos[i] + nx, ny, nz = Vertices_Norm[i] + + pVertex.setFloat(i, POSITION_ELEMENT, vx, vy, vz) + pVertex.setFloat(i, NORMAL_ELEMENT, nx, ny, nz) + bind = mesh.sharedVertexData.vertexBufferBinding + bind.setBinding(0,vbuf) #Set vertex buffer binding so buffer 0 is bound to positional data + + subMesh.indexData.indexCount = len(Faces) + subMesh.indexData.indexBuffer = hBuffMgr.createIndexBuffer(ogre.HardwareIndexBuffer.IT_16BIT, + len(Faces), ogre.HardwareBuffer.HBU_STATIC_WRITE_ONLY) + + ibuf = subMesh.indexData.indexBuffer + subMesh.indexData.indexBuffer.writeIndexes(0, Faces) + + vbuf.unlock() + + + #2nd buffer , colours + if Vertices_Colour is not None : + offset = 0 + declaration.addElement(1, offset, ogre.VET_COLOUR, ogre.VES_DIFFUSE) + offset += ogre.VertexElement.getTypeSize(ogre.VET_COLOUR) + vbuf = ogre.HardwareBufferManager.getSingleton().createVertexBuffer( + offset, mesh.sharedVertexData.vertexCount, ogre.HardwareBuffer.HBU_STATIC_WRITE_ONLY) +# # pVertex = vbuf.lock(declaration, ogre.HardwareBuffer.HBL_DISCARD) + pVertex = vbuf.lock(ogre.HardwareBuffer.HBL_DISCARD) + + for i in range(len(Vertices_Colour)): + pVertex.setColour(i, COLOUR_ELEMENT, Vertices_Colour[i]) + vbuf.unlock() + + #Set vertex buffer binding so buffer 1 is bound to our colour buffer + bind.setBinding(1, vbuf) + + subMesh.useSharedVertices = True + subMesh.indexData.indexBuffer = ibuf + subMesh.indexData.indexCount = len(Faces) + subMesh.indexData.indexStart = 0 + self.indexData = subMesh.indexData + + if CreateImediately: + self.MakeAvailable() + + def MakeAvailable(self,BoundBox=(None,None,None,None,None,None), BoundSphereRadius=None): + + if None in BoundBox: #Simple guess of the bounding box + xcoord = [i[0] for i in self.Vertices_Pos] + ycoord = [i[1] for i in self.Vertices_Pos] + zcoord = [i[2] for i in self.Vertices_Pos] + BoundBox = (min(xcoord),min(ycoord),min(zcoord),max(xcoord),max(ycoord),max(zcoord)) + + if BoundSphereRadius is None : #Very naive guess of the bounding sphere radius + BoundSphereRadius = max([abs(BoundBox[i+3]-BoundBox[i]) for i in range(3)]) + + mesh=self.mesh + + mesh._setBounds(ogre.AxisAlignedBox(*BoundBox)) + mesh._setBoundingSphereRadius(BoundSphereRadius) + + mesh.load() + + def Print(self): + mesh = self.mesh + print "Number SubMeshes",mesh.numSubMeshes + for i in range(mesh.numSubMeshes): + for f in (mesh.getSubMesh(i).indices): + print f + for v in ( mesh.getSubMesh(i).getVertices(ogre.Vector3(0.0,0.0,0.0), + ogre.Quaternion.IDENTITY, ogre.Vector3(1.0,1.0,1.0))): + print v + + +class TutorialApplication(SampleFramework.Application): + def _createScene(self): + sm = self.sceneManager + + self.headNode = sm.getRootSceneNode().createChildSceneNode('head1') + self.headNode.position=-70,0,0 + self.entity = sm.createEntity('head', 'ogrehead.mesh') + self.headNode.attachObject(self.entity) + + self.TestManual() + + def TestManual ( self ): + sqrt13 = 0.577350269 # sqrt(1/3) + x = 30.0 + y = 30.0 + z = 30.0 + vert_pos = [ + (-x,y,-z), #0 position + (x,y,-z), #1 position + (x,-y,-z), #2 position + (-x,-y,-z), #3 position + (-x,y,z), #4 position + (x,y,z), #5 position + (x,-y,z), #6 position + (-x,-y,z) #7 position + ] + vert_norm = [ + (-sqrt13,sqrt13,-sqrt13), #0 normal + (sqrt13,sqrt13,-sqrt13), #1 normal + (sqrt13,-sqrt13,-sqrt13), #2 normal + (-sqrt13,-sqrt13,-sqrt13), #3 normal + (-sqrt13,sqrt13,sqrt13), #4 normal + (sqrt13,sqrt13,sqrt13), #5 normal + (sqrt13,-sqrt13,sqrt13), #6 normal + (-sqrt13,-sqrt13,sqrt13) #7 normal + ] + faces = [ + 0,2,3, + 0,1,2, + 1,6,2, + 1,5,6, + 4,6,5, + 4,7,6, + 0,7,4, + 0,3,7, + 0,5,1, + 0,4,5, + 2,7,3, + 2,6,7] + + rs = self.root.getRenderSystem() +# colours=[] +# colours.append(rs.convertColourValue(ogre.ColourValue(1.0,0.0,0.0))) #0 colour +# colours.append(rs.convertColourValue(ogre.ColourValue(1.0,1.0,0.0))) #1 colour +# colours.append(rs.convertColourValue(ogre.ColourValue(0.0,1.0,0.0))) #2 colour +# colours.append(rs.convertColourValue(ogre.ColourValue(0.0,0.0,0.0))) #3 colour +# colours.append(rs.convertColourValue(ogre.ColourValue(1.0,0.0,1.0))) #4 colour +# colours.append(rs.convertColourValue(ogre.ColourValue(1.0,1.0,1.0))) #5 colour +# colours.append(rs.convertColourValue(ogre.ColourValue(0.0,1.0,1.0))) #6 colour +# colours.append(rs.convertColourValue(ogre.ColourValue(0.0,0.0,1.0))) #7 colour + + ManuallyDefinedMesh("cubeMesh",vert_pos,vert_norm,faces ) #,colours) + + self.cubeEntity = sceneManager.createEntity("myCubeEntity", "cubeMesh") + self.cubeEntity.setMaterialName("Test/SimpleVertexColor") + self.nd=sceneManager.rootSceneNode.createChildSceneNode() + self.nd.attachObject(self.cubeEntity) + + +if __name__ == '__main__': + ta = TutorialApplication() + ta.go() + + \ No newline at end of file Added: trunk/python-ogre/demos/ogre/tests/Test_RenderOneFrame.py =================================================================== --- trunk/python-ogre/demos/ogre/tests/Test_RenderOneFrame.py (rev 0) +++ trunk/python-ogre/demos/ogre/tests/Test_RenderOneFrame.py 2007-10-03 04:10:32 UTC (rev 406) @@ -0,0 +1,9 @@ +import ogre.renderer.OGRE as ogre +class program: + def __init__(self): + self.root = ogre.Root("plugins.cfg","ogre.cfg","ogre.txt") + self.root.showConfigDialog() + self.root.initialise(True) +main = program() +while True: + main.root.renderOneFrame() \ No newline at end of file Added: trunk/python-ogre/demos/ogre/tests/Test_WriteToTexture.py =================================================================== --- trunk/python-ogre/demos/ogre/tests/Test_WriteToTexture.py (rev 0) +++ trunk/python-ogre/demos/ogre/tests/Test_WriteToTexture.py 2007-10-03 04:10:32 UTC (rev 406) @@ -0,0 +1,214 @@ +# This code is in the Public Domain +# ----------------------------------------------------------------------------- +# This source file is part of Python-Ogre +# For the latest info, see http:##python-ogre.org/ +# +# It is likely based on original code from OGRE and/or PyOgre +# For the latest info, see http:##www.ogre3d.org/ +# +# You may use this sample code for anything you like, it is not covered by the +# LGPL. +# ----------------------------------------------------------------------------- +import ogre.renderer.OGRE as ogre +import SampleFramework as sf +import ctypes + + + +def WriteToTexture(in_string, destTexture, destRectangle, font, color, justify = 'l', wordwrap = True): + if destTexture.getHeight() < destRectangle.bottom: + destRectangle.bottom = destTexture.getHeight() + if destTexture.getWidth() < destRectangle.right: + destRectangle.right = destTexture.getWidth() + + if not font.isLoaded(): + font.load() + + fontTexture = ogre.TextureManager.getSingleton().getByName\ + (font.getMaterial().getTechnique(0).getPass(0).getTextureUnitState(0).getTextureName()) + + fontBuffer = fontTexture.getBuffer() + destBuffer = destTexture.getBuffer() + + destPb = destBuffer.lock(destRectangle,ogre.HardwareBuffer.HBL_NORMAL) + + ## The font texture buffer was created write only...so we cannot read it back :o). + ## One solution is to copy the buffer instead of locking it. + ## (Maybe there is a way to create a font texture which is not write_only ?) + + ## create a buffer + nBuffSize = fontBuffer.getSizeInBytes() + ## Here we show the difference in C++ and Python + ## uint8* buff = (uint8*)calloc(nBuffSize, sizeof(uint8)) + storageclass = ctypes.c_uint8 * (nBuffSize) # allocate a buffer class + buff=storageclass() + + ## the PixelBox call needs a pointer to the buffer and here's how we do this in Python-Ogre + VoidPointer = ogre.CastVoidPtr(ctypes.addressof(buff)) + + ## create pixel box using the copy of the buffer + fontPb = ogre.PixelBox(fontBuffer.getWidth(), fontBuffer.getHeight(),fontBuffer.getDepth(), + fontBuffer.getFormat(), VoidPointer) + fontBuffer.blitToMemory(fontPb) + +# fontData = static_cast<uint8*>( fontPb.data ) +# destData = static_cast<uint8*>( destPb.data ) + + fontData = buff + + # we nede to know the size of the dest buffer so hopefully this is right + destSize = destPb.getConsecutiveSize() + destData = (ctypes.c_uint8 * (destSize)).from_address( ogre.CastInt(destPb.getData()) ) + + fontPixelSize = ogre.PixelUtil.getNumElemBytes(fontPb.format) + destPixelSize = ogre.PixelUtil.getNumElemBytes(destPb.format) + + fontRowPitchBytes = fontPb.rowPitch * fontPixelSize + destRowPitchBytes = destPb.rowPitch * destPixelSize + + GlyphTexCoords =[] + for i in range (len (in_string)): + GlyphTexCoords.append(ogre.Box()) # need a fixed size array in Python + + charheight = 0 + charwidth = 0 + + for i in range ( len(in_string) ): + if ((in_string[i] != '\t') and (in_string[i] != '\n') and (in_string[i] != ' ')): + glypheTexRect = font.getGlyphTexCoords(ord(in_string[i]) ) + GlyphTexCoords[i].left = int(glypheTexRect.left * fontTexture.getSrcWidth()) + GlyphTexCoords[i].top = int(glypheTexRect.top * fontTexture.getSrcHeight()) + GlyphTexCoords[i].right = int(glypheTexRect.right * fontTexture.getSrcWidth()) + GlyphTexCoords[i].bottom = int(glypheTexRect.bottom * fontTexture.getSrcHeight()) + + if (GlyphTexCoords[i].getHeight() > charheight): + charheight = GlyphTexCoords[i].getHeight() + if (GlyphTexCoords[i].getWidth() > charwidth): + charwidth = GlyphTexCoords[i].getWidth() + + cursorX = 0 + cursorY = 0 + lineend = destRectangle.getWidth() + carriagreturn = True + for strindex in range (len(in_string) ): + tchar = in_string[strindex] + if tchar == ' ': cursorX += charwidth + elif tchar == '\t':cursorX += charwidth * 3 + elif tchar == '\n': + cursorY += charheight + carriagreturn = True + else: + ##wrapping + if (cursorX + GlyphTexCoords[strindex].getWidth()> lineend) and not carriagreturn: + cursorY += charheight + carriagreturn = True + + ##justify + if (carriagreturn): + l = strindex + textwidth = 0 + wordwidth = 0 + while (l < len(in_string) ) and (in_string[l] != '\n)'): + wordwidth = 0 + if in_string[l] == ' ': + wordwidth = charwidth + l+=1 + elif in_string[l] == '\t': + wordwidth = charwidth *3 + l+=1 + elif in_string[l] == '\n': l = len(in_string) + + if wordwrap: + while((l < len(in_string)) and (in_string[l] != ' ') and (in_string[l] != '\t') and (in_string[l] != '\n')): + wordwidth += GlyphTexCoords[l].getWidth() + l+=1 + else: + wordwidth += GlyphTexCoords[l].getWidth() + l+=1 + + if ((textwidth + wordwidth) <= destRectangle.getWidth()): + textwidth += (wordwidth) + else: + break + + if ((textwidth == 0) and (wordwidth > destRectangle.getWidth())): + textwidth = destRectangle.getWidth() + + if justify == 'c': + cursorX = (destRectangle.getWidth() - textwidth)/2 + lineend = destRectangle.getWidth() - cursorX + + elif justify == 'r': + cursorX = (destRectangle.getWidth() - textwidth) + lineend = destRectangle.getWidth() + + else: + cursorX = 0 + lineend = textwidth + + carriagreturn = False + + ##abort - net enough space to draw + if ((cursorY + charheight) > destRectangle.getHeight()): + ## need to bail here + print "ERROR" + + ##draw pixel by pixel + for i in range ( GlyphTexCoords[strindex].getHeight() ): + for j in range (GlyphTexCoords[strindex].getWidth() ): + + index =(i + GlyphTexCoords[strindex].top) * fontRowPitchBytes + (j + GlyphTexCoords[strindex].left) * fontPixelSize +1 + fd = fontData[ index ] + alpha = color.a * (fd / 255.0) + invalpha = 1.0 - alpha + offset = (i + cursorY) * destRowPitchBytes + (j + cursorX) * destPixelSize + pix = ogre.ColourValue() + address = ctypes.addressof(destData) + offset + ogre.PixelUtil.unpackColour(pix,destPb.format,address) + pix = (pix * invalpha) + (color * alpha) + ogre.PixelUtil.packColour(pix,destPb.format,address) + + cursorX += GlyphTexCoords[strindex].getWidth() + + destBuffer.unlock() + + +class TestApplication(sf.Application): + def _createScene(self): + sceneManager = self.sceneManager + camera = self.camera + + sceneManager.ambientLight = ogre.ColourValue(0.5, 0.5, 0.5) + + background = ogre.TextureManager.getSingleton().getByName("ogretext.png") + + font = ogre.FontManager.getSingleton().getByName("BlueHighway") + + ## Make sure the texture is not WRITE_ONLY, we need to read the buffer to do the blending with the font (get the alpha for example) + texture = ogre.TextureManager.getSingleton().createManual("Write Texture","General", + ogre.TEX_TYPE_2D, 512, 512, ogre.MIP_UNLIMITED , + ogre.PF_X8R8G8B8, ogre.TU_STATIC|ogre.TU_AUTOMIPMAP) + + ## Draw the background to the new texture + texture.getBuffer().blit(background.getBuffer()) + + WriteToTexture("Andy was here!",texture,ogre.Box(25,275,370,500),font,ogre.ColourValue(1.0,1.0,1.0,1.0),'c') + + c = sceneManager.createEntity("cubo", "cube.mesh") + n = sceneManager.getRootSceneNode().createChildSceneNode() + n.attachObject(c) + n.setPosition(ogre.Vector3(0, 0, 350)) + + c.setMaterialName('Examples/Rockwall') + + mat=ogre.MaterialManager.getSingleton().getByName('Examples/Rockwall') + tex=mat.getTechnique(0).getPass(0).getTextureUnitState(0) + tex.setTextureName("Write Texture") + + +if __name__ == '__main__': + try: + application = TestApplication() + application.go() + except ogre.OgreException, e: + print e This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |