You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(3) |
Sep
(30) |
Oct
(60) |
Nov
(17) |
Dec
(47) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(33) |
Feb
(18) |
Mar
(3) |
Apr
(5) |
May
(6) |
Jun
(34) |
Jul
(54) |
Aug
(33) |
Sep
(36) |
Oct
(33) |
Nov
(40) |
Dec
(6) |
2009 |
Jan
(37) |
Feb
(38) |
Mar
(31) |
Apr
(23) |
May
(24) |
Jun
(2) |
Jul
(6) |
Aug
(5) |
Sep
(1) |
Oct
(14) |
Nov
(12) |
Dec
(26) |
2010 |
Jan
(23) |
Feb
(17) |
Mar
(17) |
Apr
(2) |
May
(10) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
(3) |
Nov
|
Dec
(2) |
2011 |
Jan
(4) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(4) |
Nov
|
Dec
|
From: <and...@us...> - 2008-06-23 08:07:16
|
Revision: 605 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=605&view=rev Author: andy_miller Date: 2008-06-23 01:07:20 -0700 (Mon, 23 Jun 2008) Log Message: ----------- Further demo fixes and script updates for the 1.2 release Modified Paths: -------------- trunk/python-ogre/demos/cegui/Demo_CEGUI_Facial.py trunk/python-ogre/demos/cegui/Demo_CEGUI_Gui.py trunk/python-ogre/demos/ogre/Demo_RenderToTexture.py trunk/python-ogre/demos/ogre/tests/Test_Corners.py trunk/python-ogre/demos/ogre/tests/Test_General.py trunk/python-ogre/demos/ogre/tests/ogre.txt trunk/python-ogre/scripts/UpdateDLLs.bat trunk/python-ogre/scripts/build_html.bat trunk/python-ogre/scripts/compilesource.bat Modified: trunk/python-ogre/demos/cegui/Demo_CEGUI_Facial.py =================================================================== --- trunk/python-ogre/demos/cegui/Demo_CEGUI_Facial.py 2008-06-23 06:26:56 UTC (rev 604) +++ trunk/python-ogre/demos/cegui/Demo_CEGUI_Facial.py 2008-06-23 08:07:20 UTC (rev 605) @@ -141,7 +141,7 @@ self.system.setDefaultFont("BlueHighway-12") # Load Layout - sheet = cegui.WindowManager.getSingleton().loadWindowLayout("facial.layout") + sheet = cegui.WindowManager.getSingleton().loadWindowLayout("facial.layout", False) self.system.setGUISheet (sheet) sheet.enabled=True @@ -180,7 +180,7 @@ self.manualAnimState = head.getAnimationState("manual") self.manualAnimState.timePosition=0 - headNode = sceneManager.rootSceneNode.createChildSceneNode() + headNode = sceneManager.getRootSceneNode().createChildSceneNode() headNode.attachObject(head) self.camera.setPosition( ogre.Vector3(-20, 50, 150) ) Modified: trunk/python-ogre/demos/cegui/Demo_CEGUI_Gui.py =================================================================== --- trunk/python-ogre/demos/cegui/Demo_CEGUI_Gui.py 2008-06-23 06:26:56 UTC (rev 604) +++ trunk/python-ogre/demos/cegui/Demo_CEGUI_Gui.py 2008-06-23 08:07:20 UTC (rev 605) @@ -104,7 +104,14 @@ ## Setup Render To Texture for preview window - rttTex = self.root.getRenderSystem().createRenderTexture( "RttTex", 512, 512, ogre.TextureType.TEX_TYPE_2D, ogre.PixelFormat.PF_R8G8B8 ) + texture = ogre.TextureManager.getSingleton().createManual( "RttTex", + ogre.ResourceGroupManager.DEFAULT_RESOURCE_GROUP_NAME, ogre.TEX_TYPE_2D, + 512, 512, 0, ogre.PixelFormat.PF_R8G8B8, ogre.TU_RENDERTARGET ) + rttTex = texture.getBuffer().getRenderTarget() + + + +# # rttTex = self.root.getRenderSystem().createRenderTexture( "RttTex", 512, 512, ogre.TextureType.TEX_TYPE_2D, ogre.PixelFormat.PF_R8G8B8 ) rttCam = self.sceneManager.createCamera("RttCam") camNode = self.sceneManager.getRootSceneNode().createChildSceneNode("rttCamNode") camNode.attachObject(rttCam) @@ -131,7 +138,7 @@ self.GUIsystem.setDefaultMouseCursor("TaharezLook", "MouseArrow") self.GUIsystem.setDefaultFont( "BlueHighway-12") - sheet = CEGUI.WindowManager.getSingleton().loadWindowLayout("ogregui.layout") + sheet = CEGUI.WindowManager.getSingleton().loadWindowLayout("ogregui.layout", False) self.GUIsystem.setGUISheet(sheet) # @@ -271,7 +278,7 @@ if(self.EditorGuiSheet): CEGUI.WindowManager.getSingleton().destroyWindow(self.EditorGuiSheet) - self.EditorGuiSheet = CEGUI.WindowManager.getSingleton().loadWindowLayout("cegui8.layout") + self.EditorGuiSheet = CEGUI.WindowManager.getSingleton().loadWindowLayout("cegui8.layout", False) self.setupLoadedLayoutHandlers() editorWindow = CEGUI.WindowManager.getSingleton().getWindow( "OgreGuiDemo2/MainWindow") Modified: trunk/python-ogre/demos/ogre/Demo_RenderToTexture.py =================================================================== --- trunk/python-ogre/demos/ogre/Demo_RenderToTexture.py 2008-06-23 06:26:56 UTC (rev 604) +++ trunk/python-ogre/demos/ogre/Demo_RenderToTexture.py 2008-06-23 08:07:20 UTC (rev 605) @@ -67,8 +67,18 @@ self.camera.NearClipDistance = 5 def __del__ ( self ): - del self.soundManager - sf.Application.__del__(self) + print "1" + del self.camera + print "1" + del self.sceneManager + print "1" + del self.frameListener + print "1" + del self.root + print "1" + del self.renderWindow + print "1" + def _createScene(self): "Override sf create scene" @@ -140,12 +150,16 @@ ## Either of these techniques works... # create RenderTexture - rttTex = self.root.getRenderSystem().createRenderTexture( "RttTex", 512, 512, - ogre.TEX_TYPE_2D,ogre.PixelFormat.PF_R8G8B8 ) -# texture = ogre.TextureManager.getSingleton().createManual( "RttTex", -# ogre.ResourceGroupManager.DEFAULT_RESOURCE_GROUP_NAME, ogre.TEX_TYPE_2D, -# 512, 512, 0, ogre.PixelFormat.PF_R8G8B8, ogre.TU_RENDERTARGET ) - + if ogre.GetPythonOgreVersion()[1] == '1' and int(ogre.GetPythonOgreVersion()[1]) < 2: ## Python Ogre after 1.2 has API changes + + rttTex = self.root.getRenderSystem().createRenderTexture( "RttTex", 512, 512, + ogre.TEX_TYPE_2D,ogre.PixelFormat.PF_R8G8B8 ) + else: + texture = ogre.TextureManager.getSingleton().createManual( "RttTex", + ogre.ResourceGroupManager.DEFAULT_RESOURCE_GROUP_NAME, ogre.TEX_TYPE_2D, + 512, 512, 0, ogre.PixelFormat.PF_R8G8B8, ogre.TU_RENDERTARGET ) + rttTex = texture.getBuffer().getRenderTarget() + self.mReflectCam = sceneManager.createCamera("ReflectCam") self.mReflectCam.setNearClipDistance(camera.getNearClipDistance()) self.mReflectCam.setFarClipDistance(camera.getFarClipDistance()) Modified: trunk/python-ogre/demos/ogre/tests/Test_Corners.py =================================================================== --- trunk/python-ogre/demos/ogre/tests/Test_Corners.py 2008-06-23 06:26:56 UTC (rev 604) +++ trunk/python-ogre/demos/ogre/tests/Test_Corners.py 2008-06-23 08:07:20 UTC (rev 605) @@ -29,7 +29,7 @@ sm.ambientLight = (1,1,1) ent1 = sm.createEntity("Robot","robot.mesh") - node1 = sm.rootSceneNode.createChildSceneNode("RobotNode") + node1 = sm.getRootSceneNode().createChildSceneNode("RobotNode") node1.lookAt ( ogre.Vector3(0,0,0), ogre.Node.TransformSpace.TS_LOCAL ) node1.lookAt ( (0,0,0), ogre.Node.TransformSpace.TS_WORLD ) Modified: trunk/python-ogre/demos/ogre/tests/Test_General.py =================================================================== --- trunk/python-ogre/demos/ogre/tests/Test_General.py 2008-06-23 06:26:56 UTC (rev 604) +++ trunk/python-ogre/demos/ogre/tests/Test_General.py 2008-06-23 08:07:20 UTC (rev 605) @@ -1,7 +1,9 @@ # This code is in the Public Domain -import Ogre as ogre -import SampleFramework as sf -import ctypes, math,sys, os, os.path +import os,sys, ctypes, math, os.path +if sys.platform == 'win32': + os.environ['PATH'] += ';' + __file__[0] +import ogre.renderer.OGRE as ogre +import SampleFramework pluginfile = "plugins.cfg" root = ogre.Root( pluginfile ) Modified: trunk/python-ogre/demos/ogre/tests/ogre.txt =================================================================== --- trunk/python-ogre/demos/ogre/tests/ogre.txt 2008-06-23 06:26:56 UTC (rev 604) +++ trunk/python-ogre/demos/ogre/tests/ogre.txt 2008-06-23 08:07:20 UTC (rev 605) @@ -1,137 +1,225 @@ -07:17:21: Creating resource group General -07:17:21: Creating resource group Internal -07:17:21: Creating resource group Autodetect -07:17:21: SceneManagerFactory for type 'DefaultSceneManager' registered. -07:17:21: Registering ResourceManager for type Material -07:17:21: Registering ResourceManager for type Mesh -07:17:21: Registering ResourceManager for type Skeleton -07:17:21: MovableObjectFactory for type 'ParticleSystem' registered. -07:17:21: OverlayElementFactory for type Panel registered. -07:17:21: OverlayElementFactory for type BorderPanel registered. -07:17:21: OverlayElementFactory for type TextArea registered. -07:17:21: Registering ResourceManager for type Font -07:17:21: ArchiveFactory for archive type FileSystem registered. -07:17:21: ArchiveFactory for archive type Zip registered. -07:17:21: FreeImage version: 3.9.2 -07:17:21: This program uses FreeImage, a free, open source image library supporting all common bitmap formats. See http://freeimage.sourceforge.net for details -07:17:21: Supported formats: bmp,ico,jpg,jif,jpeg,jpe,jng,koa,iff,lbm,mng,pbm,pbm,pcd,pcx,pgm,pgm,png,ppm,ppm,ras,tga,targa,tif,tiff,wap,wbmp,wbm,psd,cut,xbm,xpm,gif,hdr,g3,sgi -07:17:21: DDS codec registering -07:17:21: Registering ResourceManager for type HighLevelGpuProgram -07:17:21: Registering ResourceManager for type Compositor -07:17:21: MovableObjectFactory for type 'Entity' registered. -07:17:21: MovableObjectFactory for type 'Light' registered. -07:17:21: MovableObjectFactory for type 'BillboardSet' registered. -07:17:21: MovableObjectFactory for type 'ManualObject' registered. -07:17:21: MovableObjectFactory for type 'BillboardChain' registered. -07:17:21: MovableObjectFactory for type 'RibbonTrail' registered. -07:17:21: Loading library ../../../plugins\RenderSystem_GL.dll -07:17:21: Installing plugin: GL RenderSystem -07:17:21: OpenGL Rendering Subsystem created. -07:17:22: Plugin successfully installed -07:17:22: Loading library ../../../plugins\RenderSystem_Direct3D9.dll -07:17:22: Installing plugin: D3D9 RenderSystem -07:17:22: D3D9 : Direct3D9 Rendering Subsystem created. -07:17:22: D3D9: Driver Detection Starts -07:17:22: D3D9: Driver Detection Ends -07:17:22: Plugin successfully installed -07:17:22: Loading library ../../../plugins\Plugin_ParticleFX.dll -07:17:22: Installing plugin: ParticleFX -07:17:22: Particle Emitter Type 'Point' registered -07:17:22: Particle Emitter Type 'Box' registered -07:17:22: Particle Emitter Type 'Ellipsoid' registered -07:17:22: Particle Emitter Type 'Cylinder' registered -07:17:22: Particle Emitter Type 'Ring' registered -07:17:22: Particle Emitter Type 'HollowEllipsoid' registered -07:17:22: Particle Affector Type 'LinearForce' registered -07:17:22: Particle Affector Type 'ColourFader' registered -07:17:22: Particle Affector Type 'ColourFader2' registered -07:17:22: Particle Affector Type 'ColourImage' registered -07:17:22: Particle Affector Type 'ColourInterpolator' registered -07:17:22: Particle Affector Type 'Scaler' registered -07:17:22: Particle Affector Type 'Rotator' registered -07:17:22: Particle Affector Type 'DirectionRandomiser' registered -07:17:22: Particle Affector Type 'DeflectorPlane' registered -07:17:22: Plugin successfully installed -07:17:22: Loading library ../../../plugins\Plugin_BSPSceneManager.dll -07:17:22: Installing plugin: BSP Scene Manager -07:17:22: Plugin successfully installed -07:17:22: Loading library ../../../plugins\Plugin_CgProgramManager.dll -07:17:22: Installing plugin: Cg Program Manager -07:17:22: Plugin successfully installed -07:17:22: *-*-* OGRE Initialising -07:17:22: *-*-* Version 1.4.2 (Eihort) -07:17:22: D3D9 : RenderSystem Option: Allow NVPerfHUD = No -07:17:22: D3D9 : RenderSystem Option: Anti aliasing = None -07:17:22: D3D9 : RenderSystem Option: Floating-point mode = Fastest -07:17:22: D3D9 : RenderSystem Option: Full Screen = No -07:17:22: D3D9 : RenderSystem Option: Rendering Device = ATI MOBILITY RADEON -07:17:22: D3D9 : RenderSystem Option: VSync = Yes -07:17:22: D3D9 : RenderSystem Option: Video Mode = 800 x 600 @ 32-bit colour -07:17:29: D3D9 : Shutting down cleanly. -07:17:29: CPU Identifier & Features -07:17:29: ------------------------- -07:17:29: * CPU ID: GenuineIntel: Intel(R) Pentium(R) M processor 1700MHz -07:17:29: * SSE: yes -07:17:29: * SSE2: yes -07:17:29: * SSE3: no -07:17:29: * MMX: yes -07:17:29: * MMXEXT: yes -07:17:29: * 3DNOW: no -07:17:29: * 3DNOWEXT: no -07:17:29: * CMOV: yes -07:17:29: * TSC: yes -07:17:29: * FPU: yes -07:17:29: * PRO: no -07:17:29: * HT: no -07:17:29: ------------------------- -07:17:29: *** Starting Win32GL Subsystem *** -07:17:29: GLRenderSystem::createRenderWindow "OGRE Render Window", 640x480 windowed miscParams: FSAA=0 colourDepth=16 displayFrequency=0 vsync=false -07:17:29: Created Win32Window 'OGRE Render Window' : 640x480, 16bpp -07:17:29: GL_VERSION = 1.3.1006 WinXP Release -07:17:29: GL_VENDOR = ATI Technologies Inc. -07:17:29: GL_RENDERER = RADEON 7000 SW TCL x86/SSE2 -07:17:29: GL_EXTENSIONS = GL_ARB_multitexture GL_EXT_texture_env_add GL_EXT_compiled_vertex_array GL_S3_s3tc GL_ARB_occlusion_query GL_ARB_texture_border_clamp GL_ARB_texture_compression GL_ARB_texture_cube_map GL_ARB_texture_env_add GL_ARB_texture_env_combine GL_ARB_texture_env_crossbar GL_ARB_texture_env_dot3 GL_ARB_texture_mirrored_repeat GL_ARB_transpose_matrix GL_ARB_vertex_blend GL_ARB_window_pos GL_ATI_envmap_bumpmap GL_ATI_texture_env_combine3 GL_ATI_texture_mirror_once GL_ATI_vertex_streams GL_ATIX_texture_env_combine3 GL_ATIX_texture_env_route GL_EXT_abgr GL_EXT_bgra GL_EXT_clip_volume_hint GL_EXT_draw_range_elements GL_EXT_fog_coord GL_EXT_multi_draw_arrays GL_EXT_packed_pixels GL_EXT_point_parameters GL_EXT_rescale_normal GL_EXT_secondary_color GL_EXT_separate_specular_color GL_EXT_stencil_wrap GL_EXT_texgen_reflection GL_EXT_texture3D GL_EXT_texture_compression_s3tc GL_EXT_texture_cube_map GL_EXT_texture_edge_clamp GL_EXT_texture_env_combine GL_EXT_texture_env_dot3 GL_EXT_texture_filter_anisotropic GL_EXT_texture_lod_bias GL_EXT_texture_mirror_clamp GL_EXT_texture_object GL_EXT_texture_rectangle GL_EXT_vertex_array GL_HP_occlusion_test GL_NV_blend_square GL_NV_occlusion_query GL_NV_texgen_reflection GL_SGI_color_matrix GL_SGIS_generate_mipmap GL_SGIS_multitexture GL_SGIS_texture_border_clamp GL_SGIS_texture_edge_clamp GL_SGIS_texture_lod GL_SUN_multi_draw_arrays GL_WIN_swap_hint WGL_EXT_extensions_string WGL_EXT_swap_control -07:17:29: Supported WGL extensions: WGL_ARB_extensions_string WGL_ARB_make_current_read WGL_ARB_pbuffer WGL_ARB_pixel_format WGL_ARB_render_texture WGL_EXT_extensions_string WGL_EXT_swap_control -07:17:29: *************************** -07:17:29: *** GL Renderer Started *** -07:17:30: *************************** -07:17:30: Registering ResourceManager for type GpuProgram -07:17:30: GL: Using PBuffers for rendering to textures -07:17:30: RenderSystem capabilities -07:17:30: ------------------------- -07:17:30: * Hardware generation of mipmaps: yes -07:17:30: * Texture blending: yes -07:17:30: * Anisotropic texture filtering: yes -07:17:30: * Dot product texture operation: yes -07:17:30: * Cube mapping: yes -07:17:30: * Hardware stencil buffer: yes -07:17:30: - Stencil depth: 8 -07:17:30: - Two sided stencil support: no -07:17:30: - Wrap stencil values: yes -07:17:30: * Hardware vertex / index buffers: no -07:17:30: * Vertex programs: no -07:17:30: * Fragment programs: no -07:17:30: * Texture Compression: yes -07:17:30: - DXT: yes -07:17:30: - VTC: no -07:17:30: * Scissor Rectangle: yes -07:17:30: * Hardware Occlusion Query: yes -07:17:30: * User clip planes: yes -07:17:30: * VET_UBYTE4 vertex element type: yes -07:17:30: * Infinite far plane projection: yes -07:17:30: * Hardware render-to-texture: yes -07:17:30: * Floating point textures: no -07:17:30: * Non-power-of-two textures: no -07:17:30: * Volume textures: yes -07:17:30: * Multiple Render Targets: 1 -07:17:30: * Point Sprites: no -07:17:30: * Extended point parameters: yes -07:17:30: * Max Point Size: 5.14206e-038 -07:17:30: * Vertex texture fetch: yes -07:17:30: - Max vertex textures: 20263 -07:17:30: - Vertex textures shared: yes -07:17:30: Registering ResourceManager for type Texture -07:17:30: ResourceBackgroundQueue - threading disabled -07:17:30: Particle Renderer Type 'billboard' registered -07:17:30: SceneManagerFactory for type 'BspSceneManager' registered. -07:17:30: Registering ResourceManager for type BspLevel +15:32:01: Creating resource group General +15:32:01: Creating resource group Internal +15:32:01: Creating resource group Autodetect +15:32:01: SceneManagerFactory for type 'DefaultSceneManager' registered. +15:32:01: Registering ResourceManager for type Material +15:32:01: Registering ResourceManager for type Mesh +15:32:01: Registering ResourceManager for type Skeleton +15:32:01: MovableObjectFactory for type 'ParticleSystem' registered. +15:32:01: OverlayElementFactory for type Panel registered. +15:32:01: OverlayElementFactory for type BorderPanel registered. +15:32:01: OverlayElementFactory for type TextArea registered. +15:32:01: Registering ResourceManager for type Font +15:32:01: ArchiveFactory for archive type FileSystem registered. +15:32:01: ArchiveFactory for archive type Zip registered. +15:32:01: FreeImage version: 3.10.0 +15:32:01: This program uses FreeImage, a free, open source image library supporting all common bitmap formats. See http://freeimage.sourceforge.net for details +15:32:01: Supported formats: bmp,ico,jpg,jif,jpeg,jpe,jng,koa,iff,lbm,mng,pbm,pbm,pcd,pcx,pgm,pgm,png,ppm,ppm,ras,tga,targa,tif,tiff,wap,wbmp,wbm,psd,cut,xbm,xpm,gif,hdr,g3,sgi,exr,j2k,j2c,jp2 +15:32:01: DDS codec registering +15:32:01: Registering ResourceManager for type HighLevelGpuProgram +15:32:01: Registering ResourceManager for type Compositor +15:32:01: MovableObjectFactory for type 'Entity' registered. +15:32:01: MovableObjectFactory for type 'Light' registered. +15:32:01: MovableObjectFactory for type 'BillboardSet' registered. +15:32:01: MovableObjectFactory for type 'ManualObject' registered. +15:32:01: MovableObjectFactory for type 'BillboardChain' registered. +15:32:01: MovableObjectFactory for type 'RibbonTrail' registered. +15:32:01: Loading library ../../../plugins\RenderSystem_GL.dll +15:32:01: Installing plugin: GL RenderSystem +15:32:01: OpenGL Rendering Subsystem created. +15:32:01: Plugin successfully installed +15:32:01: Loading library ../../../plugins\RenderSystem_Direct3D9.dll +15:32:01: Installing plugin: D3D9 RenderSystem +15:32:01: D3D9 : Direct3D9 Rendering Subsystem created. +15:32:01: D3D9: Driver Detection Starts +15:32:01: D3D9: Driver Detection Ends +15:32:01: Plugin successfully installed +15:32:01: Loading library ../../../plugins\Plugin_ParticleFX.dll +15:32:01: Installing plugin: ParticleFX +15:32:01: Particle Emitter Type 'Point' registered +15:32:01: Particle Emitter Type 'Box' registered +15:32:01: Particle Emitter Type 'Ellipsoid' registered +15:32:01: Particle Emitter Type 'Cylinder' registered +15:32:01: Particle Emitter Type 'Ring' registered +15:32:01: Particle Emitter Type 'HollowEllipsoid' registered +15:32:01: Particle Affector Type 'LinearForce' registered +15:32:01: Particle Affector Type 'ColourFader' registered +15:32:01: Particle Affector Type 'ColourFader2' registered +15:32:01: Particle Affector Type 'ColourImage' registered +15:32:01: Particle Affector Type 'ColourInterpolator' registered +15:32:01: Particle Affector Type 'Scaler' registered +15:32:01: Particle Affector Type 'Rotator' registered +15:32:01: Particle Affector Type 'DirectionRandomiser' registered +15:32:01: Particle Affector Type 'DeflectorPlane' registered +15:32:01: Plugin successfully installed +15:32:01: Loading library ../../../plugins\Plugin_BSPSceneManager.dll +15:32:01: Installing plugin: BSP Scene Manager +15:32:01: Plugin successfully installed +15:32:01: Loading library ../../../plugins\Plugin_OctreeSceneManager.dll +15:32:01: Installing plugin: Octree & Terrain Scene Manager +15:32:01: Plugin successfully installed +15:32:01: Loading library ../../../plugins\Plugin_CgProgramManager.dll +15:32:01: Installing plugin: Cg Program Manager +15:32:02: Plugin successfully installed +15:32:02: *-*-* OGRE Initialising +15:32:02: *-*-* Version 1.7.0RC1 (Cthugha) +15:32:02: D3D9 : RenderSystem Option: Allow NVPerfHUD = No +15:32:02: D3D9 : RenderSystem Option: Anti aliasing = None +15:32:02: D3D9 : RenderSystem Option: Floating-point mode = Fastest +15:32:02: D3D9 : RenderSystem Option: Full Screen = No +15:32:02: D3D9 : RenderSystem Option: Rendering Device = Mobile Intel(R) 965 Express Chipset Family +15:32:02: D3D9 : RenderSystem Option: VSync = No +15:32:02: D3D9 : RenderSystem Option: Video Mode = 800 x 600 @ 32-bit colour +15:32:02: D3D9 : RenderSystem Option: sRGB Gamma Conversion = No +15:32:02: CPU Identifier & Features +15:32:02: ------------------------- +15:32:02: * CPU ID: GenuineIntel: Intel(R) Core(TM)2 Duo CPU T7500 @ 2.20GHz +15:32:02: * SSE: yes +15:32:02: * SSE2: yes +15:32:02: * SSE3: yes +15:32:02: * MMX: yes +15:32:02: * MMXEXT: yes +15:32:02: * 3DNOW: no +15:32:02: * 3DNOWEXT: no +15:32:02: * CMOV: yes +15:32:02: * TSC: yes +15:32:02: * FPU: yes +15:32:02: * PRO: yes +15:32:02: * HT: no +15:32:02: ------------------------- +15:32:02: D3D9 : Subsystem Initialising +15:32:02: D3D9RenderSystem::_createRenderWindow "OGRE Render Window", 800x600 windowed miscParams: FSAA=0 FSAAQuality=0 colourDepth=32 gamma=false useNVPerfHUD=false vsync=false +15:32:02: D3D9 : Created D3D9 Rendering Window 'OGRE Render Window' : 800x600, 32bpp +15:32:02: D3D9 : WARNING - disabling VSync in windowed mode can cause timing issues at lower frame rates, turn VSync on if you observe this problem. +15:32:02: Registering ResourceManager for type Texture +15:32:02: Registering ResourceManager for type GpuProgram +15:32:02: D3D9: Vertex texture format supported - PF_L8 +15:32:02: D3D9: Vertex texture format supported - PF_L16 +15:32:02: D3D9: Vertex texture format supported - PF_A8 +15:32:02: D3D9: Vertex texture format supported - PF_A4L4 +15:32:02: D3D9: Vertex texture format supported - PF_BYTE_LA +15:32:02: D3D9: Vertex texture format supported - PF_R5G6B5 +15:32:02: D3D9: Vertex texture format supported - PF_B5G6R5 +15:32:02: D3D9: Vertex texture format supported - PF_A4R4G4B4 +15:32:02: D3D9: Vertex texture format supported - PF_A1R5G5B5 +15:32:02: D3D9: Vertex texture format supported - PF_A8R8G8B8 +15:32:02: D3D9: Vertex texture format supported - PF_B8G8R8A8 +15:32:02: D3D9: Vertex texture format supported - PF_A2R10G10B10 +15:32:02: D3D9: Vertex texture format supported - PF_DXT1 +15:32:02: D3D9: Vertex texture format supported - PF_DXT2 +15:32:02: D3D9: Vertex texture format supported - PF_DXT3 +15:32:02: D3D9: Vertex texture format supported - PF_DXT4 +15:32:02: D3D9: Vertex texture format supported - PF_DXT5 +15:32:02: D3D9: Vertex texture format supported - PF_FLOAT16_RGB +15:32:02: D3D9: Vertex texture format supported - PF_FLOAT16_RGBA +15:32:02: D3D9: Vertex texture format supported - PF_FLOAT32_RGB +15:32:02: D3D9: Vertex texture format supported - PF_FLOAT32_RGBA +15:32:02: D3D9: Vertex texture format supported - PF_X8R8G8B8 +15:32:02: D3D9: Vertex texture format supported - PF_R8G8B8A8 +15:32:02: D3D9: Vertex texture format supported - PF_DEPTH +15:32:02: D3D9: Vertex texture format supported - PF_SHORT_RGBA +15:32:02: D3D9: Vertex texture format supported - PF_FLOAT16_R +15:32:02: D3D9: Vertex texture format supported - PF_FLOAT32_R +15:32:02: D3D9: Vertex texture format supported - PF_SHORT_GR +15:32:02: D3D9: Vertex texture format supported - PF_FLOAT16_GR +15:32:02: D3D9: Vertex texture format supported - PF_FLOAT32_GR +15:32:02: D3D9: Vertex texture format supported - PF_SHORT_RGB +15:32:02: RenderSystem capabilities +15:32:02: ------------------------- +15:32:02: RenderSystem Name: Direct3D9 Rendering Subsystem +15:32:02: GPU Vendor: intel +15:32:02: Device Name: Mobile Intel(R) 965 Express Chipset Family +15:32:02: Driver Version: 6.14.10.4926 +15:32:02: * Fixed function pipeline: yes +15:32:02: * Hardware generation of mipmaps: no +15:32:02: * Texture blending: yes +15:32:02: * Anisotropic texture filtering: yes +15:32:02: * Dot product texture operation: yes +15:32:02: * Cube mapping: yes +15:32:02: * Hardware stencil buffer: yes +15:32:02: - Stencil depth: 8 +15:32:02: - Two sided stencil support: yes +15:32:02: - Wrap stencil values: yes +15:32:02: * Hardware vertex / index buffers: yes +15:32:02: * Vertex programs: yes +15:32:02: * Fragment programs: yes +15:32:02: * Supported Shader Profiles: hlsl ps_1_1 ps_1_2 ps_1_3 ps_1_4 ps_2_0 ps_2_a ps_2_b ps_2_x ps_3_0 vs_1_1 vs_2_0 vs_2_a vs_2_x vs_3_0 +15:32:02: * Texture Compression: yes +15:32:02: - DXT: yes +15:32:02: - VTC: no +15:32:02: * Scissor Rectangle: yes +15:32:02: * Hardware Occlusion Query: yes +15:32:02: * User clip planes: yes +15:32:02: * VET_UBYTE4 vertex element type: yes +15:32:02: * Infinite far plane projection: yes +15:32:02: * Hardware render-to-texture: yes +15:32:02: * Floating point textures: yes +15:32:02: * Non-power-of-two textures: yes (limited) +15:32:02: * Volume textures: yes +15:32:02: * Multiple Render Targets: 4 +15:32:02: - With different bit depths: yes +15:32:02: * Point Sprites: yes +15:32:02: * Extended point parameters: yes +15:32:02: * Max Point Size: 256 +15:32:02: * Vertex texture fetch: yes +15:32:02: - Max vertex textures: 4 +15:32:02: - Vertex textures shared: no +15:32:02: * DirectX per stage constants: yes +15:32:02: *************************************** +15:32:02: *** D3D9 : Subsystem Initialised OK *** +15:32:02: *************************************** +15:32:02: ResourceBackgroundQueue - threading disabled +15:32:02: Particle Renderer Type 'billboard' registered +15:32:02: SceneManagerFactory for type 'BspSceneManager' registered. +15:32:02: Registering ResourceManager for type BspLevel +15:32:02: SceneManagerFactory for type 'OctreeSceneManager' registered. +15:32:02: SceneManagerFactory for type 'TerrainSceneManager' registered. +15:32:55: !!! Direct3D Device Lost! +15:32:55: !!! Direct3D Device Lost! +15:32:55: !!! Direct3D Device Lost! +15:32:55: !!! Direct3D Device Lost! +15:32:55: !!! Direct3D Device Lost! +15:32:55: !!! Direct3D Device Lost! +15:32:55: !!! Direct3D Device Lost! +15:32:55: !!! Direct3D Device Lost! +15:32:55: !!! Direct3D Device Lost! +15:32:55: !!! Direct3D Device Lost! +15:32:55: !!! Direct3D Device Lost! +15:32:55: !!! Direct3D Device Lost! +15:32:55: !!! Direct3D Device Lost! +15:32:55: !!! Direct3D Device Lost! +15:32:55: !!! Direct3D Device Lost! +15:32:55: !!! Direct3D Device Lost! +15:32:55: !!! Direct3D Device Lost! +15:32:55: !!! Direct3D Device Lost! +15:32:56: !!! Direct3D Device Lost! +15:32:56: !!! Direct3D Device Lost! +15:32:56: !!! Direct3D Device Lost! +15:32:56: !!! Direct3D Device Lost! +15:32:56: !!! Direct3D Device Lost! +15:32:56: !!! Direct3D Device Lost! +15:32:56: !!! Direct3D Device Lost! +15:32:56: !!! Direct3D Device Lost! +15:32:56: !!! Direct3D Device Lost! +15:32:56: !!! Direct3D Device Lost! +15:32:56: !!! Direct3D Device Lost! +15:32:56: !!! Direct3D Device Lost! +15:32:56: !!! Direct3D Device Lost! +15:32:56: !!! Direct3D Device Lost! +15:32:56: !!! Direct3D Device Lost! +15:32:56: !!! Direct3D Device Lost! +15:32:56: !!! Direct3D Device Lost! +15:32:56: !!! Direct3D Device Lost! +15:32:56: !!! Direct3D Device Lost! +15:32:56: D3D9TextureManager released: +15:32:56: 0 unmanaged textures +15:32:56: D3D9HardwareBufferManager released: +15:32:56: 0 unmanaged vertex buffers +15:32:56: 0 unmanaged index buffers +15:32:57: Reset device ok w:800 h:600 +15:32:57: D3D9TextureManager recreated: +15:32:57: 0 unmanaged textures +15:32:57: D3D9HardwareBufferManager recreated: +15:32:57: 0 unmanaged vertex buffers +15:32:57: 0 unmanaged index buffers +15:32:57: !!! Direct3D Device successfully restored. Modified: trunk/python-ogre/scripts/UpdateDLLs.bat =================================================================== --- trunk/python-ogre/scripts/UpdateDLLs.bat 2008-06-23 06:26:56 UTC (rev 604) +++ trunk/python-ogre/scripts/UpdateDLLs.bat 2008-06-23 08:07:20 UTC (rev 605) @@ -5,19 +5,20 @@ setlocal set root=c:\development set package=..\packages_2.5\ogre -set ogre=%root%\ogrenew\samples\common\bin\release -set cegui=%root%\cegui-0.5.0\bin +set ogre=%root%\ogre\samples\common\bin\release +set cegui=%root%\cegui-0.6.0\bin set quick=%root%\quickgui\bin set opcode=%root%\OpCode\Release set nxogre=%root%\NxOgre\NxOgre\lib set newton=%root%\NewtonSDK\sdk\dll set ogreode=%root%\ogreaddons\ogreode -set physx="c:\program files\AGEIA Technologies\SDK\v2.7.3\bin\win32" +set physx="c:\program files\NVIDIA Corporation\NVIDIA PhysX SDK\v2.8.1\bin\win32" set theora=%root%\ogreaddons\videoplugin\TheoraVideo\bin\Release set ffmpeg=%root%\ffmpeg -set navi=%root%\navi\Dependencies\win32\llmozlib\runtime\Release -set boost=%root%\boost\bin.v2\libs\python2.5\build\msvc-8.0\release\threading-multi -set particleuniverse=%root%\ogrenew\plugins\particleuniverse\bin\release +set naviextra=%root%\navi\Dependencies\win32\astral\runtime\Release +set navi=%root%\navi\lib +set boost=%root%\boost-trunk\bin.v2\libs\python\build\msvc-9.0express\release\threading-multi +set particleuniverse=%root%\ogre\plugins\particleuniverse\bin\release set ogreal=%root%\OgreAL\lib\Release set freealut=%root%\FreeAlut\lib @@ -29,7 +30,7 @@ copy /y %ogre%\ogremain.dll %package%\renderer\OGRE copy /y %ogre%\cg.dll %package%\renderer\OGRE -copy /y %boost%\boost_python-vc80-mt-1_35.dll %package%\renderer\OGRE +copy /y %boost%\boost_python-vc90-mt-1_35.dll %package%\renderer\OGRE copy /y %ogre%\render*.dll ..\plugins copy /y %ogre%\plug*.dll ..\plugins @@ -40,10 +41,10 @@ rem Physics copy /y %ogre%\ReferenceAppLayer.dll %package%\physics\OgreRefApp -copy /y %opcode%\opcode.dll %package%\physics\OpCode +REM copy /y %opcode%\opcode.dll %package%\physics\OpCode copy /y %nxogre%\nxogre.dll %package%\physics\NxOgre copy /y %newton%\newton.dll %package%\physics\OgreNewt -copy /y %boost%\boost_python-vc80-mt-1_35.dll %package%\physics\ode +copy /y %boost%\boost_python-vc90-mt-1_35.dll %package%\physics\ode rem OgreODE copy /y %ogreode%\lib\Release\OgreOde_Core.dll %package%\physics\OgreOde @@ -68,7 +69,7 @@ copy /y %ogre%\OgreGUIRenderer.dll %package%\gui\CEGUI rem QuickGUI -copy /y %quick%\QuickGUI.dll %package%\gui\QuickGui +REM copy /y %quick%\QuickGUI.dll %package%\gui\QuickGui rem OgreAL copy /y %ogreal%\OgreAL.dll %package%\sound\OgreAL @@ -76,7 +77,7 @@ copy /y %vorbis%\VorbisFile_Dynamic_Release\vorbisfile.dll %package%\sound\OgreAL copy /y %vorbis%\Vorbis_Dynamic_Release\vorbis.dll %package%\sound\OgreAL copy /y %ogg%\ogg.dll %package%\sound\OgreAL -copy /y %freealut%\alut.dll %package%\sound\OgreAL +REM copy /y %freealut%\alut.dll %package%\sound\OgreAL copy /y %openal%\OpenAL32.dll %package%\sound\OgreAL copy /y %openal%\wrap_oal.dll %package%\sound\OgreAL @@ -84,4 +85,4 @@ copy /y %navi%\*.dll %package%\gui\navi rem plib -copy /y %boost%\boost_python-vc80-mt-1_35.dll %package%\addons\plib \ No newline at end of file +copy /y %boost%\boost_python-vc90-mt-1_35.dll %package%\addons\plib \ No newline at end of file Modified: trunk/python-ogre/scripts/build_html.bat =================================================================== --- trunk/python-ogre/scripts/build_html.bat 2008-06-23 06:26:56 UTC (rev 604) +++ trunk/python-ogre/scripts/build_html.bat 2008-06-23 08:07:20 UTC (rev 605) @@ -16,7 +16,7 @@ echo run the microsfot htmlhtml studio and compile the chm rem rem https://frogpie.svn.sourceforge.net/svnroot/frogpie/trunk/sandbox/chm (chm generator) -rem http://msdn.microsoft.com/library/en-us/htmlhelp/html/hwMicrosoftHTMLHelpDownloads.asp +rem http://www.microsoft.com/downloads/details.aspx?FamilyID=00535334-c8a6-452f-9aa0-d597d16580cc&DisplayLang=en rem https://svn.sourceforge.net/svnroot/epydoc/trunk/epydoc rem Checkout a new gen_epydoc.py in the patch directory if you have issues Modified: trunk/python-ogre/scripts/compilesource.bat =================================================================== --- trunk/python-ogre/scripts/compilesource.bat 2008-06-23 06:26:56 UTC (rev 604) +++ trunk/python-ogre/scripts/compilesource.bat 2008-06-23 08:07:20 UTC (rev 605) @@ -1,9 +1,9 @@ setlocal pushd -set _VCBUILD="c:\\Program Files\\Microsoft Visual Studio 8\\vc\\vcpackages\\vcbuild.exe" +set _VCBUILD="c:\\Program Files\\Microsoft Visual Studio 9.0\\vc\\vcpackages\\vcbuild.exe" set _ROOT=c:\\development call vcvars32 -cd %_ROOT%\\ogrenew +cd %_ROOT%\\ogre %_VCBUILD% /useenv Ogre_vc8.sln "Release|Win32" rem cd %_ROOT%\\NxOgre\\NxOgre rem %_VCBUILD% /useenv NxOgre.VC8.Windows.sln "Release|Win32" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2008-06-23 06:26:50
|
Revision: 604 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=604&view=rev Author: andy_miller Date: 2008-06-22 23:26:56 -0700 (Sun, 22 Jun 2008) Log Message: ----------- Navi 1.6 now compiles my patches to theoravideo Modified Paths: -------------- trunk/python-ogre/PythonOgreConfig_nt.py trunk/python-ogre/PythonOgreConfig_posix.py trunk/python-ogre/code_generators/navi/generate_code.py trunk/python-ogre/environment.py Added Paths: ----------- trunk/python-ogre/patch/ogre_1.7.patch trunk/python-ogre/patch/theoravideo.patch Modified: trunk/python-ogre/PythonOgreConfig_nt.py =================================================================== --- trunk/python-ogre/PythonOgreConfig_nt.py 2008-06-22 11:59:01 UTC (rev 603) +++ trunk/python-ogre/PythonOgreConfig_nt.py 2008-06-23 06:26:56 UTC (rev 604) @@ -159,6 +159,8 @@ 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_TheoraDemo = os.path.join (PATH_Theora,'..', 'CEGUI_TheoraDemo','include') + PATH_INCLUDE_ogrevideoffmpeg = PATH_ogrevideoffmpeg PATH_INCLUDE_ffmpeg = os.path.join (PATH_ffmpeg,'include') PATH_INCLUDE_ogredshow = PATH_ogredshow Modified: trunk/python-ogre/PythonOgreConfig_posix.py =================================================================== --- trunk/python-ogre/PythonOgreConfig_posix.py 2008-06-22 11:59:01 UTC (rev 603) +++ trunk/python-ogre/PythonOgreConfig_posix.py 2008-06-23 06:26:56 UTC (rev 604) @@ -158,6 +158,8 @@ PATH_INCLUDE_Bullet = os.path.join( PATH_Bullet, 'src') PATH_INCLUDE_betagui = PATH_betagui PATH_INCLUDE_Theora = os.path.join (PATH_Theora,'include') +PATH_INCLUDE_TheoraDemo = os.path.join (PATH_Theora,'..', 'CEGUI_TheoraDemo','include') + PATH_INCLUDE_ogrevideoffmpeg = PATH_ogrevideoffmpeg PATH_INCLUDE_ffmpeg = os.path.join (PATH_ffmpeg,'include') PATH_INCLUDE_plib = PATH_plib Modified: trunk/python-ogre/code_generators/navi/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/navi/generate_code.py 2008-06-22 11:59:01 UTC (rev 603) +++ trunk/python-ogre/code_generators/navi/generate_code.py 2008-06-23 06:26:56 UTC (rev 604) @@ -52,6 +52,15 @@ def ManualExclude ( mb ): global_ns = mb.global_ns main_ns = global_ns.namespace( MAIN_NAMESPACE ) + + for c in main_ns.classes(): + print "C:", c + for c in main_ns.member_functions(): + print "F:", c + for c in main_ns.variables(): + print "V:", c + +# sys.exit(-1) # things not yet implemented in the C source.. excludes=[] @@ -62,13 +71,17 @@ m.exclude() ### Member Functions - excludes=[] ## '::NaviLibrary::Navi::bind' ] ## has a default parameter of InlineVector which we can't create :( -# ['::NaviLibrary::NaviDataValue::isEmpty' -# ,'::NaviLibrary::NaviDataValue::isNumber' ## inline functions -# ] + excludes=[ '::NaviLibrary::Navi::navigateRefresh' + ,'::NaviLibrary::Singleton<class NaviLibrary::NaviManager>::instance' + ,'::NaviLibrary::Navi::bind' #needs inline vector class + ,'::NaviLibrary::Navi::evaluateJS' + ] for e in excludes: print "excluding ", e - main_ns.member_functions(e).exclude() + try: + main_ns.member_functions(e).exclude() + except: + print "FAILED.." for c in main_ns.classes(): @@ -76,7 +89,7 @@ if c.name.startswith ( "Inline" ): print "setting noncopyable on ", c c.noncopyable = True -# c.exclude() + c.exclude() ### Free Functions @@ -85,9 +98,14 @@ main_ns.free_functions(e).exclude() ## Classes - excludes = [] ## '::NaviLibrary::NaviUtilities::InlineVector<std::string>' ] + excludes = ['::NaviLibrary::Singleton<class NaviLibrary::NaviManager>' + ] ## '::NaviLibrary::NaviUtilities::InlineVector<std::string>' ] for e in excludes: - main_ns.class_(e).exclude() + print "Excluding class:", e + try: + main_ns.class_(e).exclude() + except: + print "FAILED" ## I have a challenge that Py++ doesn't recognise these classes by full name (perhaps because they are structs?) @@ -103,7 +121,9 @@ # cls.variable("StaticFunction").exclude() # - excludes = []# 'FastDelegate1::m_Closure'] + excludes = ['::NaviLibrary::Singleton<NaviLibrary::NaviMouse>::instance' + ,'::NaviLibrary::Singleton<NaviLibrary::NaviManager>::instance' + ] for e in excludes: print "Excluding Var", e main_ns.variable(e).exclude() @@ -448,8 +468,9 @@ os.path.join( environment.navi.root_dir, "python_navi.h" ) , environment.navi.cache_file ) - defined_symbols = [ 'OGRE_NONCLIENT_BUILD', 'OGRE_GCC_VISIBILITY', 'NAVI_NONCLIENT_BUILD', '__VECTOR_C'] -# undefined_symbols = ['FASTDLGT_HASINHERITANCE_KEYWORDS'] + defined_symbols = [ 'OGRE_NONCLIENT_BUILD', 'OGRE_GCC_VISIBILITY', + 'NAVI_DYNAMIC_LIB', + '__VECTOR_C','_WIN32'] if environment._USE_THREADS: defined_symbols.append('BOOST_HAS_THREADS') Modified: trunk/python-ogre/environment.py =================================================================== --- trunk/python-ogre/environment.py 2008-06-22 11:59:01 UTC (rev 603) +++ trunk/python-ogre/environment.py 2008-06-23 06:26:56 UTC (rev 604) @@ -958,7 +958,7 @@ version="1.6" parent="ogre/gui" name ='navi' - CCFLAGS = '-D"WIN32" -D"NDEBUG", -D"WINDOWS"' + CCFLAGS = '-D"WIN32" -D"NDEBUG", -D"WINDOWS", -D"_WIN32", -D"NAVI_DYNAMIC_LIB" ' cflags="" base = 'navi' include_dirs = [ Config.PATH_Boost @@ -1088,6 +1088,8 @@ include_dirs = [ Config.PATH_Boost, Config.PATH_INCLUDE_Ogre, Config.PATH_INCLUDE_Theora, + Config.PATH_INCLUDE_TheoraDemo + ] for d in Config.PATH_INCLUDE_OggVorbisTheora: include_dirs.append( d ) Added: trunk/python-ogre/patch/ogre_1.7.patch =================================================================== --- trunk/python-ogre/patch/ogre_1.7.patch (rev 0) +++ trunk/python-ogre/patch/ogre_1.7.patch 2008-06-23 06:26:56 UTC (rev 604) @@ -0,0 +1,91 @@ + +--- ogre/configure.in 2007-05-15 22:43:31.000000000 +0800 ++++ ogre/configure.in 2007-05-15 22:43:18.000000000 +0800 +@@ -59,6 +58,7 @@ + ;; + esac + ]) ++CFLAGS_VISIBILITY="" + AC_SUBST(CFLAGS_VISIBILITY) + AC_LANG_POP + +--- ogre/OgreMain/include/OgreDataStream.h 23 Aug 2006 08:18:33 -0000 1.12 ++++ ogre/OgreMain/include/OgreDataStream.h 24 Nov 2007 00:35:47 -0000 +@@ -33,6 +33,7 @@ + #include "OgreString.h" + #include "OgreSharedPtr.h" + #include <istream> ++#include <stdexcept> + + namespace Ogre { + +@@ -79,7 +80,7 @@ + @param count Number of bytes to read + @returns The number of bytes read + */ +- virtual size_t read(void* buf, size_t count) = 0; ++ virtual size_t read(void* buf, size_t count) { throw std::runtime_error ( std::string ("Virtual function DataStream::read called!") ); } + /** Get a single line from the stream. + @remarks + The delimiter character is not included in the data +@@ -146,7 +147,7 @@ + /** Returns the total size of the data to be read from the stream, + or 0 if this is indeterminate for this stream. + */ +- size_t size(void) const { return mSize; } ++ virtual size_t size(void) const { return mSize; } + + /** Close the stream; this makes further operations invalid. */ + virtual void close(void) = 0; + +--- ogre/OgreMain/include/OgreHardwareBuffer.h 23 Aug 2006 08:18:33 -0000 1.17 ++++ ogre/OgreMain/include/OgreHardwareBuffer.h 24 Nov 2007 00:37:00 -0000 +@@ -31,6 +31,8 @@ + + // Precompiler options + #include "OgrePrerequisites.h" ++#include <stdexcept> ++ + + namespace Ogre { + +@@ -244,7 +246,7 @@ + @param pDest The area of memory in which to place the data, must be large enough to + accommodate the data! + */ +- virtual void readData(size_t offset, size_t length, void* pDest) = 0; ++ virtual void readData(size_t offset, size_t length, void* pDest) { throw std::runtime_error ( std::string ("Virtual function HardwareBuffer::readData called!") ); } + /** Writes data to the buffer from an area of system memory; note that you must + ensure that your buffer is big enough. + @param offset The byte offset from the start of the buffer to start writing + +--- ogre/OgreMain/include/OgreRenderQueueListener.h 23 Aug 2006 08:18:35 -0000 1.10 ++++ ogre/OgreMain/include/OgreRenderQueueListener.h 24 Nov 2007 00:34:52 -0000 +@@ -31,6 +31,8 @@ + + #include "OgrePrerequisites.h" + #include "OgreRenderQueue.h" ++#include <stdexcept> ++ + + namespace Ogre { + +@@ -65,7 +67,7 @@ + for this queue group. + */ + virtual void renderQueueStarted(uint8 queueGroupId, const String& invocation, +- bool& skipThisInvocation) = 0; ++ bool& skipThisInvocation) { throw std::runtime_error ( std::string ("Virtual function RenderQueueListener::renderQueueStarted called!") ); } + + /** Event raised after a queue group is rendered. + @remarks +@@ -80,7 +82,7 @@ + events will also be fired for it again. + */ + virtual void renderQueueEnded(uint8 queueGroupId, const String& invocation, +- bool& repeatThisInvocation) = 0; ++ bool& repeatThisInvocation) { throw std::runtime_error ( std::string ("Virtual function RenderQueueListener::renderQueueEnded called!") ); } + }; + + } + Added: trunk/python-ogre/patch/theoravideo.patch =================================================================== --- trunk/python-ogre/patch/theoravideo.patch (rev 0) +++ trunk/python-ogre/patch/theoravideo.patch 2008-06-23 06:26:56 UTC (rev 604) @@ -0,0 +1,2999 @@ +Index: CEGUI_TheoraDemo/include/SoundManager.h +=================================================================== +--- CEGUI_TheoraDemo/include/SoundManager.h (revision 2450) ++++ CEGUI_TheoraDemo/include/SoundManager.h (working copy) +@@ -16,14 +16,10 @@ + + #include "TheoraAudioDriver.h" + +-namespace CEGUI +-{ +- class ProgressBar; +-} + + namespace Ogre + { +- class SoundManager ++ class _OgreTheoraExport SoundManager + { + protected: + SoundManager() {} +Index: CEGUI_TheoraDemo/scripts/VC8_GuiTesting.vcproj +=================================================================== +--- CEGUI_TheoraDemo/scripts/VC8_GuiTesting.vcproj (revision 2450) ++++ CEGUI_TheoraDemo/scripts/VC8_GuiTesting.vcproj (working copy) +@@ -1,256 +1,255 @@ +-<?xml version="1.0" encoding="Windows-1252"?> +-<VisualStudioProject +- ProjectType="Visual C++" +- Version="8,00" +- Name="GuiTesting" +- ProjectGUID="{F71CD603-13C3-4131-9E5B-9FC319C01C51}" +- > +- <Platforms> +- <Platform +- Name="Win32" +- /> +- </Platforms> +- <ToolFiles> +- </ToolFiles> +- <Configurations> +- <Configuration +- Name="Release|Win32" +- OutputDirectory="../obj/Release" +- IntermediateDirectory="../obj/Release" +- ConfigurationType="1" +- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops" +- UseOfMFC="0" +- ATLMinimizesCRunTimeLibraryUsage="false" +- CharacterSet="2" +- > +- <Tool +- Name="VCPreBuildEventTool" +- /> +- <Tool +- Name="VCCustomBuildTool" +- /> +- <Tool +- Name="VCXMLDataGeneratorTool" +- /> +- <Tool +- Name="VCWebServiceProxyGeneratorTool" +- /> +- <Tool +- Name="VCMIDLTool" +- PreprocessorDefinitions="NDEBUG" +- MkTypLibCompatible="true" +- SuppressStartupBanner="true" +- TargetEnvironment="1" +- TypeLibraryName=".\../obj/Release/GuiTesting.tlb" +- /> +- <Tool +- Name="VCCLCompilerTool" +- InlineFunctionExpansion="1" +- AdditionalIncludeDirectories="..\..\TheoraVideo\include;..\include;..\..\..\..\ogrenew\OgreMain\include;..\..\theora\include;"..\..\ptypes-1.8.3\include";..\..\..\..\ogrenew\OgreMain\include;..\..\theora\include;"..\..\ptypes-1.8.3\include";..\..\..\..\ogrenew\Samples\Common\CEGUIRenderer\include;..\..\..\..\ogrenew\Dependencies\include" +- PreprocessorDefinitions="WIN32,NDEBUG,_WINDOWS" +- StringPooling="true" +- RuntimeLibrary="2" +- EnableFunctionLevelLinking="true" +- UsePrecompiledHeader="0" +- PrecompiledHeaderFile=".\../obj/Release/GuiTesting.pch" +- AssemblerListingLocation=".\../obj/Release/" +- ObjectFile=".\../obj/Release/" +- ProgramDataBaseFileName=".\../obj/Release/" +- BrowseInformation="1" +- WarningLevel="3" +- SuppressStartupBanner="true" +- CompileAs="0" +- /> +- <Tool +- Name="VCManagedResourceCompilerTool" +- /> +- <Tool +- Name="VCResourceCompilerTool" +- PreprocessorDefinitions="NDEBUG" +- Culture="1033" +- /> +- <Tool +- Name="VCPreLinkEventTool" +- /> +- <Tool +- Name="VCLinkerTool" +- AdditionalOptions="/MACHINE:I386" +- AdditionalDependencies="odbc32.lib odbccp32.lib CEGUIBase.lib OgreMain.lib OgreGUIRenderer.lib Plugin_TheoraVideoSystem.lib" +- OutputFile="../Bin/Release/GuiTesting.exe" +- LinkIncremental="1" +- SuppressStartupBanner="true" +- AdditionalLibraryDirectories="..\..\TheoraVideo\bin\release;..\..\..\..\ogrenew\ogremain\lib\release;..\..\..\..\ogrenew\Dependencies\lib\release;..\..\..\..\ogrenew\Samples\Common\CEGUIRenderer\lib" +- ProgramDatabaseFile=".\../obj/Release/GuiTesting.pdb" +- SubSystem="2" +- /> +- <Tool +- Name="VCALinkTool" +- /> +- <Tool +- Name="VCManifestTool" +- /> +- <Tool +- Name="VCXDCMakeTool" +- /> +- <Tool +- Name="VCBscMakeTool" +- /> +- <Tool +- Name="VCFxCopTool" +- /> +- <Tool +- Name="VCAppVerifierTool" +- /> +- <Tool +- Name="VCWebDeploymentTool" +- /> +- <Tool +- Name="VCPostBuildEventTool" +- /> +- </Configuration> +- <Configuration +- Name="Debug|Win32" +- OutputDirectory="../obj/Debug" +- IntermediateDirectory="../obj/Debug" +- ConfigurationType="1" +- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops" +- UseOfMFC="0" +- ATLMinimizesCRunTimeLibraryUsage="false" +- CharacterSet="2" +- > +- <Tool +- Name="VCPreBuildEventTool" +- /> +- <Tool +- Name="VCCustomBuildTool" +- /> +- <Tool +- Name="VCXMLDataGeneratorTool" +- /> +- <Tool +- Name="VCWebServiceProxyGeneratorTool" +- /> +- <Tool +- Name="VCMIDLTool" +- PreprocessorDefinitions="_DEBUG" +- MkTypLibCompatible="true" +- SuppressStartupBanner="true" +- TargetEnvironment="1" +- TypeLibraryName=".\../obj/Debug/GuiTesting.tlb" +- /> +- <Tool +- Name="VCCLCompilerTool" +- AdditionalOptions="/Zm200 " +- Optimization="0" +- AdditionalIncludeDirectories="..\..\TheoraVideo\include;..\include;..\..\..\..\ogrenew\OgreMain\include;..\..\theora\include;"..\..\ptypes-1.8.3\include";..\..\..\..\ogrenew\Samples\Common\CEGUIRenderer\include;..\..\..\..\ogrenew\Dependencies\include" +- PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_STLP_DEBUG" +- BasicRuntimeChecks="3" +- RuntimeLibrary="3" +- UsePrecompiledHeader="0" +- PrecompiledHeaderFile=".\../obj/Debug/GuiTesting.pch" +- AssemblerListingLocation=".\../obj/Debug/" +- ObjectFile=".\../obj/Debug/" +- ProgramDataBaseFileName=".\../obj/Debug/" +- BrowseInformation="1" +- WarningLevel="3" +- SuppressStartupBanner="true" +- DebugInformationFormat="4" +- CompileAs="0" +- /> +- <Tool +- Name="VCManagedResourceCompilerTool" +- /> +- <Tool +- Name="VCResourceCompilerTool" +- PreprocessorDefinitions="_DEBUG" +- Culture="1033" +- /> +- <Tool +- Name="VCPreLinkEventTool" +- /> +- <Tool +- Name="VCLinkerTool" +- AdditionalOptions="/MACHINE:I386" +- AdditionalDependencies="odbc32.lib odbccp32.lib CEGUIBase_d.lib OgreMain_d.lib OgreGUIRenderer_d.lib Plugin_TheoraVideoSystem.lib" +- OutputFile="../bin/Debug/GuiTesting.exe" +- LinkIncremental="2" +- SuppressStartupBanner="true" +- AdditionalLibraryDirectories="..\..\TheoraVideo\bin\debug;..\..\..\..\ogrenew\ogremain\lib\debug;..\..\..\..\ogrenew\Dependencies\lib\Debug;..\..\..\..\ogrenew\Samples\Common\CEGUIRenderer\lib" +- GenerateDebugInformation="true" +- ProgramDatabaseFile="../obj/GuiTesting.pdb" +- SubSystem="2" +- /> +- <Tool +- Name="VCALinkTool" +- /> +- <Tool +- Name="VCManifestTool" +- /> +- <Tool +- Name="VCXDCMakeTool" +- /> +- <Tool +- Name="VCBscMakeTool" +- /> +- <Tool +- Name="VCFxCopTool" +- /> +- <Tool +- Name="VCAppVerifierTool" +- /> +- <Tool +- Name="VCWebDeploymentTool" +- /> +- <Tool +- Name="VCPostBuildEventTool" +- /> +- </Configuration> +- </Configurations> +- <References> +- </References> +- <Files> +- <Filter +- Name="Source Files" +- Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +- > +- <File +- RelativePath="..\src\MainModule.cpp" +- > +- </File> +- <File +- RelativePath="..\src\MovieLogic.cpp" +- > +- </File> +- <File +- RelativePath="..\src\SoundManager.cpp" +- > +- </File> +- </Filter> +- <Filter +- Name="Includes" +- > +- <File +- RelativePath="..\include\ExampleApplication.h" +- > +- </File> +- <File +- RelativePath="..\include\ExampleFrameListener.h" +- > +- </File> +- <File +- RelativePath="..\include\MainModule.h" +- > +- </File> +- <File +- RelativePath="..\include\MovieLogic.h" +- > +- </File> +- <File +- RelativePath="..\include\SoundManager.h" +- > +- </File> +- </Filter> +- </Files> +- <Globals> +- </Globals> +-</VisualStudioProject> ++<?xml version="1.0" encoding="Windows-1252"?> ++<VisualStudioProject ++ ProjectType="Visual C++" ++ Version="9.00" ++ Name="GuiTesting" ++ ProjectGUID="{F71CD603-13C3-4131-9E5B-9FC319C01C51}" ++ TargetFrameworkVersion="131072" ++ > ++ <Platforms> ++ <Platform ++ Name="Win32" ++ /> ++ </Platforms> ++ <ToolFiles> ++ </ToolFiles> ++ <Configurations> ++ <Configuration ++ Name="Release|Win32" ++ OutputDirectory="../obj/Release" ++ IntermediateDirectory="../obj/Release" ++ ConfigurationType="1" ++ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops" ++ UseOfMFC="0" ++ ATLMinimizesCRunTimeLibraryUsage="false" ++ CharacterSet="2" ++ > ++ <Tool ++ Name="VCPreBuildEventTool" ++ /> ++ <Tool ++ Name="VCCustomBuildTool" ++ /> ++ <Tool ++ Name="VCXMLDataGeneratorTool" ++ /> ++ <Tool ++ Name="VCWebServiceProxyGeneratorTool" ++ /> ++ <Tool ++ Name="VCMIDLTool" ++ PreprocessorDefinitions="NDEBUG" ++ MkTypLibCompatible="true" ++ SuppressStartupBanner="true" ++ TargetEnvironment="1" ++ TypeLibraryName=".\../obj/Release/GuiTesting.tlb" ++ /> ++ <Tool ++ Name="VCCLCompilerTool" ++ InlineFunctionExpansion="1" ++ AdditionalIncludeDirectories="..\..\TheoraVideo\include;..\include;..\..\..\..\ogrenew\OgreMain\include;..\..\theora\include;"..\..\ptypes-1.8.3\include";..\..\..\..\ogrenew\OgreMain\include;..\..\theora\include;"..\..\ptypes-1.8.3\include";..\..\..\..\ogrenew\Samples\Common\CEGUIRenderer\include;..\..\..\..\ogrenew\Dependencies\include" ++ PreprocessorDefinitions="WIN32,NDEBUG,_WINDOWS" ++ StringPooling="true" ++ RuntimeLibrary="2" ++ EnableFunctionLevelLinking="true" ++ UsePrecompiledHeader="0" ++ PrecompiledHeaderFile=".\../obj/Release/GuiTesting.pch" ++ AssemblerListingLocation=".\../obj/Release/" ++ ObjectFile=".\../obj/Release/" ++ ProgramDataBaseFileName=".\../obj/Release/" ++ BrowseInformation="1" ++ WarningLevel="3" ++ SuppressStartupBanner="true" ++ CompileAs="0" ++ /> ++ <Tool ++ Name="VCManagedResourceCompilerTool" ++ /> ++ <Tool ++ Name="VCResourceCompilerTool" ++ PreprocessorDefinitions="NDEBUG" ++ Culture="1033" ++ /> ++ <Tool ++ Name="VCPreLinkEventTool" ++ /> ++ <Tool ++ Name="VCLinkerTool" ++ AdditionalOptions="/MACHINE:I386" ++ AdditionalDependencies="odbc32.lib odbccp32.lib CEGUIBase.lib OgreMain.lib OgreGUIRenderer.lib Plugin_TheoraVideoSystem.lib" ++ OutputFile="../Bin/Release/GuiTesting.exe" ++ LinkIncremental="1" ++ SuppressStartupBanner="true" ++ AdditionalLibraryDirectories="..\..\TheoraVideo\bin\release;..\..\..\..\ogrenew\ogremain\lib\release;..\..\..\..\ogrenew\Dependencies\lib\release;..\..\..\..\ogrenew\Samples\Common\CEGUIRenderer\lib" ++ ProgramDatabaseFile=".\../obj/Release/GuiTesting.pdb" ++ SubSystem="2" ++ RandomizedBaseAddress="1" ++ DataExecutionPrevention="0" ++ /> ++ <Tool ++ Name="VCALinkTool" ++ /> ++ <Tool ++ Name="VCManifestTool" ++ /> ++ <Tool ++ Name="VCXDCMakeTool" ++ /> ++ <Tool ++ Name="VCBscMakeTool" ++ /> ++ <Tool ++ Name="VCFxCopTool" ++ /> ++ <Tool ++ Name="VCAppVerifierTool" ++ /> ++ <Tool ++ Name="VCPostBuildEventTool" ++ /> ++ </Configuration> ++ <Configuration ++ Name="Debug|Win32" ++ OutputDirectory="../obj/Debug" ++ IntermediateDirectory="../obj/Debug" ++ ConfigurationType="1" ++ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops" ++ UseOfMFC="0" ++ ATLMinimizesCRunTimeLibraryUsage="false" ++ CharacterSet="2" ++ > ++ <Tool ++ Name="VCPreBuildEventTool" ++ /> ++ <Tool ++ Name="VCCustomBuildTool" ++ /> ++ <Tool ++ Name="VCXMLDataGeneratorTool" ++ /> ++ <Tool ++ Name="VCWebServiceProxyGeneratorTool" ++ /> ++ <Tool ++ Name="VCMIDLTool" ++ PreprocessorDefinitions="_DEBUG" ++ MkTypLibCompatible="true" ++ SuppressStartupBanner="true" ++ TargetEnvironment="1" ++ TypeLibraryName=".\../obj/Debug/GuiTesting.tlb" ++ /> ++ <Tool ++ Name="VCCLCompilerTool" ++ AdditionalOptions="/Zm200 " ++ Optimization="0" ++ AdditionalIncludeDirectories="..\..\TheoraVideo\include;..\include;..\..\..\..\ogrenew\OgreMain\include;..\..\theora\include;"..\..\ptypes-1.8.3\include";..\..\..\..\ogrenew\Samples\Common\CEGUIRenderer\include;..\..\..\..\ogrenew\Dependencies\include" ++ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_STLP_DEBUG" ++ BasicRuntimeChecks="3" ++ RuntimeLibrary="3" ++ UsePrecompiledHeader="0" ++ PrecompiledHeaderFile=".\../obj/Debug/GuiTesting.pch" ++ AssemblerListingLocation=".\../obj/Debug/" ++ ObjectFile=".\../obj/Debug/" ++ ProgramDataBaseFileName=".\../obj/Debug/" ++ BrowseInformation="1" ++ WarningLevel="3" ++ SuppressStartupBanner="true" ++ DebugInformationFormat="4" ++ CompileAs="0" ++ /> ++ <Tool ++ Name="VCManagedResourceCompilerTool" ++ /> ++ <Tool ++ Name="VCResourceCompilerTool" ++ PreprocessorDefinitions="_DEBUG" ++ Culture="1033" ++ /> ++ <Tool ++ Name="VCPreLinkEventTool" ++ /> ++ <Tool ++ Name="VCLinkerTool" ++ AdditionalOptions="/MACHINE:I386" ++ AdditionalDependencies="odbc32.lib odbccp32.lib CEGUIBase_d.lib OgreMain_d.lib OgreGUIRenderer_d.lib Plugin_TheoraVideoSystem.lib" ++ OutputFile="../bin/Debug/GuiTesting.exe" ++ LinkIncremental="2" ++ SuppressStartupBanner="true" ++ AdditionalLibraryDirectories="..\..\TheoraVideo\bin\debug;..\..\..\..\ogrenew\ogremain\lib\debug;..\..\..\..\ogrenew\Dependencies\lib\Debug;..\..\..\..\ogrenew\Samples\Common\CEGUIRenderer\lib" ++ GenerateDebugInformation="true" ++ ProgramDatabaseFile="../obj/GuiTesting.pdb" ++ SubSystem="2" ++ RandomizedBaseAddress="1" ++ DataExecutionPrevention="0" ++ /> ++ <Tool ++ Name="VCALinkTool" ++ /> ++ <Tool ++ Name="VCManifestTool" ++ /> ++ <Tool ++ Name="VCXDCMakeTool" ++ /> ++ <Tool ++ Name="VCBscMakeTool" ++ /> ++ <Tool ++ Name="VCFxCopTool" ++ /> ++ <Tool ++ Name="VCAppVerifierTool" ++ /> ++ <Tool ++ Name="VCPostBuildEventTool" ++ /> ++ </Configuration> ++ </Configurations> ++ <References> ++ </References> ++ <Files> ++ <Filter ++ Name="Source Files" ++ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" ++ > ++ <File ++ RelativePath="..\src\MainModule.cpp" ++ > ++ </File> ++ <File ++ RelativePath="..\src\MovieLogic.cpp" ++ > ++ </File> ++ <File ++ RelativePath="..\src\SoundManager.cpp" ++ > ++ </File> ++ </Filter> ++ <Filter ++ Name="Includes" ++ > ++ <File ++ RelativePath="..\include\ExampleApplication.h" ++ > ++ </File> ++ <File ++ RelativePath="..\include\ExampleFrameListener.h" ++ > ++ </File> ++ <File ++ RelativePath="..\include\MainModule.h" ++ > ++ </File> ++ <File ++ RelativePath="..\include\MovieLogic.h" ++ > ++ </File> ++ <File ++ RelativePath="..\include\SoundManager.h" ++ > ++ </File> ++ </Filter> ++ </Files> ++ <Globals> ++ </Globals> ++</VisualStudioProject> +Index: CEGUI_TheoraDemo/scripts/VC8_FMOD_MOD.vcproj +=================================================================== +--- CEGUI_TheoraDemo/scripts/VC8_FMOD_MOD.vcproj (revision 2450) ++++ CEGUI_TheoraDemo/scripts/VC8_FMOD_MOD.vcproj (working copy) +@@ -1,204 +1,203 @@ +-<?xml version="1.0" encoding="Windows-1252"?> +-<VisualStudioProject +- ProjectType="Visual C++" +- Version="8,00" +- Name="AUDIO_Fmod" +- ProjectGUID="{74DDB799-AD94-42F2-A99C-B89EA8A01AD9}" +- Keyword="Win32Proj" +- > +- <Platforms> +- <Platform +- Name="Win32" +- /> +- </Platforms> +- <ToolFiles> +- </ToolFiles> +- <Configurations> +- <Configuration +- Name="Debug|Win32" +- OutputDirectory="fmoddebug" +- IntermediateDirectory="fmoddebug" +- ConfigurationType="2" +- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops" +- CharacterSet="2" +- > +- <Tool +- Name="VCPreBuildEventTool" +- /> +- <Tool +- Name="VCCustomBuildTool" +- /> +- <Tool +- Name="VCXMLDataGeneratorTool" +- /> +- <Tool +- Name="VCWebServiceProxyGeneratorTool" +- /> +- <Tool +- Name="VCMIDLTool" +- /> +- <Tool +- Name="VCCLCompilerTool" +- Optimization="0" +- AdditionalIncludeDirectories="..\..\TheoraVideo\include;..\include;..\..\..\..\ogrenew\OgreMain\include;..\..\theora\include;"..\..\ptypes-1.8.3\include";..\..\..\..\ogrenew\Samples\Common\CEGUIRenderer\include;..\..\..\..\ogrenew\Dependencies\include" +- PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;FMOD_MOD_EXPORTS;_STLP_DEBUG" +- MinimalRebuild="true" +- BasicRuntimeChecks="3" +- RuntimeLibrary="3" +- UsePrecompiledHeader="0" +- ObjectFile="FmodDebug/" +- ProgramDataBaseFileName="FmodDebug/vc70.pdb" +- WarningLevel="3" +- Detect64BitPortabilityProblems="true" +- DebugInformationFormat="4" +- /> +- <Tool +- Name="VCManagedResourceCompilerTool" +- /> +- <Tool +- Name="VCResourceCompilerTool" +- /> +- <Tool +- Name="VCPreLinkEventTool" +- /> +- <Tool +- Name="VCLinkerTool" +- AdditionalDependencies="OgreMain_d.lib Plugin_TheoraVideoSystem.lib" +- OutputFile="../bin/Debug/FMOD_MOD.dll" +- LinkIncremental="2" +- AdditionalLibraryDirectories="..\..\TheoraVideo\bin\debug;..\..\..\..\ogrenew\ogremain\lib\debug;..\..\..\..\ogrenew\Dependencies\lib\Debug;..\..\..\..\ogrenew\Samples\Common\CEGUIRenderer\lib" +- GenerateDebugInformation="true" +- ProgramDatabaseFile="FmodDebug/FMOD_MOD.pdb" +- SubSystem="2" +- ImportLibrary="FmodDebug/FMOD_MOD.lib" +- TargetMachine="1" +- /> +- <Tool +- Name="VCALinkTool" +- /> +- <Tool +- Name="VCManifestTool" +- /> +- <Tool +- Name="VCXDCMakeTool" +- /> +- <Tool +- Name="VCBscMakeTool" +- /> +- <Tool +- Name="VCFxCopTool" +- /> +- <Tool +- Name="VCAppVerifierTool" +- /> +- <Tool +- Name="VCWebDeploymentTool" +- /> +- <Tool +- Name="VCPostBuildEventTool" +- /> +- </Configuration> +- <Configuration +- Name="Release|Win32" +- OutputDirectory="fmodrelease" +- IntermediateDirectory="fmodrelease" +- ConfigurationType="2" +- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops" +- CharacterSet="2" +- > +- <Tool +- Name="VCPreBuildEventTool" +- /> +- <Tool +- Name="VCCustomBuildTool" +- /> +- <Tool +- Name="VCXMLDataGeneratorTool" +- /> +- <Tool +- Name="VCWebServiceProxyGeneratorTool" +- /> +- <Tool +- Name="VCMIDLTool" +- /> +- <Tool +- Name="VCCLCompilerTool" +- Optimization="2" +- InlineFunctionExpansion="1" +- OmitFramePointers="true" +- AdditionalIncludeDirectories="..\..\TheoraVideo\include;..\include;..\..\..\..\ogrenew\OgreMain\include;..\..\theora\include;"..\..\ptypes-1.8.3\include";..\..\..\..\ogrenew\Samples\Common\CEGUIRenderer\include;..\..\..\..\ogrenew\Dependencies\include" +- PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;FMOD_MOD_EXPORTS" +- StringPooling="true" +- RuntimeLibrary="2" +- EnableFunctionLevelLinking="true" +- UsePrecompiledHeader="0" +- ObjectFile="FmodRelease/" +- ProgramDataBaseFileName="FmodRelease/vc70.pdb" +- WarningLevel="3" +- Detect64BitPortabilityProblems="true" +- DebugInformationFormat="3" +- /> +- <Tool +- Name="VCManagedResourceCompilerTool" +- /> +- <Tool +- Name="VCResourceCompilerTool" +- /> +- <Tool +- Name="VCPreLinkEventTool" +- /> +- <Tool +- Name="VCLinkerTool" +- AdditionalDependencies="OgreMain.lib Plugin_TheoraVideoSystem.lib" +- OutputFile="../bin/Release/FMOD_MOD.dll" +- LinkIncremental="1" +- AdditionalLibraryDirectories="..\..\TheoraVideo\bin\release;..\..\..\..\ogrenew\ogremain\lib\release" +- GenerateDebugInformation="true" +- ProgramDatabaseFile="FmodRelease/$(ProjectName).pdb" +- SubSystem="2" +- OptimizeReferences="2" +- EnableCOMDATFolding="2" +- ImportLibrary="FmodRelease/FMOD_MOD.lib" +- TargetMachine="1" +- /> +- <Tool +- Name="VCALinkTool" +- /> +- <Tool +- Name="VCManifestTool" +- /> +- <Tool +- Name="VCXDCMakeTool" +- /> +- <Tool +- Name="VCBscMakeTool" +- /> +- <Tool +- Name="VCFxCopTool" +- /> +- <Tool +- Name="VCAppVerifierTool" +- /> +- <Tool +- Name="VCWebDeploymentTool" +- /> +- <Tool +- Name="VCPostBuildEventTool" +- /> +- </Configuration> +- </Configurations> +- <References> +- </References> +- <Files> +- <File +- RelativePath="..\src\SoundModules\FmodSoundModule.cpp" +- > +- </File> +- <File +- RelativePath="..\src\SoundModules\FmodSoundModule.h" +- > +- </File> +- </Files> +- <Globals> +- </Globals> +-</VisualStudioProject> ++<?xml version="1.0" encoding="Windows-1252"?> ++<VisualStudioProject ++ ProjectType="Visual C++" ++ Version="9.00" ++ Name="AUDIO_Fmod" ++ ProjectGUID="{74DDB799-AD94-42F2-A99C-B89EA8A01AD9}" ++ Keyword="Win32Proj" ++ TargetFrameworkVersion="131072" ++ > ++ <Platforms> ++ <Platform ++ Name="Win32" ++ /> ++ </Platforms> ++ <ToolFiles> ++ </ToolFiles> ++ <Configurations> ++ <Configuration ++ Name="Debug|Win32" ++ OutputDirectory="fmoddebug" ++ IntermediateDirectory="fmoddebug" ++ ConfigurationType="2" ++ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops" ++ CharacterSet="2" ++ > ++ <Tool ++ Name="VCPreBuildEventTool" ++ /> ++ <Tool ++ Name="VCCustomBuildTool" ++ /> ++ <Tool ++ Name="VCXMLDataGeneratorTool" ++ /> ++ <Tool ++ Name="VCWebServiceProxyGeneratorTool" ++ /> ++ <Tool ++ Name="VCMIDLTool" ++ /> ++ <Tool ++ Name="VCCLCompilerTool" ++ Optimization="0" ++ AdditionalIncludeDirectories="..\..\TheoraVideo\include;..\include;..\..\..\..\ogrenew\OgreMain\include;..\..\theora\include;"..\..\ptypes-1.8.3\include";..\..\..\..\ogrenew\Samples\Common\CEGUIRenderer\include;..\..\..\..\ogrenew\Dependencies\include" ++ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;FMOD_MOD_EXPORTS;_STLP_DEBUG" ++ MinimalRebuild="true" ++ BasicRuntimeChecks="3" ++ RuntimeLibrary="3" ++ UsePrecompiledHeader="0" ++ ObjectFile="FmodDebug/" ++ ProgramDataBaseFileName="FmodDebug/vc70.pdb" ++ WarningLevel="3" ++ Detect64BitPortabilityProblems="true" ++ DebugInformationFormat="4" ++ /> ++ <Tool ++ Name="VCManagedResourceCompilerTool" ++ /> ++ <Tool ++ Name="VCResourceCompilerTool" ++ /> ++ <Tool ++ Name="VCPreLinkEventTool" ++ /> ++ <Tool ++ Name="VCLinkerTool" ++ AdditionalDependencies="OgreMain_d.lib Plugin_TheoraVideoSystem.lib" ++ OutputFile="../bin/Debug/FMOD_MOD.dll" ++ LinkIncremental="2" ++ AdditionalLibraryDirectories="..\..\TheoraVideo\bin\debug;..\..\..\..\ogrenew\ogremain\lib\debug;..\..\..\..\ogrenew\Dependencies\lib\Debug;..\..\..\..\ogrenew\Samples\Common\CEGUIRenderer\lib" ++ GenerateDebugInformation="true" ++ ProgramDatabaseFile="FmodDebug/FMOD_MOD.pdb" ++ SubSystem="2" ++ RandomizedBaseAddress="1" ++ DataExecutionPrevention="0" ++ ImportLibrary="FmodDebug/FMOD_MOD.lib" ++ TargetMachine="1" ++ /> ++ <Tool ++ Name="VCALinkTool" ++ /> ++ <Tool ++ Name="VCManifestTool" ++ /> ++ <Tool ++ Name="VCXDCMakeTool" ++ /> ++ <Tool ++ Name="VCBscMakeTool" ++ /> ++ <Tool ++ Name="VCFxCopTool" ++ /> ++ <Tool ++ Name="VCAppVerifierTool" ++ /> ++ <Tool ++ Name="VCPostBuildEventTool" ++ /> ++ </Configuration> ++ <Configuration ++ Name="Release|Win32" ++ OutputDirectory="fmodrelease" ++ IntermediateDirectory="fmodrelease" ++ ConfigurationType="2" ++ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops" ++ CharacterSet="2" ++ > ++ <Tool ++ Name="VCPreBuildEventTool" ++ /> ++ <Tool ++ Name="VCCustomBuildTool" ++ /> ++ <Tool ++ Name="VCXMLDataGeneratorTool" ++ /> ++ <Tool ++ Name="VCWebServiceProxyGeneratorTool" ++ /> ++ <Tool ++ Name="VCMIDLTool" ++ /> ++ <Tool ++ Name="VCCLCompilerTool" ++ Optimization="2" ++ InlineFunctionExpansion="1" ++ OmitFramePointers="true" ++ AdditionalIncludeDirectories="c:\development\vorbis\include;c:\development\ogg\include;"c:\development\FMOD SoundSystem\FMOD Programmers API Win32\api\inc";..\..\..\..\theora\include;..\..\TheoraVideo\include;..\include;..\..\..\..\ogre\OgreMain\include;"..\..\ptypes-1.8.3\include";..\..\..\..\ogre\Samples\Common\CEGUIRenderer\include;..\..\..\..\ogre\Dependencies\include" ++ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;FMOD_MOD_EXPORTS" ++ StringPooling="true" ++ RuntimeLibrary="2" ++ EnableFunctionLevelLinking="true" ++ UsePrecompiledHeader="0" ++ ObjectFile="FmodRelease/" ++ ProgramDataBaseFileName="FmodRelease/vc70.pdb" ++ WarningLevel="3" ++ Detect64BitPortabilityProblems="true" ++ DebugInformationFormat="3" ++ /> ++ <Tool ++ Name="VCManagedResourceCompilerTool" ++ /> ++ <Tool ++ Name="VCResourceCompilerTool" ++ /> ++ <Tool ++ Name="VCPreLinkEventTool" ++ /> ++ <Tool ++ Name="VCLinkerTool" ++ AdditionalDependencies="OgreMain.lib Plugin_TheoraVideoSystem.lib" ++ OutputFile="../bin/Release/FMOD_MOD.dll" ++ LinkIncremental="1" ++ AdditionalLibraryDirectories="..\..\TheoraVideo\bin\release;..\..\..\..\ogre\lib" ++ GenerateDebugInformation="true" ++ ProgramDatabaseFile="FmodRelease/$(ProjectName).pdb" ++ SubSystem="2" ++ OptimizeReferences="2" ++ EnableCOMDATFolding="2" ++ RandomizedBaseAddress="1" ++ DataExecutionPrevention="0" ++ ImportLibrary="FmodRelease/FMOD_MOD.lib" ++ TargetMachine="1" ++ /> ++ <Tool ++ Name="VCALinkTool" ++ /> ++ <Tool ++ Name="VCManifestTool" ++ /> ++ <Tool ++ Name="VCXDCMakeTool" ++ /> ++ <Tool ++ Name="VCBscMakeTool" ++ /> ++ <Tool ++ Name="VCFxCopTool" ++ /> ++ <Tool ++ Name="VCAppVerifierTool" ++ /> ++ <Tool ++ Name="VCPostBuildEventTool" ++ /> ++ </Configuration> ++ </Configurations> ++ <References> ++ </References> ++ <Files> ++ <File ++ RelativePath="..\src\SoundModules\FmodSoundModule.cpp" ++ > ++ </File> ++ <File ++ RelativePath="..\src\SoundModules\FmodSoundModule.h" ++ > ++ </File> ++ </Files> ++ <Globals> ++ </Globals> ++</VisualStudioProject> +Index: CEGUI_TheoraDemo/scripts/VC8_OAL_MOD.vcproj +=================================================================== +--- CEGUI_TheoraDemo/scripts/VC8_OAL_MOD.vcproj (revision 2450) ++++ CEGUI_TheoraDemo/scripts/VC8_OAL_MOD.vcproj (working copy) +@@ -1,204 +1,203 @@ +-<?xml version="1.0" encoding="Windows-1252"?> +-<VisualStudioProject +- ProjectType="Visual C++" +- Version="8,00" +- Name="AUDIO_OpenAL" +- ProjectGUID="{74DDB799-AD94-42F2-A99C-B89EA4A01AD9}" +- Keyword="Win32Proj" +- > +- <Platforms> +- <Platform +- Name="Win32" +- /> +- </Platforms> +- <ToolFiles> +- </ToolFiles> +- <Configurations> +- <Configuration +- Name="Debug|Win32" +- OutputDirectory="oaldebug" +- IntermediateDirectory="oaldebug" +- ConfigurationType="2" +- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops" +- CharacterSet="2" +- > +- <Tool +- Name="VCPreBuildEventTool" +- /> +- <Tool +- Name="VCCustomBuildTool" +- /> +- <Tool +- Name="VCXMLDataGeneratorTool" +- /> +- <Tool +- Name="VCWebServiceProxyGeneratorTool" +- /> +- <Tool +- Name="VCMIDLTool" +- /> +- <Tool +- Name="VCCLCompilerTool" +- Optimization="0" +- AdditionalIncludeDirectories="..\..\TheoraVideo\include;..\include;..\..\..\..\ogrenew\OgreMain\include;..\..\theora\include;"..\..\ptypes-1.8.3\include";..\..\..\..\ogrenew\Samples\Common\CEGUIRenderer\include;..\..\..\..\ogrenew\Dependencies\include" +- PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;OAL_MOD_EXPORTS;_STLP_DEBUG" +- MinimalRebuild="true" +- BasicRuntimeChecks="3" +- RuntimeLibrary="3" +- UsePrecompiledHeader="0" +- ObjectFile="oalDebug/" +- ProgramDataBaseFileName="oalDebug/vc70.pdb" +- WarningLevel="3" +- Detect64BitPortabilityProblems="true" +- DebugInformationFormat="4" +- /> +- <Tool +- Name="VCManagedResourceCompilerTool" +- /> +- <Tool +- Name="VCResourceCompilerTool" +- /> +- <Tool +- Name="VCPreLinkEventTool" +- /> +- <Tool +- Name="VCLinkerTool" +- AdditionalDependencies="OgreMain_d.lib Plugin_TheoraVideoSystem.lib OpenAL32.lib" +- OutputFile="../bin/Debug/OAL_MOD.dll" +- LinkIncremental="2" +- AdditionalLibraryDirectories="..\..\TheoraVideo\bin\debug;..\..\..\..\ogrenew\ogremain\lib\debug;..\..\..\..\ogrenew\Dependencies\lib\Debug;..\..\..\..\ogrenew\Samples\Common\CEGUIRenderer\lib" +- GenerateDebugInformation="true" +- ProgramDatabaseFile="oalDebug/OAL_MOD.pdb" +- SubSystem="2" +- ImportLibrary="oalDebug/OAL_MOD.lib" +- TargetMachine="1" +- /> +- <Tool +- Name="VCALinkTool" +- /> +- <Tool +- Name="VCManifestTool" +- /> +- <Tool +- Name="VCXDCMakeTool" +- /> +- <Tool +- Name="VCBscMakeTool" +- /> +- <Tool +- Name="VCFxCopTool" +- /> +- <Tool +- Name="VCAppVerifierTool" +- /> +- <Tool +- Name="VCWebDeploymentTool" +- /> +- <Tool +- Name="VCPostBuildEventTool" +- /> +- </Configuration> +- <Configuration +- Name="Release|Win32" +- OutputDirectory="oalrelease" +- IntermediateDirectory="oalrelease" +- ConfigurationType="2" +- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops" +- CharacterSet="2" +- > +- <Tool +- Name="VCPreBuildEventTool" +- /> +- <Tool +- Name="VCCustomBuildTool" +- /> +- <Tool +- Name="VCXMLDataGeneratorTool" +- /> +- <Tool +- Name="VCWebServiceProxyGeneratorTool" +- /> +- <Tool +- Name="VCMIDLTool" +- /> +- <Tool +- Name="VCCLCompilerTool" +- Optimization="2" +- InlineFunctionExpansion="1" +- OmitFramePointers="true" +- AdditionalIncludeDirectories="..\..\TheoraVideo\include;..\include;..\..\..\..\ogrenew\OgreMain\include;..\..\theora\include;"..\..\ptypes-1.8.3\include";..\..\..\..\ogrenew\Samples\Common\CEGUIRenderer\include;..\..\..\..\ogrenew\Dependencies\include" +- PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;OAL_MOD_EXPORTS" +- StringPooling="true" +- RuntimeLibrary="2" +- EnableFunctionLevelLinking="true" +- UsePrecompiledHeader="0" +- ObjectFile="oalRelease/" +- ProgramDataBaseFileName="oalRelease/vc70.pdb" +- WarningLevel="3" +- Detect64BitPortabilityProblems="true" +- DebugInformationFormat="3" +- /> +- <Tool +- Name="VCManagedResourceCompilerTool" +- /> +- <Tool +- Name="VCResourceCompilerTool" +- /> +- <Tool +- Name="VCPreLinkEventTool" +- /> +- <Tool +- Name="VCLinkerTool" +- AdditionalDependencies="OgreMain.lib Plugin_TheoraVideoSystem.lib OpenAL32.lib" +- OutputFile="../bin/Release/OAL_MOD.dll" +- LinkIncremental="1" +- AdditionalLibraryDirectories="..\..\TheoraVideo\bin\release;..\..\..\..\ogrenew\ogremain\lib\release" +- GenerateDebugInformation="true" +- ProgramDatabaseFile="oalRelease/$(ProjectName).pdb" +- SubSystem="2" +- OptimizeReferences="2" +- EnableCOMDATFolding="2" +- ImportLibrary="oalRelease/OAL_MOD.lib" +- TargetMachine="1" +- /> +- <Tool +- Name="VCALinkTool" +- /> +- <Tool +- Name="VCManifestTool" +- /> +- <Tool +- Name="VCXDCMakeTool" +- /> +- <Tool +- Name="VCBscMakeTool" +- /> +- <Tool +- Name="VCFxCopTool" +- /> +- <Tool +- Name="VCAppVerifierTool" +- /> +- <Tool +- Name="VCWebDeploymentTool" +- /> +- <Tool +- Name="VCPostBuildEventTool" +- /> +- </Configuration> +- </Configurations> +- <References> +- </References> +- <Files> +- <File +- RelativePath="..\src\SoundModules\OpenALSoundIO.cpp" +- > +- </File> +- <File +- RelativePath="..\src\SoundModules\OpenALSoundIO.h" +- > +- </File> +- </Files> +- <Globals> +- </Globals> +-</VisualStudioProject> ++<?xml version="1.0" encoding="Windows-1252"?> ++<VisualStudioProject ++ ProjectType="Visual C++" ++ Version="9.00" ++ Name="AUDIO_OpenAL" ++ ProjectGUID="{74DDB799-AD94-42F2-A99C-B89EA4A01AD9}" ++ Keyword="Win32Proj" ++ TargetFrameworkVersion="131072" ++ > ++ <Platforms> ++ <Platform ++ Name="Win32" ++ /> ++ </Platforms> ++ <ToolFiles> ++ </ToolFiles> ++ <Configurations> ++ <Configuration ++ Name="Debug|Win32" ++ OutputDirectory="oaldebug" ++ IntermediateDirectory="oaldebug" ++ ConfigurationType="2" ++ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops" ++ CharacterSet="2" ++ > ++ <Tool ++ Name="VCPreBuildEventTool" ++ /> ++ <Tool ++ Name="VCCustomBuildTool" ++ /> ++ <Tool ++ Name="VCXMLDataGeneratorTool" ++ /> ++ <Tool ++ Name="VCWebServiceProxyGeneratorTool" ++ /> ++ <Tool ++ Name="VCMIDLTool" ++ /> ++ <Tool ++ Name="VCCLCompilerTool" ++ Optimization="0" ++ AdditionalIncludeDirectories="..\..\TheoraVideo\include;..\include;..\..\..\..\ogrenew\OgreMain\include;..\..\theora\include;"..\..\ptypes-1.8.3\include";..\..\..\..\ogrenew\Samples\Common\CEGUIRenderer\include;..\..\..\..\ogrenew\Dependencies\include" ++ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;OAL_MOD_EXPORTS;_STLP_DEBUG" ++ MinimalRebuild="true" ++ BasicRuntimeChecks="3" ++ RuntimeLibrary="3" ++ UsePrecompiledHeader="0" ++ ObjectFile="oalDebug/" ++ ProgramDataBaseFileName="oalDebug/vc70.pdb" ++ WarningLevel="3" ++ Detect64BitPortabilityProblems="true" ++ DebugInformationFormat="4" ++ /> ++ <Tool ++ Name="VCManagedResourceCompilerTool" ++ /> ++ <Tool ++ Name="VCResourceCompilerTool" ++ /> ++ <Tool ++ Name="VCPreLinkEventTool" ++ /> ++ <Tool ++ Name="VCLinkerTool" ++ AdditionalDependencies="OgreMain_d.lib Plugin_TheoraVideoSystem.lib OpenAL32.lib" ++ OutputFile="../bin/Debug/OAL_MOD.dll" ++ LinkIncremental="2" ++ AdditionalLibraryDirectories="..\..\TheoraVideo\bin\debug;..\..\..\..\ogrenew\ogremain\lib\debug;..\..\..\..\ogrenew\Dependencies\lib\Debug;..\..\..\..\ogrenew\Samples\Common\CEGUIRenderer\lib" ++ GenerateDebugInformation="true" ++ ProgramDatabaseFile="oalDebug/OAL_MOD.pdb" ++ SubSystem="2" ++ RandomizedBaseAddress="1" ++ DataExecutionPrevention="0" ++ ImportLibrary="oalDebug/OAL_MOD.lib" ++ TargetMachine="1" ++ /> ++ <Tool ++ Name="VCALinkTool" ++ /> ++ <Tool ++ Name="VCManifestTool" ++ /> ++ <Tool ++ Name="VCXDCMakeTool" ++ /> ++ <Tool ++ Name="VCBscMakeTool" ++ /> ++ <Tool ++ Name="VCFxCopTool" ++ /> ++ <Tool ++ Name="VCAppVerifierTool" ++ /> ++ <Tool ++ Name="VCPostBuildEventTool" ++ /> ++ </Configuration> ++ <Configuration ++ Name="Release|Win32" ++ OutputDirectory="oalrelease" ++ IntermediateDirectory="oalrelease" ++ ConfigurationType="2" ++ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops" ++ CharacterSet="2" ++ > ++ <Tool ++ Name="VCPreBuildEventTool" ++ /> ++ <Tool ++ Name="VCCustomBuildTool" ++ /> ++ <Tool ++ Name="VCXMLDataGeneratorTool" ++ /> ++ <Tool ++ Name="VCWebServiceProxyGeneratorTool" ++ /> ++ <Tool ++ Name="VCMIDLTool" ++ /> ++ <Tool ++ Name="VCCLCompilerTool" ++ Optimization="2" ++ InlineFunctionExpansion="1" ++ OmitFramePointers="true" ++ AdditionalIncludeDirectories="\development\openal\include;\development\vorbis\include;\development\ogg\include;..\..\TheoraVideo\include;..\include;..\..\..\..\ogre\OgreMain\include;..\..\..\..\theora\include;"..\..\ptypes-1.8.3\include";..\..\..\..\ogre\Samples\Common\CEGUIRenderer\include;..\..\..\..\ogre\Dependencies\include" ++ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;OAL_MOD_EXPORTS" ++ StringPooling="true" ++ RuntimeLibrary="2" ++ EnableFunctionLevelLinking="true" ++ UsePrecompiledHeader="0" ++ ObjectFile="oalRelease/" ++ ProgramDataBaseFileName="oalRelease/vc70.pdb" ++ WarningLevel="3" ++ Detect64BitPortabilityProblems="true" ++ DebugInformationFormat="3" ++ /> ++ <Tool ++ Name="VCManagedResourceCompilerTool" ++ /> ++ <Tool ++ Name="VCResourceCompilerTool" ++ /> ++ <Tool ++ Name="VCPreLinkEventTool" ++ /> ++ <Tool ++ Name="VCLinkerTool" ++ AdditionalDependencies="OgreMain.lib Plugin_TheoraVideoSystem.lib OpenAL32.lib" ++ OutputFile="../bin/Release/OAL_MOD.dll" ++ LinkIncremental="1" ++ AdditionalLibraryDirectories="c:\development\openal\libs\Win32;..\..\TheoraVideo\bin\release;..\..\..\..\ogre\lib\" ++ GenerateDebugInformation="true" ++ ProgramDatabaseFile="oalRelease/$(ProjectName).pdb" ++ SubSystem="2" ++ OptimizeReferences="2" ++ EnableCOMDATFolding="2" ++ RandomizedBaseAddress="1" ++ DataExecutionPrevention="0" ++ ImportLibrary="oalRelease/OAL_MOD.lib" ++ TargetMachine="1" ++ /> ++ <Tool ++ Name="VCALinkTool" ++ /> ++ <Tool ++ Name="VCManifestTool" ++ /> ++ <Tool ++ Name="VCXDCMakeTool" ++ /> ++ <Tool ++ Name="VCBscMakeTool" ++ /> ++ <Tool ++ Name="VCFxCopTool" ++ /> ++ <Tool ++ Name="VCAppVerifierTool" ++ /> ++ <Tool ++ Name="VCPostBuildEventTool" ++ /> ++ </Configuration> ++ </Configurations> ++ <References> ++ </References> ++ <Files> ++ <File ++ RelativePath="..\src\SoundModules\OpenALSoundIO.cpp" ++ > ++ </File> ++ <File ++ RelativePath="..\src\SoundModules\OpenALSoundIO.h" ++ > ++ </File> ++ </Files> ++ <Globals> ++ </Globals> ++</VisualStudioProject> +Index: CEGUI_TheoraDemo/src/SoundModules/OpenALSoundIO.cpp +=================================================================== +--- CEGUI_TheoraDemo/src/SoundModules/OpenALSoundIO.cpp (revision 2450) ++++ CEGUI_TheoraDemo/src/SoundModules/OpenALSoundIO.cpp (working copy) +@@ -3,7 +3,7 @@ + #include "OgreRoot.h" + #include "OgreTimer.h" + #include "OgreLogManager.h" +-#include "OgrePlatformManager.h" ++//#include "OgrePlatformManager.h" + #include "OgreRoot.h" + + using namespace Ogre; +@@ -39,7 +39,7 @@ + //-----------------------------------------------------------------------// + void OpenALSoundManager::start() + { +- mSoundDevice = alcOpenDevice((ALCubyte*)"DirectSound3D"); ++ mSoundDevice = alcOpenDevice((ALCchar*)"DirectSound3D"); + mSoundContext = alcCreateContext(mSoundDevice, NULL); + alcMakeContextCurrent( mSoundContext ); + } +@@ -59,14 +59,14 @@ + pauseTimeAdjustmentStop = 0; + pauseTimeAdjustmentTotal = 0; + +- mTimer = Ogre::PlatformManager::getSingleton().createTimer(); ++ mTimer = new Ogre::Timer(); + } + + + //-----------------------------------------------------------------------// + AudioClip::~AudioClip() + { +- Ogre::PlatformManager::getSingleton().destroyTimer( mTimer ); ++ delete mTimer; + delete [] mAudioBuffer; + } + +Index: CEGUI_TheoraDemo/src/SoundModules/FmodSoundModule.h +=================================================================== +--- CEGUI_TheoraDemo/src/SoundModules/FmodSoundModule.h (revision 2450) ++++ CEGUI_TheoraDemo/src/SoundModules/FmodSoundModule.h (working copy) +@@ -13,7 +13,7 @@ + LGPL like the rest of the engine. + ----------------------------------------------------------------------------- + */ +-#include "fmoddyn.h" ++#include "fmod.h" + #include "SoundManager.h" + + #if defined(_WINDOWS) || defined(WIN32) +Index: TheoraVideo/scripts/VC8_TheoraVideo.sln +=================================================================== +--- TheoraVideo/scripts/VC8_TheoraVideo.sln (revision 2450) ++++ TheoraVideo/scripts/VC8_TheoraVideo.sln (working copy) +@@ -1,56 +1,48 @@ +-Microsoft Visual Studio Solution File, Format Version 9.00 +-# Visual C++ Express 2005 +-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PTypes_Lib", "..\..\ptypes-1.8.3\win32\VC8_PTypes_Lib.vcproj", "{8D0E0535-B27C-42D9-83AA-9A0FDBB53C1E}" +-EndProject +-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TheoraVideo", "VC8_TheoraVideo.vcproj", "{388E4B0F-0860-40C7-8530-FD6F79E7AB3E}" +- ProjectSection(ProjectDependencies) = postProject +- {33AD57E0-0222-4F53-9BF6-44DA1B6D8B8A} = {33AD57E0-0222-4F53-9BF6-44DA1B6D8B8A} +- {8D0E0535-B27C-42D9-83AA-9A0FDBB53C1E} = {8D0E0535-B27C-42D9-83AA-9A0FDBB53C1E} +- EndProjectSection +-EndProject +-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "theora_static", "..\..\theora\win32\VC8_theora_static.vcproj", "{33AD57E0-0222-4F53-9BF6-44DA1B6D8B8A}" +-EndProject +-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GuiTesting", "..\..\CEGUI_TheoraDemo\scripts\VC8_GuiTesting.vcproj", "{F71CD603-13C3-4131-9E5B-9FC319C01C51}" +- ProjectSection(ProjectDependencies) = postProject +- {388E4B0F-0860-40C7-8530-FD6F79E7AB3E} = {388E4B0F-0860-40C7-8530-FD6F79E7AB3E} +- EndProjectSection +-EndProject +-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AUDIO_OpenAL", "..\..\CEGUI_TheoraDemo\scripts\VC8_OAL_MOD.vcproj", "{74DDB799-AD94-42F2-A99C-B89EA4A01AD9}" +-EndProject +-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AUDIO_Fmod", "..\..\CEGUI_TheoraDemo\scripts\VC8_FMOD_MOD.vcproj", "{74DDB799-AD94-42F2-A99C-B89EA8A01AD9}" +-EndProject +-Global +- GlobalSection(SolutionConfigurationPlatforms) = preSolution +- Debug|Win32 = Debug|Win32 +- Release|Win32 = Release|Win32 +- EndGlobalSection +- GlobalSection(ProjectConfigurationPlatforms) = postSolution +- {8D0E0535-B27C-42D9-83AA-9A0FDBB53C1E}.Debug|Win32.ActiveCfg = Debug|Win32 +- {8D0E0535-B27C-42D9-83AA-9A0FDBB53C1E}.Debug|Win32.Build.0 = Debug|Win32 +- {8D0E0535-B27C-42D9-83AA-9A0FDBB53C1E}.Release|Win32.ActiveCfg = Release|Win32 +- {8D0E0535-B27C-42D9-83AA-9A0FDBB53C1E}.Release|Win32.Build.0 = Release|Win32 +- {388E4B0F-0860-40C7-8530-FD6F79E7AB3E}.Debug|Win32.ActiveCfg = Debug|Win32 +- {388E4B0F-0860-40C7-8530-FD6F79E7AB3E}.Debug|Win32.Build.0 = Debug|Win32 +- {388E4B0F-0860-40C7-8530-FD6F79E7AB3E}.Release|Win32.ActiveCfg = Release|Win32 +- {388E4B0F-0860-40C7-8530-FD6F79E7AB3E}.Release|Win32.Build.0 = Release|Win32 +- {33AD57E0-0222-4F53-9BF6-44DA1B6D8B8A}.Debug|Win32.ActiveCfg = Debug|Win32 +- {33AD57E0-0222-4F53-9BF6-44DA1B6D8B8A}.Debug|Win32.Build.0 = Debug|Win32 +- {33AD57E0-0222-4F53-9BF6-44DA1B6D8B8A}.Release|Win32.ActiveCfg = Release|Win32 +- {33AD57E0-0222-4F53-9BF6-44DA1B6D8B8A}.Release|Win32.Build.0 = Release|Win32 +- {F71CD603-13C3-4131-9E5B-9FC319C01C51}.Debug|Win32.ActiveCfg = Debug|Win32 +- {F71CD603-13C3-4131-9E5B-9FC319C01C51}.Debug|Win32.Build.0 = Debug|Win32 +- {F71CD603-13C3-4131-9E5B-9FC319C01C51}.Release|Win32.ActiveCfg = Release|Win32 +- {F71CD603-13C3-4131-9E5B-9FC319C01C51}.Release|Win32.Build.0 = Release|Win32 +- {74DDB799-AD94-42F2-A99C-B89EA4A01AD9}.Debug|Win32.ActiveCfg = Debug|Win32 +- {74DDB799-AD94-42F2-A99C-B89EA4A01AD9}.Debug|Win32.Build.0 = Debug|Win32 +- {74DDB799-AD94-42F2-A99C-B89EA4A01AD9}.Release|Win32.ActiveCfg = Release|Win32 +- {74DDB799-AD94-42F2-A99C-B89EA4A01AD9}.Release|Win32.Build.0 = Release|Win32 +- {74DDB799-AD94-42F2-A99C-B89EA8A01AD9}.Debug|Win32.ActiveCfg = Debug|Win32 +- {74DDB799-AD94-42F2-A99C-B89EA8A01AD9}.Debug|Win32.Build.0 = Debug|Win32 +- {74DDB799-AD94-42F2-A99C-B89EA8A01AD9}.Release|Win32.ActiveCfg = Release|Win32 +- {74DDB799-AD94-42F2-A99C-B89EA8A01AD9}.Release|Win32.Build.0 = Release|Win32 +- EndGlobalSection +- GlobalSection(SolutionProperties) = preSolution +- HideSolutionNode = FALSE +- EndGlobalSection +-EndGlobal ++Microsoft Visual Studio Solution File, Format Version 10.00 ++# Visual C++ Express 2008 ++Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PTypes_Lib", "..\..\ptypes-1.8.3\win32\VC8_PTypes_Lib.vcproj", "{8D0E0535-B27C-42D9-83AA-9A0FDBB53C1E}" ++EndProject ++Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TheoraVideo", "VC8_TheoraVideo.vcproj", "{388E4B0F-0860-40C7-8530-FD6F79E7AB3E}" ++ ProjectSection(ProjectDependencies) = postProject ++ {8D0E0535-B27C-42D9-83AA-9A0FDBB53C1E} = {8D0E0535-B27C-42D9-83AA-9A0FDBB53C1E} ++ EndProjectSection ++EndProject ++Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GuiTesting", "..\..\CEGUI_TheoraDemo\scripts\VC8_GuiTesting.vcproj", "{F71CD603-13C3-4131-9E5B-9FC319C01C51}" ++ ProjectSection(ProjectDependencies) = postProject ++ {388E4B0F-0860-40C7-8530-FD6F79E7AB3E} = {388E4B0F-0860-40C7-8530-FD6F79E7AB3E} ++ EndProjectSection ++EndProject ++Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AUDIO_OpenAL", "..\..\CEGUI_TheoraDemo\scripts\VC8_OAL_MOD.vcproj", "{74DDB799-AD94-42F2-A99C-B89EA4A01AD9}" ++EndProject ++Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AUDIO_Fmod", "..\..\CEGUI_TheoraDemo\scripts\VC8_FMOD_MOD.vcproj", "{74DDB799-AD94-42F2-A99C-B89EA8A01AD9}" ++EndProject ++Global ++ GlobalSection(SolutionConfigurationPlatforms) = preSolution ++ Debug|Win32 = Debug|Win32 ++ Release|Win32 = Release|Win32 ++ EndGlobalSection ++ GlobalSection(ProjectConfigurationPlatforms) = postSolution ++ {8D0E0535-B27C-42D9-83AA-9A0FDBB53C1E}.Debug|Win32.ActiveCfg = Debug|Win32 ++ {8D0E0535-B27C-42D9-83AA-9A0FDBB53C1E}.Debug|Win32.Build.0 = Debug|Win32 ++ {8D0E0535-B27C-42D9-83AA-9A0FDBB53C1E}.Release|Win32.ActiveCfg = Release|Win32 ++ {8D0E0535-B27C-42D9-83AA-9A0FDBB53C1E}.Release|Win32.Build.0 = Release|Win32 ++ {388E4B0F-0860-40C7-8530-FD6F79E7AB3E}.Debug|Win32.ActiveCfg = Debug|Win32 ++ {388E4B0F-0860-40C7-8530-FD6F79E7AB3E}.Debug|Win32.Build.0 = Debug|Win32 ++ {388E4B0F-0860-40C7-8530-FD6F79E7AB3E}.Release|Win32.ActiveCfg = Release|Win32 ++ {388E4B0F-0860-40C7-8530-FD6F79E7AB3E}.Release|Win32.Build.0 = Release|Win32 ++ {F71CD603-13C3-4131-9E5B-9FC319C01C51}.Debug|Win32.ActiveCfg = Debug|Win32 ++ {F71CD603-13C3-4131-9E5B-9FC319C01C51}.Debug|Win32.Build.0 = Debug|Win32 ++ {F71CD603-13C3-4131-9E5B-9FC319C01C51}.Release|Win32.ActiveCfg = Release|Win32 ++ {74DDB799-AD94-42F2-A99C-B89EA4A01AD9}.Debug|Win32.ActiveCfg = Debug|Win32 ++ {74DDB799-AD94-42F2-A99C-B89EA4A01AD9}.Debug|Win32.Build.0 = Debug|Win32 ++ {74DDB799-AD94-42F2-A99C-B89EA4A01AD9}.Release|Win32.ActiveCfg = Release|Win32 ++ {74DDB799-AD94-42F2-A99C-B89EA4A01AD9}.Release|Win32.Build.0 = Release|Win32 ++ {74DDB799-AD94-42F2-A99C-B89EA8A01AD9}.Debug|Win32.ActiveCfg = Debug|Win32 ++ {74DDB799-AD94-42F2-A99C-B89EA8A01AD9}.Debug|Win32.Build.0 = Debug|Win32 ++ {74DDB799-AD94-42F2-A99C-B89EA8A01AD9}.Release|Win32.ActiveCfg = Release|Win32 ++ {74DDB799-AD94-42F2-A99C-B89EA8A01AD9}.Release|Win32.Build.0 = Release|Win32 ++ EndGlobalSection ++ GlobalSection(SolutionProperties) = preSolution ++ HideSolutionNode = FALSE ++ EndGlobalSection ++EndGlobal +Index: TheoraVideo/scripts/VC8_TheoraVideo.vcproj +=================================================================== +--- TheoraVideo/scripts/VC8_TheoraVideo.vcproj (revision 2450) ++++ TheoraVideo/scripts/VC8_TheoraVideo.vcproj (working copy) +@@ -1,296 +1,303 @@ +-<?xml version="1.0" encoding="Windows-1252"?> +-<VisualStudioProject +- ProjectType="Visual C++" +- Version="8,00" +- Name="TheoraVideo" +- ProjectGUID="{388E4B0F-0860-40C7-8530-FD6F79E7AB3E}" +- > +- <Platforms> +- <Platform +- Name="Win32" +- /> +- </Platforms> +- <ToolFiles> +- </ToolFiles> +- <Configurations> +- <Configuration +- Name="Debug|Win32" +- OutputDirectory=".\..\bin\Debug" +- IntermediateDirectory=".\..\obj\Debug" +- ConfigurationType="2" +- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops" +- UseOfMFC="0" +- ATLMinimizesCRunTimeLibraryUsage="false" +- CharacterSet="2" +- > +- <Tool +- Name="VCPreBuildEventTool" +- CommandLine="mkdir ..\..\ptypes-1.8.3\include\ptypes,
copy ..\..\ptypes-1.8.3\include\*.h ..\..\ptypes-1.8.3\include\ptypes
" +- /> +- <Tool +- Name="VCCustomBuildTool" +- /> +- <Tool +- Name="VCXMLDataGeneratorTool" +- /> +- <Tool +- Name="VCWebServiceProxyGeneratorTool" +- /> +- <Tool +- Name="VCMIDLTool" +- PreprocessorDefinitions="_DEBUG" +- MkTypLibCompatible="true" +- SuppressStartupBanner="true" +- TargetEnvironment="1" +- TypeLibraryName=".\..\bin\Debug/TheoraVideo.tlb" +- /> +- <Tool +- Name="VCCLCompilerTool" +- Optimization="0" +- AdditionalIncludeDirectories="..\include\;..\..\..\..\ogrenew\OgreMain\include;..\..\theora\include;"..\..\ptypes-1.8.3\include"" +- PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;THEORAVIDEO_PLUGIN_EXPORTS;_STLP_DEBUG" +- BasicRuntimeChecks="3" +- RuntimeLibrary="3" +- PrecompiledHeaderFile=".\..\obj\Debug/TheoraVideo.pch" +- AssemblerListingLocation=".\..\obj\Debug/" +- ObjectFile=".\..\obj\Debug/" +- ProgramDataBaseFileName=".\..\obj\Debug/" +- BrowseInformation="1" +- WarningLevel="3" +- SuppressStartupBanner="true" +- DebugInformationFormat="4" +- CompileAs="0" +- /> +- <Tool +- Name="VCManagedResourceCompilerTool" +- /> +- <Tool +- Name="VCResourceCompilerTool" +- PreprocessorDefinitions="_DEBUG" +- Culture="1033" +- /> +- <Tool +- Name="VCPreLinkEventTool" +- /> +- <Tool +- Name="VCLinkerTool" +- AdditionalOptions="/MACHINE:I386" +- AdditionalDependencies="odbc32.lib odbccp32.lib ogremain_d.lib ptypes.lib theora_static_d.lib ogg_static_d.lib vorbis_static_d.lib" +- OutputFile="..\bin\debug/Plugin_TheoraVideoSystem.dll" +- LinkIncremental="2" +- SuppressStartupBanner="true" +- AdditionalLibraryDirectories="..\..\..\..\ogrenew\lib;"../../ptypes-1.8.3/Win32/Debug";../../theora/win32/Static_Debug" +- ModuleDefinitionFile="..\misc\TheoraVideoPlugin.def" +- GenerateDebugInformation="true" +- ProgramDatabaseFile=".\..\bin\Debug/Plugin_TheoraVideoSystem.pdb" +- ImportLibrary=".\..\bin\Debug/Plugin_TheoraVideoSystem.lib" +- /> +- <Tool +- Name="VCALinkTool" +- /> +- <Tool +- Name="VCManifestTool" +- /> +- <Tool +- Name="VCXDCMakeTool" +- /> +- <Tool +- Name="VCBscMakeTool" +- /> +- <Tool +- Name="VCFxCopTool" +- /> +- <Tool +- Name="VCAppVerifierTool... [truncated message content] |
From: <and...@us...> - 2008-06-22 11:58:54
|
Revision: 603 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=603&view=rev Author: andy_miller Date: 2008-06-22 04:59:01 -0700 (Sun, 22 Jun 2008) Log Message: ----------- NXOgre builds and compiles :) Modified Paths: -------------- trunk/python-ogre/ChangeLog.txt trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeTerrain.h trunk/python-ogre/code_generators/common_utils/extract_documentation.py trunk/python-ogre/code_generators/navi/python_navi_aliases.h trunk/python-ogre/code_generators/nxogre/customization_data.py trunk/python-ogre/code_generators/nxogre/generate_code.py trunk/python-ogre/code_generators/ogre/hand_made_wrappers.py trunk/python-ogre/environment.py Modified: trunk/python-ogre/ChangeLog.txt =================================================================== --- trunk/python-ogre/ChangeLog.txt 2008-06-22 06:25:12 UTC (rev 602) +++ trunk/python-ogre/ChangeLog.txt 2008-06-22 11:59:01 UTC (rev 603) @@ -1,3 +1,45 @@ +June 20 2008: Release 1.2 RC2 +=============================' +OK, so it's been a while -- what can I say, I have to live in the real world as well as the opensource one :) +There are some significant changes -- almost should be a 1.3 Rc1 release, however we'll stick with 1.2 + +One major issue to be aware of -- the binaries for Windows are based upon the latest SVN versions +of the underlying libraries - if you want Ogre 1.4 support you will need to build it yourself from the PythonOgre SVN. +So - while the PythonOgre SVN will continue to automatically support 'stable/released' versions of libraries I personally +am not going to make builds for these (as it doesn't keep my interest). Instead where possible everything will be based +on the latest and greatest underlying library code. + +***** ISSUES ***** +Some API's have changed -- Have a look at the Demo_Grass for one example (search for PythonOgreVersion). The +changes relate to where the underlying C++ function takes 'address references' as arguments and expects to modify +the variables at these locations. ie: + bool suggestTangentVectorBuildParams(VertexElementSemantic targetSemantic, + unsigned short& outSourceCoordSet, unsigned short& outIndex); +modifies inplace outSourceCoorSet and outIndex. This is something we fix when wrapping the library so you get a tupple +as a return from the function: + ret, src, dest = m.suggestTangentVectorBuildParams(ogre.VES_TANGENT,1,1) +In previous versions of PythonOgre you didn't need the 'dummy' arguments (in this example the '1,1') - however that meant +that some overloaded functions we not accesable, so now you have to obey the full C++ calling format. + +There are also some properties that are no longer exposed as they were breaking the wrappers in certain areas. These +were all 'additions' to the C++ library calls anyway so when in doubt look at the underlying library documentation.. +An example is + SceneManager.rootSceneNode.createChildSceneNode() will not longer work, +instead it has to read + SceneManager.getRootSceneNode().createChildSceneNode() + +***** Libraries Wrapped ***** + * OGRE 1.7 - SVN R7604 + * OIS 1.6 + * ODE 0.9 + * Physx (NVIDIA) 2.8.1 + * Bullet 2.69 + * QuickGGUI SVN R350 + + + and more :) + + Feb 19 2008: Release 1.2 RC1 ====================== ISSUES: Modified: trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeTerrain.h =================================================================== --- trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeTerrain.h 2008-06-22 06:25:12 UTC (rev 602) +++ trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeTerrain.h 2008-06-22 11:59:01 UTC (rev 603) @@ -2,20 +2,20 @@ * \brief Header for the Terrain class. * \version 1.0-21 * - * \licence NxOgre a wrapper for the PhysX physics library. - * Copyright (C) 2005-8 Robin Southern of NxOgre.org http://www.nxogre.org - * This library 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.1 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software + * \licence NxOgre a wrapper for the PhysX physics library. + * Copyright (C) 2005-8 Robin Southern of NxOgre.org http://www.nxogre.org + * This library 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.1 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -154,32 +154,31 @@ /** \brief Terrain Constructor; loading a resource to use as a terrain. */ - Terrain(const Resources::ResourceIdentifier&, float3 size, const ShapeParams& = ShapeParams(), const TerrainParams& = TerrainParams()); - - /** \brief Terrain Constructor; loading a resource to use as a terrain. - */ - Terrain(const Resources::ResourceIdentifier&, NxVec3 size, const ShapeParams& = ShapeParams(), const TerrainParams& = TerrainParams()); - -#if (NX_USE_OGRE == 1) - /** \brief Terrain Constructor; loading a resource to use as a terrain. - */ - Terrain(const Resources::ResourceIdentifier&, Ogre::Vector3 size, const ShapeParams& = ShapeParams(), const TerrainParams& = TerrainParams()); -#endif - +// Terrain(const Resources::ResourceIdentifier&, float3 size, const ShapeParams& = ShapeParams(), const TerrainParams& = TerrainParams()); +// // /** \brief Terrain Constructor; loading a resource to use as a terrain. +// // */ +// // Terrain(const Resources::ResourceIdentifier&, NxVec3 size, const ShapeParams& = ShapeParams(), const TerrainParams& = TerrainParams()); +// // +// // #if (NX_USE_OGRE == 1) +// // /** \brief Terrain Constructor; loading a resource to use as a terrain. +// // */ +// // Terrain(const Resources::ResourceIdentifier&, Ogre::Vector3 size, const ShapeParams& = ShapeParams(), const TerrainParams& = TerrainParams()); +// // #endif +// // /** \brief Terrain Constructor; using a direct terrain */ Terrain(Resources::Heightfield*, float3 size, const ShapeParams& = ShapeParams(), const TerrainParams& = TerrainParams()); +// // +// // /** \brief Terrain Constructor; using a direct terrain +// // */ +// // Terrain(Resources::Heightfield*, NxVec3 size, const ShapeParams& = ShapeParams(), const TerrainParams& = TerrainParams()); +// // +// // #if (NX_USE_OGRE == 1) +// // /** \brief Terrain Constructor; using a direct terrain +// // */ +// // Terrain(Resources::Heightfield*, Ogre::Vector3 size, const ShapeParams& = ShapeParams(), const TerrainParams& = TerrainParams()); +// // #endif - /** \brief Terrain Constructor; using a direct terrain - */ - Terrain(Resources::Heightfield*, NxVec3 size, const ShapeParams& = ShapeParams(), const TerrainParams& = TerrainParams()); - -#if (NX_USE_OGRE == 1) - /** \brief Terrain Constructor; using a direct terrain - */ - Terrain(Resources::Heightfield*, Ogre::Vector3 size, const ShapeParams& = ShapeParams(), const TerrainParams& = TerrainParams()); -#endif - /** \brief Terrain destructor */ ~Terrain(); Modified: trunk/python-ogre/code_generators/common_utils/extract_documentation.py =================================================================== --- trunk/python-ogre/code_generators/common_utils/extract_documentation.py 2008-06-22 06:25:12 UTC (rev 602) +++ trunk/python-ogre/code_generators/common_utils/extract_documentation.py 2008-06-22 11:59:01 UTC (rev 603) @@ -218,7 +218,10 @@ _str = clean(_str, "\\include", "Include: ") ## nxPhysics _str = clean(_str, "\\image", "Image: ") ## nxPhysics + _str = clean(_str, "\\examples", "Examples: ") ## nxOgre + _str = clean(_str, "\\default", "Default: ") ## nxOgre + ## now clean up the rest _str = reduce(clean, [_str, '/', '*', '!', "\\brief", '\\fn', "@brief", "@fn", '"', "@{", "\\c", "\\a"]) ## somtimes there are '"' in the doc strings and other "\\"... Modified: trunk/python-ogre/code_generators/navi/python_navi_aliases.h =================================================================== --- trunk/python-ogre/code_generators/navi/python_navi_aliases.h 2008-06-22 06:25:12 UTC (rev 602) +++ trunk/python-ogre/code_generators/navi/python_navi_aliases.h 2008-06-22 11:59:01 UTC (rev 603) @@ -6,3 +6,6 @@ typedef std::vector<std::string, std::allocator<std::string> > VectorString; // typedef NaviLibrary::NaviUtilities::InlineVector<std::string> InlineVectorStrings; typedef NaviLibrary::NaviUtilities::InlineVector<NaviLibrary::NaviUtilities::MultiValue> InlineVectorArgs; +typedef NaviLibrary::Singleton< NaviLibrary::NaviManager > SingletonManager; +typedef NaviLibrary::Singleton< NaviLibrary::NaviMouse > SingletonMouse; +typedef NaviLibrary::FastDelegate1< NaviLibrary::NaviData const&, void > FastDelegateNaviData; \ No newline at end of file Modified: trunk/python-ogre/code_generators/nxogre/customization_data.py =================================================================== --- trunk/python-ogre/code_generators/nxogre/customization_data.py 2008-06-22 06:25:12 UTC (rev 602) +++ trunk/python-ogre/code_generators/nxogre/customization_data.py 2008-06-22 11:59:01 UTC (rev 603) @@ -2,7 +2,6 @@ def header_files( version ): return [ 'NxOgre.h' ,'NxOgreSkeleton.h' - ,'NxOgreResourceMesh.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 2008-06-22 06:25:12 UTC (rev 602) +++ trunk/python-ogre/code_generators/nxogre/generate_code.py 2008-06-22 11:59:01 UTC (rev 603) @@ -157,26 +157,35 @@ ,'::NxOgre::WheelSet::turn' ,'::NxOgre::Material::setDirOfAnisotropy' ,'::NxOgre::OgreNodeRenderable::addSceneNode' -# ,'::NxOgre::ResourceStreamPtr::ResourceStreamPtr' ,'::NxOgre::MaterialAlias::generateConversionList' -# ,'::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::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::Actor::getCompartment' ,'::NxOgre::Shape::getSkeleton' -# ,'::NxOgre::Container< std::string, NxOgre::Cloth* >::begin' -# ,'::NxOgre::Container< std::string, NxOgre::Cloth* >::get' -# ,'::NxOgre::Container< std::string, NxOgre::Cloth* >::getFirst' -# ,'::NxOgre::Container< std::string, NxOgre::Cloth* >::next' -# ,'::NxOgre::Container< std::string, NxOgre::Cloth* >::CopyTo' + ,'::NxOgre::Resources::ResourceSystem::getCookingInterface' + ,'::NxOgre::ContactCallbackController::registerSimpleCallback' + ,'::NxOgre::ContactCallbackController::registerGroupCallback' + ,'::NxOgre::ForceFieldFunction::Tornado' + ,'::NxOgre::ForceFieldFunction::Explosion' + ,'::NxOgre::Resources::Heightfield::getReferenceCount' + ,'::NxOgre::Resources::ManualHeightfield::isValid' + ,'::NxOgre::Resources::ManualHeightfield::isNotValidReasons' + ,'::NxOgre::Resources::ManualMesh::material' + ,'::NxOgre::Resources::ManualMesh::getMaterialAlias' + ,'::NxOgre::Resources::ManualMesh::addMaterialAlias' + ,'::NxOgre::Resources::ManualMesh::isNotValidReasons' + ,'::NxOgre::Resources::MaterialAlias::save' + ,'::NxOgre::Resources::MaterialAlias::load' + ,'::NxOgre::Resources::Mesh::getType' + ,'::NxOgre::Resources::Mesh::getReferenceCount' + ,'::NxOgre::Resources::ResourceSystem::getMaterialAlias' + ,'::NxOgre::Resources::ResourceSystem::destroyMesh' + ,'::NxOgre::Resources::ResourceSystem::clearMesh' + ,'::NxOgre::Resources::ResourceSystem::clearMaterialAlais' + ,'::NxOgre::Resources::ResourceSystem::addMaterialAlias' + ,'::NxOgre::WheelSet::setBrakingTorque' + + ] for e in excludes: print "excluding ", e @@ -205,15 +214,14 @@ 'DistanceJoint' ## constructor issue TOFIX ,'JointCallback' ## also no suitable/defaul constructor TOFIX ,'Character' ## defined in header but not very much implementation -# ,'RenderableSource' ,'ResourceManager' ,'::NxOgre::Container< std::string, NxConvexMesh* >' # issue with deleting protected classes -# ,'ResourceStreamPtr' -# ,'::NxOgre::Blueprints::ActorFactory' -# ,'State' -# ,'MeshResource' -# ,'::NxOgre::Serialiser::SerialiserBase' -# ,'BlueprintUserData' + ,'::NxOgre::Functions::Triggers::AddedGravity' + ,'::NxOgre::Resources::ManualMeshUtil' + ,'::NxOgre::Terrain::Terrain' + ,'::NxOgre::Functions::Triggers::NoGravity' + ,'::NxOgre::Functions::Triggers::ReplacementGravity' + ,'::NxOgre::Functions::Triggers::MoveToPosition' ] for e in excludes: print "Excluding", e @@ -249,10 +257,13 @@ # # f.exclude() ### Variables - excludes = ['::NxOgre::WheelSet::mEngine' # desctuctor in WheelSet is protected so can't wrap this.. + excludes = [ ## '::NxOgre::WheelSet::mEngine' # desctuctor in WheelSet is protected so can't wrap this.. + '::NxOgre::Shape::mSkeleton' + ,'::NxOgre::ShapeParams::mCCDSkeleton' + ,'::NxOgre::WheelParams::mWheelContactCallback' ] -# for e in excludes: -# main_ns.variable(e).exclude() + for e in excludes: + main_ns.variable(e).exclude() ### Typedefs excludes = [ @@ -266,10 +277,13 @@ if o.decl_string.endswith('[]'): print "Excluding Operator: ", o o.exclude() + else: + print "Operator OK:",o excludes=['::NxOgre::Container<std::string, NxOgre::FluidDrain*>::operator[]' ,'::NxOgre::Container<std::string, NxOgre::FluidEmitter*>::operator[]' ,'::NxOgre::Container< std::string, NxOgre::Cloth* >::operator[]' ,'::NxOgre::Container< std::string, NxOgre::Fluid* >::operator[]' + ,'::NxOgre::Container< std::string, NxOgre::SoftBody* >::operator[]' ] for e in excludes: print "Excluding operator:", e Modified: trunk/python-ogre/code_generators/ogre/hand_made_wrappers.py =================================================================== --- trunk/python-ogre/code_generators/ogre/hand_made_wrappers.py 2008-06-22 06:25:12 UTC (rev 602) +++ trunk/python-ogre/code_generators/ogre/hand_made_wrappers.py 2008-06-22 11:59:01 UTC (rev 603) @@ -365,7 +365,7 @@ "\"" + environment.PythonOgrePatchVersion + "\"" ) ); } -## Duplicating to get lower case 'get' +// Duplicating to get lower case 'get' boost::python::tuple getOgreVersion () { return ( boost::python::make_tuple( Ogre::StringConverter::toString(OGRE_VERSION_MAJOR), Modified: trunk/python-ogre/environment.py =================================================================== --- trunk/python-ogre/environment.py 2008-06-22 06:25:12 UTC (rev 602) +++ trunk/python-ogre/environment.py 2008-06-22 11:59:01 UTC (rev 603) @@ -972,7 +972,7 @@ ,os.path.join(Config.PATH_navi,'..','Dependencies','win32','astral','lib') ] CheckIncludes=[] - libs=[ Config.LIB_Boost, 'Navi', 'OgreMain','Astral', 'user32', + libs=[ Config.LIB_Boost, 'Navi_DLL', 'OgreMain','Astral', 'user32', 'kernel32.lib', 'gdi32.lib', 'winspool.lib', 'comdlg32.lib', 'advapi32.lib', 'shell32.lib','ole32.lib','oleaut32.lib','uuid.lib' ] ModuleName="navi" @@ -1071,7 +1071,7 @@ CheckIncludes=[] # libs=[ Config.LIB_Boost, 'NxOgre','NxCharacter', 'NxCooking', 'NxExtensions', 'PhysXLoader','OgreMain' ] if os.name =='nt': - libs=[ Config.LIB_Boost, 'NxCharacter', 'NxCooking', 'PhysXLoader','OgreMain' , 'NxOgreStatic'] #'NxExtensions', + libs=[ Config.LIB_Boost, 'NxCharacter', 'NxCooking', 'PhysXLoader','OgreMain' ] #, 'NxOgreStatic'] #'NxExtensions', else: libs=[ Config.LIB_Boost, 'NxCharacter', 'NxCooking', 'PhysXCore','PhysXLoader','OgreMain' ] ModuleName="NxOgre" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2008-06-22 10:24:00
|
Revision: 600 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=600&view=rev Author: andy_miller Date: 2008-06-21 19:07:48 -0700 (Sat, 21 Jun 2008) Log Message: ----------- Removed dea files from nxogre Modified Paths: -------------- trunk/python-ogre/ThirdParty/nxogre/NxOgreContainer.h Removed Paths: ------------- trunk/python-ogre/ThirdParty/nxogre/NxOgreActorBlueprint.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreActorBlueprint.h trunk/python-ogre/ThirdParty/nxogre/NxOgreBlueprint.h trunk/python-ogre/ThirdParty/nxogre/NxOgreCompoundActorBlueprint.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreCompoundActorBlueprint.h trunk/python-ogre/ThirdParty/nxogre/NxOgreEnumsBlueprint.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreEnumsBlueprint.h trunk/python-ogre/ThirdParty/nxogre/NxOgreParametersBlueprint.h trunk/python-ogre/ThirdParty/nxogre/NxOgreSceneBlueprint.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreSceneBlueprint.h trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeBlueprint.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeBlueprint.h trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeBlueprintConvex.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeBlueprintConvex.h trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeBlueprintMesh.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeBlueprintMesh.h trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeBlueprintPrimitives.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeBlueprintPrimitives.h trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeBlueprintTerrain.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeBlueprintTerrain.h trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeBlueprintWheel.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeBlueprintWheel.h trunk/python-ogre/ThirdParty/nxogre/NxOgreWorldBlueprint.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreWorldBlueprint.h Deleted: trunk/python-ogre/ThirdParty/nxogre/NxOgreActorBlueprint.cpp =================================================================== --- trunk/python-ogre/ThirdParty/nxogre/NxOgreActorBlueprint.cpp 2008-06-20 06:57:55 UTC (rev 599) +++ trunk/python-ogre/ThirdParty/nxogre/NxOgreActorBlueprint.cpp 2008-06-22 02:07:48 UTC (rev 600) @@ -1,295 +0,0 @@ -// -// NxOgre a wrapper for the PhysX (formerly Novodex) physics library and the Ogre 3D rendering engine. -// Copyright (C) 2005 - 2007 Robin Southern and NxOgre.org http://www.nxogre.org -// -// This library 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.1 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 -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -// - -#include "NxOgreStable.h" -#include "NxOgreActorBlueprint.h" -#include "NxOgreSceneBlueprint.h" -#include "NxOgreEnumsBlueprint.h" -#include "NxOgreContainer.h" -#include "NxOgreActor.h" -#include "NxOgreBody.h" -#include "NxOgreScene.h" -#include "NxOgreShape.h" -#include "NxOgreShapeBlueprint.h" -#include "NxOgrePose.h" - -namespace NxOgre { -namespace Blueprints { - -//////////////////////////////////////////////////////////////////////////////////////////////// - -ActorBlueprint::ActorBlueprint() : - mFlags(EnumsBlueprint::FT_NxActorFlag), - mBodyFlags(EnumsBlueprint::FT_NxBodyFlag) -{ - -} - -//////////////////////////////////////////////////////////////////////////////////////////////// - -ActorBlueprint::~ActorBlueprint() { - empty(); -} - -//////////////////////////////////////////////////////////////////////////////////////////////// - -void ActorBlueprint::empty() { - - // Reset Descriptions - NxActorDesc desc; - desc.setToDefault(); - fromNxActorDesc(desc); - mBody = false; - - NxBodyDesc bdesc; - bdesc.setToDefault(); - fromNxBodyDesc(bdesc); - - // Clear shapes. - - mShapes.destroyAndEraseAll(); - -} - -//////////////////////////////////////////////////////////////////////////////////////////////// - -void ActorBlueprint::serialise(Actor* actor, Scene* scene) { - // - empty(); - - mName = actor->getName(); - - NxActorDesc desc; - actor->getNxActor()->saveToDesc(desc); - fromNxActorDesc(desc); - - if (actor->getNxActor()->isDynamic()) { - mBody = true; - NxBodyDesc bdesc; - actor->getNxActor()->saveBodyToDesc(bdesc); - fromNxBodyDesc(bdesc); - } - else { - mBody = false; - } - - mCustom = actor->saveCustom(); - - // shapes and stuff here... - - CollisionModel shapes; - actor->mCollisionModel.CopyTo(shapes); - - NxShapeIndex index = 0; - for(Shape* shape = shapes.begin();shape = shapes.next();) { - ShapeBlueprint* shapeb = shape->getBlueprint(); - shapeb->setShared(true); - mShapes.insert(index, shapeb); - index++; - } - -} - -//////////////////////////////////////////////////////////////////////////////////////////////// - -void ActorBlueprint::serialise(Actor* actor, SceneBlueprint* bp) { - empty(); - - mName = actor->getName(); - - NxActorDesc desc; - actor->getNxActor()->saveToDesc(desc); - fromNxActorDesc(desc); - - if (actor->getNxActor()->isDynamic()) { - mBody = true; - NxBodyDesc bdesc; - actor->getNxActor()->saveBodyToDesc(bdesc); - fromNxBodyDesc(bdesc); - } - else { - mBody = false; - } - - mCustom = actor->saveCustom(); - - // shapes and stuff here... - - CollisionModel shapes; - actor->mCollisionModel.CopyTo(shapes); - - std::cout << "Collision Model size = " << shapes.count() << std::endl; - - NxShapeIndex index = 0; - for(Shape* shape = shapes.begin();shape = shapes.next();) { - ShapeBlueprint* shapeb = shape->getBlueprint(); - shapeb->setShared(true); - mShapes.insert(index, shapeb); - index++; - } - -} - -//////////////////////////////////////////////////////////////////////////////////////////////// - -Actor* ActorBlueprint::unserialise(NxString name, Scene* s) { - - NxString type = "Actor"; - if (mCustom.hasKey("ActorType")) { - type = mCustom.getFirstOf("ActorType"); - } - - - ActorParams params; - params.setToDefault(); - - NxActorDesc ad; - toNxActorDesc(ad); - params.fromNxActorDesc(ad); - - if (mDensity == 0 && mMass == 0) { - ad.body = NULL; - } - else { - NxBodyDesc bd; - toNxBodyDesc(bd); - params.fromNxBodyDesc(bd); - } - - - Actor *a; - NxOgre::Pose actorPose; - actorPose.fromMat34(mGlobalPose); - - if (type == "Actor") { - a = s->createActor(name, mShapes.getFirst(), actorPose, params); - } - else if (type == "Body") { - a = s->createBody(name, mShapes.getFirst(), actorPose, params); - } - - if (a->isDead()) { - NxThrow_Error("Actor unserialisation failed!"); - s->destroyActor(a->getName()); - return NULL; - } - - a->restoreCustom(mCustom); - - return a; -} - -//////////////////////////////////////////////////////////////////////////////////////////////// - -void ActorBlueprint::fromNxActorDesc(NxActorDesc& desc) { - - mGlobalPose = desc.globalPose; - mDensity = desc.density; - mFlags.setFlag( EnumsBlueprint::FT_NxActorFlag, desc.flags); - mGroup = desc.group; - -#if 0 - #if NX_SDK_VERSION_NUMBER >= 272 - desc.dominanceGroup = dominanceGroup; - #endif -#endif - -} - -//////////////////////////////////////////////////////////////////////////////////////////////// - -void ActorBlueprint::fromNxBodyDesc(NxBodyDesc& desc) { - - - mMassLocalPose = desc.massLocalPose; - mMassSpaceInertia = desc.massSpaceInertia; - mMass = desc.mass; - mLinearVelocity = desc.linearVelocity; - mAngularVelocity = desc.angularVelocity; - mWakeUpCounter = desc.wakeUpCounter; - mLinearDamping = desc.linearDamping; - mAngularDamping = desc.angularDamping; - mMaxAngularVelocity = desc.maxAngularVelocity; - mCCDMotionThreshold = desc.CCDMotionThreshold; - mBodyFlags.setFlag(EnumsBlueprint::FT_NxBodyFlag, desc.flags); - mSleepLinearVelocity = desc.sleepLinearVelocity; - mSleepAngularVelocity = desc.sleepAngularVelocity; - mSolverIterationCount = desc.solverIterationCount; - - #if NX_SDK_VERSION_NUMBER >= 250 - mSleepEnergyThreshold = desc.sleepEnergyThreshold; - #endif - - #if NX_SDK_VERSION_NUMBER >= 250 - mSleepDamping = desc.sleepDamping; - #endif - -} - -//////////////////////////////////////////////////////////////////////////////////////////////// - -void ActorBlueprint::toNxActorDesc(NxActorDesc& desc) { - - // desc.name = 0; Some Global const char* storage here. - desc.globalPose = mGlobalPose; - desc.density = mDensity; - desc.flags = mFlags.getFlag(); - desc.group = mGroup; - -#if 0 - #if NX_SDK_VERSION_NUMBER >= 272 - desc.dominanceGroup = mDominanceGroup; - #endif -#endif - -} - -//////////////////////////////////////////////////////////////////////////////////////////////// - -void ActorBlueprint::toNxBodyDesc(NxBodyDesc& desc) { - - desc.massLocalPose = mMassLocalPose; - desc.massSpaceInertia = mMassSpaceInertia; - desc.mass = mMass; - desc.linearVelocity = mLinearVelocity; - desc.angularVelocity = mAngularVelocity; - desc.wakeUpCounter = mWakeUpCounter; - desc.linearDamping = mLinearDamping; - desc.angularDamping = mAngularDamping; - desc.maxAngularVelocity = mMaxAngularVelocity; - desc.CCDMotionThreshold = mCCDMotionThreshold; - desc.flags = mBodyFlags.getFlag(); - desc.sleepLinearVelocity = mSleepLinearVelocity; - desc.sleepAngularVelocity = mSleepAngularVelocity; - desc.solverIterationCount = mSolverIterationCount; - -#if NX_SDK_VERSION_NUMBER >= 250 - desc.sleepEnergyThreshold = mSleepEnergyThreshold; -#endif - -#if NX_SDK_VERSION_NUMBER >= 250 - desc.sleepDamping = mSleepDamping; -#endif - -} - -//////////////////////////////////////////////////////////////////////////////////////////////// - -} //End of Serialiser namespace. -} //End of NxOgre namespace. Deleted: trunk/python-ogre/ThirdParty/nxogre/NxOgreActorBlueprint.h =================================================================== --- trunk/python-ogre/ThirdParty/nxogre/NxOgreActorBlueprint.h 2008-06-20 06:57:55 UTC (rev 599) +++ trunk/python-ogre/ThirdParty/nxogre/NxOgreActorBlueprint.h 2008-06-22 02:07:48 UTC (rev 600) @@ -1,126 +0,0 @@ -// -// NxOgre a wrapper for the PhysX (formerly Novodex) physics library and the Ogre 3D rendering engine. -// Copyright (C) 2005 - 2007 Robin Southern and NxOgre.org http://www.nxogre.org -// -// This library 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.1 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 -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -// - -#ifndef __NXOGRE_ACTOR_BLUEPRINT_H__ -#define __NXOGRE_ACTOR_BLUEPRINT_H__ - -#include "NxOgrePrerequisites.h" -#include "NxOgreBlueprint.h" -#include "NxOgreContainer.h" -#include "NxOgreEnumsBlueprint.h" // For: mFlags and mBodyFlags -namespace NxOgre { - - namespace Blueprints { - - - class NxExport ActorFactory { - - public: - - ActorFactory(); - ~ActorFactory(); - - void registerFactory(NxString actorType); - - virtual bool createActor(NxString ID, Blueprints::ActorBlueprint*, NxActor*, Scene*) {return false;} - - }; // ActorFactory - - class NxExport ActorBlueprint : public Blueprint { - - public: - - ActorBlueprint(); - ~ActorBlueprint(); - - void empty(); - // Serialises the Actor. No mesh storage. - void serialise(Actor*, Scene*); - // Serialise the actor w/shapes, mesh storage - void serialise(Actor*, SceneBlueprint*); - - - // Serialise to a current scene with a new name - Actor* unserialise(NxString, Scene*); - - // Serialise to a scene with the current name. - void unserialise(Scene*); - - void fromNxActorDesc(NxActorDesc&); - void fromNxBodyDesc(NxBodyDesc&); - - void toNxActorDesc(NxActorDesc&); - void toNxBodyDesc(NxBodyDesc&); - - //////////////////////////////////////////////// - - NxString mName; - StringPairList mCustom; - NxMat34 mGlobalPose; - bool mBody; - NxF32 mDensity; - EnumsBlueprint mFlags; - NxActorGroup mGroup; - -#if NX_SDK_VERSION_NUMBER >= 260 - NxString mCompartment; -#endif - - CollisionModel mShapes; - -#if NX_SDK_VERSION_NUMBER >= 272 - NxU16 mDominanceGroup; -#endif - - - ////////////////////////////////////////////////// - - NxMat34 mMassLocalPose; - NxVec3 mMassSpaceInertia; - NxF32 mMass; - NxVec3 mLinearVelocity; - NxVec3 mAngularVelocity; - NxF32 mWakeUpCounter; - NxF32 mLinearDamping; - NxF32 mAngularDamping; - NxF32 mMaxAngularVelocity; - NxF32 mCCDMotionThreshold; - EnumsBlueprint mBodyFlags; - NxF32 mSleepLinearVelocity; - NxF32 mSleepAngularVelocity; - NxU32 mSolverIterationCount; - -#if NX_SDK_VERSION_NUMBER >= 250 - NxF32 mSleepEnergyThreshold; -#endif - -#if NX_SDK_VERSION_NUMBER >= 250 - NxF32 mSleepDamping; -#endif - - ////////////////////////////////////////////////// - - StringPairList mCustomData; - - };// End of ActorBlueprint Class - - }; -};// End of namespace - -#endif Deleted: trunk/python-ogre/ThirdParty/nxogre/NxOgreBlueprint.h =================================================================== --- trunk/python-ogre/ThirdParty/nxogre/NxOgreBlueprint.h 2008-06-20 06:57:55 UTC (rev 599) +++ trunk/python-ogre/ThirdParty/nxogre/NxOgreBlueprint.h 2008-06-22 02:07:48 UTC (rev 600) @@ -1,48 +0,0 @@ -// -// NxOgre a wrapper for the PhysX (formerly Novodex) physics library and the Ogre 3D rendering engine. -// Copyright (C) 2005 - 2007 Robin Southern and NxOgre.org http://www.nxogre.org -// -// This library 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.1 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 -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -// - -#ifndef __NXOGRE_BLUEPRINT_H__ -#define __NXOGRE_BLUEPRINT_H__ - -#include "NxOgrePrerequisites.h" -#include "NxOgreBlueprint.h" -#include "NxOgreContainer.h" - -namespace NxOgre { - - namespace Blueprints { - - class NxExport Blueprint { - - public: - - Blueprint() {} - ~Blueprint() {} - - virtual void empty() {} - virtual void serialise() {} - virtual void unserialise() {} - - - };// End of Blueprint Class - - }; // End of namespace -}; // End of namespace - -#endif Deleted: trunk/python-ogre/ThirdParty/nxogre/NxOgreCompoundActorBlueprint.cpp =================================================================== --- trunk/python-ogre/ThirdParty/nxogre/NxOgreCompoundActorBlueprint.cpp 2008-06-20 06:57:55 UTC (rev 599) +++ trunk/python-ogre/ThirdParty/nxogre/NxOgreCompoundActorBlueprint.cpp 2008-06-22 02:07:48 UTC (rev 600) @@ -1,39 +0,0 @@ -// -// NxOgre a wrapper for the PhysX (formerly Novodex) physics library and the Ogre 3D rendering engine. -// Copyright (C) 2005 - 2007 Robin Southern and NxOgre.org http://www.nxogre.org -// -// This library 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.1 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 -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -// - -#include "NxOgreStable.h" -#include "NxOgreCompoundActorBlueprint.h" - -namespace NxOgre { - -////////////////////////////////////////////////////////// - -CompoundActorBlueprint::CompoundActorBlueprint(ResourceStreamPtr& resourceStream, Scene*) { - -} - -////////////////////////////////////////////////////////// - -CompoundActorBlueprint::~CompoundActorBlueprint() { - -} - -////////////////////////////////////////////////////////// - -} Deleted: trunk/python-ogre/ThirdParty/nxogre/NxOgreCompoundActorBlueprint.h =================================================================== --- trunk/python-ogre/ThirdParty/nxogre/NxOgreCompoundActorBlueprint.h 2008-06-20 06:57:55 UTC (rev 599) +++ trunk/python-ogre/ThirdParty/nxogre/NxOgreCompoundActorBlueprint.h 2008-06-22 02:07:48 UTC (rev 600) @@ -1,58 +0,0 @@ -// -// NxOgre a wrapper for the PhysX (formerly Novodex) physics library and the Ogre 3D rendering engine. -// Copyright (C) 2005 - 2007 Robin Southern and NxOgre.org http://www.nxogre.org -// -// This library 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.1 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 -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -// - -#ifndef __NXOGRE_COMPOUND_ACTOR_BLUEPRINT_H__ -#define __NXOGRE_COMPOUND_ACTOR_BLUEPRINT_H__ - -#include "NxOgrePrerequisites.h" -#include "NxOgreParams.h" - - -namespace NxOgre { - - class NxExport CompoundActorBlueprint { - - friend class ResourceSystem; - - public: - - - // @brief Create constructor - CompoundActorBlueprint(const NxString& name, Scene*); - - - // @brief Unserialise from ResourceStream - CompoundActorBlueprint(ResourceStreamPtr& resourceStream, Scene*); - - - // @brief Compound Actor destructor - ~CompoundActorBlueprint(); - - protected: - - // @brief Private Resource Stream. - - private: - - - }; - -}; - -#endif Modified: trunk/python-ogre/ThirdParty/nxogre/NxOgreContainer.h =================================================================== --- trunk/python-ogre/ThirdParty/nxogre/NxOgreContainer.h 2008-06-20 06:57:55 UTC (rev 599) +++ trunk/python-ogre/ThirdParty/nxogre/NxOgreContainer.h 2008-06-22 02:07:48 UTC (rev 600) @@ -2,20 +2,20 @@ * \brief Header for the Container, List and StringPairList classes. * \version 1.0-21 * - * \licence NxOgre a wrapper for the PhysX physics library. - * Copyright (C) 2005-8 Robin Southern of NxOgre.org http://www.nxogre.org - * This library 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.1 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software + * \licence NxOgre a wrapper for the PhysX physics library. + * Copyright (C) 2005-8 Robin Southern of NxOgre.org http://www.nxogre.org + * This library 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.1 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -337,7 +337,7 @@ return; for (TT tt = begin(); tt = next();) { - NxDelete(tt); +// NxDelete(tt); ## can't delete as new physx sdk has this protected.. } /* @@ -373,7 +373,7 @@ for(Iterator tt = mItems.begin();tt != mItems.end();) { - delete (*tt++).second.t; + //delete (*tt++).second.t; } empty(); Deleted: trunk/python-ogre/ThirdParty/nxogre/NxOgreEnumsBlueprint.cpp =================================================================== --- trunk/python-ogre/ThirdParty/nxogre/NxOgreEnumsBlueprint.cpp 2008-06-20 06:57:55 UTC (rev 599) +++ trunk/python-ogre/ThirdParty/nxogre/NxOgreEnumsBlueprint.cpp 2008-06-22 02:07:48 UTC (rev 600) @@ -1,1191 +0,0 @@ -// -// NxOgre a wrapper for the PhysX (formerly Novodex) physics library and the Ogre 3D rendering engine. -// Copyright (C) 2005 - 2007 Robin Southern and NxOgre.org http://www.nxogre.org -// -// This library 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.1 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 -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -// - -#include "NxOgreStable.h" -#include "NxOgreEnumsBlueprint.h" -#include "NxOgreContainer.h" - -namespace NxOgre { -namespace Blueprints { - -//////////////////////////////////////////////////////////////////////////////////////////////// - -EnumsBlueprint::EnumsBlueprint(EnumType t) : mType(t), mEnum(0) {} - -//////////////////////////////////////////////////////////////////////////////////////////////// - -EnumsBlueprint::EnumsBlueprint(EnumType t, NxU32 f) : mType(t), mEnum(f) {} - -//////////////////////////////////////////////////////////////////////////////////////////////// - -void EnumsBlueprint::toDefault() { - empty(); -} - -//////////////////////////////////////////////////////////////////////////////////////////////// - -void EnumsBlueprint::empty() { - mEnum = 0; -} - -//////////////////////////////////////////////////////////////////////////////////////////////// - -void EnumsBlueprint::serialise() { - -} - -//////////////////////////////////////////////////////////////////////////////////////////////// - -StringList EnumsBlueprint::asStringPairList() { - - switch(mType) { - default: {StringList l;return l;} break; - case FT_NxActorFlag: return AsNxActorFlag(); break; - case FT_NxShapeFlag: return AsNxShapeFlag(); break; - case FT_NxCapsuleShapeFlag: return AsNxCapsuleShapeFlag(); break; - case FT_NxWheelShapeFlags: return AsNxWheelShapeFlags(); break; - case FT_NxMeshPagingMode: return AsNxMeshPagingMode(); break; - case FT_NxJointFlag: return AsNxJointFlag(); break; - case FT_NxD6JointMotion: return AsNxD6JointMotion(); break; - case FT_NxD6JointDriveType: return AsNxD6JointDriveType(); break; - case FT_NxJointProjectionMode: return AsNxJointProjectionMode(); break; - case FT_NxD6JointFlag: return AsNxD6JointFlag(); break; - case FT_NxDistanceJointFlag: return AsNxDistanceJointFlag(); break; - case FT_NxRevoluteJointFlag: return AsNxRevoluteJointFlag(); break; - case FT_NxSphericalJointFlag: return AsNxSphericalJointFlag(); break; - case FT_NxPulleyJointFlag: return AsNxPulleyJointFlag(); break; - case FT_NxContactPairFlag: return AsNxContactPairFlag(); break; - case FT_NxFluidSimulationMethod: return AsNxFluidSimulationMethod(); break; - case FT_NxFluidCollisionMethod: return AsNxFluidCollisionMethod(); break; - case FT_NxFluidFlag: return AsNxFluidFlag(); break; - case FT_NxEmitterType: return AsNxEmitterType(); break; - case FT_NxEmitterShape: return AsNxEmitterShape(); break; - case FT_NxFluidEmitterFlag: return AsNxFluidEmitterFlag(); break; - case FT_NxClothFlag: return AsNxClothFlag(); break; - case FT_NxForceFieldCoordinates: return AsNxForceFieldCoordinates(); break; - case FT_NxSceneFlags: return AsNxSceneFlags(); break; - case FT_NxSoftBodyMeshFlags: return AsNxSoftBodyMeshFlags(); break; - case FT_NxSoftBodyVertexFlags: return AsNxSoftBodyVertexFlags(); break; - case FT_NxSoftBodyFlag: return AsNxSoftBodyFlag(); break; - case FT_NxSoftBodyAttachmentFlag: return AsNxSoftBodyAttachmentFlag(); break; - case FT_NxMeshDataFlags: return AsNxMeshDataFlags(); break; - } - - StringList l;return l; - -} - -//////////////////////////////////////////////////////////////////////////////////////////////// - - -StringList EnumsBlueprint::AsNxActorFlag() { - - StringList l; - - if (mEnum & NX_AF_DISABLE_COLLISION) - l.insert(NxString("NX_AF_DISABLE_COLLISION")); - - if (mEnum & NX_AF_DISABLE_RESPONSE) - l.insert(NxString("NX_AF_DISABLE_RESPONSE")); - - if (mEnum & NX_AF_LOCK_COM) - l.insert(NxString("NX_AF_LOCK_COM")); - if (mEnum & NX_AF_FLUID_DISABLE_COLLISION) - l.insert(NxString("NX_AF_FLUID_DISABLE_COLLISION")); - -#if NX_SDK_VERSION_NUMBER < 250 - if (mEnum & NX_AF_FLUID_ACTOR_REACTION) - l.insert(NxString("NX_AF_FLUID_ACTOR_REACTION")); -#endif - -#if NX_SDK_VERSION_NUMBER >= 250 - if (mEnum & NX_AF_CONTACT_MODIFICATION) - l.insert(NxString("NX_AF_CONTACT_MODIFICATION")); -#endif - -#if NX_SDK_VERSION_NUMBER >= 261 - if (mEnum & NX_AF_FORCE_CONE_FRICTION)l.insert(NxString("NX_AF_FORCE_CONE_FRICTION")); -#endif - -#if NX_SDK_VERSION_NUMBER >= 270 - if (mEnum & NX_AF_USER_ACTOR_PAIR_FILTERING) - l.insert(NxString("NX_AF_USER_ACTOR_PAIR_FILTERING")); -#endif - - return l; -} - -//////////////////////////////////////////////////////////////////////////////////////////////// - -StringList EnumsBlueprint::AsNxBodyFlag() { - - StringList l; - - if (mEnum & NX_BF_DISABLE_GRAVITY) - l.insert(NxString("NX_BF_DISABLE_GRAVITY")); - - if (mEnum & NX_BF_FROZEN_POS_X) - l.insert(NxString("NX_BF_FROZEN_POS_X")); - - if (mEnum & NX_BF_FROZEN_POS_Y) - l.insert(NxString("NX_BF_FROZEN_POS_Y")); - - if (mEnum & NX_BF_FROZEN_POS_Z) - l.insert(NxString("NX_BF_FROZEN_POS_Z")); - - if (mEnum & NX_BF_FROZEN_ROT_X) - l.insert(NxString("NX_BF_FROZEN_ROT_X")); - - if (mEnum & NX_BF_FROZEN_ROT_Y) - l.insert(NxString("NX_BF_FROZEN_ROT_Y")); - - if (mEnum & NX_BF_FROZEN_ROT_Z) - l.insert(NxString("NX_BF_FROZEN_ROT_Z")); - - if (mEnum & NX_BF_KINEMATIC) - l.insert(NxString("NX_BF_KINEMATIC")); - - if (mEnum & NX_BF_VISUALIZATION) - l.insert(NxString("NX_BF_VISUALIZATION")); - - if (mEnum & NX_BF_POSE_SLEEP_TEST) - l.insert(NxString("NX_BF_POSE_SLEEP_TEST")); - - if (mEnum & NX_BF_FILTER_SLEEP_VEL) - l.insert(NxString("NX_BF_FILTER_SLEEP_VEL")); - -#if NX_SDK_VERSION_NUMBER >= 250 - if (mEnum & NX_BF_ENERGY_SLEEP_TEST) - l.insert(NxString("NX_BF_ENERGY_SLEEP_TEST")); -#endif - - return l; - -} - -//////////////////////////////////////////////////////////////////////////////////////////////// - -StringList EnumsBlueprint::AsNxShapeFlag() { - - StringList l; - - if (mEnum & NX_TRIGGER_ON_ENTER) - l.insert(NxString("NX_TRIGGER_ON_ENTER")); - - if (mEnum & NX_TRIGGER_ON_LEAVE) - l.insert(NxString("NX_TRIGGER_ON_LEAVE")); - - if (mEnum & NX_TRIGGER_ON_STAY) - l.insert(NxString("NX_TRIGGER_ON_STAY")); - - if (mEnum & NX_SF_VISUALIZATION) - l.insert(NxString("NX_SF_VISUALIZATION")); - - if (mEnum & NX_SF_DISABLE_COLLISION) - l.insert(NxString("NX_SF_DISABLE_COLLISION")); - - if (mEnum & NX_SF_FEATURE_INDICES) - l.insert(NxString("NX_SF_FEATURE_INDICES")); - - if (mEnum & NX_SF_DISABLE_RAYCASTING) - l.insert(NxString("NX_SF_DISABLE_RAYCASTING")); - - if (mEnum & NX_SF_POINT_CONTACT_FORCE) - l.insert(NxString("NX_SF_POINT_CONTACT_FORCE")); - - if (mEnum & NX_SF_FLUID_DRAIN) - l.insert(NxString("NX_SF_FLUID_DRAIN")); -#if 0 - if (mEnum & NX_SF_FLUID_DUMMY9) - l.insert(NxString("NX_SF_FLUID_DUMMY9")); -#endif - if (mEnum & NX_SF_FLUID_DISABLE_COLLISION) - l.insert(NxString("NX_SF_FLUID_DISABLE_COLLISION")); - -#if NX_SDK_VERSION_NUMBER >= 250 - if (mEnum & NX_SF_FLUID_TWOWAY) - l.insert(NxString("NX_SF_FLUID_TWOWAY")); -#endif - - if (mEnum & NX_SF_DISABLE_RESPONSE) - l.insert(NxString("NX_SF_DISABLE_RESPONSE")); - - if (mEnum & NX_SF_DYNAMIC_DYNAMIC_CCD) - l.insert(NxString("NX_SF_DYNAMIC_DYNAMIC_CCD")); - -#if NX_SDK_VERSION_NUMBER >= 250 - if (mEnum & NX_SF_DISABLE_SCENE_QUERIES) - l.insert(NxString("NX_SF_DISABLE_SCENE_QUERIES")); -#endif - -#if NX_SDK_VERSION_NUMBER >= 270 - if (mEnum & NX_SF_CLOTH_DRAIN) - l.insert(NxString("NX_SF_CLOTH_DRAIN")); -#endif - -#if NX_SDK_VERSION_NUMBER >= 270 - if (mEnum & NX_SF_CLOTH_DISABLE_COLLISION) - l.insert(NxString("NX_SF_CLOTH_DISABLE_COLLISION")); -#endif - -#if NX_SDK_VERSION_NUMBER >= 270 - if (mEnum & NX_SF_CLOTH_TWOWAY) - l.insert(NxString("NX_SF_CLOTH_TWOWAY")); -#endif - -#if NX_USE_SOFTBODY_API - if (mEnum & NX_SF_SOFTBODY_DRAIN) - l.insert(NxString("NX_SF_SOFTBODY_DRAIN")); -#endif - -#if NX_USE_SOFTBODY_API - if (mEnum & NX_SF_SOFTBODY_DISABLE_COLLISION) - l.insert(NxString("NX_SF_SOFTBODY_DISABLE_COLLISION")); -#endif - -#if NX_USE_SOFTBODY_API - if (mEnum & NX_SF_SOFTBODY_TWOWAY) - l.insert(NxString("NX_SF_SOFTBODY_TWOWAY")); -#endif - - return l; -} - -//////////////////////////////////////////////////////////////////////////////////////////////// - -StringList EnumsBlueprint::AsNxCapsuleShapeFlag() { - - StringList l; - - if (mEnum & NX_SWEPT_SHAPE) - l.insert(NxString("NX_SWEPT_SHAPE")); - - return l; - -} - -//////////////////////////////////////////////////////////////////////////////////////////////// - -StringList EnumsBlueprint::AsNxWheelShapeFlags() { - - StringList l; - - - if (mEnum & NX_WF_WHEEL_AXIS_CONTACT_NORMAL) - l.insert(NxString("NX_WF_WHEEL_AXIS_CONTACT_NORMAL")); - - if (mEnum & NX_WF_INPUT_LAT_SLIPVELOCITY) - l.insert(NxString("NX_WF_INPUT_LAT_SLIPVELOCITY")); - - if (mEnum & NX_WF_INPUT_LNG_SLIPVELOCITY) - l.insert(NxString("NX_WF_INPUT_LNG_SLIPVELOCITY")); - - if (mEnum & NX_WF_UNSCALED_SPRING_BEHAVIOR) - l.insert(NxString("NX_WF_UNSCALED_SPRING_BEHAVIOR")); - - if (mEnum & NX_WF_AXLE_SPEED_OVERRIDE) - l.insert(NxString("NX_WF_AXLE_SPEED_OVERRIDE")); - -#if NX_SDK_VERSION_NUMBER >= 264 - if (mEnum & NX_WF_EMULATE_LEGACY_WHEEL) - l.insert(NxString("NX_WF_EMULATE_LEGACY_WHEEL")); -#endif - -#if NX_SDK_VERSION_NUMBER >= 264 - if (mEnum & NX_WF_CLAMPED_FRICTION) - l.insert(NxString("NX_WF_CLAMPED_FRICTION")); -#endif - - return l; - -} - -//////////////////////////////////////////////////////////////////////////////////////////////// - -StringList EnumsBlueprint::AsNxMeshPagingMode() { - - StringList l; - - if (mEnum & NX_MESH_PAGING_MANUAL) - l.insert(NxString("NX_MESH_PAGING_MANUAL")); - - if (mEnum & NX_MESH_PAGING_FALLBACK) - l.insert(NxString("NX_MESH_PAGING_FALLBACK")); - - if (mEnum & NX_MESH_PAGING_AUTO) - l.insert(NxString("NX_MESH_PAGING_AUTO")); - - return l; - -} - -//////////////////////////////////////////////////////////////////////////////////////////////// - -StringList EnumsBlueprint::AsNxJointFlag() { - - StringList l; - - if (mEnum & NX_JF_COLLISION_ENABLED) - l.insert(NxString("NX_JF_COLLISION_ENABLED")); - - if (mEnum & NX_JF_VISUALIZATION) - l.insert(NxString("NX_JF_VISUALIZATION")); - - return l; - -} - -//////////////////////////////////////////////////////////////////////////////////////////////// - -StringList EnumsBlueprint::AsNxD6JointMotion() { - - StringList l; - - if (mEnum & NX_D6JOINT_MOTION_LOCKED) - l.insert(NxString("NX_D6JOINT_MOTION_LOCKED")); - - if (mEnum & NX_D6JOINT_MOTION_LIMITED) - l.insert(NxString("NX_D6JOINT_MOTION_LIMITED")); - - if (mEnum & NX_D6JOINT_MOTION_FREE) - l.insert(NxString("NX_D6JOINT_MOTION_FREE")); - - return l; - -} - -//////////////////////////////////////////////////////////////////////////////////////////////// - -StringList EnumsBlueprint::AsNxD6JointDriveType() { - - StringList l; - - if (mEnum & NX_D6JOINT_DRIVE_POSITION) - l.insert(NxString("NX_D6JOINT_DRIVE_POSITION")); - - if (mEnum & NX_D6JOINT_DRIVE_VELOCITY) - l.insert(NxString("NX_D6JOINT_DRIVE_VELOCITY")); - - return l; - -} - -//////////////////////////////////////////////////////////////////////////////////////////////// - -StringList EnumsBlueprint::AsNxJointProjectionMode() { - - StringList l; - - if (mEnum & NX_JPM_NONE) - l.insert(NxString("NX_JPM_NONE")); - - if (mEnum & NX_JPM_POINT_MINDIST) - l.insert(NxString("NX_JPM_POINT_MINDIST")); - -#if NX_SDK_VERSION_NUMBER >= 260 - if (mEnum & NX_JPM_LINEAR_MINDIST) - l.insert(NxString("NX_JPM_LINEAR_MINDIST")); -#endif - - return l; - -} - -//////////////////////////////////////////////////////////////////////////////////////////////// - -StringList EnumsBlueprint::AsNxD6JointFlag() { - - StringList l; - - if (mEnum & NX_D6JOINT_SLERP_DRIVE) - l.insert(NxString("NX_D6JOINT_SLERP_DRIVE")); - - if (mEnum & NX_D6JOINT_GEAR_ENABLED) - l.insert(NxString("NX_D6JOINT_GEAR_ENABLED")); - - return l; - -} - -//////////////////////////////////////////////////////////////////////////////////////////////// - -StringList EnumsBlueprint::AsNxDistanceJointFlag() { - - StringList l; - - if (mEnum & NX_DJF_MAX_DISTANCE_ENABLED) - l.insert(NxString("NX_DJF_MAX_DISTANCE_ENABLED")); - - if (mEnum & NX_DJF_MIN_DISTANCE_ENABLED) - l.insert(NxString("NX_DJF_MIN_DISTANCE_ENABLED")); - - if (mEnum & NX_DJF_SPRING_ENABLED) - l.insert(NxString("NX_DJF_SPRING_ENABLED")); - - return l; - -} - -//////////////////////////////////////////////////////////////////////////////////////////////// - -StringList EnumsBlueprint::AsNxRevoluteJointFlag() { - - StringList l; - - if (mEnum & NX_RJF_LIMIT_ENABLED) - l.insert(NxString("NX_RJF_LIMIT_ENABLED")); - - if (mEnum & NX_RJF_MOTOR_ENABLED) - l.insert(NxString("NX_RJF_MOTOR_ENABLED")); - - if (mEnum & NX_RJF_SPRING_ENABLED) - l.insert(NxString("NX_RJF_SPRING_ENABLED")); - - return l; - -} - -//////////////////////////////////////////////////////////////////////////////////////////////// - -StringList EnumsBlueprint::AsNxSphericalJointFlag() { - - StringList l; - - if (mEnum & NX_SJF_TWIST_LIMIT_ENABLED) - l.insert(NxString("NX_SJF_TWIST_LIMIT_ENABLED")); - - if (mEnum & NX_SJF_SWING_LIMIT_ENABLED) - l.insert(NxString("NX_SJF_SWING_LIMIT_ENABLED")); - - if (mEnum & NX_SJF_TWIST_SPRING_ENABLED) - l.insert(NxString("NX_SJF_TWIST_SPRING_ENABLED")); - - if (mEnum & NX_SJF_SWING_SPRING_ENABLED) - l.insert(NxString("NX_SJF_SWING_SPRING_ENABLED")); - - if (mEnum & NX_SJF_JOINT_SPRING_ENABLED) - l.insert(NxString("NX_SJF_JOINT_SPRING_ENABLED")); - - return l; - -} - -//////////////////////////////////////////////////////////////////////////////////////////////// - -StringList EnumsBlueprint::AsNxPulleyJointFlag() { - - StringList l; - - if (mEnum & NX_PJF_IS_RIGID) - l.insert(NxString("NX_PJF_IS_RIGID")); - - if (mEnum & NX_PJF_MOTOR_ENABLED) - l.insert(NxString("NX_PJF_MOTOR_ENABLED")); - - return l; - -} - -//////////////////////////////////////////////////////////////////////////////////////////////// - -StringList EnumsBlueprint::AsNxContactPairFlag() { - - StringList l; - - if (mEnum & NX_IGNORE_PAIR) - l.insert(NxString("NX_IGNORE_PAIR")); - - if (mEnum & NX_NOTIFY_ON_START_TOUCH) - l.insert(NxString("NX_NOTIFY_ON_START_TOUCH")); - - if (mEnum & NX_NOTIFY_ON_END_TOUCH) - l.insert(NxString("NX_NOTIFY_ON_END_TOUCH")); - - if (mEnum & NX_NOTIFY_ON_TOUCH) - l.insert(NxString("NX_NOTIFY_ON_TOUCH")); - - if (mEnum & NX_NOTIFY_ON_IMPACT) - l.insert(NxString("NX_NOTIFY_ON_IMPACT")); - - if (mEnum & NX_NOTIFY_ON_ROLL) - l.insert(NxString("NX_NOTIFY_ON_ROLL")); - - if (mEnum & NX_NOTIFY_ON_SLIDE) - l.insert(NxString("NX_NOTIFY_ON_SLIDE")); - -#if NX_SDK_VERSION_NUMBER >= 250 - if (mEnum & NX_NOTIFY_FORCES) - l.insert(NxString("NX_NOTIFY_FORCES")); -#endif - -#if 0 - if (mEnum & NX_NOTIFY_DUMMY8) - l.insert(NxString("NX_NOTIFY_DUMMY8")); - - if (mEnum & NX_NOTIFY_DUMMY9) - l.insert(NxString("NX_NOTIFY_DUMMY9")); - - if (mEnum & NX_NOTIFY_DUMMY10) - l.insert(NxString("NX_NOTIFY_DUMMY10")); - - if (mEnum & NX_NOTIFY_DUMMY11) - l.insert(NxString("NX_NOTIFY_DUMMY11")); - - if (mEnum & NX_NOTIFY_DUMMY12) - l.insert(NxString("NX_NOTIFY_DUMMY12")); - - if (mEnum & NX_NOTIFY_DUMMY13) - l.insert(NxString("NX_NOTIFY_DUMMY13")); - - if (mEnum & NX_NOTIFY_DUMMY14) - l.insert(NxString("NX_NOTIFY_DUMMY14")); - - if (mEnum & NX_NOTIFY_DUMMY15) - l.insert(NxString("NX_NOTIFY_DUMMY15")); -#endif -#if NX_SDK_VERSION_NUMBER >= 250 - if (mEnum & NX_NOTIFY_CONTACT_MODIFICATION) - l.insert(NxString("NX_NOTIFY_CONTACT_MODIFICATION")); -#endif - return l; - -} - -//////////////////////////////////////////////////////////////////////////////////////////////// - -StringList EnumsBlueprint::AsNxFluidSimulationMethod() { - - StringList l; - - if (mEnum & NX_F_SPH) - l.insert(NxString("NX_F_SPH")); - - if (mEnum & NX_F_NO_PARTICLE_INTERACTION) - l.insert(NxString("NX_F_NO_PARTICLE_INTERACTION")); - - if (mEnum & NX_F_MIXED_MODE) - l.insert(NxString("NX_F_MIXED_MODE")); - - return l; - -} - -//////////////////////////////////////////////////////////////////////////////////////////////// - -StringList EnumsBlueprint::AsNxFluidCollisionMethod() { - - StringList l; - - if (mEnum & NX_F_STATIC) - l.insert(NxString("NX_F_STATIC")); - - if (mEnum & NX_F_DYNAMIC) - l.insert(NxString("NX_F_DYNAMIC")); - - return l; - -} - -//////////////////////////////////////////////////////////////////////////////////////////////// - -StringList EnumsBlueprint::AsNxFluidFlag() { - - StringList l; - - if (mEnum & NX_FF_VISUALIZATION) - l.insert(NxString("NX_FF_VISUALIZATION")); - - if (mEnum & NX_FF_DISABLE_GRAVITY) - l.insert(NxString("NX_FF_DISABLE_GRAVITY")); - -#if NX_SDK_VERSION_NUMBER >= 250 - if (mEnum & NX_FF_COLLISION_TWOWAY) - l.insert(NxString("NX_FF_COLLISION_TWOWAY")); -#endif - -#if NX_SDK_VERSION_NUMBER >= 250 - if (mEnum & NX_FF_ENABLED) - l.insert(NxString("NX_FF_ENABLED")); -#endif - -#if NX_SDK_VERSION_NUMBER >= 250 - if (mEnum & NX_FF_HARDWARE) - l.insert(NxString("NX_FF_HARDWARE")); -#endif - - return l; - -} - -//////////////////////////////////////////////////////////////////////////////////////////////// - -StringList EnumsBlueprint::AsNxEmitterType() { - - StringList l; - - if (mEnum & NX_AF_DISABLE_COLLISION) - l.insert(NxString("NX_AF_DISABLE_COLLISION")); - - if (mEnum & NX_FE_CONSTANT_PRESSURE) - l.insert(NxString("NX_FE_CONSTANT_PRESSURE")); - - if (mEnum & NX_FE_CONSTANT_FLOW_RATE) - l.insert(NxString("NX_FE_CONSTANT_FLOW_RATE")); - - return l; - -} - -//////////////////////////////////////////////////////////////////////////////////////////////// - -StringList EnumsBlueprint::AsNxEmitterShape() { - - StringList l; - - if (mEnum & NX_FE_RECTANGULAR) - l.insert(NxString("NX_FE_RECTANGULAR")); - - if (mEnum & NX_FE_ELLIPSE) - l.insert(NxString("NX_FE_ELLIPSE")); - - return l; - -} - -//////////////////////////////////////////////////////////////////////////////////////////////// - -StringList EnumsBlueprint::AsNxFluidEmitterFlag() { - - StringList l; - - if (mEnum & NX_FEF_VISUALIZATION) - l.insert(NxString("NX_FEF_VISUALIZATION")); - -#if NX_SDK_VERSION_NUMBER < 250 - if (mEnum & NX_FEF_BROKEN_ACTOR_REF) - l.insert(NxString("NX_FEF_BROKEN_ACTOR_REF")); -#endif - -#if 0 -#if NX_SDK_VERSION_NUMBER >= 250 - if (mEnum & NX_FEF_DUMMY1) - l.insert(NxString("NX_FEF_DUMMY1")); -#endif -#endif - -#if NX_SDK_VERSION_NUMBER < 260 - if (mEnum & NX_FEF_FORCE_ON_ACTOR) - l.insert(NxString("NX_FEF_FORCE_ON_ACTOR")); -#endif - -#if NX_SDK_VERSION_NUMBER >= 260 - if (mEnum & NX_FEF_FORCE_ON_BODY) - l.insert(NxString("NX_FEF_FORCE_ON_BODY")); -#endif - -#if NX_SDK_VERSION_NUMBER < 260 - if (mEnum & NX_FEF_ADD_ACTOR_VELOCITY) - l.insert(NxString("NX_FEF_ADD_ACTOR_VELOCITY")); -#endif - -#if NX_SDK_VERSION_NUMBER >= 260 - if (mEnum & NX_FEF_ADD_BODY_VELOCITY) - l.insert(NxString("NX_FEF_ADD_BODY_VELOCITY")); -#endif - - if (mEnum & NX_FEF_ENABLED) - l.insert(NxString("NX_FEF_ENABLED")); - - return l; - -} - -//////////////////////////////////////////////////////////////////////////////////////////////// - -StringList EnumsBlueprint::AsNxClothFlag() { - - StringList l; - - - if (mEnum & NX_CLF_PRESSURE) - l.insert(NxString("NX_CLF_PRESSURE")); - - if (mEnum & NX_CLF_STATIC) - l.insert(NxString("NX_CLF_STATIC")); - - if (mEnum & NX_CLF_DISABLE_COLLISION) - l.insert(NxString("NX_CLF_DISABLE_COLLISION")); - - if (mEnum & NX_CLF_SELFCOLLISION) - l.insert(NxString("NX_CLF_SELFCOLLISION")); - - if (mEnum & NX_CLF_VISUALIZATION) - l.insert(NxString("NX_CLF_VISUALIZATION")); - - if (mEnum & NX_CLF_GRAVITY) - l.insert(NxString("NX_CLF_GRAVITY")); - - if (mEnum & NX_CLF_BENDING) - l.insert(NxString("NX_CLF_BENDING")); - - if (mEnum & NX_CLF_BENDING_ORTHO) - l.insert(NxString("NX_CLF_BENDING_ORTHO")); - - if (mEnum & NX_CLF_DAMPING) - l.insert(NxString("NX_CLF_DAMPING")); - - if (mEnum & NX_CLF_COLLISION_TWOWAY) - l.insert(NxString("NX_CLF_COLLISION_TWOWAY")); - -#if 0 - if (mEnum & NX_CLF_DUMMY1) - l.insert(NxString("NX_CLF_DUMMY1")); -#endif - - if (mEnum & NX_CLF_TRIANGLE_COLLISION) - l.insert(NxString("NX_CLF_TRIANGLE_COLLISION")); - - if (mEnum & NX_CLF_TEARABLE) - l.insert(NxString("NX_CLF_TEARABLE")); - - if (mEnum & NX_CLF_HARDWARE) - l.insert(NxString("NX_CLF_HARDWARE")); - -#if NX_SDK_VERSION_NUMBER >= 250 - if (mEnum & NX_CLF_COMDAMPING) - l.insert(NxString("NX_CLF_COMDAMPING")); -#endif -#if NX_SDK_VERSION_NUMBER >= 270 - if (mEnum & NX_CLF_VALIDBOUNDS) - l.insert(NxString("NX_CLF_VALIDBOUNDS")); -#endif - -#if NX_SDK_VERSION_NUMBER >= 270 - if (mEnum & NX_CLF_FLUID_COLLISION) - l.insert(NxString("NX_CLF_FLUID_COLLISION")); -#endif - -#if NX_SDK_VERSION_NUMBER >= 280 - if (mEnum & NX_CLF_ADHERE) - l.insert(NxString("NX_CLF_ADHERE")); -#endif - - return l; - -} - -//////////////////////////////////////////////////////////////////////////////////////////////// - -StringList EnumsBlueprint::AsNxForceFieldCoordinates() { - - StringList l; - - if (mEnum & NX_FFC_CARTESIAN) - l.insert(NxString("NX_FFC_CARTESIAN")); - - if (mEnum & NX_FFC_SPHERICAL) - l.insert(NxString("NX_FFC_SPHERICAL")); - - if (mEnum & NX_FFC_CYLINDRICAL) - l.insert(NxString("NX_FFC_CYLINDRICAL")); - - if (mEnum & NX_FFC_TOROIDAL) - l.insert(NxString("NX_FFC_TOROIDAL")); - - return l; - -} - -//////////////////////////////////////////////////////////////////////////////////////////////// - -StringList EnumsBlueprint::AsNxSceneFlags() { - - StringList l; - - if (mEnum & NX_SF_DISABLE_SSE) - l.insert(NxString("NX_SF_DISABLE_SSE")); - - if (mEnum & NX_SF_DISABLE_COLLISIONS) - l.insert(NxString("NX_SF_DISABLE_COLLISIONS")); - - if (mEnum & NX_SF_SIMULATE_SEPARATE_THREAD) - l.insert(NxString("NX_SF_SIMULATE_SEPARATE_THREAD")); - - if (mEnum & NX_SF_ENABLE_MULTITHREAD) - l.insert(NxString("NX_SF_ENABLE_MULTITHREAD")); - -#if NX_SDK_VERSION_NUMBER >= 250 - if (mEnum & NX_SF_ENABLE_ACTIVETRANSFORMS) - l.insert(NxString("NX_SF_ENABLE_ACTIVETRANSFORMS")); -#endif - -#if NX_SDK_VERSION_NUMBER >= 250 - if (mEnum & NX_SF_RESTRICTED_SCENE) - l.insert(NxString("NX_SF_RESTRICTED_SCENE")); -#endif - -#if NX_SDK_VERSION_NUMBER >= 250 - if (mEnum & NX_SF_DISABLE_SCENE_MUTEX) - l.insert(NxString("NX_SF_DISABLE_SCENE_MUTEX")); -#endif - -#if NX_SDK_VERSION_NUMBER >= 261 - if (mEnum & NX_SF_FORCE_CONE_FRICTION) - l.insert(NxString("NX_SF_FORCE_CONE_FRICTION")); -#endif - - return l; - -} - -//////////////////////////////////////////////////////////////////////////////////////////////// - -StringList EnumsBlueprint::AsNxSoftBodyMeshFlags() { - - StringList l; - -#if 0 - if (mEnum & NX_SOFTBODY_MESH_DUMMY) - l.insert(NxString("NX_SOFTBODY_MESH_DUMMY")); -#endif - - if (mEnum & NX_SOFTBODY_MESH_16_BIT_INDICES) - l.insert(NxString("NX_SOFTBODY_MESH_16_BIT_INDICES")); - - if (mEnum & NX_SOFTBODY_MESH_TEARABLE) - l.insert(NxString("NX_SOFTBODY_MESH_TEARABLE")); - - return l; - -} - -//////////////////////////////////////////////////////////////////////////////////////////////// - -StringList EnumsBlueprint::AsNxSoftBodyVertexFlags() { - - StringList l; - -#if 0 - if (mEnum & NX_SOFTBODY_VERTEX_DUMMY0) - l.insert(NxString("NX_SOFTBODY_VERTEX_DUMMY0")); - - if (mEnum & NX_SOFTBODY_VERTEX_DUMMY1) - l.insert(NxString("NX_SOFTBODY_VERTEX_DUMMY1")); - - if (mEnum & NX_SOFTBODY_VERTEX_DUMMY2) - l.insert(NxString("NX_SOFTBODY_VERTEX_DUMMY2")); - - if (mEnum & NX_SOFTBODY_VERTEX_DUMMY3) - l.insert(NxString("NX_SOFTBODY_VERTEX_DUMMY3")); - - if (mEnum & NX_SOFTBODY_VERTEX_DUMMY4) - l.insert(NxString("NX_SOFTBODY_VERTEX_DUMMY4")); - - if (mEnum & NX_SOFTBODY_VERTEX_DUMMY5) - l.insert(NxString("NX_SOFTBODY_VERTEX_DUMMY5")); - - if (mEnum & NX_SOFTBODY_VERTEX_DUMMY6) - l.insert(NxString("NX_SOFTBODY_VERTEX_DUMMY6")); -#endif - - if (mEnum & NX_SOFTBODY_VERTEX_TEARABLE) - l.insert(NxString("NX_SOFTBODY_VERTEX_TEARABLE")); - - return l; - -} - -//////////////////////////////////////////////////////////////////////////////////////////////// - -StringList EnumsBlueprint::AsNxSoftBodyFlag() { - - StringList l; - - -#if 0 - if (mEnum & NX_SBF_DUMMY0) - l.insert(NxString("NX_SBF_DUMMY0")); -#endif - - if (mEnum & NX_SBF_STATIC) - l.insert(NxString("NX_SBF_STATIC")); - - if (mEnum & NX_SBF_DISABLE_COLLISION) - l.insert(NxString("NX_SBF_DISABLE_COLLISION")); - - if (mEnum & NX_SBF_SELFCOLLISION) - l.insert(NxString("NX_SBF_SELFCOLLISION")); - - if (mEnum & NX_SBF_VISUALIZATION) - l.insert(NxString("NX_SBF_VISUALIZATION")); - - if (mEnum & NX_SBF_GRAVITY) - l.insert(NxString("NX_SBF_GRAVITY")); - - if (mEnum & NX_SBF_VOLUME_CONSERVATION) - l.insert(NxString("NX_SBF_VOLUME_CONSERVATION")); - - if (mEnum & NX_SBF_DAMPING) - l.insert(NxString("NX_SBF_DAMPING")); - - if (mEnum & NX_SBF_COLLISION_TWOWAY) - l.insert(NxString("NX_SBF_COLLISION_TWOWAY")); - - if (mEnum & NX_SBF_TEARABLE) - l.insert(NxString("NX_SBF_TEARABLE")); - - if (mEnum & NX_SBF_HARDWARE) - l.insert(NxString("NX_SBF_HARDWARE")); - - if (mEnum & NX_SBF_COMDAMPING) - l.insert(NxString("NX_SBF_COMDAMPING")); - - if (mEnum & NX_SBF_VALIDBOUNDS) - l.insert(NxString("NX_SBF_VALIDBOUNDS")); - - if (mEnum & NX_SBF_FLUID_COLLISION) - l.insert(NxString("NX_SBF_FLUID_COLLISION")); - -#if NX_SDK_VERSION_NUMBER >= 280 - if (mEnum & NX_SBF_ADHERE) - l.insert(NxString("NX_SBF_ADHERE")); -#endif - - return l; - -} - -//////////////////////////////////////////////////////////////////////////////////////////////// - -StringList EnumsBlueprint::AsNxSoftBodyAttachmentFlag() { - - StringList l; - - if (mEnum & NX_SOFTBODY_ATTACHMENT_TWOWAY) - l.insert(NxString("NX_SOFTBODY_ATTACHMENT_TWOWAY")); - - if (mEnum & NX_SOFTBODY_ATTACHMENT_TEARABLE) - l.insert(NxString("NX_SOFTBODY_ATTACHMENT_TEARABLE")); - - return l; - -} - -//////////////////////////////////////////////////////////////////////////////////////////////// - -StringList EnumsBlueprint::AsNxMeshDataFlags() { - - StringList l; - - if (mEnum & NX_MDF_16_BIT_INDICES) - l.insert(NxString("NX_MDF_16_BIT_INDICES")); - - return l; - -} - -//////////////////////////////////////////////////////////////////////////////////////////////// - -StringList EnumsBlueprint::AsNxCombineMode() { - - StringList l; - - if (mEnum & NX_CM_AVERAGE) - l.insert(NxString("NX_CM_AVERAGE")); - - if (mEnum & NX_CM_MIN) - l.insert(NxString("NX_CM_MIN")); - - if (mEnum & NX_CM_MULTIPLY) - l.insert(NxString("NX_CM_MULTIPLY")); - - if (mEnum & NX_CM_MAX) - l.insert(NxString("NX_CM_MAX")); - - return l; - -} - -//////////////////////////////////////////////////////////////////////////////////////////////// - -StringList EnumsBlueprint::AsNxMaterialFlag() { - - StringList l; - - if (mEnum & NX_MF_ANISOTROPIC) - l.insert(NxString("NX_MF_ANISOTROPIC")); - -#if 0 - if (mEnum & NX_MF_DUMMY1) - l.insert(NxString("NX_MF_DUMMY1")); - - if (mEnum & NX_MF_DUMMY2) - l.insert(NxString("NX_MF_DUMMY2")); - - if (mEnum & NX_MF_DUMMY3) - l.insert(NxString("NX_MF_DUMMY3")); -#endif - - if (mEnum & NX_MF_DISABLE_FRICTION) - l.insert(NxString("NX_MF_DISABLE_FRICTION")); - - if (mEnum & NX_MF_DISABLE_STRONG_FRICTION) - l.insert(NxString("NX_MF_DISABLE_STRONG_FRICTION")); - - return l; - -} - -//////////////////////////////////////////////////////////////////////////////////////////////// - -StringList EnumsBlueprint::AsNxMeshShapeFlag() { - - StringList l; - - if (mEnum & NX_MESH_SMOOTH_SPHERE_COLLISIONS) - l.insert(NxString("NX_MESH_SMOOTH_SPHERE_COLLISIONS")); - - if (mEnum & NX_MESH_DOUBLE_SIDED) - l.insert(NxString("NX_MESH_DOUBLE_SIDED")); - - return l; - -} - -//////////////////////////////////////////////////////////////////////////////////////////////// - -StringList EnumsBlueprint::AsNxPruningStructure() { - - StringList l; - - if (mEnum & NX_PRUNING_NONE) - l.insert(NxString("NX_PRUNING_NONE")); - - if (mEnum & NX_PRUNING_OCTREE) - l.insert(NxString("NX_PRUNING_OCTREE")); - - if (mEnum & NX_PRUNING_QUADTREE) - l.insert(NxString("NX_PRUNING_QUADTREE")); - - if (mEnum & NX_PRUNING_DYNAMIC_AABB_TREE) - l.insert(NxString("NX_PRUNING_DYNAMIC_AABB_TREE")); - - if (mEnum & NX_PRUNING_STATIC_AABB_TREE) - l.insert(NxString("NX_PRUNING_STATIC_AABB_TREE")); - - - return l; - -} - -//////////////////////////////////////////////////////////////////////////////////////////////// - -StringList EnumsBlueprint::AsNxThreadPriority() { - - StringList l; - - if (mEnum & NX_TP_HIGH) - l.insert(NxString("NX_TP_HIGH")); - - if (mEnum & NX_TP_ABOVE_NORMAL) - l.insert(NxString("NX_TP_ABOVE_NORMAL")); - - if (mEnum & NX_TP_NORMAL) - l.insert(NxString("NX_TP_NORMAL")); - - if (mEnum & NX_TP_BELOW_NORMAL) - l.insert(NxString("NX_TP_BELOW_NORMAL")); - - if (mEnum & NX_TP_LOW) - l.insert(NxString("NX_TP_LOW")); - - return l; - -} - -//////////////////////////////////////////////////////////////////////////////////////////////// - -StringList EnumsBlueprint::AsNxSimulationType() { - - StringList l; - - if (mEnum & NX_SIMULATION_HW) - l.insert(NxString("NX_SIMULATION_HW")); - - if (mEnum & NX_SIMULATION_SW) - l.insert(NxString("NX_SIMULATION_SW")); - - return l; - -} - -//////////////////////////////////////////////////////////////////////////////////////////////// - -StringList EnumsBlueprint::AsNxTimeStepMethod() { - - StringList l; - - if (mEnum & NX_TIMESTEP_FIXED) - l.insert(NxString("NX_TIMESTEP_FIXED")); - - if (mEnum & NX_TIMESTEP_VARIABLE) - l.insert(NxString("NX_TIMESTEP_VARIABLE")); - - if (mEnum & NX_TIMESTEP_INHERIT) - l.insert(NxString("NX_TIMESTEP_INHERIT")); - - return l; - -} - -//////////////////////////////////////////////////////////////////////////////////////////////// - -StringList EnumsBlueprint::AsNxFilterOp() { - - StringList l; - - if (mEnum & NX_FILTEROP_AND) - l.insert(NxString("NX_FILTEROP_AND")); - - if (mEnum & NX_FILTEROP_OR) - l.insert(NxString("NX_FILTEROP_OR")); - - if (mEnum & NX_FILTEROP_XOR) - l.insert(NxString("NX_FILTEROP_XOR")); - - if (mEnum & NX_FILTEROP_NAND) - l.insert(NxString("NX_FILTEROP_NAND")); - - if (mEnum & NX_FILTEROP_NOR) - l.insert(NxString("NX_FILTEROP_NOR")); - - if (mEnum & NX_FILTEROP_NXOR) - l.insert(NxString("NX_FILTEROP_NXOR")); - - if (mEnum & NX_FILTEROP_SWAP_AND) - l.insert(NxString("NX_FILTEROP_SWAP_AND")); - - return l; - -} - -//////////////////////////////////////////////////////////////////////////////////////////////// - -} //End of Serialiser namespace. -} //End of NxOgre namespace. Deleted: trunk/python-ogre/ThirdParty/nxogre/NxOgreEnumsBlueprint.h =================================================================== --- trunk/python-ogre/ThirdParty/nxogre/NxOgreEnumsBlueprint.h 2008-06-20 06:57:55 UTC (rev 599) +++ trunk/python-ogre/ThirdParty/nxogre/NxOgreEnumsBlueprint.h 2008-06-22 02:07:48 UTC (rev 600) @@ -1,136 +0,0 @@ -// -// NxOgre a wrapper for the PhysX (formerly Novodex) physics library and the Ogre 3D rendering engine. -// Copyright (C) 2005 - 2007 Robin Southern and NxOgre.org http://www.nxogre.org -// -// This library 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.1 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 -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -// - -#ifndef __NXOGRE_ENUMS_BLUEPRINT_H__ -#define __NXOGRE_ENUMS_BLUEPRINT_H__ - -#include "NxOgrePrerequisites.h" -#include "NxOgreBlueprint.h" - -namespace NxOgre { - - namespace Blueprints { - - class NxExport EnumsBlueprint : public Blueprint { - - public: - - enum EnumType { - FT_Unknown, - FT_NxActorFlag, - FT_NxBodyFlag, - FT_NxShapeFlag, - FT_NxCapsuleShapeFlag, - FT_NxWheelShapeFlags, - FT_NxMeshPagingMode, - FT_NxJointFlag, - FT_NxD6JointMotion, - FT_NxD6JointDriveType, - FT_NxJointProjectionMode, - FT_NxD6JointFlag, - FT_NxDistanceJointFlag, - FT_NxRevoluteJointFlag, - FT_NxSphericalJointFlag, - FT_NxPulleyJointFlag, - FT_NxContactPairFlag, - FT_NxFluidSimulationMethod, - FT_NxFluidCollisionMethod, - FT_NxFluidFlag, - FT_NxEmitterType, - FT_NxEmitterShape, - FT_NxFluidEmitterFlag, - FT_NxClothFlag, - FT_NxForceFieldCoordinates, - FT_NxSceneFlags, - FT_NxSoftBodyMeshFlags, - FT_NxSoftBodyVertexFlags, - FT_NxSoftBodyFlag, - FT_NxSoftBodyAttachmentFlag, - FT_NxMeshDataFlags, - FT_NxCombineMode, - FT_NxMaterialFlag, - FT_NxMeshShapeFlag, - FT_NxPruningStructure, - FT_NxThreadPriority, - FT_NxSimulationType, - FT_NxTimeStepMethod, - FT_NxFilterOp - }; - - EnumsBlueprint(){mType = FT_Unknown; mEnum = 0;} - EnumsBlueprint(EnumType); - EnumsBlueprint(EnumType, NxU32 flag); - - void toDefault(); - void empty(); - void serialise(); - NxU32 getFlag() {return mEnum;} - void setFlag(EnumType t, NxU32 f) {mType = t;mEnum = f;} - void setFlag(NxU32 f) {mEnum = f;} - - StringList asStringPairList(); - - StringList AsNxActorFlag(); - StringList AsNxBodyFlag(); - StringList AsNxShapeFlag(); - StringList AsNxCapsuleShapeFlag(); - StringList AsNxWheelShapeFlags(); - StringList AsNxMeshPagingMode(); - StringList AsNxJointFlag(); - StringList AsNxD6JointMotion(); - StringList AsNxD6JointDriveType(); - StringList AsNxJointProjectionMode(); - StringList AsNxD6JointFlag(); - StringList AsNxDistanceJointFlag(); - StringList AsNxRevoluteJointFlag(); - StringList AsNxSphericalJointFlag(); - StringList AsNxPulleyJointFlag(); - StringList AsNxContactPairFlag(); - StringList AsNxFluidSimulationMethod(); - StringList AsNxFluidCollisionMethod(); - StringList AsNxFluidFlag(); - StringList AsNxEmitterType(); - StringList AsNxEmitterShape(); - StringList AsNxFluidEmitterFlag(); - StringList AsNxClothFlag(); - StringList AsNxForceFieldCoordinates(); - StringList AsNxSceneFlags(); - StringList AsNxSoftBodyMeshFlags(); - StringList AsNxSoftBodyVertexFlags(); - StringList AsNxSoftBodyFlag(); - StringList AsNxSoftBodyAttachmentFlag(); - StringList AsNxMeshDataFlags(); - StringList AsNxCombineMode(); - StringList AsNxMaterialFlag(); - StringList AsNxMeshShapeFlag(); - StringList AsNxPruningStructure(); - StringList AsNxThreadPriority(); - StringList AsNxSimulationType(); - StringList AsNxTimeStepMethod(); - StringList AsNxFilterOp(); - - - NxU32 mEnum; - EnumType mType; - }; - - }; // End of namespace -};// End of namespace - -#endif Deleted: trunk/python-ogre/ThirdParty/nxogre/NxOgreParametersBlueprint.h =================================================================== --- trunk/python-ogre/ThirdParty/nxogre/NxOgreParametersBlueprint.h 2008-06-20 06:57:55 UTC (rev 599) +++ trunk/python-ogre/ThirdParty/nxogre/NxOgreParametersBlueprint.h 2008-06-22 02:07:48 UTC (rev 600) @@ -1,43 +0,0 @@ -// -// NxOgre a wrapper for the PhysX (formerly Novodex) physics library and the Ogre 3D rendering engine. -// Copyright (C) 2005 - 2007 Robin Southern and NxOgre.org http://www.nxogre.org -// -// This library 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.1 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 -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -// - -#ifndef __NXOGRE_FLAGS_BLUEPRINT_H__ -#define __NXOGRE_FLAGS_BLUEPRINT_H__ - -#include "NxOgrePrerequisites.h" - -namespace NxOgre { - - namespace Blueprints { - - class NxExport Blueprint { - - public: - - void toDefault(); - void empty(); - void unserialise(); - void serialise(); - - }; - - }; // End of namespace -};// End of namespace - -#endif Deleted: trunk/python-ogre/ThirdParty/nxogre/NxOgreSceneBlueprint.cpp =================================================================== --- trunk/python-ogre/ThirdParty/nxogre/NxOgreSceneBlueprint.cpp 2008-06-20 06:57:55 UTC (rev 599) +++ trunk/python-ogre/Thi... [truncated message content] |
From: <and...@us...> - 2008-06-22 06:25:05
|
Revision: 602 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=602&view=rev Author: andy_miller Date: 2008-06-21 23:25:12 -0700 (Sat, 21 Jun 2008) Log Message: ----------- Added missing nxogre files Added Paths: ----------- trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacter.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacter.h trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterController.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterController.h trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterModel.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterModel.h trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterMovementModel.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterMovementModel.h trunk/python-ogre/ThirdParty/nxogre/NxOgreKinematicCharacter.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreKinematicCharacter.h trunk/python-ogre/ThirdParty/nxogre/NxOgreKinematicCharacterSweep.h Added: trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacter.cpp =================================================================== --- trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacter.cpp (rev 0) +++ trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacter.cpp 2008-06-22 06:25:12 UTC (rev 602) @@ -0,0 +1,186 @@ +/** \file NxOgreCharacter.cpp + * \see NxOgreCharacter.h + * \version 1.0-20 + * + * \licence NxOgre a wrapper for the PhysX physics library. + * Copyright (C) 2005-8 Robin Southern of NxOgre.org http://www.nxogre.org + * This library 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.1 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "NxOgreStable.h" + +#if (NX_USE_LEGACY_NXCONTROLLER == 0) + +#include "NxOgreCharacter.h" +#include "NxOgreScene.h" +#include "NxOgreNxActorController.h" +#include "NxOgreKinematicCharacter.h" + +#include "NxOgreCharacterModel.h" +#include "NxOgreCharacterMovementModel.h" + +#include "NxOgreVoidPointer.h" +#include "NxOgreTimeStep.h" + +namespace NxOgre { +namespace CharacterSystem { + +///////////////////////////////////////////////////////////// + +void CharacterParams::setToDefault() { + +#if (NX_USE_CHARACTER_API == 1) + mControllerType = CT_KINEMATIC; +#else + mControllerType = CT_NXACTOR; +#endif + + mControllerPtr = 0; + mStepOffset = 0.0f; + mSlopeLimit = 0.0f; + mUpDirection = NX_AXIS_PLUS_Y; + //mGroupMask; + mControllerCollisionShape = 0; + +} + +///////////////////////////////////////////////////////////// + +Character::Character(const NxString& identifier, Pose pose, CharacterModel* model, CharacterParams params, Scene* scene) +: mName(identifier), mModel(model), mOwner(scene), mVoidPointer(0) +{ + + if (model == 0) { + NxThrow("Character Model pointer is null!"); + mDead = true; + return; + } + + if (params.mControllerType == params.CT_PTR && params.mControllerPtr == 0) { + NxThrow("ControllerType is custom but given pointer is null!"); + mDead = true; + return; + } + + mVoidPointer = new VoidPointer(this, NxOgreClass_Character); + + // (TODO) Pass on voidpointer to controllers here. + if (params.mControllerType == CharacterParams::CT_NXACTOR) { + mController = NxNew(NxActorController)(pose, params.mControllerCollisionShape, scene, mVoidPointer); + } +#if (NX_USE_CHARACTER_API == 1) + else if (params.mControllerType == CharacterParams::CT_KINEMATIC) { + mController = NxNew(KinematicCharacter)(pose, params.mControllerCollisionShape, scene, mVoidPointer); + } +#endif + else { + mController = params.mControllerPtr; + NxWatch(CharacterController, mController); + } + + // Watch Model and set the garbage collection mode. + NxWatch(CharacterModel, mModel); + mModel->setGC(); + + // Current movement model to default. + mCurrentMovement = mModel->mDefaultMovementModel; + + // Reset all movemenet models to this. + for (CharacterMovementModel* model = mModel->mMovementModels.begin(); model = mModel->mMovementModels.next();) { + model->reset(this); + } + + mCurrentMovement->enter(0, mController->getPose()); + + mOwner->_registerCharacter(mName, this); +} + +///////////////////////////////////////////////////////////// + +Character::~Character() { + + mOwner->_unregisterCharacter(mName); + + mCurrentMovement->exit(); + + // Delete bleh bleh here. + if (mModel->mDeletionPolicy == GC_Delete) + NxDelete(mModel); + + + delete mController; + delete mVoidPointer; + +} + +///////////////////////////////////////////////////////////// + +void Character::simulate(const TimeStep& ts) { + + mCurrentMovement->simulate(ts.Delta); + + // get new movement vector + const NxVec3 movementVector = mCurrentMovement->getGlobalMovementVector(ts.Delta); + + // get controller to move that vector. + mController->move(movementVector); + + mCurrentMovement->setPose(mController->getPose()); + mCurrentMovement->simulateAfter(ts.Delta); + +} + +///////////////////////////////////////////////////////////// + +void Character::forward() { + mCurrentMovement->forward(); +} + +///////////////////////////////////////////////////////////// + +void Character::backward() { + mCurrentMovement->backward(); +} + +///////////////////////////////////////////////////////////// + +void Character::left() { + mCurrentMovement->left(); +} + +///////////////////////////////////////////////////////////// + +void Character::right() { + mCurrentMovement->right(); +} + +///////////////////////////////////////////////////////////// + +void Character::up() { + mCurrentMovement->up(); +} + +///////////////////////////////////////////////////////////// + +void Character::down() { + mCurrentMovement->down(); +} + +///////////////////////////////////////////////////////////// + +}; // End of Character namespace. +}; // End of NxOgre namespace. + +#endif Added: trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacter.h =================================================================== --- trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacter.h (rev 0) +++ trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacter.h 2008-06-22 06:25:12 UTC (rev 602) @@ -0,0 +1,199 @@ +/** \file NxOgreCharacter.h + * \brief Header for the CharacterParams and Character classes. + * \version 1.0-20 + * + * \licence NxOgre a wrapper for the PhysX physics library. + * Copyright (C) 2005-8 Robin Southern of NxOgre.org http://www.nxogre.org + * This library 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.1 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef __NXOGRE_CHARACTER_H__ +#define __NXOGRE_CHARACTER_H__ + +#include "NxOgrePrerequisites.h" + +#if (NX_USE_LEGACY_NXCONTROLLER == 0) + +#include "NxOgreParams.h" +#include "NxOgrePose.h" + +namespace NxOgre { +namespace CharacterSystem { + + + class NxPublicClass CharacterParams : public Params { + + public: + + CharacterParams() { + setToDefault(); + } + + CharacterParams(const char* p) { + process(p); + } + + CharacterParams(NxString p) { + process(p); + } + + void setToDefault(); + + enum ControllerType { +#if (NX_USE_CHARACTER_API == 1) + CT_KINEMATIC, +#endif + CT_NXACTOR, + CT_PTR + }; + + ControllerType mControllerType; + CharacterController* mControllerPtr; + + NxReal mStepOffset; + NxRadian mSlopeLimit; + NxAxisType mUpDirection; + NxGroupsMask mGroupMask; + + /** \brief Collision shape for NxActor and NxCharacter controllers. + \note The function "setToDefault" sets the pointer to zero. You + have to assign one after setting the basic params using + the new operator or the SimpleShape::createShapeFromString method + + \see Controllers for what shapes they can and cannot use + \see SimpleShape::createShapeFromString + + + */ + + SimpleShape* mControllerCollisionShape; + + + }; + + ///////////////////////////////////////////////////////// + + /** Character + + */ + class NxPublicClass Character { + + public: + + enum LocalMovementDirection { + LMD_FORWARD = 0, + LMD_BACKWARD = 1, + LMD_LEFT = 2, + LMD_RIGHT = 3, + LMB_UP = 4, + LMB_DOWN = 5 + }; + + Character(const NxString& identifier, Pose, CharacterModel*, CharacterParams, Scene*); + virtual ~Character(); + + NxString getName() const {return mName;} + + virtual void simulate(const TimeStep&); + + CharacterController* getController() const { + return mController; + } + + CharacterModel* getModel() const { + return mModel; + } + + CharacterMovementModel* getCurrentMovementModel() const { + return mCurrentMovement; + } + + void setModel(CharacterModel* newModel) { + mModel = newModel; + resetMovement(); + } + + void resetMovement() {} + void setMovement(NxString movement); + void setMovement(Ogre::Vector3 movementVector); + void setLocalMovement(Ogre::Vector3 movementVector); + + inline void forward(); + inline void backward(); + inline void left(); + inline void right(); + inline void up(); + inline void down(); + + void injectMovement(LocalMovementDirection); + void setDirection(const NxQuat& orientation); + void setDirection(const Ogre::Quaternion& orientation); + void moveTowards(Ogre::Vector3 globalPosition, NxReal force); + void setYaw(NxRadian Yaw); + void setYaw(Ogre::Radian Yaw); + void setPitch(NxRadian Pitch); + void setPitch(Ogre::Radian Pitch); + void setRoll(NxRadian Roll); + void setRoll(Ogre::Radian Roll); + + + /** \brief Forces height to a new one, without a transitional movement period. + Forces the local height of the character shape to a new one whilst moving + the character to half-height below. + + \param height Height of the character + */ + void setHeight(NxReal height); + + + /** \brief Forces height to a new one, with a transitional movement period. + Forces the local height of the character shape to a new one whilst leaving it + at the existing position. Naturaly gravity or a custom vector will kick in and + move the character into the correct new position over the upcoming frames. + + \param height Height of the character + */ + void changeHeight(NxReal height); + + void setSize(const NxVec3& size); + void setSize(const float2& size); + + void setGravityEnabled(bool); + bool isGravityEnabled(); + + bool isDead() const {return mDead;} + + protected: + + CharacterController* mController; + CharacterModel* mModel; + CharacterMovementModel* mCurrentMovement; + + NxString mName; + Scene* mOwner; + VoidPointer* mVoidPointer; + + private: + + bool mDead; + + }; + + //////////////////////////////////////////// +};// End of CharacterSystem +};// End of namespace + +#endif +#endif Added: trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterController.cpp =================================================================== --- trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterController.cpp (rev 0) +++ trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterController.cpp 2008-06-22 06:25:12 UTC (rev 602) @@ -0,0 +1,45 @@ +/** \file NxOgreCharacterController.cpp + * \see NxOgreCharacterController.h + * \version 1.0-20 + * + * \licence NxOgre a wrapper for the PhysX physics library. + * Copyright (C) 2005-8 Robin Southern of NxOgre.org http://www.nxogre.org + * This library 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.1 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "NxOgreStable.h" + +#include "NxOgreCharacterController.h" + +namespace NxOgre { +namespace CharacterSystem { + +//////////////////////////////////////////////////// + +CharacterController::CharacterController(Scene* scene, VoidPointer*) +: mScene(scene) { + +} + +//////////////////////////////////////////////////// + +CharacterController::~CharacterController() { + +} + +//////////////////////////////////////////////////// + +}; // End of CharacterSystem namespace. +}; // End of NxOgre namespace. Added: trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterController.h =================================================================== --- trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterController.h (rev 0) +++ trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterController.h 2008-06-22 06:25:12 UTC (rev 602) @@ -0,0 +1,96 @@ +/** \file NxOgreCharacterController.h + * \brief Header for the CharacterController class. + * \version 1.0-20 + * + * \licence NxOgre a wrapper for the PhysX physics library. + * Copyright (C) 2005-8 Robin Southern of NxOgre.org http://www.nxogre.org + * This library 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.1 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + +#ifndef __NXOGRE_CHARACTER_CONTROLLER_H__ +#define __NXOGRE_CHARACTER_CONTROLLER_H__ + +#include "NxOgrePrerequisites.h" + +#if (NX_USE_LEGACY_NXCONTROLLER == 0) + +namespace NxOgre { +namespace CharacterSystem { + + class NxPublicClass CharacterController { + + friend class Character; + + public: + + CharacterController(Scene*, VoidPointer*); + virtual ~CharacterController(); + + virtual NxActorGroup getActorGroup() {return 0;} + virtual NxCollisionGroup getCollisionGroup() {return 0;} + + virtual void setActorGroup(NxActorGroup) {} + virtual void setCollisionGroup(NxCollisionGroup) {} + + virtual void init(NxMat34 pose) {} + + virtual void move(const NxVec3& direction) {} + + virtual void setPosition(const NxVec3& position) {} + virtual NxVec3 getPosition() const {return NxVec3(0,0,0);} + + virtual void setOrientation(const NxQuat& orientation) {} + virtual NxQuat getOrientation() const {NxQuat quat;quat.id();return quat;} + + virtual NxMat34 getPose() const {NxMat34 m;m.id();return m;} + + virtual void setSize(const NxVec3& size) {} + virtual void getSize(NxVec3& size) {} + + virtual void setSize(const float2& size) {} + virtual void getSize(float2& size) {} + + virtual void setStepSize(NxReal stepSize) {} + virtual NxReal getStepSize() const {return 0;} + + virtual void setSlopeLimit(NxRadian slopeLimit) {} + virtual NxRadian getSlopeLimit() const {return 0;} + + virtual void setGravityEnabled(bool gravity) {} + virtual bool getGravityEnabled() const {return false;} + + virtual void setUpDirection(NxVec3 upDirection) {} + virtual NxVec3 getUpDirection() const {return NxVec3(0,0,0);} + + + virtual NxString getType() { return NxString("CharacterController"); }; + + ///////////////////////////////////////////////// + + Scene* mScene; + + private: + + + }; + + //////////////////////////////////////////// + +};// End of CharacterSystem namespace. +};// End of NxOgre namespace. + +#endif +#endif Added: trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterModel.cpp =================================================================== --- trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterModel.cpp (rev 0) +++ trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterModel.cpp 2008-06-22 06:25:12 UTC (rev 602) @@ -0,0 +1,26 @@ +/** \file NxOgreCharacterModel.cpp + * \see NxOgreCharacterModel.h + * \version 1.0-20 + * + * \licence NxOgre a wrapper for the PhysX physics library. + * Copyright (C) 2005-8 Robin Southern of NxOgre.org http://www.nxogre.org + * This library 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.1 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "NxOgreStable.h" + +#if (NX_USE_LEGACY_NXCONTROLLER == 0) +# include "NxOgreCharacterModel.h" +#endif Added: trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterModel.h =================================================================== --- trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterModel.h (rev 0) +++ trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterModel.h 2008-06-22 06:25:12 UTC (rev 602) @@ -0,0 +1,63 @@ +/** \file NxOgreCharacterModel.h + * \brief Header for the CharacterModel class. + * \version 1.0-20 + * + * \licence NxOgre a wrapper for the PhysX physics library. + * Copyright (C) 2005-8 Robin Southern of NxOgre.org http://www.nxogre.org + * This library 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.1 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef __NXOGRE_CHARACTER_MODEL_H__ +#define __NXOGRE_CHARACTER_MODEL_H__ + +#include "NxOgrePrerequisites.h" + +#if (NX_USE_LEGACY_NXCONTROLLER == 0) + +#include "NxOgreContainer.h" + +namespace NxOgre { +namespace CharacterSystem { + + class NxPublicClass CharacterModel { + + friend class Character; + + public: + + virtual ~CharacterModel() {} + + CharacterMovementModel* mDefaultMovementModel; + CharacterMovementModels mMovementModels; + + protected: + + virtual void setGC() { + mDeletionPolicy = GC_Delete; + } + + GarbageCollectionPolicy mDeletionPolicy; + + private: + + }; + + //////////////////////////////////////////// + +}; // End of CharacterSystem namespace. +}; // End of NxOgre namespace. + +#endif +#endif Added: trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterMovementModel.cpp =================================================================== --- trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterMovementModel.cpp (rev 0) +++ trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterMovementModel.cpp 2008-06-22 06:25:12 UTC (rev 602) @@ -0,0 +1,28 @@ +/** \file NxOgreCharacterMovementModel.cpp + * \see NxOgreCharacterMovementModel.h + * \version 1.0-20 + * + * \licence NxOgre a wrapper for the PhysX physics library. + * Copyright (C) 2005-8 Robin Southern of NxOgre.org http://www.nxogre.org + * This library 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.1 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ +#include "NxOgreStable.h" + +#if (NX_USE_LEGACY_NXCONTROLLER == 0) + +#include "NxOgreCharacterMovementModel.h" + + +#endif Added: trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterMovementModel.h =================================================================== --- trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterMovementModel.h (rev 0) +++ trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterMovementModel.h 2008-06-22 06:25:12 UTC (rev 602) @@ -0,0 +1,95 @@ +/** \file NxOgreCharacterMovementModel.h + * \brief Header for the CharacterMovementModel class. + * \version 1.0-20 + * + * \licence NxOgre a wrapper for the PhysX physics library. + * Copyright (C) 2005-8 Robin Southern of NxOgre.org http://www.nxogre.org + * This library 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.1 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef __NXOGRE_CHARACTER_MOVEMENT_MODEL_H__ +#define __NXOGRE_CHARACTER_MOVEMENT_MODEL_H__ + +#include "NxOgrePrerequisites.h" + +#if (NX_USE_LEGACY_NXCONTROLLER == 0) + +#include "NxOgreHelpers.h" + +namespace NxOgre { +namespace CharacterSystem { + + class NxPublicClass CharacterMovementModel { + + public: + + virtual void enter(CharacterMovementModel* from, NxMat34 pose) {mPose = pose;mMovement.zero();mOrientation.id();} + virtual NxMat34 exit() {return mPose;} + + virtual void simulate(NxReal dTime) {} + virtual void simulateAfter(NxReal dTime) {} + virtual void reset(Character* c) {mCharacter = c;}// mPose = c->getPose();} + virtual void forward() {} + virtual void backward() {} + virtual void left() {} + virtual void right() {} + virtual void up() {} + virtual void down() {} + + virtual void setYaw(NxRadian yaw) { + // mOrientation + } + + void setPose(NxMat34 pose) {mPose = pose;} + virtual void setPitch(NxRadian pitch) {} + virtual void setRoll(NxRadian roll) {} + + virtual void setOrientation(NxQuat orientation) {} + virtual NxQuat getOrientation() { NxQuat quat; + mPose.M.toQuat(quat); + return quat;} + + virtual NxString getType() {return NxString("Default");} + + virtual NxVec3 getGlobalMovementVector(NxReal dT) { + return (mOrientation * mMovement) * dT; + } + + virtual NxVec3 getMovementVector() { + return mMovement; + } + + virtual NxQuat getGlobalOrientation() { + return mOrientation; + } + + protected: + + Character* mCharacter; + NxMat34 mPose; + NxVec3 mMovement; + NxQuat mOrientation; + + private: + + }; + + //////////////////////////////////////////// + +}; // End of CharacterSystem namespace. +}; // End of NxOgre namespace. + +#endif +#endif Added: trunk/python-ogre/ThirdParty/nxogre/NxOgreKinematicCharacter.cpp =================================================================== --- trunk/python-ogre/ThirdParty/nxogre/NxOgreKinematicCharacter.cpp (rev 0) +++ trunk/python-ogre/ThirdParty/nxogre/NxOgreKinematicCharacter.cpp 2008-06-22 06:25:12 UTC (rev 602) @@ -0,0 +1,204 @@ +/** \file NxOgreKinematicCharacter.cpp + * \see NxOgreKinematicCharacter.h + * \version 1.0-21 + * + * \licence NxOgre a wrapper for the PhysX physics library. + * Copyright (C) 2005-8 Robin Southern of NxOgre.org http://www.nxogre.org + * This library 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.1 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "NxOgreStable.h" + +#if (NX_USE_LEGACY_NXCONTROLLER == 0) + +#include "NxOgreKinematicCharacter.h" +#include "NxOgreSimpleShape.h" +#include "NxOgreVoidPointer.h" +#include "NxOgreScene.h" + +// BoxController.cpp, 42 +#define NX_KINEMATIC_CHARACTER_SHAPE_DELTA 0.8 + +namespace NxOgre { +namespace CharacterSystem { + +//////////////////////////////////////////////////// + +KinematicCharacter::KinematicCharacter(NxMat34 pose, SimpleShape* shape, Scene* scene, VoidPointer* vptr) +: CharacterController(scene, vptr), mActor(0), mUserData(0), mShapeUserData(0) +{ + NxActorDesc a_desc; + NxBodyDesc b_desc; + a_desc.body = &b_desc; + + if (shape->getType() == SimpleShape::SST_Box) { + + SimpleBox* box = shape->getAsBox(); + NxBoxShapeDesc shape_desc; + shape_desc.dimensions = (box->getDimensionsAsNxVec3() * 0.5f) * NX_KINEMATIC_CHARACTER_SHAPE_DELTA; + mShapeUserData = NxNew(VoidPointer)(vptr->Ptr, NxOgreClass_CharacterShape, vptr->RenderPtr); + shape_desc.userData = mShapeUserData; + a_desc.shapes.pushBack(&shape_desc); + + } + else if (shape->getType() == SimpleShape::SST_Capsule) { + + SimpleCapsule* capsule = shape->getAsCapsule(); + NxCapsuleShapeDesc shape_desc; + shape_desc.radius = capsule->getRadius() * NX_KINEMATIC_CHARACTER_SHAPE_DELTA; + shape_desc.height = capsule->getHeight() * NX_KINEMATIC_CHARACTER_SHAPE_DELTA; + mShapeUserData = NxNew(VoidPointer)(vptr->Ptr, NxOgreClass_CharacterShape, vptr->RenderPtr); + shape_desc.userData = mShapeUserData; + a_desc.shapes.pushBack(&shape_desc); + + } + else { + NxThrow("Invalid shape passed to KinematicCharacter must be capsule or box"); + return; + } + + a_desc.density = 10.0f; + a_desc.globalPose = pose; + b_desc.flags |= NX_BF_KINEMATIC; + a_desc.userData = (void*) vptr; + + NxDelete(shape); + + mActor = mScene->getNxScene()->createActor(a_desc); + +} + +//////////////////////////////////////////////////// + +KinematicCharacter::~KinematicCharacter() { + NxDelete(mShapeUserData); + if (mActor) + mScene->getNxScene()->releaseActor(*mActor); +} + +//////////////////////////////////////////////////// + +void KinematicCharacter::init(NxMat34 pose) { + // move mActor to pose. +} + +//////////////////////////////////////////////////// + +void KinematicCharacter::move(const NxVec3& direction) { + // Ahhh. So temp, so very temp. + mActor->moveGlobalPosition(getPosition() + direction); +} + +//////////////////////////////////////////////////// + +void KinematicCharacter::setPosition(const NxVec3& position) { + +} + +//////////////////////////////////////////////////// + +NxVec3 KinematicCharacter::getPosition() const { + // Temp. + return mActor->getGlobalPosition(); +} + +//////////////////////////////////////////////////// + +void KinematicCharacter::setOrientation(const NxQuat& orientation) { + +} + +//////////////////////////////////////////////////// + +NxQuat KinematicCharacter::getOrientation() const { + NxQuat q;q.id(); + return q; +} + +//////////////////////////////////////////////////// + +NxMat34 KinematicCharacter::getPose() const { + // Temp. + return mActor->getGlobalPose(); +} + +//////////////////////////////////////////////////// + +void KinematicCharacter::setSize(const NxVec3& size) { + +} + +//////////////////////////////////////////////////// + +NxVec3 KinematicCharacter::getSize() const { + return NxVec3(0,0,0); +} + +//////////////////////////////////////////////////// + +void KinematicCharacter::setStepSize(NxReal stepSize) { + +} + +//////////////////////////////////////////////////// + +NxReal KinematicCharacter::getStepSize() const { + return 0; +} + +//////////////////////////////////////////////////// + +void KinematicCharacter::setSlopeLimit(NxRadian slopeLimit) { + +} + +//////////////////////////////////////////////////// + +NxRadian KinematicCharacter::getSlopeLimit() const { + return 0; +} + +//////////////////////////////////////////////////// + +void KinematicCharacter::setGravityEnabled(bool gravity) { + +} + +//////////////////////////////////////////////////// + +bool KinematicCharacter::getGravityEnabled() const { + return false; +} + +//////////////////////////////////////////////////// + +void KinematicCharacter::setUpDirection(NxVec3 upDirection) { + +} + +//////////////////////////////////////////////////// + +NxVec3 KinematicCharacter::getUpDirection() const { + return NxVec3(0,0,0); +} + +//////////////////////////////////////////////////// + +}; // End of CharacterSystem namespace. +}; // End of NxOgre namespace. + +#undef NX_KINEMATIC_CHARACTER_SHAPE_DELTA + +#endif Added: trunk/python-ogre/ThirdParty/nxogre/NxOgreKinematicCharacter.h =================================================================== --- trunk/python-ogre/ThirdParty/nxogre/NxOgreKinematicCharacter.h (rev 0) +++ trunk/python-ogre/ThirdParty/nxogre/NxOgreKinematicCharacter.h 2008-06-22 06:25:12 UTC (rev 602) @@ -0,0 +1,107 @@ +/** \file NxOgreKinematicCharacter.h + * \brief Header for the KinematicCharacter class. + * \version 1.0-21 + * + * \licence NxOgre a wrapper for the PhysX physics library. + * Copyright (C) 2005-8 Robin Southern of NxOgre.org http://www.nxogre.org + * This library 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.1 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef __NXOGRE_KINEMATIC_CHARACTER_H__ +#define __NXOGRE_KINEMATIC_CHARACTER_H__ + +#include "NxOgrePrerequisites.h" + +#if (NX_USE_LEGACY_NXCONTROLLER == 0) + +#include "NxOgreCharacterController.h" + +namespace NxOgre { +namespace CharacterSystem { + + /** \brief Kinematic based Character. + */ + class NxPublicClass KinematicCharacter : public CharacterController { + + friend class Character; + + protected: + + KinematicCharacter(NxMat34 pose, SimpleShape*, Scene*, VoidPointer*); + + public: + + virtual ~KinematicCharacter(); + + + NxActorGroup getActorGroup() {return 0;} + NxCollisionGroup getCollisionGroup() {return 0;} + + void setActorGroup(NxActorGroup) {} + void setCollisionGroup(NxCollisionGroup) {} + + NxActor* getActor() { + return mActor; + } + + VoidPointer* getUserData() { + return mUserData; + } + + protected: + + void init(NxMat34 pose); + + void move(const NxVec3& direction); + + void setPosition(const NxVec3& position); + NxVec3 getPosition() const; + + void setOrientation(const NxQuat& orientation); + NxQuat getOrientation() const; + + NxMat34 getPose() const; + + void setSize(const NxVec3& size); + NxVec3 getSize() const; + + void setStepSize(NxReal stepSize); + NxReal getStepSize() const; + + void setSlopeLimit(NxRadian slopeLimit); + NxRadian getSlopeLimit() const; + + void setGravityEnabled(bool gravity); + bool getGravityEnabled() const; + + void setUpDirection(NxVec3 upDirection); + NxVec3 getUpDirection() const; + + virtual NxString getType() const { return NxString("NxActorController"); }; + + private: + + NxActor* mActor; + VoidPointer* mUserData; + VoidPointer* mShapeUserData; + NxVec3 mUpDirection; + + }; + +}; // End of CharacterSystem namespace. +}; // End of NxOgre namespace. + +#endif +#endif Added: trunk/python-ogre/ThirdParty/nxogre/NxOgreKinematicCharacterSweep.h =================================================================== --- trunk/python-ogre/ThirdParty/nxogre/NxOgreKinematicCharacterSweep.h (rev 0) +++ trunk/python-ogre/ThirdParty/nxogre/NxOgreKinematicCharacterSweep.h 2008-06-22 06:25:12 UTC (rev 602) @@ -0,0 +1,41 @@ +/** \file NxOgreKinematicCharacter.h + * \brief Header for the KinematicCharacter class. + * \version 1.0-21 + * + * \licence NxOgre a wrapper for the PhysX physics library. + * Copyright (C) 2005-8 Robin Southern of NxOgre.org http://www.nxogre.org + * This library 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.1 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef __NXOGRE_KINEMATIC_CHARACTER_SWEEP_H__ +#define __NXOGRE_KINEMATIC_CHARACTER_SWEEP_H__ + +#include "NxOgrePrerequisites.h" + +#if (NX_USE_LEGACY_NXCONTROLLER == 0) + +#include "NxOgreCharacterController.h" + +namespace NxOgre { +namespace CharacterSystem { +namespace Kinematic { + // Lots of classes, defines, structs and what not go in here. + +}; // End of Kinematic namespace. +}; // End of CharacterSystem namespace. +}; // End of NxOgre namespace + +#endif +#endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2008-06-22 06:20:15
|
Revision: 601 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=601&view=rev Author: andy_miller Date: 2008-06-21 23:20:23 -0700 (Sat, 21 Jun 2008) Log Message: ----------- Tyring (again) to get my nxogre source cleaned up.. Removed Paths: ------------- trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacter.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacter.h trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterController.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterController.h trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterModel.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterModel.h trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterMovementModel.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterMovementModel.h trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterSystem.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterSystem.h trunk/python-ogre/ThirdParty/nxogre/NxOgreCollisionModel.h trunk/python-ogre/ThirdParty/nxogre/NxOgreCompound.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreCompound.h trunk/python-ogre/ThirdParty/nxogre/NxOgreCooking.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreCooking.h trunk/python-ogre/ThirdParty/nxogre/NxOgreDynamicMesh.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreDynamicMesh.h trunk/python-ogre/ThirdParty/nxogre/NxOgreEnumsDefinesTypedefs.h trunk/python-ogre/ThirdParty/nxogre/NxOgreFileResourceStream.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreFileResourceStream.h trunk/python-ogre/ThirdParty/nxogre/NxOgreFileResourceSystem.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreFileResourceSystem.h trunk/python-ogre/ThirdParty/nxogre/NxOgreFluidMesh.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreFluidMesh.h trunk/python-ogre/ThirdParty/nxogre/NxOgreGlobalFunctions.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreInflatable.h trunk/python-ogre/ThirdParty/nxogre/NxOgreJSON.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreJSON.h trunk/python-ogre/ThirdParty/nxogre/NxOgreJSONCollection.h trunk/python-ogre/ThirdParty/nxogre/NxOgreJSONRead.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreJSONSchema.h trunk/python-ogre/ThirdParty/nxogre/NxOgreJSONWrite.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreKinematicCharacter.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreKinematicCharacter.h trunk/python-ogre/ThirdParty/nxogre/NxOgreKinematicCharacterSweep.h trunk/python-ogre/ThirdParty/nxogre/NxOgreLegacyCharacter.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreLegacyCharacter.h trunk/python-ogre/ThirdParty/nxogre/NxOgreLegacyCharacterController.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreLegacyCharacterController.h trunk/python-ogre/ThirdParty/nxogre/NxOgreLegacyCharacterHitReport.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreLegacyCharacterHitReport.h trunk/python-ogre/ThirdParty/nxogre/NxOgreMemoryStream.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreMemoryStream.h trunk/python-ogre/ThirdParty/nxogre/NxOgreNXM.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreNXM.h trunk/python-ogre/ThirdParty/nxogre/NxOgreNxCharacterController.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreNxCharacterController.h trunk/python-ogre/ThirdParty/nxogre/NxOgreNxSerialiser.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreNxSerialiser.h trunk/python-ogre/ThirdParty/nxogre/NxOgreNxuStreamSerialiser.h trunk/python-ogre/ThirdParty/nxogre/NxOgreOBJStream.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreOBJStream.h trunk/python-ogre/ThirdParty/nxogre/NxOgreOgreMesh.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreOgreMesh.h trunk/python-ogre/ThirdParty/nxogre/NxOgreOgreResourceStream.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreOgreResourceStream.h trunk/python-ogre/ThirdParty/nxogre/NxOgreOgreResourceSystem.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreOgreResourceSystem.h trunk/python-ogre/ThirdParty/nxogre/NxOgreResourceManager_Cloth.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreResourceManager_Convex.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreResourceManager_Triangle.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreResourceMesh.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreResourceMesh.h trunk/python-ogre/ThirdParty/nxogre/NxOgreResourceStream.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreResourceStream.h trunk/python-ogre/ThirdParty/nxogre/NxOgreResourceStreamPtr.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreResourceStreamPtr.h trunk/python-ogre/ThirdParty/nxogre/NxOgreSerialiser.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreSerialiser.h trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeConvex.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeConvex.h trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeMesh.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeMesh.h trunk/python-ogre/ThirdParty/nxogre/NxOgreState.h trunk/python-ogre/ThirdParty/nxogre/NxOgreStateMachine.h trunk/python-ogre/ThirdParty/nxogre/NxOgreTestIdea.h trunk/python-ogre/ThirdParty/nxogre/NxOgreTransitionalMesh.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreTransitionalMesh.h trunk/python-ogre/ThirdParty/nxogre/NxOgreUserData.h trunk/python-ogre/ThirdParty/nxogre/NxOgreUserStream.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreUserStream.h Deleted: trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacter.cpp =================================================================== --- trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacter.cpp 2008-06-22 02:07:48 UTC (rev 600) +++ trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacter.cpp 2008-06-22 06:20:23 UTC (rev 601) @@ -1,186 +0,0 @@ -/** \file NxOgreCharacter.cpp - * \see NxOgreCharacter.h - * \version 1.0-20 - * - * \licence NxOgre a wrapper for the PhysX physics library. - * Copyright (C) 2005-8 Robin Southern of NxOgre.org http://www.nxogre.org - * This library 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.1 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include "NxOgreStable.h" - -#if (NX_USE_LEGACY_NXCONTROLLER == 0) - -#include "NxOgreCharacter.h" -#include "NxOgreScene.h" -#include "NxOgreNxActorController.h" -#include "NxOgreKinematicCharacter.h" - -#include "NxOgreCharacterModel.h" -#include "NxOgreCharacterMovementModel.h" - -#include "NxOgreVoidPointer.h" -#include "NxOgreTimeStep.h" - -namespace NxOgre { -namespace CharacterSystem { - -///////////////////////////////////////////////////////////// - -void CharacterParams::setToDefault() { - -#if (NX_USE_CHARACTER_API == 1) - mControllerType = CT_KINEMATIC; -#else - mControllerType = CT_NXACTOR; -#endif - - mControllerPtr = 0; - mStepOffset = 0.0f; - mSlopeLimit = 0.0f; - mUpDirection = NX_AXIS_PLUS_Y; - //mGroupMask; - mControllerCollisionShape = 0; - -} - -///////////////////////////////////////////////////////////// - -Character::Character(const NxString& identifier, Pose pose, CharacterModel* model, CharacterParams params, Scene* scene) -: mName(identifier), mModel(model), mOwner(scene), mVoidPointer(0) -{ - - if (model == 0) { - NxThrow("Character Model pointer is null!"); - mDead = true; - return; - } - - if (params.mControllerType == params.CT_PTR && params.mControllerPtr == 0) { - NxThrow("ControllerType is custom but given pointer is null!"); - mDead = true; - return; - } - - mVoidPointer = new VoidPointer(this, NxOgreClass_Character); - - // (TODO) Pass on voidpointer to controllers here. - if (params.mControllerType == CharacterParams::CT_NXACTOR) { - mController = NxNew(NxActorController)(pose, params.mControllerCollisionShape, scene, mVoidPointer); - } -#if (NX_USE_CHARACTER_API == 1) - else if (params.mControllerType == CharacterParams::CT_KINEMATIC) { - mController = NxNew(KinematicCharacter)(pose, params.mControllerCollisionShape, scene, mVoidPointer); - } -#endif - else { - mController = params.mControllerPtr; - NxWatch(CharacterController, mController); - } - - // Watch Model and set the garbage collection mode. - NxWatch(CharacterModel, mModel); - mModel->setGC(); - - // Current movement model to default. - mCurrentMovement = mModel->mDefaultMovementModel; - - // Reset all movemenet models to this. - for (CharacterMovementModel* model = mModel->mMovementModels.begin(); model = mModel->mMovementModels.next();) { - model->reset(this); - } - - mCurrentMovement->enter(0, mController->getPose()); - - mOwner->_registerCharacter(mName, this); -} - -///////////////////////////////////////////////////////////// - -Character::~Character() { - - mOwner->_unregisterCharacter(mName); - - mCurrentMovement->exit(); - - // Delete bleh bleh here. - if (mModel->mDeletionPolicy == GC_Delete) - NxDelete(mModel); - - - delete mController; - delete mVoidPointer; - -} - -///////////////////////////////////////////////////////////// - -void Character::simulate(const TimeStep& ts) { - - mCurrentMovement->simulate(ts.Delta); - - // get new movement vector - const NxVec3 movementVector = mCurrentMovement->getGlobalMovementVector(ts.Delta); - - // get controller to move that vector. - mController->move(movementVector); - - mCurrentMovement->setPose(mController->getPose()); - mCurrentMovement->simulateAfter(ts.Delta); - -} - -///////////////////////////////////////////////////////////// - -void Character::forward() { - mCurrentMovement->forward(); -} - -///////////////////////////////////////////////////////////// - -void Character::backward() { - mCurrentMovement->backward(); -} - -///////////////////////////////////////////////////////////// - -void Character::left() { - mCurrentMovement->left(); -} - -///////////////////////////////////////////////////////////// - -void Character::right() { - mCurrentMovement->right(); -} - -///////////////////////////////////////////////////////////// - -void Character::up() { - mCurrentMovement->up(); -} - -///////////////////////////////////////////////////////////// - -void Character::down() { - mCurrentMovement->down(); -} - -///////////////////////////////////////////////////////////// - -}; // End of Character namespace. -}; // End of NxOgre namespace. - -#endif Deleted: trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacter.h =================================================================== --- trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacter.h 2008-06-22 02:07:48 UTC (rev 600) +++ trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacter.h 2008-06-22 06:20:23 UTC (rev 601) @@ -1,199 +0,0 @@ -/** \file NxOgreCharacter.h - * \brief Header for the CharacterParams and Character classes. - * \version 1.0-20 - * - * \licence NxOgre a wrapper for the PhysX physics library. - * Copyright (C) 2005-8 Robin Southern of NxOgre.org http://www.nxogre.org - * This library 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.1 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef __NXOGRE_CHARACTER_H__ -#define __NXOGRE_CHARACTER_H__ - -#include "NxOgrePrerequisites.h" - -#if (NX_USE_LEGACY_NXCONTROLLER == 0) - -#include "NxOgreParams.h" -#include "NxOgrePose.h" - -namespace NxOgre { -namespace CharacterSystem { - - - class NxPublicClass CharacterParams : public Params { - - public: - - CharacterParams() { - setToDefault(); - } - - CharacterParams(const char* p) { - process(p); - } - - CharacterParams(NxString p) { - process(p); - } - - void setToDefault(); - - enum ControllerType { -#if (NX_USE_CHARACTER_API == 1) - CT_KINEMATIC, -#endif - CT_NXACTOR, - CT_PTR - }; - - ControllerType mControllerType; - CharacterController* mControllerPtr; - - NxReal mStepOffset; - NxRadian mSlopeLimit; - NxAxisType mUpDirection; - NxGroupsMask mGroupMask; - - /** \brief Collision shape for NxActor and NxCharacter controllers. - \note The function "setToDefault" sets the pointer to zero. You - have to assign one after setting the basic params using - the new operator or the SimpleShape::createShapeFromString method - - \see Controllers for what shapes they can and cannot use - \see SimpleShape::createShapeFromString - - - */ - - SimpleShape* mControllerCollisionShape; - - - }; - - ///////////////////////////////////////////////////////// - - /** Character - - */ - class NxPublicClass Character { - - public: - - enum LocalMovementDirection { - LMD_FORWARD = 0, - LMD_BACKWARD = 1, - LMD_LEFT = 2, - LMD_RIGHT = 3, - LMB_UP = 4, - LMB_DOWN = 5 - }; - - Character(const NxString& identifier, Pose, CharacterModel*, CharacterParams, Scene*); - virtual ~Character(); - - NxString getName() const {return mName;} - - virtual void simulate(const TimeStep&); - - CharacterController* getController() const { - return mController; - } - - CharacterModel* getModel() const { - return mModel; - } - - CharacterMovementModel* getCurrentMovementModel() const { - return mCurrentMovement; - } - - void setModel(CharacterModel* newModel) { - mModel = newModel; - resetMovement(); - } - - void resetMovement() {} - void setMovement(NxString movement); - void setMovement(Ogre::Vector3 movementVector); - void setLocalMovement(Ogre::Vector3 movementVector); - - inline void forward(); - inline void backward(); - inline void left(); - inline void right(); - inline void up(); - inline void down(); - - void injectMovement(LocalMovementDirection); - void setDirection(const NxQuat& orientation); - void setDirection(const Ogre::Quaternion& orientation); - void moveTowards(Ogre::Vector3 globalPosition, NxReal force); - void setYaw(NxRadian Yaw); - void setYaw(Ogre::Radian Yaw); - void setPitch(NxRadian Pitch); - void setPitch(Ogre::Radian Pitch); - void setRoll(NxRadian Roll); - void setRoll(Ogre::Radian Roll); - - - /** \brief Forces height to a new one, without a transitional movement period. - Forces the local height of the character shape to a new one whilst moving - the character to half-height below. - - \param height Height of the character - */ - void setHeight(NxReal height); - - - /** \brief Forces height to a new one, with a transitional movement period. - Forces the local height of the character shape to a new one whilst leaving it - at the existing position. Naturaly gravity or a custom vector will kick in and - move the character into the correct new position over the upcoming frames. - - \param height Height of the character - */ - void changeHeight(NxReal height); - - void setSize(const NxVec3& size); - void setSize(const float2& size); - - void setGravityEnabled(bool); - bool isGravityEnabled(); - - bool isDead() const {return mDead;} - - protected: - - CharacterController* mController; - CharacterModel* mModel; - CharacterMovementModel* mCurrentMovement; - - NxString mName; - Scene* mOwner; - VoidPointer* mVoidPointer; - - private: - - bool mDead; - - }; - - //////////////////////////////////////////// -};// End of CharacterSystem -};// End of namespace - -#endif -#endif Deleted: trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterController.cpp =================================================================== --- trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterController.cpp 2008-06-22 02:07:48 UTC (rev 600) +++ trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterController.cpp 2008-06-22 06:20:23 UTC (rev 601) @@ -1,45 +0,0 @@ -/** \file NxOgreCharacterController.cpp - * \see NxOgreCharacterController.h - * \version 1.0-20 - * - * \licence NxOgre a wrapper for the PhysX physics library. - * Copyright (C) 2005-8 Robin Southern of NxOgre.org http://www.nxogre.org - * This library 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.1 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include "NxOgreStable.h" - -#include "NxOgreCharacterController.h" - -namespace NxOgre { -namespace CharacterSystem { - -//////////////////////////////////////////////////// - -CharacterController::CharacterController(Scene* scene, VoidPointer*) -: mScene(scene) { - -} - -//////////////////////////////////////////////////// - -CharacterController::~CharacterController() { - -} - -//////////////////////////////////////////////////// - -}; // End of CharacterSystem namespace. -}; // End of NxOgre namespace. Deleted: trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterController.h =================================================================== --- trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterController.h 2008-06-22 02:07:48 UTC (rev 600) +++ trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterController.h 2008-06-22 06:20:23 UTC (rev 601) @@ -1,96 +0,0 @@ -/** \file NxOgreCharacterController.h - * \brief Header for the CharacterController class. - * \version 1.0-20 - * - * \licence NxOgre a wrapper for the PhysX physics library. - * Copyright (C) 2005-8 Robin Southern of NxOgre.org http://www.nxogre.org - * This library 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.1 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - - -#ifndef __NXOGRE_CHARACTER_CONTROLLER_H__ -#define __NXOGRE_CHARACTER_CONTROLLER_H__ - -#include "NxOgrePrerequisites.h" - -#if (NX_USE_LEGACY_NXCONTROLLER == 0) - -namespace NxOgre { -namespace CharacterSystem { - - class NxPublicClass CharacterController { - - friend class Character; - - public: - - CharacterController(Scene*, VoidPointer*); - virtual ~CharacterController(); - - virtual NxActorGroup getActorGroup() {return 0;} - virtual NxCollisionGroup getCollisionGroup() {return 0;} - - virtual void setActorGroup(NxActorGroup) {} - virtual void setCollisionGroup(NxCollisionGroup) {} - - virtual void init(NxMat34 pose) {} - - virtual void move(const NxVec3& direction) {} - - virtual void setPosition(const NxVec3& position) {} - virtual NxVec3 getPosition() const {return NxVec3(0,0,0);} - - virtual void setOrientation(const NxQuat& orientation) {} - virtual NxQuat getOrientation() const {NxQuat quat;quat.id();return quat;} - - virtual NxMat34 getPose() const {NxMat34 m;m.id();return m;} - - virtual void setSize(const NxVec3& size) {} - virtual void getSize(NxVec3& size) {} - - virtual void setSize(const float2& size) {} - virtual void getSize(float2& size) {} - - virtual void setStepSize(NxReal stepSize) {} - virtual NxReal getStepSize() const {return 0;} - - virtual void setSlopeLimit(NxRadian slopeLimit) {} - virtual NxRadian getSlopeLimit() const {return 0;} - - virtual void setGravityEnabled(bool gravity) {} - virtual bool getGravityEnabled() const {return false;} - - virtual void setUpDirection(NxVec3 upDirection) {} - virtual NxVec3 getUpDirection() const {return NxVec3(0,0,0);} - - - virtual NxString getType() { return NxString("CharacterController"); }; - - ///////////////////////////////////////////////// - - Scene* mScene; - - private: - - - }; - - //////////////////////////////////////////// - -};// End of CharacterSystem namespace. -};// End of NxOgre namespace. - -#endif -#endif Deleted: trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterModel.cpp =================================================================== --- trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterModel.cpp 2008-06-22 02:07:48 UTC (rev 600) +++ trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterModel.cpp 2008-06-22 06:20:23 UTC (rev 601) @@ -1,26 +0,0 @@ -/** \file NxOgreCharacterModel.cpp - * \see NxOgreCharacterModel.h - * \version 1.0-20 - * - * \licence NxOgre a wrapper for the PhysX physics library. - * Copyright (C) 2005-8 Robin Southern of NxOgre.org http://www.nxogre.org - * This library 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.1 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include "NxOgreStable.h" - -#if (NX_USE_LEGACY_NXCONTROLLER == 0) -# include "NxOgreCharacterModel.h" -#endif Deleted: trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterModel.h =================================================================== --- trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterModel.h 2008-06-22 02:07:48 UTC (rev 600) +++ trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterModel.h 2008-06-22 06:20:23 UTC (rev 601) @@ -1,63 +0,0 @@ -/** \file NxOgreCharacterModel.h - * \brief Header for the CharacterModel class. - * \version 1.0-20 - * - * \licence NxOgre a wrapper for the PhysX physics library. - * Copyright (C) 2005-8 Robin Southern of NxOgre.org http://www.nxogre.org - * This library 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.1 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef __NXOGRE_CHARACTER_MODEL_H__ -#define __NXOGRE_CHARACTER_MODEL_H__ - -#include "NxOgrePrerequisites.h" - -#if (NX_USE_LEGACY_NXCONTROLLER == 0) - -#include "NxOgreContainer.h" - -namespace NxOgre { -namespace CharacterSystem { - - class NxPublicClass CharacterModel { - - friend class Character; - - public: - - virtual ~CharacterModel() {} - - CharacterMovementModel* mDefaultMovementModel; - CharacterMovementModels mMovementModels; - - protected: - - virtual void setGC() { - mDeletionPolicy = GC_Delete; - } - - GarbageCollectionPolicy mDeletionPolicy; - - private: - - }; - - //////////////////////////////////////////// - -}; // End of CharacterSystem namespace. -}; // End of NxOgre namespace. - -#endif -#endif Deleted: trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterMovementModel.cpp =================================================================== --- trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterMovementModel.cpp 2008-06-22 02:07:48 UTC (rev 600) +++ trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterMovementModel.cpp 2008-06-22 06:20:23 UTC (rev 601) @@ -1,28 +0,0 @@ -/** \file NxOgreCharacterMovementModel.cpp - * \see NxOgreCharacterMovementModel.h - * \version 1.0-20 - * - * \licence NxOgre a wrapper for the PhysX physics library. - * Copyright (C) 2005-8 Robin Southern of NxOgre.org http://www.nxogre.org - * This library 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.1 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ -#include "NxOgreStable.h" - -#if (NX_USE_LEGACY_NXCONTROLLER == 0) - -#include "NxOgreCharacterMovementModel.h" - - -#endif Deleted: trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterMovementModel.h =================================================================== --- trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterMovementModel.h 2008-06-22 02:07:48 UTC (rev 600) +++ trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterMovementModel.h 2008-06-22 06:20:23 UTC (rev 601) @@ -1,95 +0,0 @@ -/** \file NxOgreCharacterMovementModel.h - * \brief Header for the CharacterMovementModel class. - * \version 1.0-20 - * - * \licence NxOgre a wrapper for the PhysX physics library. - * Copyright (C) 2005-8 Robin Southern of NxOgre.org http://www.nxogre.org - * This library 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.1 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef __NXOGRE_CHARACTER_MOVEMENT_MODEL_H__ -#define __NXOGRE_CHARACTER_MOVEMENT_MODEL_H__ - -#include "NxOgrePrerequisites.h" - -#if (NX_USE_LEGACY_NXCONTROLLER == 0) - -#include "NxOgreHelpers.h" - -namespace NxOgre { -namespace CharacterSystem { - - class NxPublicClass CharacterMovementModel { - - public: - - virtual void enter(CharacterMovementModel* from, NxMat34 pose) {mPose = pose;mMovement.zero();mOrientation.id();} - virtual NxMat34 exit() {return mPose;} - - virtual void simulate(NxReal dTime) {} - virtual void simulateAfter(NxReal dTime) {} - virtual void reset(Character* c) {mCharacter = c;}// mPose = c->getPose();} - virtual void forward() {} - virtual void backward() {} - virtual void left() {} - virtual void right() {} - virtual void up() {} - virtual void down() {} - - virtual void setYaw(NxRadian yaw) { - // mOrientation - } - - void setPose(NxMat34 pose) {mPose = pose;} - virtual void setPitch(NxRadian pitch) {} - virtual void setRoll(NxRadian roll) {} - - virtual void setOrientation(NxQuat orientation) {} - virtual NxQuat getOrientation() { NxQuat quat; - mPose.M.toQuat(quat); - return quat;} - - virtual NxString getType() {return NxString("Default");} - - virtual NxVec3 getGlobalMovementVector(NxReal dT) { - return (mOrientation * mMovement) * dT; - } - - virtual NxVec3 getMovementVector() { - return mMovement; - } - - virtual NxQuat getGlobalOrientation() { - return mOrientation; - } - - protected: - - Character* mCharacter; - NxMat34 mPose; - NxVec3 mMovement; - NxQuat mOrientation; - - private: - - }; - - //////////////////////////////////////////// - -}; // End of CharacterSystem namespace. -}; // End of NxOgre namespace. - -#endif -#endif Deleted: trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterSystem.cpp =================================================================== --- trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterSystem.cpp 2008-06-22 02:07:48 UTC (rev 600) +++ trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterSystem.cpp 2008-06-22 06:20:23 UTC (rev 601) @@ -1,70 +0,0 @@ -/** \file NxOgreCharacterSystem.cpp - * \see NxOgreCharacterSystem.h - * \version 1.0-20 - * - * \licence NxOgre a wrapper for the PhysX physics library. - * Copyright (C) 2005-8 Robin Southern of NxOgre.org http://www.nxogre.org - * This library 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.1 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include "NxOgreStable.h" - -#if (NX_USE_LEGACY_NXCONTROLLER == 0 && NX_USE_CHARACTER_API == 1) - -#include "NxOgreCharacterSystem.h" - -namespace NxOgre { - -///////////////////////////////////////////////////////////// - -CharacterSystem::CharacterSystem(World* world) : mWorld(world) { - -} - -///////////////////////////////////////////////////////////// - -CharacterSystem::~CharacterSystem() { - mCharacters.destroyAllOwned(); -} - -///////////////////////////////////////////////////////////// - -void CharacterSystem::createCharacter(NxString identifier, Pose, CharacterModel*, CharacterParams params) { - -} - -///////////////////////////////////////////////////////////// - -void CharacterSystem::createPerformer(NxString visualIdentifier, Pose, CharacterModel*, CharacterParams params) { - -} - -///////////////////////////////////////////////////////////// - -void CharacterSystem::destroyCharacter(NxString identifier) { - -} - -///////////////////////////////////////////////////////////// - -Character* CharacterSystem::getCharacter(NxString identifier) { - return mCharacters.get(identifier); -} - -///////////////////////////////////////////////////////////// - -}; - -#endif Deleted: trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterSystem.h =================================================================== --- trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterSystem.h 2008-06-22 02:07:48 UTC (rev 600) +++ trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterSystem.h 2008-06-22 06:20:23 UTC (rev 601) @@ -1,81 +0,0 @@ -/** \file NxOgreCharacterSystem.h - * \brief Header for the CharacterSystem class. - * \version 1.0-20 - * - * \licence NxOgre a wrapper for the PhysX physics library. - * Copyright (C) 2005-8 Robin Southern of NxOgre.org http://www.nxogre.org - * This library 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.1 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef __NXOGRE_CHARACTER_SYSTEM_H__ -#define __NXOGRE_CHARACTER_SYSTEM_H__ - -#include "NxOgrePrerequisites.h" - -#if (NX_USE_LEGACY_NXCONTROLLER == 0) - -#include "NxOgreContainer.h" -#include "NxOgreCharacter.h" - -#if (NX_USE_CHARACTER_API == 1) -# include "NxControllerManager.h" -#endif - -namespace NxOgre { - - //////////////////////////////////////////////////////////////////////// - - class NxPublicClass CharacterSystem { - - public: - - CharacterSystem(World*); - ~CharacterSystem(); - -#if (NX_USE_CHARACTER_API == 1) - /** Return's a copy of the instance of the Controller Manager - \return NxControllerManager - */ - NxControllerManager* getControllerManager() { - return mControllerManager; - } -#endif - - void createCharacter(NxString identifier, Pose, CharacterModel*, CharacterParams = CharacterParams()); - void createPerformer(NxString visualIdentifier, Pose, CharacterModel*, CharacterParams = CharacterParams()); - - void destroyCharacter(NxString identifier); - Character* getCharacter(NxString identifier); - - protected: - - Characters mCharacters; - - private: - -#if (NX_USE_CHARACTER_API == 1) - NxControllerManager* mControllerManager; -#endif - - World* mWorld; - - }; - - //////////////////////////////////////////////////////////////////////// - -};// End of namespace - -#endif -#endif \ No newline at end of file Deleted: trunk/python-ogre/ThirdParty/nxogre/NxOgreCollisionModel.h =================================================================== Deleted: trunk/python-ogre/ThirdParty/nxogre/NxOgreCompound.cpp =================================================================== --- trunk/python-ogre/ThirdParty/nxogre/NxOgreCompound.cpp 2008-06-22 02:07:48 UTC (rev 600) +++ trunk/python-ogre/ThirdParty/nxogre/NxOgreCompound.cpp 2008-06-22 06:20:23 UTC (rev 601) @@ -1,20 +0,0 @@ -// -// NxOgre a wrapper for the PhysX (formerly Novodex) physics library and the Ogre 3D rendering engine. -// Copyright (C) 2005 - 2007 Robin Southern and NxOgre.org http://www.nxogre.org -// -// This library 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.1 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 -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -// - -#include "NxOgreStable.h" Deleted: trunk/python-ogre/ThirdParty/nxogre/NxOgreCompound.h =================================================================== --- trunk/python-ogre/ThirdParty/nxogre/NxOgreCompound.h 2008-06-22 02:07:48 UTC (rev 600) +++ trunk/python-ogre/ThirdParty/nxogre/NxOgreCompound.h 2008-06-22 06:20:23 UTC (rev 601) @@ -1,24 +0,0 @@ -// -// NxOgre a wrapper for the PhysX (formerly Novodex) physics library and the Ogre 3D rendering engine. -// Copyright (C) 2005 - 2007 Robin Southern and NxOgre.org http://www.nxogre.org -// -// This library 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.1 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 -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -// - - - -// -// Reserved for Compound Actors. -// Deleted: trunk/python-ogre/ThirdParty/nxogre/NxOgreCooking.cpp =================================================================== --- trunk/python-ogre/ThirdParty/nxogre/NxOgreCooking.cpp 2008-06-22 02:07:48 UTC (rev 600) +++ trunk/python-ogre/ThirdParty/nxogre/NxOgreCooking.cpp 2008-06-22 06:20:23 UTC (rev 601) @@ -1,270 +0,0 @@ -/** \file NxOgreCooking.cpp - * \see NxOgreCooking.h - * \version 1.0-20 - * - * \licence NxOgre a wrapper for the PhysX physics library. - * Copyright (C) 2005-8 Robin Southern of NxOgre.org http://www.nxogre.org - * This library 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.1 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include "NxOgreStable.h" -#include "NxOgreCooking.h" -#include "NxOgreMemoryStream.h" -#include "NxCooking.h" -#include "NxOgreHelpers.h" - -#include "OgreImage.h" -#include "OgreResourceGroupManager.h" -#include "OgreRoot.h" -#include "OgreSingleton.h" -#include "OgreMesh.h" -#include "OgreSubMesh.h" -#include "OgreVector3.h" - -namespace NxOgre { - - -#if 0 -//////////////////////////////////////////////////////////////////////////////////////////////// - -NxHeightField* NxGenerateHeightFieldFromImage(const NxString& imageFilename, unsigned int nbRows,NxScene *scene) { - - Ogre::Image img; - img.load(imageFilename, Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME); - - unsigned int imageSize = img.getWidth(); - - NxHeightFieldDesc heightFieldDesc; - heightFieldDesc.nbColumns = nbRows; - heightFieldDesc.nbRows = nbRows; - heightFieldDesc.verticalExtent = -1000; - heightFieldDesc.convexEdgeThreshold = 0; - - // Allocate storage for heightfield samples - heightFieldDesc.samples = new NxU32[imageSize * imageSize]; - heightFieldDesc.sampleStride = sizeof(NxU32); - - char* currentByte = (char*) heightFieldDesc.samples; - int gMatrixSize = 3; - NxReal sixtyFourKb = 65536.0; - NxReal thirtyTwoKb = 32768.0; - - NxMaterialIndex gMatrix[9][3] = { - // {tesselation, material0, material1} - {0,1,1}, {0,1,1}, {0,1,1}, - {0,1,1}, {0,1,1}, {0,1,1}, - {0,1,1}, {0,1,1}, {0,1,1} - }; - const Ogre::uchar* pSrc = img.getData(); - - for (NxU32 row = 0; row < nbRows; row++) { - for (NxU32 column = 0; column < nbRows; column++) { - - NxU32 matrixOffset = (row % gMatrixSize) * gMatrixSize + (column % gMatrixSize); - - NxReal s = NxReal(row) / NxReal(nbRows); - NxReal t = NxReal(column) / NxReal(nbRows); - - NxHeightFieldSample* currentSample = (NxHeightFieldSample*)currentByte; - float colorValue = img.getColourAt (row, column,0).r; - - currentSample->height = img.getColourAt (row, column,0).r * 32768.0f; - - currentSample->materialIndex0 = gMatrix[matrixOffset][1]; - currentSample->materialIndex1 = gMatrix[matrixOffset][2]; - currentSample->tessFlag = gMatrix[matrixOffset][0]; - - currentByte += heightFieldDesc.sampleStride; - } - } - - NxHeightField *hf = scene->getPhysicsSDK().createHeightField(heightFieldDesc); - - delete [] heightFieldDesc.samples; - - return hf; - -} -#endif -//////////////////////////////////////////////////////////////////////////////////////////////// - -NxHeightField* NxGenerateHeightFieldFromImage(const NxString& imageFilename, NxScene* scene) { - - Ogre::Image img; - img.load(imageFilename, Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME); - - NxU32 imageWidth = img.getWidth(); - NxU32 imageHeight = img.getHeight(); - - NxHeightFieldDesc heightFieldDesc; - - heightFieldDesc.nbRows = imageWidth; - heightFieldDesc.nbColumns = imageHeight; - heightFieldDesc.verticalExtent = -1000; - heightFieldDesc.convexEdgeThreshold = 0; - - // Allocate storage for heightfield samples - heightFieldDesc.samples = new NxU32[imageWidth * imageHeight]; - heightFieldDesc.sampleStride = sizeof(NxU32); - - char* currentByte = (char*) heightFieldDesc.samples; - int gMatrixSize = 3; - - NxMaterialIndex gMatrix[9][3] = { - // {tesselation, material0, material1} - {0,1,1}, {0,1,1}, {0,1,1}, - {0,1,1}, {0,1,1}, {0,1,1}, - {0,1,1}, {0,1,1}, {0,1,1} - }; - const Ogre::uchar* pSrc = img.getData(); - NxReal colourValue = 0; - - for (NxU32 row = 0; row < imageWidth; row++) { - for (NxU32 column = 0; column < imageHeight; column++) { - - NxU32 matrixOffset = (row % gMatrixSize) * gMatrixSize + (column % gMatrixSize); - - NxReal s = NxReal(row) / NxReal(imageWidth); - NxReal t = NxReal(column) / NxReal(imageHeight); - - NxHeightFieldSample* currentSample = (NxHeightFieldSample*) currentByte; - colourValue = img.getColourAt (row, column,0).r; - - currentSample->height = colourValue * 32768.0f; - - currentSample->materialIndex0 = gMatrix[matrixOffset][1]; - currentSample->materialIndex1 = gMatrix[matrixOffset][2]; - currentSample->tessFlag = gMatrix[matrixOffset][0]; - - currentByte += heightFieldDesc.sampleStride; - } - } - - NxHeightField *hf = scene->getPhysicsSDK().createHeightField(heightFieldDesc); - -#ifdef NX_PLATFORM_LINUX - delete [] (NxU32*) heightFieldDesc.samples; -#else - delete [] heightFieldDesc.samples; -#endif - - return hf; - -} - -//////////////////////////////////////////////////////////////////////////////////////////////// - -NxHeightField* NxGenerateHeightFieldFromRaw(const NxString& imageFilename, NxScene* scene) { - - Ogre::MemoryDataStreamPtr mRawData; - mRawData.setNull(); - - Ogre::DataStreamPtr stream = Ogre::ResourceGroupManager::getSingleton().openResource(imageFilename); - mRawData = Ogre::MemoryDataStreamPtr(new Ogre::MemoryDataStream(imageFilename, stream)); - - // Work out the Image size by the size of the file. This algorithm only works if the texture is square. But since - // Ogre terrain works this way as well, it isn't much of a problem. - NxU32 fileLength = mRawData->size(); - NxReal width = NxMath::sqrt(NxReal(fileLength)); - bool is8bit = true; - - // Check to see if the image is 16-bit. The square root of all image filesizes which are 16-bit, produce a non-integer - // number. To get the real imageWidth, the fileLength is halfed and square-rooted again, which produces an integer. - if (NxU32(NxMath::floor(width)) != width) { - width = NxMath::sqrt(NxReal(fileLength * 0.5f)); - is8bit = false; - } - - /// And here we go. - - NxHeightFieldDesc heightFieldDesc; - heightFieldDesc.nbColumns = width; - heightFieldDesc.nbRows = width; - heightFieldDesc.verticalExtent = -1000; - heightFieldDesc.convexEdgeThreshold = 0; - - // Allocate storage for heightfield samples - heightFieldDesc.samples = new NxU32[heightFieldDesc.nbRows * heightFieldDesc.nbColumns]; - heightFieldDesc.sampleStride = sizeof(NxU32); - - char* currentByte = (char*) heightFieldDesc.samples; - NxU32 gMatrixSize = 3; - - NxMaterialIndex gMatrix[9][3] = { - // {tesselation, material0, material1} - - {0,1,1}, {0,1,1}, {0,1,1}, - - {0,1,1}, {0,1,1}, {0,1,1}, - - {0,1,1}, {0,1,1}, {0,1,1} - - }; - - const Ogre::uchar* pSrc = mRawData->getPtr(); - - NxU32 i = 0; - NxReal height = 0; - NxI16 short_height = 0; - - for (NxU32 row = 0; row < width; row++) { - for (NxU32 column = 0; column < width; column++) { - - NxU32 matrixOffset = (row % gMatrixSize) * gMatrixSize + (column % gMatrixSize); - - NxReal s = NxReal(row) / NxReal(width); - NxReal t = NxReal(column) / NxReal(width); - - NxHeightFieldSample* currentSample = (NxHeightFieldSample*)currentByte; - - i = row + (column * width); - - if (is8bit) { - height = pSrc[i]; - height *= 257.0f; - short_height = height; - short_height -= 32768; - } - else { - i*=2; - short_height = pSrc[i]; - short_height += pSrc[i + 1] << 8; - short_height -= 32768; - } - - currentSample->height = short_height; - currentSample->materialIndex0 = gMatrix[matrixOffset][1]; - currentSample->materialIndex1 = gMatrix[matrixOffset][2]; - currentSample->tessFlag = gMatrix[matrixOffset][0]; - - currentByte += heightFieldDesc.sampleStride; - } - } - - NxHeightField *hf = scene->getPhysicsSDK().createHeightField(heightFieldDesc); - -#ifdef NX_PLATFORM_LINUX - delete [] (NxU32*) heightFieldDesc.samples; -#else - delete [] heightFieldDesc.samples; -#endif - - return hf; -} - -//////////////////////////////////////////////////////////////////////////////////////////////// - -}; //End of NxOgre namespace. - Deleted: trunk/python-ogre/ThirdParty/nxogre/NxOgreCooking.h =================================================================== --- trunk/python-ogre/ThirdParty/nxogre/NxOgreCooking.h 2008-06-22 02:07:48 UTC (rev 600) +++ trunk/python-ogre/ThirdParty/nxogre/NxOgreCooking.h 2008-06-22 06:20:23 UTC (rev 601) @@ -1,36 +0,0 @@ -/** \file NxOgreCooking.h - * \brief Header for the NxGenerateHeightField functions. - * \version 1.0-20 - * - * \licence NxOgre a wrapper for the PhysX physics library. - * Copyright (C) 2005-8 Robin Southern of NxOgre.org http://www.nxogre.org - * This library 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.1 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - - -#ifndef __NXOGRE_COOKING_H__ -#define __NXOGRE_COOKING_H__ - -#include "NxOgrePrerequisites.h" - -namespace NxOgre { - - // Heightfields - NxPublicClass NxHeightField* NxGenerateHeightFieldFromImage(const NxString& imageFilename, NxScene*); - NxPublicClass NxHeightField* NxGenerateHeightFieldFromRaw(const NxString& imageFilename, NxScene*); - -}; - -#endif Deleted: trunk/python-ogre/ThirdParty/nxogre/NxOgreDynamicMesh.cpp =================================================================== --- trunk/python-ogre/ThirdParty/nxogre/NxOgreDynamicMesh.cpp 2008-06-22 02:07:48 UTC (rev 600) +++ trunk/python-ogre/ThirdParty/nxogre/NxOgreDynamicMesh.cpp 2008-06-22 06:20:23 UTC (rev 601) @@ -1,208 +0,0 @@ -/** \file NxOgreDynamicMesh.cpp - * \see NxOgreDynamicMesh.h - * \version 1.0-20 - * - * \licence NxOgre a wrapper for the PhysX physics library. - * Copyright (C) 2005-8 Robin Southern of NxOgre.org http://www.nxogre.org - * This library 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.1 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include "NxOgreStable.h" -#include "NxOgreDynamicMesh.h" -#include "NxOgreResourceMesh.h" - -namespace NxOgre { - -///////////////////////////////////////////////////////////////////// - -DynamicMesh::DynamicMesh() -: mNbVertices(0), mVertices(0), mNbNormals(0), - mNormals(0), mNbIndices(0), mIndices(0), - mNbTextureCoordinates(0), mTextureCoordinates(0) -{ - // Empty Constructor -} - -///////////////////////////////////////////////////////////////////// - -DynamicMesh::~DynamicMesh() { - if (mNbTextureCoordinates) - free(mTextureCoordinates); - - if (mNbNormals) - free(mNormals); -} - -///////////////////////////////////////////////////////////////////// - -void DynamicMesh::replaceVertices(NxVec3* vertices, NxU32 nbVertices) { - - if (mVertices == 0) { - mVertices = (NxVec3*) malloc(nbVertices * sizeof(NxVec3)); - mNbVertices = nbVertices; - } - else if (nbVertices != mNbVertices) { - free(mVertices); - mVertices = (NxVec3*) malloc(nbVertices * sizeof(NxVec3)); - mNbVertices = nbVertices; - } - - memcpy(mVertices, vertices, sizeof(NxVec3) * nbVertices); - -} - -///////////////////////////////////////////////////////////////////// - -void DynamicMesh::replaceNormals(NxVec3* normals, NxU32 nbNormals) { - - if (mNormals == 0) { - mNormals = (NxVec3*) malloc(nbNormals * sizeof(NxVec3)); - mNbNormals = nbNormals; - } - else if (nbNormals != mNbNormals) { - free(mNormals); - mNormals = (NxVec3*) malloc(nbNormals * sizeof(NxVec3)); - mNbNormals = nbNormals; - } - - memcpy(mNormals, normals, sizeof(NxVec3) * nbNormals); - -} - -///////////////////////////////////////////////////////////////////// - -void DynamicMesh::replaceIndices(NxU32* indices, NxU32 nbIndices) { - - if (mIndices == 0) { - mIndices = (NxU32*) malloc(nbIndices * sizeof(NxU32)); - mNbIndices = nbIndices; - } - else if (nbIndices != mNbIndices) { - free(mIndices); - mIndices = (NxU32*) malloc(nbIndices * sizeof(NxU32)); - mNbIndices = nbIndices; - } - - memcpy(mIndices, indices, sizeof(NxU32) * nbIndices); - -} - -///////////////////////////////////////////////////////////////////// - -void DynamicMesh::replaceTextureCoordinates(float2* coords, NxU32 nbCoords) { - - if (mTextureCoordinates == 0) { - mTextureCoordinates = (float2*) malloc(nbCoords * sizeof(float2)); - mNbTextureCoordinates = nbCoords; - } - else if (nbCoords != mNbTextureCoordinates) { - free(mTextureCoordinates); - mTextureCoordinates = (float2*) malloc(nbCoords * sizeof(float2)); - mNbTextureCoordinates = nbCoords; - } - - memcpy(mTextureCoordinates, coords, sizeof(float2) * nbCoords); - -} - -///////////////////////////////////////////////////////////////////// - -void DynamicMesh::referenceVertices(NxVec3* vertices, NxU32 nbVertices, bool gc) { - - if (gc && mVertices) - free(mVertices); - - mVertices = vertices; - mNbVertices = nbVertices; - -} - -///////////////////////////////////////////////////////////////////// - -void DynamicMesh::referenceNormals(NxVec3* normals, NxU32 nbNormals, bool gc) { - - if (gc && mNormals) - free(mNormals); - - mNormals = normals; - mNbNormals = nbNormals; - -} - -///////////////////////////////////////////////////////////////////// - -void DynamicMesh::referenceIndices(NxU32* indices, NxU32 nbIndices, bool gc) { - - if (gc && mIndices) - free(mIndices); - - mIndices = indices; - mNbIndices = nbIndices; - -} - -///////////////////////////////////////////////////////////////////// - -void DynamicMesh::referenceTextureCoordinates(float2* coords, NxU32 nbCoords, bool gc) { - - if (gc && mTextureCoordinates) - free(mTextureCoordinates); - - mTextureCoordinates = coords; - mNbTextureCoordinates = nbCoords; - -} - -///////////////////////////////////////////////////////////////////// - - -DynamicClothMesh::DynamicClothMesh(NxClothMesh* meshPtr) -: DynamicMesh() { - mMeshPtr = meshPtr; -} - -///////////////////////////////////////////////////////////////////// - -DynamicClothMesh::~DynamicClothMesh() { - // Empty. Parent constructor will do the clean up. -} - -///////////////////////////////////////////////////////////////////// - -NxClothMesh* DynamicClothMesh::getMeshPtr() { - return mMeshPtr; -} - -///////////////////////////////////////////////////////////////////// - -void DynamicClothMesh::fromClothMeshIntermediary(ClothMeshIntermediary* cmi) { - std::cout << "Vertices '" << cmi->mVertices << "' , size " << cmi->mNbVertices << std::endl; - replaceVertices(cmi->mVertices, cmi->mNbVertices); - std::cout << mVertices << std::endl; - std::cout << "Indices '" << cmi->mIndices << "' , size " << cmi->mNbIndices << std::endl; - replaceIndices(cmi->mIndices, cmi->mNbIndices); -} - -///////////////////////////////////////////////////////////////////// - -void DynamicClothMesh::toClothMeshIntermediary(ClothMeshIntermediary* cmi) { - -} - -///////////////////////////////////////////////////////////////////// - -} //End of NxOgre namespace. - -////#endif Deleted: trunk/python-ogre/ThirdParty/nxogre/NxOgreDynamicMesh.h =================================================================== --- trunk/python-ogre/ThirdParty/nxogre/NxOgreDynamicMesh.h 2008-06-22 02:07:48 UTC (rev 600) +++ trunk/python-ogre/ThirdParty/nxogre/NxOgreDynamicMesh.h 2008-06-22 06:20:23 UTC (rev 601) @@ -1,90 +0,0 @@ -/** \file NxOgreDynamicMesh.h - * \brief Header for the DynamicMesh, DynamicClothMesh class. - * \version 1.0-20 - * - * \licence NxOgre a wrapper for the PhysX physics library. - * Copyright (C) 2005-8 Robin Southern of NxOgre.org http://www.nxogre.org - * This library 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.1 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef __NXOGRE_DYNAMIC_MESH_H__ -#define __NXOGRE_DYNAMIC_MESH_H__ - -#include "NxOgrePrerequisites.h" -#include "NxOgreResourceManager.h" - -namespace NxOgre { - - //////////////////////////////////////////////////////////////////// - - /** \brief They live up to their namesake. A mesh which changes quite a lot. - */ - class NxPublicClass DynamicMesh { - - public: - - DynamicMesh(); - virtual ~DynamicMesh(); - - void fromNxMeshData(NxMeshData*) {} // TEMP - void toNxMeshData(NxMeshData*) {} // TEMP - - NxU32 mNbVertices; - NxVec3* mVertices; - - NxU32 mNbNormals; - NxVec3* mNormals; - - NxU32 mNbIndices; - NxU32* mIndices; - - NxU32 mNbTextureCoordinates; - float2* mTextureCoordinates; - - void replaceVertices(NxVec3* vertices, NxU32 nbVertices); - void replaceNormals(NxVec3* normals, NxU32 nbNormals); - void replaceIndices(NxU32* indices, NxU32 nbIndices); - void replaceTextureCoordinates(float2* coords, NxU32 nbCoords); - - void referenceVertices(NxVec3* vertices, NxU32 nbVertices, bool gc = true); - void referenceNormals(NxVec3* normals, NxU32 nbNormals, bool gc = true); - void referenceIndices(NxU32* indices, NxU32 nbIndices, bool gc = true); - void referenceTextureCoordinates(float2* coords, NxU32 nbCoords, bool gc = true); - - }; - - //////////////////////////////////////////////////////////////////// - - class NxPublicClass DynamicClothMesh : public DynamicMesh { - - public: - - DynamicClothMesh(NxClothMesh*); - DynamicClothMesh() {} - ~DynamicClothMesh(); - - NxClothMesh* getMeshPtr(); - void fromClothMeshIntermediary(ClothMeshIntermediary*); - void toClothMeshIntermediary(ClothMeshIntermediary*); - - NxClothMesh* mMeshPtr; - - }; - - ////////////////////////////////////////////////////////////... [truncated message content] |
From: <and...@us...> - 2008-06-20 06:57:51
|
Revision: 599 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=599&view=rev Author: andy_miller Date: 2008-06-19 23:57:55 -0700 (Thu, 19 Jun 2008) Log Message: ----------- Various cleanups for latest version (SVN 7604) of ogre Fixing Ogre demos for the 1.2 release Modified Paths: -------------- trunk/python-ogre/PythonOgreConfig_nt.py trunk/python-ogre/code_generators/common_utils/__init__.py trunk/python-ogre/code_generators/common_utils/ogre_properties.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/nxogre/python_nxogre_sizeof.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.h trunk/python-ogre/code_generators/ogre/python_ogre_sizeof.h trunk/python-ogre/demos/ogre/Demo_Basic.py trunk/python-ogre/demos/ogre/Demo_Facial.py trunk/python-ogre/demos/ogre/Demo_Fresnel.py trunk/python-ogre/demos/ogre/Demo_Grass.py trunk/python-ogre/demos/ogre/SampleLoadingBar.py trunk/python-ogre/demos/ogre/quake3settings.cfg trunk/python-ogre/environment.py Removed Paths: ------------- trunk/python-ogre/demos/ogre/1.py trunk/python-ogre/demos/ogre/Demo_Blank.py trunk/python-ogre/demos/ogre/a1.py trunk/python-ogre/demos/ogre/c1.sed Modified: trunk/python-ogre/PythonOgreConfig_nt.py =================================================================== --- trunk/python-ogre/PythonOgreConfig_nt.py 2008-06-20 06:56:17 UTC (rev 598) +++ trunk/python-ogre/PythonOgreConfig_nt.py 2008-06-20 06:57:55 UTC (rev 599) @@ -97,7 +97,7 @@ 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, 'lib') ## 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/releasedll')## probable releaselib for posix +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') Modified: trunk/python-ogre/code_generators/common_utils/__init__.py =================================================================== --- trunk/python-ogre/code_generators/common_utils/__init__.py 2008-06-20 06:56:17 UTC (rev 598) +++ trunk/python-ogre/code_generators/common_utils/__init__.py 2008-06-20 06:57:55 UTC (rev 599) @@ -156,7 +156,7 @@ if duplicate: for k in unique.keys(): if len ( unique[k] ) > 1 : -# print "DUPLICATE FOUND: ", cls, len ( unique[k] ) + print "DUPLICATE FOUND: ", cls, len ( unique[k] ) for p in unique[k]: # print " Checking", p.name, p.fget, p.fset prefered = p Modified: trunk/python-ogre/code_generators/common_utils/ogre_properties.py =================================================================== --- trunk/python-ogre/code_generators/common_utils/ogre_properties.py 2008-06-20 06:56:17 UTC (rev 598) +++ trunk/python-ogre/code_generators/common_utils/ogre_properties.py 2008-06-20 06:57:55 UTC (rev 599) @@ -64,8 +64,11 @@ def create_read_only_property( self, fget ): found = self.find_out_ro_prefixes( fget.name ) +# print "Prop Check", fget.name, ' ', if found in ( None, '' ): +# print "NO" return None +# print "YES" ## Now we need to look for overlapping function declarations pure_names = [] pure_names.append( fget.name[len( found ):].lower()) Modified: trunk/python-ogre/code_generators/nxogre/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/nxogre/generate_code.py 2008-06-20 06:56:17 UTC (rev 598) +++ trunk/python-ogre/code_generators/nxogre/generate_code.py 2008-06-20 06:57:55 UTC (rev 599) @@ -52,14 +52,14 @@ def ManualExclude ( mb ): global_ns = mb.global_ns main_ns = global_ns.namespace( MAIN_NAMESPACE ) - return + - for c in main_ns.classes(): 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'] @@ -70,10 +70,21 @@ print "EXCLUDING: ", c, f except: pass + + funlist = ['begin','get','getFirst','next','copyTo','_begin','_next'] + if c.decl_string.startswith('::NxOgre::Container<'): + for f in funlist: + try: + c.member_functions(f).exclude() + print "EXCLUDING: ", c, f + except: + pass + for v in c.variables(allow_empty=True): if v.access_type != 'public' : v.exclude() print "excluded", v, v.access_type + for t in main_ns.typedefs(): if t.decl_string.startswith('::NxOgre::Container<') and '*' not in t.decl_string: t.exclude() @@ -85,28 +96,19 @@ for m in c.member_functions(allow_empty=True): for e in excludes: if e in m.decl_string: + print "EXCLUDING: ", m m.exclude() # problem with a constructor on Cloth - main_ns.class_('::NxOgre::Cloth').constructor(arg_types=[None,'::NxClothDesc','::NxMeshData',None,None]).exclude() +# main_ns.class_('::NxOgre::Cloth').constructor(arg_types=[None,'::NxClothDesc','::NxMeshData',None,None]).exclude() # functions specified in the headers but not implemented - main_ns.class_('::NxOgre::Blueprints::ActorBlueprint').member_function('unserialise',arg_types=[None]).exclude() +# main_ns.class_('::NxOgre::Blueprints::ActorBlueprint').member_function('unserialise',arg_types=[None]).exclude() # # # # # # ### 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::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' + excludes=['::NxOgre::List<NxOgre::RemoteDebuggerConnection::Camera>::destroyAndEraseAll' ,'::NxOgre::List<NxOgre::RemoteDebuggerConnection::Camera>::dumpToConsole' ,'::NxOgre::UserAllocator::realloc' ,'::NxOgre::Cloth::duplicate' @@ -157,11 +159,31 @@ ,'::NxOgre::OgreNodeRenderable::addSceneNode' # ,'::NxOgre::ResourceStreamPtr::ResourceStreamPtr' ,'::NxOgre::MaterialAlias::generateConversionList' +# ,'::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::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::Actor::getCompartment' + ,'::NxOgre::Shape::getSkeleton' +# ,'::NxOgre::Container< std::string, NxOgre::Cloth* >::begin' +# ,'::NxOgre::Container< std::string, NxOgre::Cloth* >::get' +# ,'::NxOgre::Container< std::string, NxOgre::Cloth* >::getFirst' +# ,'::NxOgre::Container< std::string, NxOgre::Cloth* >::next' +# ,'::NxOgre::Container< std::string, NxOgre::Cloth* >::CopyTo' + ] for e in excludes: print "excluding ", e -# # # main_ns.member_functions(e).exclude() + try: + main_ns.member_functions(e).exclude() + except: + print "FAIL TO EXCLUDE" ## this is probably excessive :) names = ['_begin','_end', '_atEnd', '_next'] @@ -185,15 +207,20 @@ ,'Character' ## defined in header but not very much implementation # ,'RenderableSource' ,'ResourceManager' + ,'::NxOgre::Container< std::string, NxConvexMesh* >' # issue with deleting protected classes # ,'ResourceStreamPtr' - ,'::NxOgre::Blueprints::ActorFactory' - ,'State' - ,'MeshResource' - ,'::NxOgre::Serialiser::SerialiserBase' +# ,'::NxOgre::Blueprints::ActorFactory' +# ,'State' +# ,'MeshResource' +# ,'::NxOgre::Serialiser::SerialiserBase' +# ,'BlueprintUserData' ] for e in excludes: print "Excluding", e -# # main_ns.class_(e).exclude() + try: + main_ns.class_(e).exclude() + except: + print "FAILED" # # # # # # ## I have a challenge that Py++ doesn't recognise these classes by full name (perhaps because they are structs?) @@ -210,7 +237,10 @@ print ("Checking:",c.name) if c.name in excludeName: print ("SPECIAL excluding ", c.name) -# # c.exclude() + try: + c.exclude() + except: + print "FAILED" # a temporary fix for container based classes -- still an issue with them though... # AND this is an overkill -- not all classes need these removed... # # if c.decl_string.startswith ('::NxOgre::Container<'): @@ -230,11 +260,23 @@ for e in excludes: main_ns.typedefs(e).exclude() - ### Operators + ### Operators + for o in main_ns.operators(): + if o.decl_string.startswith('::NxOgre::Container<'): + if o.decl_string.endswith('[]'): + print "Excluding Operator: ", o + o.exclude() excludes=['::NxOgre::Container<std::string, NxOgre::FluidDrain*>::operator[]' - ,'::NxOgre::Container<std::string, NxOgre::FluidEmitter*>::operator[]'] -# for e in excludes: -# main_ns.operators(e).exclude() + ,'::NxOgre::Container<std::string, NxOgre::FluidEmitter*>::operator[]' + ,'::NxOgre::Container< std::string, NxOgre::Cloth* >::operator[]' + ,'::NxOgre::Container< std::string, NxOgre::Fluid* >::operator[]' + ] + for e in excludes: + print "Excluding operator:", e + try: + main_ns.operators(e).exclude() + except: + print "FAILED" # ### Constructors # # for c in main_ns.class_('::NxOgre::Pose').constructors(): ## these hide the working constructors Modified: trunk/python-ogre/code_generators/nxogre/python_nxogre_aliases.h =================================================================== --- trunk/python-ogre/code_generators/nxogre/python_nxogre_aliases.h 2008-06-20 06:56:17 UTC (rev 598) +++ trunk/python-ogre/code_generators/nxogre/python_nxogre_aliases.h 2008-06-20 06:57:55 UTC (rev 599) @@ -1,6 +1,12 @@ typedef std::vector<NxOgre::Joint::LimitPlane,std::allocator<NxOgre::Joint::LimitPlane> > VectorJointLimitPlane; typedef std::vector<NxOgre::SimplePlane*,std::allocator<NxOgre::SimplePlane*> > VectorSimplePlane; +typedef std::map<std::string, NxOgre::Container<std::string, NxOgre::CharacterSystem::Character*>::Containee, std::less<std::string>, std::allocator<std::pair<std::string const, NxOgre::Container<std::string, NxOgre::CharacterSystem::Character*>::Containee> > >\ + MapContainerCharacterSystemCharacter; +typedef std::map<std::string, NxOgre::Container<std::string, NxOgre::CharacterSystem::CharacterMovementModel*>::Containee, std::less<std::string>, std::allocator<std::pair<std::string const, NxOgre::Container<std::string, NxOgre::CharacterSystem::CharacterMovementModel*>::Containee> > >\ + MapContainerCharacterSystemMovementModel; + + 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/nxogre/python_nxogre_sizeof.h =================================================================== --- trunk/python-ogre/code_generators/nxogre/python_nxogre_sizeof.h 2008-06-20 06:56:17 UTC (rev 598) +++ trunk/python-ogre/code_generators/nxogre/python_nxogre_sizeof.h 2008-06-20 06:57:55 UTC (rev 599) @@ -27,7 +27,7 @@ sizeof ( NxHeightField ); sizeof ( NxUserContactReport ); //sizeof ( NxOgre::FluidDrain ); -sizeof ( NxImplicitScreenMesh ); +// sizeof ( NxImplicitScreenMesh ); sizeof ( NxMemoryType ); sizeof ( NxJointState ); sizeof ( NxBounds3 ); Modified: trunk/python-ogre/code_generators/ogre/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/ogre/generate_code.py 2008-06-20 06:56:17 UTC (rev 598) +++ trunk/python-ogre/code_generators/ogre/generate_code.py 2008-06-20 06:57:55 UTC (rev 599) @@ -1033,13 +1033,20 @@ for cls in main_ns.classes(): if cls.name not in NoPropClasses: + print "ADDING PROPS", cls cls.add_properties( recognizer=ogre_properties.ogre_property_recognizer_t() ) common_utils.remove_DuplicateProperties ( cls ) ## because we want backwards pyogre compatibility lets add leading lowercase properties common_utils.add_LeadingLowerProperties ( cls ) + common_utils.add_constants( mb, { 'ogre_version' : '"%s"' % environment.ogre.version.replace("\n", "\\\n") - , 'python_version' : '"%s"' % sys.version.replace("\n", "\\\n" ) } ) - + , 'python_version' : '"%s"' % sys.version.replace("\n", "\\\n" ) + , 'pythonogre_version' : '"%s"' %\ + '.'.join( [environment.PythonOgreMajorVersion, + environment.PythonOgreMinorVersion, + environment.PythonOgrePatchVersion] ) } + ) + ## need to create a welcome doc string for this... common_utils.add_constants( mb, { '__doc__' : '"Python-Ogre Main Module for OGRE 3D"' } ) Modified: trunk/python-ogre/code_generators/ogre/hand_made_wrappers.py =================================================================== --- trunk/python-ogre/code_generators/ogre/hand_made_wrappers.py 2008-06-20 06:56:17 UTC (rev 598) +++ trunk/python-ogre/code_generators/ogre/hand_made_wrappers.py 2008-06-20 06:57:55 UTC (rev 599) @@ -365,6 +365,22 @@ "\"" + environment.PythonOgrePatchVersion + "\"" ) ); } +## Duplicating to get lower case 'get' +boost::python::tuple +getOgreVersion () { + return ( boost::python::make_tuple( Ogre::StringConverter::toString(OGRE_VERSION_MAJOR), + Ogre::StringConverter::toString(OGRE_VERSION_MINOR), + Ogre::StringConverter::toString(OGRE_VERSION_PATCH), + OGRE_VERSION_NAME + ) ); +} +boost::python::tuple +getPythonOgreVersion () { + return ( boost::python::make_tuple( "\"" + environment.PythonOgreMajorVersion + "\"", + "\"" + environment.PythonOgreMinorVersion + "\"", + "\"" + environment.PythonOgrePatchVersion + "\"" + ) ); +} Ogre::VertexData * Modified: trunk/python-ogre/code_generators/ogre/python_ogre.h =================================================================== --- trunk/python-ogre/code_generators/ogre/python_ogre.h 2008-06-20 06:56:17 UTC (rev 598) +++ trunk/python-ogre/code_generators/ogre/python_ogre.h 2008-06-20 06:57:55 UTC (rev 599) @@ -32,44 +32,44 @@ // This code is VERY UNTESTED and PROBABLY BROKEN // Uee the CVS version of Ogre !!!! -#ifndef OGRE_VERSION_1.4 // these are needed for the 1.2.x SDK - #include "OgreEventListeners.h" - #include "OgreEventQueue.h" - #include "OgreKeyEvent.h" - #include "OgreMouseEvent.h" +// #ifndef OGRE_VERSION_1.4 // these are needed for the 1.2.x SDK +// #include "OgreEventListeners.h" +// #include "OgreEventQueue.h" +// #include "OgreKeyEvent.h" +// #include "OgreMouseEvent.h" -namespace Ogre { -class CombinedListener : public FrameListener, public KeyListener, - public MouseListener, public MouseMotionListener -{ -public: - CombinedListener() {} - virtual ~CombinedListener() {} - - // KeyListener methods - virtual void keyClicked(KeyEvent *e) {} - virtual void keyPressed(KeyEvent *e) {} - virtual void keyReleased(KeyEvent *e) {} - - // MouseListener methods - virtual void mouseClicked(MouseEvent *e) {} - virtual void mousePressed(MouseEvent *e) {} - virtual void mouseReleased(MouseEvent *e) {} - virtual void mouseEntered(MouseEvent *e) {} - virtual void mouseExited(MouseEvent *) {} - - // MouseMotionListener methods - virtual void mouseMoved(MouseEvent *e) {} - virtual void mouseDragged(MouseEvent *e) {} - - // FrameEvent methods - virtual bool frameStarted (const FrameEvent &evt) {return true;} - virtual bool frameEnded (const FrameEvent &evt) {return true;} -}; +// namespace Ogre { +// class CombinedListener : public FrameListener, public KeyListener, +// public MouseListener, public MouseMotionListener +// { +// public: +// CombinedListener() {} +// virtual ~CombinedListener() {} +// +// // KeyListener methods +// virtual void keyClicked(KeyEvent *e) {} +// virtual void keyPressed(KeyEvent *e) {} +// virtual void keyReleased(KeyEvent *e) {} +// +// // MouseListener methods +// virtual void mouseClicked(MouseEvent *e) {} +// virtual void mousePressed(MouseEvent *e) {} +// virtual void mouseReleased(MouseEvent *e) {} +// virtual void mouseEntered(MouseEvent *e) {} +// virtual void mouseExited(MouseEvent *) {} +// +// // MouseMotionListener methods +// virtual void mouseMoved(MouseEvent *e) {} +// virtual void mouseDragged(MouseEvent *e) {} +// +// // FrameEvent methods +// virtual bool frameStarted (const FrameEvent &evt) {return true;} +// virtual bool frameEnded (const FrameEvent &evt) {return true;} +// }; +// +// } +// #endif -} -#endif - #endif//__python_ogre_h_5B402FBF_8DE8_49C9_AF71_1CF9634B5344__ Modified: trunk/python-ogre/code_generators/ogre/python_ogre_sizeof.h =================================================================== --- trunk/python-ogre/code_generators/ogre/python_ogre_sizeof.h 2008-06-20 06:56:17 UTC (rev 598) +++ trunk/python-ogre/code_generators/ogre/python_ogre_sizeof.h 2008-06-20 06:57:55 UTC (rev 599) @@ -14,6 +14,13 @@ sizeof( stdext::_Hash<stdext::_Hmap_traits<std::string, Ogre::MovableObject*, stdext::hash_compare<std::string, std::less<std::string> >, std::allocator<std::pair<std::string const, Ogre::MovableObject*> >, false> > ); #endif +#if OGRE_VERSION_MINOR == 4 + +#else + sizeof ( Ogre::ResourceBackgroundQueue ); +#endif + + sizeof( std::pair<Ogre::SharedPtr<Ogre::Resource>, bool> ); std::vector< int > v; Deleted: trunk/python-ogre/demos/ogre/1.py =================================================================== --- trunk/python-ogre/demos/ogre/1.py 2008-06-20 06:56:17 UTC (rev 598) +++ trunk/python-ogre/demos/ogre/1.py 2008-06-20 06:57:55 UTC (rev 599) @@ -1,4 +0,0 @@ -import time - -while True: - print "hello", time.localtime() \ No newline at end of file Modified: trunk/python-ogre/demos/ogre/Demo_Basic.py =================================================================== --- trunk/python-ogre/demos/ogre/Demo_Basic.py 2008-06-20 06:56:17 UTC (rev 598) +++ trunk/python-ogre/demos/ogre/Demo_Basic.py 2008-06-20 06:57:55 UTC (rev 599) @@ -19,7 +19,7 @@ import ogre.io.OIS as OIS class OGREMain(ogre.Root): - def __init__(self, plugins_path='src/plugins.cfg',resource_path='resources.cfg'): + def __init__(self, plugins_path='plugins.cfg',resource_path='resources.cfg'): ogre.Root.__init__(self, plugins_path) self.plugins_path = plugins_path self.resource_path = resource_path @@ -55,22 +55,23 @@ for ren in rend_list: print ren.getName() cap = ren.getCapabilities() - print "MaxPointSize:", cap.getMaxPointSize() - print "Stencil stuff:", cap.getStencilBufferBitDepth() - opts = ren.getConfigOptions() - print "Opts:", opts - print "Opts keys:",opts.keys() - for i in opts: - print "Key:",i.key - print i.value.currentValue - print i.value.name - print i.value.immutable - for v in i.value.possibleValues: - print "Posible Value", v - - print dir(opts) - print "Opts", opts['Video Mode'] - print"Viewo Mode:", ren.getConfigOptions()['Video Mode'] + if cap: + print "MaxPointSize:", cap.getMaxPointSize() + print "Stencil stuff:", cap.getStencilBufferBitDepth() + opts = ren.getConfigOptions() + print "Opts:", opts + print "Opts keys:",opts.keys() + for i in opts: + print "Key:",i.key + print i.value.currentValue + print i.value.name + print i.value.immutable + for v in i.value.possibleValues: + print "Posible Value", v + + print dir(opts) + print "Opts", opts['Video Mode'] + print"Viewo Mode:", ren.getConfigOptions()['Video Mode'] self.setRenderSystem(rend_list[-1]) def _build_scene(self): Deleted: trunk/python-ogre/demos/ogre/Demo_Blank.py =================================================================== --- trunk/python-ogre/demos/ogre/Demo_Blank.py 2008-06-20 06:56:17 UTC (rev 598) +++ trunk/python-ogre/demos/ogre/Demo_Blank.py 2008-06-20 06:57:55 UTC (rev 599) @@ -1,110 +0,0 @@ -# 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 -# 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 sys -sys.path.insert(0,'..') -import PythonOgreConfig - -import ogre.renderer.OGRE as ogre - - -def doit(): - # create the root - self.root = ogre.Root(getPluginPath()) - - # setup the resources - config = ogre.ConfigFile() - config.load('resources.cfg' ) #, '', False ) - seci = config.getSectionIterator() - while seci.hasMoreElements(): - secName = seci.peekNextKey() - settings = seci.getNext() - for entry in settings: - typeName = entry.key - archName =entry.value - ogre.ResourceGroupManager.getSingleton().addResourceLocation(archName, typeName, secName) - - - # load the resources - ogre.ResourceGroupManager.getSingleton().initialiseAllResourceGroups() - carryOn = self.root.showConfigDialog() - if carryOn: - self.renderWindow = self.root.initialise(True, "OGRE Render Window") - else: - sys.exit() - self.sceneManager = self.root.createSceneManager(ogre.ST_GENERIC,"ExampleSMInstance") - self.camera = self.sceneManager.createCamera('PlayerCam') - self.camera.setPosition(ogre.Vector3(0, 0, 500)) - self.camera.lookAt(ogre.Vector3(0, 0, -300)) - - self.viewport = self.renderWindow.addViewport(self.camera) - - sceneManager.ambientLight = ogre.ColourValue(0.5, 0.5, 0.5) - sceneManager.setSkyBox(True, "Examples/SpaceSkyBox") - light = sceneManager.createLight('MainLight') - light.setPosition (20, 80, 50) - - # need a framelistener - self.frameListener = BlankListener(self.renderWindow, self.camera, self.sceneManager) - self.root.addFrameListener(self.frameListener) - - self.root.startRendering() - - -class BlankListener(ogre.FrameListener, ogre.WindowEventListener): - def __init__(self, renderWindow, camera, sceneManager): - ogre.FrameListener.__init__(self) - ogre.WindowEventListener.__init__(self) - self.sceneManager = sceneManager - self.camera = camera - self.renderWindow = renderWindow - - windowHnd = self.renderWindow.getCustomAttributeInt("WINDOW") - self.InputManager = OIS.createPythonInputSystem([("WINDOW",str(windowHnd))]) - self.Keyboard = self.InputManager.createInputObjectKeyboard( OIS.OISKeyboard, self.bufferedKeys ) - self.Mouse = self.InputManager.createInputObjectMouse( OIS.OISMouse, self.bufferedMouse ) - - #Set initial mouse clipping size - self.windowResized(self.renderWindow) - - #Register as a Window listener - ogre.WindowEventUtilities.addWindowEventListener(self.renderWindow, self); - - def windowClosed(self, rw): - if( rw == self.renderWindow ): - if( self.InputManager ): - self.InputManager.destroyInputObjectMouse( self.Mouse ) - self.InputManager.destroyInputObjectKeyboard( self.Keyboard ) - OIS.InputManager.destroyInputSystem(self.InputManager) - self.InputManager=None - - - def windowResized (self, rw): - [width, height, depth, left, top] = rw.getMetrics() # Note the wrapped function as default needs unsigned int's - ms = self.Mouse.getMouseState() - ms.width = width - ms.height = height - - def __del__ (self ): - ogre.WindowEventUtilities.removeWindowEventListener(self.renderWindow, self) - self.windowClosed(self.renderWindow) - - def frameStarted(self, frameEvent): - if(self.renderWindow.isClosed()): - return False - ##Need to capture/update each device - this will also trigger any listeners - self.Keyboard.capture() - self.Mouse.capture() - - if self.Keyboard.isKeyDown(OIS.KC_ESCAPE) or self.Keyboard.isKeyDown(OIS.KC_Q): - return False - return sf.FrameListener.frameStarted(self, frameEvent) - Modified: trunk/python-ogre/demos/ogre/Demo_Facial.py =================================================================== --- trunk/python-ogre/demos/ogre/Demo_Facial.py 2008-06-20 06:56:17 UTC (rev 598) +++ trunk/python-ogre/demos/ogre/Demo_Facial.py 2008-06-20 06:57:55 UTC (rev 599) @@ -63,7 +63,7 @@ self.animationStates.append( anim) # Create Camera - self.camnode = sceneManager.RootSceneNode.createChildSceneNode("CamNode1", ogre.Vector3(0, 25, 90)) + self.camnode = sceneManager.getRootSceneNode().createChildSceneNode("CamNode1", ogre.Vector3(0, 25, 90)) node = self.camnode.createChildSceneNode("PitchNode1") node.attachObject(self.camera) Modified: trunk/python-ogre/demos/ogre/Demo_Fresnel.py =================================================================== --- trunk/python-ogre/demos/ogre/Demo_Fresnel.py 2008-06-20 06:56:17 UTC (rev 598) +++ trunk/python-ogre/demos/ogre/Demo_Fresnel.py 2008-06-20 06:57:55 UTC (rev 599) @@ -240,12 +240,12 @@ self.planeEnt.setMaterialName("Examples/FresnelReflectionRefraction") - sceneManager.rootSceneNode.createChildSceneNode().attachObject(self.planeEnt) + sceneManager.getRootSceneNode().createChildSceneNode().attachObject(self.planeEnt) sceneManager.setSkyBox(True, "Examples/CloudyNoonSkyBox") #My node to which all objects will be attached - self.rootNode = sceneManager.rootSceneNode.createChildSceneNode() + self.rootNode = sceneManager.getRootSceneNode().createChildSceneNode() # create above Water Entities # # for entity_name in "head1 Pillar1 Pillar2 Pillar3 Pillar4 UpperSurround".split(): Modified: trunk/python-ogre/demos/ogre/Demo_Grass.py =================================================================== --- trunk/python-ogre/demos/ogre/Demo_Grass.py 2008-06-20 06:56:17 UTC (rev 598) +++ trunk/python-ogre/demos/ogre/Demo_Grass.py 2008-06-20 06:57:55 UTC (rev 599) @@ -101,14 +101,13 @@ ## a little randomness self.xpos += reg.getCentre().x * 0.001 self.zpos += reg.getCentre().z * 0.001 - offset.x = math.sin(self.xpos) * 0.05 - offset.z = math.sin(self.zpos) * 0.05 + offset.x = math.sin(self.xpos) * 5 + offset.z = math.sin(self.zpos) * 5 for lod in reg.getLODIterator(): for mat in lod.getMaterialIterator(): for geom in mat.getGeometryIterator(): geom.setCustomParameter(OFFSET_PARAM, offset) - def frameStarted( self, evt) : global mAnimState if sf.FrameListener.frameStarted(self, evt) == False: @@ -396,11 +395,18 @@ ## Put an Ogre head in the middle m = ogre.MeshManager.getSingleton().load("ogrehead.mesh", ogre.ResourceGroupManager.DEFAULT_RESOURCE_GROUP_NAME) - - ### Note the python version of suggestTangentVectorBuildParams!! - ret, src, dest = m.suggestTangentVectorBuildParams(ogre.VES_TANGENT) - if ( not ret): - m.buildTangentVectors(ogre.VES_TANGENT, src, dest) + + + if ogre.GetPythonOgreVersion()[1] == '1' and int(ogre.GetPythonOgreVersion()[1]) < 2: ## Python Ogre after 1.2 has API changes + ### Note the python version of suggestTangentVectorBuildParams!! + ret, src, dest = m.suggestTangentVectorBuildParams(ogre.VES_TANGENT) + if ( not ret): + m.buildTangentVectors(ogre.VES_TANGENT, src, dest) + else: ## note the change for more recent version of Python-Ogre... + ### Note the python version of suggestTangentVectorBuildParams!! + ret, src, dest = m.suggestTangentVectorBuildParams(ogre.VES_TANGENT,1,1) + if ( not ret): + m.buildTangentVectors(ogre.VES_TANGENT, src, dest) e = self.sceneManager.createEntity("head", "ogrehead.mesh") e.setMaterialName("Examples/OffsetMapping/Specular") @@ -408,10 +414,9 @@ headNode.attachObject(e) headNode.setScale(7,7,7) headNode.setPosition(0,200,0) - e.setNormaliseNormals(True) + headNode.yaw(ogre.Degree(15)) self.camera.move(ogre.Vector3(0,350,0)) - print "2" - + def _createFrameListener(self): self.frameListener = GrassListener(self.renderWindow, self.camera, self.sceneManager) self.root.addFrameListener(self.frameListener) Modified: trunk/python-ogre/demos/ogre/SampleLoadingBar.py =================================================================== --- trunk/python-ogre/demos/ogre/SampleLoadingBar.py 2008-06-20 06:56:17 UTC (rev 598) +++ trunk/python-ogre/demos/ogre/SampleLoadingBar.py 2008-06-20 06:57:55 UTC (rev 599) @@ -86,9 +86,14 @@ self.mLoadingDescriptionElement.setCaption(ogre.UTFString("Parsing scripts..")) self.mWindow.update() - def scriptParseStarted(self, scriptName): - self.mLoadingCommentElement.setCaption(ogre.UTFString(scriptName)) - self.mWindow.update() + if ogre.OgreVersionString[:2] == "12": + def scriptParseStarted(self, scriptName): + self.mLoadingCommentElement.setCaption(ogre.UTFString(scriptName)) + self.mWindow.update() + else: + def scriptParseStarted(self, scriptName, skipThisScript): + self.mLoadingCommentElement.setCaption(ogre.UTFString(scriptName)) + self.mWindow.update() if ogre.OgreVersionString[:2] == "12": def scriptParseEnded(self): @@ -96,7 +101,7 @@ self.mLoadingBarElement.getWidth() + self.mProgressBarInc) self.mWindow.update() else: - def scriptParseEnded(self, scriptName): + def scriptParseEnded(self, scriptName, skipped): self.mLoadingBarElement.setWidth( self.mLoadingBarElement.getWidth() + self.mProgressBarInc) self.mWindow.update() Deleted: trunk/python-ogre/demos/ogre/a1.py =================================================================== --- trunk/python-ogre/demos/ogre/a1.py 2008-06-20 06:56:17 UTC (rev 598) +++ trunk/python-ogre/demos/ogre/a1.py 2008-06-20 06:57:55 UTC (rev 599) @@ -1,3 +0,0 @@ -import ogre.renderer.OGRE as ogre -def test(): - print ogre.sm Deleted: trunk/python-ogre/demos/ogre/c1.sed =================================================================== --- trunk/python-ogre/demos/ogre/c1.sed 2008-06-20 06:56:17 UTC (rev 598) +++ trunk/python-ogre/demos/ogre/c1.sed 2008-06-20 06:57:55 UTC (rev 599) @@ -1,21 +0,0 @@ -s/mGUIRenderer/self.mGUIRenderer/ -s/mGUISystem/self.mGUISystem/ -s/mDescWindow/self.mDescWindow/ -s/mFixedBias/self.mFixedBias/ -s/mGradientBias/self.mGradientBias/ -s/mGradientClamp/self.mGradientClamp/ -s/mDepthShadowTweak/self.mDepthShadowTweak/ -s/mFixedBiasText/self.mFixedBiasText/ -s/mGradientBiasText/self.mGradientBiasText/ -s/mGradientClampText/self.mGradientClampText/ -s/mCurrentShadowTechnique/self.mCurrentShadowTechnique/ -s/mCurrentProjection/self.mCurrentProjection/ -s/mCurrentMaterial/self.mCurrentMaterial/ -s/mCustomRockwallVparams/self.mCustomRockwallVparams/ -s/mCustomRockwallFparams/self.mCustomRockwallFparams/ -s/mCustoself.mAtheneVparams/self.mCustoself.mAtheneVparams/ -s/mCustoself.mAtheneFparams/self.mCustoself.mAtheneFparams/ -s/mCurrentShadowCameraSetup/self.mCurrentShadowCameraSetup/ -s/mPlane/self.mPlane/ -s/mLiSPSMSetup/self.mLiSPSMSetup/ -s/mIsOpenGL/self.mIsOpenGL/ \ No newline at end of file Modified: trunk/python-ogre/demos/ogre/quake3settings.cfg =================================================================== --- trunk/python-ogre/demos/ogre/quake3settings.cfg 2008-06-20 06:56:17 UTC (rev 598) +++ trunk/python-ogre/demos/ogre/quake3settings.cfg 2008-06-20 06:57:55 UTC (rev 599) @@ -1,5 +1,3 @@ -#Pak0Location: ../media/packs/ogretestmap.zip +Pak0Location: ../media/packs/ogretestmap.zip #Map: maps/q3dm3.bsp -#Map: ogretestmap.bsp -Pak1Location: c:/temp/ww -Map: maps/wamphi1.bsp +Map: ogretestmap.bsp Modified: trunk/python-ogre/environment.py =================================================================== --- trunk/python-ogre/environment.py 2008-06-20 06:56:17 UTC (rev 598) +++ trunk/python-ogre/environment.py 2008-06-20 06:57:55 UTC (rev 599) @@ -955,7 +955,7 @@ class navi: active = True pythonModule = True - version="1.5" + version="1.6" parent="ogre/gui" name ='navi' CCFLAGS = '-D"WIN32" -D"NDEBUG", -D"WINDOWS"' @@ -964,15 +964,15 @@ include_dirs = [ Config.PATH_Boost ,Config.PATH_INCLUDE_Ogre ,Config.PATH_INCLUDE_navi - ,os.path.join(Config.PATH_navi,'..','Dependencies','win32','llmozlib','include') + ,os.path.join(Config.PATH_navi,'..','Dependencies','win32','astral','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') + ,os.path.join(Config.PATH_navi,'..','Dependencies','win32','astral','lib') ] CheckIncludes=[] - libs=[ Config.LIB_Boost, 'Navi', 'OgreMain','llmozlib', 'user32', + libs=[ Config.LIB_Boost, 'Navi', 'OgreMain','Astral', 'user32', 'kernel32.lib', 'gdi32.lib', 'winspool.lib', 'comdlg32.lib', 'advapi32.lib', 'shell32.lib','ole32.lib','oleaut32.lib','uuid.lib' ] ModuleName="navi" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2008-06-20 06:56:10
|
Revision: 598 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=598&view=rev Author: andy_miller Date: 2008-06-19 23:56:17 -0700 (Thu, 19 Jun 2008) Log Message: ----------- nxogre cleanup Removed Paths: ------------- trunk/python-ogre/ThirdParty/nxogre/FireState.cpp trunk/python-ogre/ThirdParty/nxogre/FireState.h trunk/python-ogre/ThirdParty/nxogre/Flour.cpp Deleted: trunk/python-ogre/ThirdParty/nxogre/FireState.cpp =================================================================== --- trunk/python-ogre/ThirdParty/nxogre/FireState.cpp 2008-06-20 06:54:10 UTC (rev 597) +++ trunk/python-ogre/ThirdParty/nxogre/FireState.cpp 2008-06-20 06:56:17 UTC (rev 598) @@ -1 +0,0 @@ -// FireState Deleted: trunk/python-ogre/ThirdParty/nxogre/FireState.h =================================================================== Deleted: trunk/python-ogre/ThirdParty/nxogre/Flour.cpp =================================================================== --- trunk/python-ogre/ThirdParty/nxogre/Flour.cpp 2008-06-20 06:54:10 UTC (rev 597) +++ trunk/python-ogre/ThirdParty/nxogre/Flour.cpp 2008-06-20 06:56:17 UTC (rev 598) @@ -1 +0,0 @@ -junk \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2008-06-20 06:54:07
|
Revision: 597 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=597&view=rev Author: andy_miller Date: 2008-06-19 23:54:10 -0700 (Thu, 19 Jun 2008) Log Message: ----------- nxogre update Modified Paths: -------------- trunk/python-ogre/ThirdParty/nxogre/BetajaenCC.cpp trunk/python-ogre/ThirdParty/nxogre/BetajaenCC.h trunk/python-ogre/ThirdParty/nxogre/NxOgre.h trunk/python-ogre/ThirdParty/nxogre/NxOgreActor.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreActor.h trunk/python-ogre/ThirdParty/nxogre/NxOgreAllocator.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreAllocator.h trunk/python-ogre/ThirdParty/nxogre/NxOgreBody.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreBody.h trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacter.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacter.h trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterController.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterController.h trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterModel.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterModel.h trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterMovementModel.h trunk/python-ogre/ThirdParty/nxogre/NxOgreCloth.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreCloth.h trunk/python-ogre/ThirdParty/nxogre/NxOgreConfig.h trunk/python-ogre/ThirdParty/nxogre/NxOgreContactCallback.h trunk/python-ogre/ThirdParty/nxogre/NxOgreContainer.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreContainer.h trunk/python-ogre/ThirdParty/nxogre/NxOgreDebugRenderer.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreDualIdentifier.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreDualIdentifier.h trunk/python-ogre/ThirdParty/nxogre/NxOgreError.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreExtendedTypes.h trunk/python-ogre/ThirdParty/nxogre/NxOgreFluid.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreFluid.h trunk/python-ogre/ThirdParty/nxogre/NxOgreForceField.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreGroup.h trunk/python-ogre/ThirdParty/nxogre/NxOgreHelpers.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreHelpers.h trunk/python-ogre/ThirdParty/nxogre/NxOgreIntersection.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreIntersection.h trunk/python-ogre/ThirdParty/nxogre/NxOgreJoint.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreJoint.h trunk/python-ogre/ThirdParty/nxogre/NxOgreJointCallback.h trunk/python-ogre/ThirdParty/nxogre/NxOgreJointSet1.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreJointSet2.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreLog.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreLog.h trunk/python-ogre/ThirdParty/nxogre/NxOgreMachine.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreMachine.h trunk/python-ogre/ThirdParty/nxogre/NxOgreMaterial.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreMaterial.h trunk/python-ogre/ThirdParty/nxogre/NxOgreMeshRenderable.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreMeshRenderable.h trunk/python-ogre/ThirdParty/nxogre/NxOgreNodeRenderable.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreNodeRenderable.h trunk/python-ogre/ThirdParty/nxogre/NxOgreNxActorController.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreNxActorController.h trunk/python-ogre/ThirdParty/nxogre/NxOgreOgreMeshRenderable.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreOgreMeshRenderable.h trunk/python-ogre/ThirdParty/nxogre/NxOgreOgreNodeRenderable.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreOgreNodeRenderable.h trunk/python-ogre/ThirdParty/nxogre/NxOgreOgreSceneRenderer.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreOgreSceneRenderer.h trunk/python-ogre/ThirdParty/nxogre/NxOgreParams.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreParams.h trunk/python-ogre/ThirdParty/nxogre/NxOgrePerformer.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgrePerformer.h trunk/python-ogre/ThirdParty/nxogre/NxOgrePhysXDriver.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgrePhysXDriver.h trunk/python-ogre/ThirdParty/nxogre/NxOgrePlatform.h trunk/python-ogre/ThirdParty/nxogre/NxOgrePose.h trunk/python-ogre/ThirdParty/nxogre/NxOgrePrerequisites.h trunk/python-ogre/ThirdParty/nxogre/NxOgreRaycaster.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreRaycaster.h trunk/python-ogre/ThirdParty/nxogre/NxOgreRemoteDebuggerConnection.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreRemoteDebuggerConnection.h trunk/python-ogre/ThirdParty/nxogre/NxOgreRenderable.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreRenderable.h trunk/python-ogre/ThirdParty/nxogre/NxOgreRenderableSource.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreRenderableSource.h trunk/python-ogre/ThirdParty/nxogre/NxOgreResourceManager.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreResourceManager.h trunk/python-ogre/ThirdParty/nxogre/NxOgreResourceSystem.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreResourceSystem.h trunk/python-ogre/ThirdParty/nxogre/NxOgreScene.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreScene.h trunk/python-ogre/ThirdParty/nxogre/NxOgreSceneContactController.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreSceneController.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreSceneController.h trunk/python-ogre/ThirdParty/nxogre/NxOgreSceneRenderer.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreSceneRenderer.h trunk/python-ogre/ThirdParty/nxogre/NxOgreSceneTriggerController.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreSceneTriggerController.h trunk/python-ogre/ThirdParty/nxogre/NxOgreShape.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreShape.h trunk/python-ogre/ThirdParty/nxogre/NxOgreShapePrimitives.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreShapePrimitives.h trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeTerrain.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeTerrain.h trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeWheel.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeWheel.h trunk/python-ogre/ThirdParty/nxogre/NxOgreSheet.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreSheet.h trunk/python-ogre/ThirdParty/nxogre/NxOgreSimpleActor.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreSimpleActor.h trunk/python-ogre/ThirdParty/nxogre/NxOgreSimpleShape.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreSimpleShape.h trunk/python-ogre/ThirdParty/nxogre/NxOgreSkeleton.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreSkeleton.h trunk/python-ogre/ThirdParty/nxogre/NxOgreSleepCallback.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreSleepCallback.h trunk/python-ogre/ThirdParty/nxogre/NxOgreSoftBody.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreSoftBody.h trunk/python-ogre/ThirdParty/nxogre/NxOgreStable.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreStable.h trunk/python-ogre/ThirdParty/nxogre/NxOgreTesting.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreTesting.h trunk/python-ogre/ThirdParty/nxogre/NxOgreThrow.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreTrigger.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreTrigger.h trunk/python-ogre/ThirdParty/nxogre/NxOgreTriggerCallback.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreTriggerCallback.h trunk/python-ogre/ThirdParty/nxogre/NxOgreUserAllocator.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreUserAllocator.h trunk/python-ogre/ThirdParty/nxogre/NxOgreWheelSet.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreWheelSet.h trunk/python-ogre/ThirdParty/nxogre/NxOgreWorld.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreWorld.h Added Paths: ----------- trunk/python-ogre/ThirdParty/nxogre/FireState.cpp trunk/python-ogre/ThirdParty/nxogre/Flour.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreDeletionCallback.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreDeletionCallback.h trunk/python-ogre/ThirdParty/nxogre/NxOgreFileResource.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreFileResource.h trunk/python-ogre/ThirdParty/nxogre/NxOgreFileResourceManager.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreFileResourceManager.h trunk/python-ogre/ThirdParty/nxogre/NxOgreHeightfield.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreHeightfield.h trunk/python-ogre/ThirdParty/nxogre/NxOgreJointCallback.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreKinematicCharacter.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreKinematicCharacter.h trunk/python-ogre/ThirdParty/nxogre/NxOgreKinematicCharacterSweep.h trunk/python-ogre/ThirdParty/nxogre/NxOgreManualHeightfield.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreManualHeightfield.h trunk/python-ogre/ThirdParty/nxogre/NxOgreManualMesh.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreManualMesh.h trunk/python-ogre/ThirdParty/nxogre/NxOgreManualMeshUtil.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreManualMeshUtil.h trunk/python-ogre/ThirdParty/nxogre/NxOgreMaterialAlias.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreMaterialAlias.h trunk/python-ogre/ThirdParty/nxogre/NxOgreMemoryResource.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreMemoryResource.h trunk/python-ogre/ThirdParty/nxogre/NxOgreMemoryResourceManager.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreMemoryResourceManager.h trunk/python-ogre/ThirdParty/nxogre/NxOgreMesh.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreMesh.h trunk/python-ogre/ThirdParty/nxogre/NxOgreMeshParams.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreMeshParams.h trunk/python-ogre/ThirdParty/nxogre/NxOgrePrerequisitesOgre.h trunk/python-ogre/ThirdParty/nxogre/NxOgreResource.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreResource.h trunk/python-ogre/ThirdParty/nxogre/NxOgreResourceCallback.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreResourceCallback.h trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeMeshes.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeMeshes.h trunk/python-ogre/ThirdParty/nxogre/NxOgreTimeStep.h trunk/python-ogre/ThirdParty/nxogre/NxOgreTimer.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreTimer.h trunk/python-ogre/ThirdParty/nxogre/NxOgreTriggerFunction.h trunk/python-ogre/ThirdParty/nxogre/NxOgreVoidPointer.h trunk/python-ogre/ThirdParty/nxogre/NxOgreWheelContactCallback.h trunk/python-ogre/ThirdParty/nxogre/NxOgreWhen.h Modified: trunk/python-ogre/ThirdParty/nxogre/BetajaenCC.cpp =================================================================== --- trunk/python-ogre/ThirdParty/nxogre/BetajaenCC.cpp 2008-06-17 04:38:24 UTC (rev 596) +++ trunk/python-ogre/ThirdParty/nxogre/BetajaenCC.cpp 2008-06-20 06:54:10 UTC (rev 597) @@ -25,4 +25,629 @@ */ #include "NxOgreStable.h" -#include "BetajaenCC.h" \ No newline at end of file +#include "BetajaenCC.h" + +#if 0 + +BETAJAEN_CC_NAMESPACE_START + +/* + Flat + + \note Iterator is known as Type* in this file only. +*/ + +template< class Type, class AllocatorType > +Flat<Type, AllocatorType>::Flat(AllocatorPtr allocator, bool deleteAllocator) + : First(NULL), Last(NULL), End(NULL), Allocator(allocator), AutoDeleteAllocator(deleteAllocator) +{ +} + +///////////////////////////////////////////////////////////// + +template< class Type, class AllocatorType > +Flat<Type, AllocatorType>::~Flat() +{ + _deallocate(First); + if (AutoDeleteAllocator) + delete Allocator; +} + +///////////////////////////////////////////////////////////// + +template< class Type, class AllocatorType > +unsigned int Flat<Type, AllocatorType>::_size() const +{ + return (unsigned int) (Last - First); +} + +///////////////////////////////////////////////////////////// + +template< class Type, class AllocatorType > +unsigned int Flat<Type, AllocatorType>::_capacity() const +{ + return (unsigned int) (First == 0 ? 0 : End - First); +} + +///////////////////////////////////////////////////////////// + +template< class Type, class AllocatorType > +Type* Flat<Type, AllocatorType>::_allocate(unsigned int size) +{ + return (Type*) Allocator->Allocate(size * sizeof(Type)); +} + +///////////////////////////////////////////////////////////// + +template< class Type, class AllocatorType > +void Flat<Type, AllocatorType>::_deallocate(Type* p) +{ + if (p) + Allocator->Deallocate(p); +} + +///////////////////////////////////////////////////////////// + +template< class Type, class AllocatorType > +Type* Flat<Type, AllocatorType>::_reallocate(Type* p, unsigned int size) +{ + return (Iterator) Allocator->Reallocate(p, size * sizeof(Type)); +} + +///////////////////////////////////////////////////////////// + +template< class Type, class AllocatorType > +void Flat<Type, AllocatorType>::_clip(unsigned int size) +{ + + if (size < _size()) + return; + + Iterator new_first = _allocate(size); + _copy(First, Last, new_first); + _destroy(First, Last); + _deallocate(First); + End = new_first + size; + Last = new_first + _size(); + First = new_first; + +} + +///////////////////////////////////////////////////////////// + +template< class Type, class AllocatorType > +void Flat<Type, AllocatorType>::_reserve(unsigned int new_size) +{ + if (_capacity() >= new_size) + return; + + Iterator new_first = _allocate(new_size); + _copy(First, Last, new_first); + _destroy(First, Last); + _deallocate(First); + End = new_first + new_size; + Last = new_first + _size(); + First = new_first; + +} + +///////////////////////////////////////////////////////////// + +template< class Type, class AllocatorType > +Type* Flat<Type, AllocatorType>::_copy(Type* begin, Type* end, Type* dest) +{ + for (;begin != end; ++dest, ++begin) + *dest = *begin; + return dest; +} + +///////////////////////////////////////////////////////////// + +template< class Type, class AllocatorType > +void Flat<Type, AllocatorType>::_delete_range(Type* begin, Type* end) +{ + for (; begin != end; ++begin) { + BETAJAEN_CC_DELETE(*begin); + } +} + +///////////////////////////////////////////////////////////// + +template< class Type, class AllocatorType > +void Flat<Type, AllocatorType>::_destroy(Type* begin, Type* end) +{ + for (; begin != end; ++begin) { + BETAJAEN_CC_DESTRUCTOR(begin) + begin->~Type(); + } +} + +BETAJAEN_CC_NAMESPACE_END + + +/** + SharedList +*/ + +BETAJAEN_CC_NAMESPACE_START + +///////////////////////////////////////////////////////////// + +#define SharedListType SharedList<Type, AllocatorType> +#define TypePtr Type* + +///////////////////////////////////////////////////////////// + +template < class Type, class AllocatorType > +SharedList<Type, AllocatorType>::SharedList(AllocatorType* _allocator, bool _auto_delete_allocator) +{ + if (_allocator == NULL) + _allocator = new AllocatorType(); + + _Flat = new FlatType(_allocator, _auto_delete_allocator); + _Usage = new unsigned int(1); + +} + +///////////////////////////////////////////////////////////// + +template < class Type, class AllocatorType > +SharedList<Type, AllocatorType>::SharedList(const SharedListType& other) +{ + + _Flat = other._Flat; + _Usage = other._Usage; + ++(*_Usage); + +} + +///////////////////////////////////////////////////////////// + +template < class Type, class AllocatorType > +SharedListType& SharedList<Type, AllocatorType>::operator=(const SharedListType& other) +{ + + if (_Flat) + { + _Flat->_delete_range(_Flat->First, _Flat->Last); + delete _Flat; + } + + if (_Usage) + delete _Usage; + + _Flat = other._Flat; + _Usage = other._Usage; + ++(*_Usage); + + return *this; + +} + +///////////////////////////////////////////////////////////// + +template < class Type, class AllocatorType > +TypePtr SharedList<Type, AllocatorType>::Get(size_t pos) +{ + if (pos > Size()) + return NULL; + + return *(_Flat->First + pos); +} + +///////////////////////////////////////////////////////////// + +template < class Type, class AllocatorType > +TypePtr SharedList<Type, AllocatorType>::operator[](size_t pos) +{ + if (pos > Size()) + return NULL; + + return *(_Flat->First + pos); +} + +///////////////////////////////////////////////////////////// + +template < class Type, class AllocatorType > +unsigned int SharedList<Type, AllocatorType>::WhereIs(TypePtr ptr) +{ + + if (_Flat->_size() == 0) + return 0; + + unsigned int i=0; + for(Iterator begin = _Flat->First; begin != _Flat->Last; ++begin, ++i) + { + if (ptr == (*begin)) + return i; + } + + return 0; +} + +///////////////////////////////////////////////////////////// + +template < class Type, class AllocatorType > +bool SharedList<Type, AllocatorType>::Has(TypePtr ptr) +{ + + if (_Flat->_size() == 0) + return false; + + for(Iterator begin = _Flat->First; begin != _Flat->Last; ++begin) + { + if (ptr == (*begin)) + return true; + } + + return false; + +} + +///////////////////////////////////////////////////////////// + +template < class Type, class AllocatorType > +unsigned SharedList<Type, AllocatorType>::Size() const +{ + return _Flat->_size(); +} + +///////////////////////////////////////////////////////////// + +template < class Type, class AllocatorType > +void SharedList<Type, AllocatorType>::Insert(Type* const & val) +{ + + if (_Flat->End <= _Flat->Last) + _Flat->_reserve( (1 + Size()) * 2); + + *_Flat->Last = val; + _Flat->Last++; + +} + +///////////////////////////////////////////////////////////// + +template < class Type, class AllocatorType > +void SharedList<Type, AllocatorType>::Clean(unsigned int n) +{ + _Flat->_clip(_Flat->_size() + n); +} + +///////////////////////////////////////////////////////////// + +template < class Type, class AllocatorType > +void SharedList<Type, AllocatorType>::Destroy(unsigned int n) +{ + if (n == 0) + return Destroy(First); + + if (n == Size()) + return Destroy(Last); + + delete *(_Flat->First + n); + + _Flat->_destroy(_Flat->First + n, _Flat->First + n + 1); + _Flat->_copy(_Flat->First + n + 1, _Flat->Last, _Flat->First + n); + _Flat->Last--; + +} + +///////////////////////////////////////////////////////////// + +template < class Type, class AllocatorType > +void SharedList<Type, AllocatorType>::DestroyAll() +{ + if (Size() == 0) + return; + + _Flat->_delete_range(_Flat->First, _Flat->Last); + // Could be iffy. + _Flat->Last = _Flat->First; + +} + +///////////////////////////////////////////////////////////// + +template < class Type, class AllocatorType > +void SharedList<Type, AllocatorType>::Destroy(TypePtr val) { + unsigned int i = WhereIs(val); + Destroy(i); +} + +///////////////////////////////////////////////////////////// + +template < class Type, class AllocatorType > +void SharedList<Type, AllocatorType>::Destroy(AbsolutePosition position) +{ + + switch(position) { + + case First: + { + delete *_Flat->First; + _Flat->_copy(_Flat->First + 1, _Flat->Last + 1, _Flat->First); + _Flat->Last--; + } + break; + + case Last: + { + _Flat->Last--; + delete *_Flat->Last; + } + break; + + } + +} + +///////////////////////////////////////////////////////////// + +template < class Type, class AllocatorType > +TypePtr SharedList<Type, AllocatorType>::Remove(unsigned int n) +{ + + if (n == 0) + return Remove(First); + + if (n == Size()) + return Remove(Last); + + TypePtr ptr = Get(n); + _Flat->_destroy(_Flat->First + n, _Flat->First + n + 1); + _Flat->_copy(_Flat->First + n + 1, _Flat->Last, _Flat->First + n); + _Flat->Last--; + + return ptr; +} + +///////////////////////////////////////////////////////////// + +template < class Type, class AllocatorType > +TypePtr SharedList<Type, AllocatorType>::Remove(AbsolutePosition position) +{ + + if (_Flat->_size() == 0) + return NULL; + + switch(position) { + + case First: + { + TypePtr t = *(_Flat->First); + _Flat->_copy(_Flat->First + 1, _Flat->Last + 1, _Flat->First); + _Flat->Last--; + return t; + } + + break; + + case Last: + { + _Flat->Last--; + return *(_Flat->Last); + } + break; + } + + return NULL; + +} + +///////////////////////////////////////////////////////////// + +template < class Type, class AllocatorType > +TypePtr SharedList<Type, AllocatorType>::Begin() +{ + + if (_Flat->_size() == 0) + return NULL; + + _Iterator = _Flat->First; + return *_Iterator; + +} + +///////////////////////////////////////////////////////////// + +template < class Type, class AllocatorType > +TypePtr SharedList<Type, AllocatorType>::Next() +{ + + if (_Flat->_size() == 0) + return NULL; + else if (_Iterator == _Flat->Last) + return NULL; + else + return (*_Iterator++); + +} + +///////////////////////////////////////////////////////////// + +template < class Type, class AllocatorType > +TypePtr SharedList<Type, AllocatorType>::End() +{ + + if (_Flat->_size() == 0) + return NULL; + + _Iterator = _Flat->Last - 1; + return *_Iterator; + +} + +///////////////////////////////////////////////////////////// + +template < class Type, class AllocatorType > +TypePtr SharedList<Type, AllocatorType>::Previous() +{ + + if (_Flat->_size() == 0) + return NULL; + else if (_Iterator == _Flat->First - 1) + return NULL; + else + return (*_Iterator--); + +} + +///////////////////////////////////////////////////////////// + +template < class Type, class AllocatorType > +void SharedList<Type, AllocatorType>::Each(void (Type::*MethodPtr)()) { + + if (_Flat->_size() == 0) + return; + + for(Iterator begin = _Flat->First; begin != _Flat->Last; ++begin) { + (*begin->*MethodPtr)(); + } + +} + +///////////////////////////////////////////////////////////// + +template < typename Type, typename AllocatorType> +template < typename _A > +void SharedList<Type, AllocatorType>::Each(void (Type::*MethodPtr)(_A), _A _1) { + + if (_Flat->_size() == 0) + return; + + for(Iterator begin = _Flat->First; begin != _Flat->Last; ++begin) { + (*begin->*MethodPtr)(_1); + } + +} + +///////////////////////////////////////////////////////////// + +template < typename Type, typename AllocatorType> +template < typename _A, typename _B> +void SharedList<Type, AllocatorType>::Each(void (Type::*MethodPtr)(_A, _B), _A _1, _B _2) { + + if (_Flat->_size() == 0) + return; + + for(Iterator begin = _Flat->First; begin != _Flat->Last; ++begin) + (*begin->*MethodPtr)(_1, _2); + +} + +///////////////////////////////////////////////////////////// + +template < typename Type, typename AllocatorType> +template <typename _A, typename _B, typename _C> +void SharedList<Type, AllocatorType>::Each(void (Type::*MethodPtr)(_A, _B, _C), _A _1, _B _2, _C _3) +{ + + if (_Flat->_size() == 0) + return; + + for(Iterator begin = _Flat->First; begin != _Flat->Last; ++begin) + (*begin->*MethodPtr)(_1, _2, _3); + +} + +///////////////////////////////////////////////////////////// + +template < typename Type, typename AllocatorType> +template <typename _A, typename _B, typename _C, typename _D> +void SharedList<Type, AllocatorType>::Each(void (Type::*MethodPtr)(_A, _B, _C, _D), _A _1, _B _2, _C _3, _D _4) +{ + + if (_Flat->_size() == 0) + return; + + for(Iterator begin = _Flat->First; begin != _Flat->Last; ++begin) + (*begin->*MethodPtr)(_1, _2, _3, _4); + +} + +///////////////////////////////////////////////////////////// + +template < typename Type, typename AllocatorType> +template <typename _A, typename _B, typename _C, typename _D, typename _E> +void SharedList<Type, AllocatorType>::Each(void (Type::*MethodPtr)(_A, _B, _C, _D), _A _1, _B _2, _C _3, _D _4, _E _5) { + + if (_Flat->_size() == 0) + return; + + for(Iterator begin = _Flat->First; begin != _Flat->Last; ++begin) + (*begin->*MethodPtr)(_1, _2, _3, _4, _5); + +} + +///////////////////////////////////////////////////////////// + +template < typename Type, typename AllocatorType> +template <typename _A, typename _B, typename _C, typename _D, typename _E, typename _F> +void SharedList<Type, AllocatorType>::Each(void (Type::*MethodPtr)(_A, _B, _C, _D), _A _1, _B _2, _C _3, _D _4, _E _5, _F _6) +{ + + if (_Flat->_size() == 0) + return; + + for(Iterator begin = _Flat->First; begin != _Flat->Last; ++begin) + (*begin->*MethodPtr)(_1, _2, _3, _4, _5, _6); + +} + +///////////////////////////////////////////////////////////// + +template < typename Type, typename AllocatorType> +template <typename _A, typename _B, typename _C, typename _D, typename _E, typename _F, typename _G> +void SharedList<Type, AllocatorType>::Each(void (Type::*MethodPtr)(_A, _B, _C, _D), _A _1, _B _2, _C _3, _D _4, _E _5, _F _6, _G _7) +{ + + if (_Flat->_size() == 0) + return; + + for(Iterator begin = _Flat->First; begin != _Flat->Last; ++begin) + (*begin->*MethodPtr)(_1, _2, _3, _4, _5, _6, _7); + +} + +///////////////////////////////////////////////////////////// + +template < typename Type, typename AllocatorType> +template <typename _A, typename _B, typename _C, typename _D, typename _E, typename _F, typename _G, typename _H> +void SharedList<Type, AllocatorType>::Each(void (Type::*MethodPtr)(_A, _B, _C, _D), _A _1, _B _2, _C _3, _D _4, _E _5, _F _6, _G _7, _H _8) +{ + + if (_Flat->_size() == 0) + return; + + for(Iterator begin = _Flat->First; begin != _Flat->Last; ++begin) + (*begin->*MethodPtr)(_1, _2, _3, _4, _5, _6, _7, _8); + +} + +///////////////////////////////////////////////////////////// + +template < class Type, class AllocatorType > +unsigned int SharedList<Type, AllocatorType>::getUsageCount() const +{ + return *_Usage; +} + +///////////////////////////////////////////////////////////// + +template < class Type, class AllocatorType > +Flat<Type*, AllocatorType>* SharedList<Type, AllocatorType>::getFlat() const { + return _Flat; +} + +///////////////////////////////////////////////////////////// + +#undef SharedListType +#undef TypePtr + +///////////////////////////////////////////////////////////// + +BETAJAEN_CC_NAMESPACE_END + + +#endif \ No newline at end of file Modified: trunk/python-ogre/ThirdParty/nxogre/BetajaenCC.h =================================================================== --- trunk/python-ogre/ThirdParty/nxogre/BetajaenCC.h 2008-06-17 04:38:24 UTC (rev 596) +++ trunk/python-ogre/ThirdParty/nxogre/BetajaenCC.h 2008-06-20 06:54:10 UTC (rev 597) @@ -48,6 +48,18 @@ #define BETAJAEN_CC_TEMPLATE_CLASS_EXPORT __forceinline // #define BETAJAEN_CC_FUNCTION_EXPORT NxPublicFunction + +/** \brief Delete macro. Used if you have your own leak checker, etc. +*/ +// #define BETAJAEN_CC_DELETE(ptr) \ +// {::NxOgre::Allocator::getPtr()->watch_delete(static_cast<void*>(ptr));}; \ +// delete ptr; + +// /** \brief Called just before when a class is destroyed using it's destructor. +// */ +// #define BETAJAEN_CC_DESTRUCTOR(ptr) \ +// ::NxOgre::Allocator::getPtr()->watch_delete(begin); + ////////////////////////////////////////////////////////////////////////// #if (BETAJAEN_CC_DEBUG_COMMENTS == 1) @@ -73,11 +85,9 @@ #endif #if (_MSC_VER>=1000) -# define BETAJAEN_CC_INLINE -// __forceinline +# define BETAJAEN_CC_INLINE __forceinline #else -# define BETAJAEN_CC_INLINE -//inline +# define BETAJAEN_CC_INLINE inline #endif #ifndef BETAJAEN_CC_CLASS_EXPORT @@ -92,15 +102,24 @@ # define BETAJAEN_CC_FUNCTION_EXPORT #endif +#ifndef BETAJAEN_CC_DELETE +# define BETAJAEN_CC_DELETE(ptr) delete ptr; +#endif + +#ifndef BETAJAEN_CC_DESTRUCTOR +# define BETAJAEN_CC_DESTRUCTOR(ptr) +#endif + BETAJAEN_CC_NAMESPACE_END ////////////////////////////////////////////////////////////////////////// BETAJAEN_CC_NAMESPACE_START + class SharedAllocator; - template <class TypePtr, class AllocatorType = SharedAllocator> class Flat; +template <class BaseType, class AllocatorType = SharedAllocator> class Array; template <class BaseType, class AllocatorType = SharedAllocator> class SharedList; template <typename IdentifierType, class BaseType, class AllocatorType = SharedAllocator> class SharedMap; template <typename IdentifierType, class TypePtr> class Tree; @@ -264,9 +283,7 @@ BETAJAEN_CC_INLINE void _delete_range(Iterator begin, Iterator end) { for (; begin != end; ++begin) { - {::NxOgre::Allocator::getPtr()->watch_delete(static_cast<void*>(*begin));}; - delete *begin; - /** NxOgre Remove*/ // delete *begin; + BETAJAEN_CC_DELETE(*begin); } } @@ -275,15 +292,15 @@ BETAJAEN_CC_INLINE void _destroy(Iterator begin, Iterator end) { for (; begin != end; ++begin) { - /** NxOgre */ ::NxOgre::Allocator::getPtr()->watch_delete(begin); + BETAJAEN_CC_DESTRUCTOR(begin) begin->~Type(); } } ///////////////////////////////////////////////////////////// -private: AllocatorPtr Allocator; -private: bool AutoDeleteAllocator; +protected: AllocatorPtr Allocator; +protected: bool AutoDeleteAllocator; public: Iterator First, Last, End; }; // End of Flat<Type,AllocatorType> class. @@ -294,6 +311,68 @@ BETAJAEN_CC_NAMESPACE_START +template + < + class Type, /* Class to Store; A, myClassName, etc. */ + class AllocatorType /* Allocator to use, or leave blank for SharedAllocator */ + > +class BETAJAEN_CC_CLASS_EXPORT Array { + +public: + +typedef Type* TypePtr; +typedef Array<Type, AllocatorType> ArrayType; +typedef Flat<Type, AllocatorType> FlatType; +typedef FlatType* FlatPtr; + +BETAJAEN_CC_INLINE Array(AllocatorType* _allocator = NULL, bool _auto_delete_allocator = true) +{ + if (_allocator == NULL) + _allocator = new AllocatorType(); + + _Flat = new FlatType(_allocator, _auto_delete_allocator); + +} + +BETAJAEN_CC_INLINE ~Array() +{ + delete _Flat; +} + +BETAJAEN_CC_INLINE TypePtr getPtr() +{ + return _Flat->First; +} + +BETAJAEN_CC_INLINE unsigned int Size() +{ + return _Flat->_size(); +} + +BETAJAEN_CC_INLINE void Append(Type v) { + + if (_Flat->End <= _Flat->Last) + _Flat->_reserve( (1 + _Flat->_size()) * 2); + + *_Flat->Last = v; + _Flat->Last++; + +} + +BETAJAEN_CC_INLINE void Clip() { + _Flat->_clip(0); +} + +private: FlatPtr _Flat; + +}; + +BETAJAEN_CC_NAMESPACE_END + +////////////////////////////////////////////////////////////////////////// + +BETAJAEN_CC_NAMESPACE_START + /** \brief A list of pointers with garbage collections and the ability to share the same list with similar lists. Like STL's Vector. @@ -616,7 +695,21 @@ } +// \brief Destroys everything +// +BETAJAEN_CC_INLINE void RemoveAll() +{ + if (Size() == 0) + return; + _Flat->_deallocate(_Flat->First); + + // Could be iffy. + _Flat->Last = _Flat->First; + +} + + /** \brief Places the Iterator at the beginning of the List */ BETAJAEN_CC_INLINE TypePtr Begin() @@ -869,6 +962,13 @@ }; +class BETAJAEN_CC_CLASS_EXPORT NodeIterator +{ +public: + NodePtr _Up[50]; + NodePtr _It; + int _Top; +}; /** \brief Tree constructor */ @@ -884,11 +984,16 @@ { } +public: BETAJAEN_CC_INLINE bool isEmpty() const { + return (_Root == 0); +} /** \brief Destroys all the nodes in the tree and deletes all of the values referenced in it. */ public: BETAJAEN_CC_INLINE void DestroyAll() { + if (_Root == NULL) + return; NodePtr iterator = _Root; NodePtr save = 0; @@ -911,6 +1016,7 @@ iterator = save; } + _Root = NULL; } @@ -918,6 +1024,10 @@ */ public: BETAJAEN_CC_INLINE void RemoveAll() { + + if (_Root == NULL) + return; + NodePtr iterator = _Root; NodePtr save = 0; @@ -933,11 +1043,14 @@ { save = iterator->_Children[1]; delete iterator; + iterator = NULL; } iterator = save; } + _Root = NULL; + } @@ -1011,9 +1124,68 @@ return 0; } +/** +*/ +public: BETAJAEN_CC_INLINE TypePtr First(NodeIterator* it) +{ + it->_It = _Root; + it->_Top = 0; + + if (it->_It != 0) { + while (it->_It->_Children[0] != 0) { + it->_Up[it->_Top++] = it->_It; + it->_It = it->_It->_Children[0]; + } + } + + if (it->_It != 0) + return it->_It->_Val; + else + return 0; + +} + /** */ +public: BETAJAEN_CC_INLINE TypePtr Next(NodeIterator* it) +{ + if (it->_It->_Children[1] != 0) { + it->_Up[it->_Top++] = it->_It; + it->_It = it->_It->_Children[1]; + + while (it->_It->_Children[0] != 0) { + it->_Up[it->_Top++] = it->_It; + it->_It = it->_It->_Children[0]; + } + + } + else { + NodePtr last; + + do { + + if (it->_Top == 0) { + it->_It = 0; + break; + } + + last = it->_It; + it->_It = it->_Up[--it->_Top]; + + } while (last == it->_It->_Children[1]); + + } + + if (it->_It != 0) + return it->_It->_Val; + else + return 0; + +} + +/** +*/ public: BETAJAEN_CC_INLINE bool Insert(NodeIdentifier target, TypePtr val) { Node* node = new Node(target, val); @@ -1051,6 +1223,7 @@ return true; } + private: NodePtr _Root; }; @@ -1116,11 +1289,1272 @@ BETAJAEN_CC_INLINE void DestroyAll() { + _Tree->DestroyAll(); +} +///////////////////////////////////////////////////////////// + +BETAJAEN_CC_INLINE void RemoveAll() { + _Tree->RemoveAll(); } ///////////////////////////////////////////////////////////// +BETAJAEN_CC_INLINE void Destroy(IdentifierType); + +///////////////////////////////////////////////////////////// + +BETAJAEN_CC_INLINE void Remove(IdentifierType); + +///////////////////////////////////////////////////////////// + +BETAJAEN_CC_INLINE TypePtr Begin(); + +///////////////////////////////////////////////////////////// + +BETAJAEN_CC_INLINE TypePtr Next(); + +///////////////////////////////////////////////////////////// + +BETAJAEN_CC_INLINE TypePtr End(); + +///////////////////////////////////////////////////////////// + +BETAJAEN_CC_INLINE TypePtr Previous(); + +///////////////////////////////////////////////////////////// + +/** \brief For each item in the list call it's own method. +*/ +BETAJAEN_CC_INLINE void Each(void (Type::*MethodPtr)()) { + + if (_Tree->isEmpty()) + return; + + typename TreeType::NodeIterator iterator; + TypePtr ptr = _Tree->First(&iterator); + + while (ptr != 0) { + (ptr->*MethodPtr)(); + ptr = _Tree->Next(&iterator); + } +} + + +/** \brief For each item in the list call it's own method, with one argument. +*/ +template <typename _A> +BETAJAEN_CC_INLINE void Each(void (Type::*MethodPtr)(_A), _A _1) { + + if (_Tree->isEmpty()) + return; + + typename TreeType::NodeIterator iterator; + TypePtr ptr = _Tree->First(&iterator); + + while (ptr != 0) { + (ptr->*MethodPtr)(_1); + ptr = _Tree->Next(&iterator); + } +} +///////////////////////////////////////////////////////////// + +BETAJAEN_CC_INLINE TreePtr getTree() const +{ + return _Tree; +} + +///////////////////////////////////////////////////////////// + +BETAJAEN_CC_INLINE unsigned int getUsage() const +{ + return *_Usage; +} + +///////////////////////////////////////////////////////////// + +private: TreePtr _Tree; +private: unsigned int* _Usage; + +///////////////////////////////////////////////////////////// + +}; + +BETAJAEN_CC_NAMESPACE_END + +////////////////////////////////////////////////////////////////////////// + +BETAJAEN_CC_NAMESPACE_START + +/** \brief Vector with two rows. +*/ +template < + typename Type + > +class BETAJAEN_CC_CLASS_EXPORT Vector2 +{ + +public: + +typedef Vector2<Type> ThisType; + +/* \brief First */ +Type i; + +/* \brief Second */ +Type j; + +BETAJAEN_CC_INLINE Vector2() +{ +} + +BETAJAEN_CC_INLINE Vector2(Type _i, Type _j) +: i(_i), j(_j) +{ +} + +BETAJAEN_CC_INLINE void swap(ThisType& other) +{ + Type First = i, Second = j; + i = other.i; other.i = First; + j = other.j; other.j = Second; +} + +BETAJAEN_CC_INLINE ThisType& operator = (const ThisType& other) +{ + i = other.i; j = other.j; + return *this; +} + +BETAJAEN_CC_INLINE ThisType& operator = (const Type& other) +{ + i = other; j = other; + return *this; +} + +BETAJAEN_CC_INLINE ThisType& operator *= (const Type& other) +{ + i *= other; j *= other; +} + +BETAJAEN_CC_INLINE ThisType& operator *= (const ThisType& other) +{ + i *= other.i; j *= other.j; +} + +BETAJAEN_CC_INLINE bool operator == (const ThisType& other) const +{ + return (i == other.i && j == other.j); +} + +BETAJAEN_CC_INLINE bool operator != (const ThisType& other) const +{ + return (i != other.i || j != other.j); +} + +}; + +BETAJAEN_CC_NAMESPACE_END + +////////////////////////////////////////////////////////////////////////// + +BETAJAEN_CC_NAMESPACE_START + +/** \brief Vector with three rows. +*/ +template < + typename Type + > +class BETAJAEN_CC_CLASS_EXPORT Vector3 +{ + +public: + +typedef Vector3<Type> ThisType; + +/* \brief First */ +Type i; + +/* \brief Second */ +Type j; + +/* \brief Third */ +Type k; + + +BETAJAEN_CC_INLINE Vector3() +{ +} + +BETAJAEN_CC_INLINE Vector3(Type _i, Type _j, Type _k) +: i(_i), j(_j), k(_k) +{ +} + +BETAJAEN_CC_INLINE void swap(ThisType& other) +{ + Type First = i, Second = j, Third = k; + i = other.i; other.i = First; + j = other.j; other.j = Second; + k = other.k; other.k = Third; +} + +BETAJAEN_CC_INLINE ThisType& operator = (const ThisType& other) +{ + i = other.i; j = other.j; k = other.k; + return *this; +} + +BETAJAEN_CC_INLINE ThisType& operator = (const Type& other) +{ + i = other; j = other; k = other; + return *this; +} + +BETAJAEN_CC_INLINE ThisType& operator *= (const Type& other) +{ + i *= other; j *= other; k *= other; +} + +BETAJAEN_CC_INLINE ThisType& operator *= (const ThisType& other) +{ + i *= other.i; j *= other.j; k *= other.k; +} + +BETAJAEN_CC_INLINE bool operator == (const ThisType& other) const +{ + return (i == other.i && j == other.j && k == other.k); +} + +BETAJAEN_CC_INLINE bool operator != (const ThisType& other) const +{ + return (i != other.i || j != other.j || k != other.k); +} + +}; + +BETAJAEN_CC_NAMESPACE_END + +////////////////////////////////////////////////////////////////////////// + +BETAJAEN_CC_NAMESPACE_START + +/** \brief Vector with four rows. +*/ +template < + typename Type + > +class BETAJAEN_CC_CLASS_EXPORT Vector4 { + +public: + +typedef Vector4<Type> ThisType; + +/* \brief First */ +Type i; + +/* \brief Second */ +Type j; + +/* \brief Third */ +Type k; + +/* \brief Fourth */ +Type l; + +BETAJAEN_CC_INLINE Vector4() +{ +} + +BETAJAEN_CC_INLINE Vector4(Type _i, Type _j, Type _k, Type _l) +: i(_i), j(_j), k(_k), l(_l) +{ +} + +BETAJAEN_CC_INLINE void swap(ThisType& other) +{ + Type First = i, Second = j, Third = k, Fourth = l; + i = other.i; other.i = First; + j = other.j; other.j = Second; + k = other.k; other.k = Third; + l = other.l; other.l = Fourth; +} + +BETAJAEN_CC_INLINE ThisType& operator = (const ThisType& other) { + i = other.i; j = other.j; k = other.k; l = other.l; + return *this; +} + +BETAJAEN_CC_INLINE ThisType& operator *= (const Type& other) +{ + i *= other; j *= other; k *= other; l *= other; +} + +BETAJAEN_CC_INLINE ThisType& operator *= (const ThisType& other) +{ + i *= other.i; j *= other.j; k *= other.k; l *= other.l; +} + +BETAJAEN_CC_INLINE bool operator == (const ThisType& other) const { + return (i == other.i && j == other.j && k == other.k && l == other.l); +} + +BETAJAEN_CC_INLINE bool operator != (const ThisType& other) const { + return (i != other.i || j != other.j || k != other.k || l != other.l); +} + +}; + +BETAJAEN_CC_NAMESPACE_END + +////////////////////////////////////////////////////////////////////////// + +BETAJAEN_CC_NAMESPACE_START + +template <typename Type> +class BETAJAEN_CC_CLASS_EXPORT Vector { + + public: + typedef Type* TypePtr; + + TypePtr j; + unsigned int jSize; + + Vector(unsigned int j_size) + { + + } + + ~Vector() + { + + } + +}; + +BETAJAEN_CC_NAMESPACE_END + +////////////////////////////////////////////////////////////////////////// + +#if 0 +BETAJAEN_CC_NAMESPACE_START + +template <typename Type> +class BETAJAEN_CC_TEMPLATE_CLASS_EXPORT Matrix { + +public: + typedef Type* TypePtr; + + TypePtr ij; + unsigned int iSize, + jSize; + + class MatrixIterator { + public: + + enum IteratorRole { + IR_COLUMN, + IR_ROW + }; + + MatrixIterator(Matrix* _matrix, IteratorRole _role, unsigned int _iterator = 0) + mMatrix(_matrix), mRole(_role), mIterator(_iterator) + { + } + + Matrix* mMatrix; + IteratorRole mRole; + unsigned int mIterator; + + }; + + class RowIterator { + public: + RowIterator(TypePtr ijPtr, unsigned int row, unsigned int i_size, unsigned j_size) + : ij(ijPtr), r(row), iSize(i_size), jSize(j_size) + { + } + + Type& operator[] (unsigned int column) + { + return ij[(column * iSize) + r]; + } + + + RowIterator& operator=(Type _f) { + + // Doesn't work. + for (unsigned int i=r * iSize;i < (r * iSize) + iSize;i++) { + printf("i=%i\n", i); + ij[i] = _f; + } + printf("Done.\n"); + return *this; + } + + TypePtr ij; + unsigned int r, iSize, jSize; + + }; + + class ColumnIterator { + + public: + + ColumnIterator(TypePtr ijPtr, unsigned int col, unsigned int i_size, unsigned j_size) + : ij(ijPtr), c(col), iSize(i_size), jSize(j_size) + { + } + + Type& operator[] (unsigned int row) + { + if (row > i_size) + row = i_size; + + return ij[(c * iSize) + row]; + } + + + ColumnIterator& operator=(Type _f) { + for (unsigned int i=c;i < c + jSize;i++) { + printf("i=%i\n", i); + ij[i] = _f; + } + printf("Done.\n"); + return *this; + } + + TypePtr ij; + unsigned int c, iSize, jSize; + }; + + class All { + public: + + All() + { + } + + All(TypePtr ijPtr, unsigned int i_size, unsigned int j_size) + : ij(ijPtr), iSize(i_size), jSize(j_size) + { + } + + All& operator=(Type _f) { + for (unsigned int i=0;i < iSize;i++) + for (unsigned int j=0;j < jSize;j++) + ij[(j * jSize) + i] = _f; + return *this; + } + + All& operator*=(Type _f) { + for (unsigned int i=0;i < iSize;i++) + for (unsigned int j=0;j < jSize;j++) + ij[(j * jSize) + i] *= _f; + return *this; + } + + All& operator/=(Type _f) { + for (unsigned int i=0;i < iSize;i++) + for (unsigned int j=0;j < jSize;j++) + ij[(j * jSize) + i] /= _f; + return *this; + } + + All& operator+=(Type _f) { + for (unsigned int i=0;i < iSize;i++) + for (unsigned int j=0;j < jSize;j++) + ij[(j * jSize) + i] += _f; + return *this; + } + + All& operator-=(Type _f) { + for (unsigned int i=0;i < iSize;i++) + for (unsigned int j=0;j < jSize;j++) + ij[(j * jSize) + i] -= _f; + return *this; + } + + All& operator++(int) { + for (unsigned int i=0;i < iSize;i++) + for (unsigned int j=0;j < jSize;j++) + ij[(j * jSize) + i]++; + return *this; + } + + + TypePtr ij; + unsigned iSize, jSize; + }; + + All all; + +Matrix(unsigned int nbRows, unsigned int nbColumns) +: iSize(nbRows), jSize(nbColumns) +{ + ij = new Type[iSize * jSize]; + for (unsigned int i = 0;i < (iSize * jSize);i++) + ij[i] = 0; + + all = All(ij, iSize, jSize); + + BETAJAEN_CC_PRINTF("Matrix created with %i", nbColumns); +} + +~Matrix() +{ + if (iSize || jSize) + delete [] ij; +} + +RowIterator operator[] (unsigned int row) +{ + return RowIterator(ij, row, iSize, jSize); +} + +ColumnIterator operator() (unsigned col) +{ + return ColumnIterator(ij, col, iSize, jSize); +} + +void dump() +{ + for (unsigned int i=0;i < iSize;i++) { + for (unsigned int j=0;j < jSize;j++) { + printf("%f\t", ij[(j * jSize) + i]); + } + printf("\n"); + } + +} + +}; +BETAJAEN_CC_NAMESPACE_END +#endif + +////////////////////////////////////////////////////////////////////////// + +#endif + + +#if 0 +/* + +Betajaen's Container Classes + +Copyright (c) 2007 Robin Southern, http://www.nxogre.org + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +*/ + +#ifndef BETAJAENS_CC_H +#define BETAJAENS_CC_H + +#include "NxOgrePlatform.h" +#include "NxOgreAllocator.h" + +// Configuration + +/** \brief Namespace to place the Containers in. Comment out if you want it in the global namespace. +*/ +#define BETAJAEN_CC_NAMESPACE Betajaen + + +/** \brief Enable debug comments. Set to zero to disable, 1 to enable +*/ +#define BETAJAEN_CC_DEBUG_COMMENTS 1 + + +/** \brief Export Class Macro, replace value with your export macro +*/ +#define BETAJAEN_CC_CLASS_EXPORT __declspec(dllexport) +#define BETAJAEN_CC_TEMPLATE_CLASS_EXPORT __forceinline +// #define BETAJAEN_CC_FUNCTION_EXPORT NxPublicFunction + + +/** \brief Delete macro. Used if you have your own leak checker, etc. +*/ +#define BETAJAEN_CC_DELETE(ptr) \ + {::NxOgre::Allocator::getPtr()->watch_delete(static_cast<void*>(ptr));}; \ + delete ptr; + +/** \brief Called just before when a class is destroyed using it's destructor. +*/ +#define BETAJAEN_CC_DESTRUCTOR(ptr) \ + ::NxOgre::Allocator::getPtr()->watch_delete(begin); + +////////////////////////////////////////////////////////////////////////// + +#if (BETAJAEN_CC_DEBUG_COMMENTS == 1) +# include <stdio.h> +#endif + +#ifdef BETAJAEN_CC_NAMESPACE +# define BETAJAEN_CC_NAMESPACE_START namespace BETAJAEN_CC_NAMESPACE { +# define BETAJAEN_CC_NAMESPACE_END } +#else +# define BETAJAEN_CC_NAMESPACE_START /**/ +# define BETAJAEN_CC_NAMESPACE_END /**/ +#endif + +BETAJAEN_CC_NAMESPACE_START + +#if (BETAJAEN_CC_DEBUG_COMMENTS == 1) +# define BETAJAEN_CC_PRINT(x) printf(x "\n"); +# define BETAJAEN_CC_PRINTF(x, y) printf(x "\n",y); +#else +# define BETAJAEN_CC_PRINT(x) /* x */ +# define BETAJAEN_CC_PRINTF(x,y) /* x, y*/ +#endif + +#if (_MSC_VER>=1000) +# define BETAJAEN_CC_INLINE __forceinline +#else +# define BETAJAEN_CC_INLINE inline +#endif + +#ifndef BETAJAEN_CC_CLASS_EXPORT +# define BETAJAEN_CC_CLASS_EXPORT +#endif + +#ifndef BETAJAEN_CC_TEMPLATE_CLASS_EXPORT +# define BETAJAEN_CC_TEMPLATE_CLASS_EXPORT +#endif + +#ifndef BETAJAEN_CC_FUNCTION_EXPORT +# define BETAJAEN_CC_FUNCTION_EXPORT +#endif + +#ifndef BETAJAEN_CC_DELETE +# define BETAJAEN_CC_DELETE(ptr) delete ptr; +#endif + +#ifndef BETAJAEN_CC_DESTRUCTOR +# define BETAJAEN_CC_DESTRUCTOR(ptr) +#endif + +BETAJAEN_CC_NAMESPACE_END + +////////////////////////////////////////////////////////////////////////// + +BETAJAEN_CC_NAMESPACE_START + +template <class TypePtr, class AllocatorType = SharedAllocator> class Flat; +class SharedAllocator; +template <class BaseType, class AllocatorType = SharedAllocator> class SharedList; +template <typename IdentifierType, class BaseType, class AllocatorType = SharedAllocator> class SharedMap; +template <typename IdentifierType, class TypePtr> class Tree; +template <typename> class Vector2; +template <typename> class Vector3; +template <typename> class Vector4; + +BETAJAEN_CC_NAMESPACE_END + +////////////////////////////////////////////////////////////////////////// + +BETAJAEN_CC_NAMESPACE_START + +class BETAJAEN_CC_CLASS_EXPORT SharedAllocator { + +public: + +///////////////////////////////////////////////////////////// + +void* Allocate(size_t size) +{ + return malloc(size); +} + +///////////////////////////////////////////////////////////// + +void Deallocate(void* mem) +{ + if (mem) + free(mem); +} + +///////////////////////////////////////////////////////////// + +void* Reallocate(void* mem, size_t size) +{ + return realloc(mem, size); +} + +///////////////////////////////////////////////////////////// + +}; // End of the SharedAllocator class. + +BETAJAEN_CC_NAMESPACE_END + +////////////////////////////////////////////////////////////////////////// + +BETAJAEN_CC_NAMESPACE_START + +template + < + class Type, + class AllocatorType + > +class BETAJAEN_CC_CLASS_EXPORT Flat +{ + +public: + +typedef Type * Iterator; +typedef AllocatorType* AllocatorPtr; + +BETAJAEN_CC_INLINE Flat(AllocatorPtr allocator, bool deleteAllocator); +BETAJAEN_CC_INLINE ~Flat(); +BETAJAEN_CC_INLINE unsigned int _size() const; +BETAJAEN_CC_INLINE unsigned int _capacity() const; +BETAJAEN_CC_INLINE Type* _allocate(unsigned int size); +BETAJAEN_CC_INLINE void _deallocate(Type* p); +BETAJAEN_CC_INLINE Iterator _reallocate(Iterator p, unsigned int size); +BETAJAEN_CC_INLINE void _clip(unsigned int size); +BETAJAEN_CC_INLINE void _reserve(unsigned int new_size); +BETAJAEN_CC_INLINE Iterator _copy(Iterator begin, Iterator end, Iterator dest); +BETAJAEN_CC_INLINE void _delete_range(Iterator begin, Iterator end); +BETAJAEN_CC_INLINE void _destroy(Iterator begin, Iterator end); + +private: AllocatorPtr Allocator; +private: bool AutoDeleteAllocator; +public: Iterator First, Last, End; + +}; // End of Flat<Type,AllocatorType> class. + +BETAJAEN_CC_NAMESPACE_END + +////////////////////////////////////////////////////////////////////////// + +BETAJAEN_CC_NAMESPACE_START + +/** \brief A list of pointers with garbage collections and the ability to + share the same list with similar lists. Like STL's Vector. + + \example + <code> + class A; + + SharedList<A> aList; + a.Insert(new A()); + a.Remove(a.Last); + </code> + +*/ +template + < + class Type, /* Class to Store; A, myClassName, etc. */ + class AllocatorType /* Allocator to use, or leave blank for SharedAllocator */ + > +class BETAJAEN_CC_CLASS_EXPORT SharedList { + +public: + +typedef Type* TypePtr; +typedef TypePtr* Iterator; +typedef SharedList<Type, AllocatorType> SharedListType; +typedef Flat<TypePtr, AllocatorType> FlatType; +typedef FlatType* FlatPtr; + +///////////////////////////////////////////////////////////// + +enum AbsolutePosition +{ + First, + Last +}; + +/** + Constructor with optional custom allocator +*/ +BETAJAEN_CC_INLINE SharedList(AllocatorType* _allocator = NULL, bool _auto_delete_allocator = true); + +/** \brief Copy Constructor between SharedList's. The Flat will not be copied but referenced. + Any action on this list will effect all lists using the same Flat. Clean up will only + happen on the destruction of the last surviving list. + + \example + <code> + typedef SharedList<A> AList; + AList a; + AList b(a); + </code> +*/ +BETAJAEN_CC_INLINE SharedList(const SharedListType& other); + +/** \brief Copy Operator. Functions the same as Copy Constructor but deletes the set that this + may already have. + + \example + <code> + typedef SharedList<A> AList; + AList a; + AList b; + b = a; + </code> +*/ +BETAJAEN_CC_INLINE SharedListType& operator=(const SharedListType& other); + + +/** \brief Destructor. If this is the last of all SharedLists sharing the same set, + the set will be destroyed otherwise the Flat will be ignored and this SharedList + dies gracefully. +*/ +BETAJAEN_CC_INLINE ~SharedList() { + + if (--(*_Usage) == 0) + { + _Flat->_delete_range(_Flat->First, _Flat->Last); + delete _Flat; + delete _Usage; + } + +} + +/** \brief Gets the pointer to the nth Type in the list. Alternate interface to operator[]. +*/ +BETAJAEN_CC_INLINE TypePtr Get(size_t pos); + +/** \brief Gets the pointer to the nth TypePtr in the list. +*/ +BETAJAEN_CC_INLINE TypePtr operator[](size_t pos); + +/** \brief Where is something in the list. +*/ +BETAJAEN_CC_INLINE unsigned int WhereIs(TypePtr ptr); + +/** \brief Is this pointer in the list? +*/ +BETAJAEN_CC_INLINE bool Has(TypePtr ptr); + +/** \brief The size of the SharedList. +*/ +BETAJAEN_CC_INLINE unsigned Size() const; + +/** \brief Insert something into the list +*/ +BETAJAEN_CC_INLINE void Insert(const TypePtr& val); + +/** \brief Resize the capacity of the list to size + n. +*/ +BETAJAEN_CC_INLINE void Clean(unsigned int n = 4); + +/** \brief Destroy something nth position into the list. +*/ +BETAJAEN_CC_INLINE void Destroy(unsigned int n); + +// \brief Destroys everything +// +BETAJAEN_CC_INLINE void DestroyAll(); + +/** \brief Destroys something in the list based on the pointer in the list. +*/ +BETAJAEN_CC_INLINE void Destroy(TypePtr val); + +/** \brief Deletes something from the list based on AbsolutePosition +*/ +BETAJAEN_CC_INLINE void Destroy(AbsolutePosition position); + +/** \brief Removes something from the list based on numerical position. +*/ +BETAJAEN_CC_INLINE TypePtr Remove(unsigned int n); + +/** \brief Removes something from the list based on AbsolutePosition +*/ +BETAJAEN_CC_INLINE TypePtr Remove(AbsolutePosition position); + +/** \brief Places the Iterator at the beginning of the List +*/ +BETAJAEN_CC_INLINE TypePtr Begin(); + +/** \brief Advances the Iterator forward by one, and returns the value of the list or NULL + \returns The next item in the list, or NULL if it has reached the end of it. +*/ +BETAJAEN_CC_INLINE TypePtr Next(); + +/** \brief Places the iterator at the end of the List +*/ +BETAJAEN_CC_INLINE TypePtr End(); + +/** \brief Advances the Iterator backwards by one, and returns the value of the list or NULL + \returns The previous item in the list, or NULL if it has reached the beginning of it. +*/ +BETAJAEN_CC_INLINE TypePtr Previous(); + +/** \brief For each item in the list call it's own method. +*/ +BETAJAEN_CC_INLINE void Each(void (Type::*MethodPtr)()); + +/** \brief For each item in the list call it's own method, with one argument. +*/ +template <typename _A> +BETAJAEN_CC_INLINE void Each(void (Type::*MethodPtr)(_A), _A); + +/** \brief For each item in the list call it's own method, with two arguments. +*/ +template <typename _A, typename _B> +BETAJAEN_CC_INLINE void Each(void (Type::*MethodPtr)(_A, _B), _A, _B); + +/** \brief For each item in the list call it's own method, with three arguments. +*/ +template <typename _A, typename _B, typename _C> +BETAJAEN_CC_INLINE void Each(void (Type::*MethodPtr)(_A, _B, _C), _A, _B, _C); + +/** \brief For each item in the list call it's own method, with four arguments. +*/ +template <typename _A, typename _B, typename _C, typename _D> +BETAJAEN_CC_INLINE void Each(void (Type::*MethodPtr)(_A, _B, _C, _D), _A, _B, _C, _D); + +/** \brief For each item in the list call it's own method, with five arguments. +*/ +template <typename _A, typename _B, typename _C, typename _D, typename _E> +BETAJAEN_CC_INLINE void Each(void (Type::*MethodPtr)(_A, _B, _C, _D), _A, _B, _C, _D, _E); + +/** \brief For each item in the list call it's own method, with six arguments. +*/ +template <typename _A, typename _B, typename _C, typename _D, typename _E, typename _F> +BETAJAEN_CC_INLINE void Each(void (Type::*MethodPtr)(_A, _B, _C, _D), _A, _B, _C, _D, _E, _F); + +/** \brief For each item in the list call it's own method, with seven arguments. +*/ +template <typename _A, typename _B, typename _C, typename _D, typename _E, typename _F, typename _G> +BETAJAEN_CC_INLINE void Each(void (Type::*MethodPtr)(_A, _B, _C, _D), _A, _B, _C, _D, _E, _F, _G); + +/** \brief For each item in the list call it's own method, with eight arguments. +*/ +template <typename _A, typename _B, typename _C, typename _D, typename _E, typename _F, typename _G, typename _H> +BETAJAEN_CC_INLINE void Each(void (Type::*MethodPtr)(_A, _B, _C, _D), _A, _B, _C, _D, _E, _F, _G, _H); + +/** \brief Returns the pointer to the working set. +*/ +BETAJAEN_CC_INLINE FlatPtr getFlat() const; + +/** \brief Returns the number of SharedLists using this set. +*/ +BETAJAEN_CC_INLINE unsigned int getUsageCount() const; + +private: unsigned int* _Usage; +private: FlatPtr _Flat; +private: Iterator _Iterator; + +}; // End of SharedList<Type, AllocatorType> Class. + +BETAJAEN_CC_NAMESPACE_END + +////////////////////////////////////////////////////////////////////////// + +BETAJAEN_CC_NAMESPACE_START + + +/** \brief Binary Tree with variable identifer and storage type. + +*/ +template <typename NodeIdentifier, class Type> +class BETAJAEN_CC_CLASS_EXPORT Tree +{ + // Much of this Tree was from the excellent tutorial by Julienne Walker + // http://eternallyconfuzzled.com/tuts/datastructures/jsw_tut_bst1.aspx + +public: + +class Node; +typedef Node* NodePtr; +typedef Type* TypePtr; + +/** \brief A tree is made up of nodes. +*/ +class BETAJAEN_CC_CLASS_EXPORT Node +{ + +public: + +Node(NodeIdentifier id, TypePtr val) : _ID(id), _Val(val) +{ + _Children[0] = NULL; + _Children[1] = NULL; +} + +void Replace(Node* n) +{ + _ID = n->_ID; + _Val = n->_Val; +} + +NodeIdentifier _ID; +TypePtr _Val; +NodePtr _Children[2]; + +}; + + +/** \brief Tree constructor +*/ +public: BETAJAEN_CC_INLINE Tree() : _Root(NULL) +{ +} + + +/** \brief Tree destructor. + \note Does not remove or destroy the contents of the tree. +*/ +public: BETAJAEN_CC_INLINE ~Tree() +{ +} + + +/** \brief Destroys all the nodes in the tree and deletes all of the values referenced in it. +*/ +public: BETAJAEN_CC_INLINE void DestroyAll() +{ + + NodePtr iterator = _Root; + NodePtr save = 0; + + while (iterator != NULL) + { + if (iterator->_Children[0] != NULL) + { + save = iterator->_Children[0]; + iterator->_Children[0] = save->_Children[1]; + save->_Children[1] = iterator; + } + else + { + save = iterator->_Children[1]; + delete iterator->_Val; + delete iterator; + } + + iterator = save; + } + +} + + +/** \brief Destroys all the nodes in the tree, but not all of the values referenced in it. +*/ +public: BETAJAEN_CC_INLINE void RemoveAll() +{ + NodePtr iterator = _Root; + NodePtr save = 0; + + while (iterator != NULL) + { + if (iterator->_Children[0] != NULL) + { + save = iterator->_Children[0]; + iterator->_Children[0] = save->_Children[1]; + save->_Children[1] = iterator; + } + else + { + save = iterator->_Children[1]; + delete iterator; + } + + iterator = save; + } + +} + + +/** \brief Remove a Node based of an identifier +*/ +public: BETAJAEN_CC_INLINE void Remove(NodeIdentifier id) +{ + + if (_Root == NULL) + return; + + Node head = {0}; + NodePtr iterator = &head; + NodePtr *f = 0, *p = 0; + int direction = 1; + + iterator->_Children[1] = _Root; + + //while (iterator = + +} + + + +/** \brief Removes a ranges of nodes based on max. and min. identifiers. + \note This operates based on the "operator <" of the TypeIdentifier the class, + which defines if the type is in the range or not. Types such as ints, or reals + aren't a problem but things like strings or complicated classes may produce + strange results. +*/ +public: BETAJAEN_CC_INLINE void RemoveRange(NodeIdentifier id_min, NodeIdentifier id_max) +{ + + +} + + +/** +*/ +public: BETAJAEN_CC_INLINE void Destroy(NodeIdentifier id) +{ + +} + + +/** +*/ +public: BETAJAEN_CC_INLINE void DestroyRange(NodeIdentifier id_min, NodeIdentifier id_max) +{ + +} + + +/** +*/ +public: BETAJAEN_CC_INLINE TypePtr Find(NodeIdentifier target) +{ + NodePtr iterator = _Root; + while (iterator != NULL) + { + if (iterator->_ID == target) + { + return iterator->_Val; + } + else + { + iterator = iterator->_Children[int(iterator->_ID < target)]; + } + } + + return 0; +} + + +/** +*/ +public: BETAJAEN_CC_INLINE bool Insert(NodeIdentifier target, TypePtr val) +{ + Node* node = new Node(target, val); + + + if (_Root == NULL) + { + _Root = node; + return true; + } + else + { + Node* iterator = _Root; + unsigned int direction; + + for ( ; ; ) + { + direction = iterator->_ID < target; + + if (iterator->_ID == target) + { + delete node; + return false; + } + else if (iterator->_Children[direction] == NULL) + break; + + + iterator = iterator->_Children[direction]; + } + + iterator->_Children[direction] = node; + } + + return true; +} + +private: NodePtr _Root; + +}; + +BETAJAEN_CC_NAMESPACE_END + +////////////////////////////////////////////////////////////////////////// + +BETAJAEN_CC_NAMESPACE_START + +template < + typename IdentifierType, + class Type, + class AllocatorType + > +class BETAJAEN_CC_CLASS_EXPORT SharedMap +{ + +public: + +typedef Type* TypePtr; +typedef Tree<IdentifierType, Type> TreeType; +typedef TreeType* TreePtr; + + +///////////////////////////////////////////////////////////// + +BETAJAEN_CC_INLINE SharedMap() +{ + _Tree = new TreeType(); +} + +///////////////////////////////////////////////////////////// + +BETAJAEN_CC_INLINE ~SharedMap() +{ + _Tree->DestroyAll(); + delete _Tree; +} + +///////////////////////////////////////////////////////////// + +BETAJAEN_CC_INLINE TypePt... [truncated message content] |
From: <and...@us...> - 2008-06-17 04:38:16
|
Revision: 596 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=596&view=rev Author: andy_miller Date: 2008-06-16 21:38:24 -0700 (Mon, 16 Jun 2008) Log Message: ----------- Updates to media for ogre 1.7 Buttet 2.69 support Working on Dshow module Modified Paths: -------------- trunk/python-ogre/PythonOgreConfig_nt.py trunk/python-ogre/ThirdParty/ffmpeg/videoPlayer.cpp trunk/python-ogre/ThirdParty/ffmpeg/videoPlayer.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/ogreforests/generate_code.py trunk/python-ogre/demos/media/DeferredShadingMedia/COPYING trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/glsl/nm_notex_ps.glsl trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/glsl/nm_ps.glsl trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/glsl/nm_vs.glsl trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/glsl/notex_ps.glsl trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/glsl/ps.glsl trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/glsl/vs.glsl trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/hlsl/nm_notex_ps.hlsl trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/hlsl/nm_ps.hlsl trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/hlsl/nm_vs.hlsl trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/hlsl/notex_ps.hlsl trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/hlsl/ps.hlsl trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/hlsl/vs.hlsl trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/post/glsl/Ambient_ps.glsl trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/post/glsl/GlobalLight_ps.glsl trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/post/glsl/LightMaterial_ps.glsl trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/post/glsl/LightMaterial_vs.glsl trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/post/glsl/ShowColour_ps.glsl trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/post/glsl/ShowDS_ps.glsl trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/post/glsl/ShowNormal_ps.glsl trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/post/glsl/SinglePass_ps.glsl trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/post/glsl/vs.glsl trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/post/hlsl/Ambient_ps.hlsl trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/post/hlsl/GlobalLight_ps.hlsl trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/post/hlsl/LightMaterial_ps.hlsl trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/post/hlsl/LightMaterial_vs.hlsl trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/post/hlsl/ShowColour_ps.hlsl trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/post/hlsl/ShowDS_ps.hlsl trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/post/hlsl/ShowNormal_ps.hlsl trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/post/hlsl/SinglePass_ps.hlsl trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/post/hlsl/vs.hlsl trunk/python-ogre/demos/media/DeferredShadingMedia/deferred.glsl.program trunk/python-ogre/demos/media/DeferredShadingMedia/deferred.hlsl.program trunk/python-ogre/demos/media/DeferredShadingMedia/deferred.material trunk/python-ogre/demos/media/DeferredShadingMedia/deferred_post_debug.glsl.program trunk/python-ogre/demos/media/DeferredShadingMedia/deferred_post_debug.hlsl.program trunk/python-ogre/demos/media/DeferredShadingMedia/deferred_post_debug.material trunk/python-ogre/demos/media/DeferredShadingMedia/deferred_post_minilight.glsl.program trunk/python-ogre/demos/media/DeferredShadingMedia/deferred_post_minilight.hlsl.program trunk/python-ogre/demos/media/DeferredShadingMedia/deferred_post_minilight.material trunk/python-ogre/demos/media/DeferredShadingMedia/deferred_post_multipass.glsl.program trunk/python-ogre/demos/media/DeferredShadingMedia/deferred_post_multipass.hlsl.program trunk/python-ogre/demos/media/DeferredShadingMedia/deferred_post_multipass.material trunk/python-ogre/demos/media/DeferredShadingMedia/deferred_post_onepass.glsl.program trunk/python-ogre/demos/media/DeferredShadingMedia/deferred_post_onepass.hlsl.program trunk/python-ogre/demos/media/DeferredShadingMedia/deferred_post_onepass.material trunk/python-ogre/demos/media/DeferredShadingMedia/deferreddemo.material trunk/python-ogre/demos/media/fonts/read_me.html trunk/python-ogre/demos/media/fonts/sample.fontdef trunk/python-ogre/demos/media/gui/CompositorDemo.layout trunk/python-ogre/demos/media/gui/CompositorDemoCegui.config trunk/python-ogre/demos/media/gui/CrowdDemo.layout trunk/python-ogre/demos/media/gui/Falagard.xsd trunk/python-ogre/demos/media/gui/Font.xsd trunk/python-ogre/demos/media/gui/GUILayout.xsd trunk/python-ogre/demos/media/gui/GUIScheme.xsd trunk/python-ogre/demos/media/gui/Imageset.xsd trunk/python-ogre/demos/media/gui/InstancingDemo.layout trunk/python-ogre/demos/media/gui/OceanDemoCegui.config trunk/python-ogre/demos/media/gui/OceanDemoLayout.xml trunk/python-ogre/demos/media/gui/TaharezLook.imageset trunk/python-ogre/demos/media/gui/TaharezLook.looknfeel trunk/python-ogre/demos/media/gui/TaharezLookSkin.scheme trunk/python-ogre/demos/media/gui/TaharezLookWidgetAliases.scheme trunk/python-ogre/demos/media/gui/bluehighway-10.font trunk/python-ogre/demos/media/gui/bluehighway-12.font trunk/python-ogre/demos/media/gui/bluehighway-8.font trunk/python-ogre/demos/media/gui/cegui8.layout trunk/python-ogre/demos/media/gui/facial.layout trunk/python-ogre/demos/media/gui/ogregui.layout trunk/python-ogre/demos/media/gui/shadows.layout trunk/python-ogre/demos/media/materials/programs/AmbientOneTexture.glsl trunk/python-ogre/demos/media/materials/programs/Bloom_ps20.hlsl trunk/python-ogre/demos/media/materials/programs/Bloom_vs11.hlsl trunk/python-ogre/demos/media/materials/programs/Blur0_ps20.hlsl trunk/python-ogre/demos/media/materials/programs/Blur0_vs.glsl trunk/python-ogre/demos/media/materials/programs/Blur0_vs11.hlsl trunk/python-ogre/demos/media/materials/programs/Blur1_ps20.hlsl trunk/python-ogre/demos/media/materials/programs/Blur1_vs.glsl trunk/python-ogre/demos/media/materials/programs/Blur1_vs11.hlsl trunk/python-ogre/demos/media/materials/programs/Blur_ps.glsl trunk/python-ogre/demos/media/materials/programs/Combine_fp.cg trunk/python-ogre/demos/media/materials/programs/DOF_ps.cg trunk/python-ogre/demos/media/materials/programs/DepthShadowmap.hlsl trunk/python-ogre/demos/media/materials/programs/DepthShadowmapCasterFp.glsl trunk/python-ogre/demos/media/materials/programs/DepthShadowmapCasterVp.glsl trunk/python-ogre/demos/media/materials/programs/DepthShadowmapNormalMapReceiverFp.glsl trunk/python-ogre/demos/media/materials/programs/DepthShadowmapNormalMapReceiverVp.glsl trunk/python-ogre/demos/media/materials/programs/DepthShadowmapReceiverFp.glsl trunk/python-ogre/demos/media/materials/programs/DepthShadowmapReceiverVp.glsl trunk/python-ogre/demos/media/materials/programs/Example_Basic.cg trunk/python-ogre/demos/media/materials/programs/Example_Basic.hlsl trunk/python-ogre/demos/media/materials/programs/Example_BumpMapping.cg trunk/python-ogre/demos/media/materials/programs/Example_CelShading.cg trunk/python-ogre/demos/media/materials/programs/Example_Fresnel.cg trunk/python-ogre/demos/media/materials/programs/Example_FresnelPS.asm trunk/python-ogre/demos/media/materials/programs/Example_Projection.cg trunk/python-ogre/demos/media/materials/programs/GlassFP.cg trunk/python-ogre/demos/media/materials/programs/Grass.cg trunk/python-ogre/demos/media/materials/programs/GrayScale.cg trunk/python-ogre/demos/media/materials/programs/HeatVision.cg trunk/python-ogre/demos/media/materials/programs/InvertFP.cg trunk/python-ogre/demos/media/materials/programs/LaplaceFP.cg trunk/python-ogre/demos/media/materials/programs/Ocean2GLSL.frag trunk/python-ogre/demos/media/materials/programs/Ocean2GLSL.vert trunk/python-ogre/demos/media/materials/programs/Ocean2HLSL_Cg.frag trunk/python-ogre/demos/media/materials/programs/Ocean2HLSL_Cg.vert trunk/python-ogre/demos/media/materials/programs/OffsetMapping.cg trunk/python-ogre/demos/media/materials/programs/OffsetMapping.hlsl trunk/python-ogre/demos/media/materials/programs/OffsetMappingFp.glsl trunk/python-ogre/demos/media/materials/programs/OffsetMappingVp.glsl trunk/python-ogre/demos/media/materials/programs/OffsetMapping_specular.asm trunk/python-ogre/demos/media/materials/programs/OldMovieFP.cg trunk/python-ogre/demos/media/materials/programs/OldTV.cg trunk/python-ogre/demos/media/materials/programs/PosterizeFP.cg trunk/python-ogre/demos/media/materials/programs/SharpenEdgesFP.cg trunk/python-ogre/demos/media/materials/programs/StdQuad_vp.cg trunk/python-ogre/demos/media/materials/programs/StdQuad_vp.glsl trunk/python-ogre/demos/media/materials/programs/TilingFP.cg trunk/python-ogre/demos/media/materials/programs/crowdVp.glsl trunk/python-ogre/demos/media/materials/programs/hdr.cg trunk/python-ogre/demos/media/materials/programs/hdr.hlsl trunk/python-ogre/demos/media/materials/programs/hdr_bloom.glsl trunk/python-ogre/demos/media/materials/programs/hdr_downscale2x2luminence.glsl trunk/python-ogre/demos/media/materials/programs/hdr_downscale3x3.glsl trunk/python-ogre/demos/media/materials/programs/hdr_downscale3x3brightpass.glsl trunk/python-ogre/demos/media/materials/programs/hdr_finalToneMapping.glsl trunk/python-ogre/demos/media/materials/programs/hdr_tonemap_util.glsl trunk/python-ogre/demos/media/materials/programs/instancing.cg trunk/python-ogre/demos/media/materials/programs/instancingVp.glsl trunk/python-ogre/demos/media/materials/programs/oceanGLSL.frag trunk/python-ogre/demos/media/materials/programs/oceanGLSL.vert trunk/python-ogre/demos/media/materials/programs/oceanHLSL_Cg.frag trunk/python-ogre/demos/media/materials/programs/oceanHLSL_Cg.vert trunk/python-ogre/demos/media/materials/programs/skinningTwoWeightsShadowCasterVp.glsl trunk/python-ogre/demos/media/materials/programs/skinningTwoWeightsVp.glsl trunk/python-ogre/demos/media/materials/programs/varianceshadowcasterfp.cg trunk/python-ogre/demos/media/materials/programs/varianceshadowcastervp.cg trunk/python-ogre/demos/media/materials/programs/varianceshadowreceiverfp.cg trunk/python-ogre/demos/media/materials/programs/varianceshadowreceivervp.cg trunk/python-ogre/demos/media/materials/scripts/BlackAndWhite.material trunk/python-ogre/demos/media/materials/scripts/Bloom.material trunk/python-ogre/demos/media/materials/scripts/DOF.material trunk/python-ogre/demos/media/materials/scripts/DepthShadowmap.material trunk/python-ogre/demos/media/materials/scripts/Embossed.material trunk/python-ogre/demos/media/materials/scripts/Example-DynTex.material trunk/python-ogre/demos/media/materials/scripts/Example-Water.material trunk/python-ogre/demos/media/materials/scripts/Example.material trunk/python-ogre/demos/media/materials/scripts/Examples-Advanced.material trunk/python-ogre/demos/media/materials/scripts/Examples.compositor trunk/python-ogre/demos/media/materials/scripts/Examples.program trunk/python-ogre/demos/media/materials/scripts/Glass.material trunk/python-ogre/demos/media/materials/scripts/HeatVision.material trunk/python-ogre/demos/media/materials/scripts/Hurt.material trunk/python-ogre/demos/media/materials/scripts/Invert.material trunk/python-ogre/demos/media/materials/scripts/Laplace.material trunk/python-ogre/demos/media/materials/scripts/MotionBlur.material trunk/python-ogre/demos/media/materials/scripts/Ocean.controls trunk/python-ogre/demos/media/materials/scripts/Ocean.material trunk/python-ogre/demos/media/materials/scripts/OffsetMapping.material trunk/python-ogre/demos/media/materials/scripts/Ogre.material trunk/python-ogre/demos/media/materials/scripts/OldMovie.material trunk/python-ogre/demos/media/materials/scripts/OldTV.material trunk/python-ogre/demos/media/materials/scripts/Posterize.material trunk/python-ogre/demos/media/materials/scripts/RZR-002.material trunk/python-ogre/demos/media/materials/scripts/SharpenEdges.material trunk/python-ogre/demos/media/materials/scripts/StdQuad_vp.program trunk/python-ogre/demos/media/materials/scripts/Tiling.material trunk/python-ogre/demos/media/materials/scripts/VarianceShadowmap.material trunk/python-ogre/demos/media/materials/scripts/facial.material trunk/python-ogre/demos/media/materials/scripts/hdr.material trunk/python-ogre/demos/media/materials/scripts/instancing.material trunk/python-ogre/demos/media/materials/scripts/smoke.material trunk/python-ogre/demos/media/overlays/BasicOgreGuiTemplates.inc trunk/python-ogre/demos/media/overlays/Compositor.overlay trunk/python-ogre/demos/media/overlays/DP3.overlay trunk/python-ogre/demos/media/overlays/Example-CubeMapping.overlay trunk/python-ogre/demos/media/overlays/Example-DynTex.overlay trunk/python-ogre/demos/media/overlays/Example-Water.overlay trunk/python-ogre/demos/media/overlays/Shadows.overlay trunk/python-ogre/demos/media/packs/chiropteraDM.txt trunk/python-ogre/demos/media/packs/fresneldemo.zip trunk/python-ogre/demos/media/particle/Example-Water.particle trunk/python-ogre/demos/media/particle/Example.particle trunk/python-ogre/demos/media/particle/emitted_emitter.particle trunk/python-ogre/demos/media/particle/smoke.particle trunk/python-ogre/demos/media/terrain.cfg trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/material/pu_explosion.material trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/scripts/pu_example_11_20.pu trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/scripts/pu_example_21_30.pu trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/scripts/pu_flame.pu trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/scripts/pu_rain.pu trunk/python-ogre/environment.py Added Paths: ----------- trunk/python-ogre/demos/media/PCZAppMedia/ trunk/python-ogre/demos/media/PCZAppMedia/Carpet_Diamond_Olive.jpg trunk/python-ogre/demos/media/PCZAppMedia/Metal_Brass_Ceiling.jpg trunk/python-ogre/demos/media/PCZAppMedia/Metal_Embossed.jpg trunk/python-ogre/demos/media/PCZAppMedia/Metal_Rusted.jpg trunk/python-ogre/demos/media/PCZAppMedia/Metal_Rusted1.jpg trunk/python-ogre/demos/media/PCZAppMedia/Metal_Steel_Textured.jpg trunk/python-ogre/demos/media/PCZAppMedia/Metal_Steel_Textured_White.jpg trunk/python-ogre/demos/media/PCZAppMedia/ROOM.material trunk/python-ogre/demos/media/PCZAppMedia/ROOM_NX.mesh trunk/python-ogre/demos/media/PCZAppMedia/ROOM_NY.mesh trunk/python-ogre/demos/media/PCZAppMedia/ROOM_NZ.mesh trunk/python-ogre/demos/media/PCZAppMedia/ROOM_PX.mesh trunk/python-ogre/demos/media/PCZAppMedia/ROOM_PY.mesh trunk/python-ogre/demos/media/PCZAppMedia/ROOM_PZ.mesh trunk/python-ogre/demos/media/PCZAppMedia/Roofing_Tile_Spanish.jpg trunk/python-ogre/demos/media/PCZAppMedia/Translucent_Glass_Tinted.jpg trunk/python-ogre/demos/media/PCZAppMedia/Translucent_Glass_Tinted1.jpg trunk/python-ogre/demos/media/PCZAppMedia/Wood_Floor.jpg trunk/python-ogre/demos/media/PCZAppMedia/building_exterior.mesh trunk/python-ogre/demos/media/PCZAppMedia/room_nxnynz.mesh trunk/python-ogre/demos/media/PCZAppMedia/room_nxpx.mesh trunk/python-ogre/demos/media/PCZAppMedia/room_nxpxnypynzpz.mesh trunk/python-ogre/demos/media/PCZAppMedia/room_nxpxnz.mesh trunk/python-ogre/demos/media/PCZAppMedia/room_nxpxnzpz.mesh trunk/python-ogre/demos/media/PCZAppMedia/room_nxpxpz.mesh trunk/python-ogre/demos/media/PCZAppMedia/room_nxpynz.mesh trunk/python-ogre/demos/media/PCZAppMedia/room_nxpz.mesh trunk/python-ogre/demos/media/PCZAppMedia/room_nypy.mesh trunk/python-ogre/demos/media/PCZAppMedia/room_nypy_4y.mesh trunk/python-ogre/demos/media/PCZAppMedia/room_nzpz.mesh trunk/python-ogre/demos/media/PCZAppMedia/room_pxnynz.mesh trunk/python-ogre/demos/media/PCZAppMedia/room_pxpynz.mesh trunk/python-ogre/demos/media/PCZAppMedia/room_pxpz.mesh trunk/python-ogre/demos/media/PCZAppMedia/terrain.png trunk/python-ogre/demos/media/PCZAppMedia/terrain2.cfg trunk/python-ogre/demos/media/PCZAppMedia/terrain2.png Removed Paths: ------------- trunk/python-ogre/ThirdParty/extra/include/ffmpeg/ trunk/python-ogre/packages_2.5/ogre/renderer/OGREdshow/ Modified: trunk/python-ogre/PythonOgreConfig_nt.py =================================================================== --- trunk/python-ogre/PythonOgreConfig_nt.py 2008-06-15 10:03:54 UTC (rev 595) +++ trunk/python-ogre/PythonOgreConfig_nt.py 2008-06-17 04:38:24 UTC (rev 596) @@ -111,7 +111,9 @@ 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(BASE_DIR, 'ffmpeg', 'lib') +# PATH_LIB_ffmpeg= os.path.join(BASE_DIR, 'ffmpeg', 'lib') +PATH_LIB_ffmpeg= os.path.join(PATH_ffmpeg, 'lib') + PATH_LIB_plib = PATH_plib PATH_LIB_navi= os.path.join(PATH_navi, 'lib') PATH_LIB_ogredshow = PATH_ogredshow @@ -169,7 +171,7 @@ PATH_INCLUDE_OggVorbisTheora = [ os.path.join(BASE_DIR,'ogg','include') ,os.path.join(BASE_DIR, 'vorbis', 'include') - ,os.path.join(BASE_DIR, 'libtheora-1.0beta2', 'include') + ,os.path.join(BASE_DIR, 'theora', 'include') # ,os.path.join(PATH_OgreAddons,'videoplugin','theoravideo','include') # ,os.path.join(PATH_OgreAddons,'videoplugin','ptypes-2.1.1','include') ,os.path.join(PATH_THIRDPARTY,'ptypes','include') Modified: trunk/python-ogre/ThirdParty/ffmpeg/videoPlayer.cpp =================================================================== --- trunk/python-ogre/ThirdParty/ffmpeg/videoPlayer.cpp 2008-06-15 10:03:54 UTC (rev 595) +++ trunk/python-ogre/ThirdParty/ffmpeg/videoPlayer.cpp 2008-06-17 04:38:24 UTC (rev 596) @@ -222,12 +222,35 @@ bool cVideoPlayer::refresh(unsigned long time) { + static struct SwsContext *img_convert_ctx; + if (state == playing) { if (time - lastTime > (SecondsPerFrame*1000)) { + if (GetNextFrame(FormatCtx, CodecCtx, VideoStream, Frame)) { + +// // // Convert the image into YUV format that SDL uses +// // if(img_convert_ctx == NULL) { +// // int w = is->video_st->codec->width; +// // int h = is->video_st->codec->height; +// // img_convert_ctx = sws_getContext(w, h, +// // is->video_st->codec->pix_fmt, +// // w, h, dst_pix_fmt, SWS_BICUBIC, +// // NULL, NULL, NULL); +// // if(img_convert_ctx == NULL) { +// // fprintf(stderr, "Cannot initialize the conversion context!\n"); +// // exit(1); +// // } +// // } +// // sws_scale(img_convert_ctx, pFrame->data, +// // pFrame->linesize, 0, +// // is->video_st->codec->height, +// // pict.data, pict.linesize); + + img_convert((AVPicture *)FrameRGB, PIX_FMT_RGB32, (AVPicture*)Frame, CodecCtx->pix_fmt, CodecCtx->width, CodecCtx->height); Modified: trunk/python-ogre/ThirdParty/ffmpeg/videoPlayer.h =================================================================== --- trunk/python-ogre/ThirdParty/ffmpeg/videoPlayer.h 2008-06-15 10:03:54 UTC (rev 595) +++ trunk/python-ogre/ThirdParty/ffmpeg/videoPlayer.h 2008-06-17 04:38:24 UTC (rev 596) @@ -10,8 +10,8 @@ extern "C" { #define __STDC_CONSTANT_MACROS #define __STDC_LIMIT_MACROS -#include <ffmpeg/avformat.h> -#include <ffmpeg/avcodec.h> +#include <libavformat/avformat.h> +#include <libavcodec/avcodec.h> } using namespace Ogre; Modified: trunk/python-ogre/code_generators/bullet/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/bullet/generate_code.py 2008-06-15 10:03:54 UTC (rev 595) +++ trunk/python-ogre/code_generators/bullet/generate_code.py 2008-06-17 04:38:24 UTC (rev 596) @@ -92,6 +92,8 @@ ,'::btDispatcher::getInternalManifoldPointer' ,'::btAxisSweep3Internal<unsigned int>::processAllOverlappingPairs' ,'::btAxisSweep3Internal<unsigned short>::processAllOverlappingPairs' + ,'::btMultiSapBroadphase::createProxy' + ,'::btMultiSapBroadphase::quicksort' ] @@ -110,12 +112,40 @@ ,'btAlignedAllocator<btPersistentManifold*, 16u>' ,'btAlignedAllocator<btTypedConstraint*, 16u>' ,'btAlignedAllocator<btRaycastVehicle*, 16u>' + ,'btAlignedAllocator<btBroadphaseInterface*, 16u>' + ,'btAlignedAllocator<btDbvt::Node const*, 16u>' +# ,'btAlignedObjectArray<short>' +# ,'btAlignedAllocator<btDbvt::sStkNN, 16u>' +# ,'btAlignedAllocator<btDbvt::sStkNP, 16u>' +# ,'btAlignedAllocator<btDbvt::sStkNPS, 16u>' + ,'btAlignedAllocator<btMultiSapBroadphase::btBridgeProxy*, 16u>' + ,'btAlignedAllocator<btMultiSapBroadphase::btMultiSapProxy*, 16u>' +# ,'btAlignedAllocator<btOdeContactJoint, 16u>' + ,'btAlignedAllocator<btOdeJoint*, 16u>' +# ,'btAlignedAllocator<btOdeSolverBody, 16u>' + ,'btAlignedAllocator<btOdeSolverBody*, 16u>' +# ,'btAlignedAllocator<btOdeTypedJoint, 16u>' + ,'btAlignedAllocator<short, 16u>' +# ,'btAlignedObjectArray<btDbvt::Node const*>' +# ,'btAlignedObjectArray<btDbvt::sStkNN>' +# ,'btAlignedObjectArray<btDbvt::sStkNP>' +# ,'btAlignedObjectArray<btDbvt::sStkNPS>' + ,'btAlignedObjectArray<btMultiSapBroadphase::btBridgeProxy*>' + ,'btAlignedObjectArray<btMultiSapBroadphase::btMultiSapProxy*>' +# ,'btAlignedObjectArray<btOdeContactJoint>' +# ,'btAlignedObjectArray<btOdeJoint*>' +# ,'btAlignedObjectArray<btOdeSolverBody>' +# ,'btAlignedObjectArray<btOdeSolverBody*>' +# ,'btAlignedObjectArray<btOdeTypedJoint>' + # ,'btAlignedObjectArray<btIndexedMesh>' # ,'btAlignedObjectArray<int>' # ,'btAlignedObjectArray<btQuantizedBvhNode>' # ,'btAlignedObjectArray<btOptimizedBvhNode>' # ,'btAlignedObjectArray<btCollisionObject*>' + ,'btDbvtBroadphase' + ,'btSorLcpSolver' ] for e in excludes: print "excluding class", e @@ -310,7 +340,7 @@ os.path.join( environment.bullet.root_dir, "python_bullet.h" ) , environment.bullet.cache_file ) - defined_symbols = [ 'BULLET_EXPORTS', 'BT_DECLARE_ALIGNED_ALLOCATOR()' ] + defined_symbols = [ 'BULLET_EXPORTS', '__GCCXML__' ] defined_symbols.append( 'VERSION_' + environment.bullet.version ) # Modified: trunk/python-ogre/code_generators/bullet/python_bullet_aliases.h =================================================================== --- trunk/python-ogre/code_generators/bullet/python_bullet_aliases.h 2008-06-15 10:03:54 UTC (rev 595) +++ trunk/python-ogre/code_generators/bullet/python_bullet_aliases.h 2008-06-17 04:38:24 UTC (rev 596) @@ -22,7 +22,36 @@ typedef btAlignedAllocator<btBvhSubtreeInfo, 16> BvhSubtreeInfo16; typedef btAlignedAllocator<btQuantizedBvhNode, 16> QuantizedBvhNode16; typedef btAlignedAllocator<btOptimizedBvhNode, 16> OptimizedBvhNode16; +typedef btAlignedAllocator<btBroadphaseInterface*, 16> BroadphaseInterfacePtr16; +// new changes +typedef btAlignedAllocator<btDbvt::Node const*, 16u> AlignedAllocatorDbvtNode; +typedef btAlignedObjectArray<short> AlignedObjectArrayShort; +typedef btAlignedAllocator<btDbvt::sStkNN, 16u> AlignedAllocatorsStkNN; +typedef btAlignedAllocator<btDbvt::sStkNP, 16u> AlignedAllocatorsStkNP; +typedef btAlignedAllocator<btDbvt::sStkNPS, 16u> AlignedAllocatorsStkNPS; +// typedef btAlignedAllocator<btMultiSapBroadphase::btBridgeProxy*, 16u> AlignedAllocatorMultiSapBradBridge; +// typedef btAlignedAllocator<btMultiSapBroadphase::btMultiSapProxy*, 16u> AlignedAllocatorMultiSapBroadMulti; +typedef btAlignedAllocator<btOdeContactJoint, 16u> AlignedAllocatorOdeContactJoint; +typedef btAlignedAllocator<btOdeJoint*, 16u> AlignedAllocatorOdeJointPtr; +typedef btAlignedAllocator<btOdeSolverBody, 16u> AlignedAllocatorOdeSolverBody; +typedef btAlignedAllocator<btOdeSolverBody*, 16u> AlignedAllocatorOdeSolverBodyPtr; +typedef btAlignedAllocator<btOdeTypedJoint, 16u> AlignedAllocatorOdeTypedJoint; +typedef btAlignedAllocator<short, 16u> AlignedAllocatorShort16; +typedef btAlignedObjectArray<btDbvt::Node const*> AlignedObjectArrayDbvtNode; +typedef btAlignedObjectArray<btDbvt::sStkNN> AlignedObjectArrayDbvtsStkNN; +typedef btAlignedObjectArray<btDbvt::sStkNP> AlignedObjectArrayDbvtsStkNP; +typedef btAlignedObjectArray<btDbvt::sStkNPS> AlignedObjectArrayDbvtsStkNPS; +// typedef btAlignedObjectArray<btMultiSapBroadphase::btBridgeProxy*> AlignedObjectArrayMultiSapBroadBridge; +// typedef btAlignedObjectArray<btMultiSapBroadphase::btMultiSapProxy*> AlignedObjectArrayMultiSapBroadMulti; +typedef btAlignedObjectArray<btOdeContactJoint> AlignedObjectArrayOdeContactJoint; +typedef btAlignedObjectArray<btOdeJoint*> AlignedObjectArrayOdeJointPtr; +typedef btAlignedObjectArray<btOdeSolverBody> AlignedObjectArrayOdeSolverBody; +typedef btAlignedObjectArray<btOdeSolverBody*> AlignedObjectArrayOdeSolverBodyPtr; +typedef btAlignedObjectArray<btOdeTypedJoint> AlignedObjectArrayOdeTypedJoint; + + + typedef btAlignedAllocator<btSolverConstraint, 16u> SolverConstraint16u; typedef btAlignedAllocator<btSolverBody, 16u> SolverBody16u; typedef btAlignedObjectArray<btSolverConstraint> AlignedObjectArraySolverConstraint; Modified: trunk/python-ogre/code_generators/ogreforests/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/ogreforests/generate_code.py 2008-06-15 10:03:54 UTC (rev 595) +++ trunk/python-ogre/code_generators/ogreforests/generate_code.py 2008-06-17 04:38:24 UTC (rev 596) @@ -131,7 +131,8 @@ main_ns = global_ns.namespace( MAIN_NAMESPACE ) else: main_ns = global_ns - + main_ns.class_("::PagedGeometry::ImpostorTexture").noncopyable = True + ############################################################ ## ## And things that need to have their argument and call values fixed. Modified: trunk/python-ogre/demos/media/DeferredShadingMedia/COPYING =================================================================== --- trunk/python-ogre/demos/media/DeferredShadingMedia/COPYING 2008-06-15 10:03:54 UTC (rev 595) +++ trunk/python-ogre/demos/media/DeferredShadingMedia/COPYING 2008-06-17 04:38:24 UTC (rev 596) @@ -1,36 +1,18 @@ -Copyright (c) W.J. van der Laan - - - -Permission is hereby granted, free of charge, to any person obtaining a copy of - -this software and associated documentation files (the "Software"), to deal in - -the Software without restriction, including without limitation the rights to use, - -copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the - -Software, and to permit persons to whom the Software is furnished to do so, subject - -to the following conditions: - - - -The above copyright notice and this permission notice shall be included in all copies - -or substantial portions of the Software. - - - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, - -INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A - -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE - -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - +Copyright (c) W.J. van der Laan + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the +Software, and to permit persons to whom the Software is furnished to do so, subject +to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies +or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Modified: trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/glsl/nm_notex_ps.glsl =================================================================== --- trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/glsl/nm_notex_ps.glsl 2008-06-15 10:03:54 UTC (rev 595) +++ trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/glsl/nm_notex_ps.glsl 2008-06-17 04:38:24 UTC (rev 596) @@ -1,54 +1,46 @@ -/****************************************************************************** -Copyright (c) W.J. van der Laan - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the -Software, and to permit persons to whom the Software is furnished to do so, subject -to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies -or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, -INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -******************************************************************************/ -/** Deferred shading framework - // W.J. :wumpus: van der Laan 2005 // - - Material shader: Single colour normal mapped -*/ - -#extension GL_ARB_draw_buffers : enable - -varying vec3 normal; -varying vec3 tangent_; -varying vec3 binormal; - -varying vec2 texCoord0; -varying float depth; - -uniform sampler2D normTex; - -uniform float specularity; -uniform vec3 colour; - -void main() -{ - // Frame for normal mapping - mat3 rotation = mat3(tangent_, binormal, normal); - vec3 texnormal = (vec3(texture2D(normTex, texCoord0))-0.5)*2.0; - - gl_FragData[0].rgb = colour; - gl_FragData[0].a = specularity; - // rotation*texnormal is reversed for GL because matrices are stored transposed internally - // compared to HLSL - gl_FragData[1].xyz = normalize(rotation*texnormal); // Do normalisation here, saves an operation per light - gl_FragData[1].w = depth; - -} +/****************************************************************************** +Copyright (c) W.J. van der Laan +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the +Software, and to permit persons to whom the Software is furnished to do so, subject +to the following conditions: +The above copyright notice and this permission notice shall be included in all copies +or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +******************************************************************************/ +/** Deferred shading framework + // W.J. :wumpus: van der Laan 2005 // + + Material shader: Single colour normal mapped +*/ + +varying vec3 normal; +varying vec3 tangent_; +varying vec3 binormal; + +varying vec2 texCoord0; +varying float depth; + +uniform sampler2D normTex; +uniform float specularity; +uniform vec3 colour; +void main() +{ + // Frame for normal mapping + mat3 rotation = mat3(tangent_, binormal, normal); + vec3 texnormal = (vec3(texture2D(normTex, texCoord0))-0.5)*2.0; + + gl_FragData[0].rgb = colour; + gl_FragData[0].a = specularity; + // rotation*texnormal is reversed for GL because matrices are stored transposed internally + // compared to HLSL + gl_FragData[1].xyz = normalize(rotation*texnormal); // Do normalisation here, saves an operation per light + gl_FragData[1].w = depth; +} Modified: trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/glsl/nm_ps.glsl =================================================================== --- trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/glsl/nm_ps.glsl 2008-06-15 10:03:54 UTC (rev 595) +++ trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/glsl/nm_ps.glsl 2008-06-17 04:38:24 UTC (rev 596) @@ -1,52 +1,44 @@ -/****************************************************************************** -Copyright (c) W.J. van der Laan - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the -Software, and to permit persons to whom the Software is furnished to do so, subject -to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies -or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, -INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -******************************************************************************/ -/** Deferred shading framework - // W.J. :wumpus: van der Laan 2005 // - - Material shader: Textured normal mapped -*/ - -#extension GL_ARB_draw_buffers : enable - -varying vec3 normal; -varying vec3 tangent_; -varying vec3 binormal; - -varying vec2 texCoord0; -varying float depth; -uniform sampler2D tex0; -uniform sampler2D normTex; - -uniform float specularity; - -void main() -{ - // Frame for normal mapping - mat3 rotation = mat3(tangent_, binormal, normal); - vec3 texnormal = (vec3(texture2D(normTex, texCoord0))-0.5)*2.0; - - gl_FragData[0].rgb = vec3(texture2D(tex0, texCoord0)); - gl_FragData[0].a = specularity; - // rotation*texnormal is reversed for GL because matrices are stored transposed internally - // compared to HLSL - gl_FragData[1].xyz = normalize(rotation*texnormal); // Do normalisation here, saves an operation per light - gl_FragData[1].w = depth; -} +/****************************************************************************** +Copyright (c) W.J. van der Laan +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the +Software, and to permit persons to whom the Software is furnished to do so, subject +to the following conditions: +The above copyright notice and this permission notice shall be included in all copies +or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +******************************************************************************/ +/** Deferred shading framework + // W.J. :wumpus: van der Laan 2005 // + + Material shader: Textured normal mapped +*/ + +varying vec3 normal; +varying vec3 tangent_; +varying vec3 binormal; +varying vec2 texCoord0; +varying float depth; +uniform sampler2D tex0; +uniform sampler2D normTex; +uniform float specularity; +void main() +{ + // Frame for normal mapping + mat3 rotation = mat3(tangent_, binormal, normal); + vec3 texnormal = (vec3(texture2D(normTex, texCoord0))-0.5)*2.0; + + gl_FragData[0].rgb = vec3(texture2D(tex0, texCoord0)); + gl_FragData[0].a = specularity; + // rotation*texnormal is reversed for GL because matrices are stored transposed internally + // compared to HLSL + gl_FragData[1].xyz = normalize(rotation*texnormal); // Do normalisation here, saves an operation per light + gl_FragData[1].w = depth; +} Modified: trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/glsl/nm_vs.glsl =================================================================== --- trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/glsl/nm_vs.glsl 2008-06-15 10:03:54 UTC (rev 595) +++ trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/glsl/nm_vs.glsl 2008-06-17 04:38:24 UTC (rev 596) @@ -1,47 +1,41 @@ -/****************************************************************************** -Copyright (c) W.J. van der Laan - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the -Software, and to permit persons to whom the Software is furnished to do so, subject -to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies -or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, -INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -******************************************************************************/ -/** Deferred shading framework - // W.J. :wumpus: van der Laan 2005 // - - Material shader: Normal mapped -*/ -varying vec3 normal; -varying vec3 tangent_; -varying vec3 binormal; - -varying vec2 texCoord0; -varying float depth; - -attribute vec3 tangent; - -void main() -{ - vec4 projPos = gl_ModelViewProjectionMatrix * gl_Vertex; - - gl_Position = projPos; - depth = projPos.w; - texCoord0 = vec2(gl_MultiTexCoord0); - - normal = vec3(gl_ModelViewMatrix*vec4(gl_Normal,0)); - tangent_ = vec3(gl_ModelViewMatrix*vec4(tangent,0)); - binormal = cross(normal, tangent_); - -} +/****************************************************************************** +Copyright (c) W.J. van der Laan +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the +Software, and to permit persons to whom the Software is furnished to do so, subject +to the following conditions: +The above copyright notice and this permission notice shall be included in all copies +or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +******************************************************************************/ +/** Deferred shading framework + // W.J. :wumpus: van der Laan 2005 // + + Material shader: Normal mapped +*/ +varying vec3 normal; +varying vec3 tangent_; +varying vec3 binormal; +varying vec2 texCoord0; +varying float depth; +attribute vec3 tangent; +void main() +{ + vec4 projPos = gl_ModelViewProjectionMatrix * gl_Vertex; + + gl_Position = projPos; + depth = projPos.w; + texCoord0 = vec2(gl_MultiTexCoord0); + + normal = vec3(gl_ModelViewMatrix*vec4(gl_Normal,0)); + tangent_ = vec3(gl_ModelViewMatrix*vec4(tangent,0)); + binormal = cross(normal, tangent_); + +} Modified: trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/glsl/notex_ps.glsl =================================================================== --- trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/glsl/notex_ps.glsl 2008-06-15 10:03:54 UTC (rev 595) +++ trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/glsl/notex_ps.glsl 2008-06-17 04:38:24 UTC (rev 596) @@ -1,42 +1,35 @@ -/****************************************************************************** -Copyright (c) W.J. van der Laan - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the -Software, and to permit persons to whom the Software is furnished to do so, subject -to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies -or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, -INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -******************************************************************************/ -/** Deferred shading framework - // W.J. :wumpus: van der Laan 2005 // - - Material shader: Single colour phong -*/ - -#extension GL_ARB_draw_buffers : enable - -varying vec3 normal; -varying vec2 texCoord0; -varying float depth; - -uniform float specularity; -uniform vec3 colour; - -void main() -{ - gl_FragData[0].rgb = colour; - gl_FragData[0].a = specularity; - gl_FragData[1].xyz = normalize(normal); // Do normalisation here, saves an operation per light - gl_FragData[1].w = depth; -} +/****************************************************************************** +Copyright (c) W.J. van der Laan +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the +Software, and to permit persons to whom the Software is furnished to do so, subject +to the following conditions: +The above copyright notice and this permission notice shall be included in all copies +or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +******************************************************************************/ +/** Deferred shading framework + // W.J. :wumpus: van der Laan 2005 // + + Material shader: Single colour phong +*/ + +varying vec3 normal; +varying vec2 texCoord0; +varying float depth; +uniform float specularity; +uniform vec3 colour; +void main() +{ + gl_FragData[0].rgb = colour; + gl_FragData[0].a = specularity; + gl_FragData[1].xyz = normalize(normal); // Do normalisation here, saves an operation per light + gl_FragData[1].w = depth; +} Modified: trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/glsl/ps.glsl =================================================================== --- trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/glsl/ps.glsl 2008-06-15 10:03:54 UTC (rev 595) +++ trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/glsl/ps.glsl 2008-06-17 04:38:24 UTC (rev 596) @@ -1,42 +1,37 @@ -/****************************************************************************** -Copyright (c) W.J. van der Laan - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the -Software, and to permit persons to whom the Software is furnished to do so, subject -to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies -or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, -INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -******************************************************************************/ -/** Deferred shading framework - // W.J. :wumpus: van der Laan 2005 // - - Material shader: Textured phongs -*/ - -#extension GL_ARB_draw_buffers : enable - -varying vec3 normal; -varying vec2 texCoord0; -varying float depth; - -uniform sampler2D Tex0; -uniform float specularity; - -void main() -{ - gl_FragData[0].rgb = vec3(texture2D(Tex0, texCoord0)); - gl_FragData[0].a = specularity; - gl_FragData[1].xyz = normalize(normal); // Do normalisation here, saves an operation per light - gl_FragData[1].w = depth; -} +/****************************************************************************** +Copyright (c) W.J. van der Laan +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the +Software, and to permit persons to whom the Software is furnished to do so, subject +to the following conditions: +The above copyright notice and this permission notice shall be included in all copies +or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +******************************************************************************/ +/** Deferred shading framework + // W.J. :wumpus: van der Laan 2005 // + + Material shader: Textured phongs +*/ + +varying vec3 normal; +varying vec2 texCoord0; +varying float depth; + +uniform sampler2D Tex0; +uniform float specularity; + +void main() +{ + gl_FragData[0].rgb = vec3(texture2D(Tex0, texCoord0)); + gl_FragData[0].a = specularity; + gl_FragData[1].xyz = normalize(normal); // Do normalisation here, saves an operation per light + gl_FragData[1].w = depth; +} Modified: trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/glsl/vs.glsl =================================================================== --- trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/glsl/vs.glsl 2008-06-15 10:03:54 UTC (rev 595) +++ trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/glsl/vs.glsl 2008-06-17 04:38:24 UTC (rev 596) @@ -1,80 +1,39 @@ -/****************************************************************************** - -Copyright (c) W.J. van der Laan - - - -Permission is hereby granted, free of charge, to any person obtaining a copy of - -this software and associated documentation files (the "Software"), to deal in - -the Software without restriction, including without limitation the rights to use, - -copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the - -Software, and to permit persons to whom the Software is furnished to do so, subject - -to the following conditions: - - - -The above copyright notice and this permission notice shall be included in all copies - -or substantial portions of the Software. - - - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, - -INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A - -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE - -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -******************************************************************************/ - -/** Deferred shading framework - - // W.J. :wumpus: van der Laan 2005 // - - - - Material shader: Phong material vertex shader - -*/ - -varying vec3 normal; - -varying vec2 texCoord0; - -varying float depth; - - - -void main() - -{ - - - - vec4 projPos = gl_ModelViewProjectionMatrix * gl_Vertex; - - - - gl_Position = projPos; - - depth = projPos.w; - - texCoord0 = vec2(gl_MultiTexCoord0); - - - - normal = vec3(gl_ModelViewMatrix*vec4(gl_Normal,0)); - -} - +/****************************************************************************** +Copyright (c) W.J. van der Laan + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the +Software, and to permit persons to whom the Software is furnished to do so, subject +to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies +or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +******************************************************************************/ +/** Deferred shading framework + // W.J. :wumpus: van der Laan 2005 // + + Material shader: Phong material vertex shader +*/ +varying vec3 normal; +varying vec2 texCoord0; +varying float depth; + +void main() +{ + vec4 projPos = gl_ModelViewProjectionMatrix * gl_Vertex; + + gl_Position = projPos; + depth = projPos.w; + texCoord0 = vec2(gl_MultiTexCoord0); + + normal = vec3(gl_ModelViewMatrix*vec4(gl_Normal,0)); +} Modified: trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/hlsl/nm_notex_ps.hlsl =================================================================== --- trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/hlsl/nm_notex_ps.hlsl 2008-06-15 10:03:54 UTC (rev 595) +++ trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/hlsl/nm_notex_ps.hlsl 2008-06-17 04:38:24 UTC (rev 596) @@ -1,112 +1,56 @@ -/****************************************************************************** - -Copyright (c) W.J. van der Laan - - - -Permission is hereby granted, free of charge, to any person obtaining a copy of - -this software and associated documentation files (the "Software"), to deal in - -the Software without restriction, including without limitation the rights to use, - -copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the - -Software, and to permit persons to whom the Software is furnished to do so, subject - -to the following conditions: - - - -The above copyright notice and this permission notice shall be included in all copies - -or substantial portions of the Software. - - - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, - -INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A - -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE - -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -******************************************************************************/ - -/** Deferred shading framework - - // W.J. :wumpus: van der Laan 2005 // - - - - Material shader: Single colour normal mapped - -*/ - -sampler Tex0: register(s0); - - - -struct OUTPUT - -{ - - float4 color0 : COLOR0; // Diffuse color + ? - - float4 color1 : COLOR1; // Normal + depth - -}; - - - -float3 colour; - -float specularity; - - - -OUTPUT main( - - float3 normal: TEXCOORD0, - - float4 texCoord0: TEXCOORD1, - - float depth: TEXCOORD2, - - float3 tangent: TEXCOORD3, - - float3 binormal: TEXCOORD4 - -) - -{ - - OUTPUT output; - - // Frame for normal mapping - - float3x3 rotation = float3x3(tangent, binormal, normal); - - float3 texnormal = (tex2D(Tex0, texCoord0)-0.5)*2; - - - - output.color0.rgb = colour; - - output.color0.a = specularity; - - output.color1.xyz = normalize(mul(texnormal,rotation)); // Do normalisation here, saves an operation per light - - output.color1.w = depth; - - - - return output; - -} - +/****************************************************************************** +Copyright (c) W.J. van der Laan + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the +Software, and to permit persons to whom the Software is furnished to do so, subject +to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies +or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +******************************************************************************/ +/** Deferred shading framework + // W.J. :wumpus: van der Laan 2005 // + + Material shader: Single colour normal mapped +*/ +sampler Tex0: register(s0); + +struct OUTPUT +{ + float4 color0 : COLOR0; // Diffuse color + ? + float4 color1 : COLOR1; // Normal + depth +}; + +float3 colour; +float specularity; + +OUTPUT main( + float3 normal: TEXCOORD0, + float4 texCoord0: TEXCOORD1, + float depth: TEXCOORD2, + float3 tangent: TEXCOORD3, + float3 binormal: TEXCOORD4 +) +{ + OUTPUT output; + // Frame for normal mapping + float3x3 rotation = float3x3(tangent, binormal, normal); + float3 texnormal = (tex2D(Tex0, texCoord0)-0.5)*2; + + output.color0.rgb = colour; + out... [truncated message content] |
From: <and...@us...> - 2008-06-15 10:03:46
|
Revision: 595 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=595&view=rev Author: andy_miller Date: 2008-06-15 03:03:54 -0700 (Sun, 15 Jun 2008) Log Message: ----------- Further updatesd for 1.2 -- Physx and cegui updates Modified Paths: -------------- trunk/python-ogre/PythonOgreConfig_nt.py trunk/python-ogre/code_generators/cegui/generate_code.py trunk/python-ogre/code_generators/physx/customization_data.py trunk/python-ogre/code_generators/physx/generate_code.py trunk/python-ogre/code_generators/physx/python_physx_aliases.h trunk/python-ogre/environment.py Modified: trunk/python-ogre/PythonOgreConfig_nt.py =================================================================== --- trunk/python-ogre/PythonOgreConfig_nt.py 2008-06-14 14:18:41 UTC (rev 594) +++ trunk/python-ogre/PythonOgreConfig_nt.py 2008-06-15 10:03:54 UTC (rev 595) @@ -97,7 +97,7 @@ 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, 'lib') ## 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_ODE = os.path.join( PATH_ODE, 'lib/releasedll')## 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') Modified: trunk/python-ogre/code_generators/cegui/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/cegui/generate_code.py 2008-06-14 14:18:41 UTC (rev 594) +++ trunk/python-ogre/code_generators/cegui/generate_code.py 2008-06-15 10:03:54 UTC (rev 595) @@ -38,9 +38,9 @@ CEGUI_ns = global_ns.namespace( 'CEGUI' ) CEGUI_ns.include() - ## not available at link time.. seems fixed in CEGUI 0.6.0 -# CEGUI_ns.free_function("lbi_greater").exclude() -# CEGUI_ns.free_function("lbi_less").exclude() + ## not available at link time.. + CEGUI_ns.free_functions("lbi_greater").exclude() + CEGUI_ns.free_functions("lbi_less").exclude() ## Dumb fix to remove all Properties classes - unfortunately the properties in these classes are indicated as public ## however within their 'parent' class they are defined as private.. @@ -88,31 +88,12 @@ ## this one fails at link time mb.class_( 'ScriptFunctor' ).exclude() mb.class_( 'CEGUIRQListener' ).exclude() - ## one version of createFont fails so lets find it and exclude it -# fm = mb.class_( 'FontManager' ) -# ## can't use the simple, if it had 2 args exclude it as there is a version with 2 args that we want -# ## i.e. fm.member_function( 'createFont', arg_types=[None,None ] ).exclude() -# ## so instead need a function that looks for arg 2 to be XMLAttributes -# is_my_case = lambda decl: len( decl.arguments ) == 2 and 'XMLAttributes' in decl.arguments[1].type.decl_string -# fm.member_function( name='createFont', function=is_my_case ).exclude() -# - ## couple of functions that fail when compiling - ## Not sure why this is related to Ogre 1.4 and not the CEGUI version... -# if environment.ogre.version == "1.4": -# CEGUI_ns.class_( "RawDataContainer" ).member_functions( 'getDataPtr' ).exclude() -# CEGUI_ns.class_( "ItemListBase" ).member_functions( 'getSortCallback' ).exclude() -# else: -# CEGUI_ns.class_("DataContainer<unsigned char>").exclude() -# CEGUI_ns.class_("Menubar").exclude() -# CEGUI_ns.class_("MenuBase").exclude() -# CEGUI_ns.class_("PopupMenu").exclude() -# CEGUI_ns.class_("Referenced").exclude() -# CEGUI_ns.class_("System").member_functions("getXMLParser").exclude() ## now have functions in String that return uint arrays a need to be wrapped sc = CEGUI_ns.class_( "String" ) sc.member_functions('data').exclude() sc.member_functions('ptr').exclude() + ## and only remove the at functions that are not returning constants ## the const version returns by value which is good, the non const returns a reference which doesn't compile sc.member_function( 'at', lambda decl: decl.has_const == False ).exclude() @@ -161,13 +142,19 @@ CEGUI_ns.class_('GlobalEventSet').noncopyable = True CEGUI_ns.class_('MouseCursor').noncopyable = True CEGUI_ns.class_('OgreCEGUIRenderer').noncopyable = True + + # changes to latest py++ can gccxml etc June 15 2008 + excludes = ['::CEGUI::ItemListBase::getSortCallback' ] + for f in excludes: + CEGUI_ns.member_function(f).exclude() + CEGUI_ns.class_('RawDataContainer').exclude() # has pointers that need to be handled -- hopefully not needed + CEGUI_ns.member_function("::CEGUI::WindowManager::loadWindowLayout", arg_types=[None,None,None,None,None]).exclude() - + + global_ns.namespace( 'Ogre' ).class_('SceneManager').include(already_exposed=True) - global_ns.namespace( 'Ogre' ).class_('RenderWindow').include(already_exposed=True) global_ns.namespace( 'Ogre' ).class_('TexturePtr').include(already_exposed=True) -# global_ns.namespace( 'Ogre' ).class_('SimpleRenderable').include(already_exposed=True) def set_call_policies( mb ): Modified: trunk/python-ogre/code_generators/physx/customization_data.py =================================================================== --- trunk/python-ogre/code_generators/physx/customization_data.py 2008-06-14 14:18:41 UTC (rev 594) +++ trunk/python-ogre/code_generators/physx/customization_data.py 2008-06-15 10:03:54 UTC (rev 595) @@ -4,7 +4,6 @@ ,"NxCooking.h" ,"NxFoundation.h" ,"NxCharacter.h" - ,"NxExtensions.h" ,"PhysXLoader.h" ,"NxStream.h" ] Modified: trunk/python-ogre/code_generators/physx/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/physx/generate_code.py 2008-06-14 14:18:41 UTC (rev 594) +++ trunk/python-ogre/code_generators/physx/generate_code.py 2008-06-15 10:03:54 UTC (rev 595) @@ -60,6 +60,8 @@ excludes=[ '::NxArray<NxShapeDesc*, NxAllocatorDefault>::begin' + ,'::NxArray< NxForceFieldShapeDesc*, NxAllocatorDefault >::resize' + ,'::NxArray< NxForceFieldShapeGroup*, NxAllocatorDefault >::resize' ,'::NxArray<NxFluidEmitterDesc, NxAllocatorDefault>::deleteEntry' ,'::NxArray<NxShapeDesc*, NxAllocatorDefault>::end' # ,'::NxCloth::overlapAABBTriangles' # ugly argument that boost doesn't like.. To Fix in hand wrappers @@ -73,6 +75,8 @@ # not in source ,'::NxBitField::rangeToDenseMask' ,'::NxBitField::maskToShift' + ,'::NxVec3::setNotUsed' + ,'::NxVec3::isNotUsed' ] for e in excludes: @@ -87,11 +91,14 @@ global_ns.free_functions(e).exclude() excludes = ['NxArray<NxShapeDesc*, NxAllocatorDefault>', ## doesn't have a defult constructor for ElemType - 'NxArray<NxFluidEmitterDesc, NxAllocatorDefault>' ## needs ElemType changed to NxFluidEmitterDesc + 'NxArray<NxFluidEmitterDesc, NxAllocatorDefault>', ## needs ElemType changed to NxFluidEmitterDesc + 'NxArray<NxForceFieldShapeDesc*, NxAllocatorDefault>', ## Elemtype issue + 'NxArray<NxForceFieldShapeGroup*, NxAllocatorDefault>', ## Elemtype issue + 'NxForceFieldShapeGroup' ## seems to have access issues.. ] - for c in global_ns.classes(): - print c +# for c in global_ns.classes(): +# print c for e in excludes: print "Excluding Class:", e global_ns.class_(e).exclude() Modified: trunk/python-ogre/code_generators/physx/python_physx_aliases.h =================================================================== --- trunk/python-ogre/code_generators/physx/python_physx_aliases.h 2008-06-14 14:18:41 UTC (rev 594) +++ trunk/python-ogre/code_generators/physx/python_physx_aliases.h 2008-06-15 10:03:54 UTC (rev 595) @@ -4,6 +4,9 @@ typedef NxUserEntityReport<NxSweepQueryHit> EntityReportSweepQuery; typedef NxArray<NxShapeDesc*, NxAllocatorDefault> NxArrayShapeDesc; typedef NxArray<NxFluidEmitterDesc, NxAllocatorDefault> NxArrayFluidEmitterDesc; +typedef NxArray< NxForceFieldShapeDesc*, NxAllocatorDefault > NxArrayNxForceFieldShapeDescPtr; +typedef NxArray< NxForceFieldShapeGroup*, NxAllocatorDefault > NxArrayNxForceFieldShapeGroupPtr; + Modified: trunk/python-ogre/environment.py =================================================================== --- trunk/python-ogre/environment.py 2008-06-14 14:18:41 UTC (rev 594) +++ trunk/python-ogre/environment.py 2008-06-15 10:03:54 UTC (rev 595) @@ -1137,7 +1137,7 @@ include_dirs.append( d ) if os.name == 'nt': CCFLAGS = ' -D"WIN32" ' - CCFLAGS = ' ' ## try to not define WIN 32 to remove inline assembly code that GCCxml doesn't like + ## CCFLAGS = ' ' ## try to not define WIN 32 to remove inline assembly code that GCCxml doesn't like else: CCFLAGS = ' -D"LINUX" ' lib_dirs = [Config.PATH_LIB_Boost, @@ -1146,7 +1146,7 @@ ] CheckIncludes=[] if os.name == 'nt': - libs=[ Config.LIB_Boost, 'NxCharacter', 'NxCooking', 'NxExtensions', 'PhysXLoader' ] + libs=[ Config.LIB_Boost, 'NxCharacter', 'NxCooking', 'PhysXLoader' ] else: libs=[ Config.LIB_Boost, 'NxCharacter', 'NxCooking', 'PhysXCore', 'PhysXLoader' ] ModuleName="PhysX" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2008-06-14 14:18:36
|
Revision: 594 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=594&view=rev Author: andy_miller Date: 2008-06-14 07:18:41 -0700 (Sat, 14 Jun 2008) Log Message: ----------- Further Ogre 1.7 support updates Modified Paths: -------------- trunk/python-ogre/PythonOgreConfig_nt.py trunk/python-ogre/ThirdParty/nxogre/NxOgreStable.h trunk/python-ogre/code_generators/bullet/generate_code.py trunk/python-ogre/code_generators/cegui/generate_code.py trunk/python-ogre/code_generators/common_utils/__init__.py trunk/python-ogre/code_generators/ogre/generate_code.py trunk/python-ogre/code_generators/ogreode/generate_code.py trunk/python-ogre/code_generators/particleuniverse/generate_code.py trunk/python-ogre/environment.py Added Paths: ----------- trunk/python-ogre/patch/ogre_svn.patch Modified: trunk/python-ogre/PythonOgreConfig_nt.py =================================================================== --- trunk/python-ogre/PythonOgreConfig_nt.py 2008-06-12 13:21:31 UTC (rev 593) +++ trunk/python-ogre/PythonOgreConfig_nt.py 2008-06-14 14:18:41 UTC (rev 594) @@ -62,7 +62,8 @@ PATH_plib = os.path.join(PATH_THIRDPARTY, 'plib') PATH_et = os.path.join(PATH_THIRDPARTY, 'et') PATH_caelum = os.path.join(PATH_THIRDPARTY, 'caelum') -PATH_NxOgre= os.path.join(BASE_DIR, 'nxogre') +PATH_NxOgre= os.path.join(BASE_DIR, 'nxogre', 'NxOgre') +PATH_NxOgre= os.path.join(PATH_THIRDPARTY, 'nxogre') PATH_NxOgre_09= os.path.join(PATH_THIRDPARTY, 'nxogre_0.9') PATH_watermesh= os.path.join(PATH_THIRDPARTY, 'watermesh') PATH_noise= os.path.join(PATH_THIRDPARTY, 'noise') @@ -71,7 +72,7 @@ PATH_opensteer = os.path.join(BASE_DIR, 'opensteer', 'trunk') PATH_ogrevideoffmpeg = os.path.join(PATH_THIRDPARTY,'ffmpeg') -PATH_Bullet= os.path.join(BASE_DIR, 'bullet-2.66') +PATH_Bullet= os.path.join(BASE_DIR, 'bullet-2.69') PATH_PhysX= "c:/program files/NVIDIA Corporation/NVIDIA Physx SDK/v2.8.1/SDKs" PATH_Theora= os.path.join(PATH_OgreAddons,'videoplugin','TheoraVideo') PATH_ffmpeg= os.path.join(PATH_THIRDPARTY,'extra') @@ -151,6 +152,7 @@ PATH_INCLUDE_quickgui = PATH_quickgui PATH_INCLUDE_NxOgre_09= PATH_NxOgre_09 PATH_INCLUDE_NxOgre= os.path.join(PATH_NxOgre, 'include') +PATH_INCLUDE_NxOgre= PATH_NxOgre 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 Modified: trunk/python-ogre/ThirdParty/nxogre/NxOgreStable.h =================================================================== --- trunk/python-ogre/ThirdParty/nxogre/NxOgreStable.h 2008-06-12 13:21:31 UTC (rev 593) +++ trunk/python-ogre/ThirdParty/nxogre/NxOgreStable.h 2008-06-14 14:18:41 UTC (rev 594) @@ -3,20 +3,20 @@ * all NxOgre source (cpp) files with no exceptions. * \version 1.0-20 * - * \licence NxOgre a wrapper for the PhysX physics library. - * Copyright (C) 2005-8 Robin Southern of NxOgre.org http://www.nxogre.org - * This library 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.1 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software + * \licence NxOgre a wrapper for the PhysX physics library. + * Copyright (C) 2005-8 Robin Southern of NxOgre.org http://www.nxogre.org + * This library 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.1 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -36,30 +36,30 @@ #include "NxOgreAllocator.h" -#define Nx_Version_Major 1 -#define Nx_Version_Minor 0 -#define Nx_Version_Commit 19 -#define Nx_Version_Codename "Bleeding Edge" - -#if (NX_DEBUG == 0) -# define Nx_Version_Full "NxOgre 1.0.19 Bleeding Edge" -#else -# define Nx_Version_Full "NxOgre 1.0.19 Bleeding Edge (Debug)" +#define Nx_Version_Major 1 +#define Nx_Version_Minor 0 +#define Nx_Version_Commit 19 +#define Nx_Version_Codename "Bleeding Edge" + +#if (NX_DEBUG == 0) +# define Nx_Version_Full "NxOgre 1.0.19 Bleeding Edge" +#else +# define Nx_Version_Full "NxOgre 1.0.19 Bleeding Edge (Debug)" #endif #if NX_USE_OGRE # include "OgrePrerequisites.h" #endif -#if NX_USE_OGRE -# include <OgreNoMemoryMacros.h> -#endif +// #if NX_USE_OGRE +// # include <OgreNoMemoryMacros.h> +// #endif #include <Nx.h> #include <NxPhysics.h> -#if NX_USE_OGRE -# include <OgreMemoryMacros.h> -#endif +// #if NX_USE_OGRE +// # include <OgreMemoryMacros.h> +// #endif #endif Modified: trunk/python-ogre/code_generators/bullet/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/bullet/generate_code.py 2008-06-12 13:21:31 UTC (rev 593) +++ trunk/python-ogre/code_generators/bullet/generate_code.py 2008-06-14 14:18:41 UTC (rev 594) @@ -310,7 +310,7 @@ os.path.join( environment.bullet.root_dir, "python_bullet.h" ) , environment.bullet.cache_file ) - defined_symbols = [ 'BULLET_EXPORTS' ] + defined_symbols = [ 'BULLET_EXPORTS', 'BT_DECLARE_ALIGNED_ALLOCATOR()' ] defined_symbols.append( 'VERSION_' + environment.bullet.version ) # Modified: trunk/python-ogre/code_generators/cegui/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/cegui/generate_code.py 2008-06-12 13:21:31 UTC (rev 593) +++ trunk/python-ogre/code_generators/cegui/generate_code.py 2008-06-14 14:18:41 UTC (rev 594) @@ -119,7 +119,7 @@ ## CEGUI::WindowManager::loadWindowLayout can take a function pointer as an agrument whcih isn't supported yet ## so lets remove the versions that expose the pointer - lo = CEGUI_ns.class_( 'WindowManager' ).member_function( 'loadWindowLayout' ) + lo = CEGUI_ns.class_( 'WindowManager' ).member_function( 'loadWindowLayout', arg_types=[None, None, None, None, None] ) lo.arguments[3].type = lo.arguments[4].type #AJM Not sure how args work so setting the func pointer to a void pointer ## OgreCEGUIRenderer.h has an assumed namespace in one of the default agrs that we need to fix Modified: trunk/python-ogre/code_generators/common_utils/__init__.py =================================================================== --- trunk/python-ogre/code_generators/common_utils/__init__.py 2008-06-12 13:21:31 UTC (rev 593) +++ trunk/python-ogre/code_generators/common_utils/__init__.py 2008-06-14 14:18:41 UTC (rev 594) @@ -94,10 +94,18 @@ continue if mvar.ignore: continue - if declarations.is_array (mvar.type): - template = '''def_readonly("%(mvar)s", &%(ns)s::%(parent)s::%(mvar)s)''' - else: - template = '''def_readwrite("%(mvar)s", &%(ns)s::%(parent)s::%(mvar)s)''' + if type (mvar) == type (declarations.destructor_t): + continue + try: + if declarations.is_array (mvar.type): + template = '''def_readonly("%(mvar)s", &%(ns)s::%(parent)s::%(mvar)s)''' + else: + template = '''def_readwrite("%(mvar)s", &%(ns)s::%(parent)s::%(mvar)s)''' + except AttributeError: + continue + except: + print "**** Error in unnamed_classes", mvar + named_parent.add_code( template % dict( ns=namespace, mvar=mvar.name, parent=named_parent.name ) ) def set_declaration_aliases(global_ns, aliases): Modified: trunk/python-ogre/code_generators/ogre/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/ogre/generate_code.py 2008-06-12 13:21:31 UTC (rev 593) +++ trunk/python-ogre/code_generators/ogre/generate_code.py 2008-06-14 14:18:41 UTC (rev 594) @@ -231,9 +231,30 @@ # changes for Ogre 1.7 if environment.ogre.version =="1.7": - main_ns.class_("ResourceBackgroundQueue").exclude() # Ogre::ResourceBackgroundQueue::_fireBackgroundLoadingComplete isn't implemented +# main_ns.class_("ResourceBackgroundQueue").exclude() # Ogre::ResourceBackgroundQueue::_fireBackgroundLoadingComplete isn't implemented main_ns.class_("ResourceGroupManager").mem_fun("_notifyWorldGeometryPrepareStageEnded").exclude() main_ns.class_("ResourceGroupManager").mem_fun("_notifyWorldGeometryPrepareStageStarted").exclude() +# # # fix vistrenderables issues: +# # # # for mf in main_ns.member_functions(): +# # # # if mf.name == 'visitRenderables': +# # # # mf.exclude() ## can't do this as too much exclusion +# # BillboardChain::visitRenderables +# # Entity +# # InstancedGeometry::GeometryBucket +# # InstancedGeometry::BatchInstance +# # Light +# # MovablePlane +# # SimpleRenderable +# # BillboardSet +# # Frustum +# # ManualObject +# # ParticleSystem +# # StaticGeometry::Region + + + noncopy=['Camera','Frustum', 'Log'] + for c in noncopy: + main_ns.class_(c).noncopyable = True for cls in main_ns.classes(): if cls.decl_string.startswith ("::Ogre::AllocatedObject") or\ cls.decl_string.startswith("::Ogre::STLAllocator") or\ Modified: trunk/python-ogre/code_generators/ogreode/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/ogreode/generate_code.py 2008-06-12 13:21:31 UTC (rev 593) +++ trunk/python-ogre/code_generators/ogreode/generate_code.py 2008-06-14 14:18:41 UTC (rev 594) @@ -160,8 +160,9 @@ global_ns = mb.global_ns # global_ns.member_functions('::OgreOde_Prefab::Ragdoll::pick').exclude() # global_ns.mem_fun('::OgreOde_Prefab::Ragdoll::pick', arg_types=[None,None,None]).include() - f = global_ns.mem_fun('::OgreOde_Prefab::Ragdoll::pick', arg_types=[None,None,None]) - f.add_transformation(ft.output('body'), ft.output('position') , alias='pick') + +# # f = global_ns.mem_fun('::OgreOde_Prefab::Ragdoll::pick', arg_types=[None,None,None]) +# # f.add_transformation(ft.output('body'), ft.output('position') , alias='pick') Modified: trunk/python-ogre/code_generators/particleuniverse/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/particleuniverse/generate_code.py 2008-06-12 13:21:31 UTC (rev 593) +++ trunk/python-ogre/code_generators/particleuniverse/generate_code.py 2008-06-14 14:18:41 UTC (rev 594) @@ -60,7 +60,8 @@ main_ns.class_( c ).exclude() excludes = ['::ParticleUniverse::ParticleTechnique::setSpatialHashingParticleSizeUsed', - '::ParticleUniverse::ParticleTechnique::isSpatialHashingParticleSizeUsed' + '::ParticleUniverse::ParticleTechnique::isSpatialHashingParticleSizeUsed', + '::ParticleUniverse::ParticleSystem::setBounds' ] for e in excludes: print "excluding ", e Modified: trunk/python-ogre/environment.py =================================================================== --- trunk/python-ogre/environment.py 2008-06-12 13:21:31 UTC (rev 593) +++ trunk/python-ogre/environment.py 2008-06-14 14:18:41 UTC (rev 594) @@ -248,7 +248,18 @@ [0, "cp newtonSDK/sdk/*.a %s/lib" % PREFIX, ''], [0, "cp newtonSDK/sdk/*.a ogreaddons/ogrenewt" , ''] ] - + + if isWindows(): + base = 'newton' + source = [ + [wget, "http://www.newtondynamics.com/downloads/NewtonWin-1.53.zip", downloadPath] + ] + + buildCmds = [ + [0, unzip + os.path.join(downloadPath, "NewtonWin-1.53.zip"), ''], + [0, "setup.exe", ''], + ] + class pygccxml: pythonModule = False active = True @@ -691,17 +702,22 @@ [cvs, " -d :pserver:ano...@cv...:/cvsroot/ogre co -D 01052008 -P "+base, os.getcwd()] ] else: - source = [ - [cvs, " -d :pserver:ano...@cv...:/cvsroot/ogre co -P "+base, os.getcwd()] + source = [ ##to fix + [svn, " co :pserver:ano...@cv...:/cvsroot/ogre co -P "+base, os.getcwd()] ] baseDir = os.path.join(os.getcwd(), base ) buildCmds = [ [0, "patch -s -N -i ../../python-ogre/patch/ogrenewt.patch -p0", baseDir], #[0, "cp SConscript OgreNewt_Main", baseDir], #[0, "rm SConscript", baseDir], - [0, "rm -r ./OgreNewt_Main/inc/boost", baseDir], + [0, rm + " ./OgreNewt_Main/inc/boost", baseDir], [0, "scons prefix=%s boost=%s/include/boost-1_34_1 install" % (PREFIX, PREFIX), baseDir], ##WARNING -- boost include dir name is different than build name (dash not underscore) ] + if isWindows(): + buildCmds = [ + [0, "patch -s -N -i ../../python-ogre/patch/ogrenewt.patch -p0", baseDir], + [0, "rm -r ./OgreNewt_Main/inc/boost", baseDir], + ] include_dirs = [Config.PATH_Boost , Config.PATH_Newton # only one path for Newton @@ -807,15 +823,22 @@ ["wget", "http://prdownloads.sourceforge.net/opende/ode-src-0.9.zip",downloadPath] ] baseDir = os.path.join(os.getcwd(),"ode-0.9") - buildCmds = [ - [0, "unzip -q -o "+ os.path.join(downloadPath,"ode-src-0.9.zip"), ''], - [0, "chmod +x autogen.sh", baseDir], - [0, "./autogen.sh", baseDir], - [0, "./configure --prefix=%s --includedir=%s/include" %(PREFIX, PREFIX), baseDir], - [0, "make", baseDir], - [0, "make install", baseDir] - - ] + if not isWindows(): + buildCmds = [ + [0, unzip + os.path.join(downloadPath,"ode-src-0.9.zip"), ''], + [0, "chmod +x autogen.sh", baseDir], + [0, "./autogen.sh", baseDir], + [0, "./configure --prefix=%s --includedir=%s/include" %(PREFIX, PREFIX), baseDir], + [0, "make", baseDir], + [0, "make install", baseDir] + + ] + else: + buildCmds = [ + [0, unzip + os.path.join(downloadPath,"ode-src-0.9.zip"), ''], + ] + + class opcode: active = True pythonModule = True @@ -937,6 +960,7 @@ name ='navi' CCFLAGS = '-D"WIN32" -D"NDEBUG", -D"WINDOWS"' cflags="" + base = 'navi' include_dirs = [ Config.PATH_Boost ,Config.PATH_INCLUDE_Ogre ,Config.PATH_INCLUDE_navi @@ -952,7 +976,11 @@ 'kernel32.lib', 'gdi32.lib', 'winspool.lib', 'comdlg32.lib', 'advapi32.lib', 'shell32.lib','ole32.lib','oleaut32.lib','uuid.lib' ] ModuleName="navi" - + source = [ + [svn, " checkout http://navi.googlecode.com/svn/trunk/ "+base, os.getcwd()] + ] + + class betagui: active = True pythonModule = True @@ -996,7 +1024,7 @@ class particleuniverse: active = True pythonModule = True - version="0.7" + version="0.8" name='particleuniverse' parent="ogre/addons" CCFLAGS = ' ' @@ -1291,9 +1319,9 @@ class bullet: active = True pythonModule = True - version= "2.66" + version= "2.69" name='bullet' - base = "bullet-2.66" + base = "bullet-" + version baseDir = os.path.join(os.getcwd(), base) parent = "ogre/physics" libs=[Config.LIB_Boost, 'LibBulletCollision', 'LibBulletDynamics'] @@ -1305,16 +1333,24 @@ include_dirs = [ Config.PATH_Boost , Config.PATH_INCLUDE_Bullet ] - source=[ - [wget, "http://downloads.sourceforge.net/bullet/"+base+"A.tgz", downloadPath] + if not isWindows(): + source=[ + [wget, "http://bullet.googlecode.com/files/"+base+".tgz", downloadPath] + ] + buildCmds = [ + [0, "tar zxf " +os.path.join(downloadPath, base)+".tgz", ''], + [0, "cmake . -DCMAKE_INSTALL_PREFIX:PATH=%s" % PREFIX, baseDir], + [0, "make", baseDir], + [0, "find . -name *.a -execdir cp {} %s/lib \;" % PREFIX, baseDir] + ] + else: + source=[ + [wget, "http://bullet.googlecode.com/files/"+base+".zip", downloadPath] ] - buildCmds = [ - [0, "tar zxf " +os.path.join(downloadPath, base)+".tgz", ''], - [0, "cmake . -DCMAKE_INSTALL_PREFIX:PATH=%s" % PREFIX, baseDir], - [0, "make", baseDir], - [0, "find . -name *.a -execdir cp {} %s/lib \;" % PREFIX, baseDir] - ] - + buildCmds = [ + [0, unzip +os.path.join(downloadPath, base)+".zip", ''], + ] + ModuleName = 'bullet' CheckIncludes = ['boost/python.hpp'] cflags = "" @@ -1451,7 +1487,7 @@ ModuleName="cadunetree" class opensteer: - active = True + active = False pythonModule = True version="1.0" name='opensteer' Added: trunk/python-ogre/patch/ogre_svn.patch =================================================================== --- trunk/python-ogre/patch/ogre_svn.patch (rev 0) +++ trunk/python-ogre/patch/ogre_svn.patch 2008-06-14 14:18:41 UTC (rev 594) @@ -0,0 +1,98 @@ +Index: OgreMovableObject.h +=================================================================== +--- OgreMovableObject.h (revision 7604) ++++ OgreMovableObject.h (working copy) +@@ -479,7 +479,7 @@ + included too. + */ + virtual void visitRenderables(Renderable::Visitor* visitor, +- bool debugRenderables = false) = 0; ++ bool debugRenderables = false) { throw std::runtime_error ( std::string ("Virtual function MovableObject::visitRenderables called!") ); } + + /** Sets whether or not the debug display of this object is enabled. + @remarks +Index: OgreRenderQueueListener.h +=================================================================== +--- OgreRenderQueueListener.h (revision 7604) ++++ OgreRenderQueueListener.h (working copy) +@@ -31,7 +31,9 @@ + + #include "OgrePrerequisites.h" + #include "OgreRenderQueue.h" ++#include <stdexcept> + ++ + namespace Ogre { + + /** Abstract interface which classes must implement if they wish to receive +@@ -65,7 +67,7 @@ + for this queue group. + */ + virtual void renderQueueStarted(uint8 queueGroupId, const String& invocation, +- bool& skipThisInvocation) = 0; ++ bool& skipThisInvocation) { throw std::runtime_error ( std::string ("Virtual function RenderQueueListener::renderQueueStarted called!") ); } + + /** Event raised after a queue group is rendered. + @remarks +@@ -80,7 +82,7 @@ + events will also be fired for it again. + */ + virtual void renderQueueEnded(uint8 queueGroupId, const String& invocation, +- bool& repeatThisInvocation) = 0; ++ bool& repeatThisInvocation) { throw std::runtime_error ( std::string ("Virtual function RenderQueueListener::renderQueueEnded called!") ); } + }; + + } +Index: OgreDataStream.h +=================================================================== +--- OgreDataStream.h (revision 7604) ++++ OgreDataStream.h (working copy) +@@ -33,6 +33,7 @@ + #include "OgreString.h" + #include "OgreSharedPtr.h" + #include <istream> ++#include <stdexcept> + + namespace Ogre { + +@@ -79,7 +80,7 @@ + @param count Number of bytes to read + @returns The number of bytes read + */ +- virtual size_t read(void* buf, size_t count) = 0; ++ virtual size_t read(void* buf, size_t count) { throw std::runtime_error ( std::string ("Virtual function DataStream::read called!") ); } + /** Get a single line from the stream. + @remarks + The delimiter character is not included in the data +@@ -146,7 +147,7 @@ + /** Returns the total size of the data to be read from the stream, + or 0 if this is indeterminate for this stream. + */ +- size_t size(void) const { return mSize; } ++ virtual size_t size(void) const { return mSize; } + + /** Close the stream; this makes further operations invalid. */ + virtual void close(void) = 0; +Index: OgreHardwareBuffer.h +=================================================================== +--- OgreHardwareBuffer.h (revision 7604) ++++ OgreHardwareBuffer.h (working copy) +@@ -31,7 +31,9 @@ + + // Precompiler options + #include "OgrePrerequisites.h" ++#include <stdexcept> + ++ + namespace Ogre { + + /** Abstract class defining common features of hardware buffers. +@@ -244,7 +246,7 @@ + @param pDest The area of memory in which to place the data, must be large enough to + accommodate the data! + */ +- virtual void readData(size_t offset, size_t length, void* pDest) = 0; ++ virtual void readData(size_t offset, size_t length, void* pDest) { throw std::runtime_error ( std::string ("Virtual function HardwareBuffer::readData called!") ); } + /** Writes data to the buffer from an area of system memory; note that you must + ensure that your buffer is big enough. + @param offset The byte offset from the start of the buffer to start writing This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2008-06-12 13:21:28
|
Revision: 593 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=593&view=rev Author: andy_miller Date: 2008-06-12 06:21:31 -0700 (Thu, 12 Jun 2008) Log Message: ----------- Updates to Ogre 1.7 (SVN) support Updates for Caelum and Quickgui etc Modified Paths: -------------- trunk/python-ogre/ThirdParty/ogreal/OgreALListener.h trunk/python-ogre/ThirdParty/ogreal/OgreALPrereqs.h trunk/python-ogre/ThirdParty/ogreal/OgreALSound.h trunk/python-ogre/code_generators/caelum/generate_code.py trunk/python-ogre/code_generators/common_utils/var_checker.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/ogre/python_ogre_masterlist.h trunk/python-ogre/environment.py trunk/python-ogre/setup.py Added Paths: ----------- trunk/python-ogre/ThirdParty/caelum/Astronomy.cpp trunk/python-ogre/ThirdParty/caelum/Astronomy.h trunk/python-ogre/ThirdParty/caelum/Caelum.h trunk/python-ogre/ThirdParty/caelum/CaelumExceptions.h trunk/python-ogre/ThirdParty/caelum/CaelumPrecompiled.cpp trunk/python-ogre/ThirdParty/caelum/CaelumPrecompiled.h trunk/python-ogre/ThirdParty/caelum/CaelumPrerequisites.h trunk/python-ogre/ThirdParty/caelum/CaelumSystem.cpp trunk/python-ogre/ThirdParty/caelum/CaelumSystem.h trunk/python-ogre/ThirdParty/caelum/CameraBoundElement.cpp trunk/python-ogre/ThirdParty/caelum/CameraBoundElement.h trunk/python-ogre/ThirdParty/caelum/GeometryFactory.cpp trunk/python-ogre/ThirdParty/caelum/GeometryFactory.h trunk/python-ogre/ThirdParty/caelum/GroundFog.cpp trunk/python-ogre/ThirdParty/caelum/GroundFog.h trunk/python-ogre/ThirdParty/caelum/ImageHelper.cpp trunk/python-ogre/ThirdParty/caelum/ImageHelper.h trunk/python-ogre/ThirdParty/caelum/LayeredClouds.cpp trunk/python-ogre/ThirdParty/caelum/LayeredClouds.h trunk/python-ogre/ThirdParty/caelum/Moon.cpp trunk/python-ogre/ThirdParty/caelum/Moon.h trunk/python-ogre/ThirdParty/caelum/SkyColourModel.cpp trunk/python-ogre/ThirdParty/caelum/SkyColourModel.h trunk/python-ogre/ThirdParty/caelum/SkyDome.cpp trunk/python-ogre/ThirdParty/caelum/SkyDome.h trunk/python-ogre/ThirdParty/caelum/SkyLight.cpp trunk/python-ogre/ThirdParty/caelum/SkyLight.h trunk/python-ogre/ThirdParty/caelum/SolarSystemModel.cpp trunk/python-ogre/ThirdParty/caelum/SolarSystemModel.h trunk/python-ogre/ThirdParty/caelum/Starfield.cpp trunk/python-ogre/ThirdParty/caelum/Starfield.h trunk/python-ogre/ThirdParty/caelum/Sun.cpp trunk/python-ogre/ThirdParty/caelum/Sun.h trunk/python-ogre/ThirdParty/caelum/UniversalClock.cpp trunk/python-ogre/ThirdParty/caelum/UniversalClock.h trunk/python-ogre/ThirdParty/quickgui/QuickGUI.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIBorder.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIBorder.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIButton.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIButton.h trunk/python-ogre/ThirdParty/quickgui/QuickGUICheckBox.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUICheckBox.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIComboBox.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIComboBox.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIConfigScriptParser.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIConfigScriptParser.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIConsole.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIConsole.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIEffect.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIEffect.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIEventArgs.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIExportDLL.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIForwardDeclarations.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/QuickGUIKeyCode.h trunk/python-ogre/ThirdParty/quickgui/QuickGUILabel.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUILabel.h trunk/python-ogre/ThirdParty/quickgui/QuickGUILabelArea.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUILabelArea.h 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/QuickGUIMemberFunctionPointer.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIMenuLabel.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIMenuLabel.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIMouseButtonID.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.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIPoint.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIPrecompiledHeaders.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIPrecompiledHeaders.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/QuickGUIQuadContainer.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIQuadContainer.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIRadioButton.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIRadioButton.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIRadioButtonGroup.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIRadioButtonGroup.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIRect.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIRect.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIRoot.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIRoot.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.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/QuickGUISkinSetManager.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUISkinSetManager.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIText.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIText.h trunk/python-ogre/ThirdParty/quickgui/QuickGUITextArea.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUITextArea.h trunk/python-ogre/ThirdParty/quickgui/QuickGUITextBox.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUITextBox.h trunk/python-ogre/ThirdParty/quickgui/QuickGUITextHelper.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUITextHelper.h trunk/python-ogre/ThirdParty/quickgui/QuickGUITitleBar.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUITitleBar.h trunk/python-ogre/ThirdParty/quickgui/QuickGUITree.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUITree.h trunk/python-ogre/ThirdParty/quickgui/QuickGUITypedef.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIVector4.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIVector4.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 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/boost/libs/python/build/Jamfile.v2.old Removed Paths: ------------- trunk/python-ogre/ThirdParty/caelum/Astronomy.cpp trunk/python-ogre/ThirdParty/caelum/Astronomy.h trunk/python-ogre/ThirdParty/caelum/Caelum.h trunk/python-ogre/ThirdParty/caelum/CaelumExceptions.h trunk/python-ogre/ThirdParty/caelum/CaelumListener.h trunk/python-ogre/ThirdParty/caelum/CaelumPrecompiled.cpp trunk/python-ogre/ThirdParty/caelum/CaelumPrecompiled.h trunk/python-ogre/ThirdParty/caelum/CaelumPrerequisites.h trunk/python-ogre/ThirdParty/caelum/CaelumSystem.cpp trunk/python-ogre/ThirdParty/caelum/CaelumSystem.h trunk/python-ogre/ThirdParty/caelum/CameraBoundElement.cpp trunk/python-ogre/ThirdParty/caelum/CameraBoundElement.h trunk/python-ogre/ThirdParty/caelum/GeometryFactory.cpp trunk/python-ogre/ThirdParty/caelum/GeometryFactory.h trunk/python-ogre/ThirdParty/caelum/GroundFog.cpp trunk/python-ogre/ThirdParty/caelum/GroundFog.h trunk/python-ogre/ThirdParty/caelum/ImageHelper.cpp trunk/python-ogre/ThirdParty/caelum/ImageHelper.h trunk/python-ogre/ThirdParty/caelum/LayeredClouds.cpp trunk/python-ogre/ThirdParty/caelum/LayeredClouds.h trunk/python-ogre/ThirdParty/caelum/SkyColourModel.cpp trunk/python-ogre/ThirdParty/caelum/SkyColourModel.h trunk/python-ogre/ThirdParty/caelum/SkyDome.cpp trunk/python-ogre/ThirdParty/caelum/SkyDome.h trunk/python-ogre/ThirdParty/caelum/SolarSystemModel.cpp trunk/python-ogre/ThirdParty/caelum/SolarSystemModel.h trunk/python-ogre/ThirdParty/caelum/Starfield.cpp trunk/python-ogre/ThirdParty/caelum/Starfield.h trunk/python-ogre/ThirdParty/caelum/Sun.cpp trunk/python-ogre/ThirdParty/caelum/Sun.h trunk/python-ogre/ThirdParty/caelum/UniversalClock.cpp trunk/python-ogre/ThirdParty/caelum/UniversalClock.h trunk/python-ogre/ThirdParty/quickgui/QuickGUI.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIBorder.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIBorder.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIButton.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIButton.h trunk/python-ogre/ThirdParty/quickgui/QuickGUICheckBox.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUICheckBox.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIComboBox.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIComboBox.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIConfigScriptParser.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIConfigScriptParser.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIConsole.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIConsole.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIEffect.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIEffect.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIEventArgs.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIExportDLL.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIForwardDeclarations.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/QuickGUIKeyCode.h trunk/python-ogre/ThirdParty/quickgui/QuickGUILabel.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUILabel.h trunk/python-ogre/ThirdParty/quickgui/QuickGUILabelArea.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUILabelArea.h 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/QuickGUIMemberFunctionPointer.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIMenuLabel.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIMenuLabel.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIMouseButtonID.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.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIPoint.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIPrecompiledHeaders.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIPrecompiledHeaders.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/QuickGUIQuadContainer.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIQuadContainer.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIRadioButton.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIRadioButton.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIRadioButtonGroup.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIRadioButtonGroup.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIRect.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIRect.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIRoot.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIRoot.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.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/QuickGUISkinSetManager.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUISkinSetManager.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIText.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIText.h trunk/python-ogre/ThirdParty/quickgui/QuickGUITextArea.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUITextArea.h trunk/python-ogre/ThirdParty/quickgui/QuickGUITextBox.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUITextBox.h trunk/python-ogre/ThirdParty/quickgui/QuickGUITextHelper.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUITextHelper.h trunk/python-ogre/ThirdParty/quickgui/QuickGUITitleBar.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUITitleBar.h trunk/python-ogre/ThirdParty/quickgui/QuickGUITree.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUITree.h trunk/python-ogre/ThirdParty/quickgui/QuickGUITypedef.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIVector4.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIVector4.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 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/boost/libs/python/build/Jamfile.v2 Deleted: trunk/python-ogre/ThirdParty/caelum/Astronomy.cpp =================================================================== --- trunk/python-ogre/ThirdParty/caelum/Astronomy.cpp 2008-05-23 01:30:05 UTC (rev 592) +++ trunk/python-ogre/ThirdParty/caelum/Astronomy.cpp 2008-06-12 13:21:31 UTC (rev 593) @@ -1,240 +0,0 @@ -/* -This file is part of Caelum. -See http://www.ogre3d.org/wiki/index.php/Caelum - -Copyright (c) 2008 Caelum team. See Contributors.txt for details. - -Caelum 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 3 of the License, or -(at your option) any later version. - -Caelum 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 Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with Caelum. If not, see <http://www.gnu.org/licenses/>. -*/ - -#include "CaelumPrecompiled.h" -#include "Astronomy.h" - -using Ogre::Degree; -using Ogre::Radian; -using Ogre::Math; - -namespace caelum -{ - const Ogre::Degree Astronomy::normalizeAngle (Ogre::Degree value) - { - value = fmod (value.valueDegrees (), 360); - if (value < Degree (0)) { - value += Degree (360); - } - return value; - } - - void Astronomy::convertRectangularToSpherical ( - LongReal x, LongReal y, LongReal z, - Degree &rasc, Degree &decl, LongReal &dist) - { - dist = Math::Sqrt (x * x + y * y + z * z); - rasc = Math::ATan2 (y, x); - decl = Math::ATan2 (z, Math::Sqrt (x * x + y * y)); - } - - void Astronomy::convertSphericalToRectangular ( - Degree rasc, Degree decl, LongReal dist, - LongReal &x, LongReal &y, LongReal &z) - { - x = dist * Math::Cos (rasc) * Math::Cos (decl); - y = dist * Math::Sin (rasc) * Math::Cos (decl); - z = dist * Math::Sin (decl); - } - - void Astronomy::convertEquatorialToHorizontal ( - LongReal jday, - Degree longitude, Degree latitude, - Degree rasc, Degree decl, - Degree &azimuth, Degree &altitude) - { - LongReal d = jday - 2451543.5; - Degree w = Degree (282.9404 + 4.70935E-5 * d); - Degree M = Degree (356.0470 + 0.9856002585 * d); - // Sun's mean longitude - Degree L = w + M; - // Universal time of day in degrees. - Degree UT = Degree(fmod(d, 1) * 360); - Degree hourAngle = longitude + L + Degree (180) + UT - rasc; - - LongReal x = Math::Cos (hourAngle) * Math::Cos (decl); - LongReal y = Math::Sin (hourAngle) * Math::Cos (decl); - LongReal z = Math::Sin (decl); - - LongReal xhor = x * Math::Sin (latitude) - z * Math::Cos (latitude); - LongReal yhor = y; - LongReal zhor = x * Math::Cos (latitude) + z * Math::Sin (latitude); - - azimuth = Math::ATan2 (yhor, xhor) + Degree (180); - altitude = Math::ATan2 (zhor, Math::Sqrt (xhor * xhor + yhor * yhor)); - } - - void Astronomy::getHorizontalSunPosition ( - LongReal jday, - Ogre::Degree longitude, Ogre::Degree latitude, - Ogre::Degree &azimuth, Ogre::Degree &altitude) - { - // Midnight at the start of 31 december 2000 - // 2451543.5 == Astronomy::getJulianDayFromGregorianDateTime(1999, 12, 31, 0, 0, 0)); - LongReal d = jday - 2451543.5; - - // Sun's Orbital elements: - // argument of perihelion - Degree w = Degree (282.9404 + 4.70935E-5 * d); - // eccentricity (0=circle, 0-1=ellipse, 1=parabola) - LongReal e = 0.016709 - 1.151E-9 * d; - // mean anomaly (0 at perihelion; increases uniformly with time) - Degree M = Degree(356.0470 + 0.9856002585 * d); - // Obliquity of the ecliptic. - Degree oblecl = Degree (23.4393 - 3.563E-7 * d); - - // Eccentric anomaly - Degree E = M + Radian(e * Math::Sin (M) * (1 + e * Math::Cos (M))); - - // Sun's Distance(R) and true longitude(L) - LongReal xv = Math::Cos (E) - e; - LongReal yv = Math::Sin (E) * Math::Sqrt (1 - e * e); - LongReal r = Math::Sqrt (xv * xv + yv * yv); - Degree lon = Math::ATan2 (yv, xv) + w; - - // Ecliptic rectangular. - LongReal xecl = r * Math::Cos(lon); - LongReal yecl = r * Math::Sin(lon); - LongReal zecl = 0; - - // Equatorial rectangular. - LongReal xequ = xecl; - LongReal yequ = yecl * Math::Cos (oblecl) - zecl * Math::Sin (oblecl); - LongReal zequ = yecl * Math::Sin (oblecl) + zecl * Math::Cos (oblecl); - - // Equatorial spherical. - Degree rasc, decl; - Astronomy::convertRectangularToSpherical (xequ, yequ, zequ, rasc, decl, r); - - // Horizontal spherical. - Astronomy::convertEquatorialToHorizontal ( - jday, longitude, latitude, rasc, decl, azimuth, altitude); - } - - int Astronomy::getJulianDayFromGregorianDate( - int year, int month, int day) - { - // Formulas from http://en.wikipedia.org/wiki/Julian_day - // These are all integer divisions, but I'm not sure it works - // correctly for negative values. - int a = (14 - month) / 12; - int y = year + 4800 - a; - int m = month + 12 * a - 3; - return day + (153 * m + 2) / 5 + 365 * y + y / 4 - y / 100 + y / 400 - 32045; - } - - LongReal Astronomy::getJulianDayFromGregorianDateTime( - int year, int month, int day, - int hour, int minute, LongReal second) - { - int fpmode = Astronomy::enterHighPrecissionFloatingPointMode (); - - int jdn = getJulianDayFromGregorianDate (year, month, day); - // These are NOT integer divisions. - LongReal jd = jdn + (hour - 12) / 24.0 + minute / 1440.0 + second / 86400.0; - - Astronomy::restoreFloatingPointMode(fpmode); - return jd; - } - - LongReal Astronomy::getJulianDayFromGregorianDateTime( - int year, int month, int day, - LongReal secondsFromMidnight) - { - int jdn = getJulianDayFromGregorianDate(year, month, day); - LongReal jd = jdn + secondsFromMidnight / 86400.0 - 0.5; - return jd; - } - - void Astronomy::getGregorianDateFromJulianDay( - int julianDay, int &year, int &month, int &day) - { - // From http://en.wikipedia.org/wiki/Julian_day - int J = julianDay; - int j = J + 32044; - int g = j / 146097; - int dg = j % 146097; - int c = (dg / 36524 + 1) * 3 / 4; - int dc = dg - c * 36524; - int b = dc / 1461; - int db = dc % 1461; - int a = (db / 365 + 1) * 3 / 4; - int da = db - a * 365; - int y = g * 400 + c * 100 + b * 4 + a; - int m = (da * 5 + 308) / 153 - 2; - int d = da - (m + 4) * 153 / 5 + 122; - year = y - 4800 + (m + 2) / 12; - month = (m + 2) % 12 + 1; - day = d + 1; - } - - void Astronomy::getGregorianDateTimeFromJulianDay( - LongReal julianDay, int &year, int &month, int &day, - int &hour, int &minute, LongReal &second) - { - // Integer julian days are at noon. - // static_cast<int)(floor( is more precise than Ogre::Math::IFloor. - // Yes, it does matter. - int ijd = static_cast<int>(floor(julianDay + 0.5)); - getGregorianDateFromJulianDay(ijd, year, month, day); - - LongReal s = (julianDay + 0.5 - ijd) * 86400.0; - hour = static_cast<int>(floor(s / 3600)); - s -= hour * 3600; - minute = static_cast<int>(floor(s / 60)); - s -= minute * 60; - second = s; - } - - void Astronomy::getGregorianDateFromJulianDay( - LongReal julianDay, int &year, int &month, int &day) - { - int hour; - int minute; - LongReal second; - getGregorianDateTimeFromJulianDay(julianDay, year, month, day, hour, minute, second); - } - -#if (OGRE_PLATFORM == OGRE_PLATFORM_WIN32) && (OGRE_COMPILER == OGRE_COMPILER_MSVC) - int Astronomy::enterHighPrecissionFloatingPointMode () - { - int oldMode = ::_controlfp (0, 0); - ::_controlfp (_PC_64, _MCW_PC); - return oldMode; - } - - void Astronomy::restoreFloatingPointMode (int oldMode) - { - ::_controlfp (oldMode, _MCW_PC); - } -#else - int Astronomy::enterHighPrecissionFloatingPointMode () - { - // Meaningless - return 0xC0FFEE; - } - - void Astronomy::restoreFloatingPointMode (int oldMode) - { - // Useless check. - assert(oldMode == 0xC0FFEE); - } -#endif -} Added: trunk/python-ogre/ThirdParty/caelum/Astronomy.cpp =================================================================== --- trunk/python-ogre/ThirdParty/caelum/Astronomy.cpp (rev 0) +++ trunk/python-ogre/ThirdParty/caelum/Astronomy.cpp 2008-06-12 13:21:31 UTC (rev 593) @@ -0,0 +1,348 @@ +/* +This file is part of Caelum. +See http://www.ogre3d.org/wiki/index.php/Caelum + +Copyright (c) 2008 Caelum team. See Contributors.txt for details. + +Caelum 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 3 of the License, or +(at your option) any later version. + +Caelum 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 Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with Caelum. If not, see <http://www.gnu.org/licenses/>. +*/ + +#include "CaelumPrecompiled.h" +#include "Astronomy.h" + +namespace caelum +{ + const LongReal Astronomy::PI = 3.1415926535897932384626433832795029L; + + LongReal Astronomy::radToDeg (LongReal value) + { + return value * 180 / PI; + } + + LongReal Astronomy::degToRad (LongReal value) + { + return value * PI / 180; + } + + LongReal Astronomy::sinDeg (LongReal x) { + return std::sin (degToRad (x)); + } + + LongReal Astronomy::cosDeg (LongReal x) { + return std::cos (degToRad (x)); + } + + LongReal Astronomy::atan2Deg (LongReal y, LongReal x) { + return radToDeg(std::atan2 (y, x)); + } + + LongReal Astronomy::normalizeDegrees (LongReal value) + { + value = fmod (value, 360); + if (value < LongReal (0)) { + value += LongReal (360); + } + return value; + } + + void Astronomy::convertEclipticToEquatorialRad ( + LongReal lon, LongReal lat, + LongReal &rasc, LongReal &decl) + { + double ecl = Astronomy::degToRad(23.439281); + + double x = cos(lon) * cos(lat); + double y = cos(ecl) * sin(lon) * cos(lat) - sin(ecl) * sin(lat); + double z = sin(ecl) * sin(lon) * cos(lat) + cos(ecl) * sin(lat); + + double r = sqrt(x * x + y * y); + rasc = atan2(y, x); + decl = atan2(z, r); + } + + void Astronomy::convertRectangularToSpherical ( + LongReal x, LongReal y, LongReal z, + LongReal &rasc, LongReal &decl, LongReal &dist) + { + dist = sqrt (x * x + y * y + z * z); + rasc = atan2Deg (y, x); + decl = atan2Deg (z, sqrt (x * x + y * y)); + } + + void Astronomy::convertSphericalToRectangular ( + LongReal rasc, LongReal decl, LongReal dist, + LongReal &x, LongReal &y, LongReal &z) + { + x = dist * cosDeg (rasc) * cosDeg (decl); + y = dist * sinDeg (rasc) * cosDeg (decl); + z = dist * sinDeg (decl); + } + + void Astronomy::convertEquatorialToHorizontal ( + LongReal jday, + LongReal longitude, LongReal latitude, + LongReal rasc, LongReal decl, + LongReal &azimuth, LongReal &altitude) + { + LongReal d = jday - 2451543.5; + LongReal w = LongReal (282.9404 + 4.70935E-5 * d); + LongReal M = LongReal (356.0470 + 0.9856002585 * d); + // Sun's mean longitude + LongReal L = w + M; + // Universal time of day in degrees. + LongReal UT = LongReal(fmod(d, 1) * 360); + LongReal hourAngle = longitude + L + LongReal (180) + UT - rasc; + + LongReal x = cosDeg (hourAngle) * cosDeg (decl); + LongReal y = sinDeg (hourAngle) * cosDeg (decl); + LongReal z = sinDeg (decl); + + LongReal xhor = x * sinDeg (latitude) - z * cosDeg (latitude); + LongReal yhor = y; + LongReal zhor = x * cosDeg (latitude) + z * sinDeg (latitude); + + azimuth = atan2Deg (yhor, xhor) + LongReal (180); + altitude = atan2Deg (zhor, sqrt (xhor * xhor + yhor * yhor)); + } + + void Astronomy::getHorizontalSunPosition ( + LongReal jday, + LongReal longitude, LongReal latitude, + LongReal &azimuth, LongReal &altitude) + { + // 2451544.5 == Astronomy::getJulianDayFromGregorianDateTime(2000, 1, 1, 0, 0, 0)); + // 2451543.5 == Astronomy::getJulianDayFromGregorianDateTime(1999, 12, 31, 0, 0, 0)); + LongReal d = jday - 2451543.5; + + // Sun's Orbital elements: + // argument of perihelion + LongReal w = LongReal (282.9404 + 4.70935E-5 * d); + // eccentricity (0=circle, 0-1=ellipse, 1=parabola) + LongReal e = 0.016709 - 1.151E-9 * d; + // mean anomaly (0 at perihelion; increases uniformly with time) + LongReal M = LongReal(356.0470 + 0.9856002585 * d); + // Obliquity of the ecliptic. + //LongReal oblecl = LongReal (23.4393 - 3.563E-7 * d); + + // Eccentric anomaly + LongReal E = M + radToDeg(e * sinDeg (M) * (1 + e * cosDeg (M))); + + // Sun's Distance(R) and true longitude(L) + LongReal xv = cosDeg (E) - e; + LongReal yv = sinDeg (E) * sqrt (1 - e * e); + //LongReal r = sqrt (xv * xv + yv * yv); + LongReal lon = atan2Deg (yv, xv) + w; + LongReal lat = 0; + + LongReal lambda = degToRad(lon); + LongReal beta = degToRad(lat); + LongReal rasc, decl; + convertEclipticToEquatorialRad (lambda, beta, rasc, decl); + rasc = radToDeg(rasc); + decl = radToDeg(decl); + + // Horizontal spherical. + Astronomy::convertEquatorialToHorizontal ( + jday, longitude, latitude, rasc, decl, azimuth, altitude); + } + + void Astronomy::getHorizontalSunPosition ( + LongReal jday, + Ogre::Degree longitude, Ogre::Degree latitude, + Ogre::Degree &azimuth, Ogre::Degree &altitude) + { + LongReal az, al; + getHorizontalSunPosition(jday, longitude.valueDegrees (), latitude.valueDegrees (), az, al); + azimuth = Ogre::Degree(az); + altitude = Ogre::Degree(al); + } + + void Astronomy::getEclipticMoonPositionRad ( + LongReal jday, + LongReal &lon, LongReal &lat) + { + // Julian centuries since January 1, 2000 + double T = (jday - 2451545.0L) / 36525.0L; + double lprim = 3.8104L + 8399.7091L * T; + double mprim = 2.3554L + 8328.6911L * T; + double m = 6.2300L + 648.3019L * T; + double d = 5.1985L + 7771.3772L * T; + double f = 1.6280L + 8433.4663L * T; + lon = lprim + + 0.1098L * sin(mprim) + + 0.0222L * sin(2.0L * d - mprim) + + 0.0115L * sin(2.0L * d) + + 0.0037L * sin(2.0L * mprim) + - 0.0032L * sin(m) + - 0.0020L * sin(2.0L * f) + + 0.0010L * sin(2.0L * d - 2.0L * mprim) + + 0.0010L * sin(2.0L * d - m - mprim) + + 0.0009L * sin(2.0L * d + mprim) + + 0.0008L * sin(2.0L * d - m) + + 0.0007L * sin(mprim - m) + - 0.0006L * sin(d) + - 0.0005L * sin(m + mprim); + lat = + + 0.0895L * sin(f) + + 0.0049L * sin(mprim + f) + + 0.0048L * sin(mprim - f) + + 0.0030L * sin(2.0L * d - f) + + 0.0010L * sin(2.0L * d + f - mprim) + + 0.0008 * sin(2.0L * d - f - mprim) + + 0.0006L * sin(2.0L * d + f); + } + + void Astronomy::getHorizontalMoonPosition ( + LongReal jday, + LongReal longitude, LongReal latitude, + LongReal &azimuth, LongReal &altitude) + { + // Ecliptic spherical + LongReal lonecl, latecl; + Astronomy::getEclipticMoonPositionRad (jday, lonecl, latecl); + + // Equatorial spherical + LongReal rasc, decl; + Astronomy::convertEclipticToEquatorialRad (lonecl, latecl, rasc, decl); + + // Radians to degrees (all angles are in radians up to this point) + rasc = radToDeg(rasc); + decl = radToDeg(decl); + + // Equatorial to horizontal + Astronomy::convertEquatorialToHorizontal ( + jday, longitude, latitude, rasc, decl, azimuth, altitude); + } + + void Astronomy::getHorizontalMoonPosition ( + LongReal jday, + Ogre::Degree longitude, Ogre::Degree latitude, + Ogre::Degree &azimuth, Ogre::Degree &altitude) + { + LongReal az, al; + getHorizontalMoonPosition(jday, longitude.valueDegrees (), latitude.valueDegrees (), az, al); + azimuth = Ogre::Degree(az); + altitude = Ogre::Degree(al); + } + + int Astronomy::getJulianDayFromGregorianDate( + int year, int month, int day) + { + // Formulas from http://en.wikipedia.org/wiki/Julian_day + // These are all integer divisions, but I'm not sure it works + // correctly for negative values. + int a = (14 - month) / 12; + int y = year + 4800 - a; + int m = month + 12 * a - 3; + return day + (153 * m + 2) / 5 + 365 * y + y / 4 - y / 100 + y / 400 - 32045; + } + + LongReal Astronomy::getJulianDayFromGregorianDateTime( + int year, int month, int day, + int hour, int minute, LongReal second) + { + int fpmode = Astronomy::enterHighPrecissionFloatingPointMode (); + + int jdn = getJulianDayFromGregorianDate (year, month, day); + // These are NOT integer divisions. + LongReal jd = jdn + (hour - 12) / 24.0 + minute / 1440.0 + second / 86400.0; + + Astronomy::restoreFloatingPointMode(fpmode); + return jd; + } + + LongReal Astronomy::getJulianDayFromGregorianDateTime( + int year, int month, int day, + LongReal secondsFromMidnight) + { + int jdn = getJulianDayFromGregorianDate(year, month, day); + LongReal jd = jdn + secondsFromMidnight / 86400.0 - 0.5; + return jd; + } + + void Astronomy::getGregorianDateFromJulianDay( + int julianDay, int &year, int &month, int &day) + { + // From http://en.wikipedia.org/wiki/Julian_day + int J = julianDay; + int j = J + 32044; + int g = j / 146097; + int dg = j % 146097; + int c = (dg / 36524 + 1) * 3 / 4; + int dc = dg - c * 36524; + int b = dc / 1461; + int db = dc % 1461; + int a = (db / 365 + 1) * 3 / 4; + int da = db - a * 365; + int y = g * 400 + c * 100 + b * 4 + a; + int m = (da * 5 + 308) / 153 - 2; + int d = da - (m + 4) * 153 / 5 + 122; + year = y - 4800 + (m + 2) / 12; + month = (m + 2) % 12 + 1; + day = d + 1; + } + + void Astronomy::getGregorianDateTimeFromJulianDay( + LongReal julianDay, int &year, int &month, int &day, + int &hour, int &minute, LongReal &second) + { + // Integer julian days are at noon. + // static_cast<int)(floor( is more precise than Ogre::Math::IFloor. + // Yes, it does matter. + int ijd = static_cast<int>(floor(julianDay + 0.5)); + getGregorianDateFromJulianDay(ijd, year, month, day); + + LongReal s = (julianDay + 0.5 - ijd) * 86400.0; + hour = static_cast<int>(floor(s / 3600)); + s -= hour * 3600; + minute = static_cast<int>(floor(s / 60)); + s -= minute * 60; + second = s; + } + + void Astronomy::getGregorianDateFromJulianDay( + LongReal julianDay, int &year, int &month, int &day) + { + int hour; + int minute; + LongReal second; + getGregorianDateTimeFromJulianDay(julianDay, year, month, day, hour, minute, second); + } + +#if (OGRE_PLATFORM == OGRE_PLATFORM_WIN32) && (OGRE_COMPILER == OGRE_COMPILER_MSVC) + int Astronomy::enterHighPrecissionFloatingPointMode () + { + int oldMode = ::_controlfp (0, 0); + ::_controlfp (_PC_64, _MCW_PC); + return oldMode; + } + + void Astronomy::restoreFloatingPointMode (int oldMode) + { + ::_controlfp (oldMode, _MCW_PC); + } +#else + int Astronomy::enterHighPrecissionFloatingPointMode () + { + // Meaningless + return 0xC0FFEE; + } + + void Astronomy::restoreFloatingPointMode (int oldMode) + { + // Useless check. + assert(oldMode == 0xC0FFEE); + } +#endif +} Deleted: trunk/python-ogre/ThirdParty/caelum/Astronomy.h =================================================================== --- trunk/python-ogre/ThirdParty/caelum/Astronomy.h 2008-05-23 01:30:05 UTC (rev 592) +++ trunk/python-ogre/ThirdParty/caelum/Astronomy.h 2008-06-12 13:21:31 UTC (rev 593) @@ -1,154 +0,0 @@ -/* -This file is part of Caelum. -See http://www.ogre3d.org/wiki/index.php/Caelum - -Copyright (c) 2008 Caelum team. See Contributors.txt for details. - -Caelum 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 3 of the License, or -(at your option) any later version. - -Caelum 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 Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with Caelum. If not, see <http://www.gnu.org/licenses/>. -*/ - -#ifndef ASTRONOMY_H -#define ASTRONOMY_H - -#include "CaelumPrerequisites.h" - -namespace caelum -{ - /** Static class with astronomy routines. - * This class contains various astronomical routines useful in Caelum. - * - * Most of the formulas are from http://stjarnhimlen.se/comp/ppcomp.html - * That site contains much more than was implemented here; it has code - * for determining the positions of all the planets. Only the sun and - * moon are actually useful for caelum. - * - * The formulas are isolated here in pure procedural code for easier - * testing (Tests are done as assert in the demo). - * - * Precision is vital here, and this class should be converted to use - * caelum::LongReal instead of Ogre::Real and Ogre::Degree. - */ - class DllExport Astronomy - { - private: - Astronomy() {} - - public: - /** Normalize an angle to the 0, 360 range. - * @param x The angle to normalize - */ - static const Ogre::Degree normalizeAngle(Ogre::Degree x); - - static void convertRectangularToSpherical ( - LongReal x, LongReal y, LongReal z, - Ogre::Degree &rasc, Ogre::Degree &decl, LongReal &dist); - - static void convertSphericalToRectangular ( - Ogre::Degree rasc, Ogre::Degree decl, LongReal dist, - LongReal &x, LongReal &y, LongReal &z); - - /** Convert from equatorial to horizontal coordinates. - * This function converts from angles relative to the earth's equator - * to angle relative to the horizon at a given point. - * @param jday Astronomical time as julian day. - * @param longitude Observer's longitude in degrees east. - * @param latitude Observer's latitude in degrees north. - * @param rasc Object's right ascension. - * @param decl Object's declination. - * @param azimuth Object's azimuth (clockwise degrees from true north). - * @param altitude Object's altitude (degrees above the horizon). - */ - static void convertEquatorialToHorizontal ( - LongReal jday, - Ogre::Degree longitude, Ogre::Degree latitude, - Ogre::Degree rasc, Ogre::Degree decl, - Ogre::Degree &azimuth, Ogre::Degree &altitude); - - /** Get the sun's position in the sky in, relative to the horizon. - * @param jday Astronomical time as julian day. - * @param longitude Observer longitude - * @param latitude Observer latitude - * @param azimuth Astronomical azimuth, measured clockwise from North = 0. - * @param altitude Astronomical altitude, elevation above the horizon. - */ - static void getHorizontalSunPosition ( - LongReal jday, - Ogre::Degree longitude, Ogre::Degree latitude, - Ogre::Degree &azimuth, Ogre::Degree &altitude); - - /** Get astronomical julian day from normal gregorian calendar. - * From wikipedia: the integer number of days that have elapsed - * since the initial epoch defined as - * noon Universal Time (UT) Monday, January 1, 4713 BC - * @note this is the time at noon, not midnight. - */ - static int getJulianDayFromGregorianDate( - int year, int month, int day); - - /** Get astronomical julian day from normal gregorian calendar. - * Calculate julian day from a day in the normal gregorian calendar. - * Time should be given as UTC. - * @see http://en.wikipedia.org/wiki/Julian_day - */ - static LongReal getJulianDayFromGregorianDateTime( - int year, int month, int day, - int hour, int minute, LongReal second); - - /** Get astronomical julian day from normal gregorian calendar. - * @see above (I don't know the proper doxygen syntax). - */ - static LongReal getJulianDayFromGregorianDateTime( - int year, int month, int day, - LongReal secondsFromMidnight); - - /// Get gregorian date from integer julian day. - static void getGregorianDateFromJulianDay( - int julianDay, int &year, int &month, int &day); - - /// Get gregorian date time from floating point julian day. - static void getGregorianDateTimeFromJulianDay( - LongReal julianDay, int &year, int &month, int &day, - int &hour, int &minute, LongReal &second); - - /// Get gregorian date from floating point julian day. - static void getGregorianDateFromJulianDay( - LongReal julianDay, int &year, int &month, int &day); - - /** Enter high-precission floating-point mode. - * - * By default Direct3D decreases the precission of ALL floating - * point calculations, enough to stop Caelum's astronomy routines - * from working correctly. - * - * To trigger this behaviour in a standard ogre demo select the - * Direct3D render system and set "Floating-point mode" to - * "Fastest". Otherwise it's not a problem. - * - * It can be fixed by changing the precission only inside caelum's - * astronomy routines using the _controlfp function. This only works - * for MSVC on WIN32; This is a no-op on other compilers. - * - * @note: Must be paired with restoreFloatingPointMode. - * @return Value to pass to restoreFloatingModeMode. - */ - static int enterHighPrecissionFloatingPointMode (); - - /** Restore old floating point precission. - * @see enterHighPrecissionFloatingPointMode. - */ - static void restoreFloatingPointMode (int oldMode); - }; -} - -#endif // SOLARSYSTEMMODEL_H Added: trunk/python-ogre/ThirdParty/caelum/Astronomy.h =================================================================== --- trunk/python-ogre/ThirdParty/caelum/Astronomy.h (rev 0) +++ trunk/python-ogre/ThirdParty/caelum/Astronomy.h 2008-06-12 13:21:31 UTC (rev 593) @@ -0,0 +1,201 @@ +/* +This file is part of Caelum. +See http://www.ogre3d.org/wiki/index.php/Caelum + +Copyright (c) 2008 Caelum team. See Contributors.txt for details. + +Caelum 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 3 of the License, or +(at your option) any later version. + +Caelum 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 Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with Caelum. If not, see <http://www.gnu.org/licenses/>. +*/ + +#ifndef ASTRONOMY_H +#define ASTRONOMY_H + +#include "CaelumPrerequisites.h" + +namespace caelum +{ + /** Static class with astronomy routines. + * This class contains various astronomical routines useful in Caelum. + * + * Most of the formulas are from http://stjarnhimlen.se/comp/ppcomp.html + * That site contains much more than was implemented here; it has code + * for determining the positions of all the planets. Only the sun and + * moon are actually useful for caelum. + * + * The formulas are isolated here in pure procedural code for easier + * testing (Tests are done as assertions in the demo). + * + * Precision is vital here, so this class uses caelum::LongReal(double) + * instead of Ogre::Real(float) for precission. All angles are in degrees + * unless otherwise mentioned. Ogre::Degree and Ogre::Radian use + * Ogre::Real and should be avoided here. + */ + class CAELUM_EXPORT Astronomy + { + private: + Astronomy() {} + + static const LongReal PI; + + /** Normalize an angle to the 0, 360 range. + * @param x The angle to normalize + */ + static LongReal normalizeDegrees (LongReal x); + + /// Convert radians to degrees. + static LongReal radToDeg (LongReal x); + + /// Convert degrees to radians. + static LongReal degToRad (LongReal x); + + static LongReal sinDeg (LongReal x); + static LongReal cosDeg (LongReal x); + static LongReal atan2Deg (LongReal y, LongReal x); + + public: + /** Convert from ecliptic to ecuatorial spherical coordinates, in radians. + * @param lon Ecliptic longitude + * @param lat Ecliptic latitude + * @param rasc Right ascension + * @param decl Declination + * @warning: This function works in radians. + */ + static void convertEclipticToEquatorialRad ( + LongReal lon, LongReal lat, + LongReal& rasc, LongReal& decl); + + static void convertRectangularToSpherical ( + LongReal x, LongReal y, LongReal z, + LongReal &rasc, LongReal &decl, LongReal &dist); + + static void convertSphericalToRectangular ( + LongReal rasc, LongReal decl, LongReal dist, + LongReal &x, LongReal &y, LongReal &z); + + /** Convert from equatorial to horizontal coordinates. + * This function converts from angles relative to the earth's equator + * to angle relative to the horizon at a given point. + * @param jday Astronomical time as julian day. + * @param longitude Observer's longitude in degrees east. + * @param latitude Observer's latitude in degrees north. + * @param rasc Object's right ascension. + * @param decl Object's declination. + * @param azimuth Object's azimuth (clockwise degrees from true north). + * @param altitude Object's altitude (degrees above the horizon). + */ + static void convertEquatorialToHorizontal ( + LongReal jday, + LongReal longitude, LongReal latitude, + LongReal rasc, LongReal decl, + LongReal &azimuth, LongReal &altitude); + + /** Get the sun's position in the sky in, relative to the horizon. + * @param jday Astronomical time as julian day. + * @param longitude Observer longitude + * @param latitude Observer latitude + * @param azimuth Astronomical azimuth, measured clockwise from North = 0. + * @param altitude Astronomical altitude, elevation above the horizon. + */ + static void getHorizontalSunPosition ( + LongReal jday, + LongReal longitude, LongReal latitude, + LongReal &azimuth, LongReal &altitude); + + static void getHorizontalSunPosition ( + LongReal jday, + Ogre::Degree longitude, Ogre::Degree latitude, + Ogre::Degree &azimuth, Ogre::Degree &altitude); + + /// Gets the moon position at a specific time in ecliptic coordinates + /// @param lon: Ecliptic longitude, in radians. + /// @param lat: Ecliptic latitude, in radians. + static void getEclipticMoonPositionRad ( + LongReal jday, + LongReal &lon, + LongReal &lat); + + static void getHorizontalMoonPosition ( + LongReal jday, + LongReal longitude, LongReal latitude, + LongReal &azimuth, LongReal &altitude); + static void getHorizontalMoonPosition ( + LongReal jday, + Ogre::Degree longitude, Ogre::Degree latitude, + Ogre::Degree &azimuth, Ogre::Degree &altitude); + + /** Get astronomical julian day from normal gregorian calendar. + * From wikipedia: the integer number of days that have elapsed + * since the initial epoch defined as + * noon Universal Time (UT) Monday, January 1, 4713 BC + * @note this is the time at noon, not midnight. + */ + static int getJulianDayFromGregorianDate ( + int year, int month, int day); + + /** Get astronomical julian day from normal gregorian calendar. + * Calculate julian day from a day in the normal gregorian calendar. + * Time should be given as UTC. + * @see http://en.wikipedia.org/wiki/Julian_day + */ + static LongReal getJulianDayFromGregorianDateTime ( + int year, int month, int day, + int hour, int minute, LongReal second); + + /** Get astronomical julian day from normal gregorian calendar. + * @see above (I don't know the proper doxygen syntax). + */ + static LongReal getJulianDayFromGregorianDateTime ( + int year, int month, int day, + LongReal secondsFromMidnight); + + /// Get gregorian date from integer julian day. + static void getGregorianDateFromJulianDay ( + int julianDay, int &year, int &month, int &day); + + /// Get gregorian date time from floating point julian day. + static void getGregorianDateTimeFromJulianDay ( + LongReal julianDay, int &year, int &month, int &day, + int &hour, int &minute, LongReal &second); + + /// Get gregorian date from floating point julian day. + static void getGregorianDateFromJulianDay ( + LongReal julianDay, int &year, int &month, int &day); + + /** Enter high-precission floating-point mode. + * + * By default Direct3D decreases the precission of ALL floating + * point calculations, enough to stop Caelum's astronomy routines + * from working correctly. + * + * To trigger this behaviour in a standard ogre demo select the + * Direct3D render system and set "Floating-point mode" to + * "Fastest". Otherwise it's not a problem. + * + * It can be fixed by changing the precission only inside caelum's + * astronomy routines using the _controlfp function. This only works + * for MSVC on WIN32; This is a no-op on other compilers. + * + * @note: Must be paired with restoreFloatingPointMode. + * @return Value to pass to restoreFloatingModeMode. + */ + static int enterHighPrecissionFloatingPointMode (); + + /** Restore old floating point precission. + * @see enterHighPrecissionFloatingPointMode. + */ + static void restoreFloatingPointMode (int oldMode); + }; +} + +#endif // SOLARSYSTEMMODEL_H Deleted: trunk/python-ogre/ThirdParty/caelum/Caelum.h =================================================================== --- trunk/python-ogre/ThirdParty/caelum/Caelum.h 2008-05-23 01:30:05 UTC (rev 592) +++ trunk/python-ogre/ThirdParty/caelum/Caelum.h 2008-06-12 13:21:31 UTC (rev 593) @@ -1,39 +0,0 @@ -/* -This file is part of Caelum. -See http://www.ogre3d.org/wiki/index.php/Caelum - -Copyright (c) 2006-2008 Caelum team. See Contributors.txt for details. - -Caelum 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 3 of the License, or -(at your option) any later version. - -Caelum 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 Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with Caelum. If not, see <http://www.gnu.org/licenses/>. -*/ - -#ifndef CAELUM_H -#define CAELUM_H - -#include "CaelumPrerequisites.h" - -#include "CaelumExceptions.h" -#include "CaelumListener.h" -#include "CaelumSystem.h" -#include "CameraBoundElement.h" -#include "GeometryFactory.h" -#include "SkyColourModel.h" -#include "SkyDome.h" -#include "Sun.h" -#include "LayeredClouds.h" -#include "UniversalClock.h" -#include "SolarSystemModel.h" -#include "Astronomy.h" - -#endif //CAELUM_H Added: trunk/python-ogre/ThirdParty/caelum/Caelum.h =================================================================== --- trunk/python-ogre/ThirdParty/caelum/Caelum.h (rev 0) +++ trunk/python-ogre/ThirdParty/caelum/Caelum.h 2008-06-12 13:21:31 UTC (rev 593) @@ -0,0 +1,38 @@ +/* +This file is part of Caelum. +See http://www.ogre3d.org/wiki/index.php/Caelum + +Copyright (c) 2006-2008 Caelum team. See Contributors.txt for details. + +Caelum 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 3 of the License, or +(at your option) any later version. + +Caelum 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 Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with Caelum. If not, see <http://www.gnu.org/licenses/>. +*/ + +#ifndef CAELUM_H +#define CAELUM_H + +#include "CaelumPrerequisites.h" + +#include "CaelumExceptions.h" +#include "CaelumSystem.h" +#include "CameraBoundElement.h" +#include "GeometryFactory.h" +#include "SkyColourModel.h" +#include "SkyDome.h" +#include "Sun.h" +#include "LayeredClouds.h" +#include "UniversalClock.h" +#include "SolarSystemModel.h" +#include "Astronomy.h" + +#endif //CAELUM_H Deleted: trunk/python-ogre/ThirdParty/caelum/CaelumExceptions.h =================================================================== --- trunk/python-ogre/ThirdParty/caelum/CaelumExceptions.h 2008-05-23 01:30:05 UTC (rev 592) +++ trunk/python-ogre/ThirdParty/caelum/CaelumExceptions.h 2008-06-12 13:21:31 UTC (rev 593) @@ -1,41 +0,0 @@ -/* -This file is part of Caelum. -See http://www.ogre3d.org/wiki/index.php/Caelum - -Copyright (c) 2006-2007 Caelum team. See Contributors.txt for details. - -Caelum 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 3 of the License, or -(at your option) any later version. - -Caelum 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 Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with Caelum. If not, see <http://www.gnu.org/licenses/>. -*/ - -#ifndef CAELUMEXCEPTIONS_H -#define CAELUMEXCEPTIONS_H - -#include "CaelumPrerequisites.h" - -namespace caelum { - -/** Exception class for unsupported features. - * @author Jesús Alonso Abad. - */ -class DllExport UnsupportedException : public Ogre::Exception { - public: - /** Constructor. - */ - UnsupportedException (int number, const Ogre::String &description, const Ogre::String &source, const char *file, long line) - : Ogre::Exception (number, description, source, "UnsupportedException", file, line) { } -}; - -} // namespace caelum - -#endif // CAELUMEXCEPTIONS_H Added: trunk/python-ogre/ThirdParty/caelum/CaelumExceptions.h =================================================================== --- trunk/python-ogre/ThirdParty/caelum/CaelumExceptions.h (rev 0) +++ trunk/python-ogre/ThirdParty/caelum/CaelumExceptions.h 2008-06-12 13:21:31 UTC (rev 593) @@ -0,0 +1,41 @@ +/* +This file is part of Caelum. +See http://www.ogre3d.org/wiki/index.php/Caelum + +Copyright (c) 2006-2007 Caelum team. See Contributors.txt for details. + +Caelum 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 3 of the License, or +(at your option) any later version. + +Caelum 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 Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with Caelum. If not, see <http://www.gnu.org/licenses/>. +*/ + +#ifndef CAELUMEXCEPTIONS_H +#define CAELUMEXCEPTIONS_H + +#include "CaelumPrerequisites.h" + +namespace caelum { + +/** Exception class for unsupported features. + * @author Jesús Alonso Abad. + */ +class CAELUM_EXPORT UnsupportedException : public Ogre::Exception { + public: + /** Constructor. + */ + UnsupportedException (int number, const Ogre::String &description, const Ogre::String &sou... [truncated message content] |
From: <and...@us...> - 2008-05-23 01:30:07
|
Revision: 592 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=592&view=rev Author: andy_miller Date: 2008-05-22 18:30:05 -0700 (Thu, 22 May 2008) Log Message: ----------- STABLE flag added to help with variour builds. Fixes for Nvidia Physx version Clean up directories Modified Paths: -------------- trunk/python-ogre/PythonOgreConfig_nt.py trunk/python-ogre/code_generators/cegui/generate_code.py trunk/python-ogre/code_generators/physx/generate_code.py trunk/python-ogre/code_generators/physx/hand_made_wrappers.py trunk/python-ogre/code_generators/physx/python_physx.h trunk/python-ogre/environment.py Removed Paths: ------------- trunk/python-ogre/packages_2.4/ Modified: trunk/python-ogre/PythonOgreConfig_nt.py =================================================================== --- trunk/python-ogre/PythonOgreConfig_nt.py 2008-05-22 04:50:44 UTC (rev 591) +++ trunk/python-ogre/PythonOgreConfig_nt.py 2008-05-23 01:30:05 UTC (rev 592) @@ -13,16 +13,17 @@ ## path to the root of your boost dir, should have 'libs', 'boost' subdirectories -PATH_Boost = os.path.join(BASE_DIR, 'boost_1_34_1') +# # # # # # PATH_Boost = os.path.join(BASE_DIR, 'boost_1_34_1') # PATH_Boost = os.path.join(BASE_DIR, 'boost_1_35_0') PATH_Boost = os.path.join(BASE_DIR, 'boost-trunk') ## Path to your boost_pythonxxxx lib file -PATH_LIB_Boost = os.path.join(BASE_DIR, PATH_Boost,'bin.v2/libs/python/build/msvc-8.0/release/threading-multi') -##PATH_LIB_Boost = os.path.join(BASE_DIR, 'boost/bin.v2/libs/python2.5/build/msvc-9.0express/release/threading-multi') +# PATH_LIB_Boost = os.path.join(BASE_DIR, PATH_Boost,'bin.v2/libs/python/build/msvc-8.0/release/threading-multi') +# # # # # # # PATH_LIB_Boost = os.path.join(PATH_Boost, 'bin.v2/libs/python/build/msvc/release/threading-multi') +PATH_LIB_Boost = os.path.join(PATH_Boost, 'bin.v2/libs/python/build/msvc-9.0express/release/threading-multi') ## and the name of the boost python library LIB_Boost = r'boost_python-vc90-mt-1_35' -LIB_Boost = r'boost_python-vc80-mt-1_34_1' +# # LIB_Boost = r'boost_python-vc80-mt-1_34_1' # LIB_Boost = r'boost_python-vc-mt-1_35' # in Linux we need to code in the Relative path for the library @@ -35,9 +36,11 @@ ## Parent directories of the libraries PATH_THIRDPARTY = os.path.join(module_dir, 'ThirdParty' ) -PATH_Ogre = os.path.join(BASE_DIR, 'ogrenew') +PATH_Ogre = os.path.join(BASE_DIR, 'ogre') PATH_OgreAddons = os.path.join(BASE_DIR, 'OgreAddons') PATH_CEGUI = os.path.join(BASE_DIR, 'CEGUI-0.5.0') +PATH_CEGUI = os.path.join(BASE_DIR, 'CEGUI-0.6.0') + PATH_OIS = os.path.join(BASE_DIR, 'ois' ) ##'ois-1.0RC1') PATH_Newton = os.path.join(BASE_DIR, 'newtonsdk','sdk') PATH_FMOD = os.path.join(BASE_DIR, 'fmod') @@ -69,7 +72,7 @@ PATH_ogrevideoffmpeg = os.path.join(PATH_THIRDPARTY,'ffmpeg') PATH_Bullet= os.path.join(BASE_DIR, 'bullet-2.66') -PATH_PhysX= "c:/program files/AGEIA Technologies/SDK/v2.7.3/SDKs" +PATH_PhysX= "c:/program files/NVIDIA Corporation/NVIDIA Physx SDK/v2.8.1/SDKs" PATH_Theora= os.path.join(PATH_OgreAddons,'videoplugin','TheoraVideo') PATH_ffmpeg= os.path.join(PATH_THIRDPARTY,'extra') PATH_navi = os.path.join(BASE_DIR, 'navi', 'navi') @@ -78,8 +81,8 @@ # it's time for the SDK version if SDK: - PATH_CEGUI = os.path.join(BASE_DIR, 'Ogrenew') - PATH_OIS = os.path.join(BASE_DIR, 'Ogrenew') + PATH_CEGUI = os.path.join(BASE_DIR, 'ogre') + PATH_OIS = os.path.join(BASE_DIR, 'ogre') ### ### these paths assume you've left all the directory structure as standard @@ -175,7 +178,7 @@ ,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') +# # ,os.path.join(PATH_PhysX, 'NxExtensions','include') ] PATH_INCLUDE_opensteer = os.path.join(PATH_opensteer, 'include') PATH_INCLUDE_opensteer_opensteer = os.path.join(PATH_opensteer, 'include', 'OpenSteer') Modified: trunk/python-ogre/code_generators/cegui/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/cegui/generate_code.py 2008-05-22 04:50:44 UTC (rev 591) +++ trunk/python-ogre/code_generators/cegui/generate_code.py 2008-05-23 01:30:05 UTC (rev 592) @@ -38,9 +38,9 @@ CEGUI_ns = global_ns.namespace( 'CEGUI' ) CEGUI_ns.include() - ## not available at link time.. - CEGUI_ns.free_function("lbi_greater").exclude() - CEGUI_ns.free_function("lbi_less").exclude() + ## not available at link time.. seems fixed in CEGUI 0.6.0 +# CEGUI_ns.free_function("lbi_greater").exclude() +# CEGUI_ns.free_function("lbi_less").exclude() ## Dumb fix to remove all Properties classes - unfortunately the properties in these classes are indicated as public ## however within their 'parent' class they are defined as private.. @@ -97,17 +97,17 @@ # fm.member_function( name='createFont', function=is_my_case ).exclude() # ## couple of functions that fail when compiling - - if environment.ogre.version == "1.4": - CEGUI_ns.class_( "RawDataContainer" ).member_functions( 'getDataPtr' ).exclude() - CEGUI_ns.class_( "ItemListBase" ).member_functions( 'getSortCallback' ).exclude() - else: - CEGUI_ns.class_("DataContainer<unsigned char>").exclude() - CEGUI_ns.class_("Menubar").exclude() - CEGUI_ns.class_("MenuBase").exclude() - CEGUI_ns.class_("PopupMenu").exclude() - CEGUI_ns.class_("Referenced").exclude() - CEGUI_ns.class_("System").member_functions("getXMLParser").exclude() + ## Not sure why this is related to Ogre 1.4 and not the CEGUI version... +# if environment.ogre.version == "1.4": +# CEGUI_ns.class_( "RawDataContainer" ).member_functions( 'getDataPtr' ).exclude() +# CEGUI_ns.class_( "ItemListBase" ).member_functions( 'getSortCallback' ).exclude() +# else: +# CEGUI_ns.class_("DataContainer<unsigned char>").exclude() +# CEGUI_ns.class_("Menubar").exclude() +# CEGUI_ns.class_("MenuBase").exclude() +# CEGUI_ns.class_("PopupMenu").exclude() +# CEGUI_ns.class_("Referenced").exclude() +# CEGUI_ns.class_("System").member_functions("getXMLParser").exclude() ## now have functions in String that return uint arrays a need to be wrapped sc = CEGUI_ns.class_( "String" ) Modified: trunk/python-ogre/code_generators/physx/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/physx/generate_code.py 2008-05-22 04:50:44 UTC (rev 591) +++ trunk/python-ogre/code_generators/physx/generate_code.py 2008-05-23 01:30:05 UTC (rev 592) @@ -65,10 +65,10 @@ # ,'::NxCloth::overlapAABBTriangles' # ugly argument that boost doesn't like.. To Fix in hand wrappers # these have const refs to classes with protected desctuctors - a bad combination for boost ,'::NxCookingInterface::NxCreatePMap' - ,'::NxForceField::releaseShape' +# # ,'::NxForceField::releaseShape' ,'::NxUtilLib::NxGetBoxEdgesAxes' # ,'::NxHeightFieldShape::overlapAABBTrianglesDeprecated' - ,'::NxImplicitScreenMesh::getProjectionMatrix' # returns a const int pointer +# # ,'::NxImplicitScreenMesh::getProjectionMatrix' # returns a const int pointer ,'::NxVec3::get' # not in source ,'::NxBitField::rangeToDenseMask' @@ -334,7 +334,7 @@ , environment.physx.cache_file ) if os.name == 'nt': - defined_symbols = ['NXPHYSICS_EXPORTS', 'WIN32', 'PHYSX_EXPORTS'] + defined_symbols = ['NXPHYSICS_EXPORTS', 'WIN32', 'PHYSX_EXPORTS'] #'WIN32', else: defined_symbols = ['LINUX'] defined_symbols.append( 'VERSION_' + environment.physx.version ) @@ -348,7 +348,7 @@ , include_paths=environment.physx.include_dirs , define_symbols=defined_symbols , indexing_suite_version=2 - , cflags=environment.ogre.cflags + , cflags=environment.physx.cflags ) # NOTE THE CHANGE HERE mb.constructors().allow_implicit_conversion = False Modified: trunk/python-ogre/code_generators/physx/hand_made_wrappers.py =================================================================== --- trunk/python-ogre/code_generators/physx/hand_made_wrappers.py 2008-05-22 04:50:44 UTC (rev 591) +++ trunk/python-ogre/code_generators/physx/hand_made_wrappers.py 2008-05-23 01:30:05 UTC (rev 592) @@ -180,7 +180,7 @@ rt.add_wrapper_code(WRAPPER_WRAPPER_DEF_NxForceField) # rt = mb.class_( 'NxHeightFieldShape' ) # rt.add_wrapper_code(WRAPPER_WRAPPER_DEF_NxHeightFieldShape) - rt = mb.class_( 'NxImplicitScreenMesh' ) - rt.add_wrapper_code(WRAPPER_WRAPPER_DEF_NxImplicitScreenMesh) +# rt = mb.class_( 'NxImplicitScreenMesh' ) +# rt.add_wrapper_code(WRAPPER_WRAPPER_DEF_NxImplicitScreenMesh) \ No newline at end of file Modified: trunk/python-ogre/code_generators/physx/python_physx.h =================================================================== --- trunk/python-ogre/code_generators/physx/python_physx.h 2008-05-22 04:50:44 UTC (rev 591) +++ trunk/python-ogre/code_generators/physx/python_physx.h 2008-05-23 01:30:05 UTC (rev 592) @@ -3,7 +3,7 @@ #include "NxCooking.h" #include "NxFoundation.h" #include "NxCharacter.h" -#include "NxExtensions.h" +// #include "NxExtensions.h" #include "PhysXLoader.h" #include "NxStream.h" // not included by default Modified: trunk/python-ogre/environment.py =================================================================== --- trunk/python-ogre/environment.py 2008-05-22 04:50:44 UTC (rev 591) +++ trunk/python-ogre/environment.py 2008-05-23 01:30:05 UTC (rev 592) @@ -17,7 +17,9 @@ _LOGGING_ON = False _PreCompiled = True +_STABLE = False # set to true if using specific versions of CVS and SVN checkouts.. + ## ## set this to True if you compiled Ogre with Threads enabled ## @@ -45,7 +47,7 @@ PythonOgreMajorVersion = "1" PythonOgreMinorVersion = "2" -PythonOgrePatchVersion = "rc1" +PythonOgrePatchVersion = "rc2" ## @@ -179,7 +181,12 @@ pythonModule = False active = True base = 'gccxml' - source = [ + if _STABLE: + source = [ + [cvs, " -d :pserver:an...@ww...:/cvsroot/GCC_XML co -D 22052008 "+base, os.getcwd()] + ] + else: + source = [ [cvs, " -d :pserver:an...@ww...:/cvsroot/GCC_XML co "+base, os.getcwd()] ] if isLinux() or isMac(): @@ -246,28 +253,28 @@ pythonModule = False active = True base = 'pygccxml' - if isLinux() or isMac() : + if _STABLE: source = [ - [svn, " co -r 1234 http://pygccxml.svn.sourceforge.net/svnroot/pygccxml "+base, os.getcwd()] + [svn, " co -r 1300 http://pygccxml.svn.sourceforge.net/svnroot/pygccxml "+base, os.getcwd()] ] + else: source = [ [svn, " co http://pygccxml.svn.sourceforge.net/svnroot/pygccxml "+base, os.getcwd()] - ] - + ] + if isLinux() or isMac() : buildCmds = [ [0,"python setup.py install --prefix="+ PREFIX , os.path.join (os.getcwd(), base, "pygccxml_dev") ], [0,"python setup.py install --prefix=" + PREFIX , os.path.join (os.getcwd(), base, "pyplusplus_dev") ] ] if isWindows(): - source = [ - [svn, " co http://pygccxml.svn.sourceforge.net/svnroot/pygccxml "+base, os.getcwd()] - ] buildCmds = [ [0,"python setup.py install " , os.path.join (os.getcwd(), base, "pygccxml_dev") ], [0,"python setup.py install " , os.path.join (os.getcwd(), base, "pyplusplus_dev") ] ] class cg: + ## we don't need this for Windows as it's part of the Ogre dependencies package + pythonModule = False active = True if isLinux(): @@ -395,13 +402,14 @@ version = "3.4" pythonModule = False ModuleName = "" - base = 'boost_1_35_0' #this doesn't work yet AJM 17/04/08 - base = 'boost_1_34_1' + if _STABLE: + base = 'boost_1_34_1' + else: + # this doesn't work yet AJM 17/04/08 (in an automated fashion) + # as boost/python/detail/preprocessor.hpp and possibly boost/python/docstring_options.hpp + # need to have "#define BOOST_PYTHON_NO_PY_SIGNATURES" added to them + base = 'boost_1_35_0' - myLibraryPaths = [ 'boost/bin.v2/libs/python2.5/build/msvc-8.0/release/threading-multi' ] - myLibraries = [ 'boost_python-vc80-mt-1_35'] - - if isLinux() or isMac(): bjambase = 'boost-jam-3.1.16' if isMac(): @@ -413,7 +421,7 @@ source = [ [wget,'http://downloads.sourceforge.net/boost/boost-jam-3.1.16.tgz', downloadPath], - [wget,'http://downloads.sourceforge.net/boost/boost_1_34_1.tar.gz',downloadPath] + [wget,'http://downloads.sourceforge.net/boost/'+base+'.tar.gz',downloadPath] ] buildCmds = [ ## first handle bjam @@ -426,8 +434,8 @@ [0, tar + ' zxf ' + os.path.join(downloadPath, base) + '.tar.gz', ''], [0,'chmod -R +rw *', os.path.join(os.getcwd(), base ) ], [0,cp + ' -R '+os.path.join('python-ogre','boost','*') +' ' + base , ''], # need to overwrite the boost with our files - [0, sed_ + " 's/BJAM_CONFIG=\"\"/BJAM_CONFIG=release/' boost_1_35_0/configure", '' ], - [0, sed_ + " s/'BOOST_PYTHON_MAX_ARITY 15'/'BOOST_PYTHON_MAX_ARITY 19'/ boost_1_35_0/boost/python/detail/preprocessor.hpp", ''], + [0, sed_ + " 's/BJAM_CONFIG=\"\"/BJAM_CONFIG=release/' "+base+"/configure", '' ], + [0, sed_ + " s/'BOOST_PYTHON_MAX_ARITY 15'/'BOOST_PYTHON_MAX_ARITY 19'/ "+base+"/boost/python/detail/preprocessor.hpp", ''], [0,"./configure --with-libraries=python --prefix=%s --without-icu" % PREFIX, os.path.join(os.getcwd(), base )], [0,'make', os.path.join(os.getcwd(), base )], [0,'make install', os.path.join(os.getcwd(), base )], @@ -461,7 +469,7 @@ class ogre: active = True pythonModule = True - version = "1.4" + version = "1.5" name='ogre' ModuleName='OGRE' cflags = "" @@ -472,10 +480,6 @@ myLibraries = ['OgreMain'] libraries = myLibraries -# for mod in dependsOn: -# libraries += mod.libraries -# - if isWindows(): source = [ @@ -680,9 +684,14 @@ libs = ['Newton', Config.LIB_Boost, 'OgreNewt_Main', 'OgreMain'] else: libs = ['Newton', Config.LIB_Boost, 'OgreNewt', 'OgreMain'] - source = [ - [cvs, " -d :pserver:ano...@cv...:/cvsroot/ogre co -P "+base, os.getcwd()] + if _STABLE: + source = [ + [cvs, " -d :pserver:ano...@cv...:/cvsroot/ogre co -D 01052008 -P "+base, os.getcwd()] ] + else: + source = [ + [cvs, " -d :pserver:ano...@cv...:/cvsroot/ogre co -P "+base, os.getcwd()] + ] baseDir = os.path.join(os.getcwd(), base ) buildCmds = [ [0, "patch -s -N -i ../../python-ogre/patch/ogrenewt.patch -p0", baseDir], @@ -711,9 +720,12 @@ class cegui: active = True pythonModule = True - version = "0.5.0b" parent = "ogre/gui" name = 'cegui' + if _STABLE: + version = "0.5.0b" + else: + version = "0.6.0" if isWindows(): if _PreCompiled: pchstop = 'cegui.h' @@ -724,10 +736,17 @@ libs=[Config.LIB_Boost, 'CEGUIBase', 'OgreMain', 'CEGUIOgreRenderer' ] if isLinux(): - base = "CEGUI-0.5.0" - source=[ - [wget, "http://prdownloads.sourceforge.net/crayzedsgui/CEGUI-0.5.0b.tar.gz", downloadPath] - ] + if _STABLE: + base = "CEGUI-0.5.0" + source=[ + [wget, "http://prdownloads.sourceforge.net/crayzedsgui/CEGUI-0.5.0b.tar.gz", downloadPath] + ] + else: + base = "CEGUI-0.6.0" + source=[ + [wget, "http://prdownloads.sourceforge.net/crayzedsgui/CEGUI-0.6.0.tar.gz", downloadPath] + ] + buildCmds = [ [0, tar + " zxf " + os.path.join(downloadPath,base)+"b.tar.gz --overwrite",os.getcwd() ], [0, "patch -s -N -i ../python-ogre/patch/cegui.patch -p0", os.path.join(os.getcwd(),base)], @@ -739,7 +758,11 @@ [0,'make', os.path.join(os.getcwd(), base )], [0,'make install', os.path.join(os.getcwd(), base )] ] - + if isWindows(): + source=[ + [wget, "http://sourceforge.net/project/downloading.php?groupname=crayzedsgui&filename=CEGUI-0.6.0.zip", downloadPath] + ] + include_dirs = [Config.PATH_Boost ,Config.PATH_INCLUDE_CEGUI ,Config.PATH_CEGUI @@ -849,9 +872,14 @@ , Config.PATH_INCLUDE_OgreOdeLoader , Config.PATH_INCLUDE_Ogre ] - source = [ - [cvs, " -d :pserver:ano...@cv...:/cvsroot/ogre co -P "+base, os.getcwd()] - ] + if _STABLE: + source = [ + [cvs, " -d :pserver:ano...@cv...:/cvsroot/ogre co -D 01052008 -P "+base, os.getcwd()] + ] + else: + source = [ + [cvs, " -d :pserver:ano...@cv...:/cvsroot/ogre co -P "+base, os.getcwd()] + ] baseDir = os.path.join(os.getcwd(), base ) buildCmds = [ [0, "patch -s -N -i ../../python-ogre/patch/ogreode.patch -p0", baseDir], @@ -1013,7 +1041,7 @@ CheckIncludes=[] # libs=[ Config.LIB_Boost, 'NxOgre','NxCharacter', 'NxCooking', 'NxExtensions', 'PhysXLoader','OgreMain' ] if os.name =='nt': - libs=[ Config.LIB_Boost, 'NxCharacter', 'NxCooking', 'NxExtensions', 'PhysXLoader','OgreMain' , 'NxOgreStatic'] + libs=[ Config.LIB_Boost, 'NxCharacter', 'NxCooking', 'PhysXLoader','OgreMain' , 'NxOgreStatic'] #'NxExtensions', else: libs=[ Config.LIB_Boost, 'NxCharacter', 'NxCooking', 'PhysXCore','PhysXLoader','OgreMain' ] ModuleName="NxOgre" @@ -1068,7 +1096,7 @@ class physx: active = True pythonModule = True - version="2.7.3" + version="2.8.1" name='physx' parent="ogre/physics" cflags="" @@ -1079,6 +1107,7 @@ include_dirs.append( d ) if os.name == 'nt': CCFLAGS = ' -D"WIN32" ' + CCFLAGS = ' ' ## try to not define WIN 32 to remove inline assembly code that GCCxml doesn't like else: CCFLAGS = ' -D"LINUX" ' lib_dirs = [Config.PATH_LIB_Boost, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Gam...@us...> - 2008-05-22 04:50:35
|
Revision: 591 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=591&view=rev Author: Game_Ender Date: 2008-05-21 21:50:44 -0700 (Wed, 21 May 2008) Log Message: ----------- Replaced catch "except:" with "except ImportError:", allows catching of typos and other errors when import PythonOgreConfig_*.py modules Modified Paths: -------------- trunk/python-ogre/environment.py Modified: trunk/python-ogre/environment.py =================================================================== --- trunk/python-ogre/environment.py 2008-05-20 09:42:51 UTC (rev 590) +++ trunk/python-ogre/environment.py 2008-05-22 04:50:44 UTC (rev 591) @@ -97,14 +97,14 @@ Config = __import__( s ) _ConfigSet = True log ( "Loaded Config (based on username) from %s" % (s )) -except: +except ImportError: try: s= 'PythonOgreConfig_' + _SystemType ## + '.py' Config = __import__( s ) _ConfigSet = True log ( "Loaded Config (based on systemtype) from %s" % (s)) - except: + except ImportError: pass if not _ConfigSet: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2008-05-20 09:42:46
|
Revision: 590 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=590&view=rev Author: andy_miller Date: 2008-05-20 02:42:51 -0700 (Tue, 20 May 2008) Log Message: ----------- Support for Ogre 1.5 - need to change Ogre version in environment.py for these to take effect Modified Paths: -------------- trunk/python-ogre/code_generators/ogre/generate_code.py trunk/python-ogre/code_generators/ogre/python_ogre_masterlist.h trunk/python-ogre/code_generators/ogre/python_ogre_sizeof.h Modified: trunk/python-ogre/code_generators/ogre/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/ogre/generate_code.py 2008-05-18 16:01:44 UTC (rev 589) +++ trunk/python-ogre/code_generators/ogre/generate_code.py 2008-05-20 09:42:51 UTC (rev 590) @@ -228,7 +228,12 @@ func.exclude() print '{*} function "%s" is marked as internal' % declarations.full_name( func ) - + # changes for Ogre 1.5 + if environment.ogre.version =="1.5": + main_ns.class_("ResourceBackgroundQueue").exclude() # Ogre::ResourceBackgroundQueue::_fireBackgroundLoadingComplete isn't implemented + main_ns.class_("ResourceGroupManager").mem_fun("_notifyWorldGeometryPrepareStageEnded").exclude() + main_ns.class_("ResourceGroupManager").mem_fun("_notifyWorldGeometryPrepareStageStarted").exclude() + ############################################################ ## ## And there are things that manually need to be INCLUDED Modified: trunk/python-ogre/code_generators/ogre/python_ogre_masterlist.h =================================================================== --- trunk/python-ogre/code_generators/ogre/python_ogre_masterlist.h 2008-05-18 16:01:44 UTC (rev 589) +++ trunk/python-ogre/code_generators/ogre/python_ogre_masterlist.h 2008-05-20 09:42:51 UTC (rev 590) @@ -44,7 +44,9 @@ #include "OgreImage.h" // #include "OgreImageCodec.h" // not this one #include "OgreIteratorWrappers.h" -#include "OgreMaterialScriptCompiler.h" +#if OGRE_VERSION_MINOR == 4 + #include "OgreMaterialScriptCompiler.h" +#endif #include "OgreMemoryMacros.h" #include "OgreMemoryManager.h" #include "OgreMeshFileFormat.h" Modified: trunk/python-ogre/code_generators/ogre/python_ogre_sizeof.h =================================================================== --- trunk/python-ogre/code_generators/ogre/python_ogre_sizeof.h 2008-05-18 16:01:44 UTC (rev 589) +++ trunk/python-ogre/code_generators/ogre/python_ogre_sizeof.h 2008-05-20 09:42:51 UTC (rev 590) @@ -146,7 +146,9 @@ sizeof( Ogre::SceneQueryResultWorldFragmentList ); sizeof( Ogre::SceneQueryResultMovableList ); sizeof( Ogre::BackgroundProcessTicket ); -sizeof( Ogre::DLL_CREATERENDERWINDOW ); +#if OGRE_VERSION_MINOR == 4 + sizeof( Ogre::DLL_CREATERENDERWINDOW ); +#endif sizeof( Ogre::RenderTargetPriorityMap ); sizeof( Ogre::RenderTargetMap ); sizeof( Ogre::ConfigOptionMap ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lak...@us...> - 2008-05-18 16:01:48
|
Revision: 589 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=589&view=rev Author: lakin_wecker Date: 2008-05-18 09:01:44 -0700 (Sun, 18 May 2008) Log Message: ----------- Simple whitespace changes. Modified Paths: -------------- branches/linux-fixes-summer-2008/python-ogre/BuildModule.py Modified: branches/linux-fixes-summer-2008/python-ogre/BuildModule.py =================================================================== --- branches/linux-fixes-summer-2008/python-ogre/BuildModule.py 2008-05-18 15:57:21 UTC (rev 588) +++ branches/linux-fixes-summer-2008/python-ogre/BuildModule.py 2008-05-18 16:01:44 UTC (rev 589) @@ -147,7 +147,7 @@ time.sleep(5) ## not sure why scons doesn't work after first failure - + def parseInput(): """Handle command line input """ usage = "usage: %prog [options] moduleName" @@ -159,46 +159,46 @@ parser.add_option("-l", "--logfilename", default="log.out" ,dest="logfilename", help="Override the default log file name") parser.add_option("-G", "--genall", action="store_true", default=False ,dest="gencodeall", help="Generate Source Code for all possible modules") parser.add_option("-C", "--compileall", action="store_true", default=False ,dest="compilecodeall", help="Compile Source Code for all posssible modules") - + (options, args) = parser.parse_args() return (options,args) - + if __name__ == '__main__': classList = getClassList () - + (options, args) = parseInput() if len(args) == 0 and not (options.compilecodeall or options.gencodeall): exit("The module to build wasn't specified. Use -h for help") - + if options.retrieve==False and options.build==False and options.gencode==False and options.compilecode==False\ and options.compilecodeall==False and options.gencodeall==False: exit ( "You need to specific at least one option. Use -h for help") - + setupLogging(options.logfilename) logger = logging.getLogger('PythonOgre.BuildModule') if not os.path.exists( environment.downloadPath ): - os.mkdir ( environment.downloadPath ) + os.mkdir ( environment.downloadPath ) if not os.path.exists( environment.Config.ROOT_DIR ): - os.mkdir ( environment.Config.ROOT_DIR ) + os.mkdir ( environment.Config.ROOT_DIR ) if not os.path.exists( os.path.join(environment.Config.ROOT_DIR, 'usr' ) ): - os.mkdir ( os.path.join(environment.Config.ROOT_DIR, 'usr' ) ) + os.mkdir ( os.path.join(environment.Config.ROOT_DIR, 'usr' ) ) if options.gencodeall or options.compilecodeall: for name,cls in environment.projects.items(): if cls.active and cls.pythonModule: if options.gencodeall: generateCode( cls ) if options.compilecodeall: - compileCode( cls ) + compileCode( cls ) else: - for moduleName in args: + for moduleName in args: if not classList.has_key( moduleName ): exit("Module specificed was not found (%s is not in environment.py) " % moduleName ) - if options.retrieve: + if options.retrieve: retrieveSource ( classList[ moduleName ] ) - if options.build : + if options.build : buildModule ( classList[ moduleName ] ) if options.gencode : if classList[ moduleName ].pythonModule == True: @@ -210,5 +210,5 @@ compileCode ( classList[ moduleName ] ) else: print ( "Module specificed does not need compiling (%s is a supporting module)" % moduleName ) - - + + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lak...@us...> - 2008-05-18 15:57:19
|
Revision: 588 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=588&view=rev Author: lakin_wecker Date: 2008-05-18 08:57:21 -0700 (Sun, 18 May 2008) Log Message: ----------- Some simple whitespace fixes. Also, changed the way the Config modules are imported such that the errors in them are printed when the import fails. Modified Paths: -------------- branches/linux-fixes-summer-2008/python-ogre/environment.py Modified: branches/linux-fixes-summer-2008/python-ogre/environment.py =================================================================== --- branches/linux-fixes-summer-2008/python-ogre/environment.py 2008-05-18 15:01:23 UTC (rev 587) +++ branches/linux-fixes-summer-2008/python-ogre/environment.py 2008-05-18 15:57:21 UTC (rev 588) @@ -28,21 +28,21 @@ print __file__, "LOG::", instring def isWindows(): - if os.name == 'nt': + if os.name == 'nt': return True return False - + def isLinux(): if os.name == 'posix' and os.sys.platform != 'darwin': return True - return False - + return False + def isMac(): if os.sys.platform == 'darwin': return True return False - - + + PythonOgreMajorVersion = "1" PythonOgreMinorVersion = "2" PythonOgrePatchVersion = "rc1" @@ -55,7 +55,7 @@ ## I want a version string 2.4 or 2.5 etc PythonVersionString = str(sys.version_info[0]) + '.' + str(sys.version_info[1]) -if isWindows(): +if isWindows(): python_include_dirs = os.path.join ( PATH_Python, 'include') python_lib_dirs = os.path.join ( PATH_Python, 'libs' ) ## @@ -77,13 +77,12 @@ sys.path.append( os.path.join( root_dir, 'common_utils' ) ) shared_ptr_dir = os.path.join( root_dir, 'shared_ptr' ) include_dir = os.path.join( root_dir, 'include' ) -generated_dir_name = 'generated' -package_dir_name = 'packages'+ "_" + PythonVersionString +generated_dir_name = 'generated' +package_dir_name = 'packages'+ "_" + PythonVersionString generated_dir = os.path.join( root_dir, generated_dir_name ) declarations_cache_dir = os.path.join( root_dir, 'code_generators', 'cache' ) _UserName = getpass.getuser() -_ConfigSet = False _SystemType = os.name ## nt or posix or mac _PlatformType = sys.platform ## win32, ?? @@ -93,32 +92,27 @@ # log ( "Config.PATH_Python: %s, UserName: %s, SystemType: %s, Root_dir: %s" % (Config.PATH_Python, _UserName, _SystemType, root_dir) ) try: - s = 'PythonOgreConfig_' + _UserName ## + '.py' - Config = __import__( s ) - _ConfigSet = True - log ( "Loaded Config (based on username) from %s" % (s )) -except: try: - s= 'PythonOgreConfig_' + _SystemType ## + '.py' - - Config = __import__( s ) - _ConfigSet = True - log ( "Loaded Config (based on systemtype) from %s" % (s)) - except: - pass + ModuleName = 'PythonOgreConfig_' + _UserName ## + '.py' + Config = __import__( ModuleName ) + log ( "Loaded Config (based on username) from %s" % (ModuleName )) + except ImportError: + try: + ModuleName= 'PythonOgreConfig_' + _SystemType ## + '.py' -if not _ConfigSet: - log ( " Going to use internal config setting") - ## These need to be adjusted based upon your system - ## - ## PLEASE use an external PythonOgreConfig_<username>.py to hold these value !!!! - ## - print "\n\n You DO need to create a PythonOgreConfig_%s.py file with config details" % ( _SystemType) - sys.exit(-1) - - + Config = __import__( ModuleName ) + log ( "Loaded Config (based on systemtype) from %s" % (ModuleName)) + except ImportError: + print "\n\n You DO need to create either a PythonOgreConfig_%s.py or a PythonOgreConfig_%s.py file with config details" % ( _UserName, _SystemType) + sys.exit(-1) +except: + print "\n\n There was an error importing your customized settings: %s \n\n" % (ModuleName,) + # Re raise the exception + raise + + ###################### -downloadPath = os.path.abspath("downloads") +downloadPath = os.path.abspath("downloads") wget = "wget -c -nc " tar = "tar " gzip = "gzip " @@ -143,12 +137,12 @@ sed_ = "sed -i '' " else: sed_ = "sed --in-place " - -if isMac(): + +if isMac(): Config.PATH_Boost = os.path.join(Config.LOCAL_INCLUDE, 'boost-1_34_1') Config.LIB_Boost = 'libboost_python-1_34_1' Config.RPATH="" - + ## BIG assumption about where you want things put ROOT = os.path.join(os.getcwd(),'root' ) PREFIX = os.path.join(os.getcwd(),'root', 'usr' ) @@ -167,9 +161,9 @@ ] return ret - + #################################################### ## ## These are the base tools and libraries @@ -188,27 +182,27 @@ [0,"cmake ../gccxml -DCMAKE_INSTALL_PREFIX:PATH="+ PREFIX,os.path.join(os.getcwd(),'gccxml-build')], [0,"make", os.path.join(os.getcwd(),'gccxml-build')], [0,"make install",os.path.join(os.getcwd(),'gccxml-build')] - ] + ] else: - - buildCmds = [ + + buildCmds = [ [0,'echo Please use CMAKE to create a msvc build projects for gccxml',''], [0,'echo ie. Run Cmake (from the windows menu)',''], [0,'echo specific the gccxml for both directories and run configure',''], [0,'echo ignore any errors - you will need to run configure twice and then OK',''], [0,'echo Now run MSVC and load the gccxml project (in the gccxml directory) and build it',''] ] - + class install: pythonModule = False active = True source = [ ] - + buildCmds = [ [0,"python setup.py install --prefix=%s" % PREFIX, os.path.join(os.getcwd(),'python-ogre')] - ] - + ] + class newton: pythonModule = False active = True @@ -220,7 +214,7 @@ source = [ [wget, "http://www.newtondynamics.com/downloads/newtonLinux-1.53.tar.gz", downloadPath] ] - + buildCmds = [ [0, "tar zxf " + os.path.join(downloadPath, "newtonLinux-1.53.tar.gz"), ''], [0,"patch -s -i ./python-ogre/patch/Newton.patch -p0 ", ''], @@ -233,7 +227,7 @@ source = [ [wget, "http://www.newtondynamics.com/downloads/NewtonMac-1.53.zip", downloadPath] ] - + buildCmds = [ [0, "unzip -q -o " + os.path.join(downloadPath, "NewtonMac-1.53.zip"), ''], [0,"patch -s -i ./python-ogre/patch/Newton.patch -p0 ", ''], @@ -241,7 +235,7 @@ [0, "cp newtonSDK/sdk/*.a %s/lib" % PREFIX, ''], [0, "cp newtonSDK/sdk/*.a ogreaddons/ogrenewt" , ''] ] - + class pygccxml: pythonModule = False active = True @@ -253,11 +247,11 @@ source = [ [svn, " co http://pygccxml.svn.sourceforge.net/svnroot/pygccxml "+base, os.getcwd()] ] - + buildCmds = [ [0,"python setup.py install --prefix="+ PREFIX , os.path.join (os.getcwd(), base, "pygccxml_dev") ], [0,"python setup.py install --prefix=" + PREFIX , os.path.join (os.getcwd(), base, "pyplusplus_dev") ] - ] + ] if isWindows(): source = [ [svn, " co http://pygccxml.svn.sourceforge.net/svnroot/pygccxml "+base, os.getcwd()] @@ -265,8 +259,8 @@ buildCmds = [ [0,"python setup.py install " , os.path.join (os.getcwd(), base, "pygccxml_dev") ], [0,"python setup.py install " , os.path.join (os.getcwd(), base, "pyplusplus_dev") ] - ] - + ] + class cg: pythonModule = False active = True @@ -275,20 +269,20 @@ source = [ [wget, " http://developer.download.nvidia.com/cg/Cg_2.0/2.0.0010/"+base+".tar.gz",downloadPath] ] - + buildCmds = [ [0,tar + " xvzf "+ os.path.join(downloadPath,base) + ".tar.gz --overwrite", ROOT], # unpack it directly into 'our' root - ] + ] if isMac(): source = [ [wget, "http://developer.download.nvidia.com/cg/Cg_2.0/2.0.0010/Cg-2.0_Dec2007.dmg", downloadPath ] - - ] + + ] buildCmds = [ ] ## "http://downloads.sourceforge.net/ogre/OgreDependenciesOSX_20070929.zip" - + class zziplib: ## The 'install' "fails" on the mac however it's actually OK pythonModule = False @@ -298,16 +292,16 @@ source = [ [wget, " http://downloads.sourceforge.net/zziplib/"+base+".tar.bz2",downloadPath], ] - + buildCmds = [ [0,tar + " xjf "+ os.path.join(downloadPath,base) + ".tar.bz2 --overwrite", ''], [0,"aclocal", os.path.join(os.getcwd(), base) ], [0,"./configure --prefix=%s --datadir=%s/share --includedir=%s/include " % (PREFIX,PREFIX,PREFIX), os.path.join(os.getcwd(), base) ], [0,"make" ,os.path.join(os.getcwd(), base) ], [0,"make install",os.path.join(os.getcwd(), base) ] - ] - - + ] + + class freeimage: pythonModule = False active = True @@ -316,7 +310,7 @@ source = [ [wget, " http://prdownloads.sourceforge.net/freeimage/FreeImage3100.zip",downloadPath], ] - + if isLinux(): buildCmds = [ [0, unzip + " -q -o " + os.path.join(downloadPath,base) + "3100.zip", ''], @@ -329,7 +323,7 @@ sed --in-place -s 's|ldconfig||' Makefile.*""", os.path.join(os.getcwd(), base) ], [0, "make", os.path.join(os.getcwd(), base) ], [0, "make DESTINC=%s/include DESTLIB=%s/lib install " % (PREFIX, PREFIX) ,os.path.join(os.getcwd(), base) ] - ] + ] if isMac(): ## mac has a crap sed command implementation and a different shell interaction, plus make file is a little different (or course) buildCmds = [ [0, unzip + " -q -o " + os.path.join(downloadPath,base) + "3100.zip", ''], @@ -341,23 +335,23 @@ sed -i '' 's|ldconfig||' Makefile.*""", os.path.join(os.getcwd(), base) ], [0, "make", os.path.join(os.getcwd(), base) ], [0, "make DEST=%s install " % PREFIX ,os.path.join(os.getcwd(), base) ] - ] - - + ] + + class cmake: pythonModule = False active = True if isLinux() or isMac(): base = 'cmake-2.4.6-Linux-i386' - + if isMac(): base = 'cmake-2.4.7-Darwin-universal' - + source = [ [wget, "http://www.cmake.org/files/v2.4/"+base+".tar.gz",downloadPath], ] - - + + buildCmds = [ [0,tar + " xzf "+ os.path.join(downloadPath,base) + ".tar.gz --overwrite", ''], # unpack it [0,cp + "-R * " + PREFIX, os.path.join (os.getcwd(), base) ] # copy to our bin area @@ -367,8 +361,8 @@ buildCmds = [ [0, os.path.join(downloadPath, "cmake-2.4.8-win32-x86.exe"), '' ] ] - - + + class scons: pythonModule = False active = True @@ -376,20 +370,20 @@ source = [ [wget, "http://downloads.sourceforge.net/scons/"+base+".tar.gz",downloadPath], ] - + # the utils in Windows don't handle paths or tar spawing gzip hence the work arounds if isLinux() or isMac(): buildCmds = [ [0, tar + " zxf " + os.path.join(downloadPath,base)+".tar.gz --overwrite",'' ], [0,"python setup.py install --prefix=%s" % PREFIX , os.path.join (os.getcwd(), base) ] ] - + else: buildCmds = unTarGz( base, downloadPath ) +\ [ [0,"python setup.py install ", os.path.join (os.getcwd(), base) ] ] - + class boost: ## also included bjam active = True version = "3.4" @@ -397,11 +391,11 @@ ModuleName = "" base = 'boost_1_35_0' #this doesn't work yet AJM 17/04/08 base = 'boost_1_34_1' - + myLibraryPaths = [ 'boost/bin.v2/libs/python2.5/build/msvc-8.0/release/threading-multi' ] myLibraries = [ 'boost_python-vc80-mt-1_35'] - - + + if isLinux() or isMac(): bjambase = 'boost-jam-3.1.16' if isMac(): @@ -410,36 +404,36 @@ else: bjambuilddir = 'bin.linuxx86' bjambuildset = 'gcc' - + source = [ [wget,'http://downloads.sourceforge.net/boost/boost-jam-3.1.16.tgz', downloadPath], [wget,'http://downloads.sourceforge.net/boost/boost_1_34_1.tar.gz',downloadPath] - ] + ] buildCmds = [ ## first handle bjam [0, tar + ' zxf ' + os.path.join(downloadPath, bjambase) + '.tgz --overwrite', ''], [0,"./build.sh " + bjambuildset, os.path.join(os.getcwd(), bjambase )], - + [0,cp + " bjam %s/bin" % PREFIX, os.path.join(os.getcwd(), bjambase, bjambuilddir )], ## may need to change on 64 bit systems - + ## and now boost [0, tar + ' zxf ' + os.path.join(downloadPath, base) + '.tar.gz', ''], [0,'chmod -R +rw *', os.path.join(os.getcwd(), base ) ], [0,cp + ' -R '+os.path.join('python-ogre','boost','*') +' ' + base , ''], # need to overwrite the boost with our files - [0, sed_ + " 's/BJAM_CONFIG=\"\"/BJAM_CONFIG=release/' boost_1_35_0/configure", '' ], - [0, sed_ + " s/'BOOST_PYTHON_MAX_ARITY 15'/'BOOST_PYTHON_MAX_ARITY 19'/ boost_1_35_0/boost/python/detail/preprocessor.hpp", ''], + [0, sed_ + " 's/BJAM_CONFIG=\"\"/BJAM_CONFIG=release/' boost_1_34_1/configure", '' ], + [0, sed_ + " s/'BOOST_PYTHON_MAX_ARITY 15'/'BOOST_PYTHON_MAX_ARITY 19'/ boost_1_34_1/boost/python/detail/preprocessor.hpp", ''], [0,"./configure --with-libraries=python --prefix=%s --without-icu" % PREFIX, os.path.join(os.getcwd(), base )], [0,'make', os.path.join(os.getcwd(), base )], [0,'make install', os.path.join(os.getcwd(), base )], ] - + if isWindows(): bjambase = 'boost-jam-3.1.16-1-ntx86' source = [ [wget,'http://downloads.sourceforge.net/boost/'+bjambase+'.zip',downloadPath] , [wget,'http://downloads.sourceforge.net/boost/'+base+'.zip',downloadPath] - ] - + ] + buildCmds = [ [0,unzip + os.path.join(downloadPath, bjambase+".zip"), ''], [0,unzip + os.path.join(downloadPath, base + ".zip"), ''], @@ -448,16 +442,16 @@ [0,'sed -i s/"BOOST_PYTHON_MAX_ARITY 15"/"BOOST_PYTHON_MAX_ARITY 19"/ '+base+'/boost/python/detail/preprocessor.hpp', ''], [0,os.path.join(os.getcwd(), bjambase, "bjam.exe") + ' release --with-python --toolset=msvc-8',os.path.join(os.getcwd(),base)] ] - - - - + + + + #################################################### ## ## Now for the actual Python-Ogre Modules ## #################################################### - + class ogre: active = True pythonModule = True @@ -471,13 +465,13 @@ myLibraryPaths = [] myLibraries = ['OgreMain'] libraries = myLibraries - + # for mod in dependsOn: # libraries += mod.libraries # - - if isWindows(): - + + if isWindows(): + source = [ [ wget, "http://downloads.sourceforge.net/ogre/OgreDependencies_VC8SP1_Eihort_20071227.zip", downloadPath], [ wget, "http://downloads.sourceforge.net/ogre/ogre-win32-v1-4-7.zip", downloadPath], @@ -487,8 +481,8 @@ [0, unzip + os.path.join(downloadPath,"OgreDependencies_VC8SP1_Eihort_20071227.zip"), os.path.join(os.getcwd(), 'ogrenew') ], [0, "patch -s -N -i ./python-ogre/patch/ogre.patch -p0 ", os.getcwd()] - ] - + ] + # requirements to build a precompiled header on the fly if _PreCompiled: pchstop = 'python_ogre_precompiled.h' @@ -502,8 +496,8 @@ , Config.PATH_LIB_Ogre_Dependencies #needed for ceguibase.lib etc , Config.PATH_LIB_CEGUI ] - include_dirs = [ Config.PATH_Boost - , Config.PATH_INCLUDE_Ogre + include_dirs = [ Config.PATH_Boost + , Config.PATH_INCLUDE_Ogre ] CCFLAGS = ' -DBOOST_PYTHON_MAX_ARITY=19 ' LINKFLAGS = '' @@ -526,12 +520,12 @@ [0, "make", os.path.join(os.getcwd(), 'ogrenew')], [0, "make install", os.path.join(os.getcwd(), 'ogrenew')], ] - + libs=[Config.LIB_Boost, 'OgreMain' ] #, 'OgreGUIRenderer', 'CEGUIBase'] lib_dirs = [ Config.LOCAL_LIB ] - include_dirs = [ Config.PATH_Boost - , Config.PATH_INCLUDE_Ogre + include_dirs = [ Config.PATH_Boost + , Config.PATH_INCLUDE_Ogre ] CCFLAGS = '' ## -DBOOST_PYTHON_MAX_ARITY=19' LINKFLAGS = '' @@ -557,21 +551,21 @@ [0, "xcodebuild -project ogrenew/Mac/Samples/Samples.xcodeproj -configuration Release", ''], [0, "cp -R *.framework " + Config.FRAMEWORK_DIR, os.path.join(os.getcwd() ,'ogrenew',"Mac", "build", "Release") ] ] - + libs=[Config.LIB_Boost] lib_dirs = [ Config.PATH_LIB_Boost ] - include_dirs = [ Config.PATH_Boost + include_dirs = [ Config.PATH_Boost , Config.PATH_INCLUDE_Ogre , python_include_dirs ] - + CCFLAGS = '' LINKFLAGS = '' cflags += '' - + CheckIncludes=['boost/python.hpp', 'Ogre.h'] - - + + class ois: active = True pythonModule = True @@ -582,9 +576,9 @@ if isMac(): source=[] if isLinux(): - base = "ois-1.2" + base = "ois" source=[ - [wget, "http://prdownloads.sourceforge.net/wgois/ois-1.2.tar.gz", downloadPath] + [wget, "http://superb-west.dl.sourceforge.net/sourceforge/wgois/ois_1.2.0.tar.gz -O ois.tar.gz", downloadPath] ] buildCmds = [ [0, tar + " zxf " + os.path.join(downloadPath,base)+".tar.gz --overwrite",os.getcwd() ], @@ -596,7 +590,7 @@ [0,'make', os.path.join(os.getcwd(), base )], [0,'make install', os.path.join(os.getcwd(), base )] ] - + buildCmds = [ [0, tar + " zxf " + os.path.join(downloadPath,base)+".tar.gz --overwrite",os.getcwd() ], [0, "./bootstrap" ,os.path.join(os.getcwd(), base )], @@ -612,22 +606,22 @@ # [0, '"c:/Program Files/Microsoft Visual Studio 8/vc/vcpackages/vcbuild.exe" /useenv ois_VC8.sln ', os.path.join(os.getcwd(), base, 'Win32' )], # [0, VCBUILD + " ois_vc8.sln " + "\"Release|Win32\"", os.path.join(os.getcwd(), base, 'Win32' )] ] - + if os.name=='nt': if _PreCompiled: pchstop = 'OIS.h' pchbuild = 'buildpch.cpp' pchincludes = ['boost/python.hpp', 'OIS.h'] - + libs=['OIS_Static',Config.LIB_Boost] else: libs=['OIS',Config.LIB_Boost] if os.name=="nt": libs.append ( "User32" ) # needed for static linking - include_dirs = [ Config.PATH_Boost + include_dirs = [ Config.PATH_Boost , Config.PATH_INCLUDE_OIS ] - lib_dirs = [ Config.PATH_LIB_Boost + lib_dirs = [ Config.PATH_LIB_Boost , Config.PATH_LIB_OIS ] ModuleName = 'OIS' @@ -635,7 +629,7 @@ #externalFiles = ['OIS.dll'] if os.sys.platform == 'darwin': LINKFLAGS = '-framework Python -framework Carbon' - + class ogrerefapp: active = True pythonModule = True @@ -660,7 +654,7 @@ , Config.PATH_LIB_ODE , Config.PATH_LIB_OgreRefApp ] - include_dirs = [ Config.PATH_Boost + include_dirs = [ Config.PATH_Boost ,Config.PATH_INCLUDE_Ogre ,Config.PATH_INCLUDE_OgreRefApp ,Config.PATH_INCLUDE_ODE @@ -668,7 +662,7 @@ CCFLAGS = ' -DBOOST_PYTHON_MAX_ARITY=19' ModuleName = 'OgreRefApp' CheckIncludes = ['boost/python.hpp', 'Ogre.h', 'OgreReferenceAppLayer.h', 'ode/ode.h'] - + class ogrenewt: active = True pythonModule = True @@ -689,12 +683,13 @@ #[0, "cp SConscript OgreNewt_Main", baseDir], #[0, "rm SConscript", baseDir], [0, "rm -r ./OgreNewt_Main/inc/boost", baseDir], + [0, "scons prefix=%s boost=%s/include/boost-1_34_1 build libOgreNewt.so" % (PREFIX, PREFIX), baseDir], ##WARNING -- boost include dir name is different than build name (dash not underscore) [0, "scons prefix=%s boost=%s/include/boost-1_34_1 install" % (PREFIX, PREFIX), baseDir], ##WARNING -- boost include dir name is different than build name (dash not underscore) ] include_dirs = [Config.PATH_Boost , Config.PATH_Newton # only one path for Newton - , Config.PATH_INCLUDE_Ogre + , Config.PATH_INCLUDE_Ogre , Config.PATH_INCLUDE_OgreNewt , Config.PATH_INCLUDE_Ogre_Dependencies #needed for OIS/OIS.h ] @@ -702,16 +697,16 @@ ,Config.PATH_LIB_Newton ,Config.PATH_LIB_OgreNewt , Config.PATH_LIB_Ogre_OgreMain - + ] CCFLAGS = ' -DBOOST_PYTHON_MAX_ARITY=19' ModuleName = 'OgreNewt' CheckIncludes=['boost/python.hpp', 'Ogre.h', 'OgreNewt.h', 'Newton.h'] - + class cegui: active = True pythonModule = True - version = "0.5.0b" + version = "0.5.0b" parent = "ogre/gui" name = 'cegui' if isWindows(): @@ -747,16 +742,16 @@ , Config.PATH_INCLUDE_Ogre , Config.PATH_INCLUDE_Ogre_Dependencies ## needed as OgreCEGUI uses CEGUI/.. in #includes ] - + lib_dirs = [ Config.PATH_LIB_Boost ##, Config.PATH_LIB_Ogre_CEGUIRenderer , Config.PATH_LIB_Ogre_OgreMain , Config.PATH_LIB_CEGUI - , Config.PATH_LIB_Ogre_Dependencies + , Config.PATH_LIB_Ogre_Dependencies ] CCFLAGS = ' -DBOOST_PYTHON_MAX_ARITY=19' ModuleName = 'CEGUI' - CheckIncludes = ['boost/python.hpp', 'Ogre.h', 'CEGUI.h', 'OgreCEGUIRenderer.h'] + CheckIncludes = ['boost/python.hpp', 'Ogre.h', 'CEGUI.h', 'OgreCEGUIRenderer.h'] class ode: @@ -771,13 +766,13 @@ lib_dirs = [ Config.PATH_LIB_Boost , Config.PATH_LIB_ODE ] - include_dirs = [ Config.PATH_Boost + include_dirs = [ Config.PATH_Boost , Config.PATH_INCLUDE_ODE , os.path.join(Config.PATH_ODE, 'OPCODE') ] ModuleName = 'ODE' - CheckIncludes = ['boost/python.hpp', 'ode/ode.h'] + CheckIncludes = ['boost/python.hpp', 'ode/ode.h'] source = [ ["wget", "http://prdownloads.sourceforge.net/opende/ode-src-0.9.zip",downloadPath] ] @@ -800,15 +795,15 @@ libs=[Config.LIB_Boost] lib_dirs = [ Config.PATH_LIB_Boost ] - include_dirs = [ Config.PATH_Boost + include_dirs = [ Config.PATH_Boost , Config.PATH_INCLUDE_OPCODE , os.path.join(Config.PATH_INCLUDE_OPCODE, 'Ice' ) ] CCFLAGS = ' -DBAN_OPCODE_AUTOLINK -DICE_NO_DLL ' ModuleName = 'Opcode' - CheckIncludes = ['boost/python.hpp', 'Opcode.h'] - + CheckIncludes = ['boost/python.hpp', 'Opcode.h'] + class caelum: active = True pythonModule = True @@ -825,8 +820,8 @@ ] CheckIncludes=[] libs=[ Config.LIB_Boost, 'OgreMain' ] - ModuleName="caelum" - + ModuleName="caelum" + class ogreode: active = True pythonModule = True @@ -842,7 +837,7 @@ , Config.PATH_LIB_Ogre_OgreMain , Config.PATH_LIB_ODE ] - include_dirs = [ Config.PATH_Boost + include_dirs = [ Config.PATH_Boost , Config.PATH_INCLUDE_ODE , Config.PATH_INCLUDE_OgreOde , Config.PATH_INCLUDE_OgreOdePrefab @@ -864,11 +859,10 @@ libs=[Config.LIB_Boost, 'OgreMain', 'ode', 'OgreOde_Core', 'OgreOde_Prefab', 'OgreOde_Loader' ] CCFLAGS = ' -DBOOST_PYTHON_MAX_ARITY=19' - CheckIncludes = ['boost/python.hpp', 'Ogre.h', 'ode/ode.h', 'ode/odecpp.h', 'OgreOde_Core.h', 'OgreOde_Loader.h', - 'Ogreode_Prefab.h'] - + CheckIncludes = ['boost/python.hpp', 'Ogre.h', 'ode/ode.h', 'ode/odecpp.h', 'OgreOde_Core.h', 'OgreOde_Loader.h', + 'Ogreode_Prefab.h'] ModuleName='OgreOde' - + class quickgui: active = True pythonModule = True @@ -876,9 +870,9 @@ name ='quickgui' parent="ogre/gui" ## note the defined for _QuickGUIExport forces non dll usage - if os.name=='nt': + if os.name=='nt': ## note the defined for _QuickGUIExport forces non dll usage - CCFLAGS = ' -DWIN32 -DNDEBUG -DWINDOWS -D_QuickGUIExport="" -D_PRECOMP' + CCFLAGS = ' -DWIN32 -DNDEBUG -DWINDOWS -D_QuickGUIExport="" -D_PRECOMP' # if _PreCompiled: # pchstop = 'boost/python.hpp' # pchbuild = 'buildpch.cpp' @@ -897,7 +891,7 @@ ] CheckIncludes=[] libs=[ Config.LIB_Boost, 'OgreMain' ] - ModuleName="QuickGUI" + ModuleName="QuickGUI" class navi: active = True @@ -905,7 +899,7 @@ version="1.5" parent="ogre/gui" name ='navi' - CCFLAGS = '-D"WIN32" -D"NDEBUG", -D"WINDOWS"' + CCFLAGS = '-D"WIN32" -D"NDEBUG", -D"WINDOWS"' cflags="" include_dirs = [ Config.PATH_Boost ,Config.PATH_INCLUDE_Ogre @@ -921,7 +915,7 @@ 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" + ModuleName="navi" class betagui: active = True @@ -941,7 +935,7 @@ ] CheckIncludes=[] libs=[ Config.LIB_Boost, 'OgreMain' ] - ModuleName="betagui" + ModuleName="betagui" class ogreforests: active = True @@ -960,16 +954,16 @@ ] CheckIncludes=[] libs=[ Config.LIB_Boost, 'OgreMain' ] - ModuleName="ogreforests" + ModuleName="ogreforests" - + class particleuniverse: active = True pythonModule = True version="0.7" name='particleuniverse' parent="ogre/addons" - CCFLAGS = ' ' + CCFLAGS = ' ' cflags="" include_dirs = [ Config.PATH_Boost, Config.PATH_INCLUDE_Ogre, @@ -981,8 +975,8 @@ ] CheckIncludes=[] libs=[ Config.LIB_Boost, 'OgreMain', 'ParticleUniverse' ] - ModuleName="particleuniverse" - + ModuleName="particleuniverse" + class nxogre: active = True pythonModule = True @@ -1004,7 +998,7 @@ # pchincludes = ['boost/python.hpp', 'nxogre.h'] else: - CCFLAGS = ' -DNX_LINUX -DLINUX -DNX_DISABLE_FLUIDS ' + CCFLAGS = ' -DNX_LINUX -DLINUX -DNX_DISABLE_FLUIDS ' lib_dirs = [Config.PATH_LIB_Boost, Config.PATH_LIB_Ogre_OgreMain, Config.PATH_LIB_NxOgre, @@ -1016,10 +1010,10 @@ libs=[ Config.LIB_Boost, 'NxCharacter', 'NxCooking', 'NxExtensions', 'PhysXLoader','OgreMain' , 'NxOgreStatic'] else: libs=[ Config.LIB_Boost, 'NxCharacter', 'NxCooking', 'PhysXCore','PhysXLoader','OgreMain' ] - ModuleName="NxOgre" - - - + ModuleName="NxOgre" + + + class theora: active = True pythonModule = True @@ -1033,18 +1027,18 @@ ] for d in Config.PATH_INCLUDE_OggVorbisTheora: include_dirs.append( d ) - + if os.name == 'nt': CCFLAGS = ' -D"WIN32" ' - + lib_dirs = [Config.PATH_LIB_Boost, Config.PATH_LIB_Ogre_OgreMain, Config.PATH_LIB_Theora, ] CheckIncludes=[] libs=[ Config.LIB_Boost, 'Plugin_TheoraVideoSystem','OgreMain' ] - ModuleName="theora" - + ModuleName="theora" + class plib: active = True pythonModule = True @@ -1057,14 +1051,14 @@ Config.PATH_THIRDPARTY # needed as net.h includes via plib/xxxx ] lib_dirs = [ Config.PATH_LIB_Boost, - ] + ] ModuleName = "plib" CheckIncludes=[] if os.name == "nt": libs = [ Config.LIB_Boost, 'winmm', 'User32','wsock32', 'opengl32.lib','glu32.lib' ] else: libs = [ Config.LIB_Boost ] # Note sure what linux libraries are needed - + class physx: active = True pythonModule = True @@ -1080,7 +1074,7 @@ if os.name == 'nt': CCFLAGS = ' -D"WIN32" ' else: - CCFLAGS = ' -D"LINUX" ' + CCFLAGS = ' -D"LINUX" ' lib_dirs = [Config.PATH_LIB_Boost, Config.PATH_LIB_Ogre_OgreMain, Config.PATH_LIB_PhysX @@ -1090,7 +1084,7 @@ libs=[ Config.LIB_Boost, 'NxCharacter', 'NxCooking', 'NxExtensions', 'PhysXLoader' ] else: libs=[ Config.LIB_Boost, 'NxCharacter', 'NxCooking', 'PhysXCore', 'PhysXLoader' ] - ModuleName="PhysX" + ModuleName="PhysX" class nxogre_09: active = True @@ -1109,7 +1103,7 @@ CCFLAGS = ' -DWIN32 -DNxExport="" ' else: - CCFLAGS = ' -DNX_LINUX -DLINUX -DNX_DISABLE_FLUIDS ' + CCFLAGS = ' -DNX_LINUX -DLINUX -DNX_DISABLE_FLUIDS ' lib_dirs = [Config.PATH_LIB_Boost, Config.PATH_LIB_Ogre_OgreMain, Config.PATH_LIB_PhysX @@ -1119,7 +1113,7 @@ libs=[ Config.LIB_Boost, 'NxCharacter', 'NxCooking', 'NxExtensions', 'PhysXLoader','OgreMain' ] else: libs=[ Config.LIB_Boost, 'NxCharacter', 'NxCooking', 'PhysXCore','PhysXLoader','OgreMain' ] - ModuleName="NxOgre_09" + ModuleName="NxOgre" class ogreal: active = True @@ -1127,37 +1121,37 @@ version="0.3" name='ogreal' parent = "ogre/sound" - + include_dirs = [ Config.PATH_Boost , Config.PATH_INCLUDE_Ogre , Config.PATH_INCLUDE_OgreAL , Config.PATH_INCLUDE_OGG , Config.PATH_INCLUDE_VORBIS , Config.PATH_INCLUDE_OPENAL - ] - if os.name=='nt': + ] + if os.name=='nt': lib_dirs = [ Config.PATH_LIB_Boost - ,Config.PATH_LIB_Ogre_OgreMain + ,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') - ] + ] else: lib_dirs = [ Config.PATH_LIB_Boost - ,Config.PATH_LIB_Ogre_OgreMain - ] - + ,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', + 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', 'vorbis_static','vorbisfile_static','vorbisenc_static', 'OpenAL32', 'EFX-Util'] ## 'OgreAL' -- going to compile OgreAL ourselves - else: - libs=[Config.LIB_Boost, 'OgreMain', - 'ogg', + else: + libs=[Config.LIB_Boost, 'OgreMain', + 'ogg', 'vorbis','vorbisfile','vorbisenc', 'openal'] ## 'OgreAL' -- going to compile OgreAL ourselves ModuleName = 'OgreAL' @@ -1178,7 +1172,7 @@ [0, "./configure --prefix=%s\nmake\nmake install" % PREFIX, os.path.join(os.getcwd(), "openal-0.0.8")] ] - + class ogrevideoffmpeg: active = True pythonModule = True @@ -1201,7 +1195,7 @@ libs=[ Config.LIB_Boost, 'OgreMain', 'avformat-52', 'avcodec-51', 'avutil-49' ] else: libs=[ Config.LIB_Boost, 'OgreMain', 'avformat', 'avcodec', 'avutil', 'z', 'GL', 'GLU', 'Xxf86vm', 'Xext', 'X11' ] - ModuleName="ogrevideoffmpeg" + ModuleName="ogrevideoffmpeg" class ogredshow: active = False @@ -1209,9 +1203,9 @@ version="0.1" name='ogredshow' parent="ogre/addons" - if os.name=='nt': + if os.name=='nt': ## note the defined for _ETManagerExport forces non dll usage - CCFLAGS = ' -DWIN32 -DNDEBUG -DWINDOWS -D_ETManagerExport="" ' + CCFLAGS = ' -DWIN32 -DNDEBUG -DWINDOWS -D_ETManagerExport="" ' else: CCFLAGS = '' cflags = "" @@ -1221,12 +1215,12 @@ ] lib_dirs = [Config.PATH_LIB_Boost, Config.PATH_LIB_Ogre_OgreMain, - + ] CheckIncludes=[] libs=[ Config.LIB_Boost, 'OgreMain','Strmiids' , 'ole32'] - ModuleName="ogredshow" - + ModuleName="ogredshow" + class et: ## editable terrain active = True pythonModule = True @@ -1242,9 +1236,9 @@ Config.PATH_et ] ModuleName = 'et' - CheckIncludes = ['boost/python.hpp'] + CheckIncludes = ['boost/python.hpp'] cflags = "" - + class bullet: active = True pythonModule = True @@ -1259,7 +1253,7 @@ lib_dirs = [ Config.PATH_LIB_Boost , Config.PATH_LIB_Bullet ] - include_dirs = [ Config.PATH_Boost + include_dirs = [ Config.PATH_Boost , Config.PATH_INCLUDE_Bullet ] source=[ @@ -1273,9 +1267,9 @@ ] ModuleName = 'bullet' - CheckIncludes = ['boost/python.hpp'] + CheckIncludes = ['boost/python.hpp'] cflags = "" - + class ogrebulletc: # active = True pythonModule = True @@ -1283,16 +1277,16 @@ version = "1.0" cflags = "" parent = "ogre/physics" - libs = [Config.LIB_Boost, 'OgreMain', + libs = [Config.LIB_Boost, 'OgreMain', 'LibBulletCollision', 'LibBulletDynamics' ] if os.name == 'nt': - libs.append('LibBulletMath') + libs.append('LibBulletMath') include_dirs = [Config.PATH_Boost , Config.PATH_INCLUDE_Bullet , os.path.join(Config.PATH_OgreBullet, 'Collisions' ) - , Config.PATH_INCLUDE_Ogre - , Config.PATH_INCLUDE_Ogre_Dependencies + , Config.PATH_INCLUDE_Ogre + , Config.PATH_INCLUDE_Ogre_Dependencies ] lib_dirs = [ Config.PATH_LIB_Boost ,Config.PATH_LIB_Bullet @@ -1303,7 +1297,7 @@ else: CCFLAGS = ' -D_PRECOMP ' ModuleName = 'OgreBulletC' - CheckIncludes=['boost/python.hpp', 'Ogre.h'] + CheckIncludes=['boost/python.hpp', 'Ogre.h'] class ogrebulletd: # active = True @@ -1312,17 +1306,17 @@ name='ogrebulletd' cflags = "" parent = "ogre/physics" - libs = [Config.LIB_Boost, 'OgreMain', + libs = [Config.LIB_Boost, 'OgreMain', 'LibBulletCollision', 'LibBulletDynamics' ] if os.name == 'nt': - libs.append('LibBulletMath') + libs.append('LibBulletMath') include_dirs = [Config.PATH_Boost , Config.PATH_INCLUDE_Bullet , os.path.join(Config.PATH_OgreBullet, 'Collisions' ) , os.path.join(Config.PATH_OgreBullet, 'Dynamics' ) - , Config.PATH_INCLUDE_Ogre - , Config.PATH_INCLUDE_Ogre_Dependencies + , Config.PATH_INCLUDE_Ogre + , Config.PATH_INCLUDE_Ogre_Dependencies ] lib_dirs = [ Config.PATH_LIB_Boost ,Config.PATH_LIB_Bullet @@ -1333,8 +1327,8 @@ else: CCFLAGS = ' -D_PRECOMP ' ModuleName = 'OgreBulletD' - CheckIncludes=['boost/python.hpp', 'Ogre.h'] - + CheckIncludes=['boost/python.hpp', 'Ogre.h'] + class noise: active = True pythonModule = True @@ -1351,8 +1345,8 @@ ] CheckIncludes=[] libs=[ Config.LIB_Boost] - ModuleName="noise" - + ModuleName="noise" + class watermesh: active = True pythonModule = True @@ -1369,8 +1363,8 @@ ] CheckIncludes=[] libs=[ Config.LIB_Boost, 'OgreMain' ] - ModuleName="watermesh" - + ModuleName="watermesh" + class ofusion: active = True pythonModule = True @@ -1387,8 +1381,8 @@ ] CheckIncludes=[] libs=[ Config.LIB_Boost, 'OgreMain' ] - ModuleName="ofusion" - + ModuleName="ofusion" + class cadunetree: active = True pythonModule = True @@ -1405,7 +1399,7 @@ ] CheckIncludes=[] libs=[ Config.LIB_Boost, 'OgreMain' ] - ModuleName="cadunetree" + ModuleName="cadunetree" class opensteer: active = True @@ -1423,7 +1417,7 @@ ] CheckIncludes=[] libs=[ Config.LIB_Boost, 'opensteer' ] - ModuleName="opensteer" + ModuleName="opensteer" class hydrax: active = True @@ -1442,16 +1436,16 @@ Config.PATH_LIB_Ogre_OgreMain ] except: - pass + pass CheckIncludes=[] libs=[ Config.LIB_Boost, 'OgreMain', 'hydrax' ] - ModuleName="hydrax" - + ModuleName="hydrax" + ############################################################################################ ## Here is the master list.... ## Keep eveything here in lowercase so the over rides work :) - + projects = { 'ois' : ois , 'ogre' : ogre @@ -1485,7 +1479,7 @@ , 'particleuniverse' : particleuniverse , 'cadunetree' : cadunetree ,'opensteer' : opensteer -} +} # # let's setup some defaults @@ -1516,14 +1510,14 @@ # # break # # if not found: # # print "WARNING: Unable to find %s library (%s class) in lib_dirs" % (libfile, name) - + # # a couple of specials that should be done differently gccxml_bin = Config.gccxml_bin -pyplusplus_install_dir = Config.pyplusplus_install_dir - -rpath= Config.RPATH - +pyplusplus_install_dir = Config.pyplusplus_install_dir + +rpath= Config.RPATH + for name, cls in projects.items(): # little hack to allow overriding of settings from the PythonOgreConfig_xxxxx.py file @@ -1532,10 +1526,10 @@ _class = Config.__dict__[name] # get the class for key, value in _class.__dict__.items(): if not key.startswith('_'): - cls.__dict__[key] = value - print "Set %s.%s to %s" % (name, key, value) - - + cls.__dict__[key] = value + print "Set %s.%s to %s" % (name, key, value) + + ##CheckPaths( cls, name ) cls.root_dir = os.path.join( root_dir, 'code_generators', name ) cls.dir_name = name + '_' + str(cls.version) @@ -1543,8 +1537,8 @@ cls.cache_file = os.path.join( declarations_cache_dir, cls.dir_name + '_cache.xml' ) if isMac(): # On the mac the Ogre library is lined in with the -framework command in scons - try: - cls.libs.remove('OgreMain') + try: + cls.libs.remove('OgreMain') except: pass ## and we have a commond set of flags that I will set here... This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lak...@us...> - 2008-05-18 15:01:22
|
Revision: 587 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=587&view=rev Author: lakin_wecker Date: 2008-05-18 08:01:23 -0700 (Sun, 18 May 2008) Log Message: ----------- Branching to 'linux-fixes-summer-2008' Added Paths: ----------- branches/linux-fixes-summer-2008/ Copied: branches/linux-fixes-summer-2008 (from rev 586, trunk) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2008-04-18 02:21:25
|
Revision: 586 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=586&view=rev Author: andy_miller Date: 2008-04-17 19:21:30 -0700 (Thu, 17 Apr 2008) Log Message: ----------- Fix boost jame file back to 1.34 Modified Paths: -------------- trunk/python-ogre/boost/libs/python/build/Jamfile.v2 Modified: trunk/python-ogre/boost/libs/python/build/Jamfile.v2 =================================================================== --- trunk/python-ogre/boost/libs/python/build/Jamfile.v2 2008-04-18 01:57:41 UTC (rev 585) +++ trunk/python-ogre/boost/libs/python/build/Jamfile.v2 2008-04-18 02:21:30 UTC (rev 586) @@ -22,13 +22,12 @@ } } +if [ python.configured ] { + project boost/python - : source-location ../src - ; + : source-location ../src + ; -rule cond ( test ? : yes * : no * ) { if $(test) { return $(yes) ; } else { return $(no) ; } } -rule unless ( test ? : yes * : no * ) { if ! $(test) { return $(yes) ; } else { return $(no) ; } } - lib boost_python : # sources numeric.cpp @@ -59,10 +58,8 @@ wrapper.cpp import.cpp exec.cpp - object/function_doc_signature.cpp indexing/indexing_slice.cpp indexing/python_iterator.cpp - : # requirements <link>static:<define>BOOST_PYTHON_STATIC_LIB <define>BOOST_PYTHON_SOURCE @@ -79,19 +76,19 @@ # python_for_extensions is a target defined by Boost.Build to # provide the Python include paths, and on Windows, the Python # import library, as usage requirements. - [ cond [ python.configured ] : <library>/python//python_for_extensions ] - - # we prevent building when there is no python available - # as it's not possible anyway, and to cause dependents to - # fail to build - [ unless [ python.configured ] : <build>no ] - + <library>/python//python_for_extensions + <python-debugging>on:<define>BOOST_DEBUG_PYTHON + : # default build <link>shared : # usage requirements <link>static:<define>BOOST_PYTHON_STATIC_LIB <python-debugging>on:<define>BOOST_DEBUG_PYTHON ; - -boost-install boost_python ; +} +else +{ + ECHO "warning: Python location is not configured" ; + ECHO "warning: the Boost.Python library won't be built" ; +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2008-04-18 01:57:35
|
Revision: 585 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=585&view=rev Author: andy_miller Date: 2008-04-17 18:57:41 -0700 (Thu, 17 Apr 2008) Log Message: ----------- General updates Modified Paths: -------------- trunk/python-ogre/PythonOgreConfig_nt.py trunk/python-ogre/environment.py trunk/python-ogre/patch/ogre.patch Modified: trunk/python-ogre/PythonOgreConfig_nt.py =================================================================== --- trunk/python-ogre/PythonOgreConfig_nt.py 2008-04-15 05:26:49 UTC (rev 584) +++ trunk/python-ogre/PythonOgreConfig_nt.py 2008-04-18 01:57:41 UTC (rev 585) @@ -13,11 +13,17 @@ ## path to the root of your boost dir, should have 'libs', 'boost' subdirectories -PATH_Boost = os.path.join(BASE_DIR, 'boost') +PATH_Boost = os.path.join(BASE_DIR, 'boost_1_34_1') +# PATH_Boost = os.path.join(BASE_DIR, 'boost_1_35_0') +PATH_Boost = os.path.join(BASE_DIR, 'boost-trunk') + ## 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, PATH_Boost,'bin.v2/libs/python/build/msvc-8.0/release/threading-multi') +##PATH_LIB_Boost = os.path.join(BASE_DIR, 'boost/bin.v2/libs/python2.5/build/msvc-9.0express/release/threading-multi') ## and the name of the boost python library -LIB_Boost = r'boost_python-vc80-mt-1_35' +LIB_Boost = r'boost_python-vc90-mt-1_35' +LIB_Boost = r'boost_python-vc80-mt-1_34_1' +# LIB_Boost = r'boost_python-vc-mt-1_35' # in Linux we need to code in the Relative path for the library RPATH="" Modified: trunk/python-ogre/environment.py =================================================================== --- trunk/python-ogre/environment.py 2008-04-15 05:26:49 UTC (rev 584) +++ trunk/python-ogre/environment.py 2008-04-18 01:57:41 UTC (rev 585) @@ -178,18 +178,27 @@ class gccxml: pythonModule = False active = True + base = 'gccxml' + source = [ + [cvs, " -d :pserver:an...@ww...:/cvsroot/GCC_XML co "+base, os.getcwd()] + ] if isLinux() or isMac(): - base = 'gccxml' - source = [ - [cvs, " -d :pserver:an...@ww...:/cvsroot/GCC_XML co "+base, os.getcwd()] - ] - buildCmds = [ [0,"mkdir -p gccxml-build", ''], [0,"cmake ../gccxml -DCMAKE_INSTALL_PREFIX:PATH="+ PREFIX,os.path.join(os.getcwd(),'gccxml-build')], [0,"make", os.path.join(os.getcwd(),'gccxml-build')], [0,"make install",os.path.join(os.getcwd(),'gccxml-build')] ] + else: + + buildCmds = [ + [0,'echo Please use CMAKE to create a msvc build projects for gccxml',''], + [0,'echo ie. Run Cmake (from the windows menu)',''], + [0,'echo specific the gccxml for both directories and run configure',''], + [0,'echo ignore any errors - you will need to run configure twice and then OK',''], + [0,'echo Now run MSVC and load the gccxml project (in the gccxml directory) and build it',''] + ] + class install: pythonModule = False active = True @@ -236,16 +245,27 @@ class pygccxml: pythonModule = False active = True - if isLinux() or isMac(): - base = 'pygccxml' + base = 'pygccxml' + if isLinux() or isMac() : source = [ [svn, " co -r 1234 http://pygccxml.svn.sourceforge.net/svnroot/pygccxml "+base, os.getcwd()] ] + source = [ + [svn, " co http://pygccxml.svn.sourceforge.net/svnroot/pygccxml "+base, os.getcwd()] + ] buildCmds = [ [0,"python setup.py install --prefix="+ PREFIX , os.path.join (os.getcwd(), base, "pygccxml_dev") ], [0,"python setup.py install --prefix=" + PREFIX , os.path.join (os.getcwd(), base, "pyplusplus_dev") ] ] + if isWindows(): + source = [ + [svn, " co http://pygccxml.svn.sourceforge.net/svnroot/pygccxml "+base, os.getcwd()] + ] + buildCmds = [ + [0,"python setup.py install " , os.path.join (os.getcwd(), base, "pygccxml_dev") ], + [0,"python setup.py install " , os.path.join (os.getcwd(), base, "pyplusplus_dev") ] + ] class cg: pythonModule = False @@ -342,17 +362,23 @@ [0,tar + " xzf "+ os.path.join(downloadPath,base) + ".tar.gz --overwrite", ''], # unpack it [0,cp + "-R * " + PREFIX, os.path.join (os.getcwd(), base) ] # copy to our bin area ] - + if isWindows(): + source = [ [wget, "http://www.cmake.org/files/v2.4/cmake-2.4.8-win32-x86.exe", downloadPath ]] + buildCmds = [ + [0, os.path.join(downloadPath, "cmake-2.4.8-win32-x86.exe"), '' ] + ] + + class scons: pythonModule = False active = True - base = 'scons-0.97.0d20071212' + base = 'scons-0.98.0' source = [ [wget, "http://downloads.sourceforge.net/scons/"+base+".tar.gz",downloadPath], ] # the utils in Windows don't handle paths or tar spawing gzip hence the work arounds - if isLinux(): + if isLinux() or isMac(): buildCmds = [ [0, tar + " zxf " + os.path.join(downloadPath,base)+".tar.gz --overwrite",'' ], [0,"python setup.py install --prefix=%s" % PREFIX , os.path.join (os.getcwd(), base) ] @@ -361,7 +387,7 @@ else: buildCmds = unTarGz( base, downloadPath ) +\ [ - [0,"python setup.py install --prefix=%s" % PREFIX , os.path.join (os.getcwd(), base) ] + [0,"python setup.py install ", os.path.join (os.getcwd(), base) ] ] class boost: ## also included bjam @@ -369,6 +395,7 @@ version = "3.4" pythonModule = False ModuleName = "" + base = 'boost_1_35_0' #this doesn't work yet AJM 17/04/08 base = 'boost_1_34_1' myLibraryPaths = [ 'boost/bin.v2/libs/python2.5/build/msvc-8.0/release/threading-multi' ] @@ -399,8 +426,8 @@ [0, tar + ' zxf ' + os.path.join(downloadPath, base) + '.tar.gz', ''], [0,'chmod -R +rw *', os.path.join(os.getcwd(), base ) ], [0,cp + ' -R '+os.path.join('python-ogre','boost','*') +' ' + base , ''], # need to overwrite the boost with our files - [0, sed_ + " 's/BJAM_CONFIG=\"\"/BJAM_CONFIG=release/' boost_1_34_1/configure", '' ], - [0, sed_ + " s/'BOOST_PYTHON_MAX_ARITY 15'/'BOOST_PYTHON_MAX_ARITY 19'/ boost_1_34_1/boost/python/detail/preprocessor.hpp", ''], + [0, sed_ + " 's/BJAM_CONFIG=\"\"/BJAM_CONFIG=release/' boost_1_35_0/configure", '' ], + [0, sed_ + " s/'BOOST_PYTHON_MAX_ARITY 15'/'BOOST_PYTHON_MAX_ARITY 19'/ boost_1_35_0/boost/python/detail/preprocessor.hpp", ''], [0,"./configure --with-libraries=python --prefix=%s --without-icu" % PREFIX, os.path.join(os.getcwd(), base )], [0,'make', os.path.join(os.getcwd(), base )], [0,'make install', os.path.join(os.getcwd(), base )], @@ -409,20 +436,20 @@ if isWindows(): bjambase = 'boost-jam-3.1.16-1-ntx86' source = [ - [wget,'http://downloads.sourceforge.net/boost/boost-jam-3.1.16-1-ntx86.zip',downloadPath] , - [wget,'http://downloads.sourceforge.net/boost/boost_1_34_1.tar.gz',downloadPath] + [wget,'http://downloads.sourceforge.net/boost/'+bjambase+'.zip',downloadPath] , + [wget,'http://downloads.sourceforge.net/boost/'+base+'.zip',downloadPath] ] - buildCmds = unTarGz( base, downloadPath ) +\ - [ - [0,cp + ' -r '+os.path.join('python-ogre','boost') + '* ' + base , ''], # need to overwrite the boost with our files - [0,'sed -i s/BJAM_CONFIG=\"\"/BJAM_CONFIG=release/ boost_1_34_1/configure', '' ], - [0,"sed -i s/'BOOST_PYTHON_MAX_ARITY 15'/'BOOST_PYTHON_MAX_ARITY 19'/ boost_1_34_1/boost/python/detail/preprocessor.hpp", ''], - [0, unzip + " " + os.path.join ( downloadPath, bjambase) + ".zip", ''], + buildCmds = [ + [0,unzip + os.path.join(downloadPath, bjambase+".zip"), ''], + [0,unzip + os.path.join(downloadPath, base + ".zip"), ''], + [0,'xcopy /s /i /y '+os.path.join('python-ogre','boost') + ' ' + base , ''], # need to overwrite the boost with our files + [0,'sed -i s/BJAM_CONFIG=\"\"/BJAM_CONFIG=release/ '+base+'/configure', '' ], + [0,'sed -i s/"BOOST_PYTHON_MAX_ARITY 15"/"BOOST_PYTHON_MAX_ARITY 19"/ '+base+'/boost/python/detail/preprocessor.hpp', ''], + [0,os.path.join(os.getcwd(), bjambase, "bjam.exe") + ' release --with-python --toolset=msvc-8',os.path.join(os.getcwd(),base)] ] - BuildCmds = [] # commands to build the library with - + #################################################### @@ -450,6 +477,18 @@ # if isWindows(): + + source = [ + [ wget, "http://downloads.sourceforge.net/ogre/OgreDependencies_VC8SP1_Eihort_20071227.zip", downloadPath], + [ wget, "http://downloads.sourceforge.net/ogre/ogre-win32-v1-4-7.zip", downloadPath], + ] + buildCmds = [ + [0, unzip + os.path.join(downloadPath,"ogre-win32-v1-4-7.zip"),os.getcwd() ], + [0, unzip + os.path.join(downloadPath,"OgreDependencies_VC8SP1_Eihort_20071227.zip"), + os.path.join(os.getcwd(), 'ogrenew') ], + [0, "patch -s -N -i ./python-ogre/patch/ogre.patch -p0 ", os.getcwd()] + ] + # requirements to build a precompiled header on the fly if _PreCompiled: pchstop = 'python_ogre_precompiled.h' @@ -567,9 +606,9 @@ ] if isWindows(): base = "ois" - source = [ wget,"http://downloads.sourceforge.net/wgois/ois_1.2.0.zip", downloadPath] + source = [ [wget,"http://downloads.sourceforge.net/wgois/ois_1.2.0.zip", downloadPath] ] buildCmds = [ - [0, unzip + downloadPath + "/" + "ois_1.2.0.zip" ,os.getcwd() ], + [0, unzip + downloadPath + "/" + "ois_1.2.0.zip" ,os.getcwd() ] # [0, '"c:/Program Files/Microsoft Visual Studio 8/vc/vcpackages/vcbuild.exe" /useenv ois_VC8.sln ', os.path.join(os.getcwd(), base, 'Win32' )], # [0, VCBUILD + " ois_vc8.sln " + "\"Release|Win32\"", os.path.join(os.getcwd(), base, 'Win32' )] ] @@ -1496,7 +1535,7 @@ cls.__dict__[key] = value print "Set %s.%s to %s" % (name, key, value) - + ##CheckPaths( cls, name ) cls.root_dir = os.path.join( root_dir, 'code_generators', name ) cls.dir_name = name + '_' + str(cls.version) Modified: trunk/python-ogre/patch/ogre.patch =================================================================== --- trunk/python-ogre/patch/ogre.patch 2008-04-15 05:26:49 UTC (rev 584) +++ trunk/python-ogre/patch/ogre.patch 2008-04-18 01:57:41 UTC (rev 585) @@ -1,90 +1,91 @@ ---- ogrenew/configure.in 2007-05-15 22:43:31.000000000 +0800 -+++ ogrenew/configure.in 2007-05-15 22:43:18.000000000 +0800 -@@ -59,6 +58,7 @@ - ;; - esac - ]) -+CFLAGS_VISIBILITY="" - AC_SUBST(CFLAGS_VISIBILITY) - AC_LANG_POP - ---- ogrenew/OgreMain/include/OgreDataStream.h 23 Aug 2006 08:18:33 -0000 1.12 -+++ ogrenew/OgreMain/include/OgreDataStream.h 24 Nov 2007 00:35:47 -0000 -@@ -33,6 +33,7 @@ - #include "OgreString.h" - #include "OgreSharedPtr.h" - #include <istream> -+#include <stdexcept> - - namespace Ogre { - -@@ -79,7 +80,7 @@ - @param count Number of bytes to read - @returns The number of bytes read - */ -- virtual size_t read(void* buf, size_t count) = 0; -+ virtual size_t read(void* buf, size_t count) { throw std::runtime_error ( std::string ("Virtual function DataStream::read called!") ); } - /** Get a single line from the stream. - @remarks - The delimiter character is not included in the data -@@ -146,7 +147,7 @@ - /** Returns the total size of the data to be read from the stream, - or 0 if this is indeterminate for this stream. - */ -- size_t size(void) const { return mSize; } -+ virtual size_t size(void) const { return mSize; } - - /** Close the stream; this makes further operations invalid. */ - virtual void close(void) = 0; - ---- ogrenew/OgreMain/include/OgreHardwareBuffer.h 23 Aug 2006 08:18:33 -0000 1.17 -+++ ogrenew/OgreMain/include/OgreHardwareBuffer.h 24 Nov 2007 00:37:00 -0000 -@@ -31,6 +31,8 @@ - - // Precompiler options - #include "OgrePrerequisites.h" -+#include <stdexcept> -+ - - namespace Ogre { - -@@ -244,7 +246,7 @@ - @param pDest The area of memory in which to place the data, must be large enough to - accommodate the data! - */ -- virtual void readData(size_t offset, size_t length, void* pDest) = 0; -+ virtual void readData(size_t offset, size_t length, void* pDest) { throw std::runtime_error ( std::string ("Virtual function HardwareBuffer::readData called!") ); } - /** Writes data to the buffer from an area of system memory; note that you must - ensure that your buffer is big enough. - @param offset The byte offset from the start of the buffer to start writing - ---- ogrenew/OgreMain/include/OgreRenderQueueListener.h 23 Aug 2006 08:18:35 -0000 1.10 -+++ ogrenew/OgreMain/include/OgreRenderQueueListener.h 24 Nov 2007 00:34:52 -0000 -@@ -31,6 +31,8 @@ - - #include "OgrePrerequisites.h" - #include "OgreRenderQueue.h" -+#include <stdexcept> -+ - - namespace Ogre { - -@@ -65,7 +67,7 @@ - for this queue group. - */ - virtual void renderQueueStarted(uint8 queueGroupId, const String& invocation, -- bool& skipThisInvocation) = 0; -+ bool& skipThisInvocation) { throw std::runtime_error ( std::string ("Virtual function RenderQueueListener::renderQueueStarted called!") ); } - - /** Event raised after a queue group is rendered. - @remarks -@@ -80,7 +82,7 @@ - events will also be fired for it again. - */ - virtual void renderQueueEnded(uint8 queueGroupId, const String& invocation, -- bool& repeatThisInvocation) = 0; -+ bool& repeatThisInvocation) { throw std::runtime_error ( std::string ("Virtual function RenderQueueListener::renderQueueEnded called!") ); } - }; - - } - + +--- ogrenew/configure.in 2007-05-15 22:43:31.000000000 +0800 ++++ ogrenew/configure.in 2007-05-15 22:43:18.000000000 +0800 +@@ -59,6 +58,7 @@ + ;; + esac + ]) ++CFLAGS_VISIBILITY="" + AC_SUBST(CFLAGS_VISIBILITY) + AC_LANG_POP + +--- ogrenew/OgreMain/include/OgreDataStream.h 23 Aug 2006 08:18:33 -0000 1.12 ++++ ogrenew/OgreMain/include/OgreDataStream.h 24 Nov 2007 00:35:47 -0000 +@@ -33,6 +33,7 @@ + #include "OgreString.h" + #include "OgreSharedPtr.h" + #include <istream> ++#include <stdexcept> + + namespace Ogre { + +@@ -79,7 +80,7 @@ + @param count Number of bytes to read + @returns The number of bytes read + */ +- virtual size_t read(void* buf, size_t count) = 0; ++ virtual size_t read(void* buf, size_t count) { throw std::runtime_error ( std::string ("Virtual function DataStream::read called!") ); } + /** Get a single line from the stream. + @remarks + The delimiter character is not included in the data +@@ -146,7 +147,7 @@ + /** Returns the total size of the data to be read from the stream, + or 0 if this is indeterminate for this stream. + */ +- size_t size(void) const { return mSize; } ++ virtual size_t size(void) const { return mSize; } + + /** Close the stream; this makes further operations invalid. */ + virtual void close(void) = 0; + +--- ogrenew/OgreMain/include/OgreHardwareBuffer.h 23 Aug 2006 08:18:33 -0000 1.17 ++++ ogrenew/OgreMain/include/OgreHardwareBuffer.h 24 Nov 2007 00:37:00 -0000 +@@ -31,6 +31,8 @@ + + // Precompiler options + #include "OgrePrerequisites.h" ++#include <stdexcept> ++ + + namespace Ogre { + +@@ -244,7 +246,7 @@ + @param pDest The area of memory in which to place the data, must be large enough to + accommodate the data! + */ +- virtual void readData(size_t offset, size_t length, void* pDest) = 0; ++ virtual void readData(size_t offset, size_t length, void* pDest) { throw std::runtime_error ( std::string ("Virtual function HardwareBuffer::readData called!") ); } + /** Writes data to the buffer from an area of system memory; note that you must + ensure that your buffer is big enough. + @param offset The byte offset from the start of the buffer to start writing + +--- ogrenew/OgreMain/include/OgreRenderQueueListener.h 23 Aug 2006 08:18:35 -0000 1.10 ++++ ogrenew/OgreMain/include/OgreRenderQueueListener.h 24 Nov 2007 00:34:52 -0000 +@@ -31,6 +31,8 @@ + + #include "OgrePrerequisites.h" + #include "OgreRenderQueue.h" ++#include <stdexcept> ++ + + namespace Ogre { + +@@ -65,7 +67,7 @@ + for this queue group. + */ + virtual void renderQueueStarted(uint8 queueGroupId, const String& invocation, +- bool& skipThisInvocation) = 0; ++ bool& skipThisInvocation) { throw std::runtime_error ( std::string ("Virtual function RenderQueueListener::renderQueueStarted called!") ); } + + /** Event raised after a queue group is rendered. + @remarks +@@ -80,7 +82,7 @@ + events will also be fired for it again. + */ + virtual void renderQueueEnded(uint8 queueGroupId, const String& invocation, +- bool& repeatThisInvocation) = 0; ++ bool& repeatThisInvocation) { throw std::runtime_error ( std::string ("Virtual function RenderQueueListener::renderQueueEnded called!") ); } + }; + + } + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2008-04-15 05:26:43
|
Revision: 584 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=584&view=rev Author: andy_miller Date: 2008-04-14 22:26:49 -0700 (Mon, 14 Apr 2008) Log Message: ----------- Fix for latest version of boost 1-35... Modified Paths: -------------- trunk/python-ogre/boost/libs/python/build/Jamfile.v2 Removed Paths: ------------- trunk/python-ogre/boost/tools/ Modified: trunk/python-ogre/boost/libs/python/build/Jamfile.v2 =================================================================== --- trunk/python-ogre/boost/libs/python/build/Jamfile.v2 2008-04-05 07:54:56 UTC (rev 583) +++ trunk/python-ogre/boost/libs/python/build/Jamfile.v2 2008-04-15 05:26:49 UTC (rev 584) @@ -22,12 +22,13 @@ } } -if [ python.configured ] { - project boost/python - : source-location ../src - ; + : source-location ../src + ; +rule cond ( test ? : yes * : no * ) { if $(test) { return $(yes) ; } else { return $(no) ; } } +rule unless ( test ? : yes * : no * ) { if ! $(test) { return $(yes) ; } else { return $(no) ; } } + lib boost_python : # sources numeric.cpp @@ -58,8 +59,10 @@ wrapper.cpp import.cpp exec.cpp + object/function_doc_signature.cpp indexing/indexing_slice.cpp indexing/python_iterator.cpp + : # requirements <link>static:<define>BOOST_PYTHON_STATIC_LIB <define>BOOST_PYTHON_SOURCE @@ -76,19 +79,19 @@ # python_for_extensions is a target defined by Boost.Build to # provide the Python include paths, and on Windows, the Python # import library, as usage requirements. - <library>/python//python_for_extensions - + [ cond [ python.configured ] : <library>/python//python_for_extensions ] + + # we prevent building when there is no python available + # as it's not possible anyway, and to cause dependents to + # fail to build + [ unless [ python.configured ] : <build>no ] + <python-debugging>on:<define>BOOST_DEBUG_PYTHON - : # default build <link>shared : # usage requirements <link>static:<define>BOOST_PYTHON_STATIC_LIB <python-debugging>on:<define>BOOST_DEBUG_PYTHON ; -} -else -{ - ECHO "warning: Python location is not configured" ; - ECHO "warning: the Boost.Python library won't be built" ; -} + +boost-install boost_python ; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2008-04-05 07:54:49
|
Revision: 583 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=583&view=rev Author: andy_miller Date: 2008-04-05 00:54:56 -0700 (Sat, 05 Apr 2008) Log Message: ----------- Various thirdparty updates, PU 0.7 support etc Modified Paths: -------------- trunk/python-ogre/PythonOgreConfig_nt.py trunk/python-ogre/ThirdParty/caelum/CaelumPrecompiled.h trunk/python-ogre/ThirdParty/caelum/CaelumPrerequisites.h trunk/python-ogre/ThirdParty/caelum/CaelumSystem.cpp trunk/python-ogre/ThirdParty/caelum/CaelumSystem.h trunk/python-ogre/ThirdParty/caelum/GroundFog.cpp trunk/python-ogre/ThirdParty/caelum/GroundFog.h trunk/python-ogre/ThirdParty/caelum/LayeredClouds.cpp trunk/python-ogre/ThirdParty/caelum/LayeredClouds.h trunk/python-ogre/ThirdParty/caelum/SkyColourModel.cpp trunk/python-ogre/ThirdParty/caelum/SkyDome.cpp trunk/python-ogre/ThirdParty/caelum/SkyDome.h trunk/python-ogre/ThirdParty/caelum/SolarSystemModel.cpp trunk/python-ogre/ThirdParty/caelum/Starfield.cpp trunk/python-ogre/ThirdParty/caelum/Starfield.h trunk/python-ogre/ThirdParty/caelum/Sun.cpp trunk/python-ogre/ThirdParty/caelum/Sun.h trunk/python-ogre/ThirdParty/forests/BatchedGeometry.cpp trunk/python-ogre/ThirdParty/forests/BatchedGeometry.h trunk/python-ogre/ThirdParty/forests/ImpostorPage.cpp trunk/python-ogre/ThirdParty/forests/PagedGeometry.h trunk/python-ogre/ThirdParty/forests/TreeLoader2D.cpp trunk/python-ogre/ThirdParty/forests/TreeLoader3D.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIPanel.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIPanel.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIScrollPane.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIScrollPane.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIWidget.cpp 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/particleuniverse/generate_code.py trunk/python-ogre/environment.py Modified: trunk/python-ogre/PythonOgreConfig_nt.py =================================================================== --- trunk/python-ogre/PythonOgreConfig_nt.py 2008-04-01 04:05:25 UTC (rev 582) +++ trunk/python-ogre/PythonOgreConfig_nt.py 2008-04-05 07:54:56 UTC (rev 583) @@ -53,7 +53,7 @@ PATH_plib = os.path.join(PATH_THIRDPARTY, 'plib') PATH_et = os.path.join(PATH_THIRDPARTY, 'et') PATH_caelum = os.path.join(PATH_THIRDPARTY, 'caelum') -PATH_NxOgre= os.path.join(PATH_THIRDPARTY, 'nxogre') +PATH_NxOgre= os.path.join(BASE_DIR, 'nxogre') PATH_NxOgre_09= os.path.join(PATH_THIRDPARTY, 'nxogre_0.9') PATH_watermesh= os.path.join(PATH_THIRDPARTY, 'watermesh') PATH_noise= os.path.join(PATH_THIRDPARTY, 'noise') @@ -96,7 +96,7 @@ 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_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') @@ -140,9 +140,8 @@ 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_NxOgre= PATH_NxOgre PATH_INCLUDE_NxOgre_09= PATH_NxOgre_09 -# PATH_INCLUDE_NxOgre= os.path.join(PATH_NxOgre, 'include') +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 Modified: trunk/python-ogre/ThirdParty/caelum/CaelumPrecompiled.h =================================================================== --- trunk/python-ogre/ThirdParty/caelum/CaelumPrecompiled.h 2008-04-01 04:05:25 UTC (rev 582) +++ trunk/python-ogre/ThirdParty/caelum/CaelumPrecompiled.h 2008-04-05 07:54:56 UTC (rev 583) @@ -18,4 +18,8 @@ along with Caelum. If not, see <http://www.gnu.org/licenses/>. */ +#ifdef __APPLE__ +#include "Ogre/Ogre.h" +#else #include "Ogre.h" +#endif Modified: trunk/python-ogre/ThirdParty/caelum/CaelumPrerequisites.h =================================================================== --- trunk/python-ogre/ThirdParty/caelum/CaelumPrerequisites.h 2008-04-01 04:05:25 UTC (rev 582) +++ trunk/python-ogre/ThirdParty/caelum/CaelumPrerequisites.h 2008-04-05 07:54:56 UTC (rev 583) @@ -22,22 +22,28 @@ #define CAELUMPREREQUISITES_H // Include external headers +#ifdef __APPLE__ +#include "Ogre/Ogre.h" +#else #include "Ogre.h" +#endif -// Define the dll export qualifier if compiling for Windows -// // #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32 -// // #ifdef CAELUM_LIB -// // #define DllExport __declspec (dllexport) -// // #else -// // #ifdef __MINGW32__ -// // #define DllExport -// // #else -// // #define DllExport __declspec (dllimport) -// // #endif -// // #endif -// // #else +// // Define the dll export qualifier if compiling for Windows +// #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32 +// #ifdef CAELUM_LIB +// #define DllExport __declspec (dllexport) +// #else +// #ifdef __MINGW32__ +// #define DllExport +// #else +// #define DllExport __declspec (dllimport) +// #endif +// #endif +// #elif OGRE_PLATFORM == OGRE_PLATFORM_APPLE +// #define DllExport __attribute__ ((visibility("default"))) +// #else #define DllExport -// // #endif +// #endif // Define the version code #define CAELUM_VERSION_MAIN 0 Modified: trunk/python-ogre/ThirdParty/caelum/CaelumSystem.cpp =================================================================== --- trunk/python-ogre/ThirdParty/caelum/CaelumSystem.cpp 2008-04-01 04:05:25 UTC (rev 582) +++ trunk/python-ogre/ThirdParty/caelum/CaelumSystem.cpp 2008-04-05 07:54:56 UTC (rev 583) @@ -39,6 +39,7 @@ LOG ("Initialising Caelum system..."); mOgreRoot = root; mSceneMgr = sceneMgr; + mCaelumRootNode = mSceneMgr->getRootSceneNode()->createChildSceneNode("CaelumRoot"); mCleanup = false; RESOURCE_GROUP_NAME = resGroupName; @@ -79,22 +80,22 @@ this->setSkyColourModel (new SkyColourModel ()); } if (componentsToCreate & CAELUM_COMPONENT_SKY_DOME) { - this->setSkyDome (new SkyDome (mSceneMgr)); + this->setSkyDome (new SkyDome (mSceneMgr, mCaelumRootNode)); } if (componentsToCreate & CAELUM_COMPONENT_SOLAR_SYSTEM_MODEL) { this->setSolarSystemModel (new SolarSystemModel ()); } if (componentsToCreate & CAELUM_COMPONENT_SUN) { - this->setSun (new Sun (mSceneMgr)); + this->setSun (new SpriteSun (mSceneMgr, mCaelumRootNode)); } if (componentsToCreate & CAELUM_COMPONENT_STARFIELD) { - this->setStarfield (new Starfield (mSceneMgr)); + this->setStarfield (new Starfield (mSceneMgr, mCaelumRootNode)); } if (componentsToCreate & CAELUM_COMPONENT_CLOUDS) { - this->setClouds (new LayeredClouds (mSceneMgr)); + this->setClouds (new LayeredClouds (mSceneMgr, mCaelumRootNode)); } if (componentsToCreate & CAELUM_COMPONENT_GROUND_FOG) { - this->setGroundFog (new GroundFog (mSceneMgr)); + this->setGroundFog (new GroundFog (mSceneMgr, mCaelumRootNode)); } // Auto-register itself as a frame listener @@ -135,6 +136,10 @@ LOG ("Destroyed Caelum resource group"); } + static_cast<Ogre::SceneNode*>(mCaelumRootNode->getParent())-> + removeAndDestroyChild(mCaelumRootNode->getName()); + mCaelumRootNode = 0; + if (cleanup) { delete this; } else { @@ -153,6 +158,9 @@ void CaelumSystem::preViewportUpdate (const Ogre::RenderTargetViewportEvent &e) { Ogre::Camera *cam = e.source->getCamera (); + // Move root node. + mCaelumRootNode->setPosition(cam->getRealPosition()); + if (getSkyDome ()) { getSkyDome ()->notifyCameraChanged (cam); } Modified: trunk/python-ogre/ThirdParty/caelum/CaelumSystem.h =================================================================== --- trunk/python-ogre/ThirdParty/caelum/CaelumSystem.h 2008-04-01 04:05:25 UTC (rev 582) +++ trunk/python-ogre/ThirdParty/caelum/CaelumSystem.h 2008-04-05 07:54:56 UTC (rev 583) @@ -57,7 +57,7 @@ from Caelum could be refactor to only transfer a number of "common sky parameter" around; but that is a lot harder and ultimately less flexible. - @author Jes\xFAs Alonso Abad + @author Jes˙s Alonso Abad */ class DllExport CaelumSystem : public Ogre::FrameListener, public Ogre::RenderTargetListener { // Attributes ----------------------------------------------------------------- @@ -70,6 +70,10 @@ */ Ogre::SceneManager *mSceneMgr; + /** Caelum root scene node. + */ + Ogre::SceneNode *mCaelumRootNode; + /** Cleanup requested flag. */ bool mCleanup; @@ -107,7 +111,7 @@ std::auto_ptr<SolarSystemModel> mSolarSystemModel; /// Reference to the sun, if enabled. - std::auto_ptr<Sun> mSun; + std::auto_ptr<BaseSun> mSun; /// Reference to the starfield, if enabled. std::auto_ptr<Starfield> mStarfield; @@ -207,6 +211,10 @@ */ UniversalClock *getUniversalClock () const; + /** Gets caelum root scene node. + */ + Ogre::SceneNode* getRootNode(void) const { return mCaelumRootNode; } + /** Updates the system. @param e The frame event (contains the elapsed time since the last update). */ @@ -228,14 +236,14 @@ /** Set the sun. * @param sun A new sun or null to disable. */ - inline void setSun (Sun* sun) { + inline void setSun (BaseSun* sun) { mSun.reset(sun); } /** Gets the current sun. @return The sun in use. */ - Sun* getSun () const { + BaseSun* getSun () const { return mSun.get(); } Modified: trunk/python-ogre/ThirdParty/caelum/GroundFog.cpp =================================================================== --- trunk/python-ogre/ThirdParty/caelum/GroundFog.cpp 2008-04-01 04:05:25 UTC (rev 582) +++ trunk/python-ogre/ThirdParty/caelum/GroundFog.cpp 2008-04-05 07:54:56 UTC (rev 583) @@ -27,10 +27,13 @@ GroundFog::GroundFog( Ogre::SceneManager *scene, + Ogre::SceneNode *caelumRootNode, const Ogre::String &domeMaterialName, const Ogre::String &domeEntityName): mScene(scene) { + scene->getRenderQueue()->getQueueGroup(CAELUM_RENDER_QUEUE_GROUND_FOG)->setShadowsEnabled(false); + // Create dome entity, using a prefab sphere. // The prefab sphere has a radius of 50 units. // If this changes in future version of ogre this might break. @@ -39,7 +42,7 @@ mDomeEntity->setCastShadows(false); mDomeEntity->setRenderQueueGroup (CAELUM_RENDER_QUEUE_GROUND_FOG); - mDomeNode = mScene->getRootSceneNode ()->createChildSceneNode (); + mDomeNode = caelumRootNode->createChildSceneNode (); mDomeNode->attachObject (mDomeEntity); // Maybe it would be better to create the material at runtime instead. @@ -176,13 +179,10 @@ { CameraBoundElement::notifyCameraChanged (cam); - // Move dome node. - mDomeNode->setPosition (cam->getRealPosition ()); - // Send camera height to shader. Ogre::GpuProgramParametersSharedPtr params = mDomeMaterial->getBestTechnique()->getPass(0)->getFragmentProgramParameters(); - params->setNamedConstant("cameraHeight", cam->getDerivedPosition().y); + params->setNamedConstant("cameraHeight", cam->getDerivedPosition().dotProduct(mDomeNode->_getDerivedOrientation() * Ogre::Vector3::UNIT_Y)); } void GroundFog::setFarRadius (Ogre::Real radius) Modified: trunk/python-ogre/ThirdParty/caelum/GroundFog.h =================================================================== --- trunk/python-ogre/ThirdParty/caelum/GroundFog.h 2008-04-01 04:05:25 UTC (rev 582) +++ trunk/python-ogre/ThirdParty/caelum/GroundFog.h 2008-04-05 07:54:56 UTC (rev 583) @@ -46,6 +46,7 @@ /** Constructor. */ GroundFog (Ogre::SceneManager *scene, + Ogre::SceneNode *caelumRootNode, const Ogre::String &domeMaterialName = "CaelumGroundFogDome", const Ogre::String &domeEntityName = "CaelumGroundFogDome"); Modified: trunk/python-ogre/ThirdParty/caelum/LayeredClouds.cpp =================================================================== --- trunk/python-ogre/ThirdParty/caelum/LayeredClouds.cpp 2008-04-01 04:05:25 UTC (rev 582) +++ trunk/python-ogre/ThirdParty/caelum/LayeredClouds.cpp 2008-04-05 07:54:56 UTC (rev 583) @@ -23,7 +23,7 @@ #include "CaelumExceptions.h" #include "ImageHelper.h" -namespace +namespace caelum { /** Extend a Vector2 to a Vector3 by appending a 0 */ @@ -38,13 +38,14 @@ LayeredClouds::LayeredClouds ( Ogre::SceneManager* scene, + Ogre::SceneNode *caelumRootNode, const Ogre::String &resourceGroupName, const Ogre::String &materialName, const Ogre::String &meshName, const Ogre::String &entityName ): - mSceneMgr(scene), - mCloudCoverLookup(0) + mCloudCoverLookup(0), + mSceneMgr(scene) { // Create cloud plane mesh if it doesn't exist. if (Ogre::MeshManager::getSingleton ().getByName (meshName).isNull ()) { @@ -54,13 +55,15 @@ false, 1, 1, 1, Ogre::Vector3::UNIT_Z); } + mSceneMgr->getRenderQueue()->getQueueGroup(CAELUM_RENDER_QUEUE_CLOUDS)->setShadowsEnabled(false); + // Create cloud plane entity. mEntity = mSceneMgr->createEntity(entityName, meshName); mEntity->setMaterialName(materialName); mEntity->setCastShadows(false); mEntity->setRenderQueueGroup (CAELUM_RENDER_QUEUE_CLOUDS); - mNode = mSceneMgr->getRootSceneNode ()->createChildSceneNode (); + mNode = caelumRootNode->createChildSceneNode (); mNode->attachObject (mEntity); // It would be better to create the material at runtime instead. @@ -100,7 +103,6 @@ void LayeredClouds::notifyCameraChanged (Ogre::Camera *cam) { CameraBoundElement::notifyCameraChanged (cam); - mNode->setPosition (cam->getRealPosition ()); } void LayeredClouds::setFarRadius (Ogre::Real radius) { Modified: trunk/python-ogre/ThirdParty/caelum/LayeredClouds.h =================================================================== --- trunk/python-ogre/ThirdParty/caelum/LayeredClouds.h 2008-04-01 04:05:25 UTC (rev 582) +++ trunk/python-ogre/ThirdParty/caelum/LayeredClouds.h 2008-04-05 07:54:56 UTC (rev 583) @@ -45,6 +45,7 @@ */ LayeredClouds ( Ogre::SceneManager* scene, + Ogre::SceneNode *caelumRootNode, const Ogre::String &resourceGroupName="Caelum", const Ogre::String &materialName="CaelumLayeredClouds", const Ogre::String &meshName="CaelumLayeredClouds", Modified: trunk/python-ogre/ThirdParty/caelum/SkyColourModel.cpp =================================================================== --- trunk/python-ogre/ThirdParty/caelum/SkyColourModel.cpp 2008-04-01 04:05:25 UTC (rev 582) +++ trunk/python-ogre/ThirdParty/caelum/SkyColourModel.cpp 2008-04-05 07:54:56 UTC (rev 583) @@ -29,8 +29,8 @@ const Ogre::String &gradients, const Ogre::String &sunColours ): - mSunColoursImage(0), - mSkyGradientsImage(0) + mSkyGradientsImage(0), + mSunColoursImage(0) { mSkyGradientsImage = 0; mFogDensityMultiplier = 1; Modified: trunk/python-ogre/ThirdParty/caelum/SkyDome.cpp =================================================================== --- trunk/python-ogre/ThirdParty/caelum/SkyDome.cpp 2008-04-01 04:05:25 UTC (rev 582) +++ trunk/python-ogre/ThirdParty/caelum/SkyDome.cpp 2008-04-05 07:54:56 UTC (rev 583) @@ -28,16 +28,18 @@ const Ogre::String SkyDome::SPHERIC_DOME_NAME = "CaelumSphericDome"; const Ogre::String SkyDome::SKY_DOME_MATERIAL_NAME = "CaelumSkyDomeMaterial"; -SkyDome::SkyDome (Ogre::SceneManager *sceneMgr) { +SkyDome::SkyDome (Ogre::SceneManager *sceneMgr, Ogre::SceneNode *caelumRootNode) { createSkyDomeMaterial (); + sceneMgr->getRenderQueue()->getQueueGroup(CAELUM_RENDER_QUEUE_SKYDOME)->setShadowsEnabled(false); + GeometryFactory::generateSphericDome (SPHERIC_DOME_NAME, 32); Ogre::Entity *ent = sceneMgr->createEntity ("Dome", SPHERIC_DOME_NAME); ent->setMaterialName (SKY_DOME_MATERIAL_NAME); ent->setRenderQueueGroup (CAELUM_RENDER_QUEUE_SKYDOME); ent->setCastShadows (false); - mNode = sceneMgr->getRootSceneNode ()->createChildSceneNode (); + mNode = caelumRootNode->createChildSceneNode (); mNode->attachObject (ent); } @@ -57,7 +59,6 @@ void SkyDome::notifyCameraChanged (Ogre::Camera *cam) { CameraBoundElement::notifyCameraChanged (cam); - mNode->setPosition (cam->getRealPosition ()); } void SkyDome::setFarRadius (Ogre::Real radius) { @@ -222,20 +223,23 @@ LOG ("\tDONE"); } else { mMaterial = static_cast<Ogre::MaterialPtr>(Ogre::MaterialManager::getSingleton ().getByName (SKY_DOME_MATERIAL_NAME)); + mMaterial->load (); } LOG ("DONE"); } void SkyDome::destroySkyDomeMaterial () { - LOG ("Removing sky dome material..."); - if ((Ogre::HighLevelGpuProgramManager::getSingletonPtr()->resourceExists("SkyDomeFP"))) { - LOG ("Removing sky dome SkyDomeFP..."); + LOG ("Removing sky dome materials..."); + if (!Ogre::HighLevelGpuProgramManager::getSingletonPtr()->resourceExists("SkyDomeFP")) { Ogre::HighLevelGpuProgramManager::getSingletonPtr()->remove("SkyDomeFP"); } - if ((Ogre::HighLevelGpuProgramManager::getSingletonPtr()->resourceExists("SkyDomeVP"))) { - LOG ("Removing sky dome SkyDomeVP..."); + if (!Ogre::HighLevelGpuProgramManager::getSingletonPtr()->resourceExists("SkyDomeFP_NoHaze")) { + Ogre::HighLevelGpuProgramManager::getSingletonPtr()->remove("SkyDomeFP_NoHaze"); + } + + if (!Ogre::HighLevelGpuProgramManager::getSingletonPtr()->resourceExists("SkyDomeVP")) { Ogre::HighLevelGpuProgramManager::getSingletonPtr()->remove("SkyDomeVP"); } Modified: trunk/python-ogre/ThirdParty/caelum/SkyDome.h =================================================================== --- trunk/python-ogre/ThirdParty/caelum/SkyDome.h 2008-04-01 04:05:25 UTC (rev 582) +++ trunk/python-ogre/ThirdParty/caelum/SkyDome.h 2008-04-05 07:54:56 UTC (rev 583) @@ -57,7 +57,7 @@ * This will setup some nice defaults. * @param sceneMgr The scene manager where this sky dome will be created. */ - SkyDome (Ogre::SceneManager *sceneMgr); + SkyDome (Ogre::SceneManager *sceneMgr, Ogre::SceneNode *caelumRootNode); /** Destructor */ Modified: trunk/python-ogre/ThirdParty/caelum/SolarSystemModel.cpp =================================================================== --- trunk/python-ogre/ThirdParty/caelum/SolarSystemModel.cpp 2008-04-01 04:05:25 UTC (rev 582) +++ trunk/python-ogre/ThirdParty/caelum/SolarSystemModel.cpp 2008-04-05 07:54:56 UTC (rev 583) @@ -49,9 +49,9 @@ // Ogre direction. Ogre::Vector3 res; - res.x = Math::Sin (azimuth); // East + res.x = Math::Sin (azimuth) * Math::Cos (altitude); // East res.y = -Math::Sin (altitude); // Zenith - res.z = -Math::Cos (azimuth); // North + res.z = -Math::Cos (azimuth) * Math::Cos (altitude); // North Astronomy::restoreFloatingPointMode(fpmode); Modified: trunk/python-ogre/ThirdParty/caelum/Starfield.cpp =================================================================== --- trunk/python-ogre/ThirdParty/caelum/Starfield.cpp 2008-04-01 04:05:25 UTC (rev 582) +++ trunk/python-ogre/ThirdParty/caelum/Starfield.cpp 2008-04-05 07:54:56 UTC (rev 583) @@ -28,19 +28,21 @@ const Ogre::String Starfield::STARFIELD_MATERIAL_NAME = "CaelumStarfieldMaterial"; -Starfield::Starfield (Ogre::SceneManager *sceneMgr, const Ogre::String &textureName) { +Starfield::Starfield (Ogre::SceneManager *sceneMgr, Ogre::SceneNode *caelumRootNode, const Ogre::String &textureName) { mInclination = Ogre::Degree (0); createStarfieldMaterial (); setTexture (textureName); + sceneMgr->getRenderQueue()->getQueueGroup(CAELUM_RENDER_QUEUE_STARFIELD)->setShadowsEnabled(false); + GeometryFactory::generateSphericDome (STARFIELD_DOME_NAME, 32, GeometryFactory::DT_STARFIELD); Ogre::Entity *ent = sceneMgr->createEntity ("StarfieldDome", STARFIELD_DOME_NAME); ent->setMaterialName (STARFIELD_MATERIAL_NAME); ent->setRenderQueueGroup (CAELUM_RENDER_QUEUE_STARFIELD); ent->setCastShadows (false); - mNode = sceneMgr->getRootSceneNode ()->createChildSceneNode (); + mNode = caelumRootNode->createChildSceneNode (); mNode->attachObject (ent); } @@ -60,7 +62,6 @@ void Starfield::notifyCameraChanged (Ogre::Camera *cam) { CameraBoundElement::notifyCameraChanged (cam); - mNode->setPosition (cam->getRealPosition ()); } void Starfield::setFarRadius (Ogre::Real radius) { @@ -108,6 +109,7 @@ } else { mat = static_cast<Ogre::MaterialPtr>(Ogre::MaterialManager::getSingleton ().getByName (STARFIELD_MATERIAL_NAME)); + mat->load(); } LOG ("DONE"); Modified: trunk/python-ogre/ThirdParty/caelum/Starfield.h =================================================================== --- trunk/python-ogre/ThirdParty/caelum/Starfield.h 2008-04-01 04:05:25 UTC (rev 582) +++ trunk/python-ogre/ThirdParty/caelum/Starfield.h 2008-04-05 07:54:56 UTC (rev 583) @@ -59,6 +59,7 @@ */ Starfield ( Ogre::SceneManager *sceneMgr, + Ogre::SceneNode *caelumRootNode, const Ogre::String &textureName = "Starfield.jpg"); /** Destructor. @@ -66,7 +67,7 @@ virtual ~Starfield (); /** Sets the starfield inclination. This inclination is the angle between the starfield rotation axis and the horizon plane. - @param inc The starfield inclination in degrees. + @param inc The starfield inclination in degrees. It`s equal to observer latitude taken with opposite sign. */ void setInclination (Ogre::Degree inc); Modified: trunk/python-ogre/ThirdParty/caelum/Sun.cpp =================================================================== --- trunk/python-ogre/ThirdParty/caelum/Sun.cpp 2008-04-01 04:05:25 UTC (rev 582) +++ trunk/python-ogre/ThirdParty/caelum/Sun.cpp 2008-04-05 07:54:56 UTC (rev 583) @@ -23,9 +23,11 @@ namespace caelum { -const Ogre::String Sun::SUN_MATERIAL_NAME = "CaelumSunMaterial"; +//======================================================================================================================== +// Base Sun +//======================================================================================================================== -Sun::Sun (Ogre::SceneManager *sceneMgr): mScene(sceneMgr) { +BaseSun::BaseSun (Ogre::SceneManager *sceneMgr, Ogre::SceneNode *caelumRootNode): mScene(sceneMgr) { mSunSphereColour = Ogre::ColourValue::White; mSunLightColour = Ogre::ColourValue::White; @@ -39,55 +41,29 @@ // HDR power scale, REALLY bright: mMainLight->setPowerScale (10); - createSunMaterial (); + sceneMgr->getRenderQueue()->getQueueGroup(CAELUM_RENDER_QUEUE_SUN)->setShadowsEnabled(false); - mSunEntity = sceneMgr->createEntity ("CaelumSun", "sphere.mesh"); - mSunEntity->setMaterialName (SUN_MATERIAL_NAME); - mSunEntity->setCastShadows (false); - mSunEntity->setRenderQueueGroup (CAELUM_RENDER_QUEUE_SUN); - mSunNode = sceneMgr->getRootSceneNode ()->createChildSceneNode (); - mSunNode->attachObject (mSunEntity); + mSunNode = caelumRootNode->createChildSceneNode (); } -Sun::~Sun () { +BaseSun::~BaseSun () { if (mSunNode) { - mSunNode->detachObject (mSunEntity); static_cast<Ogre::SceneNode *>(mSunNode->getParent ())->removeAndDestroyChild (mSunNode->getName ()); mSunNode = 0; } - if (mSunEntity) { - mSunEntity->_getManager ()->destroyEntity (mSunEntity); - mSunEntity = 0; - } - destroySunMaterial (); - if (mMainLight) { mMainLight->_getManager ()->destroyLight (mMainLight); mMainLight = 0; } } -void Sun::notifyCameraChanged (Ogre::Camera *cam) { - // This calls setFarRadius - CameraBoundElement::notifyCameraChanged(cam); - - // Set sun position. - Ogre::Real sunRadius = -mRadius * Ogre::Math::Tan (Ogre::Degree (0.01)); - mSunNode->setPosition (cam->getRealPosition () - mSunDirection * (mRadius + sunRadius)); - - // Set sun scaling. - float factor = 2 - mSunSphereColour.b / 3; - float scale = factor * (mRadius + sunRadius) * Ogre::Math::Tan (Ogre::Degree (0.01)); - mSunNode->setScale (Ogre::Vector3::UNIT_SCALE * scale); -} - -void Sun::setFarRadius (Ogre::Real radius) { +void BaseSun::setFarRadius (Ogre::Real radius) { CameraBoundElement::setFarRadius(radius); mRadius = radius; } -void Sun::update ( +void BaseSun::update ( const Ogre::Vector3& sunDirection, const Ogre::ColourValue &sunLightColour, const Ogre::ColourValue &sunSphereColour) @@ -97,33 +73,34 @@ setSunSphereColour(sunSphereColour); } -Ogre::Vector3 Sun::getSunDirection () const { +const Ogre::Vector3& BaseSun::getSunDirection () const { return mSunDirection; } -void Sun::setSunDirection (const Ogre::Vector3 &dir) { +void BaseSun::setSunDirection (const Ogre::Vector3 &dir) { mSunDirection = dir; if (mMainLight != 0) { - mMainLight->setDirection (dir); + mMainLight->setDirection (mSunNode->_getDerivedOrientation() * dir); } } -void Sun::setSunSphereColour (const Ogre::ColourValue &colour) { +void BaseSun::setSunSphereColour (const Ogre::ColourValue &colour) { // Store this last colour mSunSphereColour = colour; - - // Set sun material colour. - mSunMaterial->setSelfIllumination (colour); } -Ogre::ColourValue Sun::getSunSphereColour () { +Ogre::ColourValue BaseSun::getSunSphereColour () const { return mSunSphereColour; } -void Sun::setSunLightColour (const Ogre::ColourValue &colour) { +void BaseSun::setSunLightColour (const Ogre::ColourValue &colour) { // Store this last colour mSunLightColour = colour; + // Apply change + setMainLightColour(colour); +} +void BaseSun::setMainLightColour (const Ogre::ColourValue &colour) { // Set light colours. mMainLight->setDiffuseColour (colour * mDiffuseMultiplier); mMainLight->setSpecularColour (colour * mSpecularMultiplier); @@ -132,43 +109,96 @@ } } -Ogre::ColourValue Sun::getSunLightColour () { +Ogre::ColourValue BaseSun::getSunLightColour () const { return mSunLightColour; } -void Sun::setDiffuseMultiplier (const Ogre::ColourValue &diffuse) { +void BaseSun::setDiffuseMultiplier (const Ogre::ColourValue &diffuse) { mDiffuseMultiplier = diffuse; } -Ogre::ColourValue Sun::getDiffuseMultiplier () { +Ogre::ColourValue BaseSun::getDiffuseMultiplier () const { return mDiffuseMultiplier; } -void Sun::setSpecularMultiplier (const Ogre::ColourValue &specular) { +void BaseSun::setSpecularMultiplier (const Ogre::ColourValue &specular) { mSpecularMultiplier = specular; } -Ogre::ColourValue Sun::getSpecularMultiplier () { +Ogre::ColourValue BaseSun::getSpecularMultiplier () const { return mSpecularMultiplier; } -void Sun::setAmbientMultiplier (const Ogre::ColourValue &ambient) { +void BaseSun::setAmbientMultiplier (const Ogre::ColourValue &ambient) { mAmbientMultiplier = ambient; } -Ogre::ColourValue Sun::getAmbientMultiplier () { +Ogre::ColourValue BaseSun::getAmbientMultiplier () const { return mAmbientMultiplier; } -void Sun::setManageAmbientLight (bool manage) { +void BaseSun::setManageAmbientLight (bool manage) { mManageAmbientLight = manage; } -bool Sun::isManagingAmbientLight () { +bool BaseSun::isManagingAmbientLight () const { return mManageAmbientLight; } -void Sun::createSunMaterial () { +Ogre::Light* BaseSun::getMainLight() const { + return mMainLight; +} + +//======================================================================================================================== +// Sphere Sun - deprecated, use Sprite Sun instead +//======================================================================================================================== + +const Ogre::String SphereSun::SUN_MATERIAL_NAME = "CaelumSunMaterial"; + +SphereSun::SphereSun (Ogre::SceneManager *sceneMgr, Ogre::SceneNode *caelumRootNode, const Ogre::String &meshName) : BaseSun(sceneMgr, caelumRootNode) { + createSunMaterial (); + + mSunEntity = sceneMgr->createEntity ("CaelumSun", meshName); + mSunEntity->setMaterialName (SUN_MATERIAL_NAME); + mSunEntity->setCastShadows (false); + mSunEntity->setRenderQueueGroup (CAELUM_RENDER_QUEUE_SUN); + mSunNode->attachObject (mSunEntity); +} + +SphereSun::~SphereSun () { + if (mSunNode) { + mSunNode->detachObject (mSunEntity); + } + if (mSunEntity) { + mSunEntity->_getManager ()->destroyEntity (mSunEntity); + mSunEntity = 0; + } + + destroySunMaterial (); +} + +void SphereSun::setSunSphereColour (const Ogre::ColourValue &colour) { + BaseSun::setSunSphereColour(colour); + + // Set sun material colour. + mSunMaterial->setSelfIllumination (colour); +} + +void SphereSun::notifyCameraChanged (Ogre::Camera *cam) { + // This calls setFarRadius + CameraBoundElement::notifyCameraChanged(cam); + + // Set sun position. + Ogre::Real sunDistance = mRadius - mRadius * Ogre::Math::Tan (Ogre::Degree (0.01)); + mSunNode->setPosition(-mSunDirection * sunDistance); + + // Set sun scaling in [1.6(6) ~ 2.0] range. + float factor = 2 - mSunSphereColour.b / 3; + float scale = factor * sunDistance * Ogre::Math::Tan (Ogre::Degree (0.01)); + mSunNode->setScale (Ogre::Vector3::UNIT_SCALE * scale); +} + +void SphereSun::createSunMaterial () { Ogre::MaterialPtr mat; LOG ("Generating sun material..."); @@ -192,19 +222,133 @@ } else { mat = static_cast<Ogre::MaterialPtr>(Ogre::MaterialManager::getSingleton ().getByName (SUN_MATERIAL_NAME)); + mat->load (); } LOG ("DONE"); mSunMaterial = mat; } -void Sun::destroySunMaterial () { +void SphereSun::destroySunMaterial () { LOG ("Removing sun material..."); - if (Ogre::MaterialManager::getSingleton ().resourceExists (SUN_MATERIAL_NAME)) { + if (!Ogre::MaterialManager::getSingleton ().resourceExists (SUN_MATERIAL_NAME)) { Ogre::MaterialManager::getSingleton ().remove (SUN_MATERIAL_NAME); } mSunMaterial.setNull (); LOG ("DONE"); } +//======================================================================================================================== +// Sprite Sun +//======================================================================================================================== + +const Ogre::String SpriteSun::SUN_MATERIAL_NAME = "CaelumSpriteSunMaterial"; + +SpriteSun::SpriteSun ( Ogre::SceneManager *sceneMgr, + Ogre::SceneNode *caelumRootNode, + const Ogre::String &sunTextureName, + const Ogre::Degree& sunTextureAngularSize) + : BaseSun(sceneMgr, caelumRootNode) + , mSunTextureAngularSize(sunTextureAngularSize) +{ + createSunMaterial(); + setSunTexture(sunTextureName); + + mSunBillboardSet = sceneMgr->createBillboardSet("CaelumSpriteSun", 2); + mSunBillboardSet->setMaterialName (SUN_MATERIAL_NAME); + mSunBillboardSet->setCastShadows (false); + mSunBillboardSet->setRenderQueueGroup (CAELUM_RENDER_QUEUE_SUN); + mSunBillboardSet->setDefaultDimensions(1.0f, 1.0f); + mSunBillboardSet->createBillboard(Ogre::Vector3::ZERO); + + mSunNode->attachObject (mSunBillboardSet); +} + +SpriteSun::~SpriteSun () { + if (mSunNode) { + mSunNode->detachObject (mSunBillboardSet); + } + if (mSunBillboardSet) { + mSunBillboardSet->_getManager ()->destroyBillboardSet (mSunBillboardSet); + mSunBillboardSet = 0; + } + + destroySunMaterial (); +} + +void SpriteSun::setSunSphereColour (const Ogre::ColourValue &colour) { + BaseSun::setSunSphereColour(colour); + + // Set sun material colour. + mSunBillboardSet->getBillboard(0)->setColour(colour); +} + +void SpriteSun::setSunTexture (const Ogre::String &textureName) { + // Update the sun material + mSunMaterial->getBestTechnique ()->getPass (0)->getTextureUnitState (0)->setTextureName (textureName); +} + +void SpriteSun::setSunTextureAngularSize(const Ogre::Degree& sunTextureAngularSize){ + mSunTextureAngularSize = sunTextureAngularSize; +} + +void SpriteSun::notifyCameraChanged (Ogre::Camera *cam) { + // This calls setFarRadius + BaseSun::notifyCameraChanged(cam); + + // Set sun position. + Ogre::Real sunDistance = mRadius - mRadius * Ogre::Math::Tan(mSunTextureAngularSize); + mSunNode->setPosition(-mSunDirection * sunDistance); + + // Set sun scaling in [1.0 ~ 1.2] range + float factor = 1.2f - mSunSphereColour.b * 0.2f; + float scale = factor * sunDistance * Ogre::Math::Tan(mSunTextureAngularSize); + mSunNode->setScale (Ogre::Vector3::UNIT_SCALE * scale); +} + +void SpriteSun::createSunMaterial () { + Ogre::MaterialPtr mat; + + LOG ("Generating sun material..."); + if (!Ogre::MaterialManager::getSingleton ().resourceExists (SUN_MATERIAL_NAME)) { + LOG ("\tMaterial not found; creating..."); + mat = static_cast<Ogre::MaterialPtr>(Ogre::MaterialManager::getSingleton ().create (SUN_MATERIAL_NAME, RESOURCE_GROUP_NAME)); + mat->setReceiveShadows (false); + LOG ("\t\tMaterial [OK]"); + Ogre::Pass *pass = mat->getTechnique (0)->getPass (0); + pass->setLightingEnabled (false); + pass->setDepthCheckEnabled (false); + pass->setDepthWriteEnabled (false); + pass->setSceneBlending (Ogre::SBT_TRANSPARENT_COLOUR); + pass->setAlphaRejectSettings(Ogre::CMPF_GREATER_EQUAL, 128); + pass->setFog (true); + pass->setAmbient (Ogre::ColourValue::Black); + pass->setDiffuse (Ogre::ColourValue::Black); + pass->setSpecular (Ogre::ColourValue::Black); + pass->setVertexColourTracking(Ogre::TVC_EMISSIVE); + LOG ("\t\tPass [OK]"); + Ogre::TextureUnitState *tus = pass->createTextureUnitState (); + tus->setNumMipmaps(0); + LOG ("\t\tTextureUnit [OK]"); + mat->load (); + LOG ("\tDONE"); + } + else { + mat = static_cast<Ogre::MaterialPtr>(Ogre::MaterialManager::getSingleton ().getByName (SUN_MATERIAL_NAME)); + mat->load (); + } + LOG ("DONE"); + + mSunMaterial = mat; +} + +void SpriteSun::destroySunMaterial () { + LOG ("Removing sun material..."); + if (!Ogre::MaterialManager::getSingleton ().resourceExists (SUN_MATERIAL_NAME)) { + Ogre::MaterialManager::getSingleton ().remove (SUN_MATERIAL_NAME); + } + mSunMaterial.setNull (); + LOG ("DONE"); +} + } // namespace caelum Modified: trunk/python-ogre/ThirdParty/caelum/Sun.h =================================================================== --- trunk/python-ogre/ThirdParty/caelum/Sun.h 2008-04-01 04:05:25 UTC (rev 582) +++ trunk/python-ogre/ThirdParty/caelum/Sun.h 2008-04-05 07:54:56 UTC (rev 583) @@ -26,17 +26,21 @@ namespace caelum { -/** Class representing the sun. - It calculates the sun light direction, position, colour... - @author Jes\xFAs Alonso Abad +class BaseSun; // abstract +class SphereSun; // deprecated +class SpriteSun; + +typedef SpriteSun Sun; + +/** Abstract class representing sun. + Can be registered in CaelumSystem and receive update notifications. + Contains scene node and main light, that are properly placed on the sky by update method. + @author Jes˙s Alonso Abad */ -class DllExport Sun : public CameraBoundElement { +class DllExport BaseSun : public CameraBoundElement { // Attributes ----------------------------------------------------------------- public: - /// Name of the sun material. - static const Ogre::String SUN_MATERIAL_NAME; - - private: + protected: /// Pointer to scene. Ogre::SceneManager *mScene; @@ -46,12 +50,6 @@ /// The sun scene node. Ogre::SceneNode *mSunNode; - /// The sun entity. - Ogre::Entity *mSunEntity; - - /// Reference to the sun material. - Ogre::MaterialPtr mSunMaterial; - /// Base distance of the sun. float mRadius; @@ -83,19 +81,20 @@ /** Constructor. @param sceneMgr The scene manager where the lights will be created. */ - Sun (Ogre::SceneManager *sceneMgr); + BaseSun (Ogre::SceneManager *sceneMgr, + Ogre::SceneNode *caelumRootNode); /** Destructor. - @note If a sun position model is in use, it will be deleted. + @note You must use one of descendant, since base sun is invisible. */ - virtual ~Sun (); + virtual ~BaseSun () = 0; /** Updates sun parameters. @param sunDirection Sun direction. @param sunLightColour Color for the sun's light source @param sunSphereColour Color to draw the sun sphere itself. */ - void update ( + virtual void update ( const Ogre::Vector3& sunDirection, const Ogre::ColourValue &sunLightColour, const Ogre::ColourValue &sunSphereColour); @@ -103,68 +102,175 @@ /** Retrieves the latest sun direction. @return The sun direction. */ - Ogre::Vector3 getSunDirection () const; + const Ogre::Vector3& getSunDirection () const; /** Set the sun direction. @param dir The sun direction. */ - void setSunDirection (const Ogre::Vector3 &dir); + virtual void setSunDirection (const Ogre::Vector3 &dir); + /// Get current sun sphere colour, as set in setSunSphereColour. + Ogre::ColourValue getSunSphereColour () const; + /** Sets the sun sphere colour. @param colour The colour used to draw the sun */ - void setSunSphereColour (const Ogre::ColourValue &colour); + virtual void setSunSphereColour (const Ogre::ColourValue &colour); - /// Get current sun sphere colour, as set in setSunSphereColour. - Ogre::ColourValue getSunSphereColour (); + /// Get current sunlight colour, as set in setSunLightColour. + Ogre::ColourValue getSunLightColour () const; /** Sets the sunlight colour. @param colour The colour used to illuminate the scene. */ - void setSunLightColour (const Ogre::ColourValue &colour); + virtual void setSunLightColour (const Ogre::ColourValue &colour); - /// Get current sun sphere colour, as set in setSunLightColour. - Ogre::ColourValue getSunLightColour (); - /// Set diffuse multiplier for light colour void setDiffuseMultiplier (const Ogre::ColourValue &diffuse); /// Set diffuse multiplier for light colour - Ogre::ColourValue getDiffuseMultiplier (); + Ogre::ColourValue getDiffuseMultiplier () const; /// Set specular multiplier for light colour void setSpecularMultiplier (const Ogre::ColourValue &specular); /// Set specular multiplier for light colour - Ogre::ColourValue getSpecularMultiplier (); + Ogre::ColourValue getSpecularMultiplier () const; /// Set ambient multiplier for light colour /// This only works if isManaging void setAmbientMultiplier (const Ogre::ColourValue &ambient); /// Set ambient multiplier for light colour - Ogre::ColourValue getAmbientMultiplier (); + Ogre::ColourValue getAmbientMultiplier () const; /// This can make this class manage the ambient light of the scene. void setManageAmbientLight (bool manage); /// If the class is managing the scene's ambient light. - bool isManagingAmbientLight (); + bool isManagingAmbientLight () const; + /// Allow access to main light, to disable it duaring eclipse, for example. + Ogre::Light* getMainLight() const; + + protected: + /// Handle far radius. + virtual void setFarRadius (Ogre::Real radius); + + /// Temporary change main light color + void setMainLightColour(const Ogre::ColourValue &colour); +}; + +//======================================================================================================================== + +/** Class representing the sun as sphere with emissive color on it. + @author Jes˙s Alonso Abad + */ +class DllExport SphereSun : public BaseSun { +// Attributes ----------------------------------------------------------------- + public: + /// Name of the sun material. + static const Ogre::String SUN_MATERIAL_NAME; + private: + /// The sun entity. + Ogre::Entity *mSunEntity; + + /// Reference to the sun material. + Ogre::MaterialPtr mSunMaterial; + +// Methods -------------------------------------------------------------------- + public: + /** Constructor. + @param sceneMgr The scene manager where the lights will be created. + */ + SphereSun (Ogre::SceneManager *sceneMgr, + Ogre::SceneNode *caelumRootNode, + const Ogre::String &meshName = "sphere.mesh"); + + /** Destructor. + @note If a sun position model is in use, it will be deleted. + */ + virtual ~SphereSun (); + + /** Sets the sun sphere colour. + @param colour The colour used to draw the sun + */ + void setSunSphereColour (const Ogre::ColourValue &colour); + + public: + /// Handle camera change. + virtual void notifyCameraChanged (Ogre::Camera *cam); + + private: /// Creates the sun material. void createSunMaterial (); /// Destroys the sun material. void destroySunMaterial (); +}; +//======================================================================================================================== + +/** Class representing the sun as billboard with texture on it. + @author Eugene Golushkov + */ +class DllExport SpriteSun : public BaseSun { +// Attributes ----------------------------------------------------------------- + public: + /// Name of the sun material. + static const Ogre::String SUN_MATERIAL_NAME; + + protected: + /// The sun sprite. + Ogre::BillboardSet* mSunBillboardSet; + + /// Reference to the sun material. + Ogre::MaterialPtr mSunMaterial; + + /// The sun sprite visible angle + Ogre::Degree mSunTextureAngularSize; + +// Methods -------------------------------------------------------------------- + public: + /** Constructor. + @param sceneMgr The scene manager where the lights will be created. + */ + SpriteSun (Ogre::SceneManager *sceneMgr, + Ogre::SceneNode *caelumRootNode, + const Ogre::String& sunTextureName = "sun_disc.png", + const Ogre::Degree& sunTextureAngularSize = Ogre::Degree(3.77f)); // 0.53f is real angular size of Sun and Moon, 3.77f is compatible with SphereSun + + /** Destructor. + @note If a sun position model is in use, it will be deleted. + */ + virtual ~SpriteSun (); + + /** Updates the sun material. + @param textureName The new sun texture name. + */ + void setSunTexture (const Ogre::String &textureName); + + /** Updates the sun size. + @param sunTextureAngularSize The new sun texture angular size. + */ + void setSunTextureAngularSize(const Ogre::Degree& sunTextureAngularSize); + + /** Sets the sun sphere colour. + @param colour The colour used to draw the sun + */ + void setSunSphereColour (const Ogre::ColourValue &colour); + public: /// Handle camera change. virtual void notifyCameraChanged (Ogre::Camera *cam); - protected: - /// Handle far radius. - virtual void setFarRadius (Ogre::Real radius); + private: + /// Creates the sun material. + void createSunMaterial (); + + /// Destroys the sun material. + void destroySunMaterial (); }; } // namespace caelum Modified: trunk/python-ogre/ThirdParty/forests/BatchedGeometry.cpp =================================================================== --- trunk/python-ogre/ThirdParty/forests/BatchedGeometry.cpp 2008-04-01 04:05:25 UTC (rev 582) +++ trunk/python-ogre/ThirdParty/forests/BatchedGeometry.cpp 2008-04-05 07:54:56 UTC (rev 583) @@ -237,10 +237,10 @@ meshType = ent->getSubMesh(); this->parent = parent; built = false; - + // Material must always exist Material *origMat = ((MaterialPtr)MaterialManager::getSingleton().getByName(ent->getMaterialName())).getPointer(); if (origMat) { - material = MaterialManager::getSingleton().getByName(getMaterialClone(origMat)->getName()); + material = MaterialManager::getSingleton().getByName(getMaterialClone(*origMat)->getName()); } else { MaterialManager::ResourceCreateOrRetrieveResult result = MaterialManager::getSingleton().createOrRetrieve("PagedGeometry_Batched_Material", "General"); if (result.first.isNull()) { @@ -288,12 +288,12 @@ delete indexData; } -Material *BatchedGeometry::SubBatch::getMaterialClone(Material *mat) +Material *BatchedGeometry::SubBatch::getMaterialClone(Material &mat) { - String clonedName = mat->getName() + "_Batched"; + String clonedName = mat.getName() + "_Batched"; MaterialPtr clonedMat = MaterialManager::getSingleton().getByName(clonedName); if (clonedMat.isNull()) - clonedMat = mat->clone(clonedName); + clonedMat = mat.clone(clonedName); return clonedMat.getPointer(); } Modified: trunk/python-ogre/ThirdParty/forests/BatchedGeometry.h =================================================================== --- trunk/python-ogre/ThirdParty/forests/BatchedGeometry.h 2008-04-01 04:05:25 UTC (rev 582) +++ trunk/python-ogre/ThirdParty/forests/BatchedGeometry.h 2008-04-05 07:54:56 UTC (rev 583) @@ -74,13 +74,13 @@ bool castsShadows(void) const { return parent->getCastShadows(); } private: - //This function is used to make a single clone of materials used, since the materials - //will be modified by the batch system (and it wouldn't be good to modify the original materials - //that the user may be using somewhere else). - Ogre::Material *getMaterialClone(Ogre::Material *mat); + // This function is used to make a single clone of materials used, since the materials + // will be modified by the batch system (and it wouldn't be good to modify the original materials + // that the user may be using somewhere else). + Ogre::Material *getMaterialClone(Ogre::Material &mat); - //A structure defining the desired position/orientation/scale of a batched mesh. The - //SubMesh is not specified since that can be determined by which MeshQueue this belongs to. + // A structure defining the desired position/orientation/scale of a batched mesh. The + // SubMesh is not specified since that can be determined by which MeshQueue this belongs to. struct QueuedMesh { Ogre::SubMesh *mesh; Modified: trunk/python-ogre/ThirdParty/forests/ImpostorPage.cpp =================================================================== --- trunk/python-ogre/ThirdParty/forests/ImpostorPage.cpp 2008-04-01 04:05:25 UTC (rev 582) +++ trunk/python-ogre/ThirdParty/forests/ImpostorPage.cpp 2008-04-05 07:54:56 UTC (rev 583) @@ -502,6 +502,8 @@ Real oldFogEnd = sceneMgr->getFogEnd(); sceneMgr->setFog(FOG_NONE); + // Get current status of the queue mode + Ogre::SceneManager::SpecialCaseRenderQueueMode OldSpecialCaseRenderQueueMode = sceneMgr->getSpecialCaseRenderQueueMode(); //Only render the entity sceneMgr->setSpecialCaseRenderQueueMode(Ogre::SceneManager::SCRQM_INCLUDE); sceneMgr->addSpecialCaseRenderQueue(RENDER_QUEUE_6 + 1); @@ -581,7 +583,8 @@ entity->setRenderQueueGroup(oldRenderQueueGroup); entity->setRenderingDistance(oldMaxDistance); sceneMgr->removeSpecialCaseRenderQueue(RENDER_QUEUE_6 + 1); - sceneMgr->setSpecialCaseRenderQueueMode(Ogre::SceneManager::SCRQM_EXCLUDE); + // Restore original state + sceneMgr->setSpecialCaseRenderQueueMode(OldSpecialCaseRenderQueueMode); //Re-enable mipmapping mm->setDefaultTextureFiltering(oldMinFilter, oldMagFilter, oldMipFilter); Modified: trunk/python-ogre/ThirdParty/forests/PagedGeometry.h =================================================================== --- trunk/python-ogre/ThirdParty/forests/PagedGeometry.h 2008-04-01 04:05:25 UTC (rev 582) +++ trunk/python-ogre/ThirdParty/forests/PagedGeometry.h 2008-04-05 07:54:56 UTC (rev 583) @@ -1348,7 +1348,8 @@ { //Bounded mode gridBounds = bounds; - geomGridX = (gridBounds.width() / mainGeom->getPageSize()); + // In case the devision does not give the round number use the next largest integer + geomGridX = std::ceil(gridBounds.width() / mainGeom->getPageSize()); } geomGridZ = geomGridX; //Note: geomGridX == geomGridZ; Need to merge. @@ -1356,10 +1357,6 @@ //Allocate grid array geomGrid = new GeometryPage *[geomGridX * geomGridZ]; - - //Create GeometryPage's - int offsetx = Ogre::Math::Floor(gridBounds.left / mainGeom->getPageSize()); - int offsetz = Ogre::Math::Floor(gridBounds.top / mainGeom->getPageSize()); for (int x = 0; x < geomGridX; ++x) { for (int z = 0; z < geomGridZ; ++z) @@ -1370,8 +1367,8 @@ page->_centerPoint.x = ((x + 0.5f) * mainGeom->getPageSize()) + gridBounds.left; page->_centerPoint.z = ((z + 0.5f) * mainGeom->getPageSize()) + gridBounds.top; page->_centerPoint.y = 0.0f; - page->_xIndex = x + offsetx; - page->_zIndex = z + offsetz; + page->_xIndex = x; + page->_zIndex = z; page->_inactiveTime = 0; page->_loaded = false; page->_needsUnload = false; Modified: trunk/python-ogre/ThirdParty/forests/TreeLoader2D.cpp =================================================================== --- trunk/python-ogre/ThirdParty/forests/TreeLoader2D.cpp 2008-04-01 04:05:25 UTC (rev 582) +++ trunk/python-ogre/ThirdParty/forests/TreeLoader2D.cpp 2008-04-05 07:54:56 UTC (rev 583) @@ -213,11 +213,11 @@ float distSq = distX * distX + distZ * distZ; if (distSq <= radiusSq){ +#ifdef PAGEDGEOMETRY_USER_DATA + deletedUserData.push_back(treeList[i].userData); +#endif //If it's within the radius, delete it treeList[i] = treeList.back(); -#ifdef PAGEDGEOMETRY_USER_DATA - deletedUserData.push_back(treeList.back().userData); -#endif treeList.pop_back(); modified = true; } Modified: trunk/python-ogre/ThirdParty/forests/TreeLoader3D.cpp =================================================================== --- trunk/python-ogre/ThirdParty/forests/TreeLoader3D.cpp 2008-04-01 04:05:25 UTC (rev 582) +++ trunk/python-ogre/ThirdParty/forests/TreeLoader3D.cpp 2008-04-05 07:54:56 UTC (rev 583) @@ -202,11 +202,11 @@ float distSq = distX * distX + distZ * distZ; if (distSq <= radiusSq){ +#ifdef PAGEDGEOMETRY_USER_DATA + deletedUserData.push_back(treeList[i].userData); +#endif //If it's within the radius, delete it treeList[i] = treeList.back(); -#ifdef PAGEDGEOMETRY_USER_DATA - deletedUserData.push_back(treeList.back().userData); -#endif treeList.pop_back(); modified = true; } Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIPanel.cpp =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIPanel.cpp 2008-04-01 04:05:25 UTC (rev 582) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIPanel.cpp 2008-04-05 07:54:56 UTC (rev 583) @@ -420,6 +420,16 @@ } } + void Panel::enableScrollPane() + { + mScrollPane->enable(); + } + + void Panel::disableScrollPane() + { + mScrollPane->disable(); + } + QuadContainer* Panel::getQuadContainer() { return this; Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIPanel.h =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIPanel.h 2008-04-01 04:05:25 UTC (rev 582) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIPanel.h 2008-04-05 07:54:56 UTC (rev 583) @@ -112,6 +112,10 @@ VerticalTrackBar* createVerticalTrackBar(); VerticalTrackBar* createVerticalTrackBar(const std::string& name); + void enableScrollPane(); + + void disableScrollPane(); + virtual QuadContainer* getQuadContainer(); ScrollPane* getScrollPane(); virtual Widget* getTargetWidget(const Point& pixelPosition); Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIScrollPane.cpp =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIScrollPane.cpp 2008-04-01 04:05:25 UTC (rev 582) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIScrollPane.cpp 2008-04-05 07:54:56 UTC (rev 583) @@ -108,6 +108,21 @@ mRightBar->setSliderHeight(parentSize.height / mSize.height); } + void ScrollPane::enable() + { + Widget::enable(); + + unmanageWidgets(); + manageWidgets(); + } + + void ScrollPane::disable() + { + mBottomBar->hide(); + mRightBar->hide(); + Widget::disable(); + } + HorizontalScrollBar::ButtonLayout ScrollPane::getHorizontalButtonLayout() { return mHorizontalButtonLayout; @@ -130,6 +145,9 @@ void ScrollPane::manageWidget(Widget* w) { + if(!mEnabled) + return; + if(w->getParentWidget() != mParentWidget) return; @@ -167,7 +185,7 @@ void ScrollPane::manageWidgets() { - if(mParentWidget == NULL) + if(mParentWidget == NULL || !mEnabled) return; setSize(mParentWidget->getSize()); Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIScrollPane.h =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIScrollPane.h 2008-04-01 04:05:25 UTC (rev 582) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIScrollPane.h 2008-04-05 07:54:56 UTC (rev 583) @@ -57,6 +57,18 @@ // When widgets become managed/unmanaged, the pane may grow or shrink. void _determinePaneBounds(); + /** + * Enable Widget, allowing it to accept and handle events. + * NOTE: Sheets cannot be enabled/disabled + */ + virtual void enable(); + + /** + * Disable Widget, making it unresponsive to events. + * NOTE: Sheets cannot be disabled. + */ + virtual void disable(); + HorizontalScrollBar::ButtonLayout getHorizontalButtonLayout(); virtual Widget* getTargetWidget(const Point& pixelPosition); virtual const Widget* getTargetWidget(const Point& pixelPosition) const; Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIWidget.cpp =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIWidget.cpp 2008-04-01 04:05:25 UTC (rev 582) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIWidget.cpp 2008-04-05 07:54:56 UTC (rev 583) @@ -1385,8 +1385,9 @@ void Widget::setDimensions(const Rect& pixelDimensions) { + // Its important to set the size before the position, as this may affect scrollbars. + setSize(pixelDimensions.width,pixelDimensions.height); setPosition(pixelDimensions.x,pixelDimensions.y); - setSize(pixelDimensions.width,pixelDimensions.height); } void Widget::setDraggingWidget(Widget* w) Modified: trunk/python-ogre/code_generators/nxogre/python_nxogre_aliases.h =================================================================== --- trunk/python-ogre/code_generators/nxogre/python_nxogre_aliases.h 2008-04-01 04:05:25 UTC (rev 582) +++ trunk/python-ogre/code_generators/nxogre/python_nxogre_aliases.h 2008-04-05 07:54:56 UTC (rev 583) @@ -41,8 +41,8 @@ MapContainerJoint; typedef std::map<std::string, NxOgre::Container<std::string, NxOgre::Material*>::Containee, std::less<std::string> >\ MapContainerMaterial; -typedef std::map<std::string, NxOgre::Container<std::string, NxOgre::Character*>::Containee, std::less<std::string> >\ - MapContainerCharacter; +// typedef std::map<std::string, NxOgre::Container<std::string, NxOgre::Character*>::Containee, std::less<std::string> >\ +// MapContainerCharacter; typedef std::map<std::string, NxOgre::Container<std::string, NxOgre::Fluid*>::Containee, std::less<std::string> >\ MapContainerFluid; typedef std::map<std::string, NxOgre::Container<std::string, NxOgre::FluidDrain*>::Containee, std::less<std::string> >\ @@ -90,7 +90,7 @@ // typedef NxOgre::Container<NxOgre::NxCollisionGroup, NxOgre::ShapeGroup*> ShapeGroupsByIndex; typedef NxOgre::Container<NxOgre::NxString, NxOgre::Trigger*> Triggers; typedef NxOgre::List<NxOgre::Wheel*> Wheels; -typedef NxOgre::Container<NxOgre::NxString, NxOgre::Character*> Characters; +// typedef NxOgre::Container<NxOgre::NxString, NxOgre::Character*> Characters; typedef NxOgre::List<NxOgre::CharacterHitReport*> CharacterHitReports; typedef NxOgre::Container<NxOgre::NxString, NxOgre::Fluid*> Fluids; typedef NxOgre::Container<NxOgre::NxString, NxOgre::FluidDrain*> FluidDrains; @@ -103,12 +103,12 @@ typedef NxOgre::Container<std::string, NxConvexMesh*> NxConvexMeshes; typedef NxOgre::Container<std::string, NxTriangleMesh*> NxTriangleMeshes; -typedef NxOgre::Container<std::string, NxOgre::MaterialAlias*> MaterialAliases; +// typedef NxOgre::Container<std::string, NxOgre::MaterialAlias*> MaterialAliases; typedef NxOgre::Container<unsigned int, NxTriangleMesh*> NxTriangleMesheInts; -typedef NxOgre::Container<unsigned int, NxOgre::ResourceSystem*> ResourceSystemInts; -typedef NxOgre::Container<unsigned int, NxOgre::MaterialAlias*> MaterialAliasInts; -typedef NxOgre::Container<unsigned int, NxOgre::CharacterMovementModel*> CharacterMovementModelInts; +// typedef NxOgre::Container<unsigned int, NxOgre::ResourceSystem*> ResourceSystemInts; +// typedef NxOgre::Container<unsigned int, NxOgre::MaterialAlias*> MaterialAliasInts; +// typedef NxOgre::Container<unsigned int, NxOgre::CharacterMovementModel*> CharacterMovementModelInts; // typedef NxOgre::Container<NxOgre::NxString, ::ActorGroup*> ActorGroups; // typedef NxOgre::Container<NxOgre::NxActorGroup, NxOgre::ActorGroup*> ActorGroupsByIndex; @@ -149,21 +149,21 @@ typedef std::map<unsigned int, NxOgre::Container<unsigned int, NxOgre::RenderableSource*>::Containee, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, NxOgre::Container<unsigned int, NxOgre::RenderableSource*>::Containee> > >\ MapContainerRenderableSource; -typedef std::map<unsigned int, NxOgre::Container<unsigned int, NxOgre::CharacterMovementModel*>::Containee, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, NxOgre::Container<unsigned int, NxOgre::CharacterMovementModel*>::Containee> > >\ - MapContainerCharacterMovementModel; -typedef std::map<unsigned int, NxOgre::Container<unsigned int, NxOgre::MaterialAlias*>::Containee, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, NxOgre::Container<unsigned int, NxOgre::MaterialAlias*>::Containee> > >\ - MapContainerMaterialAlias; -typedef std::map<unsigned int, NxOgre::Container<unsigned int, NxOgre::ResourceSystem*>::Containee, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, NxOgre::Container<unsigned int, NxOgre::ResourceSystem*>::Containee> > >\ - MapContainerResourceSystem; +// typedef std::map<unsigned int, NxOgre::Container<unsigned int, NxOgre::CharacterMovementModel*>::Containee, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, NxOgre::Container<unsigned int, NxOgre::CharacterMovementModel*>::Containee> > >\ +// MapContainerCharacterMovementModel; +// typedef std::map<unsigned int, NxOgre::Container<unsigned int, NxOgre::MaterialAlias*>::Containee, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, NxOgre::Container<unsigned int, NxOgre::MaterialAlias*>::Containee> > >\ +// MapContainerMaterialAlias; +// typedef std::map<unsigned int, NxOgre::Container<unsigned int, NxOgre::ResourceSystem*>::Containee, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, NxOgre::Container<unsigned int, NxOgre::ResourceSystem*>::Containee> > >\ +// MapContainerResourceSystem; typedef std::map<unsigned int, NxOgre::Container<unsigned int, NxTriangleMesh*>::Containee, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, NxOgre::Container<unsigned int, NxTriangleMesh*>::Containee> > >\ MapContainerNxTriangleMesh; -typedef std::map<std::string, NxOgre::Container<std::string, NxOgre::MaterialAlias*>::Containee, std::less<std::string>, std::allocator<std::pair<std::string const, NxOgre::Container<std::string, NxOgre::MaterialAlias*>::Containee> > >\ - MapStringContainerMaterialAlias; +// typedef std::map<std::string, NxOgre::Container<std::string, NxOgre::MaterialAlias*>::Containee, std::less<std::string>, std::allocator<std::pair<std::string const, NxOgre::Container<std::string, NxOgre::MaterialAlias*>::Containee> > >\ +// MapStringContainerMaterialAlias; typedef std::map<std::string, NxOgre::Container<std::string, NxTriangleMesh*>::Containee, std::less<std::string>, std::allocator<std::pair<std::string const, NxOgre::Container<std::string, NxTriangleMesh*>::Containee> > >\ MapStringContainerNxTriangleMesh; -typedef std::map<std::string, NxOgre::Container<std::string, NxOgre::CharacterMovementModel*>::Containee, std::less<std::string>, std::allocator<std::pair<std::string const, NxOgre::Container<std::string, NxOgre::CharacterMovementModel*>::Containee> > >\ - MapStringContainerCharacterMovementModel; +// typedef std::map<std::string, NxOgre::Container<std::string, NxOgre::CharacterMovementModel*>::Containee, std::less<std::strin... [truncated message content] |
From: <and...@us...> - 2008-04-01 04:05:34
|
Revision: 582 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=582&view=rev Author: andy_miller Date: 2008-03-31 21:05:25 -0700 (Mon, 31 Mar 2008) Log Message: ----------- Pygccxml to rev 1234 Revision Links: -------------- http://python-ogre.svn.sourceforge.net/python-ogre/?rev=1234&view=rev Modified Paths: -------------- trunk/python-ogre/environment.py Modified: trunk/python-ogre/environment.py =================================================================== --- trunk/python-ogre/environment.py 2008-03-31 00:27:47 UTC (rev 581) +++ trunk/python-ogre/environment.py 2008-04-01 04:05:25 UTC (rev 582) @@ -178,18 +178,22 @@ class gccxml: pythonModule = False active = True + base = 'gccxml' + source = [ + [cvs, " -d :pserver:an...@ww...:/cvsroot/GCC_XML co "+base, os.getcwd()] + ] if isLinux() or isMac(): - base = 'gccxml' - source = [ - [cvs, " -d :pserver:an...@ww...:/cvsroot/GCC_XML co "+base, os.getcwd()] - ] - buildCmds = [ [0,"mkdir -p gccxml-build", ''], [0,"cmake ../gccxml -DCMAKE_INSTALL_PREFIX:PATH="+ PREFIX,os.path.join(os.getcwd(),'gccxml-build')], [0,"make", os.path.join(os.getcwd(),'gccxml-build')], [0,"make install",os.path.join(os.getcwd(),'gccxml-build')] ] + else: +# print "Use cmake to create a build file for gccxml (point cmake at your ./gccxml directory" +# print "Then use MSVC to build gccxml" + buildCmds=[] + class install: pythonModule = False active = True @@ -236,7 +240,7 @@ class pygccxml: pythonModule = False active = True - if isLinux() or isMac(): + if isLinux() or isMac() or isWindows(): base = 'pygccxml' source = [ [svn, " co -r 1234 http://pygccxml.svn.sourceforge.net/svnroot/pygccxml "+base, os.getcwd()] @@ -342,6 +346,10 @@ [0,tar + " xzf "+ os.path.join(downloadPath,base) + ".tar.gz --overwrite", ''], # unpack it [0,cp + "-R * " + PREFIX, os.path.join (os.getcwd(), base) ] # copy to our bin area ] + if isWindows(): + print "Retrieve latest from http://www.cmake.org and install it yourself" + source=[] + buildCmds=[] class scons: pythonModule = False @@ -352,7 +360,7 @@ ] # the utils in Windows don't handle paths or tar spawing gzip hence the work arounds - if isLinux(): + if isLinux() or isMac(): buildCmds = [ [0, tar + " zxf " + os.path.join(downloadPath,base)+".tar.gz --overwrite",'' ], [0,"python setup.py install --prefix=%s" % PREFIX , os.path.join (os.getcwd(), base) ] @@ -361,7 +369,7 @@ else: buildCmds = unTarGz( base, downloadPath ) +\ [ - [0,"python setup.py install --prefix=%s" % PREFIX , os.path.join (os.getcwd(), base) ] + [0,"python setup.py install" , os.path.join (os.getcwd(), base) ] ] class boost: ## also included bjam @@ -1496,7 +1504,7 @@ cls.__dict__[key] = value print "Set %s.%s to %s" % (name, key, value) - + ##CheckPaths( cls, name ) cls.root_dir = os.path.join( root_dir, 'code_generators', name ) cls.dir_name = name + '_' + str(cls.version) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2008-03-31 00:27:43
|
Revision: 581 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=581&view=rev Author: andy_miller Date: 2008-03-30 17:27:47 -0700 (Sun, 30 Mar 2008) Log Message: ----------- Further thirdparty updates and fixes to demos Modified Paths: -------------- trunk/python-ogre/ThirdParty/caelum/SkyDome.cpp trunk/python-ogre/ThirdParty/ogreal/OgreALSoundManager.cpp trunk/python-ogre/demos/caelum/media/LayeredClouds.material trunk/python-ogre/demos/nxogre/CakeFramework.py trunk/python-ogre/demos/ogre/Demo_Shadows.py trunk/python-ogre/demos/ogre/tests/Test_RenderQueue.py trunk/python-ogre/environment.py Modified: trunk/python-ogre/ThirdParty/caelum/SkyDome.cpp =================================================================== --- trunk/python-ogre/ThirdParty/caelum/SkyDome.cpp 2008-03-15 00:25:20 UTC (rev 580) +++ trunk/python-ogre/ThirdParty/caelum/SkyDome.cpp 2008-03-31 00:27:47 UTC (rev 581) @@ -170,14 +170,14 @@ "SkyDomeFP", RESOURCE_GROUP_NAME, "cg", Ogre::GPT_FRAGMENT_PROGRAM); fp->setSourceFile ("CaelumSkyDome.cg"); fp->setParameter ("entry_point", "SkyDome_fp"); - fp->setParameter("compile_arguments", "-DHAZE=1"); + fp->setParameter("compile_arguments", "-DHAZE"); fp->setParameter ("profiles", "ps_2_0 arbfp1"); fp = Ogre::HighLevelGpuProgramManager::getSingleton().createProgram ( "SkyDomeFP_NoHaze", RESOURCE_GROUP_NAME, "cg", Ogre::GPT_FRAGMENT_PROGRAM); fp->setSourceFile ("CaelumSkyDome.cg"); fp->setParameter ("entry_point", "SkyDome_fp"); - fp->setParameter ("compile_arguments", "-DHAZE=0"); + fp->setParameter ("compile_arguments", ""); fp->setParameter ("profiles", "ps_2_0 arbfp1"); } Modified: trunk/python-ogre/ThirdParty/ogreal/OgreALSoundManager.cpp =================================================================== --- trunk/python-ogre/ThirdParty/ogreal/OgreALSoundManager.cpp 2008-03-15 00:25:20 UTC (rev 580) +++ trunk/python-ogre/ThirdParty/ogreal/OgreALSoundManager.cpp 2008-03-31 00:27:47 UTC (rev 581) @@ -393,7 +393,7 @@ SoundList::iterator soundItr = mSoundsToDestroy.begin(); while(!mSoundsToDestroy.empty()) { - destroySound(*soundItr); + delete (*soundItr); soundItr = mSoundsToDestroy.erase(soundItr); } Modified: trunk/python-ogre/demos/caelum/media/LayeredClouds.material =================================================================== --- trunk/python-ogre/demos/caelum/media/LayeredClouds.material 2008-03-15 00:25:20 UTC (rev 580) +++ trunk/python-ogre/demos/caelum/media/LayeredClouds.material 2008-03-31 00:27:47 UTC (rev 581) @@ -45,7 +45,7 @@ param_named sunColour float4 1 1 1 1 // Fog colour; used as the base cloud colour. - param_named fogColour float4 + param_named fogColour float4 0 0 0 0 // The inverse of the cloud forms scale Modified: trunk/python-ogre/demos/nxogre/CakeFramework.py =================================================================== --- trunk/python-ogre/demos/nxogre/CakeFramework.py 2008-03-15 00:25:20 UTC (rev 580) +++ trunk/python-ogre/demos/nxogre/CakeFramework.py 2008-03-31 00:27:47 UTC (rev 581) @@ -66,27 +66,27 @@ ogre.RenderQueueListener.__init__(self) def renderQueueStarted(self, queueGroupId, invocation, skipThisInvocation): - ##RenderQueue containing the object to be highlighted - if (queueGroupId == 90): - - rendersys = ogre.Root.getSingleton().getRenderSystem() - - rendersys.clearFrameBuffer(ogre.FBT_STENCIL) - rendersys.setStencilCheckEnabled(True) - rendersys.setStencilBufferParams(ogre.CMPF_ALWAYS_PASS,1,0xFFFFFFFF, + ##RenderQueue containing the object to be highlighted + if (queueGroupId == 90): + + rendersys = ogre.Root.getSingleton().getRenderSystem() + + rendersys.clearFrameBuffer(ogre.FBT_STENCIL) + rendersys.setStencilCheckEnabled(True) + rendersys.setStencilBufferParams(ogre.CMPF_ALWAYS_PASS,1,0xFFFFFFFF, ogre.SOP_KEEP,ogre.SOP_KEEP,ogre.SOP_REPLACE,False) + + ##RenderQueue containing the outline + if (queueGroupId == 91): + + rendersys = ogre.Root.getSingleton().getRenderSystem() + + rendersys.setStencilCheckEnabled(True) + rendersys.setStencilBufferParams(ogre.CMPF_NOT_EQUAL,1,0xFFFFFFFF, + ogre.SOP_KEEP,ogre.SOP_KEEP,ogre.SOP_KEEP,False) + return skipThisInvocation - ##RenderQueue containing the outline - if (queueGroupId == 91): - rendersys = ogre.Root.getSingleton().getRenderSystem() - - 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 )): @@ -123,9 +123,7 @@ def pre(self): self.getConfig() - print "$$$$$$$ PRE 1" self.Renderer = Renderer(self.RenderConfiguration) - print "$$$$$$$ PRE 1" self.InputHandler = InputHandler() print "$$$$$$$ PRE 1" window = self.Renderer.createWindow("NxOgre") @@ -292,6 +290,7 @@ def getRoot(self): return self.Root + def getWindow(self): return self.Window @@ -391,15 +390,19 @@ def frameStarted(self, evt): + print "FS" self.InputHandler.onFrame(evt.timeSinceLastFrame) + print "FS1" self.Cake.onFramePre(evt.timeSinceLastFrame) - + print "FS2" + if (self.Shutdown): return False else : return True def frameEnded( self, evt): + print "FE" if (self.Shutdown): return False if (self.Window.isClosed()) : @@ -1183,7 +1186,7 @@ self.World = nxogre.World(nxogre.PhysXDriverParams("log: html")) self.Scene = self.World.createScene("Main", self.SceneMgr, nxogre.SceneParams("gravity: yes, floor: yes, time-step-method: variable")) - self.Scene.createBody("cube.1m.mesh", nxogre.CubeShape(1), ogre.Vector3(0,5,0), nxogre.ActorParams("mass: 10")) + self.Scene.createBody("cube.1m.mesh", nxogre.CubeShape(1), nxogre.Pose(ogre.Vector3(0,5,0)), nxogre.ActorParams("mass: 10")) def stop(self): del self.World Modified: trunk/python-ogre/demos/ogre/Demo_Shadows.py =================================================================== --- trunk/python-ogre/demos/ogre/Demo_Shadows.py 2008-03-15 00:25:20 UTC (rev 580) +++ trunk/python-ogre/demos/ogre/Demo_Shadows.py 2008-03-31 00:27:47 UTC (rev 581) @@ -172,12 +172,13 @@ class ShadowsListener ( SampleFramework.FrameListener, OIS.MouseListener, OIS.KeyListener ): - def __init__ (self, win, cam, sm): + def __init__ (self, win, cam, sm, app): SampleFramework.FrameListener.__init__(self, win, cam, True, True) OIS.KeyListener.__init__(self) OIS.MouseListener.__init__(self) + self.app = app self.sceneManager = sm - self.mMain = win + self.mWindow = win self.camera=cam self.mShutdownRequested = False self.mLMBDown=False @@ -191,9 +192,14 @@ self.mLastMousePositionSet=False self.mAvgFrameTime =0.1 self.mWriteToFile = False + self.mTranslateVector = Ogre.Vector3.ZERO + self.mQuit = False + self.mSkipCount = 0 + self.mUpdateFreq=10 + self.mRotX = 0 + self.mRotY = 0 - -# # windowHnd = self.mMain.getRenderWindow().getCustomAttributeInt("WINDOW") +# # windowHnd = self.mWindow.getRenderWindow().getCustomAttributeInt("WINDOW") # # self.mInputManager = \ # # OIS.createPythonInputSystem([("WINDOW",str(windowHnd))]) # # @@ -201,7 +207,7 @@ # # self.mKeyboard = self.mInputManager.createInputObjectKeyboard( OIS.OISKeyboard, True ) # # self.mMouse = self.mInputManager.createInputObjectMouse( OIS.OISMouse, True ) -# # width, height, depth, left, top = self.mMain.getRenderWindow().getMetrics() +# # width, height, depth, left, top = self.mWindow.getRenderWindow().getMetrics() # # ##Set Mouse Region.. if window resizes, we should alter this to reflect as well # # ms = self.mMouse.getMouseState() @@ -250,8 +256,7 @@ def frameStarted( self, evt): self.Mouse.capture() self.Keyboard.capture() - - if( self.mMain.getRenderWindow().isActive() == False ): + if( self.mWindow.isActive() == False ): return False if (self.mQuit): @@ -260,7 +265,7 @@ self.mSkipCount+=1 if (self.mSkipCount >= self.mUpdateFreq): self.mSkipCount = 0 - self.updateStats() +# # # self.updateStats() ## update movement process if(self.mProcessMovement or self.mUpdateMovement): if self.mMoveLeft: @@ -272,9 +277,9 @@ if self.mMoveBck: self.mTranslateVector.z += self.mAvgFrameTime * MOVESPEED - self.mMain.getCamera().yaw(Ogre.Degree(self.mRotX)) - self.mMain.getCamera().pitch(Ogre.Degree(self.mRotY)) - self.mMain.getCamera().moveRelative(self.mTranslateVector) + self.camera.yaw(Ogre.Degree(self.mRotX)) + self.camera.pitch(Ogre.Degree(self.mRotY)) + self.camera.moveRelative(self.mTranslateVector) self.mUpdateMovement = False self.mRotX = 0 @@ -283,17 +288,17 @@ if(self.mWriteToFile): self.mNumScreenShots +=1 - self.mMain.getRenderWindow().writeContentsToFile("frame_" + + self.mWindow.writeContentsToFile("frame_" + str(self.mNumScreenShots) + ".png") return True def frameEnded( self, evt): - if (self.mAnimState): - self.mAnimState.addTime(evt.timeSinceLastFrame) + if (self.app.mAnimState): + self.app.mAnimState.addTime(evt.timeSinceLastFrame) if (self.mShutdownRequested): return False else: - return ExampleFrameListener.frameEnded(self, evt) + return SampleFramework.FrameListener.frameEnded(self, evt) ##-------------------------------------------------------------------------- @@ -324,7 +329,7 @@ if (e.key == OIS.KC_SYSRQ ): ss = "screenshot_" + str(self.mNumScreenShots) + ".png" - self.mMain.getRenderWindow().writeContentsToFile(ss.str()) + self.mWindow.writeContentsToFile(ss.str()) self.mDebugText = "Saved: " + ss.str() ##self.mTimeUntilNextToggle = 0.5 @@ -582,7 +587,7 @@ ## Prepare athene mesh for normalmapping pAthene = Ogre.MeshManager.getSingleton().load("athene.mesh", Ogre.ResourceGroupManager.DEFAULT_RESOURCE_GROUP_NAME) - ret, src, dest =pAthene.suggestTangentVectorBuildParams( Ogre.VES_TANGENT ) + ret, src, dest =pAthene.suggestTangentVectorBuildParams( Ogre.VES_TANGENT , 1, 1) if ( not ret): pAthene.buildTangentVectors(VES_TANGENT, src, dest) @@ -965,19 +970,20 @@ if (cbo.getSelectedItem()): proj = cbo.getSelectedItem().getID() if (proj != self.mCurrentProjection): - ## AJM WRNIMG + ## AJM WARNING if proj == self.UNIFORM: self.mCurrentShadowCameraSetup = Ogre.ShadowCameraSetupPtr(Ogre.DefaultShadowCameraSetup()) elif proj == self.UNIFORM_FOCUSED: + self.focused = Ogre.FocusedShadowCameraSetup() self.mCurrentShadowCameraSetup =\ - ShadowCameraSetupPtr(Ogre.FocusedShadowCameraSetup()) + Ogre.ShadowCameraSetup(self.focused) elif proj == self.LISPSM: - self.mLiSPSMSetup = LiSPSMShadowCameraSetup() + self.mLiSPSMSetup = Ogre.LiSPSMShadowCameraSetup() ##self.mLiSPSMSetup.setUseAggressiveFocusRegion=False self.mCurrentShadowCameraSetup = Ogre.ShadowCameraSetupPtr(self.mLiSPSMSetup) elif proj == self.PLANE_OPTIMAL: self.mCurrentShadowCameraSetup =\ - ShadowCameraSetupPtr(Ogre.PlaneOptimalShadowCameraSetup(self.mPlane)) + Ogre.ShadowCameraSetupPtr(Ogre.PlaneOptimalShadowCameraSetup(self.mPlane)) self.mCurrentProjection = proj self.sceneManager.setShadowCameraSetup(self.mCurrentShadowCameraSetup) @@ -1131,7 +1137,7 @@ ## Create new frame listener def _createFrameListener(self): - shadowListener = ShadowsListener(self.renderWindow, self.camera, self.sceneManager) + shadowListener = ShadowsListener(self.renderWindow, self.camera, self.sceneManager, self) self.frameListener = shadowListener self.frameListener.showDebugOverlay(True) self.root.addFrameListener(self.frameListener) Modified: trunk/python-ogre/demos/ogre/tests/Test_RenderQueue.py =================================================================== --- trunk/python-ogre/demos/ogre/tests/Test_RenderQueue.py 2008-03-15 00:25:20 UTC (rev 580) +++ trunk/python-ogre/demos/ogre/tests/Test_RenderQueue.py 2008-03-31 00:27:47 UTC (rev 581) @@ -12,15 +12,15 @@ print type (ogre.RENDER_QUEUE_OVERLAY) if (id == ogre.RENDER_QUEUE_OVERLAY): print "Queue Start Skip %i %i " % (id,ogre.RENDER_QUEUE_OVERLAY) - return True + return 1 # True print "returning false" - return False + return 0 # False def renderQueueEnded (self, id , invocation,repeatThisInvocation): print "In QueueEnded" if (id == ogre.RENDER_QUEUE_OVERLAY): print "Queue End Repeat %i %i" % (id, ogre.RENDER_QUEUE_OVERLAY) - return False - return False + return 0 # False + return 0 # False class EnvMapApplication(sf.Application): def _createScene( self ): Modified: trunk/python-ogre/environment.py =================================================================== --- trunk/python-ogre/environment.py 2008-03-15 00:25:20 UTC (rev 580) +++ trunk/python-ogre/environment.py 2008-03-31 00:27:47 UTC (rev 581) @@ -127,9 +127,11 @@ mv = "move /Y " rm = "del /Q " cp = "copy /Y " - unzip = "unzip " + unzip = "unzip -o " cvs = "cvs -z3 -q " svn = "svn " + VCBUILD="'c:\\Program Files\\Microsoft Visual Studio 8\\vc\\vcpackages\\vcbuild.exe' /useenv " + VCBUILD = '"c:/Program Files/Microsoft Visual Studio 8/vc/vcpackages/vcbuild.exe" /useenv ' else: mv = "mv " rm = "rm -f " @@ -534,16 +536,16 @@ class ois: active = True pythonModule = True - version= "1.1" + version= "1.2" name = 'ois' cflags='' parent = "ogre/io" if isMac(): source=[] if isLinux(): - base = "ois-1.0RC1" + base = "ois-1.2" source=[ - [wget, "http://prdownloads.sourceforge.net/wgois/ois-1.0RC1.tar.gz", downloadPath] + [wget, "http://prdownloads.sourceforge.net/wgois/ois-1.2.tar.gz", downloadPath] ] buildCmds = [ [0, tar + " zxf " + os.path.join(downloadPath,base)+".tar.gz --overwrite",os.getcwd() ], @@ -563,6 +565,15 @@ [0,'make', os.path.join(os.getcwd(), base )], [0,'make install', os.path.join(os.getcwd(), base )] ] + if isWindows(): + base = "ois" + source = [ wget,"http://downloads.sourceforge.net/wgois/ois_1.2.0.zip", downloadPath] + buildCmds = [ + [0, unzip + downloadPath + "/" + "ois_1.2.0.zip" ,os.getcwd() ], +# [0, '"c:/Program Files/Microsoft Visual Studio 8/vc/vcpackages/vcbuild.exe" /useenv ois_VC8.sln ', os.path.join(os.getcwd(), base, 'Win32' )], +# [0, VCBUILD + " ois_vc8.sln " + "\"Release|Win32\"", os.path.join(os.getcwd(), base, 'Win32' )] + ] + if os.name=='nt': if _PreCompiled: pchstop = 'OIS.h' This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |