Thread: [Python-ogre-commit] SF.net SVN: python-ogre:[716] trunk/python-ogre (Page 2)
Brought to you by:
andy_miller,
roman_yakovenko
From: <and...@us...> - 2008-09-01 14:19:36
|
Revision: 716 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=716&view=rev Author: andy_miller Date: 2008-09-01 14:19:39 +0000 (Mon, 01 Sep 2008) Log Message: ----------- Updates getting ready for the next binary release Updates to Hikari -- fixed some alaises Added and updated media for Ogre and particle universe Modified Paths: -------------- trunk/python-ogre/code_generators/hikari/customization_data.py trunk/python-ogre/code_generators/hikari/generate_code.py trunk/python-ogre/code_generators/hikari/python_hikari_aliases.h trunk/python-ogre/code_generators/ogre/generate_code.py trunk/python-ogre/demos/cegui/CEGUI_framework.py trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/post/glsl/GlobalLight_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/GlobalLight_ps.hlsl trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/post/hlsl/SinglePass_ps.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_post_debug.glsl.program trunk/python-ogre/demos/media/DeferredShadingMedia/deferred_post_debug.hlsl.program trunk/python-ogre/demos/media/DeferredShadingMedia/deferred_post_minilight.glsl.program 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_onepass.glsl.program trunk/python-ogre/demos/media/DeferredShadingMedia/deferred_post_onepass.hlsl.program trunk/python-ogre/demos/media/materials/scripts/Examples.compositor trunk/python-ogre/demos/particleuniverse/Demo_Particle.py trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/models/fxpression.mesh trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/models/pu_stone.mesh trunk/python-ogre/environment.py trunk/python-ogre/scripts/MakeRelease.bat trunk/python-ogre/scripts/UpdateDLLs.bat trunk/python-ogre/scripts/build_html.bat trunk/python-ogre/scripts/compilesource.bat trunk/python-ogre/scripts/epydoc_config Added Paths: ----------- trunk/python-ogre/demos/media/ParticleUniverse/ trunk/python-ogre/demos/media/ParticleUniverse/gui/ trunk/python-ogre/demos/media/ParticleUniverse/gui/puviewer.layout trunk/python-ogre/demos/media/ParticleUniverse/material/ trunk/python-ogre/demos/media/ParticleUniverse/material/pu_burst.material trunk/python-ogre/demos/media/ParticleUniverse/material/pu_explosion.material trunk/python-ogre/demos/media/ParticleUniverse/material/pu_flame.material trunk/python-ogre/demos/media/ParticleUniverse/material/pu_fxpression.material trunk/python-ogre/demos/media/ParticleUniverse/material/pu_generic.material trunk/python-ogre/demos/media/ParticleUniverse/material/pu_lightning.material trunk/python-ogre/demos/media/ParticleUniverse/material/pu_lod.material trunk/python-ogre/demos/media/ParticleUniverse/material/pu_rain.material trunk/python-ogre/demos/media/ParticleUniverse/material/pu_stone.material trunk/python-ogre/demos/media/ParticleUniverse/material/pu_tornado.material trunk/python-ogre/demos/media/ParticleUniverse/models/ trunk/python-ogre/demos/media/ParticleUniverse/models/fxpression.mesh trunk/python-ogre/demos/media/ParticleUniverse/models/pu_stone.mesh trunk/python-ogre/demos/media/ParticleUniverse/scripts/ trunk/python-ogre/demos/media/ParticleUniverse/scripts/pu_example_11_20.pu trunk/python-ogre/demos/media/ParticleUniverse/scripts/pu_example_1_10.pu trunk/python-ogre/demos/media/ParticleUniverse/scripts/pu_example_21_30.pu trunk/python-ogre/demos/media/ParticleUniverse/scripts/pu_explosion.pu trunk/python-ogre/demos/media/ParticleUniverse/scripts/pu_flame.pu trunk/python-ogre/demos/media/ParticleUniverse/scripts/pu_fxpression.pu trunk/python-ogre/demos/media/ParticleUniverse/scripts/pu_generic.pua trunk/python-ogre/demos/media/ParticleUniverse/scripts/pu_lightning.pu trunk/python-ogre/demos/media/ParticleUniverse/scripts/pu_lod.pu trunk/python-ogre/demos/media/ParticleUniverse/scripts/pu_rain.pu trunk/python-ogre/demos/media/ParticleUniverse/scripts/pu_tornado.pu trunk/python-ogre/demos/media/ParticleUniverse/textures/ trunk/python-ogre/demos/media/ParticleUniverse/textures/128x128/ trunk/python-ogre/demos/media/ParticleUniverse/textures/128x128/pu_mist_01_128x128.png trunk/python-ogre/demos/media/ParticleUniverse/textures/128x128/pu_smoke_01_128x128.png trunk/python-ogre/demos/media/ParticleUniverse/textures/128x128/pu_smoke_02_128x128.png trunk/python-ogre/demos/media/ParticleUniverse/textures/128x128/pu_star_01_128x128.png trunk/python-ogre/demos/media/ParticleUniverse/textures/128x128/pu_star_02_128x128.png trunk/python-ogre/demos/media/ParticleUniverse/textures/128x128/pu_water_01_128x128.png trunk/python-ogre/demos/media/ParticleUniverse/textures/256x256/ trunk/python-ogre/demos/media/ParticleUniverse/textures/256x256/pu_flare_10_256x256.png trunk/python-ogre/demos/media/ParticleUniverse/textures/256x256/pu_flare_11_256x256.png trunk/python-ogre/demos/media/ParticleUniverse/textures/256x256/pu_flare_12_256x256.png trunk/python-ogre/demos/media/ParticleUniverse/textures/256x256/pu_flare_13_256x256.png trunk/python-ogre/demos/media/ParticleUniverse/textures/256x256/pu_flare_14_256x256.png trunk/python-ogre/demos/media/ParticleUniverse/textures/256x256/pu_flare_15_256x256.png trunk/python-ogre/demos/media/ParticleUniverse/textures/256x256/pu_flare_16_256x256.png trunk/python-ogre/demos/media/ParticleUniverse/textures/256x256/pu_flare_17_256x256.png trunk/python-ogre/demos/media/ParticleUniverse/textures/256x256/pu_flare_23_256x256.png trunk/python-ogre/demos/media/ParticleUniverse/textures/256x256/pu_smoke_01_256x256.png trunk/python-ogre/demos/media/ParticleUniverse/textures/32x32/ trunk/python-ogre/demos/media/ParticleUniverse/textures/32x32/pu_rain_01.png trunk/python-ogre/demos/media/ParticleUniverse/textures/64x64/ trunk/python-ogre/demos/media/ParticleUniverse/textures/64x64/pu_dot_01_64x64.png trunk/python-ogre/demos/media/ParticleUniverse/textures/64x64/pu_dot_02_64x64.png trunk/python-ogre/demos/media/ParticleUniverse/textures/64x64/pu_dot_03_64x64.png trunk/python-ogre/demos/media/ParticleUniverse/textures/64x64/pu_dot_04_64x64.png trunk/python-ogre/demos/media/ParticleUniverse/textures/64x64/pu_explode_01_64x64.png trunk/python-ogre/demos/media/ParticleUniverse/textures/64x64/pu_fire_01_64x64.png trunk/python-ogre/demos/media/ParticleUniverse/textures/64x64/pu_flare_01_64x64.png trunk/python-ogre/demos/media/ParticleUniverse/textures/64x64/pu_flare_02_64x64.png trunk/python-ogre/demos/media/ParticleUniverse/textures/64x64/pu_flare_03_64x64.png trunk/python-ogre/demos/media/ParticleUniverse/textures/64x64/pu_ice_01_64x64.png trunk/python-ogre/demos/media/ParticleUniverse/textures/64x64/pu_nucleus.png trunk/python-ogre/demos/media/ParticleUniverse/textures/64x64/pu_smoke_01_64x64.png trunk/python-ogre/demos/media/ParticleUniverse/textures/64x64/pu_smoke_02_64x64.png trunk/python-ogre/demos/media/ParticleUniverse/textures/64x64/pu_star_01_64x64.png trunk/python-ogre/demos/media/ParticleUniverse/textures/64x64/pu_star_02_64x64.png trunk/python-ogre/demos/media/ParticleUniverse/textures/64x64/pu_star_03_64x64.png trunk/python-ogre/demos/media/ParticleUniverse/textures/64x64/pu_star_04_64x64.png trunk/python-ogre/demos/media/ParticleUniverse/textures/64x64/pu_star_05_64x64.png trunk/python-ogre/demos/media/ParticleUniverse/textures/64x64/pu_star_06_64x64.png trunk/python-ogre/demos/media/ParticleUniverse/textures/various/ trunk/python-ogre/demos/media/ParticleUniverse/textures/various/crate6.png trunk/python-ogre/demos/media/ParticleUniverse/textures/various/pu_barrel.png trunk/python-ogre/demos/media/ParticleUniverse/textures/various/pu_blue_ball.png trunk/python-ogre/demos/media/ParticleUniverse/textures/various/pu_circle.png trunk/python-ogre/demos/media/ParticleUniverse/textures/various/pu_dirt_256x512.png trunk/python-ogre/demos/media/ParticleUniverse/textures/various/pu_dot_5x5.png trunk/python-ogre/demos/media/ParticleUniverse/textures/various/pu_flame.png trunk/python-ogre/demos/media/ParticleUniverse/textures/various/pu_green_ball.png trunk/python-ogre/demos/media/ParticleUniverse/textures/various/pu_hart.png trunk/python-ogre/demos/media/ParticleUniverse/textures/various/pu_lightning_20x64.png trunk/python-ogre/demos/media/ParticleUniverse/textures/various/pu_plate.jpg trunk/python-ogre/demos/media/ParticleUniverse/textures/various/pu_red_ball.png trunk/python-ogre/demos/media/ParticleUniverse/textures/various/pu_ribbontrail.png trunk/python-ogre/demos/media/ParticleUniverse/textures/various/pu_sand_336x330.png trunk/python-ogre/demos/media/ParticleUniverse/textures/various/pu_smoke.png trunk/python-ogre/demos/media/ParticleUniverse/textures/various/pu_smoke_428x427.png trunk/python-ogre/demos/media/ParticleUniverse/textures/various/pu_smoke_black_192x192.png trunk/python-ogre/demos/media/ParticleUniverse/textures/various/pu_smoke_brown_336x330.png trunk/python-ogre/demos/media/ParticleUniverse/textures/various/pu_smoke_grey_312x312.png trunk/python-ogre/demos/media/ParticleUniverse/textures/various/pu_smoke_grey_336x330.png trunk/python-ogre/demos/media/ParticleUniverse/textures/various/pu_smoke_red_192x192.png trunk/python-ogre/demos/media/ParticleUniverse/textures/various/pu_stone.jpeg trunk/python-ogre/demos/media/ParticleUniverse/textures/various/sand.jpeg Removed Paths: ------------- trunk/python-ogre/scripts/00-PreReqs.sh Modified: trunk/python-ogre/code_generators/hikari/customization_data.py =================================================================== --- trunk/python-ogre/code_generators/hikari/customization_data.py 2008-09-01 11:45:49 UTC (rev 715) +++ trunk/python-ogre/code_generators/hikari/customization_data.py 2008-09-01 14:19:39 UTC (rev 716) @@ -1,6 +1,6 @@ def header_files( version ): - return [ 'Hikair.h'] + return [ 'Hikari.h'] def huge_classes( version ): return [] Modified: trunk/python-ogre/code_generators/hikari/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/hikari/generate_code.py 2008-09-01 11:45:49 UTC (rev 715) +++ trunk/python-ogre/code_generators/hikari/generate_code.py 2008-09-01 14:19:39 UTC (rev 716) @@ -54,7 +54,15 @@ main_ns = global_ns.namespace( MAIN_NAMESPACE ) else: main_ns = global_ns - + excludes = ['::Hikari::Position::left', + '::Hikari::Position::top', + '::Hikari::Position::position', + '::Hikari::Position::x', + '::Hikari::Position::y' + ] + for x in excludes: + main_ns.variable(x).exclude() + ############################################################ ## ## And there are things that manually need to be INCLUDED @@ -195,7 +203,8 @@ os.path.join( environment.hikari.root_dir, "python_hikari.h" ) , environment.hikari.cache_file ) - defined_symbols = ['OGRE_NONCLIENT_BUILD', 'HIKARI_NONCLIENT_BUILD', '__VECTOR_C' ] + # Vector_c define to allow GCC to process delegates.h + defined_symbols = ['OGRE_NONCLIENT_BUILD', 'HIKARI_NONCLIENT_BUILD', '__VECTOR_C' ] defined_symbols.append( 'VERSION_' + environment.hikari.version ) # Modified: trunk/python-ogre/code_generators/hikari/python_hikari_aliases.h =================================================================== --- trunk/python-ogre/code_generators/hikari/python_hikari_aliases.h 2008-09-01 11:45:49 UTC (rev 715) +++ trunk/python-ogre/code_generators/hikari/python_hikari_aliases.h 2008-09-01 14:19:39 UTC (rev 716) @@ -1 +1,6 @@ // typedef name nicename; +typedef ::Hikari::Impl::fastdelegate::detail::SimplifyMemFunc< 8 > fastdelegateSimplifyMemFunc8; +typedef ::Hikari::Impl::fastdelegate::detail::SimplifyMemFunc< 12 > fastdelegateSimplifyMemFunc12; +typedef ::Hikari::Impl::fastdelegate::detail::SimplifyMemFunc< 16 > fastdelegateSimplifyMemFunc16; +typedef ::Hikari::Impl::fastdelegate::detail::SimplifyMemFunc< 20 > fastdelegateSimplifyMemFunc20; +typedef ::Hikari::Impl::fastdelegate::detail::VoidToDefaultVoid< void > fastdelegateVoidToDefaultVoidVoid; Modified: trunk/python-ogre/code_generators/ogre/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/ogre/generate_code.py 2008-09-01 11:45:49 UTC (rev 715) +++ trunk/python-ogre/code_generators/ogre/generate_code.py 2008-09-01 14:19:39 UTC (rev 716) @@ -408,7 +408,8 @@ for fix in AliasFixList: c=mb.member_function(fix[0] ,arg_types=fix[1]) c.add_transformation( fix[2], alias=fix[3]) - + mb.member_function('::Ogre::Math::Abs', arg_types['::Ogre::Real']).alias="AbsReal" + ############################################################ ## ## And things that need to have their argument and call values fixed. Modified: trunk/python-ogre/demos/cegui/CEGUI_framework.py =================================================================== --- trunk/python-ogre/demos/cegui/CEGUI_framework.py 2008-09-01 11:45:49 UTC (rev 715) +++ trunk/python-ogre/demos/cegui/CEGUI_framework.py 2008-09-01 14:19:39 UTC (rev 716) @@ -1,4 +1,5 @@ import ctypes +import os # The follow patch from Tim (Mithro) fixes a loder issue with CEGUI - previously we'd patched CEGUI to # ensure the CEGUIBase was linked to every module to solve the issue with Python dynamically loading @@ -10,7 +11,10 @@ import ogre.gui.CEGUI as CEGUI # Another fix for CEGUI to ensure we get a working parser.. -CEGUI.System.setDefaultXMLParserName("TinyXMLParser") +if os.name == 'nt': + CEGUI.System.setDefaultXMLParserName("ExpatParser") +else: + CEGUI.System.setDefaultXMLParserName("TinyXMLParser") import ogre.io.OIS as OIS import SampleFramework Modified: trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/post/glsl/GlobalLight_ps.glsl =================================================================== --- trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/post/glsl/GlobalLight_ps.glsl 2008-09-01 11:45:49 UTC (rev 715) +++ trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/post/glsl/GlobalLight_ps.glsl 2008-09-01 14:19:39 UTC (rev 716) @@ -1,96 +1,96 @@ -/****************************************************************************** -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 // - - Post shader: Multipass, one light -*/ -uniform sampler2D tex0; -uniform sampler2D tex1; - -varying vec2 texCoord; -varying vec3 projCoord; - -// Attributes of light -uniform vec4 lightPos0; -uniform vec3 lightDiffuseColor0; -uniform vec3 lightSpecularColor0; - -// Global parameters for lights -struct LightGlobal -{ - vec3 position; - vec3 normal; - vec3 viewDir; -}; - -// Current state of light -struct LightAccum -{ - vec3 light_diffuse; - vec3 light_specular; -}; - -// Do lighting calculations for one light -void processLight( - inout LightAccum accum, - LightGlobal global, - vec4 lightPos, - vec3 lightDiffuseColor, - vec3 lightSpecularColor) -{ - vec3 lightVec = vec3(lightPos) - global.position; - vec3 lightDir = normalize(lightVec); - accum.light_diffuse += max(0.0,dot(lightDir, global.normal)) * lightDiffuseColor; - - vec3 h = normalize(global.viewDir + lightDir); - accum.light_specular += pow(dot(global.normal, h),32.0) * lightSpecularColor; -} - -void main() -{ - vec4 a0 = texture2D(tex0, texCoord); // Attribute 0: Diffuse color+shininess - vec4 a1 = texture2D(tex1, texCoord); // Attribute 1: Normal+depth - - // Attributes - vec3 colour = a0.rgb; - float alpha = a0.a; // Specularity - float distance = a1.w; // Distance from viewer -- is zero if no lighting wanted - - LightGlobal global; - global.normal = a1.xyz; - global.position = projCoord*distance; - - // Apply light - LightAccum accum; - accum.light_diffuse = vec3(0,0,0); - accum.light_specular = vec3(0,0,0); - global.viewDir = -normalize(global.position); - - processLight(accum, global, lightPos0, lightDiffuseColor0, lightSpecularColor0); - - // Calcalate total lighting for this fragment - vec3 total_light_contrib; - total_light_contrib = accum.light_diffuse+alpha*accum.light_specular; - - // Calculate colour of fragment - gl_FragColor = vec4( total_light_contrib*colour ,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 // + + Post shader: Multipass, one light +*/ +uniform sampler2D tex0; +uniform sampler2D tex1; + +varying vec2 texCoord; +varying vec3 projCoord; + +// Attributes of light +uniform vec4 lightPos0; +uniform vec3 lightDiffuseColor0; +uniform vec3 lightSpecularColor0; + +// Global parameters for lights +struct LightGlobal +{ + vec3 position; + vec3 normal; + vec3 viewDir; +}; + +// Current state of light +struct LightAccum +{ + vec3 light_diffuse; + vec3 light_specular; +}; + +// Do lighting calculations for one light +void processLight( + inout LightAccum accum, + LightGlobal global, + vec4 lightPos, + vec3 lightDiffuseColor, + vec3 lightSpecularColor) +{ + vec3 lightVec = vec3(lightPos) - global.position; + vec3 lightDir = normalize(lightVec); + accum.light_diffuse += max(0.0,dot(lightDir, global.normal)) * lightDiffuseColor; + + vec3 h = normalize(global.viewDir + lightDir); + accum.light_specular += pow(dot(global.normal, h),32.0) * lightSpecularColor; +} + +void main() +{ + vec4 a0 = texture2D(tex0, texCoord); // Attribute 0: Diffuse color+shininess + vec4 a1 = texture2D(tex1, texCoord); // Attribute 1: Normal+depth + + // Attributes + vec3 colour = a0.rgb; + float alpha = a0.a; // Specularity + float distance = a1.w; // Distance from viewer -- is zero if no lighting wanted + + LightGlobal global; + global.normal = a1.xyz; + global.position = projCoord*distance; + + // Apply light + LightAccum accum; + accum.light_diffuse = vec3(0,0,0); + accum.light_specular = vec3(0,0,0); + global.viewDir = -normalize(global.position); + + processLight(accum, global, lightPos0, lightDiffuseColor0, lightSpecularColor0); + + // Calcalate total lighting for this fragment + vec3 total_light_contrib; + total_light_contrib = accum.light_diffuse+alpha*accum.light_specular; + + // Calculate colour of fragment + gl_FragColor = vec4( total_light_contrib*colour ,0); +} Modified: trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/post/glsl/SinglePass_ps.glsl =================================================================== --- trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/post/glsl/SinglePass_ps.glsl 2008-09-01 11:45:49 UTC (rev 715) +++ trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/post/glsl/SinglePass_ps.glsl 2008-09-01 14:19:39 UTC (rev 716) @@ -1,111 +1,111 @@ -/****************************************************************************** -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 // - - Post shader: Single pass -*/ -uniform sampler2D tex0; -uniform sampler2D tex1; - -varying vec2 texCoord; -varying vec3 projCoord; - -uniform mat4 proj; - -uniform vec3 ambientColor; -// Attributes of light 0 -uniform vec4 lightPos0; -uniform vec3 lightDiffuseColor0; -uniform vec3 lightSpecularColor0; -// Attributes of light 1 -uniform vec4 lightPos1; -uniform vec3 lightDiffuseColor1; -uniform vec3 lightSpecularColor1; - -// Global parameters for lights -struct LightGlobal -{ - vec3 position; - vec3 normal; - vec3 viewDir; -}; - -// Current state of light -struct LightAccum -{ - vec3 light_diffuse; - vec3 light_specular; -}; - -// Do lighting calculations for one light -void processLight( - inout LightAccum accum, - LightGlobal global, - vec4 lightPos, - vec3 lightDiffuseColor, - vec3 lightSpecularColor) -{ - vec3 lightVec = vec3(lightPos) - global.position; - vec3 lightDir = normalize(lightVec); - accum.light_diffuse += max(0.0,dot(lightDir, global.normal)) * lightDiffuseColor; - - vec3 h = normalize(global.viewDir + lightDir); - accum.light_specular += pow(dot(global.normal, h),32.0) * lightSpecularColor; -} - -void main() -{ - vec4 a0 = texture2D(tex0, texCoord); // Attribute 0: Diffuse color+shininess - vec4 a1 = texture2D(tex1, texCoord); // Attribute 1: Normal+depth - - // Clip fragment if depth is too far, so the skybox can be rendered on the background - if(a1.w==0.0) - discard; - - // Attributes - vec3 colour = a0.rgb; - float alpha = a0.a; // Specularity - float distance = a1.w; // Distance from viewer -- is zero if no lighting wanted - - LightGlobal global; - global.normal = a1.xyz; - global.position = projCoord*distance; - - // Apply light - LightAccum accum; - accum.light_diffuse = vec3(0,0,0); - accum.light_specular = vec3(0,0,0); - global.viewDir = -normalize(global.position); - - processLight(accum, global, lightPos0, lightDiffuseColor0, lightSpecularColor0); - processLight(accum, global, lightPos1, lightDiffuseColor1, lightSpecularColor1); - - // Calcalate total lighting for this fragment - vec3 total_light_contrib; - total_light_contrib = ambientColor+accum.light_diffuse+alpha*accum.light_specular; - - // Calculate colour of fragment - gl_FragColor = vec4( total_light_contrib*colour ,0); - - // Calculate depth of fragment; GL requires a 2.0* here as the range is [-1, 1] - gl_FragDepth = projCoord.z*proj[2][2] + proj[3][2]/(2.0*distance); +/****************************************************************************** +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 // + + Post shader: Single pass +*/ +uniform sampler2D tex0; +uniform sampler2D tex1; + +varying vec2 texCoord; +varying vec3 projCoord; + +uniform mat4 proj; + +uniform vec3 ambientColor; +// Attributes of light 0 +uniform vec4 lightPos0; +uniform vec3 lightDiffuseColor0; +uniform vec3 lightSpecularColor0; +// Attributes of light 1 +uniform vec4 lightPos1; +uniform vec3 lightDiffuseColor1; +uniform vec3 lightSpecularColor1; + +// Global parameters for lights +struct LightGlobal +{ + vec3 position; + vec3 normal; + vec3 viewDir; +}; + +// Current state of light +struct LightAccum +{ + vec3 light_diffuse; + vec3 light_specular; +}; + +// Do lighting calculations for one light +void processLight( + inout LightAccum accum, + LightGlobal global, + vec4 lightPos, + vec3 lightDiffuseColor, + vec3 lightSpecularColor) +{ + vec3 lightVec = vec3(lightPos) - global.position; + vec3 lightDir = normalize(lightVec); + accum.light_diffuse += max(0.0,dot(lightDir, global.normal)) * lightDiffuseColor; + + vec3 h = normalize(global.viewDir + lightDir); + accum.light_specular += pow(dot(global.normal, h),32.0) * lightSpecularColor; +} + +void main() +{ + vec4 a0 = texture2D(tex0, texCoord); // Attribute 0: Diffuse color+shininess + vec4 a1 = texture2D(tex1, texCoord); // Attribute 1: Normal+depth + + // Clip fragment if depth is too far, so the skybox can be rendered on the background + if(a1.w==0.0) + discard; + + // Attributes + vec3 colour = a0.rgb; + float alpha = a0.a; // Specularity + float distance = a1.w; // Distance from viewer -- is zero if no lighting wanted + + LightGlobal global; + global.normal = a1.xyz; + global.position = projCoord*distance; + + // Apply light + LightAccum accum; + accum.light_diffuse = vec3(0,0,0); + accum.light_specular = vec3(0,0,0); + global.viewDir = -normalize(global.position); + + processLight(accum, global, lightPos0, lightDiffuseColor0, lightSpecularColor0); + processLight(accum, global, lightPos1, lightDiffuseColor1, lightSpecularColor1); + + // Calcalate total lighting for this fragment + vec3 total_light_contrib; + total_light_contrib = ambientColor+accum.light_diffuse+alpha*accum.light_specular; + + // Calculate colour of fragment + gl_FragColor = vec4( total_light_contrib*colour ,0); + + // Calculate depth of fragment; GL requires a 2.0* here as the range is [-1, 1] + gl_FragDepth = projCoord.z*proj[2][2] + proj[3][2]/(2.0*distance); } \ No newline at end of file Modified: trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/post/glsl/vs.glsl =================================================================== --- trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/post/glsl/vs.glsl 2008-09-01 11:45:49 UTC (rev 715) +++ trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/post/glsl/vs.glsl 2008-09-01 14:19:39 UTC (rev 716) @@ -1,42 +1,42 @@ -/****************************************************************************** -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 // - - Post shader: Generic fullscreen quad -*/ -varying vec2 texCoord; -varying vec3 projCoord; - -uniform mat4 invProj; - -void main() -{ - vec2 inPos = sign(gl_Vertex.xy); - gl_Position = vec4(inPos.xy, 0.0, 1.0); - - texCoord = (vec2(inPos.x, -inPos.y) + 1.0)/2.0; - - // Projection coordinates - // Inverted projection matrix - // These interpolate over the frustrum plane for w=1 - projCoord = vec3(invProj*vec4(inPos.x, inPos.y, 0, 1)); -} +/****************************************************************************** +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 // + + Post shader: Generic fullscreen quad +*/ +varying vec2 texCoord; +varying vec3 projCoord; + +uniform mat4 invProj; + +void main() +{ + vec2 inPos = sign(gl_Vertex.xy); + gl_Position = vec4(inPos.xy, 0.0, 1.0); + + texCoord = (vec2(inPos.x, -inPos.y) + 1.0)/2.0; + + // Projection coordinates + // Inverted projection matrix + // These interpolate over the frustrum plane for w=1 + projCoord = vec3(invProj*vec4(inPos.x, inPos.y, 0, 1)); +} Modified: trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/post/hlsl/GlobalLight_ps.hlsl =================================================================== --- trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/post/hlsl/GlobalLight_ps.hlsl 2008-09-01 11:45:49 UTC (rev 715) +++ trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/post/hlsl/GlobalLight_ps.hlsl 2008-09-01 14:19:39 UTC (rev 716) @@ -1,101 +1,101 @@ -/****************************************************************************** -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 // - - Post shader: Multipass, one light -*/ -sampler Tex0: register(s0); -sampler Tex1: register(s1); - -// Attributes of light 0 -float4 lightPos0; -float4 lightDiffuseColor0; -float4 lightSpecularColor0; - -// Global parameters for lights -struct LightGlobal -{ - float3 position; - float3 normal; - float3 viewDir; -}; - -// Current state of light -struct LightAccum -{ - float3 light_diffuse; - float3 light_specular; -}; - -// Do lighting calculations for one light -void processLight( - inout LightAccum accum, - LightGlobal global, - float4 lightPos, - float4 lightDiffuseColor, - float4 lightSpecularColor) -{ - float3 lightVec = lightPos - global.position; - float3 lightDir = normalize(lightVec); - accum.light_diffuse += max(0,dot(lightDir, global.normal)) * lightDiffuseColor; - - float3 h = normalize(global.viewDir + lightDir); - accum.light_specular += pow(dot(global.normal, h),32) * lightSpecularColor; -} - -float4 main(float2 texCoord: TEXCOORD0, float3 projCoord: TEXCOORD1) : COLOR -{ - float4 a0 = tex2D(Tex0, texCoord); // Attribute 0: Diffuse color+shininess - float4 a1 = tex2D(Tex1, texCoord); // Attribute 1: Normal+depth - - LightGlobal global; - - // Clip fragment if depth is too close, so the skybox can be rendered on the background - //clip(a1.w-0.001); - - // Attributes - float3 colour = a0.rgb; - float alpha = a0.a; // Specularity - float distance = a1.w; // Distance from viewer - //global.normal = normalize(a1.xyz); - global.normal = a1.xyz; - - // Acquire view space position via inverse projection transformation - //global.position = mul(invProj, float4(projCoord, 0, 1))*distance; - global.position = projCoord*distance; - - // Apply light - LightAccum accum; - accum.light_diffuse = float3(0,0,0); - accum.light_specular = float3(0,0,0); - global.viewDir = -normalize(global.position); - - processLight(accum, global, lightPos0, lightDiffuseColor0, lightSpecularColor0); - - // Calcalate total lighting for this fragment - float3 total_light_contrib; - total_light_contrib = accum.light_diffuse+alpha*accum.light_specular; - return float4( total_light_contrib*colour ,0); - //return float4(accum.light_diffuse,0); - //return float4(global.position/1000.0,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 // + + Post shader: Multipass, one light +*/ +sampler Tex0: register(s0); +sampler Tex1: register(s1); + +// Attributes of light 0 +float4 lightPos0; +float4 lightDiffuseColor0; +float4 lightSpecularColor0; + +// Global parameters for lights +struct LightGlobal +{ + float3 position; + float3 normal; + float3 viewDir; +}; + +// Current state of light +struct LightAccum +{ + float3 light_diffuse; + float3 light_specular; +}; + +// Do lighting calculations for one light +void processLight( + inout LightAccum accum, + LightGlobal global, + float4 lightPos, + float4 lightDiffuseColor, + float4 lightSpecularColor) +{ + float3 lightVec = lightPos - global.position; + float3 lightDir = normalize(lightVec); + accum.light_diffuse += max(0,dot(lightDir, global.normal)) * lightDiffuseColor; + + float3 h = normalize(global.viewDir + lightDir); + accum.light_specular += pow(dot(global.normal, h),32) * lightSpecularColor; +} + +float4 main(float2 texCoord: TEXCOORD0, float3 projCoord: TEXCOORD1) : COLOR +{ + float4 a0 = tex2D(Tex0, texCoord); // Attribute 0: Diffuse color+shininess + float4 a1 = tex2D(Tex1, texCoord); // Attribute 1: Normal+depth + + LightGlobal global; + + // Clip fragment if depth is too close, so the skybox can be rendered on the background + //clip(a1.w-0.001); + + // Attributes + float3 colour = a0.rgb; + float alpha = a0.a; // Specularity + float distance = a1.w; // Distance from viewer + //global.normal = normalize(a1.xyz); + global.normal = a1.xyz; + + // Acquire view space position via inverse projection transformation + //global.position = mul(invProj, float4(projCoord, 0, 1))*distance; + global.position = projCoord*distance; + + // Apply light + LightAccum accum; + accum.light_diffuse = float3(0,0,0); + accum.light_specular = float3(0,0,0); + global.viewDir = -normalize(global.position); + + processLight(accum, global, lightPos0, lightDiffuseColor0, lightSpecularColor0); + + // Calcalate total lighting for this fragment + float3 total_light_contrib; + total_light_contrib = accum.light_diffuse+alpha*accum.light_specular; + return float4( total_light_contrib*colour ,0); + //return float4(accum.light_diffuse,0); + //return float4(global.position/1000.0,0); +} + Modified: trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/post/hlsl/SinglePass_ps.hlsl =================================================================== --- trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/post/hlsl/SinglePass_ps.hlsl 2008-09-01 11:45:49 UTC (rev 715) +++ trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/post/hlsl/SinglePass_ps.hlsl 2008-09-01 14:19:39 UTC (rev 716) @@ -1,132 +1,132 @@ -/****************************************************************************** -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 // - - Post shader: Single pass -*/ -sampler Tex0: register(s0); -sampler Tex1: register(s1); - -float4x4 proj; - -float4 ambientColor; -// Attributes of light 0 -float4 lightPos0; -float4 lightDiffuseColor0; -float4 lightSpecularColor0; -// Attributes of light 1 -float4 lightPos1; -float4 lightDiffuseColor1; -float4 lightSpecularColor1; - -// Global parameters for lights -struct LightGlobal -{ - float3 position; - float3 normal; - float3 viewDir; -}; - -// Current state of light -struct LightAccum -{ - float3 light_diffuse; - float3 light_specular; -}; - -// Do lighting calculations for one light -void processLight( - inout LightAccum accum, - LightGlobal global, - float4 lightPos, - float4 lightDiffuseColor, - float4 lightSpecularColor) -{ - float3 lightVec = lightPos - global.position; - float3 lightDir = normalize(lightVec); - accum.light_diffuse += max(0,dot(lightDir, global.normal)) * lightDiffuseColor; - - float3 h = normalize(global.viewDir + lightDir); - accum.light_specular += pow(dot(global.normal, h),32) * lightSpecularColor; -} - -struct POUTPUT -{ - float4 colour: COLOR; - float depth: DEPTH; -}; - -POUTPUT main(float2 texCoord: TEXCOORD0, float3 projCoord: TEXCOORD1) -{ - POUTPUT o; - - float4 a0 = tex2D(Tex0, texCoord); // Attribute 0: Diffuse color+shininess - float4 a1 = tex2D(Tex1, texCoord); // Attribute 1: Normal+depth - - LightGlobal global; - - // Clip fragment if depth is too far, so the skybox can be rendered on the background - clip(a1.w-0.001); - - // Attributes - float3 colour = a0.rgb; - float alpha = a0.a; // Specularity - float distance = a1.w; // Distance from viewer -- is zero if no lighting wanted - //global.normal = normalize(a1.xyz); // normalizing done already - global.normal = a1.xyz; - - // Acquire view space position via inverse projection transformation - //global.position = mul(invProj, float4(projCoord, 0, 1))*distance; - // Acquire view space position via inverse projection transformation - //float4 tpos; - //tpos = float4(projCoord, distance, 1.0); - //tpos = mul(invProj, tpos); - //tpos = tpos / tpos.w; - //global.position = tpos; - //global.position = float3( - // invProj[0][0], // X vector component from X - // invProj[1][1], // Y vector component from Y - // invProj[2][3] // Z vector component from W - //)*projCoord*distance; - global.position = projCoord*distance; - - // Apply light - LightAccum accum; - accum.light_diffuse = float3(0,0,0); - accum.light_specular = float3(0,0,0); - global.viewDir = -normalize(global.position); - - processLight(accum, global, lightPos0, lightDiffuseColor0, lightSpecularColor0); - processLight(accum, global, lightPos1, lightDiffuseColor1, lightSpecularColor1); - - // Calcalate total lighting for this fragment - float3 total_light_contrib; - total_light_contrib = ambientColor+accum.light_diffuse+alpha*accum.light_specular; - - o.colour = float4( total_light_contrib*colour ,0); - // Depth buffer value - // Transfering depth makes it possible to render particle effects and other transparent - // things unaffected by light in the postprocessing phase. - o.depth = projCoord.z*proj[2][2] + proj[2][3]/distance; - return o; -} - +/****************************************************************************** +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 // + + Post shader: Single pass +*/ +sampler Tex0: register(s0); +sampler Tex1: register(s1); + +float4x4 proj; + +float4 ambientColor; +// Attributes of light 0 +float4 lightPos0; +float4 lightDiffuseColor0; +float4 lightSpecularColor0; +// Attributes of light 1 +float4 lightPos1; +float4 lightDiffuseColor1; +float4 lightSpecularColor1; + +// Global parameters for lights +struct LightGlobal +{ + float3 position; + float3 normal; + float3 viewDir; +}; + +// Current state of light +struct LightAccum +{ + float3 light_diffuse; + float3 light_specular; +}; + +// Do lighting calculations for one light +void processLight( + inout LightAccum accum, + LightGlobal global, + float4 lightPos, + float4 lightDiffuseColor, + float4 lightSpecularColor) +{ + float3 lightVec = lightPos - global.position; + float3 lightDir = normalize(lightVec); + accum.light_diffuse += max(0,dot(lightDir, global.normal)) * lightDiffuseColor; + + float3 h = normalize(global.viewDir + lightDir); + accum.light_specular += pow(dot(global.normal, h),32) * lightSpecularColor; +} + +struct POUTPUT +{ + float4 colour: COLOR; + float depth: DEPTH; +}; + +POUTPUT main(float2 texCoord: TEXCOORD0, float3 projCoord: TEXCOORD1) +{ + POUTPUT o; + + float4 a0 = tex2D(Tex0, texCoord); // Attribute 0: Diffuse color+shininess + float4 a1 = tex2D(Tex1, texCoord); // Attribute 1: Normal+depth + + LightGlobal global; + + // Clip fragment if depth is too far, so the skybox can be rendered on the background + clip(a1.w-0.001); + + // Attributes + float3 colour = a0.rgb; + float alpha = a0.a; // Specularity + float distance = a1.w; // Distance from viewer -- is zero if no lighting wanted + //global.normal = normalize(a1.xyz); // normalizing done already + global.normal = a1.xyz; + + // Acquire view space position via inverse projection transformation + //global.position = mul(invProj, float4(projCoord, 0, 1))*distance; + // Acquire view space position via inverse projection transformation + //float4 tpos; + //tpos = float4(projCoord, distance, 1.0); + //tpos = mul(invProj, tpos); + //tpos = tpos / tpos.w; + //global.position = tpos; + //global.position = float3( + // invProj[0][0], // X vector component from X + // invProj[1][1], // Y vector component from Y + // invProj[2][3] // Z vector component from W + //)*projCoord*distance; + global.position = projCoord*distance; + + // Apply light + LightAccum accum; + accum.light_diffuse = float3(0,0,0); + accum.light_specular = float3(0,0,0); + global.viewDir = -normalize(global.position); + + processLight(accum, global, lightPos0, lightDiffuseColor0, lightSpecularColor0); + processLight(accum, global, lightPos1, lightDiffuseColor1, lightSpecularColor1); + + // Calcalate total lighting for this fragment + float3 total_light_contrib; + total_light_contrib = ambientColor+accum.light_diffuse+alpha*accum.light_specular; + + o.colour = float4( total_light_contrib*colour ,0); + // Depth buffer value + // Transfering depth makes it possible to render particle effects and other transparent + // things unaffected by light in the postprocessing phase. + o.depth = projCoord.z*proj[2][2] + proj[2][3]/distance; + return o; +} + Modified: trunk/python-ogre/demos/media/DeferredShadingMedia/deferred.glsl.program =================================================================== --- trunk/python-ogre/demos/media/DeferredShadingMedia/deferred.glsl.program 2008-09-01 11:45:49 UTC (rev 715) +++ trunk/python-ogre/demos/media/DeferredShadingMedia/deferred.glsl.program 2008-09-01 14:19:39 UTC (rev 716) @@ -1,50 +1,50 @@ -// Materials for rendering to the fat buffer - -// Plain phong -vertex_program DeferredShading/material/glsl/vs glsl -{ - source DeferredShading/material/glsl/vs.glsl -} -fragment_program DeferredShading/material/glsl/ps glsl -{ - source DeferredShading/material/glsl/ps.glsl - default_params - { - param_named specularity float 0.0 - } -} -fragment_program DeferredShading/material/glsl/notex_ps glsl -{ - source DeferredShading/material/glsl/notex_ps.glsl - default_params - { - param_named specularity float 0.0 - param_named colour float3 0.7 0.7 0.7 - } -} - -// Normal mapping -vertex_program DeferredShading/material/glsl/nm_vs glsl -{ - source DeferredShading/material/glsl/nm_vs.glsl -} -fragment_program DeferredShading/material/glsl/nm_ps glsl -{ - source DeferredShading/material/glsl/nm_ps.glsl - default_params - { - param_named specularity float 0.0 - param_named tex0 int 0 - param_named normTex int 1 - } -} -fragment_program DeferredShading/material/glsl/nm_notex_ps glsl -{ - source DeferredShading/material/glsl/nm_notex_ps.glsl - default_params - { - param_named colour float3 0.7 0.7 0.7 - param_named specularity float 0.0 - param_named normTex int 0 - } -} +// Materials for rendering to the fat buffer + +// Plain phong +vertex_program DeferredShading/material/glsl/vs glsl +{ + source DeferredShading/material/glsl/vs.glsl +} +fragment_program DeferredShading/material/glsl/ps glsl +{ + source DeferredShading/material/glsl/ps.glsl + default_params + { + param_named specularity float 0.0 + } +} +fragment_program DeferredShading/material/glsl/notex_ps glsl +{ + source DeferredShading/material/glsl/notex_ps.glsl + default_params + { + param_named specularity float 0.0 + param_named colour float3 0.7 0.7 0.7 + } +} + +// Normal mapping +vertex_program DeferredShading/material/glsl/nm_vs glsl +{ + source DeferredShading/material/glsl/nm_vs.glsl +} +fragment_program DeferredShading/material/glsl/nm_ps glsl +{ + source DeferredShading/material/glsl/nm_ps.glsl + default_params + { + param_named specularity float 0.0 + param_named tex0 int 0 + param_named normTex int 1 + } +} +fragment_program DeferredShading/material/glsl/nm_notex_ps glsl +{ + source DeferredShading/material/glsl/nm_notex_ps.glsl + default_params + { + param_named colour float3 0.7 0.7 0.7 + param_named specularity float 0.0 + param_named normTex int 0 + } +} Modified: trunk/python-ogre/demos/media/DeferredShadingMedia/deferred.hlsl.program =================================================================== --- trunk/python-ogre/demos/media/DeferredShadingMedia/deferred.hlsl.program 2008-09-01 11:45:49 UTC (rev 715) +++ trunk/python-ogre/demos/media/DeferredShadingMedia/deferred.hlsl.program 2008-09-01 14:19:39 UTC (rev 716) @@ -1,70 +1,70 @@ -// Materials for rendering to the fat buffer - -// Plain phong -vertex_program DeferredShading/material/hlsl/vs hlsl -{ - source DeferredShading/material/hlsl/vs.hlsl - target vs_1_1 - entry_point main - - default_params - { - param_named_auto worldView worldview_matrix - param_named_auto worldViewProj worldviewproj_matrix - } -} -fragment_program DeferredShading/material/hlsl/ps hlsl -{ - source DeferredShading/material/hlsl/ps.hlsl - target ps_2_0 - entry_point main - default_params - { - param_named specularity float 0.0 - } -} -fragment_program DeferredShading/material/hlsl/notex_ps hlsl -{ - source DeferredShading/material/hlsl/notex_ps.hlsl - target ps_2_0 - entry_point main - default_params - { - param_named specularity float 0.0 - } -} - -// Normal mapping -vertex_program DeferredShading/material/hlsl/nm_vs hlsl -{ - source DeferredShading/material/hlsl/nm_vs.hlsl - target vs_1_1 - entry_point main - - default_params - { - param_named_auto worldView worldview_matrix - param_named_auto worldViewProj worldviewproj_matrix - } -} -fragment_program DeferredShading/material/hlsl/nm_ps hlsl -{ - source DeferredShading/material/hlsl/nm_ps.hlsl - target ps_2_0 - entry_point main - default_params - { - param_named specularity float 0.0 - } -} -fragment_program DeferredShading/material/hlsl/nm_notex_ps hlsl -{ - source DeferredShading/material/hlsl/nm_notex_ps.hlsl - target ps_2_0 - entry_point main - default_params - { - param_named colour float3 0.7 0.7 0.7 - param_named specularity float 0.0 - } -} +// Materials for rendering to the fat buffer + +// Plain phong +vertex_program DeferredShading/material/hlsl/vs hlsl +{ + source DeferredShading/material/hlsl/vs.hlsl + target vs_1_1 + entry_point main + + default_params + { + param_named_auto worldView worldview_matrix + param_named_auto worldViewProj worldviewproj_matrix + } +} +fragment_program DeferredShading/material/hlsl/ps hlsl +{ + source DeferredShading/material/hlsl/ps.hlsl + target ps_2_0 + entry_point main + default_params + { + param_named specularity float 0.0 + } +} +fragment_program DeferredShading/material/hlsl/notex_ps hlsl +{ + source DeferredShading/material/hlsl/notex_ps.hlsl + target ps_2_0 + entry_point main + default_params + { + param_named specularity float 0.0 + } +} + +// Normal mapping +vertex_program DeferredShading/material/hlsl/nm_vs hlsl +{ + source DeferredShading/material/hlsl/nm_vs.hlsl + target vs_1_1 + entry_point main + + default_params + { + param_named_auto worldView worldview_matrix + param_named_auto worldViewProj worldviewproj_matrix + } +} +fragment_program DeferredShading/material/hlsl/nm_ps hlsl +{ + source DeferredShading/material/hlsl/nm_ps.hlsl + target ps_2_0 + entry_point main + default_params + { + param_named specularity float 0.0 + } +} +fragment_program DeferredShading/material/hlsl/nm_notex_ps hlsl +{ + source DeferredShading/material/hlsl/nm_notex_ps.hlsl + target ps_2_0 + entry_point main + default_params + { + param_named colour float3 0.7 0.7 0.7 + param_named specularity float 0.0 + } +} Modified: trunk/python-ogre/demos/media/DeferredShadingMedia/deferred_post_debug.glsl.program =================================================================== --- trunk/python-ogre/demos/media/DeferredShadingMedia/deferred_post_debug.glsl.program 2008-09-01 11:45:49 UTC (rev 715) +++ trunk/python-ogre/demos/media/DeferredShadingMedia/deferred_post_debug.glsl.program 2008-09-01 14:19:39 UTC (rev 716) @@ -1,27 +1,27 @@ -fragment_program DeferredShading/post/glsl/ShowNormal_ps glsl -{ - source DeferredShading/post/glsl/ShowNormal_ps.glsl - default_params - { - param_named tex0 int 0 - param_named tex1 int 1 - } -} -fragment_program DeferredShading/post/glsl/ShowDS_ps glsl -{ - source DeferredShading/post/glsl/ShowDS_ps.glsl - default_params - { - param_named tex0 int 0 - param_named tex1 int 1 - } -} -fragment_program DeferredShading/post/glsl/ShowColour_ps glsl -{ - source DeferredShading/post/glsl/ShowColour_ps.glsl - default_params - { - param_named tex0 int 0 - param_named tex1 int 1 - } -} +fragment_program DeferredShading/post/glsl/ShowNormal_ps glsl +{ + source DeferredShading/post/glsl/ShowNormal_ps.glsl + default_params + { + param_named tex0 int 0 + param_named tex1 int 1 + } +} +fragment_program DeferredShading/post/glsl/ShowDS_ps glsl +{ + source DeferredShading/post/glsl/ShowDS_ps.glsl + default_params + { + param_named tex0 int 0 + param_named tex1 int 1 + } +} +fragment_program DeferredShading/post/glsl/ShowColour_ps glsl +{ + source DeferredShading/post/glsl/ShowColour_ps.glsl + default_params + { + param_named tex0 int 0 + param_named tex1 int 1 + } +} Modified: trunk/python-ogre/demos/media/DeferredShadingMedia/deferred_post_debug.hlsl.program =================================================================== --- trunk/python-ogre/demos/media/DeferredShadingMedia/deferred_post_debug.hlsl.program 2008-09-01 11:45:49 UTC (rev 715) +++ trunk/python-ogre/demos/media/DeferredShadingMedia/deferred_post_debug.hlsl.program 2008-09-01 14:19:39 UTC (rev 716) @@ -1,18 +1,18 @@ -fragment_program DeferredShading/post/hlsl/ShowNormal_ps hlsl -{ - source DeferredShading/post/hlsl/ShowNormal_ps.hlsl - target ps_2_0 - entry_point main -} -fragment_program DeferredShading/post/hlsl/ShowDS_ps hlsl -{ - source DeferredShading/post/hlsl/ShowDS_ps.hlsl - target ps_2_0 - entry_point main -} -fragment_program DeferredShading/post/hlsl/ShowColour_ps hlsl -{ - source DeferredShading/post/hlsl/ShowColour_ps.hlsl - target ps_2_0 - entry_point main -} +fragment_program DeferredShading/post/hlsl/ShowNormal_ps hlsl +{ + source DeferredShading/post/hlsl/ShowNormal_ps.hlsl + target ps_2_0 + entry_point main +} +fragment_program DeferredShading/post/hlsl/ShowDS_ps hlsl +{ + source DeferredShading/post/hlsl/ShowDS_ps.hlsl + target ps_2_0 + entry_point main +} +fragment_program DeferredShading/post/hlsl/ShowColour_ps hlsl +{ + source DeferredShading/post/hlsl/ShowColour_ps.hlsl + target ps_2_0 + entry_point main +} Modified: trunk/pytho... [truncated message content] |
From: <mi...@us...> - 2008-09-03 05:34:52
|
Revision: 725 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=725&view=rev Author: mithro Date: 2008-09-03 05:34:58 +0000 (Wed, 03 Sep 2008) Log Message: ----------- Fixed the return_pointee_value.hpp to work with packages pyplusplus. Modified Paths: -------------- trunk/python-ogre/code_generators/ode/generate_code.py trunk/python-ogre/debs/pyplusplus-debian/rules Modified: trunk/python-ogre/code_generators/ode/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/ode/generate_code.py 2008-09-03 04:34:52 UTC (rev 724) +++ trunk/python-ogre/code_generators/ode/generate_code.py 2008-09-03 05:34:58 UTC (rev 725) @@ -327,7 +327,13 @@ , 'pyplusplus' , 'code_repository' , 'return_pointee_value.hpp' ) + if not os.path.exists(return_pointee_value_source_path): + return_pointee_value_source_path \ + = os.path.join ( os.path.dirname(code_repository.__file__), + 'return_pointee_value.hpp') + print return_pointee_value_source_path + return_pointee_value_target_path \ = os.path.join( environment.ode.generated_dir, 'return_pointee_value.hpp' ) Modified: trunk/python-ogre/debs/pyplusplus-debian/rules =================================================================== --- trunk/python-ogre/debs/pyplusplus-debian/rules 2008-09-03 04:34:52 UTC (rev 724) +++ trunk/python-ogre/debs/pyplusplus-debian/rules 2008-09-03 05:34:58 UTC (rev 725) @@ -34,12 +34,12 @@ dh_clean -k dh_installdirs python$* setup.py install --root=$(CURDIR)/debian/pyplusplus + cp -rf pyplusplus/code_repository $(CURDIR)/debian/pyplusplus/usr/lib/python$*/site-packages/pyplusplus/ install-shared: mkdir -p $(CURDIR)/debian/pyplusplus/usr/share/doc/pyplusplus cp -rf examples $(CURDIR)/debian/pyplusplus/usr/share/doc/pyplusplus - mkdir -p $(CURDIR)/debian/pyplusplus/usr/include/pyplusplus - cp -rf pyplusplus/code_repository/* $(CURDIR)/debian/pyplusplus/usr/include/pyplusplus + find $(CURDIR)/debian/pyplusplus -name .svn | xargs rm -rf # Build architecture-independent files here. binary-indep: build install This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mi...@us...> - 2008-09-03 12:05:51
|
Revision: 730 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=730&view=rev Author: mithro Date: 2008-09-03 12:06:00 +0000 (Wed, 03 Sep 2008) Log Message: ----------- Split the demos into a different package section. Modified Paths: -------------- trunk/python-ogre/debian/control trunk/python-ogre/debian/rules Added Paths: ----------- trunk/python-ogre/debs/python-ogre-demos/ trunk/python-ogre/debs/python-ogre-demos/changelog trunk/python-ogre/debs/python-ogre-demos/control trunk/python-ogre/debs/python-ogre-demos/dsc trunk/python-ogre/debs/python-ogre-demos/rules Modified: trunk/python-ogre/debian/control =================================================================== --- trunk/python-ogre/debian/control 2008-09-03 11:25:06 UTC (rev 729) +++ trunk/python-ogre/debian/control 2008-09-03 12:06:00 UTC (rev 730) @@ -44,15 +44,3 @@ other Graphics and Gaming libraries. Python-Ogre allows developers to focus on their 'application', taking advantage of the simplicity of Python with the performance and functionality of the underlying libraries. - -Package: python-ogre-demos -Architecture: any -Depends: ${python:Depends}, ${shlibs:Depends}, ${misc:Depends}, python-ogre (= ${Source-Version}) -XB-Python-Version: ${python:Versions} -Description: Example programs using the python-ogre package. - . - Python-Ogre is a free open source Python interface to a wide range of C++ - libraries. Focused primarly on supporting the Ogre 3D graphics library and - other Graphics and Gaming libraries. Python-Ogre allows developers to focus - on their 'application', taking advantage of the simplicity of Python with - the performance and functionality of the underlying libraries. Modified: trunk/python-ogre/debian/rules =================================================================== --- trunk/python-ogre/debian/rules 2008-09-03 11:25:06 UTC (rev 729) +++ trunk/python-ogre/debian/rules 2008-09-03 12:06:00 UTC (rev 730) @@ -59,26 +59,12 @@ python$* setup.py install --root=$(CURDIR)/debian/python-ogre python$* setup.py install --root=$(CURDIR)/debian/tmp -demos: - mkdir -p $(CURDIR)/debian/python-ogre-demos/usr/share/python-ogre-demos/ - cp -rvf demos/* $(CURDIR)/debian/python-ogre-demos/usr/share/python-ogre-demos/ - # Clean up any svn directories - find $(CURDIR)/debian/python-ogre-demos -name .svn | xargs rm -rf || true - # Remove any plugins.cfg files - find $(CURDIR)/debian/python-ogre-demos -name plugins.cfg | xargs rm || true - # Remove any yet to work demos - find $(CURDIR)/debian/python-ogre-demos -name tofix | xargs rm -rf || true - # Remove windows only demos - find $(CURDIR)/debian/python-ogre-demos -name dshow | xargs rm -rf || true - # Remove any log files - find $(CURDIR)/debian/python-ogre-demos -name \*.log | xargs rm || true - # Build architecture-independent files here. binary-indep: build install # We have nothing to do here. # Build architecture-dependent files here. -binary-arch: demos build install +binary-arch: build install dh_strip --dbg-package=python-ogre-dbg dh_testdir dh_testroot @@ -103,4 +89,4 @@ # sudo dpkg --install libboost-python1.34.1-index*.deb binary: binary-indep binary-arch -.PHONY: build clean demos binary-indep binary-arch binary install configure prep build $(PYVERS:%=build-python%) $(PYVERS:%=install-python%) +.PHONY: build clean binary-indep binary-arch binary install configure prep build $(PYVERS:%=build-python%) $(PYVERS:%=install-python%) Added: trunk/python-ogre/debs/python-ogre-demos/changelog =================================================================== --- trunk/python-ogre/debs/python-ogre-demos/changelog (rev 0) +++ trunk/python-ogre/debs/python-ogre-demos/changelog 2008-09-03 12:06:00 UTC (rev 730) @@ -0,0 +1,5 @@ +python-ogre-demos (0.0.0-1) unstable; urgency=low + + * First attempt at packaging the demos. + + -- Tim 'Mithro' Ansell <mi...@mi...> Wed, 03 Sep 2008 22:02:00 +1000 Added: trunk/python-ogre/debs/python-ogre-demos/control =================================================================== --- trunk/python-ogre/debs/python-ogre-demos/control (rev 0) +++ trunk/python-ogre/debs/python-ogre-demos/control 2008-09-03 12:06:00 UTC (rev 730) @@ -0,0 +1,20 @@ +Source: python-ogre-demos +Section: python +XS-Python-Version: >=2.4 +Priority: optional +Maintainer: Tim 'Mithro' Ansell <mi...@mi...> +Build-Depends-Indep: python-central (>= 0.5.6), python-setuptools (>= 0.6b3-1), python-all +Build-Depends: debhelper (>= 5.0.38) +Standards-Version: 3.7.2 + +Package: python-ogre-demos +Architecture: any +Depends: ${python:Depends}, ${misc:Depends}, python-ogre +XB-Python-Version: ${python:Versions} +Description: Example programs using the python-ogre package. + . + Python-Ogre is a free open source Python interface to a wide range of C++ + libraries. Focused primarly on supporting the Ogre 3D graphics library and + other Graphics and Gaming libraries. Python-Ogre allows developers to focus + on their 'application', taking advantage of the simplicity of Python with + the performance and functionality of the underlying libraries. Added: trunk/python-ogre/debs/python-ogre-demos/dsc =================================================================== --- trunk/python-ogre/debs/python-ogre-demos/dsc (rev 0) +++ trunk/python-ogre/debs/python-ogre-demos/dsc 2008-09-03 12:06:00 UTC (rev 730) @@ -0,0 +1,10 @@ +Format: 1.0 +Source: python-ogre-demos +Binary: python-ogre-demos +Architecture: any +Version: 0.0.0-1 +Maintainer: Tim 'mithro' Ansell <mi...@mi...> +Standards-Version: 3.7.2.2 +%%BUILDDEPS%% +Files: + %%MD5SUM%% %%SIZE%% Added: trunk/python-ogre/debs/python-ogre-demos/rules =================================================================== --- trunk/python-ogre/debs/python-ogre-demos/rules (rev 0) +++ trunk/python-ogre/debs/python-ogre-demos/rules 2008-09-03 12:06:00 UTC (rev 730) @@ -0,0 +1,65 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# GNU copyright 1997 to 1999 by Joey Hess. + +# Uncomment this to turn on verbose mode. +export DH_VERBOSE=1 +export DH_COMPAT=5 + +export CFLAGS=-g +PYTHON := /usr/bin/python +PYVERS := $(shell $(PYTHON) -c 'import sys; print sys.version[:3]') +#PYVERS = 2.5 #$(shell pyversions -vr) + +export BUILDFLAGS=--usesystem --verbose --failhard -g -c + + +build-python%: + mkdir -p $(CURDIR)/debian/python-ogre-demos/usr/share/python-ogre-demos/ + cp -rvf demos/* $(CURDIR)/debian/python-ogre-demos/usr/share/python-ogre-demos/ + # Clean up any svn directories + find $(CURDIR)/debian/python-ogre-demos -name .svn | xargs rm -rf || true + # Remove any plugins.cfg files + find $(CURDIR)/debian/python-ogre-demos -name plugins.cfg | xargs rm || true + # Remove any yet to work demos + find $(CURDIR)/debian/python-ogre-demos -name tofix | xargs rm -rf || true + # Remove windows only demos + find $(CURDIR)/debian/python-ogre-demos -name dshow | xargs rm -rf || true + # Remove any log files + find $(CURDIR)/debian/python-ogre-demos -name \*.log | xargs rm || true + +clean: + dh_testdir + dh_testroot + -find . -name '*.py[co]' | xargs rm -f + dh_clean + +install: $(PYVERS:%=build-python%) $(PYVERS:%=install-python%) + +install-python%: + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do here. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_pycentral + dh_compress -X.py + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + + +binary: binary-indep binary-arch +.PHONY: build clean demos binary-indep binary-arch binary install configure prep build $(PYVERS:%=build-python%) $(PYVERS:%=install-python%) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2008-09-04 02:37:23
|
Revision: 733 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=733&view=rev Author: andy_miller Date: 2008-09-04 02:37:29 +0000 (Thu, 04 Sep 2008) Log Message: ----------- Change to code generators to move common attribute creation to common code OgreOde patch to support ODE 0.10.1 Removed 'Warnings' fix from __init__ code as no longer required Added ReportVersion as a support tool Fixed OgreOde demo Modified Paths: -------------- trunk/python-ogre/BuildModule.py trunk/python-ogre/code_generators/betagui/generate_code.py trunk/python-ogre/code_generators/bullet/generate_code.py trunk/python-ogre/code_generators/cadunetree/generate_code.py trunk/python-ogre/code_generators/caelum/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/et/generate_code.py trunk/python-ogre/code_generators/hikari/generate_code.py trunk/python-ogre/code_generators/hydrax/generate_code.py trunk/python-ogre/code_generators/navi/generate_code.py trunk/python-ogre/code_generators/noise/generate_code.py trunk/python-ogre/code_generators/nxogre/generate_code.py trunk/python-ogre/code_generators/ode/generate_code.py trunk/python-ogre/code_generators/ofusion/generate_code.py trunk/python-ogre/code_generators/ogre/generate_code.py trunk/python-ogre/code_generators/ogreal/generate_code.py trunk/python-ogre/code_generators/ogrebulletc/generate_code.py trunk/python-ogre/code_generators/ogrebulletd/generate_code.py trunk/python-ogre/code_generators/ogredshow/generate_code.py trunk/python-ogre/code_generators/ogreforests/generate_code.py trunk/python-ogre/code_generators/ogrenewt/generate_code.py trunk/python-ogre/code_generators/ogreode/generate_code.py trunk/python-ogre/code_generators/ogreode/hand_made_wrappers.py trunk/python-ogre/code_generators/ogrepcz/generate_code.py trunk/python-ogre/code_generators/ogrerefapp/generate_code.py trunk/python-ogre/code_generators/ogrevideoffmpeg/generate_code.py trunk/python-ogre/code_generators/ois/generate_code.py trunk/python-ogre/code_generators/opcode/generate_code.py trunk/python-ogre/code_generators/particleuniverse/generate_code.py trunk/python-ogre/code_generators/physx/generate_code.py trunk/python-ogre/code_generators/plib/generate_code.py trunk/python-ogre/code_generators/quickgui/generate_code.py trunk/python-ogre/code_generators/template/generate_code.py trunk/python-ogre/code_generators/theora/generate_code.py trunk/python-ogre/code_generators/watermesh/generate_code.py trunk/python-ogre/demos/ogreode/Demo_GranTurism.py trunk/python-ogre/environment.py trunk/python-ogre/packages_2.5/ogre/gui/QuickGUI/__init__.py trunk/python-ogre/packages_2.5/ogre/gui/betagui/__init__.py trunk/python-ogre/packages_2.5/ogre/io/OIS/__init__.py trunk/python-ogre/patch/ogreode.patch Added Paths: ----------- trunk/python-ogre/ReportVersion.py Modified: trunk/python-ogre/BuildModule.py =================================================================== --- trunk/python-ogre/BuildModule.py 2008-09-04 00:48:38 UTC (rev 732) +++ trunk/python-ogre/BuildModule.py 2008-09-04 02:37:29 UTC (rev 733) @@ -34,7 +34,7 @@ console.setFormatter(formatter) # add the handler to the root logger logging.getLogger('').addHandler(console) - + def getClassList (): """ create a dictionary of classes from the environment modules Added: trunk/python-ogre/ReportVersion.py =================================================================== --- trunk/python-ogre/ReportVersion.py (rev 0) +++ trunk/python-ogre/ReportVersion.py 2008-09-04 02:37:29 UTC (rev 733) @@ -0,0 +1,52 @@ +# +# module to assit with versioning on python-ogre +# +import os, sys, time, shutil +import logging +import BuildModule as bm + +#add environment to the path +sys.path.append( '.' ) +#add common utils to the pass +if sys.platform == 'win32': + newpath = os.path.join ( os.path.abspath(os.path.dirname(__file__)), 'plugins') + os.environ['PATH'] = newpath +';' + os.environ['PATH'] + + +if __name__ == '__main__': + + moduleList = ( 'ogre.renderer.OGRE', + 'ogre.io.OIS', + 'ogre.gui.CEGUI','ogre.gui.QuickGUI', 'ogre.gui.betagui', + 'ogre.sound.OgreAL', + 'ogre.physics.ODE', 'ogre.physics.OgreRefApp', + 'ogre.physics.OgreOde', 'ogre.physics.OgreNewt', 'ogre.physics.Opcode', + 'ogre.physics.bullet','ogre.physics.PhysX','ogre.physics.NxOgre', + 'ogre.physics.OgreBulletC', 'ogre.physics.OgreBulletD', + 'ogre.addons.theora', 'ogre.addons.plib', + 'ogre.addons.ogreforests', 'ogre.addons.et', 'ogre.addons.caelum', + 'ogre.addons.noise', 'ogre.addons.watermesh', + 'ogre.addons.particleuniverse', 'ogre.addons.cadunetree', + 'ogre.renderer.ogrepcz', 'ogre.addons.hydrax' ) +# 'ogre.gui.hikari' ) + + bm.setupLogging("version.info") # options.logfilename) + logger = logging.getLogger('PythonOgre.ReportVersionInfo') + for name in moduleList: +# logger.info ("Attemping to import " + name ) + try: + basename = name.split('.')[-1] + mod = __import__(name) + components = name.split('.') + for comp in components[1:]: + mod = getattr(mod, comp) + print "Module %s ( %s )" % (basename, name) + print " PythonOgre Ver: %s" % (getattr(mod, "PythonOgreVersion__") ) + print " Module Version: %s" % (getattr(mod, "Version__") ) + print " Python Version: %s" % (getattr(mod, 'PythonVersion__') ) + print " Code Generated: %s" % (getattr(mod, 'PythonOgreDetail__').split('_')[-1]) + print " Compiled : %s %s" % (getattr(mod, 'CompileTime__'), getattr(mod, 'CompileDate__') ) + print " Raw Detail : %s" % (getattr(mod, 'PythonOgreDetail__') ) +# logger.info ( "Import Successful: " + basename ) + except ImportError: + logger.error ( "Import failed:" + basename ) \ No newline at end of file Modified: trunk/python-ogre/code_generators/betagui/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/betagui/generate_code.py 2008-09-04 00:48:38 UTC (rev 732) +++ trunk/python-ogre/code_generators/betagui/generate_code.py 2008-09-04 02:37:29 UTC (rev 733) @@ -436,13 +436,9 @@ if cls.name not in NoPropClasses: cls.add_properties( recognizer=ogre_properties.ogre_property_recognizer_t() ) - common_utils.add_constants( mb, { 'betagui_version' : '"%s"' % environment.betagui.version.replace("\n", "\\\n") - , 'python_version' : '"%s"' % sys.version.replace("\n", "\\\n" ) } ) - - ## need to create a welcome doc string for this... - common_utils.add_constants( mb, { '__doc__' : '"betagui DESCRIPTION"' } ) + ## add additional version information to the module to help identify it correctly + common_utils.addDetailVersion ( mb, environment, environment.betagui ) - ########################################################################################## # # Creating the code. After this step you should not modify/customize declarations. Modified: trunk/python-ogre/code_generators/bullet/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/bullet/generate_code.py 2008-09-04 00:48:38 UTC (rev 732) +++ trunk/python-ogre/code_generators/bullet/generate_code.py 2008-09-04 02:37:29 UTC (rev 733) @@ -408,13 +408,9 @@ if cls.name not in NoPropClasses: cls.add_properties( recognizer=ogre_properties.ogre_property_recognizer_t() ) - common_utils.add_constants( mb, { 'bullet_version' : '"%s"' % environment.bullet.version.replace("\n", "\\\n") - , 'python_version' : '"%s"' % sys.version.replace("\n", "\\\n" ) } ) + ## add additional version information to the module to help identify it correctly + common_utils.addDetailVersion ( mb, environment, environment.bullet ) - ## need to create a welcome doc string for this... - common_utils.add_constants( mb, { '__doc__' : '"bullet DESCRIPTION"' } ) - - ########################################################################################## # # Creating the code. After this step you should not modify/customize declarations. Modified: trunk/python-ogre/code_generators/cadunetree/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/cadunetree/generate_code.py 2008-09-04 00:48:38 UTC (rev 732) +++ trunk/python-ogre/code_generators/cadunetree/generate_code.py 2008-09-04 02:37:29 UTC (rev 733) @@ -249,13 +249,10 @@ if cls.name not in NoPropClasses: cls.add_properties( recognizer=ogre_properties.ogre_property_recognizer_t() ) - common_utils.add_constants( mb, { 'cadunetree_version' : '"%s"' % environment.cadunetree.version.replace("\n", "\\\n") - , 'python_version' : '"%s"' % sys.version.replace("\n", "\\\n" ) } ) - - ## need to create a welcome doc string for this... - common_utils.add_constants( mb, { '__doc__' : '"cadunetree DESCRIPTION"' } ) + + ## add additional version information to the module to help identify it correctly + common_utils.addDetailVersion ( mb, environment, environment.cadunetree ) - ########################################################################################## # # Creating the code. After this step you should not modify/customize declarations. Modified: trunk/python-ogre/code_generators/caelum/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/caelum/generate_code.py 2008-09-04 00:48:38 UTC (rev 732) +++ trunk/python-ogre/code_generators/caelum/generate_code.py 2008-09-04 02:37:29 UTC (rev 733) @@ -294,14 +294,11 @@ for cls in main_ns.classes(): if cls.name not in NoPropClasses: cls.add_properties( recognizer=ogre_properties.ogre_property_recognizer_t() ) - - common_utils.add_constants( mb, { 'caelum_version' : '"%s"' % environment.caelum.version.replace("\n", "\\\n") - , 'python_version' : '"%s"' % sys.version.replace("\n", "\\\n" ) } ) - ## need to create a welcome doc string for this... - common_utils.add_constants( mb, { '__doc__' : '"caelum DESCRIPTION"' } ) - - + ## add additional version information to the module to help identify it correctly + common_utils.addDetailVersion ( mb, environment, environment.caelum ) + + ########################################################################################## # # Creating the code. After this step you should not modify/customize declarations. Modified: trunk/python-ogre/code_generators/cegui/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/cegui/generate_code.py 2008-09-04 00:48:38 UTC (rev 732) +++ trunk/python-ogre/code_generators/cegui/generate_code.py 2008-09-04 02:37:29 UTC (rev 733) @@ -301,10 +301,10 @@ print "INCLUDE:", v v.include() print "DONE" - - common_utils.add_constants( mb, { 'CEGUI_version' : '"%s"' % environment.cegui.version - , 'python_version' : '"%s"' % sys.version.replace("\n", "\\\n") } ) + ## add additional version information to the module to help identify it correctly + common_utils.addDetailVersion ( mb, environment, environment.cegui ) + #Creating code creator. After this step you should not modify/customize declarations. extractor = exdoc.doc_extractor("") Modified: trunk/python-ogre/code_generators/common_utils/__init__.py =================================================================== --- trunk/python-ogre/code_generators/common_utils/__init__.py 2008-09-04 00:48:38 UTC (rev 732) +++ trunk/python-ogre/code_generators/common_utils/__init__.py 2008-09-04 02:37:29 UTC (rev 733) @@ -1,6 +1,8 @@ import os, shutil import sys import shared_ptr +import datetime +import subprocess ##import hashlib ## makes this 2.5 dependent import md5 from pygccxml import declarations @@ -31,7 +33,59 @@ t = i % {'timestamp':timestamp, 'version':version} add_constants( mb, { '__info__' : t } ) + +def addDetailVersion ( mb, env, envClass ): + """Add detailed version and build information to the module to assist with debugging etc + """ +# decCode = """ +# boost::python::tuple getCompileTime () { return ( boost::python::make_tuple( __TIME__ , __DATE__) ); } +# """ +# regCode = """ +# bp::def( "getCompileTime", &getCompileTime, +# "Python-Ogre Helper Function: Return the Time and Date the module was compiled.\\n\\ +# Input: None\\n\\ +# Ouput: Tuple [time, date]"); +# """ + def getSVNVersion ( environment ): + """ return a string with the current SVN version number + """ + if hasattr( environment.Config, "SVNVersionCommmand"): + cmd = environment.Config.SVNVersionCommand + else: + cmd = "svnversion" + process = subprocess.Popen (cmd, shell=True,stdout=subprocess.PIPE, stderr=subprocess.PIPE ) + try: + out,err = process.communicate() + returncode = process.returncode + svnversion = out + except: + returncode = -1 + svnversion = "0000" + return svnversion.strip() + + po = ".".join( (env.PythonOgreMajorVersion,env.PythonOgreMinorVersion, env.PythonOgrePatchVersion) ) + t = datetime.datetime.now().isoformat(' ').strip() + v = envClass.version + s = getSVNVersion( env ) + detail = "_".join( (po,s,envClass.name, v, t) ) + if hasattr( envClass, 'docstring' ): + docstring = envClass.docstring + else: + docstring = "PythonOgre %s Module - Version %s" % (envClass.name, v) + + add_constants ( mb, { 'PythonOgreDetail__' : '"%s"' % detail.replace("\n", "\\\n" ) + , 'CompileTime__' : '__TIME__' + , 'CompileDate__' : '__DATE__' + , 'PythonVersion__' : '"%s"' % sys.version.replace("\n", "\\\n" ) + , 'Version__' : '"%s"' % v.replace("\n", "\\\n" ) + , 'PythonOgreVersion__' : '"%s"' % po.replace("\n", "\\\n" ) + , '__doc__' : '"%s"' % docstring.replace("\n", "\\\n" ) + } ) + +# mb.add_declaration_code( decCode ) +# mb.add_registration_code ( regCode ) + def _ReturnUnsignedInt( type_ ): """helper to return an UnsignedInt call for tranformation functions """ @@ -390,10 +444,14 @@ # Update 30 July 2008 -- support for void * variables to be exposed with ctypes handling for v in mb.variables( allow_empty=True ): if v.type.decl_string == 'void const *' or v.type.decl_string =='void *': - if v.access_type == 'public' and not v.documentation: -# if not v.parent.noncopyable: ## this test as we don't support classes with protected destructors - print "CTYPE Implementation on ", v, v.access_type - v.expose_address = True + try: # this only works on memeber vars not global ones so need to check + if v.access_type == 'public' and not v.documentation: + # if not v.parent.noncopyable: ## this test as we don't support classes with protected destructors + print "CTYPE Implementation on ", v, v.access_type + v.expose_address = True + except : #RunTimeError: + pass + def AutoExclude( mb, MAIN_NAMESPACE=None ): """ Automaticaly exclude a range of things that don't convert well from C++ to Python Modified: trunk/python-ogre/code_generators/et/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/et/generate_code.py 2008-09-04 00:48:38 UTC (rev 732) +++ trunk/python-ogre/code_generators/et/generate_code.py 2008-09-04 02:37:29 UTC (rev 733) @@ -274,13 +274,11 @@ if cls.name not in NoPropClasses: cls.add_properties( recognizer=ogre_properties.ogre_property_recognizer_t() ) - common_utils.add_constants( mb, { 'et_version' : '"%s"' % environment.et.version.replace("\n", "\\\n") - , 'python_version' : '"%s"' % sys.version.replace("\n", "\\\n" ) } ) - - ## need to create a welcome doc string for this... - common_utils.add_constants( mb, { '__doc__' : '"et DESCRIPTION"' } ) + + ## add additional version information to the module to help identify it correctly + common_utils.addDetailVersion ( mb, environment, environment.et ) + - ########################################################################################## # # Creating the code. After this step you should not modify/customize declarations. Modified: trunk/python-ogre/code_generators/hikari/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/hikari/generate_code.py 2008-09-04 00:48:38 UTC (rev 732) +++ trunk/python-ogre/code_generators/hikari/generate_code.py 2008-09-04 02:37:29 UTC (rev 733) @@ -259,13 +259,11 @@ if cls.name not in NoPropClasses: cls.add_properties( recognizer=ogre_properties.ogre_property_recognizer_t() ) - common_utils.add_constants( mb, { 'hikari_version' : '"%s"' % environment.hikari.version.replace("\n", "\\\n") - , 'python_version' : '"%s"' % sys.version.replace("\n", "\\\n" ) } ) - ## need to create a welcome doc string for this... - common_utils.add_constants( mb, { '__doc__' : '"hikari DESCRIPTION"' } ) + ## add additional version information to the module to help identify it correctly + common_utils.addDetailVersion ( mb, environment, environment.hikari ) + - ########################################################################################## # # Creating the code. After this step you should not modify/customize declarations. Modified: trunk/python-ogre/code_generators/hydrax/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/hydrax/generate_code.py 2008-09-04 00:48:38 UTC (rev 732) +++ trunk/python-ogre/code_generators/hydrax/generate_code.py 2008-09-04 02:37:29 UTC (rev 733) @@ -251,13 +251,10 @@ if cls.name not in NoPropClasses: cls.add_properties( recognizer=ogre_properties.ogre_property_recognizer_t() ) - common_utils.add_constants( mb, { 'hydrax_version' : '"%s"' % environment.hydrax.version.replace("\n", "\\\n") - , 'python_version' : '"%s"' % sys.version.replace("\n", "\\\n" ) } ) - - ## need to create a welcome doc string for this... - common_utils.add_constants( mb, { '__doc__' : '"hydrax DESCRIPTION"' } ) - - + + ## add additional version information to the module to help identify it correctly + common_utils.addDetailVersion ( mb, environment, environment.hydrax ) + ########################################################################################## # # Creating the code. After this step you should not modify/customize declarations. Modified: trunk/python-ogre/code_generators/navi/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/navi/generate_code.py 2008-09-04 00:48:38 UTC (rev 732) +++ trunk/python-ogre/code_generators/navi/generate_code.py 2008-09-04 02:37:29 UTC (rev 733) @@ -536,11 +536,9 @@ if cls.name not in NoPropClasses: cls.add_properties( recognizer=ogre_properties.ogre_property_recognizer_t() ) - common_utils.add_constants( mb, { 'PROJECT_version' : '"%s"' % environment.navi.version.replace("\n", "\\\n") - , 'python_version' : '"%s"' % sys.version.replace("\n", "\\\n" ) } ) - - ## need to create a welcome doc string for this... - common_utils.add_constants( mb, { '__doc__' : '"Navi PROJECT DESCRIPTION"' } ) + + ## add additional version information to the module to help identify it correctly + common_utils.addDetailVersion ( mb, environment, environment.navi ) ########################################################################################## Modified: trunk/python-ogre/code_generators/noise/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/noise/generate_code.py 2008-09-04 00:48:38 UTC (rev 732) +++ trunk/python-ogre/code_generators/noise/generate_code.py 2008-09-04 02:37:29 UTC (rev 733) @@ -318,14 +318,11 @@ for ns in namespaces: for cls in mb.global_ns.namespace(ns).classes(): cls.add_properties( recognizer=ogre_properties.ogre_property_recognizer_t() ) + + ## add additional version information to the module to help identify it correctly + common_utils.addDetailVersion ( mb, environment, environment.noise ) - common_utils.add_constants( mb, { 'noise_version' : '"%s"' % environment.noise.version.replace("\n", "\\\n") - , 'python_version' : '"%s"' % sys.version.replace("\n", "\\\n" ) } ) - - ## need to create a welcome doc string for this... - common_utils.add_constants( mb, { '__doc__' : '"noise DESCRIPTION"' } ) - - + ########################################################################################## # # Creating the code. After this step you should not modify/customize declarations. Modified: trunk/python-ogre/code_generators/nxogre/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/nxogre/generate_code.py 2008-09-04 00:48:38 UTC (rev 732) +++ trunk/python-ogre/code_generators/nxogre/generate_code.py 2008-09-04 02:37:29 UTC (rev 733) @@ -778,11 +778,8 @@ if cls.name not in NoPropClasses: cls.add_properties( recognizer=ogre_properties.ogre_property_recognizer_t() ) - common_utils.add_constants( mb, { 'PROJECT_version' : '"%s"' % environment.nxogre.version.replace("\n", "\\\n") - , 'python_version' : '"%s"' % sys.version.replace("\n", "\\\n" ) } ) - - ## need to create a welcome doc string for this... - common_utils.add_constants( mb, { '__doc__' : '"NxOgre PROJECT DESCRIPTION"' } ) + ## add additional version information to the module to help identify it correctly + common_utils.addDetailVersion ( mb, environment, environment.nxogre ) ########################################################################################## Modified: trunk/python-ogre/code_generators/ode/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/ode/generate_code.py 2008-09-04 00:48:38 UTC (rev 732) +++ trunk/python-ogre/code_generators/ode/generate_code.py 2008-09-04 02:37:29 UTC (rev 733) @@ -301,9 +301,8 @@ ode_ns = mb.global_ns ## .namespace ('ode') common_utils.add_properties( ode_ns.classes() ) - common_utils.add_constants( mb, { 'ode_version' : '"%s"' % environment.ode.version - , 'python_version' : '"%s"' % sys.version.replace("\n", "\\\n") } ) - + ## add additional version information to the module to help identify it correctly + common_utils.addDetailVersion ( mb, environment, environment.ode ) #Creating code creator. After this step you should not modify/customize declarations. extractor = exdoc.doc_extractor("") Modified: trunk/python-ogre/code_generators/ofusion/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/ofusion/generate_code.py 2008-09-04 00:48:38 UTC (rev 732) +++ trunk/python-ogre/code_generators/ofusion/generate_code.py 2008-09-04 02:37:29 UTC (rev 733) @@ -254,13 +254,9 @@ if cls.name not in NoPropClasses: cls.add_properties( recognizer=ogre_properties.ogre_property_recognizer_t() ) - common_utils.add_constants( mb, { 'ofusion_version' : '"%s"' % environment.ofusion.version.replace("\n", "\\\n") - , 'python_version' : '"%s"' % sys.version.replace("\n", "\\\n" ) } ) - - ## need to create a welcome doc string for this... - common_utils.add_constants( mb, { '__doc__' : '"ofusion DESCRIPTION"' } ) - - + ## add additional version information to the module to help identify it correctly + common_utils.addDetailVersion ( mb, environment, environment.ofusion ) + ########################################################################################## # # Creating the code. After this step you should not modify/customize declarations. Modified: trunk/python-ogre/code_generators/ogre/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/ogre/generate_code.py 2008-09-04 00:48:38 UTC (rev 732) +++ trunk/python-ogre/code_generators/ogre/generate_code.py 2008-09-04 02:37:29 UTC (rev 733) @@ -1066,16 +1066,8 @@ ## 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" ) - , '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"' } ) + ## add additional version information to the module to help identify it correctly + common_utils.addDetailVersion ( mb, environment, environment.ogre ) count = 0 for v in main_ns.variables(): Modified: trunk/python-ogre/code_generators/ogreal/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/ogreal/generate_code.py 2008-09-04 00:48:38 UTC (rev 732) +++ trunk/python-ogre/code_generators/ogreal/generate_code.py 2008-09-04 02:37:29 UTC (rev 733) @@ -284,12 +284,9 @@ for cls in main_ns.classes(): if cls.name not in NoPropClasses: cls.add_properties( recognizer=ogre_properties.ogre_property_recognizer_t() ) - - common_utils.add_constants( mb, { 'ogreal_version' : '"%s"' % environment.ogreal.version.replace("\n", "\\\n") - , 'python_version' : '"%s"' % sys.version.replace("\n", "\\\n" ) } ) - - ## need to create a welcome doc string for this... - common_utils.add_constants( mb, { '__doc__' : '"ogreal DESCRIPTION"' } ) + + ## add additional version information to the module to help identify it correctly + common_utils.addDetailVersion ( mb, environment, environment.ogreal ) ########################################################################################## # Modified: trunk/python-ogre/code_generators/ogrebulletc/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/ogrebulletc/generate_code.py 2008-09-04 00:48:38 UTC (rev 732) +++ trunk/python-ogre/code_generators/ogrebulletc/generate_code.py 2008-09-04 02:37:29 UTC (rev 733) @@ -265,13 +265,9 @@ if cls.name not in NoPropClasses: cls.add_properties( recognizer=ogre_properties.ogre_property_recognizer_t() ) - common_utils.add_constants( mb, { 'ogrebulletC_version' : '"%s"' % environment.ogrebulletc.version.replace("\n", "\\\n") - , 'python_version' : '"%s"' % sys.version.replace("\n", "\\\n" ) } ) - - ## need to create a welcome doc string for this... - common_utils.add_constants( mb, { '__doc__' : '"ogrebullet DESCRIPTION"' } ) - - + ## add additional version information to the module to help identify it correctly + common_utils.addDetailVersion ( mb, environment, environment.ogrebulletc ) + ########################################################################################## # # Creating the code. After this step you should not modify/customize declarations. Modified: trunk/python-ogre/code_generators/ogrebulletd/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/ogrebulletd/generate_code.py 2008-09-04 00:48:38 UTC (rev 732) +++ trunk/python-ogre/code_generators/ogrebulletd/generate_code.py 2008-09-04 02:37:29 UTC (rev 733) @@ -253,13 +253,9 @@ if cls.name not in NoPropClasses: cls.add_properties( recognizer=ogre_properties.ogre_property_recognizer_t() ) - common_utils.add_constants( mb, { 'ogrebulletD_version' : '"%s"' % environment.ogrebulletd.version.replace("\n", "\\\n") - , 'python_version' : '"%s"' % sys.version.replace("\n", "\\\n" ) } ) - - ## need to create a welcome doc string for this... - common_utils.add_constants( mb, { '__doc__' : '"ogrebullet DESCRIPTION"' } ) - - + ## add additional version information to the module to help identify it correctly + common_utils.addDetailVersion ( mb, environment, environment.ogrebulletd ) + ########################################################################################## # # Creating the code. After this step you should not modify/customize declarations. Modified: trunk/python-ogre/code_generators/ogredshow/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/ogredshow/generate_code.py 2008-09-04 00:48:38 UTC (rev 732) +++ trunk/python-ogre/code_generators/ogredshow/generate_code.py 2008-09-04 02:37:29 UTC (rev 733) @@ -502,13 +502,9 @@ if cls.name not in NoPropClasses: cls.add_properties( recognizer=ogre_properties.ogre_property_recognizer_t() ) - common_utils.add_constants( mb, { 'DSHOW_version' : '"%s"' % environment.ogredshow.version.replace("\n", "\\\n") - , 'python_version' : '"%s"' % sys.version.replace("\n", "\\\n" ) } ) - - ## need to create a welcome doc string for this... - common_utils.add_constants( mb, { '__doc__' : '"ogredshow PROJECT DESCRIPTION"' } ) - - + ## add additional version information to the module to help identify it correctly + common_utils.addDetailVersion ( mb, environment, environment.dshow ) + ########################################################################################## # # Creating the code. After this step you should not modify/customize declarations. Modified: trunk/python-ogre/code_generators/ogreforests/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/ogreforests/generate_code.py 2008-09-04 00:48:38 UTC (rev 732) +++ trunk/python-ogre/code_generators/ogreforests/generate_code.py 2008-09-04 02:37:29 UTC (rev 733) @@ -317,13 +317,9 @@ if cls.name not in NoPropClasses: cls.add_properties( recognizer=ogre_properties.ogre_property_recognizer_t() ) - common_utils.add_constants( mb, { 'ogreforests_version' : '"%s"' % environment.ogreforests.version.replace("\n", "\\\n") - , 'python_version' : '"%s"' % sys.version.replace("\n", "\\\n" ) } ) - - ## need to create a welcome doc string for this... - common_utils.add_constants( mb, { '__doc__' : '"ogreforests DESCRIPTION"' } ) - - + ## add additional version information to the module to help identify it correctly + common_utils.addDetailVersion ( mb, environment, environment.ogreforests ) + ########################################################################################## # # Creating the code. After this step you should not modify/customize declarations. Modified: trunk/python-ogre/code_generators/ogrenewt/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/ogrenewt/generate_code.py 2008-09-04 00:48:38 UTC (rev 732) +++ trunk/python-ogre/code_generators/ogrenewt/generate_code.py 2008-09-04 02:37:29 UTC (rev 733) @@ -249,9 +249,9 @@ cls.add_properties( recognizer=ogre_properties.ogre_property_recognizer_t() ) common_utils.add_LeadingLowerProperties ( cls ) - common_utils.add_constants( mb, { 'ogrenewt_version' : '"%s"' % environment.ogrenewt.version - , 'python_version' : '"%s"' % sys.version.replace("\n", "\\\n") } ) - + ## add additional version information to the module to help identify it correctly + common_utils.addDetailVersion ( mb, environment, environment.ogrenewt ) + # create the doc extractor we'll be using extractor = exdoc.doc_extractor("") # Modified: trunk/python-ogre/code_generators/ogreode/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/ogreode/generate_code.py 2008-09-04 00:48:38 UTC (rev 732) +++ trunk/python-ogre/code_generators/ogreode/generate_code.py 2008-09-04 02:37:29 UTC (rev 733) @@ -63,6 +63,7 @@ '::OgreOde::TerrainGeometry::_heightCallback', '::OgreOde::EntityInformer::getIndices', ## unsigned int const * # '::OgreOde::RagdollFactory::requestTypeFlags', # causes issues with moveableobjectfactory + '::OgreOde::EntityInformer::getBoneVertices' # hand wrapped ] for e in excludes: @@ -272,8 +273,8 @@ # We filter (both include and exclude) specific classes and functions that we want to wrap # global_ns = mb.global_ns - global_ns.exclude() - + global_ns.exclude() + query = lambda decl: isinstance( decl, ( declarations.class_t, declarations.class_declaration_t ) ) \ and decl.name.startswith( 'dx' ) mb.global_ns.decls( query ).opaque = True @@ -304,13 +305,9 @@ if cls.name not in NoPropClasses: cls.add_properties( recognizer=ogre_properties.ogre_property_recognizer_t() ) - common_utils.add_constants( mb, { 'ogreode_version' : '"%s"' % environment.ogreode.version.replace("\n", "\\\n") - , 'python_version' : '"%s"' % sys.version.replace("\n", "\\\n" ) } ) - - ## need to create a welcome doc string for this... - common_utils.add_constants( mb, { '__doc__' : '"ogreode DESCRIPTION"' } ) - - + ## add additional version information to the module to help identify it correctly + common_utils.addDetailVersion ( mb, environment, environment.ogreode ) + ########################################################################################## # # Creating the code. After this step you should not modify/customize declarations. Modified: trunk/python-ogre/code_generators/ogreode/hand_made_wrappers.py =================================================================== --- trunk/python-ogre/code_generators/ogreode/hand_made_wrappers.py 2008-09-04 00:48:38 UTC (rev 732) +++ trunk/python-ogre/code_generators/ogreode/hand_made_wrappers.py 2008-09-04 02:37:29 UTC (rev 733) @@ -54,15 +54,40 @@ """ WRAPPER_REGISTRATION_OgreOdeLoader = [ - 'def( "loadVehicle", &::OgreOde_Loader_loadVehicle,\ - ( bp::arg("filename"), bp::arg("object_name"), bp::arg("instance_name")=Ogre::StringUtil::BLANK ),\ - "Python-Ogre Hand Wrapped\\nReturns a vehicle or ragdoll as appropiate" );' - 'def( "loadRagdoll", &::OgreOde_Loader_loadRagdoll,\ - ( bp::arg("filename"), bp::arg("object_name"), bp::arg("instance_name")=Ogre::StringUtil::BLANK ),\ - "Python-Ogre Hand Wrapped\\nReturns a vehicle or ragdoll as appropiate",\ - bp::return_value_policy< bp::reference_existing_object, bp::default_call_policies >());' + """def( "loadVehicle", &::OgreOde_Loader_loadVehicle, + ( bp::arg("filename"), bp::arg("object_name"), bp::arg("instance_name")=Ogre::StringUtil::BLANK ), + "Python-Ogre Hand Wrapped\\nReturns a vehicle or ragdoll as appropiate" );""", + """def( "loadRagdoll", &::OgreOde_Loader_loadRagdoll, + ( bp::arg("filename"), bp::arg("object_name"), bp::arg("instance_name")=Ogre::StringUtil::BLANK ), + "Python-Ogre Hand Wrapped\\nReturns a vehicle or ragdoll as appropiate", + bp::return_value_policy< bp::reference_existing_object, bp::default_call_policies >());""" ] + +WRAPPER_DEFINITION_EntityInformer=\ +""" +boost::python::list +OgreOdeEntityInformer_getBoneVertices( OgreOde::EntityInformer & me, unsigned char bone, unsigned int &vertex_count) { + boost::python::list outlist; + Ogre::Vector3 * vertices; + + if ( ! me.getBoneVertices(bone,vertex_count,vertices ) ) + return outlist; + + while ( count-- > 0 ) { + outlist.append ( *vertices++ ); + } + delete[] vertices; + return outlist; +} +""" +WRAPPER_REGISTRATION_EntityInformer = [ + """def( "getBoneVertices", &::OgreOdeEntityInformer_getBoneVertices, + "Python-Ogre Hand Wrapped\\nReturns a list of vertices\\n\\ + Input: Bone number, vertex count\\n\\ + Output: List of vertices (can be empty)" );""" + ] + def apply_reg ( class_, code ): for c in code: class_.add_registration_code ( c ) @@ -71,4 +96,7 @@ rt = mb.class_( 'DotLoader' ) rt.add_declaration_code( WRAPPER_DEFINITION_OgreOdeLoader ) apply_reg (rt, WRAPPER_REGISTRATION_OgreOdeLoader ) +# rt = mb.class_( 'EntityInformer' ) +# rt.add_declaration_code( WRAPPER_DEFINITION_EntityInformer ) +# apply_reg (rt, WRAPPER_REGISTRATION_EntityInformer ) \ No newline at end of file Modified: trunk/python-ogre/code_generators/ogrepcz/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/ogrepcz/generate_code.py 2008-09-04 00:48:38 UTC (rev 732) +++ trunk/python-ogre/code_generators/ogrepcz/generate_code.py 2008-09-04 02:37:29 UTC (rev 733) @@ -350,13 +350,9 @@ if cls.name not in NoPropClasses: cls.add_properties( recognizer=ogre_properties.ogre_property_recognizer_t() ) - common_utils.add_constants( mb, { 'ogrepcz_version' : '"%s"' % environment.ogrepcz.version.replace("\n", "\\\n") - , 'python_version' : '"%s"' % sys.version.replace("\n", "\\\n" ) } ) - - ## need to create a welcome doc string for this... - common_utils.add_constants( mb, { '__doc__' : '"ogrepcz DESCRIPTION"' } ) - - + ## add additional version information to the module to help identify it correctly + common_utils.addDetailVersion ( mb, environment, environment.ogrepcz ) + ########################################################################################## # # Creating the code. After this step you should not modify/customize declarations. Modified: trunk/python-ogre/code_generators/ogrerefapp/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/ogrerefapp/generate_code.py 2008-09-04 00:48:38 UTC (rev 732) +++ trunk/python-ogre/code_generators/ogrerefapp/generate_code.py 2008-09-04 02:37:29 UTC (rev 733) @@ -111,8 +111,8 @@ common_utils.add_LeadingLowerProperties ( cls ) - common_utils.add_constants( mb, { 'ogrerefapp_version' : '"%s"' % environment.ogrerefapp.version - , 'python_version' : '"%s"' % sys.version.replace("\n", "\\\n") } ) + ## add additional version information to the module to help identify it correctly + common_utils.addDetailVersion ( mb, environment, environment.ogrerefapp ) #Creating code creator. After this step you should not modify/customize declarations. Modified: trunk/python-ogre/code_generators/ogrevideoffmpeg/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/ogrevideoffmpeg/generate_code.py 2008-09-04 00:48:38 UTC (rev 732) +++ trunk/python-ogre/code_generators/ogrevideoffmpeg/generate_code.py 2008-09-04 02:37:29 UTC (rev 733) @@ -408,13 +408,9 @@ if cls.name not in NoPropClasses: cls.add_properties( recognizer=ogre_properties.ogre_property_recognizer_t() ) - common_utils.add_constants( mb, { 'ogrevideoffmpeg_version' : '"%s"' % environment.ogrevideoffmpeg.version.replace("\n", "\\\n") - , 'python_version' : '"%s"' % sys.version.replace("\n", "\\\n" ) } ) - - ## need to create a welcome doc string for this... - common_utils.add_constants( mb, { '__doc__' : '"ogrevideoffmpeg DESCRIPTION"' } ) - - + ## add additional version information to the module to help identify it correctly + common_utils.addDetailVersion ( mb, environment, environment.ogrevideoffmpeg ) + ########################################################################################## # # Creating the code. After this step you should not modify/customize declarations. Modified: trunk/python-ogre/code_generators/ois/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/ois/generate_code.py 2008-09-04 00:48:38 UTC (rev 732) +++ trunk/python-ogre/code_generators/ois/generate_code.py 2008-09-04 02:37:29 UTC (rev 733) @@ -215,7 +215,7 @@ ) # if this module depends on another set it here - ## mb.register_module_dependency ( environment.ogre.generated_dir ) + mb.register_module_dependency ( environment.ogre.generated_dir ) # normally implicit conversions work OK, however they can cause strange things to happen so safer to leave off mb.constructors().allow_implicit_conversion = False @@ -254,13 +254,9 @@ if cls.name not in NoPropClasses: cls.add_properties( recognizer=ogre_properties.ogre_property_recognizer_t() ) - common_utils.add_constants( mb, { 'ois_version' : '"%s"' % environment.ois.version.replace("\n", "\\\n") - , 'python_version' : '"%s"' % sys.version.replace("\n", "\\\n" ) } ) - - ## need to create a welcome doc string for this... - common_utils.add_constants( mb, { '__doc__' : '"ois DESCRIPTION"' } ) + ## add additional version information to the module to help identify it correctly + common_utils.addDetailVersion ( mb, environment, environment.ois ) - ########################################################################################## # # Creating the code. After this step you should not modify/customize declarations. Modified: trunk/python-ogre/code_generators/opcode/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/opcode/generate_code.py 2008-09-04 00:48:38 UTC (rev 732) +++ trunk/python-ogre/code_generators/opcode/generate_code.py 2008-09-04 02:37:29 UTC (rev 733) @@ -569,13 +569,9 @@ if cls.name not in NoPropClasses: cls.add_properties( recognizer=ogre_properties.ogre_property_recognizer_t() ) - common_utils.add_constants( mb, { 'opcode_version' : '"%s"' % environment.opcode.version.replace("\n", "\\\n") - , 'python_version' : '"%s"' % sys.version.replace("\n", "\\\n" ) } ) - - ## need to create a welcome doc string for this... - common_utils.add_constants( mb, { '__doc__' : '"opcode DESCRIPTION"' } ) - - + ## add additional version information to the module to help identify it correctly + common_utils.addDetailVersion ( mb, environment, environment.opcode ) + ########################################################################################## # # Creating the code. After this step you should not modify/customize declarations. Modified: trunk/python-ogre/code_generators/particleuniverse/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/particleuniverse/generate_code.py 2008-09-04 00:48:38 UTC (rev 732) +++ trunk/python-ogre/code_generators/particleuniverse/generate_code.py 2008-09-04 02:37:29 UTC (rev 733) @@ -285,13 +285,10 @@ if cls.name not in NoPropClasses: cls.add_properties( recognizer=ogre_properties.ogre_property_recognizer_t() ) - common_utils.add_constants( mb, { 'particleuniverse_version' : '"%s"' % environment.particleuniverse.version.replace("\n", "\\\n") - , 'python_version' : '"%s"' % sys.version.replace("\n", "\\\n" ) } ) - - ## need to create a welcome doc string for this... - common_utils.add_constants( mb, { '__doc__' : '"particleuniverse DESCRIPTION"' } ) + ## add additional version information to the module to help identify it correctly + common_utils.addDetailVersion ( mb, environment, environment.particleuniverse ) + - ########################################################################################## # # Creating the code. After this step you should not modify/customize declarations. Modified: trunk/python-ogre/code_generators/physx/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/physx/generate_code.py 2008-09-04 00:48:38 UTC (rev 732) +++ trunk/python-ogre/code_generators/physx/generate_code.py 2008-09-04 02:37:29 UTC (rev 733) @@ -409,12 +409,9 @@ if cls.name not in NoPropClasses: cls.add_properties( recognizer=ogre_properties.ogre_property_recognizer_t() ) - common_utils.add_constants( mb, { 'physx_version' : '"%s"' % environment.physx.version.replace("\n", "\\\n") - , 'python_version' : '"%s"' % sys.version.replace("\n", "\\\n" ) } ) - - ## need to create a welcome doc string for this... - common_utils.add_constants( mb, { '__doc__' : '"PhysX DESCRIPTION"' } ) - + ## add additional version information to the module to help identify it correctly + common_utils.addDetailVersion ( mb, environment, environment.physx ) + # for func in mb.global_ns.free_functions (): # if not func.ignore: # print "Free Func Included", func Modified: trunk/python-ogre/code_generators/plib/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/plib/generate_code.py 2008-09-04 00:48:38 UTC (rev 732) +++ trunk/python-ogre/code_generators/plib/generate_code.py 2008-09-04 02:37:29 UTC (rev 733) @@ -578,12 +578,9 @@ if cls.name not in NoPropClasses: cls.add_properties( recognizer=ogre_properties.ogre_property_recognizer_t() ) - common_utils.add_constants( mb, { 'PROJECT_version' : '"%s"' % environment.plib.version.replace("\n", "\\\n") - , 'python_version' : '"%s"' % sys.version.replace("\n", "\\\n" ) } ) - - ## need to create a welcome doc string for this... - common_utils.add_constants( mb, { '__doc__' : '"plib PROJECT DESCRIPTION"' } ) - + ## add additional version information to the module to help identify it correctly + common_utils.addDetailVersion ( mb, environment, environment.plib ) + f = global_ns.member_function('::ssgEntity::cull') f.include() Modified: trunk/python-ogre/code_generators/quickgui/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/quickgui/generate_code.py 2008-09-04 00:48:38 UTC (rev 732) +++ trunk/python-ogre/code_generators/quickgui/generate_code.py 2008-09-04 02:37:29 UTC (rev 733) @@ -458,13 +458,9 @@ if cls.name not in NoPropClasses: cls.add_properties( recognizer=ogre_properties.ogre_property_recognizer_t() ) - common_utils.add_constants( mb, { 'quickgui_version' : '"%s"' % environment.quickgui.version.replace("\n", "\\\n") - , 'python_version' : '"%s"' % sys.version.replace("\n", "\\\n" ) } ) - - ## need to create a welcome doc string for this... - common_utils.add_constants( mb, { '__doc__' : '"quickgui DESCRIPTION"' } ) - - + ## add additional version information to the module to help identify it correctly + common_utils.addDetailVersion ( mb, environment, environment.quickgui ) + ########################################################################################## # # Creating the code. After this step you should not modify/customize declarations. Modified: trunk/python-ogre/code_generators/template/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/template/generate_code.py 2008-09-04 00:48:38 UTC (rev 732) +++ trunk/python-ogre/code_generators/template/generate_code.py 2008-09-04 02:37:29 UTC (rev 733) @@ -250,13 +250,9 @@ if cls.name not in NoPropClasses: cls.add_properties( recognizer=ogre_properties.ogre_property_recognizer_t() ) - common_utils.add_constants( mb, { 'PROJECT_version' : '"%s"' % environment.PROJECT.version.replace("\n", "\\\n") - , 'python_version' : '"%s"' % sys.version.replace("\n", "\\\n" ) } ) - - ## need to create a welcome doc string for this... - common_utils.add_constants( mb, { '__doc__' : '"PROJECT DESCRIPTION"' } ) - - + ## add additional version information to the module to help identify it correctly + common_utils.addDetailVersion ( mb, environment, environment.PROJECT ) + ########################################################################################## # # Creating the code. After this step you should not modify/customize declarations. Modified: trunk/python-ogre/code_generators/theora/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/theora/generate_code.py 2008-09-04 00:48:38 UTC (rev 732) +++ trunk/python-ogre/code_generators/theora/generate_code.py 2008-09-04 02:37:29 UTC (rev 733) @@ -136,7 +136,7 @@ # # print "Base: ", i # # print dir (i) - main_ns.enum('::Ogre::eTexturePlayMode').include() +# main_ns.enum('::Ogre::eTexturePlayMode').include() main_ns.enum('::Ogre::eAudioSampleFormat').include() main_ns.class_('::Ogre::RingBuffer').include(already_exposed=True) main_ns.class_('::Ogre::TexturePtr').include(already_exposed=True) @@ -481,6 +481,9 @@ , indexing_suite_version=2 , cflags=environment.ogre.cflags ) + # if this module depends on another set it here + mb.register_module_dependency ( environment.ogre.generated_dir ) + # NOTE THE CHANGE HERE mb.constructors().allow_implicit_conversion = False @@ -523,13 +526,9 @@ if cls.name not in NoPropClasses: cls.add_properties( recognizer=ogre_properties.ogre_property_recognizer_t() ) - common_utils.add_constants( mb, { 'Theora_version' : '"%s"' % environment.theora.version.replace("\n", "\\\n") - , 'python_version' : '"%s"' % sys.version.replace("\n", "\\\n" ) } ) - - ## need to create a welcome doc string for this... - common_utils.add_constants( mb, { '__doc__' : '"Theora DESCRIPTION"' } ) + ## add additional version information to the module to help identify it correctly + common_utils.addDetailVersion ( mb, environment, environment.theora ) - ########################################################################################## # # Creating the code. After this step you should not modify/customize declarations. Modified: trunk/python-ogre/code_generators/watermesh/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/watermesh/generate_code.py 2008-09-04 00:48:38 UTC (rev 732) +++ trunk/python-ogre/code_generators/watermesh/generate_code.py 2008-09-04 02:37:29 UTC (rev 733) @@ -257,13 +257,9 @@ if cls.name not in NoPropClasses: cls.add_properties( recognizer=ogre_properties.ogre_property_recognizer_t() ) - common_utils.add_constants( mb, { 'watermesh_version' : '"%s"' % environment.watermesh.version.replace("\n", "\\\n") - , 'python_version' : '"%s"' % sys.version.replace("\n", "\\\n" ) } ) - - ## need to create a welcome doc string for this... - common_utils.add_constants( mb, { '__doc__' : '"watermesh DESCRIPTION"' } ) - - + ## add additional version information to the module to help identify it correctly + common_utils.addDetailVersion ( mb, environment, environment.watermesh ) + ########################################################################################## # # Creating the code. After this step you should not modify/customize declarations. Modified: trunk/python-ogre/demos/ogreode/Demo_GranTurism.py =================================================================== --- trunk/python-ogre/demos/ogreode/Demo_GranTurism.py 2008-09-04 00:48:38 UTC (rev 732) +++ trunk/python-ogre/demos/ogreode/Demo_GranTurism.py 2008-09-04 02:37:29 UTC (rev 733) @@ -186,12 +186,12 @@ self.TimeUntilNextToggle = 0.5 if( not self._stepper.isPaused()): - print "**** Stepping" -# self.vehicle.setInputs(self.Keyboard.isKeyDown(OIS.KC_J), -# self.Keyboard.isKeyDown(OIS.KC_L), -# self.Keyboard.isKeyDown(OIS.KC_I), -# self.Keyboard.isKeyDown(OIS.KC_K)) -# self.vehicle.update(time) +# print "**** Stepping" + self.vehicle.setInputs(self.Keyboard.isKeyDown(OIS.KC_J), + self.Keyboard.isKeyDown(OIS.KC_L), + self.Keyboard.isKeyDown(OIS.KC_I), + self.Keyboard.isKeyDown(OIS.KC_K)) + self.vehicle.update(time) # Thanks to Ahmed! followFactor = 0.2 Modified: trunk/python-ogre/environment.py =================================================================== --- trunk/python-ogre/environment.py 2008-09-04 00:48:38 UTC (rev 732) +++ trunk/python-ogre/environment.py 2008-09-04 02:37:29 UTC (rev 733) @@ -1613,7 +1613,7 @@ ModuleName="cadunetree" class ogrepcz: - active = False + active = True pythonModule = True version="1.0" name='ogrepcz' Modified: trunk/python-ogre/packages_2.5/ogre/gui/QuickGUI/__init__.py =================================================================== --- trunk/python-ogre/packages_2.5/ogre/gui/QuickGUI/__init__.py 2008-09-04 00:48:38 UTC (rev 732) +++ trunk/python-ogre/packages_2.5/ogre/gui/QuickGUI/__init__.py 2008-09-04 02:37:29 UTC (rev 733) @@ -1,5 +1,5 @@ import sys, os -import warnings -warnings.simplefilter('ignore', RuntimeWarning) +# import warnings +# warnings.simplefilter('ignore', RuntimeWarning) from _quickgui_ import * -warnings.resetwarnings( ) +# warnings.resetwarnings( ) Modified: trunk/python-ogre/packages_2.5/ogre/gui/betagui/__init__.py =================================================================== --- trunk/python-ogre/packages_2.5/ogre/gui/betagui/__init__.py 2008-09-04 00:48:38 UTC (rev 732) +++ trunk/python-ogre/packages_2.5/ogre/gui/betagui/__init__.py 2008-09-04 02:37:29 UTC (rev 733) @@ -1,4... [truncated message content] |
From: <and...@us...> - 2008-09-07 06:24:24
|
Revision: 735 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=735&view=rev Author: andy_miller Date: 2008-09-07 06:24:31 +0000 (Sun, 07 Sep 2008) Log Message: ----------- Updates to QuickGui to support my renderQueueListener API changes New Help file Fix to PCZ demo bug where I wasn't init'ing a Vector3 correctly Fixed ET demo to use std::Vector<float> from Ogre library Fixed bug in installer script with mutliple installed versions of Python Modified Paths: -------------- trunk/python-ogre/ChangeLog.txt trunk/python-ogre/PythonOgreInstallCreator.iss trunk/python-ogre/ThirdParty/quickgui/QuickGUIManager.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIManager.h trunk/python-ogre/code_generators/ogre/python_ogre_aliases.h trunk/python-ogre/code_generators/ogre/python_ogre_sizeof.h trunk/python-ogre/code_generators/ogrepcz/python_ogrepcz_aliases.h trunk/python-ogre/demos/et/CEGUI_framework.py trunk/python-ogre/demos/et/Demo_CEGUI_ET.py trunk/python-ogre/demos/ogre/Demo_SkeletalAnimation.py trunk/python-ogre/demos/ogrepcz/Demo_PCZ01.py trunk/python-ogre/demos/ogrepcz/plugins.cfg trunk/python-ogre/demos/theora/demo_video.py trunk/python-ogre/docs/Python-Ogre.chm trunk/python-ogre/packages_2.5/ogre/renderer/OGRE/sf_OIS.py Added Paths: ----------- trunk/python-ogre/demos/media_extra/konqi_ad1_nl.avi.ogg Modified: trunk/python-ogre/ChangeLog.txt =================================================================== --- trunk/python-ogre/ChangeLog.txt 2008-09-05 01:56:29 UTC (rev 734) +++ trunk/python-ogre/ChangeLog.txt 2008-09-07 06:24:31 UTC (rev 735) @@ -1,18 +1,22 @@ August 29 2008 : Release 1.6 RC1 ================================ -Version numbering change to match the Ogre release versions. -Ogre 1.6 RC1 -OIS 1.2 -CEGUI 0.6.1 -Particle Universe 0.8 -Hydrax 0.3 -Bullet 2.70 -OgreBullet - patched to match API change in Bullet 2.7 -PhysX (NVIDA) 2.8.1 -ODE 0.10.1 -QuickGui R350 -OgreAL R115 +<< incomplete >> +Version numbering change to match the Ogre release versions. +Modules Updated to + Ogre 1.6 RC1 + OIS 1.2 + CEGUI 0.6.1 + Particle Universe 0.8 + Hydrax 0.3 + Bullet 2.70 + OgreBullet - patched to match API change in Bullet 2.7 + PhysX (NVIDA) 2.8.1 + ODE 0.10.1 + QuickGui R350 + OgreAL R115 +OgreOde and OgreRefApp tweaked to work with ODE 0.10 + Added CEGUI::Tree to handmadewrapper (Thanks Dermont) Change to CEGUI_framework.py to force loading of CEGUIBase lib in the correct mode under Linux - means we don't need to patch the CEGUI source... Modified: trunk/python-ogre/PythonOgreInstallCreator.iss =================================================================== --- trunk/python-ogre/PythonOgreInstallCreator.iss 2008-09-05 01:56:29 UTC (rev 734) +++ trunk/python-ogre/PythonOgreInstallCreator.iss 2008-09-07 06:24:31 UTC (rev 735) @@ -3,19 +3,19 @@ ; [Setup] AppName=Python-Ogre -AppVerName=Python-Ogre 1.2 RC2 +AppVerName=Python-Ogre 1.6RC1 DefaultDirName=C:\PythonOgre DefaultGroupName=Python-Ogre OutputBaseFilename=PythonOgreInstaller OutputDir=C:\temp SourceDir=C:\Development\PythonOgreRelease -VersionInfoDescription=Release 1.2 RC2 of Python-Ogre +VersionInfoDescription=Release 1.6RC1 of Python-Ogre AllowNoIcons=true AppPublisher=OpenSource (Andy and Team) AppPublisherURL=http://www.python-ogre.org AppSupportURL=http://www.python-ogre.org AppUpdatesURL=http://www.python-ogre.org -AppVersion=1.2.1 +AppVersion=1.6.0 LicenseFile=LICENSE.GPL Compression=lzma InfoBeforeFile=InstallWarning.rtf @@ -23,13 +23,13 @@ SolidCompression=true AppCopyright=LPGL VersionInfoCompany=OpenSource (Andy and Team) -VersionInfoTextVersion=1.2.1 +VersionInfoTextVersion=1.6.0 VersionInfoCopyright=PythonOgre Development Team RestartIfNeededByRun=false UninstallDisplayName=PythonOgre WizardImageFile=compiler:WizModernImage-IS.bmp WizardSmallImageFile=compiler:WizModernSmallImage-IS.bmp -VersionInfoVersion=1.2.1 +VersionInfoVersion=1.6.0 [Files] ; base files, demos and tools Source: *; DestDir: {app} @@ -219,15 +219,15 @@ Name: {group}\OgreNewt Demos\Custom Joints; Filename: {code:GetPythonExe}; Parameters: Demo07_CustomJoints.py; WorkingDir: {app}\Demos\OgreNewt Name: {group}\OgreNewt Demos\Ragdoll; Filename: {code:GetPythonExe}; Parameters: Demo08_ragdoll.py; WorkingDir: {app}\Demos\OgreNewt -Name: {group}\Video Demos\ffmpeg Video; Filename: {code:GetPythonExe}; Parameters: Demo_Video.py; WorkingDir: {app}\Demos\ffmpeg +;Name: {group}\Video Demos\ffmpeg Video; Filename: {code:GetPythonExe}; Parameters: Demo_Video.py; WorkingDir: {app}\Demos\ffmpeg ;Name: {group}\Video Demos\DirectShow Video; Filename: {code:GetPythonExe}; Parameters: Demo_Video.py; WorkingDir: {app}\Demos\dshow Name: {group}\Video Demos\Theora Video; Filename: {code:GetPythonExe}; Parameters: Demo_Video.py; WorkingDir: {app}\Demos\theora -Name: {group}\NxOgre\Download AGEIA drivers first; Filename: http://www.ageia.com/drivers/drivers.html -Name: {group}\NxOgre\Cakewalk; Filename: {code:GetPythonExe}; Parameters: Cakeframework.py; WorkingDir: {app}\Demos\nxogre -Name: {group}\NxOgre\Demo101; Filename: {code:GetPythonExe}; Parameters: Demo_101.py; WorkingDir: {app}\Demos\nxogre -Name: {group}\NxOgre\Demo102; Filename: {code:GetPythonExe}; Parameters: Demo_102.py; WorkingDir: {app}\Demos\nxogre -Name: {group}\NxOgre\Demo103; Filename: {code:GetPythonExe}; Parameters: Demo_103.py; WorkingDir: {app}\Demos\nxogre +;Name: {group}\NxOgre\Download AGEIA drivers first; Filename: http://www.ageia.com/drivers/drivers.html +;Name: {group}\NxOgre\Cakewalk; Filename: {code:GetPythonExe}; Parameters: Cakeframework.py; WorkingDir: {app}\Demos\nxogre +;Name: {group}\NxOgre\Demo101; Filename: {code:GetPythonExe}; Parameters: Demo_101.py; WorkingDir: {app}\Demos\nxogre +;Name: {group}\NxOgre\Demo102; Filename: {code:GetPythonExe}; Parameters: Demo_102.py; WorkingDir: {app}\Demos\nxogre +;Name: {group}\NxOgre\Demo103; Filename: {code:GetPythonExe}; Parameters: Demo_103.py; WorkingDir: {app}\Demos\nxogre Name: {group}\Plib Demos\Networking - Server; Filename: {code:GetPythonExe}; Parameters: Demo_Server.py; WorkingDir: {app}\Demos\plib Name: {group}\Plib Demos\Networking - Client; Filename: {code:GetPythonExe}; Parameters: Demo_Client.py; WorkingDir: {app}\Demos\plib @@ -306,12 +306,16 @@ var I: Integer; begin - Result := True; -// msgbox ('Checking Supported Versions ' + Param + IntToStr(GetArrayLength(SupportedVersions) ), mbInformation, MB_OK); + Result := False; + msgbox ('Checking Supported Versions ' + Param + ' ' + IntToStr(GetArrayLength(SupportedVersions) ), mbInformation, MB_OK); for I:=0 to GetArrayLength(SupportedVersions)-1 do begin - if Param = SupportedVersions[i] then Result := True; -// msgbox ( 'Checked ' + SupportedVersions[i], mbInformation, MB_OK); + if Param = SupportedVersions[i] then begin + Result := True; + msgbox ( 'Is a supported version ' + Param + ' (' + SupportedVersions[i] + ') ' + Param , mbInformation, MB_OK); + end else begin + msgbox ( 'Not a supported version ' + Param + ' (' +SupportedVersions[i] + ') ', mbInformation, MB_OK); + end; end; end; @@ -334,6 +338,7 @@ templ := ['','']; count := 0; RegGetSubkeyNames(HKEY_LOCAL_MACHINE, 'SOFTWARE\Python\PythonCore', Result1); + msgbox ( 'LOCAL MACHINE ' + InttoStr(GetArrayLength(Result1)) , mbInformation, MB_OK); // if we have versions here process them for i:=0 to GetArrayLength(Result1)-1 do if IsSupportedVersion ( Result1[i] ) then begin // make sure we support it.. @@ -349,7 +354,9 @@ if count < 2 then begin // we've only found zero, or one version so far.. // OK so we should now have all the valid versions listed in LOCAL_MACHINE + Result1 = [''] RegGetSubkeyNames(HKEY_CURRENT_USER, 'SOFTWARE\Python\PythonCore', Result1); + msgbox ( 'LOCAL MACHINE ' + InttoStr(GetArrayLength(Result1)) , mbInformation, MB_OK); for i:=0 to GetArrayLength(Result1)-1 do if not FoundPythonIn ( Result1[i], tempv ) then // check we don't already know about this version if IsSupportedVersion (Result1[i]) then begin @@ -458,7 +465,7 @@ PythonVersion := ''; SupportedVersions := [ '2.5']; - Debug := False; + Debug := True; NumPythonVersions := GetInstalledPythonVersions(); if Debug then Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIManager.cpp =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIManager.cpp 2008-09-05 01:56:29 UTC (rev 734) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIManager.cpp 2008-09-07 06:24:31 UTC (rev 735) @@ -694,11 +694,11 @@ mTimeListeners.push_back(w); } - void GUIManager::renderQueueStarted(Ogre::uint8 id, const std::string& invocation, bool& skipThisQueue) + bool GUIManager::renderQueueStarted(Ogre::uint8 id, const std::string& invocation, bool skipThisQueue) { // Look for widgets queued for deletion. if(mFreeList.empty()) - return; + return skipThisQueue; bool activeWidgetDestroyed = false; if( std::find(mFreeList.begin(),mFreeList.end(),mActiveWidget) != mFreeList.end() ) @@ -715,9 +715,10 @@ if(activeWidgetDestroyed) injectMouseMove(0,0); + return skipThisQueue; } - void GUIManager::renderQueueEnded(Ogre::uint8 id, const std::string& invocation, bool& repeatThisQueue) + bool GUIManager::renderQueueEnded(Ogre::uint8 id, const std::string& invocation, bool repeatThisQueue) { // Perform rendering of GUI if(mQueueID == id) @@ -725,6 +726,7 @@ mActiveSheet->render(); mMouseCursor->render(); } + return repeatThisQueue; } void GUIManager::removeFromRenderQueue() Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIManager.h =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIManager.h 2008-09-05 01:56:29 UTC (rev 734) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIManager.h 2008-09-07 06:24:31 UTC (rev 735) @@ -148,8 +148,8 @@ void registerTimeListener(Widget* w); - virtual void renderQueueStarted(Ogre::uint8 id, const std::string& invocation, bool& skipThisQueue); - virtual void renderQueueEnded(Ogre::uint8 id, const std::string& invocation, bool& repeatThisQueue); + virtual bool renderQueueStarted(Ogre::uint8 id, const std::string& invocation, bool skipThisQueue); + virtual bool renderQueueEnded(Ogre::uint8 id, const std::string& invocation, bool repeatThisQueue); void removeFromRenderQueue(); Modified: trunk/python-ogre/code_generators/ogre/python_ogre_aliases.h =================================================================== --- trunk/python-ogre/code_generators/ogre/python_ogre_aliases.h 2008-09-05 01:56:29 UTC (rev 734) +++ trunk/python-ogre/code_generators/ogre/python_ogre_aliases.h 2008-09-07 06:24:31 UTC (rev 735) @@ -22,6 +22,7 @@ typedef std::list<Ogre::Particle*> ParticleList; typedef std::list<Ogre::ParticleEmitter*> ParticleEmitterList; typedef std::vector<Ogre::Particle*> ParticlePool; +typedef std::vector<float> stdVectorFloat; typedef Ogre::MapIterator<std::map<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, Ogre::GpuConstantDefinition, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char> >, Ogre::GpuConstantDefinition> > > >\ MapIteratorGpuConstantDefinition; Modified: trunk/python-ogre/code_generators/ogre/python_ogre_sizeof.h =================================================================== --- trunk/python-ogre/code_generators/ogre/python_ogre_sizeof.h 2008-09-05 01:56:29 UTC (rev 734) +++ trunk/python-ogre/code_generators/ogre/python_ogre_sizeof.h 2008-09-07 06:24:31 UTC (rev 735) @@ -39,6 +39,7 @@ std::vector< int > v; std::set< std::string > s; +sizeof ( std::vector< float > ); std::multimap< std::string, std::string > ms; sizeof ( v ); sizeof ( s ); Modified: trunk/python-ogre/code_generators/ogrepcz/python_ogrepcz_aliases.h =================================================================== --- trunk/python-ogre/code_generators/ogrepcz/python_ogrepcz_aliases.h 2008-09-05 01:56:29 UTC (rev 734) +++ trunk/python-ogre/code_generators/ogrepcz/python_ogrepcz_aliases.h 2008-09-07 06:24:31 UTC (rev 735) @@ -1 +1,2 @@ // typedef name nicename; +typedef ::Ogre::Singleton< Ogre::PCZoneFactoryManager > SingletonPCZoneFactoryManager; \ No newline at end of file Modified: trunk/python-ogre/demos/et/CEGUI_framework.py =================================================================== --- trunk/python-ogre/demos/et/CEGUI_framework.py 2008-09-05 01:56:29 UTC (rev 734) +++ trunk/python-ogre/demos/et/CEGUI_framework.py 2008-09-07 06:24:31 UTC (rev 735) @@ -1,4 +1,21 @@ +import ctypes +import os + +# The follow patch from Tim (Mithro) fixes a loder issue with CEGUI - previously we'd patched CEGUI to +# ensure the CEGUIBase was linked to every module to solve the issue with Python dynamically loading +# the _cegui_.so module without RTLD_GLOBAL set - then when CEGUI opened it's dynamic modules it +# couldn't find all the symbols. + +#print ctypes.CDLL("../../../root/usr/lib/libCEGUIBase.so", ctypes.RTLD_GLOBAL ) + import ogre.gui.CEGUI as CEGUI + +# Another fix for CEGUI to ensure we get a working parser.. +if os.name == 'nt': + CEGUI.System.setDefaultXMLParserName("ExpatParser") +else: + CEGUI.System.setDefaultXMLParserName("TinyXMLParser") + import ogre.io.OIS as OIS import SampleFramework Modified: trunk/python-ogre/demos/et/Demo_CEGUI_ET.py =================================================================== --- trunk/python-ogre/demos/et/Demo_CEGUI_ET.py 2008-09-05 01:56:29 UTC (rev 734) +++ trunk/python-ogre/demos/et/Demo_CEGUI_ET.py 2008-09-07 06:24:31 UTC (rev 735) @@ -656,7 +656,8 @@ self.terrainMgr.setUseLODMorphing(True, 0.2, "morphFactor") ## create a fresh, mid-high terrain for editing - heightMapValues = ET.stdVectorFloat() + # Note + heightMapValues = ogre.LodDistanceList() ## ET.stdVectorFloat() for i in xrange(129): for j in xrange(129): heightMapValues.append(float(0.50)) Property changes on: trunk/python-ogre/demos/media_extra/konqi_ad1_nl.avi.ogg ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: trunk/python-ogre/demos/ogre/Demo_SkeletalAnimation.py =================================================================== --- trunk/python-ogre/demos/ogre/Demo_SkeletalAnimation.py 2008-09-05 01:56:29 UTC (rev 734) +++ trunk/python-ogre/demos/ogre/Demo_SkeletalAnimation.py 2008-09-07 06:24:31 UTC (rev 735) @@ -167,7 +167,7 @@ self.TexCam = sceneManager.createCamera("ReflectCam") self.TexCam.setCustomViewMatrix(False) - self.CurrentShadowCameraSetup.getShadowCamera (self.sceneManager, self.camera, self.viewport, light, self.TexCam) +# self.CurrentShadowCameraSetup.getShadowCamera (self.sceneManager, self.camera, self.viewport, light, self.TexCam) # self.CurrentShadowCameraSetup = ogre.FocusedShadowCameraSetup() # self.CurrentShadowCameraSetup = ogre.DefaultShadowCameraSetup() Modified: trunk/python-ogre/demos/ogrepcz/Demo_PCZ01.py =================================================================== --- trunk/python-ogre/demos/ogrepcz/Demo_PCZ01.py 2008-09-05 01:56:29 UTC (rev 734) +++ trunk/python-ogre/demos/ogrepcz/Demo_PCZ01.py 2008-09-07 06:24:31 UTC (rev 735) @@ -23,6 +23,7 @@ os.environ['PATH'] = newpath +';' + os.environ['PATH'] import ogre.renderer.OGRE as ogre +# import sf_OIS as sf import SampleFramework as sf import ogre.io.OIS as ois import ogre.renderer.ogrepcz as pcz @@ -37,7 +38,7 @@ self.moveSpeed = 15.0 self.targetMO =0 self.app=app - self.buildingTranslate = ogre.Vector3() + self.buildingTranslate = ogre.Vector3(0,0,0) ## need to specify 0,0,0 otherwise random self.raySceneQuery= app.raySceneQuery @@ -272,14 +273,14 @@ self.buildingNode.setPosition(500, 165, 570) #ogre.Radian r = Radian(3.1416/7.0) #self.buildingNode.rotate(ogre.Vector3.UNIT_Y, r) - - # create another test buildinig - roomObj2 = RoomObject.RoomObject() - self.buildingNode = roomObj2.createTestBuilding(self.sceneManager, "2") - self.buildingNode.setPosition(400, 165, 570) - #ogre.Radian r = Radian(3.1416/7.0) - #self.buildingNode.rotate(ogre.Vector3.UNIT_Y, r) - +# +# # create another test buildinig +# roomObj2 = RoomObject.RoomObject() +# self.buildingNode = roomObj2.createTestBuilding(self.sceneManager, "2") +# self.buildingNode.setPosition(400, 165, 570) +# #ogre.Radian r = Radian(3.1416/7.0) +# #self.buildingNode.rotate(ogre.Vector3.UNIT_Y, r) +# # Position camera in the center of the building self.cameraNode.setPosition(self.buildingNode.getPosition()) # Look back along -Z Modified: trunk/python-ogre/demos/ogrepcz/plugins.cfg =================================================================== --- trunk/python-ogre/demos/ogrepcz/plugins.cfg 2008-09-05 01:56:29 UTC (rev 734) +++ trunk/python-ogre/demos/ogrepcz/plugins.cfg 2008-09-07 06:24:31 UTC (rev 735) @@ -8,11 +8,10 @@ Plugin=RenderSystem_Direct3D9.dll Plugin=Plugin_ParticleFX.dll Plugin=Plugin_BSPSceneManager.dll -Plugin=Plugin_OctreeSceneManager.dll Plugin=Plugin_CgProgramManager.dll Plugin=Plugin_PCZSceneManager.dll Plugin=Plugin_OctreeZone.dll -#Plugin=Plugin_OctreeSceneManager.dll +Plugin=Plugin_OctreeSceneManager.dll ## Modified: trunk/python-ogre/demos/theora/demo_video.py =================================================================== --- trunk/python-ogre/demos/theora/demo_video.py 2008-09-05 01:56:29 UTC (rev 734) +++ trunk/python-ogre/demos/theora/demo_video.py 2008-09-07 06:24:31 UTC (rev 735) @@ -42,8 +42,8 @@ if not self.Control: print "\n\nClip not found\n" sys.exit() - self.Control.setInputName( '../media_extra/konqi_ad1_nl.avi.ogg') ##fish.ogg' ) - self.Control.setPlayMode(theora.TextureEffectPause ) + self.Control.setInputName( '../media_extra/fish1.ogg') #konqi_ad1_nl.avi.ogg') ##fish.ogg' ) + self.Control.setPlayMode(ogre.TextureEffectPause ) self.Control.setTextureTecPassStateLevel( 0, 0, 0 ) self.Control.setSeekEnabled( False ) @@ -71,7 +71,7 @@ self.Clip.setAudioDriver( self.Audio ) - self.playmode = theora.TextureEffectPlay_ASAP + self.playmode = ogre.TextureEffectPlay_ASAP self.Clip.changePlayMode ( self.playmode ) c = sceneManager.createEntity("cubo", "cube.mesh") Modified: trunk/python-ogre/packages_2.5/ogre/renderer/OGRE/sf_OIS.py =================================================================== --- trunk/python-ogre/packages_2.5/ogre/renderer/OGRE/sf_OIS.py 2008-09-05 01:56:29 UTC (rev 734) +++ trunk/python-ogre/packages_2.5/ogre/renderer/OGRE/sf_OIS.py 2008-09-07 06:24:31 UTC (rev 735) @@ -302,7 +302,9 @@ self.InputManager=None ## NOTE the in Ogre 1.6 (1.7) this is changed to frameRenderingQueued !!! - + def frameRenderingQueued ( self, evt ): + return True + def frameStarted(self, frameEvent): if(self.renderWindow.isClosed()): return False This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2008-09-07 12:10:14
|
Revision: 739 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=739&view=rev Author: andy_miller Date: 2008-09-07 12:10:22 +0000 (Sun, 07 Sep 2008) Log Message: ----------- Updates for 1.6 - OgreAL cleanups, Additional Ogre tests, cleanup for various demos Modified Paths: -------------- trunk/python-ogre/PythonOgreInstallCreator.iss trunk/python-ogre/ThirdParty/ogreal/OgreALListener.h trunk/python-ogre/ThirdParty/ogreal/OgreALSound.h trunk/python-ogre/demos/theora/demo_video.py trunk/python-ogre/environment.py trunk/python-ogre/scripts/MakeRelease.bat Added Paths: ----------- trunk/python-ogre/demos/ogre/tests/Test_GPU.py trunk/python-ogre/demos/ogre/tests/Test_Vector3.py Modified: trunk/python-ogre/PythonOgreInstallCreator.iss =================================================================== --- trunk/python-ogre/PythonOgreInstallCreator.iss 2008-09-07 11:44:46 UTC (rev 738) +++ trunk/python-ogre/PythonOgreInstallCreator.iss 2008-09-07 12:10:22 UTC (rev 739) @@ -20,7 +20,7 @@ Compression=lzma InfoBeforeFile=InstallWarning.rtf InfoAfterFile=postinstall.rtf -SolidCompression=true +SolidCompression=yes AppCopyright=LPGL VersionInfoCompany=OpenSource (Andy and Team) VersionInfoTextVersion=1.6.0 @@ -44,11 +44,12 @@ ; I'm going to install here anyway to make updates easier... Source: packages_2.5\*; DestDir: {app}\packages_2.5; Flags: recursesubdirs + +Source: ThirdParty\dxwebsetup.exe; DestDir: {app}\ThirdParty +Source: ThirdParty\vcredist_x86.exe; DestDir: {app}\ThirdParty ; ; we need to remove the .pyc files when we uninstall ; -Source: ThirdParty\dxwebsetup.exe; DestDir: {app}\ThirdParty -Source: ThirdParty\vcredist_x86.exe; DestDir: {app}\ThirdParty [UninstallDelete] Type: filesandordirs; Name: {code:GetPythonSiteDir}\ogre\*.pyc @@ -307,14 +308,14 @@ I: Integer; begin Result := False; - msgbox ('Checking Supported Versions ' + Param + ' ' + IntToStr(GetArrayLength(SupportedVersions) ), mbInformation, MB_OK); + ;msgbox ('Checking Supported Versions ' + Param + ' ' + IntToStr(GetArrayLength(SupportedVersions) ), mbInformation, MB_OK); for I:=0 to GetArrayLength(SupportedVersions)-1 do begin if Param = SupportedVersions[i] then begin Result := True; - msgbox ( 'Is a supported version ' + Param + ' (' + SupportedVersions[i] + ') ' + Param , mbInformation, MB_OK); + ;msgbox ( 'Is a supported version ' + Param + ' (' + SupportedVersions[i] + ') ' + Param , mbInformation, MB_OK); end else begin - msgbox ( 'Not a supported version ' + Param + ' (' +SupportedVersions[i] + ') ', mbInformation, MB_OK); + ;msgbox ( 'Not a supported version ' + Param + ' (' +SupportedVersions[i] + ') ', mbInformation, MB_OK); end; end; end; @@ -331,14 +332,14 @@ var i, count: Integer; p: string; - Result1 : array of String; + Result1, Result2 : array of String; tempv, templ : array of String; begin tempv := ['','']; templ := ['','']; count := 0; RegGetSubkeyNames(HKEY_LOCAL_MACHINE, 'SOFTWARE\Python\PythonCore', Result1); - msgbox ( 'LOCAL MACHINE ' + InttoStr(GetArrayLength(Result1)) , mbInformation, MB_OK); + ;msgbox ( 'LOCAL MACHINE ' + InttoStr(GetArrayLength(Result1)) , mbInformation, MB_OK); // if we have versions here process them for i:=0 to GetArrayLength(Result1)-1 do if IsSupportedVersion ( Result1[i] ) then begin // make sure we support it.. @@ -354,15 +355,14 @@ if count < 2 then begin // we've only found zero, or one version so far.. // OK so we should now have all the valid versions listed in LOCAL_MACHINE - Result1 = [''] - RegGetSubkeyNames(HKEY_CURRENT_USER, 'SOFTWARE\Python\PythonCore', Result1); - msgbox ( 'LOCAL MACHINE ' + InttoStr(GetArrayLength(Result1)) , mbInformation, MB_OK); - for i:=0 to GetArrayLength(Result1)-1 do - if not FoundPythonIn ( Result1[i], tempv ) then // check we don't already know about this version - if IsSupportedVersion (Result1[i]) then begin - if RegQueryStringValue(HKEY_CURRENT_USER, 'SOFTWARE\Python\PythonCore\' + Result1[i] + '\InstallPath', '', p) then begin + RegGetSubkeyNames(HKEY_CURRENT_USER, 'SOFTWARE\Python\PythonCore', Result2); + ;msgbox ( 'CURRENT_USER ' + InttoStr(GetArrayLength(Result2)) , mbInformation, MB_OK); + for i:=0 to GetArrayLength(Result2)-1 do + if not FoundPythonIn ( Result2[i], tempv ) then // check we don't already know about this version + if IsSupportedVersion (Result2[i]) then begin + if RegQueryStringValue(HKEY_CURRENT_USER, 'SOFTWARE\Python\PythonCore\' + Result2[i] + '\InstallPath', '', p) then begin if FileExists ( p + '\python.exe' ) then begin - tempv[count] := Result1[i]; + tempv[count] := Result2[i]; templ[count] := p; count := count + 1; end; @@ -465,7 +465,7 @@ PythonVersion := ''; SupportedVersions := [ '2.5']; - Debug := True; + Debug := False; NumPythonVersions := GetInstalledPythonVersions(); if Debug then Modified: trunk/python-ogre/ThirdParty/ogreal/OgreALListener.h =================================================================== --- trunk/python-ogre/ThirdParty/ogreal/OgreALListener.h 2008-09-07 11:44:46 UTC (rev 738) +++ trunk/python-ogre/ThirdParty/ogreal/OgreALListener.h 2008-09-07 12:10:22 UTC (rev 739) @@ -140,7 +140,9 @@ void _updateRenderQueue(Ogre::RenderQueue* queue); /** Overridden from MovableObject */ void _notifyAttached(Ogre::Node* parent, bool isTagPoint = false); - #if OGRE_VERSION_MAJOR == 1 && ((OGRE_VERSION_MINOR == 5) || (OGRE_VERSION_MINOR == 7)) + #if OGRE_VERSION_MAJOR == 1 && OGRE_VERSION_MINOR == 4 + // nothing here... + #else /** Overridden from MovableObject */ virtual void visitRenderables(Ogre::Renderable::Visitor* visitor, bool debugRenderables = false){} #endif Modified: trunk/python-ogre/ThirdParty/ogreal/OgreALSound.h =================================================================== --- trunk/python-ogre/ThirdParty/ogreal/OgreALSound.h 2008-09-07 11:44:46 UTC (rev 738) +++ trunk/python-ogre/ThirdParty/ogreal/OgreALSound.h 2008-09-07 12:10:22 UTC (rev 739) @@ -307,7 +307,9 @@ void _updateRenderQueue(Ogre::RenderQueue* queue); /** Notifies the sound when it is attached to a node */ void _notifyAttached(Ogre::Node *parent, bool isTagPoint = false); - #if(OGRE_VERSION_MAJOR == 1 && (OGRE_VERSION_MINOR == 5) || (OGRE_VERSION_MINOR == 7)) + #if(OGRE_VERSION_MAJOR == 1 && OGRE_VERSION_MINOR == 4) + // nothing here + #else /** Overridden from MovableObject */ virtual void visitRenderables(Ogre::Renderable::Visitor* visitor, bool debugRenderables = false){} #endif Added: trunk/python-ogre/demos/ogre/tests/Test_GPU.py =================================================================== --- trunk/python-ogre/demos/ogre/tests/Test_GPU.py (rev 0) +++ trunk/python-ogre/demos/ogre/tests/Test_GPU.py 2008-09-07 12:10:22 UTC (rev 739) @@ -0,0 +1,105 @@ +import os,sys +if sys.platform == 'win32': + os.environ['PATH'] += ';' + __file__[0] + +import ogre.renderer.OGRE as ogre +import SampleFramework +import math + +import ctypes + + +class TutorialApplication(SampleFramework.Application): + def _createScene(self): + sm = self.sceneManager + cam = self.camera + rw = self.renderWindow + + # create head entity (left) + self.headNode = sm.getRootSceneNode().createChildSceneNode('head1') + self.headNode.position=-70,0,0 + self.entity = sm.createEntity('head', 'ogrehead.mesh') + self.headNode.attachObject(self.entity) + + + for r in self.root.getAvailableRenderers(): + print "Renderer: ",r.getName() + cap = r.getCapabilities() + if cap: ## Note only the active renderer has capabilities + print "Device Name: ", cap.DeviceName + print "Driver Version/release: ", cap.DriverVersion.build, cap.DriverVersion.release + + fragmentProgramName = "OceanCg" #"OceanHLSL_GLSL" + mat = ogre.MaterialManager.getSingleton().getByName(fragmentProgramName) + + # In case the material is not found + if (mat == None): + print "Material not found: ",fragmentProgramName + sys.exit() + + validkeys = [] + if (mat.getTechnique(0).getPass(0).hasFragmentProgram()): + print "\n\nHAS FRAGMENT" + params = mat.getTechnique(0).getPass(0).getFragmentProgramParameters() + if (params.hasNamedParameters()): + it = params.getConstantDefinitionIterator() +# while it.hasMoreElements(): +# key = it.peekNextKey() +# value = it.peekNextValue() +# print key, value +# index = value.physicalIndex +# size = value.elementSize +# p = ctypes.c_float * size +# print p +# params._readRawConstants (index, size, ctypes.addressof(p) ) +# print p +# print index, size +# it.moveNext() + while it.hasMoreElements(): + key = it.peekNextKey() + if not '[' in key: # seem to get double key's ?? + value = it.peekNextValue() + index = value.physicalIndex + size = value.elementSize + + if value.isFloat(): + storageclass = ctypes.c_float * size + p =storageclass(1.1) + params._readRawConstantsFloat (index, size, ctypes.addressof(p) ) + else: + storageclass = ctypes.c_int * size + p =storageclass(1) + params._readRawConstantsInt (index, size, ctypes.addressof(p) ) + print key, index, size, p[0], p[1], p[2] + it.moveNext() + print value + print dir(value) + print p + print dir(p) + + +# while (True): +# # Get the key +# key = it.peekNextKey() +# print "KEY: ",key +# # And the corresponding value +# value = it.peekNextValue() +# index = value.physicalIndex +# size = value.elementSize +# p = ctypes.c_float * size +# result = 0 +# print p +# # params._readRawConstants (index, size, ctypes.addressof(p) ) +# # print "VALUE: ",p +# # if (key.isalpha() and params._findNamedConstantDefinition(key)): +# # validkeys.append(key) +# it.moveNext() +# if (not it.hasMoreElements()): +# break + else: + print "\n\nNo fragment programs found" + sys.exit() + +if __name__ == '__main__': + ta = TutorialApplication() + ta.go() Added: trunk/python-ogre/demos/ogre/tests/Test_Vector3.py =================================================================== --- trunk/python-ogre/demos/ogre/tests/Test_Vector3.py (rev 0) +++ trunk/python-ogre/demos/ogre/tests/Test_Vector3.py 2008-09-07 12:10:22 UTC (rev 739) @@ -0,0 +1,41 @@ +import exceptions as e +import ogre.renderer.OGRE as ogre + +class NewVector3 ( ogre.Vector3 ): + + def __init__( self, value ): + ogre.Vector3.__init__( self, *value ) + + def __getitem__ ( self, index ): + if not type ( index ) == type ( 1 ): + raise e.TypeError + if index < 0 or index > 3: + raise e.IndexError + return ogre.Vector3.__getitem__( self, index ) + + def __getslice__ ( self, start, end ): + if not type ( start ) == type ( end ) == type ( 1 ) : + raise e.TypeError + if (start < 0 or start > 3) or ( end < 0 ): + raise e.IndexError + if end > 3: end = 3 + retValues=[] + for x in range ( end - start ): + retValues.append ( ogre.Vector3.__getitem__( self, start + x ) ) + return retValues + +TestValues=[1.223,5.676,98.43] + +v = NewVector3( TestValues ) +print v +print v.x, v.y, v.z +print v[0], v[1], v[2] +print v[0:1] +print v[1:2] +print v[1:1] +print v[:] +print v[0:3] + + + + \ No newline at end of file Modified: trunk/python-ogre/demos/theora/demo_video.py =================================================================== --- trunk/python-ogre/demos/theora/demo_video.py 2008-09-07 11:44:46 UTC (rev 738) +++ trunk/python-ogre/demos/theora/demo_video.py 2008-09-07 12:10:22 UTC (rev 739) @@ -42,7 +42,7 @@ if not self.Control: print "\n\nClip not found\n" sys.exit() - self.Control.setInputName( '../media_extra/fish1.ogg') #konqi_ad1_nl.avi.ogg') ##fish.ogg' ) + self.Control.setInputName( 'konqi_ad1_nl.avi.ogg' ) #../media_extra/fish1.ogg') self.Control.setPlayMode(ogre.TextureEffectPause ) self.Control.setTextureTecPassStateLevel( 0, 0, 0 ) Modified: trunk/python-ogre/environment.py =================================================================== --- trunk/python-ogre/environment.py 2008-09-07 11:44:46 UTC (rev 738) +++ trunk/python-ogre/environment.py 2008-09-07 12:10:22 UTC (rev 739) @@ -1323,11 +1323,15 @@ ,os.path.join(Config.PATH_OPENAL, 'libs','Win32') ,Config.PATH_LIB_OgreAL ] - CCFLAGS = ' -DWIN32 -DNDEBUG -D_LIB -D_WIN32 -D_WINDOWS -DVORBIS_IEEE_FLOAT32 -D_USE_NON_INTEL_COMPILER ' + CCFLAGS = ' -DWIN32 -DNDEBUG -D_LIB -D_WIN32 -D_WINDOWS ' #-DVORBIS_IEEE_FLOAT32 -D_USE_NON_INTEL_COMPILER ' libs=[boost.lib, 'OgreMain', 'ogg_static', - 'vorbis_static','vorbisfile_static','vorbisenc_static', - 'OpenAL32', 'EFX-Util'] # -- going to compile OgreAL ourselves + 'vorbis_static','vorbisfile_static', + #'vorbisenc_static', + 'OpenAL32', + #'EFX-Util' + + ] # -- going to compile OgreAL ourselves source = [ ["wget", "http://connect.creativelabs.com/openal/Downloads/OpenAL11CoreSDK.zip",downloadPath], ["wget", "http://downloads.xiph.org/releases/ogg/libogg-1.1.3.zip",downloadPath], Modified: trunk/python-ogre/scripts/MakeRelease.bat =================================================================== --- trunk/python-ogre/scripts/MakeRelease.bat 2008-09-07 11:44:46 UTC (rev 738) +++ trunk/python-ogre/scripts/MakeRelease.bat 2008-09-07 12:10:22 UTC (rev 739) @@ -19,6 +19,8 @@ xcopy ..\tools ..\..\PythonOgreRelease\tools copy ..\ThirdParty ..\..\PythonOgreRelease\ThirdParty copy ..\*.rtf ..\..\PythonOgreRelease +copy ..\ReportVersion.py ..\..\PythonOgreRelease +copy ..\Setup.py ..\..\PythonOgreRelease copy ..\COPYING ..\..\PythonOgreRelease copy ..\*.gpl ..\..\PythonOgreRelease copy ..\changelog.txt ..\..\PythonOgreRelease This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2008-09-14 00:20:36
|
Revision: 742 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=742&view=rev Author: andy_miller Date: 2008-09-14 00:20:45 +0000 (Sun, 14 Sep 2008) Log Message: ----------- Minor updates for the 1.6.0RC1 release Modified Paths: -------------- trunk/python-ogre/PythonOgreInstallCreator.iss trunk/python-ogre/ReportVersion.py trunk/python-ogre/code_generators/common_utils/ogre_properties.py trunk/python-ogre/installWarning.rtf trunk/python-ogre/setup.py Modified: trunk/python-ogre/PythonOgreInstallCreator.iss =================================================================== --- trunk/python-ogre/PythonOgreInstallCreator.iss 2008-09-10 10:36:22 UTC (rev 741) +++ trunk/python-ogre/PythonOgreInstallCreator.iss 2008-09-14 00:20:45 UTC (rev 742) @@ -30,13 +30,39 @@ WizardImageFile=compiler:WizModernImage-IS.bmp WizardSmallImageFile=compiler:WizModernSmallImage-IS.bmp VersionInfoVersion=1.6.0 + [Files] ; base files, demos and tools Source: *; DestDir: {app} Source: plugins\*; DestDir: {app}\plugins Source: tools\*; DestDir: {app}\tools -Source: demos\*; DestDir: {app}\demos; Flags: recursesubdirs -Source: docs\*; DestDir: {app}\docs; Flags: recursesubdirs +Source: docs\*; DestDir: {app}\docs +Source: ThirdParty\dxwebsetup.exe; DestDir: {app}\ThirdParty +Source: ThirdParty\vcredist_x86.exe; DestDir: {app}\ThirdParty + +Source: demos\*; DestDir: {app}\demos; +Source: demos\bullet\*; DestDir: {app}\demos\bullet; Flags: recursesubdirs +Source: demos\caelum\*; DestDir: {app}\demos\caelum; Flags: recursesubdirs +Source: demos\cegui\*; DestDir: {app}\demos\cegui; Flags: recursesubdirs +Source: demos\et\*; DestDir: {app}\demos\et; Flags: recursesubdirs +Source: demos\hydrax\*; DestDir: {app}\demos\hydrax; Flags: recursesubdirs +Source: demos\media\*; DestDir: {app}\demos\media; Flags: recursesubdirs +Source: demos\media_extra\*; DestDir: {app}\demos\media_extra; Flags: recursesubdirs +Source: demos\noise\*; DestDir: {app}\demos\noise; Flags: recursesubdirs +Source: demos\nxogre\*; DestDir: {app}\demos\nxogre; Flags: recursesubdirs +Source: demos\ode\*; DestDir: {app}\demos\ode; Flags: recursesubdirs +Source: demos\ogre\*; DestDir: {app}\demos\ogre; Flags: recursesubdirs +Source: demos\ogreal\*; DestDir: {app}\demos\ogreal; Flags: recursesubdirs +Source: demos\ogrebullet\*; DestDir: {app}\demos\ogrebullet; Flags: recursesubdirs +Source: demos\ogreforests\*; DestDir: {app}\demos\ogreforests; Flags: recursesubdirs +Source: demos\OgreNewt\*; DestDir: {app}\demos\OgreNewt; Flags: recursesubdirs +Source: demos\ogreode\*; DestDir: {app}\demos\ogreode; Flags: recursesubdirs +Source: demos\ogrepcz\*; DestDir: {app}\demos\ogrepcz; Flags: recursesubdirs +Source: demos\particleuniverse\*; DestDir: {app}\demos\particleuniverse; Flags: recursesubdirs +Source: demos\plib\*; DestDir: {app}\demos\plib; Flags: recursesubdirs +Source: demos\qgui\*; DestDir: {app}\demos\qgui; Flags: recursesubdirs +Source: demos\theora\*; DestDir: {app}\demos\theora; Flags: recursesubdirs + ; the python modules - in the event we find python Source: packages_2.5\*; DestDir: {code:GetPythonSiteDir}; Flags: recursesubdirs; Check: SelectedPython('2.5') ; the python modules again - if we don't find python we install both versions in the app directory @@ -45,8 +71,6 @@ ; I'm going to install here anyway to make updates easier... Source: packages_2.5\*; DestDir: {app}\packages_2.5; Flags: recursesubdirs -Source: ThirdParty\dxwebsetup.exe; DestDir: {app}\ThirdParty -Source: ThirdParty\vcredist_x86.exe; DestDir: {app}\ThirdParty ; ; we need to remove the .pyc files when we uninstall ; @@ -198,18 +222,18 @@ Name: {group}\Ogre Demos\Terrain; Filename: {code:GetPythonExe}; Parameters: Demo_Terrain.py; WorkingDir: {app}\Demos\Ogre Name: {group}\Ogre Demos\Textures; Filename: {code:GetPythonExe}; Parameters: Demo_TextureFX.py; WorkingDir: {app}\Demos\Ogre Name: {group}\Ogre Demos\Transparency; Filename: {code:GetPythonExe}; Parameters: Demo_Transparency.py; WorkingDir: {app}\Demos\Ogre -Name: {group}\Ogre Demos\WX Gui; Filename: {code:GetPythonExe}; Parameters: Demo_WX.py; WorkingDir: {app}\Demos\Ogre +;Name: {group}\Ogre Demos\WX Gui; Filename: {code:GetPythonExe}; Parameters: Demo_WX.py; WorkingDir: {app}\Demos\Ogre Name: {group}\GUI\CEGUI - Basic; Filename: {code:GetPythonExe}; Parameters: Demo_CEGUI_Gui.py; WorkingDir: {app}\Demos\cegui Name: {group}\GUI\CEGUI Drag and Drop; Filename: {code:GetPythonExe}; Parameters: Demo_CEGUI_DragnDrop.py; WorkingDir: {app}\Demos\cegui Name: {group}\GUI\CEGUI - Nice; Filename: {code:GetPythonExe}; Parameters: Demo_CEGUI_NewGui.py; WorkingDir: {app}\Demos\cegui Name: {group}\GUI\QuickGUI-01; Filename: {code:GetPythonExe}; Parameters: Demo_QuickGUI01.py; WorkingDir: {app}\Demos\qgui -Name: {group}\GUI\Navi; Filename: {code:GetPythonExe}; Parameters: Demo_Navi.py; WorkingDir: {app}\Demos\navi +;Name: {group}\GUI\Navi; Filename: {code:GetPythonExe}; Parameters: Demo_Navi.py; WorkingDir: {app}\Demos\navi Name: {group}\ODE Demos\Multiple Scenes; Filename: {code:GetPythonExe}; Parameters: Demo_Scenes.py; WorkingDir: {app}\Demos\OgreOde -Name: {group}\ODE Demos\Gran Turism; Filename: {code:GetPythonExe}; Parameters: GranTurismOgre.py; WorkingDir: {app}\Demos\OgreOde +Name: {group}\ODE Demos\Gran Turism; Filename: {code:GetPythonExe}; Parameters: Demo_GranTurism.py; WorkingDir: {app}\Demos\OgreOde -Name: {group}\OgreAL Demos\Basic Sound; Filename: {code:GetPythonExe}; Parameters: Demo_RenderToTexture.py; WorkingDir: {app}\Demos\OgreAL +Name: {group}\OgreAL Demos\Basic Sound; Filename: {code:GetPythonExe}; Parameters: Demo_AL_01.py; WorkingDir: {app}\Demos\OgreAL Name: {group}\OgreNewt Demos\Basics; Filename: {code:GetPythonExe}; Parameters: Demo01_TheBasics.py; WorkingDir: {app}\Demos\OgreNewt Name: {group}\OgreNewt Demos\Joints; Filename: {code:GetPythonExe}; Parameters: Demo02_Joints.py; WorkingDir: {app}\Demos\OgreNewt @@ -218,7 +242,7 @@ Name: {group}\OgreNewt Demos\Simple Vehicle; Filename: {code:GetPythonExe}; Parameters: Demo05_SimpleVehicle.py; WorkingDir: {app}\Demos\OgreNewt Name: {group}\OgreNewt Demos\Simple Buoyancy; Filename: {code:GetPythonExe}; Parameters: Demo06_SimpleBuoyancy.py; WorkingDir: {app}\Demos\OgreNewt Name: {group}\OgreNewt Demos\Custom Joints; Filename: {code:GetPythonExe}; Parameters: Demo07_CustomJoints.py; WorkingDir: {app}\Demos\OgreNewt -Name: {group}\OgreNewt Demos\Ragdoll; Filename: {code:GetPythonExe}; Parameters: Demo08_ragdoll.py; WorkingDir: {app}\Demos\OgreNewt +;Name: {group}\OgreNewt Demos\Ragdoll; Filename: {code:GetPythonExe}; Parameters: Demo08_ragdoll.py; WorkingDir: {app}\Demos\OgreNewt ;Name: {group}\Video Demos\ffmpeg Video; Filename: {code:GetPythonExe}; Parameters: Demo_Video.py; WorkingDir: {app}\Demos\ffmpeg ;Name: {group}\Video Demos\DirectShow Video; Filename: {code:GetPythonExe}; Parameters: Demo_Video.py; WorkingDir: {app}\Demos\dshow @@ -239,13 +263,14 @@ Name: {group}\Special Effects\Caelum Sky; Filename: {code:GetPythonExe}; Parameters: Demo_Caelum01.py; WorkingDir: {app}\Demos\caelum Name: {group}\Special Effects\Noise Generation; Filename: {code:GetPythonExe}; Parameters: Demo_Noise_01.py; WorkingDir: {app}\Demos\noise Name: {group}\Special Effects\Particle Universe; Filename: {code:GetPythonExe}; Parameters: Demo_Particle.py; WorkingDir: {app}\Demos\particleuniverse +Name: {group}\Special Effects\Hydrax (Ocean Effects); Filename: {code:GetPythonExe}; Parameters: Demo_Hydrax01.py; WorkingDir: {app}\Demos\hydrax Name: {group}\Uninstall Python-Ogre; Filename: {uninstallexe} Name: {group}\Python-Ogre API Documenatation; Filename: {app}\docs\Python-Ogre.chm ;Name: {group}\Python-Ogre API (Html); Filename: {app}\docs\html\index.html [Run] -Filename: {app}\ThirdParty\vcredist_x86.exe +Filename: {app}\ThirdParty\vcredist_x86.exe; Parameters: "/q" Filename: {app}\ThirdParty\dxwebsetup.exe; Description: DirectX Installer; StatusMsg: You probably NEED to update your Directx Drivers; Flags: postinstall [Code] @@ -308,14 +333,14 @@ I: Integer; begin Result := False; - ;msgbox ('Checking Supported Versions ' + Param + ' ' + IntToStr(GetArrayLength(SupportedVersions) ), mbInformation, MB_OK); + //msgbox ('Checking Supported Versions ' + Param + ' ' + IntToStr(GetArrayLength(SupportedVersions) ), mbInformation, MB_OK); for I:=0 to GetArrayLength(SupportedVersions)-1 do begin if Param = SupportedVersions[i] then begin Result := True; - ;msgbox ( 'Is a supported version ' + Param + ' (' + SupportedVersions[i] + ') ' + Param , mbInformation, MB_OK); + //msgbox ( 'Is a supported version ' + Param + ' (' + SupportedVersions[i] + ') ' + Param , mbInformation, MB_OK); end else begin - ;msgbox ( 'Not a supported version ' + Param + ' (' +SupportedVersions[i] + ') ', mbInformation, MB_OK); + //msgbox ( 'Not a supported version ' + Param + ' (' +SupportedVersions[i] + ') ', mbInformation, MB_OK); end; end; end; @@ -339,7 +364,7 @@ templ := ['','']; count := 0; RegGetSubkeyNames(HKEY_LOCAL_MACHINE, 'SOFTWARE\Python\PythonCore', Result1); - ;msgbox ( 'LOCAL MACHINE ' + InttoStr(GetArrayLength(Result1)) , mbInformation, MB_OK); + //msgbox ( 'LOCAL MACHINE ' + InttoStr(GetArrayLength(Result1)) , mbInformation, MB_OK); // if we have versions here process them for i:=0 to GetArrayLength(Result1)-1 do if IsSupportedVersion ( Result1[i] ) then begin // make sure we support it.. @@ -356,7 +381,7 @@ if count < 2 then begin // we've only found zero, or one version so far.. // OK so we should now have all the valid versions listed in LOCAL_MACHINE RegGetSubkeyNames(HKEY_CURRENT_USER, 'SOFTWARE\Python\PythonCore', Result2); - ;msgbox ( 'CURRENT_USER ' + InttoStr(GetArrayLength(Result2)) , mbInformation, MB_OK); + //msgbox ( 'CURRENT_USER ' + InttoStr(GetArrayLength(Result2)) , mbInformation, MB_OK); for i:=0 to GetArrayLength(Result2)-1 do if not FoundPythonIn ( Result2[i], tempv ) then // check we don't already know about this version if IsSupportedVersion (Result2[i]) then begin Modified: trunk/python-ogre/ReportVersion.py =================================================================== --- trunk/python-ogre/ReportVersion.py 2008-09-10 10:36:22 UTC (rev 741) +++ trunk/python-ogre/ReportVersion.py 2008-09-14 00:20:45 UTC (rev 742) @@ -3,7 +3,7 @@ # import os, sys, time, shutil import logging -import BuildModule as bm +#import BuildModule as bm #add environment to the path sys.path.append( '.' ) @@ -30,8 +30,8 @@ 'ogre.renderer.ogrepcz', 'ogre.addons.hydrax' ) # 'ogre.gui.hikari' ) - bm.setupLogging("version.info") # options.logfilename) - logger = logging.getLogger('PythonOgre.ReportVersionInfo') +# bm.setupLogging("version.info") # options.logfilename) +# logger = logging.getLogger('PythonOgre.ReportVersionInfo') for name in moduleList: # logger.info ("Attemping to import " + name ) try: @@ -49,4 +49,5 @@ print " Raw Detail : %s" % (getattr(mod, 'PythonOgreDetail__') ) # logger.info ( "Import Successful: " + basename ) except ImportError: - logger.error ( "Import failed:" + basename ) \ No newline at end of file + print "Import failed:", basename + # logger.error ( "Import failed:" + basename ) Modified: trunk/python-ogre/code_generators/common_utils/ogre_properties.py =================================================================== --- trunk/python-ogre/code_generators/common_utils/ogre_properties.py 2008-09-10 10:36:22 UTC (rev 741) +++ trunk/python-ogre/code_generators/common_utils/ogre_properties.py 2008-09-14 00:20:45 UTC (rev 742) @@ -25,6 +25,25 @@ def __init__( self ): decl_wrappers.name_based_recognizer_t.__init__( self ) + def __get_accessors( self, mem_funs ): + getters = [] + setters = [] + for mem_fun in mem_funs: + print "Checking", mem_fun + if not self.is_accessor( mem_fun ): + print "NOT ACCESSOR" + continue + elif self.is_getter( mem_fun ): + print "IS GETTER" + getters.append( mem_fun ) + elif self.is_setter( mem_fun ): + print "IS SETTER" + setters.append( mem_fun ) + else: + print "CONTINUE" + continue + return ( getters, setters ) + def check_type_compatibility( self, fget, fset ): extendedtypes=['Vector','ColourValue', 'Quaternion', 'Matrix'] if decl_wrappers.name_based_recognizer_t.check_type_compatibility( self, fget, fset ): @@ -64,11 +83,11 @@ def create_read_only_property( self, fget ): found = self.find_out_ro_prefixes( fget.name ) -# print "Prop Check", fget.name, ' ', + print "Prop Check", fget.name, ' ', if found in ( None, '' ): -# print "NO" + print "NO" return None -# print "YES" + 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/installWarning.rtf =================================================================== --- trunk/python-ogre/installWarning.rtf 2008-09-10 10:36:22 UTC (rev 741) +++ trunk/python-ogre/installWarning.rtf 2008-09-14 00:20:45 UTC (rev 742) @@ -31,7 +31,7 @@ \par }\pard\plain \ltrpar\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid1659429 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang3081\langfe2052\loch\af0\hich\af0\dbch\af13\cgrid\langnp3081\langfenp2052 { \rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid1599737\charrsid1599737 \hich\af37\dbch\af13\loch\f37 Python-Ogre is about to be installed on your system. \hich\af37\dbch\af13\loch\f37 \par -\par \hich\af37\dbch\af13\loch\f37 P\hich\af37\dbch\af13\loch\f37 lease ensure that you have }{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\insrsid1599737 \hich\af37\dbch\af13\loch\f37 Python 2.5.1}{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\insrsid1599737\charrsid1599737 +\par \hich\af37\dbch\af13\loch\f37 P\hich\af37\dbch\af13\loch\f37 lease ensure that you have }{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\insrsid1599737 \hich\af37\dbch\af13\loch\f37 Python 2.5.2}{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f37\insrsid1599737\charrsid1599737 \hich\af37\dbch\af13\loch\f37 already installed}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid1599737\charrsid1599737 \hich\af37\dbch\af13\loch\f37 \loch\af37\dbch\af13\hich\f37 \endash \hich\af37\dbch\af13\loch\f37 if \hich\af37\dbch\af13\loch\f37 not cancel the installation now and visit }{\field\flddirty{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid1599737\charrsid1599737 \hich\af37\dbch\af13\loch\f37 \hich\af37\dbch\af13\loch\f37 HYPERLINK \hich\af37\dbch\af13\loch\f37 " \hich\af37\dbch\af13\loch\f37 http://\hich\af37\dbch\af13\loch\f37 www.python.org\hich\af37\dbch\af13\loch\f37 "\hich\af37\dbch\af13\loch\f37 }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid1599737\charrsid1599737 {\*\datafield @@ -39,12 +39,12 @@ 2e006f00720067002f000000795881f43b1d7f48af2c825dc485276300000000a5ab0000}}}{\fldrslt {\rtlch\fcs1 \af1 \ltrch\fcs0 \cs16\f37\ul\cf2\insrsid1599737\charrsid1599737 \hich\af37\dbch\af13\loch\f37 http://\hich\af37\dbch\af13\loch\f37 www.python.org}}}\sectd \linex0\endnhere\sectlinegrid360\sectdefaultcl\sectrsid746239\sftnbj {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid1599737\charrsid1599737 \hich\af37\dbch\af13\loch\f37 \hich\af37\dbch\af13\loch\f37 and download the latest Python binary}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid1599737 \hich\af37\dbch\af13\loch\f37 (or directly\hich\af37\dbch\af13\loch\f37 from\hich\af37\dbch\af13\loch\f37 }{\field{\*\fldinst {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid1599737 \hich\af37\dbch\af13\loch\f37 -\hich\af37\dbch\af13\loch\f37 HYPERLINK \hich\af37\dbch\af13\loch\f37 "}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid1599737\charrsid1599737 \hich\af37\dbch\af13\loch\f37 http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi}{\rtlch\fcs1 \af1 \ltrch\fcs0 +\hich\af37\dbch\af13\loch\f37 HYPERLINK \hich\af37\dbch\af13\loch\f37 "}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid1599737\charrsid1599737 \hich\af37\dbch\af13\loch\f37 http://python.org/ftp/python/2.5.2/python-2.5.2.msi}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid1599737 \hich\af37\dbch\af13\loch\f37 "\hich\af37\dbch\af13\loch\f37 }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid1599737\charrsid13506258 {\*\datafield 00d0c9ea79f9bace118c8200aa004ba90b02000000170000003800000068007400740070003a002f002f007700770077002e0070007900740068006f006e002e006f00720067002f006600740070002f0070007900740068006f006e002f0032002e0035002e0031002f0070007900740068006f006e002d0032002e003500 2e0031002e006d00730069000000e0c9ea79f9bace118c8200aa004ba90b8800000068007400740070003a002f002f007700770077002e0070007900740068006f006e002e006f00720067002f006600740070002f0070007900740068006f006e002f0032002e0035002e0031002f0070007900740068006f006e002d0032 002e0035002e0031002e006d00730069000000795881f43b1d7f48af2c825dc485276300000000a5ab0000}}}{\fldrslt {\rtlch\fcs1 \af1 \ltrch\fcs0 \cs16\f37\ul\cf2\insrsid1599737\charrsid13506258 \hich\af37\dbch\af13\loch\f37 -http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi}}}\sectd \linex0\endnhere\sectlinegrid360\sectdefaultcl\sectrsid746239\sftnbj {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid1599737 \hich\af37\dbch\af13\loch\f37 ) +http://python.org/ftp/python/2.5.2/python-2.5.2.msi}}}\sectd \linex0\endnhere\sectlinegrid360\sectdefaultcl\sectrsid746239\sftnbj {\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid1599737 \hich\af37\dbch\af13\loch\f37 ) \par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid1599737\charrsid1599737 \par \hich\af37\dbch\af13\loch\f37 M\hich\af37\dbch\af13\loch\f37 any of the demos will be installed as start menu items}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f37\insrsid1599737 \hich\af37\dbch\af13\loch\f37 . \hich\af37\dbch\af13\loch\f37 It is likely you will most often run them from the command prompt like: Modified: trunk/python-ogre/setup.py =================================================================== --- trunk/python-ogre/setup.py 2008-09-10 10:36:22 UTC (rev 741) +++ trunk/python-ogre/setup.py 2008-09-14 00:20:45 UTC (rev 742) @@ -33,7 +33,7 @@ METADATA = { "name": "Python-Ogre", - "version": "1.1.a", + "version": "1.6.0RC1", "license": "LGPL", "url": "http://python-ogre.python-hosting.com/", "author": "Lakin Wecker, Roman Yakovenko, Andy", @@ -67,7 +67,6 @@ 'ogre.physics.bullet','ogre.physics.PhysX','ogre.physics.NxOgre', 'ogre.physics.OgreBulletC', 'ogre.physics.OgreBulletD', 'ogre.addons','ogre.addons.theora', - # 'ogre.addons.ogrevideoffmpeg', 'ogre.addons.ogredshow', 'ogre.addons.plib', # 'ogre.gui.navi', 'ogre.addons.ogreforests', 'ogre.addons.et', 'ogre.addons.caelum', 'ogre.addons.noise', 'ogre.addons.watermesh', # 'ogre.addons.ofusion', This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2008-09-18 18:11:56
|
Revision: 744 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=744&view=rev Author: andy_miller Date: 2008-09-19 01:11:49 +0000 (Fri, 19 Sep 2008) Log Message: ----------- Updates for QuickGUI source Hikari almost completed Added Hikari media and demo to the SVN Started adding descriptions etc to environment.py Fix to sampleframework due to Ogre 1.6 API changes Extended sampleframework to allow OIS flags to be passed - needed for Hikari as it wants a system mouse pointer Modified Paths: -------------- trunk/python-ogre/ChangeLog.txt trunk/python-ogre/ThirdParty/quickgui/QuickGUICharacter.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUICharacter.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIScriptReader.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIScriptReader.h trunk/python-ogre/code_generators/hikari/generate_code.py trunk/python-ogre/code_generators/hikari/hand_made_wrappers.py trunk/python-ogre/code_generators/hikari/python_hikari_sizeof.h trunk/python-ogre/environment.py trunk/python-ogre/packages_2.5/ogre/renderer/OGRE/sf_OIS.py Added Paths: ----------- trunk/python-ogre/demos/hikari/ trunk/python-ogre/demos/hikari/Demo_Hikari_01.py trunk/python-ogre/demos/hikari/media/ trunk/python-ogre/demos/hikari/media/controls.fla trunk/python-ogre/demos/hikari/media/controls.swf trunk/python-ogre/demos/hikari/media/fps.fla trunk/python-ogre/demos/hikari/media/fps.swf trunk/python-ogre/demos/hikari/resources.cfg Modified: trunk/python-ogre/ChangeLog.txt =================================================================== --- trunk/python-ogre/ChangeLog.txt 2008-09-18 03:03:32 UTC (rev 743) +++ trunk/python-ogre/ChangeLog.txt 2008-09-19 01:11:49 UTC (rev 744) @@ -1,10 +1,20 @@ -August 29 2008 : Release 1.6 RC1 -================================ +xxxx xx 2008 : Release 1.6.0 xxxx +================================== + +Updates to QuickGUI and Caelum C++ library source +Implemented Hikari demo (implemented callbacks in the wrapper generation) +Fixed code generation for QuickGui, bullet and noise to correctly generate PyDoc documentation strings +Implemented description text and description links in environment.py to help automate module summary + + + +August 29 2008 : Release 1.6.0 RC1 +================================== The Python-Ogre version numbering has changed to match the Ogre release versions along with the SVN release numbering 'Python-Ogre-<ogre version>-<SVN Version>-<Python Version>' Built using MSVC 9, DirectX August 2008, Boost 1.36.0, Py++ r1383 -** Modules Included and thier versions ** +** Modules Included and their versions ** OGRE 1.6.0RC1 OIS 1.2 CEGUI 0.6.1 Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUICharacter.cpp =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUICharacter.cpp 2008-09-18 03:03:32 UTC (rev 743) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUICharacter.cpp 2008-09-19 01:11:49 UTC (rev 744) @@ -3,6 +3,8 @@ namespace QuickGUI { + Character::Character() {}; + Character::Character(Ogre::UTFString::code_point cp, Ogre::FontPtr fp, Ogre::ColourValue cv) : codePoint(cp), fontPtr(fp), Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUICharacter.h =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUICharacter.h 2008-09-18 03:03:32 UTC (rev 743) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUICharacter.h 2008-09-19 01:11:49 UTC (rev 744) @@ -56,8 +56,8 @@ /// UV coords of glyph, retreived from Font texture generated by Ogre::Font class. UVRect uvCoords; + protected: Character(); - protected: bool mHighlighted; bool mWhiteSpace; Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIScriptReader.cpp =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIScriptReader.cpp 2008-09-18 03:03:32 UTC (rev 743) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIScriptReader.cpp 2008-09-19 01:11:49 UTC (rev 744) @@ -9,6 +9,9 @@ { new ScriptReader(); } + + ScriptReader::ScriptReader(ScriptReader const&) {}; // copy ctor is hidden + //ScriptReader::ScriptReader& operator=(ScriptReader const&) {}; // assign op is hidden ScriptReader::ScriptReader() : mBegin(false) Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIScriptReader.h =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIScriptReader.h 2008-09-18 03:03:32 UTC (rev 743) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIScriptReader.h 2008-09-19 01:11:49 UTC (rev 744) @@ -62,9 +62,9 @@ void parseScript(Ogre::DataStreamPtr &stream, const Ogre::String &groupName); // void parseScript(std::ifstream& stream, const Ogre::String& groupName); + protected: ScriptReader(ScriptReader const&); // copy ctor is hidden ScriptReader& operator=(ScriptReader const&); // assign op is hidden - protected: static ScriptReader* mSingletonPtr; Modified: trunk/python-ogre/code_generators/hikari/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/hikari/generate_code.py 2008-09-18 03:03:32 UTC (rev 743) +++ trunk/python-ogre/code_generators/hikari/generate_code.py 2008-09-19 01:11:49 UTC (rev 744) @@ -53,7 +53,9 @@ if MAIN_NAMESPACE: main_ns = global_ns.namespace( MAIN_NAMESPACE ) else: - main_ns = global_ns + main_ns = global_ns + + ## Need to review these as they will be needed... excludes = ['::Hikari::Position::left', '::Hikari::Position::top', '::Hikari::Position::position', @@ -63,6 +65,15 @@ for x in excludes: main_ns.variable(x).exclude() + excludes = ['::Hikari::FlashControl::bind' # implemented in hand_made_wrappers + ,'::Hikari::FlashControl::unbind' + +# ,'::Hikari::FlashControl::callFunction' # uses Args which we don't have a to python converter for +# remove default creator on args... + + ] + for x in excludes: + main_ns.mem_fun(x).exclude() ############################################################ ## ## And there are things that manually need to be INCLUDED @@ -106,7 +117,19 @@ def create_output( size ): return [ ft.output( i ) for i in range( size ) ] - + +# x =global_ns.mem_fun('::Hikari::FlashControl::getExtents') +# x.add_transformation(ft.inout('width'),ft.inout('height')) +# x.documentation = docit ("","width,height", "tuple - width,height") +# +# x =global_ns.mem_fun('::Hikari::FlashControl::getUVScale') +# x.add_transformation(ft.inout('uScale'),ft.inout('vScale')) +# x.documentation = docit ("","uScale,vScale", "tuple - uScale,vScale") + +# # # # x= main_ns.mem_funs('::Caelum::Astronomy::getGregorianDateFromJulianDay') +# # # # x.add_transformation( ft.output('year'), ft.output('month'), ft.output('day'), alias = 'getGregorianDateFromJulianDay' ) +# # # # x.documentation = docit ("","JulianDay", "tuple - year,month,day") + ############################################################################### ## Modified: trunk/python-ogre/code_generators/hikari/hand_made_wrappers.py =================================================================== --- trunk/python-ogre/code_generators/hikari/hand_made_wrappers.py 2008-09-18 03:03:32 UTC (rev 743) +++ trunk/python-ogre/code_generators/hikari/hand_made_wrappers.py 2008-09-19 01:11:49 UTC (rev 744) @@ -1,8 +1,72 @@ import os import environment +WRAPPER_DEFINITION_FlashControl=\ +""" +class PythonDispatcher +{ +public: + PythonDispatcher(PyObject* subscriber, ::Ogre::String const & method) + { + mSubscriber = subscriber; + mMethod = method; + } + ~PythonDispatcher() {} + Hikari::FlashValue callback ( Hikari::FlashControl* me, const Hikari::Arguments& args ) + { + Hikari::FlashValue retval ; + if (mMethod.length() > 0 ) + retval = boost::python::call_method<Hikari::FlashValue>(mSubscriber, mMethod.c_str(), + boost::ref(me), args ); + else + retval = boost::python::call<Hikari::FlashValue>(mSubscriber, + boost::ref(me), args ); + return retval; + } +private: + PyObject* mSubscriber; + std::string mMethod; +}; + +// Bind function takes name of 'flash' command, plus a python object with optional method name if it's a class + +std::map<std::string,PythonDispatcher *> m_mapDispatchers; + +int FlashControl_bind(Hikari::FlashControl & me, std::string const & pFuncName, + PyObject * subscriber, std::string const & method = "") +{ + PythonDispatcher *pDispatch = new PythonDispatcher(subscriber, method); + m_mapDispatchers[pFuncName] = pDispatch; + me.bind(pFuncName, Hikari::FlashDelegate(pDispatch, &PythonDispatcher::callback)); + return 0; +} + +int FlashControl_unbind(Hikari::FlashControl & me, std::string const & funcName) +{ + me.unbind(funcName); + std::map<std::string,PythonDispatcher *>::iterator it = m_mapDispatchers.find(funcName); + if(it != m_mapDispatchers.end()) + { + delete (*it).second; + m_mapDispatchers.erase(it); + } + return 0; +} + + +""" +WRAPPER_REGISTRATION_FlashControl = [ + """def( "bind", &::FlashControl_bind , + "Python-Ogre Helper Function: Binds a python object as the callback for a flash event\\n\\ + Input: Flash Function/Event Name, Python Callback Option, Optional method name\\n\\ + Ouput: 0" );""", + """def( "unbind", &::FlashControl_unbind , + "Python-Ogre Helper Function: Unbinds from a Flash event\\n\\ + Input: Flash Function/Event Name\\n\\ + Ouput: 0" );""" + ] ################################################################################################# ################################################################################################# @@ -11,5 +75,7 @@ class_.add_registration_code ( c ) def apply( mb ): - pass + rt = mb.class_( 'FlashControl' ) + rt.add_declaration_code( WRAPPER_DEFINITION_FlashControl ) + apply_reg (rt, WRAPPER_REGISTRATION_FlashControl ) \ No newline at end of file Modified: trunk/python-ogre/code_generators/hikari/python_hikari_sizeof.h =================================================================== --- trunk/python-ogre/code_generators/hikari/python_hikari_sizeof.h 2008-09-18 03:03:32 UTC (rev 743) +++ trunk/python-ogre/code_generators/hikari/python_hikari_sizeof.h 2008-09-19 01:11:49 UTC (rev 744) @@ -1 +1,4 @@ // sizeof ( variable ); +sizeof ( Hikari::Args ); +sizeof ( Hikari::Arguments ); + Added: trunk/python-ogre/demos/hikari/Demo_Hikari_01.py =================================================================== --- trunk/python-ogre/demos/hikari/Demo_Hikari_01.py (rev 0) +++ trunk/python-ogre/demos/hikari/Demo_Hikari_01.py 2008-09-19 01:11:49 UTC (rev 744) @@ -0,0 +1,133 @@ +# This code is in the Public Domain +# ----------------------------------------------------------------------------- +# This source file is part of Python-Ogre +# For the latest info, see http://python-ogre.org/ +# +# It is likely based on original code from OGRE and/or PyOgre +# For the latest info, see http://www.ogre3d.org/ +# +# You may use this sample code for anything you like, it is not covered by the +# LGPL. +# ----------------------------------------------------------------------------- +import sys +sys.path.insert(0,'..') +import PythonOgreConfig +import ogre.renderer.OGRE as ogre +import SampleFramework as sf +import ogre.gui.hikari as hikari +import ogre.io.OIS as ois +import os + +def TEST(caller, args): + return True + +class HikariApplication(sf.Application): + def _createScene(self): + + sceneManager = self.sceneManager + camera = self.camera + + sceneManager.ambientLight = ogre.ColourValue(0.5, 0.5, 0.5) +# sceneManager.ambientLight = ogre.ColourValue(ogre.ColourValue.White) + print ogre.ColourValue.White + sceneManager.setShadowTechnique(ogre.SHADOWTYPE_TEXTURE_ADDITIVE) + self.setupHikari() + + def setupHikari(self): + self.hikariMgr = hikari.HikariManager(".\\media") + + self.fps = self.hikariMgr.createFlashOverlay("FPS", self.viewport, 130, 91, hikari.Position(hikari.TopLeft)) + self.fps.load("fps.swf") + self.fps.setTransparent(True) + self.fps.setDraggable(False) + + self.controls = self.hikariMgr.createFlashOverlay("Controls", self.viewport, 350, 400, hikari.Position(hikari.Center)) + self.controls.load("controls.swf") + self.controls.setTransparent(True, True) + +# self.controls.bind("opacityChange", TEST,"" ) ## self, "onOpacityChange") + self.controls.bind("opacityChange", self, "onOpacityChange") + self.controls.bind("colorChange", self, "onColorChange") + self.controls.bind("exitClick", self, "onExitClick") + + + def onOpacityChange(self, caller, args): + opacityPercent = args[0].getNumber() + caller.setOpacity(opacityPercent / 100) + return hikari.FlashValue() + + def onColorChange(self, caller, args): + color = args[0].getNumberAsColor() + self.viewport.setBackgroundColour(color) + return hikari.FlashValue() + + def onExitClick(self, caller, args): + self.frameListener.shouldQuit = True + return hikari.FlashValue() + + def _createFrameListener(self): + self.frameListener = HikariListener( self ) + self.root.addFrameListener(self.frameListener) + + +class HikariListener(sf.FrameListener, ois.MouseListener, ois.KeyListener): + def __init__(self, app): + sf.FrameListener.__init__(self, app.renderWindow, app.camera, bufferedKeys = False) + ois.KeyListener.__init__(self) + ois.MouseListener.__init__(self) + self.app = app + self.Mouse.setEventCallback(self) + self.MenuMode = True # stops the mouse moving the background + self.Keyboard.setEventCallback(self) + + def mouseMoved(self,arg): + state= arg.get_state() + return self.app.hikariMgr.injectMouseMove(state.X.abs, state.Y.abs) or self.app.hikariMgr.injectMouseWheel(state.Z.rel) + + def mousePressed(self, arg, id): + return self.app.hikariMgr.injectMouseDown(id) + + def mouseReleased(self, arg, id): + return self.app.hikariMgr.injectMouseUp(id) + + def keyPressed( self, arg): + if self.app.hikariMgr.isAnyFocused(): + return True + return False + + def keyReleased ( self, arg ): + k = arg.key + if k == ois.KC_ESCAPE: + self.shouldQuit = True + elif k == ois.KC_F2: + self.app.sceneManager.getRootSceneNode().flipVisibility(True) + return True + + + def _inputSystemParameters (self ): + """ the demo needs the system mouse + """ + if os.name == 'nt': + print "NT" + return [("w32_mouse","DISCL_FOREGROUND"), ("w32_mouse", "DISCL_NONEXCLUSIVE")] + else: + return [("x11_mouse_grab","false"), ("x11_mouse_hide", "false")] ## untested + + + def frameStarted(self, frameEvent): + self.app.hikariMgr.update() +# root.renderOneFrame() +# Ogre::WindowEventUtilities::messagePump() + + stats = self.renderWindow.getStatistics() + self.app.fps.callFunction("setFPS", hikari.Args(hikari.FlashValue(stats.lastFPS) )) + return sf.FrameListener.frameStarted(self, frameEvent) + + + +if __name__ == '__main__': + try: + application = HikariApplication() + application.go() + except ogre.OgreException, e: + print e Property changes on: trunk/python-ogre/demos/hikari/media/controls.fla ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Property changes on: trunk/python-ogre/demos/hikari/media/controls.swf ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Property changes on: trunk/python-ogre/demos/hikari/media/fps.fla ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Property changes on: trunk/python-ogre/demos/hikari/media/fps.swf ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/hikari/resources.cfg =================================================================== --- trunk/python-ogre/demos/hikari/resources.cfg (rev 0) +++ trunk/python-ogre/demos/hikari/resources.cfg 2008-09-19 01:11:49 UTC (rev 744) @@ -0,0 +1,24 @@ +[Bootstrap] +Zip=../media/packs/OgreCore.zip + +# Resource locations to be added to the default path +[General] +FileSystem=../media +FileSystem=../media/fonts +FileSystem=../media/sounds +FileSystem=../media/Audio +FileSystem=../media/materials/programs +FileSystem=../media/materials/scripts +FileSystem=../media/materials/textures +FileSystem=../media/models +FileSystem=../media/overlays +FileSystem=../media/particle +FileSystem=../media/gui +Zip=../media/packs/cubemap.zip +Zip=../media/packs/cubemapsJS.zip +Zip=../media/packs/dragon.zip +Zip=../media/packs/fresneldemo.zip +Zip=../media/packs/ogretestmap.zip +Zip=../media/packs/skybox.zip + +FileSystem=./media Modified: trunk/python-ogre/environment.py =================================================================== --- trunk/python-ogre/environment.py 2008-09-18 03:03:32 UTC (rev 743) +++ trunk/python-ogre/environment.py 2008-09-19 01:11:49 UTC (rev 744) @@ -1545,6 +1545,7 @@ CCFLAGS = ' -D_PRECOMP ' ModuleName = 'OgreBulletD' CheckIncludes=['boost/python.hpp', 'Ogre.h'] + descText = "Ogre Bullet Dynamics (physics) implementation" class noise: active = True @@ -1563,6 +1564,7 @@ CheckIncludes=[] libs=[ boost.lib] ModuleName="noise" + descText = "Generate 'noise'" class watermesh: active = True @@ -1581,6 +1583,7 @@ CheckIncludes=[] libs=[ boost.lib, 'OgreMain' ] ModuleName="watermesh" + descText = "C++ code from Ogre Water demo -- use Hydrax instead" class ofusion: active = True @@ -1599,6 +1602,7 @@ CheckIncludes=[] libs=[ boost.lib, 'OgreMain' ] ModuleName="ofusion" + descText = "Import Ogre 'Scenes' from 3dMax using the ofusion exporter" class cadunetree: active = True @@ -1616,7 +1620,8 @@ ] CheckIncludes=[] libs=[ boost.lib, 'OgreMain' ] - ModuleName="cadunetree" + ModuleName="cadunetree" + descText = "Generate realistic trees" class ogrepcz: active = True @@ -1634,7 +1639,8 @@ ] CheckIncludes=[] libs=[ boost.lib, 'Plugin_PCZSceneManager', 'OgreMain' ] - ModuleName="ogrepcz" + ModuleName="ogrepcz" + descText = "Portal SceneManager - seamlessly move from interior to exterior scene management" class opensteer: active = False @@ -1670,7 +1676,8 @@ ] CheckIncludes=[] libs=[ boost.lib, 'OgreMain' ] - ModuleName="hydrax" + ModuleName="hydrax" + descText = "Fantastic water/ocean effects" class hikari: active = True @@ -1690,6 +1697,8 @@ CheckIncludes=[] libs=[ boost.lib, 'OgreMain', 'hikari' ] ModuleName="hikari" + descText = "Use Flash controls within Ogre" + descLink = "http://hikari-library.googlecode.com/" ############################################################################################ Modified: trunk/python-ogre/packages_2.5/ogre/renderer/OGRE/sf_OIS.py =================================================================== --- trunk/python-ogre/packages_2.5/ogre/renderer/OGRE/sf_OIS.py 2008-09-18 03:03:32 UTC (rev 743) +++ trunk/python-ogre/packages_2.5/ogre/renderer/OGRE/sf_OIS.py 2008-09-19 01:11:49 UTC (rev 744) @@ -219,12 +219,16 @@ self.translateVector = ogre.Vector3(0.0,0.0,0.0) self.filtering = ogre.TFO_BILINEAR self.showDebugOverlay(True) + self.rotateSpeed = ogre.Degree(36) self.moveSpeed = 100.0 self.rotationSpeed = 8.0 self.displayCameraDetails = False self.bufferedKeys = bufferedKeys self.bufferedMouse = bufferedMouse + self.rotationX = ogre.Degree(0.0) + self.rotationY = ogre.Degree(0.0) self.bufferedJoy = bufferedJoy + self.shouldQuit = False # set to True to exit.. self.MenuMode = False # lets understand a simple menu function ## we can tell if we are using OgreRefapp based upon the camera class @@ -237,7 +241,12 @@ def __del__ (self ): ogre.WindowEventUtilities.removeWindowEventListener(self.renderWindow, self) self.windowClosed(self.renderWindow) - + + def _inputSystemParameters (self ): + """ ovreride to extend any OIS system parameters + """ + return [] + def _setupInput(self): # ignore buffered input @@ -252,8 +261,10 @@ else: windowHnd = self.renderWindow.getCustomAttributeInt("WINDOW") - self.InputManager = \ - OIS.createPythonInputSystem([("WINDOW",str(windowHnd))]) + t= self._inputSystemParameters() + params = [("WINDOW",str(windowHnd))] + params.extend(t) + self.InputManager = OIS.createPythonInputSystem( params ) #pl = OIS.ParamList() #windowHndStr = str ( windowHnd) @@ -301,22 +312,52 @@ OIS.InputManager.destroyInputSystem(self.InputManager) self.InputManager=None + + ## NOTE the in Ogre 1.6 (1.7) this is changed to frameRenderingQueued !!! def frameRenderingQueued ( self, evt ): - return True - - def frameStarted(self, frameEvent): - if(self.renderWindow.isClosed()): + if(self.renderWindow.isClosed() or self.shouldQuit ): return False - ##Need to capture/update each device - this will also trigger any listeners self.Keyboard.capture() self.Mouse.capture() + buffJ = True if( self.Joy ): self.Joy.capture() + buffJ = self.Joy.buffered() + + ##Check if one of the devices is not buffered + if self.Mouse.buffered() or self.Keyboard.buffered() or not buffJ : + ## one of the input modes is immediate, so setup what is needed for immediate movement + if self.timeUntilNextToggle >= 0: + self.timeUntilNextToggle -= evt.timeSinceLastFrame + + ## Move about 100 units per second + self.moveScale = self.moveSpeed * evt.timeSinceLastFrame + ## Take about 10 seconds for full rotation + self.rotScale = self.rotateSpeed * evt.timeSinceLastFrame + + self.rotationX = ogre.Degree(0.0) + self.rotationY = ogre.Degree(0.0) + self.translateVector = ogre.Vector3.ZERO + + ##Check to see which device is not buffered, and handle it + if not self.Keyboard.buffered(): + if self._processUnbufferedKeyInput(evt) == False: + return False + if not self.Mouse.buffered(): + if self._processUnbufferedMouseInput(evt) == False: + return False + + if not self.Mouse.buffered() or not self.Keyboard.buffered() or not buffJ: + self._moveCamera() + + return True + + + def frameStarted(self, frameEvent): + return True - ##bool buffJ = (mJoy) ? mJoy->buffered() : true; - if self.timeUntilNextToggle >= 0: self.timeUntilNextToggle -= frameEvent.timeSinceLastFrame This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2008-09-18 23:38:58
|
Revision: 745 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=745&view=rev Author: andy_miller Date: 2008-09-19 06:39:09 +0000 (Fri, 19 Sep 2008) Log Message: ----------- Final fix (for the moment) for Hikari -- seems to work OK Modified Paths: -------------- trunk/python-ogre/ChangeLog.txt trunk/python-ogre/code_generators/hikari/generate_code.py Modified: trunk/python-ogre/ChangeLog.txt =================================================================== --- trunk/python-ogre/ChangeLog.txt 2008-09-19 01:11:49 UTC (rev 744) +++ trunk/python-ogre/ChangeLog.txt 2008-09-19 06:39:09 UTC (rev 745) @@ -5,6 +5,8 @@ Implemented Hikari demo (implemented callbacks in the wrapper generation) Fixed code generation for QuickGui, bullet and noise to correctly generate PyDoc documentation strings Implemented description text and description links in environment.py to help automate module summary +Changes to SampleFramework - additional function (_inputSystemParameters ) to pass parameters to OIS setup - see Hikari demo +Changes to SampleFramework - Move code from frameStarted to frameRenderingQueue Modified: trunk/python-ogre/code_generators/hikari/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/hikari/generate_code.py 2008-09-19 01:11:49 UTC (rev 744) +++ trunk/python-ogre/code_generators/hikari/generate_code.py 2008-09-19 06:39:09 UTC (rev 745) @@ -68,9 +68,6 @@ excludes = ['::Hikari::FlashControl::bind' # implemented in hand_made_wrappers ,'::Hikari::FlashControl::unbind' -# ,'::Hikari::FlashControl::callFunction' # uses Args which we don't have a to python converter for -# remove default creator on args... - ] for x in excludes: main_ns.mem_fun(x).exclude() @@ -98,6 +95,10 @@ main_ns = global_ns.namespace( MAIN_NAMESPACE ) else: main_ns = global_ns + + # remove default creator on args... + c = main_ns.mem_fun( '::Hikari::FlashControl::callFunction' ) + c.arguments[1].default_value = "" ############################################################ ## This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2008-09-21 01:07:01
|
Revision: 748 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=748&view=rev Author: andy_miller Date: 2008-09-21 01:06:49 +0000 (Sun, 21 Sep 2008) Log Message: ----------- Changes for Linux unstable -- Ogre 1.6.0RC1 and Boost 1_36 support Modified Paths: -------------- trunk/python-ogre/PythonOgreConfig_posix.py trunk/python-ogre/boost/Makefile trunk/python-ogre/code_generators/bullet/customization_data.py trunk/python-ogre/code_generators/bullet/python_bullet.h trunk/python-ogre/environment.py Modified: trunk/python-ogre/PythonOgreConfig_posix.py =================================================================== --- trunk/python-ogre/PythonOgreConfig_posix.py 2008-09-19 09:55:35 UTC (rev 747) +++ trunk/python-ogre/PythonOgreConfig_posix.py 2008-09-21 01:06:49 UTC (rev 748) @@ -70,7 +70,7 @@ PATH_NxOgre= os.path.join(PATH_THIRDPARTY, 'nxogre') PATH_NxOgre_09= os.path.join(PATH_THIRDPARTY, 'nxogre_0.9') # PATH_NxOgre= os.path.join(BASE_DIR, 'nxogre/NxOgre') -PATH_Bullet= os.path.join(BASE_DIR, 'bullet-2.66') +PATH_Bullet= os.path.join(BASE_DIR, 'bullet-2.69') ###PATH_PhysX= os.path.join(BASE_DIR, 'Physx/v2.7.3/SDKs') PATH_Theora= os.path.join(PATH_OgreAddons,'videoplugin','TheoraVideo') PATH_ffmpeg= os.path.join(BASE_DIR, 'ffmpeg') Modified: trunk/python-ogre/boost/Makefile =================================================================== --- trunk/python-ogre/boost/Makefile 2008-09-19 09:55:35 UTC (rev 747) +++ trunk/python-ogre/boost/Makefile 2008-09-21 01:06:49 UTC (rev 748) @@ -8,6 +8,8 @@ CXXFLAGS=-g \ -I. \ -I/usr/include/python${PYTHON_VERSION} \ + -I${PREFIX}/include/ \ + -I${PREFIX}/include/boost-${BOOST_VERSION_PATH} \ -shared \ -Wl,-soname,libboost_python_index-gcc${GCC_VERSION}-${BOOST_VERSION}.so \ -o libboost_python_index-gcc${GCC_VERSION}-${MT_VERSION}${BOOST_VERSION}.so -fPIC \ @@ -31,15 +33,15 @@ install: @make version - mkdir -p ${PREFIX}/usr/lib - @echo cp libboost_python_index-gcc${GCC_VERSION}-${MT_VERSION}${BOOST_VERSION}.so ${PREFIX}/usr/lib - @cp libboost_python_index-gcc${GCC_VERSION}-${MT_VERSION}${BOOST_VERSION}.so ${PREFIX}/usr/lib - @echo ln -sf /usr/lib/libboost_python_index-gcc${GCC_VERSION}-${MT_VERSION}${BOOST_VERSION}.so ${PREFIX}/usr/lib/libboost_python_index.so - @ln -sf /usr/lib/libboost_python_index-gcc${GCC_VERSION}-${MT_VERSION}${BOOST_VERSION}.so ${PREFIX}/usr/lib/libboost_python_index.so + mkdir -p ${PREFIX}/lib + @echo cp libboost_python_index-gcc${GCC_VERSION}-${MT_VERSION}${BOOST_VERSION}.so ${PREFIX}/lib + @cp libboost_python_index-gcc${GCC_VERSION}-${MT_VERSION}${BOOST_VERSION}.so ${PREFIX}/lib + @echo ln -sf /usr/lib/libboost_python_index-gcc${GCC_VERSION}-${MT_VERSION}${BOOST_VERSION}.so ${PREFIX}/lib/libboost_python_index.so + @ln -sf /usr/lib/libboost_python_index-gcc${GCC_VERSION}-${MT_VERSION}${BOOST_VERSION}.so ${PREFIX}/lib/libboost_python_index.so - mkdir -p ${PREFIX}/usr/include - cp -rvf boost ${PREFIX}/usr/include - rm -rf `find ${PREFIX}/usr/include -name .svn -type d` + mkdir -p ${PREFIX}/include + cp -rvf boost ${PREFIX}/include + rm -rf `find ${PREFIX}/include -name .svn -type d` clean: rm *.so Modified: trunk/python-ogre/code_generators/bullet/customization_data.py =================================================================== --- trunk/python-ogre/code_generators/bullet/customization_data.py 2008-09-19 09:55:35 UTC (rev 747) +++ trunk/python-ogre/code_generators/bullet/customization_data.py 2008-09-21 01:06:49 UTC (rev 748) @@ -1,6 +1,7 @@ def header_files( version ): - return [ 'btBulletDynamicsCommon.h' + return [ 'btBulletDynamicsCommon.h' + ,'btBulletCollisionCommon.h' ,'LinearMath/btStackAlloc.h' ,'LinearMath/btPoolAllocator.h' ,'BulletCollision/CollisionDispatch/btSimulationIslandManager.h' @@ -8,4 +9,4 @@ def huge_classes( version ): return [] - \ No newline at end of file + Modified: trunk/python-ogre/code_generators/bullet/python_bullet.h =================================================================== --- trunk/python-ogre/code_generators/bullet/python_bullet.h 2008-09-19 09:55:35 UTC (rev 747) +++ trunk/python-ogre/code_generators/bullet/python_bullet.h 2008-09-21 01:06:49 UTC (rev 748) @@ -1,7 +1,9 @@ #undef _MSC_VER -#include "btBulletDynamicsCommon.h" +#include "btBulletDynamicsCommon.h" +#include "btBulletCollisionCommon.h" + #include "LinearMath/btStackAlloc.h" #include "LinearMath/btPoolAllocator.h" #include "BulletCollision/CollisionDispatch/btSimulationIslandManager.h" Modified: trunk/python-ogre/environment.py =================================================================== --- trunk/python-ogre/environment.py 2008-09-19 09:55:35 UTC (rev 747) +++ trunk/python-ogre/environment.py 2008-09-21 01:06:49 UTC (rev 748) @@ -464,7 +464,8 @@ if _STABLE: base = 'boost_1_34_1' else: - base = 'boost_1_37' + base = 'boost_1_36_0' + versionBase = '1_36' ## the version used on the library name if isLinux() or isMac(): bjambase = 'boost-jam-3.1.16' @@ -513,7 +514,8 @@ [0,'sed -i s/"# include <boost\/preprocessor\/cat.hpp>"/"\\n#define BOOST_PYTHON_NO_PY_SIGNATURES\\n# include <boost\/preprocessor\/cat.hpp>"/ '+base+'/boost/python/detail/preprocessor.hpp', '' ], [0,'sed -i s/BJAM_CONFIG=\"\"/BJAM_CONFIG=release/ '+base+'/boost/python/detail/preprocessor.hpp', '' ], [0,os.path.join(os.getcwd(), bjambase, "bjam.exe") + ' release --with-python ',os.path.join(os.getcwd(),base)] # --toolset=msvc-8 - ] + ] + if not isWindows(): # Figure out the gcc version we are running - this is needed by Boost # FIXME: This assumes that the gcc we are building with now was what we built boost with @@ -522,18 +524,18 @@ import re gcc_version = re.search(r'([0-9]+?\.[0-9]+?\.[0-9]+?)', gccp.communicate()[0]).groups()[0].split('.') # FIXME: Should this be the multithreaded version!? - lib = "boost_python-gcc%s%s-mt-%s" % (gcc_version[0], gcc_version[1], base[6:]) + lib = "boost_python-gcc%s%s-mt-%s" % (gcc_version[0], gcc_version[1], versionBase) class boost_python_index: """ only used for Linx """ - active = True - source_version = boost.base[6:].replace("_",".") + active = True + source_version = boost.versionBase.replace("_",".") pythonModule = False ModuleName = "" base = "libboost-python%s-index" % source_version #.replace(".", "_") if isLinux() or isMac(): - FLAGS = "PREFIX=%s BOOST_VERSION=%s MT=True" % (PREFIX, source_version) + FLAGS = "PREFIX=%s BOOST_VERSION=%s BOOST_VERSION_PATH=%s MT=True" % (PREFIX, boost.versionBase,boost.versionBase) source = [ ["rm","-rf %s" % (base,), os.getcwd()], ["cp",'-rvf %s/ %s' % (os.path.join('python-ogre','boost'), base), os.getcwd()], @@ -616,11 +618,29 @@ if _STABLE: version = "1.4" base = "ogre-v1-4-9" + buildCmds = [ + [0, tar + " jxf " + os.path.join(downloadPath,base)+".tar.bz2 --overwrite",os.getcwd() ], + [0, "patch -s -N -i ./python-ogre/patch/ogre.patch -p0 ", os.getcwd()], + [0, "aclocal", os.path.join(os.getcwd(), 'ogre')], + [0, "./bootstrap", os.path.join(os.getcwd(), 'ogre')], + [0, "./configure --prefix=%s --with-gui=Xt --disable-devil" % PREFIX, os.path.join(os.getcwd(), 'ogre')], + [0, "make", os.path.join(os.getcwd(), 'ogre')], + [0, "make install", os.path.join(os.getcwd(), 'ogre')], + ] else: - version = "1.6" + version = "1.6.0RC1" base = "ogre-v1-6-0RC1" - - libs=[boost.lib, boost_python_index.lib, 'OgreMain'] + buildCmds = [ + [0, tar + " jxf " + os.path.join(downloadPath,base)+".tar.bz2 --overwrite",os.getcwd() ], + [0, "patch -s -N -i ./python-ogre/patch/ogre_1.6.0RC1.patch -p0 ", os.getcwd()], + [0, "aclocal", os.path.join(os.getcwd(), 'ogre')], + [0, "./bootstrap", os.path.join(os.getcwd(), 'ogre')], + [0, "./configure --prefix=%s --with-gui=Xt --disable-devil" % PREFIX, os.path.join(os.getcwd(), 'ogre')], + [0, "make", os.path.join(os.getcwd(), 'ogre')], + [0, "make install", os.path.join(os.getcwd(), 'ogre')], + ] + libs=[boost.lib, 'OgreMain'] + libs.append ( boost_python_index.lib ) lib_dirs=[Config.LOCAL_LIB] include_dirs=[Config.PATH_Boost, Config.PATH_INCLUDE_Ogre] CCFLAGS = ' -DBOOST_PYTHON_MAX_ARITY=19' @@ -628,15 +648,7 @@ source = [ [wget, "http://downloads.sourceforge.net/ogre/"+base+".tar.bz2",downloadPath], ] - buildCmds = [ - [0, tar + " jxf " + os.path.join(downloadPath,base)+".tar.bz2 --overwrite",os.getcwd() ], - [0, "patch -s -N -i ./python-ogre/patch/ogre.patch -p0 ", os.getcwd()], - [0, "aclocal", os.path.join(os.getcwd(), 'ogre')], - [0, "./bootstrap", os.path.join(os.getcwd(), 'ogre')], - [0, "./configure --prefix=%s --with-gui=Xt --disable-devil" % PREFIX, os.path.join(os.getcwd(), 'ogre')], - [0, "make", os.path.join(os.getcwd(), 'ogre')], - [0, "make install", os.path.join(os.getcwd(), 'ogre')], - ] + elif isMac(): version = "1.6.0RC1" @@ -1457,8 +1469,14 @@ baseDir = os.path.join(os.getcwd(), base) parent = "ogre/physics" libs=[boost.lib, 'LibBulletCollision', 'LibBulletDynamics'] - if os.name == 'nt': - libs.append('libbulletmath') + if isWindows(): + libs.append('libbulletmath') + else: + libs.append('LibLinearMath') + libs.append('LibBulletSoftBody') + libs.append('LibBulletColladaConverter') + libs.append('LibBulletMultiThreaded') + lib_dirs = [ Config.PATH_LIB_Boost , Config.PATH_LIB_Bullet ] @@ -1498,7 +1516,9 @@ 'LibBulletCollision', 'LibBulletDynamics' ] if isWindows(): - libs.append('LibBulletMath') + libs.append('libbulletmath') + else: + libs.append('LibLinearMath') include_dirs = [Config.PATH_Boost , Config.PATH_INCLUDE_Bullet , os.path.join(Config.PATH_OgreBullet, 'Collisions' ) @@ -1527,7 +1547,9 @@ 'LibBulletCollision', 'LibBulletDynamics' ] if isWindows(): - libs.append('LibBulletMath') + libs.append('libbulletmath') + else: + libs.append('LibLinearMath') include_dirs = [Config.PATH_Boost , Config.PATH_INCLUDE_Bullet , os.path.join(Config.PATH_OgreBullet, 'Collisions' ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2008-10-05 07:09:43
|
Revision: 753 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=753&view=rev Author: andy_miller Date: 2008-10-05 07:08:22 +0000 (Sun, 05 Oct 2008) Log Message: ----------- Changed all code generation modules to use the common_code Auto_Functional_Transformation function Fix auto transform funtion to not wrap reference arguments that are const (bug) Fix auto transform funtion to handle extern free functions Removed 'asClassType' functions as they didn't actually do anything (and are not needed) Added PSSM camera functionality - it was missing from the sizeof.h file Added helper functions to OgreODE as constructors needed hand wrapping Fix to Py++ to handle bool/int references correctly (renderQueueListener functions) Simplified Ogre patch file requirements due to fix in Py++ for bool refs Fixed a couple of incorrect versions in environment.py Added opensteer source code and inital wrapper -- not done yet Modified Paths: -------------- trunk/python-ogre/ChangeLog.txt trunk/python-ogre/PythonOgreConfig_nt.py trunk/python-ogre/ThirdParty/Hydrax/Hydrax.h trunk/python-ogre/ThirdParty/caelum/CaelumPrerequisites.h trunk/python-ogre/ThirdParty/caelum/FlatCloudLayer.cpp trunk/python-ogre/ThirdParty/caelum/FlatCloudLayer.h trunk/python-ogre/ThirdParty/caelum/SkyLight.cpp trunk/python-ogre/ThirdParty/forests/BatchedGeometry.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIManager.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIManager.h trunk/python-ogre/code_generators/bullet/generate_code.py trunk/python-ogre/code_generators/cadunetree/generate_code.py trunk/python-ogre/code_generators/caelum/generate_code.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/et/generate_code.py trunk/python-ogre/code_generators/hikari/generate_code.py trunk/python-ogre/code_generators/hydrax/generate_code.py trunk/python-ogre/code_generators/noise/generate_code.py trunk/python-ogre/code_generators/nxogre/generate_code.py trunk/python-ogre/code_generators/ode/generate_code.py trunk/python-ogre/code_generators/ofusion/generate_code.py trunk/python-ogre/code_generators/ogre/generate_code.py trunk/python-ogre/code_generators/ogre/hand_made_wrappers.py trunk/python-ogre/code_generators/ogre/python_ogre_aliases.h trunk/python-ogre/code_generators/ogre/python_ogre_sizeof.h trunk/python-ogre/code_generators/ogreal/generate_code.py trunk/python-ogre/code_generators/ogrebulletc/generate_code.py trunk/python-ogre/code_generators/ogrebulletd/generate_code.py trunk/python-ogre/code_generators/ogreforests/generate_code.py trunk/python-ogre/code_generators/ogreode/generate_code.py trunk/python-ogre/code_generators/ogreode/hand_made_wrappers.py trunk/python-ogre/code_generators/ogrepcz/generate_code.py trunk/python-ogre/code_generators/ois/generate_code.py trunk/python-ogre/code_generators/particleuniverse/generate_code.py trunk/python-ogre/code_generators/quickgui/generate_code.py trunk/python-ogre/code_generators/watermesh/generate_code.py trunk/python-ogre/demos/ogre/Demo_CameraTracking.py trunk/python-ogre/demos/ogre/Demo_Shadows.py trunk/python-ogre/demos/ogre/Demo_SkeletalAnimation.py trunk/python-ogre/demos/ogre/tests/Test_RenderQueue.py trunk/python-ogre/demos/ogre/tests/Test_TextureGetByName.py trunk/python-ogre/demos/ogrebullet/Demo_OgreCollision01.py trunk/python-ogre/environment.py Added Paths: ----------- trunk/python-ogre/ThirdParty/opensteer/Camera.cpp trunk/python-ogre/ThirdParty/opensteer/Clock.cpp trunk/python-ogre/ThirdParty/opensteer/Color.cpp trunk/python-ogre/ThirdParty/opensteer/Obstacle.cpp trunk/python-ogre/ThirdParty/opensteer/OldPathway.cpp trunk/python-ogre/ThirdParty/opensteer/OpenSteer/ trunk/python-ogre/ThirdParty/opensteer/OpenSteer/AbstractVehicle.h trunk/python-ogre/ThirdParty/opensteer/OpenSteer/Annotation.h trunk/python-ogre/ThirdParty/opensteer/OpenSteer/Camera.h trunk/python-ogre/ThirdParty/opensteer/OpenSteer/Clock.h trunk/python-ogre/ThirdParty/opensteer/OpenSteer/Color.h trunk/python-ogre/ThirdParty/opensteer/OpenSteer/LocalSpace.h trunk/python-ogre/ThirdParty/opensteer/OpenSteer/Obstacle.h trunk/python-ogre/ThirdParty/opensteer/OpenSteer/OldPathway.h trunk/python-ogre/ThirdParty/opensteer/OpenSteer/Path.h trunk/python-ogre/ThirdParty/opensteer/OpenSteer/Pathway.h trunk/python-ogre/ThirdParty/opensteer/OpenSteer/PolylineSegmentedPath.h trunk/python-ogre/ThirdParty/opensteer/OpenSteer/PolylineSegmentedPathwaySegmentRadii.h trunk/python-ogre/ThirdParty/opensteer/OpenSteer/PolylineSegmentedPathwaySingleRadius.h trunk/python-ogre/ThirdParty/opensteer/OpenSteer/Proximity.h trunk/python-ogre/ThirdParty/opensteer/OpenSteer/QueryPathAlike.h trunk/python-ogre/ThirdParty/opensteer/OpenSteer/QueryPathAlikeBaseDataExtractionPolicies.h trunk/python-ogre/ThirdParty/opensteer/OpenSteer/QueryPathAlikeMappings.h trunk/python-ogre/ThirdParty/opensteer/OpenSteer/QueryPathAlikeUtilities.h trunk/python-ogre/ThirdParty/opensteer/OpenSteer/SegmentedPath.h trunk/python-ogre/ThirdParty/opensteer/OpenSteer/SegmentedPathAlikeUtilities.h trunk/python-ogre/ThirdParty/opensteer/OpenSteer/SegmentedPathway.h trunk/python-ogre/ThirdParty/opensteer/OpenSteer/SharedPointer.h trunk/python-ogre/ThirdParty/opensteer/OpenSteer/SimpleVehicle.h trunk/python-ogre/ThirdParty/opensteer/OpenSteer/StandardTypes.h trunk/python-ogre/ThirdParty/opensteer/OpenSteer/SteerLibrary.h trunk/python-ogre/ThirdParty/opensteer/OpenSteer/UnusedParameter.h trunk/python-ogre/ThirdParty/opensteer/OpenSteer/Utilities.h trunk/python-ogre/ThirdParty/opensteer/OpenSteer/Vec3.h trunk/python-ogre/ThirdParty/opensteer/OpenSteer/Vec3Utilities.h trunk/python-ogre/ThirdParty/opensteer/OpenSteer/lq.h trunk/python-ogre/ThirdParty/opensteer/Path.cpp trunk/python-ogre/ThirdParty/opensteer/Pathway.cpp trunk/python-ogre/ThirdParty/opensteer/PolylineSegmentedPath.cpp trunk/python-ogre/ThirdParty/opensteer/PolylineSegmentedPathwaySegmentRadii.cpp trunk/python-ogre/ThirdParty/opensteer/PolylineSegmentedPathwaySingleRadius.cpp trunk/python-ogre/ThirdParty/opensteer/SegmentedPath.cpp trunk/python-ogre/ThirdParty/opensteer/SegmentedPathway.cpp trunk/python-ogre/ThirdParty/opensteer/SimpleVehicle.cpp trunk/python-ogre/ThirdParty/opensteer/Vec3.cpp trunk/python-ogre/ThirdParty/opensteer/Vec3Utilities.cpp trunk/python-ogre/ThirdParty/opensteer/lq.c trunk/python-ogre/code_generators/opensteer/ trunk/python-ogre/code_generators/opensteer/customization_data.py trunk/python-ogre/code_generators/opensteer/generate_code.py trunk/python-ogre/code_generators/opensteer/hand_made_wrappers.py trunk/python-ogre/code_generators/opensteer/python_opensteer.h trunk/python-ogre/code_generators/opensteer/python_opensteer_aliases.h trunk/python-ogre/code_generators/opensteer/python_opensteer_sizeof.h trunk/python-ogre/patch/ogre_1.6.0RC2.patch trunk/python-ogre/scripts/MakeOgrePatch.bat trunk/python-ogre/scripts/ogre.excludes Modified: trunk/python-ogre/ChangeLog.txt =================================================================== --- trunk/python-ogre/ChangeLog.txt 2008-09-29 05:02:26 UTC (rev 752) +++ trunk/python-ogre/ChangeLog.txt 2008-10-05 07:08:22 UTC (rev 753) @@ -1,6 +1,15 @@ xxxx xx 2008 : Release 1.6.0 xxxx ================================== - +Changed all code generation modules to use the common_code Auto_Functional_Transformation function +Fix auto transform funtion to not wrap reference arguments that are const (bug) +Fix auto transform funtion to handle extern free functions +Removed 'asClassType' functions as they didn't actually do anything (and are not needed) +Added PSSM camera functionality - it was missing from the sizeof.h file +Added helper functions to OgreODE as constructors needed hand wrapping +Fix to Py++ to handle bool/int references correctly (renderQueueListener functions) +Simplified Ogre patch file requirements due to fix in Py++ for bool refs +Fixed a couple of incorrect versions in environment.py +Added opensteer source code and inital wrapper -- not done yet Updates to QuickGUI and Caelum C++ library source Implemented Hikari demo (implemented callbacks in the wrapper generation) Fixed code generation for QuickGui, bullet and noise to correctly generate PyDoc documentation strings Modified: trunk/python-ogre/PythonOgreConfig_nt.py =================================================================== --- trunk/python-ogre/PythonOgreConfig_nt.py 2008-09-29 05:02:26 UTC (rev 752) +++ trunk/python-ogre/PythonOgreConfig_nt.py 2008-10-05 07:08:22 UTC (rev 753) @@ -30,7 +30,7 @@ # We need to know where to find gccxml...... gccxml_bin = os.path.join(BASE_DIR, 'gccxml/bin/release/gccxml.exe') # and the Py++ directory as sometimes we need access to the code repository there -pyplusplus_install_dir = os.path.join(BASE_DIR, 'pygccxml') +pyplusplus_install_dir = os.path.join(BASE_DIR, 'pyplusplus') ## Parent directories of the libraries PATH_THIRDPARTY = os.path.join(module_dir, 'ThirdParty' ) Modified: trunk/python-ogre/ThirdParty/Hydrax/Hydrax.h =================================================================== --- trunk/python-ogre/ThirdParty/Hydrax/Hydrax.h 2008-09-29 05:02:26 UTC (rev 752) +++ trunk/python-ogre/ThirdParty/Hydrax/Hydrax.h 2008-10-05 07:08:22 UTC (rev 753) @@ -537,7 +537,7 @@ public: /** Called at the start of the queue */ - bool renderQueueStarted(Ogre::uint8 queueGroupId, const Ogre::String &invocation, bool skipThisInvocation) + void renderQueueStarted(Ogre::uint8 queueGroupId, const Ogre::String &invocation, bool &skipThisInvocation) { if ((queueGroupId == Ogre::RENDER_QUEUE_SKIES_EARLY || queueGroupId == Ogre::RENDER_QUEUE_SKIES_LATE) && mActive) @@ -545,12 +545,11 @@ mHydrax->getCamera()->disableCustomNearClipPlane(); Ogre::Root::getSingleton().getRenderSystem()->_setProjectionMatrix(mHydrax->getCamera()->getProjectionMatrixRS()); } - return skipThisInvocation; } /** Called on the end of the queue */ - bool renderQueueEnded(Ogre::uint8 queueGroupId, const Ogre::String &invocation, bool skipThisInvocation) + void renderQueueEnded(Ogre::uint8 queueGroupId, const Ogre::String &invocation, bool &skipThisInvocation) { if ((queueGroupId == Ogre::RENDER_QUEUE_SKIES_EARLY || queueGroupId == Ogre::RENDER_QUEUE_SKIES_LATE) && mActive) @@ -558,7 +557,6 @@ mHydrax->getCamera()->enableCustomNearClipPlane(mHydrax->mReflectionPlane); Ogre::Root::getSingleton().getRenderSystem()->_setProjectionMatrix(mHydrax->getCamera()->getProjectionMatrixRS()); } - return skipThisInvocation; } /// Hydrax pointer Modified: trunk/python-ogre/ThirdParty/caelum/CaelumPrerequisites.h =================================================================== --- trunk/python-ogre/ThirdParty/caelum/CaelumPrerequisites.h 2008-09-29 05:02:26 UTC (rev 752) +++ trunk/python-ogre/ThirdParty/caelum/CaelumPrerequisites.h 2008-10-05 07:08:22 UTC (rev 753) @@ -31,21 +31,21 @@ #include <memory> // Define the dll export qualifier if compiling for Windows -#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32 +// #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32 // #ifdef CAELUM_LIB // #define CAELUM_EXPORT __declspec (dllexport) // #else // #ifdef __MINGW32__ - #define CAELUM_EXPORT +// #define CAELUM_EXPORT // #else // #define CAELUM_EXPORT __declspec (dllimport) // #endif // #endif -#elif OGRE_PLATFORM == OGRE_PLATFORM_APPLE - #define CAELUM_EXPORT __attribute__ ((visibility("default"))) -#else +// #elif OGRE_PLATFORM == OGRE_PLATFORM_APPLE +// #define CAELUM_EXPORT __attribute__ ((visibility("default"))) +// #else #define CAELUM_EXPORT -#endif +// #endif // Define the version code #define CAELUM_VERSION_MAIN 0 Modified: trunk/python-ogre/ThirdParty/caelum/FlatCloudLayer.cpp =================================================================== --- trunk/python-ogre/ThirdParty/caelum/FlatCloudLayer.cpp 2008-09-29 05:02:26 UTC (rev 752) +++ trunk/python-ogre/ThirdParty/caelum/FlatCloudLayer.cpp 2008-10-05 07:08:22 UTC (rev 753) @@ -180,13 +180,13 @@ void FlatCloudLayer::setCloudBlendPos (const Ogre::Real value) { mCloudBlendPos = value; - uint textureCount = mNoiseTextureNames.size(); + int textureCount = static_cast<int>(mNoiseTextureNames.size()); // Convert to int and bring to [0, textureCount) int currentTextureIndex = static_cast<int>(floor(mCloudBlendPos)); currentTextureIndex = ((currentTextureIndex % textureCount) + textureCount) % textureCount; assert(0 <= currentTextureIndex); - assert(currentTextureIndex < static_cast<int>(textureCount)); + assert(currentTextureIndex < textureCount); // Check if we have to change textures. if (currentTextureIndex != mCurrentTextureIndex) { Modified: trunk/python-ogre/ThirdParty/caelum/FlatCloudLayer.h =================================================================== --- trunk/python-ogre/ThirdParty/caelum/FlatCloudLayer.h 2008-09-29 05:02:26 UTC (rev 752) +++ trunk/python-ogre/ThirdParty/caelum/FlatCloudLayer.h 2008-10-05 07:08:22 UTC (rev 753) @@ -107,7 +107,7 @@ /** Gets cloud movement speed. * @param cloudSpeed Cloud movement speed. */ - Ogre::Vector2 getCloudSpeed () const; + Ogre::Vector2 getCloudSpeed () const { return mCloudSpeed; } /** Sets cloud cover, between 0 (completely clear) and 1 (completely covered) * @param cloudCover Cloud cover between 0 and 1 Modified: trunk/python-ogre/ThirdParty/caelum/SkyLight.cpp =================================================================== --- trunk/python-ogre/ThirdParty/caelum/SkyLight.cpp 2008-09-29 05:02:26 UTC (rev 752) +++ trunk/python-ogre/ThirdParty/caelum/SkyLight.cpp 2008-10-05 07:08:22 UTC (rev 753) @@ -42,8 +42,6 @@ mMainLight = sceneMgr->createLight (lightName); mMainLight->setType (Ogre::Light::LT_DIRECTIONAL); - // HDR power scale, REALLY bright: - mMainLight->setPowerScale (10); sceneMgr->getRenderQueue()->getQueueGroup(CAELUM_RENDER_QUEUE_SUN)->setShadowsEnabled(false); Modified: trunk/python-ogre/ThirdParty/forests/BatchedGeometry.cpp =================================================================== --- trunk/python-ogre/ThirdParty/forests/BatchedGeometry.cpp 2008-09-29 05:02:26 UTC (rev 752) +++ trunk/python-ogre/ThirdParty/forests/BatchedGeometry.cpp 2008-10-05 07:08:22 UTC (rev 753) @@ -119,7 +119,6 @@ uint16 *data = (uint16*)id->indexBuffer->lock(id->indexStart * sizeof(uint16), id->indexCount * sizeof(uint16), HardwareBuffer::HBL_READ_ONLY); - std::map<uint16, uint32> histogram; for (i = 0; i < id->indexCount; i++) { uint16 index = data[i]; if (ibmap.find(index) == ibmap.end()) ibmap[index] = ibmap.size(); @@ -134,7 +133,6 @@ uint32 *data = (uint32*)id->indexBuffer->lock(id->indexStart * sizeof(uint32), id->indexCount * sizeof(uint32), HardwareBuffer::HBL_READ_ONLY); - std::map<uint32, uint32> histogram; for (i = 0; i < id->indexCount; i++) { uint32 index = data[i]; if (ibmap.find(index) == ibmap.end()) ibmap[index] = ibmap.size(); Added: trunk/python-ogre/ThirdParty/opensteer/Camera.cpp =================================================================== --- trunk/python-ogre/ThirdParty/opensteer/Camera.cpp (rev 0) +++ trunk/python-ogre/ThirdParty/opensteer/Camera.cpp 2008-10-05 07:08:22 UTC (rev 753) @@ -0,0 +1,433 @@ +// ---------------------------------------------------------------------------- +// +// +// OpenSteer -- Steering Behaviors for Autonomous Characters +// +// Copyright (c) 2002-2005, Sony Computer Entertainment America +// Original author: Craig Reynolds <cra...@pl...> +// +// 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. +// +// +// ---------------------------------------------------------------------------- +// +// +// camera control for OpenSteerDemo +// +// a camera ("point of view") with various "aiming modes" to track a +// moving vehicle +// +// 10-04-04 bk: put everything into the OpenSteer namespace +// 06-26-02 cwr: created +// +// +// ---------------------------------------------------------------------------- + + +#include "OpenSteer/Camera.h" +#include "OpenSteer/Draw.h" + + +// ---------------------------------------------------------------------------- +// constructor + + +OpenSteer::Camera::Camera (void) +{ + reset (); +} + + +// ---------------------------------------------------------------------------- +// reset all camera state to default values + + +void +OpenSteer::Camera::reset (void) +{ + // reset camera's position and orientation + resetLocalSpace (); + + // "look at" point, center of view + target = Vec3::zero; + + // vehicle being tracked + vehicleToTrack = NULL; + + // aim at predicted position of vehicleToTrack, this far into thefuture + aimLeadTime = 1; + + // make first update abrupt + smoothNextMove = false; + + // relative rate at which camera transitions proceed + smoothMoveSpeed = 1.5f; + + // select camera aiming mode + mode = cmFixed; + + // "constant distance from vehicle" camera mode parameters + fixedDistDistance = 1; + fixedDistVOffset = 0; + + // "look straight down at vehicle" camera mode parameters + lookdownDistance = 30; + + // "static" camera mode parameters + fixedPosition.set (75, 75, 75); + fixedTarget = Vec3::zero; + fixedUp = Vec3::up; + + // "fixed local offset" camera mode parameters + fixedLocalOffset.set (5, 5, -5); + + // "offset POV" camera mode parameters + povOffset.set (0, 1, -3); +} + + +// ---------------------------------------------------------------------------- +// called once per frame to update camera state according to currently +// selected mode and per-mode parameters. Works in position/target/up +// ("look at") space. +// +// parameter names commented out to prevent compiler warning from "-W" + + +void +OpenSteer::Camera::update (const float /*currentTime*/, + const float elapsedTime, + const bool simulationPaused) +{ + // vehicle being tracked (just a reference with a more concise name) + const AbstractVehicle& v = *vehicleToTrack; + const bool noVehicle = vehicleToTrack == NULL; + + // new position/target/up, set in switch below, defaults to current + Vec3 newPosition = position(); + Vec3 newTarget = target; + Vec3 newUp = up(); + + + // prediction time to compensate for lag caused by smoothing moves + const float antiLagTime = simulationPaused ? 0 : 1 / smoothMoveSpeed; + + // aim at a predicted future position of the target vehicle + const float predictionTime = aimLeadTime + antiLagTime; + + // set new position/target/up according to camera aim mode + switch (mode) + { + case cmFixed: + newPosition = fixedPosition; + newTarget = fixedTarget; + newUp = fixedUp; + break; + + case cmFixedDistanceOffset: + if (noVehicle) break; + newUp = Vec3::up; // xxx maybe this should be v.up ? + newTarget = v.predictFuturePosition (predictionTime); + newPosition = constDistHelper (elapsedTime); + break; + + case cmStraightDown: + if (noVehicle) break; + newUp = v.forward(); + newTarget = v.predictFuturePosition (predictionTime); + newPosition = newTarget; + newPosition.y += lookdownDistance; + break; + + case cmFixedLocalOffset: + if (noVehicle) break; + newUp = v.up(); + newTarget = v.predictFuturePosition (predictionTime); + newPosition = v.globalizePosition (fixedLocalOffset); + break; + + case cmOffsetPOV: + { + if (noVehicle) break; + newUp = v.up(); + const Vec3 futurePosition = v.predictFuturePosition (antiLagTime); + const Vec3 globalOffset = v.globalizeDirection (povOffset); + newPosition = futurePosition + globalOffset; + // XXX hack to improve smoothing between modes (no effect on aim) + const float L = 10; + newTarget = newPosition + (v.forward() * L); + break; + } + default: + break; + } + + // blend from current position/target/up towards new values + smoothCameraMove (newPosition, newTarget, newUp, elapsedTime); + + // set camera in draw module + drawCameraLookAt (position(), target, up()); +} + + +// ---------------------------------------------------------------------------- +// Smoothly move camera: blend (at a rate controlled by smoothMoveSpeed) +// from current camera state toward newly determined camera state. +// +// The flag smoothNextMove can be set (with doNotSmoothNextMove()) to +// make next update (say at simulation initialization time). + + +void +OpenSteer::Camera::smoothCameraMove (const Vec3& newPosition, + const Vec3& newTarget, + const Vec3& newUp, + const float elapsedTime) +{ + if (smoothNextMove) + { + const float smoothRate = elapsedTime * smoothMoveSpeed; + + Vec3 tempPosition = position(); + Vec3 tempUp = up(); + blendIntoAccumulator (smoothRate, newPosition, tempPosition); + blendIntoAccumulator (smoothRate, newTarget, target); + blendIntoAccumulator (smoothRate, newUp, tempUp); + setPosition (tempPosition); + setUp (tempUp); + + // xxx not sure if these are needed, seems like a good idea + // xxx (also if either up or oldUP are zero, use the other?) + // xxx (even better: force up to be perp to target-position axis)) + if (up() == Vec3::zero) + setUp (Vec3::up); + else + setUp (up().normalize ()); + } + else + { + smoothNextMove = true; + + setPosition (newPosition); + target = newTarget; + setUp (newUp); + } +} + + +// ---------------------------------------------------------------------------- +// computes a new camera position which follows "target" at distant of +// "dragTargetDistance" +// +// parameter names commented out to prevent compiler warning from "-W" + + +OpenSteer::Vec3 +OpenSteer::Camera::constDistHelper (const float /*elapsedTime*/) +{ + // is the "global up"/"vertical" offset constraint enabled? (it forces + // the camera's global-up (Y) cordinate to be a above/below the target + // vehicle by a given offset.) + const bool constrainUp = (fixedDistVOffset != 0); + + // vector offset from target to current camera position + const Vec3 adjustedPosition (position().x, + (constrainUp) ? target.y : position().y, + position().z); + const Vec3 offset = adjustedPosition - target; + + // current distance between them + const float distance = offset.length(); + + // move camera only when geometry is well-defined (avoid degenerate case) + if (distance == 0) + { + return position(); + } + else + { + // unit vector along original offset + const Vec3 unitOffset = offset / distance; + + // new offset of length XXX + const float xxxDistance = sqrtXXX (square (fixedDistDistance) - + square (fixedDistVOffset)); + const Vec3 newOffset = unitOffset * xxxDistance; + + // return new camera position: adjust distance to target + return target + newOffset + Vec3 (0, fixedDistVOffset, 0); + } +} + + +// ---------------------------------------------------------------------------- +// select next camera mode, used by OpenSteerDemo + + +void +OpenSteer::Camera::selectNextMode (void) +{ + mode = successorMode (mode); + if (mode >= cmEndMode) mode = successorMode (cmStartMode); +} + + +// ---------------------------------------------------------------------------- +// cycles through the various camera modes + + +OpenSteer::Camera::cameraMode +OpenSteer::Camera::successorMode (const cameraMode cm) const +{ + return (cameraMode)(((int)cm) + 1); +} + + +// ---------------------------------------------------------------------------- +// string naming current camera mode, used by OpenSteerDemo + + +char* +OpenSteer::Camera::modeName (void) +{ + switch (mode) + { + case cmFixed: return "static"; break; + case cmFixedDistanceOffset: return "fixed distance offset"; break; + case cmFixedLocalOffset: return "fixed local offset"; break; + case cmOffsetPOV: return "offset POV"; break; + case cmStraightDown: return "straight down"; break; + default: return "?"; + } +} + + +// ---------------------------------------------------------------------------- +// adjust the offest vector of the current camera mode based on a +// "mouse adjustment vector" from OpenSteerDemo (xxx experiment 10-17-02) + + +void +OpenSteer::Camera::mouseAdjustOffset (const Vec3& adjustment) +{ + // vehicle being tracked (just a reference with a more concise name) + const AbstractVehicle& v = *vehicleToTrack; + + switch (mode) + { + case cmFixed: + { + const Vec3 offset = fixedPosition - fixedTarget; + const Vec3 adjusted = mouseAdjustPolar (adjustment, offset); + fixedPosition = fixedTarget + adjusted; + break; + } + case cmFixedDistanceOffset: + { + // XXX this is the oddball case, adjusting "position" instead + // XXX of mode parameters, hence no smoothing during adjustment + // XXX Plus the fixedDistVOffset feature complicates things + const Vec3 offset = position() - target; + const Vec3 adjusted = mouseAdjustPolar (adjustment, offset); + // XXX -------------------------------------------------- +// position = target + adjusted; +// fixedDistDistance = adjusted.length(); +// fixedDistVOffset = position.y - target.y; + // XXX -------------------------------------------------- +// const float s = smoothMoveSpeed * (1.0f/40f); +// const Vec3 newPosition = target + adjusted; +// position = interpolate (s, position, newPosition); +// fixedDistDistance = interpolate (s, fixedDistDistance, adjusted.length()); +// fixedDistVOffset = interpolate (s, fixedDistVOffset, position.y - target.y); + // XXX -------------------------------------------------- +// position = target + adjusted; + setPosition (target + adjusted); + fixedDistDistance = adjusted.length(); +// fixedDistVOffset = position.y - target.y; + fixedDistVOffset = position().y - target.y; + // XXX -------------------------------------------------- + break; + } + case cmStraightDown: + { + const Vec3 offset (0, 0, lookdownDistance); + const Vec3 adjusted = mouseAdjustPolar (adjustment, offset); + lookdownDistance = adjusted.z; + break; + } + case cmFixedLocalOffset: + { + const Vec3 offset = v.globalizeDirection (fixedLocalOffset); + const Vec3 adjusted = mouseAdjustPolar (adjustment, offset); + fixedLocalOffset = v.localizeDirection (adjusted); + break; + } + case cmOffsetPOV: + { + // XXX this might work better as a translation control, it is + // XXX non-obvious using a polar adjustment when the view + // XXX center is not at the camera aim target + const Vec3 offset = v.globalizeDirection (povOffset); + const Vec3 adjusted = mouseAdjustOrtho (adjustment, offset); + povOffset = v.localizeDirection (adjusted); + break; + } + default: + break; + } +} + + +// ---------------------------------------------------------------------------- + + +OpenSteer::Vec3 +OpenSteer::Camera::mouseAdjust2 (const bool polar, + const Vec3& adjustment, + const Vec3& offsetToAdjust) +{ + // value to be returned + Vec3 result = offsetToAdjust; + + // using the camera's side/up axes (essentially: screen space) move the + // offset vector sideways according to adjustment.x and vertically + // according to adjustment.y, constrain the offset vector's length to + // stay the same, hence the offset's "tip" stays on the surface of a + // sphere. + const float oldLength = result.length (); + const float rate = polar ? oldLength : 1; + result += xxxls().side() * (adjustment.x * rate); + result += xxxls().up() * (adjustment.y * rate); + if (polar) + { + const float newLength = result.length (); + result *= oldLength / newLength; + } + + // change the length of the offset vector according to adjustment.z + if (polar) + result *= (1 + adjustment.z); + else + result += xxxls().forward() * adjustment.z; + + return result; +} + + +// ---------------------------------------------------------------------------- Added: trunk/python-ogre/ThirdParty/opensteer/Clock.cpp =================================================================== --- trunk/python-ogre/ThirdParty/opensteer/Clock.cpp (rev 0) +++ trunk/python-ogre/ThirdParty/opensteer/Clock.cpp 2008-10-05 07:08:22 UTC (rev 753) @@ -0,0 +1,310 @@ +// ---------------------------------------------------------------------------- +// +// +// OpenSteer -- Steering Behaviors for Autonomous Characters +// +// Copyright (c) 2002-2005, Sony Computer Entertainment America +// Original author: Craig Reynolds <cra...@pl...> +// +// 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. +// +// +// ---------------------------------------------------------------------------- +// +// +// discrete time simulation clock for OpenSteerDemo +// +// Keeps track of real clock time and simulation time. Encapsulates OS's +// time API. Can be put in either "as fast as possible" variable time step +// mode (where simulation time steps are based on real time elapsed between +// updates), or in fixed "target FPS" mode where the simulation steps are +// constrained to start on 1/FPS boundaries (e.g. on a 60 hertz video game +// console). Also handles the notion of "pausing" simulation time. +// +// Usage: allocate a clock, set its "paused" or "targetFPS" parameters, +// then call updateGlobalSimulationClock before each simulation step. +// +// 10-04-04 bk: put everything into the OpenSteer namespace +// 09-24-02 cwr: major overhaul +// 06-26-02 cwr: created +// +// +// ---------------------------------------------------------------------------- + + +#include "OpenSteer/Clock.h" + + +// ---------------------------------------------------------------------------- +// XXX This is a bit ad hoc. Need to revisit conditionalization on operating +// XXX system. As of 5-5-03, this module knows about Win32 (code thanks to +// XXX Leaf Garland and Bruce Mitchener) and Linux/Unix (Craig's original +// XXX version). It tests for Xbox and Win32 and assumes Linux/Unix +// XXX otherwise. + + +#if defined (_XBOX) + #include <xtl.h> +#elif defined (_WIN32) + #include <windows.h> +#else + #include <sys/time.h> +#endif + + +// ---------------------------------------------------------------------------- +// Constructor + + +OpenSteer::Clock::Clock (void) +{ + // default is "real time, variable frame rate" and not paused + setFixedFrameRate (0); + setPausedState (false); + setAnimationMode (false); + setVariableFrameRateMode (true); + + // real "wall clock" time since launch + totalRealTime = 0; + + // time simulation has run + totalSimulationTime = 0; + + // time spent paused + totalPausedTime = 0; + + // sum of (non-realtime driven) advances to simulation time + totalAdvanceTime = 0; + + // interval since last simulation time + elapsedSimulationTime = 0; + + // interval since last clock update time + elapsedRealTime = 0; + + // interval since last clock update, + // exclusive of time spent waiting for frame boundary when targetFPS>0 + elapsedNonWaitRealTime = 0; + + // "manually" advance clock by this amount on next update + newAdvanceTime = 0; + + // "Calendar time" when this clock was first updated +#ifdef _WIN32 + basePerformanceCounter = 0; // from QueryPerformanceCounter on Windows +#else + baseRealTimeSec = 0; // from gettimeofday on Linux and Mac OS X + baseRealTimeUsec = 0; +#endif + + // clock keeps track of "smoothed" running average of recent frame rates. + // When a fixed frame rate is used, a running average of "CPU load" is + // kept (aka "non-wait time", the percentage of each frame time (time + // step) that the CPU is busy). + smoothedFPS = 0; + smoothedUsage = 0; +} + + +// ---------------------------------------------------------------------------- +// update this clock, called once per simulation step ("frame") to: +// +// track passage of real time +// manage passage of simulation time (modified by Paused state) +// measure time elapsed between time updates ("frame rate") +// optionally: "wait" for next realtime frame boundary + + +void +OpenSteer::Clock::update (void) +{ + // keep track of average frame rate and average usage percentage + updateSmoothedRegisters (); + + // wait for next frame time (when targetFPS>0) + // XXX should this be at the end of the update function? + frameRateSync (); + + // save previous real time to measure elapsed time + const float previousRealTime = totalRealTime; + + // real "wall clock" time since this application was launched + totalRealTime = realTimeSinceFirstClockUpdate (); + + // time since last clock update + elapsedRealTime = totalRealTime - previousRealTime; + + // accumulate paused time + if (paused) totalPausedTime += elapsedRealTime; + + // save previous simulation time to measure elapsed time + const float previousSimulationTime = totalSimulationTime; + + // update total simulation time + if (getAnimationMode ()) + { + // for "animation mode" use fixed frame time, ignore real time + const float frameDuration = 1.0f / getFixedFrameRate (); + totalSimulationTime += paused ? newAdvanceTime : frameDuration; + if (!paused) newAdvanceTime += frameDuration - elapsedRealTime; + } + else + { + // new simulation time is total run time minus time spent paused + totalSimulationTime = (totalRealTime + + totalAdvanceTime + - totalPausedTime); + } + + + // update total "manual advance" time + totalAdvanceTime += newAdvanceTime; + + // how much time has elapsed since the last simulation step? + elapsedSimulationTime = (paused ? + newAdvanceTime : + (totalSimulationTime - previousSimulationTime)); + + // reset advance amount + newAdvanceTime = 0; +} + + +// ---------------------------------------------------------------------------- +// "wait" until next frame time (actually spin around this tight loop) +// +// +// (xxx there are probably a smarter ways to do this (using events or +// thread waits (eg usleep)) but they are likely to be unportable. xxx) + + +void +OpenSteer::Clock::frameRateSync (void) +{ + // when in real time fixed frame rate mode + // (not animation mode and not variable frame rate mode) + if ((! getAnimationMode ()) && (! getVariableFrameRateMode ())) + { + // find next (real time) frame start time + const float targetStepSize = 1.0f / getFixedFrameRate (); + const float now = realTimeSinceFirstClockUpdate (); + const int lastFrameCount = (int) (now / targetStepSize); + const float nextFrameTime = (lastFrameCount + 1) * targetStepSize; + + // record usage ("busy time", "non-wait time") for OpenSteerDemo app + elapsedNonWaitRealTime = now - totalRealTime; + + // wait until next frame time + do {} while (realTimeSinceFirstClockUpdate () < nextFrameTime); + } +} + + +// ---------------------------------------------------------------------------- +// force simulation time ahead, ignoring passage of real time. +// Used for OpenSteerDemo's "single step forward" and animation mode + + +float +OpenSteer::Clock::advanceSimulationTimeOneFrame (void) +{ + // decide on what frame time is (use fixed rate, average for variable rate) + const float fps = (getVariableFrameRateMode () ? + getSmoothedFPS () : + getFixedFrameRate ()); + const float frameTime = 1 / fps; + + // bump advance time + advanceSimulationTime (frameTime); + + // return the time value used (for OpenSteerDemo) + return frameTime; +} + + +void +OpenSteer::Clock::advanceSimulationTime (const float seconds) +{ + if (seconds < 0) { + /// @todo - throw? how to handle error conditions? Not by crashing an app! + std::cerr << "negative arg to advanceSimulationTime - results will not be valid"; + } + else + newAdvanceTime += seconds; +} + + +namespace { + +// ---------------------------------------------------------------------------- +// Returns the number of seconds of real time (represented as a float) since +// the clock was first updated. +// +// XXX Need to revisit conditionalization on operating system. + + + + float + clockErrorExit (void) + { + /// @todo - throw? how to handle error conditions? Not by crashing an app! + std::cerr << "Problem reading system clock - results will not be valid"; + return 0.0f; + } + +} // anonymous namespace + +float +OpenSteer::Clock::realTimeSinceFirstClockUpdate (void) +#ifdef _WIN32 +{ + // get time from Windows + LONGLONG counter, frequency; + bool clockOK = (QueryPerformanceCounter ((LARGE_INTEGER *)&counter) && + QueryPerformanceFrequency ((LARGE_INTEGER *)&frequency)); + if (!clockOK) return clockErrorExit (); + + // ensure the base counter is recorded once after launch + if (basePerformanceCounter == 0) basePerformanceCounter = counter; + + // real "wall clock" time since launch + const LONGLONG counterDifference = counter - basePerformanceCounter; + return ((float) counterDifference) / ((float)frequency); +} +#else +{ + // get time from Linux (Unix, Mac OS X, ...) + timeval t; + if (gettimeofday (&t, 0) != 0) return clockErrorExit (); + + // ensure the base time is recorded once after launch + if (baseRealTimeSec == 0) + { + baseRealTimeSec = t.tv_sec; + baseRealTimeUsec = t.tv_usec; + } + + // real "wall clock" time since launch + return (( t.tv_sec - baseRealTimeSec) + + ((t.tv_usec - baseRealTimeUsec) / 1000000.0f)); +} +#endif + + +// ---------------------------------------------------------------------------- Added: trunk/python-ogre/ThirdParty/opensteer/Color.cpp =================================================================== --- trunk/python-ogre/ThirdParty/opensteer/Color.cpp (rev 0) +++ trunk/python-ogre/ThirdParty/opensteer/Color.cpp 2008-10-05 07:08:22 UTC (rev 753) @@ -0,0 +1,262 @@ +// ---------------------------------------------------------------------------- +// +// +// OpenSteer -- Steering Behaviors for Autonomous Characters +// +// Copyright (c) 2002-2005, Sony Computer Entertainment America +// Original author: Craig Reynolds <cra...@pl...> +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +// DEALINGS IN THE SOFTWARE. +// +// +// ---------------------------------------------------------------------------- + +#include "OpenSteer/Color.h" + +// Include OpenSteer::Vec3 +#include "OpenSteer/Vec3.h" + +// Include assert +#include <cassert> + + +OpenSteer::Color::Color() + : r_(1.0f), g_(1.0f), b_(1.0f), a_ (1.0f) +{ + +} + + +OpenSteer::Color::Color( float greyValue ) + : r_( greyValue ), g_( greyValue ), b_( greyValue ), a_ (1.0f) +{ + +} + + +OpenSteer::Color::Color( float rValue, float gValue, float bValue, float aValue ) + : r_( rValue ), g_( gValue ), b_( bValue ), a_( aValue ) +{ + +} + + +OpenSteer::Color::Color( Vec3 const& vector ) + : r_( vector.x ), g_( vector.y ), b_( vector.z ), a_ (1.0f) +{ + +} + + + +float +OpenSteer::Color::r() const +{ + return r_; +} + + +float +OpenSteer::Color::g() const +{ + return g_; +} + + +float +OpenSteer::Color::b() const +{ + return b_; +} + + +float +OpenSteer::Color::a() const +{ + return a_; +} + + + +void +OpenSteer::Color::setR( float value ) +{ + r_ = value; +} + + +void +OpenSteer::Color::setG( float value ) +{ + g_ = value; +} + + +void +OpenSteer::Color::setB( float value ) +{ + b_ = value; +} + +void +OpenSteer::Color::setA( float value ) +{ + a_ = value; +} + +void +OpenSteer::Color::set( float rValue, float gValue, float bValue, float aValue ) +{ + r_ = rValue; + g_ = gValue; + b_ = bValue; + a_ = aValue; +} + + +OpenSteer::Vec3 +OpenSteer::Color::convertToVec3() const +{ + return Vec3( r_, g_, b_ ); +} + + +OpenSteer::Color& +OpenSteer::Color::operator+=( Color const& other ) +{ + r_ += other.r_; + g_ += other.g_; + b_ += other.b_; + return *this; +} + + +OpenSteer::Color& +OpenSteer::Color::operator-=( Color const& other ) +{ + r_ -= other.r_; + g_ -= other.g_; + b_ -= other.b_; + return *this; +} + + +OpenSteer::Color& +OpenSteer::Color::operator*=( float factor ) +{ + r_ *= factor; + g_ *= factor; + b_ *= factor; + return *this; +} + + +OpenSteer::Color& +OpenSteer::Color::operator/=( float factor ) +{ + assert( 0.0f != factor && "Division by zero." ); + return operator*=( 1.0f / factor ); +} + + + + + + +OpenSteer::Color +OpenSteer::grayColor( float value ) +{ + return Color( value ); +} + + + +OpenSteer::Color +OpenSteer::operator+( Color const& lhs, Color const& rhs ) +{ + Color result( lhs ); + return result += rhs; +} + + +OpenSteer::Color +OpenSteer::operator-( Color const& lhs, Color const& rhs ) +{ + Color result( lhs ); + return result -= rhs; +} + + +OpenSteer::Color +OpenSteer::operator*( Color const& lhs, float rhs ) +{ + Color result( lhs ); + return result *= rhs; +} + + +OpenSteer::Color +OpenSteer::operator*( float lhs, Color const& rhs ) +{ + return operator*( rhs, lhs ); +} + + +OpenSteer::Color +OpenSteer::operator/( Color const& lhs, float rhs ) +{ + Color result( lhs ); + return result /= rhs; +} + + + + + + + +OpenSteer::Color const OpenSteer::gBlack(0.0f, 0.0f, 0.0f); +OpenSteer::Color const OpenSteer::gWhite(1.0f, 1.0f, 1.0f); + +OpenSteer::Color const OpenSteer::gRed(1.0f, 0.0f, 0.0f); +OpenSteer::Color const OpenSteer::gGreen(0.0f, 1.0f, 0.0f); +OpenSteer::Color const OpenSteer::gBlue(0.0f, 0.0f, 1.0f); +OpenSteer::Color const OpenSteer::gYellow(1.0f, 1.0f, 0.0f); +OpenSteer::Color const OpenSteer::gCyan(0.0f, 1.0f, 1.0f); +OpenSteer::Color const OpenSteer::gMagenta(1.0f, 0.0f, 1.0f); +OpenSteer::Color const OpenSteer::gOrange(1.0f, 0.5f, 0.0f); + +OpenSteer::Color const OpenSteer::gDarkRed(0.5f, 0.0f, 0.0f); +OpenSteer::Color const OpenSteer::gDarkGreen(0.0f, 0.5f, 0.0f); +OpenSteer::Color const OpenSteer::gDarkBlue(0.0f, 0.0f, 0.5f); +OpenSteer::Color const OpenSteer::gDarkYellow(0.5f, 0.5f, 0.0f); +OpenSteer::Color const OpenSteer::gDarkCyan(0.0f, 0.5f, 0.5f); +OpenSteer::Color const OpenSteer::gDarkMagenta(0.5f, 0.0f, 0.5f); +OpenSteer::Color const OpenSteer::gDarkOrange(0.5f, 0.25f, 0.0f); + +OpenSteer::Color const OpenSteer::gGray10(0.1f); +OpenSteer::Color const OpenSteer::gGray20(0.2f); +OpenSteer::Color const OpenSteer::gGray30(0.3f); +OpenSteer::Color const OpenSteer::gGray40(0.4f); +OpenSteer::Color const OpenSteer::gGray50(0.5f); +OpenSteer::Color const OpenSteer::gGray60(0.6f); +OpenSteer::Color const OpenSteer::gGray70(0.7f); +OpenSteer::Color const OpenSteer::gGray80(0.8f); +OpenSteer::Color const OpenSteer::gGray90(0.9f); + Added: trunk/python-ogre/ThirdParty/opensteer/Obstacle.cpp =================================================================== --- trunk/python-ogre/ThirdParty/opensteer/Obstacle.cpp (rev 0) +++ trunk/python-ogre/ThirdParty/opensteer/Obstacle.cpp 2008-10-05 07:08:22 UTC (rev 753) @@ -0,0 +1,355 @@ +// ---------------------------------------------------------------------------- +// +// +// OpenSteer -- Steering Behaviors for Autonomous Characters +// +// Copyright (c) 2002-2004, Sony Computer Entertainment America +// Original author: Craig Reynolds <cra...@pl...> +// +// 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. +// +// +// ---------------------------------------------------------------------------- +// +// +// OpenSteer Obstacle classes +// +// 10-28-04 cwr: split off from Obstacle.h +// +// +// ---------------------------------------------------------------------------- + + +#include "OpenSteer/Obstacle.h" + + +// ---------------------------------------------------------------------------- +// Obstacle +// compute steering for a vehicle to avoid this obstacle, if needed + + +OpenSteer::Vec3 +OpenSteer::Obstacle::steerToAvoid (const AbstractVehicle& vehicle, + const float minTimeToCollision) const +{ + // find nearest intersection with this obstacle along vehicle's path + PathIntersection pi; + findIntersectionWithVehiclePath (vehicle, pi); + + // return steering for vehicle to avoid intersection, or zero if non found + return pi.steerToAvoidIfNeeded (vehicle, minTimeToCollision); +} + + +// ---------------------------------------------------------------------------- +// Obstacle +// static method to apply steerToAvoid to nearest obstacle in an ObstacleGroup + + +OpenSteer::Vec3 +OpenSteer::Obstacle:: +steerToAvoidObstacles (const AbstractVehicle& vehicle, + const float minTimeToCollision, + const ObstacleGroup& obstacles) +{ + PathIntersection nearest, next; + + // test all obstacles in group for an intersection with the vehicle's + // future path, select the one whose point of intersection is nearest + firstPathIntersectionWithObstacleGroup (vehicle, obstacles, nearest, next); + + // if nearby intersection found, steer away from it, otherwise no steering + return nearest.steerToAvoidIfNeeded (vehicle, minTimeToCollision); +} + + +// ---------------------------------------------------------------------------- +// Obstacle +// static method to find first vehicle path intersection in an ObstacleGroup +// +// returns its results in the PathIntersection argument "nearest", +// "next" is used to store internal state. + + +void +OpenSteer::Obstacle:: +firstPathIntersectionWithObstacleGroup (const AbstractVehicle& vehicle, + const ObstacleGroup& obstacles, + PathIntersection& nearest, + PathIntersection& next) +{ + // test all obstacles in group for an intersection with the vehicle's + // future path, select the one whose point of intersection is nearest + next.intersect = false; + nearest.intersect = false; + for (ObstacleIterator o = obstacles.begin(); o != obstacles.end(); o++) + { + // find nearest point (if any) where vehicle path intersects obstacle + // o, storing the results in PathIntersection object "next" + (**o).findIntersectionWithVehiclePath (vehicle, next); + + // if this is the first intersection found, or it is the nearest found + // so far, store it in PathIntersection object "nearest" + const bool firstFound = !nearest.intersect; + const bool nearestFound = (next.intersect && + (next.distance < nearest.distance)); + if (firstFound || nearestFound) nearest = next; + } +} + + +// ---------------------------------------------------------------------------- +// PathIntersection +// determine steering once path intersections have been found + + +OpenSteer::Vec3 +OpenSteer::Obstacle::PathIntersection:: +steerToAvoidIfNeeded (const AbstractVehicle& vehicle, + const float minTimeToCollision) const +{ + // if nearby intersection found, steer away from it, otherwise no steering + const float minDistanceToCollision = minTimeToCollision * vehicle.speed(); + if (intersect && (distance < minDistanceToCollision)) + { + // compute avoidance steering force: take the component of + // steerHint which is lateral (perpendicular to vehicle's + // forward direction), set its length to vehicle's maxForce + Vec3 lateral = steerHint.perpendicularComponent (vehicle.forward ()); + return lateral.normalize () * vehicle.maxForce (); + } + else + { + return Vec3::zero; + } +} + + +// ---------------------------------------------------------------------------- +// SphereObstacle +// find first intersection of a vehicle's path with this obstacle + + +void +OpenSteer:: +SphereObstacle:: +findIntersectionWithVehiclePath (const AbstractVehicle& vehicle, + PathIntersection& pi) const +{ + // This routine is based on the Paul Bourke's derivation in: + // Intersection of a Line and a Sphere (or circle) + // http://www.swin.edu.au/astronomy/pbourke/geometry/sphereline/ + // But the computation is done in the vehicle's local space, so + // the line in question is the Z (Forward) axis of the space which + // simplifies some of the calculations. + + float b, c, d, p, q, s; + Vec3 lc; + + // initialize pathIntersection object to "no intersection found" + pi.intersect = false; + + // find sphere's "local center" (lc) in the vehicle's coordinate space + lc = vehicle.localizePosition (center); + pi.vehicleOutside = lc.length () > radius; + + // if obstacle is seen from inside, but vehicle is outside, must avoid + // (noticed once a vehicle got outside it ignored the obstacle 2008-5-20) + if (pi.vehicleOutside && (seenFrom () == inside)) + { + pi.intersect = true; + pi.distance = 0.0f; + pi.steerHint = (center - vehicle.position()).normalize(); + return; + } + + // compute line-sphere intersection parameters + const float r = radius + vehicle.radius(); + b = -2 * lc.z; + c = square (lc.x) + square (lc.y) + square (lc.z) - square (r); + d = (b * b) - (4 * c); + + // when the path does not intersect the sphere + if (d < 0) return; + + // otherwise, the path intersects the sphere in two points with + // parametric coordinates of "p" and "q". (If "d" is zero the two + // points are coincident, the path is tangent) + s = sqrtXXX (d); + p = (-b + s) / 2; + q = (-b - s) / 2; + + // both intersections are behind us, so no potential collisions + if ((p < 0) && (q < 0)) return; + + // at least one intersection is in front, so intersects our forward + // path + pi.intersect = true; + pi.obstacle = this; + pi.distance = + ((p > 0) && (q > 0)) ? + // both intersections are in front of us, find nearest one + ((p < q) ? p : q) : + // otherwise one is ahead and one is behind: we are INSIDE obstacle + (seenFrom () == outside ? + // inside a solid obstacle, so distance to obstacle is zero + 0.0f : + // hollow obstacle (or "both"), pick point that is in front + ((p > 0) ? p : q)); + pi.surfacePoint = + vehicle.position() + (vehicle.forward() * pi.distance); + pi.surfaceNormal = (pi.surfacePoint-center).normalize(); + switch (seenFrom ()) + { + case outside: + pi.steerHint = pi.surfaceNormal; + break; + case inside: + pi.steerHint = -pi.surfaceNormal; + break; + case both: + pi.steerHint = pi.surfaceNormal * (pi.vehicleOutside ? 1.0f : -1.0f); + break; + } +} + + +// ---------------------------------------------------------------------------- +// BoxObstacle +// find first intersection of a vehicle's path with this obstacle + + +void +OpenSteer:: +BoxObstacle:: +findIntersectionWithVehiclePath (const AbstractVehicle& vehicle, + PathIntersection& pi) const +{ + // abbreviations + const float w = width; // dimensions + const float h = height; + const float d = depth; + const Vec3 s = side (); // local space + const Vec3 u = up (); + const Vec3 f = forward (); + const Vec3 p = position (); + const Vec3 hw = s * (0.5f * width); // offsets for face centers + const Vec3 hh = u * (0.5f * height); + const Vec3 hd = f * (0.5f * depth); + const seenFromState sf = seenFrom (); + + // the box's six rectangular faces + RectangleObstacle r1 (w, h, s, u, f, p + hd, sf); // front + RectangleObstacle r2 (w, h, -s, u, -f, p - hd, sf); // back + RectangleObstacle r3 (d, h, -f, u, s, p + hw, sf); // side + RectangleObstacle r4 (d, h, f, u, -s, p - hw, sf); // other side + RectangleObstacle r5 (w, d, s, -f, u, p + hh, sf); // top + RectangleObstacle r6 (w, d, -s, -f, -u, p - hh, sf); // bottom + + // group the six RectangleObstacle faces together + ObstacleGroup faces; + faces.push_back (&r1); + faces.push_back (&r2); + faces.push_back (&r3); + faces.push_back (&r4); + faces.push_back (&r5); + faces.push_back (&r6); + + // find first intersection of vehicle path with group of six faces + PathIntersection next; + firstPathIntersectionWithObstacleGroup (vehicle, faces, pi, next); + + // when intersection found, adjust PathIntersection for the box case + if (pi.intersect) + { + pi.obstacle = this; + pi.steerHint = ((pi.surfacePoint - position ()).normalize () * + (pi.vehicleOutside ? 1.0f : -1.0f)); + } +} + + +// ---------------------------------------------------------------------------- +// PlaneObstacle +// find first intersection of a vehicle's path with this obstacle + + +void +OpenSteer:: +PlaneObstacle:: +findIntersectionWithVehiclePath (const AbstractVehicle& vehicle, + PathIntersection& pi) const +{ + // initialize pathIntersection object to "no intersection found" + pi.intersect = false; + + const Vec3 lp = localizePosition (vehicle.position ()); + const Vec3 ld = localizeDirection (vehicle.forward ()); + + // no obstacle intersection if path is parallel to XY (side/up) plane + if (ld.dot (Vec3::forward) == 0.0f) return; + + // no obstacle intersection if vehicle is heading away from the XY plane + if ((lp.z > 0.0f) && (ld.z > 0.0f)) return; + if ((lp.z < 0.0f) && (ld.z < 0.0f)) return; + + // no obstacle intersection if obstacle "not seen" from vehicle's side + if ((seenFrom () == outside) && (lp.z < 0.0f)) return; + if ((seenFrom () == inside) && (lp.z > 0.0f)) return; + + // find intersection of path with rectangle's plane (XY plane) + const float ix = lp.x - (ld.x * lp.z / ld.z); + const float iy = lp.y - (ld.y * lp.z / ld.z); + const Vec3 planeIntersection (ix, iy, 0.0f); + + // no obstacle intersection if plane intersection is outside 2d shape + if (!xyPointInsideShape (planeIntersection, vehicle.radius ())) return; + + // otherwise, the vehicle path DOES intersect this rectangle + const Vec3 localXYradial = planeIntersection.normalize ()... [truncated message content] |
From: <and...@us...> - 2009-10-04 14:40:25
|
Revision: 1001 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=1001&view=rev Author: andy_miller Date: 2009-10-04 14:40:13 +0000 (Sun, 04 Oct 2009) Log Message: ----------- Changes for 1.6.4 Release -- support for both 1.6 and 1.7 in code generation Fix for hand wrapper on ogrevideo Fix for OgrePCZ 1.6.4 version.info Commiting experimental swig wrapper generator Updates to QuickGui generation for latest version Initial commit for octree scene manager wrapper Couple of missing media files for Hydrax Initial commit for mygui demo_basic.py Commit new QuickGUI code in Thirdparty code area Added tilemanager demo Updated PLSM demo media Modified Paths: -------------- trunk/python-ogre/PythonOgreConfig_nt.py trunk/python-ogre/PythonOgreConfig_posix.py trunk/python-ogre/code_generators/common_utils/swig_wrapper.py trunk/python-ogre/code_generators/hydrax/generate_code.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/ogreode/generate_code.py trunk/python-ogre/code_generators/ogrepcz/generate_code.py trunk/python-ogre/code_generators/ogrepcz/python_ogrepcz_aliases.h trunk/python-ogre/code_generators/ogrepcz/python_ogrepcz_sizeof.h trunk/python-ogre/code_generators/ogrevideo/hand_made_wrappers.py trunk/python-ogre/code_generators/quickgui/customization_data.py trunk/python-ogre/code_generators/quickgui/generate_code.py trunk/python-ogre/code_generators/quickgui/python_quickgui_aliases.h trunk/python-ogre/code_generators/quickgui/python_quickgui_sizeof.h trunk/python-ogre/demos/hydrax/Demo_Hydrax01.py trunk/python-ogre/demos/ogre/Demo_Spinner.py trunk/python-ogre/environment.py trunk/python-ogre/patch/python-ogre-deb.patch trunk/python-ogre/scripts/UpdateDLLs.bat Added Paths: ----------- trunk/python-ogre/code_generators/ogreoctreesm/ trunk/python-ogre/code_generators/ogreoctreesm/customization_data.py trunk/python-ogre/code_generators/ogreoctreesm/generate_code.py trunk/python-ogre/code_generators/ogreoctreesm/hand_made_wrappers.py trunk/python-ogre/code_generators/ogreoctreesm/python_ogreoctreesm.h trunk/python-ogre/code_generators/ogreoctreesm/python_ogreoctreesm_aliases.h trunk/python-ogre/code_generators/ogreoctreesm/python_ogreoctreesm_sizeof.h trunk/python-ogre/demos/hydrax/media/materials/programs/Island.hlsl trunk/python-ogre/demos/hydrax/media/materials/programs/Palm.hlsl trunk/python-ogre/demos/media_extra/shaders/ trunk/python-ogre/demos/media_extra/shaders/RenderMonkey/ trunk/python-ogre/demos/media_extra/shaders/RenderMonkey/disc.3ds trunk/python-ogre/demos/media_extra/shaders/RenderMonkey/screenshot.jpg trunk/python-ogre/demos/media_extra/shaders/RenderMonkey/yuv2rgb.rfx trunk/python-ogre/demos/media_extra/shaders/theora_shaders.program trunk/python-ogre/demos/media_extra/shaders/yuv2rgb.glsl trunk/python-ogre/demos/media_extra/shaders/yuv2rgb.hlsl trunk/python-ogre/demos/mygui/ trunk/python-ogre/demos/mygui/Demo_MyGUI01.py trunk/python-ogre/demos/ogre/tests/Test_MovableObjectFactory.py trunk/python-ogre/demos/ogreode/Demo_Tri.py trunk/python-ogre/demos/plsm2/TerrainGenerator.cfg trunk/python-ogre/demos/plsm2/datasrcs/ trunk/python-ogre/demos/plsm2/datasrcs/alpes.raw trunk/python-ogre/demos/plsm2/datasrcs/hf129_3.png trunk/python-ogre/demos/plsm2/gui/ trunk/python-ogre/demos/plsm2/gui/CommonFileDialog.layout trunk/python-ogre/demos/plsm2/gui/FogSettingsDialog.xml trunk/python-ogre/demos/plsm2/gui/Kopie van Imageset.xsd trunk/python-ogre/demos/plsm2/gui/Kopie van WindowsLook.imageset trunk/python-ogre/demos/plsm2/gui/LoadTerrainWindow.layout trunk/python-ogre/demos/plsm2/gui/MapEditorActionBar.layout trunk/python-ogre/demos/plsm2/gui/MapEditorFogSettingsDialog.layout trunk/python-ogre/demos/plsm2/gui/MapEditorLibnoiseWindow.layout trunk/python-ogre/demos/plsm2/gui/MapEditorLoadTerrainWindow.layout trunk/python-ogre/demos/plsm2/gui/MapEditorMainWindow.layout trunk/python-ogre/demos/plsm2/gui/MapEditorMorphWindow.layout trunk/python-ogre/demos/plsm2/gui/MapEditorNewTerrainWindow.layout trunk/python-ogre/demos/plsm2/gui/MapEditorTabWindow.layout trunk/python-ogre/demos/plsm2/gui/MapEditorTextureWindow.layout trunk/python-ogre/demos/plsm2/gui/Marti.imageset trunk/python-ogre/demos/plsm2/gui/Marti.looknfeel trunk/python-ogre/demos/plsm2/gui/Marti.scheme trunk/python-ogre/demos/plsm2/gui/Marti.tga trunk/python-ogre/demos/plsm2/gui/NewTerrainWindow.layout trunk/python-ogre/demos/plsm2/maptool.cfg trunk/python-ogre/demos/plsm2/materials/ trunk/python-ogre/demos/plsm2/materials/programs/ trunk/python-ogre/demos/plsm2/materials/programs/DecompressShadowReceiver.cg trunk/python-ogre/demos/plsm2/materials/programs/DecompressShadowReceiver.program trunk/python-ogre/demos/plsm2/materials/programs/DecompressSplat.cg trunk/python-ogre/demos/plsm2/materials/programs/DecompressSplat.program trunk/python-ogre/demos/plsm2/materials/programs/DecompressSplatShader.cg trunk/python-ogre/demos/plsm2/materials/programs/DecompressSplatShader.program trunk/python-ogre/demos/plsm2/materials/programs/DecompressVertex.cg trunk/python-ogre/demos/plsm2/materials/programs/DecompressVertex.program trunk/python-ogre/demos/plsm2/materials/programs/PLAmbientVP.cg trunk/python-ogre/demos/plsm2/materials/programs/PLDecompressAmbientVP.cg trunk/python-ogre/demos/plsm2/materials/programs/PLDecompressDirectionalVP2.cg trunk/python-ogre/demos/plsm2/materials/programs/PLDecompressPointVP2High.cg trunk/python-ogre/demos/plsm2/materials/programs/PLDecompressPointVP2Med.cg trunk/python-ogre/demos/plsm2/materials/programs/PLDecompressUnlitVP2.cg trunk/python-ogre/demos/plsm2/materials/programs/PLDirectionalFP2.cg trunk/python-ogre/demos/plsm2/materials/programs/PLDirectionalVP2.cg trunk/python-ogre/demos/plsm2/materials/programs/PLPointFP2High.cg trunk/python-ogre/demos/plsm2/materials/programs/PLPointFP2Med.cg trunk/python-ogre/demos/plsm2/materials/programs/PLPointVP2High.cg trunk/python-ogre/demos/plsm2/materials/programs/PLPointVP2Med.cg trunk/python-ogre/demos/plsm2/materials/programs/PLShaders.program trunk/python-ogre/demos/plsm2/materials/programs/PLSplatDirectionalFP2.cg trunk/python-ogre/demos/plsm2/materials/programs/PLSplatPointFP2High.cg trunk/python-ogre/demos/plsm2/materials/programs/PLSplatPointFP2Med.cg trunk/python-ogre/demos/plsm2/materials/programs/PLSplatUnlitFP2.cg trunk/python-ogre/demos/plsm2/materials/programs/PLUnlitFP2.cg trunk/python-ogre/demos/plsm2/materials/programs/PLUnlitVP2.cg trunk/python-ogre/demos/plsm2/materials/programs/Readme.txt trunk/python-ogre/demos/plsm2/materials/programs/ShadowReceiver.cg trunk/python-ogre/demos/plsm2/materials/programs/ShadowReceiver.program trunk/python-ogre/demos/plsm2/materials/programs/SlopeSplat.cg trunk/python-ogre/demos/plsm2/materials/programs/Splat.cg trunk/python-ogre/demos/plsm2/materials/programs/Splat.program trunk/python-ogre/demos/plsm2/materials/programs/SplatShader.cg trunk/python-ogre/demos/plsm2/materials/programs/SplatShader.program trunk/python-ogre/demos/plsm2/materials/programs/SplattingShaderCov.cg trunk/python-ogre/demos/plsm2/materials/programs/SplattingShaderCov.program trunk/python-ogre/demos/plsm2/materials/programs/SplattingShaderCovDepth.hlsl trunk/python-ogre/demos/plsm2/materials/programs/SplattingShaderCovDepth.program trunk/python-ogre/demos/plsm2/materials/programs/SplattingShaderCovDepthFP.hlsl trunk/python-ogre/demos/plsm2/materials/programs/SplattingShaderCovDepthVP.hlsl trunk/python-ogre/demos/plsm2/materials/scripts/ trunk/python-ogre/demos/plsm2/materials/scripts/BaseTexture.material trunk/python-ogre/demos/plsm2/materials/scripts/MapEditor-Circle.material trunk/python-ogre/demos/plsm2/materials/scripts/MyTree.material trunk/python-ogre/demos/plsm2/materials/scripts/PLSplattingShaderLit.material trunk/python-ogre/demos/plsm2/materials/scripts/PLSplattingShaderLitDecompress.material trunk/python-ogre/demos/plsm2/materials/scripts/PLSplattingShaderUnlit.material trunk/python-ogre/demos/plsm2/materials/scripts/PLSplattingShaderUnlitDecompress.material trunk/python-ogre/demos/plsm2/materials/scripts/PagingLandScape.material trunk/python-ogre/demos/plsm2/materials/scripts/PagingLandScapeTemplate.material trunk/python-ogre/demos/plsm2/materials/scripts/Splatting.material trunk/python-ogre/demos/plsm2/materials/scripts/Splatting2.material trunk/python-ogre/demos/plsm2/materials/scripts/Splatting3.material trunk/python-ogre/demos/plsm2/materials/scripts/Splatting4.material trunk/python-ogre/demos/plsm2/materials/scripts/Splatting5.material trunk/python-ogre/demos/plsm2/materials/scripts/Splatting6.material trunk/python-ogre/demos/plsm2/materials/scripts/Splatting7.material trunk/python-ogre/demos/plsm2/materials/scripts/SplattingShader.material trunk/python-ogre/demos/plsm2/materials/scripts/SplattingShaderCov.material trunk/python-ogre/demos/plsm2/materials/scripts/colors.material trunk/python-ogre/demos/plsm2/materials/textures/ trunk/python-ogre/demos/plsm2/materials/textures/Detail3.jpg trunk/python-ogre/demos/plsm2/materials/textures/landscape_detail.jpg trunk/python-ogre/demos/plsm2/materials/textures/splatting_grass.png trunk/python-ogre/demos/plsm2/materials/textures/splatting_rock.png trunk/python-ogre/demos/plsm2/materials/textures/splatting_sand.png trunk/python-ogre/demos/plsm2/materials/textures/splatting_snow.png trunk/python-ogre/demos/plsm2/materials/textures/terrain.0.0.png trunk/python-ogre/demos/plsm2/materials/textures/terrain_texture.0.0.jpg trunk/python-ogre/demos/plsm2/materials/textures/tree1leaves.png trunk/python-ogre/demos/plsm2/materials/textures/tree1wood.jpg trunk/python-ogre/demos/plsm2/materials/textures/tree2leaves.png trunk/python-ogre/demos/plsm2/materials/textures/tree3leaves.png trunk/python-ogre/demos/plsm2/materials/textures/yellow.PNG trunk/python-ogre/demos/plsm2/media/ trunk/python-ogre/demos/plsm2/media/paginglandscape2/ trunk/python-ogre/demos/plsm2/media/paginglandscape2/TerrainGenerator.cfg trunk/python-ogre/demos/plsm2/media/paginglandscape2/datasrcs/ trunk/python-ogre/demos/plsm2/media/paginglandscape2/datasrcs/.keepme trunk/python-ogre/demos/plsm2/media/paginglandscape2/datasrcs/alpes.raw trunk/python-ogre/demos/plsm2/media/paginglandscape2/datasrcs/hf129_3.png trunk/python-ogre/demos/plsm2/media/paginglandscape2/gui/ trunk/python-ogre/demos/plsm2/media/paginglandscape2/gui/CommonFileDialog.layout trunk/python-ogre/demos/plsm2/media/paginglandscape2/gui/FogSettingsDialog.xml trunk/python-ogre/demos/plsm2/media/paginglandscape2/gui/Kopie van Imageset.xsd trunk/python-ogre/demos/plsm2/media/paginglandscape2/gui/Kopie van WindowsLook.imageset trunk/python-ogre/demos/plsm2/media/paginglandscape2/gui/LoadTerrainWindow.layout trunk/python-ogre/demos/plsm2/media/paginglandscape2/gui/MapEditorActionBar.layout trunk/python-ogre/demos/plsm2/media/paginglandscape2/gui/MapEditorFogSettingsDialog.layout trunk/python-ogre/demos/plsm2/media/paginglandscape2/gui/MapEditorLibnoiseWindow.layout trunk/python-ogre/demos/plsm2/media/paginglandscape2/gui/MapEditorLoadTerrainWindow.layout trunk/python-ogre/demos/plsm2/media/paginglandscape2/gui/MapEditorMainWindow.layout trunk/python-ogre/demos/plsm2/media/paginglandscape2/gui/MapEditorMorphWindow.layout trunk/python-ogre/demos/plsm2/media/paginglandscape2/gui/MapEditorNewTerrainWindow.layout trunk/python-ogre/demos/plsm2/media/paginglandscape2/gui/MapEditorTabWindow.layout trunk/python-ogre/demos/plsm2/media/paginglandscape2/gui/MapEditorTextureWindow.layout trunk/python-ogre/demos/plsm2/media/paginglandscape2/gui/Marti.imageset trunk/python-ogre/demos/plsm2/media/paginglandscape2/gui/Marti.looknfeel trunk/python-ogre/demos/plsm2/media/paginglandscape2/gui/Marti.scheme trunk/python-ogre/demos/plsm2/media/paginglandscape2/gui/Marti.tga trunk/python-ogre/demos/plsm2/media/paginglandscape2/gui/NewTerrainWindow.layout trunk/python-ogre/demos/plsm2/media/paginglandscape2/maptool.cfg trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/ trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/programs/ trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/programs/DecompressShadowReceiver.cg trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/programs/DecompressShadowReceiver.program trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/programs/DecompressSplat.cg trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/programs/DecompressSplat.program trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/programs/DecompressSplatShader.cg trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/programs/DecompressSplatShader.program trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/programs/DecompressVertex.cg trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/programs/DecompressVertex.program trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/programs/PLAmbientVP.cg trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/programs/PLDecompressAmbientVP.cg trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/programs/PLDecompressDirectionalVP2.cg trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/programs/PLDecompressPointVP2High.cg trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/programs/PLDecompressPointVP2Med.cg trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/programs/PLDecompressUnlitVP2.cg trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/programs/PLDirectionalFP2.cg trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/programs/PLDirectionalVP2.cg trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/programs/PLPointFP2High.cg trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/programs/PLPointFP2Med.cg trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/programs/PLPointVP2High.cg trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/programs/PLPointVP2Med.cg trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/programs/PLShaders.program trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/programs/PLSplatDirectionalFP2.cg trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/programs/PLSplatPointFP2High.cg trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/programs/PLSplatPointFP2Med.cg trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/programs/PLSplatUnlitFP2.cg trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/programs/PLUnlitFP2.cg trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/programs/PLUnlitVP2.cg trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/programs/Readme.txt trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/programs/ShadowReceiver.cg trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/programs/ShadowReceiver.program trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/programs/SlopeSplat.cg trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/programs/Splat.cg trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/programs/Splat.program trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/programs/SplatShader.cg trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/programs/SplatShader.program trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/programs/SplattingShaderCov.cg trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/programs/SplattingShaderCov.program trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/programs/SplattingShaderCovDepth.hlsl trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/programs/SplattingShaderCovDepth.program trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/programs/SplattingShaderCovDepthFP.hlsl trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/programs/SplattingShaderCovDepthVP.hlsl trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/scripts/ trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/scripts/BaseTexture.material trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/scripts/MapEditor-Circle.material trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/scripts/MyTree.material trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/scripts/PLSplattingShaderLit.material trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/scripts/PLSplattingShaderLitDecompress.material trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/scripts/PLSplattingShaderUnlit.material trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/scripts/PLSplattingShaderUnlitDecompress.material trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/scripts/PagingLandScape.material trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/scripts/PagingLandScapeTemplate.material trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/scripts/Splatting.material trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/scripts/Splatting2.material trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/scripts/Splatting3.material trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/scripts/Splatting4.material trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/scripts/Splatting5.material trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/scripts/Splatting6.material trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/scripts/Splatting7.material trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/scripts/SplattingShader.material trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/scripts/SplattingShaderCov.material trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/scripts/colors.material trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/textures/ trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/textures/Detail3.jpg trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/textures/landscape_detail.jpg trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/textures/splatting_grass.png trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/textures/splatting_rock.png trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/textures/splatting_sand.png trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/textures/splatting_snow.png trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/textures/terrain.0.0.png trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/textures/terrain_texture.0.0.jpg trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/textures/tree1leaves.png trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/textures/tree1wood.jpg trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/textures/tree2leaves.png trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/textures/tree3leaves.png trunk/python-ogre/demos/plsm2/media/paginglandscape2/materials/textures/yellow.PNG trunk/python-ogre/demos/plsm2/media/paginglandscape2/models/ trunk/python-ogre/demos/plsm2/media/paginglandscape2/models/MyPineTree.mesh trunk/python-ogre/demos/plsm2/media/paginglandscape2/models/MySecondTree.mesh trunk/python-ogre/demos/plsm2/media/paginglandscape2/models/MyTree.mesh trunk/python-ogre/demos/plsm2/media/paginglandscape2/overlays/ trunk/python-ogre/demos/plsm2/media/paginglandscape2/overlays/DebugOverlay.overlay trunk/python-ogre/demos/plsm2/media/paginglandscape2/overlays/PagingLandScape.overlay trunk/python-ogre/demos/plsm2/media/paginglandscape2/overlays/PagingLandScape2.overlay trunk/python-ogre/demos/plsm2/media/paginglandscape2/paginglandscape2.cfg trunk/python-ogre/demos/plsm2/media/paginglandscape2/terrains/ trunk/python-ogre/demos/plsm2/media/paginglandscape2/terrains/Alpes.cfg trunk/python-ogre/demos/plsm2/media/paginglandscape2/terrains/Alpes.gen.cfg trunk/python-ogre/demos/plsm2/media/paginglandscape2/terrains/TsmTerrain.cfg trunk/python-ogre/demos/plsm2/media/paginglandscape2/terrains/TsmTerrain.gen.cfg trunk/python-ogre/demos/plsm2/media/paginglandscape2/terrains/gcanyon_height_4k2k.cfg trunk/python-ogre/demos/plsm2/media/paginglandscape2/terrains/gcanyon_height_4k2k.gen.cfg trunk/python-ogre/demos/plsm2/media/paginglandscape2/terrains/hf_129_3.cfg trunk/python-ogre/demos/plsm2/media/paginglandscape2/terrains/hf_129_3.gen.cfg trunk/python-ogre/demos/plsm2/media/paginglandscape2/terrains/ps_height_1k.cfg trunk/python-ogre/demos/plsm2/media/paginglandscape2/terrains/ps_height_1k_256.cfg trunk/python-ogre/demos/plsm2/media/paginglandscape2/terrains/puget_1k.gen.cfg trunk/python-ogre/demos/plsm2/media/paginglandscape2/terrains/puget_1k_256.gen.cfg trunk/python-ogre/demos/plsm2/media/paginglandscape2/terrains/puget_1ksimplesplit.gen.cfg trunk/python-ogre/demos/plsm2/media/paginglandscape2/terrains/template.default.cfg trunk/python-ogre/demos/plsm2/media/paginglandscape2/terrains/template.default.gen.cfg trunk/python-ogre/demos/plsm2/media/paginglandscape2/terrains/terragen16bits.cfg trunk/python-ogre/demos/plsm2/media/paginglandscape2/terrains/terragen16bits.gen.cfg trunk/python-ogre/demos/plsm2/models/ trunk/python-ogre/demos/plsm2/models/MyPineTree.mesh trunk/python-ogre/demos/plsm2/models/MySecondTree.mesh trunk/python-ogre/demos/plsm2/models/MyTree.mesh trunk/python-ogre/demos/plsm2/overlays/ trunk/python-ogre/demos/plsm2/overlays/DebugOverlay.overlay trunk/python-ogre/demos/plsm2/overlays/PagingLandScape.overlay trunk/python-ogre/demos/plsm2/overlays/PagingLandScape2.overlay trunk/python-ogre/demos/plsm2/paginglandscape2.cfg trunk/python-ogre/demos/plsm2/terrains/ trunk/python-ogre/demos/plsm2/terrains/Alpes.cfg trunk/python-ogre/demos/plsm2/terrains/Alpes.gen.cfg trunk/python-ogre/demos/plsm2/terrains/TsmTerrain.cfg trunk/python-ogre/demos/plsm2/terrains/TsmTerrain.gen.cfg trunk/python-ogre/demos/plsm2/terrains/gcanyon_height_4k2k.cfg trunk/python-ogre/demos/plsm2/terrains/gcanyon_height_4k2k.gen.cfg trunk/python-ogre/demos/plsm2/terrains/hf_129_3.cfg trunk/python-ogre/demos/plsm2/terrains/hf_129_3.gen.cfg trunk/python-ogre/demos/plsm2/terrains/ps_height_1k.cfg trunk/python-ogre/demos/plsm2/terrains/ps_height_1k_256.cfg trunk/python-ogre/demos/plsm2/terrains/puget_1k.gen.cfg trunk/python-ogre/demos/plsm2/terrains/puget_1k_256.gen.cfg trunk/python-ogre/demos/plsm2/terrains/puget_1ksimplesplit.gen.cfg trunk/python-ogre/demos/plsm2/terrains/template.default.cfg trunk/python-ogre/demos/plsm2/terrains/template.default.gen.cfg trunk/python-ogre/demos/plsm2/terrains/terragen16bits.cfg trunk/python-ogre/demos/plsm2/terrains/terragen16bits.gen.cfg trunk/python-ogre/demos/tilemanager/ trunk/python-ogre/demos/tilemanager/Demo_Tile_Terrain.py trunk/python-ogre/demos/wxOgre/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2009-10-12 03:44:06
|
Revision: 1004 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=1004&view=rev Author: andy_miller Date: 2009-10-12 03:43:58 +0000 (Mon, 12 Oct 2009) Log Message: ----------- QuickGUI 9.09 support Added moduleLibs variable to environment classes to know what dll's are needed in the module directories at install time (ie boost in ode etc) Added UpdateDlls.py in the scripts directory to used the modulelibs functionality Modified Paths: -------------- trunk/python-ogre/PythonOgreConfig_nt.py trunk/python-ogre/code_generators/quickgui/generate_code.py trunk/python-ogre/code_generators/quickgui/python_quickgui.h trunk/python-ogre/demos/particleuniverse/ogre.cfg trunk/python-ogre/environment.py trunk/python-ogre/scripts/UnitTest.py trunk/python-ogre/setup.py Added Paths: ----------- trunk/python-ogre/ThirdParty/quickgui/ trunk/python-ogre/ThirdParty/quickgui/QuickGUI.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIAnchors.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIBorderEnums.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIBrush.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIBrush.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIBrushEnums.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIButton.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIButton.h trunk/python-ogre/ThirdParty/quickgui/QuickGUICharacter.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUICharacter.h trunk/python-ogre/ThirdParty/quickgui/QuickGUICheckBox.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUICheckBox.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIColorPicker.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIColorPicker.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIComboBox.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIComboBox.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIComponentWidget.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIComponentWidget.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIConsole.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIConsole.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIConsoleEnums.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIConsoleInputHandler.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIContainerWidget.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIContainerWidget.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIContextMenu.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIContextMenu.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIDefinitionProperty.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIDefinitionProperty.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIDesc.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIDescFactory.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIDescManager.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIDescManager.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIEventArgs.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIEventHandlerManager.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIEventHandlerManager.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIEventHandlerPointer.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIEventTypes.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIException.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIException.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIExportDLL.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIFactoryManager.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIFactoryManager.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIForwardDeclaredDesc.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIForwardDeclaredDesc.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIHScrollBar.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIHScrollBar.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/QuickGUIList.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIList.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIListImageItem.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIListImageItem.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIListItem.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIListItem.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIListPanelItem.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIListPanelItem.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIListTextItem.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIListTextItem.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIManager.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIManager.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIMenu.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIMenu.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIMenuImageItem.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIMenuImageItem.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIMenuItem.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIMenuItem.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIMenuPanel.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIMenuPanel.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIMenuTextItem.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIMenuTextItem.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIModalWindow.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIModalWindow.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/QuickGUIOgreEquivalents.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIOgreEquivalents.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIPadding.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/QuickGUIProgressBar.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIProgressBar.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIProgressBarEnums.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIPropertyGrid.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIPropertyGrid.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIPropertyGridBoolProperty.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIPropertyGridBoolProperty.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIPropertyGridComboBoxProperty.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIPropertyGridComboBoxProperty.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIPropertyGridItem.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIPropertyGridItem.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIPropertyGridSection.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIPropertyGridSection.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIPropertyGridTextProperty.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIPropertyGridTextProperty.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIRadioButton.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIRadioButton.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/QuickGUIScriptDefinition.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIScriptDefinition.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIScriptNode.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIScriptNode.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIScriptProperty.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIScriptReader.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIScriptReader.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIScriptToken.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIScriptWriter.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIScriptWriter.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIScrollBarButtonLayouts.h trunk/python-ogre/ThirdParty/quickgui/QuickGUISerialBase.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUISerialBase.h trunk/python-ogre/ThirdParty/quickgui/QuickGUISerialReader.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUISerialReader.h trunk/python-ogre/ThirdParty/quickgui/QuickGUISerialWriter.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUISerialWriter.h trunk/python-ogre/ThirdParty/quickgui/QuickGUISerializable.h trunk/python-ogre/ThirdParty/quickgui/QuickGUISheet.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUISheet.h trunk/python-ogre/ThirdParty/quickgui/QuickGUISheetManager.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUISheetManager.h trunk/python-ogre/ThirdParty/quickgui/QuickGUISize.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUISize.h trunk/python-ogre/ThirdParty/quickgui/QuickGUISkinDefinition.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUISkinDefinition.h trunk/python-ogre/ThirdParty/quickgui/QuickGUISkinDefinitionManager.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUISkinDefinitionManager.h trunk/python-ogre/ThirdParty/quickgui/QuickGUISkinElement.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUISkinElement.h trunk/python-ogre/ThirdParty/quickgui/QuickGUISkinReference.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUISkinReference.h trunk/python-ogre/ThirdParty/quickgui/QuickGUISkinType.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUISkinType.h trunk/python-ogre/ThirdParty/quickgui/QuickGUISkinTypeManager.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUISkinTypeManager.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIStringConverter.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIStringConverter.h trunk/python-ogre/ThirdParty/quickgui/QuickGUITab.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUITab.h trunk/python-ogre/ThirdParty/quickgui/QuickGUITabControl.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUITabControl.h trunk/python-ogre/ThirdParty/quickgui/QuickGUITabPage.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUITabPage.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIText.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIText.h trunk/python-ogre/ThirdParty/quickgui/QuickGUITextAlignment.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/QuickGUITextCursor.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUITextCursor.h trunk/python-ogre/ThirdParty/quickgui/QuickGUITextInputValidator.h trunk/python-ogre/ThirdParty/quickgui/QuickGUITextLine.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUITextLine.h trunk/python-ogre/ThirdParty/quickgui/QuickGUITextUser.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUITextUser.h trunk/python-ogre/ThirdParty/quickgui/QuickGUITimer.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUITimer.h trunk/python-ogre/ThirdParty/quickgui/QuickGUITimerManager.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUITimerManager.h trunk/python-ogre/ThirdParty/quickgui/QuickGUITitleBar.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUITitleBar.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIToolBar.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIToolBar.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIToolBarEnums.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIToolBarItem.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIToolBarItem.h trunk/python-ogre/ThirdParty/quickgui/QuickGUITreeView.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUITreeView.h trunk/python-ogre/ThirdParty/quickgui/QuickGUITreeViewCheckBoxNode.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUITreeViewCheckBoxNode.h trunk/python-ogre/ThirdParty/quickgui/QuickGUITreeViewNode.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUITreeViewNode.h trunk/python-ogre/ThirdParty/quickgui/QuickGUITreeViewRadioButtonNode.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUITreeViewRadioButtonNode.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIUVRect.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIUVRect.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIVScrollBar.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIVScrollBar.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIVertex.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIWidget.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIWidget.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIWidgetFactory.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIWindow.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIWindow.h trunk/python-ogre/scripts/UpdateDLLs.py This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2009-10-25 00:43:29
|
Revision: 1014 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=1014&view=rev Author: andy_miller Date: 2009-10-25 00:43:12 +0000 (Sun, 25 Oct 2009) Log Message: ----------- Fixes to ogre::Any functionality -- now can create base types and use python objects Fix to ogrenewt2 -- constructor on Body now exposes Removing QuickGUI 9.09 code (ready to upgrade) Enhanced test_userdefinedobject to show new ogre::Any functionality Modified Paths: -------------- trunk/python-ogre/PythonOgreConfig_posix.py trunk/python-ogre/ReportVersion.py trunk/python-ogre/code_generators/ogre/generate_code.py trunk/python-ogre/code_generators/ogre/hand_made_wrappers.py trunk/python-ogre/code_generators/ogre/python_ogre.h trunk/python-ogre/code_generators/ogre/python_ogre_sizeof.h trunk/python-ogre/demos/ogre/tests/Test_userDefinedObject.py trunk/python-ogre/environment.py Removed Paths: ------------- trunk/python-ogre/ThirdParty/quickgui/QuickGUI.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIAnchors.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIBorderEnums.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIBrush.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIBrush.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIBrushEnums.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIButton.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIButton.h trunk/python-ogre/ThirdParty/quickgui/QuickGUICharacter.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUICharacter.h trunk/python-ogre/ThirdParty/quickgui/QuickGUICheckBox.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUICheckBox.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIColorPicker.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIColorPicker.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIComboBox.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIComboBox.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIComponentWidget.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIComponentWidget.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIConsole.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIConsole.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIConsoleEnums.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIConsoleInputHandler.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIContainerWidget.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIContainerWidget.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIContextMenu.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIContextMenu.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIDefinitionProperty.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIDefinitionProperty.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIDesc.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIDescFactory.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIDescManager.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIDescManager.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIEventArgs.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIEventHandlerManager.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIEventHandlerManager.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIEventHandlerPointer.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIEventTypes.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIException.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIException.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIExportDLL.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIFactoryManager.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIFactoryManager.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIForwardDeclaredDesc.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIForwardDeclaredDesc.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIHScrollBar.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIHScrollBar.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/QuickGUIList.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIList.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIListImageItem.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIListImageItem.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIListItem.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIListItem.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIListPanelItem.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIListPanelItem.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIListTextItem.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIListTextItem.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIManager.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIManager.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIMenu.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIMenu.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIMenuImageItem.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIMenuImageItem.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIMenuItem.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIMenuItem.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIMenuPanel.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIMenuPanel.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIMenuTextItem.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIMenuTextItem.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIModalWindow.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIModalWindow.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/QuickGUIOgreEquivalents.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIOgreEquivalents.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIPadding.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/QuickGUIProgressBar.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIProgressBar.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIProgressBarEnums.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIPropertyGrid.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIPropertyGrid.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIPropertyGridBoolProperty.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIPropertyGridBoolProperty.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIPropertyGridComboBoxProperty.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIPropertyGridComboBoxProperty.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIPropertyGridItem.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIPropertyGridItem.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIPropertyGridSection.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIPropertyGridSection.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIPropertyGridTextProperty.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIPropertyGridTextProperty.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIRadioButton.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIRadioButton.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/QuickGUIScriptDefinition.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIScriptDefinition.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIScriptNode.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIScriptNode.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIScriptProperty.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIScriptReader.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIScriptReader.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIScriptToken.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIScriptWriter.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIScriptWriter.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIScrollBarButtonLayouts.h trunk/python-ogre/ThirdParty/quickgui/QuickGUISerialBase.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUISerialBase.h trunk/python-ogre/ThirdParty/quickgui/QuickGUISerialReader.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUISerialReader.h trunk/python-ogre/ThirdParty/quickgui/QuickGUISerialWriter.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUISerialWriter.h trunk/python-ogre/ThirdParty/quickgui/QuickGUISerializable.h trunk/python-ogre/ThirdParty/quickgui/QuickGUISheet.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUISheet.h trunk/python-ogre/ThirdParty/quickgui/QuickGUISheetManager.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUISheetManager.h trunk/python-ogre/ThirdParty/quickgui/QuickGUISize.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUISize.h trunk/python-ogre/ThirdParty/quickgui/QuickGUISkinDefinition.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUISkinDefinition.h trunk/python-ogre/ThirdParty/quickgui/QuickGUISkinDefinitionManager.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUISkinDefinitionManager.h trunk/python-ogre/ThirdParty/quickgui/QuickGUISkinElement.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUISkinElement.h trunk/python-ogre/ThirdParty/quickgui/QuickGUISkinReference.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUISkinReference.h trunk/python-ogre/ThirdParty/quickgui/QuickGUISkinType.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUISkinType.h trunk/python-ogre/ThirdParty/quickgui/QuickGUISkinTypeManager.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUISkinTypeManager.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIStringConverter.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIStringConverter.h trunk/python-ogre/ThirdParty/quickgui/QuickGUITab.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUITab.h trunk/python-ogre/ThirdParty/quickgui/QuickGUITabControl.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUITabControl.h trunk/python-ogre/ThirdParty/quickgui/QuickGUITabPage.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUITabPage.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIText.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIText.h trunk/python-ogre/ThirdParty/quickgui/QuickGUITextAlignment.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/QuickGUITextCursor.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUITextCursor.h trunk/python-ogre/ThirdParty/quickgui/QuickGUITextInputValidator.h trunk/python-ogre/ThirdParty/quickgui/QuickGUITextLine.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUITextLine.h trunk/python-ogre/ThirdParty/quickgui/QuickGUITextUser.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUITextUser.h trunk/python-ogre/ThirdParty/quickgui/QuickGUITimer.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUITimer.h trunk/python-ogre/ThirdParty/quickgui/QuickGUITimerManager.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUITimerManager.h trunk/python-ogre/ThirdParty/quickgui/QuickGUITitleBar.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUITitleBar.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIToolBar.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIToolBar.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIToolBarEnums.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIToolBarItem.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIToolBarItem.h trunk/python-ogre/ThirdParty/quickgui/QuickGUITreeView.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUITreeView.h trunk/python-ogre/ThirdParty/quickgui/QuickGUITreeViewCheckBoxNode.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUITreeViewCheckBoxNode.h trunk/python-ogre/ThirdParty/quickgui/QuickGUITreeViewNode.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUITreeViewNode.h trunk/python-ogre/ThirdParty/quickgui/QuickGUITreeViewRadioButtonNode.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUITreeViewRadioButtonNode.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIUVRect.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIUVRect.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIVScrollBar.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIVScrollBar.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIVertex.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIWidget.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIWidget.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIWidgetFactory.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIWindow.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIWindow.h This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2008-10-14 14:12:11
|
Revision: 757 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=757&view=rev Author: andy_miller Date: 2008-10-14 14:11:52 +0000 (Tue, 14 Oct 2008) Log Message: ----------- Changes to fix smart pointers in Ogre generation Improvements to Quickgui to remove static const string variables that didn't have default values Helper functions to make Triangle and Complex mesh objects in OgreODE Bug fix to sample framework (recently introduced) that has lead to an API change in Ogre See the Changelog.txt for details Modified Paths: -------------- trunk/python-ogre/ChangeLog.txt trunk/python-ogre/code_generators/common_utils/__init__.py trunk/python-ogre/code_generators/common_utils/shared_ptr.py trunk/python-ogre/code_generators/ogre/generate_code.py trunk/python-ogre/code_generators/ogre/python_ogre.h trunk/python-ogre/code_generators/ogre/python_ogre_aliases.h trunk/python-ogre/code_generators/ogreode/generate_code.py trunk/python-ogre/code_generators/ogreode/hand_made_wrappers.py trunk/python-ogre/code_generators/quickgui/generate_code.py trunk/python-ogre/demos/ogre/CompositorDemo_FrameListener.py trunk/python-ogre/demos/ogre/Demo_Compositor.py trunk/python-ogre/packages_2.5/ogre/renderer/OGRE/sf_OIS.py Modified: trunk/python-ogre/ChangeLog.txt =================================================================== --- trunk/python-ogre/ChangeLog.txt 2008-10-07 13:43:51 UTC (rev 756) +++ trunk/python-ogre/ChangeLog.txt 2008-10-14 14:11:52 UTC (rev 757) @@ -1,11 +1,17 @@ xxxx xx 2008 : Release 1.6.0 xxxx ================================== +Fixed QuickGui with static consts not having default value and causing a boost load error +Removed constant 'vars' and replaced them with properties that return a copy of the object. Specifically ZERO, UNIT_X, + UNIT_Y, UNIT_Z, Black, White, Red, Green, Blue in Classes ColourValue, MatrixX, Quaternion and VectorX. + this is due to the fact they were actually passing a pointer to a non constant (mutable) variable which + caused very annoying bugs. So now Ogre.Vector3.ZERO has to be replaced with Ogre.Vector3().ZERO etc... + Changed all code generation modules to use the common_code Auto_Functional_Transformation function Fix auto transform funtion to not wrap reference arguments that are const (bug) Fix auto transform funtion to handle extern free functions Removed 'asClassType' functions as they didn't actually do anything (and are not needed) Added PSSM camera functionality - it was missing from the sizeof.h file -Added helper functions to OgreODE as constructors needed hand wrapping +Added helper functions to OgreODE as constructors needed hand wrapping (makeTriangleMeshGeometry, makeConvexGeometry) Fix to Py++ to handle bool/int references correctly (renderQueueListener functions) Simplified Ogre patch file requirements due to fix in Py++ for bool refs Fixed a couple of incorrect versions in environment.py Modified: trunk/python-ogre/code_generators/common_utils/__init__.py =================================================================== --- trunk/python-ogre/code_generators/common_utils/__init__.py 2008-10-07 13:43:51 UTC (rev 756) +++ trunk/python-ogre/code_generators/common_utils/__init__.py 2008-10-14 14:11:52 UTC (rev 757) @@ -67,6 +67,7 @@ po = ".".join( (env.PythonOgreMajorVersion,env.PythonOgreMinorVersion, env.PythonOgrePatchVersion) ) t = datetime.datetime.now().isoformat(' ').strip() + t = datetime.date.today().isoformat() # making this less granular so it doesn't change 'every' time I do a regenerate v = envClass.version s = getSVNVersion( env ) detail = "_".join( (po,s,envClass.name, v, t) ) @@ -162,7 +163,7 @@ continue except: print "**** Error in unnamed_classes", mvar - + print "Fixing Unnamed Class:", unnamed_cls, mvar, names_parent.name named_parent.add_code( template % dict( ns=namespace, mvar=mvar.name, parent=named_parent.name ) ) def set_declaration_aliases(global_ns, aliases): @@ -553,7 +554,7 @@ GetterReg = \ """ add_property( // special :) - "%(variable_name)s_Copy" + "%(variable_name)s" // _Copy , fget_Special_%(variable_name)s ( &%(getter_name)s ) , "special get property, built to access const variable" ) """ @@ -579,7 +580,8 @@ known = True if not known: ## OK so it must be mutable so lets fix it.. -# # # # v.exclude() ## remove it as a variable + v.exclude() ## remove it as a variable + print "Excluding Problem Const", cls.name, v return_type, ignore = v.type.decl_string.split(' ',1) # remove cont etc from decl return_type = return_type[2:] # remove leading :: variable_name = v.name Modified: trunk/python-ogre/code_generators/common_utils/shared_ptr.py =================================================================== --- trunk/python-ogre/code_generators/common_utils/shared_ptr.py 2008-10-07 13:43:51 UTC (rev 756) +++ trunk/python-ogre/code_generators/common_utils/shared_ptr.py 2008-10-14 14:11:52 UTC (rev 757) @@ -65,6 +65,8 @@ def expose_single( self, sp_instantiation ): sp_instantiation.exclude() # we don't want to export SharedPtr< X > + print "SharedPointer Excluded", sp_instantiation, sp_instantiation.decl_string +# print dir (sp_instantiation) sp_instantiation.disable_warnings( messages.W1040 ) pointee = self.get_pointee( sp_instantiation ) @@ -74,6 +76,7 @@ assert 1 == len( sp_instantiation.derived ) sp_derived = sp_instantiation.derived[0].related_class sp_derived.exclude() + print "SharedPointer Excluded Derived", sp_derived, pointee sp_derived.disable_warnings( messages.W1040 ) if Version1: Modified: trunk/python-ogre/code_generators/ogre/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/ogre/generate_code.py 2008-10-07 13:43:51 UTC (rev 756) +++ trunk/python-ogre/code_generators/ogre/generate_code.py 2008-10-14 14:11:52 UTC (rev 757) @@ -33,6 +33,7 @@ import hand_made_wrappers import register_exceptions +import pygccxml from pygccxml import parser from pygccxml import declarations from pyplusplus import messages @@ -49,6 +50,46 @@ import common_utils.ogre_properties as ogre_properties from common_utils import docit + + + +predefined_is_smart_ptr = declarations.smart_pointer_traits +class my_smart_ptr: + @staticmethod + def is_smart_pointer( v ): + t = v + if predefined_is_smart_ptr.is_smart_pointer( v ): + return True + v=t + v = declarations.type_traits.remove_alias( v ) + v = declarations.type_traits.remove_cv( v ) + v = declarations.type_traits.remove_declarated( v ) + if not isinstance( v, ( declarations.class_declaration_t , declarations.class_t ) ): + return False + if not declarations.is_class( v ): + return False + + cls = declarations.class_traits.get_declaration( v ) + if len(cls.bases) > 0: + for b in cls.bases: + r = b.related_class + if r.decl_string.startswith ( '::Ogre::SharedPtr<' ) : +# print "ANDY Smart Class:", v, cls, r.decl_string + return True + else: + if cls.name.startswith ( 'SharedPtr<' ) or cls.name.endswith( 'SharedPtr' ): +# print "Andy Smart 2", v, cls, cls.name + return True + return False + + @staticmethod + def value_type( type ): +# print "ANDY VALUE_TYPE", type + if my_smart_ptr.is_smart_pointer( type ): + return predefined_is_smart_ptr.value_type( type, False ) +pygccxml.declarations.smart_pointer_traits = my_smart_ptr + + HACK = True MAIN_NAMESPACE = 'Ogre' @@ -229,7 +270,7 @@ ## Remove private classes , and those that are internal to Ogre... private_decls = common_utils.private_decls_t(environment.ogre.include_dirs) for cls in main_ns.classes(): - print "MC:", cls +# print "MC:", cls if private_decls.is_private( cls ): cls.exclude() print '{*} class "%s" is marked as private' % cls.decl_string @@ -322,6 +363,7 @@ if type_or_decl.ignore == False and Expose: print "OPERATOR<<:", oper oper.include() + main_ns.class_('MaterialPtr').include() ############################################################ @@ -381,14 +423,8 @@ f=main_ns.class_('MeshManager').mem_fun('createBezierPatch') f.arguments[6]._set_default_value ( '::Ogre::PatchSurface::AUTO_LEVEL') f.arguments[7]._set_default_value ( '::Ogre::PatchSurface::AUTO_LEVEL') - print f - print f.arguments - print f.arguments[6] - print f.arguments[6].default_value - print dir(f.arguments[6]) + - - ## Functions that return objects we need to manage FunctionsToMemoryManage=[\ '::Ogre::VertexData::clone', @@ -873,25 +909,34 @@ def Set_Smart_Pointers( mb ): """ we need to identify 'smart pointers' which are any of the SharedPtr classes """ + knownSmartClasses= ['MaterialPtr', + 'CompositorPtr', + 'FontPtr', + 'GpuProgramPtr', + 'HardwareIndexBufferSharedPtr', + 'HardwarePixelBufferSharedPtr', + 'HardwareVertexBufferSharedPtr', + 'HighLevelGpuProgramPtr', + 'MeshPtr', + 'PatchMeshPtr', + 'SkeletonPtr', + 'TexturePtr', + ] for v in mb.variables(): if not declarations.is_class( v.type ): continue cls = declarations.class_traits.get_declaration( v.type ) + if cls.name.startswith( 'SharedPtr<' ): v.apply_smart_ptr_wa = True print "Applying Smart Pointer: ", v.name, " of class: ", cls.name elif cls.name.endswith( 'SharedPtr' ): v.apply_smart_ptr_wa = True print "Applying Smart Pointer: ", v.name, " of class: ", cls.name - - # now I want to get some specials, the are not classes so haven't been found so far - # this is potentially too broad brushed in it's approach but seems OK so far -- however if - # need bewe could check for specific classes - the current list being: - # - # InstancedGeometry,SubMeshLodGeometryLink,OptimisedSubMeshGeometry,SubMesh - # StaticGeometry,SubMeshLodGeometryLink,OptimisedSubMeshGeometry, - # RenderOperation,IndexData,EdgeListBuilder,Geometry,EdgeData,EdgeGroup - + elif cls.name in knownSmartClasses: + v.apply_smart_ptr_wa = True + print "Applying Smart Pointer: ", v.name, " of class: ", cls.name + # now for some specials by variable name.. known = ['indexBuffer', 'vertexData', 'indexData'] for c in mb.classes(): for v in c.variables(allow_empty = True ): @@ -899,7 +944,7 @@ v.apply_smart_ptr_wa = True print "Applying Smart Pointer (know): ", v.name, " of class: ", c.name - + #~ def Set_Exception(mb): #~ """We don't exclude Exception, because it contains functionality, that could #~ be useful to user. But, we will provide automatic exception translator @@ -1074,7 +1119,6 @@ FindProtectedVars ( mb ) - for cls in main_ns.classes(): if not cls.ignore: @@ -1104,7 +1148,7 @@ # hand_made_wrappers.apply( mb ) - + NoPropClasses = ["UTFString"] for cls in main_ns.classes(): @@ -1140,7 +1184,8 @@ common_utils.Find_Problem_Transformations ( main_ns ) - + + ########################################################################################## # # Creating the code. After this step you should not modify/customize declarations. Modified: trunk/python-ogre/code_generators/ogre/python_ogre.h =================================================================== --- trunk/python-ogre/code_generators/ogre/python_ogre.h 2008-10-07 13:43:51 UTC (rev 756) +++ trunk/python-ogre/code_generators/ogre/python_ogre.h 2008-10-14 14:11:52 UTC (rev 757) @@ -30,6 +30,7 @@ } } } + // 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 Modified: trunk/python-ogre/code_generators/ogre/python_ogre_aliases.h =================================================================== --- trunk/python-ogre/code_generators/ogre/python_ogre_aliases.h 2008-10-07 13:43:51 UTC (rev 756) +++ trunk/python-ogre/code_generators/ogre/python_ogre_aliases.h 2008-10-14 14:11:52 UTC (rev 757) @@ -10,6 +10,7 @@ // typedef std::multimap<Ogre::HardwareVertexBuffer*, Ogre::VertexBufferBinding::HardwareVertexBufferSharedPtr> FreeTemporaryVertexBufferMap; //typedef std::map<unsigned short, Ogre::VertexBufferBinding::HardwareVertexBufferSharedPtr> VertexBufferBindingMap; typedef Ogre::SharedPtr<Ogre::Resource> ResourcePtr; +typedef Ogre::SharedPtr<Ogre::Material> MaterialPtr; typedef Ogre::SharedPtr<Ogre::ShadowCameraSetup> ShadowCameraSetupPtr; typedef Ogre::SharedPtr<Ogre::DefaultShadowCameraSetup> DefaultShadowCameraSetupPtr; Modified: trunk/python-ogre/code_generators/ogreode/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/ogreode/generate_code.py 2008-10-07 13:43:51 UTC (rev 756) +++ trunk/python-ogre/code_generators/ogreode/generate_code.py 2008-10-14 14:11:52 UTC (rev 757) @@ -68,7 +68,8 @@ '::OgreOde::TerrainGeometry::_heightCallback', '::OgreOde::EntityInformer::getIndices', ## unsigned int const * # '::OgreOde::RagdollFactory::requestTypeFlags', # causes issues with moveableobjectfactory - '::OgreOde::EntityInformer::getBoneVertices' # hand wrapped + '::OgreOde::EntityInformer::getBoneVertices', # hand wrapped + '::OgreOde::TriangleMeshData::getIndices' ## needs to be hand wrapped ] @@ -112,10 +113,9 @@ excludes =['::OgreOde::TriangleMeshGeometry' ,'::OgreOde::ComplexGeometry' ] - for c in excludes: - print dir ( global_ns.class_( c ) ) - sys.exit() - +# for c in excludes: +# print dir ( global_ns.class_( c ) ) +# Modified: trunk/python-ogre/code_generators/ogreode/hand_made_wrappers.py =================================================================== --- trunk/python-ogre/code_generators/ogreode/hand_made_wrappers.py 2008-10-07 13:43:51 UTC (rev 756) +++ trunk/python-ogre/code_generators/ogreode/hand_made_wrappers.py 2008-10-14 14:11:52 UTC (rev 757) @@ -71,38 +71,82 @@ boost::python::list indices, unsigned int index_count, OgreOde::World *world, OgreOde::Space* space = 0) { - Ogre::Vector3 * Vectors, vStart; - OgreOde::TriangleIndex * Triangles, tStart; - int index; + Ogre::Vector3 * Vectors; + OgreOde::TriangleIndex * Triangles; + unsigned int index; + OgreOde::TriangleMeshGeometry * ret; + // first lets make sure the counts aren't 'too' big - if ( len (vertices) < vertex_count ) vertex_count = len(vertices); + if ( (unsigned int) bp::len (vertices) < vertex_count ) vertex_count = (unsigned int)bp::len(vertices); // allocate memory - Vectors = new Ogre::Vector3 [ len( vertex_count ) ]; + Vectors = new Ogre::Vector3 [ vertex_count ]; // do the copy - vStart = Vector; - for (index =0 ; index <len(vertex_count); index ++) { - *Vectors++ = boost::python::extract<Ogre::Vector3> (vertices[index]); + for (index =0 ; index < vertex_count ; index ++) { + Vectors[index] = bp::extract<Ogre::Vector3> (vertices[index]); } // now the same for the indices - if ( len (indices) < index_count ) index_count = len(indices); - Triangles = new OgreOde::TriangleIndex [ len ( index_count ) ]; - tStart = Triangles; - for (index =0 ; index <len(index_count); index ++) { - *Triangles++ = boost::python::extract<OgreOde::TriangleIndex> (indices[index]); + if ( (unsigned int)bp::len (indices) < index_count ) index_count = (unsigned int)bp::len(indices); + Triangles = new OgreOde::TriangleIndex [ index_count ]; + for (index =0 ; index < index_count; index ++) { + Triangles[index] = bp::extract<OgreOde::TriangleIndex> (indices[index]); } - return ( OgreOde::TriangleMeshGeometry ( vStart, vertex_count, tStart, index_count, world, space ) ); - } + ret = &OgreOde::TriangleMeshGeometry ( Vectors, vertex_count, Triangles, index_count, world, space ); + delete [] Vectors; + delete [] Triangles; + return ret; + + } + +OgreOde::ConvexGeometry * +OgreOdeGeometry_makeConvexGeometry (boost::python::list vertices, unsigned int vertex_count, + boost::python::list indices, unsigned int index_count, + OgreOde::World *world, OgreOde::Space* space = 0) { + + Ogre::Vector3 * Vectors; + unsigned int* Triangles; + unsigned int index; + OgreOde::ConvexGeometry * ret; + + + // first lets make sure the counts aren't 'too' big + if ( (unsigned int)bp::len (vertices) < vertex_count ) vertex_count = (unsigned int)bp::len(vertices); + // allocate memory + Vectors = new Ogre::Vector3 [ vertex_count ]; + // do the copy + for (index =0 ; index < vertex_count; index ++) { + Vectors[index] = boost::python::extract<Ogre::Vector3> (vertices[index]); + } + + // now the same for the indices + if ( (unsigned int)bp::len (indices) < index_count ) index_count = (unsigned int)bp::len(indices); + Triangles = new unsigned int [ index_count ]; + for (index =0 ; index < index_count; index ++) { + Triangles[index] = boost::python::extract<unsigned int> (indices[index]); + } + + ret = &OgreOde::ConvexGeometry ( Vectors, vertex_count, Triangles, index_count, world, space ); + delete [] Vectors; + delete [] Triangles; + return ret; + } + """ WRAPPER_REGISTRATION_Helper = [ """def( "makeTriangleMeshGeometry", &::OgreOdeGeometry_makeTriangleMeshGeometry, ( bp::arg("vertices"), bp::arg("vertex_count"), bp::arg("indices"), bp::arg("index_count"), - bp::arg("world", bp::arg("space")=0 ), + bp::arg("world"), bp::arg("space")=0 ), "Python-Ogre Hand Wrapped\\nReturns a TriangleMeshGeometry object", + bp::return_value_policy< bp::reference_existing_object, bp::default_call_policies >());""", + """def( "makeConvexGeometry", &::OgreOdeGeometry_makeConvexGeometry, + ( bp::arg("vertices"), bp::arg("vertex_count"), bp::arg("indices"), bp::arg("index_count"), + bp::arg("world"), bp::arg("space")=0 ), + "Python-Ogre Hand Wrapped\\nReturns a ConvexGeometry object", bp::return_value_policy< bp::reference_existing_object, bp::default_call_policies >());""" + ] @@ -117,7 +161,7 @@ if ( ! me.getBoneVertices(bone,vertex_count,vertices ) ) return outlist; - while ( count-- > 0 ) { + while ( vertex_count-- > 0 ) { outlist.append ( *vertices++ ); } delete[] vertices; @@ -142,4 +186,6 @@ rt = mb.class_( 'EntityInformer' ) rt.add_declaration_code( WRAPPER_DEFINITION_EntityInformer ) apply_reg (rt, WRAPPER_REGISTRATION_EntityInformer ) + mb.add_declaration_code( WRAPPER_DEFINITION_Helper ) + apply_reg (mb, WRAPPER_REGISTRATION_Helper ) \ No newline at end of file Modified: trunk/python-ogre/code_generators/quickgui/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/quickgui/generate_code.py 2008-10-07 13:43:51 UTC (rev 756) +++ trunk/python-ogre/code_generators/quickgui/generate_code.py 2008-10-14 14:11:52 UTC (rev 757) @@ -8,13 +8,13 @@ # TO EXCLUDE # Menu: # bool evtHndlr_listItemCreated(const EventArgs& e); -# bool evtHndlr_listItemMouseEnters(const EventArgs& e); -# bool evtHndlr_listItemMouseLeaves(const EventArgs& e); +# bool evtHndlr_listItemMouseEnters(const EventArgs& e); +# bool evtHndlr_listItemMouseLeaves(const EventArgs& e); # Widget: # Ogre::Vector2 convertPixelToRelativePoint(const Ogre::Vector2& point); -# -# - +# +# + import os, sys, time, shutil try: import psyco @@ -86,8 +86,16 @@ # if c.name in excludeName: # print "Excluding:",c # c.exclude() - - + + # static consts that don't have a value set -- causes a boost cant set variable error + excludes=['::QuickGUI::Menu::DEFAULT', + '::QuickGUI::Menu::DOWN', + '::QuickGUI::Menu::OVER' + ] + for e in excludes: + global_ns.variable(e).exclude() + print "Excluding variable", e + NonExistant = [] for cls in NonExistant: try: @@ -119,9 +127,10 @@ try: global_ns.member_functions(e).exclude() except: - print "FAILED to exclude", e + pass + #print "FAILED to exclude", e -# +# ############################################################ ## @@ -161,7 +170,11 @@ global_ns = mb.global_ns main_ns = global_ns.namespace( MAIN_NAMESPACE ) - + for v in main_ns.variables(): + if '::Ogre::String const' in v.type.decl_string: + v.exclude() + print "Excluding Const String var:",v, v.decl_string + ############################################################ ## Modified: trunk/python-ogre/demos/ogre/CompositorDemo_FrameListener.py =================================================================== --- trunk/python-ogre/demos/ogre/CompositorDemo_FrameListener.py 2008-10-07 13:43:51 UTC (rev 756) +++ trunk/python-ogre/demos/ogre/CompositorDemo_FrameListener.py 2008-10-14 14:11:52 UTC (rev 757) @@ -106,6 +106,7 @@ self.mVpHeight = height ##--------------------------------------------------------------------------- def notifyCompositor(self, instance): + print "NOTIFYCOMPOSITOR" ## Get some RTT dimensions for later calculations defIter = instance.getTechnique().getTextureDefinitionIterator() while (defIter.hasMoreElements()) : @@ -147,9 +148,11 @@ self.mBloomTexOffsetsHorz[i*self.x+1] = 0.0 self.mBloomTexOffsetsVert[i*self.x+0] = 0.0 self.mBloomTexOffsetsVert[i*self.x+1] = -self.mBloomTexOffsetsVert[(i - 7)*self.x+1] + print "OK" ##--------------------------------------------------------------------------- def notifyMaterialSetup(self, pass_id, mat): + print "NOTIFYMATERIALSETUP", mat ## Prepare the fragment params offsets # switch(pass_id) # ##case 994: ## rt_lum4 @@ -175,8 +178,10 @@ progName = mat.getBestTechnique().getPass(0).getFragmentProgramName() fparams.setNamedConstantFloat("sampleOffsets",ctypes.addressof(self.mBloomTexOffsetsVert), self.x) fparams.setNamedConstantFloat("sampleWeights",ctypes.addressof(self.mBloomTexWeights), self.x) + print "OK" ##--------------------------------------------------------------------------- def notifyMaterialRender(self, pass_id, mat): + print "NOTIFYMATERIALRENDER", mat pass ##--------------------------------------------------------------------------- @@ -349,7 +354,7 @@ OIS.MouseListener.__init__(self) ItemSelectorInterface.__init__(self) self.mMain = main - self.mTranslateVector = Ogre.Vector3.ZERO + self.mTranslateVector = Ogre.Vector3().ZERO self.mStatsOn = True self.mNumScreenShots = 0 self.mWriteToFile = False @@ -488,7 +493,7 @@ self.mUpdateMovement = False self.mRotX = 0 self.mRotY = 0 - self.mTranslateVector = Ogre.Vector3.ZERO + self.mTranslateVector = Ogre.Vector3().ZERO if(self.mWriteToFile): self.mNumScreenShots +=1 @@ -679,14 +684,17 @@ def itemStateChanged( self, index, state): ## get the item text and tell compositor manager to set enable state compositor = str(self.mCompositorSelectorViewManager.getItemSelectorText(index)) + print "Compositor", compositor Ogre.CompositorManager.getSingleton().\ setCompositorEnabled(self.mMain.getRenderWindow().getViewport(0),compositor, state) + print "CHANGED" self.updateDebugRTTWindow() ##----------------------------------------------------------------------------------- def registerCompositors(self): vp = self.mMain.getRenderWindow().getViewport(0) self.hvListener = HeatVisionListener() self.hdrListener = HDRListener() + print "HDR OK !!!!" self.gaussianListener = gaussianListener() self.mCompositorSelectorViewManager = ItemSelectorViewManager("CompositorSelectorWin") @@ -714,9 +722,11 @@ if instance and (compositorName == "Heat Vision"): instance.addListener(self.hvListener) elif instance and (compositorName == "HDR"): + print "ADDING LISTENER" instance.addListener(self.hdrListener) self.hdrListener.notifyViewportSize(vp.getActualWidth(), vp.getActualHeight()) self.hdrListener.notifyCompositor(instance) + print "DONE" elif instance and (compositorName == "Gaussian Blur"): instance.addListener(self.gaussianListener) Modified: trunk/python-ogre/demos/ogre/Demo_Compositor.py =================================================================== --- trunk/python-ogre/demos/ogre/Demo_Compositor.py 2008-10-07 13:43:51 UTC (rev 756) +++ trunk/python-ogre/demos/ogre/Demo_Compositor.py 2008-10-14 14:11:52 UTC (rev 757) @@ -9,7 +9,7 @@ # You may use this sample code for anything you like, it is not covered by the # LGPL. # ----------------------------------------------------------------------------- -import sys +import sys, os sys.path.insert(0,'..') import PythonOgreConfig @@ -18,6 +18,31 @@ from CompositorDemo_FrameListener import * from ogre.renderer.OGRE import PixelFormat +if os.name == 'nt': + CEGUI.System.setDefaultXMLParserName("ExpatParser") +else: + CEGUI.System.setDefaultXMLParserName("TinyXMLParser") + +def getPluginPath(): + """Return the absolute path to a valid plugins.cfg file.""" + import sys + import os + import os.path + + paths = [os.path.join(os.getcwd(), 'plugins.cfg'), + os.path.join(os.getcwd(), '..','plugins.cfg'), + '/etc/OGRE/plugins.cfg', + os.path.join(os.path.dirname(os.path.abspath(__file__)), + 'plugins.cfg')] + for path in paths: + if os.path.exists(path): + return path + + sys.stderr.write("\n" + "** Warning: Unable to locate a suitable plugins.cfg file.\n" + "** Warning: Please check your ogre installation and copy a\n" + "** Warning: working plugins.cfg file to the current directory.\n\n") + raise ogre.Exception(0, "can't locate the 'plugins.cfg' file", "") # # /************************************************************************* # CompositorDemo Methods # # *************************************************************************/ @@ -33,11 +58,12 @@ def go(self): if (not self.setup()): return False + print "SETUP DONE" self.mRoot.startRendering() ##-------------------------------------------------------------------------- def setup(self): - self.mRoot = Ogre.Root() + self.mRoot = Ogre.Root( getPluginPath() ) self.setupResources() carryOn = self.configure() @@ -107,7 +133,10 @@ ## Load resource paths from config file config = Ogre.ConfigFile() - config.load('resources.cfg' ) + try: + config.load('../resources.cfg' ) + except: + config.load('resources.cfg' ) seci = config.getSectionIterator() while seci.hasMoreElements(): SectionName = seci.peekNextKey() @@ -131,6 +160,7 @@ self.mSceneMgr.setShadowFarDistance(1000) ## setup GUI system print "**6" + self.mGUIRenderer = CEGUI.OgreCEGUIRenderer(self.mWindow, Ogre.RENDER_QUEUE_OVERLAY, False, 3000, self.mSceneMgr) ## load scheme and set up defaults print "***7" @@ -170,11 +200,11 @@ plane=Ogre.Plane() - plane.normal = Ogre.Vector3.UNIT_Y + plane.normal = Ogre.Vector3().UNIT_Y plane.d = 100 Ogre.MeshManager.getSingleton().createPlane("Myplane", Ogre.ResourceGroupManager.DEFAULT_RESOURCE_GROUP_NAME, plane, - 1500, 1500, 10, 10, True, 1, 5, 5, Ogre.Vector3.UNIT_Z) + 1500, 1500, 10, 10, True, 1, 5, 5, Ogre.Vector3().UNIT_Z) pPlaneEnt = self.mSceneMgr.createEntity( "plane", "Myplane" ) pPlaneEnt.setMaterialName("Examples/Rockwall") pPlaneEnt.setCastShadows(False) @@ -266,6 +296,8 @@ comp3 = Ogre.CompositorManager.getSingleton().create( "Motion Blur", Ogre.ResourceGroupManager.DEFAULT_RESOURCE_GROUP_NAME ) + print comp3 + print dir(comp3) t = comp3.createTechnique() def_ = t.createTextureDefinition("scene") def_.width = 0 Modified: trunk/python-ogre/packages_2.5/ogre/renderer/OGRE/sf_OIS.py =================================================================== --- trunk/python-ogre/packages_2.5/ogre/renderer/OGRE/sf_OIS.py 2008-10-07 13:43:51 UTC (rev 756) +++ trunk/python-ogre/packages_2.5/ogre/renderer/OGRE/sf_OIS.py 2008-10-14 14:11:52 UTC (rev 757) @@ -341,7 +341,7 @@ self.rotationX = ogre.Degree(0.0) self.rotationY = ogre.Degree(0.0) - self.translateVector = ogre.Vector3(0,0,0) + self.translateVector = ogre.Vector3().ZERO ##Check to see which device is not buffered, and handle it if not self.Keyboard.buffered(): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2008-10-15 23:47:25
|
Revision: 758 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=758&view=rev Author: andy_miller Date: 2008-10-15 23:47:18 +0000 (Wed, 15 Oct 2008) Log Message: ----------- Fix to makeTriangleMeshGeom function in Ogreode Modified Paths: -------------- trunk/python-ogre/ChangeLog.txt trunk/python-ogre/code_generators/ogreode/hand_made_wrappers.py Modified: trunk/python-ogre/ChangeLog.txt =================================================================== --- trunk/python-ogre/ChangeLog.txt 2008-10-14 14:11:52 UTC (rev 757) +++ trunk/python-ogre/ChangeLog.txt 2008-10-15 23:47:18 UTC (rev 758) @@ -1,5 +1,6 @@ xxxx xx 2008 : Release 1.6.0 xxxx ================================== +Fixed to smart pointer handling in Ogre -- getting clever about detecting them as arguments as well as return types Fixed QuickGui with static consts not having default value and causing a boost load error Removed constant 'vars' and replaced them with properties that return a copy of the object. Specifically ZERO, UNIT_X, UNIT_Y, UNIT_Z, Black, White, Red, Green, Blue in Classes ColourValue, MatrixX, Quaternion and VectorX. Modified: trunk/python-ogre/code_generators/ogreode/hand_made_wrappers.py =================================================================== --- trunk/python-ogre/code_generators/ogreode/hand_made_wrappers.py 2008-10-14 14:11:52 UTC (rev 757) +++ trunk/python-ogre/code_generators/ogreode/hand_made_wrappers.py 2008-10-15 23:47:18 UTC (rev 758) @@ -93,10 +93,10 @@ Triangles[index] = bp::extract<OgreOde::TriangleIndex> (indices[index]); } - ret = &OgreOde::TriangleMeshGeometry ( Vectors, vertex_count, Triangles, index_count, world, space ); + ret = new OgreOde::TriangleMeshGeometry ( Vectors, vertex_count, Triangles, index_count, world, space ); delete [] Vectors; delete [] Triangles; - return ret; + return ( ret ); } @@ -127,7 +127,7 @@ Triangles[index] = boost::python::extract<unsigned int> (indices[index]); } - ret = &OgreOde::ConvexGeometry ( Vectors, vertex_count, Triangles, index_count, world, space ); + ret = new OgreOde::ConvexGeometry ( Vectors, vertex_count, Triangles, index_count, world, space ); delete [] Vectors; delete [] Triangles; return ret; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2008-10-19 12:06:40
|
Revision: 760 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=760&view=rev Author: andy_miller Date: 2008-10-19 12:06:32 +0000 (Sun, 19 Oct 2008) Log Message: ----------- Added unit test support to sampleframework Fixing demos due ot recent APi changes Modified Paths: -------------- trunk/python-ogre/demos/ogre/Demo_BSP.py trunk/python-ogre/demos/ogre/Demo_BspCollision.py trunk/python-ogre/demos/ogre/Demo_Lighting.py trunk/python-ogre/demos/ogre/Demo_Shadows.py trunk/python-ogre/packages_2.5/ogre/renderer/OGRE/sf_OIS.py Modified: trunk/python-ogre/demos/ogre/Demo_BSP.py =================================================================== --- trunk/python-ogre/demos/ogre/Demo_BSP.py 2008-10-16 08:44:11 UTC (rev 759) +++ trunk/python-ogre/demos/ogre/Demo_BSP.py 2008-10-19 12:06:32 UTC (rev 760) @@ -82,7 +82,7 @@ self.camera.pitch(ogre.Degree(90)) # Quake uses X/Y horizon, Z up self.camera.rotate(vp.orientation) # Don't yaw along variable axis, causes leaning - self.camera.setFixedYawAxis(True, ogre.Vector3.UNIT_Z) + self.camera.setFixedYawAxis(True, ogre.Vector3().UNIT_Z) ## Look at a nice place :) self.camera.lookAt(-150,40,30) Modified: trunk/python-ogre/demos/ogre/Demo_BspCollision.py =================================================================== --- trunk/python-ogre/demos/ogre/Demo_BspCollision.py 2008-10-16 08:44:11 UTC (rev 759) +++ trunk/python-ogre/demos/ogre/Demo_BspCollision.py 2008-10-19 12:06:32 UTC (rev 760) @@ -69,14 +69,19 @@ gBall.setPosition(self.camera.getPosition() + self.camera.getDirection() * self.camera.getNearClipDistance() * 2) gBall.setLinearVelocity(self.camera.getDirection() * 200) - gBall.setAngularVelocity(ogre.Vector3.ZERO) + gBall.setAngularVelocity(ogre.Vector3().ZERO) ## Move the targeter gRsq.setRay(self.camera.getRealCamera().getCameraToViewportRay(0.5, 0.5)) for queryResult in gRsq.execute(): gTargetNode.setPosition(gRsq.getRay().getPoint(queryResult.distance)) return ret - + + def _moveCamera(self): + self.camera.yaw(self.rotationX) + self.camera.pitch(self.rotationY) + self.camera.translate(self.translateVector) # for using OgreRefApp + class BspCollisionApplication (sf.Application): def __init__(self): "Init Render Application" @@ -133,7 +138,7 @@ self.camera.pitch(ogre.Degree(d=90)) ## Quake uses X/Y horizon, Z up self.camera.rotate(vp.orientation) ## Don't yaw along variable axis, causes leaning - self.camera.setFixedYawAxis(True, ogre.Vector3.UNIT_Z) + self.camera.setFixedYawAxis(True, ogre.Vector3().UNIT_Z) ## Look at the boxes self.camera.lookAt(-150,40,30) @@ -168,7 +173,7 @@ Pass = mat.getTechnique(0).getPass(0) tex = Pass.createTextureUnitState() tex.setColourOperationEx(ogre.LBX_SOURCE1, ogre.LBS_MANUAL, ogre.LBS_CURRENT, - ogre.ColourValue.Red) + ogre.ColourValue().Red) Pass.setLightingEnabled(False) Pass.setSceneBlending(ogre.SBT_ADD) Pass.setDepthWriteEnabled(False) Modified: trunk/python-ogre/demos/ogre/Demo_Lighting.py =================================================================== --- trunk/python-ogre/demos/ogre/Demo_Lighting.py 2008-10-16 08:44:11 UTC (rev 759) +++ trunk/python-ogre/demos/ogre/Demo_Lighting.py 2008-10-19 12:06:32 UTC (rev 760) @@ -91,7 +91,7 @@ #Add billboard bbs = sceneManager.createBillboardSet("bb", 1) - bbs.createBillboard(ogre.Vector3.ZERO, trail.getInitialColour(0)) + bbs.createBillboard(ogre.Vector3().ZERO, trail.getInitialColour(0)) bbs.MaterialName="Examples/Flare" animNode.attachObject(bbs) @@ -148,7 +148,7 @@ #Add billboard bbs1 = sceneManager.createBillboardSet("bb2", 1) - bbs1.createBillboard(ogre.Vector3.ZERO, trail.getInitialColour(1)) + bbs1.createBillboard(ogre.Vector3().ZERO, trail.getInitialColour(1)) bbs1.MaterialName="Examples/Flare" animNode.attachObject(bbs1) Modified: trunk/python-ogre/demos/ogre/Demo_Shadows.py =================================================================== --- trunk/python-ogre/demos/ogre/Demo_Shadows.py 2008-10-16 08:44:11 UTC (rev 759) +++ trunk/python-ogre/demos/ogre/Demo_Shadows.py 2008-10-19 12:06:32 UTC (rev 760) @@ -16,11 +16,17 @@ import ogre.renderer.OGRE as Ogre import ogre.gui.CEGUI as CEGUI import ogre.io.OIS as OIS -import ctypes +import ctypes,os import SampleFramework import exceptions, random +# Another fix for CEGUI to ensure we get a working parser.. +if os.name == 'nt': + CEGUI.System.setDefaultXMLParserName("ExpatParser") +else: + CEGUI.System.setDefaultXMLParserName("TinyXMLParser") + def convertOISButtonToCegui( buttonID): if buttonID ==0: return CEGUI.LeftButton @@ -192,7 +198,7 @@ self.mLastMousePositionSet=False self.mAvgFrameTime =0.1 self.mWriteToFile = False - self.mTranslateVector = Ogre.Vector3.ZERO + self.mTranslateVector = Ogre.Vector3().ZERO self.mQuit = False self.mSkipCount = 0 self.mUpdateFreq=10 @@ -284,7 +290,7 @@ self.mUpdateMovement = False self.mRotX = 0 self.mRotY = 0 - self.mTranslateVector = Ogre.Vector3.ZERO + self.mTranslateVector = Ogre.Vector3().ZERO if(self.mWriteToFile): self.mNumScreenShots +=1 @@ -359,12 +365,12 @@ self.mTranslateVector.x += e.moveDelta.d_x * self.mAvgFrameTime * MOVESPEED self.mTranslateVector.y += -e.moveDelta.d_y * self.mAvgFrameTime * MOVESPEED ##self.mTranslateVector.z = 0 - MouseCursor.getSingleton().setPosition( self.mLastMousePosition ) + CEGUI.MouseCursor.getSingleton().setPosition( self.mLastMousePosition ) self.mUpdateMovement = True else: if( self.mRMBDown and self.mLMBDown): self.mTranslateVector.z += (e.moveDelta.d_x + e.moveDelta.d_y) * self.mAvgFrameTime * MOVESPEED - MouseCursor.getSingleton().setPosition( self.mLastMousePosition ) + CEGUI.MouseCursor.getSingleton().setPosition( self.mLastMousePosition ) self.mUpdateMovement = True return True @@ -383,7 +389,7 @@ if self.mLastMousePositionSet: CEGUI.MouseCursor.getSingleton().setPosition( self.mLastMousePosition ) self.mLastMousePositionSet = False - self.root.releaseInput() + self.rootGuiPanel.releaseInput() return True @@ -402,7 +408,7 @@ if (not self.mLastMousePositionSet): self.mLastMousePosition = CEGUI.MouseCursor.getSingleton().getPosition() self.mLastMousePositionSet = True - self.root.captureInput() + self.rootGuiPanel.captureInput() return True @@ -433,7 +439,8 @@ ##-------------------------------------------------------------------------- def handleKeyDownEvent( self, e): - CheckMovementKeys( e.scancode , True) + print "Key Down", e + self.CheckMovementKeys( e.scancode , True) return True @@ -614,11 +621,11 @@ ## Floor plane (use POSM plane def) self.mPlane = Ogre.MovablePlane("mPlane") - self.mPlane.normal = Ogre.Vector3.UNIT_Y + self.mPlane.normal = Ogre.Vector3().UNIT_Y self.mPlane.d = 107 Ogre.MeshManager.getSingleton().createPlane("Myplane", Ogre.ResourceGroupManager.DEFAULT_RESOURCE_GROUP_NAME, self.mPlane, - 1500,1500,50,50,True,1,5,5,Ogre.Vector3.UNIT_Z) + 1500,1500,50,50,True,1,5,5,Ogre.Vector3().UNIT_Z) self.pPlaneEnt = self.sceneManager.createEntity( "plane", "Myplane" ) self.pPlaneEnt.setMaterialName(BASIC_ROCKWALL_MATERIAL) self.pPlaneEnt.setCastShadows=False @@ -654,6 +661,9 @@ ##/ Change basic shadow technique def changeShadowTechnique(self, newTech): + newTech = Ogre.ShadowTechnique( newTech ) + print "CHANGE SHADOW TECH", newTech + self.sceneManager.setShadowTechnique(newTech) @@ -674,11 +684,11 @@ if newTech == Ogre.SHADOWTYPE_STENCIL_ADDITIVE: ## Fixed light, dim - self.mSunLight.setCastShadows(True) + self.mSunLight.setCastShadows =True ## Point light, movable, reddish self.mLight.setType(Ogre.Light.LT_POINT) - self.mLight.setCastShadows(True) + self.mLight.setCastShadows=True self.mLight.setDiffuseColour(self.mMinLightColour) self.mLight.setSpecularColour(1, 1, 1) self.mLight.setAttenuation(8000,1,0.0005,0) @@ -689,24 +699,24 @@ self.mSunLight.setCastShadows=False ## Point light, movable, reddish - self.mLight.setType(Light.LT_POINT) - self.mLight.setCastShadows(True) + self.mLight.setType(Ogre.Light.LT_POINT) + self.mLight.setCastShadows=True self.mLight.setDiffuseColour(self.mMinLightColour) self.mLight.setSpecularColour(1, 1, 1) self.mLight.setAttenuation(8000,1,0.0005,0) elif newTech == Ogre.SHADOWTYPE_TEXTURE_MODULATIVE or newTech == Ogre.SHADOWTYPE_TEXTURE_ADDITIVE: ## Fixed light, dim - self.mSunLight.setCastShadows(True) + self.mSunLight.setCastShadows=True ## Change moving light to spotlight ## Point light, movable, reddish - self.mLight.setType(Light.LT_SPOTLIGHT) - self.mLight.setDirection(Ogre.Vector3.NEGATIVE_UNIT_Z) - self.mLight.setCastShadows(True) + self.mLight.setType(Ogre.Light.LT_SPOTLIGHT) + self.mLight.setDirection(Ogre.Vector3().NEGATIVE_UNIT_Z) + self.mLight.setCastShadows=True self.mLight.setDiffuseColour(self.mMinLightColour) self.mLight.setSpecularColour(1, 1, 1) self.mLight.setAttenuation(8000,1,0.0005,0) - self.mLight.setSpotlightRange(Degree(80),Degree(90)) + self.mLight.setSpotlightRange(Ogre.Degree(80),Ogre.Degree(90)) def setupGUI( self ): ## setup GUI system @@ -896,7 +906,8 @@ self.mGradientClampText = wmgr.getWindow("Shadows/DepthShadowTweakGroup/SlopeClampText") self.updateGUI(self.mCurrentShadowTechnique) - + self.resetMaterials() + def updateGUI(self, newTech): isTextureBased=True if newTech & Ogre.SHADOWDETAILTYPE_TEXTURE: @@ -945,17 +956,17 @@ radio = we.window if (radio.isSelected()): newTech = self.mCurrentShadowTechnique - if radio.getID == 1: + if radio.getID() == 1: ## stencil newTech = ((newTech & ~Ogre.SHADOWDETAILTYPE_TEXTURE) | Ogre.SHADOWDETAILTYPE_STENCIL) self.resetMaterials() - elif radio.getID == 2: + elif radio.getID() == 2: ## texture newTech = ((newTech & ~Ogre.SHADOWDETAILTYPE_STENCIL) | Ogre.SHADOWDETAILTYPE_TEXTURE) - elif radio.getID == 3: + elif radio.getID() == 3: ## additive newTech = ((newTech & ~Ogre.SHADOWDETAILTYPE_MODULATIVE) | Ogre.SHADOWDETAILTYPE_ADDITIVE) - elif radio.getID == 4: + elif radio.getID() == 4: ## modulative newTech = ((newTech & ~Ogre.SHADOWDETAILTYPE_ADDITIVE) | Ogre.SHADOWDETAILTYPE_MODULATIVE) @@ -963,35 +974,29 @@ return True def handleProjectionChanged( self, e): - winargs = e cbo = winargs.window - if (cbo.getSelectedItem()): proj = cbo.getSelectedItem().getID() if (proj != self.mCurrentProjection): ## AJM WARNING if proj == self.UNIFORM: - self.mCurrentShadowCameraSetup = Ogre.ShadowCameraSetupPtr(Ogre.DefaultShadowCameraSetup()) + self.mCurrentShadowCameraSetup = Ogre.DefaultShadowCameraSetup() #Ogre.ShadowCameraSetupPtr(Ogre.DefaultShadowCameraSetup()) elif proj == self.UNIFORM_FOCUSED: - self.focused = Ogre.FocusedShadowCameraSetup() - self.mCurrentShadowCameraSetup =\ - Ogre.ShadowCameraSetup(self.focused) + self.mCurrentShadowCameraSetup =Ogre.FocusedShadowCameraSetup() elif proj == self.LISPSM: self.mLiSPSMSetup = Ogre.LiSPSMShadowCameraSetup() ##self.mLiSPSMSetup.setUseAggressiveFocusRegion=False - self.mCurrentShadowCameraSetup = Ogre.ShadowCameraSetupPtr(self.mLiSPSMSetup) + self.mCurrentShadowCameraSetup = self.mLiSPSMSetup elif proj == self.PLANE_OPTIMAL: - self.mCurrentShadowCameraSetup =\ - Ogre.ShadowCameraSetupPtr(Ogre.PlaneOptimalShadowCameraSetup(self.mPlane)) - + self.mCurrentShadowCameraSetup = Ogre.PlaneOptimalShadowCameraSetup(self.mPlane) self.mCurrentProjection = proj self.sceneManager.setShadowCameraSetup(self.mCurrentShadowCameraSetup) self.updateTipForCombo(cbo) - if (not self.mCustomRockwallVparams.isNull() and not self.mCustomRockwallFparams.isNull()): +# if (not self.mCustomRockwallVparams.isNull() and not self.mCustomRockwallFparams.isNull()): + if (self.mCustomRockwallVparams and self.mCustomRockwallFparams): ## set self.setDefaultDepthShadowParams() - return True @@ -1004,11 +1009,11 @@ self.mCustomRockwallFparams.setNamedConstant("gradientClamp", self.mGradientClamp.getScrollPosition()) - self.mCustoself.mAtheneFparams.setNamedConstant("fixedDepthBias", + self.mCustomAtheneFparams.setNamedConstant("fixedDepthBias", self.mFixedBias.getScrollPosition()) - self.mCustoself.mAtheneFparams.setNamedConstant("gradientScaleBias", + self.mCustomAtheneFparams.setNamedConstant("gradientScaleBias", self.mGradientBias.getScrollPosition()) - self.mCustoself.mAtheneFparams.setNamedConstant("gradientClamp", + self.mCustomAtheneFparams.setNamedConstant("gradientClamp", self.mGradientClamp.getScrollPosition()) @@ -1031,7 +1036,7 @@ self.updateDepthShadowParams() def handleParamsChanged( self,e): - if ( notself.mCustomRockwallVparams.isNull() and not self.mCustomRockwallFparams.isNull()): + if self.mCustomRockwallVparams and self.mCustomRockwallFparams : self.updateDepthShadowParams() return True @@ -1051,10 +1056,10 @@ self.mAthene.setMaterialName(BASIC_ATHENE_MATERIAL) for i in self.pColumns: i.setMaterialName(BASIC_ROCKWALL_MATERIAL) - self.mCustomRockwallVparams.setNull() - self.mCustomRockwallFparams.setNull() - self.mCustoself.mAtheneVparams.setNull() - self.mCustoself.mAtheneFparams.setNull() + self.mCustomRockwallVparams = None + self.mCustomRockwallFparams = None + self.mCustomAtheneVparams = None + self.mCustomAtheneFparams = None def handleMaterialChanged( self, e): @@ -1065,7 +1070,7 @@ mat = cbo.getSelectedItem().getID() if (mat != self.mCurrentMaterial): if mat == self.MAT_STANDARD: - self.sceneManager.setShadowTexturePixelFormat(Ogre.PF_L8) + self.sceneManager.setShadowTexturePixelFormat(Ogre.PixelFormat.PF_L8) self.sceneManager.setShadowTextureCasterMaterial(Ogre.StringUtil.BLANK) self.sceneManager.setShadowTextureReceiverMaterial(Ogre.StringUtil.BLANK) self.sceneManager.setShadowTextureSelfShadow=False @@ -1093,9 +1098,9 @@ self.mCustomRockwallVparams = themat.getTechnique(0).getPass(1).getShadowReceiverVertexProgramParameters() self.mCustomRockwallFparams = themat.getTechnique(0).getPass(1).getShadowReceiverFragmentProgramParameters() themat = Ogre.MaterialManager.getSingleton().getByName(CUSTOM_ATHENE_MATERIAL) - self.mCustoself.mAtheneVparams = themat.getTechnique(0).getPass(1).getShadowReceiverVertexProgramParameters() - self.mCustoself.mAtheneFparams = themat.getTechnique(0).getPass(1).getShadowReceiverFragmentProgramParameters() - self.mDepthShadowTweak.setVisible(True) + self.mCustomAtheneVparams = themat.getTechnique(0).getPass(1).getShadowReceiverVertexProgramParameters() + self.mCustomAtheneFparams = themat.getTechnique(0).getPass(1).getShadowReceiverFragmentProgramParameters() + self.mDepthShadowTweak.setVisible = True ## set the current params self.setDefaultDepthShadowParams() elif mat == self.MAT_DEPTH_FLOAT_PCF: @@ -1120,9 +1125,9 @@ self.mCustomRockwallVparams = themat.getTechnique(0).getPass(1).getShadowReceiverVertexProgramParameters() self.mCustomRockwallFparams = themat.getTechnique(0).getPass(1).getShadowReceiverFragmentProgramParameters() themat = Ogre.MaterialManager.getSingleton().getByName(CUSTOM_ATHENE_MATERIAL + "/PCF") - self.mCustoself.mAtheneVparams = themat.getTechnique(0).getPass(1).getShadowReceiverVertexProgramParameters() - self.mCustoself.mAtheneFparams = themat.getTechnique(0).getPass(1).getShadowReceiverFragmentProgramParameters() - self.mDepthShadowTweak.setVisible(True) + self.mCustomAtheneVparams = themat.getTechnique(0).getPass(1).getShadowReceiverVertexProgramParameters() + self.mCustomAtheneFparams = themat.getTechnique(0).getPass(1).getShadowReceiverFragmentProgramParameters() + self.mDepthShadowTweak.setVisible =True ## set the current params self.setDefaultDepthShadowParams() Modified: trunk/python-ogre/packages_2.5/ogre/renderer/OGRE/sf_OIS.py =================================================================== --- trunk/python-ogre/packages_2.5/ogre/renderer/OGRE/sf_OIS.py 2008-10-16 08:44:11 UTC (rev 759) +++ trunk/python-ogre/packages_2.5/ogre/renderer/OGRE/sf_OIS.py 2008-10-19 12:06:32 UTC (rev 760) @@ -13,6 +13,9 @@ # # 29 July 2008: Ensured that resources.cfg and plugins.cfg can exist in the parent directory # +import sys +import os +import os.path import ogre.renderer.OGRE as ogre import ogre.io.OIS as OIS @@ -20,9 +23,6 @@ def getPluginPath(): """Return the absolute path to a valid plugins.cfg file.""" - import sys - import os - import os.path paths = [os.path.join(os.getcwd(), 'plugins.cfg'), os.path.join(os.getcwd(), '..','plugins.cfg'), @@ -38,7 +38,16 @@ "** Warning: Please check your ogre installation and copy a\n" "** Warning: working plugins.cfg file to the current directory.\n\n") raise ogre.Exception(0, "can't locate the 'plugins.cfg' file", "") - + +def isUnitTest(): + """Looks for a magic file to determine if we want to do a unittest""" + paths = [os.path.join(os.getcwd(), 'unittest.now'), + os.path.join(os.getcwd(), '..','unittest.now')] + for path in paths: + if os.path.exists(path): + return True + return False + class Application(object): "This class is the base for an Ogre application." debugText="" @@ -50,6 +59,7 @@ self.renderWindow = None self.sceneManager = None self.world = None + self.unittest = isUnitTest() def __del__(self): "Clear variables, this should not actually be needed." @@ -147,7 +157,10 @@ def _configure(self): """This shows the config dialog and creates the renderWindow.""" - carryOn = self.root.showConfigDialog() + if not self.unittest: # we show this if not doing a unittest + carryOn = self.root.showConfigDialog() + else: + carryOn = self.root.restoreConfig() if carryOn: self.renderWindow = self.root.initialise(True, "OGRE Render Window") return carryOn @@ -185,6 +198,7 @@ """Creates the FrameListener.""" #,self.frameListener, self.frameListener.Mouse self.frameListener = FrameListener(self.renderWindow, self.camera) + self.frameListener.unittest = self.unittest self.frameListener.showDebugOverlay(True) self.root.addFrameListener(self.frameListener) @@ -230,6 +244,10 @@ self.bufferedJoy = bufferedJoy self.shouldQuit = False # set to True to exit.. self.MenuMode = False # lets understand a simple menu function + self.unittest = isUnitTest() + self.unittest_duration = 5.0 # seconds before screen shot a exit + self.unittest_screenshot = sys.modules['__main__'].__file__.split('.')[0] # file name for unittest screenshot + ## we can tell if we are using OgreRefapp based upon the camera class if self.camera.__class__ == ogre.Camera: @@ -320,6 +338,11 @@ def frameRenderingQueued ( self, evt ): if(self.renderWindow.isClosed() or self.shouldQuit ): return False + if self.unittest: + self.unittest_duration -= evt.timeSinceLastFrame + if self.unittest_duration < 0: + self.renderWindow.writeContentsToTimestampedFile(self.unittest_screenshot, '.jpg') + return False ##Need to capture/update each device - this will also trigger any listeners self.Keyboard.capture() self.Mouse.capture() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2008-10-20 14:27:50
|
Revision: 762 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=762&view=rev Author: andy_miller Date: 2008-10-20 14:27:42 +0000 (Mon, 20 Oct 2008) Log Message: ----------- Small fix to Ogre Forests -- setHeightFunction on Loader2D works Modified Paths: -------------- trunk/python-ogre/code_generators/ogreforests/hand_made_wrappers.py trunk/python-ogre/demos/ogreforests/Demo_Forest_01.py trunk/python-ogre/demos/ogreforests/Demo_Forest_02.py trunk/python-ogre/demos/qgui/Demo_QuickGUI01.py Modified: trunk/python-ogre/code_generators/ogreforests/hand_made_wrappers.py =================================================================== --- trunk/python-ogre/code_generators/ogreforests/hand_made_wrappers.py 2008-10-20 13:48:25 UTC (rev 761) +++ trunk/python-ogre/code_generators/ogreforests/hand_made_wrappers.py 2008-10-20 14:27:42 UTC (rev 762) @@ -14,7 +14,7 @@ return y; } -void TreeLoader2D_setHeightFunction( TreeLoader2D & me, PyObject* function, std::string name="" ) { +void TreeLoader2D_setHeightFunction( Forests::TreeLoader2D & me, PyObject* function, std::string name="" ) { mSubscriber_tree = function; mName_tree = name; me.setHeightFunction ( &HelperHeightFunction_Tree2D ); @@ -34,7 +34,7 @@ return y; } -void GrassLoader_setHeightFunction( GrassLoader & me, PyObject* function, std::string name="" ) { +void GrassLoader_setHeightFunction( Forests::GrassLoader & me, PyObject* function, std::string name="" ) { mSubscriber_grass = function; mName_grass = name; me.setHeightFunction ( &HelperHeightFunction_Grass ); @@ -86,9 +86,9 @@ # rt.add_declaration_code( WRAPPER_DEFINITION_GrassLoader ) # apply_reg (rt, WRAPPER_REGISTRATION_GrassLoader ) -# rt = mb.class_( 'TreeLoader2D' ) -# rt.add_declaration_code( WRAPPER_DEFINITION_TreeLoader2D ) -# apply_reg (rt, WRAPPER_REGISTRATION_TreeLoader2D ) + rt = mb.class_( 'TreeLoader2D' ) + rt.add_declaration_code( WRAPPER_DEFINITION_TreeLoader2D ) + apply_reg (rt, WRAPPER_REGISTRATION_TreeLoader2D ) rt = mb.class_( 'PagedGeometry' ) rt.add_declaration_code( WRAPPER_DEFINITION_PagedGeometry ) Modified: trunk/python-ogre/demos/ogreforests/Demo_Forest_01.py =================================================================== --- trunk/python-ogre/demos/ogreforests/Demo_Forest_01.py 2008-10-20 13:48:25 UTC (rev 761) +++ trunk/python-ogre/demos/ogreforests/Demo_Forest_01.py 2008-10-20 14:27:42 UTC (rev 762) @@ -34,8 +34,8 @@ self.initialized = True # self.MyRaySceneQueryListener = self.MyRaySceneQueryListener() self.raySceneQuery = ogre.RaySceneQuery( sceneMgr ) - self.updateRay.setOrigin(ogre.Vector3.ZERO) - self.updateRay.setDirection(ogre.Vector3.NEGATIVE_UNIT_Y) + self.updateRay.setOrigin(ogre.Vector3().ZERO) + self.updateRay.setDirection(ogre.Vector3().NEGATIVE_UNIT_Y) self.raySceneQuery = sceneMgr.createRayQuery(self.updateRay) self.raySceneQuery.setQueryTypeMask(ogre.SceneManager.WORLD_GEOMETRY_TYPE_MASK) self.raySceneQuery.setWorldFragmentType(ogre.SceneQuery.WFT_SINGLE_INTERSECTION) @@ -46,7 +46,7 @@ ##there's no need for extra data other than the x/z coordinates. def getTerrainHeight(self, x, z, userData = None): self.updateRay.setOrigin(ogre.Vector3(x, 0.0, z)) - self.updateRay.setDirection(ogre.Vector3.UNIT_Y) + self.updateRay.setDirection(ogre.Vector3().UNIT_Y) self.raySceneQuery.setRay(self.updateRay) self.raySceneQuery.execute(self.raySceneQueryListener) @@ -61,7 +61,7 @@ def getTerrainHeight( self, x, z, UserData=None ): if ( x < 0 or z < 0 or x > 1500 or z > 1500 ): return 0 self.updateRay.setOrigin( ogre.Vector3(x, 0.0, z) ) - self.updateRay.setDirection( ogre.Vector3.UNIT_Y ) + self.updateRay.setDirection( ogre.Vector3().UNIT_Y ) self.raySceneQuery.setRay( self.updateRay ) self.raySceneQuery.execute( self.raySceneQueryListener ) return self.raySceneQueryListener.resultDistance @@ -101,7 +101,7 @@ # # ##RaySceneQuery for terrain height check # self.updateRay.setOrigin(camera.getPosition()) -# self.updateRay.setDirection(ogre.Vector3.NEGATIVE_UNIT_Y) +# self.updateRay.setDirection(ogre.Vector3().NEGATIVE_UNIT_Y) # self.raySceneQuery = self.sceneManager.createRayQuery(self.updateRay) # self.raySceneQuery.setQueryTypeMask(ogre.SceneManager.WORLD_GEOMETRY_TYPE_MASK ) # self.raySceneQuery.setWorldFragmentType(ogre.SceneQuery.WFT_SINGLE_INTERSECTION) @@ -197,7 +197,7 @@ self.app = app # use this to tweak the persons position self.raySceneQuery = app.sceneManager.createRayQuery(ogre.Ray(app.camera.getPosition(), - ogre.Vector3.NEGATIVE_UNIT_Y)) + ogre.Vector3().NEGATIVE_UNIT_Y)) def frameStarted(self, frameEvent): @@ -207,7 +207,7 @@ # # updateRay = ogre.Ray() # updateRay.setOrigin (self.camera.getPosition() + ogre.Vector3(0.0, 10.0, 0.0)) -# updateRay.setDirection (ogre.Vector3.NEGATIVE_UNIT_Y) +# updateRay.setDirection (ogre.Vector3().NEGATIVE_UNIT_Y) # self.raySceneQuery.Ray = updateRay # for queryResult in self.raySceneQuery.execute(): # if queryResult.worldFragment is not None: Modified: trunk/python-ogre/demos/ogreforests/Demo_Forest_02.py =================================================================== --- trunk/python-ogre/demos/ogreforests/Demo_Forest_02.py 2008-10-20 13:48:25 UTC (rev 761) +++ trunk/python-ogre/demos/ogreforests/Demo_Forest_02.py 2008-10-20 14:27:42 UTC (rev 762) @@ -34,8 +34,8 @@ self.initialized = True # self.MyRaySceneQueryListener = self.MyRaySceneQueryListener() self.raySceneQuery = ogre.RaySceneQuery( sceneMgr ) - self.updateRay.setOrigin(ogre.Vector3.ZERO) - self.updateRay.setDirection(ogre.Vector3.NEGATIVE_UNIT_Y) + self.updateRay.setOrigin(ogre.Vector3().ZERO) + self.updateRay.setDirection(ogre.Vector3().NEGATIVE_UNIT_Y) self.raySceneQuery = sceneMgr.createRayQuery(self.updateRay) self.raySceneQuery.setQueryTypeMask(ogre.SceneManager.WORLD_GEOMETRY_TYPE_MASK) self.raySceneQuery.setWorldFragmentType(ogre.SceneQuery.WFT_SINGLE_INTERSECTION) @@ -46,7 +46,7 @@ ##there's no need for extra data other than the x/z coordinates. def getTerrainHeight(self, x, z, userData = None): self.updateRay.setOrigin(ogre.Vector3(x, 0.0, z)) - self.updateRay.setDirection(ogre.Vector3.UNIT_Y) + self.updateRay.setDirection(ogre.Vector3().UNIT_Y) self.raySceneQuery.setRay(self.updateRay) self.raySceneQuery.execute(self.raySceneQueryListener) @@ -61,7 +61,7 @@ def getTerrainHeight( self, x, z, UserData=None ): if ( x < 0 or z < 0 or x > 1500 or z > 1500 ): return 0 self.updateRay.setOrigin( ogre.Vector3(x, 0.0, z) ) - self.updateRay.setDirection( ogre.Vector3.UNIT_Y ) + self.updateRay.setDirection( ogre.Vector3().UNIT_Y ) self.raySceneQuery.setRay( self.updateRay ) self.raySceneQuery.execute( self.raySceneQueryListener ) return self.raySceneQueryListener.resultDistance @@ -101,7 +101,7 @@ # # ##RaySceneQuery for terrain height check # self.updateRay.setOrigin(camera.getPosition()) -# self.updateRay.setDirection(ogre.Vector3.NEGATIVE_UNIT_Y) +# self.updateRay.setDirection(ogre.Vector3().NEGATIVE_UNIT_Y) # self.raySceneQuery = self.sceneManager.createRayQuery(self.updateRay) # self.raySceneQuery.setQueryTypeMask(ogre.SceneManager.WORLD_GEOMETRY_TYPE_MASK ) # self.raySceneQuery.setWorldFragmentType(ogre.SceneQuery.WFT_SINGLE_INTERSECTION) @@ -130,11 +130,12 @@ self.HeightFunction = HeightFunction() self.HeightFunction.initialize( self.sceneManager ) + print dir(self.treeLoader) self.treeLoader.setHeightFunction ( self.HeightFunction, "getTerrainHeight" ) ##And add 20,000 trees to the scene through the "easy-to-use" TreeLoader class myTree = self.sceneManager.createEntity("Tree", "tree2.mesh") - position = ogre.Vector3(ogre.Vector3.ZERO) + position = ogre.Vector3().ZERO for i in range (20000): yaw = ogre.Degree(random.randrange(0, 360)) @@ -196,7 +197,7 @@ self.app = app # use this to tweak the persons position self.raySceneQuery = app.sceneManager.createRayQuery(ogre.Ray(app.camera.getPosition(), - ogre.Vector3.NEGATIVE_UNIT_Y)) + ogre.Vector3().NEGATIVE_UNIT_Y)) def frameStarted(self, frameEvent): @@ -206,7 +207,7 @@ # # updateRay = ogre.Ray() # updateRay.setOrigin (self.camera.getPosition() + ogre.Vector3(0.0, 10.0, 0.0)) -# updateRay.setDirection (ogre.Vector3.NEGATIVE_UNIT_Y) +# updateRay.setDirection (ogre.Vector3().NEGATIVE_UNIT_Y) # self.raySceneQuery.Ray = updateRay # for queryResult in self.raySceneQuery.execute(): # if queryResult.worldFragment is not None: Modified: trunk/python-ogre/demos/qgui/Demo_QuickGUI01.py =================================================================== --- trunk/python-ogre/demos/qgui/Demo_QuickGUI01.py 2008-10-20 13:48:25 UTC (rev 761) +++ trunk/python-ogre/demos/qgui/Demo_QuickGUI01.py 2008-10-20 14:27:42 UTC (rev 762) @@ -30,10 +30,10 @@ import ogre.gui.QuickGUI as gui import SampleFramework as sf -class CallBack ( gui.MemberFunctionSlot ): +class CallBack ( gui.EventHandlerSlot ): """ Callback class for user events in QuickGUI""" def __init__(self, function=""): - gui.MemberFunctionSlot.__init__(self) + gui.EventHandlerSlot.__init__(self) self.function=function def execute(self, args): if self.function: @@ -173,10 +173,10 @@ #3 However we do the same thing by setting MenuMode to True in the frameListerner further down # # # self.camera.setAutoTracking(True, robotNode) - plane = Ogre.Plane( Ogre.Vector3.UNIT_Y, 0 ) + plane = Ogre.Plane( Ogre.Vector3().UNIT_Y, 0 ) Ogre.MeshManager.getSingleton().createPlane("ground", Ogre.ResourceGroupManager.DEFAULT_RESOURCE_GROUP_NAME, plane, - 1500,1500,20,20,True,1,5,5,Ogre.Vector3.UNIT_Z) + 1500,1500,20,20,True,1,5,5,Ogre.Vector3().UNIT_Z) ground = self.sceneManager.createEntity( "GroundEntity", "ground" ) self.sceneManager.getRootSceneNode().createChildSceneNode().attachObject(ground) ground.setMaterialName("Examples/Rockwall") @@ -206,7 +206,7 @@ ##Viewport *v = self.rttTex.addViewport( self.camera ) v.setOverlaysEnabled( False ) v.setClearEveryFrame( True ) - v.setBackgroundColour( Ogre.ColourValue.Black ) + v.setBackgroundColour( Ogre.ColourValue().Black ) self.guiroot = gui.Root() gui.SkinSetManager.getSingleton().loadSkin("qgui",gui.SkinSet.IMAGE_TYPE_PNG,self.ResourceGroup); @@ -547,7 +547,7 @@ return True def evtHndlr_setTextWhite(self, args): - self.stWindow.getTitleBar().getText().setColor(Ogre.ColourValue.White) + self.stWindow.getTitleBar().getText().setColor(Ogre.ColourValue().White) return True def evtHndlr_showSetTextDialog(self, args): @@ -570,11 +570,11 @@ def evtHndlr_setTextColor(self, args): s = self.stWindow.getComboBox(0).getText().getCaption() - if( s == "Red" ): c = Ogre.ColourValue.Red - elif( s == "Green" ): c = Ogre.ColourValue.Green - elif( s == "Blue" ): c = Ogre.ColourValue.Blue - elif( s == "Black" ): c = Ogre.ColourValue.Black - elif( s == "White" ): c = Ogre.ColourValue.White + if( s == "Red" ): c = Ogre.ColourValue().Red + elif( s == "Green" ): c = Ogre.ColourValue().Green + elif( s == "Blue" ): c = Ogre.ColourValue().Blue + elif( s == "Black" ): c = Ogre.ColourValue().Black + elif( s == "White" ): c = Ogre.ColourValue().White self.stWindow.getTitleBar().getText().setColor(c) return True This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2008-10-20 15:00:48
|
Revision: 765 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=765&view=rev Author: andy_miller Date: 2008-10-20 15:00:39 +0000 (Mon, 20 Oct 2008) Log Message: ----------- Further cleanup of demos and unittest tweaks Modified Paths: -------------- trunk/python-ogre/demos/OgreNewt/Demo01_TheBasics.py trunk/python-ogre/demos/OgreNewt/Demo02_Joints.py trunk/python-ogre/demos/OgreNewt/Demo03_CollisionCallbacks.py trunk/python-ogre/demos/OgreNewt/Demo04_RayCasting.py trunk/python-ogre/demos/OgreNewt/Demo05_SimpleVehicle.py trunk/python-ogre/demos/OgreNewt/Demo06_SimpleBuoyancy.py trunk/python-ogre/demos/OgreNewt/SimpleVehicle.py trunk/python-ogre/demos/cegui/Demo_CEGUI_Gui.py trunk/python-ogre/demos/et/Demo_CEGUI_ET.py trunk/python-ogre/scripts/UnitTest.py Modified: trunk/python-ogre/demos/OgreNewt/Demo01_TheBasics.py =================================================================== --- trunk/python-ogre/demos/OgreNewt/Demo01_TheBasics.py 2008-10-20 14:41:55 UTC (rev 764) +++ trunk/python-ogre/demos/OgreNewt/Demo01_TheBasics.py 2008-10-20 15:00:39 UTC (rev 765) @@ -67,7 +67,7 @@ ## that's all we'll need to do for this object. dynamic objects have a few more steps, so look ## at the code in the FrameListener for more. body.attachToNode( floornode ) - body.setPositionOrientation( Ogre.Vector3(0.0,-10.0,0.0), Ogre.Quaternion.IDENTITY ) + body.setPositionOrientation( Ogre.Vector3(0.0,-10.0,0.0), Ogre.Quaternion().IDENTITY ) self.bodies.append(body) ## position camera Modified: trunk/python-ogre/demos/OgreNewt/Demo02_Joints.py =================================================================== --- trunk/python-ogre/demos/OgreNewt/Demo02_Joints.py 2008-10-20 14:41:55 UTC (rev 764) +++ trunk/python-ogre/demos/OgreNewt/Demo02_Joints.py 2008-10-20 15:00:39 UTC (rev 765) @@ -88,7 +88,7 @@ floor3.setMaterialName( "Examples/DarkMaterial" ) floor3.setCastShadows( False ) floornode3.setPosition( Ogre.Vector3(-80.0, 0.0, 0.0) ) - floornode3.setOrientation( Ogre.Quaternion( Ogre.Degree(d=0.0), Ogre.Vector3.UNIT_Z ) ) + floornode3.setOrientation( Ogre.Quaternion( Ogre.Degree(d=0.0), Ogre.Vector3().UNIT_Z ) ) ##------------------------------------------------------------- ## using the new "SceneParser" TreeCollision primitive. this will automatically parse an entire tree of @@ -99,13 +99,13 @@ del stat_col bod.attachToNode( floornode ) - bod.setPositionOrientation( Ogre.Vector3(0.0,-20.0,0.0), Ogre.Quaternion.IDENTITY ) + bod.setPositionOrientation( Ogre.Vector3(0.0,-20.0,0.0), Ogre.Quaternion().IDENTITY ) self.bodies.append( bod ) ## make a simple rope. size = Ogre.Vector3(3,1.5,1.5) pos = Ogre.Vector3(0,3,0) - orient = Ogre.Quaternion.IDENTITY + orient = Ogre.Quaternion().IDENTITY ## loop through, making bodies and connecting them. parent = None Modified: trunk/python-ogre/demos/OgreNewt/Demo03_CollisionCallbacks.py =================================================================== --- trunk/python-ogre/demos/OgreNewt/Demo03_CollisionCallbacks.py 2008-10-20 14:41:55 UTC (rev 764) +++ trunk/python-ogre/demos/OgreNewt/Demo03_CollisionCallbacks.py 2008-10-20 15:00:39 UTC (rev 765) @@ -54,13 +54,13 @@ belt = conveyorBelt() belt.init( "ConveyorBelt1", self.sceneManager, self.World, Ogre.Vector3(15,0.3,3), Ogre.Vector3(1,0,0), 2.0, - Ogre.Vector3(0,2,0), Ogre.Quaternion.IDENTITY, self.MatConveyor, BT_CONVEYOR ) + Ogre.Vector3(0,2,0), Ogre.Quaternion().IDENTITY, self.MatConveyor, BT_CONVEYOR ) self.Belts.append( belt ) belt = conveyorBelt() belt.init( "ConveyorBelt2", self.sceneManager, self.World, Ogre.Vector3(23,0.3,4), Ogre.Vector3(-1,0,0), 6.0, Ogre.Vector3(3,-1,0), - Ogre.Quaternion.IDENTITY, self.MatConveyor, BT_CONVEYOR ) + Ogre.Quaternion().IDENTITY, self.MatConveyor, BT_CONVEYOR ) self.Belts.append( belt ) ## floor object! @@ -77,7 +77,7 @@ ##floornode.setScale( siz ) bod.attachToNode( floornode ) - bod.setPositionOrientation( Ogre.Vector3(0.0,-10.0,0.0), Ogre.Quaternion.IDENTITY ) + bod.setPositionOrientation( Ogre.Vector3(0.0,-10.0,0.0), Ogre.Quaternion().IDENTITY ) self.bodies.append ( bod ) @@ -192,7 +192,7 @@ body.setMassMatrix( mass, inertia ) body.attachToNode( node ) body.setStandardForceCallback() - body.setPositionOrientation( Ogre.Vector3(-5,8,0), Ogre.Quaternion.IDENTITY ) + body.setPositionOrientation( Ogre.Vector3(-5,8,0), Ogre.Quaternion().IDENTITY ) self.bodies.append ( body ) self.timer = 1.5 Modified: trunk/python-ogre/demos/OgreNewt/Demo04_RayCasting.py =================================================================== --- trunk/python-ogre/demos/OgreNewt/Demo04_RayCasting.py 2008-10-20 14:41:55 UTC (rev 764) +++ trunk/python-ogre/demos/OgreNewt/Demo04_RayCasting.py 2008-10-20 15:00:39 UTC (rev 765) @@ -91,13 +91,13 @@ ##floornode.setScale( siz ) bod.attachToNode( floornode ) - bod.setPositionOrientation( Ogre.Vector3(0.0,-10.0,0.0), Ogre.Quaternion.IDENTITY ) + bod.setPositionOrientation( Ogre.Vector3(0.0,-10.0,0.0), Ogre.Quaternion().IDENTITY ) self.bodies.append(bod) ## make a simple rope. size=Ogre.Vector3 (3,1.0,1.0) pos=Ogre.Vector3 (0,1,0) - orient = Ogre.Quaternion.IDENTITY + orient = Ogre.Quaternion().IDENTITY ## loop through, making bodies and connecting them. parent = None @@ -306,7 +306,7 @@ self.dragBody.setAutoFreeze(1) self.dragBody = None - self.dragPoint = Ogre.Vector3.ZERO + self.dragPoint = Ogre.Vector3().ZERO self.dragDist = 0.0 self.dragging = False Modified: trunk/python-ogre/demos/OgreNewt/Demo05_SimpleVehicle.py =================================================================== --- trunk/python-ogre/demos/OgreNewt/Demo05_SimpleVehicle.py 2008-10-20 14:41:55 UTC (rev 764) +++ trunk/python-ogre/demos/OgreNewt/Demo05_SimpleVehicle.py 2008-10-20 15:00:39 UTC (rev 765) @@ -58,14 +58,14 @@ del col bod.attachToNode( floornode ) - bod.setPositionOrientation( Ogre.Vector3(0.0,-2.0,0.0), Ogre.Quaternion.IDENTITY ) + bod.setPositionOrientation( Ogre.Vector3(0.0,-2.0,0.0), Ogre.Quaternion().IDENTITY ) self.bodies.append(bod) ## here's where we make the simple vehicle. everything is taken care of in the constuctor. self.Car = SimpleVehicle.SimpleVehicle( self.sceneManager, self.World, - Ogre.Vector3(0,-0.5,0), Ogre.Quaternion.IDENTITY ) + Ogre.Vector3(0,-0.5,0), Ogre.Quaternion().IDENTITY ) ## position camera self.msnCam = self.sceneManager.getRootSceneNode().createChildSceneNode() @@ -251,7 +251,7 @@ del self.Car self.Car = SimpleVehicle.SimpleVehicle( self.sceneManager, self.World, Ogre.Vector3(0,Ogre.Math.UnitRandom() * 10.0,0), - Ogre.Quaternion.IDENTITY ) + Ogre.Quaternion().IDENTITY ) if ( not self.Keyboard.isKeyDown( OIS.KC_R )): self.R = False Modified: trunk/python-ogre/demos/OgreNewt/Demo06_SimpleBuoyancy.py =================================================================== --- trunk/python-ogre/demos/OgreNewt/Demo06_SimpleBuoyancy.py 2008-10-20 14:41:55 UTC (rev 764) +++ trunk/python-ogre/demos/OgreNewt/Demo06_SimpleBuoyancy.py 2008-10-20 15:00:39 UTC (rev 765) @@ -99,13 +99,13 @@ ##floornode.setScale( siz ) bod.attachToNode( floornode ) - bod.setPositionOrientation( Ogre.Vector3(0.0,-10.0,0.0), Ogre.Quaternion.IDENTITY ) + bod.setPositionOrientation( Ogre.Vector3(0.0,-10.0,0.0), Ogre.Quaternion().IDENTITY ) self.bodies.append(bod) ## make a simple rope. size=Ogre.Vector3 (3,1.0,1.0) pos=Ogre.Vector3 (0,1,0) - orient = Ogre.Quaternion.IDENTITY + orient = Ogre.Quaternion().IDENTITY ## loop through, making bodies and connecting them. parent = None @@ -336,7 +336,7 @@ self.dragBody.setAutoFreeze(1) self.dragBody = None - self.dragPoint = Ogre.Vector3.ZERO + self.dragPoint = Ogre.Vector3().ZERO self.dragDist = 0.0 self.dragging = False Modified: trunk/python-ogre/demos/OgreNewt/SimpleVehicle.py =================================================================== --- trunk/python-ogre/demos/OgreNewt/SimpleVehicle.py 2008-10-20 14:41:55 UTC (rev 764) +++ trunk/python-ogre/demos/OgreNewt/SimpleVehicle.py 2008-10-20 15:00:39 UTC (rev 765) @@ -71,7 +71,7 @@ for z in range (-1, 2, 2): ## okay, let's create the tire itself. we'll use the OgreNewt.Vehicle.Tire class for this. most of the ## parameters are self-explanatory... try changing some of them to see what happens. - tireorient = Ogre.Quaternion(Ogre.Degree(0), Ogre.Vector3.UNIT_Y) + tireorient = Ogre.Quaternion(Ogre.Degree(0), Ogre.Vector3().UNIT_Y) tirepos = offset * Ogre.Vector3(x,0.5,z) pin= Ogre.Vector3(0,0,x) mass = 15.0 Modified: trunk/python-ogre/demos/cegui/Demo_CEGUI_Gui.py =================================================================== --- trunk/python-ogre/demos/cegui/Demo_CEGUI_Gui.py 2008-10-20 14:41:55 UTC (rev 764) +++ trunk/python-ogre/demos/cegui/Demo_CEGUI_Gui.py 2008-10-20 15:00:39 UTC (rev 765) @@ -120,7 +120,7 @@ v = rttTex.addViewport( rttCam ) v.setOverlaysEnabled(False) v.setClearEveryFrame( True ) - v.setBackgroundColour( ogre.ColourValue.Black ) + v.setBackgroundColour( ogre.ColourValue().Black ) ## Retrieve CEGUI texture for the RTT Modified: trunk/python-ogre/demos/et/Demo_CEGUI_ET.py =================================================================== --- trunk/python-ogre/demos/et/Demo_CEGUI_ET.py 2008-10-20 14:41:55 UTC (rev 764) +++ trunk/python-ogre/demos/et/Demo_CEGUI_ET.py 2008-10-20 15:00:39 UTC (rev 765) @@ -146,7 +146,7 @@ self.mMoveSpeed = 320.0 #self.mRotateSpeed = ogre.Degree(36)*0.008 self.mRotateSpeed = 8.0 - self.mDirection = ogre.Vector3.ZERO + self.mDirection = ogre.Vector3().ZERO ## Create RaySceneQuery self.mRaySceneQuery = self.mSceneMgr.createRayQuery( ogre.Ray() ) @@ -685,7 +685,7 @@ lightmap = ogre.Image() ET.createTerrainLightmap(terrainInfo, lightmap, 128, 128,\ ogre.Vector3(1, -1, 1),\ - ogre.ColourValue.White,\ + ogre.ColourValue().White,\ ogre.ColourValue(0.3, 0.3, 0.3,1.0)) lightmapTex.getBuffer(0, 0).blitFromMemory(lightmap.getPixelBox(0, 0)) Modified: trunk/python-ogre/scripts/UnitTest.py =================================================================== --- trunk/python-ogre/scripts/UnitTest.py 2008-10-20 14:41:55 UTC (rev 764) +++ trunk/python-ogre/scripts/UnitTest.py 2008-10-20 15:00:39 UTC (rev 765) @@ -89,7 +89,7 @@ ret = [] p = os.path.abspath( os.path.join ( parent, base) ) for f in os.listdir ( p ): - if f.lower().startswith("demo_") and f.lower().endswith(".py") and not f in knownBad: + if f.lower().startswith("demo") and f.lower().endswith(".py") and not f in knownBad: if os.path.isfile ( os.path.join(p,f) ): file = open ( os.path.join(p,f) ) l = file.readline() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2008-10-21 02:37:49
|
Revision: 768 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=768&view=rev Author: andy_miller Date: 2008-10-21 02:37:39 +0000 (Tue, 21 Oct 2008) Log Message: ----------- Apply patch to pygccxml for type_traits - needed for Ogre wrapper and smart pointers Modified Paths: -------------- trunk/python-ogre/environment.py Added Paths: ----------- trunk/python-ogre/patch/pygccxml.patch Modified: trunk/python-ogre/environment.py =================================================================== --- trunk/python-ogre/environment.py 2008-10-20 15:13:26 UTC (rev 767) +++ trunk/python-ogre/environment.py 2008-10-21 02:37:39 UTC (rev 768) @@ -285,17 +285,19 @@ [svn, " co -r 1383 http://pygccxml.svn.sourceforge.net/svnroot/pygccxml/pygccxml_dev "+base, os.getcwd()] ] else: - source_version = "1415" + source_version = "1441" source = [ - [svn, " co http://pygccxml.svn.sourceforge.net/svnroot/pygccxml/pygccxml_dev "+base, os.getcwd()] - ] + [svn, " co -r 1441 http://pygccxml.svn.sourceforge.net/svnroot/pygccxml/pygccxml_dev "+base, os.getcwd()] + ] if isLinux() or isMac() : buildCmds = [ - [0,"python setup.py install --prefix="+ PREFIX , os.path.join (os.getcwd(), base) ], + [0, "patch -s -N -i ../python-ogre/patch/pygccxml.patch -p0 ", os.path.join(os.getcwd(), base) ], + [0,"python setup.py install --prefix="+ PREFIX , os.path.join (os.getcwd(), base) ], ] if isWindows(): buildCmds = [ - [0,"python setup.py install " , os.path.join (os.getcwd(), base) ], + [0, "patch -s -N -i ../python-ogre/patch/pygccxml.patch -p0 ", os.path.join(os.getcwd(), base) ], + [0,"python setup.py install " , os.path.join (os.getcwd(), base) ], ] @@ -309,9 +311,9 @@ [svn, " co -r 1383 http://pygccxml.svn.sourceforge.net/svnroot/pygccxml/pyplusplus_dev "+base, os.getcwd()] ] else: - source_version = "1415" + source_version = "1441" source = [ - [svn, " co http://pygccxml.svn.sourceforge.net/svnroot/pygccxml/pyplusplus_dev "+base, os.getcwd()] + [svn, " co -r 1441 http://pygccxml.svn.sourceforge.net/svnroot/pygccxml/pyplusplus_dev "+base, os.getcwd()] ] if isLinux() or isMac() : buildCmds = [ Added: trunk/python-ogre/patch/pygccxml.patch =================================================================== --- trunk/python-ogre/patch/pygccxml.patch (rev 0) +++ trunk/python-ogre/patch/pygccxml.patch 2008-10-21 02:37:39 UTC (rev 768) @@ -0,0 +1,19 @@ +Index: pygccxml/declarations/type_traits.py +=================================================================== +--- pygccxml/declarations/type_traits.py (revision 1441) ++++ pygccxml/declarations/type_traits.py (working copy) +@@ -990,10 +990,11 @@ + return type.decl_string.startswith( '::boost::shared_ptr<' ) + + @staticmethod +- def value_type( type ): ++ def value_type( type, check=True ): + """returns reference to boost::shared_ptr value type""" +- if not smart_pointer_traits.is_smart_pointer( type ): +- raise TypeError( 'Type "%s" is not instantiation of boost::shared_ptr' % type.decl_string ) ++ if check: ++ if not smart_pointer_traits.is_smart_pointer( type ): ++ raise TypeError( 'Type "%s" is not instantiation of boost::shared_ptr' % type.decl_string ) + type = remove_alias( type ) + cls = remove_cv( type ) + cls = remove_declarated( type ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2008-10-21 09:56:53
|
Revision: 771 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=771&view=rev Author: andy_miller Date: 2008-10-21 09:53:59 +0000 (Tue, 21 Oct 2008) Log Message: ----------- Fix for extra escape characters in doc string (Linux requirement) Simplified data stamp so it didn't change every code generation run Modified Paths: -------------- trunk/python-ogre/code_generators/common_utils/__init__.py trunk/python-ogre/code_generators/common_utils/extract_documentation.py trunk/python-ogre/scripts/UnitTest.py Modified: trunk/python-ogre/code_generators/common_utils/__init__.py =================================================================== --- trunk/python-ogre/code_generators/common_utils/__init__.py 2008-10-21 07:34:11 UTC (rev 770) +++ trunk/python-ogre/code_generators/common_utils/__init__.py 2008-10-21 09:53:59 UTC (rev 771) @@ -67,7 +67,7 @@ po = ".".join( (env.PythonOgreMajorVersion,env.PythonOgreMinorVersion, env.PythonOgrePatchVersion) ) t = datetime.datetime.now().isoformat(' ').strip() - t = datetime.date.today().isoformat() # making this less granular so it doesn't change 'every' time I do a regenerate + t = str (datetime.date.today().month) # making this less granular so it doesn't change 'every' time I do a regenerate v = envClass.version s = getSVNVersion( env ) detail = "_".join( (po,s,envClass.name, v, t) ) Modified: trunk/python-ogre/code_generators/common_utils/extract_documentation.py =================================================================== --- trunk/python-ogre/code_generators/common_utils/extract_documentation.py 2008-10-21 07:34:11 UTC (rev 770) +++ trunk/python-ogre/code_generators/common_utils/extract_documentation.py 2008-10-21 09:53:59 UTC (rev 771) @@ -222,22 +222,39 @@ _str = clean(_str, "\\image", "Image: ") ## nxPhysics _str = clean(_str, "\\examples", "Examples: ") ## nxOgre - _str = clean(_str, "\\default", "Default: ") ## nxOgre + _str = clean(_str, "\\default", "Default: ") ## nxOgre - _str = clean(_str, "\\version", "@version ") ## cegui - _str = clean(_str, "\\date", "@date ") # - _str = clean(_str, "\\todo", "@todo ") ## - _str = clean(_str, "\\bug", "@Bug ") ## - _str = clean(_str, "\\author", "@Author ") ## + _str = clean(_str, "\\version", "@version ") ## cegui + _str = clean(_str, "\\date", "@date ") # + _str = clean(_str, "\\todo", "@todo ") ## + _str = clean(_str, "\\bug", "@Bug ") ## + _str = clean(_str, "\\author", "@Author ") ## ## now clean up the rest - _str = reduce(clean, [_str, '/', '*', '!', "\\brief", '\\fn', + _str = reduce(clean, [_str, '/', "\\brief", '\\fn', "@brief", "@fn", '"', "@{", "\\c", "\\a"]) ## somtimes there are '"' in the doc strings and other "\\"... # return _str.lstrip() # return " " + _str.lstrip() - return _str ## no removale of white space so Epytext can handle sections etc + # another fix to remove stray escape sequences - only new lines allowed + # last character should never be a backslash, however lets fix it just in case... + # and we need to make a new copy because strings are immutable... + newStr="" + for x in range ( len ( _str) -1 ): # handle upto 2nd to last character + if _str[x] == '\\' and _str[x+1] != 'n': + print "fixing stray escape sequence", x, _str + newStr += ' ' + else: + newStr += _str[x] + x = len (_str) -1 # need to handle last character + if _str[x] == '\\' : + print "fixing stray escape sequence EOL", _str + newStr += ' ' + else: + newStr += _str[x] + return newStr ## no removale of white space so Epytext can handle sections etc + def make_epytext ( str ): """ turn this string into something more Epytext compatible """ Modified: trunk/python-ogre/scripts/UnitTest.py =================================================================== --- trunk/python-ogre/scripts/UnitTest.py 2008-10-21 07:34:11 UTC (rev 770) +++ trunk/python-ogre/scripts/UnitTest.py 2008-10-21 09:53:59 UTC (rev 771) @@ -108,7 +108,11 @@ FAILHARD=False def parseInput(): """Handle command line input """ - usage = "usage: %prog [options] [demo_program to test] " + usage = "Usage: %prog [options] [demo_program to test] \n\ + \n Example: - run all tests in a number of demo directories\ + \n %prog -d ogre -d cegui -d ogreode\n\ + \n Example: - run a specific demo (base defaults to ogre)\ + \n %prog demo_smoke\n" parser = OptionParser(usage=usage, version="%prog 1.0") parser.add_option("-v", "--verbose", action="store_true", default=False,dest="verbose", help="Output all output to stdout rather then saving to the log file") parser.add_option("-s", "--ScreenShotPath", default=os.path.join(os.getcwd(), "..", "screenshots"), action="store_true", dest="ScreenShotPath", help="Specify the directory for the snapshots") @@ -142,6 +146,9 @@ for d in getDemoFiles ( options.DemoParentPath, b ): shortName = os.path.splitext( os.path.split(d)[1])[0] runTest ( b, shortName, d ) - else: - pass \ No newline at end of file + shortName = args[0] + b = options.DemoBases[0] + d = os.path.abspath( os.path.join ( options.DemoParentPath, b, shortName ) ) + runTest ( b, shortName, d ) + \ 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-10-21 10:25:50
|
Revision: 772 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=772&view=rev Author: andy_miller Date: 2008-10-21 10:25:36 +0000 (Tue, 21 Oct 2008) Log Message: ----------- Improved Physx support on Linux - retrieve and build automatic now Modified Paths: -------------- trunk/python-ogre/PythonOgreConfig_posix.py trunk/python-ogre/environment.py Modified: trunk/python-ogre/PythonOgreConfig_posix.py =================================================================== --- trunk/python-ogre/PythonOgreConfig_posix.py 2008-10-21 09:53:59 UTC (rev 771) +++ trunk/python-ogre/PythonOgreConfig_posix.py 2008-10-21 10:25:36 UTC (rev 772) @@ -110,7 +110,7 @@ PATH_LIB_betagui = PATH_betagui PATH_LIB_quickgui = PATH_quickgui PATH_LIB_NxOgre= os.path.join(LOCAL_LIB ) -PATH_LIB_PhysX = os.path.join(LOCAL_LIB, 'PhysX','v2.7.3') +PATH_LIB_PhysX = os.path.join('/usr/lib', 'PhysX','v2.8.1') PATH_LIB_Bullet = os.path.join( LOCAL_LIB ) PATH_LIB_Theora= os.path.join(PATH_Theora, 'bin', 'Release') PATH_LIB_ogrevideoffmpeg = PATH_ogrevideoffmpeg @@ -177,13 +177,13 @@ ##,os.path.join(PATH_OgreAddons,'videoplugin','ptypes-1.8.3','include') ,os.path.join(PATH_THIRDPARTY,'ptypes','include') ] -physxbase = os.path.join(LOCAL_INCLUDE, 'PhysX','v2.7.3', 'SDKs') +physxbase = os.path.join('/usr/include/', 'PhysX','v2.8.1', 'SDKs') PATH_INCLUDE_PhysX= [ physxbase - ,os.path.join(physxbase, 'Cooking','Include') + ,os.path.join(physxbase, 'Cooking','include') ,os.path.join(physxbase, 'Foundation','include') ,os.path.join(physxbase, 'PhysXLoader','include') ,os.path.join(physxbase, 'NxCharacter','include') - ,os.path.join(physxbase, 'NxExtensions','include') + ##,os.path.join(physxbase, 'NxExtensions','include') ,os.path.join(physxbase, 'Physics','include') ] PATH_INCLUDE_opensteer = os.path.join(LOCAL_INCLUDE, 'OpenSteer') Modified: trunk/python-ogre/environment.py =================================================================== --- trunk/python-ogre/environment.py 2008-10-21 09:53:59 UTC (rev 771) +++ trunk/python-ogre/environment.py 2008-10-21 10:25:36 UTC (rev 772) @@ -1280,10 +1280,22 @@ Config.PATH_LIB_PhysX ] CheckIncludes=[] - if os.name == 'nt': + if isWindows(): libs=[ boost.lib, 'NxCharacter', 'NxCooking', 'PhysXLoader' ] - else: - libs=[ boost.lib, 'NxCharacter', 'NxCooking', 'PhysXCore', 'PhysXLoader' ] + elif isLinux(): + libs=[ boost.lib, 'NxCharacter', 'NxCooking', 'PhysXCore', 'PhysXLoader' ] + source = [ + [wget, "http://developer.download.nvidia.com/PhysX/2.8.1/PhysX_2.8.1_SDK_CoreLinux_deb.tar.gz", downloadPath] + ] + + buildCmds = [ + [0, "tar zxf " + os.path.join(downloadPath, "PhysX_2.8.1_SDK_CoreLinux_deb.tar.gz"), ''], + [0, "sudo dpkg -i libphysx-common_2.8.1-4_i386.deb", ''], + [0, "sudo dpkg -i libphysx-2.8.1_4_i386.deb", ''], + [0, "sudo dpkg -i libphysx-dev-2.8.1_4_i386.deb", ''], + [0, "sudo dpkg -i libphysx-extras-2.8.1_4_i386.deb", ''] + ] + ModuleName="PhysX" class nxogre_09: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2008-10-20 13:48:33
|
Revision: 761 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=761&view=rev Author: andy_miller Date: 2008-10-20 13:48:25 +0000 (Mon, 20 Oct 2008) Log Message: ----------- Updates to demos to work with Unittesting Fixes to demos due to API changes in Ogre and Python-Ogre implementation Added unittest script Tweaks to sampleframework for unittest Modified Paths: -------------- trunk/python-ogre/demos/caelum/Demo_Caelum01.py trunk/python-ogre/demos/caelum/resources.cfg trunk/python-ogre/demos/ogre/Demo_Basic.py trunk/python-ogre/demos/ogre/Demo_CameraTracking.py trunk/python-ogre/demos/ogre/Demo_CelShading.py trunk/python-ogre/demos/ogre/Demo_Fresnel.py trunk/python-ogre/demos/ogre/Demo_Grass.py trunk/python-ogre/demos/ogre/Demo_NetworkClient.py trunk/python-ogre/demos/ogre/Demo_NetworkServer.py trunk/python-ogre/demos/ogre/Demo_NodeListener.py trunk/python-ogre/demos/ogre/Demo_OgreCollision02.py trunk/python-ogre/demos/ogre/Demo_OneFish.py trunk/python-ogre/demos/ogre/Demo_ParticleFX.py trunk/python-ogre/demos/ogre/Demo_RenderToTexture.py trunk/python-ogre/demos/ogre/Demo_RendererCreate.py trunk/python-ogre/demos/ogre/Demo_SkeletalAnimation.py trunk/python-ogre/demos/ogre/Demo_SkyBox.py trunk/python-ogre/demos/ogre/Demo_SkyDome.py trunk/python-ogre/demos/ogre/Demo_Spinner.py trunk/python-ogre/demos/ogre/Demo_Terrain.py trunk/python-ogre/demos/ogre/Demo_Video.py trunk/python-ogre/demos/ogre/Demo_WX.py trunk/python-ogre/demos/ogre/Demo_Water.py trunk/python-ogre/demos/ogre/demo_water_s.py trunk/python-ogre/packages_2.5/ogre/renderer/OGRE/sf_OIS.py Added Paths: ----------- trunk/python-ogre/scripts/UnitTest.py Removed Paths: ------------- trunk/python-ogre/demos/ogre/Demo_Shadows_Org.py trunk/python-ogre/demos/ogre/Shadows.py Modified: trunk/python-ogre/demos/caelum/Demo_Caelum01.py =================================================================== --- trunk/python-ogre/demos/caelum/Demo_Caelum01.py 2008-10-19 12:06:32 UTC (rev 760) +++ trunk/python-ogre/demos/caelum/Demo_Caelum01.py 2008-10-20 13:48:25 UTC (rev 761) @@ -27,7 +27,7 @@ self.updateRay = ogre.Ray() ## basic terrain ray query pos = camera.getPosition() - d = ogre.Vector3.NEGATIVE_UNIT_Y + d = ogre.Vector3().NEGATIVE_UNIT_Y self.raySceneQuery = sceneManager.createRayQuery(ogre.Ray( pos, d )) ## -------------------------------------------------------------- @@ -38,7 +38,7 @@ ## clamp camera to terrain self.updateRay.setOrigin (self.camera.getPosition()) - self.updateRay.setDirection (ogre.Vector3.NEGATIVE_UNIT_Y) + self.updateRay.setDirection (ogre.Vector3().NEGATIVE_UNIT_Y) self.raySceneQuery.Ray = self.updateRay for queryResult in self.raySceneQuery.execute(): if queryResult.worldFragment is not None: @@ -154,8 +154,8 @@ print "deleted Listeners" # t = self.caelumSystem.getSun().setSunPositionModel(None) # print "Sun is None", t - t = self.caelumSystem.getSun().getSunPositionModel() - print "Sun is None", t +# t = self.caelumSystem.getSun().getSunPositionModel() +# print "Sun is None", t @@ -205,7 +205,7 @@ self.camera.setFarClipDistance(0); self.camera.setNearClipDistance(5); - self.raySceneQuery = self.sceneManager.createRayQuery(ogre.Ray(self.camera.getPosition(), ogre.Vector3.NEGATIVE_UNIT_Y)) + self.raySceneQuery = self.sceneManager.createRayQuery(ogre.Ray(self.camera.getPosition(), ogre.Vector3().NEGATIVE_UNIT_Y)) def _createScene(self): @@ -224,18 +224,25 @@ ogre.CompositorManager.getSingleton().addCompositor(self.renderWindow.getViewport(0),"Bloom") camera.setNearClipDistance(0.01) componentMask = caelum.CaelumSystem.CaelumComponent( - caelum.CaelumSystem.CAELUM_COMPONENT_SKY_COLOUR_MODEL | +# caelum.CaelumSystem.CAELUM_COMPONENT_SKY_DOME | # caelum.CaelumSystem.CAELUM_COMPONENT_SUN | - caelum.CaelumSystem.CAELUM_COMPONENT_SOLAR_SYSTEM_MODEL | - ## these cause run time errors on my crap laptop -# caelum.CaelumSystem.CAELUM_COMPONENT_SKY_DOME | -# caelum.CaelumSystem.CAELUM_COMPONENT_STARFIELD | +# caelum.CaelumSystem.CAELUM_COMPONENT_MOON | +# caelum.CaelumSystem.CAELUM_COMPONENT_IMAGE_STARFIELD | +# caelum.CaelumSystem.CAELUM_COMPONENT_POINT_STARFIELD | # caelum.CaelumSystem.CAELUM_COMPONENT_CLOUDS | +# caelum.CaelumSystem.CAELUM_COMPONENT_PRECIPITATION | +# caelum.CaelumSystem.CAELUM_COMPONENT_SCREEN_SPACE_FOG | # caelum.CaelumSystem.CAELUM_COMPONENT_GROUND_FOG | + +# caelum.CaelumSystem.CAELUM_COMPONENTS_NONE | + caelum.CaelumSystem.CAELUM_COMPONENTS_DEFAULT | +# caelum.CaelumSystem.CAELUM_COMPONENTS_ALL | + + 0 ) print componentMask ## Initialise Caelum - self.caelumSystem = caelum.CaelumSystem(self.root.getSingletonPtr(), self.sceneManager ) ##,componentMask ) + self.caelumSystem = caelum.CaelumSystem(self.root.getSingletonPtr(), self.sceneManager ,componentMask ) self.caelumSystem.setManageSceneFog(True) self.caelumSystem.setSceneFogDensityMultiplier(0.0015) @@ -244,7 +251,7 @@ ## This is how you switch the sun implementation. ## This here is a no-op; but it's useful to test caelum doesn't crash when the second sun is created. - self.spheresun = caelum.SphereSun(self.sceneManager, self.caelumSystem.getRootNode ()) + self.spheresun = caelum.SphereSun(self.sceneManager, self.caelumSystem.getCaelumCameraNode ()) self.caelumSystem.setSun (self.spheresun) ## Setup sun options @@ -261,11 +268,14 @@ # ## Setup cloud options. # ## Tweak these settings to make the demo look pretty. - if self.caelumSystem.getClouds (): - self.caelumSystem.getClouds ().setCloudSpeed(ogre.Vector2(0.000005, -0.000009)) - self.caelumSystem.getClouds ().setCloudBlendTime(3600 * 24) - self.caelumSystem.getClouds ().setCloudCover(0.3) + if self.caelumSystem.getCloudSystem (): + + self.caelumSystem.getCloudSystem ().createLayerAtHeight(2000) + self.caelumSystem.getCloudSystem ().createLayerAtHeight(5000) + self.caelumSystem.getCloudSystem ().getLayer(0).setCloudSpeed(ogre.Vector2(0.000005, -0.000009)) + self.caelumSystem.getCloudSystem ().getLayer(1).setCloudSpeed(ogre.Vector2(0.0000045, -0.0000085)) + ## Register caelum to the render target self.renderWindow.addListener (self.caelumSystem) Modified: trunk/python-ogre/demos/caelum/resources.cfg =================================================================== --- trunk/python-ogre/demos/caelum/resources.cfg 2008-10-19 12:06:32 UTC (rev 760) +++ trunk/python-ogre/demos/caelum/resources.cfg 2008-10-20 13:48:25 UTC (rev 761) @@ -1,26 +1,10 @@ -[Bootstrap] +[Bootstrap] +#Zip=..\..\samples\resources\OgreCore.zip Zip=../media/packs/OgreCore.zip +[Caelum] +FileSystem=c:\development\caelum\trunk\caelum\main\resources\ +FileSystem=c:\development\caelum\trunk\caelum\samples\resources\ +[CEGUI] +FileSystem=c:\development\caelum\trunk\caelum\samples\resources\gui\ -# Resource locations to be added to the default path -[General] -FileSystem=../media -FileSystem=../media/fonts -FileSystem=../media/sounds -FileSystem=../media/Audio -FileSystem=../media/materials/programs -FileSystem=../media/materials/scripts -FileSystem=../media/materials/textures -FileSystem=../media/models -FileSystem=../media/overlays -FileSystem=../media/particle -FileSystem=../media/gui -Zip=../media/packs/cubemap.zip -Zip=../media/packs/cubemapsJS.zip -Zip=../media/packs/dragon.zip -Zip=../media/packs/fresneldemo.zip -Zip=../media/packs/ogretestmap.zip -Zip=../media/packs/skybox.zip -#Zip=../media/packs/chiropteraDM.pk3 -[Caelum] -FileSystem=./media Modified: trunk/python-ogre/demos/ogre/Demo_Basic.py =================================================================== --- trunk/python-ogre/demos/ogre/Demo_Basic.py 2008-10-19 12:06:32 UTC (rev 760) +++ trunk/python-ogre/demos/ogre/Demo_Basic.py 2008-10-20 13:48:25 UTC (rev 761) @@ -1,3 +1,4 @@ +# NO_UNITTEST # This code is in the Public Domain # ----------------------------------------------------------------------------- # This source file is part of Python-Ogre @@ -19,7 +20,7 @@ import ogre.io.OIS as OIS class OGREMain(ogre.Root): - def __init__(self, plugins_path='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 @@ -96,7 +97,7 @@ def main(): - root = OGREMain(plugins_path='plugins.cfg') + root = OGREMain(plugins_path='../plugins.cfg') weu = ogre.WindowEventUtilities() while not root.window.isClosed(): weu.messagePump() Modified: trunk/python-ogre/demos/ogre/Demo_CameraTracking.py =================================================================== --- trunk/python-ogre/demos/ogre/Demo_CameraTracking.py 2008-10-19 12:06:32 UTC (rev 760) +++ trunk/python-ogre/demos/ogre/Demo_CameraTracking.py 2008-10-20 13:48:25 UTC (rev 761) @@ -31,7 +31,7 @@ plane = ogre.Plane() - plane.normal = ogre.Vector3.UNIT_Y + plane.normal = ogre.Vector3().UNIT_Y plane.d = 200 mm = ogre.MeshManager.getSingleton() mm.createPlane('FloorPlane', 'General', plane, 200000.0, 200000.0, Modified: trunk/python-ogre/demos/ogre/Demo_CelShading.py =================================================================== --- trunk/python-ogre/demos/ogre/Demo_CelShading.py 2008-10-19 12:06:32 UTC (rev 760) +++ trunk/python-ogre/demos/ogre/Demo_CelShading.py 2008-10-20 13:48:25 UTC (rev 761) @@ -31,7 +31,7 @@ # Accept default settings: point light, white diffuse, just set position light = sceneManager.createLight('MainLight') - self.rotationNode = sceneManager.rootSceneNode.createChildSceneNode() + self.rotationNode = sceneManager.getRootSceneNode().createChildSceneNode() self.rotationNode.createChildSceneNode((20,40,50)).attachObject(light) # create head entity @@ -67,7 +67,7 @@ sub.setCustomParameter(CUSTOM_DIFFUSE, (1.0, 1.0, 0.7, 1.0)) sub.setCustomParameter(CUSTOM_SPECULAR, (1.0, 1.0, 1.0, 1.0)) - sceneManager.rootSceneNode.createChildSceneNode().attachObject(entity) + sceneManager.getRootSceneNode().createChildSceneNode().attachObject(entity) self.renderWindow.getViewport(0).backgroundColour = (1, 1, 1) def _createFrameListener(self): Modified: trunk/python-ogre/demos/ogre/Demo_Fresnel.py =================================================================== --- trunk/python-ogre/demos/ogre/Demo_Fresnel.py 2008-10-19 12:06:32 UTC (rev 760) +++ trunk/python-ogre/demos/ogre/Demo_Fresnel.py 2008-10-20 13:48:25 UTC (rev 761) @@ -105,15 +105,15 @@ direction = self.fishLastPosition[fish] - newPos direction.normalise #Test for opposite vectors - d = 1.0 + ogre.Vector3.UNIT_X.dotProduct(direction) + d = 1.0 + ogre.Vector3().UNIT_X.dotProduct(direction) if (math.fabs(d) < 0.00001): #Diametrically opposed vectors - orientation = ogre.Quaternion.IDENTITY - orientation.FromAxes(ogre.Vector3.NEGATIVE_UNIT_X, - ogre.Vector3.UNIT_Y, ogre.Vector3.NEGATIVE_UNIT_Z) + orientation = ogre.Quaternion().IDENTITY + orientation.FromAxes(ogre.Vector3().NEGATIVE_UNIT_X, + ogre.Vector3().UNIT_Y, ogre.Vector3().NEGATIVE_UNIT_Z) self.fishNodes[fish].setOrientation (orientation) ## .orientation to SetOr.. else: - self.fishNodes[fish].setOrientation (ogre.Vector3.UNIT_X.getRotationTo(direction)) + self.fishNodes[fish].setOrientation (ogre.Vector3().UNIT_X.getRotationTo(direction)) self.fishLastPosition[fish] = newPos return sf.FrameListener.frameStarted(self,frameEvent) @@ -121,6 +121,7 @@ def __init__(self): "Init Fresnel Application" + sf.Application.__init__(self) self.frameListener = None self.root = None self.camera = None @@ -188,7 +189,7 @@ #Create a point light l = sceneManager.createLight("MainLight") l.type = ogre.Light.LT_DIRECTIONAL - l.setDirection (-ogre.Vector3.UNIT_Y) + l.setDirection (-ogre.Vector3().UNIT_Y) # debug graphics card capabilities # self.debugSupportedFormats() @@ -227,7 +228,7 @@ #Define a floor plane mesh self.reflectionPlane = ogre.Plane() - self.reflectionPlane.normal = ogre.Vector3.UNIT_Y + self.reflectionPlane.normal = ogre.Vector3().UNIT_Y self.reflectionPlane.d = 0 ogre.MeshManager.getSingleton().createPlane('ReflectPlane', "General", @@ -259,7 +260,7 @@ pEnt.setMaterialName ("RomanBath/OgreStone") headNode.attachObject(pEnt) headNode.setPosition(-350,55,130) - headNode.rotate(ogre.Vector3.UNIT_Y, ogre.Degree (90)) + headNode.rotate(ogre.Vector3().UNIT_Y, ogre.Degree (90)) self.aboveWaterEnts.append(pEnt) # create below Water Entities Modified: trunk/python-ogre/demos/ogre/Demo_Grass.py =================================================================== --- trunk/python-ogre/demos/ogre/Demo_Grass.py 2008-10-19 12:06:32 UTC (rev 760) +++ trunk/python-ogre/demos/ogre/Demo_Grass.py 2008-10-20 13:48:25 UTC (rev 761) @@ -173,7 +173,7 @@ baseVec = ogre.Vector3(GRASS_WIDTH/2, 0, 0) vec = baseVec rot = ogre.Quaternion () - rot.FromAngleAxis(ogre.Degree(d=60), ogre.Vector3.UNIT_Y) + rot.FromAngleAxis(ogre.Degree(d=60), ogre.Vector3().UNIT_Y) # change from the C++ demo - we build a buffer and then write it in one go buffer=[] @@ -357,11 +357,11 @@ self.setupLighting() plane = ogre.Plane() - plane.normal = ogre.Vector3.UNIT_Y + plane.normal = ogre.Vector3().UNIT_Y plane.d = 0 ogre.MeshManager.getSingleton().createPlane("Myplane", ogre.ResourceGroupManager.DEFAULT_RESOURCE_GROUP_NAME, plane, - 14500,14500,10,10,True,1,50,50,ogre.Vector3.UNIT_Z) + 14500,14500,10,10,True,1,50,50,ogre.Vector3().UNIT_Z) pPlaneEnt = self.sceneManager.createEntity( "plane", "Myplane" ) pPlaneEnt.setMaterialName("Examples/GrassFloor") pPlaneEnt.setCastShadows(False) @@ -386,7 +386,7 @@ orientation = ogre.Quaternion() orientation.FromAngleAxis( ogre.Degree(random.randrange(0, 359)), - ogre.Vector3.UNIT_Y) + ogre.Vector3().UNIT_Y) scale = ogre.Vector3( 1, random.random()*(1.15-0.85)+0.85, 1) s.addEntity(e, pos, orientation, scale) s.build() Modified: trunk/python-ogre/demos/ogre/Demo_NetworkClient.py =================================================================== --- trunk/python-ogre/demos/ogre/Demo_NetworkClient.py 2008-10-19 12:06:32 UTC (rev 760) +++ trunk/python-ogre/demos/ogre/Demo_NetworkClient.py 2008-10-20 13:48:25 UTC (rev 761) @@ -1,3 +1,4 @@ +# NO_UNITTEST """ VERY simple and crude client code. Assumes there is a server that will echo the sent data and when it's time to close Modified: trunk/python-ogre/demos/ogre/Demo_NetworkServer.py =================================================================== --- trunk/python-ogre/demos/ogre/Demo_NetworkServer.py 2008-10-19 12:06:32 UTC (rev 760) +++ trunk/python-ogre/demos/ogre/Demo_NetworkServer.py 2008-10-20 13:48:25 UTC (rev 761) @@ -1,3 +1,4 @@ +# NO_UNITTEST """ VERY simple and crude Python server @@ -8,6 +9,7 @@ import socket as s import SocketServer as ss +import sys class Handler ( ss.BaseRequestHandler ): def handle ( self ): @@ -36,6 +38,10 @@ (family, socktype, proto, canonname, sockaddr) = s.getaddrinfo ( "127.0.0.1", 4444 )[0] myServer = Server ( sockaddr, Handler ) myServer.closenow = False - - while not myServer.closenow: - myServer.handle_request() + try: + while not myServer.closenow: + myServer.handle_request() + except KeyboardInterrupt: + sys.exit() + except: + sys.exit() \ No newline at end of file Modified: trunk/python-ogre/demos/ogre/Demo_NodeListener.py =================================================================== --- trunk/python-ogre/demos/ogre/Demo_NodeListener.py 2008-10-19 12:06:32 UTC (rev 760) +++ trunk/python-ogre/demos/ogre/Demo_NodeListener.py 2008-10-20 13:48:25 UTC (rev 761) @@ -60,7 +60,7 @@ light.setPosition (ogre.Vector3(20, 80, 50)) plane = ogre.Plane() - plane.normal = ogre.Vector3.UNIT_Y + plane.normal = ogre.Vector3().UNIT_Y plane.d = 200 mm = ogre.MeshManager.getSingleton() Modified: trunk/python-ogre/demos/ogre/Demo_OgreCollision02.py =================================================================== --- trunk/python-ogre/demos/ogre/Demo_OgreCollision02.py 2008-10-19 12:06:32 UTC (rev 760) +++ trunk/python-ogre/demos/ogre/Demo_OgreCollision02.py 2008-10-20 13:48:25 UTC (rev 761) @@ -38,11 +38,11 @@ # create the floor plane = ogre.Plane() - plane.normal = ogre.Vector3.UNIT_Y + plane.normal = ogre.Vector3().UNIT_Y plane.d = 200 mm = ogre.MeshManager.getSingleton() mm.createPlane('FloorPlane', 'General', plane, 200000.0, 200000.0, - 20, 20, True, 1, 50, 50, ogre.Vector3.UNIT_Z) + 20, 20, True, 1, 50, 50, ogre.Vector3().UNIT_Z) entity = sceneManager.createEntity('floor', 'FloorPlane') entity.setMaterialName('Examples/RustySteel') sceneManager.getRootSceneNode().createChildSceneNode().attachObject(entity) Modified: trunk/python-ogre/demos/ogre/Demo_OneFish.py =================================================================== --- trunk/python-ogre/demos/ogre/Demo_OneFish.py 2008-10-19 12:06:32 UTC (rev 760) +++ trunk/python-ogre/demos/ogre/Demo_OneFish.py 2008-10-20 13:48:25 UTC (rev 761) @@ -41,7 +41,7 @@ #Then, takes care of the direction that the fish has to face to directionToGo = self.mAnimEntity[2].position - self.mAnimEntity[1].position - src = self.mAnimEntity[0].Orientation * (-ogre.Vector3.UNIT_X) + src = self.mAnimEntity[0].Orientation * (-ogre.Vector3().UNIT_X) quat = src.getRotationTo(directionToGo) #Calculates the quaternion of the appropriate rotation self.mAnimEntity[0].rotate(quat) #Rotates, the fish. Here, we know that no rotation of 180 #degrees will occur so we do not have to care about it Modified: trunk/python-ogre/demos/ogre/Demo_ParticleFX.py =================================================================== --- trunk/python-ogre/demos/ogre/Demo_ParticleFX.py 2008-10-19 12:06:32 UTC (rev 760) +++ trunk/python-ogre/demos/ogre/Demo_ParticleFX.py 2008-10-20 13:48:25 UTC (rev 761) @@ -43,13 +43,13 @@ particleSystem2 = sceneManager.createParticleSystem('fountain1', 'Examples/PurpleFountain') node = self.fountainNode.createChildSceneNode() node.translate(200.0, -100.0, 0.0) - node.rotate(ogre.Vector3.UNIT_Z, ogre.Degree(20)) + node.rotate(ogre.Vector3().UNIT_Z, ogre.Degree(20)) node.attachObject(particleSystem2) particleSystem3 = sceneManager.createParticleSystem('fountain2', 'Examples/PurpleFountain') node = self.fountainNode.createChildSceneNode() node.translate(-200.0, -100.0, 0.0) - node.rotate(ogre.Vector3.UNIT_Z, ogre.Degree(-20)) + node.rotate(ogre.Vector3().UNIT_Z, ogre.Degree(-20)) node.attachObject(particleSystem3) particleSystem4 = sceneManager.createParticleSystem('rain', 'Examples/Rain') Modified: trunk/python-ogre/demos/ogre/Demo_RenderToTexture.py =================================================================== --- trunk/python-ogre/demos/ogre/Demo_RenderToTexture.py 2008-10-19 12:06:32 UTC (rev 760) +++ trunk/python-ogre/demos/ogre/Demo_RenderToTexture.py 2008-10-20 13:48:25 UTC (rev 761) @@ -89,19 +89,19 @@ # Create a prefab plane self.mPlane = ogre.MovablePlane("ReflectPlane") self.mPlane.d = 0 - self.mPlane.normal =ogre.Vector3.UNIT_Y + self.mPlane.normal =ogre.Vector3().UNIT_Y # ogre.MeshManager.getSingleton().createPlane("ReflectionPlane", # ogre.ResourceGroupManager.DEFAULT_RESOURCE_GROUP_NAME, # self.mPlane._getDerivedPlane(), 2000.0, 2000.0, -# 1, 1, True, 1, 1.0, 1.0, ogre.Vector3.UNIT_Z, +# 1, 1, True, 1, 1.0, 1.0, ogre.Vector3().UNIT_Z, # ogre.HardwareBuffer.HBU_STATIC_WRITE_ONLY, ogre.HardwareBuffer.HBU_STATIC_WRITE_ONLY, # True,True # ) ogre.MeshManager.getSingleton().createPlane("ReflectionPlane", ogre.ResourceGroupManager.DEFAULT_RESOURCE_GROUP_NAME, self.mPlane, 2000.0, 2000.0, - 1, 1, True, 1, 1.0, 1.0, ogre.Vector3.UNIT_Z, + 1, 1, True, 1, 1.0, 1.0, ogre.Vector3().UNIT_Z, ogre.HardwareBuffer.HBU_STATIC_WRITE_ONLY, ogre.HardwareBuffer.HBU_STATIC_WRITE_ONLY, True,True ) @@ -157,15 +157,15 @@ # create ViewPort v = rttTex.addViewport( self.mReflectCam ) v.setClearEveryFrame ( True ) - v.setBackgroundColour (ogre.ColourValue.White) + v.setBackgroundColour (ogre.ColourValue().White) mat = ogre.MaterialManager.getSingleton().create("RttMat",ogre.ResourceGroupManager.DEFAULT_RESOURCE_GROUP_NAME) t = mat.getTechnique(0).getPass(0).createTextureUnitState('RustedMetal.jpg') t = mat.getTechnique(0).getPass(0).createTextureUnitState('RttTex') # creates the reflection... # Blend with base texture t.setColourOperationEx( ogre.LBX_BLEND_MANUAL, ogre.LBS_TEXTURE, - ogre.LBS_CURRENT, ogre.ColourValue.White, - ogre.ColourValue.White, 0.25) + ogre.LBS_CURRENT, ogre.ColourValue().White, + ogre.ColourValue().White, 0.25) t.setTextureAddressingMode (ogre.TextureUnitState.TAM_CLAMP) t.setProjectiveTexturing(True, self.mReflectCam) Modified: trunk/python-ogre/demos/ogre/Demo_RendererCreate.py =================================================================== --- trunk/python-ogre/demos/ogre/Demo_RendererCreate.py 2008-10-19 12:06:32 UTC (rev 760) +++ trunk/python-ogre/demos/ogre/Demo_RendererCreate.py 2008-10-20 13:48:25 UTC (rev 761) @@ -1,3 +1,4 @@ +# NO_UNITTEST # This code is in the Public Domain # ----------------------------------------------------------------------------- # This source file is part of Python-Ogre @@ -27,7 +28,7 @@ self.client = None self.root = ogre.Root( sf.getPluginPath() ) config = ogre.ConfigFile() - config.load('resources.cfg' ) + config.load('../resources.cfg' ) ## this is still ugly as we need to create a real python iterator... Deleted: trunk/python-ogre/demos/ogre/Demo_Shadows_Org.py =================================================================== --- trunk/python-ogre/demos/ogre/Demo_Shadows_Org.py 2008-10-19 12:06:32 UTC (rev 760) +++ trunk/python-ogre/demos/ogre/Demo_Shadows_Org.py 2008-10-20 13:48:25 UTC (rev 761) @@ -1,564 +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 and/or PyOgre -# For the latest info, see http://www.ogre3d.org/ -# -# You may use this sample code for anything you like, it is not covered by the -# LGPL. -# ----------------------------------------------------------------------------- - -# -# \file -# Shadows.cpp -# \brief -# Shows a few ways to use ogre's shadowing techniques -# -import sys -sys.path.insert(0,'..') -import PythonOgreConfig - -import ogre.renderer.OGRE as ogre -import SampleFramework as sf - -if ogre.OgreVersionString[:2] =="12": - KC_O = ogre.KC_O - KC_M = ogre.KC_M -else: - import ogre.io.OIS as OIS - KC_O = OIS.KC_O - KC_M = OIS.KC_M - - -mAnimState = 0 -# Entity* pPlaneEnt -mLight =0 -mSunLight =0 -# SceneNode* mLightNode = 0 -# AnimationState* mLightAnimationState = 0 -mMinLightColour = ogre.ColourValue(0.3, 0.0, 0) -mMaxLightColour = ogre.ColourValue(0.5, 0.3, 0.1) -mMinFlareSize = 40 -mMaxFlareSize = 80 - -NUM_ATHENE_MATERIALS= 2 -mAtheneMaterials = [ "Examples/Athene/NormalMapped", "Examples/Athene/Basic" ] -NUM_SHADOW_TECH = 6 -mShadowTechDescriptions = [ - "Stencil Shadows (Additive)", - "Stencil Shadows (Modulative)", - "Texture Shadows (Additive)", - "Texture Shadows (Modulative)", - "Texture Shadows (Soft Modulative)", - "None" -] -mShadowTech = [ - ogre.SHADOWTYPE_STENCIL_ADDITIVE, - ogre.SHADOWTYPE_STENCIL_MODULATIVE, - ogre.SHADOWTYPE_TEXTURE_ADDITIVE, - ogre.SHADOWTYPE_TEXTURE_MODULATIVE, - ogre.SHADOWTYPE_TEXTURE_MODULATIVE, # soft shadows - ogre.SHADOWTYPE_NONE -] -mShadowTechSoft = [ - False, - False, - False, - False, - True, - False -] -mSoftShadowsSupported = True - -mCurrentAtheneMaterial = 0 -mCurrentShadowTechnique = 0 -SHADOW_COMPOSITOR_NAME = "Gaussian Blur" -mAthene =0 - -mShadowTechniqueInfo=0 -mMaterialInfo = 0 -# OverlayElement* mInfo - -global NUM_ATHENE_MATERIALS,mAtheneMaterials,NUM_SHADOW_TECH,mShadowTechDescriptions -global mShadowTech,mShadowTechSoft,mSoftShadowsSupported,mCurrentAtheneMaterial,mCurrentShadowTechnique - - -## This class 'wibbles' the light and billboard -class LightWibbler ( ogre.ControllerValueFloat ): - global NUM_ATHENE_MATERIALS,mAtheneMaterials,NUM_SHADOW_TECH,mShadowTechDescriptions - global mShadowTech,mShadowTechSoft,mSoftShadowsSupported,mCurrentAtheneMaterial,mCurrentShadowTechnique - - - def __init__(self, light, billboard, minColour, maxColour, minSize, maxSize): - self.mLight = light - self.mBillboard = billboard - self.mMinColour = minColour - self.mColourRange = ogre.ColourValue(0,0,0) - self.mColourRange.r = maxColour.r - minColour.r - self.mColourRange.g = maxColour.g - minColour.g - self.mColourRange.b = maxColour.b - minColour.b - self.mMinSize = minSize - self.mSizeRange = maxSize - minSize - self.intensity=0 - ogre.ControllerValueFloat.__init__(self) - - - - def getValue (self): - return self.intensity - - def setValue ( self, value): - - self.intensity = value - - newColour = ogre.ColourValue(0,0,0) - - # Attenuate the brightness of the light - newColour.r = self.mMinColour.r + (self.mColourRange.r * self.intensity) - newColour.g = self.mMinColour.g + (self.mColourRange.g * self.intensity) - newColour.b = self.mMinColour.b + (self.mColourRange.b * self.intensity) - - self.mLight.setDiffuseColour(newColour) - self.mBillboard.setColour(newColour) - # set billboard size - newSize = self.mMinSize + (self.intensity * self.mSizeRange) - self.mBillboard.setDimensions(newSize, newSize) - - -# Real timeDelay = 0 -# #define KEY_PRESSED(_key,_timeDelay, _macro) \ -# { \ -# if (mInputDevice.isKeyDown(_key) && timeDelay <= 0) \ -# { \ -# timeDelay = _timeDelay \ -# _macro \ -# } \ -# } - - -#--------------------------------------------------------------------------- -class GaussianListener (ogre.CompositorInstance.Listener): - global NUM_ATHENE_MATERIALS,mAtheneMaterials,NUM_SHADOW_TECH,mShadowTechDescriptions - global mShadowTech,mShadowTechSoft,mSoftShadowsSupported,mCurrentAtheneMaterial,mCurrentShadowTechnique -# mVpWidth = 0 -# mVpHeight = 0 -# # Array params - have to pack in groups of 4 since this is how Cg generates them - # also prevents dependent texture read problems if ops don't require swizzle -# mBloomTexWeights=[15][4] -# mBloomTexOffsetsHorz=[15][4] -# mBloomTexOffsetsVert=[15][4] - - def __init__ (self): - ogre.CompositorInstance.listener.__init__(self) - - def notifyViewportSize(width, height): - self.mVpWidth = width - self.mVpHeight = height - # Calculate gaussian texture offsets & weights - deviation = 3.0 - texelSize = 1.0 / min(self.mVpWidth, self.mVpHeight) - - # central sample, no offset - self.mBloomTexOffsetsHorz[0][0] = 0.0 - self.mBloomTexOffsetsHorz[0][1] = 0.0 - self.mBloomTexOffsetsVert[0][0] = 0.0 - self.mBloomTexOffsetsVert[0][1] = 0.0 - self.mBloomTexWeights[0][0] = ogre.Math.gaussianDistribution(0, 0, deviation) - self.mBloomTexWeights[0][1] = self.mBloomTexWeights[0][0] - self.mBloomTexWeights[0][2] = self.mBloomTexWeights[0][0] - self.mBloomTexWeights[0][3] = 1.0 - - # 'pre' samples - for i in range (1,8): - self.mBloomTexWeights[i][0] = ogre.Math.gaussianDistribution(i, 0, deviation) - self.mBloomTexWeights[i][1] = self.mBloomTexWeights[i][0] - self.mBloomTexWeights[i][2] = self.mBloomTexWeights[i][0] - self.mBloomTexWeights[i][3] = 1.0 - self.mBloomTexOffsetsHorz[i][0] = i * texelSize - self.mBloomTexOffsetsHorz[i][1] = 0.0 - self.mBloomTexOffsetsVert[i][0] = 0.0 - self.mBloomTexOffsetsVert[i][1] = i * texelSize - # 'post' samples - for i in range (8, 15): - self.mBloomTexWeights[i][0] = self.mBloomTexWeights[i - 7][0] - self.mBloomTexWeights[i][1] = self.mBloomTexWeights[i][0] - self.mBloomTexWeights[i][2] = self.mBloomTexWeights[i][0] - self.mBloomTexWeights[i][3] = 1.0 - - self.mBloomTexOffsetsHorz[i][0] = -self.mBloomTexOffsetsHorz[i - 7][0] - self.mBloomTexOffsetsHorz[i][1] = 0.0 - self.mBloomTexOffsetsVert[i][0] = 0.0 - self.mBloomTexOffsetsVert[i][1] = -self.mBloomTexOffsetsVert[i - 7][1] - - def notifyMaterialSetup( pass_id, mat): - # Prepare the fragment params offsets - if pass_id == 701: #blur Horz - # horizontal bloom - mat.load() - fparams = mat.getBestTechnique().getPass(0).getFragmentProgramParameters() - progName = mat.getBestTechnique().getPass(0).getFragmentProgramName() - # A bit hacky - Cg & HLSL index arrays via [0], GLSL does not - if progName.find("GLSL") != ogre.String.npos: - fparams.setNamedConstant("sampleOffsets", self.mBloomTexOffsetsHorz[0], 15) - fparams.setNamedConstant("sampleWeights", self.mBloomTexWeights[0], 15) - else: - fparams.setNamedConstant("sampleOffsets[0]", self.mBloomTexOffsetsHorz[0], 15) - fparams.setNamedConstant("sampleWeights[0]", self.mBloomTexWeights[0], 15) - elif pass_id == 700: # blur vert - # vertical bloom - mat.load() - fparams = mat.getTechnique(0).getPass(0).getFragmentProgramParameters() - progName = mat.getBestTechnique().getPass(0).getFragmentProgramName() - # A bit hacky - Cg & HLSL index arrays via [0], GLSL does not - if progName.find("GLSL") != ogre.String.npos: - fparams.setNamedConstant("sampleOffsets", self.mBloomTexOffsetsVert[0], 15) - fparams.setNamedConstant("sampleWeights", self.mBloomTexWeights[0], 15) - else: - fparams.setNamedConstant("sampleOffsets[0]", self.mBloomTexOffsetsVert[0], 15) - fparams.setNamedConstant("sampleWeights[0]", self.mBloomTexWeights[0], 15) - - def notifyMaterialRender(pass_id, mat): - pass - - - -###GaussianListener gaussianListener - - -class ShadowsListener (sf.FrameListener): - - def __init__ ( self, win, cam, sm): - sf.FrameListener.__init__(self,win, cam) - self.sceneManager = sm - self.mShadowVp=0 - self.mShadowCompositor=None - self.timeDelay=0 - -# def frameStarted(self, frameEvent): -# return sf.FrameListener.frameStarted(self, frameEvent) - - def changeShadowTechnique(self): - global NUM_ATHENE_MATERIALS,mAtheneMaterials,NUM_SHADOW_TECH,mShadowTechDescriptions - global mShadowTech,mShadowTechSoft,mSoftShadowsSupported,mCurrentAtheneMaterial,mCurrentShadowTechnique - global mShadowTechniqueInfo, mSunLight, mLight, mMinLightColour, SHADOW_COMPOSITOR_NAME - - prevTech = mCurrentShadowTechnique ##TTT - - if mCurrentShadowTechnique < (NUM_SHADOW_TECH -1 ): - mCurrentShadowTechnique+=1 - else : mCurrentShadowTechnique =0 - -# if not SoftShadowsSupported and mShadowTechSoft[mCurrentShadowTechnique]: -# # Skip soft shadows if not supported -# mCurrentShadowTechnique = ++mCurrentShadowTechnique % NUM_SHADOW_TECH - - - mShadowTechniqueInfo.setCaption(ogre.UTFString("Current: " + mShadowTechDescriptions[mCurrentShadowTechnique])) - - if mShadowTechSoft[prevTech] and not mShadowTechSoft[mCurrentShadowTechnique]: - # Clean up compositors - try: - mShadowCompositor.removeListener(gaussianListener) - except: - pass -##### ogre.CompositorManager.getSingleton().setCompositorEnabled(self.mShadowVp, SHADOW_COMPOSITOR_NAME, False) - # Remove entire compositor chain -##### ogre.CompositorManager.getSingleton().removeCompositorChain(self.mShadowVp) - self.mShadowVp = 0 - self.mShadowCompositor = 0 - - self.sceneManager.setShadowTechnique(mShadowTech[mCurrentShadowTechnique]) - ##Vector3 dir #TT - if mShadowTech[mCurrentShadowTechnique] == ogre.SHADOWTYPE_STENCIL_ADDITIVE: - # Fixed light, dim - mSunLight.setCastShadows(True) - - # Point light, movable, reddish - mLight.setType(ogre.Light.LT_POINT) - mLight.setCastShadows(True) - mLight.setDiffuseColour(mMinLightColour) - mLight.setSpecularColour(1, 1, 1) - mLight.setAttenuation(8000,1,0.0005,0) - elif mShadowTech[mCurrentShadowTechnique] == ogre.SHADOWTYPE_STENCIL_MODULATIVE: - # Multiple lights cause obvious silhouette edges in modulative mode - # So turn off shadows on the direct light - # Fixed light, dim - mSunLight.setCastShadows(False) - - # Point light, movable, reddish - mLight.setType(ogre.Light.LT_POINT) - mLight.setCastShadows(True) - mLight.setDiffuseColour(mMinLightColour) - mLight.setSpecularColour(1, 1, 1) - mLight.setAttenuation(8000,1,0.0005,0) - #break - elif (mShadowTech[mCurrentShadowTechnique]== ogre.SHADOWTYPE_TEXTURE_MODULATIVE) or (mShadowTech[mCurrentShadowTechnique] == ogre.SHADOWTYPE_TEXTURE_ADDITIVE) : - # Fixed light, dim - mSunLight.setCastShadows(not mShadowTechSoft[mCurrentShadowTechnique]) - - # Change moving light to spotlight - # Point light, movable, reddish - mLight.setType(ogre.Light.LT_SPOTLIGHT) - mLight.setDirection(ogre.Vector3.NEGATIVE_UNIT_Z) - mLight.setCastShadows(True) - mLight.setDiffuseColour(mMinLightColour) - mLight.setSpecularColour(1, 1, 1) - mLight.setAttenuation(8000,1,0.0005,0) - mLight.setSpotlightRange(ogre.Degree(d=80),ogre.Degree(d=90)) - - - if mShadowTechSoft[mCurrentShadowTechnique]: - # set up compositors - shadowTex = ogre.TextureManager.getSingleton() - print "###", shadowTex - shadowTex = shadowTex.getByName(name="ogre/ShadowTexture0") ## returns a None object - print "###", shadowTex - if shadowTex: - shadowRtt = shadowTex.getBuffer().getRenderTarget() - mShadowVp = shadowRtt.getViewport(0) - mShadowCompositor = ogre.CompositorManager.getSingleton().addCompositor(mShadowVp, SHADOW_COMPOSITOR_NAME) - ogre.CompositorManager.getSingleton().setCompositorEnabled(self.mShadowVp, SHADOW_COMPOSITOR_NAME, True) - mShadowCompositor.addListener(gaussianListener) - gaussianListener.notifyViewportSize(self.mShadowVp.getActualWidth(), self.mShadowVp.getActualHeight()) - - def changeAtheneMaterial(self): - global mCurrentAtheneMaterial, mMaterialInfo, mAthene, mAtheneMaterials, NUM_ATHENE_MATERIALS - if mCurrentAtheneMaterial < (NUM_ATHENE_MATERIALS-1): - mCurrentAtheneMaterial += 1 - else: - mCurrentAtheneMaterial=0 - mMaterialInfo.setCaption(ogre.UTFString("Current: " + mAtheneMaterials[mCurrentAtheneMaterial])) - mAthene.setMaterialName(mAtheneMaterials[mCurrentAtheneMaterial]) - - def CheckKeyPressed ( self, key, time, func): - if self._isToggleKeyDown(key, time): - self.timeDelay = time - func() - - def frameEnded(self, evt): - global mAnimState - if (self.timeDelay >= 0) : - self.timeDelay -= evt.timeSinceLastFrame - - if (mAnimState): - mAnimState.addTime(evt.timeSinceLastFrame) - - self.CheckKeyPressed(KC_O, 1, self.changeShadowTechnique) - self.CheckKeyPressed(KC_M, 0.5, self.changeAtheneMaterial) - - return sf.FrameListener.frameStarted(self, evt) and sf.FrameListener.frameEnded(self, evt) - - -class ShadowsApplication ( sf.Application ): - global NUM_ATHENE_MATERIALS,mAtheneMaterials,NUM_SHADOW_TECH,mShadowTechDescriptions - global mShadowTech,mShadowTechSoft,mSoftShadowsSupported,mCurrentAtheneMaterial,mCurrentShadowTechnique - global mCurrentAtheneMaterial, mMaterialInfo, mAthene, mAtheneMaterials - global mAnimState - def __init__(self): - sf.Application.__init__(self) - - def _createScene(self): - global NUM_ATHENE_MATERIALS,mAtheneMaterials,NUM_SHADOW_TECH,mShadowTechDescriptions - global mShadowTech,mShadowTechSoft,mSoftShadowsSupported,mCurrentAtheneMaterial,mCurrentShadowTechnique - global mCurrentAtheneMaterial, mMaterialInfo, mAthene, mAtheneMaterials - global mShadowTechniqueInfo, mSunLight, mLight, mMinLightColour - sceneManager = self.sceneManager - - # do this first so we generate edge lists - sceneManager.setShadowTechnique(ogre.SHADOWTYPE_STENCIL_ADDITIVE) - # Set the default Athene material - # We'll default it to the normal map for ps_2_0 capable hardware - # everyone else will default to the basic -# if (GpuProgramManager.getSingleton().isSyntaxSupported("ps_2_0") or -# GpuProgramManager.getSingleton().isSyntaxSupported("arbfp1")): -# mCurrentAtheneMaterial = 0 -# else: - mCurrentAtheneMaterial = 1 - - # Set ambient light off - sceneManager.setAmbientLight(ogre.ColourValue(0.0, 0.0, 0.0)) - - # Fixed light, dim - mSunLight = sceneManager.createLight("SunLight") - mSunLight.setType(ogre.Light.LT_SPOTLIGHT) - mSunLight.setPosition(1000,1250,500) - mSunLight.setSpotlightRange(ogre.Degree(d=30), ogre.Degree(d=50)) - dirV = -mSunLight.getPosition() - dirV.normalise() - mSunLight.setDirection(dirV) - mSunLight.setDiffuseColour(0.35, 0.35, 0.38) - mSunLight.setSpecularColour(0.9, 0.9, 1) - - # Point light, movable, reddish - mLight = sceneManager.createLight("Light2") - mLight.setDiffuseColour(mMinLightColour) - mLight.setSpecularColour(1, 1, 1) - mLight.setAttenuation(8000,1,0.0005,0) - - # Create light node - mLightNode = sceneManager.getRootSceneNode().createChildSceneNode("MovingLightNode") - mLightNode.attachObject(mLight) - # create billboard set - bbs = sceneManager.createBillboardSet("lightbbs", 1) - bbs.setMaterialName("Examples/Flare") - bb = bbs.createBillboard(0,0,0,mMinLightColour) - # attach - mLightNode.attachObject(bbs) - - # create controller, after this is will get updated on its own - self.func = ogre.WaveformControllerFunction(ogre.WFT_SINE, 0.75, 0.5) - contMgr = ogre.ControllerManager.getSingleton() - self.val = LightWibbler(mLight, bb, mMinLightColour, mMaxLightColour, mMinFlareSize, mMaxFlareSize) - controller = contMgr.createController(contMgr.getFrameTimeSource(), self.val, self.func) - - #mLight.setPosition(Vector3(300,250,-300)) - mLightNode.setPosition(ogre.Vector3(300,250,-300)) - - # Create a track for the light - anim = sceneManager.createAnimation("LightTrack", 20) - # Spline it for nice curves - anim.setInterpolationMode(ogre.Animation.IM_SPLINE) - # Create a track to animate the camera's node - track = anim.createNodeTrack(0, mLightNode) - # Setup keyframes - key = track.createNodeKeyFrame(0) # A startposition - key.setTranslate(ogre.Vector3(300,250,-300)) - key = track.createNodeKeyFrame(2)#B - key.setTranslate(ogre.Vector3(150,300,-250)) - key = track.createNodeKeyFrame(4)#C - key.setTranslate(ogre.Vector3(-150,350,-100)) - key = track.createNodeKeyFrame(6)#D - key.setTranslate(ogre.Vector3(-400,200,-200)) - key = track.createNodeKeyFrame(8)#E - key.setTranslate(ogre.Vector3(-200,200,-400)) - key = track.createNodeKeyFrame(10)#F - key.setTranslate(ogre.Vector3(-100,150,-200)) - key = track.createNodeKeyFrame(12)#G - key.setTranslate(ogre.Vector3(-100,75,180)) - key = track.createNodeKeyFrame(14)#H - key.setTranslate(ogre.Vector3(0,250,300)) - key = track.createNodeKeyFrame(16)#I - key.setTranslate(ogre.Vector3(100,350,100)) - key = track.createNodeKeyFrame(18)#J - key.setTranslate(ogre.Vector3(250,300,0)) - key = track.createNodeKeyFrame(20)#K == A - key.setTranslate(ogre.Vector3(300,250,-300)) - # Create a new animation state to track this - mAnimState = sceneManager.createAnimationState("LightTrack") - mAnimState.setEnabled(True) - # Make light node look at origin, this is for when we - # change the moving light to a spotlight - mLightNode.setAutoTracking(True, sceneManager.getRootSceneNode()) - - # Prepare athene mesh for normalmapping - pAthene = ogre.MeshManager.getSingleton().load("athene.mesh", - ogre.ResourceGroupManager.DEFAULT_RESOURCE_GROUP_NAME) - src = 0 - dest = 0 -# if (not pAthene.suggestTangentVectorBuildParams(outSourceCoordSet=src, outDestCoordSet=dest)): -# pAthene.buildTangentVectors(src, dest) - - node = sceneManager.getRootSceneNode().createChildSceneNode() - mAthene = sceneManager.createEntity( "athene", "athene.mesh" ) - mAthene.setMaterialName(mAtheneMaterials[mCurrentAtheneMaterial]) - node.attachObject( mAthene ) - node.translate(0,-20, 0) - node.yaw(ogre.Degree(d=90)) - - node = sceneManager.getRootSceneNode().createChildSceneNode() - pEnt = sceneManager.createEntity( "col1", "column.mesh" ) - pEnt.setMaterialName("Examples/Rockwall") - node.attachObject( pEnt ) - node.translate(200,0, -200) - - node = sceneManager.getRootSceneNode().createChildSceneNode() - pEnt = sceneManager.createEntity( "col2", "column.mesh" ) - pEnt.setMaterialName("Examples/Rockwall") - node.attachObject( pEnt ) - node.translate(200,0, 200) - - node = sceneManager.getRootSceneNode().createChildSceneNode() - pEnt = sceneManager.createEntity( "col3", "column.mesh" ) - pEnt.setMaterialName("Examples/Rockwall") - node.attachObject( pEnt ) - node.translate(-200,0, -200) - - node = sceneManager.getRootSceneNode().createChildSceneNode() - pEnt = sceneManager.createEntity( "col4", "column.mesh" ) - pEnt.setMaterialName("Examples/Rockwall") - node.attachObject( pEnt ) - node.translate(-200,0, 200) - # Skybox - sceneManager.setSkyBox(True, "Examples/StormySkyBox") - - # Floor plane - plane = ogre.Plane() - plane.normal = ogre.Vector3.UNIT_Y - plane.d = 100 - ogre.MeshManager.getSingleton().createPlane("Myplane", - ogre.ResourceGroupManager.DEFAULT_RESOURCE_GROUP_NAME, plane, - 1500,1500,50,50,True,1,5,5,ogre.Vector3.UNIT_Z) - pPlaneEnt = sceneManager.createEntity( "plane", "Myplane" ) - pPlaneEnt.setMaterialName("Examples/Rockwall") - pPlaneEnt.setCastShadows(False) - sceneManager.getRootSceneNode().createChildSceneNode().attachObject(pPlaneEnt) - - # show overlay - pOver = ogre.OverlayManager.getSingleton().getByName("Example/ShadowsOverlay") - print "\n\n\n" - print dir (pOver ) - print pOver - print "\n\n\n" - - mShadowTechniqueInfo = ogre.OverlayManager.getSingleton().getOverlayElement("Example/Shadows/ShadowTechniqueInfo") - mMaterialInfo = ogre.OverlayManager.getSingleton().getOverlayElement("Example/Shadows/MaterialInfo") - mInfo = ogre.OverlayManager.getSingleton().getOverlayElement("Example/Shadows/Info") - - mShadowTechniqueInfo.setCaption(ogre.UTFString("Current: " + mShadowTechDescriptions[mCurrentShadowTechnique])) - mMaterialInfo.setCaption(ogre.UTFString("Current: " + mAtheneMaterials[mCurrentAtheneMaterial])) - pOver.show() - -# if (sceneManager.getRootSceneNode().getRenderSystem().getCapabilities().hasCapability(ogre.RSC_HWRENDER_TO_TEXTURE)): -# # In D3D, use a 1024x1024 shadow texture -# sceneManager.setShadowTextureSettings(1024, 2) -# else: -# # Use 512x512 texture in GL since we can't go higher than the window res -# sceneManager.setShadowTextureSettings(512, 2) - sceneManager.setShadowTextureSettings(512, 2) - sceneManager.setShadowColour(ogre.ColourValue(0.5, 0.5, 0.5)) - - # incase infinite far distance is not supported -# self.camera.setFarClipDistance(100000) - - #sceneManager.setShowDebugShadows(True) - mSoftShadowsSupported = False - -# caps = Root.getSingleton().getRenderSystem().getCapabilities() -# if (not caps.hasCapability(ogre.RSC_VERTEX_PROGRAM) or not (caps.hasCapability(ogre.RSC_FRAGMENT_PROGRAM))): -# mSoftShadowsSupported = False -# else: -# if (not GpuProgramManager.getSingleton().isSyntaxSupported("glsl") and -# not GpuProgramManager.getSingleton().isSyntaxSupported("ps_2_0")) : -# mSoftShadowsSupported = False - - # Create new frame listener - def _createFrameListener(self): - self.frameListener= ShadowsListener(self.renderWindow, self.camera, self.sceneManager) - self.frameListener.showDebugOverlay(True) - self.root.addFrameListener(self.frameListener) - - - -if __name__ == '__main__': - try: - application = ShadowsApplication() - application.go() - except ogre.OgreException, e: - print e - print - print "** FullDesc ", e.fullDescription - print "** Source, File, Line ",e.source, e.file, e.line - - Modified: trunk/python-ogre/demos/ogre/Demo_SkeletalAnimation.py =================================================================== --- trunk/python-ogre/demos/ogre/Demo_SkeletalAnimation.py 2008-10-19 12:06:32 UTC (rev 760) +++ trunk/python-ogre/demos/ogre/Demo_SkeletalAnimation.py 2008-10-20 13:48:25 UTC (rev 761) @@ -132,7 +132,7 @@ rot = 0.0 for i in range( NUM_JAIQUAS) : q = ogre.Quaternion() - q.FromAngleAxis(ogre.Radian(r=rot), ogre.Vector3.UNIT_Y) + q.FromAngleAxis(ogre.Radian(r=rot), ogre.Vector3().UNIT_Y) mOrientations[i] = q mBasePositions[i] = q * ogre.Vector3(0,0,-20) ent = sceneManager.createEntity("jaiqua" + str(i), "jaiqua.mesh") @@ -181,11 +181,11 @@ plane = ogre.Plane() - plane.normal = ogre.Vector3.UNIT_Y + plane.normal = ogre.Vector3().UNIT_Y plane.d = 100 ogre.MeshManager.getSingleton().createPlane("Myplane", ogre.ResourceGroupManager.DEFAULT_RESOURCE_GROUP_NAME, plane, - 1500,1500,20,20,True,1,60,60,ogre.Vector3.UNIT_Z) + 1500,1500,20,20,True,1,60,60,ogre.Vector3().UNIT_Z) self.pPlaneEnt = sceneManager.createEntity( "plane", "Myplane" ) self.pPlaneEnt.setMaterialName("Examples/Rockwall") self.pPlaneEnt.setCastShadows(False) @@ -221,7 +221,7 @@ # Need to reposition the scene node origin since animation includes translation # Calculate as an offset to the end position, rotated by the # amount the animation turns the character - rot = ogre.Quaternion(mAnimationRotation, ogre.Vector3.UNIT_Y) + rot = ogre.Quaternion(mAnimationRotation, ogre.Vector3().UNIT_Y) startoffset = mSceneNode[i].getOrientation() * -mSneakStartOffset endoffset = mSneakEndOffset offset = rot * startoffset Modified: trunk/python-ogre/demos/ogre/Demo_SkyBox.py =================================================================== --- trunk/python-ogre/demos/ogre/Demo_SkyBox.py 2008-10-19 12:06:32 UTC (rev 760) +++ trunk/python-ogre/demos/ogre/Demo_SkyBox.py 2008-10-20 13:48:25 UTC (rev 761) @@ -53,16 +53,16 @@ pEmit1.setTimeToLive( 0.2 ) pEmit1.setEmissionRate( 70 ) pEmit1.setParticleVelocity( 50 ) - pEmit1.setDirection(- ogre.Vector3.UNIT_Z) - pEmit1.setColour( ogre.ColourValue.White, ogre.ColourValue.Red) + pEmit1.setDirection(- ogre.Vector3().UNIT_Z) + pEmit1.setColour( ogre.ColourValue().White, ogre.ColourValue().Red) # Thruster 2 pEmit2.setAngle( ogre.Degree(d=3) ) pEmit2.setTimeToLive( 0.2 ) pEmit2.setEmissionRate( 70 ) pEmit2.setParticleVelocity( 50 ) - pEmit2.setDirection( -ogre.Vector3.UNIT_Z ) - pEmit2.setColour( ogre.ColourValue.White, ogre.ColourValue.Red ) + pEmit2.setDirection( -ogre.Vector3().UNIT_Z ) + pEmit2.setColour( ogre.ColourValue().White, ogre.ColourValue().Red ) # Set the position of the thrusters and attach to the craft pEmit1.setPosition( ogre.Vector3( 5.7, 6.5, -70 ) ) Modified: trunk/python-ogre/demos/ogre/Demo_SkyDome.py =================================================================== --- trunk/python-ogre/demos/ogre/Demo_SkyDome.py 2008-10-19 12:06:32 UTC (rev 760) +++ trunk/python-ogre/demos/ogre/Demo_SkyDome.py 2008-10-20 13:48:25 UTC (rev 761) @@ -32,7 +32,7 @@ light.setPosition (ogre.Vector3(20, 80, 50)) plane = ogre.Plane() - plane.normal = ogre.Vector3.UNIT_Y + plane.normal = ogre.Vector3().UNIT_Y plane.d = 200 mm = ogre.MeshManager.getSingleton() Modified: trunk/python-ogre/demos/ogre/Demo_Spinner.py =================================================================== --- trunk/python-ogre/demos/ogre/Demo_Spinner.py 2008-10-19 12:06:32 UTC (rev 760) +++ trunk/python-ogre/demos/ogre/Demo_Spinner.py 2008-10-20 13:48:25 UTC (rev 761) @@ -1,3 +1,4 @@ +# NO_UNITTEST # This code is in the Public Domain # ----------------------------------------------------------------------------- # This source file is part of Python-Ogre @@ -20,8 +21,8 @@ class MyApp(object): - def __init__(self, plugins_path='plugins.cfg', - resource_path='resources.cfg'): + def __init__(self, plugins_path='../plugins.cfg', + resource_path='../resources.cfg'): # keep track of the paths that are used @@ -172,7 +173,7 @@ self.node = node.createChildSceneNode("ninja_node", start_coords) self.node.attachObject(self.entity) - src = self.node.Orientation * (ogre.Vector3.UNIT_Z) + src = self.node.Orientation * (ogre.Vector3().UNIT_Z) directionToGo = ogre.Vector3(0,0,-1) quat = src.getRotationTo(directionToGo) self.node.Orientation=quat Modified: trunk/python-ogre/demos/ogre/Demo_Terrain.py =================================================================== --- trunk/python-ogre/demos/ogre/Demo_Terrain.py 2008-10-19 12:06:32 UTC (rev 760) +++ trunk/python-ogre/demos/ogre/Demo_Terrain.py 2008-10-20 13:48:25 UTC (rev 761) @@ -53,7 +53,7 @@ # 5000 world units from the camera plane.d = 5000 # Above the camera, facing down - plane.normal = -ogre.Vector3.UNIT_Y + plane.normal = -ogre.Vector3().UNIT_Y ## Setup a nice starting position for the camera camera.setPosition(707,2500,528) @@ -71,7 +71,7 @@ self.sceneManager = sceneManager self.moveSpeed = 50.0 self.raySceneQuery = sceneManager.createRayQuery(ogre.Ray(camera.getPosition(), - ogre.Vector3.NEGATIVE_UNIT_Y)) + ogre.Vector3().NEGATIVE_UNIT_Y)) self.camera = camera #self.camera.setPosition (self.camera.getPosition() + ogre.Vector3(0.0, 10.0, 0.0)) @@ -79,7 +79,7 @@ # clamp to terrain updateRay = ogre.Ray() updateRay.setOrigin (self.camera.getPosition() + ogre.Vector3(0.0, 10.0, 0.0)) - updateRay.setDirection (ogre.Vector3.NEGATIVE_UNIT_Y) + updateRay.setDirection (ogre.Vector3().NEGATIVE_UNIT_Y) self.raySceneQuery.Ray = updateRay for queryResult in self.raySceneQuery.execute(): if queryResult.worldFragment is not None: Modified: trunk/python-ogre/demos/ogre/Demo_Video.py =================================================================== --- trunk/python-ogre/demos/ogre/Demo_Video.py 2008-10-19 12:06:32 UTC (rev 760) +++ trunk/python-ogre/demos/ogre/Demo_Video.py 2008-10-20 13:48:25 UTC (rev 761) @@ -1,3 +1,6 @@ +# NO_UNITTEST +# +# NO LONGER SUPPORTED AS OgreDSHOW depreciated # This code is in the Public Domain # ----------------------------------------------------------------------------- # This source file is part of Python-Ogre @@ -9,7 +12,9 @@ # You may use this sample code for anything you like, it is not covered by the # LGPL. # ----------------------------------------------------------------------------- + import sys +sys.exit() sys.path.insert(0,'..') import PythonOgreConfig Modified: trunk/python-ogre/demos/ogre/Demo_WX.py =================================================================== --- trunk/python-ogre/demos/ogre/Demo_WX.py 2008-10-19 12:06:32 UTC (rev 760) +++ trunk/python-ogre/demos/ogre/Demo_WX.py 2008-10-20 13:48:25 UTC (rev 761) @@ -1,3 +1,4 @@ +# NO_UNITTEST # This code is in the Public Domain # ----------------------------------------------------------------------------- # This source file is part of Python-Ogre @@ -137,7 +138,7 @@ #Then, takes care of the direction that the fish has to face to directionToGo = self.sceneEntities.fishLookAtNode.Position - self.sceneEntities.fishAnimationNode.Position - src = self.sceneEntities.fishNode.Orientation * (-ogre.Vector3.UNIT_X) #the fish is originally + src = self.sceneEntities.fishNode.Orientation * (-ogre.Vector3().UNIT_X) #the fish is originally #facing the negative X direction Modified: trunk/python-ogre/demos/ogre/Demo_Water.py =================================================================== --- trunk/python-ogre/demos/ogre/Demo_Water.py 2008-10-19 12:06:32 UTC (rev 760) +++ trunk/python-ogre/demos/ogre/Demo_Water.py 2008-10-20 13:48:25 UTC (rev 761) @@ -1,3 +1,4 @@ +# NO_UNITTEST # This code is in the Public Domain # ----------------------------------------------------------------------------- # This source file is part of Python-Ogre @@ -331,7 +332,7 @@ self.app.headNode.setScale((3,3,3)) newPos = Ogre.Vector3(step*tx, self.headDepth, step*ty) diffPos = newPos - self.oldPos - headRotation = Ogre.Vector3.UNIT_Z.getRotationTo(diffPos) + headRotation = Ogre.Vector3().UNIT_Z.getRotationTo(diffPos) self.oldPos = newPos self.app.headNode.translate(newPos) self.app.headNode.rotate(headRotation) @@ -419,7 +420,7 @@ RAIN_HEIGHT_CONSTANT = 5 self.sines = [0,100,200,300] self.adds=[0.3,-1.6,1.1,0.5] - self.oldPos = Ogre.Vector3.UNIT_Z + self.oldPos = Ogre.Vector3().UNIT_Z self.pindex = 0 self.headDepth =0.0 self.circles = [] Deleted: trunk/python-ogre/demos/ogre/Shadows.py =================================================================== --- trunk/python-ogre/demos/ogre/Shadows.py 2008-10-19 12:06:32 UTC (rev 760) +++ trunk/python-ogre/demos/ogre/Shadows.py 2008-10-20 13:48:25 UTC (rev 761) @@ -1,1563 +0,0 @@ -/* ------------------------------------------------------------------------------ -This source file is part of OGRE - (Object-oriented Graphics Rendering Engine) -For the latest info, see http:##www.ogre3d.org/ - -Copyright (c) 2000-2006 Torus Knot Software Ltd -Also see acknowledgements in Readme.html - -You may use self sample code for anything you like, it is not covered by the -LGPL like the rest of the engine. ------------------------------------------------------------------------------ -*/ - -/** - \file - Shadows.cpp - \brief - Shows a few ways to use Ogre's shadowing techniques -*/ - -#include <CEGUI/CEGUIImageset.h> -#include <CEGUI/CEGUISystem.h> -#include <CEGUI/CEGUILogger.h> -#include <CEGUI/CEGUISchemeManager.h> -#include <CEGUI/CEGUIWindowManager.h> -#include <CEGUI/CEGUIWindow.h> -#include <CEGUI/elements/CEGUICombobox.h> -#include <CEGUI/elements/CEGUIComboDropList.h> -#include <CEGUI/elements/CEGUIEditbox.h> -#include <CEGUI/elements/CEGUIListbox.h> -#include <CEGUI/elements/CEGUIListboxTextItem.h> -#include <CEGUI/elements/CEGUIPushButton.h> -#include <CEGUI/elements/CEGUIScrollbar.h> -#include <CEGUI/elements/CEGUIRadioButton.h> -#include "OgreCEGUIRenderer.h" -#include "OgreCEGUIResourceProvider.h" -#include "ExampleApplication.h" - -/* -#include "OgreNoMemoryMacros.h" -#include <ode/odecpp.h> -#include <ode/odecpp_collision.h> -#include "OgreMemoryMacros.h" -*/ - -/* -#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32: -#include "OgreNoMemoryMacros.h" -#inc... [truncated message content] |
From: <and...@us...> - 2008-10-24 02:56:46
|
Revision: 773 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=773&view=rev Author: andy_miller Date: 2008-10-24 02:56:40 +0000 (Fri, 24 Oct 2008) Log Message: ----------- Physx updates Modified Paths: -------------- trunk/python-ogre/code_generators/ogre/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/environment.py Added Paths: ----------- trunk/python-ogre/demos/physx/ trunk/python-ogre/demos/physx/NxBoxes.py trunk/python-ogre/demos/physx/Utilities.py trunk/python-ogre/demos/physx/physx_01.py Modified: trunk/python-ogre/code_generators/ogre/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/ogre/generate_code.py 2008-10-21 10:25:36 UTC (rev 772) +++ trunk/python-ogre/code_generators/ogre/generate_code.py 2008-10-24 02:56:40 UTC (rev 773) @@ -90,6 +90,22 @@ pygccxml.declarations.smart_pointer_traits = my_smart_ptr + +# # # I defined new class - internal_type_traits, which provides access to +# # # internal types. +# # # +# # # @staticmethod +# # # def value_type( type ): +# # # if my_smart_ptr.is_smart_pointer( type ): +# # # return declarations.internal_type_traits.get_by_name( +# # # type, "value_type" ) +# # # +# # # The new class allows you to handle cases, where "value_type" has +# # # different name. In case of auto_ptr it is "element_type". +# # # +# # # The new code is committed to SVN +# # # + HACK = True MAIN_NAMESPACE = 'Ogre' Modified: trunk/python-ogre/code_generators/physx/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/physx/generate_code.py 2008-10-21 10:25:36 UTC (rev 772) +++ trunk/python-ogre/code_generators/physx/generate_code.py 2008-10-24 02:56:40 UTC (rev 773) @@ -85,6 +85,7 @@ excludes = ['NxCreatePMap' # refrences TriangleMEsh, however they don't expose the destructor ,'NxGetValue' # unresolved external + ,'NxCreatePhysicsSDK','NxCreatePhysicsSDKWithID' # hand wrapped to return sdk + errorcode ] for e in excludes: print "Excluding:", e @@ -117,6 +118,7 @@ if not "const" in o.decl_string: o.exclude() print "Excluding Operator:", o + ############################################################ ## ## And there are things that manually need to be INCLUDED @@ -160,7 +162,13 @@ def create_output( size ): return [ ft.output( i ) for i in range( size ) ] - +# f=main_ns.free_function( "NxCreatePhysicsSDK") +# f.add_transformation(ft.output('errorCode')) +# f.documentation = docit ("","", "tuple - SDK, ErrorCode") +# f=main_ns.free_function( "NxCreatePhysicsSDKWithID") +# f.add_transformation(ft.output('errorCode')) +# f.documentation = docit ("","", "tuple - SDK, ErrorCode") + ############################################################################### ## ## Now for the AUTOMATIC stuff that should just work Modified: trunk/python-ogre/code_generators/physx/hand_made_wrappers.py =================================================================== --- trunk/python-ogre/code_generators/physx/hand_made_wrappers.py 2008-10-21 10:25:36 UTC (rev 772) +++ trunk/python-ogre/code_generators/physx/hand_made_wrappers.py 2008-10-24 02:56:40 UTC (rev 773) @@ -9,6 +9,60 @@ } """ +WRAPPER_DEFINITION_Utility = \ +""" +unsigned int NxUtility_NX_PHYSICS_SDK_VERSION( void ) { + return NX_PHYSICS_SDK_VERSION; + } + +boost::python::tuple +NxUtility_NX_PHYSICS_SDK_VERSION_TUPLE ( void ) { + return ( boost::python::make_tuple( NX_PHYSICS_SDK_VERSION, + NX_SDK_VERSION_MAJOR, + NX_SDK_VERSION_MINOR, + NX_SDK_VERSION_BUGFIX + ) ); +} + +boost::python::tuple NxUtility_NxCreatePhysicsSDK( ::NxU32 sdkVersion, ::NxUserAllocator * allocator=0, ::NxUserOutputStream * outputStream=0, ::NxPhysicsSDKDesc const & desc=::NxPhysicsSDKDesc( ) ){ + NxSDKCreateError errorCode2; + ::NxPhysicsSDK * result = ::NxCreatePhysicsSDK(sdkVersion, allocator, outputStream, desc, &errorCode2); + typedef bp::return_value_policy< bp::reference_existing_object > call_policies_t; + return bp::make_tuple( pyplusplus::call_policies::make_object< call_policies_t, ::NxPhysicsSDK * >( result ) + , errorCode2 ); +} + +boost::python::tuple NxUtility_NxCreatePhysicsSDKWithID( ::NxU32 sdkVersion, char * companyNameStr, char * appNameStr, char * appVersionStr, char * appUserDefinedStr, ::NxUserAllocator * allocator=0, ::NxUserOutputStream * outputStream=0, ::NxPhysicsSDKDesc const & desc=::NxPhysicsSDKDesc( ) ){ + NxSDKCreateError errorCode2; + ::NxPhysicsSDK * result = ::NxCreatePhysicsSDKWithID(sdkVersion, companyNameStr, appNameStr, appVersionStr, appUserDefinedStr, allocator, outputStream, desc, &errorCode2); + typedef bp::return_value_policy< bp::reference_existing_object > call_policies_t; + return bp::make_tuple( pyplusplus::call_policies::make_object< call_policies_t, ::NxPhysicsSDK * >( result ) + , errorCode2 ); +} + + +""" +WRAPPER_REGISTRATION_Utility = [ + 'bp::def( "NX_PHYSICS_SDK_VERSION", &::NxUtility_NX_PHYSICS_SDK_VERSION,\ + "Python-Ogre Hand Wrapped\\nReturns the SDK Version");', + + 'bp::def( "NX_PHYSICS_SDK_VERSION_TUPLE", &::NxUtility_NX_PHYSICS_SDK_VERSION_TUPLE,\ + "Python-Ogre Hand Wrapped\\nReturns the SDK Version, A tuple of version,major,minor,bugfix");', + + """bp::def( "NxCreatePhysicsSDK", &::NxUtility_NxCreatePhysicsSDK, + ( bp::arg("sdkVersion"), bp::arg("allocator")=bp::object(), bp::arg("outputStream")=bp::object(), bp::arg("desc")=::NxPhysicsSDKDesc( ) ), + "Python-Ogre Hand Wrapped (PhysX) Modified Function Call\\n\\ + Input: \\n\\ + Output: tuple - SDK, ErrorCode\\n"); """, + + """bp::def( "NxCreatePhysicsSDKWithID", &::NxUtility_NxCreatePhysicsSDKWithID, + ( bp::arg("sdkVersion"), bp::arg("companyNameStr"), bp::arg("appNameStr"), bp::arg("appVersionStr"), bp::arg("appUserDefinedStr"), bp::arg("allocator")=bp::object(), bp::arg("outputStream")=bp::object(), bp::arg("desc")=::NxPhysicsSDKDesc( ) ), + "Python-Ogre Hand Wrapped (PhysX) Modified Function Call\\n\\ + Input: \\n\\ + Output: tuple - SDK, ErrorCode\\n"); """ + + ] + WRAPPER_DEFINITION_NxActor = \ """ bp::object NxActor_getShapes( ) { @@ -110,6 +164,9 @@ def apply( mb ): global_ns = mb.global_ns + + mb.add_declaration_code( WRAPPER_DEFINITION_Utility ) + apply_reg (mb, WRAPPER_REGISTRATION_Utility ) # I'm going to do some automated hand wrapping here getSizeFunctions={'getEmitters':'getNbEmitters', 'getScreenSurfaceMeshes':'getNbScreenSurfaceMeshes', Added: trunk/python-ogre/demos/physx/NxBoxes.py =================================================================== --- trunk/python-ogre/demos/physx/NxBoxes.py (rev 0) +++ trunk/python-ogre/demos/physx/NxBoxes.py 2008-10-24 02:56:40 UTC (rev 773) @@ -0,0 +1,337 @@ +## =============================================================================== +## +## AGEIA PhysX SDK Sample Program +## +## Title: Boxes Sample +## Description: This sample program shows how to create some simple dynamic objects +## with the AGEIA PhysX SDK. +## +## =============================================================================== + +#include <stdio.h> +#include <GL/glut.h> + +#include "NxPhysics.h" +#include "ErrorStream.h" +#include "PerfRenderer.h" +#include "Utilities.h" +#include "SamplesVRDSettings.h" + +## Physics +static NxPhysicsSDK* gPhysicsSDK = None +static NxScene* gScene = None +static PerfRenderer gPerfRenderer + +## Rendering +static NxVec3 gEye(50.0, 50.0f, 50.0f) +static NxVec3 gDir(-0.6,-0.2f,-0.7f) +static NxVec3 gViewY +static int gMouseX = 0 +static int gMouseY = 0 + +static bool InitNx() + + ## Initialize PhysicsSDK + NxPhysicsSDKDesc desc + NxSDKCreateError errorCode = NXCE_NO_ERROR + gPhysicsSDK = NxCreatePhysicsSDK(NX_PHYSICS_SDK_VERSION, None, new ErrorStream(), desc, &errorCode) + if(gPhysicsSDK == None) : + + printf("\nSDK create error (%d - %s).\nUnable to initialize the PhysX SDK, exiting the sample.\n\n", errorCode, getNxSDKCreateError(errorCode)) + return False + +#if SAMPLES_USE_VRD: + ## The settings for the VRD host and port are found in SampleCommonCode/SamplesVRDSettings.h + if (gPhysicsSDK->getFoundationSDK().getRemoteDebugger()): + gPhysicsSDK->getFoundationSDK().getRemoteDebugger()->connect(SAMPLES_VRD_HOST, SAMPLES_VRD_PORT, SAMPLES_VRD_EVENTMASK) +#endif + + gPhysicsSDK->setParameter(NX_SKIN_WIDTH, 0.05) + + ## Create a scene + NxSceneDesc sceneDesc + sceneDesc.gravity = NxVec3(0.0, -9.81f, 0.0f) + gScene = gPhysicsSDK->createScene(sceneDesc) + if(gScene == None) : + + printf("\nError: Unable to create a PhysX scene, exiting the sample.\n\n") + return False + + + ## Set default material + NxMaterial* defaultMaterial = gScene->getMaterialFromIndex(0) + defaultMaterial->setRestitution(0.0) + defaultMaterial->setStaticFriction(0.5) + defaultMaterial->setDynamicFriction(0.5) + + ## Create ground plane + NxPlaneShapeDesc planeDesc + NxActorDesc actorDesc + actorDesc.shapes.pushBack(&planeDesc) + gScene->createActor(actorDesc) + + return True + + +static void ExitNx() + + if(gPhysicsSDK != None): + + if(gScene != None) gPhysicsSDK->releaseScene(*gScene) : + gScene = None + NxReleasePhysicsSDK(gPhysicsSDK) + gPhysicsSDK = None + + + +static void CreateCube( NxVec3& pos, int size=2, const NxVec3* initialVelocity=None) + + if(gScene == None) return : + + ## Create body + NxBodyDesc bodyDesc + bodyDesc.angularDamping = 0.5 + if(initialVelocity) bodyDesc.linearVelocity = *initialVelocity : + + NxBoxShapeDesc boxDesc + boxDesc.dimensions = NxVec3((float)size, (float)size, (float)size) + + NxActorDesc actorDesc + actorDesc.shapes.pushBack(&boxDesc) + actorDesc.body = &bodyDesc + actorDesc.density = 10.0 + actorDesc.globalPose.t = pos + gScene->createActor(actorDesc)->userData = (void*)size_t(size) + ##printf("Total: %d actors\n", gScene->getNbActors()) + + +static void CreateCubeFromEye(int size) + + NxVec3 t = gEye + NxVec3 vel = gDir + vel.normalize() + vel*=200.0 + CreateCube(t, size, &vel) + + +static void CreateStack(int size) + + float cubeSize = 2.0 + float spacing = -2.0*gPhysicsSDK->getParameter(NX_SKIN_WIDTH) + NxVec3 pos(0.0, cubeSize, 0.0f) + float offset = -size * (cubeSize * 2.0 + spacing) * 0.5f + while(size) + + for(int i=0 i<size;i++) + + pos.x = offset + (float)i * (cubeSize * 2.0 + spacing) + CreateCube(pos, (int)cubeSize) + + + offset += cubeSize + pos.y += (cubeSize * 2.0 + spacing) + size-- + + + +static void CreateTower(int size) + + float cubeSize = 2.0 + float spacing = 0.01 + NxVec3 pos(0.0, cubeSize, 0.0f) + while(size) + + CreateCube(pos, (int)cubeSize) + pos.y += (cubeSize * 2.0 + spacing) + size-- + + + +static void KeyboardCallback(unsigned char key, int x, int y) + + switch(key) + + case 27: + exit(0) + break + case '0': + gPerfRenderer.toggleEnable() + break + case ' ': + CreateCube(NxVec3(0.0, 20.0f, 0.0f),1) + break + case 's': + case 'S': + CreateStack(10) + break + case 'b': + case 'B': + CreateStack(30) + break + case 't': + case 'T': + CreateTower(30) + break + case 'w': + case 'W': + CreateCubeFromEye(8) + break + case 'q': + case 'Q': + + NxActor** actors = gScene->getActors() + if(gScene->getNbActors() > 1){: + gScene->releaseActor(*actors[gScene->getNbActors()-1]) + + + break + case GLUT_KEY_UP: case '8': gEye += gDir*2.0 break; + case GLUT_KEY_DOWN: case '2': gEye -= gDir*2.0 break; + case GLUT_KEY_LEFT: case '4': gEye -= gViewY*2.0 break; + case GLUT_KEY_RIGHT: case '6': gEye += gViewY*2.0 break; + + + +static void ArrowKeyCallback(int key, int x, int y) + + KeyboardCallback(key,x,y) + + +static void MouseCallback(int button, int state, int x, int y) + + gMouseX = x + gMouseY = y + + +static void MotionCallback(int x, int y) + + int dx = gMouseX - x + int dy = gMouseY - y + + gDir.normalize() + gViewY.cross(gDir, NxVec3(0,1,0)) + + NxQuat qx(NxPiF32 * dx * 20/ 180.0, NxVec3(0,1,0)) + qx.rotate(gDir) + NxQuat qy(NxPiF32 * dy * 20/ 180.0, gViewY) + qy.rotate(gDir) + + gMouseX = x + gMouseY = y + + +static void RenderCallback() + + if(gScene == None) return : + + ## Start simulation (non blocking) + gScene->simulate(1.0/60.0f) + + ## Clear buffers + glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT) + + ## Setup projection matrix + glMatrixMode(GL_PROJECTION) + glLoadIdentity() + gluPerspective(60.0, (float)glutGet(GLUT_WINDOW_WIDTH)/(float)glutGet(GLUT_WINDOW_HEIGHT), 1.0f, 10000.0f) + gluLookAt(gEye.x, gEye.y, gEye.z, gEye.x + gDir.x, gEye.y + gDir.y, gEye.z + gDir.z, 0.0, 1.0f, 0.0f) + + ## Setup modelview matrix + glMatrixMode(GL_MODELVIEW) + glLoadIdentity() + + ## Render all actors + int nbActors = gScene->getNbActors() + NxActor** actors = gScene->getActors() + while(nbActors--) + + NxActor* actor = *actors++ + if(!actor->userData) continue : + + ## Render actor + glPushMatrix() + float glMat[16] + actor->getGlobalPose().getColumnMajor44(glMat) + glMultMatrixf(glMat) + glColor4(1.0f, 1.0f, 1.0f, 1.0f) + glutSolidCube(float(size_t(actor->userData))*2.0) + glPopMatrix() + + ## Render shadow + glPushMatrix() + static float shadowMat[]={ 1,0,0,0, 0,0,0,0, 0,0,1,0, 0,0,0,1 } + glMultMatrixf(shadowMat) + glMultMatrixf(glMat) + glDisable(GL_LIGHTING) + glColor4(0.1f, 0.2f, 0.3f, 1.0f) + glutSolidCube(float(size_t(actor->userData))*2.0) + glEnable(GL_LIGHTING) + glPopMatrix() + + + ## Fetch simulation results + gScene->flushStream() + gScene->fetchResults(NX_RIGID_BODY_FINISHED, True) + + ## Print profile results (if enabled) + gPerfRenderer.render(gScene->readProfileData(True), glutGet(GLUT_WINDOW_WIDTH), glutGet(GLUT_WINDOW_HEIGHT)) + + glutSwapBuffers() + + +static void ReshapeCallback(int width, int height) + + glViewport(0, 0, width, height) + + +static void IdleCallback() + + glutPostRedisplay() + + +int main(int argc, char** argv) + + ## Initialize glut + printf("Use the arrow keys or 2, 4, 6 and 8 to move the camera.\n") + printf("Use the mouse to rotate the camera.\n") + printf("Press the keys w, t, s, b and space to create various things.\n") + printf("Press q to destroy the last thing created.\n") + printf("Press 0 to toggle the frame rate display.\n") + glutInit(&argc, argv) + glutInitWindowSize(512, 512) + glutInitDisplayMode(GLUT_RGB|GLUT_DOUBLE|GLUT_DEPTH) + int mainHandle = glutCreateWindow("SampleBoxes") + glutSetWindow(mainHandle) + glutDisplayFunc(RenderCallback) + glutReshapeFunc(ReshapeCallback) + glutIdleFunc(IdleCallback) + glutKeyboardFunc(KeyboardCallback) + glutSpecialFunc(ArrowKeyCallback) + glutMouseFunc(MouseCallback) + glutMotionFunc(MotionCallback) + MotionCallback(0,0) + atexit(ExitNx) + + ## Setup default render states + glClearColor(0.3, 0.4f, 0.5f, 1.0) + glEnable(GL_DEPTH_TEST) + glEnable(GL_COLOR_MATERIAL) + + ## Setup lighting + glEnable(GL_LIGHTING) + float ambientColor[] = { 0.0, 0.1f, 0.2f, 0.0f } + float diffuseColor[] = { 1.0, 1.0f, 1.0f, 0.0f } + float specularColor[] = { 0.0, 0.0f, 0.0f, 0.0f } + float position[] = { 100.0, 100.0f, 400.0f, 1.0f } + glLightfv(GL_LIGHT0, GL_AMBIENT, ambientColor) + glLightfv(GL_LIGHT0, GL_DIFFUSE, diffuseColor) + glLightfv(GL_LIGHT0, GL_SPECULAR, specularColor) + glLightfv(GL_LIGHT0, GL_POSITION, position) + glEnable(GL_LIGHT0) + + ## Initialize physics scene and start the application main loop if scene was created + if (InitNx()): + glutMainLoop() + + return 0 + Added: trunk/python-ogre/demos/physx/Utilities.py =================================================================== --- trunk/python-ogre/demos/physx/Utilities.py (rev 0) +++ trunk/python-ogre/demos/physx/Utilities.py 2008-10-24 02:56:40 UTC (rev 773) @@ -0,0 +1,43 @@ +import ogre.physics.physx as physx + +def getNxSDKCreateError(errorCode): + """ convert an errorCode to a useful string message + """ + if errorCode == physx.NXCE_NO_ERROR: return "NXCE_NO_ERROR" + if errorCode == physx.NXCE_PHYSX_NOT_FOUND: return "NXCE_PHYSX_NOT_FOUND" + if errorCode == physx.NXCE_WRONG_VERSION: return "NXCE_WRONG_VERSION" + if errorCode == physx.NXCE_DESCRIPTOR_INVALID: return "NXCE_DESCRIPTOR_INVALID" + if errorCode == physx.NXCE_CONNECTION_ERROR: return "NXCE_CONNECTION_ERROR" + if errorCode == physx.NXCE_RESET_ERROR: return "NXCE_RESET_ERROR" + if errorCode == physx.NXCE_IN_USE_ERROR: return "NXCE_IN_USE_ERROR" + return "Unknown error" + +def RemoveFileFromPath(path): + print "RemoveFileFromPath not yet implemented!!!!!" +# char *ls = 0 +# while(*path) +# if(*path == '\\' || *path == '/') ls = path : +# path++ +# if(ls) *ls = 0 : + +def void SetCWDToEXE(): + print "SetCWDToEXE not yet implemented!!!!!!" +# char exepath[1024] = {0} +# GetModuleFileNameA(0, exepath, sizeof(exepath)) +# assert(exepath[0]) +# RemoveFileFromPath(exepath) +# _chdir(exepath) + +def isProcessorBigEndian(): + print "isProcessorBigEndian not yet implemented!!!!!!" + return False + +## PT: those functions are useful for internal profiling during dev. They should not be used +## in the final code, so don't bother porting them to other platforms. + +def StartProfile( val): + print "StartProfile not yet implemented!!!!!!!!!" + +def EndProfile(val): + print "EndProfile not yet implemented!!!!!!!!!" + Added: trunk/python-ogre/demos/physx/physx_01.py =================================================================== --- trunk/python-ogre/demos/physx/physx_01.py (rev 0) +++ trunk/python-ogre/demos/physx/physx_01.py 2008-10-24 02:56:40 UTC (rev 773) @@ -0,0 +1,107 @@ +## +## Simple test code for Physx +## +import ogre.physics.PhysX as physics +import sys + +class MyOutputStream ( physics.NxUserOutputStream ): + def __init__( self): +# return + physics.NxUserOutputStream.__init__( self ) + + def reportError (self, code, message, file, line): + + if code < physics.NXE_DB_INFO: + MessageBox(NULL, message, "SDK Error", MB_OK), + sys.exit(1) + + def reportAssertViolation (self, message, file, line): +# //this should not get hit by +# // a properly debugged SDK! +# assert(0); + return physics.NX_AR_CONTINUE + + def print1 (self,message): + print "SDK says: %s\n", message + +# myOutputStream = MyOutputStream () + +# print myOutputStream + +def InitNx ( ) : + + gDefaultGravity = physics.NxVec3(0.0,-9.8,0.0) + gCookingInitialized = False + + # Initialize PhysicsSDK + desc = physics.NxPhysicsSDKDesc() + + gPhysicsSDK, errorCode = physics.NxCreatePhysicsSDK(physics.NX_PHYSICS_SDK_VERSION(),desc=desc) + if gPhysicsSDK == None : + print "\nSDK create error (%d - %s).\nUnable to initialize the PhysX SDK, exiting the sample.\n\n" % (errorCode,"test") + return False + + +# #if SAMPLES_USE_VRD +# # The settings for the VRD host and port are found in SampleCommonCode/SamplesVRDSettings.h +# if (gPhysicsSDK.getFoundationSDK().getRemoteDebugger() && !gPhysicsSDK.getFoundationSDK().getRemoteDebugger().isConnected()) +# gPhysicsSDK.getFoundationSDK().getRemoteDebugger().connect(SAMPLES_VRD_HOST, SAMPLES_VRD_PORT, SAMPLES_VRD_EVENTMASK) +# #endif + + if not gCookingInitialized: + gCookingInitialized = True + if not physics.InitCooking(): + print "\nError: Unable to initialize the cooking library, exiting the sample.\n\n" + return False + + # Set the physics parameters + gPhysicsSDK.setParameter(physics.NX_SKIN_WIDTH, -0.01) + + # Set the debug visualization parameters + gPhysicsSDK.setParameter(physics.NX_VISUALIZATION_SCALE, 1) + gPhysicsSDK.setParameter(physics.NX_VISUALIZE_COLLISION_SHAPES, 1) + gPhysicsSDK.setParameter(physics.NX_VISUALIZE_JOINT_LIMITS, 1) + gPhysicsSDK.setParameter(physics.NX_VISUALIZE_JOINT_LOCAL_AXES, 1) + + + # Create the scene + sceneDesc = physics.NxSceneDesc() + sceneDesc.gravity = gDefaultGravity + gScene = gPhysicsSDK.createScene(sceneDesc) + + # Create the default material + m = physic.NxMaterialDesc () + m.restitution = 0.5 + m.staticFriction = 0.2 + m.dynamicFriction = 0.2 + mat = gScene.getMaterialFromIndex(0) + mat.loadFromDesc(m) + +# switch(gSceneNr) { +# case 1 : SetupAnimalScene() break +# case 2 : SetupWheelScene() break +# case 3 : SetupPalmScene() break +# case 4 : SetupGrassScene() break +# case 5 : SetupRegularScene() break +# case 6 : SetupBunnyScene() break +# case 7 : SetupPumpkinScene() break +# +# # Insert new cases here +# } +# +# if (gSoftBodies.size() > 0) +# gSelectedSoftBody = gSoftBodies[0].getNxSoftBody() +# else +# gSelectedSoftBody = None +# +# if (gScene.getNbActors() > 0) +# gSelectedActor = *gScene.getActors() +# else +# gSelectedActor = None +# +# UpdateTime() + + return True + +if __name__ == "__main__": + print InitNx() \ No newline at end of file Modified: trunk/python-ogre/environment.py =================================================================== --- trunk/python-ogre/environment.py 2008-10-21 10:25:36 UTC (rev 772) +++ trunk/python-ogre/environment.py 2008-10-24 02:56:40 UTC (rev 773) @@ -1381,12 +1381,14 @@ ,Config.PATH_LIB_Ogre_OgreMain ] source = [ - ["wget", "http://www.openal.org/openal_webstf/downloads/openal-0.0.8.tar.gz",downloadPath], +# ["wget", "http://www.openal.org/openal_webstf/downloads/openal-0.0.8.tar.gz",downloadPath], + ["wget", "http://connect.creativelabs.com/openal/Downloads/openal-soft-1.5.304.tar.bz2",downloadPath], ["wget", "http://downloads.xiph.org/releases/ogg/libogg-1.1.3.tar.gz",downloadPath], ["wget", "http://downloads.xiph.org/releases/vorbis/libvorbis-1.2.0.tar.gz",downloadPath], ] buildCmds = [ - [0, "tar zxf " + os.path.join(downloadPath, "openal-0.0.8.tar.gz"), ''], +# [0, "tar zxf " + os.path.join(downloadPath, "openal-0.0.8.tar.gz"), ''], + [0, "tar jxf " + os.path.join(downloadPath, "openal-soft-1.5.304.tar.bz2"), ''], [0, "tar zxf " + os.path.join(downloadPath, "libogg-1.1.3.tar.gz"), ''], [0, "tar zxf " + os.path.join(downloadPath, "libvorbis-1.2.0.tar.gz"), ''], [0, "./configure --prefix=%s\nmake\nmake install" % PREFIX, os.path.join(os.getcwd(), "libogg-1.1.3")], This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2008-10-26 12:35:50
|
Revision: 774 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=774&view=rev Author: andy_miller Date: 2008-10-26 11:33:26 +0000 (Sun, 26 Oct 2008) Log Message: ----------- Change to Ogre Smart pointer detection to match change in pygccxml Fix to expose Joystick events in OIS Remove pathcing of pyplusplus in install as no longer needed Small change to grass demo Modified Paths: -------------- trunk/python-ogre/code_generators/ogre/generate_code.py trunk/python-ogre/code_generators/ois/generate_code.py trunk/python-ogre/demos/ogre/Demo_Grass.py trunk/python-ogre/environment.py Modified: trunk/python-ogre/code_generators/ogre/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/ogre/generate_code.py 2008-10-24 02:56:40 UTC (rev 773) +++ trunk/python-ogre/code_generators/ogre/generate_code.py 2008-10-26 11:33:26 UTC (rev 774) @@ -74,38 +74,20 @@ for b in cls.bases: r = b.related_class if r.decl_string.startswith ( '::Ogre::SharedPtr<' ) : -# print "ANDY Smart Class:", v, cls, r.decl_string return True else: if cls.name.startswith ( 'SharedPtr<' ) or cls.name.endswith( 'SharedPtr' ): -# print "Andy Smart 2", v, cls, cls.name return True return False @staticmethod def value_type( type ): -# print "ANDY VALUE_TYPE", type - if my_smart_ptr.is_smart_pointer( type ): - return predefined_is_smart_ptr.value_type( type, False ) + if my_smart_ptr.is_smart_pointer( type ): + return declarations.internal_type_traits.get_by_name( type, "element_type" ) pygccxml.declarations.smart_pointer_traits = my_smart_ptr -# # # I defined new class - internal_type_traits, which provides access to -# # # internal types. -# # # -# # # @staticmethod -# # # def value_type( type ): -# # # if my_smart_ptr.is_smart_pointer( type ): -# # # return declarations.internal_type_traits.get_by_name( -# # # type, "value_type" ) -# # # -# # # The new class allows you to handle cases, where "value_type" has -# # # different name. In case of auto_ptr it is "element_type". -# # # -# # # The new code is committed to SVN -# # # - HACK = True MAIN_NAMESPACE = 'Ogre' Modified: trunk/python-ogre/code_generators/ois/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/ois/generate_code.py 2008-10-24 02:56:40 UTC (rev 773) +++ trunk/python-ogre/code_generators/ois/generate_code.py 2008-10-26 11:33:26 UTC (rev 774) @@ -59,7 +59,7 @@ main_ns = global_ns.namespace( MAIN_NAMESPACE ) else: main_ns = global_ns - main_ns.variable( "::OIS::JoyStickEvent::state" ).exclude() +# main_ns.variable( "::OIS::JoyStickEvent::state" ).exclude() ############################################################ ## @@ -87,6 +87,8 @@ main_ns = global_ns mb.class_( "Mouse" ).member_function( "getMouseState" ).call_policies =\ call_policies.return_value_policy( call_policies.reference_existing_object ) + mb.class_( "JoyStick" ).member_function( "getJoyStickState" ).call_policies =\ + call_policies.return_value_policy( call_policies.reference_existing_object ) ############################################################ Modified: trunk/python-ogre/demos/ogre/Demo_Grass.py =================================================================== --- trunk/python-ogre/demos/ogre/Demo_Grass.py 2008-10-24 02:56:40 UTC (rev 773) +++ trunk/python-ogre/demos/ogre/Demo_Grass.py 2008-10-26 11:33:26 UTC (rev 774) @@ -99,10 +99,10 @@ offset = ogre.Vector4(0,0,0,0) for reg in mStaticGeom.getRegionIterator(): ## a little randomness - self.xpos += reg.getCentre().x * 0.001 - self.zpos += reg.getCentre().z * 0.001 - offset.x = math.sin(self.xpos) * 5 - offset.z = math.sin(self.zpos) * 5 + self.xpos += reg.getCentre().x * 0.01 + self.zpos += reg.getCentre().z * 0.01 + offset.x = math.sin(self.xpos) * 1.5 + offset.z = math.sin(self.zpos) * 1.5 for lod in reg.getLODIterator(): for mat in lod.getMaterialIterator(): for geom in mat.getGeometryIterator(): Modified: trunk/python-ogre/environment.py =================================================================== --- trunk/python-ogre/environment.py 2008-10-24 02:56:40 UTC (rev 773) +++ trunk/python-ogre/environment.py 2008-10-26 11:33:26 UTC (rev 774) @@ -285,18 +285,18 @@ [svn, " co -r 1383 http://pygccxml.svn.sourceforge.net/svnroot/pygccxml/pygccxml_dev "+base, os.getcwd()] ] else: - source_version = "1441" + source_version = "1446" source = [ - [svn, " co -r 1441 http://pygccxml.svn.sourceforge.net/svnroot/pygccxml/pygccxml_dev "+base, os.getcwd()] + [svn, " co -r 1446 http://pygccxml.svn.sourceforge.net/svnroot/pygccxml/pygccxml_dev "+base, os.getcwd()] ] if isLinux() or isMac() : buildCmds = [ - [0, "patch -s -N -i ../python-ogre/patch/pygccxml.patch -p0 ", os.path.join(os.getcwd(), base) ], +# # [0, "patch -s -N -i ../python-ogre/patch/pygccxml.patch -p0 ", os.path.join(os.getcwd(), base) ], [0,"python setup.py install --prefix="+ PREFIX , os.path.join (os.getcwd(), base) ], ] if isWindows(): buildCmds = [ - [0, "patch -s -N -i ../python-ogre/patch/pygccxml.patch -p0 ", os.path.join(os.getcwd(), base) ], +# # [0, "patch -s -N -i ../python-ogre/patch/pygccxml.patch -p0 ", os.path.join(os.getcwd(), base) ], [0,"python setup.py install " , os.path.join (os.getcwd(), base) ], ] @@ -311,9 +311,9 @@ [svn, " co -r 1383 http://pygccxml.svn.sourceforge.net/svnroot/pygccxml/pyplusplus_dev "+base, os.getcwd()] ] else: - source_version = "1441" + source_version = "1446" source = [ - [svn, " co -r 1441 http://pygccxml.svn.sourceforge.net/svnroot/pygccxml/pyplusplus_dev "+base, os.getcwd()] + [svn, " co -r 1446 http://pygccxml.svn.sourceforge.net/svnroot/pygccxml/pyplusplus_dev "+base, os.getcwd()] ] if isLinux() or isMac() : buildCmds = [ @@ -1283,17 +1283,17 @@ if isWindows(): libs=[ boost.lib, 'NxCharacter', 'NxCooking', 'PhysXLoader' ] elif isLinux(): - libs=[ boost.lib, 'NxCharacter', 'NxCooking', 'PhysXCore', 'PhysXLoader' ] + libs=[ boost.lib, 'NxCharacter', 'NxCooking', 'PhysXCore', 'PhysXLoader' ] source = [ [wget, "http://developer.download.nvidia.com/PhysX/2.8.1/PhysX_2.8.1_SDK_CoreLinux_deb.tar.gz", downloadPath] ] buildCmds = [ - [0, "tar zxf " + os.path.join(downloadPath, "PhysX_2.8.1_SDK_CoreLinux_deb.tar.gz"), ''], - [0, "sudo dpkg -i libphysx-common_2.8.1-4_i386.deb", ''], - [0, "sudo dpkg -i libphysx-2.8.1_4_i386.deb", ''], - [0, "sudo dpkg -i libphysx-dev-2.8.1_4_i386.deb", ''], - [0, "sudo dpkg -i libphysx-extras-2.8.1_4_i386.deb", ''] + [0, "tar zxf " + os.path.join(downloadPath, "PhysX_2.8.1_SDK_CoreLinux_deb.tar.gz"), ''], + [0, "sudo dpkg -i libphysx-common_2.8.1-4_i386.deb", ''], + [0, "sudo dpkg -i libphysx-2.8.1_4_i386.deb", ''], + [0, "sudo dpkg -i libphysx-dev-2.8.1_4_i386.deb", ''], + [0, "sudo dpkg -i libphysx-extras-2.8.1_4_i386.deb", ''] ] ModuleName="PhysX" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |