[Python-ogre-commit] SF.net SVN: python-ogre:[689] trunk/python-ogre
Brought to you by:
andy_miller,
roman_yakovenko
|
From: <and...@us...> - 2008-08-15 10:44:08
|
Revision: 689
http://python-ogre.svn.sourceforge.net/python-ogre/?rev=689&view=rev
Author: andy_miller
Date: 2008-08-15 10:44:11 +0000 (Fri, 15 Aug 2008)
Log Message:
-----------
First go at Hydrax (0.3) module
Modified Paths:
--------------
trunk/python-ogre/PythonOgreConfig_nt.py
trunk/python-ogre/PythonOgreConfig_posix.py
trunk/python-ogre/PythonOgreConfig_system.py
trunk/python-ogre/ThirdParty/Hydrax/Hydrax.h
trunk/python-ogre/ThirdParty/Hydrax/Module.h
trunk/python-ogre/ThirdParty/Hydrax/Noise.h
trunk/python-ogre/ThirdParty/Hydrax/Perlin.h
trunk/python-ogre/ThirdParty/Hydrax/Prerequisites.h
trunk/python-ogre/ThirdParty/Hydrax/ProjectedGrid.h
trunk/python-ogre/ThirdParty/Hydrax/SimpleGrid.h
trunk/python-ogre/code_generators/hydrax/customization_data.py
trunk/python-ogre/code_generators/hydrax/generate_code.py
trunk/python-ogre/code_generators/hydrax/python_hydrax.h
trunk/python-ogre/environment.py
trunk/python-ogre/setup.py
Added Paths:
-----------
trunk/python-ogre/demos/hydrax/
trunk/python-ogre/demos/hydrax/media/
trunk/python-ogre/demos/hydrax/media/Hydrax/
trunk/python-ogre/demos/hydrax/media/Hydrax/Caustics_0.bmp
trunk/python-ogre/demos/hydrax/media/Hydrax/Caustics_1.bmp
trunk/python-ogre/demos/hydrax/media/Hydrax/Caustics_10.bmp
trunk/python-ogre/demos/hydrax/media/Hydrax/Caustics_11.bmp
trunk/python-ogre/demos/hydrax/media/Hydrax/Caustics_12.bmp
trunk/python-ogre/demos/hydrax/media/Hydrax/Caustics_13.bmp
trunk/python-ogre/demos/hydrax/media/Hydrax/Caustics_14.bmp
trunk/python-ogre/demos/hydrax/media/Hydrax/Caustics_15.bmp
trunk/python-ogre/demos/hydrax/media/Hydrax/Caustics_16.bmp
trunk/python-ogre/demos/hydrax/media/Hydrax/Caustics_17.bmp
trunk/python-ogre/demos/hydrax/media/Hydrax/Caustics_18.bmp
trunk/python-ogre/demos/hydrax/media/Hydrax/Caustics_19.bmp
trunk/python-ogre/demos/hydrax/media/Hydrax/Caustics_2.bmp
trunk/python-ogre/demos/hydrax/media/Hydrax/Caustics_20.bmp
trunk/python-ogre/demos/hydrax/media/Hydrax/Caustics_21.bmp
trunk/python-ogre/demos/hydrax/media/Hydrax/Caustics_22.bmp
trunk/python-ogre/demos/hydrax/media/Hydrax/Caustics_23.bmp
trunk/python-ogre/demos/hydrax/media/Hydrax/Caustics_24.bmp
trunk/python-ogre/demos/hydrax/media/Hydrax/Caustics_25.bmp
trunk/python-ogre/demos/hydrax/media/Hydrax/Caustics_26.bmp
trunk/python-ogre/demos/hydrax/media/Hydrax/Caustics_27.bmp
trunk/python-ogre/demos/hydrax/media/Hydrax/Caustics_28.bmp
trunk/python-ogre/demos/hydrax/media/Hydrax/Caustics_29.bmp
trunk/python-ogre/demos/hydrax/media/Hydrax/Caustics_3.bmp
trunk/python-ogre/demos/hydrax/media/Hydrax/Caustics_30.bmp
trunk/python-ogre/demos/hydrax/media/Hydrax/Caustics_31.bmp
trunk/python-ogre/demos/hydrax/media/Hydrax/Caustics_4.bmp
trunk/python-ogre/demos/hydrax/media/Hydrax/Caustics_5.bmp
trunk/python-ogre/demos/hydrax/media/Hydrax/Caustics_6.bmp
trunk/python-ogre/demos/hydrax/media/Hydrax/Caustics_7.bmp
trunk/python-ogre/demos/hydrax/media/Hydrax/Caustics_8.bmp
trunk/python-ogre/demos/hydrax/media/Hydrax/Caustics_9.bmp
trunk/python-ogre/demos/hydrax/media/Hydrax/Foam.png
trunk/python-ogre/demos/hydrax/media/Hydrax/Fresnel.bmp
trunk/python-ogre/demos/hydrax/media/materials/
trunk/python-ogre/demos/hydrax/media/materials/programs/
trunk/python-ogre/demos/hydrax/media/materials/programs/OffsetMapping.cg
trunk/python-ogre/demos/hydrax/media/materials/scripts/
trunk/python-ogre/demos/hydrax/media/materials/scripts/OffsetMapping.material
trunk/python-ogre/demos/hydrax/media/materials/scripts/SkyBox.material
trunk/python-ogre/demos/hydrax/media/materials/textures/
trunk/python-ogre/demos/hydrax/media/materials/textures/Island.tga
trunk/python-ogre/demos/hydrax/media/materials/textures/IslandNH.tga
trunk/python-ogre/demos/hydrax/media/models/
trunk/python-ogre/demos/hydrax/media/models/Island.mesh
trunk/python-ogre/demos/hydrax/media/packs/
trunk/python-ogre/demos/hydrax/media/packs/OgreCore.zip
trunk/python-ogre/demos/hydrax/media/packs/SkyBoxes.zip
trunk/python-ogre/packages_2.5/ogre/addons/hydrax/
trunk/python-ogre/packages_2.5/ogre/addons/hydrax/__init__.py
Modified: trunk/python-ogre/PythonOgreConfig_nt.py
===================================================================
--- trunk/python-ogre/PythonOgreConfig_nt.py 2008-08-15 08:08:10 UTC (rev 688)
+++ trunk/python-ogre/PythonOgreConfig_nt.py 2008-08-15 10:44:11 UTC (rev 689)
@@ -83,6 +83,8 @@
PATH_particleuniverse = os.path.join(PATH_Ogre, 'PlugIns', 'ParticleUniverse' )
PATH_ogrepcz = os.path.join(PATH_Ogre, 'PlugIns', 'PCZSceneManager' )
+PATH_hydrax = os.path.join(PATH_THIRDPARTY, 'hydrax')
+
# it's time for the SDK version
if SDK:
PATH_CEGUI = os.path.join(BASE_DIR, 'ogre')
@@ -176,6 +178,7 @@
PATH_INCLUDE_ogreforests = PATH_ogreforests
PATH_INCLUDE_particleuniverse = os.path.join(PATH_particleuniverse, 'include' )
PATH_INCLUDE_ogrepcz = os.path.join(PATH_ogrepcz,'include')
+PATH_INCLUDE_hydrax= PATH_hydrax
PATH_INCLUDE_OggVorbisTheora = [ os.path.join(BASE_DIR,'ogg','include')
,os.path.join(BASE_DIR, 'vorbis', 'include')
Modified: trunk/python-ogre/PythonOgreConfig_posix.py
===================================================================
--- trunk/python-ogre/PythonOgreConfig_posix.py 2008-08-15 08:08:10 UTC (rev 688)
+++ trunk/python-ogre/PythonOgreConfig_posix.py 2008-08-15 10:44:11 UTC (rev 689)
@@ -79,8 +79,8 @@
PATH_cadunetree= os.path.join(PATH_THIRDPARTY, 'cadunetree')
PATH_opensteer = os.path.join(BASE_DIR, 'opensteer', 'trunk')
PATH_ogrepcz = os.path.join(PATH_Ogre, 'PlugIns', 'PCZSceneManager' )
+PATH_hydrax = os.path.join(PATH_THIRDPARTY, 'hydrax')
-
###
### these paths assume you've left all the directory structure as standard
### Override anything that is different
@@ -119,8 +119,8 @@
PATH_LIB_particleuniverse = os.path.join(PATH_particleuniverse, 'bin', 'release')
PATH_LIB_opensteer = os.path.join(LOCAL_LIB)
PATH_INCLUDE_ogrepcz = os.path.join(PATH_ogrepcz,'include')
+PATH_INCLUDE_hydrax= PATH_hydrax
-
PATH_INCLUDE_Ogre= os.path.join(LOCAL_INCLUDE,'OGRE') # os.path.join(PATH_Ogre,'OgreMain/include')
PATH_INCLUDE_Ogre_Dependencies = PATH_INCLUDE_Ogre # os.path.join( PATH_Ogre, 'Dependencies/include')
Modified: trunk/python-ogre/PythonOgreConfig_system.py
===================================================================
--- trunk/python-ogre/PythonOgreConfig_system.py 2008-08-15 08:08:10 UTC (rev 688)
+++ trunk/python-ogre/PythonOgreConfig_system.py 2008-08-15 10:44:11 UTC (rev 689)
@@ -62,8 +62,8 @@
PATH_particleuniverse = os.path.join(PATH_Ogre, 'PlugIns', 'ParticleUniverse' )
PATH_cadunetree= os.path.join(PATH_THIRDPARTY, 'cadunetree')
PATH_opensteer = os.path.join(BASE_DIR, 'opensteer', 'trunk')
+PATH_hydrax = os.path.join(PATH_THIRDPARTY, 'hydrax')
-
###
### these paths assume you've left all the directory structure as standard
### Override anything that is different
@@ -97,8 +97,8 @@
PATH_LIB_navi= os.path.join(PATH_navi, 'lib')
PATH_LIB_particleuniverse = os.path.join(PATH_particleuniverse, 'bin', 'release')
PATH_LIB_opensteer = os.path.join(LOCAL_LIB)
+PATH_INCLUDE_hydrax= PATH_hydrax
-
PATH_INCLUDE_Ogre= os.path.join(LOCAL_INCLUDE,'OGRE') # os.path.join(PATH_Ogre,'OgreMain/include')
PATH_INCLUDE_Ogre_Dependencies = PATH_INCLUDE_Ogre # os.path.join( PATH_Ogre, 'Dependencies/include')
Modified: trunk/python-ogre/ThirdParty/Hydrax/Hydrax.h
===================================================================
--- trunk/python-ogre/ThirdParty/Hydrax/Hydrax.h 2008-08-15 08:08:10 UTC (rev 688)
+++ trunk/python-ogre/ThirdParty/Hydrax/Hydrax.h 2008-08-15 10:44:11 UTC (rev 689)
@@ -35,7 +35,7 @@
#include "MaterialManager.h"
#include "TextureManager.h"
#include "DecalsManager.h"
-#include "Modules/Module.h"
+#include "Module.h"
namespace Hydrax
{
Modified: trunk/python-ogre/ThirdParty/Hydrax/Module.h
===================================================================
--- trunk/python-ogre/ThirdParty/Hydrax/Module.h 2008-08-15 08:08:10 UTC (rev 688)
+++ trunk/python-ogre/ThirdParty/Hydrax/Module.h 2008-08-15 10:44:11 UTC (rev 689)
@@ -25,10 +25,10 @@
#ifndef _Hydrax_Module_H_
#define _Hydrax_Module_H_
-#include "../Prerequisites.h"
-#include "../Noise/Noise.h"
-#include "../Mesh.h"
-#include "../MaterialManager.h"
+#include "Prerequisites.h"
+#include "Noise.h"
+#include "Mesh.h"
+#include "MaterialManager.h"
namespace Hydrax{ namespace Module
{
Modified: trunk/python-ogre/ThirdParty/Hydrax/Noise.h
===================================================================
--- trunk/python-ogre/ThirdParty/Hydrax/Noise.h 2008-08-15 08:08:10 UTC (rev 688)
+++ trunk/python-ogre/ThirdParty/Hydrax/Noise.h 2008-08-15 10:44:11 UTC (rev 689)
@@ -25,7 +25,7 @@
#ifndef _Hydrax_Noise_H_
#define _Hydrax_Noise_H_
-#include "../Prerequisites.h"
+#include "Prerequisites.h"
namespace Hydrax{ namespace Noise
{
Modified: trunk/python-ogre/ThirdParty/Hydrax/Perlin.h
===================================================================
--- trunk/python-ogre/ThirdParty/Hydrax/Perlin.h 2008-08-15 08:08:10 UTC (rev 688)
+++ trunk/python-ogre/ThirdParty/Hydrax/Perlin.h 2008-08-15 10:44:11 UTC (rev 689)
@@ -29,9 +29,9 @@
#ifndef _Hydrax_Noise_Perlin_H_
#define _Hydrax_Noise_Perlin_H_
-#include "../../Prerequisites.h"
+#include "Prerequisites.h"
-#include "../Noise.h"
+#include "Noise.h"
#define n_bits 5
#define n_size (1<<(n_bits-1))
Modified: trunk/python-ogre/ThirdParty/Hydrax/Prerequisites.h
===================================================================
--- trunk/python-ogre/ThirdParty/Hydrax/Prerequisites.h 2008-08-15 08:08:10 UTC (rev 688)
+++ trunk/python-ogre/ThirdParty/Hydrax/Prerequisites.h 2008-08-15 10:44:11 UTC (rev 689)
@@ -29,15 +29,15 @@
#include <Ogre.h>
/// Define the dll export qualifier if compiling for Windows
-#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
- #ifdef HYDRAX_LIB
- #define DllExport __declspec (dllexport)
- #else
- #define DllExport __declspec (dllimport)
- #endif
-#else
+// #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
+// #ifdef HYDRAX_LIB
+// #define DllExport __declspec (dllexport)
+// #else
+// #define DllExport __declspec (dllimport)
+// #endif
+// #else
#define DllExport
-#endif
+// #endif
/// Log macro
#define HydraxLOG(msg) Ogre::LogManager::getSingleton().logMessage("[Hydrax] " + Ogre::String(msg));
Modified: trunk/python-ogre/ThirdParty/Hydrax/ProjectedGrid.h
===================================================================
--- trunk/python-ogre/ThirdParty/Hydrax/ProjectedGrid.h 2008-08-15 08:08:10 UTC (rev 688)
+++ trunk/python-ogre/ThirdParty/Hydrax/ProjectedGrid.h 2008-08-15 10:44:11 UTC (rev 689)
@@ -31,11 +31,11 @@
#ifndef _Hydrax_Modules_ProjectedGrid_H_
#define _Hydrax_Modules_projectedGrid_H_
-#include "../../Prerequisites.h"
+#include "Prerequisites.h"
-#include "../../Hydrax.h"
-#include "../../Mesh.h"
-#include "../Module.h"
+#include "Hydrax.h"
+#include "Mesh.h"
+#include "Module.h"
namespace Hydrax{ namespace Module
{
Modified: trunk/python-ogre/ThirdParty/Hydrax/SimpleGrid.h
===================================================================
--- trunk/python-ogre/ThirdParty/Hydrax/SimpleGrid.h 2008-08-15 08:08:10 UTC (rev 688)
+++ trunk/python-ogre/ThirdParty/Hydrax/SimpleGrid.h 2008-08-15 10:44:11 UTC (rev 689)
@@ -25,11 +25,11 @@
#ifndef _Hydrax_Modules_SimpleGrid_H_
#define _Hydrax_Modules_SimpleGrid_H_
-#include "../../Prerequisites.h"
+#include "Prerequisites.h"
-#include "../../Hydrax.h"
-#include "../../Mesh.h"
-#include "../Module.h"
+#include "Hydrax.h"
+#include "Mesh.h"
+#include "Module.h"
namespace Hydrax{ namespace Module
{
Modified: trunk/python-ogre/code_generators/hydrax/customization_data.py
===================================================================
--- trunk/python-ogre/code_generators/hydrax/customization_data.py 2008-08-15 08:08:10 UTC (rev 688)
+++ trunk/python-ogre/code_generators/hydrax/customization_data.py 2008-08-15 10:44:11 UTC (rev 689)
@@ -1,6 +1,6 @@
def header_files( version ):
- return [ '']
+ return [ 'Hydrax.h']
def huge_classes( version ):
return []
Modified: trunk/python-ogre/code_generators/hydrax/generate_code.py
===================================================================
--- trunk/python-ogre/code_generators/hydrax/generate_code.py 2008-08-15 08:08:10 UTC (rev 688)
+++ trunk/python-ogre/code_generators/hydrax/generate_code.py 2008-08-15 10:44:11 UTC (rev 689)
@@ -6,7 +6,7 @@
# -----------------------------------------------------------------------------
## STARTER TEMPLATE..
-## replace PROJECT with lowercase project name
+## replace hydrax with lowercase project name
## set MAIN_NAMESPACE
## rename and configure .h files
@@ -40,7 +40,7 @@
import common_utils.ogre_properties as ogre_properties
from common_utils import docit
-MAIN_NAMESPACE = ''
+MAIN_NAMESPACE = 'Hydrax'
############################################################
##
@@ -192,11 +192,11 @@
# NOTE: If you update the source library code you need to manually delete the cache .XML file
#
xml_cached_fc = parser.create_cached_source_fc(
- os.path.join( environment.PROJECT.root_dir, "python_PROJECT.h" )
- , environment.PROJECT.cache_file )
+ os.path.join( environment.hydrax.root_dir, "python_hydrax.h" )
+ , environment.hydrax.cache_file )
- defined_symbols = [ ]
- defined_symbols.append( 'VERSION_' + environment.PROJECT.version )
+ defined_symbols = ['OGRE_NONCLIENT_BUILD' ]
+ defined_symbols.append( 'VERSION_' + environment.hydrax.version )
#
# build the core Py++ system from the GCCXML created source
@@ -204,10 +204,10 @@
mb = module_builder.module_builder_t( [ xml_cached_fc ]
, gccxml_path=environment.gccxml_bin
, working_directory=environment.root_dir
- , include_paths=environment.PROJECT.include_dirs
+ , include_paths=environment.hydrax.include_dirs
, define_symbols=defined_symbols
, indexing_suite_version=2
- , cflags=environment.PROJECT.cflags
+ , cflags=environment.hydrax.cflags
)
# if this module depends on another set it here
@@ -250,11 +250,11 @@
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")
+ 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__' : '"PROJECT DESCRIPTION"' } )
+ common_utils.add_constants( mb, { '__doc__' : '"hydrax DESCRIPTION"' } )
##########################################################################################
@@ -263,23 +263,23 @@
#
##########################################################################################
extractor = exdoc.doc_extractor() # I'm excluding the UTFstring docs as lots about nothing
- mb.build_code_creator (module_name='_PROJECT_' , doc_extractor= extractor )
+ mb.build_code_creator (module_name='_hydrax_' , doc_extractor= extractor )
- for inc in environment.PROJECT.include_dirs:
+ for inc in environment.hydrax.include_dirs:
mb.code_creator.user_defined_directories.append(inc )
- mb.code_creator.user_defined_directories.append( environment.PROJECT.generated_dir )
- mb.code_creator.replace_included_headers( customization_data.header_files( environment.PROJECT.version ) )
+ mb.code_creator.user_defined_directories.append( environment.hydrax.generated_dir )
+ mb.code_creator.replace_included_headers( customization_data.header_files( environment.hydrax.version ) )
- huge_classes = map( mb.class_, customization_data.huge_classes( environment.PROJECT.version ) )
+ huge_classes = map( mb.class_, customization_data.huge_classes( environment.hydrax.version ) )
- mb.split_module(environment.PROJECT.generated_dir, huge_classes, use_files_sum_repository=False)
+ mb.split_module(environment.hydrax.generated_dir, huge_classes, use_files_sum_repository=False)
## now we need to ensure a series of headers and additional source files are
## copied to the generated directory..
-# common_utils.copyTree ( sourcePath = environment.Config.PATH_INCLUDE_PROJECT,
-# destPath = environment.PROJECT.generated_dir,
-# recursive=False )
+ common_utils.copyTree ( sourcePath = environment.Config.PATH_INCLUDE_hydrax,
+ destPath = environment.hydrax.generated_dir,
+ recursive= False )
if __name__ == '__main__':
start_time = time.clock()
Modified: trunk/python-ogre/code_generators/hydrax/python_hydrax.h
===================================================================
--- trunk/python-ogre/code_generators/hydrax/python_hydrax.h 2008-08-15 08:08:10 UTC (rev 688)
+++ trunk/python-ogre/code_generators/hydrax/python_hydrax.h 2008-08-15 10:44:11 UTC (rev 689)
@@ -1,18 +1,18 @@
-#include "PROJECT MASTER.h"
+#include "Hydrax.h"
// First we create a magic namespace to hold all our aliases
namespace pyplusplus { namespace aliases {
- #include "python_PROJECT_aliases.h"
+ #include "python_hydrax_aliases.h"
} }
// then we exposed everything needed (and more) to ensure GCCXML makes them visible to Py++
//
-namespace python_PROJECT{ namespace details{
+namespace python_hydrax{ namespace details{
inline void instantiate(){
- using namespace PROJECT;
- #include "python_PROJECT_sizeof.h"
+ using namespace Hydrax;
+ #include "python_hydrax_sizeof.h"
} } }
Property changes on: trunk/python-ogre/demos/hydrax/media/Hydrax/Caustics_0.bmp
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Property changes on: trunk/python-ogre/demos/hydrax/media/Hydrax/Caustics_1.bmp
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Property changes on: trunk/python-ogre/demos/hydrax/media/Hydrax/Caustics_10.bmp
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Property changes on: trunk/python-ogre/demos/hydrax/media/Hydrax/Caustics_11.bmp
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Property changes on: trunk/python-ogre/demos/hydrax/media/Hydrax/Caustics_12.bmp
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Property changes on: trunk/python-ogre/demos/hydrax/media/Hydrax/Caustics_13.bmp
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Property changes on: trunk/python-ogre/demos/hydrax/media/Hydrax/Caustics_14.bmp
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Property changes on: trunk/python-ogre/demos/hydrax/media/Hydrax/Caustics_15.bmp
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Property changes on: trunk/python-ogre/demos/hydrax/media/Hydrax/Caustics_16.bmp
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Property changes on: trunk/python-ogre/demos/hydrax/media/Hydrax/Caustics_17.bmp
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Property changes on: trunk/python-ogre/demos/hydrax/media/Hydrax/Caustics_18.bmp
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Property changes on: trunk/python-ogre/demos/hydrax/media/Hydrax/Caustics_19.bmp
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Property changes on: trunk/python-ogre/demos/hydrax/media/Hydrax/Caustics_2.bmp
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Property changes on: trunk/python-ogre/demos/hydrax/media/Hydrax/Caustics_20.bmp
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Property changes on: trunk/python-ogre/demos/hydrax/media/Hydrax/Caustics_21.bmp
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Property changes on: trunk/python-ogre/demos/hydrax/media/Hydrax/Caustics_22.bmp
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Property changes on: trunk/python-ogre/demos/hydrax/media/Hydrax/Caustics_23.bmp
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Property changes on: trunk/python-ogre/demos/hydrax/media/Hydrax/Caustics_24.bmp
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Property changes on: trunk/python-ogre/demos/hydrax/media/Hydrax/Caustics_25.bmp
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Property changes on: trunk/python-ogre/demos/hydrax/media/Hydrax/Caustics_26.bmp
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Property changes on: trunk/python-ogre/demos/hydrax/media/Hydrax/Caustics_27.bmp
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Property changes on: trunk/python-ogre/demos/hydrax/media/Hydrax/Caustics_28.bmp
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Property changes on: trunk/python-ogre/demos/hydrax/media/Hydrax/Caustics_29.bmp
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Property changes on: trunk/python-ogre/demos/hydrax/media/Hydrax/Caustics_3.bmp
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Property changes on: trunk/python-ogre/demos/hydrax/media/Hydrax/Caustics_30.bmp
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Property changes on: trunk/python-ogre/demos/hydrax/media/Hydrax/Caustics_31.bmp
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Property changes on: trunk/python-ogre/demos/hydrax/media/Hydrax/Caustics_4.bmp
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Property changes on: trunk/python-ogre/demos/hydrax/media/Hydrax/Caustics_5.bmp
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Property changes on: trunk/python-ogre/demos/hydrax/media/Hydrax/Caustics_6.bmp
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Property changes on: trunk/python-ogre/demos/hydrax/media/Hydrax/Caustics_7.bmp
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Property changes on: trunk/python-ogre/demos/hydrax/media/Hydrax/Caustics_8.bmp
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Property changes on: trunk/python-ogre/demos/hydrax/media/Hydrax/Caustics_9.bmp
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Property changes on: trunk/python-ogre/demos/hydrax/media/Hydrax/Foam.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Property changes on: trunk/python-ogre/demos/hydrax/media/Hydrax/Fresnel.bmp
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/python-ogre/demos/hydrax/media/materials/programs/OffsetMapping.cg
===================================================================
--- trunk/python-ogre/demos/hydrax/media/materials/programs/OffsetMapping.cg (rev 0)
+++ trunk/python-ogre/demos/hydrax/media/materials/programs/OffsetMapping.cg 2008-08-15 10:44:11 UTC (rev 689)
@@ -0,0 +1,100 @@
+/* Bump mapping with Parallax offset vertex program
+ In this program, we want to calculate the tangent space light end eye vectors
+ which will get passed to the fragment program to produce the per-pixel bump map
+ with parallax offset effect.
+*/
+
+/* Vertex program that moves light and eye vectors into texture tangent space at vertex */
+
+void main_vp(float4 position : POSITION,
+ float3 normal : NORMAL,
+ float2 uv : TEXCOORD0,
+ float3 tangent : TANGENT0,
+ // outputs
+ out float4 oPosition : POSITION,
+ out float2 oUv : TEXCOORD0,
+ out float3 oLightDir : TEXCOORD1, // tangent space
+ out float3 oEyeDir : TEXCOORD2, // tangent space
+ out float3 oHalfAngle : TEXCOORD3, //
+ // parameters
+ uniform float4 lightPosition, // object space
+ uniform float3 eyePosition, // object space
+ uniform float4x4 worldViewProj)
+{
+ // calculate output position
+ oPosition = mul(worldViewProj, position);
+
+ // pass the main uvs straight through unchanged
+ oUv = uv*float2(8, 8);
+
+ // calculate tangent space light vector
+ // Get object space light direction
+ float3 lightDir = normalize(lightPosition.xyz - (position * lightPosition.w));
+ float3 eyeDir = eyePosition - position.xyz;
+
+ // Calculate the binormal (NB we assume both normal and tangent are
+ // already normalised)
+ // NB looks like nvidia cross params are BACKWARDS to what you'd expect
+ // this equates to NxT, not TxN
+ float3 binormal = cross(tangent, normal);
+
+ // Form a rotation matrix out of the vectors
+ float3x3 rotation = float3x3(tangent, binormal, normal);
+
+ // Transform the light vector according to this matrix
+ lightDir = normalize(mul(rotation, lightDir));
+ eyeDir = normalize(mul(rotation, eyeDir));
+
+ oLightDir = lightDir;
+ oEyeDir = eyeDir;
+ oHalfAngle = normalize(eyeDir + lightDir);
+}
+
+// General functions
+
+// Expand a range-compressed vector
+float3 expand(float3 v)
+{
+ return (v - 0.5) * 2;
+}
+
+void main_fp(float2 uv : TEXCOORD0,
+ float3 lightDir : TEXCOORD1,
+ float3 eyeDir : TEXCOORD2,
+ float3 halfAngle : TEXCOORD3,
+ uniform float3 lightDiffuse,
+ uniform float3 lightSpecular,
+ uniform float4 scaleBias,
+ uniform sampler2D normalHeightMap,
+ uniform sampler2D diffuseMap,
+ out float4 oColor : COLOR)
+{
+ // get the height using the tex coords
+ float height = tex2D(normalHeightMap, uv).a;
+
+ // scale and bias factors
+ float scale = scaleBias.x;
+ float bias = scaleBias.y;
+
+ // calculate displacement
+ float displacement = (height * scale) + bias;
+
+ float3 uv2 = float3(uv, 1);
+
+ // calculate the new tex coord to use for normal and diffuse
+ float2 newTexCoord = ((eyeDir * displacement) + uv2).xy;
+
+ // get the new normal and diffuse values
+ float3 normal = expand(tex2D(normalHeightMap, newTexCoord).xyz);
+ float3 diffuse = tex2D(diffuseMap, newTexCoord).xyz;
+
+ float3 specular = pow(saturate(dot(normal, halfAngle)), 32) * lightSpecular;
+ float diff = saturate(dot(normal, lightDir));
+ if(diff<0.3)
+ diff = 0.3;
+ float3 col = diffuse * diff * lightDiffuse + specular;
+
+ oColor = float4(col, 1);
+}
+
+
Added: trunk/python-ogre/demos/hydrax/media/materials/scripts/OffsetMapping.material
===================================================================
--- trunk/python-ogre/demos/hydrax/media/materials/scripts/OffsetMapping.material (rev 0)
+++ trunk/python-ogre/demos/hydrax/media/materials/scripts/OffsetMapping.material 2008-08-15 10:44:11 UTC (rev 689)
@@ -0,0 +1,60 @@
+// Bump map with Parallax offset vertex program, support for this is required
+vertex_program Examples/OffsetMappingVP cg
+{
+ source OffsetMapping.cg
+ entry_point main_vp
+ profiles vs_1_1 arbvp1
+}
+
+// Bump map with parallax fragment program
+fragment_program Examples/OffsetMappingFP cg
+{
+ source OffsetMapping.cg
+ entry_point main_fp
+ profiles ps_2_0 arbfp1
+}
+
+material Examples/OffsetMapping/Specular
+{
+
+ // This is the preferred technique which uses both vertex and
+ // fragment programs, supports coloured lights
+ technique
+ {
+ // do the lighting and bump mapping with parallax pass
+ pass
+ {
+
+ // Vertex program reference
+ vertex_program_ref Examples/OffsetMappingVP
+ {
+ param_named_auto lightPosition light_position_object_space 0
+ param_named_auto eyePosition camera_position_object_space
+ param_named_auto worldViewProj worldviewproj_matrix
+ }
+
+ // Fragment program
+ fragment_program_ref Examples/OffsetMappingFP
+ {
+ param_named_auto lightDiffuse light_diffuse_colour 0
+ param_named_auto lightSpecular light_specular_colour 0
+ // Parallax Height scale and bias
+ param_named scaleBias float4 0.04 -0.02 1 0
+ }
+
+ // Normal + height(alpha) map
+ texture_unit
+ {
+ texture IslandNH.tga
+ tex_coord_set 0
+ }
+
+ // Base diffuse texture map
+ texture_unit
+ {
+ texture Island.tga
+ tex_coord_set 1
+ }
+ }
+ }
+}
Added: trunk/python-ogre/demos/hydrax/media/materials/scripts/SkyBox.material
===================================================================
--- trunk/python-ogre/demos/hydrax/media/materials/scripts/SkyBox.material (rev 0)
+++ trunk/python-ogre/demos/hydrax/media/materials/scripts/SkyBox.material 2008-08-15 10:44:11 UTC (rev 689)
@@ -0,0 +1,107 @@
+material Sky/Evening
+{
+ technique
+ {
+ pass
+ {
+ lighting off
+ depth_write off
+
+ texture_unit
+ {
+ cubic_texture evening.jpg separateUV
+ tex_address_mode clamp
+ }
+ }
+ }
+}
+
+material Sky/EarlyMorning
+{
+ technique
+ {
+ pass
+ {
+ lighting off
+ depth_write off
+
+ texture_unit
+ {
+ cubic_texture early_morning.jpg separateUV
+ tex_address_mode clamp
+ }
+ }
+ }
+}
+
+material Sky/Morning
+{
+ technique
+ {
+ pass
+ {
+ lighting off
+ depth_write off
+
+ texture_unit
+ {
+ cubic_texture morning.jpg separateUV
+ tex_address_mode clamp
+ }
+ }
+ }
+}
+
+material Sky/Stormy
+{
+ technique
+ {
+ pass
+ {
+ lighting off
+ depth_write off
+
+ texture_unit
+ {
+ cubic_texture stormy.jpg separateUV
+ tex_address_mode clamp
+ }
+ }
+ }
+}
+
+material Sky/ClubTropicana
+{
+ technique
+ {
+ pass
+ {
+ lighting off
+ depth_write off
+
+ texture_unit
+ {
+ cubic_texture ct.png separateUV
+ tex_address_mode clamp
+ }
+ }
+ }
+}
+
+material Sky/Clouds
+{
+ technique
+ {
+ pass
+ {
+ lighting off
+ depth_write off
+
+ texture_unit
+ {
+ cubic_texture clouds.png separateUV
+ tex_address_mode clamp
+ }
+ }
+ }
+}
Property changes on: trunk/python-ogre/demos/hydrax/media/materials/textures/Island.tga
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Property changes on: trunk/python-ogre/demos/hydrax/media/materials/textures/IslandNH.tga
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Property changes on: trunk/python-ogre/demos/hydrax/media/models/Island.mesh
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Property changes on: trunk/python-ogre/demos/hydrax/media/packs/OgreCore.zip
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Property changes on: trunk/python-ogre/demos/hydrax/media/packs/SkyBoxes.zip
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: trunk/python-ogre/environment.py
===================================================================
--- trunk/python-ogre/environment.py 2008-08-15 08:08:10 UTC (rev 688)
+++ trunk/python-ogre/environment.py 2008-08-15 10:44:11 UTC (rev 689)
@@ -1632,19 +1632,15 @@
name='hydrax'
parent="ogre/addons"
cflags = ""
- try:
- include_dirs = [ Config.PATH_Boost,
- Config.PATH_hydrax
- , Config.PATH_INCLUDE_Ogre
- ]
- lib_dirs = [Config.PATH_LIB_Boost,
- Config.PATH_LIB_hydrax,
- Config.PATH_LIB_Ogre_OgreMain
+ include_dirs = [ Config.PATH_Boost,
+ Config.PATH_INCLUDE_hydrax
+ , Config.PATH_INCLUDE_Ogre
]
- except:
- pass
+ lib_dirs = [Config.PATH_LIB_Boost,
+ Config.PATH_LIB_Ogre_OgreMain
+ ]
CheckIncludes=[]
- libs=[ boost.lib, 'OgreMain', 'hydrax' ]
+ libs=[ boost.lib, 'OgreMain' ]
ModuleName="hydrax"
############################################################################################
@@ -1686,6 +1682,7 @@
, 'cadunetree' : cadunetree
,'opensteer' : opensteer
,'ogrepcz' : ogrepcz
+ , 'hydrax' : hydrax
}
#
Added: trunk/python-ogre/packages_2.5/ogre/addons/hydrax/__init__.py
===================================================================
--- trunk/python-ogre/packages_2.5/ogre/addons/hydrax/__init__.py (rev 0)
+++ trunk/python-ogre/packages_2.5/ogre/addons/hydrax/__init__.py 2008-08-15 10:44:11 UTC (rev 689)
@@ -0,0 +1 @@
+from _hydrax_ import *
Modified: trunk/python-ogre/setup.py
===================================================================
--- trunk/python-ogre/setup.py 2008-08-15 08:08:10 UTC (rev 688)
+++ trunk/python-ogre/setup.py 2008-08-15 10:44:11 UTC (rev 689)
@@ -72,7 +72,7 @@
'ogre.addons.ogreforests', 'ogre.addons.et', 'ogre.addons.caelum',
'ogre.addons.noise', 'ogre.addons.watermesh', 'ogre.addons.ofusion',
'ogre.addons.particleuniverse', 'ogre.addons.cadunetree',
- 'ogre.renderer.ogrepcz' ],
+ 'ogre.renderer.ogrepcz', 'ogre.addons.hydrax' ],
"package_dir": {'': 'packages_'+ PythonVersionString },
"package_data": {'': ['*.pyd', '*.dll', '*.so']}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|