You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(3) |
Sep
(30) |
Oct
(60) |
Nov
(17) |
Dec
(47) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(33) |
Feb
(18) |
Mar
(3) |
Apr
(5) |
May
(6) |
Jun
(34) |
Jul
(54) |
Aug
(33) |
Sep
(36) |
Oct
(33) |
Nov
(40) |
Dec
(6) |
2009 |
Jan
(37) |
Feb
(38) |
Mar
(31) |
Apr
(23) |
May
(24) |
Jun
(2) |
Jul
(6) |
Aug
(5) |
Sep
(1) |
Oct
(14) |
Nov
(12) |
Dec
(26) |
2010 |
Jan
(23) |
Feb
(17) |
Mar
(17) |
Apr
(2) |
May
(10) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
(3) |
Nov
|
Dec
(2) |
2011 |
Jan
(4) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(4) |
Nov
|
Dec
|
From: <and...@us...> - 2008-03-15 00:25:13
|
Revision: 580 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=580&view=rev Author: andy_miller Date: 2008-03-14 17:25:20 -0700 (Fri, 14 Mar 2008) Log Message: ----------- Further 1.2 updates Modified Paths: -------------- trunk/python-ogre/ThirdParty/caelum/CaelumPrerequisites.h trunk/python-ogre/ThirdParty/caelum/GroundFog.cpp trunk/python-ogre/ThirdParty/caelum/LayeredClouds.cpp trunk/python-ogre/ThirdParty/caelum/SkyDome.cpp trunk/python-ogre/ThirdParty/caelum/SkyDome.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIExportDLL.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIList.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIManager.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIManager.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIPanel.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIRadioButtonGroup.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIRadioButtonGroup.h trunk/python-ogre/ThirdParty/quickgui/QuickGUISheet.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUISheet.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIText.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIText.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIWidget.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIWidget.h trunk/python-ogre/demos/caelum/media/GroundFog.program trunk/python-ogre/demos/caelum/media/Haze.program trunk/python-ogre/demos/caelum/media/LayeredClouds.material trunk/python-ogre/demos/nxogre/Demo_101.py Modified: trunk/python-ogre/ThirdParty/caelum/CaelumPrerequisites.h =================================================================== --- trunk/python-ogre/ThirdParty/caelum/CaelumPrerequisites.h 2008-03-09 11:11:30 UTC (rev 579) +++ trunk/python-ogre/ThirdParty/caelum/CaelumPrerequisites.h 2008-03-15 00:25:20 UTC (rev 580) @@ -24,20 +24,20 @@ // Include external headers #include "Ogre.h" -// // Define the dll export qualifier if compiling for Windows -// #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32 -// #ifdef CAELUM_LIB -// #define DllExport __declspec (dllexport) -// #else -// #ifdef __MINGW32__ -// #define DllExport -// #else -// #define DllExport __declspec (dllimport) -// #endif -// #endif -// #else +// Define the dll export qualifier if compiling for Windows +// // #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32 +// // #ifdef CAELUM_LIB +// // #define DllExport __declspec (dllexport) +// // #else +// // #ifdef __MINGW32__ +// // #define DllExport +// // #else +// // #define DllExport __declspec (dllimport) +// // #endif +// // #endif +// // #else #define DllExport -// #endif +// // #endif // Define the version code #define CAELUM_VERSION_MAIN 0 Modified: trunk/python-ogre/ThirdParty/caelum/GroundFog.cpp =================================================================== --- trunk/python-ogre/ThirdParty/caelum/GroundFog.cpp 2008-03-09 11:11:30 UTC (rev 579) +++ trunk/python-ogre/ThirdParty/caelum/GroundFog.cpp 2008-03-15 00:25:20 UTC (rev 580) @@ -64,6 +64,8 @@ } GroundFog::~GroundFog() { + // Disable passes. + setDensity(0); mDomeNode->detachObject(mDomeEntity); mScene->destroyEntity(mDomeEntity); mDomeEntity = 0; Modified: trunk/python-ogre/ThirdParty/caelum/LayeredClouds.cpp =================================================================== --- trunk/python-ogre/ThirdParty/caelum/LayeredClouds.cpp 2008-03-09 11:11:30 UTC (rev 579) +++ trunk/python-ogre/ThirdParty/caelum/LayeredClouds.cpp 2008-03-15 00:25:20 UTC (rev 580) @@ -160,10 +160,10 @@ void LayeredClouds::setCloudBlendTime(const Ogre::Real cloudBlendTime) { static const Ogre::String animTextures1[4] = { - "Noise1.png", "Noise2.png", "Noise3.png", "Noise4.png" + "noise1.png", "noise2.png", "noise3.png", "noise4.png" }; static const Ogre::String animTextures2[4] = { - "Noise2.png", "Noise3.png", "Noise4.png", "Noise1.png" + "noise2.png", "noise3.png", "noise4.png", "noise1.png" }; Ogre::Pass* pass = mMaterial->getBestTechnique()->getPass(0); Modified: trunk/python-ogre/ThirdParty/caelum/SkyDome.cpp =================================================================== --- trunk/python-ogre/ThirdParty/caelum/SkyDome.cpp 2008-03-09 11:11:30 UTC (rev 579) +++ trunk/python-ogre/ThirdParty/caelum/SkyDome.cpp 2008-03-15 00:25:20 UTC (rev 580) @@ -82,19 +82,21 @@ } void SkyDome::setLightAbsorption (float absorption) const { - if (absorption > 1) + if (absorption > 1) { absorption = 1; - else if (absorption < 0) + } else if (absorption < 0) { absorption = 0; + } - Ogre::GpuProgramParametersSharedPtr vpParams = - mMaterial->getBestTechnique()->getPass(0)->getVertexProgramParameters(); + Ogre::GpuProgramParametersSharedPtr vpParams = + mMaterial->getBestTechnique()->getPass(0)->getVertexProgramParameters(); vpParams->setNamedConstant ("lightAbsorption", absorption); } void SkyDome::setLightScattering (float scattering) const { - if (scattering <= 0) + if (scattering <= 0) { scattering = 0.00001; + } Ogre::GpuProgramParametersSharedPtr fpParams = mMaterial->getBestTechnique()->getPass(0)->getFragmentProgramParameters(); @@ -160,23 +162,42 @@ pass->setLightingEnabled (false); pass->setFog (true); - // Bind fragment program. + // Create fragment programs(s) if (Ogre::Root::getSingleton ().getRenderSystem ()->getCapabilities ()->hasCapability (Ogre::RSC_FRAGMENT_PROGRAM)) { - Ogre::HighLevelGpuProgramPtr fp = Ogre::HighLevelGpuProgramManager::getSingleton().createProgram ("SkyDomeFP", RESOURCE_GROUP_NAME, "cg", Ogre::GPT_FRAGMENT_PROGRAM); - fp->setSourceFile ("CaelumShaders.cg"); + Ogre::HighLevelGpuProgramPtr fp; + + fp = Ogre::HighLevelGpuProgramManager::getSingleton().createProgram ( + "SkyDomeFP", RESOURCE_GROUP_NAME, "cg", Ogre::GPT_FRAGMENT_PROGRAM); + fp->setSourceFile ("CaelumSkyDome.cg"); fp->setParameter ("entry_point", "SkyDome_fp"); + fp->setParameter("compile_arguments", "-DHAZE=1"); fp->setParameter ("profiles", "ps_2_0 arbfp1"); - pass->setFragmentProgram ("SkyDomeFP"); + + fp = Ogre::HighLevelGpuProgramManager::getSingleton().createProgram ( + "SkyDomeFP_NoHaze", RESOURCE_GROUP_NAME, "cg", Ogre::GPT_FRAGMENT_PROGRAM); + fp->setSourceFile ("CaelumSkyDome.cg"); + fp->setParameter ("entry_point", "SkyDome_fp"); + fp->setParameter ("compile_arguments", "-DHAZE=0"); + fp->setParameter ("profiles", "ps_2_0 arbfp1"); + } + + // Bind fragment program. + if (Ogre::Root::getSingleton ().getRenderSystem ()->getCapabilities ()->hasCapability (Ogre::RSC_FRAGMENT_PROGRAM)) { + // Haze enabled by default. + mHazeEnabled = true; + pass->setFragmentProgram ("SkyDomeFP"); Ogre::GpuProgramParametersSharedPtr parameters = pass->getFragmentProgramParameters(); parameters->setIgnoreMissingParams(true); parameters->setNamedConstant ("offset", 0.0f); parameters->setNamedAutoConstant ("hazeColour", Ogre::GpuProgramParameters::ACT_FOG_COLOUR); - } + } else { + mHazeEnabled = false; + } // Bind vertex program. if (Ogre::Root::getSingleton ().getRenderSystem ()->getCapabilities ()->hasCapability (Ogre::RSC_VERTEX_PROGRAM)) { Ogre::HighLevelGpuProgramPtr vp = Ogre::HighLevelGpuProgramManager::getSingleton().createProgram ("SkyDomeVP", RESOURCE_GROUP_NAME, "cg", Ogre::GPT_VERTEX_PROGRAM); - vp->setSourceFile ("CaelumShaders.cg"); + vp->setSourceFile ("CaelumSkyDome.cg"); vp->setParameter ("entry_point", "SkyDome_vp"); vp->setParameter ("profiles", "vs_2_0 arbvp1"); pass->setVertexProgram ("SkyDomeVP"); @@ -202,6 +223,7 @@ } else { mMaterial = static_cast<Ogre::MaterialPtr>(Ogre::MaterialManager::getSingleton ().getByName (SKY_DOME_MATERIAL_NAME)); } + LOG ("DONE"); } @@ -224,4 +246,26 @@ LOG ("DONE"); } +bool SkyDome::getHazeEnabled () const { + return mHazeEnabled; +} + +void SkyDome::setHazeEnabled (bool value) { + if (mHazeEnabled == value) { + return; + } + mHazeEnabled = value; + + Ogre::Pass *pass = mMaterial->getTechnique (0)->getPass (0); + if (value) { + pass->setFragmentProgram("SkyDomeFP"); + } else { + pass->setFragmentProgram("SkyDomeFP_NoHaze"); + } + Ogre::GpuProgramParametersSharedPtr params = pass->getFragmentProgramParameters(); + params->setIgnoreMissingParams(true); + params->setNamedConstant ("offset", 0.0f); + params->setNamedAutoConstant ("hazeColour", Ogre::GpuProgramParameters::ACT_FOG_COLOUR); +} + } // namespace caelum Modified: trunk/python-ogre/ThirdParty/caelum/SkyDome.h =================================================================== --- trunk/python-ogre/ThirdParty/caelum/SkyDome.h 2008-03-09 11:11:30 UTC (rev 579) +++ trunk/python-ogre/ThirdParty/caelum/SkyDome.h 2008-03-15 00:25:20 UTC (rev 580) @@ -48,6 +48,9 @@ /// Reference to the sky dome material. Ogre::MaterialPtr mMaterial; + /// If haze is enabled. + bool mHazeEnabled; + // Methods -------------------------------------------------------------------- public: /** Constructor @@ -86,6 +89,12 @@ /// Set the atmosphere depthh gradient image. void setAtmosphereDepthImage (const Ogre::String& gradients); + /// If skydome haze is enabled. + bool getHazeEnabled () const; + + /// Enable or disable skydome haze. This makes the sky darker. + void setHazeEnabled (bool value); + private: /** Internal method to create the sky dome material. * @throws UnsupportedException if the material isn't supported. Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIExportDLL.h =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIExportDLL.h 2008-03-09 11:11:30 UTC (rev 579) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIExportDLL.h 2008-03-15 00:25:20 UTC (rev 580) @@ -3,7 +3,7 @@ #include "OgrePlatform.h" -// #ifndef _QuickGUIExport +#ifndef _QuickGUIExport // #if defined(OGRE_PLATFORM) // #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32 && !defined ( __MINGW32__ ) // # if defined( QUICKGUI_EXPORTS ) @@ -18,5 +18,5 @@ #define _QuickGUIExport // #endif -// #endif #endif +#endif Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIList.cpp =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIList.cpp 2008-03-09 11:11:30 UTC (rev 579) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIList.cpp 2008-03-15 00:25:20 UTC (rev 580) @@ -51,7 +51,6 @@ Size s(mSize.width,mItemHeight); std::string name = mInstanceName + ".Item" + Ogre::StringConverter::toString(counter); - mGUIManager->notifyNameUsed(name); MenuLabel* newMenuLabel = dynamic_cast<MenuLabel*>(_createChild(mInstanceName+".ChildMenuLabel" + Ogre::StringConverter::toString(mItems.size()),TYPE_MENULABEL)); newMenuLabel->setSize(s); @@ -73,7 +72,6 @@ Size s(mSize.width,mItemHeight); std::string name = mInstanceName+".Item"+Ogre::StringConverter::toString(counter); - mGUIManager->notifyNameUsed(name); TextBox* newTextBox = dynamic_cast<TextBox*>(_createChild(mInstanceName+".ChildTextBox" + Ogre::StringConverter::toString(mItems.size()),TYPE_TEXTBOX)); newTextBox->setSize(s); Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIManager.cpp =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIManager.cpp 2008-03-09 11:11:30 UTC (rev 579) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIManager.cpp 2008-03-15 00:25:20 UTC (rev 580) @@ -25,8 +25,6 @@ { mSkinSetManager = SkinSetManager::getSingletonPtr(); - mWidgetNames.clear(); - for(int i = 0; i < NUM_MOUSE_BUTTONS; ++i) { mMouseButtonDown[i] = NULL; @@ -106,7 +104,6 @@ void GUIManager::clearAll() { - mWidgetNames.clear(); mMouseButtonDown[0] = NULL; mMouseButtonDown[1] = NULL; @@ -148,16 +145,29 @@ Sheet* GUIManager::createSheet() { - return createSheet(generateName(Widget::TYPE_SHEET)); + return createSheet(generateSheetName(),Size(mViewport->getActualWidth(),mViewport->getActualHeight())); } + Sheet* GUIManager::createSheet(Size initialSize) + { + return createSheet(generateSheetName(),initialSize); + } + Sheet* GUIManager::createSheet(const std::string& name) { - if(!isNameUnique(name)) - throw Ogre::Exception(Ogre::Exception::ERR_DUPLICATE_ITEM,"Name \"" + name + "\" is already used!","GUIManager::createSheet"); + return createSheet(name,Size(mViewport->getActualWidth(),mViewport->getActualHeight())); + } - notifyNameUsed(name); - Sheet* newSheet = new Sheet(name,mDefaultSkin,this); + Sheet* GUIManager::createSheet(const std::string& name, Size initialSize) + { + std::list<Sheet*>::const_iterator it; + for (it = mSheets.begin(); it != mSheets.end(); ++it) + { + if (name == (*it)->getInstanceName()) // if there is a sheet with the same name + throw Ogre::Exception(Ogre::Exception::ERR_DUPLICATE_ITEM,"Name \"" + name + "\" is already used!","GUIManager::createSheet"); + } + + Sheet* newSheet = new Sheet(name,initialSize,mDefaultSkin,this); mSheets.push_back(newSheet); return newSheet; @@ -287,43 +297,30 @@ mActiveEffects.push_back(e); } - std::string GUIManager::generateName(Widget::Type t) + std::string GUIManager::generateSheetName() { - std::string s; - switch(t) + std::string name = "Sheet"; + + int counter = 1; + int beginCounter = 0; + + std::list<Sheet*>::const_iterator it; + while (beginCounter != counter) { - case Widget::TYPE_BORDER: s = "Border"; break; - case Widget::TYPE_BUTTON: s = "Button"; break; - case Widget::TYPE_CHECKBOX: s = "CheckBox"; break; - case Widget::TYPE_COMBOBOX: s = "ComboBox"; break; - case Widget::TYPE_CONSOLE: s = "Console"; break; - case Widget::TYPE_IMAGE: s = "Image"; break; - case Widget::TYPE_LABEL: s = "Label"; break; - case Widget::TYPE_LIST: s = "List"; break; - case Widget::TYPE_MENULABEL: s = "MenuLabel"; break; - case Widget::TYPE_LABELAREA: s = "LabelArea"; break; - case Widget::TYPE_TEXTAREA: s = "TextArea"; break; - case Widget::TYPE_NSTATEBUTTON: s = "NStateButton"; break; - case Widget::TYPE_PANEL: s = "Panel"; break; - case Widget::TYPE_PROGRESSBAR: s = "ProgressBar"; break; - case Widget::TYPE_RADIOBUTTON: s = "RadioButton"; break; - case Widget::TYPE_SCROLL_PANE: s = "ScrollPane"; break; - case Widget::TYPE_SCROLLBAR_HORIZONTAL: s = "HScrollBar"; break; - case Widget::TYPE_SCROLLBAR_VERTICAL: s = "VScrollBar"; break; - case Widget::TYPE_SHEET: s = "Sheet"; break; - case Widget::TYPE_TEXTBOX: s = "TextBox"; break; - case Widget::TYPE_TITLEBAR: s = "TitleBar"; break; - case Widget::TYPE_TRACKBAR_HORIZONTAL: s = "HTrackBar"; break; - case Widget::TYPE_TRACKBAR_VERTICAL: s = "VTrackBar"; break; - case Widget::TYPE_WINDOW: s = "Window"; break; - default: s = "Widget"; break; + beginCounter = counter; + for (it = mSheets.begin(); it != mSheets.end(); ++it) + { + if (name == (*it)->getInstanceName()) // if there is a sheet with the same name + { + name = name + Ogre::StringConverter::toString(counter); + counter++; + break; + } + } } - int counter = 1; - while( !isNameUnique(s + Ogre::StringConverter::toString(counter)) ) - ++counter; - return (s + Ogre::StringConverter::toString(counter)); + return name; } bool GUIManager::injectChar(Ogre::UTFString::unicode_char c) @@ -481,7 +478,13 @@ // If the MouseButton was not pressed on this widget, do not register the button being released on the widget if( mWidgetContainingMouse != mActiveWidget ) - return mActiveWidget->fireEvent(Widget::EVENT_LOSE_FOCUS,args); + { + // If it is a textbox, don't lose focus, just fire a mouse button up event + if( mActiveWidget->getWidgetType() == Widget::TYPE_TEXTBOX ) + return mActiveWidget->fireEvent(Widget::EVENT_MOUSE_BUTTON_UP,args); + else + return mActiveWidget->fireEvent(Widget::EVENT_LOSE_FOCUS,args); + } // after this point, we know that the user had mouse button down on this widget, and is now doing mouse button up @@ -675,31 +678,6 @@ return ((mKeyModifiers & k) > 0); } - bool GUIManager::isNameUnique(const std::string& name) - { - if(name.empty()) - return false; - - return (mWidgetNames.find(name) == mWidgetNames.end()); - } - - void GUIManager::notifyNameFree(const std::string& name) - { - std::set<std::string>::iterator it = mWidgetNames.find(name); - if( it == mWidgetNames.end() ) - return; - - mWidgetNames.erase(it); - } - - void GUIManager::notifyNameUsed(const std::string& name) - { - if(!isNameUnique(name)) - return; - - mWidgetNames.insert(name); - } - void GUIManager::registerTimeListener(Widget* w) { if(w == NULL) @@ -761,6 +739,7 @@ return; mActiveSheet = s; + mActiveSheet->setSize(mViewport->getActualWidth(),mViewport->getActualHeight()); MouseEventArgs args(mWidgetContainingMouse); args.position = mMouseCursor->getPosition(); Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIManager.h =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIManager.h 2008-03-09 11:11:30 UTC (rev 579) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIManager.h 2008-03-15 00:25:20 UTC (rev 580) @@ -63,7 +63,9 @@ void clearAll(); Sheet* createSheet(); + Sheet* createSheet(Size initialSize); Sheet* createSheet(const std::string& name); + Sheet* createSheet(const std::string& name, Size initialSize); /** Destroys a Window and all child widgets that exist @param @@ -121,8 +123,6 @@ */ Sheet* getSheet(const std::string& name); - std::string generateName(Widget::Type t); - /** * Useful for Text Input Widgets, like the TextBox */ @@ -145,15 +145,7 @@ void injectTime(float time); bool isKeyModifierDown(KeyModifier k); - /** - * Checks if the desired widget name already exists. If it already exists, - * false is returned. - */ - bool isNameUnique(const std::string& name); - void notifyNameFree(const std::string& name); - void notifyNameUsed(const std::string& name); - void registerTimeListener(Widget* w); virtual void renderQueueStarted(Ogre::uint8 id, const std::string& invocation, bool& skipThisQueue); @@ -197,6 +189,8 @@ void unregisterTimeListener(Widget* w); protected: + std::string generateSheetName(); + std::string mName; // Viewport which renders all widgets belonging to this manager. Ogre::Viewport* mViewport; @@ -210,8 +204,6 @@ MouseCursor* mMouseCursor; - std::set<std::string> mWidgetNames; - // range of supported codepoints used for injectChar function. std::set<Ogre::UTFString::code_point> mSupportedCodePoints; Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIPanel.cpp =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIPanel.cpp 2008-03-09 11:11:30 UTC (rev 579) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIPanel.cpp 2008-03-15 00:25:20 UTC (rev 580) @@ -34,13 +34,15 @@ mScrollPane->removeChild(mScrollPane->mRightBar); // store reference to the scroll bar mRightScrollBar = mScrollPane->mRightBar; - addChild(mRightScrollBar); + mComponents.push_back(mRightScrollBar); + mRightScrollBar->setParent(this); mRightScrollBar->setPosition(mSize.width - 20,0); mScrollPane->removeChild(mScrollPane->mBottomBar); // store reference to the scroll bar mBottomScrollBar = mScrollPane->mBottomBar; - addChild(mBottomScrollBar); + mComponents.push_back(mBottomScrollBar); + mBottomScrollBar->setParent(this); mBottomScrollBar->setPosition(0,mSize.height - 20); } @@ -104,6 +106,9 @@ if(w->getParentWidget() != NULL) return; + if(!isNameUnique(w->getInstanceName())) + throw Ogre::Exception(Ogre::Exception::ERR_DUPLICATE_ITEM,"A widget with name \"" + w->getInstanceName() + "\" already exists in " + getInstanceName(),"Panel::addChild"); + mChildWidgets.push_back(w); w->setParent(this); @@ -126,272 +131,253 @@ Tree* Panel::createTree(const std::string& name) { - if(mGUIManager->isNameUnique(name)) + if(isNameUnique(name)) { - mGUIManager->notifyNameUsed(name); return dynamic_cast<Tree*>(_createChild(name,TYPE_TREE)); } else { - std::string name = mGUIManager->generateName(TYPE_TREE); - mGUIManager->notifyNameUsed(name); + std::string name = generateName(TYPE_TREE); return dynamic_cast<Tree*>(_createChild(name,TYPE_TREE)); } } */ Button* Panel::createButton() { - return createButton(mGUIManager->generateName(TYPE_BUTTON)); + return createButton(generateName(TYPE_BUTTON)); } Button* Panel::createButton(const std::string& name) { - if(mGUIManager->isNameUnique(name)) + if(isNameUnique(name)) { - mGUIManager->notifyNameUsed(name); return dynamic_cast<Button*>(_createChild(name,TYPE_BUTTON)); } else { - throw Ogre::Exception(Ogre::Exception::ERR_DUPLICATE_ITEM,"A widget with name \"" + name + "\" already exists!","Panel::createButton"); - std::string name = mGUIManager->generateName(TYPE_BUTTON); - mGUIManager->notifyNameUsed(name); - return dynamic_cast<Button*>(_createChild(name,TYPE_BUTTON)); + throw Ogre::Exception(Ogre::Exception::ERR_DUPLICATE_ITEM,"A widget with name \"" + name + "\" already exists in " + getInstanceName(),"Panel::createButton"); } } CheckBox* Panel::createCheckBox() { - return createCheckBox(mGUIManager->generateName(TYPE_CHECKBOX)); + return createCheckBox(generateName(TYPE_CHECKBOX)); } CheckBox* Panel::createCheckBox(const std::string& name) { - if(mGUIManager->isNameUnique(name)) + if(isNameUnique(name)) { - mGUIManager->notifyNameUsed(name); return dynamic_cast<CheckBox*>(_createChild(name,TYPE_CHECKBOX)); } else { - throw Ogre::Exception(Ogre::Exception::ERR_DUPLICATE_ITEM,"A widget with name \"" + name + "\" already exists!","Panel::createCheckBox"); + throw Ogre::Exception(Ogre::Exception::ERR_DUPLICATE_ITEM,"A widget with name \"" + name + "\" already exists in " + getInstanceName(),"Panel::createCheckBox"); } } ComboBox* Panel::createComboBox() { - return createComboBox(mGUIManager->generateName(TYPE_COMBOBOX)); + return createComboBox(generateName(TYPE_COMBOBOX)); } ComboBox* Panel::createComboBox(const std::string& name) { - if(mGUIManager->isNameUnique(name)) + if(isNameUnique(name)) { - mGUIManager->notifyNameUsed(name); return dynamic_cast<ComboBox*>(_createChild(name,TYPE_COMBOBOX)); } else { - throw Ogre::Exception(Ogre::Exception::ERR_DUPLICATE_ITEM,"A widget with name \"" + name + "\" already exists!","Panel::createComboBox"); + throw Ogre::Exception(Ogre::Exception::ERR_DUPLICATE_ITEM,"A widget with name \"" + name + "\" already exists in " + getInstanceName(),"Panel::createComboBox"); } } Console* Panel::createConsole() { - return createConsole(mGUIManager->generateName(TYPE_CONSOLE)); + return createConsole(generateName(TYPE_CONSOLE)); } Console* Panel::createConsole(const std::string& name) { - if(mGUIManager->isNameUnique(name)) + if(isNameUnique(name)) { - mGUIManager->notifyNameUsed(name); return dynamic_cast<Console*>(_createChild(name,TYPE_CONSOLE)); } else { - throw Ogre::Exception(Ogre::Exception::ERR_DUPLICATE_ITEM,"A widget with name \"" + name + "\" already exists!","Panel::createConsole"); + throw Ogre::Exception(Ogre::Exception::ERR_DUPLICATE_ITEM,"A widget with name \"" + name + "\" already exists in " + getInstanceName(),"Panel::createConsole"); } } HorizontalScrollBar* Panel::createHorizontalScrollBar() { - return createHorizontalScrollBar(mGUIManager->generateName(TYPE_SCROLLBAR_HORIZONTAL)); + return createHorizontalScrollBar(generateName(TYPE_SCROLLBAR_HORIZONTAL)); } HorizontalScrollBar* Panel::createHorizontalScrollBar(const std::string& name) { - if(mGUIManager->isNameUnique(name)) + if(isNameUnique(name)) { - mGUIManager->notifyNameUsed(name); return dynamic_cast<HorizontalScrollBar*>(_createChild(name,TYPE_SCROLLBAR_HORIZONTAL)); } else { - throw Ogre::Exception(Ogre::Exception::ERR_DUPLICATE_ITEM,"A widget with name \"" + name + "\" already exists!","Panel::createHorizontalScrollBar"); + throw Ogre::Exception(Ogre::Exception::ERR_DUPLICATE_ITEM,"A widget with name \"" + name + "\" already exists in " + getInstanceName(),"Panel::createHorizontalScrollBar"); } } HorizontalTrackBar* Panel::createHorizontalTrackBar() { - return createHorizontalTrackBar(mGUIManager->generateName(TYPE_TRACKBAR_HORIZONTAL)); + return createHorizontalTrackBar(generateName(TYPE_TRACKBAR_HORIZONTAL)); } HorizontalTrackBar* Panel::createHorizontalTrackBar(const std::string& name) { - if(mGUIManager->isNameUnique(name)) + if(isNameUnique(name)) { - mGUIManager->notifyNameUsed(name); return dynamic_cast<HorizontalTrackBar*>(_createChild(name,TYPE_TRACKBAR_HORIZONTAL)); } else { - throw Ogre::Exception(Ogre::Exception::ERR_DUPLICATE_ITEM,"A widget with name \"" + name + "\" already exists!","Panel::createHorizontalTrackBar"); + throw Ogre::Exception(Ogre::Exception::ERR_DUPLICATE_ITEM,"A widget with name \"" + name + "\" already exists in " + getInstanceName(),"Panel::createHorizontalTrackBar"); } } Image* Panel::createImage() { - return createImage(mGUIManager->generateName(TYPE_IMAGE)); + return createImage(generateName(TYPE_IMAGE)); } Image* Panel::createImage(const std::string& name) { - if(mGUIManager->isNameUnique(name)) + if(isNameUnique(name)) { - mGUIManager->notifyNameUsed(name); return dynamic_cast<Image*>(_createChild(name,TYPE_IMAGE)); } else { - throw Ogre::Exception(Ogre::Exception::ERR_DUPLICATE_ITEM,"A widget with name \"" + name + "\" already exists!","Panel::createImage"); + throw Ogre::Exception(Ogre::Exception::ERR_DUPLICATE_ITEM,"A widget with name \"" + name + "\" already exists in " + getInstanceName(),"Panel::createImage"); } } Label* Panel::createLabel() { - return createLabel(mGUIManager->generateName(TYPE_LABEL)); + return createLabel(generateName(TYPE_LABEL)); } Label* Panel::createLabel(const std::string& name) { - if(mGUIManager->isNameUnique(name)) + if(isNameUnique(name)) { - mGUIManager->notifyNameUsed(name); return dynamic_cast<Label*>(_createChild(name,TYPE_LABEL)); } else { - throw Ogre::Exception(Ogre::Exception::ERR_DUPLICATE_ITEM,"A widget with name \"" + name + "\" already exists!","Panel::createLabel"); + throw Ogre::Exception(Ogre::Exception::ERR_DUPLICATE_ITEM,"A widget with name \"" + name + "\" already exists in " + getInstanceName(),"Panel::createLabel"); } } List* Panel::createList() { - return createList(mGUIManager->generateName(TYPE_LIST)); + return createList(generateName(TYPE_LIST)); } List* Panel::createList(const std::string& name) { - if(mGUIManager->isNameUnique(name)) + if(isNameUnique(name)) { - mGUIManager->notifyNameUsed(name); return dynamic_cast<List*>(_createChild(name,TYPE_LIST)); } else { - throw Ogre::Exception(Ogre::Exception::ERR_DUPLICATE_ITEM,"A widget with name \"" + name + "\" already exists!","Panel::createList"); + throw Ogre::Exception(Ogre::Exception::ERR_DUPLICATE_ITEM,"A widget with name \"" + name + "\" already exists in " + getInstanceName(),"Panel::createList"); } } LabelArea* Panel::createLabelArea() { - return createLabelArea(mGUIManager->generateName(TYPE_LABELAREA)); + return createLabelArea(generateName(TYPE_LABELAREA)); } LabelArea* Panel::createLabelArea(const std::string& name) { - if(mGUIManager->isNameUnique(name)) + if(isNameUnique(name)) { - mGUIManager->notifyNameUsed(name); return dynamic_cast<LabelArea*>(_createChild(name,TYPE_LABELAREA)); } else { - throw Ogre::Exception(Ogre::Exception::ERR_DUPLICATE_ITEM,"A widget with name \"" + name + "\" already exists!","Panel::createLabelArea"); + throw Ogre::Exception(Ogre::Exception::ERR_DUPLICATE_ITEM,"A widget with name \"" + name + "\" already exists in " + getInstanceName(),"Panel::createLabelArea"); } } NStateButton* Panel::createNStateButton() { - return createNStateButton(mGUIManager->generateName(TYPE_NSTATEBUTTON)); + return createNStateButton(generateName(TYPE_NSTATEBUTTON)); } NStateButton* Panel::createNStateButton(const std::string& name) { - if(mGUIManager->isNameUnique(name)) + if(isNameUnique(name)) { - mGUIManager->notifyNameUsed(name); return dynamic_cast<NStateButton*>(_createChild(name,TYPE_NSTATEBUTTON)); } else { - throw Ogre::Exception(Ogre::Exception::ERR_DUPLICATE_ITEM,"A widget with name \"" + name + "\" already exists!","Panel::createNStateButton"); + throw Ogre::Exception(Ogre::Exception::ERR_DUPLICATE_ITEM,"A widget with name \"" + name + "\" already exists in " + getInstanceName(),"Panel::createNStateButton"); } } Panel* Panel::createPanel() { - return createPanel(mGUIManager->generateName(TYPE_PANEL)); + return createPanel(generateName(TYPE_PANEL)); } Panel* Panel::createPanel(const std::string& name) { - if(mGUIManager->isNameUnique(name)) + if(isNameUnique(name)) { - mGUIManager->notifyNameUsed(name); return dynamic_cast<Panel*>(_createChild(name,TYPE_PANEL)); } else { - throw Ogre::Exception(Ogre::Exception::ERR_DUPLICATE_ITEM,"A widget with name \"" + name + "\" already exists!","Panel::createPanel"); + throw Ogre::Exception(Ogre::Exception::ERR_DUPLICATE_ITEM,"A widget with name \"" + name + "\" already exists in " + getInstanceName(),"Panel::createPanel"); } } ProgressBar* Panel::createProgressBar() { - return createProgressBar(mGUIManager->generateName(TYPE_PROGRESSBAR)); + return createProgressBar(generateName(TYPE_PROGRESSBAR)); } ProgressBar* Panel::createProgressBar(const std::string& name) { - if(mGUIManager->isNameUnique(name)) + if(isNameUnique(name)) { - mGUIManager->notifyNameUsed(name); return dynamic_cast<ProgressBar*>(_createChild(name,TYPE_PROGRESSBAR)); } else { - throw Ogre::Exception(Ogre::Exception::ERR_DUPLICATE_ITEM,"A widget with name \"" + name + "\" already exists!","Panel::createProgressBar"); + throw Ogre::Exception(Ogre::Exception::ERR_DUPLICATE_ITEM,"A widget with name \"" + name + "\" already exists in " + getInstanceName(),"Panel::createProgressBar"); } } TextBox* Panel::createTextBox() { - return createTextBox(mGUIManager->generateName(TYPE_TEXTBOX)); + return createTextBox(generateName(TYPE_TEXTBOX)); } TextBox* Panel::createTextBox(const std::string& name) { TextBox* tb; - if(mGUIManager->isNameUnique(name)) + if(isNameUnique(name)) { - mGUIManager->notifyNameUsed(name); tb = dynamic_cast<TextBox*>(_createChild(name,TYPE_TEXTBOX)); } else { - throw Ogre::Exception(Ogre::Exception::ERR_DUPLICATE_ITEM,"A widget with name \"" + name + "\" already exists!","Panel::createTextBox"); + throw Ogre::Exception(Ogre::Exception::ERR_DUPLICATE_ITEM,"A widget with name \"" + name + "\" already exists in " + getInstanceName(),"Panel::createTextBox"); } tb->setUseBorders(true); @@ -402,37 +388,35 @@ VerticalScrollBar* Panel::createVerticalScrollBar() { - return createVerticalScrollBar(mGUIManager->generateName(TYPE_SCROLLBAR_VERTICAL)); + return createVerticalScrollBar(generateName(TYPE_SCROLLBAR_VERTICAL)); } VerticalScrollBar* Panel::createVerticalScrollBar(const std::string& name) { - if(mGUIManager->isNameUnique(name)) + if(isNameUnique(name)) { - mGUIManager->notifyNameUsed(name); return dynamic_cast<VerticalScrollBar*>(_createChild(name,TYPE_SCROLLBAR_VERTICAL)); } else { - throw Ogre::Exception(Ogre::Exception::ERR_DUPLICATE_ITEM,"A widget with name \"" + name + "\" already exists!","Panel::createVerticalScrollBar"); + throw Ogre::Exception(Ogre::Exception::ERR_DUPLICATE_ITEM,"A widget with name \"" + name + "\" already exists in " + getInstanceName(),"Panel::createVerticalScrollBar"); } } VerticalTrackBar* Panel::createVerticalTrackBar() { - return createVerticalTrackBar(mGUIManager->generateName(TYPE_TRACKBAR_VERTICAL)); + return createVerticalTrackBar(generateName(TYPE_TRACKBAR_VERTICAL)); } VerticalTrackBar* Panel::createVerticalTrackBar(const std::string& name) { - if(mGUIManager->isNameUnique(name)) + if(isNameUnique(name)) { - mGUIManager->notifyNameUsed(name); return dynamic_cast<VerticalTrackBar*>(_createChild(name,TYPE_TRACKBAR_VERTICAL)); } else { - throw Ogre::Exception(Ogre::Exception::ERR_DUPLICATE_ITEM,"A widget with name \"" + name + "\" already exists!","Panel::createVerticalTrackBar"); + throw Ogre::Exception(Ogre::Exception::ERR_DUPLICATE_ITEM,"A widget with name \"" + name + "\" already exists in " + getInstanceName(),"Panel::createVerticalTrackBar"); } } Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIRadioButtonGroup.cpp =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIRadioButtonGroup.cpp 2008-03-09 11:11:30 UTC (rev 579) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIRadioButtonGroup.cpp 2008-03-15 00:25:20 UTC (rev 580) @@ -16,21 +16,43 @@ RadioButton* RadioButtonGroup::createRadioButton() { - return createRadioButton(mOwner->getGUIManager()->generateName(Widget::TYPE_RADIOBUTTON)); + std::string name = "RadioButton"; + int counter = 1; + int beginCounter = 0; + while (beginCounter != counter ) + { + beginCounter = counter; + for(std::vector<RadioButton*>::iterator it = mRadioButtons.begin(); it != mRadioButtons.end(); ++it) + { + if((*it)->getInstanceName() == name) + { + name = name + Ogre::StringConverter::toString(counter); + counter++; + break; + } + } + } + return createRadioButton(name); } - RadioButton* RadioButtonGroup::createRadioButton(const std::string& name) + RadioButton* RadioButtonGroup::createRadioButton(std::string& name) { - GUIManager* gm = mOwner->getGUIManager(); - if(gm->isNameUnique(name)) + + int counter = 1; + int beginCounter = 0; + while (beginCounter != counter ) { - gm->notifyNameUsed(name); + beginCounter = counter; + for(std::vector<RadioButton*>::iterator it = mRadioButtons.begin(); it != mRadioButtons.end(); ++it) + { + if((*it)->getInstanceName() == name) + { + name = name + Ogre::StringConverter::toString(counter); + counter++; + break; + } + } } - else - { - std::string name = gm->generateName(Widget::TYPE_RADIOBUTTON); - gm->notifyNameUsed(name); - } RadioButton* rb = dynamic_cast<RadioButton*>(mOwner->_createChild(name,Widget::TYPE_RADIOBUTTON)); mRadioButtons.push_back(rb); Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIRadioButtonGroup.h =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIRadioButtonGroup.h 2008-03-09 11:11:30 UTC (rev 579) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIRadioButtonGroup.h 2008-03-15 00:25:20 UTC (rev 580) @@ -15,7 +15,7 @@ ~RadioButtonGroup(); RadioButton* createRadioButton(); - RadioButton* createRadioButton(const std::string& name); + RadioButton* createRadioButton(std::string& name); RadioButton* getSelectedRadioButton(); Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUISheet.cpp =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUISheet.cpp 2008-03-09 11:11:30 UTC (rev 579) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUISheet.cpp 2008-03-15 00:25:20 UTC (rev 580) @@ -8,7 +8,7 @@ namespace QuickGUI { - Sheet::Sheet(const std::string& name, const std::string& skinName, GUIManager* gm) : + Sheet::Sheet(const std::string& name, Size initialSize, const std::string& skinName, GUIManager* gm) : Panel(name,gm), mMaterialName("") { @@ -19,7 +19,7 @@ mSkinName = skinName; mSkinComponent = ".sheet"; mQuad->setClipMode(Quad::CLIPMODE_NONE); - setSize(gm->getViewportWidth(),gm->getViewportHeight()); + setSize(initialSize); Ogre::FontManager* fm = Ogre::FontManager::getSingletonPtr(); Ogre::ResourceManager::ResourceMapIterator rmi = fm->getResourceIterator(); @@ -39,20 +39,18 @@ Window* Sheet::createWindow() { - return createWindow(mGUIManager->generateName(TYPE_WINDOW)); + return createWindow(generateName(TYPE_WINDOW)); } Window* Sheet::createWindow(const std::string& name) { - if(mGUIManager->isNameUnique(name)) + if(isNameUnique(name)) { - mGUIManager->notifyNameUsed(name); return dynamic_cast<Window*>(_createChild(name,TYPE_WINDOW)); } else { - std::string name = mGUIManager->generateName(TYPE_WINDOW); - mGUIManager->notifyNameUsed(name); + std::string name = generateName(TYPE_WINDOW); return dynamic_cast<Window*>(_createChild(name,TYPE_WINDOW)); } } Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUISheet.h =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUISheet.h 2008-03-09 11:11:30 UTC (rev 579) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUISheet.h 2008-03-15 00:25:20 UTC (rev 580) @@ -60,7 +60,7 @@ @note If you want a transparent background, pass "" as the material. */ - Sheet(const std::string& name, const std::string &skinName, GUIManager* gm); + Sheet(const std::string& name, Size initialSize, const std::string &skinName, GUIManager* gm); virtual ~Sheet(); virtual void setHeight(float pixelHeight); Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIText.cpp =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIText.cpp 2008-03-09 11:11:30 UTC (rev 579) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIText.cpp 2008-03-15 00:25:20 UTC (rev 580) @@ -385,7 +385,7 @@ int Text::getTextIndex(const Point& pixelDimensions) { if(mCaption.length() <= 0) - return -1; + return -1; // check bounds if( pixelDimensions.x < mPixelDimensions.x ) @@ -407,7 +407,7 @@ return -1; } - int Text::getTextCursorIndex(const Point& pixelDimensions) + int Text::getTextCursorIndex(Point pixelDimensions) { if(mCaption.length() <= 0) return 0; @@ -418,6 +418,13 @@ else if( pixelDimensions.x > (mPixelDimensions.x + mPixelDimensions.width) ) return (static_cast<int>(mCharacters.size()) + 1); + // If mouse cursor is above text, select from top line + if( pixelDimensions.y < mPixelDimensions.y ) + pixelDimensions.y = mPixelDimensions.y + mCharacters[0]->getSize().height / 2; + // If mouse cursor is below text, select from bottom line + else if( pixelDimensions.y > mPixelDimensions.y + mPixelDimensions.height ) + pixelDimensions.y = mPixelDimensions.y + mPixelDimensions.height - mCharacters[0]->getSize().height / 2; + int textIndex = 0; QuadArray::iterator it; for( it = mCharacters.begin(); it != mCharacters.end(); ++it ) Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIText.h =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIText.h 2008-03-09 11:11:30 UTC (rev 579) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIText.h 2008-03-15 00:25:20 UTC (rev 580) @@ -115,7 +115,7 @@ * Each cursor location to the left and right of a character is a cursor index. * The cursor index to the left of character 0 is 0, for example. */ - int getTextCursorIndex(const Point& pixelPosition); + int getTextCursorIndex(Point pixelPosition); /* * Tests if the given rectangle intersects with any characters of the text caption. * Each cursor location to the left and right of a character is a cursor index. Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIWidget.cpp =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIWidget.cpp 2008-03-09 11:11:30 UTC (rev 579) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIWidget.cpp 2008-03-15 00:25:20 UTC (rev 580) @@ -85,8 +85,6 @@ ++index; } - // Remove name from GUIManager name list. (So another widget can be created with this name, if desired) - mGUIManager->notifyNameFree(mInstanceName); } void Widget::_applyAnchors() @@ -369,11 +367,65 @@ redraw(); } + bool Widget::isNameUnique(const std::string& name) const + { + WidgetArray::const_iterator it; + for (it = mChildWidgets.begin(); it != mChildWidgets.end(); ++it) + { + if ((*it)->getInstanceName() == name) + return false; + } + return true; + } + + std::string Widget::generateName(Widget::Type t) + { + std::string s; + switch(t) + { + case Widget::TYPE_BORDER: s = "Border"; break; + case Widget::TYPE_BUTTON: s = "Button"; break; + case Widget::TYPE_CHECKBOX: s = "CheckBox"; break; + case Widget::TYPE_COMBOBOX: s = "ComboBox"; break; + case Widget::TYPE_CONSOLE: s = "Console"; break; + case Widget::TYPE_IMAGE: s = "Image"; break; + case Widget::TYPE_LABEL: s = "Label"; break; + case Widget::TYPE_LIST: s = "List"; break; + case Widget::TYPE_MENULABEL: s = "MenuLabel"; break; + case Widget::TYPE_LABELAREA: s = "LabelArea"; break; + case Widget::TYPE_TEXTAREA: s = "TextArea"; break; + case Widget::TYPE_NSTATEBUTTON: s = "NStateButton"; break; + case Widget::TYPE_PANEL: s = "Panel"; break; + case Widget::TYPE_PROGRESSBAR: s = "ProgressBar"; break; + case Widget::TYPE_RADIOBUTTON: s = "RadioButton"; break; + case Widget::TYPE_SCROLL_PANE: s = "ScrollPane"; break; + case Widget::TYPE_SCROLLBAR_HORIZONTAL: s = "HScrollBar"; break; + case Widget::TYPE_SCROLLBAR_VERTICAL: s = "VScrollBar"; break; + case Widget::TYPE_TEXTBOX: s = "TextBox"; break; + case Widget::TYPE_TITLEBAR: s = "TitleBar"; break; + case Widget::TYPE_TRACKBAR_HORIZONTAL: s = "HTrackBar"; break; + case Widget::TYPE_TRACKBAR_VERTICAL: s = "VTrackBar"; break; + case Widget::TYPE_WINDOW: s = "Window"; break; + default: s = "Widget"; break; + } + + int counter = 1; + while( !isNameUnique(s + Ogre::StringConverter::toString(counter)) ) + ++counter; + + return (s + Ogre::StringConverter::toString(counter)); + } + void Widget::addChild(Widget* w) { if(w->getParentWidget() != NULL) return; + if (!isNameUnique(w->getInstanceName())) + { + throw Ogre::Exception(Ogre::Exception::ERR_DUPLICATE_ITEM,"Name \"" + w->getInstanceName() + "\" is already used in " + getInstanceName() ,"Widget::addChild"); + } + mChildWidgets.push_back(w); w->setParent(this); @@ -561,6 +613,40 @@ { if( name.empty() ) return NULL; + + WidgetArray::iterator it; + for ( it = mChildWidgets.begin(); it != mChildWidgets.end(); ++it ) + { + if (name == (*it)->getInstanceName()) + { + return (*it); + } + } + + return NULL; + } + + const Widget* Widget::getChildWidget(const std::string& name) const + { + if( name.empty() ) + return NULL; + + WidgetArray::const_iterator it; + for ( it = mChildWidgets.begin(); it != mChildWidgets.end(); ++it ) + { + if (name == (*it)->getInstanceName()) + { + return (*it); + } + } + + return NULL; + } + + Widget* Widget::findChildWidget(const std::string& name) + { + if( name.empty() ) + return NULL; if( mInstanceName == name ) return this; @@ -568,7 +654,7 @@ WidgetArray::iterator it; for( it = mChildWidgets.begin(); it != mChildWidgets.end(); ++it ) { - if( (w = (*it)->getChildWidget(name)) != NULL ) + if( (w = (*it)->findChildWidget(name)) != NULL ) { return w; } @@ -577,7 +663,7 @@ return NULL; } - const Widget* Widget::getChildWidget(const std::string& name) const + const Widget* Widget::findChildWidget(const std::string& name) const { if( name.empty() ) return NULL; @@ -588,7 +674,7 @@ WidgetArray::const_iterator it; for( it = mChildWidgets.begin(); it != mChildWidgets.end(); ++it ) { - if( (w = (*it)->getChildWidget(name)) != NULL ) + if( (w = (*it)->findChildWidget(name)) != NULL ) { return w; } Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIWidget.h =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIWidget.h 2008-03-09 11:11:30 UTC (rev 579) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIWidget.h 2008-03-15 00:25:20 UTC (rev 580) @@ -244,8 +244,22 @@ const WidgetArray* getChildWidgetList() const; Widget* getChildWidget(const std::string& name); const Widget* getChildWidget(const std::string& name) const; + /** + * Find child by name + */ Widget* getChildWidget(Type t, unsigned int index); + /** + * Find child by name + */ const Widget* getChildWidget(Type t, unsigned int index) const; + /** + * Find child recursively by name + */ + Widget* findChildWidget(const std::string& name); + /** + * Find child recursively by name + */ + const Widget* findChildWidget(const std::string& name) const; Rect getClippedDimensions(); Rect getDimensions() const; GUIManager* getGUIManager(); @@ -256,6 +270,7 @@ Point getPosition() const; Point getScrollOffset() const; Size getSize() const; + bool isNameUnique(const std::string& name) const; std::string getFontName() const; /** @@ -509,6 +524,8 @@ void setUnderEffect(bool val) { mUnderEffect = val; } protected: + std::string generateName(Widget::Type t); + virtual void setGUIManager(GUIManager* gm); virtual void setParent(Widget* parent); virtual void setQuadContainer(QuadContainer* container); Modified: trunk/python-ogre/demos/caelum/media/GroundFog.program =================================================================== --- trunk/python-ogre/demos/caelum/media/GroundFog.program 2008-03-09 11:11:30 UTC (rev 579) +++ trunk/python-ogre/demos/caelum/media/GroundFog.program 2008-03-15 00:25:20 UTC (rev 580) @@ -20,7 +20,7 @@ vertex_program CaelumGroundFogVP cg { - source CaelumShaders.cg + source CaelumGroundFog.cg entry_point GroundFog_vp profiles vs_2_x arbvp1 vp30 compile_arguments -posinv @@ -34,7 +34,7 @@ fragment_program CaelumGroundFogFP cg { - source CaelumShaders.cg + source CaelumGroundFog.cg entry_point GroundFog_fp profiles ps_2_x arbfp1 fp30 @@ -53,7 +53,7 @@ vertex_program CaelumGroundFogDomeVP cg { - source CaelumShaders.cg + source CaelumGroundFog.cg entry_point GroundFogDome_vp profiles vs_2_0 arbvp1 compile_arguments -posinv @@ -66,7 +66,7 @@ fragment_program CaelumGroundFogDomeFP cg { - source CaelumShaders.cg + source CaelumGroundFog.cg entry_point GroundFogDome_fp profiles ps_2_0 arbfp1 Modified: trunk/python-ogre/demos/caelum/media/Haze.program =================================================================== --- trunk/python-ogre/demos/caelum/media/Haze.program 2008-03-09 11:11:30 UTC (rev 579) +++ trunk/python-ogre/demos/caelum/media/Haze.program 2008-03-15 00:25:20 UTC (rev 580) @@ -20,7 +20,7 @@ vertex_program CaelumHazeVP cg { - source CaelumShaders.cg + source CaelumSkyDome.cg entry_point Haze_vp profiles vs_2_0 arbvp1 vp30 compile_arguments -posinv @@ -34,7 +34,7 @@ fragment_program CaelumHazeFP cg { - source CaelumShaders.cg + source CaelumSkyDome.cg entry_point Haze_fp profiles ps_2_0 arbfp1 fp30 compile_arguments -posinv Modified: trunk/python-ogre/demos/caelum/media/LayeredClouds.material =================================================================== --- trunk/python-ogre/demos/caelum/media/LayeredClouds.material 2008-03-09 11:11:30 UTC (rev 579) +++ trunk/python-ogre/demos/caelum/media/LayeredClouds.material 2008-03-15 00:25:20 UTC (rev 580) @@ -20,7 +20,7 @@ vertex_program CaelumLayeredCloudsVP cg { - source CaelumShaders.cg + source CaelumLayeredClouds.cg entry_point LayeredClouds_vp profiles vs_2_0 arbvp1 compile_arguments -posinv @@ -34,7 +34,7 @@ fragment_program CaelumLayeredCloudsFP cg { - source CaelumShaders.cg + source CaelumLayeredClouds.cg entry_point LayeredClouds_fp profiles ps_2_0 arbfp1 Modified: trunk/python-ogre/demos/nxogre/Demo_101.py =================================================================== --- trunk/python-ogre/demos/nxogre/Demo_101.py 2008-03-09 11:11:30 UTC (rev 579) +++ trunk/python-ogre/demos/nxogre/Demo_101.py 2008-03-15 00:25:20 UTC (rev 580) @@ -1,74 +1,74 @@ -""" - -""" -import sys -sys.path.insert(0,'..') -import PythonOgreConfig - -import ogre.renderer.OGRE as ogre -import ogre.physics.PhysX as physx -import ogre.physics.NxOgre as nxogre -import CakeFramework as cf - -class NxTutorial ( cf.Cake ): - def __init__ ( self ): - cf.Cake.__init__(self) - - ##//////////////////////////////////////////////////////////////////////////////////////////////// - - def start(self ): - self.World = nxogre.World("Log: html") - - self.Scene = self.World.createScene("Main", self.SceneMgr,"gravity: yes, floor: yes") - - self.Scene.createBody('sphere.50cm.mesh',nxogre.SphereShape(0.5), - ogre.Vector3(3,1.5,0), "mass: 10" ) - - - ##//////////////////////////////////////////////////////////////////////////////////////////////// - def stop(self): - ## Time to go, better tell NxOgre we are leaving. - del self.World - - ##//////////////////////////////////////////////////////////////////////////////////////////////// - - def onFrame(self, _time) : - if not self.mTargetActor: - return - if self.InputHandler.isKeyDown(cf.Action.Z): - self.mTargetActor.addTorque(ogre.Vector3(0,0,150)) - if self.InputHandler.isKeyDown(cf.Action.NEG_Z): - self.mTargetActor.addTorque(ogre.Vector3(0,0,-150)) - if self.InputHandler.isKeyDown(cf.Action.X): - self.mTargetActor.addTorque(ogre.Vector3(150,0,0)) - if self.InputHandler.isKeyDown(cf.Action.NEG_X): - self.mTargetActor.addTorque(ogre.Vector3(-150,0,0)) - if self.InputHandler.isKeyDown(cf.Action.Y): - self.mTargetActor.addTorque(ogre.Vector3(0,150,0)) - if self.InputHandler.isKeyDown(cf.Action.NEG_Y): - self.mTargetActor.addTorque(ogre.Vector3(0,-150,0)) - - def getWorld(self): - return self.World - ##//////////////////////////////////////////////////////////////////////////////////////////////// - - def getTutorialSettings( self ): - self.TutorialName = "101" - self.TutorialDescription = "Cube on a plane" - - ##//////////////////////////////////////////////////////////////////////////////////////////////// - -if __name__ == '__main__': - import exceptions,sys - try: - application = NxTutorial () - application.pre() - application.start() - application.WorldInstance = application.getWorld() - application.startRendering(application) - application.stop() - application.post() - - except ogre.OgreException, e: - print e - +""" + +""" +import sys +sys.path.insert(0,'..') +import PythonOgreConfig + +import ogre.renderer.OGRE as ogre +import ogre.physics.PhysX as physx +import ogre.physics.NxOgre_09 as nxogre +import CakeFramework as cf + +class NxTutorial ( cf.Cake ): + def __init__ ( self ): + cf.Cake.__init__(self) + + ##//////////////////////////////////////////////////////////////////////////////////////////////// + + def start(self ): + self.World = nxogre.World("Log: html") + + self.Scene = self.World.createScene("Main", self.SceneMgr,"gravity: yes, floor: yes") + + self.Scene.createBody('sphere.50cm.mesh',nxogre.SphereShape(0.5), + ogre.Vector3(3,1.5,0), "mass: 10" ) + + + ##//////////////////////////////////////////////////////////////////////////////////////////////// + def stop(self): + ## Time to go, better tell NxOgre we are leaving. + del self.World + + ##//////////////////////////////////////////////////////////////////////////////////////////////// + + def onFrame(self, _time) : + if not self.mTargetActor: + return + if self.InputHandler.isKeyDown(cf.Action.Z): + self.mTargetActor.addTorque(ogre.Vector3(0,0,150)) + if self.InputHandler.isKeyDown(cf.Action.NEG_Z): + self.mTargetActor.addTorque(ogre.Vector3(0,0,-150)) + if self.InputHandler.isKeyDown(cf.Action.X): + self.mTargetActor.addTorque(ogre.Vector3(150,0,0)) + if self.InputHandler.isKeyDown(cf.Action.NEG_X): + self.mTargetActor.addTorque(ogre.Vector3(-150,0,0)) + if self.InputHandler.isKeyDown(cf.Action.Y): + self.mTargetActor.addTorque(ogre.Vector3(0,150,0)) + if self.InputHandler.isKeyDown(cf.Action.NEG_Y): + self.mTargetActor.addTorque(ogre.Vector3(0,-150,0)) + + def getWorld(self): + return self.World + ##//////////////////////////////////////////////////////////////////////////////////////////////// + + def getTutorialSettings( self ): + self.TutorialName = "101" + self.TutorialDescription = "Cube on a plane" + + ##//////////////////////////////////////////////////////////////////////////////////////////////// + +if __name__ == '__main__': + import exceptions,sys + try: + application = NxTutorial () + application.pre() + application.start() + application.WorldInstance = application.getWorld() + application.startRendering(application) + application.stop() + application.post() + + except ogre.OgreException, e: + print e + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2008-03-09 11:11:25
|
Revision: 579 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=579&view=rev Author: andy_miller Date: 2008-03-09 04:11:30 -0700 (Sun, 09 Mar 2008) Log Message: ----------- Updates for 1.2 RC2 Modified Paths: -------------- trunk/python-ogre/PythonOgreConfig_nt.py trunk/python-ogre/ThirdParty/caelum/Astronomy.cpp trunk/python-ogre/ThirdParty/caelum/Astronomy.h trunk/python-ogre/ThirdParty/caelum/CaelumPrerequisites.h trunk/python-ogre/ThirdParty/caelum/GroundFog.cpp trunk/python-ogre/ThirdParty/caelum/GroundFog.h trunk/python-ogre/ThirdParty/caelum/ImageHelper.cpp trunk/python-ogre/ThirdParty/caelum/ImageHelper.h trunk/python-ogre/ThirdParty/caelum/SolarSystemModel.h trunk/python-ogre/ThirdParty/forests/BatchPage.cpp trunk/python-ogre/ThirdParty/forests/BatchPage.h trunk/python-ogre/ThirdParty/forests/BatchedGeometry.cpp trunk/python-ogre/ThirdParty/forests/BatchedGeometry.h trunk/python-ogre/ThirdParty/forests/GrassLoader.cpp trunk/python-ogre/ThirdParty/forests/GrassLoader.h trunk/python-ogre/ThirdParty/forests/ImpostorPage.cpp trunk/python-ogre/ThirdParty/forests/ImpostorPage.h trunk/python-ogre/ThirdParty/forests/PagedGeometry.cpp trunk/python-ogre/ThirdParty/forests/PagedGeometry.h trunk/python-ogre/ThirdParty/forests/PropertyMaps.cpp trunk/python-ogre/ThirdParty/forests/PropertyMaps.h trunk/python-ogre/ThirdParty/forests/StaticBillboardSet.cpp trunk/python-ogre/ThirdParty/forests/StaticBillboardSet.h trunk/python-ogre/ThirdParty/forests/TreeLoader2D.cpp trunk/python-ogre/ThirdParty/forests/TreeLoader2D.h trunk/python-ogre/ThirdParty/forests/TreeLoader3D.cpp trunk/python-ogre/ThirdParty/forests/TreeLoader3D.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIComboBox.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIExportDLL.h trunk/python-ogre/ThirdParty/quickgui/QuickGUILabel.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIManager.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIPanel.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIPanel.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIQuad.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIQuad.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIQuadContainer.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUISheet.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUISheet.h trunk/python-ogre/ThirdParty/quickgui/QuickGUISkinSet.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIText.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUITextBox.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUITextHelper.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUITextHelper.h trunk/python-ogre/ThirdParty/quickgui/QuickGUITitleBar.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIWidget.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIWidget.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIWindow.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIWindow.h trunk/python-ogre/code_generators/cegui/generate_code.py trunk/python-ogre/code_generators/common_utils/__init__.py trunk/python-ogre/code_generators/nxogre_09/hand_made_wrappers.py trunk/python-ogre/code_generators/ogre/generate_code.py trunk/python-ogre/code_generators/ogre/python_ogre_sizeof.h trunk/python-ogre/code_generators/ogreforests/generate_code.py trunk/python-ogre/code_generators/ogreforests/hand_made_wrappers.py trunk/python-ogre/code_generators/ogreforests/python_forests.h trunk/python-ogre/code_generators/ogreforests/python_forests_aliases.h trunk/python-ogre/code_generators/ogreforests/python_forests_sizeof.h trunk/python-ogre/code_generators/ogrerefapp/hand_made_wrappers.py trunk/python-ogre/code_generators/particleuniverse/generate_code.py trunk/python-ogre/code_generators/particleuniverse/python_particleuniverse_aliases.h trunk/python-ogre/code_generators/particleuniverse/python_particleuniverse_sizeof.h trunk/python-ogre/code_generators/plib/generate_code.py trunk/python-ogre/code_generators/quickgui/generate_code.py trunk/python-ogre/code_generators/theora/customization_data.py trunk/python-ogre/code_generators/theora/generate_code.py trunk/python-ogre/code_generators/theora/python_theora.h trunk/python-ogre/code_generators/theora/python_theora_aliases.h trunk/python-ogre/demos/navi/Demo_navi.py trunk/python-ogre/demos/navi/Media/NaviDemo.material trunk/python-ogre/demos/navi/Media/cerulean.jpg trunk/python-ogre/demos/navi/resources.cfg trunk/python-ogre/demos/ogreal/Demo_RenderToTexture.py trunk/python-ogre/demos/theora/demo_video.py trunk/python-ogre/environment.py trunk/python-ogre/packages_2.5/ogre/renderer/OGRE/sf_OIS.py Modified: trunk/python-ogre/PythonOgreConfig_nt.py =================================================================== --- trunk/python-ogre/PythonOgreConfig_nt.py 2008-02-24 08:05:30 UTC (rev 578) +++ trunk/python-ogre/PythonOgreConfig_nt.py 2008-03-09 11:11:30 UTC (rev 579) @@ -66,7 +66,7 @@ PATH_PhysX= "c:/program files/AGEIA Technologies/SDK/v2.7.3/SDKs" PATH_Theora= os.path.join(PATH_OgreAddons,'videoplugin','TheoraVideo') PATH_ffmpeg= os.path.join(PATH_THIRDPARTY,'extra') -PATH_navi = os.path.join(BASE_DIR, 'navi','Navi') +PATH_navi = os.path.join(BASE_DIR, 'navi', 'navi') PATH_particleuniverse = os.path.join(PATH_Ogre, 'PlugIns', 'ParticleUniverse' ) Modified: trunk/python-ogre/ThirdParty/caelum/Astronomy.cpp =================================================================== --- trunk/python-ogre/ThirdParty/caelum/Astronomy.cpp 2008-02-24 08:05:30 UTC (rev 578) +++ trunk/python-ogre/ThirdParty/caelum/Astronomy.cpp 2008-03-09 11:11:30 UTC (rev 579) @@ -225,7 +225,7 @@ ::_controlfp (oldMode, _MCW_PC); } #else - void Astronomy::enterHighPrecissionFloatingPointMode () + int Astronomy::enterHighPrecissionFloatingPointMode () { // Meaningless return 0xC0FFEE; Modified: trunk/python-ogre/ThirdParty/caelum/Astronomy.h =================================================================== --- trunk/python-ogre/ThirdParty/caelum/Astronomy.h 2008-02-24 08:05:30 UTC (rev 578) +++ trunk/python-ogre/ThirdParty/caelum/Astronomy.h 2008-03-09 11:11:30 UTC (rev 579) @@ -151,4 +151,4 @@ }; } -#endif // SOLARSYSTEMMODEL_H \ No newline at end of file +#endif // SOLARSYSTEMMODEL_H Modified: trunk/python-ogre/ThirdParty/caelum/CaelumPrerequisites.h =================================================================== --- trunk/python-ogre/ThirdParty/caelum/CaelumPrerequisites.h 2008-02-24 08:05:30 UTC (rev 578) +++ trunk/python-ogre/ThirdParty/caelum/CaelumPrerequisites.h 2008-03-09 11:11:30 UTC (rev 579) @@ -24,20 +24,20 @@ // Include external headers #include "Ogre.h" -// Define the dll export qualifier if compiling for Windows -// // #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32 -// // #ifdef CAELUM_LIB -// // #define DllExport __declspec (dllexport) -// // #else -// // #ifdef __MINGW32__ -// // #define DllExport -// // #else -// // #define DllExport __declspec (dllimport) -// // #endif -// // #endif -// // #else +// // Define the dll export qualifier if compiling for Windows +// #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32 +// #ifdef CAELUM_LIB +// #define DllExport __declspec (dllexport) +// #else +// #ifdef __MINGW32__ +// #define DllExport +// #else +// #define DllExport __declspec (dllimport) +// #endif +// #endif +// #else #define DllExport -// // #endif +// #endif // Define the version code #define CAELUM_VERSION_MAIN 0 Modified: trunk/python-ogre/ThirdParty/caelum/GroundFog.cpp =================================================================== --- trunk/python-ogre/ThirdParty/caelum/GroundFog.cpp 2008-02-24 08:05:30 UTC (rev 578) +++ trunk/python-ogre/ThirdParty/caelum/GroundFog.cpp 2008-03-09 11:11:30 UTC (rev 579) @@ -198,4 +198,4 @@ params->setNamedConstant("fogVerticalDecay", getVerticalDecay()); params->setNamedConstant("fogGroundLevel", getGroundLevel()); } -} \ No newline at end of file +} Modified: trunk/python-ogre/ThirdParty/caelum/GroundFog.h =================================================================== --- trunk/python-ogre/ThirdParty/caelum/GroundFog.h 2008-02-24 08:05:30 UTC (rev 578) +++ trunk/python-ogre/ThirdParty/caelum/GroundFog.h 2008-03-09 11:11:30 UTC (rev 579) @@ -149,4 +149,4 @@ } -#endif //GROUNDFOG_H \ No newline at end of file +#endif //GROUNDFOG_H Modified: trunk/python-ogre/ThirdParty/caelum/ImageHelper.cpp =================================================================== --- trunk/python-ogre/ThirdParty/caelum/ImageHelper.cpp 2008-02-24 08:05:30 UTC (rev 578) +++ trunk/python-ogre/ThirdParty/caelum/ImageHelper.cpp 2008-03-09 11:11:30 UTC (rev 579) @@ -64,5 +64,4 @@ return cf; } - -} \ No newline at end of file +} Modified: trunk/python-ogre/ThirdParty/caelum/ImageHelper.h =================================================================== --- trunk/python-ogre/ThirdParty/caelum/ImageHelper.h 2008-02-24 08:05:30 UTC (rev 578) +++ trunk/python-ogre/ThirdParty/caelum/ImageHelper.h 2008-03-09 11:11:30 UTC (rev 579) @@ -41,4 +41,4 @@ bool wrapX = true); } -#endif // CAELUM_HEADER__IMAGE_HELPER_H \ No newline at end of file +#endif // CAELUM_HEADER__IMAGE_HELPER_H Modified: trunk/python-ogre/ThirdParty/caelum/SolarSystemModel.h =================================================================== --- trunk/python-ogre/ThirdParty/caelum/SolarSystemModel.h 2008-02-24 08:05:30 UTC (rev 578) +++ trunk/python-ogre/ThirdParty/caelum/SolarSystemModel.h 2008-03-09 11:11:30 UTC (rev 579) @@ -61,4 +61,4 @@ }; } -#endif // SOLARSYSTEMMODEL_H \ No newline at end of file +#endif // SOLARSYSTEMMODEL_H Modified: trunk/python-ogre/ThirdParty/forests/BatchPage.cpp =================================================================== --- trunk/python-ogre/ThirdParty/forests/BatchPage.cpp 2008-02-24 08:05:30 UTC (rev 578) +++ trunk/python-ogre/ThirdParty/forests/BatchPage.cpp 2008-03-09 11:11:30 UTC (rev 579) @@ -15,17 +15,18 @@ #include "BatchPage.h" #include "BatchedGeometry.h" -#include "OgreRoot.h" -#include "OgreCamera.h" -#include "OgreVector3.h" -#include "OgreQuaternion.h" -#include "OgreEntity.h" -#include "OgreRenderSystem.h" -#include "OgreRenderSystemCapabilities.h" -#include "OgreHighLevelGpuProgram.h" -#include "OgreHighLevelGpuProgramManager.h" +#include <OgreRoot.h> +#include <OgreCamera.h> +#include <OgreVector3.h> +#include <OgreQuaternion.h> +#include <OgreEntity.h> +#include <OgreRenderSystem.h> +#include <OgreRenderSystemCapabilities.h> +#include <OgreHighLevelGpuProgram.h> +#include <OgreHighLevelGpuProgramManager.h> using namespace Ogre; +namespace PagedGeometry { //------------------------------------------------------------------------------------- @@ -115,13 +116,13 @@ if (fadeEnabled != enabled){ fadeEnabled = enabled; - if (enabled) { +// if (enabled) { //Transparent batches should render after impostors batch->setRenderQueueGroup(RENDER_QUEUE_6); - } else { - //Opaque batches should render in the normal render queue - batch->setRenderQueueGroup(RENDER_QUEUE_MAIN); - } +// } else { +// //Opaque batches should render in the normal render queue +// batch->setRenderQueueGroup(RENDER_QUEUE_MAIN); +// } this->visibleDist = visibleDist; this->invisibleDist = invisibleDist; @@ -134,7 +135,7 @@ if (!shadersSupported) return; - unsigned int i = 0; + uint32 i = 0; BatchedGeometry::SubBatchIterator it = batch->getSubBatchIterator(); while (it.hasMoreElements()){ BatchedGeometry::SubBatch *subBatch = it.getNext(); @@ -270,3 +271,4 @@ } } +} Modified: trunk/python-ogre/ThirdParty/forests/BatchPage.h =================================================================== --- trunk/python-ogre/ThirdParty/forests/BatchPage.h 2008-02-24 08:05:30 UTC (rev 578) +++ trunk/python-ogre/ThirdParty/forests/BatchPage.h 2008-03-09 11:11:30 UTC (rev 579) @@ -18,9 +18,10 @@ #include "PagedGeometry.h" #include "BatchedGeometry.h" -#include "OgrePrerequisites.h" -#include "OgreStringConverter.h" +#include <OgrePrerequisites.h> +#include <OgreStringConverter.h> +namespace PagedGeometry { /** \brief The BatchPage class renders entities as StaticGeometry. @@ -74,5 +75,6 @@ } }; +} #endif Modified: trunk/python-ogre/ThirdParty/forests/BatchedGeometry.cpp =================================================================== --- trunk/python-ogre/ThirdParty/forests/BatchedGeometry.cpp 2008-02-24 08:05:30 UTC (rev 578) +++ trunk/python-ogre/ThirdParty/forests/BatchedGeometry.cpp 2008-03-09 11:11:30 UTC (rev 579) @@ -15,25 +15,26 @@ #include "BatchedGeometry.h" -#include "OgreRoot.h" -#include "OgreRenderSystem.h" -#include "OgreCamera.h" -#include "OgreVector3.h" -#include "OgreQuaternion.h" -#include "OgreSceneNode.h" -#include "OgreString.h" -#include "OgreStringConverter.h" -#include "OgreEntity.h" -#include "OgreSubMesh.h" -#include "OgreSubEntity.h" -#include "OgreMesh.h" -#include "OgreMeshManager.h" -#include "OgreHardwareBufferManager.h" -#include "OgreHardwareBuffer.h" -#include "OgreMaterialManager.h" -#include "OgreMaterial.h" +#include <OgreRoot.h> +#include <OgreRenderSystem.h> +#include <OgreCamera.h> +#include <OgreVector3.h> +#include <OgreQuaternion.h> +#include <OgreSceneNode.h> +#include <OgreString.h> +#include <OgreStringConverter.h> +#include <OgreEntity.h> +#include <OgreSubMesh.h> +#include <OgreSubEntity.h> +#include <OgreMesh.h> +#include <OgreMeshManager.h> +#include <OgreHardwareBufferManager.h> +#include <OgreHardwareBuffer.h> +#include <OgreMaterialManager.h> +#include <OgreMaterial.h> using namespace Ogre; +namespace PagedGeometry { //------------------------------------------------------------------------------------- @@ -56,15 +57,19 @@ void BatchedGeometry::addEntity(Entity *ent, const Vector3 &position, const Quaternion &orientation, const Vector3 &scale, const Ogre::ColourValue &color) { + MeshPtr mesh = ent->getMesh(); + if (mesh->sharedVertexData != NULL) + OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "Shared vertex data not allowed", "BatchedGeometry::addEntity()"); + //For each subentity - for (uint i = 0; i < ent->getNumSubEntities(); ++i){ + for (uint32 i = 0; i < ent->getNumSubEntities(); ++i){ //Get the subentity SubEntity *subEntity = ent->getSubEntity(i); SubMesh *subMesh = subEntity->getSubMesh(); //Generate a format string that uniquely identifies this material & vertex/index format if (subMesh->vertexData == NULL) - OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "BatchedGeometry cannot use meshes with shared vertex data", "BatchedGeometry::addEntity()"); + OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "SubMesh vertex data not found!", "BatchedGeometry::addEntity()"); String formatStr = getFormatString(subEntity); //If a batch using an identical format exists... @@ -234,7 +239,15 @@ built = false; Material *origMat = ((MaterialPtr)MaterialManager::getSingleton().getByName(ent->getMaterialName())).getPointer(); + if (origMat) { material = MaterialManager::getSingleton().getByName(getMaterialClone(origMat)->getName()); + } else { + MaterialManager::ResourceCreateOrRetrieveResult result = MaterialManager::getSingleton().createOrRetrieve("PagedGeometry_Batched_Material", "General"); + if (result.first.isNull()) { + OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "BatchedGeometry failed to create a material for entity with invalid material.", "BatchedGeometry::SubBatch::SubBatch(BatchedGeometry *parent, SubEntity *ent)"); + } + material = result.first; + } //Setup vertex/index data structure vertexData = meshType->vertexData->clone(false); @@ -651,4 +664,6 @@ return parent->queryLights(); } +} + #endif Modified: trunk/python-ogre/ThirdParty/forests/BatchedGeometry.h =================================================================== --- trunk/python-ogre/ThirdParty/forests/BatchedGeometry.h 2008-02-24 08:05:30 UTC (rev 578) +++ trunk/python-ogre/ThirdParty/forests/BatchedGeometry.h 2008-03-09 11:11:30 UTC (rev 579) @@ -16,11 +16,12 @@ #ifndef __BatchedGeometry_H__ #define __BatchedGeometry_H__ -#include "OgrePrerequisites.h" -#include "OgreMovableObject.h" -#include "OgreSceneNode.h" -#include "OgreMaterialManager.h" +#include <OgrePrerequisites.h> +#include <OgreMovableObject.h> +#include <OgreSceneNode.h> +#include <OgreMaterialManager.h> +namespace PagedGeometry { class BatchedGeometry: public Ogre::MovableObject { @@ -129,6 +130,6 @@ }; +} - #endif \ No newline at end of file Modified: trunk/python-ogre/ThirdParty/forests/GrassLoader.cpp =================================================================== --- trunk/python-ogre/ThirdParty/forests/GrassLoader.cpp 2008-02-24 08:05:30 UTC (rev 578) +++ trunk/python-ogre/ThirdParty/forests/GrassLoader.cpp 2008-03-09 11:11:30 UTC (rev 579) @@ -1,5 +1,6 @@ /*------------------------------------------------------------------------------------- Copyright (c) 2006 John Judnich +Modified 2008 by Erik Hjortsberg (eri...@it...) This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: @@ -12,637 +13,34 @@ #include "PagedGeometry.h" #include "PropertyMaps.h" -#include "OgreRoot.h" -#include "OgreTimer.h" -#include "OgreCamera.h" -#include "OgreVector3.h" -#include "OgreQuaternion.h" -#include "OgreEntity.h" -#include "OgreString.h" -#include "OgreStringConverter.h" -#include "OgreMaterialManager.h" -#include "OgreMaterial.h" -#include "OgreHardwareBufferManager.h" -#include "OgreHardwareBuffer.h" -#include "OgreMeshManager.h" -#include "OgreMesh.h" -#include "OgreSubMesh.h" -#include "OgreLogManager.h" -#include "OgreTextureManager.h" -#include "OgreHardwarePixelBuffer.h" -#include "OgreRenderSystem.h" -#include "OgreRenderSystemCapabilities.h" -#include "OgreHighLevelGpuProgram.h" -#include "OgreHighLevelGpuProgramManager.h" +#include <OgreRoot.h> +#include <OgreTimer.h> +#include <OgreCamera.h> +#include <OgreVector3.h> +#include <OgreQuaternion.h> +#include <OgreEntity.h> +#include <OgreString.h> +#include <OgreStringConverter.h> +#include <OgreMaterialManager.h> +#include <OgreMaterial.h> +#include <OgreHardwareBufferManager.h> +#include <OgreHardwareBuffer.h> +#include <OgreMeshManager.h> +#include <OgreMesh.h> +#include <OgreSubMesh.h> +#include <OgreLogManager.h> +#include <OgreTextureManager.h> +#include <OgreHardwarePixelBuffer.h> +#include <OgreRenderSystem.h> +#include <OgreRenderSystemCapabilities.h> +#include <OgreHighLevelGpuProgram.h> +#include <OgreHighLevelGpuProgramManager.h> using namespace Ogre; +namespace PagedGeometry { -unsigned long GrassLoader::GUID = 0; - -GrassLoader::GrassLoader(PagedGeometry *geom) +GrassLayer::GrassLayer(PagedGeometry *geom, GrassLoader<GrassLayer> *ldr) { - GrassLoader::geom = geom; - - heightFunction = NULL; - heightFunctionUserData = NULL; - - windDir = Vector3::UNIT_X; - densityFactor = 1.0f; - renderQueue = RENDER_QUEUE_6; - - windTimer.reset(); - lastTime = 0; -} - -GrassLoader::~GrassLoader() -{ - std::list<GrassLayer*>::iterator it; - for (it = layerList.begin(); it != layerList.end(); ++it){ - delete *it; - } - layerList.clear(); -} - -GrassLayer *GrassLoader::addLayer(const String &material) -{ - GrassLayer *layer = new GrassLayer(geom, this); - layer->setMaterialName(material); - layerList.push_back(layer); - - return layer; -} - -void GrassLoader::deleteLayer(GrassLayer *layer) -{ - layerList.remove(layer); - delete layer; -} - -void GrassLoader::frameUpdate() -{ - unsigned long currentTime = windTimer.getMilliseconds(); - unsigned long ellapsedTime = currentTime - lastTime; - lastTime = currentTime; - - float ellapsed = ellapsedTime / 1000.0f; - - //Update the vertex shader parameters - std::list<GrassLayer*>::iterator it; - for (it = layerList.begin(); it != layerList.end(); ++it){ - GrassLayer *layer = *it; - - layer->_updateShaders(); - - GpuProgramParametersSharedPtr params = layer->material->getTechnique(0)->getPass(0)->getVertexProgramParameters(); - if (layer->animate){ - //Increment animation frame - layer->waveCount += ellapsed * (layer->animSpeed * Math::PI); - if (layer->waveCount > Math::PI*2) layer->waveCount -= Math::PI*2; - - //Set vertex shader parameters - params->setNamedConstant("time", layer->waveCount); - params->setNamedConstant("frequency", layer->animFreq); - - Vector3 direction = windDir * layer->animMag; - params->setNamedConstant("direction", Vector4(direction.x, direction.y, direction.z, 0)); - - } - } -} - -void GrassLoader::loadPage(PageInfo &page) -{ - //Seed random number generator based on page indexes - uint16 xSeed = static_cast<uint16>(page.xIndex % 0xFFFF); - uint16 zSeed = static_cast<uint16>(page.zIndex % 0xFFFF); - uint32 seed = (xSeed << 16) | zSeed; - srand(seed); - - std::list<GrassLayer*>::iterator it; - for (it = layerList.begin(); it != layerList.end(); ++it){ - GrassLayer *layer = *it; - - //Calculate how much grass needs to be added - float volume = page.bounds.width() * page.bounds.height(); - unsigned int grassCount = layer->density * densityFactor * volume; - - //The vertex buffer can't be allocated until the exact number of polygons is known, - //so the locations of all grasses in this page must be precalculated. - - //Precompute grass locations into an array of floats. A plain array is used for speed; - //there's no need to use a dynamic sized array since a maximum size is known. - float *position = new float[grassCount*2]; - if (layer->densityMap){ - if (layer->densityMap->getFilter() == MAPFILTER_NONE) - grassCount = layer->_populateGrassList_UnfilteredDM(page, position, grassCount); - else if (layer->densityMap->getFilter() == MAPFILTER_BILINEAR) - grassCount = layer->_populateGrassList_BilinearDM(page, position, grassCount); - } else { - grassCount = layer->_populateGrassList_Uniform(page, position, grassCount); - } - - //Don't build a mesh unless it contains something - if (grassCount != 0){ - Mesh *mesh = NULL; - switch (layer->renderTechnique){ - case GRASSTECH_QUAD: - mesh = generateGrass_QUAD(page, layer, position, grassCount); - break; - case GRASSTECH_CROSSQUADS: - mesh = generateGrass_CROSSQUADS(page, layer, position, grassCount); - break; - case GRASSTECH_SPRITE: - mesh = generateGrass_SPRITE(page, layer, position, grassCount); - break; - } - assert(mesh); - - //Add the mesh to PagedGeometry - Entity *entity = geom->getCamera()->getSceneManager()->createEntity(getUniqueID(), mesh->getName()); - entity->setRenderQueueGroup(renderQueue); - entity->setCastShadows(false); - addEntity(entity, page.centerPoint, Quaternion::IDENTITY, Vector3::UNIT_SCALE); - geom->getSceneManager()->destroyEntity(entity); - - //Store the mesh pointer - page.userData = mesh; - } else { - //No mesh - page.userData = NULL; - } - - //Delete the position list - delete[] position; - } -} - -void GrassLoader::unloadPage(const PageInfo &page) -{ - //Unload mesh - Mesh *mesh = (Mesh*)page.userData; - if (mesh) - MeshManager::getSingleton().remove(mesh->getName()); -} - -Mesh *GrassLoader::generateGrass_QUAD(PageInfo &page, GrassLayer *layer, float *grassPositions, unsigned int grassCount) -{ - //Calculate the number of quads to be added - unsigned int quadCount; - quadCount = grassCount; - - //Create manual mesh to store grass quads - MeshPtr mesh = MeshManager::getSingleton().createManual(getUniqueID(), ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME); - SubMesh *subMesh = mesh->createSubMesh(); - subMesh->useSharedVertices = false; - - //Setup vertex format information - subMesh->vertexData = new VertexData; - subMesh->vertexData->vertexStart = 0; - subMesh->vertexData->vertexCount = 4 * quadCount; - - VertexDeclaration* dcl = subMesh->vertexData->vertexDeclaration; - size_t offset = 0; - dcl->addElement(0, offset, VET_FLOAT3, VES_POSITION); - offset += VertexElement::getTypeSize(VET_FLOAT3); - dcl->addElement(0, offset, VET_COLOUR, VES_DIFFUSE); - offset += VertexElement::getTypeSize(VET_COLOUR); - dcl->addElement(0, offset, VET_FLOAT2, VES_TEXTURE_COORDINATES); - offset += VertexElement::getTypeSize(VET_FLOAT2); - - //Populate a new vertex buffer with grass - HardwareVertexBufferSharedPtr vbuf = HardwareBufferManager::getSingleton() - .createVertexBuffer(offset, subMesh->vertexData->vertexCount, HardwareBuffer::HBU_STATIC_WRITE_ONLY, false); - float* pReal = static_cast<float*>(vbuf->lock(HardwareBuffer::HBL_DISCARD)); - - //Calculate size variance - float rndWidth = layer->maxWidth - layer->minWidth; - float rndHeight = layer->maxHeight - layer->minHeight; - - float minY = Math::POS_INFINITY, maxY = Math::NEG_INFINITY; - float *posPtr = grassPositions; //Position array "iterator" - for (uint16 i = 0; i < grassCount; ++i) - { - //Get the x and z positions from the position array - float x = *posPtr++; - float z = *posPtr++; - - //Get the color at the grass position - uint32 color; - if (layer->colorMap) - color = layer->colorMap->getColorAt(x, z); - else - color = 0xFFFFFFFF; - - //Calculate size - float rnd = Math::UnitRandom(); //The same rnd value is used for width and height to maintain aspect ratio - float halfScaleX = (layer->minWidth + rndWidth * rnd) * 0.5f; - float scaleY = (layer->minHeight + rndHeight * rnd); - - //Calculate rotation - float angle = Math::RangeRandom(0, Math::TWO_PI); - float xTrans = Math::Cos(angle) * halfScaleX; - float zTrans = Math::Sin(angle) * halfScaleX; - - //Calculate heights and edge positions - float x1 = x - xTrans, z1 = z - zTrans; - float x2 = x + xTrans, z2 = z + zTrans; - - float y1, y2; - if (heightFunction){ - y1 = heightFunction(x1, z1, heightFunctionUserData); - y2 = heightFunction(x2, z2, heightFunctionUserData); - } else { - y1 = 0; - y2 = 0; - } - - //Add vertices - *pReal++ = (x1 - page.centerPoint.x); *pReal++ = (y1 + scaleY); *pReal++ = (z1 - page.centerPoint.z); //pos - *((uint32*)pReal++) = color; //color - *pReal++ = 0; *pReal++ = 0; //uv - - *pReal++ = (x2 - page.centerPoint.x); *pReal++ = (y2 + scaleY); *pReal++ = (z2 - page.centerPoint.z); //pos - *((uint32*)pReal++) = color; //color - *pReal++ = 1; *pReal++ = 0; //uv - - *pReal++ = (x1 - page.centerPoint.x); *pReal++ = (y1); *pReal++ = (z1 - page.centerPoint.z); //pos - *((uint32*)pReal++) = color; //color - *pReal++ = 0; *pReal++ = 1; //uv - - *pReal++ = (x2 - page.centerPoint.x); *pReal++ = (y2); *pReal++ = (z2 - page.centerPoint.z); //pos - *((uint32*)pReal++) = color; //color - *pReal++ = 1; *pReal++ = 1; //uv - - //Update bounds - if (y1 < minY) minY = y1; - if (y2 < minY) minY = y2; - if (y1 + scaleY > maxY) maxY = y1 + scaleY; - if (y2 + scaleY > maxY) maxY = y2 + scaleY; - } - - vbuf->unlock(); - subMesh->vertexData->vertexBufferBinding->setBinding(0, vbuf); - - //Populate index buffer - subMesh->indexData->indexStart = 0; - subMesh->indexData->indexCount = 6 * quadCount; - subMesh->indexData->indexBuffer = HardwareBufferManager::getSingleton() - .createIndexBuffer(HardwareIndexBuffer::IT_16BIT, subMesh->indexData->indexCount, HardwareBuffer::HBU_STATIC_WRITE_ONLY); - uint16* pI = static_cast<uint16*>(subMesh->indexData->indexBuffer->lock(HardwareBuffer::HBL_DISCARD)); - for (uint16 i = 0; i < quadCount; ++i) - { - uint16 offset = i * 4; - - *pI++ = 0 + offset; - *pI++ = 2 + offset; - *pI++ = 1 + offset; - - *pI++ = 1 + offset; - *pI++ = 2 + offset; - *pI++ = 3 + offset; - } - - subMesh->indexData->indexBuffer->unlock(); - - //Finish up mesh - AxisAlignedBox bounds(page.bounds.left - page.centerPoint.x, minY, page.bounds.top - page.centerPoint.z, - page.bounds.right - page.centerPoint.x, maxY, page.bounds.bottom - page.centerPoint.z); - mesh->_setBounds(bounds); - Vector3 temp = bounds.getMaximum() - bounds.getMinimum(); - mesh->_setBoundingSphereRadius(temp.length() * 0.5f); - - LogManager::getSingleton().setLogDetail(static_cast<LoggingLevel>(0)); - mesh->load(); - LogManager::getSingleton().setLogDetail(LL_NORMAL); - - //Apply grass material to mesh - subMesh->setMaterialName(layer->material->getName()); - - //Return the mesh - return mesh.getPointer(); -} - -Mesh *GrassLoader::generateGrass_CROSSQUADS(PageInfo &page, GrassLayer *layer, float *grassPositions, unsigned int grassCount) -{ - //Calculate the number of quads to be added - unsigned int quadCount; - quadCount = grassCount * 2; - - //Create manual mesh to store grass quads - MeshPtr mesh = MeshManager::getSingleton().createManual(getUniqueID(), ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME); - SubMesh *subMesh = mesh->createSubMesh(); - subMesh->useSharedVertices = false; - - //Setup vertex format information - subMesh->vertexData = new VertexData; - subMesh->vertexData->vertexStart = 0; - subMesh->vertexData->vertexCount = 4 * quadCount; - - VertexDeclaration* dcl = subMesh->vertexData->vertexDeclaration; - size_t offset = 0; - dcl->addElement(0, offset, VET_FLOAT3, VES_POSITION); - offset += VertexElement::getTypeSize(VET_FLOAT3); - dcl->addElement(0, offset, VET_COLOUR, VES_DIFFUSE); - offset += VertexElement::getTypeSize(VET_COLOUR); - dcl->addElement(0, offset, VET_FLOAT2, VES_TEXTURE_COORDINATES); - offset += VertexElement::getTypeSize(VET_FLOAT2); - - //Populate a new vertex buffer with grass - HardwareVertexBufferSharedPtr vbuf = HardwareBufferManager::getSingleton() - .createVertexBuffer(offset, subMesh->vertexData->vertexCount, HardwareBuffer::HBU_STATIC_WRITE_ONLY, false); - float* pReal = static_cast<float*>(vbuf->lock(HardwareBuffer::HBL_DISCARD)); - - //Calculate size variance - float rndWidth = layer->maxWidth - layer->minWidth; - float rndHeight = layer->maxHeight - layer->minHeight; - - float minY = Math::POS_INFINITY, maxY = Math::NEG_INFINITY; - float *posPtr = grassPositions; //Position array "iterator" - for (uint16 i = 0; i < grassCount; ++i) - { - //Get the x and z positions from the position array - float x = *posPtr++; - float z = *posPtr++; - - //Get the color at the grass position - uint32 color; - if (layer->colorMap) - color = layer->colorMap->getColorAt(x, z); - else - color = 0xFFFFFFFF; - - //Calculate size - float rnd = Math::UnitRandom(); //The same rnd value is used for width and height to maintain aspect ratio - float halfScaleX = (layer->minWidth + rndWidth * rnd) * 0.5f; - float scaleY = (layer->minHeight + rndHeight * rnd); - - //Calculate rotation - float angle = Math::RangeRandom(0, Math::TWO_PI); - float xTrans = Math::Cos(angle) * halfScaleX; - float zTrans = Math::Sin(angle) * halfScaleX; - - //Calculate heights and edge positions - float x1 = x - xTrans, z1 = z - zTrans; - float x2 = x + xTrans, z2 = z + zTrans; - - float y1, y2; - if (heightFunction){ - y1 = heightFunction(x1, z1, heightFunctionUserData); - y2 = heightFunction(x2, z2, heightFunctionUserData); - } else { - y1 = 0; - y2 = 0; - } - - //Add vertices - *pReal++ = (x1 - page.centerPoint.x); *pReal++ = (y1 + scaleY); *pReal++ = (z1 - page.centerPoint.z); //pos - *((uint32*)pReal++) = color; //color - *pReal++ = 0; *pReal++ = 0; //uv - - *pReal++ = (x2 - page.centerPoint.x); *pReal++ = (y2 + scaleY); *pReal++ = (z2 - page.centerPoint.z); //pos - *((uint32*)pReal++) = color; //color - *pReal++ = 1; *pReal++ = 0; //uv - - *pReal++ = (x1 - page.centerPoint.x); *pReal++ = (y1); *pReal++ = (z1 - page.centerPoint.z); //pos - *((uint32*)pReal++) = color; //color - *pReal++ = 0; *pReal++ = 1; //uv - - *pReal++ = (x2 - page.centerPoint.x); *pReal++ = (y2); *pReal++ = (z2 - page.centerPoint.z); //pos - *((uint32*)pReal++) = color; //color - *pReal++ = 1; *pReal++ = 1; //uv - - //Update bounds - if (y1 < minY) minY = y1; - if (y2 < minY) minY = y2; - if (y1 + scaleY > maxY) maxY = y1 + scaleY; - if (y2 + scaleY > maxY) maxY = y2 + scaleY; - - //Calculate heights and edge positions - float x3 = x + zTrans, z3 = z - xTrans; - float x4 = x - zTrans, z4 = z + xTrans; - - float y3, y4; - if (heightFunction){ - y3 = heightFunction(x3, z3, heightFunctionUserData); - y4 = heightFunction(x4, z4, heightFunctionUserData); - } else { - y3 = 0; - y4 = 0; - } - - //Add vertices - *pReal++ = (x3 - page.centerPoint.x); *pReal++ = (y3 + scaleY); *pReal++ = (z3 - page.centerPoint.z); //pos - *((uint32*)pReal++) = color; //color - *pReal++ = 0; *pReal++ = 0; //uv - - *pReal++ = (x4 - page.centerPoint.x); *pReal++ = (y4 + scaleY); *pReal++ = (z4 - page.centerPoint.z); //pos - *((uint32*)pReal++) = color; //color - *pReal++ = 1; *pReal++ = 0; //uv - - *pReal++ = (x3 - page.centerPoint.x); *pReal++ = (y3); *pReal++ = (z3 - page.centerPoint.z); //pos - *((uint32*)pReal++) = color; //color - *pReal++ = 0; *pReal++ = 1; //uv - - *pReal++ = (x4 - page.centerPoint.x); *pReal++ = (y4); *pReal++ = (z4 - page.centerPoint.z); //pos - *((uint32*)pReal++) = color; //color - *pReal++ = 1; *pReal++ = 1; //uv - - //Update bounds - if (y3 < minY) minY = y1; - if (y4 < minY) minY = y2; - if (y3 + scaleY > maxY) maxY = y3 + scaleY; - if (y4 + scaleY > maxY) maxY = y4 + scaleY; - } - - vbuf->unlock(); - subMesh->vertexData->vertexBufferBinding->setBinding(0, vbuf); - - //Populate index buffer - subMesh->indexData->indexStart = 0; - subMesh->indexData->indexCount = 6 * quadCount; - subMesh->indexData->indexBuffer = HardwareBufferManager::getSingleton() - .createIndexBuffer(HardwareIndexBuffer::IT_16BIT, subMesh->indexData->indexCount, HardwareBuffer::HBU_STATIC_WRITE_ONLY); - uint16* pI = static_cast<uint16*>(subMesh->indexData->indexBuffer->lock(HardwareBuffer::HBL_DISCARD)); - for (uint16 i = 0; i < quadCount; ++i) - { - uint16 offset = i * 4; - - *pI++ = 0 + offset; - *pI++ = 2 + offset; - *pI++ = 1 + offset; - - *pI++ = 1 + offset; - *pI++ = 2 + offset; - *pI++ = 3 + offset; - } - - subMesh->indexData->indexBuffer->unlock(); - - //Finish up mesh - AxisAlignedBox bounds(page.bounds.left - page.centerPoint.x, minY, page.bounds.top - page.centerPoint.z, - page.bounds.right - page.centerPoint.x, maxY, page.bounds.bottom - page.centerPoint.z); - mesh->_setBounds(bounds); - Vector3 temp = bounds.getMaximum() - bounds.getMinimum(); - mesh->_setBoundingSphereRadius(temp.length() * 0.5f); - - LogManager::getSingleton().setLogDetail(static_cast<LoggingLevel>(0)); - mesh->load(); - LogManager::getSingleton().setLogDetail(LL_NORMAL); - - //Apply grass material to mesh - subMesh->setMaterialName(layer->material->getName()); - - //Return the mesh - return mesh.getPointer(); -} - -Mesh *GrassLoader::generateGrass_SPRITE(PageInfo &page, GrassLayer *layer, float *grassPositions, unsigned int grassCount) -{ - //Calculate the number of quads to be added - unsigned int quadCount; - quadCount = grassCount; - - //Create manual mesh to store grass quads - MeshPtr mesh = MeshManager::getSingleton().createManual(getUniqueID(), ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME); - SubMesh *subMesh = mesh->createSubMesh(); - subMesh->useSharedVertices = false; - - //Setup vertex format information - subMesh->vertexData = new VertexData; - subMesh->vertexData->vertexStart = 0; - subMesh->vertexData->vertexCount = 4 * quadCount; - - VertexDeclaration* dcl = subMesh->vertexData->vertexDeclaration; - size_t offset = 0; - dcl->addElement(0, offset, VET_FLOAT3, VES_POSITION); - offset += VertexElement::getTypeSize(VET_FLOAT3); - dcl->addElement(0, offset, VET_FLOAT4, VES_NORMAL); - offset += VertexElement::getTypeSize(VET_FLOAT4); - dcl->addElement(0, offset, VET_COLOUR, VES_DIFFUSE); - offset += VertexElement::getTypeSize(VET_COLOUR); - dcl->addElement(0, offset, VET_FLOAT2, VES_TEXTURE_COORDINATES); - offset += VertexElement::getTypeSize(VET_FLOAT2); - - //Populate a new vertex buffer with grass - HardwareVertexBufferSharedPtr vbuf = HardwareBufferManager::getSingleton() - .createVertexBuffer(offset, subMesh->vertexData->vertexCount, HardwareBuffer::HBU_STATIC_WRITE_ONLY, false); - float* pReal = static_cast<float*>(vbuf->lock(HardwareBuffer::HBL_DISCARD)); - - //Calculate size variance - float rndWidth = layer->maxWidth - layer->minWidth; - float rndHeight = layer->maxHeight - layer->minHeight; - - float minY = Math::POS_INFINITY, maxY = Math::NEG_INFINITY; - float *posPtr = grassPositions; //Position array "iterator" - for (uint16 i = 0; i < grassCount; ++i) - { - //Get the x and z positions from the position array - float x = *posPtr++; - float z = *posPtr++; - - //Calculate height - float y; - if (heightFunction){ - y = heightFunction(x, z, heightFunctionUserData); - } else { - y = 0; - } - - float x1 = (x - page.centerPoint.x); - float z1 = (z - page.centerPoint.z); - - //Get the color at the grass position - uint32 color; - if (layer->colorMap) - color = layer->colorMap->getColorAt(x, z); - else - color = 0xFFFFFFFF; - - //Calculate size - float rnd = Math::UnitRandom(); //The same rnd value is used for width and height to maintain aspect ratio - float halfXScale = (layer->minWidth + rndWidth * rnd) * 0.5f; - float scaleY = (layer->minHeight + rndHeight * rnd); - - //Randomly mirror grass textures - float uvLeft, uvRight; - if (Math::UnitRandom() > 0.5f){ - uvLeft = 0; - uvRight = 1; - } else { - uvLeft = 1; - uvRight = 0; - } - - //Add vertices - *pReal++ = x1; *pReal++ = y; *pReal++ = z1; //center position - *pReal++ = -halfXScale; *pReal++ = scaleY; *pReal++ = 0; *pReal++ = 0; //normal (used to store relative corner positions) - *((uint32*)pReal++) = color; //color - *pReal++ = uvLeft; *pReal++ = 0; //uv - - *pReal++ = x1; *pReal++ = y; *pReal++ = z1; //center position - *pReal++ = +halfXScale; *pReal++ = scaleY; *pReal++ = 0; *pReal++ = 0; //normal (used to store relative corner positions) - *((uint32*)pReal++) = color; //color - *pReal++ = uvRight; *pReal++ = 0; //uv - - *pReal++ = x1; *pReal++ = y; *pReal++ = z1; //center position - *pReal++ = -halfXScale; *pReal++ = 0.0f; *pReal++ = 0; *pReal++ = 0; //normal (used to store relative corner positions) - *((uint32*)pReal++) = color; //color - *pReal++ = uvLeft; *pReal++ = 1; //uv - - *pReal++ = x1; *pReal++ = y; *pReal++ = z1; //center position - *pReal++ = +halfXScale; *pReal++ = 0.0f; *pReal++ = 0; *pReal++ = 0; //normal (used to store relative corner positions) - *((uint32*)pReal++) = color; //color - *pReal++ = uvRight; *pReal++ = 1; //uv - - //Update bounds - if (y < minY) minY = y; - if (y + scaleY > maxY) maxY = y + scaleY; - } - - vbuf->unlock(); - subMesh->vertexData->vertexBufferBinding->setBinding(0, vbuf); - - //Populate index buffer - subMesh->indexData->indexStart = 0; - subMesh->indexData->indexCount = 6 * quadCount; - subMesh->indexData->indexBuffer = HardwareBufferManager::getSingleton() - .createIndexBuffer(HardwareIndexBuffer::IT_16BIT, subMesh->indexData->indexCount, HardwareBuffer::HBU_STATIC_WRITE_ONLY); - uint16* pI = static_cast<uint16*>(subMesh->indexData->indexBuffer->lock(HardwareBuffer::HBL_DISCARD)); - for (uint16 i = 0; i < quadCount; ++i) - { - uint16 offset = i * 4; - - *pI++ = 0 + offset; - *pI++ = 2 + offset; - *pI++ = 1 + offset; - - *pI++ = 1 + offset; - *pI++ = 2 + offset; - *pI++ = 3 + offset; - } - - subMesh->indexData->indexBuffer->unlock(); - - //Finish up mesh - AxisAlignedBox bounds(page.bounds.left - page.centerPoint.x, minY, page.bounds.top - page.centerPoint.z, - page.bounds.right - page.centerPoint.x, maxY, page.bounds.bottom - page.centerPoint.z); - mesh->_setBounds(bounds); - Vector3 temp = bounds.getMaximum() - bounds.getMinimum(); - mesh->_setBoundingSphereRadius(temp.length() * 0.5f); - - LogManager::getSingleton().setLogDetail(static_cast<LoggingLevel>(0)); - mesh->load(); - LogManager::getSingleton().setLogDetail(LL_NORMAL); - - //Apply grass material to mesh - subMesh->setMaterialName(layer->material->getName()); - - //Return the mesh - return mesh.getPointer(); -} - -GrassLayer::GrassLayer(PagedGeometry *geom, GrassLoader *ldr) -{ GrassLayer::geom = geom; GrassLayer::parent = ldr; @@ -674,8 +72,25 @@ colorMap->unload(); } -void GrassLayer::setMaterialName(const String &matName) +uint32 GrassLayer::calculateMaxGrassCount(float densityFactor, float volume) { + return density * densityFactor * volume; +} + +uint32 GrassLayer::_populateGrassList(PageInfo page, float *posBuff, uint32 grassCount) +{ + if (densityMap){ + if (densityMap->getFilter() == MAPFILTER_NONE) + return _populateGrassList_UnfilteredDM(page, posBuff, grassCount); + else if (densityMap->getFilter() == MAPFILTER_BILINEAR) + return _populateGrassList_BilinearDM(page, posBuff, grassCount); + } + return _populateGrassList_Uniform(page, posBuff, grassCount); + +} + +void GrassLayerBase::setMaterialName(const String &matName) +{ if (material.isNull() || matName != material->getName()){ material = MaterialManager::getSingleton().getByName(matName); if (material.isNull()) @@ -684,13 +99,13 @@ } } -void GrassLayer::setMinimumSize(float width, float height) +void GrassLayerBase::setMinimumSize(float width, float height) { minWidth = width; minHeight = height; } -void GrassLayer::setMaximumSize(float width, float height) +void GrassLayerBase::setMaximumSize(float width, float height) { maxWidth = width; if (maxHeight != height){ @@ -699,7 +114,7 @@ } } -void GrassLayer::setRenderTechnique(GrassTechnique style, bool blendBase) +void GrassLayerBase::setRenderTechnique(GrassTechnique style, bool blendBase) { if (blend != blendBase || renderTechnique != style){ blend = blendBase; @@ -708,7 +123,7 @@ } } -void GrassLayer::setFadeTechnique(FadeTechnique style) +void GrassLayerBase::setFadeTechnique(FadeTechnique style) { if (fadeTechnique != style){ fadeTechnique = style; @@ -716,7 +131,7 @@ } } -void GrassLayer::setAnimationEnabled(bool enabled) +void GrassLayerBase::setAnimationEnabled(bool enabled) { if (animate != enabled){ animate = enabled; @@ -756,14 +171,14 @@ densityMap->setFilter(densityMapFilter); } -unsigned int GrassLayer::_populateGrassList_Uniform(PageInfo page, float *posBuff, unsigned int grassCount) +uint32 GrassLayer::_populateGrassList_Uniform(PageInfo page, float *posBuff, uint32 grassCount) { float *posPtr = posBuff; //No density map if (!minY && !maxY){ //No height range - for (unsigned int i = 0; i < grassCount; ++i){ + for (uint32 i = 0; i < grassCount; ++i){ //Pick a random position float x = Math::RangeRandom(page.bounds.left, page.bounds.right); float z = Math::RangeRandom(page.bounds.top, page.bounds.bottom); @@ -783,7 +198,7 @@ if (minY) min = minY; else min = Math::NEG_INFINITY; if (maxY) max = maxY; else max = Math::POS_INFINITY; - for (unsigned int i = 0; i < grassCount; ++i){ + for (uint32 i = 0; i < grassCount; ++i){ //Pick a random position float x = Math::RangeRandom(page.bounds.left, page.bounds.right); float z = Math::RangeRandom(page.bounds.top, page.bounds.bottom); @@ -809,14 +224,14 @@ return grassCount; } -unsigned int GrassLayer::_populateGrassList_UnfilteredDM(PageInfo page, float *posBuff, unsigned int grassCount) +uint32 GrassLayer::_populateGrassList_UnfilteredDM(PageInfo page, float *posBuff, uint32 grassCount) { float *posPtr = posBuff; //Use density map if (!minY && !maxY){ //No height range - for (unsigned int i = 0; i < grassCount; ++i){ + for (uint32 i = 0; i < grassCount; ++i){ //Pick a random position float x = Math::RangeRandom(page.bounds.left, page.bounds.right); float z = Math::RangeRandom(page.bounds.top, page.bounds.bottom); @@ -835,7 +250,7 @@ if (minY) min = minY; else min = Math::NEG_INFINITY; if (maxY) max = maxY; else max = Math::POS_INFINITY; - for (unsigned int i = 0; i < grassCount; ++i){ + for (uint32 i = 0; i < grassCount; ++i){ //Pick a random position float x = Math::RangeRandom(page.bounds.left, page.bounds.right); float z = Math::RangeRandom(page.bounds.top, page.bounds.bottom); @@ -860,13 +275,13 @@ return grassCount; } -unsigned int GrassLayer::_populateGrassList_BilinearDM(PageInfo page, float *posBuff, unsigned int grassCount) +uint32 GrassLayer::_populateGrassList_BilinearDM(PageInfo page, float *posBuff, uint32 grassCount) { float *posPtr = posBuff; if (!minY && !maxY){ //No height range - for (unsigned int i = 0; i < grassCount; ++i){ + for (uint32 i = 0; i < grassCount; ++i){ //Pick a random position float x = Math::RangeRandom(page.bounds.left, page.bounds.right); float z = Math::RangeRandom(page.bounds.top, page.bounds.bottom); @@ -885,7 +300,7 @@ if (minY) min = minY; else min = Math::NEG_INFINITY; if (maxY) max = maxY; else max = Math::POS_INFINITY; - for (unsigned int i = 0; i < grassCount; ++i){ + for (uint32 i = 0; i < grassCount; ++i){ //Pick a random position float x = Math::RangeRandom(page.bounds.left, page.bounds.right); float z = Math::RangeRandom(page.bounds.top, page.bounds.bottom); @@ -943,7 +358,7 @@ colorMap->setFilter(colorMapFilter); } -void GrassLayer::_updateShaders() +void GrassLayerBase::_updateShaders() { if (shaderNeedsUpdate){ shaderNeedsUpdate = false; @@ -1149,3 +564,4 @@ node->setVisible(visible); } } +} Modified: trunk/python-ogre/ThirdParty/forests/GrassLoader.h =================================================================== --- trunk/python-ogre/ThirdParty/forests/GrassLoader.h 2008-02-24 08:05:30 UTC (rev 578) +++ trunk/python-ogre/ThirdParty/forests/GrassLoader.h 2008-03-09 11:11:30 UTC (rev 579) @@ -1,5 +1,6 @@ /*------------------------------------------------------------------------------------- Copyright (c) 2006 John Judnich +Modified 2008 by Erik Hjortsberg (eri...@it...) This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: @@ -14,22 +15,57 @@ #include "PagedGeometry.h" #include "PropertyMaps.h" -#include "OgrePrerequisites.h" -#include "OgreMaterial.h" -#include "OgrePixelFormat.h" -#include "OgreStringConverter.h" +#include <OgrePrerequisites.h> +#include <OgreMaterial.h> +#include <OgrePixelFormat.h> +#include <OgreStringConverter.h> +#include <OgreMeshManager.h> +#include <OgreRoot.h> +#include <OgreTimer.h> +#include <OgreCamera.h> +#include <OgreVector3.h> +#include <OgreQuaternion.h> +#include <OgreEntity.h> +#include <OgreString.h> +#include <OgreStringConverter.h> +#include <OgreMaterialManager.h> +#include <OgreMaterial.h> +#include <OgreHardwareBufferManager.h> +#include <OgreHardwareBuffer.h> +#include <OgreMeshManager.h> +#include <OgreMesh.h> +#include <OgreSubMesh.h> +#include <OgreLogManager.h> +#include <OgreTextureManager.h> +#include <OgreHardwarePixelBuffer.h> +#include <OgreRenderSystem.h> +#include <OgreRenderSystemCapabilities.h> +#include <OgreHighLevelGpuProgram.h> +#include <OgreHighLevelGpuProgramManager.h> + +namespace PagedGeometry { + class GrassLayer; +class GrassLayerBase; /** \brief A PageLoader-derived object you can use with PagedGeometry to produce realistic grass. Using a GrassLoader is simple - simply create an instance, attach it to your PagedGeometry object with PagedGeometry::setPageLoader(), and add your grass. Important: For best performance, it is recommended that you use GrassPage (included in GrassLoader.h) to display geometry loaded by GrassLoader. + This page type is designed for best performance with this grass system. BatchPage will work, although performance will be reduced slightly, and ImpostorPage will run extremely slow. +When creating a GrassLoader you must specify the class which will be used for creating layers. By default a GrassLayer class is provided, which can be used as this: +\code + ::PagedGeometry::GrassLoader<GrassLayer> loader = new ::PagedGeometry::GrassLoader<GrassLayer>(grass); +\endcode +It's also possible for you to provide your own GrassLayer implementation by overriding the class GrassLayerBase. This will allow you to have much more control over how the grass is placed. + + To add grass, just call addLayer(). addLayer() returns a GrassLayer object pointer, which you should use to further configure your newly added grass. Properties like size, density, color, animation, etc. can be controlled through the GrassLayer class. @@ -43,6 +79,7 @@ keep in mind that calculating the height of Ogre's built-in terrain this way can be VERY slow if not done properly, and may cause stuttering due to long paging delays. */ +template <typename TGrassLayer> class GrassLoader: public PageLoader { public: @@ -64,18 +101,18 @@ functions to vary grass size and density levels as desired. \see GrassLayer class for more information. */ - GrassLayer *addLayer(const Ogre::String &material); + TGrassLayer *addLayer(const Ogre::String &material); /** \brief Removes and deletes a grass layer from the scene This function simply deletes a GrassLayer previously created with addLayer(). */ - void deleteLayer(GrassLayer *layer); + void deleteLayer(TGrassLayer *layer); /** \brief Returns a list of added grass layers. This function returns a std::list<GrassLayer*> reference, which contains all grass layers which have been added to this GrassLoader. */ - inline std::list<GrassLayer*> &getLayerList() { return layerList; } + inline std::list<TGrassLayer*> &getLayerList() { return layerList; } /** \brief Sets the global wind direction for this GrassLoader. @@ -179,12 +216,12 @@ friend class GrassLayer; //Helper functions - Ogre::Mesh *generateGrass_QUAD(PageInfo &page, GrassLayer *layer, float *grassPositions, unsigned int grassCount); - Ogre::Mesh *generateGrass_CROSSQUADS(PageInfo &page, GrassLayer *layer, float *grassPositions, unsigned int grassCount); - Ogre::Mesh *generateGrass_SPRITE(PageInfo &page, GrassLayer *layer, float *grassPositions, unsigned int grassCount); + Ogre::Mesh *generateGrass_QUAD(PageInfo &page, TGrassLayer *layer, float *grassPositions, unsigned int grassCount); + Ogre::Mesh *generateGrass_CROSSQUADS(PageInfo &page, TGrassLayer *layer, float *grassPositions, unsigned int grassCount); + Ogre::Mesh *generateGrass_SPRITE(PageInfo &page, TGrassLayer *layer, float *grassPositions, unsigned int grassCount); //List of grass types - std::list<GrassLayer*> layerList; + std::list<TGrassLayer*> layerList; //Height data Ogre::Real (*heightFunction)(Ogre::Real x, Ogre::Real z, void *userData); //Pointer to height function @@ -208,6 +245,9 @@ }; + + + /** \brief A technique used to render grass. Passed to GrassLayer::setRenderTechnique(). */ enum GrassTechnique { @@ -230,8 +270,129 @@ FADETECH_ALPHAGROW }; +class GrassLayerBase +{ +public: + /** \brief Sets the material that is applied to all grass billboards/quads */ + void setMaterialName(const Ogre::String &matName); + /** \brief Sets the minimum size that grass quads/billboards will be */ + void setMinimumSize(float width, float height); + /** \brief Sets the maximum size that grass quads/billboards will be */ + void setMaximumSize(float width, float height); + + /** \brief Sets the technique used to render this grass layer + \param style The GrassTechnique style used to display grass. + \param blendBase Whether or not grass base blending is enabled. + + The "style" setting allows you to choose from various construction methods, such as + sprite-style grass quads, plain 3D quads, etc. See the GrassTechnique documentation + for more information about this option. GRASSTECH_QUAD is used by default. + + Setting "blendBase" to true will enable grass base blending, a technique which helps + reduce the unnatural flat appearance of grass quads near the camera. Since the flatness + is most obvious where the grass intersects the terrain, this technique attempts to + smoothly blend the base of near-by grass into the terrain. + + \note Base blending does not work well with alpha-rejected textures. + */ + void setRenderTechnique(GrassTechnique style, bool blendBase = false); + + /** \brief Sets the technique used when fading out distant grass + \param style The FadeTechnique style used to fade grass. + + This "style" setting allows you to choose from various fade techniques. Depending on + your scene, certain techniques may look better than others. The most compatible method + is FADETECH_ALPHA (used by default), although better results can usually be achieved + with other methods. See the FadeTechnique documentation for more information. + */ + void setFadeTechnique(FadeTechnique style); + + /** \brief Enables/disables animation on this layer + + Always use this function to disable animation, rather than setting SwayLength or SwaySpeed + to 0. This function will use a different vertex shader which means improved performance + when animation is disabled. + */ + void setAnimationEnabled(bool enabled); + + /** \brief Sets how far grass should sway back and forth + + \note Since this is measured in world units, you may have to adjust this depending on + the size of your grass as set by setMinimumSize() and setMaximumSize().*/ + void setSwayLength(float mag) { animMag = mag; } + + /** \brief Sets the sway speed of the grass (measured in "sways-per-second") */ + void setSwaySpeed(float speed) { animSpeed = speed; } + + /** \brief Sets the smooth distribution (positional phase shift) of the grass swaying animation + + If you set this to 0, grass animation will look very unnatural, since all the grass sway motions + will be in perfect synchronization (everything sways to the right, then everything sways to the + left, etc.) This sets the "positional phase shift", which gives the grass a "wave" like phase + distribution. The higher this value is, the more "chaotic" the wind will appear. Lower values give + a smoother breeze appearance, but values too high can look unrealistic. + */ + void setSwayDistribution(float freq) { animFreq = freq; } + + /** \brief Sets the boundaries of the density/color maps + \param bounds The map boundary + + By default, the GrassLayer has no knowledge of your terrain/world boundaries, so you must + use this function to specify a rectangular/square area of your world, otherwise density/color maps + won't work properly. The boundary given to this function defines the area where density/color + maps take effect. Normally this is set to your terrain's bounds so the density/color map is aligned + to your heightmap, but you could apply it anywhere you want. + + \note The grass system is infinite, so there's no need to worry about using too expansive + boundaries. This setting simply configures the behavior of density and color maps. */ + virtual void setMapBounds(const Ogre::TRect<Ogre::Real> &bounds) + { + mapBounds = bounds; + } + + + /** + * Calculates the max number of grass instances for this layer. + * @param densityFactor The density factor set on the grass loader + * @param volume The volume, in world units, to fill + * @return The max number of grass instances to create. + */ + virtual unsigned int calculateMaxGrassCount(float densityFactor, float volume) = 0; + +protected: + + //Used by GrassLoader::loadPage() - populates an array with grass. + //Returns the final number of grasses, which will always be <= grassCount + virtual unsigned int _populateGrassList(PageInfo page, float *posBuff, unsigned int grassCount) = 0; + + //Updates the vertex shader used by this layer based on the animate enable status + void _updateShaders(); + + //Grass material/shape properties + Ogre::MaterialPtr material; + float minWidth, maxWidth; + float minHeight, maxHeight; + + FadeTechnique fadeTechnique; + GrassTechnique renderTechnique; + + //Property maps + Ogre::TRect<Ogre::Real> mapBounds; + + //Grass shader properties + bool animate, blend, shaderNeedsUpdate; + float animMag, animSpeed, animFreq; + + //Current frame of animation for this layer + float waveCount; + + PagedGeometry *geom; + +}; + + /** \brief A data structure giving you full control over grass properties. Grass is added to the scene through GrassLoader::addLayer(). Through this class you @@ -242,18 +403,10 @@ with GrassLoader::addLayer(), and may not be deleted manually (they will be deleted when the associated GrassLoader is deleted). */ -class GrassLayer +class GrassLayer : public GrassLayerBase { public: - /** \brief Sets the material that is applied to all grass billboards/quads */ - void setMaterialName(const Ogre::String &matName); - /** \brief Sets the minimum size that grass quads/billboards will be */ - void setMinimumSize(float width, float height); - - /** \brief Sets the maximum size that grass quads/billboards will be */ - void setMaximumSize(float width, float height); - /** \brief Sets the maximum density (measured in grass quads/billboards per square unit) of grass */ void setDensity(float density) { this->density = density; } @@ -359,26 +512,6 @@ */ void setColorMapFilter(MapFilter filter); - /** \brief Sets the boundaries of the density/color maps - \param bounds The map boundary - - By default, the GrassLayer has no knowledge of your terrain/world boundaries, so you must - use this function to specify a rectangular/square area of your world, otherwise density/color maps - won't work properly. The boundary given to this function defines the area where density/color - maps take effect. Normally this is set to your terrain's bounds so the density/color map is aligned - to your heightmap, but you could apply it anywhere you want. - - \note The grass system is infinite, so there's no need to worry about using too expansive - boundaries. This setting simply configures the behavior of density and color maps. */ - void setMapBounds(const Ogre::TRect<Ogre::Real> &bounds) - { - mapBounds = bounds; - if (densityMap) - densityMap->setMapBounds(mapBounds); - if (colorMap) - colorMap->setMapBounds(mapBounds); - } - /** \brief Gets a pointer to the density map being used You can use this function to access the internal density map object used by the GrassLoader. @@ -401,71 +534,62 @@ don't, the grass you see will remain unchanged. */ ColorMap *getColorMap() { return colorMap; } - /** \brief Sets the technique used to render this grass layer - \param style The GrassTechnique style used to display grass. - \param blendBase Whether or not grass base blending is enabled. - - The "style" setting allows you to choose from various construction methods, such as - sprite-style grass quads, plain 3D quads, etc. See the GrassTechnique documentation - for more information about this option. GRASSTECH_QUAD is used by default. - Setting "blendBase" to true will enable grass base blending, a technique which helps - reduce the unnatural flat appearance of grass quads near the camera. Since the flatness - is most obvious where the grass intersects the terrain, this technique attempts to - smoothly blend the base of near-by grass into the terrain. - - \note Base blending does not work well with alpha-rejected textures. - */ - void setRenderTechnique(GrassTechnique style, bool blendBase = false); - - /** \brief Sets the technique used when fading out distant grass - \param style The FadeTechnique style used to fade grass. + /** \brief Sets the boundaries of the density/color maps + \param bounds The map boundary - This "style" setting allows you to choose from various fade techniques. Depending on - your scene, certain techniques may look better than others. The most compatible method - is FADETECH_ALPHA (used by default), although better results can usually be achieved - with other methods.... [truncated message content] |
From: <and...@us...> - 2008-02-24 08:05:24
|
Revision: 578 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=578&view=rev Author: andy_miller Date: 2008-02-24 00:05:30 -0800 (Sun, 24 Feb 2008) Log Message: ----------- Various updates for the 1.2 release --and force Py++ to rev 1234 Revision Links: -------------- http://python-ogre.svn.sourceforge.net/python-ogre/?rev=1234&view=rev Modified Paths: -------------- trunk/python-ogre/ChangeLog.txt trunk/python-ogre/PythonOgreConfig_nt.py trunk/python-ogre/PythonOgreConfig_posix.py trunk/python-ogre/PythonOgreInstallCreator.iss trunk/python-ogre/ThirdParty/betagui/BetaGUI.h trunk/python-ogre/ThirdParty/betagui/BetaGui.cpp trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgrePhysXDriver.cpp trunk/python-ogre/ThirdParty/nxogre_0.9/NxOgreWorld.cpp trunk/python-ogre/ThirdParty/ogreal/OgreALOggSound.cpp trunk/python-ogre/ThirdParty/ogreal/OgreALSound.cpp trunk/python-ogre/ThirdParty/ogreal/OgreALWavSound.cpp trunk/python-ogre/code_generators/betagui/generate_code.py trunk/python-ogre/code_generators/betagui/python_betagui_aliases.h trunk/python-ogre/code_generators/common_utils/__init__.py trunk/python-ogre/code_generators/navi/generate_code.py trunk/python-ogre/code_generators/navi/python_navi_aliases.h trunk/python-ogre/code_generators/navi/python_navi_sizeof.h trunk/python-ogre/code_generators/nxogre_09/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/quickgui/generate_code.py trunk/python-ogre/demos/cegui/plugins.cfg trunk/python-ogre/demos/et/plugins.cfg trunk/python-ogre/demos/navi/ogre.cfg trunk/python-ogre/demos/navi/plugins.cfg trunk/python-ogre/demos/navi/resources.cfg trunk/python-ogre/demos/nxogre/CakeFramework.py trunk/python-ogre/demos/nxogre/Demo_102.py trunk/python-ogre/demos/nxogre/config.yaml trunk/python-ogre/demos/ogreal/Demo_RenderToTexture.py trunk/python-ogre/demos/ogreforests/Demo_Forest.py trunk/python-ogre/demos/ogreforests/plugins.cfg trunk/python-ogre/demos/particleuniverse/Demo_Particle.py trunk/python-ogre/demos/plib/Demo_Sound.py trunk/python-ogre/demos/qgui/Demo_QuickGUI01.py trunk/python-ogre/demos/qgui/media/skins/qgui/SkinSet.qgui.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.skinset trunk/python-ogre/demos/theora/demo_video.py trunk/python-ogre/environment.py trunk/python-ogre/scripts/UpdateDLLs.bat trunk/python-ogre/scripts/compilesource.bat trunk/python-ogre/scripts/epydoc_config Added Paths: ----------- trunk/python-ogre/demos/Enums.py Modified: trunk/python-ogre/ChangeLog.txt =================================================================== --- trunk/python-ogre/ChangeLog.txt 2008-02-23 06:13:35 UTC (rev 577) +++ trunk/python-ogre/ChangeLog.txt 2008-02-24 08:05:30 UTC (rev 578) @@ -1,5 +1,12 @@ -Feb 2008: Release -================= +Feb 19 2008: Release 1.2 RC1 +====================== +ISSUES: +This is an "Release Candiate 1" release so there are some things that are not completed: + NAVI -- Doesn't work + NxOgre -- Bleeding -- not yet wrapped + NxOgre_09 -- Wrapper improvements, not yet completed + QuickGUI - Demo needs to be rewritten + Code Generation: * Fix to the Automatic Function transformation code as it wasn't picking up constant void pointers. This fixes PixelUtil::unpackColour and a number of other functions @@ -7,7 +14,7 @@ * Fix to OgreForests as the API had changed in base C++ library * Fix to Py++ to remove reference when building wrapper code in "transformers.py" - bug showed in renderQueueListener * Fix to BuildModule.py to only set the environment once (-C now works for compiling everything) -* Fix to ComonUtils/__init__.py - Free Functions wheren't being handled by Futional Transformation or Return Pointer fixing. +* Fix to ComonUtils/__init__.py - Free Functions wheren't being handled by Futional Transformation or Return Pointer fixing * Enhancements to MemoryDataStream to make it simplier to use (can be used for any 'DataStream' requirements) Updates and General Library Improvements to: @@ -16,11 +23,12 @@ * Particle Universe 0.6 * Bullet 2.66 * Caelum Rev 127 and updated media. -* Physx - free functions are now exposed so should work as an independ library +* Physx - free functions are now exposed so should work as an independ library +* Ogrevideoffmpeg - updated to latest ffmpeg -New Modules: +No New Modules in this release -- however looking at... * Hydrax 0.1 -* opensteer +* opensteer Janurary 08 2008: Snapshot ========================== @@ -48,7 +56,7 @@ Module Specifics: * betagui -- now using version 2.x of the source code -* bullet -- Updated to verssion 2.64 +* bullet -- Updated to version 2.64 * caleum -- SVN version r112 - small change to hanve noncopyable changes * cegui -- still using 0.5.0, small changes to generator for noncopyable classes * et -- no changes - built on 2.2 source Modified: trunk/python-ogre/PythonOgreConfig_nt.py =================================================================== --- trunk/python-ogre/PythonOgreConfig_nt.py 2008-02-23 06:13:35 UTC (rev 577) +++ trunk/python-ogre/PythonOgreConfig_nt.py 2008-02-24 08:05:30 UTC (rev 578) @@ -59,8 +59,8 @@ PATH_noise= os.path.join(PATH_THIRDPARTY, 'noise') PATH_ofusion= os.path.join(PATH_THIRDPARTY, 'ofusion') PATH_cadunetree= os.path.join(PATH_THIRDPARTY, 'cadunetree') +PATH_opensteer = os.path.join(BASE_DIR, 'opensteer', 'trunk') - PATH_ogrevideoffmpeg = os.path.join(PATH_THIRDPARTY,'ffmpeg') PATH_Bullet= os.path.join(BASE_DIR, 'bullet-2.66') PATH_PhysX= "c:/program files/AGEIA Technologies/SDK/v2.7.3/SDKs" @@ -101,7 +101,7 @@ PATH_LIB_Bullet = os.path.join(PATH_Bullet, 'out/release8/libs' ) PATH_LIB_Theora= os.path.join(PATH_Theora, 'bin', 'Release') PATH_LIB_ogrevideoffmpeg = PATH_ogrevideoffmpeg -PATH_LIB_ffmpeg= os.path.join(PATH_ffmpeg, 'lib') +PATH_LIB_ffmpeg= os.path.join(BASE_DIR, 'ffmpeg', 'lib') PATH_LIB_plib = PATH_plib PATH_LIB_navi= os.path.join(PATH_navi, 'lib') PATH_LIB_ogredshow = PATH_ogredshow @@ -110,9 +110,10 @@ PATH_LIB_Ogre_CEGUIRenderer = os.path.join( PATH_Ogre, 'lib') PATH_LIB_OIS = os.path.join( PATH_Ogre, 'Dependencies/lib/Release') ## NOTE Posix platforms this lives in'lib' not 'dll' PATH_LIB_CEGUI = os.path.join( PATH_Ogre, 'lib' ) + +PATH_LIB_opensteer = os.path.join(PATH_opensteer, 'win32','release') - PATH_INCLUDE_Ogre= os.path.join(PATH_Ogre,'OgreMain/include') PATH_INCLUDE_Ogre_Dependencies = os.path.join( PATH_Ogre, 'Dependencies/include') PATH_INCLUDE_OIS = os.path.join(PATH_OIS,'includes') ## Note the plural include's @@ -171,6 +172,8 @@ ,os.path.join(PATH_PhysX, 'NxCharacter','include') ,os.path.join(PATH_PhysX, 'NxExtensions','include') ] +PATH_INCLUDE_opensteer = os.path.join(PATH_opensteer, 'include') +PATH_INCLUDE_opensteer_opensteer = os.path.join(PATH_opensteer, 'include', 'OpenSteer') if SDK: PATH_INCLUDE_OIS = os.path.join(PATH_Ogre,'Dependencies/include/OIS') ## Note the plural include's Modified: trunk/python-ogre/PythonOgreConfig_posix.py =================================================================== --- trunk/python-ogre/PythonOgreConfig_posix.py 2008-02-23 06:13:35 UTC (rev 577) +++ trunk/python-ogre/PythonOgreConfig_posix.py 2008-02-24 08:05:30 UTC (rev 578) @@ -77,6 +77,7 @@ PATH_navi = os.path.join(BASE_DIR, 'navi','Navi') 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') ### @@ -115,6 +116,7 @@ PATH_LIB_plib = PATH_plib 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_Ogre= os.path.join(LOCAL_INCLUDE,'OGRE') # os.path.join(PATH_Ogre,'OgreMain/include') @@ -180,3 +182,5 @@ ,os.path.join(physxbase, 'NxExtensions','include') ,os.path.join(physxbase, 'Physics','include') ] +PATH_INCLUDE_opensteer = os.path.join(LOCAL_INCLUDE, 'OpenSteer') +PATH_INCLUDE_opensteer_opensteer = os.path.join(LOCAL_INCLUDE, 'OpenSteer') Modified: trunk/python-ogre/PythonOgreInstallCreator.iss =================================================================== --- trunk/python-ogre/PythonOgreInstallCreator.iss 2008-02-23 06:13:35 UTC (rev 577) +++ trunk/python-ogre/PythonOgreInstallCreator.iss 2008-02-24 08:05:30 UTC (rev 578) @@ -3,13 +3,13 @@ ; [Setup] AppName=Python-Ogre -AppVerName=Python-Ogre 1.2 +AppVerName=Python-Ogre 1.2 RC1 DefaultDirName=C:\PythonOgre DefaultGroupName=Python-Ogre OutputBaseFilename=PythonOgreInstaller OutputDir=C:\temp SourceDir=C:\Development\PythonOgreRelease -VersionInfoDescription=Release 1.2 of Python-Ogre +VersionInfoDescription=Release 1.2 RC1 of Python-Ogre AllowNoIcons=true AppPublisher=OpenSource (Andy and Team) AppPublisherURL=http://www.python-ogre.org @@ -220,7 +220,7 @@ 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 +;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 @@ -233,8 +233,11 @@ Name: {group}\Plib Demos\Networking - Client; Filename: {code:GetPythonExe}; Parameters: Demo_Client.py; WorkingDir: {app}\Demos\plib ;Name: {group}\Plib Demos\Sound; Filename: {code:GetPythonExe}; Parameters: Demo_Sound.py; WorkingDir: {app}\Demos\plib -Name: {group}\OgreForests Demos\ogreforests; Filename: {code:GetPythonExe}; Parameters: Demo_Forest.py; WorkingDir: {app}\Demos\ogreforests -Name: {group}\Editable Terrain Demo\Editable Terrain; Filename: {code:GetPythonExe}; Parameters: Demo_CEGUI_ET.py; WorkingDir: {app}\Demos\et +Name: {group}\Special Effects\Forests; Filename: {code:GetPythonExe}; Parameters: Demo_Forest.py; WorkingDir: {app}\Demos\ogreforests +Name: {group}\Special Effects\Editable Terrain; Filename: {code:GetPythonExe}; Parameters: Demo_CEGUI_ET.py; WorkingDir: {app}\Demos\et +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}\Uninstall Python-Ogre; Filename: {uninstallexe} Name: {group}\Python-Ogre API Documenatation; Filename: {app}\docs\Python-Ogre.chm Modified: trunk/python-ogre/ThirdParty/betagui/BetaGUI.h =================================================================== --- trunk/python-ogre/ThirdParty/betagui/BetaGUI.h 2008-02-23 06:13:35 UTC (rev 577) +++ trunk/python-ogre/ThirdParty/betagui/BetaGUI.h 2008-02-24 08:05:30 UTC (rev 578) @@ -1,244 +1,638 @@ -// Betajaen's GUI "BetaGUI 2.0", Version 35-uncompressed, http://www.ogre3d.org/wiki/index.php/BetaGUI -// -// Copyright (c) 2007 Robin Southern <bet...@ih...> -// -// Permission is hereby granted, free of charge, to any person -// obtaining a copy of this software and associated documentation -// files (the "Software"), to deal in the Software without -// restriction, including without limitation the rights to use, -// copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following -// conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -// OTHER DEALINGS IN THE SOFTWARE. - #ifndef BETAGUI_H #define BETAGUI_H +/// Betajaen's GUI 016 Uncompressed +/// Written by Robin "Betajaen" Southern 07-Nov-2006, http://www.ogre3d.org/wiki/index.php/BetaGUI +/// This code is under the Whatevar! licence. Do what you want; but keep the original copyright header. + #include "Ogre.h" +#include "OgreTextAreaOverlayElement.h" -#pragma pointers_to_members(full_generality, virtual_inheritance) +#include <iostream> -namespace BetaGUI { - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - class GUI; - class Style; - struct WindowStyle; - struct WidgetStyle; - class Window; - class Widget; - class Button; - class TextInput; - class Slider; - class NumericSlider; - class StringSlider; - class Meter; - class Select; - class GUIListener{}; - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - enum WindowFeatureType { WFT_NONE = 0, WFT_MOVE, WFT_RESIZE, WFT_RESIZE_AND_MOVE, WFT_ON_TOP }; - enum FocusState { FS_NONE = 0, FS_SELECT, FS_SELECT_OFF, FS_DRAG }; - enum SpecialKey { SK_BACKSPACE = 0, SK_ENTER, SK_TAB, SK_ESCAPE }; - enum WindowRole { WR_NONE = 0, WR_DRAG, WR_RESIZE, WR_CLOSE }; - enum WindowMode { WM_NONE = 0, WM_DRAG, WM_RESIZE, WM_LMB_DOWN, WM_SLIDER_MOVE }; - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - typedef void (BetaGUI::GUIListener::*ButtonMethodPtr)(BetaGUI::Button*, BetaGUI::FocusState); - typedef void (BetaGUI::GUIListener::*SliderMethodPtr)(BetaGUI::Slider*, BetaGUI::FocusState); - typedef void (BetaGUI::GUIListener::*TextInputMethodPtr)(BetaGUI::TextInput*, BetaGUI::FocusState); - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - class GUI { friend class Window;friend class Button;friend class TextInput; +using namespace Ogre; +using namespace std; + +namespace BetaGUI +{ + //------------------------------------------------------------------------------------------------ + class GUI; + + class Widget; + class Window; + + class Button; + class BoolButton; + class MenuButton; + class RealButton; + + class StaticText; + class TextInput; + + class Callback; + + class Effect; + class AlphaEffect; + class MoveEffect; + class SizeEffect; + + //------------------------------------------------------------------------------------------------ + enum WindowFeatureType + { + WFT_NONE = 0, + WFT_MOVE , + WFT_RESIZE , + WFT_RESIZE_AND_MOVE + }; + //------------------------------------------------------------------------------------------------ + enum WindowPlacementType + { + WPT_NONE = 0, + WPT_VERTICAL , + WPT_HORIZONTAL + }; + //------------------------------------------------------------------------------------------------ + enum WindowActivity + { + WA_NONE = 0, + WA_MOVE , + WA_RESIZE , + WA_PRESS + }; + //------------------------------------------------------------------------------------------------ + class GUI + { public: - GUI(Ogre::RenderWindow*); + + friend class Window; + + friend class Button; + + friend class MenuButton; + friend class BoolButton; + friend class RealButton; + + friend class StaticText; + friend class TextInput; + + GUI(const Ogre::String &baseOverlay, const Ogre::String &font, int fontSize, Ogre::RenderWindow *win); + ~GUI(); - - bool injectRelMouse(int RelX, int RelY, bool selectDown); - bool injectMouse(unsigned int ScreenX, unsigned int ScreenY, bool selectDown); - bool injectKey(const Ogre::String& key, unsigned int x, unsigned int y); - void injectSpecialKey(SpecialKey, unsigned int ScreenX, unsigned int ScreenY); - - Style* createStyle(const Ogre::String& name); - Window* createWindow(int x, int y, unsigned int width, unsigned int height, const Ogre::String& Style, WindowFeatureType type, const Ogre::String& caption, GUIListener*); - void destroyWindow(Window *window); - - Ogre::OverlayContainer* createMousePointer(const Ogre::String& material, unsigned int w, unsigned int h); - Ogre::OverlayContainer* createOverlayFromWidgetStyle(const Ogre::String &name, const Ogre::String &style, const Ogre::String &widget, int x, int y, const Ogre::String &caption = ""); - Ogre::OverlayContainer* createOverlayFromWindowStyle(const Ogre::String &name, const Ogre::String &style, int x, int y, int w, int h); - protected: - void __updateCenteredOverlay(Ogre::OverlayContainer*); - Ogre::OverlayContainer* __getOverlay(const Ogre::String&, const Ogre::String& = "Panel", int x=0, int y=0, int w=0,int h=0); - Ogre::Overlay* mOverlay; // Main sheet overlay - std::vector<Window*> mWindow; // Windows - std::map<Ogre::String, Style*> mStyle; // Styles - Window *mWindowToDestroy; // Window to destroy - Ogre::OverlayContainer* mMousePointer; // Mouse Pointer Overlay - unsigned int mWindowCount, mButtonCount, mTextInputCount, mRenderWindowWidth, mRenderWindowHeight; - Ogre::Real mWindowRatio; - }; - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - class Window { friend class Button;friend class TextInput;friend class GUI; + void sortZOrder() ; + + void setZRangeOrder(int nearZ, int FarZ); + + bool injectMouse(int x, int y, bool LMB); + bool injectMouse(float x, float y, bool LMB); + + bool injectKey(const Ogre::String &key, int x, int y); + + void injectBackspace(int x, int y); + + Window* createWindow( + const Ogre::Vector4 &Dimensions, + const Ogre::String &Material, + WindowFeatureType type, + const Ogre::String &caption = ""); + + void destroyWindow(Window *window) { + mNextWindowToDestroy=window; + } + Ogre::OverlayContainer* createOverlay(const Ogre::String &name, + const Ogre::Vector2 &position, + const Ogre::Vector2 &dimensions, + const Ogre::String &material = "", + const Ogre::String &caption = ""); + + Ogre::OverlayContainer* createMousePointer(Ogre::Vector2 dimensions, + const Ogre::String &material); + + + + Window *addMenuWindow(const Ogre::Vector2 dimensions); + + void update(Ogre::Real timeElapsed); + void addEffect (Effect* e); + Ogre::Real getUpTime() const {return mUpTime;} + + protected: + //Ogre::Overlay* mGuiOverlay; // Main sheet overlay + std::vector<Window*> mWindows; // Windows + Window * mNextWindowToDestroy; // Window to destroy + Ogre::OverlayContainer* mMousePointerOverlay; // Mouse Pointer Overlay + + Ogre::String mFont; + int mFontSize; + int mWindowCount, mButtonCount, mTextCaptionCount, mTextCaptionCountArea, mButtonCountTextArea; + + + Ogre::uint mDragWindowAction; + + int mDragX, mDragY; + int mDragWindowX, mDragWindowY; + + Window * mActiveDraggedWindow; + TextInput * mActiveTextInput; + Button * mActiveButton; + + Ogre::Vector2 mNextMenuWindowPos; + Window * mMenuWindow; + Ogre::RenderWindow * mRenderWindow; + + std::list<Effect*> mActiveEffects; + + Ogre::Real mUpTime; + Ogre::String mName; + int mFarZ; + int mNearZ; + }; + //------------------------------------------------------------------------------------------------ + class Widget + { + public: + + friend class GUI; + + Widget(const Ogre::Vector4 &Dimension, + const Ogre::String &materialNameNormal, + bool hasOverState = true, + bool hasActiveState = true); + + virtual ~Widget(); + + Ogre::Vector2 getPosition() const{return Ogre::Vector2(mPosX,mPosY);} + Ogre::Vector2 getSize() const {return Ogre::Vector2(mWidth,mHeight); } + + void setPosition(const Ogre::Vector2 &position); + void setSize(const Ogre::Vector2 &size); + + virtual void show(){setAlpha (1.0, true);}; + virtual void hide(){setAlpha (0.0, true);}; + + virtual bool isVisible() {return mMainOverlay->isVisible ();}; + + virtual void over(const bool a); + virtual void activate(const bool a); + + virtual void adjustSizeToContent(); + + virtual void setPosition(float X,float Y); + virtual void setPosition(int X,int Y); + virtual void setSize(int X,int Y); + virtual void setAlpha(const Ogre::Real alpha, const bool isContainer); + virtual void setMaterialBlendFactor(const Ogre::Real blendFactor, const bool isContainer); + + // mUnderEffect getter + bool getUnderEffect() const { return mUnderEffect; } + // mUnderEffect setter + void setUnderEffect(bool val); + + // mOver getter + bool getOver() const { return mOver; } + // mOver setter + void setOver(bool val) { mOver = val; } + // mActive getter + bool getActive() const { return mActive; } + // mActive setter + void setActive(bool val) { mActive = val; } + + // mActive setter + void setMainMaterial(const Ogre::String& mat) { + mMainOverlay->setMaterialName(mat); + } + + void setCaptionMaterial(const Ogre::String& mat) { + mCaptionOverlay->setMaterialName(mat); + } + + void setText(const Ogre::String& t) { + mCaptionOverlay->setCaption(t); + } + + Ogre::String getText() const { + return mCaptionOverlay->getCaption(); + } + + protected: + //------------------------------------------------------------------------------------------------ + inline bool isOut (const int x, const int y) const + { + return (x < mPosX) || (y < mPosY) + || (x > (mPosX + mWidth)) || + (y > (mPosY + mHeight)); + } + //------------------------------------------------------------------------------------------------ + inline bool isIn (const int x, const int y) const + { + return (x >= mPosX) && (y >= mPosY) + && (x <= (mPosX + mWidth)) && + (y <= (mPosY + mHeight)); + } + + void instantiateMaterial(Ogre::OverlayContainer * const oc, bool reset) const; + void setOverlayAlpha(Ogre::OverlayContainer * const oc, const Ogre::Real alpha) const; + void setOverlayMaterialBlendFactor(Ogre::OverlayContainer * const oc, const Ogre::Real blendFactor) const; + + int mPosX, mPosY, mWidth, mHeight; + + std::vector<Widget *> mChildren; + Ogre::OverlayContainer* mMainOverlay; + Ogre::OverlayContainer* mCaptionOverlay; + Ogre::String mMaterialName; + + bool mHasMaterial; + bool mHasOverState; + bool mHasActiveState; + bool mUnderEffect; + bool mOver; + bool mActive; + }; + //------------------------------------------------------------------------------------------------ + class Window : public Widget + { public: - Button* createButton(int x, int y, const Ogre::String& Caption, ButtonMethodPtr); - TextInput* createTextInput(int x, int y, int w, const Ogre::String& intialValue, unsigned maxLength); - Ogre::OverlayContainer* createStaticText(int x, int y, const Ogre::String& caption); - void hide() { mOverlay->hide();} - void show() { mOverlay->show();} - bool isVisible() { return mOverlay->isVisible();} - void setPosition(unsigned int X,unsigned int Y); - Ogre::Vector2 getPosition(); - Ogre::Vector2 getSize(); - void setSize(unsigned int X,unsigned int Y); - Ogre::OverlayContainer* mOverlay; // Overlay - ~Window(); + friend class Button; + friend class TextInput; + friend class StaticText; + friend class GUI; + + Window(const Ogre::Vector4 &Dimensions, const Ogre::String &Material, WindowFeatureType type, const Ogre::String &caption, GUI *gui); + virtual ~Window(); + + Button* createButton(const Ogre::Vector4 &Dimensions, const Ogre::String &Material, + const Ogre::String &Text, Callback callback); + + TextInput* createTextInput(const Ogre::Vector4 &Dimensions, const Ogre::String &Material, + const Ogre::String & Value, int length); + + StaticText* createStaticText(const Ogre::Vector4 &Dimensions, const Ogre::String &Text); + + void setSize(int X,int Y); + + MenuButton *addMenuButton(Window *target, const Ogre::String &label, WindowPlacementType wpt = WPT_NONE); + BoolButton *addBoolButton(bool value, const Ogre::String &label, WindowPlacementType wpt = WPT_NONE); + RealButton *addRealButton(Ogre::Real value, const Ogre::Vector4 &SliderMoves, const Ogre::String &label, WindowPlacementType wpt = WPT_NONE); + StaticText* addStaticText(const Ogre::String &label, WindowPlacementType wpt = WPT_NONE); + + Window *addMenuWindowTab(const Ogre::String &label, + bool titleBarWin = true, + WindowPlacementType wpt = WPT_VERTICAL); + + MenuButton* createMenuButton(const Ogre::Vector4 &D, const Ogre::String &M, const Ogre::String &T, Callback C, Window *t); + BoolButton* createBoolButton(const Ogre::Vector4 &D, const Ogre::String &M, const Ogre::String &T, Callback C, bool boolValue); + + RealButton *createRealButton(Ogre::Real value, + const Ogre::Vector4 &SliderMoves, + const Ogre::String &label, + const Ogre::Vector2 &pos); + + GUI* getGUI() const {return mGUI;} + + void setFadeOut(bool f){mFadeOut = f;} + void setZOrder(int zOrder){mGuiOverlay->setZOrder (zOrder);} protected: - Window(int x, int y, unsigned int width, unsigned int height, const Ogre::String& Style, WindowFeatureType type, const Ogre::String& caption, GUIListener*, GUI*); + - bool check(unsigned int x, unsigned int y, bool LMB); - bool checkKey(const Ogre::String& key, unsigned int x, unsigned int y); - unsigned int x,y,w,h;int dx,dy; // Dimensions - Button *mResizeButton,*mActiveButton,*mTitlebarButton; // Resizer, ActiveButton, Titlebar - TextInput* mActiveTextInput; // Active TextInput - GUI *mGUI; // mGUI pointer - std::vector<BetaGUI::Button*> mButtons; // Buttons - std::vector<BetaGUI::TextInput*> mTextInputs; // TextInputs - Ogre::String mStyle; - WindowMode mMode; - GUIListener* mListener; - }; - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - struct WidgetStyle { - WidgetStyle() {WidgetStyle("");} - WidgetStyle(const Ogre::String&); - void fromStyle(const Ogre::String&); - Ogre::String mBackground, mFontFace; - unsigned int mFontSize, mDecalSize, mHeight; Ogre::ColourValue mColour; bool centerText; - }; - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - class Style { - public: - void addStyle(Ogre::String widgetName, const Ogre::String& style); - std::map<Ogre::String, WidgetStyle> mWidgets; - Ogre::String mWindow_Background, mFontFace; - unsigned int mFontSize; - static bool _set(const Ogre::String&, std::pair<Ogre::String,Ogre::String>&, unsigned int&); - static bool _set(const Ogre::String&, std::pair<Ogre::String,Ogre::String>&, int&); - static bool _set(const Ogre::String&, std::pair<Ogre::String,Ogre::String>&, bool&); - static bool _set(const Ogre::String&, std::pair<Ogre::String,Ogre::String>&, Ogre::Real&); - static bool _set(const Ogre::String&, std::pair<Ogre::String,Ogre::String>&, Ogre::String&); - static bool _set(const Ogre::String&, std::pair<Ogre::String,Ogre::String>&, Ogre::ColourValue&); - }; - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - class Button { - friend class Window; + bool check(int x, int y, bool LMB); + bool checkKey(const Ogre::String &key, int x, int y); + + TextInput* mActiveTextInput; // Active TextInput + + Button + *mCloseButton, + *mResizerButton, + *mActiveButton, + *mTitleBarButton; // Resizer, ActiveButton, Title bar + + GUI *mGUI; // mGUI pointer - void setCaption(const Ogre::String&, bool resize = false); + std::vector<Button*> mButtons; // Buttons + std::vector<TextInput*> mTextInput; // TextInputs - protected: + Ogre::Overlay *mGuiOverlay; - Button(int x, int y, const Ogre::String& caption, ButtonMethodPtr, Window *parent); - Button(int x, int y, int w, int h, const Ogre::String& caption, Window *parent, WindowRole); - ~Button() { - mOverlay->getParent()->removeChild(mOverlay->getName()); - } - void setToActive(); - void setToNormal(); + void addWidget(const Widget * const w, WindowPlacementType wpt); + Ogre::Vector2 mNextWidgetPos; + WindowActivity mDragType; - bool out(unsigned int mx, unsigned int my, unsigned int px, unsigned int py) { - return ( !(mx >= x + px && my >= y + py)) || ( ! (mx <= x + px + w && my <= y + py + h) ); - } + bool mFadeOut; - Ogre::OverlayContainer* mOverlay, *mCaptionOverlay,*mDecalLeft,*mDecalRight; // Main Overlay and Caption - Ogre::String mBackground_Normal,mBackground_Active; // MaterialName Normal, MaterialName Active - int x,y; unsigned int w,h; // Dimensions. - ButtonMethodPtr mMethod; - WindowRole mRole; - Window *mParent; - }; - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - class TextInput { + }; + //------------------------------------------------------------------------------------------------ + class BetaGUIListener + { public: + virtual void onButtonPress(Button*, unsigned char) = 0; + }; + //------------------------------------------------------------------------------------------------ + class Callback + { + public: friend class Window; + friend class Button; - protected: - TextInput(int x, int y, int w, const Ogre::String& intialValue, unsigned maxLength, Window *parent); - ~TextInput(){} - Ogre::String getValue() const { - return mValue; + Callback() { + mCallbackType=0; } - void setValue(const Ogre::String& v) { - mCaptionOverlay->setCaption(mValue=v); + Callback( void(*functionPointer)(BetaGUI::Button*, bool) ) { + mCallbackType=1; + fp = functionPointer; } + Callback(BetaGUIListener *l){ + mCallbackType = 2; + mListener = l; + } protected: - bool in(unsigned int mx, unsigned int my, unsigned int px, unsigned int py) { - return ( !(mx >= x + px && my >= y + py)) || ( ! (mx <= x + px + w && my <= y + py + h) ); - } - Ogre::OverlayContainer* mOverlay,*mCaptionOverlay,*mDecalLeft,*mDecalRight; - Ogre::String mBackground_Normal, mBackground_Active, mValue; - int x,y; - unsigned int w,h, mLength; - Window* mParent; - }; - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - class Slider { - friend class Window; - + unsigned char mCallbackType; // Type of callback: 0 - None, 1 - FunctionPointer 2 - GUIListener, 3 - Move Window, 4 - Resize + void(*fp)(BetaGUI::Button*, bool); // Function pointer (if 1) + BetaGUIListener *mListener; // GuiListener (if 2) + }; + //------------------------------------------------------------------------------------------------ + class Button : public Widget + { public: - - class SliderValueRange { - public: - // Mark has to be between 0 and 1 (marker / width). -// virtual void set(Ogre::Real marker, Ogre::String &value) {} -// virtual Ogre::Real get() {return 0;} -// virtual Ogre::String get() {return "";} - }; + friend class Window; + friend class GUI; + + Button(const Ogre::Vector4 &Dimensions, const Ogre::String &Material, + const Ogre::String &Text, Callback callback, Window *parent); + virtual ~Button() {} - class NumericSliderValueRange : public SliderValueRange{ - public: - NumericSliderValueRange(Ogre::Real min, Ogre::Real max, Ogre::Real step = 1.0); - NumericSliderValueRange(Ogre::Real minA, Ogre::Real maxA, Ogre::Real stepA, Ogre::Real minB, Ogre::Real maxB, Ogre::Real stepB); + protected: + Callback mCallback; // Callback to use + }; + //------------------------------------------------------------------------------------------------ + class MenuButton : public Button + { + public: + MenuButton(const Ogre::Vector4 &Dimensions, const Ogre::String &Material, + const Ogre::String &Text, Callback callback, Window *parent, + Window *target) : + Button(Dimensions, Material, Text, callback, parent), + mTarget(target) + {}; + virtual ~MenuButton(){}; + protected: + void activate(const bool a) ; - - // 1. (from 0,1) 2. Value. - // std::map<Ogre::Real, Ogre::Real>; - }; + Window *mTarget; + }; + //------------------------------------------------------------------------------------------------ + class BoolButton : public Button + { + public: + BoolButton(const Ogre::Vector4 &Dimensions, const Ogre::String &Material, + const Ogre::String &Text, Callback callback, Window *parent, bool boolValue): + Button(Dimensions, Material, Text, callback, parent), + mBoolValue(boolValue) + {} + virtual ~BoolButton(){}; - class DictionarySliderValueRange { + protected: + void activate(const bool a) ; - }; + bool mBoolValue; + }; + //------------------------------------------------------------------------------------------------ + class TextInput : public Widget + { + public: + friend class Window; + friend class GUI; + + TextInput(const Ogre::Vector4 &Dimensions, const Ogre::String &Material, + const Ogre::String &Value, unsigned int length, Window *parent); + virtual ~TextInput(){} + const Ogre::String &getValue() const {return mValueText;} + void setValue(const Ogre::String &v) {mCaptionOverlay->setCaption(mValueText = v);} protected: - - Slider(int x, int y, int width, SliderValueRange*, Window *parent); + unsigned int length; + Ogre::String mValueText;// MaterialName Normal, MaterialName Active - void setToActive(); - void setToNormal(); + }; + //------------------------------------------------------------------------------------------------ + class StaticText : public Widget + { + public: + friend class Window; - bool out(unsigned int mx, unsigned int my, unsigned int px, unsigned int py) { - return ( !(mx >= x + px && my >= y + py)) || ( ! (mx <= x + px + w && my <= y + py + h) ); - } + StaticText(const Ogre::Vector4 &Dimensions, + const Ogre::String &Value, + Window *parent); + virtual ~StaticText(){} - Ogre::OverlayContainer* mOverlay, *mMarkerOverlay,*mDecalLeft,*mDecalRight, *mSelection; // Main Overlay and Caption - std::vector<Ogre::OverlayContainer*> mMarkers; - Ogre::String mBackground_Normal,mBackground_Active; // MaterialName Normal, MaterialName Active - int x,y; unsigned int w, h; // Dimensions. - ButtonMethodPtr mMethod; - bool mHorizontalSlider; - SliderValueRange* mRange; - Window *mParent; - }; - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + const Ogre::String &getValue() const + {return mValueText;} + + void setValue(const Ogre::String &v) + { + mCaptionOverlay->setCaption(mValueText = v); + mWidth = static_cast<int> (mValueText.size () * 7); + mParent->adjustSizeToContent (); + } + + protected: + + int length; + Ogre::String mValueText; + Window *mParent; + }; + //------------------------------------------------------------------------------------------------ + class RealButton : public BetaGUIListener, public Widget + { + public: + friend class Window; + + RealButton(BetaGUI::Window *window, + Ogre::Real value, + const Ogre::Vector4 &SliderMoves, + const Ogre::String &label, + const Ogre::Vector2 &pos); + + virtual ~RealButton(){}; + + Ogre::Real getValue() const {return mValue;} + + void setValue(const Ogre::Real v); + + void onButtonPress(BetaGUI::Button *ref, Ogre::uchar type); + protected: + + int length; + + BetaGUI::TextInput *mtextValueInput; + BetaGUI::Button *mForward, *mFastForward, *mRewind, *mFastRewind; + + Ogre::Real mValue; + Ogre::String mValueText; + + Ogre::Real mLowSlideUnit; + Ogre::Real mFastSlideUnit; + Ogre::Real mMinValue; + Ogre::Real mMaxValue; + + }; + //------------------------------------------------------------------------------------------------ + class Effect + { + public: + enum EffectInterpolatorType + { + EFFECT_LINEAR = 0, + EFFECT_LINEARX2, + EFFECT_LINEARX4, + EFFECT_SIN + }; + public: + Effect(Widget * const widget, const Ogre::Real duration, + const Ogre::Real startTime, const Ogre::Real currTime = 0, const bool repeat = false, + EffectInterpolatorType type = EFFECT_LINEARX4) : + mWidget(widget), + mStartTime(startTime), + mDuration(duration), + mRepeat(repeat), + mCurrTime(currTime), + mType(type) + { + assert (duration != 0); + } + virtual ~Effect(){}; + + virtual void updateValue(const Ogre::Real factor) = 0; + + bool update(Ogre::Real timeElapsed); + Ogre::Real getTimeFactor() ; + bool getTimeOrIsFinished(); +// Ogre::Real linearInterpolate(const Ogre::Real start, +// const Ogre::Real end, +// const Ogre::Real timeFactor) const; + Ogre::Real interpolate(const Ogre::Real start, + const Ogre::Real end, + const Ogre::Real timeFactor) const; + + protected: + Widget * const mWidget; + const Ogre::Real mStartTime; + const Ogre::Real mDuration; + const bool mRepeat; + + Ogre::Real mCurrTime; + const EffectInterpolatorType mType; + }; + //------------------------------------------------------------------------------------------------ + class AlphaEffect : public Effect + { + public: + + AlphaEffect(Widget * const widget, + const Ogre::Real duration, + const Ogre::Real startAlpha, + const Ogre::Real endAlpha, + const Ogre::Real startTime, + const Ogre::Real currTime = 0, + const bool repeat = false, + EffectInterpolatorType type = EFFECT_LINEARX4) : + Effect(widget, duration, startTime, currTime, repeat), + mStartAlpha(startAlpha), + mEndAlpha(endAlpha) + { + assert(mStartAlpha >= 0.0 && mStartAlpha <= 1.0); + assert(mEndAlpha >= 0.0 && mEndAlpha <= 1.0); + } + virtual ~AlphaEffect(){}; + + void updateValue(const Ogre::Real factor); + private: + const Ogre::Real mStartAlpha; + const Ogre::Real mEndAlpha; + }; + //------------------------------------------------------------------------------------------------ + class MoveEffect : public Effect + { + public: + MoveEffect(Widget * const widget, + const Ogre::Real duration, + const Ogre::Vector2 &startPosition, + const Ogre::Vector2 &endPosition, + const Ogre::Real startTime, + const Ogre::Real currTime = 0, + const bool repeat = false, + EffectInterpolatorType type = EFFECT_LINEARX4) : + Effect(widget, duration, startTime, currTime, repeat), + mStartPosition(startPosition), + mEndPosition(endPosition) + {} + virtual ~MoveEffect(){}; + void updateValue(const Ogre::Real factor); + + private: + const Ogre::Vector2 mStartPosition; + const Ogre::Vector2 mEndPosition; + }; + //------------------------------------------------------------------------------------------------ + class SizeEffect : public Effect + { + public: + SizeEffect(Widget * const widget, + const Ogre::Real duration, + const Ogre::Vector2 &startSize, + const Ogre::Vector2 &endSize, + const Ogre::Real startTime, + const Ogre::Real currTime = 0, + const bool repeat = false, + EffectInterpolatorType type = EFFECT_LINEARX4) : + Effect(widget, duration, startTime, currTime, repeat), + mStartSize(startSize), + mEndSize(endSize) + {} + virtual ~SizeEffect(){}; + void updateValue(const Ogre::Real factor); + + private: + const Ogre::Vector2 mStartSize; + const Ogre::Vector2 mEndSize; + }; + //------------------------------------------------------------------------------------------------ + class ActivateEffect : public Effect + { + public: + ActivateEffect(Widget * const widget, + const Ogre::Real duration, + const Ogre::Real startTime, + const Ogre::Real currTime = 0, + const bool repeat = false, + EffectInterpolatorType type = EFFECT_LINEARX4): + Effect(widget, duration, startTime, currTime, repeat) + {}; + virtual ~ActivateEffect(){}; + void updateValue(const Ogre::Real factor); + + }; + //------------------------------------------------------------------------------------------------ + class OverEffect : public Effect + { + public: + OverEffect(Widget * const widget, + const Ogre::Real duration, + const Ogre::Real startTime, + const Ogre::Real currTime = 0, + const bool repeat = false, + EffectInterpolatorType type = EFFECT_LINEARX4): + Effect(widget, duration, startTime, currTime, repeat) + {}; + virtual ~OverEffect(){}; + void updateValue(const Ogre::Real factor); + + }; + //------------------------------------------------------------------------------------------------ + + } // End of Namespace -#endif \ No newline at end of file + +/////////////////////////////////////////////////////////////////////////////// +#endif + Modified: trunk/python-ogre/ThirdParty/betagui/BetaGui.cpp =================================================================== --- trunk/python-ogre/ThirdParty/betagui/BetaGui.cpp 2008-02-23 06:13:35 UTC (rev 577) +++ trunk/python-ogre/ThirdParty/betagui/BetaGui.cpp 2008-02-24 08:05:30 UTC (rev 578) @@ -1,463 +1,1269 @@ -// Betajaen's GUI "BetaGUI 2.0", Version 35-uncompressed, http://www.ogre3d.org/wiki/index.php/BetaGUI -// -// Copyright (c) 2007 Robin Southern <bet...@ih...> -// -// 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 "BetaGUI.h" -#include "OgreFontManager.h" -#include "OgreFont.h" -#include "OgreTextAreaOverlayElement.h" -namespace BetaGUI { - //////////////////////////////////////////////////////////////////////////////////// - WidgetStyle::WidgetStyle(const Ogre::String &style) { - mBackground = "default"; centerText = false; mColour = Ogre::ColourValue::White; mDecalSize = 0; - mHeight = 16; mFontSize = 0; mFontFace = ""; if (style.length()>=0) fromStyle(style);} - //////////////////////////////////////////////////////////////////////////////////// - GUI::GUI(Ogre::RenderWindow* w) : mWindowToDestroy(0), mMousePointer(0), mWindowCount(0), mButtonCount(0), - mTextInputCount(0), mRenderWindowWidth(w->getWidth()), mRenderWindowHeight(w->getHeight()), - mWindowRatio(Ogre::Real(mRenderWindowWidth) / Ogre::Real(mRenderWindowHeight)) { - mOverlay = Ogre::OverlayManager::getSingleton().create("BetaGUI"); - mOverlay->show();} - //////////////////////////////////////////////////////////////////////////////////// - GUI::~GUI() { - for(unsigned int i=0;i < mWindow.size();i++) delete mWindow[i]; - for (std::map<Ogre::String, Style*>::iterator it = mStyle.begin();it!=mStyle.end();it++) delete (*it).second; - mStyle.clear(); mWindow.clear();} - //////////////////////////////////////////////////////////////////////////////////// - bool GUI::injectRelMouse(int x, int y, bool LMB) { - return injectMouse(mMousePointer->getLeft() + x, mMousePointer->getTop() + y, LMB);} - //////////////////////////////////////////////////////////////////////////////////// - bool GUI::injectMouse(unsigned int x, unsigned int y, bool LMB) { - - if (mMousePointer) - mMousePointer->setPosition(x,y); +namespace BetaGUI +{ + //------------------------------------------------------------------------------------------------ + GUI::GUI(const String &baseOverlay, const String &font, int fontSize, RenderWindow *win) + :mNextWindowToDestroy(0), + mMousePointerOverlay(0), + mFont(font), + mFontSize(fontSize), + mWindowCount(0), + mButtonCount(0), + mTextCaptionCount(0), + mTextCaptionCountArea(0), + mButtonCountTextArea(0), + mNextMenuWindowPos(0,0), + mMenuWindow(0), + mRenderWindow(win), + mDragWindowAction(WA_NONE), + mActiveDraggedWindow(0), + mActiveTextInput(0), + mActiveButton(0), + mUpTime(0), + mFarZ(100), + mNearZ(101), + mName(baseOverlay) + { + + } + //------------------------------------------------------------------------------------------------ + GUI::~GUI() + { + for(std::vector<Window*>::iterator i=mWindows.begin();i!=mWindows.end();++i) + { + delete (*i); + } - for(std::vector<Window*>::iterator i=mWindow.begin();i!=mWindow.end();i++) { - if (mWindowToDestroy == (*i)) { - delete (*i); - mWindow.erase(i); - mWindowToDestroy = 0; - return false; - } + std::list<Effect*>::iterator itEffect = mActiveEffects.begin(); + while (itEffect != mActiveEffects.end()) + { + delete *itEffect; + ++itEffect; + } + } + //------------------------------------------------------------------------------------------------ + void GUI::setZRangeOrder(int nearZ, int FarZ) + { + assert (mNearZ > mFarZ); + mNearZ = nearZ; + mFarZ = FarZ; + sortZOrder(); + }; + //------------------------------------------------------------------------------------------------ + void GUI::sortZOrder() + { + assert (mNearZ > mFarZ); + int farZ = mFarZ; + for(std::vector<Window*>::iterator i=mWindows.begin();i!=mWindows.end();++i) + { + (*i)->setZOrder(farZ) ; + if (farZ + 1 < mNearZ) + farZ++; + } + if (mActiveDraggedWindow) + mActiveDraggedWindow->setZOrder(mNearZ) ; + } + //------------------------------------------------------------------------------------------------ + void GUI::update (Ogre::Real timeElapsed) + { + mUpTime += timeElapsed; - if((*i)->check(x,y,LMB)) { - return true; - } - } - + { + std::vector<Window*>::iterator itWindow = mWindows.begin(); + while (itWindow != mWindows.end()) + { + (*itWindow)->setUnderEffect(false); + ++itWindow; + } + } + { + std::list<Effect*>::iterator itEffect = mActiveEffects.begin(); + while (itEffect != mActiveEffects.end()) + { + if ((*itEffect)->update(timeElapsed)) + { + delete *itEffect; + itEffect = mActiveEffects.erase(itEffect); + } + else + { + ++itEffect; + } + } + } + if (mNextWindowToDestroy) + { + for(std::vector<Window*>::iterator i=mWindows.begin();i!=mWindows.end();++i) + { + if(mNextWindowToDestroy==(*i)) + { + delete mNextWindowToDestroy; + mWindows.erase(i); + mNextWindowToDestroy=0; + } + } + } + } + //------------------------------------------------------------------------------------------------ + void GUI::addEffect (Effect* e) + { + mActiveEffects.push_back(e); + } + //----------------------------------------------------------------------------- + bool GUI::injectMouse(float x, float y, bool LMB) + { + return injectMouse ( int(x), int(y), LMB ); + } + + bool GUI::injectMouse(int x, int y, bool LMB) + { + // if (mMousePointerOverlay) + // { + // mMousePointerOverlay->hide (); + mMousePointerOverlay->setPosition(x,y); + // } + + + if (LMB) + { + if (mActiveTextInput) + { + mActiveTextInput->mMainOverlay->setMaterialName(mActiveTextInput->mMaterialName); + mActiveTextInput = 0; + } + + + if (mActiveButton && mActiveDraggedWindow) + { + if (mActiveDraggedWindow->mDragType == WA_MOVE) + { + mDragWindowAction = WA_MOVE; + mActiveDraggedWindow->setPosition ( + mDragWindowX + (x - mDragX), + mDragWindowY + (y - mDragY) + ); + return true; + } + else if (mActiveDraggedWindow->mDragType == WA_RESIZE) + { + mDragWindowAction = WA_RESIZE; + mActiveDraggedWindow->setSize ( + mDragWindowX + (x - mDragX), + mDragWindowY + (y - mDragY) + ); + return true; + } + } + } + else if (mDragWindowAction != WA_NONE) + { + mDragWindowAction = WA_NONE; + mActiveDraggedWindow = 0; + sortZOrder (); + } + + assert (mDragWindowAction == WA_NONE) ; + for(std::vector<Window*>::iterator i=mWindows.begin();i!=mWindows.end();++i) + { + if((*i)->isVisible() && + (*i)->check(x, y, LMB)) + { + mActiveDraggedWindow = (*i); + sortZOrder (); + + //if (mMousePointerOverlay) + // mMousePointerOverlay->show (); + return true; + } + } + return false; - } - //////////////////////////////////////////////////////////////////////////////////// - bool GUI::injectKey(const Ogre::String& key, unsigned int x, unsigned int y) { - for(unsigned int i=0;i<mWindow.size();i++) { - if(mWindow[i]->checkKey(key,x,y)) { - return true;}} - return false; - } - //////////////////////////////////////////////////////////////////////////////////// -/* void GUI::injectBackspace(unsigned int x, unsigned int y) { + } + //------------------------------------------------------------------------------------------------ + bool GUI::injectKey(const String &key, int x, int y) + { + if (mActiveTextInput == 0 || key.empty()) + return false; + + if (key == "!b") + { + mActiveTextInput->setValue( + mActiveTextInput->mValueText.substr(0, mActiveTextInput->mValueText.length()-1) + ); + return true; + } + + if (mActiveTextInput->mValueText.length() >= mActiveTextInput->length) + return true; + + mActiveTextInput->mCaptionOverlay->setCaption(mActiveTextInput->mValueText += key); + return false; + } + //------------------------------------------------------------------------------------------------ + void GUI::injectBackspace(int x, int y) + { injectKey("!b", x, y); - } -*/ - //////////////////////////////////////////////////////////////////////////////////// - Ogre::OverlayContainer* GUI::__getOverlay(const Ogre::String& name, const Ogre::String& type,int x,int y, int w, int h) { - Ogre::OverlayContainer* oc; try { oc = static_cast<Ogre::OverlayContainer*>(Ogre::OverlayManager::getSingleton().getOverlayElement(name)); - }catch(...) {oc = static_cast<Ogre::OverlayContainer*>(Ogre::OverlayManager::getSingleton().createOverlayElement(type, name));} - oc->setMetricsMode(Ogre::GMM_PIXELS); - if (x==0&&y==0&&w==0)return oc; oc->setPosition(x,y); oc->setDimensions(w,h); return oc; - } - //////////////////////////////////////////////////////////////////////////////////// - Ogre::OverlayContainer* GUI::createOverlayFromWidgetStyle(const Ogre::String &name, const Ogre::String &styleName, const Ogre::String &widgetType, int x, int y, const Ogre::String &text) { - WidgetStyle ws = mStyle[styleName]->mWidgets[widgetType]; - Ogre::OverlayContainer* oc = __getOverlay(name,"Panel", x,y, 32, ws.mHeight); - oc->setMaterialName(ws.mBackground); - if (text.length() >= 1) { - int fontSize = ws.mFontSize ? ws.mFontSize : mStyle[styleName]->mFontSize; - Ogre::String fontName = ws.mFontFace.length() ? ws.mFontFace : mStyle[styleName]->mFontFace; - Ogre::OverlayContainer* caption = __getOverlay(name + "-caption", "TextArea", 0,((ws.mHeight * 0.5f) - ((float) fontSize) * 0.5f) * mWindowRatio, 32, fontSize); - oc->addChild(caption); - caption->setCaption(text);caption->setParameter("font_name", fontName);caption->setParameter("char_height", Ogre::StringConverter::toString(fontSize)); - Ogre::Font* f = dynamic_cast<Ogre::Font*>(Ogre::FontManager::getSingletonPtr()->getByName(fontName).get()); - f->setTrueTypeSize(fontSize); float textWidth = 0; Ogre::Real sp = f->getGlyphAspectRatio(0x0030) * fontSize; - for(unsigned int i=0; i < text.length();i++){ - if (text[i] == 0x0020) textWidth += sp; - else textWidth += f->getGlyphAspectRatio(text[i]) * fontSize;} - oc->setWidth(Ogre::Math::Ceil(textWidth * 1.25f)); caption->setWidth(textWidth); caption->setHeight(fontSize); - if (ws.centerText) caption->setLeft(textWidth * 0.125f); - caption->setColour(ws.mColour);} - return oc; - } - //////////////////////////////////////////////////////////////////////////////////// - Ogre::OverlayContainer* GUI::createOverlayFromWindowStyle(const Ogre::String &name, const Ogre::String &styleName, int x, int y, int w, int h) { - Ogre::OverlayContainer* oc = __getOverlay(name); - oc->setPosition(x,y);oc->setDimensions(w,h);oc->setMaterialName(mStyle[styleName]->mWindow_Background); - return oc; - } - //////////////////////////////////////////////////////////////////////////////////// - void GUI::__updateCenteredOverlay(Ogre::OverlayContainer* overlay) { - Ogre::OverlayContainer* caption = static_cast<Ogre::OverlayContainer*>(overlay->getChild(overlay->getName() + "-caption")); - caption->setLeft((overlay->getWidth() * 0.5f) - (caption->getWidth() * 0.5f)); - caption->setTop(2 + (overlay->getHeight() * 0.5f) - (caption->getHeight() * 0.5f)); - } - //////////////////////////////////////////////////////////////////////////////////// - Ogre::OverlayContainer* GUI::createMousePointer(const Ogre::String& m, unsigned int w, unsigned int h) { - Ogre::Overlay* o = Ogre::OverlayManager::getSingleton().create("BetaGUI.MP"); - mMousePointer = __getOverlay("BetaGUI.MousePointer", "Panel", mRenderWindowWidth * 0.5f, mRenderWindowHeight * 0.5f, w, h); - mMousePointer->setMaterialName(m); - o->setZOrder(649); o->add2D(mMousePointer); o->show(); mMousePointer->show(); - return mMousePointer; - } - //////////////////////////////////////////////////////////////////////////////////// - Style* GUI::createStyle(const Ogre::String& name) { - mStyle[name] = new Style; - return mStyle[name]; - } - //////////////////////////////////////////////////////////////////////////////////// - Window* GUI::createWindow(int x, int y, unsigned int width, unsigned int height, const Ogre::String& style, WindowFeatureType type, const Ogre::String& caption, GUIListener* listener) { - Window* window = new BetaGUI::Window(x,y,width,height, style,type,caption, listener, this); - mWindow.push_back(window); - return window; - } - //////////////////////////////////////////////////////////////////////////////////// - void GUI::destroyWindow(Window *window) { - mWindowToDestroy=window;} - ////////////////... [truncated message content] |
From: <and...@us...> - 2008-02-23 06:13:41
|
Revision: 577 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=577&view=rev Author: andy_miller Date: 2008-02-22 22:13:35 -0800 (Fri, 22 Feb 2008) Log Message: ----------- Fix where property could be created that overrode existing function (Ogrelay::rotate) Modified Paths: -------------- trunk/python-ogre/code_generators/common_utils/__init__.py trunk/python-ogre/code_generators/common_utils/ogre_properties.py Modified: trunk/python-ogre/code_generators/common_utils/__init__.py =================================================================== --- trunk/python-ogre/code_generators/common_utils/__init__.py 2008-02-18 11:46:43 UTC (rev 576) +++ trunk/python-ogre/code_generators/common_utils/__init__.py 2008-02-23 06:13:35 UTC (rev 577) @@ -7,7 +7,9 @@ from pyplusplus import function_transformers as ft from pyplusplus.module_builder import call_policies +import time + import var_checker as varchecker import ogre_properties as ogre_properties @@ -21,6 +23,14 @@ docs = docs + "Output: " + o + "\\n\\\n" return docs +def docInfo ( mb, module ): + i = '"This module is part of the Python-Ogre project (www.python-ogre.org)\nIt was built on %(timestamp)s and is a member of the %(version)s release. "' + timestamp = time.ctime() + version = environment.PythonOgreMajorVersion +"."+environment.PythonOgreMinorVersion+"."+PythonOgrePatchVersion + t = i % {'timestamp':timestamp, 'version':version} + add_constants( mb, { '__info__' : t } ) + + def _ReturnUnsignedInt( type_ ): """helper to return an UnsignedInt call for tranformation functions """ Modified: trunk/python-ogre/code_generators/common_utils/ogre_properties.py =================================================================== --- trunk/python-ogre/code_generators/common_utils/ogre_properties.py 2008-02-18 11:46:43 UTC (rev 576) +++ trunk/python-ogre/code_generators/common_utils/ogre_properties.py 2008-02-23 06:13:35 UTC (rev 577) @@ -43,22 +43,36 @@ if mem_fun.has_const: return False return True - + + def create_property( self, fget, fset ): + if not self.check_type_compatibility( fget, fset ): + return None + found = self.find_out_prefixes( fget.name, fset.name ) + if not found: + return None + ## Now we need to look for overlapping function declarations + pure_names = [] + pure_names.append( fget.name[len( found[0] ):].lower()) + pure_names.append( fset.name[len( found[1] ):].lower()) + funcs = self.class_accessors( fget.parent )[1] + funcs.extend( self.inherited_accessors( fget.parent )[1] ) + for f in funcs: + if f.name.lower() in pure_names: + print"Overloaded Property", fget.name, fset.name, f.name + return None + return decl_wrappers.property_t( self.find_out_property_name( fget, found[0] ), fget, fset ) + def create_read_only_property( self, fget ): found = self.find_out_ro_prefixes( fget.name ) if found in ( None, '' ): return None - - pure_name = fget.name[len( found ):] - pure_name = pure_name.lower() - - setters = self.class_accessors( fget.parent )[1] - setters.extend( self.inherited_accessors( fget.parent )[1] ) - - setters = filter( lambda decl: decl.name.lower() == pure_name and self.is_setter( decl ) - , setters ) - if setters: - #we found member function that could serve as setter. Py++ did not find it - #so there is a difference in cases. - return None + ## Now we need to look for overlapping function declarations + pure_names = [] + pure_names.append( fget.name[len( found ):].lower()) + funcs = self.class_accessors( fget.parent )[1] + funcs.extend( self.inherited_accessors( fget.parent )[1] ) + for f in funcs: + if f.name.lower() in pure_names: + print"Overloaded Read Only Property", fget.name, f.name + return None return decl_wrappers.property_t( self.find_out_property_name( fget, found ), fget ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2008-02-18 11:46:39
|
Revision: 576 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=576&view=rev Author: andy_miller Date: 2008-02-18 03:46:43 -0800 (Mon, 18 Feb 2008) Log Message: ----------- Further media cleanup Removed Paths: ------------- trunk/python-ogre/demos/particleuniverse/mediaold/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2008-02-18 11:42:53
|
Revision: 575 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=575&view=rev Author: andy_miller Date: 2008-02-18 03:42:58 -0800 (Mon, 18 Feb 2008) Log Message: ----------- Updates to ParticleUniverse media Added Paths: ----------- trunk/python-ogre/demos/particleuniverse/media/ trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/ trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/gui/ trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/gui/puviewer.layout trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/material/ trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/material/pu_burst.material trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/material/pu_explosion.material trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/material/pu_flame.material trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/material/pu_fxpression.material trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/material/pu_generic.material trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/material/pu_lightning.material trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/material/pu_lod.material trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/material/pu_rain.material trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/material/pu_stone.material trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/material/pu_tornado.material trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/models/ trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/models/fxpression.mesh trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/models/pu_stone.mesh trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/scripts/ trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/scripts/pu_example_11_20.pu trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/scripts/pu_example_1_10.pu trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/scripts/pu_example_21_30.pu trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/scripts/pu_explosion.pu trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/scripts/pu_flame.pu trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/scripts/pu_fxpression.pu trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/scripts/pu_generic.pua trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/scripts/pu_lightning.pu trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/scripts/pu_lod.pu trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/scripts/pu_rain.pu trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/scripts/pu_tornado.pu trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/ trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/128x128/ trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/128x128/pu_mist_01_128x128.png trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/128x128/pu_smoke_01_128x128.png trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/128x128/pu_smoke_02_128x128.png trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/128x128/pu_star_01_128x128.png trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/128x128/pu_star_02_128x128.png trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/128x128/pu_water_01_128x128.png trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/256x256/ trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/256x256/pu_flare_10_256x256.png trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/256x256/pu_flare_11_256x256.png trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/256x256/pu_flare_12_256x256.png trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/256x256/pu_flare_13_256x256.png trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/256x256/pu_flare_14_256x256.png trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/256x256/pu_flare_15_256x256.png trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/256x256/pu_flare_16_256x256.png trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/256x256/pu_flare_17_256x256.png trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/256x256/pu_flare_23_256x256.png trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/256x256/pu_smoke_01_256x256.png trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/32x32/ trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/32x32/pu_rain_01.png trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/64x64/ trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/64x64/pu_dot_01_64x64.png trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/64x64/pu_dot_02_64x64.png trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/64x64/pu_dot_03_64x64.png trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/64x64/pu_dot_04_64x64.png trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/64x64/pu_explode_01_64x64.png trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/64x64/pu_fire_01_64x64.png trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/64x64/pu_flare_01_64x64.png trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/64x64/pu_flare_02_64x64.png trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/64x64/pu_flare_03_64x64.png trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/64x64/pu_ice_01_64x64.png trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/64x64/pu_nucleus.png trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/64x64/pu_smoke_01_64x64.png trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/64x64/pu_smoke_02_64x64.png trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/64x64/pu_star_01_64x64.png trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/64x64/pu_star_02_64x64.png trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/64x64/pu_star_03_64x64.png trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/64x64/pu_star_04_64x64.png trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/64x64/pu_star_05_64x64.png trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/64x64/pu_star_06_64x64.png trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/various/ trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/various/crate6.png trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/various/pu_barrel.png trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/various/pu_blue_ball.png trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/various/pu_circle.png trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/various/pu_dirt_256x512.png trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/various/pu_dot_5x5.png trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/various/pu_flame.png trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/various/pu_green_ball.png trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/various/pu_hart.png trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/various/pu_lightning_20x64.png trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/various/pu_plate.jpg trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/various/pu_red_ball.png trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/various/pu_ribbontrail.png trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/various/pu_sand_336x330.png trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/various/pu_smoke.png trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/various/pu_smoke_428x427.png trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/various/pu_smoke_black_192x192.png trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/various/pu_smoke_brown_336x330.png trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/various/pu_smoke_grey_312x312.png trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/various/pu_smoke_grey_336x330.png trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/various/pu_smoke_red_192x192.png trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/various/pu_stone.jpeg trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/textures/various/sand.jpeg Added: trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/gui/puviewer.layout =================================================================== --- trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/gui/puviewer.layout (rev 0) +++ trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/gui/puviewer.layout 2008-02-18 11:42:58 UTC (rev 575) @@ -0,0 +1,78 @@ +<?xml version="1.0" ?> +<GUILayout> +<Window Type="DefaultGUISheet" Name="root"> + <Window Type="DefaultGUISheet" Name="ParticleUniverseViewer"> + <Property Name="UnifiedSize" Value="{{1,0},{1,0}}" /> + + <Window Type="TaharezLook/FrameWindow" Name="ParticleUniverseViewer/WindowPropertiesWindow"> + <Property Name="UnifiedSize" Value="{{0.25,0},{0.8,0}}" /> + <Property Name="UnifiedPosition" Value="{{0,0},{0,0}}" /> + <Property Name="TitlebarEnabled" Value="true" /> + <Property Name="CloseButtonEnabled" Value="false" /> + <Property Name="Text" Value="Particle Universe Viewer" /> + + <Window Type="TaharezLook/Listbox" Name="ParticleUniverseViewer/ListboxTemplates"> + <Property Name="UnifiedPosition" Value="{{0.05,0},{0.05,0}}" /> + <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> + <Property Name="UnifiedSize" Value="{{0.9,0},{0.46,0}}" /> + </Window> + + <Window Type="TaharezLook/StaticText" Name="ParticleUniverseViewer/SelectedName"> + <Property Name="UnifiedPosition" Value="{{0.05,0},{0.52,0}}" /> + <Property Name="UnifiedSize" Value="{{0.9,0},{0.05,0}}" /> + <Property Name="BackgroundEnabled" Value="True" /> + </Window> + + <Window Type="TaharezLook/Button" Name="ParticleUniverseViewer/ButtonStart"> + <Property Name="UnifiedPosition" Value="{{0.1,0},{0.58,0}}" /> + <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> + <Property Name="UnifiedSize" Value="{{0.8,0},{0.05,0}}" /> + <Property Name="Text" Value="Start" /> + </Window> + + <Window Type="TaharezLook/Button" Name="ParticleUniverseViewer/ButtonPause"> + <Property Name="UnifiedPosition" Value="{{0.1,0},{0.64,0}}" /> + <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> + <Property Name="UnifiedSize" Value="{{0.8,0},{0.05,0}}" /> + <Property Name="Text" Value="Pause" /> + </Window> + + <Window Type="TaharezLook/Button" Name="ParticleUniverseViewer/ButtonResume"> + <Property Name="UnifiedPosition" Value="{{0.1,0},{0.70,0}}" /> + <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> + <Property Name="UnifiedSize" Value="{{0.8,0},{0.05,0}}" /> + <Property Name="Text" Value="Resume" /> + </Window> + + <Window Type="TaharezLook/Button" Name="ParticleUniverseViewer/ButtonStop"> + <Property Name="UnifiedPosition" Value="{{0.1,0},{0.76,0}}" /> + <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> + <Property Name="UnifiedSize" Value="{{0.8,0},{0.05,0}}" /> + <Property Name="Text" Value="Stop" /> + </Window> + + <Window Type="TaharezLook/Button" Name="ParticleUniverseViewer/ButtonQuit"> + <Property Name="UnifiedPosition" Value="{{0.1,0},{0.82,0}}" /> + <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> + <Property Name="UnifiedSize" Value="{{0.8,0},{0.05,0}}" /> + <Property Name="Text" Value="Quit" /> + </Window> + + <Window Type="TaharezLook/Checkbox" Name="ParticleUniverseViewer/CheckResetCamera" > + <Property Name="UnifiedPosition" Value="{{0.1,0},{0.88,0}}" /> + <Property Name="Text" Value="Reset Camera" /> + <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> + <Property Name="UnifiedSize" Value="{{0.8,0},{0.05,0}}" /> + </Window> + + <Window Type="TaharezLook/Checkbox" Name="ParticleUniverseViewer/CheckSkybox" > + <Property Name="UnifiedPosition" Value="{{0.1,0},{0.94,0}}" /> + <Property Name="Text" Value="Skybox" /> + <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> + <Property Name="UnifiedSize" Value="{{0.8,0},{0.05,0}}" /> + </Window> + </Window> + </Window> +</Window> + +</GUILayout> Added: trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/material/pu_burst.material =================================================================== --- trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/material/pu_burst.material (rev 0) +++ trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/material/pu_burst.material 2008-02-18 11:42:58 UTC (rev 575) @@ -0,0 +1,33 @@ +material ParticleUniverse/GreenBall +{ + technique + { + pass + { + depth_write off + scene_blend alpha_blend + texture_unit + { + texture pu_green_ball.png + } + } + } +} + +material ParticleUniverse/BurstFlare +{ + technique + { + pass + { + lighting off + depth_write off + scene_blend add + texture_unit + { + texture pu_dot_03_64x64.png + } + } + } +} + Added: trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/material/pu_explosion.material =================================================================== --- trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/material/pu_explosion.material (rev 0) +++ trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/material/pu_explosion.material 2008-02-18 11:42:58 UTC (rev 575) @@ -0,0 +1,73 @@ +material ParticleUniverse/ExplosionFire +{ + technique + { + pass + { + lighting off + depth_write off + scene_blend add + fog_override true + + texture_unit + { + texture pu_smoke_02_128x128.png + tex_address_mode clamp + } + } + } +} +material ParticleUniverse/Nucleus +{ + technique + { + pass + { + lighting off + scene_blend add + depth_write off + + texture_unit + { + texture pu_nucleus.png + tex_address_mode clamp + } + } + } +} +material ParticleUniverse/Debris +{ + technique + { + pass + { + lighting off + scene_blend add + depth_write off + + texture_unit + { + texture pu_fire_01_64x64.png + tex_address_mode clamp + } + } + } +} +//----------------------------------------------------------------------------------------------------------------------------------------------- +material ParticleUniverse/Dirt +{ + technique + { + pass + { + lighting off + depth_write off + scene_blend alpha_blend + texture_unit + { + texture pu_dirt_256x512.png + tex_address_mode clamp + } + } + } +} Added: trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/material/pu_flame.material =================================================================== --- trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/material/pu_flame.material (rev 0) +++ trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/material/pu_flame.material 2008-02-18 11:42:58 UTC (rev 575) @@ -0,0 +1,56 @@ +material ParticleUniverse/Flame +{ + technique + { + pass + { + scene_blend add + depth_write off + texture_unit + { + texture pu_flame.png + tex_address_mode clamp + } + } + } +} +//----------------------------------------------------------------------------------------------------------------------------------------------- +material ParticleUniverse/Fire +{ + technique + { + pass + { + lighting off + scene_blend add + depth_write off + texture_unit + { + texture pu_flame.png + tex_address_mode clamp + wave_xform scroll_x sine 0 0.3 0 0.15 + } + } + } +} +//----------------------------------------------------------------------------------------------------------------------------------------------- +material ParticleUniverse/Smoke +{ + technique + { + pass + { + lighting off + depth_write off + scene_blend alpha_blend + + texture_unit + { + texture pu_smoke_brown_336x330.png + tex_address_mode clamp + } + } + } +} +//----------------------------------------------------------------------------------------------------------------------------------------------- + Added: trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/material/pu_fxpression.material =================================================================== --- trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/material/pu_fxpression.material (rev 0) +++ trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/material/pu_fxpression.material 2008-02-18 11:42:58 UTC (rev 575) @@ -0,0 +1,15 @@ +material fxpression/ac3dmat1 +{ + technique + { + pass + { + ambient 1 0.05 0 + diffuse 1 0.05 0 + texture_unit + { + texture pu_plate.jpg + } + } + } +} Added: trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/material/pu_generic.material =================================================================== --- trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/material/pu_generic.material (rev 0) +++ trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/material/pu_generic.material 2008-02-18 11:42:58 UTC (rev 575) @@ -0,0 +1,119 @@ +material ParticleUniverse/Street +{ + technique + { + pass + { + texture_unit + { + texture pu_street.jpeg + scale 0.05 0.05 + } + } + } +} + +material ParticleUniverse/Sand +{ + technique + { + pass + { + texture_unit + { + texture sand.jpeg + tex_address_mode mirror + } + } + } +} + +material ParticleUniverse/ColourFlare +{ + technique + { + pass + { + lighting off + scene_blend alpha_blend + depth_write off + + texture_unit + { + texture pu_star_06_64x64.png + } + } + } +} + +material ParticleUniverse/Crate +{ + technique + { + pass + { + texture_unit + { + texture crate6.png + } + } + } +} + +material ParticleUniverse/Star +{ + technique + { + pass + { + lighting off + depth_write off + scene_blend add + fog_override true + + texture_unit + { + texture pu_flare_12_256x256.png + tex_address_mode clamp + } + } + } +} + +material ParticleUniverse/RibbonTrail +{ + technique + { + pass + { + lighting off + scene_blend add + depth_write off + + texture_unit + { + texture pu_ribbontrail.png 1d + tex_address_mode clamp + filtering none + } + } + } +} + +material ParticleUniverse/Hart +{ + technique + { + pass + { + lighting off + scene_blend alpha_blend + depth_write off + + texture_unit + { + texture pu_hart.png + } + } + } +} Added: trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/material/pu_lightning.material =================================================================== --- trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/material/pu_lightning.material (rev 0) +++ trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/material/pu_lightning.material 2008-02-18 11:42:58 UTC (rev 575) @@ -0,0 +1,17 @@ +material ParticleUniverse/Lightning +{ + technique + { + pass + { + lighting off + scene_blend alpha_blend + depth_write off + + texture_unit + { + texture pu_lightning_20x64.png + } + } + } +} \ No newline at end of file Added: trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/material/pu_lod.material =================================================================== --- trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/material/pu_lod.material (rev 0) +++ trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/material/pu_lod.material 2008-02-18 11:42:58 UTC (rev 575) @@ -0,0 +1,15 @@ +material ParticleUniverse/RustyBarrel +{ + technique + { + pass + { + depth_write off + scene_blend alpha_blend + texture_unit + { + texture pu_barrel.png + } + } + } +} Added: trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/material/pu_rain.material =================================================================== --- trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/material/pu_rain.material (rev 0) +++ trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/material/pu_rain.material 2008-02-18 11:42:58 UTC (rev 575) @@ -0,0 +1,31 @@ +material ParticleUniverse/Circle +{ + technique + { + pass + { + depth_write off + scene_blend alpha_blend + texture_unit + { + texture pu_circle.png + } + } + } +} + +material ParticleUniverse/Rain_01 +{ + technique + { + pass + { + scene_blend add + depth_write off + texture_unit + { + texture pu_rain_01.png + } + } + } +} Added: trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/material/pu_stone.material =================================================================== --- trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/material/pu_stone.material (rev 0) +++ trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/material/pu_stone.material 2008-02-18 11:42:58 UTC (rev 575) @@ -0,0 +1,18 @@ +//----------------------------------------------------------------------------------------------------------------------------------------------- +material ParticleUniverse/Stone +{ + technique + { + pass + { + lighting off + depth_write off + texture_unit + { + texture pu_stone.jpeg + scale 0.5 0.5 + } + } + } +} +//----------------------------------------------------------------------------------------------------------------------------------------------- Added: trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/material/pu_tornado.material =================================================================== --- trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/material/pu_tornado.material (rev 0) +++ trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/material/pu_tornado.material 2008-02-18 11:42:58 UTC (rev 575) @@ -0,0 +1,20 @@ +//----------------------------------------------------------------------------------------------------------------------------------------------- +material ParticleUniverse/Tornado +{ + technique + { + pass + { + lighting off + depth_write off + scene_blend alpha_blend + + texture_unit + { + texture pu_sand_336x330.png + } + } + } +} +//----------------------------------------------------------------------------------------------------------------------------------------------- + Added: trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/models/fxpression.mesh =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/models/fxpression.mesh ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/models/pu_stone.mesh =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/models/pu_stone.mesh ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/scripts/pu_example_11_20.pu =================================================================== --- trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/scripts/pu_example_11_20.pu (rev 0) +++ trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/scripts/pu_example_11_20.pu 2008-02-18 11:42:58 UTC (rev 575) @@ -0,0 +1,461 @@ +// --------------------------------------------------------------------------------------------------------------- +// example_011: +// - This is a simple particle system that demonstrates the dynamic behaviour of emission rate and velocity. +// Adding control points, the emission rate and velocity are defined as a curve within the interval of 0..8 seconds. +// --------------------------------------------------------------------------------------------------------------- +system example_011 +{ + technique + { + renderer Billboard + { + billboard_type oriented_shape + billboard_origin bottom_center + } + material ParticleUniverse/GreenBall + default_particle_width 2 + default_particle_height 2 + visual_particle_quota 500 + emitter Point + { + emission_rate dyn_curved_spline + { + control_point 0 5 + control_point 2 20 + control_point 4 200 + control_point 6 30 + control_point 8 0 + } + angle 25 + direction 0 1 0 + velocity dyn_curved_spline + { + control_point 0 100 + control_point 2 200 + control_point 4 400 + control_point 6 100 + control_point 8 0 + } + time_to_live dyn_random + { + min 2 + max 6 + } + } + affector LinearForce + { + force_aff_vector 0 -100 0 + } + affector Align + { + align_aff_resize true + + } + } +} + + +// --------------------------------------------------------------------------------------------------------------- +// example_012: +// - With the use of the Jet affector, it possible to give the velocity another non-linear boost. +// --------------------------------------------------------------------------------------------------------------- +system example_012 +{ + technique + { + // Use the billboard renderer defined in the *.pua script + use_alias $defaultBillboardRenderer + material ParticleUniverse/BurstFlare + default_particle_width 10 + default_particle_height 10 + visual_particle_quota 2000 + emitter SphereSurface + { + sphere_surface_em_radius 100 + auto_direction true + emission_rate 100 + velocity 0 + time_to_live 4 + duration 2 + } + + // Wait 2 seconds until the handler is activated. + observer OnTime + { + on_time greater_than 2 + since_start_system true + handler DoEnableComponent + { + enable_component affector_component myJet true + } + } + + // Change the colour of the particle + affector Colour + { + colour_aff_time_colour 0 1 0 0 + colour_aff_time_colour 0.6 0 1 1 + colour_aff_time_colour 1 0 0 1 + } + + // Change the scale of the particle + affector Scale + { + xyz_scale 10 + } + + // Apply a boost if the Jet affector is enabled + affector Jet myJet + { + enabled false + jet_aff_accel dyn_random + { + min 1 + max 20 + } + } + } +} + +// --------------------------------------------------------------------------------------------------------------- +// example_013: +// - The Particle Follower makes sure that emitted particle always be kept in the neighbourhood of their +// predecessors. +// --------------------------------------------------------------------------------------------------------------- +system example_013 +{ + scale 0.5 0.5 0.5 + scale_velocity 0.5 + technique + { + use_alias $defaultBillboardRenderer + material ParticleUniverse/GreenBall + default_particle_width 30 + default_particle_height 30 + visual_particle_quota 1000 + emitter Box + { + emission_rate 20 + angle 90 + direction 0 1 0 + velocity 400 + time_to_live 7 + } + affector LinearForce + { + force_aff_vector 0 -80 0 + } + affector ParticleFollower + { + follower_min_distance 60 + follower_max_distance 300 + } + } +} + +// --------------------------------------------------------------------------------------------------------------- +// example_014: +// - The Mesh Surface Emitter emits particles on the surface of a mesh. +// --------------------------------------------------------------------------------------------------------------- +system example_014 +{ + technique + { + position 0 0 1200 + use_alias $defaultBillboardRenderer + material ParticleUniverse/GreenBall + default_particle_width 0.5 + default_particle_height 0.5 + visual_particle_quota 5000 + emitter MeshSurface + { + emission_rate 5000 + force_emission true + mesh_surface_mesh_name ogrehead.mesh + mesh_surface_distribution heterogeneous_2 + time_to_live 10 + } + } +} + +// --------------------------------------------------------------------------------------------------------------- +// example_015: +// - Particles collide with the SphereCollider and bounce, while their velocity and rotation speed decrease. +// --------------------------------------------------------------------------------------------------------------- +system example_015 +{ + technique + { + use_alias $defaultBillboardRenderer + material ParticleUniverse/Star + default_particle_width 50 + default_particle_height 50 + visual_particle_quota 3000 + emitter Box + { + position 0 0 0 + box_em_width 300 + box_em_height 10 + box_em_depth 300 + emission_rate 20 + angle 10 + direction 0 1 0 + velocity 200 + time_to_live 7 + } + affector SphereCollider + { + position 0 400 0 + sphere_collider_radius 300 + collision_intersection point + collision_type flow + } + } +} + +// --------------------------------------------------------------------------------------------------------------- +// example_016: +// - Scale Affector, using separate scaling for x and y in combination with control points, to simulate an +// explosion type of effect (fast scaling at the start). +// --------------------------------------------------------------------------------------------------------------- +system example_016 +{ + + technique + { + renderer Billboard + { + billboard_type oriented_self + billboard_origin bottom_center + } + material ParticleUniverse/Dirt + default_particle_width 1 + default_particle_height 6 + visual_particle_quota 3000 + emitter Point + { + position 0 0 0 + emission_rate 10 + force_emission true + angle 60 + direction 0 1 0 + velocity dyn_random + { + min 10 + max 30 + } + time_to_live 4 + } + affector Scale + { + // Start with fast expansion + x_scale dyn_curved_linear + { + control_point 0 400 + control_point 0.2 200 + control_point 0.4 100 + control_point 0.6 50 + control_point 4 0 + } + y_scale dyn_curved_linear + { + control_point 0 1000 + control_point 0.2 500 + control_point 0.4 200 + control_point 0.6 100 + control_point 4 0 + } + } + affector Colour + { + colour_aff_time_colour 0 1 1 1 1 + colour_aff_time_colour 0.4 1 1 1 1 + colour_aff_time_colour 0.5 1 1 1 0 + } + } +} + +// --------------------------------------------------------------------------------------------------------------- +// example_017: +// - PlaneCollider +// --------------------------------------------------------------------------------------------------------------- +system example_017 +{ + technique + { + use_alias $defaultBillboardRenderer + material ParticleUniverse/Star + default_particle_width 120 + default_particle_height 120 + visual_particle_quota 3000 + emitter Box + { + position 0 400 0 + box_em_width 500 + box_em_height 10 + box_em_depth 500 + emission_rate 5 + angle 40 + direction 1 -1 0 + velocity 50 + time_to_live 10 + } + observer OnVelocity + { + // Don\xB4t move anymore if the velocity is low + velocity_threshold less_than 3 + handler DoFreeze {} + } + affector PlaneCollider + { + position 0 -200 0 + plane_collider_normal 0 1 0 + collision_intersection point + collision_type bounce + + // friction and bouncyness decrease rotation speed and velocity + collision_friction 0.7 + collision_bouncyness 0.7 + + } + affector TextureRotator + { + // Decrease of rotation speed if a particle collides is only possible if the particle controls + // its own rotation speed. + tex_rot_use_own_rotation true + tex_rot_speed 10 + } + affector LinearForce + { + force_aff_vector 0 -1200 0 + } + } +} + +// --------------------------------------------------------------------------------------------------------------- +// example_018: +// - With the OnCount observer the number of emitted particles are managed precisely. +// --------------------------------------------------------------------------------------------------------------- +system example_018 +{ + technique + { + use_alias $defaultBillboardRenderer + material ParticleUniverse/Hart + default_particle_width 50 + default_particle_height 50 + emitter Point + { + emission_rate 50 + angle 360 + direction 0 1 0 + velocity 400 + time_to_live 5 + } + observer OnCount + { + count_threshold greater_than 200 + handler DoStopSystem {} + } + } +} + +// --------------------------------------------------------------------------------------------------------------- +// example_019: +// - BoxCollider. +// --------------------------------------------------------------------------------------------------------------- +system example_019 +{ + technique + { + use_alias $defaultBillboardRenderer + material ParticleUniverse/Star + default_particle_width 10 + default_particle_height 10 + visual_particle_quota 5000 + + emitter Box + { + position 100 300 100 + box_em_width 300 + box_em_height 10 + box_em_depth 300 + emission_rate 1000 + angle 50 + direction -1 -2 -1 + velocity 200 + time_to_live 15 + } + affector BoxCollider + { + position 0 100 0 + box_collider_width 150 + box_collider_height 150 + box_collider_depth 150 + collision_intersection box + collision_type bounce + collision_bouncyness 0.2 + } + // Make sure that an emitted particle is white at the start + observer OnEmission + { + // This handler causes the 'colourReset' affector to be called only once + handler DoAffector + { + force_affector colourReset + } + } + // If the particle collides, it will turn red + observer OnCollision + { + // This handler causes the 'colourCollision' affector to be called only once + handler DoAffector + { + force_affector colourCollision + } + } + affector Colour colourReset + { + enabled false + colour_aff_time_colour 0 1 1 1 + } + affector Colour colourCollision + { + enabled false + colour_aff_time_colour 0 1 0 0 + } + affector LinearForce + { + force_aff_vector 0 -100 0 + } + } +} +// --------------------------------------------------------------------------------------------------------------- +// example_020: +// - Randomiser (affector) +// --------------------------------------------------------------------------------------------------------------- +system example_020 +{ + technique + { + use_alias $defaultBillboardRenderer + material ParticleUniverse/Star + default_particle_width 50 + default_particle_height 50 + emitter Point + { + emission_rate 2 + angle 360 + direction 0 1 0 + velocity 1 + time_to_live 10 + } + affector Randomiser + { + rand_aff_max_deviation_x 200 + rand_aff_max_deviation_y 200 + rand_aff_max_deviation_z 200 + rand_aff_time_step 0.1 + } + } +} Added: trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/scripts/pu_example_1_10.pu =================================================================== --- trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/scripts/pu_example_1_10.pu (rev 0) +++ trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/scripts/pu_example_1_10.pu 2008-02-18 11:42:58 UTC (rev 575) @@ -0,0 +1,402 @@ +// --------------------------------------------------------------------------------------------------------------- +// Define some aliasses for convenience +// --------------------------------------------------------------------------------------------------------------- +alias $PointEmitter +{ + emitter Point + { + emission_rate 50 + angle 25 + direction 0 1 0 + velocity 220 + time_to_live 3 + } +} +alias $LinearForce +{ + affector LinearForce + { + force_aff_vector 0 -100 0 + } +} +// --------------------------------------------------------------------------------------------------------------- +// example_001: +// - fixed_timeout +// - nonvisible_update_timeout +// - iteration_interval +// - use emitter and affector alias +// Example will present shocking movement, because the iteration_interval is set high +// --------------------------------------------------------------------------------------------------------------- +system example_001 +{ + fixed_timeout 10 + nonvisible_update_timeout 3 + iteration_interval 0.1 + technique + { + // Use the billboard renderer defined in the *.pua script + use_alias $defaultBillboardRenderer + material ParticleUniverse/GreenBall + default_particle_width 20 + default_particle_height 20 + visual_particle_quota 500 + use_alias $PointEmitter + use_alias $LinearForce + } +} +// --------------------------------------------------------------------------------------------------------------- +// example_002: +// - duration +// - repeat/delay +// --------------------------------------------------------------------------------------------------------------- +system example_002 +{ + technique + { + // Use the billboard renderer defined in the *.pua script + use_alias $defaultBillboardRenderer + material ParticleUniverse/Hart + default_particle_width 50 + default_particle_height 50 + visual_particle_quota 500 + emitter Point + { + // Disable the emitter initially. The repeat_delay will enable it again after \xB4x\xB4 seconds. + enabled false + emission_rate 50 + duration dyn_random + { + min 0.1 + max 3 + } + repeat_delay dyn_random + { + min 0.1 + max 3 + } + angle 25 + direction 0 1 0 + velocity 220 + time_to_live 3 + } + use_alias $LinearForce + } +} +// --------------------------------------------------------------------------------------------------------------- +// example_003: +// - position +// See how position of the technique, emitter and the SceneNode are combined. +// --------------------------------------------------------------------------------------------------------------- +system example_003 +{ + scale 0.5 0.5 0.5 + scale_velocity 0.5 + technique + { + position 500 0 0 + material ParticleUniverse/GreenBall + default_particle_width 20 + default_particle_height 20 + visual_particle_quota 500 + // Use the billboard renderer defined in the *.pua script + use_alias $defaultBillboardRenderer + emitter Point + { + position 0 200 0 + emission_rate 50 + angle 25 + direction 0 1 0 + velocity 200 + time_to_live 40 + duration 2 + } + affector Gravity + { + position -500 400 0 + gravity 50000 + } + } +} + +// --------------------------------------------------------------------------------------------------------------- +// example_004: +// - Sphere surface emitter +// - Colour Affector +// --------------------------------------------------------------------------------------------------------------- +system example_004 +{ + technique + { + // Use the billboard renderer defined in the *.pua script + use_alias $defaultBillboardRenderer + material ParticleUniverse/Star + default_particle_width 20 + default_particle_height 20 + visual_particle_quota 1500 + emitter SphereSurface + { + position 0 200 0 + sphere_surface_em_radius 100 + emission_rate 250 + velocity 0 + time_to_live 1.8 + } + affector Colour + { + colour_aff_time_colour 0 1 1 0 1 + colour_aff_time_colour 1 1 0 0 0 + } + affector Gravity + { + position 0 200 0 + gravity 5000 + } + } +} + +// --------------------------------------------------------------------------------------------------------------- +// example_005: +// - Vertex emitter +// The particles are emitted along the outline of the mesh. If all particles are gone, the particle system stops. +// --------------------------------------------------------------------------------------------------------------- +system example_005 +{ + scale 5 5 5 + scale_velocity 5 + technique + { + // Use the billboard renderer defined in the *.pua script + use_alias $defaultBillboardRenderer + material ParticleUniverse/Star + default_particle_width 5 + default_particle_height 5 + visual_particle_quota 1500 + emitter Vertex + { + vertex_em_mesh_name athene.mesh + vertex_em_step 30 + vertex_em_segments 5 + vertex_em_iterations 5 + position 0 0 0 + emission_rate 400 + angle 360 + direction 0 1 0 + velocity 2 + time_to_live 7 + } + observer OnClear + { + handler DoStopSystem {} + } + affector Colour + { + colour_aff_time_colour 0 1 1 0 + colour_aff_time_colour 1 0 0 0 + } + } +} + +// --------------------------------------------------------------------------------------------------------------- +// example_006: +// - Entity Renderer +// --------------------------------------------------------------------------------------------------------------- +system example_006 +{ + technique + { + default_particle_width 80 + default_particle_height 80 + default_particle_depth 10 + visual_particle_quota 10 + material ParticleUniverse/Crate + + renderer Entity + { + entity_renderer_mesh_name WoodPallet.mesh + } + + emitter Point + { + emission_rate 5 + angle 40 + direction 0 1 0 + velocity 300 + time_to_live 10 + } + + affector LinearForce + { + force_aff_vector 0 -100 0 + } + affector Align + { + } + } +} + +// --------------------------------------------------------------------------------------------------------------- +// example_007: +// - emitted emitters +// This is the Particle Universe version of Ogre's fireworks particle system +// --------------------------------------------------------------------------------------------------------------- +system example_007 +{ + technique + { + default_particle_width 10 + default_particle_height 10 + visual_particle_quota 1000 + emitted_emitter_quota 10 + use_alias $defaultBillboardRenderer + material Examples/Flare + + emitter Box + { + emits emitter_particle explosion + angle 20 + emission_rate 1000 + direction 0 1 0 + velocity 260 + time_to_live 3 + } + + emitter Point explosion + { + enabled false + angle 360 + emission_rate 1000 + time_to_live 2 + direction 0 1 0 + velocity 80 + duration 0.1 + repeat_delay dyn_random + { + min 2 + max 3 + } + } + + affector LinearForce + { + force_aff_vector 0 -100 0 + force_aff_application add + } + + affector Colour + { + colour_aff_time_colour 0 1 1 0 + colour_aff_time_colour 0.5 1 0 0 + colour_aff_time_colour 0.9 0 0 1 + colour_aff_time_colour 1 0 0 0 + } + } +} +// --------------------------------------------------------------------------------------------------------------- +// example_008: +// - OnQuota observer +// This particle system emits visual particles until the visual particle quota has been reached. This activates +// the event handler, which disables the emitter from further emission of particles. This way the emitter only +// emits the number of particles defined by the quota and then stops. +// --------------------------------------------------------------------------------------------------------------- +system example_008 +{ + technique + { + // Use the billboard renderer defined in the *.pua script + use_alias $defaultBillboardRenderer + + material ParticleUniverse/Hart + default_particle_width 50 + default_particle_height 50 + visual_particle_quota 200 + + emitter Point myPointEmitter + { + emission_rate 100 + angle 25 + direction 0 1 0 + velocity 220 + time_to_live 5 + } + + observer OnQuota + { + observe_particle_type visual_particle + handler DoEnableComponent + { + enable_component emitter_component myPointEmitter false + } + } + + use_alias $LinearForce + } +} +// --------------------------------------------------------------------------------------------------------------- +// example_009: +// - Circle emitter +// --------------------------------------------------------------------------------------------------------------- +system example_009 +{ + technique + { + // Use the billboard renderer defined in the *.pua script + use_alias $defaultBillboardRenderer + material ParticleUniverse/GreenBall + default_particle_width 10 + default_particle_height 10 + visual_particle_quota 5000 + emitter Circle + { + emission_rate 1000 + auto_direction true + time_to_live 5 + circle_em_radius 100 + circle_em_random false + circle_em_step 0.2 + velocity 70 + } + affector SineForce + { + force_aff_vector 0 80 0 + sinef_aff_frequency_min 5 + sinef_aff_frequency_max 5 + } + } +} +// --------------------------------------------------------------------------------------------------------------- +// example_010: +// - Circle emitter +// --------------------------------------------------------------------------------------------------------------- +system example_010 +{ + technique + { + use_alias $defaultBillboardRenderer + material ParticleUniverse/Star + default_particle_width 20 + default_particle_height 20 + visual_particle_quota 2000 + emitter Circle + { + emission_rate 300 + direction 0 1 0 + time_to_live 4 + circle_em_radius 100 + velocity 20 + } + affector Colour + { + colour_aff_time_colour 0 0 1 0 + colour_aff_time_colour 0.8 0 0 1 + colour_aff_time_colour 1 0 0 0 + } + affector Jet + { + jet_aff_accel dyn_random + { + min 0.1 + max 1 + } + } + } +} Added: trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/scripts/pu_example_21_30.pu =================================================================== --- trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/scripts/pu_example_21_30.pu (rev 0) +++ trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/scripts/pu_example_21_30.pu 2008-02-18 11:42:58 UTC (rev 575) @@ -0,0 +1,255 @@ +// --------------------------------------------------------------------------------------------------------------- +// example_021: +// --------------------------------------------------------------------------------------------------------------- +system example_021 +{ + technique + { + position -800 0 0 + default_particle_width 30 + default_particle_height 30 + visual_particle_quota 5000 + emitted_emitter_quota 1 + use_alias $defaultBillboardRenderer + material Examples/Flare + + emitter Point + { + emits emitter_particle Flares + emission_rate 1 + direction 1 0 0 + velocity 2000 + time_to_live 5 + } + + emitter SphereSurface Flares + { + angle 360 + sphere_surface_em_radius 100 + auto_direction true + emission_rate 3000 + time_to_live dyn_random + { + min 1 + max 3 + } + velocity dyn_random + { + min 60 + max 250 + } + } + affector Colour + { + colour_aff_time_colour 0 1 0 1 + colour_aff_time_colour 0.5 1 0 0 + colour_aff_time_colour 0.9 0 1 0 + colour_aff_time_colour 1 0 0 0 + } + } +} + +// --------------------------------------------------------------------------------------------------------------- +// example_022: RibbonTrailRenderer +// --------------------------------------------------------------------------------------------------------------- +system example_022 +{ + technique + { + // Set the quota low + visual_particle_quota 40 + material ParticleUniverse/RibbonTrail + renderer RibbonTrail + { + ribbontrail_vertex_colours true + ribbontrail_max_elements 60 + ribbontrail_length 600 + ribbontrail_width 10 + ribbontrail_random_initial_colour true + ribbontrail_colour_change 0.8 0.8 0.8 0.8 + } + emitter Point + { + emission_rate 10 + angle 360 + direction 0 1 0 + velocity 1500 + time_to_live 40 + } + affector Gravity + { + position 0 -200 -100 + gravity 550000 + } + affector Gravity + { + position 0 200 100 + gravity 550000 + } + } +} +// --------------------------------------------------------------------------------------------------------------- +// example_023: +// - Exclude emitters +// - PathFollower +// --------------------------------------------------------------------------------------------------------------- +system example_023 +{ + technique + { + default_particle_width 10 + default_particle_height 10 + visual_particle_quota 3000 + emitted_emitter_quota 10 + use_alias $defaultBillboardRenderer + material Examples/Flare + + emitter Point + { + emits emitter_particle flares + angle 360 + emission_rate 4 + direction 0 0.1 0 + velocity 200 + time_to_live 4 + } + + emitter Point flares + { + angle 360 + emission_rate 200 + time_to_live 2 + direction 0 1 0 + velocity 80 + } + + affector Colour + { + colour_aff_time_colour 0 1 1 1 + colour_aff_time_colour 0.6 1 1 0 + colour_aff_time_colour 0.9 1 0 0 + colour_aff_time_colour 1 0 0 0 + } + affector PathFollower + { + exclude_emitter "flares" + path_follower_point -40 -10 -40 + path_follower_point -10 50 40 + path_follower_point -10 -20 -10 + path_follower_point 40 -50 70 + path_follower_point -100 -10 -60 + } + } +} + +// --------------------------------------------------------------------------------------------------------------- +// example_024a and example_024b: +// This is combination of Particle Systems where the emitter of Particle System 'example_024a' emits +// Particle System 'example_024b' particles. +// With the use of the 'keep_local' attribute, the 'star' material sticks to the emitted particle system. +// --------------------------------------------------------------------------------------------------------------- +system example_024a +{ + technique + { + emitted_system_quota 10 + visual_particle_quota 10 + material ParticleUniverse/RibbonTrail + renderer RibbonTrail + { + ribbontrail_vertex_colours true + ribbontrail_max_elements 40 + ribbontrail_length 1000 + ribbontrail_width 15 + ribbontrail_random_initial_colour true + ribbontrail_colour_change 0.8 0.8 0.8 0.8 + } + + emitter Point + { + emits system_particle example_024b + angle 60 + emission_rate 1 + direction 0 1 0 + velocity 400 + time_to_live 7 + } + affector LinearForce + { + force_aff_vector 0 -200 0 + } + } +} + +system example_024b +{ + technique + { + default_particle_width 160 + default_particle_height 160 + visual_particle_quota 1 + material ParticleUniverse/Star + use_alias $defaultBillboardRenderer + keep_local true + + emitter Point + { + angle 360 + emission_rate 1 + force_emission true + direction 0 0 0 + velocity 0 + time_to_live 7 + } + } + technique + { + default_particle_width 10 + default_particle_height 10 + visual_particle_quota 100 + use_alias $defaultBillboardRenderer + material Examples/Flare + + emitter Point + { + angle 360 + emission_rate 50 + direction 0 -1 0 + velocity 100 + time_to_live 2 + } + affector LinearForce + { + force_aff_vector 0 -200 0 + } + } +} + +// --------------------------------------------------------------------------------------------------------------- +// example_025: PositionEmitter +// --------------------------------------------------------------------------------------------------------------- +system example_025 +{ + technique + { + default_particle_width 100 + default_particle_height 100 + use_alias $defaultBillboardRenderer + material Examples/Flare + emitter Position + { + emission_rate 10 + time_to_live 3 + random_position true + add_position 200 100 300 + add_position 0 400 0 + add_position -200 200 -100 + add_position 100 -200 0 + } + affector LinearForce + { + force_aff_vector 0 -200 0 + } + } +} + Added: trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/scripts/pu_explosion.pu =================================================================== --- trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/scripts/pu_explosion.pu (rev 0) +++ trunk/python-ogre/demos/particleuniverse/media/ParticleUniverse/scripts/pu_explosion.pu 2008-02-18 11:42:58 UTC (rev 575) @@ -0,0 +1,197 @@ +// ------------------------------------------- Begin: Explosion system ------------------------------------------- +// The explosion system is an example of a complex particle system. +// Note, that the Projectiles and debris are not emitted immediately, but only after some time to make the effect +// look a bit more realistic. +// --------------------------------------------------------------------------------------------------------------- +system explosionSystem +{ + // --------------- The Flame Burst --------------- + technique + { + use_alias $defaultBillboardRenderer + material ParticleUniverse/ExplosionFire + default_particle_width 10 + default_particle_height 10 + visual_particle_quota 500 + emitter SphereSurface BurstEmitter + { + emission_rate 20 + auto_direction true + sphere_surface_em_radius 5 + velocity 100 + time_to_live 2 + } + + // Change the colour of the burst + affector Colour + { + colour_aff_time_colour 0 1 1 0.95 + colour_aff_time_colour 0.5 0.18 0.05 0.01 + colour_aff_time_colour 1 0 0 0 + } + + // Let it grow fast, equally in all dimensions + affector Scale + { + xyz_scale 200 + } + + // After 0.7 seconds, the emitters stops + observer OnTime + { + on_time greater_than 0.7 + since_start_system true + handler DoEnableComponent + { + enable_component emitter_component BurstEmitter false + } + } + } + + // --------------- Projectiles (this technique is responsible for emitting the projectiles) --------------- + technique + { + use_alias $defaultBillboardRenderer + emitted_technique_quota 6 + + // Emit the technique that is responsible for the projectiles + emitter Point NucleusEmitter + { + enabled false + emission_rate 6 + emits technique_particle NucleusTechnique + force_emission true + angle 80 + direction 0 1 0 + velocity 300 + time_to_live 10 + } + + // Apply some kind of gravity + affector LinearForce + { + force_aff_vector 0 -100 0 + } + + // After 0.3 seconds, the emitter starts + observer OnTime + { + on_time greater_than 0.3 + since_start_system true + handler DoEnableComponent + { + enable_component emitter_component NucleusEmitter true + } + } + } + + // --------------- The emitted Projectile --------------- + technique NucleusTechnique + { + material ParticleUniverse/Nucleus + default_particle_width 15 + default_particle_height 15 + visual_particle_quota 500 + + // 'oriented_self' doesn't work, because the direction of the particle is zero. + // So use the default settings + use_alias $defaultBillboardRenderer + emitter Point + { + emission_rate 100 + direction 0 -1 0 + angle 360 + time_to_live 3 + velocity 2 + } + + // Change the texture from red to grey and fading out + affector Colour + { + colour_aff_time_colour 0 0.5 0.4 0.2 + colour_aff_time_colour 0.1 0.5 0.2 0.05 + colour_aff_time_colour 0.2 0.1 0.1 0.1 + colour_aff_time_colour 1 0 0 0 + } + + // Rotate the texture to keep variation + affector TextureRotator + { + tex_rot_use_own_rotation true + tex_rot_speed dyn_random + { + min 0.1 + max 1 + } + tex_rot_rotation dyn_random + { + min 1 + max 90 + } + } + + // Make the projectile smaller over time + affector Scale + { + xyz_scale -5 + } + } + + // --------------- Debris --------------- + technique + { + material ParticleUniverse/Debris + visual_particle_quota 500 + renderer Billboard + { + billboard_type oriented_self + } + + // Emit the debris + emitter Point DebrisEmitter + { + enabled false + emission_rate 100 + force_emission true + direction 0 -1 0 + angle 360 + time_to_live 5 + particle_height dyn_random + { + min 2 + max 20 + } + particle_width 3 + velocity dyn_random + { + min 100 + max 180 + } + } + + // Start with a normal coloured texture and fade out + affector Colour + { + colour_aff_time_colour 0 1 1 1 + colour_aff_time_colour 1 0 0 0 + } + + // Apply some kind of gravity + affector LinearForce + { + force_aff_vector 0 -100 0 + } + + // After 0.3 seconds, the emitters starts + observer OnTime + { + on_time greater_than 0.3 + since_start_system true + handler DoEnableComponent + { + enable_component emitter_component DebrisEmitter true + } + } + } +} +// ---------------------------------------------- End: Explosion system ---------------------------------------------- Added: trunk/python-ogre/demos/particleuniv... [truncated message content] |
From: <and...@us...> - 2008-02-18 11:36:13
|
Revision: 574 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=574&view=rev Author: andy_miller Date: 2008-02-18 03:36:18 -0800 (Mon, 18 Feb 2008) Log Message: ----------- Fixing Particleuniverse media Modified Paths: -------------- trunk/python-ogre/demos/particleuniverse/ogre.cfg Added Paths: ----------- trunk/python-ogre/demos/particleuniverse/mediaold/ Removed Paths: ------------- trunk/python-ogre/demos/particleuniverse/Media/ Copied: trunk/python-ogre/demos/particleuniverse/mediaold (from rev 565, trunk/python-ogre/demos/particleuniverse/Media) Modified: trunk/python-ogre/demos/particleuniverse/ogre.cfg =================================================================== --- trunk/python-ogre/demos/particleuniverse/ogre.cfg 2008-02-18 09:41:59 UTC (rev 573) +++ trunk/python-ogre/demos/particleuniverse/ogre.cfg 2008-02-18 11:36:18 UTC (rev 574) @@ -14,6 +14,6 @@ Anti aliasing=None Floating-point mode=Fastest Full Screen=No -Rendering Device=ATI Mobility Radeon X1300 +Rendering Device=ATI MOBILITY RADEON VSync=No Video Mode=800 x 600 @ 32-bit colour This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2008-02-18 09:41:55
|
Revision: 573 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=573&view=rev Author: andy_miller Date: 2008-02-18 01:41:59 -0800 (Mon, 18 Feb 2008) Log Message: ----------- Update to Caelum demo to match new API Modified Paths: -------------- trunk/python-ogre/demos/caelum/Demo_Caelum01.py trunk/python-ogre/demos/caelum/plugins.cfg Modified: trunk/python-ogre/demos/caelum/Demo_Caelum01.py =================================================================== --- trunk/python-ogre/demos/caelum/Demo_Caelum01.py 2008-02-16 01:57:37 UTC (rev 572) +++ trunk/python-ogre/demos/caelum/Demo_Caelum01.py 2008-02-18 09:41:59 UTC (rev 573) @@ -42,13 +42,14 @@ self.raySceneQuery.Ray = self.updateRay for queryResult in self.raySceneQuery.execute(): if queryResult.worldFragment is not None: - pos = self.camera.getPosition() - self.camera.setPosition (pos.x, pos.y - queryResult.distance + 10.0, pos.z) - break -## mCamera.setPosition(mCamera.getPosition().x, -## i.worldFragment.singleIntersection.y + 10, -## mCamera.getPosition().z) - +# pos = self.camera.getPosition() +# self.camera.setPosition (pos.x, pos.y - queryResult.distance + 10.0, pos.z) +# break + wf = queryResult.worldFragment + self.camera.setPosition(self.camera.getPosition().x, + wf.singleIntersection.y + 10, + self.camera.getPosition().z) + break return ret @@ -119,18 +120,16 @@ else: self.PostFiltering = True ogre.CompositorManager.getSingleton().setCompositorEnabled (self.window.getViewport (0), "Bloom", self.PostFiltering) - - if self.caelumSystem.getSun(): - t = self.caelumSystem.getSun().getSunPositionModel() - espm = caelum.castAsEarthSunPositionModel ( t ) - if espm : - espm.setJulianDate (self.caelumSystem.getUniversalClock ().getCurrentRelativeTime ()) - - ## EXTRA! Update the haze sun light position - mat = ogre.MaterialManager.getSingleton().getByName("CaelumDemoTerrain") - if mat: - mat.getTechnique(0).getPass("CaelumHaze").getVertexProgramParameters().setNamedConstant("sunDirection", self.caelumSystem.getSun().getSunDirection()) + ## Do some additional update. These should be removed from here; + ## CaelumSystem should do all required updates. + + ## Update the haze sun light position + if (self.caelumSystem.getSun ()): + mat = ogre.MaterialManager.getSingleton ().getByName ("CaelumDemoTerrain") + if mat.getTechnique (0).getPass ("CaelumHaze"): + mat.getTechnique (0).getPass ("CaelumHaze").getVertexProgramParameters ().setNamedConstant ("sunDirection", + self.caelumSystem.getSun ().getSunDirection ()) return ret class TerrainApplication(sf.Application): @@ -152,8 +151,8 @@ self.root.removeFrameListener(self.frameListener) self.frameListener = None print "deleted Listeners" - t = self.caelumSystem.getSun().setSunPositionModel(None) - print "Sun is None", t +# t = self.caelumSystem.getSun().setSunPositionModel(None) +# print "Sun is None", t t = self.caelumSystem.getSun().getSunPositionModel() print "Sun is None", t @@ -193,10 +192,21 @@ def _createCamera(self): self.camera = self.sceneManager.createCamera('PlayerCam') - self.camera.setPosition (ogre.Vector3(1100,1000,1000)) + + ## Start the camera on a hill in the middle of the terrain + ## looking towards Z+ (north). + ## Sun should rise in the east(left) and set in the west(right). + self.camera.setPosition (ogre.Vector3(775, 100, 997)) + self.camera.lookAt (ogre.Vector3(775, 100, 1000)) + + ## Set camera clip distances. Its important to test with + ## an infinite clip distance. + self.camera.setFarClipDistance(0); + self.camera.setNearClipDistance(5); + self.raySceneQuery = self.sceneManager.createRayQuery(ogre.Ray(self.camera.getPosition(), ogre.Vector3.NEGATIVE_UNIT_Y)) + - def _createScene(self): sceneManager = self.sceneManager camera = self.camera @@ -212,52 +222,68 @@ else: 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_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_CLOUDS | + caelum.CaelumSystem.CAELUM_COMPONENT_GROUND_FOG | + 0) + print componentMask ## Initialise Caelum - self.caelumSystem = caelum.CaelumSystem(self.root, self.sceneManager ) -# ,createSkyDome=skyDome, createClouds=clouds -# ) + self.caelumSystem = caelum.CaelumSystem(self.root, self.sceneManager,componentMask ) - ## Setup sun position model. - self.spm = caelum.SimpleSunPositionModel (ogre.Degree (13)) - ## IMHO EarthSunPositionModel is broken, so it default to sspm. - ##caelum.SunPositionModel *spm = new caelum.EarthSunPositionModel (ogre.Radian (ogre.Degree (37)), 0.5) + ## KNOWN BUG: The horizon is pure white if setManageFog is False. + ## I blame it on the transparent skydome. + self.caelumSystem.setManageSceneFog(True) + self.caelumSystem.setSceneFogDensityMultiplier(0.0015) ## Setup sun options - self.caelumSystem.getSun ().setAmbientMultiplier (ogre.ColourValue(0.5, 0.5, 0.5)) - self.caelumSystem.getSun ().setDiffuseMultiplier (ogre.ColourValue(3, 3, 2.7)) - ## For green terrain: - ##self.caelumSystem.getSun ().setDiffuseMultiplier (ogre.ColourValue(0.1, 3, 0.1)) - self.caelumSystem.getSun ().setSpecularMultiplier (ogre.ColourValue(5, 5, 5)) - self.caelumSystem.getSun ().setSunPositionModel (self.spm) - self.caelumSystem.getSun ().setManageAmbientLight (True) + if self.caelumSystem.getSun (): + self.caelumSystem.getSun ().setAmbientMultiplier (ogre.ColourValue(0.5, 0.5, 0.5)) + self.caelumSystem.getSun ().setDiffuseMultiplier (ogre.ColourValue(3, 3, 2.7)) + ## For green terrain: + ##mCaelumSystem.getSun ().setDiffuseMultiplier (ogre.ColourValue(0.1, 3, 0.1)) + self.caelumSystem.getSun ().setSpecularMultiplier (ogre.ColourValue(5, 5, 5)) + self.caelumSystem.getSun ().setManageAmbientLight (True) - ## Basic fogging setup. - ## This is a hack until proper fogging is implemented. -# self.caelumSystem.getSkyColourModel().setFogDensityMultiplier(0.0015) -# self.caelumSystem.setManageFog(True) + ## Setup fog options. + if self.caelumSystem.getGroundFog(): + self.caelumSystem.getGroundFog().findFogPassesByName() - ## Setup cloud options - if clouds: - self.caelumSystem.getClouds ().setCloudSpeed(ogre.Vector2(-0.00001, 0.00001)) - + + ## 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) ## Setup starfield options - self.caelumSystem.getStarfield ().setInclination (ogre.Degree (13)) + if self.caelumSystem.getStarfield (): + self.caelumSystem.getStarfield ().setInclination (ogre.Degree (13)) + + ## Set time acceleration. + self.caelumSystem.getUniversalClock ().setTimeScale (512) - ## Set some time parameters - self.caelumSystem.getUniversalClock ().setTimeScale (512) - self.caelumSystem.getUniversalClock ().setCurrentTime (18000) ## Jan 1st, 5am - - - ## Register all to the render window - self.renderWindow.addListener(self.caelumSystem) - - + ## Winter dawn in the southern hemisphere, looking north + self.caelumSystem.getUniversalClock ().setGregorianDateTime (2008, 7, 4, 20, 33, 0) + self.caelumSystem.getSolarSystemModel ().setObserverLongitude (ogre.Degree(151 + 12.0 / 60)) + + ## Sidney + self.caelumSystem.getSolarSystemModel ().setObserverLatitude (ogre.Degree(-33 + 52.0 / 60)) + ## Beyond the southern polar circle, no sunrise + ##mCaelumSystem.getSolarSystemModel ().setObserverLatitude (ogre.Degree(-70)) + ## Beyond the northern polar circle, no sunset + ##mCaelumSystem.getSolarSystemModel ().setObserverLatitude (ogre.Degree(70)) + + ## Register caelum to the render target + self.renderWindow.addListener (self.caelumSystem) + ## Put some terrain in the scene - terrain_cfg = "terrain.cfg" - - self.sceneManager.setWorldGeometry( terrain_cfg ) - + self.sceneManager.setWorldGeometry ("CaelumDemoTerrain.cfg") def _createFrameListener(self): # pass Modified: trunk/python-ogre/demos/caelum/plugins.cfg =================================================================== --- trunk/python-ogre/demos/caelum/plugins.cfg 2008-02-16 01:57:37 UTC (rev 572) +++ trunk/python-ogre/demos/caelum/plugins.cfg 2008-02-18 09:41:59 UTC (rev 573) @@ -2,18 +2,19 @@ ## Use this for Windows # Define plugin folder -PluginFolder=/home/andy/development/root/usr/lib/OGRE -#Plugin=RenderSystem_GL.dll -#Plugin=RenderSystem_Direct3D9.dll -#Plugin=Plugin_ParticleFX.dll -#Plugin=Plugin_BSPSceneManager.dll -#Plugin=Plugin_OctreeSceneManager.dll -#Plugin=Plugin_CgProgramManager.dll +PluginFolder=../../plugins +#home/andy/development/root/usr/lib/OGRE +Plugin=RenderSystem_GL.dll +Plugin=RenderSystem_Direct3D9.dll +Plugin=Plugin_ParticleFX.dll +Plugin=Plugin_BSPSceneManager.dll +Plugin=Plugin_OctreeSceneManager.dll +Plugin=Plugin_CgProgramManager.dll ## ## NOTE use this for MacOS or Linux - Plugin=RenderSystem_GL - Plugin=Plugin_ParticleFX - Plugin=Plugin_BSPSceneManager - Plugin=Plugin_OctreeSceneManager - Plugin=Plugin_CgProgramManager +# Plugin=RenderSystem_GL +# Plugin=Plugin_ParticleFX +# Plugin=Plugin_BSPSceneManager +# Plugin=Plugin_OctreeSceneManager +# Plugin=Plugin_CgProgramManager This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2008-02-16 01:57:31
|
Revision: 572 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=572&view=rev Author: andy_miller Date: 2008-02-15 17:57:37 -0800 (Fri, 15 Feb 2008) Log Message: ----------- Various 1.2 Updates Modified Paths: -------------- trunk/python-ogre/ChangeLog.txt trunk/python-ogre/PythonOgreConfig_nt.py trunk/python-ogre/PythonOgreConfig_posix.py trunk/python-ogre/PythonOgreInstallCreator.iss trunk/python-ogre/environment.py trunk/python-ogre/installWarning.rtf trunk/python-ogre/packages_2.5/ogre/renderer/OGRE/sf_OIS.py trunk/python-ogre/patch/ogre.patch trunk/python-ogre/scripts/updatesource.bat trunk/python-ogre/setup.py Added Paths: ----------- trunk/python-ogre/BuildModule.py trunk/python-ogre/demos/ogre/tests/Test_DataStream.py Removed Paths: ------------- trunk/python-ogre/BuildModule.py trunk/python-ogre/ThirdParty/caelum/CaelumPrerequisites.h.bak trunk/python-ogre/ThirdParty/quickgui/QuickGUIExportDLL.h.bak Deleted: trunk/python-ogre/BuildModule.py =================================================================== --- trunk/python-ogre/BuildModule.py 2008-02-16 01:46:30 UTC (rev 571) +++ trunk/python-ogre/BuildModule.py 2008-02-16 01:57:37 UTC (rev 572) @@ -1,202 +0,0 @@ -# -# BuildModule will build a Python-Ogre module. -# - -## Curent - -from optparse import OptionParser -import subprocess -import environment -import logging -import sys -import types -import os - -logger = None - -def setupLogging (logfilename): - # set up logging to file - logging.basicConfig(level=logging.DEBUG, - format='%(asctime)s %(name)-12s %(levelname)-8s %(message)s', - datefmt='%m-%d %H:%M', - filename=logfilename, - filemode='w') - # define a Handler which writes INFO messages or higher to the sys.stderr - console = logging.StreamHandler() - console.setLevel(logging.INFO) - # set a format which is simpler for console use - formatter = logging.Formatter('%(name)-12s: %(levelname)-8s %(message)s') - # tell the handler to use this format - 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 - """ - dict = {} - for c in dir(environment): - var = environment.__dict__[c] - if isinstance ( var, types.ClassType ) : ## OK so we know it's a class -# logger.debug ( "getClassList: Checking %s" % c ) - if hasattr(var, 'active') and hasattr(var, 'pythonModule'): # and it looks like one we care about -# logger.debug ( "getClassList: it's one of ours") - dict[c] = var - return dict - -def exit( ExitMessage ): - logger.error( ExitMessage ) - sys.exit( -1 ) - - -## This stuff has to be in my spawing sub process -# # export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$PREFIX/lib/pkgconfig -# # export LD_LIBRARY_PATH=$PREFIX/lib -# # export CFLAGS="-I$PREFIX/include -L$PREFIX/lib" -# # export CXXFLAGS=$CFLAGS -# # export LDFLAGS="-Wl,-rpath='\$\$ORIGIN/../../lib' -Wl,-rpath='\$\$ORIGIN' -Wl,-z,origin" -# # export PATH=$PREFIX/bin:$PATH -# # export PYTHONPATH=$PREFIX/lib/python$PYTHONVERSION/site-packages - - -def spawnTask ( task, cwdin = '' ): - """Execute a command line task and manage the return code etc - """ - PREFIX = environment.PREFIX - PATH = os.environ["PATH"] - env = os.environ - env["PKG_CONFIG_PATH"]=os.path.join(PREFIX,"lib/pkgconfig") - env["LD_LIBRARY_PATH"]=os.path.join(PREFIX,"lib") - if environment.isMac(): - env["CFLAGS"]="-I"+PREFIX+"/include -L"+PREFIX+"/lib" - env["CXXFLAGS"]="-I"+PREFIX+"/include -L"+PREFIX+"/lib" - ##env["LDFLAGS"]="-Wl,-rpath='\$\$ORIGIN/../../lib' -Wl,-rpath='\$\$ORIGIN' -Wl,-z,origin" ### Mac GCC 4.0.1 doesn't support rpath - env["PYTHONPATH"]=PREFIX+"/lib/python"+environment.PythonVersionString+"/site-packages" - else: - env["CFLAGS"]="-I"+os.path.join(PREFIX,"include")+ " -L"+os.path.join(PREFIX,"lib") - env["CXXFLAGS"]=env["CFLAGS"] - env["LDFLAGS"]="-Wl,-rpath='$$ORIGIN/../../lib' -Wl,-rpath='$$ORIGIN' -Wl,-z,origin" - env["PYTHONPATH"]=PREFIX+"/lib/python"+environment.PythonVersionString+"/site-packages" - env["ZZIPLIB_LIBS"]="-lzzip" - - env["PATH"]=PREFIX+"/bin:" + PATH - - - logger.debug ( "Spawning '%s' in '%s'" % (task,cwdin) ) - process = subprocess.Popen (task, shell=True,stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd = cwdin, env=env) - try: - out,err = process.communicate() - returncode = process.returncode - except: - returncode = -1 - - if returncode != 0: - logger.warning ( "Task Failed" ) - logger.debug ( out ) - logger.debug ( err ) - return returncode - -def retrieveSource ( module ): - """ Here's we we retrieve the necessary source files - """ - for cmd,args,cwd in module.source: - logger.info ("Retrieving %s" % args ) - ret = spawnTask ( cmd+ " " + args, cwd ) - -def buildModule ( module ): - """ Execute the build commands for the module - """ - for type_,cmd,path in module.buildCmds: - if path =='': - path = os.getcwd() - if type_ == 0 : # it's a shell command - logger.info ("Build Command %s " % cmd) - ret = spawnTask ( cmd, path ) - elif type_ == 1 : - logger.debug ("Compiling %s " % cmd ) - code = compile ( cmd, '<string>', 'exec' ) - logger.debug ("executing codeblock " ) - exec code - logger.debug ( "Exec done") - -def generateCode ( module ): - """ Generate the C++ wrapper code - """ - logger.info ( "Building Source code for " + module.name ) - ### AJM -- note the assumption that environment.py is sitting in the 'python-ogre' directory... - ret = spawnTask ( 'python generate_code.py', os.path.join(environment.root_dir, 'code_generators', module.name) ) - -def compileCode ( module ): - """ Compile the wrapper code and make the modules - """ - logger.info ( "Compiling Source code for " + module.name ) - ### AJM -- note the assumption that environment.py is sitting in the 'python-ogre' directory... - ret = spawnTask ( 'scons PROJECTS='+module.name, os.path.join(environment.root_dir) ) - - - -def parseInput(): - """Handle command line input """ - usage = "usage: %prog [options] moduleName" - parser = OptionParser(usage=usage, version="%prog 1.0") - parser.add_option("-r", "--retrieve", action="store_true", default=False,dest="retrieve", help="Retrieve the appropiate source before building") - parser.add_option("-b", "--build", action="store_true", default=False ,dest="build", help="Build the appropiate module") - parser.add_option("-g", "--gen", action="store_true", default=False ,dest="gencode", help="Generate Source Code for the module") - parser.add_option("-c", "--compile", action="store_true", default=False ,dest="compilecode", help="Compile Source Code for the module") - parser.add_option("-l", "--logfilename", default="log.out" ,dest="logfilename", help="Override the default log file name") - parser.add_option("-G", "--genall", action="store_true", default=False ,dest="gencodeall", help="Generate Source Code for all possible modules") - parser.add_option("-C", "--compileall", action="store_true", default=False ,dest="compilecodeall", help="Compile Source Code for all posssible modules") - - (options, args) = parser.parse_args() - return (options,args) - -if __name__ == '__main__': - classList = getClassList () - - (options, args) = parseInput() - if len(args) == 0 and not (options.compilecodeall or options.gencodeall): - exit("The module to build wasn't specified. Use -h for help") - - if options.retrieve==False and options.build==False and options.gencode==False and options.compilecode==False\ - and options.compilecodeall==False and options.gencodeall==False: - exit ( "You need to specific at least one option. Use -h for help") - - setupLogging(options.logfilename) - logger = logging.getLogger('PythonOgre.BuildModule') - - if not os.path.exists( environment.downloadPath ): - os.mkdir ( environment.downloadPath ) - - if not os.path.exists( environment.Config.ROOT_DIR ): - os.mkdir ( environment.Config.ROOT_DIR ) - if not os.path.exists( os.path.join(environment.Config.ROOT_DIR, 'usr' ) ): - os.mkdir ( os.path.join(environment.Config.ROOT_DIR, 'usr' ) ) - if options.gencodeall or options.compilecodeall: - for name,cls in environment.projects.items(): - if cls.active and cls.pythonModule: - if options.gencodeall: - generateCode( cls ) - if options.compilecodeall: - compileCode( cls ) - - else: - for moduleName in args: - if not classList.has_key( moduleName ): - exit("Module specificed was not found (%s is not in environment.py) " % moduleName ) - if options.retrieve: - retrieveSource ( classList[ moduleName ] ) - if options.build : - buildModule ( classList[ moduleName ] ) - if options.gencode : - if classList[ moduleName ].pythonModule == True: - generateCode ( classList[ moduleName ] ) - else: - print ( "Module specificed does not generate source code (%s is a supporting module)" % moduleName ) - if options.compilecode : - if classList[ moduleName ].pythonModule == True: - compileCode ( classList[ moduleName ] ) - else: - print ( "Module specificed does not need compiling (%s is a supporting module)" % moduleName ) - - Added: trunk/python-ogre/BuildModule.py =================================================================== --- trunk/python-ogre/BuildModule.py (rev 0) +++ trunk/python-ogre/BuildModule.py 2008-02-16 01:57:37 UTC (rev 572) @@ -0,0 +1,214 @@ +# +# BuildModule will build a Python-Ogre module. +# + +## Curent + +from optparse import OptionParser +import subprocess +import environment +import logging +import sys +import types +import os +import time + +logger = None +FULL_LOGGING = False # Set to true to log everything, even if successful +ENV_SET = False # global to ensure we don't set the environment too many times and break the shell. + +def setupLogging (logfilename): + # set up logging to file + logging.basicConfig(level=logging.DEBUG, + format='%(asctime)s %(name)-12s %(levelname)-8s %(message)s', + datefmt='%m-%d %H:%M', + filename=logfilename, + filemode='w') + # define a Handler which writes INFO messages or higher to the sys.stderr + console = logging.StreamHandler() + console.setLevel(logging.INFO) + # set a format which is simpler for console use + formatter = logging.Formatter('%(name)-12s: %(levelname)-8s %(message)s') + # tell the handler to use this format + 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 + """ + dict = {} + for c in dir(environment): + var = environment.__dict__[c] + if isinstance ( var, types.ClassType ) : ## OK so we know it's a class +# logger.debug ( "getClassList: Checking %s" % c ) + if hasattr(var, 'active') and hasattr(var, 'pythonModule'): # and it looks like one we care about +# logger.debug ( "getClassList: it's one of ours") + dict[c] = var + return dict + +def exit( ExitMessage ): + logger.error( ExitMessage ) + sys.exit( -1 ) + + +## This stuff has to be in my spawing sub process +# # export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$PREFIX/lib/pkgconfig +# # export LD_LIBRARY_PATH=$PREFIX/lib +# # export CFLAGS="-I$PREFIX/include -L$PREFIX/lib" +# # export CXXFLAGS=$CFLAGS +# # export LDFLAGS="-Wl,-rpath='\$\$ORIGIN/../../lib' -Wl,-rpath='\$\$ORIGIN' -Wl,-z,origin" +# # export PATH=$PREFIX/bin:$PATH +# # export PYTHONPATH=$PREFIX/lib/python$PYTHONVERSION/site-packages + + +def spawnTask ( task, cwdin = '' ): + """Execute a command line task and manage the return code etc + """ + global ENV_SET + PREFIX = environment.PREFIX + PATH = os.environ["PATH"] + env = os.environ + if not ENV_SET: # this actually changes the environment so we shouldn't do it more than once + env["PKG_CONFIG_PATH"]=os.path.join(PREFIX,"lib/pkgconfig") + env["LD_LIBRARY_PATH"]=os.path.join(PREFIX,"lib") + if environment.isMac(): + env["CFLAGS"]="-I"+PREFIX+"/include -L"+PREFIX+"/lib" + env["CXXFLAGS"]="-I"+PREFIX+"/include -L"+PREFIX+"/lib" + ##env["LDFLAGS"]="-Wl,-rpath='\$\$ORIGIN/../../lib' -Wl,-rpath='\$\$ORIGIN' -Wl,-z,origin" ### Mac GCC 4.0.1 doesn't support rpath + env["PYTHONPATH"]=PREFIX+"/lib/python"+environment.PythonVersionString+"/site-packages" + else: + env["CFLAGS"]="-I"+os.path.join(PREFIX,"include")+ " -L"+os.path.join(PREFIX,"lib") + env["CXXFLAGS"]=env["CFLAGS"] + env["LDFLAGS"]="-Wl,-rpath='$$ORIGIN/../../lib' -Wl,-rpath='$$ORIGIN' -Wl,-z,origin" + env["PYTHONPATH"]=PREFIX+"/lib/python"+environment.PythonVersionString+"/site-packages" + env["ZZIPLIB_LIBS"]="-lzzip" + + env["PATH"]=PREFIX+"/bin:" + PATH + ENV_SET=True + + logger.debug ( "Spawning '%s' in '%s'" % (task,cwdin) ) + process = subprocess.Popen (task, shell=True,stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd = cwdin, env=env) + try: + out,err = process.communicate() + returncode = process.returncode + except: + returncode = -1 + + if returncode != 0: + logger.warning ( "Task Failed" ) + logger.debug ( out ) + logger.debug ( err ) + elif FULL_LOGGING: + logger.warning ( "Full Logging ON" ) + logger.debug ( out ) + logger.debug ( err ) + + return returncode + +def retrieveSource ( module ): + """ Here's we we retrieve the necessary source files + """ + for cmd,args,cwd in module.source: + logger.info ("Retrieving %s" % args ) + ret = spawnTask ( cmd+ " " + args, cwd ) + +def buildModule ( module ): + """ Execute the build commands for the module + """ + for type_,cmd,path in module.buildCmds: + if path =='': + path = os.getcwd() + if type_ == 0 : # it's a shell command + logger.info ("Build Command %s " % cmd) + ret = spawnTask ( cmd, path ) + elif type_ == 1 : + logger.debug ("Compiling %s " % cmd ) + code = compile ( cmd, '<string>', 'exec' ) + logger.debug ("executing codeblock " ) + exec code + logger.debug ( "Exec done") + +def generateCode ( module ): + """ Generate the C++ wrapper code + """ + logger.info ( "Building Source code for " + module.name ) + ### AJM -- note the assumption that environment.py is sitting in the 'python-ogre' directory... + ret = spawnTask ( 'python generate_code.py', os.path.join(environment.root_dir, 'code_generators', module.name) ) + +def compileCode ( module ): + """ Compile the wrapper code and make the modules + """ + logger.info ( "Compiling Source code for " + module.name ) + ### AJM -- note the assumption that environment.py is sitting in the 'python-ogre' directory... + ret = spawnTask ( 'scons PROJECTS='+module.name, os.path.join(environment.root_dir) ) + if ret != 0 : + time.sleep(5) ## not sure why scons doesn't work after first failure + + + +def parseInput(): + """Handle command line input """ + usage = "usage: %prog [options] moduleName" + parser = OptionParser(usage=usage, version="%prog 1.0") + parser.add_option("-r", "--retrieve", action="store_true", default=False,dest="retrieve", help="Retrieve the appropiate source before building") + parser.add_option("-b", "--build", action="store_true", default=False ,dest="build", help="Build the appropiate module") + parser.add_option("-g", "--gen", action="store_true", default=False ,dest="gencode", help="Generate Source Code for the module") + parser.add_option("-c", "--compile", action="store_true", default=False ,dest="compilecode", help="Compile Source Code for the module") + parser.add_option("-l", "--logfilename", default="log.out" ,dest="logfilename", help="Override the default log file name") + parser.add_option("-G", "--genall", action="store_true", default=False ,dest="gencodeall", help="Generate Source Code for all possible modules") + parser.add_option("-C", "--compileall", action="store_true", default=False ,dest="compilecodeall", help="Compile Source Code for all posssible modules") + + (options, args) = parser.parse_args() + return (options,args) + +if __name__ == '__main__': + classList = getClassList () + + (options, args) = parseInput() + if len(args) == 0 and not (options.compilecodeall or options.gencodeall): + exit("The module to build wasn't specified. Use -h for help") + + if options.retrieve==False and options.build==False and options.gencode==False and options.compilecode==False\ + and options.compilecodeall==False and options.gencodeall==False: + exit ( "You need to specific at least one option. Use -h for help") + + setupLogging(options.logfilename) + logger = logging.getLogger('PythonOgre.BuildModule') + + if not os.path.exists( environment.downloadPath ): + os.mkdir ( environment.downloadPath ) + + if not os.path.exists( environment.Config.ROOT_DIR ): + os.mkdir ( environment.Config.ROOT_DIR ) + if not os.path.exists( os.path.join(environment.Config.ROOT_DIR, 'usr' ) ): + os.mkdir ( os.path.join(environment.Config.ROOT_DIR, 'usr' ) ) + if options.gencodeall or options.compilecodeall: + for name,cls in environment.projects.items(): + if cls.active and cls.pythonModule: + if options.gencodeall: + generateCode( cls ) + if options.compilecodeall: + compileCode( cls ) + + else: + for moduleName in args: + if not classList.has_key( moduleName ): + exit("Module specificed was not found (%s is not in environment.py) " % moduleName ) + if options.retrieve: + retrieveSource ( classList[ moduleName ] ) + if options.build : + buildModule ( classList[ moduleName ] ) + if options.gencode : + if classList[ moduleName ].pythonModule == True: + generateCode ( classList[ moduleName ] ) + else: + print ( "Module specificed does not generate source code (%s is a supporting module)" % moduleName ) + if options.compilecode : + if classList[ moduleName ].pythonModule == True: + compileCode ( classList[ moduleName ] ) + else: + print ( "Module specificed does not need compiling (%s is a supporting module)" % moduleName ) + + Modified: trunk/python-ogre/ChangeLog.txt =================================================================== --- trunk/python-ogre/ChangeLog.txt 2008-02-16 01:46:30 UTC (rev 571) +++ trunk/python-ogre/ChangeLog.txt 2008-02-16 01:57:37 UTC (rev 572) @@ -1,3 +1,27 @@ +Feb 2008: Release +================= +Code Generation: +* Fix to the Automatic Function transformation code as it wasn't picking up constant void pointers. + This fixes PixelUtil::unpackColour and a number of other functions +* Fix to addPoly function in OgreNewt (takes an array of vertices) +* Fix to OgreForests as the API had changed in base C++ library +* Fix to Py++ to remove reference when building wrapper code in "transformers.py" - bug showed in renderQueueListener +* Fix to BuildModule.py to only set the environment once (-C now works for compiling everything) +* Fix to ComonUtils/__init__.py - Free Functions wheren't being handled by Futional Transformation or Return Pointer fixing. +* Enhancements to MemoryDataStream to make it simplier to use (can be used for any 'DataStream' requirements) + +Updates and General Library Improvements to: +* NxOgre_09 +* QuickGui, Caelum, OgreForests +* Particle Universe 0.6 +* Bullet 2.66 +* Caelum Rev 127 and updated media. +* Physx - free functions are now exposed so should work as an independ library + +New Modules: +* Hydrax 0.1 +* opensteer + Janurary 08 2008: Snapshot ========================== New Modules: Modified: trunk/python-ogre/PythonOgreConfig_nt.py =================================================================== --- trunk/python-ogre/PythonOgreConfig_nt.py 2008-02-16 01:46:30 UTC (rev 571) +++ trunk/python-ogre/PythonOgreConfig_nt.py 2008-02-16 01:57:37 UTC (rev 572) @@ -62,10 +62,10 @@ PATH_ogrevideoffmpeg = os.path.join(PATH_THIRDPARTY,'ffmpeg') -PATH_Bullet= os.path.join(BASE_DIR, 'bullet-2.64') +PATH_Bullet= os.path.join(BASE_DIR, 'bullet-2.66') PATH_PhysX= "c:/program files/AGEIA Technologies/SDK/v2.7.3/SDKs" PATH_Theora= os.path.join(PATH_OgreAddons,'videoplugin','TheoraVideo') -PATH_ffmpeg= os.path.join(BASE_DIR, 'ffmpeg') +PATH_ffmpeg= os.path.join(PATH_THIRDPARTY,'extra') PATH_navi = os.path.join(BASE_DIR, 'navi','Navi') PATH_particleuniverse = os.path.join(PATH_Ogre, 'PlugIns', 'ParticleUniverse' ) @@ -158,7 +158,8 @@ PATH_INCLUDE_OggVorbisTheora = [ os.path.join(BASE_DIR,'ogg','include') ,os.path.join(BASE_DIR, 'vorbis', 'include') - ,os.path.join(PATH_OgreAddons,'videoplugin','theora','include') + ,os.path.join(BASE_DIR, 'libtheora-1.0beta2', 'include') +# ,os.path.join(PATH_OgreAddons,'videoplugin','theoravideo','include') # ,os.path.join(PATH_OgreAddons,'videoplugin','ptypes-2.1.1','include') ,os.path.join(PATH_THIRDPARTY,'ptypes','include') ] Modified: trunk/python-ogre/PythonOgreConfig_posix.py =================================================================== --- trunk/python-ogre/PythonOgreConfig_posix.py 2008-02-16 01:46:30 UTC (rev 571) +++ trunk/python-ogre/PythonOgreConfig_posix.py 2008-02-16 01:57:37 UTC (rev 572) @@ -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.64') +PATH_Bullet= os.path.join(BASE_DIR, 'bullet-2.66') ###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/PythonOgreInstallCreator.iss =================================================================== --- trunk/python-ogre/PythonOgreInstallCreator.iss 2008-02-16 01:46:30 UTC (rev 571) +++ trunk/python-ogre/PythonOgreInstallCreator.iss 2008-02-16 01:57:37 UTC (rev 572) @@ -3,33 +3,33 @@ ; [Setup] AppName=Python-Ogre -AppVerName=Python-Ogre 1.1 +AppVerName=Python-Ogre 1.2 DefaultDirName=C:\PythonOgre DefaultGroupName=Python-Ogre OutputBaseFilename=PythonOgreInstaller OutputDir=C:\temp SourceDir=C:\Development\PythonOgreRelease -VersionInfoDescription=Release 1.1 of Python-Ogre +VersionInfoDescription=Release 1.2 of Python-Ogre AllowNoIcons=true -AppPublisher=OpenSource +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.1.0 +AppVersion=1.2.0 LicenseFile=LICENSE.GPL Compression=lzma InfoBeforeFile=InstallWarning.rtf InfoAfterFile=postinstall.rtf SolidCompression=true AppCopyright=LPGL -VersionInfoCompany=OpenSource -VersionInfoTextVersion=1.1.0 +VersionInfoCompany=OpenSource (Andy and Team) +VersionInfoTextVersion=1.2.0 VersionInfoCopyright=PythonOgre Development Team RestartIfNeededByRun=false UninstallDisplayName=PythonOgre WizardImageFile=compiler:WizModernImage-IS.bmp WizardSmallImageFile=compiler:WizModernSmallImage-IS.bmp -VersionInfoVersion=1.1.0 +VersionInfoVersion=1.2.0 [Files] ; base files, demos and tools Source: *; DestDir: {app} Deleted: trunk/python-ogre/ThirdParty/caelum/CaelumPrerequisites.h.bak =================================================================== --- trunk/python-ogre/ThirdParty/caelum/CaelumPrerequisites.h.bak 2008-02-16 01:46:30 UTC (rev 571) +++ trunk/python-ogre/ThirdParty/caelum/CaelumPrerequisites.h.bak 2008-02-16 01:57:37 UTC (rev 572) @@ -1,71 +0,0 @@ -/* -This file is part of Caelum. -See http://www.ogre3d.org/wiki/index.php/Caelum - -Copyright (c) 2006-2008 Caelum team. See Contributors.txt for details. - -Caelum is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published -by the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -Caelum is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with Caelum. If not, see <http://www.gnu.org/licenses/>. -*/ - -#ifndef CAELUMPREREQUISITES_H -#define CAELUMPREREQUISITES_H - -// Include external headers -#include "Ogre.h" - -// Define the dll export qualifier if compiling for Windows -#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32 - #ifdef CAELUM_LIB - #define DllExport __declspec (dllexport) - #else - #ifdef __MINGW32__ - #define DllExport - #else - #define DllExport __declspec (dllimport) - #endif - #endif -#else - #define DllExport -#endif - -// Define the version code -#define CAELUM_VERSION_MAIN 0 -#define CAELUM_VERSION_SEC 2 -#define CAELUM_VERSION_TER 1 -#define CAELUM_VERSION = (CAELUM_VERSION_MAIN << 16) | (CAELUM_VERSION_SEC << 8) | CAELUM_VERSION_TER - -namespace caelum { - /// Resource group name for caelum resources. - extern DllExport Ogre::String RESOURCE_GROUP_NAME; - - // Render group for caelum stuff - // It's best to have them all together - enum CaelumRenderQueueGroupId - { - CAELUM_RENDER_QUEUE_STARFIELD = Ogre::RENDER_QUEUE_SKIES_EARLY + 0, - CAELUM_RENDER_QUEUE_SKYDOME = Ogre::RENDER_QUEUE_SKIES_EARLY + 1, - CAELUM_RENDER_QUEUE_SUN = Ogre::RENDER_QUEUE_SKIES_EARLY + 2, - CAELUM_RENDER_QUEUE_CLOUDS = Ogre::RENDER_QUEUE_SKIES_EARLY + 3, - CAELUM_RENDER_QUEUE_GROUND_FOG = Ogre::RENDER_QUEUE_SKIES_EARLY + 4, - }; - - // Caelum needs a lot of precission for astronomical calculations. - // Very few calculations use it, and the precission IS required. - typedef double LongReal; -} - -// Log macro -#define LOG(msg) Ogre::LogManager::getSingleton().logMessage(msg); - -#endif //CAELUMPREREQUISITES_H Deleted: trunk/python-ogre/ThirdParty/quickgui/QuickGUIExportDLL.h.bak =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIExportDLL.h.bak 2008-02-16 01:46:30 UTC (rev 571) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIExportDLL.h.bak 2008-02-16 01:57:37 UTC (rev 572) @@ -1,22 +0,0 @@ -#ifndef QUICKGUIEXPORTDLL_H -#define QUICKGUIEXPORTDLL_H - -#include "OgrePlatform.h" - -#ifndef _QuickGUIExport - #if defined(OGRE_PLATFORM) -// #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32 && !defined ( __MINGW32__ ) -// # if defined( QUICKGUI_EXPORTS ) -// # define _QuickGUIExport __declspec( dllexport ) -// # else -// # define _QuickGUIExport __declspec( dllimport ) -// # endif -// #else -// # define _QuickGUIExport -// #endif -// #else - #define _QuickGUIExport -// #endif - -#endif -#endif Added: trunk/python-ogre/demos/ogre/tests/Test_DataStream.py =================================================================== --- trunk/python-ogre/demos/ogre/tests/Test_DataStream.py (rev 0) +++ trunk/python-ogre/demos/ogre/tests/Test_DataStream.py 2008-02-16 01:57:37 UTC (rev 572) @@ -0,0 +1,105 @@ +import os,sys, ctypes +if sys.platform == 'win32': + os.environ['PATH'] += ';' + __file__[0] + + + +import ogre.renderer.OGRE as ogre +import SampleFramework +import math + +## +# OK so this doesn't work !!! The problem is that we can't override "size" in OgreDataStream as it isn't virtual +## +class FilePtr ( ogre.DataStream ): + + def __init__ ( self, filename ): + ogre.DataStream.__init__(self) + datain = file(filename, 'r').read() # should put error checking etc here + self.length = len ( datain ) + self.source = ctypes.create_string_buffer( datain ) ## Note it allocates one extra byte + + def read ( self, dest, size ): + if size <= self.length: + print ogre.CastInt(dest) + print "DEST:", dest +# ctypes.memmove ( ogre.CastInt(dest), self.source, size ) # again should check here for +# print self.source.raw + + + return size + + def size ( self ): + return self.length + +class TutorialApplication(SampleFramework.Application): + + + def _createScene(self): + sm = self.sceneManager + + ## a couple of tests to shown memory data stream usage.. + + ## This is one way to use ctypes + f= file("test.material", 'r') + MatString = f.read() + f.close() + RawMemBuffer = ctypes.create_string_buffer( MatString ) ## Note it allocates one extra byte + ## Now we create the MemoryDataStream using the void pointer to the ctypes buffer + dataptr = ogre.MemoryDataStream ( pMem = ogre.CastVoidPtr(ctypes.addressof ( RawMemBuffer )), + size = len (MatString) + 1 ) + ## Now lets get the string and print it... + p = dataptr.getAsString() + print len(p) + print p + + ## if you want you can confirm this + ogre.MaterialManager.getSingleton().parseScript( dataptr, "General" ) + print "MATERIAL OK using Ctypes" + + ## test iterator + print "Using special iterator" + for d in dataptr.getPtr(): + print chr(d), + + ## This is one way to use helper functions -- first with a list + f= file("test.material", 'r') + MatString = f.read() + f.close() + buf = [] + for c in MatString: + buf.append( ord ( c ) ) + memDataStream = ogre.MemoryDataStream ( "MyBuffer", len (buf) ) + memDataStream.setData ( buf ) + p = memDataStream.getAsString() + print len(p) + print p + print "MemoryBuffer OK using helper functions with a list" + + f= file("test.material", 'r') + MatString = f.read() + f.close() + memDataStream = ogre.MemoryDataStream ( "MyBuffer", len (buf) ) + memDataStream.setData ( MatString ) + p = memDataStream.getAsString() + print len(p) + print p + print "MemoryBuffer OK using helper functions with a string" + + +# # # fp = FilePtr ( "test.material") +# # # dataptr = ogre.MemoryDataStream ( "Testing", sourceStream=fp ) +# # # p = dataptr.getDataPointer() +# # # print "DataPointer", p +# # # # print ogre.CastInt ( p ) +# # # sys.exit() +# # # p=dataptr.getAsString() +# # # print len ( p ) +# # # print p +# # # + + sys.exit() + +if __name__ == '__main__': + ta = TutorialApplication() + ta.go() Modified: trunk/python-ogre/environment.py =================================================================== --- trunk/python-ogre/environment.py 2008-02-16 01:46:30 UTC (rev 571) +++ trunk/python-ogre/environment.py 2008-02-16 01:57:37 UTC (rev 572) @@ -546,6 +546,17 @@ [wget, "http://prdownloads.sourceforge.net/wgois/ois-1.0RC1.tar.gz", downloadPath] ] buildCmds = [ + [0, tar + " zxf " + os.path.join(downloadPath,base)+".tar.gz --overwrite",os.getcwd() ], + [0, "rm -rf autom4te.cache", os.path.join(os.getcwd(), base )], + [0, "libtoolize --force && aclocal $ACLOCAL_FLAGS && autoheader &&\ + automake --include-deps --add-missing --foreign && autoconf", + os.path.join(os.getcwd(), base )], + [0,"./configure --prefix=%s --includedir=%s/include" % (PREFIX,PREFIX) ,os.path.join(os.getcwd(), base )], + [0,'make', os.path.join(os.getcwd(), base )], + [0,'make install', os.path.join(os.getcwd(), base )] + ] + + buildCmds = [ [0, tar + " zxf " + os.path.join(downloadPath,base)+".tar.gz --overwrite",os.getcwd() ], [0, "./bootstrap" ,os.path.join(os.getcwd(), base )], [0,"./configure --prefix=%s --includedir=%s/include" %(PREFIX,PREFIX) ,os.path.join(os.getcwd(), base )], @@ -905,7 +916,7 @@ class particleuniverse: active = True pythonModule = True - version="0.5" + version="0.6" name='particleuniverse' parent="ogre/addons" CCFLAGS = ' ' @@ -925,7 +936,7 @@ class nxogre: active = True pythonModule = True - version="1.0a" + version="1.0-19" name='nxogre' parent="ogre/physics" cflags="" @@ -966,7 +977,7 @@ cflags="" include_dirs = [ Config.PATH_Boost, Config.PATH_INCLUDE_Ogre, - Config.PATH_INCLUDE_NxOgre, + Config.PATH_INCLUDE_NxOgre_09, ] for d in Config.PATH_INCLUDE_PhysX: include_dirs.append( d ) @@ -1186,9 +1197,9 @@ class bullet: active = True pythonModule = True - version= "2.64" + version= "2.66" name='bullet' - base = "bullet-2.64" + base = "bullet-2.66" baseDir = os.path.join(os.getcwd(), base) parent = "ogre/physics" libs=[Config.LIB_Boost, 'LibBulletCollision', 'LibBulletDynamics'] @@ -1201,7 +1212,7 @@ , Config.PATH_INCLUDE_Bullet ] source=[ - [wget, "http://downloads.sourceforge.net/bullet/"+base+".tgz", downloadPath] + [wget, "http://downloads.sourceforge.net/bullet/"+base+"A.tgz", downloadPath] ] buildCmds = [ [0, "tar zxf " +os.path.join(downloadPath, base)+".tgz", ''], Modified: trunk/python-ogre/installWarning.rtf =================================================================== --- trunk/python-ogre/installWarning.rtf 2008-02-16 01:46:30 UTC (rev 571) +++ trunk/python-ogre/installWarning.rtf 2008-02-16 01:57:37 UTC (rev 572) @@ -1,60 +1,66 @@ -{\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff0\deff0\stshfdbch13\stshfloch0\stshfhich0\stshfbi0\deflang2057\deflangfe2052{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f1\fswiss\fcharset0\fprq2{\*\panose 020b0604020202020204}Arial;} -{\f2\fmodern\fcharset0\fprq1{\*\panose 02070309020205020404}Courier New;}{\f13\fnil\fcharset134\fprq2{\*\panose 02010600030101010101}SimSun{\*\falt ??\'a8\'ac?};}{\f37\fnil\fcharset134\fprq2{\*\panose 02010600030101010101}@SimSun;} -{\f101\fscript\fcharset0\fprq2{\*\panose 030f0702030302020204}Comic Sans MS;}{\f371\froman\fcharset238\fprq2 Times New Roman CE;}{\f372\froman\fcharset204\fprq2 Times New Roman Cyr;}{\f374\froman\fcharset161\fprq2 Times New Roman Greek;} -{\f375\froman\fcharset162\fprq2 Times New Roman Tur;}{\f376\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f377\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f378\froman\fcharset186\fprq2 Times New Roman Baltic;} -{\f379\froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f381\fswiss\fcharset238\fprq2 Arial CE;}{\f382\fswiss\fcharset204\fprq2 Arial Cyr;}{\f384\fswiss\fcharset161\fprq2 Arial Greek;}{\f385\fswiss\fcharset162\fprq2 Arial Tur;} -{\f386\fbidi \fswiss\fcharset177\fprq2 Arial (Hebrew);}{\f387\fbidi \fswiss\fcharset178\fprq2 Arial (Arabic);}{\f388\fswiss\fcharset186\fprq2 Arial Baltic;}{\f389\fswiss\fcharset163\fprq2 Arial (Vietnamese);} -{\f391\fmodern\fcharset238\fprq1 Courier New CE;}{\f392\fmodern\fcharset204\fprq1 Courier New Cyr;}{\f394\fmodern\fcharset161\fprq1 Courier New Greek;}{\f395\fmodern\fcharset162\fprq1 Courier New Tur;} -{\f396\fbidi \fmodern\fcharset177\fprq1 Courier New (Hebrew);}{\f397\fbidi \fmodern\fcharset178\fprq1 Courier New (Arabic);}{\f398\fmodern\fcharset186\fprq1 Courier New Baltic;}{\f399\fmodern\fcharset163\fprq1 Courier New (Vietnamese);} -{\f503\fnil\fcharset0\fprq2 SimSun Western{\*\falt ??\'a8\'ac?};}{\f743\fnil\fcharset0\fprq2 @SimSun Western;}{\f1381\fscript\fcharset238\fprq2 Comic Sans MS CE;}{\f1382\fscript\fcharset204\fprq2 Comic Sans MS Cyr;} -{\f1384\fscript\fcharset161\fprq2 Comic Sans MS Greek;}{\f1385\fscript\fcharset162\fprq2 Comic Sans MS Tur;}{\f1388\fscript\fcharset186\fprq2 Comic Sans MS Baltic;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255; -\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0; -\red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 -\fs24\lang3081\langfe2052\loch\f0\hich\af0\dbch\af13\cgrid\langnp3081\langfenp2052 \snext0 Normal;}{\*\cs10 \additive \ssemihidden Default Paragraph Font;}{\* +{\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff0\deff0\stshfdbch13\stshfloch0\stshfhich0\stshfbi0\deflang1033\deflangfe1041{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f1\fswiss\fcharset0\fprq2{\*\panose 020b0604020202020204}Arial;} +{\f2\fmodern\fcharset0\fprq1{\*\panose 02070309020205020404}Courier New;}{\f13\fnil\fcharset134\fprq2{\*\panose 02010600030101010101}SimSun{\*\falt ??\'a1\'a7??};}{\f37\fscript\fcharset0\fprq2{\*\panose 030f0702030302020204}Comic Sans MS;} +{\f38\fnil\fcharset134\fprq2{\*\panose 02010600030101010101}@SimSun;}{\f229\froman\fcharset238\fprq2 Times New Roman CE;}{\f230\froman\fcharset204\fprq2 Times New Roman Cyr;}{\f232\froman\fcharset161\fprq2 Times New Roman Greek;} +{\f233\froman\fcharset162\fprq2 Times New Roman Tur;}{\f234\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f235\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f236\froman\fcharset186\fprq2 Times New Roman Baltic;} +{\f237\froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f239\fswiss\fcharset238\fprq2 Arial CE;}{\f240\fswiss\fcharset204\fprq2 Arial Cyr;}{\f242\fswiss\fcharset161\fprq2 Arial Greek;}{\f243\fswiss\fcharset162\fprq2 Arial Tur;} +{\f244\fbidi \fswiss\fcharset177\fprq2 Arial (Hebrew);}{\f245\fbidi \fswiss\fcharset178\fprq2 Arial (Arabic);}{\f246\fswiss\fcharset186\fprq2 Arial Baltic;}{\f247\fswiss\fcharset163\fprq2 Arial (Vietnamese);} +{\f249\fmodern\fcharset238\fprq1 Courier New CE;}{\f250\fmodern\fcharset204\fprq1 Courier New Cyr;}{\f252\fmodern\fcharset161\fprq1 Courier New Greek;}{\f253\fmodern\fcharset162\fprq1 Courier New Tur;} +{\f254\fbidi \fmodern\fcharset177\fprq1 Courier New (Hebrew);}{\f255\fbidi \fmodern\fcharset178\fprq1 Courier New (Arabic);}{\f256\fmodern\fcharset186\fprq1 Courier New Baltic;}{\f257\fmodern\fcharset163\fprq1 Courier New (Vietnamese);} +{\f361\fnil\fcharset0\fprq2 SimSun Western{\*\falt ??\'a1\'a7??};}{\f599\fscript\fcharset238\fprq2 Comic Sans MS CE;}{\f600\fscript\fcharset204\fprq2 Comic Sans MS Cyr;}{\f602\fscript\fcharset161\fprq2 Comic Sans MS Greek;} +{\f603\fscript\fcharset162\fprq2 Comic Sans MS Tur;}{\f606\fscript\fcharset186\fprq2 Comic Sans MS Baltic;}{\f611\fnil\fcharset0\fprq2 @SimSun Western;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0; +\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128; +\red192\green192\blue192;}{\stylesheet{\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang3081\langfe2052\loch\f0\hich\af0\dbch\af13\cgrid\langnp3081\langfenp2052 +\snext0 Normal;}{\*\cs10 \additive \ssemihidden Default Paragraph Font;}{\* \ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tblind0\tblindtype3\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv \ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \fs20\lang1024\langfe1024\loch\f0\hich\af0\dbch\af13\cgrid\langnp1024\langfenp1024 \snext11 \ssemihidden Normal Table;}{ \s15\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af2\afs20\alang1025 \ltrch\fcs0 \fs20\lang3081\langfe2052\loch\f2\hich\af2\dbch\af13\cgrid\langnp3081\langfenp2052 \sbasedon0 \snext15 \styrsid746239 -Plain Text;}}{\*\latentstyles\lsdstimax156\lsdlockeddef0}{\*\rsidtbl \rsid27887\rsid746239\rsid1659429\rsid2193901\rsid5061328\rsid13635829\rsid16395146}{\*\generator Microsoft Word 11.0.8026;}{\info{\title WARNING}{\author Andy Miller} -{\operator Andy Miller}{\creatim\yr2007\mo4\dy1\hr11\min36}{\revtim\yr2007\mo4\dy1\hr12\min12}{\version5}{\edmins15}{\nofpages1}{\nofwords146}{\nofchars835}{\*\company Juniper Networks, Inc.}{\nofcharsws980}{\vern24609}{\*\password 00000000}} -{\*\xmlnstbl }\paperw11906\paperh16838\margl1152\margr1152\margt1440\margb1440\gutter0\ltrsect \widowctrl\ftnbj\aenddoc\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\formshade\horzdoc\dgmargin\dghspace180\dgvspace180\dghorigin1152\dgvorigin1440 -\dghshow1\dgvshow1\jexpand\viewkind1\viewscale100\pgbrdrhead\pgbrdrfoot\splytwnine\ftnlytwnine\htmautsp\nolnhtadjtbl\useltbaln\alntblind\lytcalctblwd\lyttblrtgr\lnbrkrule\nobrkwrptbl\snaptogridincell\allowfieldendsel\wrppunct +Plain Text;}{\*\cs16 \additive \rtlch\fcs1 \af0 \ltrch\fcs0 \ul\cf2 \sbasedon10 \styrsid1599737 Hyperlink;}}{\*\latentstyles\lsdstimax156\lsdlockeddef0}{\*\rsidtbl \rsid27887\rsid746239\rsid1599737\rsid1659429\rsid2193901\rsid5061328\rsid13635829 +\rsid16395146}{\*\generator Microsoft Word 11.0.0000;}{\info{\title WARNING}{\author Andy Miller}{\operator amiller}{\creatim\yr2007\mo4\dy1\hr11\min36}{\revtim\yr2008\mo2\dy10\hr9\min25}{\version6}{\edmins23}{\nofpages1}{\nofwords127}{\nofchars728} +{\*\company Juniper Networks, Inc.}{\nofcharsws854}{\vern24611}{\*\password 00000000}}{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/2003/wordml}}\paperw11906\paperh16838\margl1152\margr1152\margt1440\margb1440\gutter0\ltrsect +\widowctrl\ftnbj\aenddoc\donotembedsysfont0\donotembedlingdata1\grfdocevents0\validatexml0\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors0\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\formshade\horzdoc\dgmargin\dghspace180 +\dgvspace180\dghorigin1152\dgvorigin1440\dghshow1\dgvshow1 +\jexpand\viewkind1\viewscale100\pgbrdrhead\pgbrdrfoot\splytwnine\ftnlytwnine\htmautsp\nolnhtadjtbl\useltbaln\alntblind\lytcalctblwd\lyttblrtgr\lnbrkrule\nobrkwrptbl\snaptogridincell\allowfieldendsel\wrppunct \asianbrkrule\rsidroot27887\newtblstyruls\nogrowautofit \fet0{\*\wgrffmtfilter 013f}\ilfomacatclnup0\ltrpar \sectd \ltrsect\linex0\endnhere\sectlinegrid360\sectdefaultcl\sectrsid746239\sftnbj {\*\pnseclvl1\pnucrm\pnqc\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2\pnucltr\pnqc\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3\pndec\pnqc\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnqc\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5 \pndec\pnqc\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnqc\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnqc\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8 \pnlcltr\pnqc\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnqc\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}\pard\plain \ltrpar \s15\qc \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid5061328 \rtlch\fcs1 \af2\afs20\alang1025 \ltrch\fcs0 \fs20\lang3081\langfe2052\loch\af2\hich\af2\dbch\af13\cgrid\langnp3081\langfenp2052 {\rtlch\fcs1 -\ab\af2\afs24 \ltrch\fcs0 \b\f101\fs24\ul\insrsid5061328\charrsid1659429 \hich\af101\dbch\af13\loch\f101 WARNING \hich\f101 \endash \loch\f101 Change to Python-Ogre +\ab\af2\afs28 \ltrch\fcs0 \b\f37\fs28\insrsid1599737\charrsid1599737 \hich\af37\dbch\af13\loch\f37 W\hich\af37\dbch\af13\loch\f37 elcom\hich\af37\dbch\af13\loch\f37 e\hich\af37\dbch\af13\loch\f37 to }{\rtlch\fcs1 \ab\af2\afs28 \ltrch\fcs0 +\b\f37\fs28\insrsid5061328\charrsid1599737 \hich\af37\dbch\af13\loch\f37 Python-Ogre \par }\pard \ltrpar\s15\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid746239 {\rtlch\fcs1 \af2 \ltrch\fcs0 \insrsid5061328\charrsid746239 \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\afs18 \ltrch\fcs0 \f1\fs18\insrsid5061328\charrsid1659429 \hich\af1\dbch\af13\loch\f1 \hich\f1 The module layout for Python-Ogre has changed. Previous versions had multiple separate modules, each sitting at the same \'93\loch\f1 -\hich\f1 level\'94\loch\f1 . This \hich\af1\dbch\af13\loch\f1 has been changed to a hierarchical structure: -\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid5061328\charrsid1659429 -\par }\pard\plain \ltrpar\s15\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid1659429 \rtlch\fcs1 \af2\afs20\alang1025 \ltrch\fcs0 \fs20\lang3081\langfe2052\loch\af2\hich\af2\dbch\af13\cgrid\langnp3081\langfenp2052 -{\rtlch\fcs1 \af2\afs16 \ltrch\fcs0 \fs16\insrsid5061328\charrsid1659429 \hich\af2\dbch\af13\loch\f2 /PythonXX/lib/site-packages/ogre/.. -\par }\pard \ltrpar\s15\ql \fi720\li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid2193901 {\rtlch\fcs1 \af2\afs16 \ltrch\fcs0 \fs16\insrsid5061328\charrsid1659429 \hich\af2\dbch\af13\loch\f2 /renderer/OGRE -\par \hich\af2\dbch\af13\loch\f2 /io/OIS -\par \hich\af2\dbch\af13\loch\f2 /gui/CEGUI -\par \hich\af2\dbch\af13\loch\f2 /sound/O\hich\af2\dbch\af13\loch\f2 greAL -\par \hich\af2\dbch\af13\loch\f2 /physics/ODE -\par \hich\af2\dbch\af13\loch\f2 /physics/OgreRefApp -\par \hich\af2\dbch\af13\loch\f2 /physics/OgreOde -\par \hich\af2\dbch\af13\loch\f2 /physics/OgreNewt -\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\afs20 \ltrch\fcs0 \f1\fs20\insrsid5061328\charrsid1659429 -\par }{\rtlch\fcs1 \af1\afs18 \ltrch\fcs0 \f1\fs18\insrsid5061328\charrsid1659429 \hich\af1\dbch\af13\loch\f1 Due to this change }{\rtlch\fcs1 \ab\ai\af1\afs18 \ltrch\fcs0 \b\i\f1\fs18\insrsid5061328\charrsid1659429 \hich\af1\dbch\af13\loch\f1 import}{ -\rtlch\fcs1 \af1\afs18 \ltrch\fcs0 \f1\fs18\insrsid5061328\charrsid1659429 \hich\af1\dbch\af13\loch\f1 statements in existing Pyt\hich\af1\dbch\af13\loch\f1 hon-Ogre code will need to be updated \hich\f1 \endash \loch\f1 }{\rtlch\fcs1 \ab\af1\afs18 -\ltrch\fcs0 \b\f1\fs18\insrsid5061328\charrsid1659429 \hich\af1\dbch\af13\loch\f1 this will (initially) break existing code}{\rtlch\fcs1 \af1\afs18 \ltrch\fcs0 \f1\fs18\insrsid5061328\charrsid1659429 \hich\af1\dbch\af13\loch\f1 -. You can refer to the updated demos as reference on how to use the new module layout. +\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\af1\dbch\af13\loch\f1 Also during installation \hich\af1\dbch\af13\loch\f1 we will remove any existing (previous) versions of Python-Ogr\hich\af1\dbch\af13\loch\f1 e\hich\af1\dbch\af13\loch\f1 . -\par -\par \hich\af1\dbch\af13\loch\f1 This \hich\af1\dbch\af13\loch\f1 will involve\hich\af1\dbch\af13\loch\f1 deleting the Ogre, OIS, CEGUI, OgreRefApp, ODE, OgreNewt,\hich\af1\dbch\af13\loch\f1 FMOD,\hich\af1\dbch\af13\loch\f1 and OgreOde directories in -\hich\af1\dbch\af13\loch\f1 the }{\rtlch\fcs1 \ai\af1\afs18 \ltrch\fcs0 \i\f1\fs18\insrsid5061328\charrsid1659429 \hich\af1\dbch\af13\loch\f1 site-packages}{\rtlch\fcs1 \af1\afs18 \ltrch\fcs0 \f1\fs18\insrsid5061328\charrsid1659429 -\hich\af1\dbch\af13\loch\f1 directory of your Python installation. -\par -\par \hich\af1\dbch\af13\loch\f1 If you have made changes to your lib/site-packages/orge (etc) directories you may w\hich\af1\dbch\af13\loch\f1 ish to back them up before continuing.}{\rtlch\fcs1 \af0\afs18 \ltrch\fcs0 \fs18\insrsid5061328\charrsid1659429 -\hich\af0\dbch\af13\loch\f0 }{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid5061328\charrsid746239 +\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 +\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 +00d0c9ea79f9bace118c8200aa004ba90b02000000170000001600000068007400740070003a002f002f007700770077002e0070007900740068006f006e002e006f00720067000000e0c9ea79f9bace118c8200aa004ba90b4600000068007400740070003a002f002f007700770077002e0070007900740068006f006e00 +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 +\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 ) +\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: +\par }\pard \ltrpar\ql \li720\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin720\itap0\pararsid1599737 {\rtlch\fcs1 \af2 \ltrch\fcs0 \f2\insrsid1599737\charrsid1599737 \hich\af2\dbch\af13\loch\f2 c\hich\af2\dbch\af13\loch\f2 d +\hich\af2\dbch\af13\loch\f2 c:\\PythonOgre\\demos\\ogre +\par \hich\af2\dbch\af13\loch\f2 python Demo_Smoke.py}{\rtlch\fcs1 \af2 \ltrch\fcs0 \f2\insrsid1599737 +\par }{\rtlch\fcs1 \af2 \ltrch\fcs0 \f2\insrsid1599737\charrsid1599737 \par }\pard\plain \ltrpar\s15\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid746239 \rtlch\fcs1 \af2\afs20\alang1025 \ltrch\fcs0 \fs20\lang3081\langfe2052\loch\af2\hich\af2\dbch\af13\cgrid\langnp3081\langfenp2052 { -\rtlch\fcs1 \af2 \ltrch\fcs0 \insrsid5061328\charrsid746239 +\rtlch\fcs1 \af2\afs24 \ltrch\fcs0 \f37\fs24\insrsid1599737\charrsid1599737 \hich\af37\dbch\af13\loch\f37 There are }{\rtlch\fcs1 \af2\afs24 \ltrch\fcs0 \f37\fs24\insrsid1599737 \hich\af37\dbch\af13\loch\f37 more than 20 }{\rtlch\fcs1 \af2\afs24 +\ltrch\fcs0 \f37\fs24\insrsid1599737\charrsid1599737 \hich\af37\dbch\af13\loch\f37 libraries \hich\af37\dbch\af13\loch\f37 included\hich\af37\dbch\af13\loch\f37 \hich\af37\dbch\af13\loch\f37 +with this binary release and it is almost certain that bugs are still to be found \loch\af37\dbch\af13\hich\f37 \endash \hich\af37\dbch\af13\loch\f37 please \hich\af37\dbch\af13\loch\f37 report these via the user forum\hich\af37\dbch\af13\loch\f37 at } +{\field\flddirty{\*\fldinst {\rtlch\fcs1 \af2\afs24 \ltrch\fcs0 \f37\fs24\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://www.python-ogre.org\hich\af37\dbch\af13\loch\f37 "\hich\af37\dbch\af13\loch\f37 }{\rtlch\fcs1 \af2\afs24 \ltrch\fcs0 \f37\fs24\insrsid1599737\charrsid1599737 {\*\datafield +00d0c9ea79f9bace118c8200aa004ba90b02000000170000001b00000068007400740070003a002f002f007700770077002e0070007900740068006f006e002d006f006700720065002e006f00720067000000e0c9ea79f9bace118c8200aa004ba90b5000000068007400740070003a002f002f007700770077002e007000 +7900740068006f006e002d006f006700720065002e006f00720067002f000000795881f43b1d7f48af2c825dc485276300000000a5ab0000}}}{\fldrslt {\rtlch\fcs1 \af2\afs24 \ltrch\fcs0 \cs16\f37\fs24\ul\cf2\insrsid1599737\charrsid1599737 \hich\af37\dbch\af13\loch\f37 +http://www.python-ogre.org}}}\sectd \linex0\endnhere\sectlinegrid360\sectdefaultcl\sectrsid746239\sftnbj {\rtlch\fcs1 \af2\afs24 \ltrch\fcs0 \f37\fs24\insrsid5061328\charrsid1599737 +\par }{\rtlch\fcs1 \af2 \ltrch\fcs0 \insrsid1599737\charrsid746239 \par }\pard \ltrpar\s15\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid5061328 {\rtlch\fcs1 \af2 \ltrch\fcs0 \insrsid5061328\charrsid746239 \par }} \ No newline at end of file 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-02-16 01:46:30 UTC (rev 571) +++ trunk/python-ogre/packages_2.5/ogre/renderer/OGRE/sf_OIS.py 2008-02-16 01:57:37 UTC (rev 572) @@ -19,8 +19,8 @@ import os import os.path - paths = [os.path.join(os.getcwd(), '../plugins.cfg'), - os.path.join(os.getcwd(), 'plugins.cfg'), + 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')] Modified: trunk/python-ogre/patch/ogre.patch =================================================================== --- trunk/python-ogre/patch/ogre.patch 2008-02-16 01:46:30 UTC (rev 571) +++ trunk/python-ogre/patch/ogre.patch 2008-02-16 01:57:37 UTC (rev 572) @@ -27,7 +27,16 @@ /** Get a single line from the stream. @remarks The delimiter character is not included in the data - +@@ -146,7 +147,7 @@ + /** Returns the total size of the data to be read from the stream, + or 0 if this is indeterminate for this stream. + */ +- size_t size(void) const { return mSize; } ++ virtual size_t size(void) const { return mSize; } + + /** Close the stream; this makes further operations invalid. */ + virtual void close(void) = 0; + --- ogrenew/OgreMain/include/OgreHardwareBuffer.h 23 Aug 2006 08:18:33 -0000 1.17 +++ ogrenew/OgreMain/include/OgreHardwareBuffer.h 24 Nov 2007 00:37:00 -0000 @@ -31,6 +31,8 @@ Modified: trunk/python-ogre/scripts/updatesource.bat =================================================================== --- trunk/python-ogre/scripts/updatesource.bat 2008-02-16 01:46:30 UTC (rev 571) +++ trunk/python-ogre/scripts/updatesource.bat 2008-02-16 01:57:37 UTC (rev 572) @@ -14,8 +14,8 @@ cd %_ROOT%\NxOgre %_SVN% up del /q %_TP%\nxogre -xcopy /s /y NxOgre\include %_TP%\nxogre -xcopy /s /y NxOgre\source %_TP%\nxogre +xcopy /s /y include %_TP%\nxogre +xcopy /s /y source %_TP%\nxogre cd %_ROOT%\ogreal %_SVN% up @@ -50,5 +50,13 @@ copy include\*.h %_TP%\forests copy source\*.cpp %_TP%\forests +cd %_ROOT%\opensteer +%_SVN% up +cd trunk +xcopy /s include\* %_TP%\opensteer +copy src\*.cpp %_TP%\opensteer +copy include\OpenSteer\*.h %_TP%\opensteer + + popd endlocal Modified: trunk/python-ogre/setup.py =================================================================== --- trunk/python-ogre/setup.py 2008-02-1... [truncated message content] |
From: <and...@us...> - 2008-02-16 01:46:23
|
Revision: 571 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=571&view=rev Author: andy_miller Date: 2008-02-15 17:46:30 -0800 (Fri, 15 Feb 2008) Log Message: ----------- QuickGUI Media Update Added Paths: ----------- trunk/python-ogre/demos/qgui/media/fonts/micross.fontdef trunk/python-ogre/demos/qgui/media/fonts/micross.ttf trunk/python-ogre/demos/qgui/media/skins/positionToUv.cg trunk/python-ogre/demos/qgui/media/skins/qgui/SkinSet.qgui.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.border.bottom.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.border.bottomleft.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.border.bottomright.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.border.left.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.border.right.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.border.top.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.border.topleft.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.border.topright.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.down.border.bottom.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.down.border.bottomleft.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.down.border.bottomright.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.down.border.left.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.down.border.right.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.down.border.top.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.down.border.topleft.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.down.border.topright.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.over.border.bottom.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.over.border.bottomleft.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.over.border.bottomright.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.over.border.left.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.over.border.right.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.over.border.top.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.over.border.topleft.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.over.border.topright.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.checkbox.checked.disabled.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.checkbox.checked.down.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.checkbox.checked.over.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.checkbox.checked.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.checkbox.unchecked.disabled.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.checkbox.unchecked.down.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.checkbox.unchecked.over.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.checkbox.unchecked.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.checked.disabled.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.combobox.highlight.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.console.border.bottom.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.console.border.bottomleft.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.console.border.bottomright.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.console.border.left.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.console.border.right.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.console.border.top.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.console.border.topleft.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.console.border.topright.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.console.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.cursor.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.cursor.resize.diagonal1.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.cursor.resize.diagonal2.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.cursor.resize.leftright.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.cursor.resize.updown.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.cursor.textselect.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.multilinelabel.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.radiobutton.selected.disabled.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.radiobutton.selected.down.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.radiobutton.selected.over.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.radiobutton.selected.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.radiobutton.unselected.disabled.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.radiobutton.unselected.down.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.radiobutton.unselected.over.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.radiobutton.unselected.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.skinset trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.textbox.border.bottom.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.textbox.border.bottomleft.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.textbox.border.bottomright.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.textbox.border.left.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.textbox.border.right.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.textbox.border.top.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.textbox.border.topleft.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.textbox.border.topright.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.textselection.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.titlebar.button.down.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.titlebar.button.over.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.titlebar.button.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.titlebar.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.tree.button.down.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.tree.button.over.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.tree.button.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.tree.minus.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.tree.plus.png trunk/python-ogre/demos/qgui/media/skins/skinTemplate.material Added: trunk/python-ogre/demos/qgui/media/fonts/micross.fontdef =================================================================== --- trunk/python-ogre/demos/qgui/media/fonts/micross.fontdef (rev 0) +++ trunk/python-ogre/demos/qgui/media/fonts/micross.fontdef 2008-02-16 01:46:30 UTC (rev 571) @@ -0,0 +1,128 @@ +micross.8.5 +{ + type truetype + source micross.ttf + size 8.5 + resolution 72 +} + + +micross.10 +{ + type truetype + source micross.ttf + size 10 + resolution 72 +} + +micross.12 +{ + type truetype + source micross.ttf + size 12 + resolution 72 +} + +micross.14 +{ + type truetype + source micross.ttf + size 14 + resolution 72 +} + +micross.16 +{ + type truetype + source micross.ttf + size 16 + resolution 72 +} + +micross.18 +{ + type truetype + source micross.ttf + size 18 + resolution 72 +} + +micross.20 +{ + type truetype + source micross.ttf + size 20 + resolution 72 +} + +micross.24 +{ + type truetype + source micross.ttf + size 24 + resolution 72 +} + +micross.28 +{ + type truetype + source micross.ttf + size 28 + resolution 72 +} + +micross.32 +{ + type truetype + source micross.ttf + size 32 + resolution 72 +} + +micross.36 +{ + type truetype + source micross.ttf + size 36 + resolution 72 +} + +micross.42 +{ + type truetype + source micross.ttf + size 42 + resolution 72 +} + +micross.50 +{ + type truetype + source micross.ttf + size 50 + resolution 72 +} + +micross.60 +{ + type truetype + source micross.ttf + size 60 + resolution 72 +} + +micross.75 +{ + type truetype + source micross.ttf + size 75 + resolution 72 +} + +BlueHighwayBig2 +{ + type truetype + source bluehigh.ttf + size 75 + resolution 55 +} Added: trunk/python-ogre/demos/qgui/media/fonts/micross.ttf =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/fonts/micross.ttf ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/positionToUv.cg =================================================================== --- trunk/python-ogre/demos/qgui/media/skins/positionToUv.cg (rev 0) +++ trunk/python-ogre/demos/qgui/media/skins/positionToUv.cg 2008-02-16 01:46:30 UTC (rev 571) @@ -0,0 +1,43 @@ +void PositiontoUv_vp +( + in float4 position: POSITION, + in float2 texCoord: TEXCOORD0, + + out float2 otexCoord0: TEXCOORD0, + out float2 otexCoord1: TEXCOORD1, + out float4 oPosition: POSITION, + + uniform float4x4 worldViewProj +) +{ + otexCoord0 = texCoord; + + otexCoord1.x = (position.x + 1) / 2; + otexCoord1.y = (1 - position.y) / 2; + + //oPosition = mul(worldViewProj, position); + oPosition = position; +} + + +void PositiontoUv_fp +( + in float2 texCoord0: TEXCOORD0, + in float2 texCoord1: TEXCOORD1, + + out float4 oColor: COLOR, + + uniform sampler skin : register(s0), + uniform sampler background : register(s1), + + uniform float blend +) +{ + float4 skinColor = tex2D(skin, texCoord0); + float4 backgroundColor = tex2D(background, texCoord1); + + if (skinColor.a == 1.0f || skinColor.a == 0.0f) + oColor = skinColor; + else + oColor = lerp(skinColor, backgroundColor, blend); +} Added: trunk/python-ogre/demos/qgui/media/skins/qgui/SkinSet.qgui.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/SkinSet.qgui.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.border.bottom.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.border.bottom.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.border.bottomleft.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.border.bottomleft.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.border.bottomright.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.border.bottomright.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.border.left.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.border.left.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.border.right.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.border.right.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.border.top.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.border.top.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.border.topleft.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.border.topleft.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.border.topright.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.border.topright.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.down.border.bottom.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.down.border.bottom.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.down.border.bottomleft.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.down.border.bottomleft.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.down.border.bottomright.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.down.border.bottomright.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.down.border.left.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.down.border.left.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.down.border.right.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.down.border.right.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.down.border.top.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.down.border.top.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.down.border.topleft.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.down.border.topleft.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.down.border.topright.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.down.border.topright.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.over.border.bottom.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.over.border.bottom.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.over.border.bottomleft.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.over.border.bottomleft.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.over.border.bottomright.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.over.border.bottomright.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.over.border.left.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.over.border.left.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.over.border.right.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.over.border.right.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.over.border.top.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.over.border.top.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.over.border.topleft.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.over.border.topleft.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.over.border.topright.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.over.border.topright.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.checkbox.checked.disabled.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.checkbox.checked.disabled.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.checkbox.checked.down.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.checkbox.checked.down.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.checkbox.checked.over.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.checkbox.checked.over.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.checkbox.checked.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.checkbox.checked.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.checkbox.unchecked.disabled.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.checkbox.unchecked.disabled.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.checkbox.unchecked.down.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.checkbox.unchecked.down.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.checkbox.unchecked.over.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.checkbox.unchecked.over.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.checkbox.unchecked.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.checkbox.unchecked.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.checked.disabled.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.checked.disabled.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.combobox.highlight.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.combobox.highlight.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.console.border.bottom.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.console.border.bottom.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.console.border.bottomleft.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.console.border.bottomleft.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.console.border.bottomright.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.console.border.bottomright.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.console.border.left.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.console.border.left.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.console.border.right.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.console.border.right.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.console.border.top.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.console.border.top.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.console.border.topleft.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.console.border.topleft.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.console.border.topright.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.console.border.topright.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.console.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.console.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.cursor.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.cursor.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.cursor.resize.diagonal1.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.cursor.resize.diagonal1.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.cursor.resize.diagonal2.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.cursor.resize.diagonal2.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.cursor.resize.leftright.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.cursor.resize.leftright.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.cursor.resize.updown.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.cursor.resize.updown.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.cursor.textselect.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.cursor.textselect.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.multilinelabel.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.multilinelabel.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.radiobutton.selected.disabled.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.radiobutton.selected.disabled.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.radiobutton.selected.down.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.radiobutton.selected.down.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.radiobutton.selected.over.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.radiobutton.selected.over.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.radiobutton.selected.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.radiobutton.selected.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.radiobutton.unselected.disabled.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.radiobutton.unselected.disabled.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.radiobutton.unselected.down.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.radiobutton.unselected.down.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.radiobutton.unselected.over.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.radiobutton.unselected.over.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.radiobutton.unselected.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.radiobutton.unselected.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.skinset =================================================================== --- trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.skinset (rev 0) +++ trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.skinset 2008-02-16 01:46:30 UTC (rev 571) @@ -0,0 +1,582 @@ + +skinset qgui +{ + size 1024 1024 + texture SkinSet.qgui.png + element button.border.bottom + { + dimension 0 0 0.126953 0.00292969 + } + element button.border.bottomleft + { + dimension 0.12793 0 0.132813 0.00292969 + } + element button.border.bottomright + { + dimension 0.133789 0 0.138672 0.00292969 + } + element button.border.left + { + dimension 0.908203 0.00585938 0.913086 0.0214844 + } + element button.border.right + { + dimension 0.914063 0.00585938 0.918945 0.0214844 + } + element button.border.top + { + dimension 0.139648 0 0.266602 0.00292969 + } + element button.border.topleft + { + dimension 0.267578 0 0.272461 0.00292969 + } + element button.border.topright + { + dimension 0.273438 0 0.27832 0.00292969 + } + element button.disabled + { + dimension 0.325195 0.0458984 0.457031 0.0849609 + } + element button.down.border.bottom + { + dimension 0.279297 0 0.40625 0.00292969 + } + element button.down.border.bottomleft + { + dimension 0.407227 0 0.412109 0.00292969 + } + element button.down.border.bottomright + { + dimension 0.413086 0 0.417969 0.00292969 + } + element button.down.border.left + { + dimension 0.919922 0.00585938 0.924805 0.0214844 + } + element button.down.border.right + { + dimension 0.925781 0.00585938 0.930664 0.0214844 + } + element button.down.border.top + { + dimension 0.418945 0 0.545898 0.00292969 + } + element button.down.border.topleft + { + dimension 0.546875 0 0.551758 0.00292969 + } + element button.down.border.topright + { + dimension 0.552734 0 0.557617 0.00292969 + } + element button.down + { + dimension 0.652344 0.00585938 0.779297 0.0214844 + } + element button.over.border.bottom + { + dimension 0.558594 0 0.685547 0.00292969 + } + element button.over.border.bottomleft + { + dimension 0.686523 0 0.691406 0.00292969 + } + element button.over.border.bottomright + { + dimension 0.692383 0 0.697266 0.00292969 + } + element button.over.border.left + { + dimension 0.931641 0.00585938 0.936523 0.0214844 + } + element button.over.border.right + { + dimension 0.9375 0.00585938 0.942383 0.0214844 + } + element button.over.border.top + { + dimension 0.698242 0 0.825195 0.00292969 + } + element button.over.border.topleft + { + dimension 0.826172 0 0.831055 0.00292969 + } + element button.over.border.topright + { + dimension 0.832031 0 0.836914 0.00292969 + } + element button.over + { + dimension 0.780273 0.00585938 0.907227 0.0214844 + } + element button + { + dimension 0.524414 0.00585938 0.651367 0.0214844 + } + element checkbox.checked.disabled + { + dimension 0.416992 0.254883 0.475586 0.313477 + } + element checkbox.checked.down + { + dimension 0.119141 0.254883 0.177734 0.313477 + } + element checkbox.checked.over + { + dimension 0.476563 0.254883 0.535156 0.313477 + } + element checkbox.checked + { + dimension 0.536133 0.254883 0.594727 0.313477 + } + element checkbox.unchecked.disabled + { + dimension 0.178711 0.254883 0.237305 0.313477 + } + element checkbox.unchecked.down + { + dimension 0.238281 0.254883 0.296875 0.313477 + } + element checkbox.unchecked.over + { + dimension 0.297852 0.254883 0.356445 0.313477 + } + element checkbox.unchecked + { + dimension 0.357422 0.254883 0.416016 0.313477 + } + element checked.disabled + { + dimension 0.595703 0.254883 0.654297 0.313477 + } + element checked.down + { + dimension 0.655273 0.254883 0.713867 0.313477 + } + element checked.over + { + dimension 0.714844 0.254883 0.773438 0.313477 + } + element checked + { + dimension 0.774414 0.254883 0.833008 0.313477 + } + element combobox.button.down + { + dimension 0.785156 0.0957031 0.833984 0.144531 + } + element combobox.button.over + { + dimension 0.654297 0.0458984 0.703125 0.0947266 + } + element combobox.button + { + dimension 0.588867 0.145508 0.637695 0.194336 + } + element combobox.down + { + dimension 0.392578 0.0957031 0.587891 0.144531 + } + element combobox.highlight + { + dimension 0 0.0458984 0.125 0.0673828 + } + element combobox.list + { + dimension 0.251953 0.4375 0.376953 0.5625 + } + element combobox.over + { + dimension 0.392578 0.145508 0.587891 0.194336 + } + element combobox + { + dimension 0 0.0957031 0.195313 0.144531 + } + element console.border.bottom + { + dimension 0.0175781 0.00585938 0.0908203 0.0107422 + } + element console.border.bottomleft + { + dimension 0.171875 0.00585938 0.176758 0.0107422 + } + element console.border.bottomright + { + dimension 0.177734 0.00585938 0.182617 0.0107422 + } + element console.border.left + { + dimension 0.678711 0.314453 0.683594 0.387695 + } + element console.border.right + { + dimension 0.68457 0.314453 0.689453 0.387695 + } + element console.border.top + { + dimension 0.0917969 0.00585938 0.165039 0.0107422 + } + element console.border.topleft + { + dimension 0.166016 0.00585938 0.170898 0.0107422 + } + element console.border.topright + { + dimension 0.0117188 0.00585938 0.0166016 0.0107422 + } + element console + { + dimension 0.125977 0.4375 0.250977 0.5625 + } + element cursor + { + dimension 0.298828 0.0458984 0.324219 0.0771484 + } + element cursor.resize.diagonal1 + { + dimension 0.943359 0.00585938 0.959961 0.0224609 + } + element cursor.resize.diagonal2 + { + dimension 0.960938 0.00585938 0.977539 0.0224609 + } + element cursor.resize.leftright + { + dimension 0.355469 0.00585938 0.375 0.015625 + } + element cursor.resize.updown + { + dimension 0.467773 0.0234375 0.477539 0.0429688 + } + element cursor.textselect + { + dimension 0.700195 0.0234375 0.709961 0.0429688 + } + element image + { + dimension 0 0.563477 0.25 0.702148 + } + element label + { + dimension 0.588867 0.0957031 0.78418 0.144531 + } + element list.highlight + { + dimension 0.710938 0.0234375 0.835938 0.0449219 + } + element list + { + dimension 0 0.4375 0.125 0.5625 + } + element menu + { + dimension 0.125977 0.0458984 0.250977 0.0673828 + } + element menulist.button.down + { + dimension 0.196289 0.145508 0.391602 0.194336 + } + element menulist.button.over + { + dimension 0.704102 0.0458984 0.899414 0.0947266 + } + element menulist.list.border.bottom + { + dimension 0.478516 0.0234375 0.576172 0.0429688 + } + element menulist.list.border.left + { + dimension 0.702148 0.314453 0.72168 0.412109 + } + element menulist.list.border.right + { + dimension 0.743164 0.314453 0.762695 0.412109 + } + element menulist.list + { + dimension 0 0.145508 0.195313 0.194336 + } + element multilinelabel + { + dimension 0.503906 0.4375 0.628906 0.5625 + } + element panel + { + dimension 0.763672 0.314453 0.861328 0.412109 + } + element progressbar.bar + { + dimension 0.458008 0.0458984 0.65332 0.0947266 + } + element progressbar + { + dimension 0.196289 0.0957031 0.391602 0.144531 + } + element radiobutton.selected.disabled + { + dimension 0 0.314453 0.0585938 0.373047 + } + element radiobutton.selected.down + { + dimension 0.0595703 0.314453 0.118164 0.373047 + } + element radiobutton.selected.over + { + dimension 0.119141 0.314453 0.177734 0.373047 + } + element radiobutton.selected + { + dimension 0.178711 0.314453 0.237305 0.373047 + } + element radiobutton.unselected.disabled + { + dimension 0.238281 0.314453 0.296875 0.373047 + } + element radiobutton.unselected.down + { + dimension 0.357422 0.314453 0.416016 0.373047 + } + element radiobutton.unselected.over + { + dimension 0.416992 0.314453 0.475586 0.373047 + } + element radiobutton.unselected + { + dimension 0.297852 0.314453 0.356445 0.373047 + } + element scrollbar.horizontal.left.down + { + dimension 0.80957 0.195313 0.868164 0.253906 + } + element scrollbar.horizontal.left.over + { + dimension 0 0.254883 0.0585938 0.313477 + } + element scrollbar.horizontal.left + { + dimension 0.630859 0.195313 0.689453 0.253906 + } + element scrollbar.horizontal + { + dimension 0.246094 0.0234375 0.368164 0.0429688 + } + element scrollbar.horizontal.right.down + { + dimension 0.452148 0.195313 0.510742 0.253906 + } + element scrollbar.horizontal.right.over + { + dimension 0.571289 0.195313 0.629883 0.253906 + } + element scrollbar.horizontal.right + { + dimension 0.0595703 0.254883 0.118164 0.313477 + } + element scrollbar.horizontal.slider.down + { + dimension 0 0.0234375 0.12207 0.0429688 + } + element scrollbar.horizontal.slider.over + { + dimension 0.123047 0.0234375 0.245117 0.0429688 + } + element scrollbar.horizontal.slider + { + dimension 0.577148 0.0234375 0.699219 0.0429688 + } + element scrollbar.vertical.down.down + { + dimension 0.511719 0.195313 0.570313 0.253906 + } + element scrollbar.vertical.down.over + { + dimension 0.69043 0.195313 0.749023 0.253906 + } + element scrollbar.vertical.down + { + dimension 0.75 0.195313 0.808594 0.253906 + } + element scrollbar.vertical + { + dimension 0.882813 0.314453 0.902344 0.436523 + } + element scrollbar.vertical.slider.down + { + dimension 0.923828 0.314453 0.943359 0.436523 + } + element scrollbar.vertical.slider.over + { + dimension 0.862305 0.314453 0.881836 0.436523 + } + element scrollbar.vertical.slider + { + dimension 0.90332 0.314453 0.922852 0.436523 + } + element scrollbar.vertical.up.down + { + dimension 0.869141 0.195313 0.927734 0.253906 + } + element scrollbar.vertical.up.over + { + dimension 0.392578 0.195313 0.451172 0.253906 + } + element scrollbar.vertical.up + { + dimension 0.928711 0.195313 0.987305 0.253906 + } + element textbox.border.bottom + { + dimension 0.912109 0 0.985352 0.00488281 + } + element textbox.border.bottomleft + { + dimension 0 0.00585938 0.00488281 0.0107422 + } + element textbox.border.bottomright + { + dimension 0.00585938 0.00585938 0.0107422 0.0107422 + } + element textbox.border.left + { + dimension 0.666992 0.314453 0.671875 0.387695 + } + element textbox.border.right + { + dimension 0.672852 0.314453 0.677734 0.387695 + } + element textbox.border.top + { + dimension 0.837891 0 0.911133 0.00488281 + } + element textbox.border.topleft + { + dimension 0.992188 0 0.99707 0.00488281 + } + element textbox.border.topright + { + dimension 0.986328 0 0.991211 0.00488281 + } + element textbox + { + dimension 0.37793 0.4375 0.50293 0.5625 + } + element textbox.textcursor + { + dimension 0.516602 0.00585938 0.519531 0.0205078 + } + element textcursor + { + dimension 0.520508 0.00585938 0.523438 0.0205078 + } + element textselection + { + dimension 0.375977 0.00585938 0.424805 0.015625 + } + element titlebar.button.down + { + dimension 0.540039 0.314453 0.602539 0.376953 + } + element titlebar.button.over + { + dimension 0.476563 0.314453 0.539063 0.376953 + } + element titlebar.button + { + dimension 0.603516 0.314453 0.666016 0.376953 + } + element titlebar + { + dimension 0.836914 0.0234375 0.961914 0.0449219 + } + element trackbar.horizontal + { + dimension 0.369141 0.0234375 0.466797 0.0429688 + } + element trackbar.horizontal.slider.down + { + dimension 0.251953 0.0458984 0.266602 0.0751953 + } + element trackbar.horizontal.slider.over + { + dimension 0.283203 0.0458984 0.297852 0.0751953 + } + element trackbar.horizontal.slider + { + dimension 0.267578 0.0458984 0.282227 0.0751953 + } + element trackbar.vertical + { + dimension 0.722656 0.314453 0.742188 0.412109 + } + element trackbar.vertical.slider.down + { + dimension 0.425781 0.00585938 0.455078 0.0205078 + } + element trackbar.vertical.slider.over + { + dimension 0.486328 0.00585938 0.515625 0.0205078 + } + element trackbar.vertical.slider + { + dimension 0.456055 0.00585938 0.485352 0.0205078 + } + element tree.button.down + { + dimension 0 0.195313 0.195313 0.244141 + } + element tree.button.over + { + dimension 0.196289 0.195313 0.391602 0.244141 + } + element tree.button + { + dimension 0.638672 0.145508 0.833984 0.194336 + } + element tree.minus + { + dimension 0.893555 0.254883 0.952148 0.313477 + } + element tree.plus + { + dimension 0.833984 0.254883 0.892578 0.313477 + } + element window.border.bottom + { + dimension 0.183594 0.00585938 0.256836 0.0107422 + } + element window.border.bottomleft + { + dimension 0.263672 0.00585938 0.268555 0.0107422 + } + element window.border.bottomright + { + dimension 0.269531 0.00585938 0.274414 0.0107422 + } + element window.border.left + { + dimension 0.69043 0.314453 0.695313 0.387695 + } + element window.border.right + { + dimension 0.696289 0.314453 0.701172 0.387695 + } + element window.border.top + { + dimension 0.275391 0.00585938 0.348633 0.0107422 + } + element window.border.topleft + { + dimension 0.257813 0.00585938 0.262695 0.0107422 + } + element window.border.topright + { + dimension 0.349609 0.00585938 0.354492 0.0107422 + } + element window + { + dimension 0.629883 0.4375 0.754883 0.5625 + } +} \ No newline at end of file Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.textbox.border.bottom.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.textbox.border.bottom.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.textbox.border.bottomleft.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.textbox.border.bottomleft.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.textbox.border.bottomright.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.textbox.border.bottomright.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.textbox.border.left.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.textbox.border.left.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.textbox.border.right.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.textbox.border.right.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.textbox.border.top.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.textbox.border.top.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.textbox.border.topleft.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.textbox.border.topleft.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.textbox.border.topright.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.textbox.border.topright.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.textselection.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.textselection.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.titlebar.button.down.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.titlebar.button.down.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.titlebar.button.over.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.titlebar.button.over.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.titlebar.button.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.titlebar.button.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.titlebar.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.titlebar.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.tree.button.down.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.tree.button.down.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.tree.button.over.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.tree.button.over.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.tree.button.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.tree.button.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.tree.minus.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.tree.minus.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.tree.plus.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.tree.plus.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/qgui/media/skins/skinTemplate.material =================================================================== --- trunk/python-ogre/demos/qgui/media/skins/skinTemplate.material (rev 0) +++ trunk/python-ogre/demos/qgui/media/skins/skinTemplate.material 2008-02-16 01:46:30 UTC (rev 571) @@ -0,0 +1,102 @@ + +material QuickQuiSkinTemplate +{ + technique + { + pass + { + lighting off + scene_blend alpha_blend + + texture_unit + { + texture ogrelogo.png + } + } + } +} + +vertex_program quickgui/PositiontoUvVP cg +{ + source positiontoUv.cg + entry_point PositiontoUv_vp + profiles vs_1_1 arbvp1 + + default_params + { + } +} + +fragment_program quickgui/PositiontoUvFP cg +{ + source positiontoUv.cg + entry_point PositiontoUv_fp + profiles ps_2_0 arbfp1 + + default_params + { + param_named blend float 0.5 + } +} + + +material qguiMaterialWithRTTBackground +{ + technique + { + pass + { + lighting off + scene_blend alpha_blend + alpha_rejection greater 150 + + vertex_program_ref quickgui/PositiontoUvVP + { + } + fragment_program_ref quickgui/PositiontoUvFP + { + } + + texture_unit + { + texture SkinSet.qgui.png + } + texture_unit + { + tex_address_mode clamp + // compositor result Here. + texture RttTexCompo + } + } + } + technique + { + pass + { + lighting off + scene_blend alpha_blend + + alpha_rejection greater 150 + texture_unit + { + texture SkinSet.qgui.png + } + } + } +} +material qguiMaterial +{ + technique + { + pass + { + lighting off + scene_blend alpha_blend + + texture_unit + { + texture SkinSet.qgui.png + } + } + } +} \ 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-02-16 01:42:54
|
Revision: 570 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=570&view=rev Author: andy_miller Date: 2008-02-15 17:43:00 -0800 (Fri, 15 Feb 2008) Log Message: ----------- More Thirdparty Cleanup Removed Paths: ------------- trunk/python-ogre/ThirdParty/nxogre/FireState.cpp trunk/python-ogre/ThirdParty/ogrebullet/Collisions/OgreBulletCollisionsBoxShape.cpp trunk/python-ogre/ThirdParty/ogrebullet/Collisions/OgreBulletCollisionsCompoundShape.cpp trunk/python-ogre/ThirdParty/ogrebullet/Collisions/OgreBulletCollisionsConeShape.cpp trunk/python-ogre/ThirdParty/ogrebullet/Collisions/OgreBulletCollisionsConvexCast.h trunk/python-ogre/ThirdParty/ogrebullet/Collisions/OgreBulletCollisionsConvexHullShape.cpp trunk/python-ogre/ThirdParty/ogrebullet/Collisions/OgreBulletCollisionsCylinderShape.cpp trunk/python-ogre/ThirdParty/ogrebullet/Collisions/OgreBulletCollisionsDebugContact.cpp trunk/python-ogre/ThirdParty/ogrebullet/Collisions/OgreBulletCollisionsDebugDrawer.cpp trunk/python-ogre/ThirdParty/ogrebullet/Collisions/OgreBulletCollisionsDebugLines.cpp trunk/python-ogre/ThirdParty/ogrebullet/Collisions/OgreBulletCollisionsDebugShape.cpp trunk/python-ogre/ThirdParty/ogrebullet/Collisions/OgreBulletCollisionsMeshToShapeConverter.cpp trunk/python-ogre/ThirdParty/ogrebullet/Collisions/OgreBulletCollisionsMinkowskiSumShape.cpp trunk/python-ogre/ThirdParty/ogrebullet/Collisions/OgreBulletCollisionsMultiSphereShape.cpp trunk/python-ogre/ThirdParty/ogrebullet/Collisions/OgreBulletCollisionsSphereShape.cpp trunk/python-ogre/ThirdParty/ogrebullet/Collisions/OgreBulletCollisionsStaticPlaneShape.cpp trunk/python-ogre/ThirdParty/ogrebullet/Collisions/OgreBulletCollisionsTriangleShape.cpp trunk/python-ogre/ThirdParty/ogrebullet/Collisions/OgreBulletCollisionsTrimeshShape.cpp trunk/python-ogre/ThirdParty/ogrebullet/Dynamics/OgreBulletDynamics6DofConstraint.cpp trunk/python-ogre/ThirdParty/ogrebullet/Dynamics/OgreBulletDynamicsConeTwistConstraint.cpp trunk/python-ogre/ThirdParty/ogrebullet/Dynamics/OgreBulletDynamicsHingeConstraint.cpp trunk/python-ogre/ThirdParty/ogrebullet/Dynamics/OgreBulletDynamicsPoint2pointConstraint.cpp trunk/python-ogre/ThirdParty/ogrebullet/Dynamics/OgreBulletDynamicsRaycastVehicle.cpp Deleted: trunk/python-ogre/ThirdParty/nxogre/FireState.cpp =================================================================== --- trunk/python-ogre/ThirdParty/nxogre/FireState.cpp 2008-02-16 01:41:26 UTC (rev 569) +++ trunk/python-ogre/ThirdParty/nxogre/FireState.cpp 2008-02-16 01:43:00 UTC (rev 570) @@ -1 +0,0 @@ -// FireState Deleted: trunk/python-ogre/ThirdParty/ogrebullet/Collisions/OgreBulletCollisionsBoxShape.cpp =================================================================== --- trunk/python-ogre/ThirdParty/ogrebullet/Collisions/OgreBulletCollisionsBoxShape.cpp 2008-02-16 01:41:26 UTC (rev 569) +++ trunk/python-ogre/ThirdParty/ogrebullet/Collisions/OgreBulletCollisionsBoxShape.cpp 2008-02-16 01:43:00 UTC (rev 570) @@ -1,49 +0,0 @@ -/*************************************************************************** - -This source file is part of OGREBULLET -(Object-oriented Graphics Rendering Engine Bullet Wrapper) -For the latest info, see http://www.ogre3d.org/phpBB2addons/viewforum.php?f=10 - -Copyright (c) 2007 tua...@gm... - - - -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the Free Software -Foundation; either version 2 of the License, or (at your option) any later -version. - -This program is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License along with -this program; if not, write to the Free Software Foundation, Inc., 59 Temple -Place - Suite 330, Boston, MA 02111-1307, USA, or go to -http://www.gnu.org/copyleft/lesser.txt. ------------------------------------------------------------------------------ -*/ - -#include "OgreBulletCollisions.h" - -#include "Utils/OgreBulletConverter.h" -#include "Shapes/OgreBulletCollisionsBoxShape.h" -#include "Debug/OgreBulletCollisionsDebugLines.h" - -using namespace Ogre; -using namespace OgreBulletCollisions; - -namespace OgreBulletCollisions -{ - // ------------------------------------------------------------------------- - BoxCollisionShape::BoxCollisionShape(const Vector3 &bodyBounds): - CollisionShape() - { - mShape = new btBoxShape(OgreBtConverter::to(bodyBounds)); - } - // ------------------------------------------------------------------------- - BoxCollisionShape::~BoxCollisionShape() - { - } -} - Deleted: trunk/python-ogre/ThirdParty/ogrebullet/Collisions/OgreBulletCollisionsCompoundShape.cpp =================================================================== --- trunk/python-ogre/ThirdParty/ogrebullet/Collisions/OgreBulletCollisionsCompoundShape.cpp 2008-02-16 01:41:26 UTC (rev 569) +++ trunk/python-ogre/ThirdParty/ogrebullet/Collisions/OgreBulletCollisionsCompoundShape.cpp 2008-02-16 01:43:00 UTC (rev 570) @@ -1,93 +0,0 @@ -/*************************************************************************** - -This source file is part of OGREBULLET -(Object-oriented Graphics Rendering Engine Bullet Wrapper) -For the latest info, see http://www.ogre3d.org/phpBB2addons/viewforum.php?f=10 - -Copyright (c) 2007 tua...@gm... - - - -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the Free Software -Foundation; either version 2 of the License, or (at your option) any later -version. - -This program is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License along with -this program; if not, write to the Free Software Foundation, Inc., 59 Temple -Place - Suite 330, Boston, MA 02111-1307, USA, or go to -http://www.gnu.org/copyleft/lesser.txt. ------------------------------------------------------------------------------ -*/ - -#include "OgreBulletCollisions.h" -#include "Utils/OgreBulletConverter.h" - -#include "Shapes/OgreBulletCollisionsCompoundShape.h" - -using namespace Ogre; -using namespace OgreBulletCollisions; - -namespace OgreBulletCollisions -{ - // ------------------------------------------------------------------------- - CompoundCollisionShape::CompoundCollisionShape(): - CollisionShape() - { - mShape = new btCompoundShape(); - } - // ------------------------------------------------------------------------- - CompoundCollisionShape::~CompoundCollisionShape() - { - } - // ------------------------------------------------------------------------- - void CompoundCollisionShape::addChildShape(CollisionShape *shape, const Vector3 &pos, const Quaternion &quat) - { - btTransform localTrans; - - //localTrans.setIdentity(); - //localTrans effectively shifts the center of mass with respect to the chassis - localTrans.setOrigin (OgreBtConverter::to(pos)); - localTrans.setRotation (OgreBtConverter::to(quat)); - - static_cast <btCompoundShape *> (mShape)->addChildShape(localTrans, shape->getBulletShape()); - - mShapes.push_back (shape); - } - // ------------------------------------------------------------------------- - bool CompoundCollisionShape::drawWireFrame(DebugLines *wire, - const Ogre::Vector3 &pos, - const Ogre::Quaternion &quat) const - { - bool isVisual = false; - btCompoundShape * const myBtCompoundShape = static_cast <btCompoundShape *> (mShape); - int numChildShapes = myBtCompoundShape->getNumChildShapes (); - - int i; - for (std::vector<CollisionShape *>::const_iterator itShape = mShapes.begin(); - itShape != mShapes.end(); ++itShape) - { - const btCollisionShape * const shape = (*itShape)->getBulletShape(); - for (i = 0; i < numChildShapes; i++) - { - if (myBtCompoundShape->getChildShape (i) == shape) - break; - } - assert (i < numChildShapes); - - const btTransform &localTrans = myBtCompoundShape->getChildTransform (i); - - const Vector3 pos (BtOgreConverter::to(localTrans.getOrigin ())); - const Quaternion quat( BtOgreConverter::to(localTrans.getRotation ())); - - if ((*itShape)->drawWireFrame(wire, pos, quat)) - isVisual = true; - } - return isVisual; - } -} - Deleted: trunk/python-ogre/ThirdParty/ogrebullet/Collisions/OgreBulletCollisionsConeShape.cpp =================================================================== --- trunk/python-ogre/ThirdParty/ogrebullet/Collisions/OgreBulletCollisionsConeShape.cpp 2008-02-16 01:41:26 UTC (rev 569) +++ trunk/python-ogre/ThirdParty/ogrebullet/Collisions/OgreBulletCollisionsConeShape.cpp 2008-02-16 01:43:00 UTC (rev 570) @@ -1,54 +0,0 @@ -/*************************************************************************** - -This source file is part of OGREBULLET -(Object-oriented Graphics Rendering Engine Bullet Wrapper) -For the latest info, see http://www.ogre3d.org/phpBB2addons/viewforum.php?f=10 - -Copyright (c) 2007 tua...@gm... - - - -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the Free Software -Foundation; either version 2 of the License, or (at your option) any later -version. - -This program is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License along with -this program; if not, write to the Free Software Foundation, Inc., 59 Temple -Place - Suite 330, Boston, MA 02111-1307, USA, or go to -http://www.gnu.org/copyleft/lesser.txt. ------------------------------------------------------------------------------ -*/ - -#include "OgreBulletCollisions.h" - -#include "Shapes/OgreBulletCollisionsConeShape.h" -#include "Debug/OgreBulletCollisionsDebugLines.h" - -using namespace Ogre; -using namespace OgreBulletCollisions; - -namespace OgreBulletCollisions -{ - // ------------------------------------------------------------------------- - ConeCollisionShape::ConeCollisionShape(Real radius, Real height, const Vector3 &axe): - CollisionShape() - { - if (axe == Vector3::UNIT_Y) - mShape = new btConeShape (btScalar (radius), btScalar (height)); - else if (axe == Vector3::UNIT_X) - mShape = new btConeShapeX (btScalar (radius), btScalar (height)); - else - mShape = new btConeShapeZ (btScalar (radius), btScalar (height)); - - } - // ------------------------------------------------------------------------- - ConeCollisionShape::~ConeCollisionShape () - { - } -} - Deleted: trunk/python-ogre/ThirdParty/ogrebullet/Collisions/OgreBulletCollisionsConvexCast.h =================================================================== --- trunk/python-ogre/ThirdParty/ogrebullet/Collisions/OgreBulletCollisionsConvexCast.h 2008-02-16 01:41:26 UTC (rev 569) +++ trunk/python-ogre/ThirdParty/ogrebullet/Collisions/OgreBulletCollisionsConvexCast.h 2008-02-16 01:43:00 UTC (rev 570) @@ -1,47 +0,0 @@ -/*************************************************************************** - -This source file is part of OGREBULLET -(Object-oriented Graphics Rendering Engine Bullet Wrapper) -For the latest info, see http://www.ogre3d.org/phpBB2addons/viewforum.php?f=10 - -Copyright (c) 2007 tua...@gm... - - - -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the Free Software -Foundation; either version 2 of the License, or (at your option) any later -version. - -This program is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License along with -this program; if not, write to the Free Software Foundation, Inc., 59 Temple -Place - Suite 330, Boston, MA 02111-1307, USA, or go to -http://www.gnu.org/copyleft/lesser.txt. ------------------------------------------------------------------------------ -*/ - -#ifndef _OGREBULLETCOLLISIONS_BoxShape_H -#define _OGREBULLETCOLLISIONS_BoxShape_H - -#include "OgreBulletCollisionsPreRequisites.h" - -#include "OgreBulletCollisionsShape.h" - -namespace OgreBulletCollisions -{ - // ------------------------------------------------------------------------- - // basic BoxShape - class BoxCollisionShape : public CollisionShape - { - public: - BoxCollisionShape(const Ogre::Vector3 &boxBounds); - virtual ~BoxCollisionShape(); - - }; -} -#endif //_OGREBULLETCOLLISIONS_BoxShape_H - Deleted: trunk/python-ogre/ThirdParty/ogrebullet/Collisions/OgreBulletCollisionsConvexHullShape.cpp =================================================================== --- trunk/python-ogre/ThirdParty/ogrebullet/Collisions/OgreBulletCollisionsConvexHullShape.cpp 2008-02-16 01:41:26 UTC (rev 569) +++ trunk/python-ogre/ThirdParty/ogrebullet/Collisions/OgreBulletCollisionsConvexHullShape.cpp 2008-02-16 01:43:00 UTC (rev 570) @@ -1,55 +0,0 @@ -/*************************************************************************** - -This source file is part of OGREBULLET -(Object-oriented Graphics Rendering Engine Bullet Wrapper) -For the latest info, see http://www.ogre3d.org/phpBB2addons/viewforum.php?f=10 - -Copyright (c) 2007 tua...@gm... - - - -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the Free Software -Foundation; either version 2 of the License, or (at your option) any later -version. - -This program is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License along with -this program; if not, write to the Free Software Foundation, Inc., 59 Temple -Place - Suite 330, Boston, MA 02111-1307, USA, or go to -http://www.gnu.org/copyleft/lesser.txt. ------------------------------------------------------------------------------ -*/ - -#include "OgreBulletCollisions.h" - -#include "Shapes/OgreBulletCollisionsConvexHullShape.h" -#include "Debug/OgreBulletCollisionsDebugLines.h" - -using namespace Ogre; -using namespace OgreBulletCollisions; - -namespace OgreBulletCollisions -{ - // ------------------------------------------------------------------------- - ConvexHullCollisionShape::ConvexHullCollisionShape(const Real* points, int numPoints, int stride): - CollisionShape() - { - mShape = new btConvexHullShape((btScalar*) points, numPoints, stride); - } - // ------------------------------------------------------------------------- - ConvexHullCollisionShape::ConvexHullCollisionShape(): - CollisionShape() - { - mShape = new btConvexHullShape(); - } - // ------------------------------------------------------------------------- - ConvexHullCollisionShape::~ConvexHullCollisionShape() - { - } - -} - Deleted: trunk/python-ogre/ThirdParty/ogrebullet/Collisions/OgreBulletCollisionsCylinderShape.cpp =================================================================== --- trunk/python-ogre/ThirdParty/ogrebullet/Collisions/OgreBulletCollisionsCylinderShape.cpp 2008-02-16 01:41:26 UTC (rev 569) +++ trunk/python-ogre/ThirdParty/ogrebullet/Collisions/OgreBulletCollisionsCylinderShape.cpp 2008-02-16 01:43:00 UTC (rev 570) @@ -1,54 +0,0 @@ -/*************************************************************************** - -This source file is part of OGREBULLET -(Object-oriented Graphics Rendering Engine Bullet Wrapper) -For the latest info, see http://www.ogre3d.org/phpBB2addons/viewforum.php?f=10 - -Copyright (c) 2007 tua...@gm... - - - -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the Free Software -Foundation; either version 2 of the License, or (at your option) any later -version. - -This program is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License along with -this program; if not, write to the Free Software Foundation, Inc., 59 Temple -Place - Suite 330, Boston, MA 02111-1307, USA, or go to -http://www.gnu.org/copyleft/lesser.txt. ------------------------------------------------------------------------------ -*/ - -#include "OgreBulletCollisions.h" -#include "Utils/OgreBulletConverter.h" - -#include "Shapes/OgreBulletCollisionsCylinderShape.h" -#include "Debug/OgreBulletCollisionsDebugLines.h" - -using namespace Ogre; -using namespace OgreBulletCollisions; - -namespace OgreBulletCollisions -{ - // ------------------------------------------------------------------------- - CylinderCollisionShape::CylinderCollisionShape(const Vector3 &halfExtents, const Vector3 &axe): - CollisionShape() - { - if (axe == Vector3::UNIT_X) - mShape = new btCylinderShapeX(OgreBtConverter::to(halfExtents)); - else if (axe == Vector3::UNIT_Y) - mShape = new btCylinderShape (OgreBtConverter::to(halfExtents)); - else if (axe == Vector3::UNIT_Z) - mShape = new btCylinderShapeZ(OgreBtConverter::to(halfExtents)); - } - // ------------------------------------------------------------------------- - CylinderCollisionShape::~CylinderCollisionShape() - { - } -} - Deleted: trunk/python-ogre/ThirdParty/ogrebullet/Collisions/OgreBulletCollisionsDebugContact.cpp =================================================================== --- trunk/python-ogre/ThirdParty/ogrebullet/Collisions/OgreBulletCollisionsDebugContact.cpp 2008-02-16 01:41:26 UTC (rev 569) +++ trunk/python-ogre/ThirdParty/ogrebullet/Collisions/OgreBulletCollisionsDebugContact.cpp 2008-02-16 01:43:00 UTC (rev 570) @@ -1,650 +0,0 @@ -/*************************************************************************** - -This source file is part of OGREBULLET -(Object-oriented Graphics Rendering Engine Bullet Wrapper) -For the latest info, see http://www.ogre3d.org/phpBB2addons/viewforum.php?f=10 - -Copyright (c) 2007 tua...@gm... - - - -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the Free Software -Foundation; either version 2 of the License, or (at your option) any later -version. - -This program is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License along with -this program; if not, write to the Free Software Foundation, Inc., 59 Temple -Place - Suite 330, Boston, MA 02111-1307, USA, or go to -http://www.gnu.org/copyleft/lesser.txt. ------------------------------------------------------------------------------ -*/ - - -#include "OgreBulletCollisions.h" - -#include "Ogre.h" -#include "OgreFontManager.h" - -#include "Debug/OgreBulletCollisionsDebugContact.h" -#include "OgreBulletCollisionsShape.h" -#include "OgreBulletCollisionsObject.h" -#include "OgreBulletCollisionsWorld.h" - -using namespace Ogre; - -#define POS_TEX_BINDING 0 -#define COLOUR_BINDING 1 - -namespace OgreBulletCollisions -{ - //------------------------------------------------------------------------------------------------ - DebugContact::DebugContact(const String &name, CollisionsWorld *world) : - _name(name), - _world(world), - _enabled(false) - { - // scene node - _node = _world->getSceneManager()->getRootSceneNode ()->createChildSceneNode (); - - // sphere attach to contact point - _point = _world->getSceneManager()->createEntity(name + String("_debug_point"), "sphere.mesh"); - _point_node = _node->createChildSceneNode (); - _point_node->attachObject (_point); - _point_node->setScale(0.001, 0.001, 0.001); - - // normal direction debug - _normal = new DebugNormal(); - _node->attachObject (_normal); - - // text info on contact - _text = new DebugContactText(name + String("_debug_text"), _node->createChildSceneNode ()); - _text->setPosition (Vector3(0,5,0)); - _text->setCaption ("-"); - _text->setVisible (false); - - _node->setVisible (false); - } - //------------------------------------------------------------------------------------------------ - DebugContact::~DebugContact() - { - delete _text; - - _point_node->detachObject (_point->getName ()); - _node->detachObject (_normal->getName ()); - - _world->getSceneManager()->destroyEntity (_point->getName ()); - - _node->detachAllObjects (); - _node->removeAndDestroyAllChildren (); - - delete _normal; - } - //------------------------------------------------------------------------------------------------ - void DebugContact::update(const Ogre::Vector3 &normal, const Ogre::Vector3 &pt, const Ogre::Real depth) - { - _node->setPosition (pt); - - _point_node->setPosition (depth * normal); - - //String contactLabel("p: "); - //contactLabel = contactLabel + StringConverter::toString(contact->getPosition()); - //contactLabel = contactLabel + ", n: "; - //contactLabel = contactLabel + StringConverter::toString(contact->getNormal()); - //_text->setCaption (contactLabel); - //_text->setVisible (false); - - //_text->setPosition (contact->getPosition () + Vector3(0,5,0)); - - _normal->update (normal, pt, depth); - } - //------------------------------------------------------------------------------------------------ - bool DebugContact::isEnabled () const - { - return _enabled; - } - //------------------------------------------------------------------------------------------------ - void DebugContact::setEnabled (bool enable) - { - _enabled = enable; - _node->setVisible (_enabled); - }; - //------------------------------------------------------------------------------------------------ - void DebugNormal::update(const Ogre::Vector3 &normal, const Ogre::Vector3 &pt, const Ogre::Real depth) - { - DebugLines::clear (); - // set normal following contact normal - //contact->_normal - //contact->_position - DebugLines::addLine (Vector3::ZERO, - 5*normal); - DebugLines::draw (); - } - //------------------------------------------------------------------------------------------------ - DebugContactText::DebugContactText(const String &name, - SceneNode *node, - const String &caption, - const String &fontName, - int charHeight, - const ColourValue &color) - : mpCam(NULL) - , mpWin(NULL) - , mpFont(NULL) - , mName(name) - , mCaption(caption) - , mFontName(fontName) - , mCharHeight(charHeight) - , mColor(color) - , mType("DebugContact") - , mTimeUntilNextToggle(0) - , mSpaceWidth(0) - , mUpdateColors(true) - , mOnTop(false) - , mHorizontalAlignment(H_LEFT) - , mVerticalAlignment(V_BELOW) - , mAdditionalHeight(0.0) - , mNode(node) - - { - if (name.empty()) - Exception(Exception::ERR_INVALIDPARAMS, "Trying to create DebugContact without name", "DebugContact::DebugContact"); -// -// if (caption.empty()) -// Exception(Exception::ERR_INVALIDPARAMS, "Trying to create DebugContact without caption", "DebugContact::DebugContact"); - - mRenderOp.vertexData = NULL; - this->setFontName(mFontName); - //this->_setupGeometry(); - mNode->attachObject(this); - } - //------------------------------------------------------------------------------------------------ - DebugContactText::~DebugContactText() - { - mNode->detachObject(this->getName()); - if (mRenderOp.vertexData) - delete mRenderOp.vertexData; - } -#if (OGRE_VERSION >= ((1 << 16) | (5 << 8) | 0)) // must have at least shoggoth (1.5.0) - void DebugContactText::visitRenderables(Renderable::Visitor* visitor, - bool debugRenderables) - { - visitor->visit(this, 0, false); - } -#endif - //------------------------------------------------------------------------------------------------ - void DebugContactText::setPosition(const Vector3 &pos) - { - mNode->setPosition (pos); - } - //------------------------------------------------------------------------------------------------ - void DebugContactText::setFontName(const String &fontName) - { - if((Ogre::MaterialManager::getSingletonPtr()->resourceExists(mName + "Material"))) - { - Ogre::MaterialManager::getSingleton().remove(mName + "Material"); - } - - if (mFontName != fontName || mpMaterial.isNull() || !mpFont) - { - mFontName = fontName; - mpFont = (Font *)FontManager::getSingleton().getByName(mFontName).getPointer(); - if (!mpFont) - Exception(Exception::ERR_ITEM_NOT_FOUND, "Could not find font " + fontName, "DebugContact::setFontName"); - - mpFont->load(); - if (!mpMaterial.isNull()) - { - MaterialManager::getSingletonPtr()->remove(mpMaterial->getName()); - mpMaterial.setNull(); - } - - mpMaterial = mpFont->getMaterial()->clone(mName + "Material"); - if (!mpMaterial->isLoaded()) - mpMaterial->load(); - - mpMaterial->setDepthCheckEnabled(!mOnTop); - //mpMaterial->setDepthBias(!mOnTop); - mpMaterial->setDepthBias(0,!mOnTop); - mpMaterial->setDepthWriteEnabled(mOnTop); - mpMaterial->setLightingEnabled(false); - mNeedUpdate = true; - } - } - //------------------------------------------------------------------------------------------------ - void DebugContactText::setCaption(const String &caption) - { - if (caption != mCaption) - { - mCaption = caption; - mNeedUpdate = true; - } - } - //------------------------------------------------------------------------------------------------ - void DebugContactText::setColor(const ColourValue &color) - { - if (color != mColor) - { - mColor = color; - mUpdateColors = true; - } - } - //------------------------------------------------------------------------------------------------ - void DebugContactText::setCharacterHeight(unsigned int height) - { - if (height != mCharHeight) - { - mCharHeight = height; - mNeedUpdate = true; - } - } - //------------------------------------------------------------------------------------------------ - void DebugContactText::setSpaceWidth(unsigned int width) - { - if (width != mSpaceWidth) - { - mSpaceWidth = width; - mNeedUpdate = true; - } - } - //------------------------------------------------------------------------------------------------ - void DebugContactText::setTextAlignment(const HorizontalAlignment& horizontalAlignment, const VerticalAlignment& verticalAlignment) - { - if(mHorizontalAlignment != horizontalAlignment) - { - mHorizontalAlignment = horizontalAlignment; - mNeedUpdate = true; - } - if(mVerticalAlignment != verticalAlignment) - { - mVerticalAlignment = verticalAlignment; - mNeedUpdate = true; - } - } - //------------------------------------------------------------------------------------------------ - void DebugContactText::setAdditionalHeight( Real height ) - { - if( mAdditionalHeight != height ) - { - mAdditionalHeight = height; - mNeedUpdate = true; - } - } - //------------------------------------------------------------------------------------------------ - void DebugContactText::showOnTop(bool show) - { - if( mOnTop != show && !mpMaterial.isNull() ) - { - mOnTop = show; - mpMaterial->setDepthBias(0,!mOnTop); - mpMaterial->setDepthCheckEnabled(!mOnTop); - mpMaterial->setDepthWriteEnabled(mOnTop); - } - } - //------------------------------------------------------------------------------------------------ - void DebugContactText::_setupGeometry() - { - assert(mpFont); - assert(!mpMaterial.isNull()); - - unsigned int vertexCount = static_cast<unsigned int>(mCaption.size() * 6); - - if (mRenderOp.vertexData) - { - // Removed this test as it causes problems when replacing a caption - // of the same size: replacing "Hello" with "hello" - // as well as when changing the text alignment - //if (mRenderOp.vertexData->vertexCount != vertexCount) - { - delete mRenderOp.vertexData; - mRenderOp.vertexData = NULL; - mUpdateColors = true; - } - } - - if (!mRenderOp.vertexData) - mRenderOp.vertexData = new VertexData(); - - mRenderOp.indexData = 0; - mRenderOp.vertexData->vertexStart = 0; - mRenderOp.vertexData->vertexCount = vertexCount; - mRenderOp.operationType = RenderOperation::OT_TRIANGLE_LIST; - mRenderOp.useIndexes = false; - - VertexDeclaration *decl = mRenderOp.vertexData->vertexDeclaration; - VertexBufferBinding *bind = mRenderOp.vertexData->vertexBufferBinding; - size_t offset = 0; - - // create/bind positions/tex.ccord. buffer - if (!decl->findElementBySemantic(VES_POSITION)) - decl->addElement(POS_TEX_BINDING, offset, VET_FLOAT3, VES_POSITION); - - offset += VertexElement::getTypeSize(VET_FLOAT3); - - if (!decl->findElementBySemantic(VES_TEXTURE_COORDINATES)) - decl->addElement(POS_TEX_BINDING, offset, Ogre::VET_FLOAT2, Ogre::VES_TEXTURE_COORDINATES, 0); - - HardwareVertexBufferSharedPtr ptbuf = HardwareBufferManager::getSingleton().createVertexBuffer(decl->getVertexSize(POS_TEX_BINDING), - mRenderOp.vertexData->vertexCount, - HardwareBuffer::HBU_DYNAMIC_WRITE_ONLY); - bind->setBinding(POS_TEX_BINDING, ptbuf); - - // Colours - store these in a separate buffer because they change less often - if (!decl->findElementBySemantic(VES_DIFFUSE)) - decl->addElement(COLOUR_BINDING, 0, VET_COLOUR, VES_DIFFUSE); - - HardwareVertexBufferSharedPtr cbuf = HardwareBufferManager::getSingleton().createVertexBuffer(decl->getVertexSize(COLOUR_BINDING), - mRenderOp.vertexData->vertexCount, - HardwareBuffer::HBU_DYNAMIC_WRITE_ONLY); - bind->setBinding(COLOUR_BINDING, cbuf); - - size_t charlen = mCaption.size(); - Real *pPCBuff = static_cast<Real*>(ptbuf->lock(HardwareBuffer::HBL_DISCARD)); - - float largestWidth = 0; - float left = 0 * 2.0 - 1.0; - float top = -((0 * 2.0) - 1.0); - - // Derive space width from a capital A - if (mSpaceWidth == 0) - mSpaceWidth = mpFont->getGlyphAspectRatio('A') * mCharHeight * 2.0; - - // for calculation of AABB - Ogre::Vector3 min, max, currPos; - Ogre::Real maxSquaredRadius; - bool first = true; - - // Use iterator - String::iterator i, iend; - iend = mCaption.end(); - bool newLine = true; - Real len = 0.0f; - - if(mVerticalAlignment == DebugContactText::V_ABOVE) - { - // Raise the first line of the caption - top += mCharHeight; - for (i = mCaption.begin(); i != iend; ++i) - { - if (*i == '\n') - top += mCharHeight * 2.0; - } - } - - for (i = mCaption.begin(); i != iend; ++i) - { - if (newLine) - { - len = 0.0f; - for (String::iterator j = i; j != iend && *j != '\n'; j++) - { - if (*j == ' ') - len += mSpaceWidth; - else - len += mpFont->getGlyphAspectRatio(*j) * mCharHeight * 2.0; - } - newLine = false; - } - - if (*i == '\n') - { - left = 0 * 2.0 - 1.0; - top -= mCharHeight * 2.0; - newLine = true; - continue; - } - - if (*i == ' ') - { - // Just leave a gap, no tris - left += mSpaceWidth; - // Also reduce tri count - mRenderOp.vertexData->vertexCount -= 6; - continue; - } - - Real horiz_height = mpFont->getGlyphAspectRatio(*i); - - //mpFont->getGlyphTexCoords(*i, u1, v1, u2, v2); - const Font::UVRect &uvRect = mpFont->getGlyphTexCoords(*i); - const Real u1 = uvRect.left; - const Real u2 = uvRect.right; - const Real v1 = uvRect.top; - const Real v2 = uvRect.bottom; - - // each vert is (x, y, z, u, v) - //------------------------------------------------------------------------------------- - // First tri - // - // Upper left - if(mHorizontalAlignment == DebugContactText::H_LEFT) - *pPCBuff++ = left; - else - *pPCBuff++ = left - (len / 2); - *pPCBuff++ = top; - *pPCBuff++ = -1.0; - *pPCBuff++ = u1; - *pPCBuff++ = v1; - - // Deal with bounds - if(mHorizontalAlignment == DebugContactText::H_LEFT) - currPos = Ogre::Vector3(left, top, -1.0); - else - currPos = Ogre::Vector3(left - (len / 2), top, -1.0); - if (first) - { - min = max = currPos; - maxSquaredRadius = currPos.squaredLength(); - first = false; - } - else - { - min.makeFloor(currPos); - max.makeCeil(currPos); - maxSquaredRadius = std::max(maxSquaredRadius, currPos.squaredLength()); - } - - top -= mCharHeight * 2.0; - - // Bottom left - if(mHorizontalAlignment == DebugContactText::H_LEFT) - *pPCBuff++ = left; - else - *pPCBuff++ = left - (len / 2); - *pPCBuff++ = top; - *pPCBuff++ = -1.0; - *pPCBuff++ = u1; - *pPCBuff++ = v2; - - // Deal with bounds - if(mHorizontalAlignment == DebugContactText::H_LEFT) - currPos = Ogre::Vector3(left, top, -1.0); - else - currPos = Ogre::Vector3(left - (len / 2), top, -1.0); - min.makeFloor(currPos); - max.makeCeil(currPos); - maxSquaredRadius = std::max(maxSquaredRadius, currPos.squaredLength()); - - top += mCharHeight * 2.0; - left += horiz_height * mCharHeight * 2.0; - - // Top right - if(mHorizontalAlignment == DebugContactText::H_LEFT) - *pPCBuff++ = left; - else - *pPCBuff++ = left - (len / 2); - *pPCBuff++ = top; - *pPCBuff++ = -1.0; - *pPCBuff++ = u2; - *pPCBuff++ = v1; - //------------------------------------------------------------------------------------- - - // Deal with bounds - if(mHorizontalAlignment == DebugContactText::H_LEFT) - currPos = Ogre::Vector3(left, top, -1.0); - else - currPos = Ogre::Vector3(left - (len / 2), top, -1.0); - min.makeFloor(currPos); - max.makeCeil(currPos); - maxSquaredRadius = std::max(maxSquaredRadius, currPos.squaredLength()); - - //------------------------------------------------------------------------------------- - // Second tri - // - // Top right (again) - if(mHorizontalAlignment == DebugContactText::H_LEFT) - *pPCBuff++ = left; - else - *pPCBuff++ = left - (len / 2); - *pPCBuff++ = top; - *pPCBuff++ = -1.0; - *pPCBuff++ = u2; - *pPCBuff++ = v1; - - currPos = Ogre::Vector3(left, top, -1.0); - min.makeFloor(currPos); - max.makeCeil(currPos); - maxSquaredRadius = std::max(maxSquaredRadius, currPos.squaredLength()); - - top -= mCharHeight * 2.0; - left -= horiz_height * mCharHeight * 2.0; - - // Bottom left (again) - if(mHorizontalAlignment == DebugContactText::H_LEFT) - *pPCBuff++ = left; - else - *pPCBuff++ = left - (len / 2); - *pPCBuff++ = top; - *pPCBuff++ = -1.0; - *pPCBuff++ = u1; - *pPCBuff++ = v2; - - currPos = Ogre::Vector3(left, top, -1.0); - min.makeFloor(currPos); - max.makeCeil(currPos); - maxSquaredRadius = std::max(maxSquaredRadius, currPos.squaredLength()); - - left += horiz_height * mCharHeight * 2.0; - - // Bottom right - if(mHorizontalAlignment == DebugContactText::H_LEFT) - *pPCBuff++ = left; - else - *pPCBuff++ = left - (len / 2); - *pPCBuff++ = top; - *pPCBuff++ = -1.0; - *pPCBuff++ = u2; - *pPCBuff++ = v2; - //------------------------------------------------------------------------------------- - - currPos = Ogre::Vector3(left, top, -1.0); - min.makeFloor(currPos); - max.makeCeil(currPos); - maxSquaredRadius = std::max(maxSquaredRadius, currPos.squaredLength()); - - // Go back up with top - top += mCharHeight * 2.0; - - float currentWidth = (left + 1)/2 - 0; - if (currentWidth > largestWidth) - largestWidth = currentWidth; - } - - // Unlock vertex buffer - ptbuf->unlock(); - - // update AABB/Sphere radius - mAABB = Ogre::AxisAlignedBox(min, max); - mRadius = Ogre::Math::Sqrt(maxSquaredRadius); - - if (mUpdateColors) - this->_updateColors(); - - mNeedUpdate = false; - } - //------------------------------------------------------------------------------------------------ - void DebugContactText::_updateColors(void) - { - assert(mpFont); - assert(!mpMaterial.isNull()); - - // Convert to system-specific - RGBA color; - Root::getSingleton().convertColourValue(mColor, &color); - HardwareVertexBufferSharedPtr vbuf = mRenderOp.vertexData->vertexBufferBinding->getBuffer(COLOUR_BINDING); - RGBA *pDest = static_cast<RGBA*>(vbuf->lock(HardwareBuffer::HBL_DISCARD)); - for (unsigned int i = 0; i < mRenderOp.vertexData->vertexCount; ++i) - *pDest++ = color; - vbuf->unlock(); - mUpdateColors = false; - } - //------------------------------------------------------------------------------------------------ - const Quaternion& DebugContactText::getWorldOrientation(void) const - { - assert(mpCam); - return const_cast<Quaternion&>(mpCam->getDerivedOrientation()); - } - //------------------------------------------------------------------------------------------------ - const Vector3& DebugContactText::getWorldPosition(void) const - { - assert(mParentNode); - return mParentNode->_getDerivedPosition(); - } - //------------------------------------------------------------------------------------------------ - void DebugContactText::getWorldTransforms(Matrix4 *xform) const - { - if (this->isVisible() && mpCam) - { - Matrix3 rot3x3, scale3x3 = Matrix3::IDENTITY; - - // store rotation in a matrix - mpCam->getDerivedOrientation().ToRotationMatrix(rot3x3); - - // parent node position - Vector3 ppos = mParentNode->_getDerivedPosition() + Vector3::UNIT_Y*mAdditionalHeight; - - // apply scale - scale3x3[0][0] = mParentNode->_getDerivedScale().x / 2; - scale3x3[1][1] = mParentNode->_getDerivedScale().y / 2; - scale3x3[2][2] = mParentNode->_getDerivedScale().z / 2; - - // apply all transforms to xform - *xform = (rot3x3 * scale3x3); - xform->setTrans(ppos); - } - } - //------------------------------------------------------------------------------------------------ - void DebugContactText::getRenderOperation(RenderOperation &op) - { - if (this->isVisible()) - { - if (mNeedUpdate) - this->_setupGeometry(); - if (mUpdateColors) - this->_updateColors(); - op = mRenderOp; - } - } - //------------------------------------------------------------------------------------------------ - void DebugContactText::_notifyCurrentCamera(Camera *cam) - { - mpCam = cam; - } - //------------------------------------------------------------------------------------------------ - void DebugContactText::_updateRenderQueue(RenderQueue* queue) - { - if (this->isVisible()) - { - if (mNeedUpdate) - this->_setupGeometry(); - if (mUpdateColors) - this->_updateColors(); - - queue->addRenderable(this, mRenderQueueID, OGRE_RENDERABLE_DEFAULT_PRIORITY); - // queue->addRenderable(this, mRenderQueueID, RENDER_QUEUE_SKIES_LATE); - } - } -} Deleted: trunk/python-ogre/ThirdParty/ogrebullet/Collisions/OgreBulletCollisionsDebugDrawer.cpp =================================================================== --- trunk/python-ogre/ThirdParty/ogrebullet/Collisions/OgreBulletCollisionsDebugDrawer.cpp 2008-02-16 01:41:26 UTC (rev 569) +++ trunk/python-ogre/ThirdParty/ogrebullet/Collisions/OgreBulletCollisionsDebugDrawer.cpp 2008-02-16 01:43:00 UTC (rev 570) @@ -1,237 +0,0 @@ -/*************************************************************************** - -This source file is part of OGREBULLET -(Object-oriented Graphics Rendering Engine Bullet Wrapper) -For the latest info, see http://www.ogre3d.org/phpBB2addons/viewforum.php?f=10 - -Copyright (c) 2007 tua...@gm... - - - -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the Free Software -Foundation; either version 2 of the License, or (at your option) any later -version. - -This program is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License along with -this program; if not, write to the Free Software Foundation, Inc., 59 Temple -Place - Suite 330, Boston, MA 02111-1307, USA, or go to -http://www.gnu.org/copyleft/lesser.txt. ------------------------------------------------------------------------------ -*/ - -#include "OgreBulletCollisions.h" - -#include "Debug/OgreBulletCollisionsDebugDrawer.h" -#include "Utils/OgreBulletConverter.h" - -using namespace OgreBulletCollisions; -using namespace Ogre; - -//------------------------------------------------------------------------------------------------ -DebugDrawer::DebugDrawer() : - DebugLines(), - btIDebugDraw(), - mDebugMode(0) -{ -} -//------------------------------------------------------------------------------------------------ -DebugDrawer::~DebugDrawer() -{ -} -//------------------------------------------------------------------------------------------------ -void DebugDrawer::reportErrorWarning(const char* warningString) -{ - Ogre::LogManager::getSingleton().getDefaultLog()->logMessage(warningString); -} -//------------------------------------------------------------------------------------------------ -void DebugDrawer::setDrawAabb(bool enable) -{ - if (enable) - mDebugMode |= btIDebugDraw::DBG_DrawAabb; - else - mDebugMode &= ~btIDebugDraw::DBG_DrawAabb; -} -//------------------------------------------------------------------------------------------------ -bool DebugDrawer::doesDrawAabb () const {return (mDebugMode & btIDebugDraw::DBG_DrawAabb) != 0;}; -//------------------------------------------------------------------------------------------------ -bool DebugDrawer::doesDrawWireframe () const {return (mDebugMode & btIDebugDraw::DBG_DrawWireframe) != 0;}; -//------------------------------------------------------------------------------------------------ -bool DebugDrawer::doesDrawFeaturesText () const {return (mDebugMode & btIDebugDraw::DBG_DrawFeaturesText) != 0;}; -//------------------------------------------------------------------------------------------------ -bool DebugDrawer::doesDrawContactPoints () const {return (mDebugMode & btIDebugDraw::DBG_DrawContactPoints) != 0;}; -//------------------------------------------------------------------------------------------------ -bool DebugDrawer::doesNoDeactivation () const {return (mDebugMode & btIDebugDraw::DBG_NoDeactivation) != 0;}; -//------------------------------------------------------------------------------------------------ -bool DebugDrawer::doesNoHelpText () const {return (mDebugMode & btIDebugDraw::DBG_NoHelpText) != 0;}; -//------------------------------------------------------------------------------------------------ -bool DebugDrawer::doesDrawText () const {return (mDebugMode & btIDebugDraw::DBG_DrawText) != 0;}; -//------------------------------------------------------------------------------------------------ -bool DebugDrawer::doesProfileTimings () const {return (mDebugMode & btIDebugDraw::DBG_ProfileTimings) != 0;}; -//------------------------------------------------------------------------------------------------ -bool DebugDrawer::doesEnableSatComparison () const {return (mDebugMode & btIDebugDraw::DBG_EnableSatComparison) != 0;}; -//------------------------------------------------------------------------------------------------ -bool DebugDrawer::doesDisableBulletLCP () const {return (mDebugMode & btIDebugDraw::DBG_DisableBulletLCP) != 0;}; -//------------------------------------------------------------------------------------------------ -bool DebugDrawer::doesEnableCCD () const {return (mDebugMode & btIDebugDraw::DBG_EnableCCD) != 0;}; -//------------------------------------------------------------------------------------------------ -void DebugDrawer::setDrawWireframe(bool enable) -{ - if (enable) - mDebugMode |= btIDebugDraw::DBG_DrawWireframe; - else - mDebugMode &= ~btIDebugDraw::DBG_DrawWireframe; -} -//------------------------------------------------------------------------------------------------ -void DebugDrawer::setDrawFeaturesText(bool enable) -{ - if (enable) - mDebugMode |= btIDebugDraw::DBG_DrawFeaturesText; - else - mDebugMode &= ~btIDebugDraw::DBG_DrawFeaturesText; -} -//------------------------------------------------------------------------------------------------ -void DebugDrawer::setDrawContactPoints(bool enable) -{ - if (enable) - mDebugMode |= btIDebugDraw::DBG_DrawContactPoints; - else - mDebugMode &= ~btIDebugDraw::DBG_DrawContactPoints; -} -//------------------------------------------------------------------------------------------------ -void DebugDrawer::setNoDeactivation(bool enable) -{ - if (enable) - mDebugMode |= btIDebugDraw::DBG_NoDeactivation; - else - mDebugMode &= ~btIDebugDraw::DBG_NoDeactivation; -} -//------------------------------------------------------------------------------------------------ -void DebugDrawer::setNoHelpText(bool enable) -{ - if (enable) - mDebugMode |= btIDebugDraw::DBG_NoHelpText; - else - mDebugMode &= ~btIDebugDraw::DBG_NoHelpText; -} -//------------------------------------------------------------------------------------------------ -void DebugDrawer::setDrawText(bool enable) -{ - if (enable) - mDebugMode |= btIDebugDraw::DBG_DrawText; - else - mDebugMode &= ~btIDebugDraw::DBG_DrawText; -} -//------------------------------------------------------------------------------------------------ -void DebugDrawer::setProfileTimings(bool enable) -{ - if (enable) - mDebugMode |= btIDebugDraw::DBG_ProfileTimings; - else - mDebugMode &= ~btIDebugDraw::DBG_ProfileTimings; -} -//------------------------------------------------------------------------------------------------ -void DebugDrawer::setEnableSatComparison(bool enable) -{ - if (enable) - mDebugMode |= btIDebugDraw::DBG_EnableSatComparison; - else - mDebugMode &= ~btIDebugDraw::DBG_EnableSatComparison; -} -//------------------------------------------------------------------------------------------------ -void DebugDrawer::setDisableBulletLCP (bool enable) -{ - if (enable) - mDebugMode |= btIDebugDraw::DBG_DisableBulletLCP ; - else - mDebugMode &= ~btIDebugDraw::DBG_DisableBulletLCP ; -} -//------------------------------------------------------------------------------------------------ -void DebugDrawer::setEnableCCD(bool enable) -{ - if (enable) - mDebugMode |= btIDebugDraw::DBG_EnableCCD; - else - mDebugMode &= ~btIDebugDraw::DBG_EnableCCD; -} -//------------------------------------------------------------------------------------------------ -void DebugDrawer::drawAabb(const btVector3& from,const btVector3& to,const btVector3& color) -{ - if (mDebugMode & btIDebugDraw::DBG_DrawAabb) - { - drawAabb (BtOgreConverter::to(from), BtOgreConverter::to(to), BtOgreConverter::to (color)); - } -} -//------------------------------------------------------------------------------------------------ -void DebugDrawer::drawLine(const btVector3& from,const btVector3& to,const btVector3& color) -{ - if (mDebugMode > 0) - { - drawLine (BtOgreConverter::to(from), BtOgreConverter::to(to), BtOgreConverter::to (color)); - } -} -//------------------------------------------------------------------------------------------------ -void DebugDrawer::drawContactPoint(const btVector3& PointOnB,const btVector3& normalOnB, - btScalar distance,int lifeTime,const btVector3& color) -{ - if (mDebugMode & btIDebugDraw::DBG_DrawContactPoints) - { - // - } -} -//------------------------------------------------------------------------------------------------ -void DebugDrawer::drawAabb (const Ogre::Vector3& from,const Ogre::Vector3& to,const Ogre::Vector3& color) -{ - if (mDebugMode & btIDebugDraw::DBG_DrawAabb) - { - Vector3 halfExtents = (to-from)* 0.5f; - Vector3 center = (to+from) *0.5f; - int i,j; - - Vector3 edgecoord(1.f,1.f,1.f),pa,pb; - for (i=0;i<4;i++) - { - for (j=0;j<3;j++) - { - pa = Vector3(edgecoord[0]*halfExtents[0], edgecoord[1]*halfExtents[1], - edgecoord[2]*halfExtents[2]); - pa+=center; - - int othercoord = j%3; - edgecoord[othercoord]*=-1.f; - pb = Vector3(edgecoord[0]*halfExtents[0], edgecoord[1]*halfExtents[1], - edgecoord[2]*halfExtents[2]); - pb+=center; - - drawLine(pa,pb,color); - } - edgecoord = Vector3(-1.f,-1.f,-1.f); - if (i<3) - edgecoord[i]*=-1.f; - } - } -} -//------------------------------------------------------------------------------------------------ -void DebugDrawer::drawLine(const Ogre::Vector3& from,const Ogre::Vector3& to,const Ogre::Vector3& color) -{ - if (mDebugMode > 0) - { - addLine (from, to); - } -} -//------------------------------------------------------------------------------------------------ -void DebugDrawer::drawContactPoint(const Ogre::Vector3& PointOnB,const Ogre::Vector3& normalOnB, - Real distance,int lifeTime,const Ogre::Vector3& color) -{ - if (mDebugMode & btIDebugDraw::DBG_DrawContactPoints) - { - - } - //... -} -//------------------------------------------------------------------------------------------------ - Deleted: trunk/python-ogre/ThirdParty/ogrebullet/Collisions/OgreBulletCollisionsDebugLines.cpp =================================================================== --- trunk/python-ogre/ThirdParty/ogrebullet/Collisions/OgreBulletCollisionsDebugLines.cpp 2008-02-16 01:41:26 UTC (rev 569) +++ trunk/python-ogre/ThirdParty/ogrebullet/Collisions/OgreBulletCollisionsDebugLines.cpp 2008-02-16 01:43:00 UTC (rev 570) @@ -1,162 +0,0 @@ -/*************************************************************************** - -This source file is part of OGREBULLET -(Object-oriented Graphics Rendering Engine Bullet Wrapper) -For the latest info, see http://www.ogre3d.org/phpBB2addons/viewforum.php?f=10 - -Copyright (c) 2007 tua...@gm... - - - -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the Free Software -Foundation; either version 2 of the License, or (at your option) any later -version. - -This program is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License along with -this program; if not, write to the Free Software Foundation, Inc., 59 Temple -Place - Suite 330, Boston, MA 02111-1307, USA, or go to -http://www.gnu.org/copyleft/lesser.txt. ------------------------------------------------------------------------------ -*/ - -#include "OgreBulletCollisions.h" - -#include "Debug/OgreBulletCollisionsDebugLines.h" -#include "Utils/OgreBulletConverter.h" - -using namespace OgreBulletCollisions; -using namespace Ogre; - -//------------------------------------------------------------------------------------------------ -bool DebugLines::_materials_created = false; -//------------------------------------------------------------------------------------------------ -DebugLines::DebugLines() : SimpleRenderable() -{ - mRenderOp.vertexData = new Ogre::VertexData(); - _drawn = false; - - if (!_materials_created) - { - MaterialPtr red = MaterialManager::getSingleton().create("OgreBulletCollisionsDebugLines/Disabled","OgreBulletCollisions"); - MaterialPtr green = MaterialManager::getSingleton().create("OgreBulletCollisionsDebugLines/Enabled","OgreBulletCollisions"); - MaterialPtr blue = MaterialManager::getSingleton().create("OgreBulletCollisionsDebugLines/Static","OgreBulletCollisions"); - - red->setReceiveShadows(false); - red->getTechnique(0)->setLightingEnabled(true); - red->getTechnique(0)->getPass(0)->setSelfIllumination(1,0,0); - - green->setReceiveShadows(false); - green->getTechnique(0)->setLightingEnabled(true); - green->getTechnique(0)->getPass(0)->setSelfIllumination(0,1,0); - - blue->setReceiveShadows(false); - blue->getTechnique(0)->setLightingEnabled(true); - blue->getTechnique(0)->getPass(0)->setSelfIllumination(0,0,1); - - _materials_created = true; - } - setCastShadows (false); - this->setMaterial("OgreBulletCollisionsDebugLines/Enabled"); -} - - -//------------------------------------------------------------------------------------------------ -void DebugLines::clear() -{ - if (_drawn) - { - _drawn = false; - _points.clear(); - delete mRenderOp.vertexData; - - mRenderOp.vertexData = new Ogre::VertexData(); - } -} -//------------------------------------------------------------------------------------------------ -DebugLines::~DebugLines(void) -{ - clear(); - - delete mRenderOp.vertexData; -} -//------------------------------------------------------------------------------------------------ -void DebugLines::draw() -{ - if (_drawn || _points.empty()) - return; - else - _drawn = true; - - // Initialization stuff - mRenderOp.indexData = 0; - mRenderOp.vertexData->vertexCount = _points.size(); - mRenderOp.vertexData->vertexStart = 0; - mRenderOp.operationType = RenderOperation::OT_LINE_LIST; - mRenderOp.useIndexes = false; - - Ogre::VertexDeclaration *decl = mRenderOp.vertexData->vertexDeclaration; - Ogre::VertexBufferBinding *bind = mRenderOp.vertexData->vertexBufferBinding; - - decl->addElement(0, 0, VET_FLOAT3, VES_POSITION); - - HardwareVertexBufferSharedPtr vbuf = - HardwareBufferManager::getSingleton().createVertexBuffer( - decl->getVertexSize(0), - mRenderOp.vertexData->vertexCount, - HardwareBuffer::HBU_STATIC_WRITE_ONLY); - - bind->setBinding(0, vbuf); - - // Drawing stuff - unsigned int size = (unsigned int)_points.size(); - Ogre::Vector3 vaabMin = _points[0]; - Ogre::Vector3 vaabMax = _points[0]; - - float *prPos = static_cast<float*>(vbuf->lock(HardwareBuffer::HBL_DISCARD)); - - for(unsigned int i = 0; i < size; i++) - { - *prPos++ = _points[i].x; - *prPos++ = _points[i].y; - *prPos++ = _points[i].z; - - if (_points[i].x < vaabMin.x) - vaabMin.x = _points[i].x; - if (_points[i].y < vaabMin.y) - vaabMin.y = _points[i].y; - if (_points[i].z < vaabMin.z) - vaabMin.z = _points[i].z; - - if (_points[i].x > vaabMax.x) - vaabMax.x = _points[i].x; - if (_points[i].y > vaabMax.y) - vaabMax.y = _points[i].y; - if (_points[i].z > vaabMax.z) - vaabMax.z = _points[i].z; - } - - vbuf->unlock(); - - mBox.setExtents(vaabMin, vaabMax); -} -//-------------------------------------------------------------------------... [truncated message content] |
From: <and...@us...> - 2008-02-16 01:41:23
|
Revision: 569 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=569&view=rev Author: andy_miller Date: 2008-02-15 17:41:26 -0800 (Fri, 15 Feb 2008) Log Message: ----------- ThirdParty cleanups Added Paths: ----------- trunk/python-ogre/ThirdParty/ogreal/OgreALMemberFunctionPointer.h Removed Paths: ------------- trunk/python-ogre/ThirdParty/caelum/EarthSunPositionModel.cpp trunk/python-ogre/ThirdParty/caelum/EarthSunPositionModel.h trunk/python-ogre/ThirdParty/caelum/SimpleSunPositionModel.cpp trunk/python-ogre/ThirdParty/caelum/SimpleSunPositionModel.h trunk/python-ogre/ThirdParty/caelum/SunPositionModel.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIPrerequisites.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIUtility.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIUtility.h Deleted: trunk/python-ogre/ThirdParty/caelum/EarthSunPositionModel.cpp =================================================================== --- trunk/python-ogre/ThirdParty/caelum/EarthSunPositionModel.cpp 2008-02-16 01:38:02 UTC (rev 568) +++ trunk/python-ogre/ThirdParty/caelum/EarthSunPositionModel.cpp 2008-02-16 01:41:26 UTC (rev 569) @@ -1,88 +0,0 @@ -/* -This file is part of Caelum. -See http://www.ogre3d.org/wiki/index.php/Caelum - -Copyright (c) 2006-2007 Caelum team. See Contributors.txt for details. - -Caelum is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published -by the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -Caelum is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with Caelum. If not, see <http://www.gnu.org/licenses/>. -*/ - -#include "CaelumPrecompiled.h" -#include "EarthSunPositionModel.h" - -namespace caelum { - -EarthSunPositionModel::EarthSunPositionModel (const Ogre::Radian lat, const Ogre::Real date) { - setLatitude (lat); - setJulianDate (date); -} - -void EarthSunPositionModel::setLatitude (const Ogre::Radian lat) { - mLatitude = lat; -} - -Ogre::Radian EarthSunPositionModel::getLatitude () const { - return mLatitude; -} - -void EarthSunPositionModel::setJulianDate (const Ogre::Real date) { - mJulianDate = date; -} - -Ogre::Real EarthSunPositionModel::getJulianDate () const { - return mJulianDate; -} - -Ogre::Vector3 EarthSunPositionModel::update (const float time) { - Ogre::Radian declination, zenith, azimuth; // Variables - Ogre::Real x, y, sinL, sinDelta, sinTime, cosL, cosDelta, cosTime, twoPi; // Recurrent values (speed up calculations) - - twoPi = 2 * Ogre::Math::PI; - - declination = Ogre::Radian (0.4093 * Ogre::Math::Sin ((twoPi * (mJulianDate * 365 - 81)) / 368.0)); - - sinL = Ogre::Math::Sin (mLatitude); - cosL = Ogre::Math::Cos (mLatitude); - sinDelta = Ogre::Math::Sin (declination); - cosDelta = Ogre::Math::Cos (declination); - sinTime = Ogre::Math::Sin (twoPi * time); - cosTime = Ogre::Math::Cos (twoPi * time); - - x = (cosL * sinDelta - sinL * cosDelta * cosTime); - y = -cosDelta * sinTime; - - zenith = Ogre::Radian (Ogre::Math::PI * 0.5) - Ogre::Math::ASin (sinL * sinDelta + cosL * cosDelta * cosTime); - azimuth = Ogre::Math::ATan (y / x); - - if (x < 0) - azimuth += Ogre::Radian (Ogre::Math::PI); - else if (y < 0 && x > 0) - azimuth += Ogre::Radian (twoPi); - - Ogre::Vector3 dir = Ogre::Vector3::UNIT_Y; - Ogre::Quaternion rotZen, rotAzi; - - rotZen = Ogre::Quaternion (zenith, Ogre::Vector3::UNIT_X); - rotAzi = Ogre::Quaternion (azimuth, Ogre::Vector3::UNIT_Y); - - dir = rotAzi * (rotZen * dir); - - mSunPosition = dir.normalisedCopy () * -1; - - mSunPosition.z *= -1; - - return mSunPosition; -} - -} // namespace caelum Deleted: trunk/python-ogre/ThirdParty/caelum/EarthSunPositionModel.h =================================================================== --- trunk/python-ogre/ThirdParty/caelum/EarthSunPositionModel.h 2008-02-16 01:38:02 UTC (rev 568) +++ trunk/python-ogre/ThirdParty/caelum/EarthSunPositionModel.h 2008-02-16 01:41:26 UTC (rev 569) @@ -1,80 +0,0 @@ -/* -This file is part of Caelum. -See http://www.ogre3d.org/wiki/index.php/Caelum - -Copyright (c) 2006-2007 Caelum team. See Contributors.txt for details. - -Caelum is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published -by the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -Caelum is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with Caelum. If not, see <http://www.gnu.org/licenses/>. -*/ - -#ifndef EARTHSUNPOSITIONMODEL_H -#define EARTHSUNPOSITIONMODEL_H - -#include "CaelumPrerequisites.h" -#include "SunPositionModel.h" - -namespace caelum { - -/** The simplified Sun position model for the earth. - Based on experimental data and some simplifications (forumlas taken from the paper - "A Practical Analytic Model for Daylight", by Preetham et al.) - @author Jesús Alonso Abad. - */ -class DllExport EarthSunPositionModel : public SunPositionModel { -// Attributes ----------------------------------------------------------------- - protected: - /// Latitude - Ogre::Radian mLatitude; - - /// Julian date - Ogre::Real mJulianDate; - -// Methods -------------------------------------------------------------------- - public: - /** Basic constructor. - * @param lat The latitude (in radians). - * @param date The Julian date in the range [0, 1] (Jan 1st - Dec 31st respectively). - * Values above will be wrapped and below will be treated as positive. - */ - EarthSunPositionModel (const Ogre::Radian lat, const Ogre::Real date); - - /** Changes the current latitude. - * @param lat The new latitude in radians. - */ - void setLatitude (const Ogre::Radian lat); - - /** Gets the current latitude. - * @return The latitude in radians. - */ - Ogre::Radian getLatitude () const; - - /** Changes the Julian date. - * @param date The current Julian date in the range [0, 1] (Jan 1st - Dec 31st Respectively). - * Values above will be wrapped and below will be treated as positive. - */ - void setJulianDate (const Ogre::Real date); - - /** Gets the Julian date. - * @return The Julian date in the range [0, 1]. - */ - Ogre::Real getJulianDate () const; - - /** @copydoc SunPositionModel::update(). - */ - Ogre::Vector3 update (const float time); -}; - -} // namespace caelum - -#endif // EARTHSUNPOSITIONMODEL_H Deleted: trunk/python-ogre/ThirdParty/caelum/SimpleSunPositionModel.cpp =================================================================== --- trunk/python-ogre/ThirdParty/caelum/SimpleSunPositionModel.cpp 2008-02-16 01:38:02 UTC (rev 568) +++ trunk/python-ogre/ThirdParty/caelum/SimpleSunPositionModel.cpp 2008-02-16 01:41:26 UTC (rev 569) @@ -1,52 +0,0 @@ -/* -This file is part of Caelum. -See http://www.ogre3d.org/wiki/index.php/Caelum - -Copyright (c) 2006-2007 Caelum team. See Contributors.txt for details. - -Caelum is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published -by the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -Caelum is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with Caelum. If not, see <http://www.gnu.org/licenses/>. -*/ - -#include "CaelumPrecompiled.h" -#include "SimpleSunPositionModel.h" - -namespace caelum { - -SimpleSunPositionModel::SimpleSunPositionModel (Ogre::Degree inc) { - setInclination (inc); -} - -void SimpleSunPositionModel::setInclination (Ogre::Degree inc) { - mInclination = inc; -} - -Ogre::Degree SimpleSunPositionModel::getInclination () const { - return mInclination; -} - -Ogre::Vector3 SimpleSunPositionModel::update (const float time) { - // Get the inclinated axis - Ogre::Vector3 axis = Ogre::Vector3::UNIT_Z; - axis = Ogre::Quaternion (mInclination, Ogre::Vector3::UNIT_X) * axis; - - // Get the inclinated light direction, according to the day time - Ogre::Vector3 dir = Ogre::Vector3::UNIT_Y; - dir = Ogre::Quaternion (Ogre::Radian (time * 2 * Ogre::Math::PI), axis) * dir; - - mSunPosition = dir.normalisedCopy () * -1; - - return mSunPosition * -1; -} - -} // namespace caelum Deleted: trunk/python-ogre/ThirdParty/caelum/SimpleSunPositionModel.h =================================================================== --- trunk/python-ogre/ThirdParty/caelum/SimpleSunPositionModel.h 2008-02-16 01:38:02 UTC (rev 568) +++ trunk/python-ogre/ThirdParty/caelum/SimpleSunPositionModel.h 2008-02-16 01:41:26 UTC (rev 569) @@ -1,64 +0,0 @@ -/* -This file is part of Caelum. -See http://www.ogre3d.org/wiki/index.php/Caelum - -Copyright (c) 2006-2007 Caelum team. See Contributors.txt for details. - -Caelum is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published -by the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -Caelum is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with Caelum. If not, see <http://www.gnu.org/licenses/>. -*/ - -#ifndef SIMPLESUNPOSITIONMODEL_H -#define SIMPLESUNPOSITIONMODEL_H - -#include "CaelumPrerequisites.h" -#include "SunPositionModel.h" - -namespace caelum { - -/** A simple circular sun position model. - It just creates an inclinated circular orbit. - @author Jesús Alonso Abad. - */ -class DllExport SimpleSunPositionModel : public SunPositionModel { -// Attributes ----------------------------------------------------------------- - protected: - /** The sun trajectory inclination. This is similar to the earth's rotation axis inclination. - */ - Ogre::Degree mInclination; - -// Methods -------------------------------------------------------------------- - public: - /** Basic constructor. - @param inc The orbit inclination. - */ - SimpleSunPositionModel (Ogre::Degree inc); - - /** Changes the orbit inclination. - @param inc The inclination in degrees. - */ - void setInclination (Ogre::Degree inc); - - /** Gets the orbit inclination. - @return The orbit inclination in degrees. - */ - Ogre::Degree getInclination () const; - - /** @copydoc SunPositionModel::update(). - */ - Ogre::Vector3 update (const float time); -}; - -} // namespace caelum - -#endif // SIMPLESUNPOSITIONMODEL_H Deleted: trunk/python-ogre/ThirdParty/caelum/SunPositionModel.h =================================================================== --- trunk/python-ogre/ThirdParty/caelum/SunPositionModel.h 2008-02-16 01:38:02 UTC (rev 568) +++ trunk/python-ogre/ThirdParty/caelum/SunPositionModel.h 2008-02-16 01:41:26 UTC (rev 569) @@ -1,56 +0,0 @@ -/* -This file is part of Caelum. -See http://www.ogre3d.org/wiki/index.php/Caelum - -Copyright (c) 2006-2007 Caelum team. See Contributors.txt for details. - -Caelum is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published -by the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -Caelum is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with Caelum. If not, see <http://www.gnu.org/licenses/>. -*/ - -#ifndef SUNPOSITIONMODEL_H -#define SUNPOSITIONMODEL_H - -#include "CaelumPrerequisites.h" - -namespace caelum { - -/** Interface for all the sun positioning models. - A sun position model is a configurable utility/model that will return sun's sky coordinates (direction/azimuth in the - form of a normalised vector) depending on various parameters. - These models can range from a simple circular (sin/cos) oscillation, to complex equations for accurate positioning. - @author Jesús Alonso Abad. - */ -class DllExport SunPositionModel { -// Attributes ----------------------------------------------------------------- - protected: - /** The last calculated sun position. - */ - Ogre::Vector3 mSunPosition; - -// Methods -------------------------------------------------------------------- - public: - /** Destructor - */ - virtual ~SunPositionModel () {}; - - /** Updates the sun position. - @param time Local time. - @return The sun light direction (or the negated sun position). - */ - virtual Ogre::Vector3 update (const float time) = 0; -}; - -} // namespace caelum - -#endif // SUNPOSITIONMODEL_H Added: trunk/python-ogre/ThirdParty/ogreal/OgreALMemberFunctionPointer.h =================================================================== --- trunk/python-ogre/ThirdParty/ogreal/OgreALMemberFunctionPointer.h (rev 0) +++ trunk/python-ogre/ThirdParty/ogreal/OgreALMemberFunctionPointer.h 2008-02-16 01:41:26 UTC (rev 569) @@ -0,0 +1,45 @@ +#ifndef _OGREAL_MEMBER_FUNCTION_POINTER_H_ +#define _OGREAL_MEMBER_FUNCTION_POINTER_H_ + +#include "OgreALPrereqs.h" + +namespace OgreAL { + // Predeclare so we don't need to include OgreALSound.h + class Sound; + + class OgreAL_Export MemberFunctionSlot + { + public: + virtual ~MemberFunctionSlot(){}; + virtual void execute(Sound* source) = 0; + }; + + template<typename T> + class MemberFunctionPointer : public MemberFunctionSlot + { + public: + typedef void (T::*MemberFunction)(Sound* source); + + MemberFunctionPointer() : mUndefined(true){} + + MemberFunctionPointer(MemberFunction func, T* obj) : + mFunction(func), + mObject(obj), + mUndefined(false) + {} + + virtual ~MemberFunctionPointer(){} + + void execute(Sound* source) + { + if(!mUndefined) + (mObject->*mFunction)(source); + } + + protected: + MemberFunction mFunction; + T* mObject; + bool mUndefined; + }; +} // Namespace +#endif Deleted: trunk/python-ogre/ThirdParty/quickgui/QuickGUIPrerequisites.h =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIPrerequisites.h 2008-02-16 01:38:02 UTC (rev 568) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIPrerequisites.h 2008-02-16 01:41:26 UTC (rev 569) @@ -1,88 +0,0 @@ -#ifndef __QUICKPREQUISITES_H -#define __QUICKPREQUISITES_H - -#include "Ogre.h" -#include "QuickGUIExportDLL.h" - -namespace QuickGUI -{ - ////////////DRAWING///////////// - #define VERTICES_PER_QUAD 6 - - class Rect; - class Point; - class Size; - - struct Vertex; - class VertexBuffer; - class QuadContainer; - class Quad; - - // Stores the Texture of a quad, and the index of the first quad following it with a different texture. - typedef std::pair<Ogre::String,unsigned int > TextureQuadIndex; - typedef std::vector<TextureQuadIndex > TextureChangeList; - - typedef std::list<Quad*> QuadList; - typedef std::vector<Quad*> QuadArray; - - typedef std::list<QuadContainer*> QuadContainerList; - - ////////////EVENTS///////////// - class MemberFunctionSlot; - class EventArgs; - class WidgetEventArgs; - class MouseEventArgs; - - typedef std::vector<MemberFunctionSlot*> EventHandlerArray; - - ////////////UTILS///////////// - class MouseCursor; - class Utility; - class ConfigScriptLoader; - - ////////////Handlers///////////// - class GUIManager; - class Sheet; - class SkinSet; - - ////////////Effects///////////// - class Effect; - class AlphaEffect; - class MoveEffect; - class SizeEffect; - - ////////////Widgets///////////// - class Widget; - typedef std::vector<Widget*> WidgetArray; - - class Window; - - class Image; - class Panel; - class Border; - class ScrollPane; - class Button; - class NStateButton; - - class Text; - class Label; - class MenuLabel; - class LabelArea; - class TextBox; - class Console; - class TextArea; - class TextBox; - - class List; - class ComboBox; - class TitleBar; - class Tree; - - class ProgressBar; - class HorizontalTrackBar; - class VerticalTrackBar; - class VerticalScrollBar; - class HorizontalScrollBar; - -} -#endif //__QUICKPREQUISITES_H Deleted: trunk/python-ogre/ThirdParty/quickgui/QuickGUIUtility.cpp =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIUtility.cpp 2008-02-16 01:38:02 UTC (rev 568) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIUtility.cpp 2008-02-16 01:41:26 UTC (rev 569) @@ -1,88 +0,0 @@ -#include "QuickGUIPrecompiledHeaders.h" - -#include "QuickGUIUtility.h" - -namespace QuickGUI -{ - Utility::Utility() - { - } - - Utility::~Utility() - { - } - - Ogre::Vector4 Utility::getImageBounds(const Ogre::Image& i) - { - size_t left = i.getWidth(); - size_t right = 0; - size_t top = i.getHeight(); - size_t bottom = 0; - - const Ogre::PixelBox& pb = i.getPixelBox(); - - // Pointers to the pixel data of the bar, and the destination image - Ogre::uint8* ptr = static_cast<Ogre::uint8*>(pb.data); - - // iterate through pixel by pixel, to determine the min/max bar bounds. - for( size_t row = 0; row < i.getHeight(); ++row ) - { - for( size_t col = 0; col < i.getWidth(); col++ ) - { - // skip R,B,G channels - ptr += 3; - // check for non zero alpha value - if(*ptr++ > 0) - { - if( col < left ) - left = col; - if( col > right ) - right = col; - if( row < top ) - top = row; - if( row > bottom ) - bottom = row; - } - } - } - - return Ogre::Vector4(left,top,right,bottom); - } - - bool Utility::isImageFile(const Ogre::String& fileName) - { - Ogre::String::size_type index = fileName.find_last_of('.'); - if( index != Ogre::String::npos ) - { - Ogre::String extension = fileName.substr(index + 1); - Ogre::StringUtil::toLowerCase(extension); - - Ogre::StringVector supportedImageCodecs = Ogre::Codec::getExtensions(); - - return (std::find(supportedImageCodecs.begin(),supportedImageCodecs.end(),extension) != supportedImageCodecs.end()); - } - - return false; - } - - bool Utility::textureExistsOnDisk(const Ogre::String& textureName) - { - if(textureName.empty()) - return false; - - if(!isImageFile(textureName)) - return false; - - Ogre::ResourceGroupManager* rgm = Ogre::ResourceGroupManager::getSingletonPtr(); - - Ogre::StringVector resourceGroups = rgm->getResourceGroups(); - Ogre::StringVector::iterator it; - for( it = resourceGroups.begin(); it != resourceGroups.end(); ++it ) - { - if(rgm->resourceExists((*it),textureName)) - return true; - } - - return false; - } -} Deleted: trunk/python-ogre/ThirdParty/quickgui/QuickGUIUtility.h =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIUtility.h 2008-02-16 01:38:02 UTC (rev 568) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIUtility.h 2008-02-16 01:41:26 UTC (rev 569) @@ -1,35 +0,0 @@ -#ifndef QUICKGUIUTILITY_H -#define QUICKGUIUTILITY_H - -#include "OgreCodec.h" -#include "OgreHardwarePixelBuffer.h" -#include "OgreImage.h" -#include "OgreResourceGroupManager.h" -#include "OgreVector4.h" - -#include "QuickGUIPrerequisites.h" -#include "QuickGUIExportDLL.h" - -namespace QuickGUI -{ - class _QuickGUIExport Utility - { - public: - Utility(); - ~Utility(); - - static Ogre::Vector4 getImageBounds(const Ogre::Image& i); - - static bool isImageFile(const Ogre::String& fileName); - - /* - * Returns true if the textureName represents an image file on disk. (ie *.png, *.jpg, etc) - */ - static bool textureExistsOnDisk(const Ogre::String& textureName); - - protected: - static Ogre::StringVector mSupportedImageCodecs; - }; -} - -#endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2008-02-16 01:37:57
|
Revision: 568 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=568&view=rev Author: andy_miller Date: 2008-02-15 17:38:02 -0800 (Fri, 15 Feb 2008) Log Message: ----------- Thirdparty Updates Added Paths: ----------- trunk/python-ogre/ThirdParty/caelum/Astronomy.cpp trunk/python-ogre/ThirdParty/caelum/Astronomy.h trunk/python-ogre/ThirdParty/caelum/CaelumPrerequisites.h.bak trunk/python-ogre/ThirdParty/caelum/SolarSystemModel.cpp trunk/python-ogre/ThirdParty/caelum/SolarSystemModel.h trunk/python-ogre/ThirdParty/nxogre/BetajaenCC.cpp trunk/python-ogre/ThirdParty/nxogre/BetajaenCC.h trunk/python-ogre/ThirdParty/nxogre/NxOgreActors.h trunk/python-ogre/ThirdParty/nxogre/NxOgreAllocator.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreAllocator.h trunk/python-ogre/ThirdParty/nxogre/NxOgreConfig.h trunk/python-ogre/ThirdParty/nxogre/NxOgreContactCallback.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreContactCallback.h trunk/python-ogre/ThirdParty/nxogre/NxOgreContactCallbackController.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreContactCallbackController.h trunk/python-ogre/ThirdParty/nxogre/NxOgreDualIdentifier.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreDualIdentifier.h trunk/python-ogre/ThirdParty/nxogre/NxOgreDynamicMesh.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreDynamicMesh.h trunk/python-ogre/ThirdParty/nxogre/NxOgreEffectsSystem.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreEffectsSystem.h trunk/python-ogre/ThirdParty/nxogre/NxOgreFileResourceStream.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreFileResourceStream.h trunk/python-ogre/ThirdParty/nxogre/NxOgreInflatable.h trunk/python-ogre/ThirdParty/nxogre/NxOgreJointCallback.h trunk/python-ogre/ThirdParty/nxogre/NxOgreMeshRenderable.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreMeshRenderable.h trunk/python-ogre/ThirdParty/nxogre/NxOgreNXM.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreNXM.h trunk/python-ogre/ThirdParty/nxogre/NxOgreOBJStream.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreOBJStream.h trunk/python-ogre/ThirdParty/nxogre/NxOgreOgreMesh.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreOgreMesh.h trunk/python-ogre/ThirdParty/nxogre/NxOgreOgreMeshRenderable.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreOgreMeshRenderable.h trunk/python-ogre/ThirdParty/nxogre/NxOgreOgreResourceStream.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreOgreResourceStream.h trunk/python-ogre/ThirdParty/nxogre/NxOgreOgreTimeController.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreOgreTimeController.h trunk/python-ogre/ThirdParty/nxogre/NxOgrePlatform.h trunk/python-ogre/ThirdParty/nxogre/NxOgreResourceManager_Cloth.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreSheet.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreSheet.h trunk/python-ogre/ThirdParty/nxogre/NxOgreSimpleActor.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreSimpleActor.h trunk/python-ogre/ThirdParty/nxogre/NxOgreSleepCallback.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreSleepCallback.h trunk/python-ogre/ThirdParty/nxogre/NxOgreThrow.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreTimeController.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreTimeController.h trunk/python-ogre/ThirdParty/nxogre/NxOgreTransitionalMesh.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreTransitionalMesh.h trunk/python-ogre/ThirdParty/nxogre/NxOgreTriggerCallback.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreTriggerCallback.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIExportDLL.h.bak trunk/python-ogre/ThirdParty/quickgui/QuickGUIForwardDeclarations.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIRadioButton.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIRadioButton.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIRadioButtonGroup.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIRadioButtonGroup.h trunk/python-ogre/ThirdParty/quickgui/QuickGUITypedef.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIVector4.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIVector4.h Added: trunk/python-ogre/ThirdParty/caelum/Astronomy.cpp =================================================================== --- trunk/python-ogre/ThirdParty/caelum/Astronomy.cpp (rev 0) +++ trunk/python-ogre/ThirdParty/caelum/Astronomy.cpp 2008-02-16 01:38:02 UTC (rev 568) @@ -0,0 +1,240 @@ +/* +This file is part of Caelum. +See http://www.ogre3d.org/wiki/index.php/Caelum + +Copyright (c) 2008 Caelum team. See Contributors.txt for details. + +Caelum is free software: you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published +by the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +Caelum is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with Caelum. If not, see <http://www.gnu.org/licenses/>. +*/ + +#include "CaelumPrecompiled.h" +#include "Astronomy.h" + +using Ogre::Degree; +using Ogre::Radian; +using Ogre::Math; + +namespace caelum +{ + const Ogre::Degree Astronomy::normalizeAngle (Ogre::Degree value) + { + value = fmod (value.valueDegrees (), 360); + if (value < Degree (0)) { + value += Degree (360); + } + return value; + } + + void Astronomy::convertRectangularToSpherical ( + LongReal x, LongReal y, LongReal z, + Degree &rasc, Degree &decl, LongReal &dist) + { + dist = Math::Sqrt (x * x + y * y + z * z); + rasc = Math::ATan2 (y, x); + decl = Math::ATan2 (z, Math::Sqrt (x * x + y * y)); + } + + void Astronomy::convertSphericalToRectangular ( + Degree rasc, Degree decl, LongReal dist, + LongReal &x, LongReal &y, LongReal &z) + { + x = dist * Math::Cos (rasc) * Math::Cos (decl); + y = dist * Math::Sin (rasc) * Math::Cos (decl); + z = dist * Math::Sin (decl); + } + + void Astronomy::convertEquatorialToHorizontal ( + LongReal jday, + Degree longitude, Degree latitude, + Degree rasc, Degree decl, + Degree &azimuth, Degree &altitude) + { + LongReal d = jday - 2451543.5; + Degree w = Degree (282.9404 + 4.70935E-5 * d); + Degree M = Degree (356.0470 + 0.9856002585 * d); + // Sun's mean longitude + Degree L = w + M; + // Universal time of day in degrees. + Degree UT = Degree(fmod(d, 1) * 360); + Degree hourAngle = longitude + L + Degree (180) + UT - rasc; + + LongReal x = Math::Cos (hourAngle) * Math::Cos (decl); + LongReal y = Math::Sin (hourAngle) * Math::Cos (decl); + LongReal z = Math::Sin (decl); + + LongReal xhor = x * Math::Sin (latitude) - z * Math::Cos (latitude); + LongReal yhor = y; + LongReal zhor = x * Math::Cos (latitude) + z * Math::Sin (latitude); + + azimuth = Math::ATan2 (yhor, xhor) + Degree (180); + altitude = Math::ATan2 (zhor, Math::Sqrt (xhor * xhor + yhor * yhor)); + } + + void Astronomy::getHorizontalSunPosition ( + LongReal jday, + Ogre::Degree longitude, Ogre::Degree latitude, + Ogre::Degree &azimuth, Ogre::Degree &altitude) + { + // Midnight at the start of 31 december 2000 + // 2451543.5 == Astronomy::getJulianDayFromGregorianDateTime(1999, 12, 31, 0, 0, 0)); + LongReal d = jday - 2451543.5; + + // Sun's Orbital elements: + // argument of perihelion + Degree w = Degree (282.9404 + 4.70935E-5 * d); + // eccentricity (0=circle, 0-1=ellipse, 1=parabola) + LongReal e = 0.016709 - 1.151E-9 * d; + // mean anomaly (0 at perihelion; increases uniformly with time) + Degree M = Degree(356.0470 + 0.9856002585 * d); + // Obliquity of the ecliptic. + Degree oblecl = Degree (23.4393 - 3.563E-7 * d); + + // Eccentric anomaly + Degree E = M + Radian(e * Math::Sin (M) * (1 + e * Math::Cos (M))); + + // Sun's Distance(R) and true longitude(L) + LongReal xv = Math::Cos (E) - e; + LongReal yv = Math::Sin (E) * Math::Sqrt (1 - e * e); + LongReal r = Math::Sqrt (xv * xv + yv * yv); + Degree lon = Math::ATan2 (yv, xv) + w; + + // Ecliptic rectangular. + LongReal xecl = r * Math::Cos(lon); + LongReal yecl = r * Math::Sin(lon); + LongReal zecl = 0; + + // Equatorial rectangular. + LongReal xequ = xecl; + LongReal yequ = yecl * Math::Cos (oblecl) - zecl * Math::Sin (oblecl); + LongReal zequ = yecl * Math::Sin (oblecl) + zecl * Math::Cos (oblecl); + + // Equatorial spherical. + Degree rasc, decl; + Astronomy::convertRectangularToSpherical (xequ, yequ, zequ, rasc, decl, r); + + // Horizontal spherical. + Astronomy::convertEquatorialToHorizontal ( + jday, longitude, latitude, rasc, decl, azimuth, altitude); + } + + int Astronomy::getJulianDayFromGregorianDate( + int year, int month, int day) + { + // Formulas from http://en.wikipedia.org/wiki/Julian_day + // These are all integer divisions, but I'm not sure it works + // correctly for negative values. + int a = (14 - month) / 12; + int y = year + 4800 - a; + int m = month + 12 * a - 3; + return day + (153 * m + 2) / 5 + 365 * y + y / 4 - y / 100 + y / 400 - 32045; + } + + LongReal Astronomy::getJulianDayFromGregorianDateTime( + int year, int month, int day, + int hour, int minute, LongReal second) + { + int fpmode = Astronomy::enterHighPrecissionFloatingPointMode (); + + int jdn = getJulianDayFromGregorianDate (year, month, day); + // These are NOT integer divisions. + LongReal jd = jdn + (hour - 12) / 24.0 + minute / 1440.0 + second / 86400.0; + + Astronomy::restoreFloatingPointMode(fpmode); + return jd; + } + + LongReal Astronomy::getJulianDayFromGregorianDateTime( + int year, int month, int day, + LongReal secondsFromMidnight) + { + int jdn = getJulianDayFromGregorianDate(year, month, day); + LongReal jd = jdn + secondsFromMidnight / 86400.0 - 0.5; + return jd; + } + + void Astronomy::getGregorianDateFromJulianDay( + int julianDay, int &year, int &month, int &day) + { + // From http://en.wikipedia.org/wiki/Julian_day + int J = julianDay; + int j = J + 32044; + int g = j / 146097; + int dg = j % 146097; + int c = (dg / 36524 + 1) * 3 / 4; + int dc = dg - c * 36524; + int b = dc / 1461; + int db = dc % 1461; + int a = (db / 365 + 1) * 3 / 4; + int da = db - a * 365; + int y = g * 400 + c * 100 + b * 4 + a; + int m = (da * 5 + 308) / 153 - 2; + int d = da - (m + 4) * 153 / 5 + 122; + year = y - 4800 + (m + 2) / 12; + month = (m + 2) % 12 + 1; + day = d + 1; + } + + void Astronomy::getGregorianDateTimeFromJulianDay( + LongReal julianDay, int &year, int &month, int &day, + int &hour, int &minute, LongReal &second) + { + // Integer julian days are at noon. + // static_cast<int)(floor( is more precise than Ogre::Math::IFloor. + // Yes, it does matter. + int ijd = static_cast<int>(floor(julianDay + 0.5)); + getGregorianDateFromJulianDay(ijd, year, month, day); + + LongReal s = (julianDay + 0.5 - ijd) * 86400.0; + hour = static_cast<int>(floor(s / 3600)); + s -= hour * 3600; + minute = static_cast<int>(floor(s / 60)); + s -= minute * 60; + second = s; + } + + void Astronomy::getGregorianDateFromJulianDay( + LongReal julianDay, int &year, int &month, int &day) + { + int hour; + int minute; + LongReal second; + getGregorianDateTimeFromJulianDay(julianDay, year, month, day, hour, minute, second); + } + +#if (OGRE_PLATFORM == OGRE_PLATFORM_WIN32) && (OGRE_COMPILER == OGRE_COMPILER_MSVC) + int Astronomy::enterHighPrecissionFloatingPointMode () + { + int oldMode = ::_controlfp (0, 0); + ::_controlfp (_PC_64, _MCW_PC); + return oldMode; + } + + void Astronomy::restoreFloatingPointMode (int oldMode) + { + ::_controlfp (oldMode, _MCW_PC); + } +#else + void Astronomy::enterHighPrecissionFloatingPointMode () + { + // Meaningless + return 0xC0FFEE; + } + + void Astronomy::restoreFloatingPointMode (int oldMode) + { + // Useless check. + assert(oldMode == 0xC0FFEE); + } +#endif +} Added: trunk/python-ogre/ThirdParty/caelum/Astronomy.h =================================================================== --- trunk/python-ogre/ThirdParty/caelum/Astronomy.h (rev 0) +++ trunk/python-ogre/ThirdParty/caelum/Astronomy.h 2008-02-16 01:38:02 UTC (rev 568) @@ -0,0 +1,154 @@ +/* +This file is part of Caelum. +See http://www.ogre3d.org/wiki/index.php/Caelum + +Copyright (c) 2008 Caelum team. See Contributors.txt for details. + +Caelum is free software: you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published +by the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +Caelum is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with Caelum. If not, see <http://www.gnu.org/licenses/>. +*/ + +#ifndef ASTRONOMY_H +#define ASTRONOMY_H + +#include "CaelumPrerequisites.h" + +namespace caelum +{ + /** Static class with astronomy routines. + * This class contains various astronomical routines useful in Caelum. + * + * Most of the formulas are from http://stjarnhimlen.se/comp/ppcomp.html + * That site contains much more than was implemented here; it has code + * for determining the positions of all the planets. Only the sun and + * moon are actually useful for caelum. + * + * The formulas are isolated here in pure procedural code for easier + * testing (Tests are done as assert in the demo). + * + * Precision is vital here, and this class should be converted to use + * caelum::LongReal instead of Ogre::Real and Ogre::Degree. + */ + class DllExport Astronomy + { + private: + Astronomy() {} + + public: + /** Normalize an angle to the 0, 360 range. + * @param x The angle to normalize + */ + static const Ogre::Degree normalizeAngle(Ogre::Degree x); + + static void convertRectangularToSpherical ( + LongReal x, LongReal y, LongReal z, + Ogre::Degree &rasc, Ogre::Degree &decl, LongReal &dist); + + static void convertSphericalToRectangular ( + Ogre::Degree rasc, Ogre::Degree decl, LongReal dist, + LongReal &x, LongReal &y, LongReal &z); + + /** Convert from equatorial to horizontal coordinates. + * This function converts from angles relative to the earth's equator + * to angle relative to the horizon at a given point. + * @param jday Astronomical time as julian day. + * @param longitude Observer's longitude in degrees east. + * @param latitude Observer's latitude in degrees north. + * @param rasc Object's right ascension. + * @param decl Object's declination. + * @param azimuth Object's azimuth (clockwise degrees from true north). + * @param altitude Object's altitude (degrees above the horizon). + */ + static void convertEquatorialToHorizontal ( + LongReal jday, + Ogre::Degree longitude, Ogre::Degree latitude, + Ogre::Degree rasc, Ogre::Degree decl, + Ogre::Degree &azimuth, Ogre::Degree &altitude); + + /** Get the sun's position in the sky in, relative to the horizon. + * @param jday Astronomical time as julian day. + * @param longitude Observer longitude + * @param latitude Observer latitude + * @param azimuth Astronomical azimuth, measured clockwise from North = 0. + * @param altitude Astronomical altitude, elevation above the horizon. + */ + static void getHorizontalSunPosition ( + LongReal jday, + Ogre::Degree longitude, Ogre::Degree latitude, + Ogre::Degree &azimuth, Ogre::Degree &altitude); + + /** Get astronomical julian day from normal gregorian calendar. + * From wikipedia: the integer number of days that have elapsed + * since the initial epoch defined as + * noon Universal Time (UT) Monday, January 1, 4713 BC + * @note this is the time at noon, not midnight. + */ + static int getJulianDayFromGregorianDate( + int year, int month, int day); + + /** Get astronomical julian day from normal gregorian calendar. + * Calculate julian day from a day in the normal gregorian calendar. + * Time should be given as UTC. + * @see http://en.wikipedia.org/wiki/Julian_day + */ + static LongReal getJulianDayFromGregorianDateTime( + int year, int month, int day, + int hour, int minute, LongReal second); + + /** Get astronomical julian day from normal gregorian calendar. + * @see above (I don't know the proper doxygen syntax). + */ + static LongReal getJulianDayFromGregorianDateTime( + int year, int month, int day, + LongReal secondsFromMidnight); + + /// Get gregorian date from integer julian day. + static void getGregorianDateFromJulianDay( + int julianDay, int &year, int &month, int &day); + + /// Get gregorian date time from floating point julian day. + static void getGregorianDateTimeFromJulianDay( + LongReal julianDay, int &year, int &month, int &day, + int &hour, int &minute, LongReal &second); + + /// Get gregorian date from floating point julian day. + static void getGregorianDateFromJulianDay( + LongReal julianDay, int &year, int &month, int &day); + + /** Enter high-precission floating-point mode. + * + * By default Direct3D decreases the precission of ALL floating + * point calculations, enough to stop Caelum's astronomy routines + * from working correctly. + * + * To trigger this behaviour in a standard ogre demo select the + * Direct3D render system and set "Floating-point mode" to + * "Fastest". Otherwise it's not a problem. + * + * It can be fixed by changing the precission only inside caelum's + * astronomy routines using the _controlfp function. This only works + * for MSVC on WIN32; This is a no-op on other compilers. + * + * @note: Must be paired with restoreFloatingPointMode. + * @return Value to pass to restoreFloatingModeMode. + */ + static int enterHighPrecissionFloatingPointMode (); + + /** Restore old floating point precission. + * @see enterHighPrecissionFloatingPointMode. + */ + static void restoreFloatingPointMode (int oldMode); + }; +} + +#endif // SOLARSYSTEMMODEL_H \ No newline at end of file Added: trunk/python-ogre/ThirdParty/caelum/CaelumPrerequisites.h.bak =================================================================== --- trunk/python-ogre/ThirdParty/caelum/CaelumPrerequisites.h.bak (rev 0) +++ trunk/python-ogre/ThirdParty/caelum/CaelumPrerequisites.h.bak 2008-02-16 01:38:02 UTC (rev 568) @@ -0,0 +1,71 @@ +/* +This file is part of Caelum. +See http://www.ogre3d.org/wiki/index.php/Caelum + +Copyright (c) 2006-2008 Caelum team. See Contributors.txt for details. + +Caelum is free software: you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published +by the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +Caelum is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with Caelum. If not, see <http://www.gnu.org/licenses/>. +*/ + +#ifndef CAELUMPREREQUISITES_H +#define CAELUMPREREQUISITES_H + +// Include external headers +#include "Ogre.h" + +// Define the dll export qualifier if compiling for Windows +#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32 + #ifdef CAELUM_LIB + #define DllExport __declspec (dllexport) + #else + #ifdef __MINGW32__ + #define DllExport + #else + #define DllExport __declspec (dllimport) + #endif + #endif +#else + #define DllExport +#endif + +// Define the version code +#define CAELUM_VERSION_MAIN 0 +#define CAELUM_VERSION_SEC 2 +#define CAELUM_VERSION_TER 1 +#define CAELUM_VERSION = (CAELUM_VERSION_MAIN << 16) | (CAELUM_VERSION_SEC << 8) | CAELUM_VERSION_TER + +namespace caelum { + /// Resource group name for caelum resources. + extern DllExport Ogre::String RESOURCE_GROUP_NAME; + + // Render group for caelum stuff + // It's best to have them all together + enum CaelumRenderQueueGroupId + { + CAELUM_RENDER_QUEUE_STARFIELD = Ogre::RENDER_QUEUE_SKIES_EARLY + 0, + CAELUM_RENDER_QUEUE_SKYDOME = Ogre::RENDER_QUEUE_SKIES_EARLY + 1, + CAELUM_RENDER_QUEUE_SUN = Ogre::RENDER_QUEUE_SKIES_EARLY + 2, + CAELUM_RENDER_QUEUE_CLOUDS = Ogre::RENDER_QUEUE_SKIES_EARLY + 3, + CAELUM_RENDER_QUEUE_GROUND_FOG = Ogre::RENDER_QUEUE_SKIES_EARLY + 4, + }; + + // Caelum needs a lot of precission for astronomical calculations. + // Very few calculations use it, and the precission IS required. + typedef double LongReal; +} + +// Log macro +#define LOG(msg) Ogre::LogManager::getSingleton().logMessage(msg); + +#endif //CAELUMPREREQUISITES_H Added: trunk/python-ogre/ThirdParty/caelum/SolarSystemModel.cpp =================================================================== --- trunk/python-ogre/ThirdParty/caelum/SolarSystemModel.cpp (rev 0) +++ trunk/python-ogre/ThirdParty/caelum/SolarSystemModel.cpp 2008-02-16 01:38:02 UTC (rev 568) @@ -0,0 +1,60 @@ +/* +This file is part of Caelum. +See http://www.ogre3d.org/wiki/index.php/Caelum + +Copyright (c) 2006-2008 Caelum team. See Contributors.txt for details. + +Caelum is free software: you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published +by the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +Caelum is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with Caelum. If not, see <http://www.gnu.org/licenses/>. +*/ + +#include "CaelumPrecompiled.h" +#include "SolarSystemModel.h" +#include "UniversalClock.h" +#include "Astronomy.h" + +using Ogre::Degree; +using Ogre::Radian; +using Ogre::Math; +using Ogre::Real; + +namespace caelum +{ + SolarSystemModel::SolarSystemModel ( + Ogre::Degree longitude, Ogre::Degree latitude): + mObserverLatitude(latitude), mObserverLongitude(longitude) + { + } + + const Ogre::Vector3 SolarSystemModel::getSunDirection (LongReal jday) + { + int fpmode = Astronomy::enterHighPrecissionFloatingPointMode (); + + // Horizontal spherical. + Degree azimuth; + Degree altitude; + Astronomy::getHorizontalSunPosition(jday, + getObserverLongitude(), getObserverLatitude(), + azimuth, altitude); + + // Ogre direction. + Ogre::Vector3 res; + res.x = Math::Sin (azimuth); // East + res.y = -Math::Sin (altitude); // Zenith + res.z = -Math::Cos (azimuth); // North + + Astronomy::restoreFloatingPointMode(fpmode); + + return res; + } +} Added: trunk/python-ogre/ThirdParty/caelum/SolarSystemModel.h =================================================================== --- trunk/python-ogre/ThirdParty/caelum/SolarSystemModel.h (rev 0) +++ trunk/python-ogre/ThirdParty/caelum/SolarSystemModel.h 2008-02-16 01:38:02 UTC (rev 568) @@ -0,0 +1,64 @@ +/* +This file is part of Caelum. +See http://www.ogre3d.org/wiki/index.php/Caelum + +Copyright (c) 2006-2008 Caelum team. See Contributors.txt for details. + +Caelum is free software: you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published +by the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +Caelum is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with Caelum. If not, see <http://www.gnu.org/licenses/>. +*/ + +#ifndef SOLARSYSTEMMODEL_H +#define SOLARSYSTEMMODEL_H + +#include "CaelumPrerequisites.h" + +namespace caelum +{ + /** Class which calculates sun and moon positions on the sky. + * Most of the calculations are done in the astronomy class. + */ + class DllExport SolarSystemModel + { + private: + Ogre::Degree mObserverLatitude; + Ogre::Degree mObserverLongitude; + + public: + /** Constructor, initializes observer's position on earth. + */ + SolarSystemModel ( + Ogre::Degree longitude = Ogre::Degree (0), + Ogre::Degree latitude = Ogre::Degree (45)); + + /// Get the observer's longitude. East is positive, west is negative. + inline const Ogre::Degree getObserverLongitude () const { return mObserverLongitude; } + + /// Set the observer's longitude. East is positive, west is negative. + inline void setObserverLongitude (Ogre::Degree value) { mObserverLongitude = value; } + + /// Get the observer's latitude. North is positive, south is negative. + inline const Ogre::Degree getObserverLatitude () const { return mObserverLatitude; } + + /// Set the observer's latitude. North is positive, south is negative. + inline void setObserverLatitude (Ogre::Degree value) { mObserverLatitude = value; } + + /** Get the sun's direction at a certain time. + * @param jday astronomical julian day. + * @see UniversalClock for julian day calculations. + */ + const Ogre::Vector3 getSunDirection (LongReal jday); + }; +} + +#endif // SOLARSYSTEMMODEL_H \ No newline at end of file Added: trunk/python-ogre/ThirdParty/nxogre/BetajaenCC.cpp =================================================================== --- trunk/python-ogre/ThirdParty/nxogre/BetajaenCC.cpp (rev 0) +++ trunk/python-ogre/ThirdParty/nxogre/BetajaenCC.cpp 2008-02-16 01:38:02 UTC (rev 568) @@ -0,0 +1,28 @@ +/* + +Betajaen's Container Classes + +Copyright (c) 2007 Robin Southern, http://www.nxogre.org + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +*/ + +#include "NxOgreStable.h" +#include "BetajaenCC.h" \ No newline at end of file Added: trunk/python-ogre/ThirdParty/nxogre/BetajaenCC.h =================================================================== --- trunk/python-ogre/ThirdParty/nxogre/BetajaenCC.h (rev 0) +++ trunk/python-ogre/ThirdParty/nxogre/BetajaenCC.h 2008-02-16 01:38:02 UTC (rev 568) @@ -0,0 +1,1654 @@ +/* + +Betajaen's Container Classes + +Copyright (c) 2007 Robin Southern, http://www.nxogre.org + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +*/ + +#ifndef BETAJAENS_CC_H +#define BETAJAENS_CC_H + +#include "NxOgrePlatform.h" +#include "NxOgreAllocator.h" + +// Configuration + +/** \brief Namespace to place the Containers in. Comment out if you want it in the global namespace. +*/ +#define BETAJAEN_CC_NAMESPACE Betajaen + + +/** \brief Enable debug comments. Set to zero to disable, 1 to enable +*/ +#define BETAJAEN_CC_DEBUG_COMMENTS 1 + + +/** \brief Export Class Macro, replace value with your export macro +*/ +#define BETAJAEN_CC_CLASS_EXPORT __declspec(dllexport) +#define BETAJAEN_CC_TEMPLATE_CLASS_EXPORT __forceinline +// #define BETAJAEN_CC_FUNCTION_EXPORT NxPublicFunction + +////////////////////////////////////////////////////////////////////////// + +#if (BETAJAEN_CC_DEBUG_COMMENTS == 1) +# include <stdio.h> +#endif + +#ifdef BETAJAEN_CC_NAMESPACE +# define BETAJAEN_CC_NAMESPACE_START namespace BETAJAEN_CC_NAMESPACE { +# define BETAJAEN_CC_NAMESPACE_END } +#else +# define BETAJAEN_CC_NAMESPACE_START /**/ +# define BETAJAEN_CC_NAMESPACE_END /**/ +#endif + +BETAJAEN_CC_NAMESPACE_START + +#if (BETAJAEN_CC_DEBUG_COMMENTS == 1) +# define BETAJAEN_CC_PRINT(x) printf(x "\n"); +# define BETAJAEN_CC_PRINTF(x, y) printf(x "\n",y); +#else +# define BETAJAEN_CC_PRINT(x) /* x */ +# define BETAJAEN_CC_PRINTF(x,y) /* x, y*/ +#endif + +#if (_MSC_VER>=1000) +# define BETAJAEN_CC_INLINE +// __forceinline +#else +# define BETAJAEN_CC_INLINE +//inline +#endif + +#ifndef BETAJAEN_CC_CLASS_EXPORT +# define BETAJAEN_CC_CLASS_EXPORT +#endif + +#ifndef BETAJAEN_CC_TEMPLATE_CLASS_EXPORT +# define BETAJAEN_CC_TEMPLATE_CLASS_EXPORT +#endif + +#ifndef BETAJAEN_CC_FUNCTION_EXPORT +# define BETAJAEN_CC_FUNCTION_EXPORT +#endif + +BETAJAEN_CC_NAMESPACE_END + +////////////////////////////////////////////////////////////////////////// + +BETAJAEN_CC_NAMESPACE_START +class SharedAllocator; + +template <class TypePtr, class AllocatorType = SharedAllocator> class Flat; + +template <class BaseType, class AllocatorType = SharedAllocator> class SharedList; +template <typename IdentifierType, class BaseType, class AllocatorType = SharedAllocator> class SharedMap; +template <typename IdentifierType, class TypePtr> class Tree; +template <typename> class Vector2; +template <typename> class Vector3; +template <typename> class Vector4; + +BETAJAEN_CC_NAMESPACE_END + +////////////////////////////////////////////////////////////////////////// + +BETAJAEN_CC_NAMESPACE_START + +class BETAJAEN_CC_CLASS_EXPORT SharedAllocator { + +public: + +///////////////////////////////////////////////////////////// + +void* Allocate(size_t size) +{ + return malloc(size); +} + +///////////////////////////////////////////////////////////// + +void Deallocate(void* mem) +{ + if (mem) + free(mem); +} + +///////////////////////////////////////////////////////////// + +void* Reallocate(void* mem, size_t size) +{ + return realloc(mem, size); +} + +///////////////////////////////////////////////////////////// + +}; // End of the SharedAllocator class. + +BETAJAEN_CC_NAMESPACE_END + +////////////////////////////////////////////////////////////////////////// + +BETAJAEN_CC_NAMESPACE_START + +template + < + class Type, + class AllocatorType + > +class BETAJAEN_CC_CLASS_EXPORT Flat +{ + +public: + +typedef Type * Iterator; +typedef AllocatorType* AllocatorPtr; + +///////////////////////////////////////////////////////////// + +BETAJAEN_CC_INLINE Flat(AllocatorPtr allocator, bool deleteAllocator) + : First(NULL), Last(NULL), End(NULL), Allocator(allocator), AutoDeleteAllocator(deleteAllocator) +{ +} + +///////////////////////////////////////////////////////////// + +BETAJAEN_CC_INLINE ~Flat() +{ + _deallocate(First); + if (AutoDeleteAllocator) + delete Allocator; +} + +///////////////////////////////////////////////////////////// + +BETAJAEN_CC_INLINE unsigned int _size() const +{ + return (unsigned int) (Last - First); +} + +///////////////////////////////////////////////////////////// + +BETAJAEN_CC_INLINE unsigned int _capacity() const +{ + return (unsigned int) (First == 0 ? 0 : End - First); +} + +///////////////////////////////////////////////////////////// + +BETAJAEN_CC_INLINE Type* _allocate(unsigned int size) +{ + return (Type*) Allocator->Allocate(size * sizeof(Type)); +} + +///////////////////////////////////////////////////////////// + +BETAJAEN_CC_INLINE void _deallocate(Type* p) +{ + if (p) + Allocator->Deallocate(p); +} + +///////////////////////////////////////////////////////////// + +BETAJAEN_CC_INLINE Iterator _reallocate(Iterator p, unsigned int size) +{ + return (Iterator) Allocator->Reallocate(p, size * sizeof(Type)); +} + +///////////////////////////////////////////////////////////// + +BETAJAEN_CC_INLINE void _clip(unsigned int size) +{ + + if (size < _size()) + return; + + Iterator new_first = _allocate(size); + _copy(First, Last, new_first); + _destroy(First, Last); + _deallocate(First); + End = new_first + size; + Last = new_first + _size(); + First = new_first; + +} + +///////////////////////////////////////////////////////////// + +BETAJAEN_CC_INLINE void _reserve(unsigned int new_size) +{ + if (_capacity() >= new_size) + return; + + Iterator new_first = _allocate(new_size); + _copy(First, Last, new_first); + _destroy(First, Last); + _deallocate(First); + End = new_first + new_size; + Last = new_first + _size(); + First = new_first; + +} + +///////////////////////////////////////////////////////////// + +BETAJAEN_CC_INLINE Iterator _copy(Iterator begin, Iterator end, Iterator dest) +{ + for (;begin != end; ++dest, ++begin) + *dest = *begin; + return dest; +} + +///////////////////////////////////////////////////////////// + +BETAJAEN_CC_INLINE void _delete_range(Iterator begin, Iterator end) +{ + for (; begin != end; ++begin) { + {::NxOgre::Allocator::getPtr()->watch_delete(static_cast<void*>(*begin));}; + delete *begin; + /** NxOgre Remove*/ // delete *begin; + } +} + +///////////////////////////////////////////////////////////// + +BETAJAEN_CC_INLINE void _destroy(Iterator begin, Iterator end) +{ + for (; begin != end; ++begin) { + /** NxOgre */ ::NxOgre::Allocator::getPtr()->watch_delete(begin); + begin->~Type(); + } +} + +///////////////////////////////////////////////////////////// + +private: AllocatorPtr Allocator; +private: bool AutoDeleteAllocator; +public: Iterator First, Last, End; + +}; // End of Flat<Type,AllocatorType> class. + +BETAJAEN_CC_NAMESPACE_END + +////////////////////////////////////////////////////////////////////////// + +BETAJAEN_CC_NAMESPACE_START + +/** \brief A list of pointers with garbage collections and the ability to + share the same list with similar lists. Like STL's Vector. + + \example + <code> + class A; + + SharedList<A> aList; + a.Insert(new A()); + a.Remove(a.Last); + </code> + +*/ +template + < + class Type, /* Class to Store; A, myClassName, etc. */ + class AllocatorType /* Allocator to use, or leave blank for SharedAllocator */ + > +class BETAJAEN_CC_CLASS_EXPORT SharedList { + +public: + +typedef Type* TypePtr; +typedef TypePtr* Iterator; +typedef SharedList<Type, AllocatorType> SharedListType; +typedef Flat<TypePtr, AllocatorType> FlatType; +typedef FlatType* FlatPtr; + +///////////////////////////////////////////////////////////// + +enum AbsolutePosition +{ + First, + Last +}; + +/** + Constructor with optional custom allocator +*/ +BETAJAEN_CC_INLINE SharedList(AllocatorType* _allocator = NULL, bool _auto_delete_allocator = true) +{ + if (_allocator == NULL) + _allocator = new AllocatorType(); + + _Flat = new FlatType(_allocator, _auto_delete_allocator); + _Usage = new unsigned int(1); + +} + +/** \brief Copy Constructor between SharedList's. The Flat will not be copied but referenced. + Any action on this list will effect all lists using the same Flat. Clean up will only + happen on the destruction of the last surviving list. + + \example + <code> + typedef SharedList<A> AList; + AList a; + AList b(a); + </code> +*/ +BETAJAEN_CC_INLINE SharedList(const SharedListType& other) +{ + + _Flat = other._Flat; + _Usage = other._Usage; + ++(*_Usage); + +} + + +/** \brief Copy Operator. Functions the same as Copy Constructor but deletes the set that this + may already have. + + \example + <code> + typedef SharedList<A> AList; + AList a; + AList b; + b = a; + </code> +*/ +BETAJAEN_CC_INLINE SharedListType& operator=(const SharedListType& other) +{ + + if (_Flat) + { + _Flat->_delete_range(_Flat->First, _Flat->Last); + delete _Flat; + } + + if (_Usage) + delete _Usage; + + _Flat = other._Flat; + _Usage = other._Usage; + ++(*_Usage); + + return *this; + +} + + +/** \brief Destructor. If this is the last of all SharedLists sharing the same set, + the set will be destroyed otherwise the Flat will be ignored and this SharedList + dies gracefully. +*/ +BETAJAEN_CC_INLINE ~SharedList() +{ + + if (--(*_Usage) == 0) + { + _Flat->_delete_range(_Flat->First, _Flat->Last); + delete _Flat; + delete _Usage; + } + +} + + +/** \brief Gets the pointer to the nth Type in the list. Alternate interface to operator[]. +*/ +BETAJAEN_CC_INLINE TypePtr Get(size_t pos) +{ + if (pos > Size()) + return NULL; + + return *(_Flat->First + pos); +} + + +/** \brief Gets the pointer to the nth TypePtr in the list. +*/ +BETAJAEN_CC_INLINE TypePtr operator[](size_t pos) +{ + if (pos > Size()) + return NULL; + + return *(_Flat->First + pos); +} + + +/** \brief Where is something in the list. +*/ +BETAJAEN_CC_INLINE unsigned int WhereIs(TypePtr ptr) +{ + + if (_Flat->_size() == 0) + return 0; + + unsigned int i=0; + for(Iterator begin = _Flat->First; begin != _Flat->Last; ++begin, ++i) + { + if (ptr == (*begin)) + return i; + } + + return 0; +} + +BETAJAEN_CC_INLINE bool Has(TypePtr ptr) +{ + + if (_Flat->_size() == 0) + return false; + + for(Iterator begin = _Flat->First; begin != _Flat->Last; ++begin) + { + if (ptr == (*begin)) + return true; + } + + return false; + +} + +/** \brief The size of the SharedList. +*/ +BETAJAEN_CC_INLINE unsigned Size() const +{ + return _Flat->_size(); +} + + +/** \brief Insert something into the list +*/ +BETAJAEN_CC_INLINE void Insert(const TypePtr& val) +{ + + if (_Flat->End <= _Flat->Last) + _Flat->_reserve( (1 + Size()) * 2); + + *_Flat->Last = val; + _Flat->Last++; + +} + + +/** \brief Resize the capacity of the list to size + n. +*/ +BETAJAEN_CC_INLINE void Clean(unsigned int n = 4) +{ + _Flat->_clip(_Flat->_size() + n); +} + + +/** \brief Destroy something nth position into the list. +*/ +BETAJAEN_CC_INLINE void Destroy(unsigned int n) +{ + if (n == 0) + return Destroy(First); + + if (n == Size()) + return Destroy(Last); + + delete *(_Flat->First + n); + + _Flat->_destroy(_Flat->First + n, _Flat->First + n + 1); + _Flat->_copy(_Flat->First + n + 1, _Flat->Last, _Flat->First + n); + _Flat->Last--; + +} + +// \brief Destroys everything +// +BETAJAEN_CC_INLINE void DestroyAll() +{ + if (Size() == 0) + return; + + _Flat->_delete_range(_Flat->First, _Flat->Last); + // Could be iffy. + _Flat->Last = _Flat->First; + +} + +/** \brief Destroys something in the list based on the pointer in the list. +*/ +BETAJAEN_CC_INLINE void Destroy(TypePtr val) { + unsigned int i = WhereIs(val); + Destroy(i); +} + +/** \brief Deletes something from the list based on AbsolutePosition +*/ +BETAJAEN_CC_INLINE void Destroy(AbsolutePosition position) +{ + + switch(position) { + + case First: + { + delete *_Flat->First; + _Flat->_copy(_Flat->First + 1, _Flat->Last + 1, _Flat->First); + _Flat->Last--; + } + break; + + case Last: + { + _Flat->Last--; + delete *_Flat->Last; + } + break; + + } + +} + + +/** \brief Removes something from the list based on numerical position. +*/ +BETAJAEN_CC_INLINE TypePtr Remove(unsigned int n) +{ + + if (n == 0) + return Remove(First); + + if (n == Size()) + return Remove(Last); + + TypePtr ptr = Get(n); + _Flat->_destroy(_Flat->First + n, _Flat->First + n + 1); + _Flat->_copy(_Flat->First + n + 1, _Flat->Last, _Flat->First + n); + _Flat->Last--; + + return ptr; +} + + +/** \brief Removes something from the list based on AbsolutePosition +*/ +BETAJAEN_CC_INLINE TypePtr Remove(AbsolutePosition position) +{ + + if (_Flat->_size() == 0) + return NULL; + + switch(position) { + + case First: + { + TypePtr t = *(_Flat->First); + _Flat->_copy(_Flat->First + 1, _Flat->Last + 1, _Flat->First); + _Flat->Last--; + return t; + } + + break; + + case Last: + { + _Flat->Last--; + return *(_Flat->Last); + } + break; + } + + return NULL; + +} + + +/** \brief Places the Iterator at the beginning of the List +*/ +BETAJAEN_CC_INLINE TypePtr Begin() +{ + + if (_Flat->_size() == 0) + return NULL; + + _Iterator = _Flat->First; + return *_Iterator; + +} + + +/** \brief Advances the Iterator forward by one, and returns the value of the list or NULL + \returns The next item in the list, or NULL if it has reached the end of it. +*/ +BETAJAEN_CC_INLINE TypePtr Next() +{ + + if (_Flat->_size() == 0) + return NULL; + else if (_Iterator == _Flat->Last) + return NULL; + else + return (*_Iterator++); + +} + + +/** \brief Places the iterator at the end of the List +*/ +BETAJAEN_CC_INLINE TypePtr End() +{ + + if (_Flat->_size() == 0) + return NULL; + + _Iterator = _Flat->Last - 1; + return *_Iterator; + +} + + +/** \brief Advances the Iterator backwards by one, and returns the value of the list or NULL + \returns The previous item in the list, or NULL if it has reached the beginning of it. +*/ +BETAJAEN_CC_INLINE TypePtr Previous() +{ + + if (_Flat->_size() == 0) + return NULL; + else if (_Iterator == _Flat->First - 1) + return NULL; + else + return (*_Iterator--); + +} + +/** \brief For each item in the list call it's own method. +*/ +BETAJAEN_CC_INLINE void Each(void (Type::*MethodPtr)()) { + + if (_Flat->_size() == 0) + return; + + for(Iterator begin = _Flat->First; begin != _Flat->Last; ++begin) { + (*begin->*MethodPtr)(); + } + +} + + +/** \brief For each item in the list call it's own method, with one argument. +*/ +template <typename _A> +BETAJAEN_CC_INLINE void Each(void (Type::*MethodPtr)(_A), _A _1) { + + if (_Flat->_size() == 0) + return; + + for(Iterator begin = _Flat->First; begin != _Flat->Last; ++begin) { + (*begin->*MethodPtr)(_1); + } + +} + + +/** \brief For each item in the list call it's own method, with two arguments. +*/ +template <typename _A, typename _B> +BETAJAEN_CC_INLINE void Each(void (Type::*MethodPtr)(_A, _B), _A _1, _B _2) { + + if (_Flat->_size() == 0) + return; + + for(Iterator begin = _Flat->First; begin != _Flat->Last; ++begin) + (*begin->*MethodPtr)(_1, _2); + +} + + +/** \brief For each item in the list call it's own method, with three arguments. +*/ +template <typename _A, typename _B, typename _C> +BETAJAEN_CC_INLINE void Each(void (Type::*MethodPtr)(_A, _B, _C), _A _1, _B _2, _C _3) { + + if (_Flat->_size() == 0) + return; + + for(Iterator begin = _Flat->First; begin != _Flat->Last; ++begin) + (*begin->*MethodPtr)(_1, _2, _3); + +} + + +/** \brief For each item in the list call it's own method, with four arguments. +*/ +template <typename _A, typename _B, typename _C, typename _D> +BETAJAEN_CC_INLINE void Each(void (Type::*MethodPtr)(_A, _B, _C, _D), _A _1, _B _2, _C _3, _D _4) { + + if (_Flat->_size() == 0) + return; + + for(Iterator begin = _Flat->First; begin != _Flat->Last; ++begin) + (*begin->*MethodPtr)(_1, _2, _3, _4); + +} + + +/** \brief For each item in the list call it's own method, with five arguments. +*/ +template <typename _A, typename _B, typename _C, typename _D, typename _E> +BETAJAEN_CC_INLINE void Each(void (Type::*MethodPtr)(_A, _B, _C, _D), _A _1, _B _2, _C _3, _D _4, _E _5) { + + if (_Flat->_size() == 0) + return; + + for(Iterator begin = _Flat->First; begin != _Flat->Last; ++begin) + (*begin->*MethodPtr)(_1, _2, _3, _4, _5); + +} + + +/** \brief For each item in the list call it's own method, with six arguments. +*/ +template <typename _A, typename _B, typename _C, typename _D, typename _E, typename _F> +BETAJAEN_CC_INLINE void Each(void (Type::*MethodPtr)(_A, _B, _C, _D), _A _1, _B _2, _C _3, _D _4, _E _5, _F _6) { + + if (_Flat->_size() == 0) + return; + + for(Iterator begin = _Flat->First; begin != _Flat->Last; ++begin) + (*begin->*MethodPtr)(_1, _2, _3, _4, _5, _6); + +} + + +/** \brief For each item in the list call it's own method, with seven arguments. +*/ +template <typename _A, typename _B, typename _C, typename _D, typename _E, typename _F, typename _G> +BETAJAEN_CC_INLINE void Each(void (Type::*MethodPtr)(_A, _B, _C, _D), _A _1, _B _2, _C _3, _D _4, _E _5, _F _6, _G _7) { + + if (_Flat->_size() == 0) + return; + + for(Iterator begin = _Flat->First; begin != _Flat->Last; ++begin) + (*begin->*MethodPtr)(_1, _2, _3, _4, _5, _6, _7); + +} + + +/** \brief For each item in the list call it's own method, with eight arguments. +*/ +template <typename _A, typename _B, typename _C, typename _D, typename _E, typename _F, typename _G, typename _H> +BETAJAEN_CC_INLINE void Each(void (Type::*MethodPtr)(_A, _B, _C, _D), _A _1, _B _2, _C _3, _D _4, _E _5, _F _6, _G _7, _H _8) { + + if (_Flat->_size() == 0) + return; + + for(Iterator begin = _Flat->First; begin != _Flat->Last; ++begin) + (*begin->*MethodPtr)(_1, _2, _3, _4, _5, _6, _7, _8); + +} + +/** \brief Returns the pointer to the working set. +*/ +BETAJAEN_CC_INLINE FlatPtr getFlat() const { + return _Flat; +} + + +/** \brief Returns the number of SharedLists using this set. +*/ +BETAJAEN_CC_INLINE unsigned int getUsageCount() const { + return *_Usage; +} + + +private: unsigned int* _Usage; +private: FlatPtr _Flat; +private: Iterator _Iterator; + +}; // End of SharedList<Type, AllocatorType> Class. + +BETAJAEN_CC_NAMESPACE_END + +////////////////////////////////////////////////////////////////////////// + +BETAJAEN_CC_NAMESPACE_START + + +/** \brief Binary Tree with variable identifer and storage type. + +*/ +template <typename NodeIdentifier, class Type> +class BETAJAEN_CC_CLASS_EXPORT Tree +{ + // Much of this Tree was from the excellent tutorial by Julienne Walker + // http://eternallyconfuzzled.com/tuts/datastructures/jsw_tut_bst1.aspx + +public: + +class Node; +typedef Node* NodePtr; +typedef Type* TypePtr; + +/** \brief A tree is made up of nodes. +*/ +class BETAJAEN_CC_CLASS_EXPORT Node +{ + +public: + +Node(NodeIdentifier id, TypePtr val) : _ID(id), _Val(val) +{ + _Children[0] = NULL; + _Children[1] = NULL; +} + +void Replace(Node* n) +{ + _ID = n->_ID; + _Val = n->_Val; +} + +NodeIdentifier _ID; +TypePtr _Val; +NodePtr _Children[2]; + +}; + + +/** \brief Tree constructor +*/ +public: BETAJAEN_CC_INLINE Tree() : _Root(NULL) +{ +} + + +/** \brief Tree destructor. + \note Does not remove or destroy the contents of the tree. +*/ +public: BETAJAEN_CC_INLINE ~Tree() +{ +} + + +/** \brief Destroys all the nodes in the tree and deletes all of the values referenced in it. +*/ +public: BETAJAEN_CC_INLINE void DestroyAll() +{ + + NodePtr iterator = _Root; + NodePtr save = 0; + + while (iterator != NULL) + { + if (iterator->_Children[0] != NULL) + { + save = iterator->_Children[0]; + iterator->_Children[0] = save->_Children[1]; + save->_Children[1] = iterator; + } + else + { + save = iterator->_Children[1]; + delete iterator->_Val; + delete iterator; + } + + iterator = save; + } + +} + + +/** \brief Destroys all the nodes in the tree, but not all of the values referenced in it. +*/ +public: BETAJAEN_CC_INLINE void RemoveAll() +{ + NodePtr iterator = _Root; + NodePtr save = 0; + + while (iterator != NULL) + { + if (iterator->_Children[0] != NULL) + { + save = iterator->_Children[0]; + iterator->_Children[0] = save->_Children[1]; + save->_Children[1] = iterator; + } + else + { + save = iterator->_Children[1]; + delete iterator; + } + + iterator = save; + } + +} + + +/** \brief Remove a Node based of an identifier +*/ +public: BETAJAEN_CC_INLINE void Remove(NodeIdentifier id) +{ + + if (_Root == NULL) + return; + + Node head = {0}; + NodePtr iterator = &head; + NodePtr *f = 0, *p = 0; + int direction = 1; + + iterator->_Children[1] = _Root; + + //while (iterator = + +} + + + +/** \brief Removes a ranges of nodes based on max. and min. identifiers. + \note This operates based on the "operator <" of the TypeIdentifier the class, + which defines if the type is in the range or not. Types such as ints, or reals + aren't a problem but things like strings or complicated classes may produce + strange results. +*/ +public: BETAJAEN_CC_INLINE void RemoveRange(NodeIdentifier id_min, NodeIdentifier id_max) +{ + + +} + + +/** +*/ +public: BETAJAEN_CC_INLINE void Destroy(NodeIdentifier id) +{ + +} + + +/** +*/ +public: BETAJAEN_CC_INLINE void DestroyRange(NodeIdentifier id_min, NodeIdentifier id_max) +{ + +} + + +/** +*/ +public: BETAJAEN_CC_INLINE TypePtr Find(NodeIdentifier target) +{ + NodePtr iterator = _Root; + while (iterator != NULL) + { + if (iterator->_ID == target) + { + return iterator->_Val; + } + else + { + iterator = iterator->_Children[int(iterator->_ID < target)]; + } + } + + return 0; +} + + +/** +*/ +public: BETAJAEN_CC_INLINE bool Insert(NodeIdentifier target, TypePtr val) +{ + Node* node = new Node(target, val); + + + if (_Root == NULL) + { + _Root = node; + return true; + } + else + { + Node* iterator = _Root; + unsigned int direction; + + for ( ; ; ) + { + direction = iterator->_ID < target; + + if (iterator->_ID == target) + { + delete node; + return false; + } + else if (iterator->_Children[direction] == NULL) + break; + + + iterator = iterator->_Children[direction]; + } + + iterator->_Children[direction] = node; + } + + return true; +} + +private: NodePtr _Root; + +}; + +BETAJAEN_CC_NAMESPACE_END + +////////////////////////////////////////////////////////////////////////// + +BETAJAEN_CC_NAMESPACE_START + +template < + typename IdentifierType, + class Type, + class AllocatorType + > +class BETAJAEN_CC_CLASS_EXPORT SharedMap +{ + +public: + +typedef Type* TypePtr; +typedef Tree<IdentifierType, Type> TreeType; +typedef TreeType* TreePtr; + + +///////////////////////////////////////////////////////////// + +BETAJAEN_CC_INLINE SharedMap() +{ + _Tree = new TreeType(); +} + +///////////////////////////////////////////////////////////// + +BETAJAEN_CC_INLINE ~SharedMap() +{ + _Tree->DestroyAll(); + delete _Tree; +} + +///////////////////////////////////////////////////////////// + +BETAJAEN_CC_INLINE TypePtr Get(IdentifierType identifier) +{ + return _Tree->Find(identifier); +} + +///////////////////////////////////////////////////////////// + +BETAJAEN_CC_INLINE TypePtr operator[](IdentifierType identifier) +{ + return _Tree->Find(identifier); +} + +///////////////////////////////////////////////////////////// + +BETAJAEN_CC_INLINE void Insert(IdentifierType identifier, TypePtr ptr) +{ + _Tree->Insert(identifier, ptr); +} + +///////////////////////////////////////////////////////////// + +BETAJAEN_CC_INLINE void DestroyAll() +{ + +} + +///////////////////////////////////////////////////////////// + +BETAJAEN_CC_INLINE void RemoveAll() +{ + +} + +///////////////////////////////////////////////////////////// + +BETAJAEN_CC_INLINE void Destroy(IdentifierType) +{ + +} + +///////////////////////////////////////////////////////////// + +BETAJAEN_CC_INLINE void Remove(IdentifierType) +{ + +} + +///////////////////////////////////////////////////////////// + +BETAJAEN_CC_INLINE TypePtr Begin() +{ + +} + +///////////////////////////////////////////////////////////// + +BETAJAEN_CC_INLINE TypePtr Next() +{ + +} + +///////////////////////////////////////////////////////////// + +BETAJAEN_CC_INLINE TypePtr End() +{ + +} + +///////////////////////////////////////////////////////////// + +BETAJAEN_CC_INLINE TypePtr Previous() +{ + +} + +///////////////////////////////////////////////////////////// + +BETAJAEN_CC_INLINE void Each(void (Type::*MethodPtr)()) +{ + +} + +///////////////////////////////////////////////////////////// + +BETAJAEN_CC_INLINE TreePtr getTree() const +{ + return _Tree; +} + +///////////////////////////////////////////////////////////// + +BETAJAEN_CC_INLINE unsigned int getUsage() const +{ + return *_Usage; +} + +///////////////////////////////////////////////////////////// + +private: TreePtr _Tree; +private: unsigned int* _Usage; + +///////////////////////////////////////////////////////////// + +}; + +BETAJAEN_CC_NAMESPACE_END + +////////////////////////////////////////////////////////////////////////// + +BETAJAEN_CC_NAMESPACE_START + +/** \brief Vector with two rows. +*/ +template < + typename Type + > +class BETAJAEN_CC_CLASS_EXPORT Vector2 +{ + +public: + +typedef Vector2<Type> ThisType; + +/* \brief First */ +Type i; + +/* \brief Second */ +Type j; + +BETAJAEN_CC_INLINE Vector2() +{ +} + +BETAJAEN_CC_INLINE Vector2(Type _i, Type _j) +: i(_i), j(_j) +{ +} + +BETAJAEN_CC_INLINE void swap(ThisType& other) +{ + Type First = i, Second = j; + i = other.i; other.i = First; + j = other.j; other.j = Second; +} + +BETAJAEN_CC_INLINE ThisType& operator = (const ThisType& other) +{ + i = other.i; j = other.j; + return *this; +} + +BETAJAEN_CC_INLINE ThisType& operator = (const Type& other) +{ + i = other; j = other; + return *this; +} + +BETAJAEN_CC_INLINE ThisType& operator *= (const Type& other) +{ + i *= other; j *= other; +} + +BETAJAEN_CC_INLINE ThisType& operator *= (const ThisType& other) +{ + i *= other.i; j *= other.j; +} + +BETAJAEN_CC_INLINE bool operator == (const ThisType& other) const +{ + return (i == other.i && j == other.j); +} + +BETAJAEN_CC_INLINE bool operator != (const ThisType& other) const +{ + return (i != other.i || j != other.j); +} + +}; + +BETAJAEN_CC_NAMESPACE_END + +////////////////////////////////////////////////////////////////////////// + +BETAJAEN_CC_NAMESPACE_START + +/** \brief Vector with three rows. +*/ +template < + typename Type + > +class BETAJAEN_CC_CLASS_EXPORT Vector3 +{ + +public: + +typedef Vector3<Type> ThisType; + +/* \brief First */ +Type i; + +/* \brief Second */ +Type j; + +/* \brief Third */ +Type k; + + +BETAJAEN_CC_INLINE Vector3() +{ +} + +BETAJAEN_CC_INLINE Vector3(Type _i, Type _j, Type _k) +: i(_i), j(_j), k(_k) +{ +} + +BETAJAEN_CC_INLINE void swap(ThisType& other) +{ + Type First = i, Second = j, Third = k; + i = other.i; other.i = First; + j = other.j; other.j = Second; + k = other.k; other.k = Third; +} + +BETAJAEN_CC_INLINE ThisType& operator = (const ThisType& other) +{ + i = other.i; j = other.j; k = other.k; + return *this; +} + +BETAJAEN_CC_INLINE ThisType& operator = (const Type& other) +{ + i = other; j = other; k = other; + return *this; +} + +BETAJAEN_CC_INLINE ThisType& operator *= (const Type& other) +{ + i *= other; j *= other; k *= other; +} + +BETAJAEN_CC_INLINE ThisType& operator *= (const ThisType& other) +{ + i *= other.i; j *= other.j; k *= other.k; +} + +BETAJAEN_CC_INLINE bool operator == (const ThisType& other) const +{ + return (i == other.i && j == other.j && k == other.k); +} + +BETAJAEN_CC_INLINE bool operator != (const ThisType& other) const +{ + return (i != other.i || j != other.j || k != other.k); +} + +}; + +BETAJAEN_CC_NAMESPACE_END + +////////////////////////////////////////////////////////////////////////// + +BETAJAEN_CC_NAMESPACE_START + +/** \brief Vector with four rows. +*/ +template < + typename Type + > +class BETAJAEN_CC_CLASS_EXPORT Vector4 { + +public: + +typedef Vector4<Type> ThisType; + +/* \brief First */ +Type i; + +/* \brief Second */ +Type j; + +/* \brief Third */ +Type k; + +/* \brief Fourth */ +Type l; + +BETAJAEN_CC_INLINE Vector4() +{ +} + +BETAJAEN_CC_INLINE Vector4(Type _i, Type _j, Type _k, Type _l) +: i(_i), j(_j), k(_k), l(_l) +{ +} + +BETAJAEN_CC_INLINE void swap(ThisType& other) +{ + Type First = i, Second = j, Third = k, Fourth = l; + i = other.i; other.i = First; + j = other.j; other.j = Second; + k = other.k; other.k = Third; + l = other.l; other.l = Fourth; +} + +BETAJAEN_CC_INLINE ThisType& operator = (const ThisType& other) { + i = other.i; j = other.j; k = other.k; l = other.l; + return *this; +} + +BETAJAEN_CC_INLINE ThisType& operator *= (const Type& other) +{ + i *= other; j *= other; k *= other; l *= other +} + +BETAJAEN_CC_INLINE ThisType& operator *= (const ThisType& other) +{ + i *= other.i; j *= other.j; k *= other.k; l *= other.l; +} + +BETAJAEN_CC_INLINE bool operator == (const ThisType& other) const { + return (i == other.i && j == other.j && k == other.k && l == other.l); +} + +BETAJAEN_CC_INLINE bool operator != (const ThisType& other) const { + return (i != other.i || j != other.j || k != other.k || l != other.l); +} + +}; + +BETAJAEN_CC_NAMESPACE_END + +////////////////////////////////////////////////////////////////////////// + +BETAJAEN_CC_NAMESPACE_START + +template <typename Type> +class BETAJAEN_CC_CLASS_EXPORT Vector { + + public: + typedef Type* TypePtr; + + TypePtr j; + unsigned int jSize; + + Vector(unsigned int j_size) + { + + } + + ~Vector() + { + + } + +}; + +BETAJAEN_CC_NAMESPACE_END + +////////////////////////////////////////////////////////////////////////// +#if 0 +BETAJAEN_CC_NAMESPACE_START + +template <typename Type> +class BETAJAEN_CC_TEMPLATE_CLASS_EXPORT Matrix { + +public: + typedef Type* TypePtr; + + TypePtr ij; + unsigned int iSize, + jSize; + + class MatrixIterator { + public: + + enum IteratorRole { + IR_COLUMN, + IR_ROW + }; + + MatrixIterator(Matrix* _matrix, IteratorRole _role, unsigned int _iterator = 0) + mMatrix(_matrix), mRole(_role), mIterator(_iterator) + { + } + + Ma... [truncated message content] |
From: <and...@us...> - 2008-02-16 01:30:30
|
Revision: 567 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=567&view=rev Author: andy_miller Date: 2008-02-15 17:30:37 -0800 (Fri, 15 Feb 2008) Log Message: ----------- Updates for 1.2 release. Phyxs now exposes free functions so should be usable standalone Bug in common utilities where free functions weren't bein processes for return pointer checking or functional transformation Modified Paths: -------------- trunk/python-ogre/code_generators/common_utils/__init__.py 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 Removed Paths: ------------- trunk/python-ogre/code_generators/physx/1 Modified: trunk/python-ogre/code_generators/common_utils/__init__.py =================================================================== --- trunk/python-ogre/code_generators/common_utils/__init__.py 2008-02-16 01:21:27 UTC (rev 566) +++ trunk/python-ogre/code_generators/common_utils/__init__.py 2008-02-16 01:30:37 UTC (rev 567) @@ -196,66 +196,65 @@ -def Auto_Functional_Transformation ( mb, ignore_funs=[], special_vars=[], prefix_output=['get','is','calc','suggest'] ): - for fun in mb.member_functions(): - fullname = fun.demangled.split('(')[0] - if fullname not in ignore_funs and not fun.ignore: - arg_position = 0 - trans=[] - desc="" -# print "Checking", fun.decl_string - for arg in fun.arguments: - rawarg = declarations.remove_declarated( - declarations.remove_const( - declarations.remove_reference( - declarations.remove_pointer ( arg.type )))) - -# print fun.name, arg.type.decl_string, rawarg - - ## now check if the arg is a fundemental type (int float etc), a void - ## or a special .. - if declarations.is_arithmetic (rawarg)\ - or declarations.is_void(rawarg)\ - or arg.type.decl_string in special_vars: -# print "Auto:", arg.type.decl_string," is_integral|floating|void|special|" - if declarations.is_pointer(arg.type): #we convert any pointers to unsigned int's -# print "Pointer" - trans.append( ft.modify_type(arg_position,_ReturnUnsignedInt ) ) - desc = desc +"Argument: "+arg.name+ "( pos:" + str(arg_position) + " - " +\ - arg.type.decl_string + " ) takes a CTypes.addressof(xx). \\n" -# print fullname,"Ctype Mod for ", arg.name, arg.type.decl_string - elif declarations.is_reference(arg.type): -# print "Ref" - matched = False - for pre in prefix_output: # functions whose name starts in the list are consider output only - if fun.name.startswith (pre): - matched = True - trans.append( ft.output(arg_position ) ) - desc = desc +"Argument: "+arg.name+ "( pos:" + str(arg_position) + " - " +\ - arg.type.decl_string + " ) converted to an output only (no longer an input argument).\\n" - # print fullname," ft.output ", arg.name, arg.type.decl_string - if not matched: # otherwise a function is converted using inout - trans.append( ft.inout(arg_position ) ) - desc = desc + "Argument: "+arg.name+ "( pos:" + str(arg_position) + " - " +\ - arg.type.decl_string + " ) converted to an input/output (change to return types).\\n" -# print fullname," ft.inout ", arg.name, arg.type.decl_string +def Auto_Functional_Transformation ( mb, ignore_funs=[], special_vars=[], prefix_output=['get','is','calc','suggest'] ): + toprocess = [] + for fun in mb.member_functions(allow_empty=True): + toprocess.append( fun ) + for fun in mb.free_functions(allow_empty=True): + toprocess.append( fun ) + + for fun in toprocess: + try: # ugly wrapping in a try :( + fullname = fun.demangled.split('(')[0] + if fullname not in ignore_funs and not fun.ignore: + arg_position = 0 + trans=[] + desc="" + for arg in fun.arguments: + rawarg = declarations.remove_declarated( + declarations.remove_const( + declarations.remove_reference( + declarations.remove_pointer ( arg.type )))) + + + ## now check if the arg is a fundemental type (int float etc), a void + ## or a special .. + if declarations.is_arithmetic (rawarg)\ + or declarations.is_void(rawarg)\ + or arg.type.decl_string in special_vars: + if declarations.is_pointer(arg.type): #we convert any pointers to unsigned int's + trans.append( ft.modify_type(arg_position,_ReturnUnsignedInt ) ) + desc = desc +"Argument: "+arg.name+ "( pos:" + str(arg_position) + " - " +\ + arg.type.decl_string + " ) takes a CTypes.addressof(xx). \\n" + elif declarations.is_reference(arg.type): + matched = False + for pre in prefix_output: # functions whose name starts in the list are consider output only + if fun.name.startswith (pre): + matched = True + trans.append( ft.output(arg_position ) ) + desc = desc +"Argument: "+arg.name+ "( pos:" + str(arg_position) + " - " +\ + arg.type.decl_string + " ) converted to an output only (no longer an input argument).\\n" + if not matched: # otherwise a function is converted using inout + trans.append( ft.inout(arg_position ) ) + desc = desc + "Argument: "+arg.name+ "( pos:" + str(arg_position) + " - " +\ + arg.type.decl_string + " ) converted to an input/output (change to return types).\\n" + else: + pass else: pass -# print "Not Handled" - else: - pass -# print "Not valid to process" - arg_position += 1 - if trans: - if fun.documentation: # it's already be tweaked: - print "AUTOFT ERROR: Duplicate Tranforms.", fun - elif fun.virtuality == "pure virtual": - print "AUTOFT WARNING: PURE VIRTUAL function requires tranform.", fun - else: - print "AUTOFT OK: Tranformed ", fun - fun.add_transformation ( * trans , **{"alias":fun.name} ) - fun.documentation = docit ("Auto Modified Arguments:", - desc, "...") + arg_position += 1 + if trans: + if fun.documentation: # it's already be tweaked: + print "AUTOFT ERROR: Duplicate Tranforms.", fun + elif fun.virtuality == "pure virtual": + print "AUTOFT WARNING: PURE VIRTUAL function requires tranform.", fun + else: + print "AUTOFT OK: Tranformed ", fun + fun.add_transformation ( * trans , **{"alias":fun.name} ) + fun.documentation = docit ("Auto Modified Arguments:", + desc, "...") + except: + pass def Fix_Void_Ptr_Args ( mb, pointee_types=['unsigned int','int', 'float', 'unsigned char', 'char', 'bool'], ignore_names=[] ): @@ -337,13 +336,22 @@ if fun.return_type.decl_string.startswith ( i ) and not fun.documentation: if not fun.name in known_names: print "WARNING: Excluding (function):", fun, "as it returns (pointer)", i - fun.exclude() + fun.exclude() for fun in mb.member_operators( allow_empty = True ): if declarations.is_pointer (fun.return_type) and not fun.documentation: for i in pointee_types: if fun.return_type.decl_string.startswith ( i ) and not fun.documentation: print "WARNING: Excluding (operator):", fun fun.exclude() + + # Change 15 Feb 2008 -- adding free function management + for fun in mb.free_functions( allow_empty = True ): + if declarations.is_pointer (fun.return_type) and not fun.documentation: + for i in pointee_types: + if fun.return_type.decl_string.startswith ( i ) and not fun.documentation: + if not fun.name in known_names: + print "WARNING: Excluding (free function):", fun, "as it returns (pointer)", i + fun.exclude() 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/ogre/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/ogre/generate_code.py 2008-02-16 01:21:27 UTC (rev 566) +++ trunk/python-ogre/code_generators/ogre/generate_code.py 2008-02-16 01:30:37 UTC (rev 567) @@ -654,7 +654,7 @@ # and change functions that return a variety of pointers to instead return unsigned int's pointee_types=['unsigned int','int', 'float', '::Ogre::Real', '::Ogre::uchar', '::Ogre::uint8', 'unsigned char', 'char'] - ignore_names=['ptr', 'useCountPointer'] # these are function names we know it's cool to exclude + ignore_names=[]## 'ptr', 'useCountPointer'] # these are function names we know it's cool to exclude common_utils.Fix_Pointer_Returns ( main_ns, pointee_types, ignore_names ) # functions that need to have implicit conversions turned off Deleted: trunk/python-ogre/code_generators/physx/1 =================================================================== --- trunk/python-ogre/code_generators/physx/1 2008-02-16 01:21:27 UTC (rev 566) +++ trunk/python-ogre/code_generators/physx/1 2008-02-16 01:30:37 UTC (rev 567) @@ -1,5261 +0,0 @@ - - -INFO Parsing xml file "C:\Development\python-ogre\code_generators\cache\physx_2.7.3_cache.xml" ... - - -INFO GCCXML version - 0.9 -Included Free Function int NxIntFloor(NxF32 const & f) [free function] -Included Free Function void NxDecomposeVector(NxVec3 & normalCompo, NxVec3 & tangentCompo, NxVec3 const & outwardDir, NxVec3 const & outwardNormal) [free function] -Included Free Function void NxComputeBarycentricPoint(NxVec3 & pt, NxVec3 const & p0, NxVec3 const & p1, NxVec3 const & p2, float u, float v) [free function] -Included Free Function void NxSetFPUExceptions(bool b) [free function] -Included Free Function bool NxSegmentOBBIntersect(NxVec3 const & p0, NxVec3 const & p1, NxVec3 const & center, NxVec3 const & extents, NxMat33 const & rot) [free function] -Included Free Function extern NxU32 NxGetValue(NxCookingValue cookValue) [free function] -Included Free Function void NxSetFPURoundingNear() [free function] -Included Free Function void NxFlexiCopy(void const * src, void * dst, NxU32 nbElem, NxU32 elemSize, NxU32 stride) [free function] -Included Free Function NxReal NxComputeConeMass(NxReal radius, NxReal length, NxReal density) [free function] -Included Free Function extern bool NxCookTriangleMesh(NxTriangleMeshDesc const & desc, NxStream & stream) [free function] -Included Free Function bool NxComputeBoxPoints(NxBox const & box, NxVec3 * pts) [free function] -Included Free Function NxU32 NxCrc32(void const * buffer, NxU32 nbBytes) [free function] -Included Free Function void NxComputeSphereInertiaTensor(NxVec3 & diagInertia, NxReal mass, NxReal radius, bool hollow) [free function] -Included Free Function bool NxSegmentBoxIntersect(NxVec3 const & p1, NxVec3 const & p2, NxVec3 const & bbox_min, NxVec3 const & bbox_max, NxVec3 & intercept) [free function] -Included Free Function NxF32 NxAngle(NxVec3 const & v0, NxVec3 const & v1) [free function] -Included Free Function void NxComputeBoxInertiaTensor(NxVec3 & diagInertia, NxReal mass, NxReal xlength, NxReal ylength, NxReal zlength) [free function] -Included Free Function void NxComputeBoxAroundCapsule(NxCapsule const & capsule, NxBox & box) [free function] -Included Free Function bool NxRayPlaneIntersect(NxRay const & ray, NxPlane const & plane, NxReal & dist, NxVec3 & pointOnPlane) [free function] -Included Free Function void NxSegmentCapsuleIntersect(NxSegment const & segment, NxCapsule const & capsule, NxU32 * nbImpacts, NxReal * t) [free function] -Included Free Function NxReal NxComputeConeDensity(NxReal radius, NxReal length, NxReal mass) [free function] -Included Free Function bool NxRayTriIntersect(NxVec3 const & orig, NxVec3 const & dir, NxVec3 const & vert0, NxVec3 const & vert1, NxVec3 const & vert2, float & t, float & u, float & v, bool cull) [free function] -Included Free Function NxReal NxComputeSphereMass(NxReal radius, NxReal density) [free function] -Included Free Function bool NxRayAABBIntersect(NxVec3 const & min, NxVec3 const & max, NxVec3 const & origin, NxVec3 const & dir, NxVec3 & coord) [free function] -Included Free Function extern bool NxSetCookingParams(NxCookingParams const & params) [free function] -Included Free Function void NxComputeBoxWorldEdgeNormal(NxBox const & box, NxU32 edge_index, NxVec3 & world_normal) [free function] -Included Free Function unsigned int const * NxGetBoxTriangles() [free function] -Included Free Function void NxFindRotationMatrix(NxVec3 const & x, NxVec3 const & b, NxMat33 & M) [free function] -Included Free Function void NxMergeSpheres(NxSphere & merged, NxSphere const & sphere0, NxSphere const & sphere1) [free function] -Included Free Function bool NxBuildSmoothNormals(NxU32 nbTris, NxU32 nbVerts, NxVec3 const * verts, unsigned int const * dFaces, NxU16 const * wFaces, NxVec3 * normals, bool flip=false) [free function] -Included Free Function NxVec3 const * NxGetBoxLocalEdgeNormals() [free function] -Included Free Function extern NxCookingParams const & NxGetCookingParams() [free function] -Included Free Function extern NxFoundationSDK * NxGetFoundationSDK() [free function] -Included Free Function void NxSegmentPlaneIntersect(NxVec3 const & v1, NxVec3 const & v2, NxPlane const & plane, NxReal & dist, NxVec3 & pointOnPlane) [free function] -Included Free Function unsigned int const * NxGetBoxEdges() [free function] -Included Free Function NX_BOOL NxPointTriangleIntersect2D(NxReal px, NxReal pz, NxReal p0x, NxReal p0z, NxReal e10x, NxReal e10z, NxReal e20x, NxReal e20z) [free function] -Included Free Function extern NxUserAllocator * NxGetPhysicsSDKAllocator() [free function] -Included Free Function unsigned int const * NxBoxVertexToQuad(NxU32 vertexIndex) [free function] -Included Free Function NxReal NxComputeEllipsoidDensity(NxVec3 const & extents, NxReal mass) [free function] -Included Free Function extern bool NxScaleCookedConvexMesh(NxStream const & source, NxReal scale, NxStream & dest) [free function] -Included Free Function bool NxRaySphereIntersect(NxVec3 const & origin, NxVec3 const & dir, NxReal length, NxVec3 const & center, NxReal radius, NxReal & hit_time, NxVec3 & hit_pos) [free function] -Included Free Function bool NxFastComputeSphere(NxSphere & sphere, unsigned int nb_verts, NxVec3 const * verts) [free function] -Included Free Function bool NxComputeBoxPlanes(NxBox const & box, NxPlane * planes) [free function] -Included Free Function bool NxTriBoxIntersect(NxVec3 const & vertex0, NxVec3 const & vertex1, NxVec3 const & vertex2, NxVec3 const & center, NxVec3 const & extents) [free function] -Included Free Function extern bool NxCookConvexMesh(NxConvexMeshDesc const & desc, NxStream & stream) [free function] -Included Free Function extern NxCookingInterface * NxGetCookingLib(NxU32 sdk_version_number) [free function] -Included Free Function NxI32 const * NxGetBoxEdgesAxes() [free function] -Included Free Function NxSepAxis NxSeparatingAxis(NxBox const & obb0, NxBox const & obb1, bool fullTest=true) [free function] -Included Free Function NxSepAxis NxSeparatingAxis(NxVec3 const & extents0, NxVec3 const & center0, NxMat33 const & rotation0, NxVec3 const & extents1, NxVec3 const & center1, NxMat33 const & rotation1, bool fullTest=true) [free function] -Included Free Function void NxComputeNormalCompo(NxVec3 & normalCompo, NxVec3 const & outwardDir, NxVec3 const & outwardNormal) [free function] -Included Free Function NxU32 NxRayAABBIntersect2(NxVec3 const & min, NxVec3 const & max, NxVec3 const & origin, NxVec3 const & dir, NxVec3 & coord, NxReal & t) [free function] -Included Free Function void NxNormalToTangents(NxVec3 const & n, NxVec3 & t1, NxVec3 & t2) [free function] -Included Free Function void NxSetFPURoundingDown() [free function] -Included Free Function void NxMakeFatEdge(NxVec3 & p0, NxVec3 & p1, NxF32 fatCoeff) [free function] -Included Free Function NxU32 NxRayCapsuleIntersect(NxVec3 const & origin, NxVec3 const & dir, NxCapsule const & capsule, NxReal * t) [free function] -Included Free Function void NxSetFPURoundingUp() [free function] -Included Free Function NxReal NxComputeEllipsoidMass(NxVec3 const & extents, NxReal density) [free function] -Included Free Function extern NxUtilLib * NxGetUtilLib() [free function] -Included Free Function void NxCreateBox(NxBox & box, NxBounds3 const & aabb, NxMat34 const & mat) [free function] -Included Free Function bool NxSegmentAABBIntersect(NxVec3 const & p0, NxVec3 const & p1, NxVec3 const & min, NxVec3 const & max) [free function] -Included Free Function NxReal NxComputeCylinderMass(NxReal radius, NxReal length, NxReal density) [free function] -Included Free Function extern NxCookingInterface * NxGetCookingLibWithID(NxU32 sdk_version_number, char * companyNameStr, char * appNameStr, char * appVersionStr, char * appUserDefinedStr) [free function] -Included Free Function extern bool NxCreatePMap(NxPMap & pmap, NxTriangleMesh const & mesh, NxU32 density, NxUserOutputStream * outputStream=0) [free function] -Included Free Function NxBSphereMethod NxComputeSphere(NxSphere & sphere, unsigned int nb_verts, NxVec3 const * verts) [free function] -Included Free Function int NxIntChop(NxF32 const & f) [free function] -Included Free Function NX_BOOL NxPointTriangleIntersect(NxVec3 const & p, NxVec3 const & p0, NxVec3 const & edge10, NxVec3 const & edge20) [free function] -Included Free Function bool NxComputeBoxVertexNormals(NxBox const & box, NxVec3 * pts) [free function] -Included Free Function extern bool NxCookClothMesh(NxClothMeshDesc const & desc, NxStream & stream) [free function] -Included Free Function extern void NxReleasePhysicsSDK(NxPhysicsSDK * sdk) [free function] -Included Free Function extern void NxCloseCooking() [free function] -Included Free Function bool NxRayOBBIntersect(NxRay const & ray, NxVec3 const & center, NxVec3 const & extents, NxMat33 const & rot) [free function] -Included Free Function void NxComputeBounds(NxBounds3 & bounds, NxU32 nbVerts, NxVec3 const * verts) [free function] -Included Free Function void NxComputeBounds(NxVec3 & min, NxVec3 & max, NxU32 nbVerts, NxVec3 const * verts) [free function] -Included Free Function NxU32 NxNextPowerOfTwo(NxU32 x) [free function] -Included Free Function extern NxPhysicsSDK * NxCreatePhysicsSDKWithID(NxU32 sdkVersion, char * companyNameStr, char * appNameStr, char * appVersionStr, char * appUserDefinedStr, NxUserAllocator * allocator=0, NxUserOutputStream * outputStream=0, NxPhysicsSDKDesc const & desc=::NxPhysicsSDKDesc( ), NxSDKCreateError * errorCode=0) [free function] -Included Free Function extern bool NxCookSoftBodyMesh(NxSoftBodyMeshDesc const & desc, NxStream & stream) [free function] -Included Free Function extern bool NxPlatformMismatch() [free function] -Included Free Function NxF32 NxComputeSquareDistance(NxSegment const & seg, NxVec3 const & point, NxF32 * t) [free function] -Included Free Function bool NxBoxContainsPoint(NxBox const & box, NxVec3 const & p) [free function] -Included Free Function bool NxIsBoxAInsideBoxB(NxBox const & a, NxBox const & b) [free function] -Included Free Function extern bool NxReleasePMap(NxPMap & pmap) [free function] -Included Free Function void NxSetFPUPrecision24() [free function] -Included Free Function void NxComputeCapsuleAroundBox(NxBox const & box, NxCapsule & capsule) [free function] -Included Free Function void NxSetFPUPrecision53() [free function] -Included Free Function void NxSetFPUPrecision64() [free function] -Included Free Function int NxIntCeil(NxF32 const & f) [free function] -Included Free Function extern bool NxInitCooking(NxUserAllocator * allocator=0, NxUserOutputStream * outputStream=0) [free function] -Included Free Function NxReal NxComputeBoxMass(NxVec3 const & extents, NxReal density) [free function] -Included Free Function void NxSetFPURoundingChop() [free function] -Included Free Function extern void NxReportCooking() [free function] -Included Free Function void NxComputeTangentCompo(NxVec3 & outwardDir, NxVec3 const & outwardNormal) [free function] -Included Free Function NxReal NxComputeBoxDensity(NxVec3 const & extents, NxReal mass) [free function] -Included Free Function NxReal NxComputeCylinderDensity(NxReal radius, NxReal length, NxReal mass) [free function] -Included Free Function bool NxBoxBoxIntersect(NxBox const & obb0, NxBox const & obb1, bool fullTest=true) [free function] -Included Free Function bool NxBoxBoxIntersect(NxVec3 const & extents0, NxVec3 const & center0, NxMat33 const & rotation0, NxVec3 const & extents1, NxVec3 const & center1, NxMat33 const & rotation1, bool fullTest) [free function] -Included Free Function extern NxPhysicsSDK * NxGetPhysicsSDK() [free function] -Included Free Function unsigned int const * NxGetBoxQuads() [free function] -Included Free Function extern NxPhysicsSDK * NxCreatePhysicsSDK(NxU32 sdkVersion, NxUserAllocator * allocator=0, NxUserOutputStream * outputStream=0, NxPhysicsSDKDesc const & desc=::NxPhysicsSDKDesc( ), NxSDKCreateError * errorCode=0) [free function] -Included Free Function NxF32 NxComputeDistanceSquared(NxRay const & ray, NxVec3 const & point, NxF32 * t) [free function] -Included Free Function bool NxDiagonalizeInertiaTensor(NxMat33 const & denseInertia, NxVec3 & diagonalInertia, NxMat33 & rotation) [free function] -Included Free Function NxReal NxComputeSphereDensity(NxReal radius, NxReal mass) [free function] -Included Free Function bool NxSweptSpheresIntersect(NxSphere const & sphere0, NxVec3 const & velocity0, NxSphere const & sphere1, NxVec3 const & velocity1) [free function] -Excluding static const NxPiF32 [variable] -Excluding static const NxPiF64 [variable] -Excluding static const NxHalfPiF32 [variable] -Excluding static const NxHalfPiF64 [variable] -Excluding static const NX_NO_HIGH_LIMIT [variable] -Excluding static const NxTwoPiF32 [variable] -Excluding static const NxTwoPiF64 [variable] -Excluding static const NX_NO_LOW_LIMIT [variable] -Excluding static const NxInvPiF32 [variable] -Excluding static const NxInvPiF64 [variable] -excluded NxBitField::FlagRef::bitField [variable] private -excluded NxBitField::FlagRef::bitIndex [variable] private -excluded NxBitField::FlagRef::bitField [variable] private -excluded NxBitField::FlagRef::bitIndex [variable] private -excluded NxMat33::data [variable] private -excluded NxActorDescBase::type [variable] protected -excluded NxDebugRenderable::numPoints [variable] private -excluded NxDebugRenderable::numLines [variable] private -excluded NxDebugRenderable::numTriangles [variable] private -excluded NxDebugRenderable::points [variable] private -excluded NxDebugRenderable::lines [variable] private -excluded NxDebugRenderable::triangles [variable] private -excluded NxJointDesc::type [variable] protected -excluded NxForceFieldShapeDesc::type [variable] protected -excluded NxShapeDesc::type [variable] protected -excluded NxContactStreamIterator::pointNormalForce [variable] protected -excluded NxContactStreamIterator::stream [variable] protected -excluded NxContactStreamIterator::numPairs [variable] private -excluded NxContactStreamIterator::shapes [variable] private -excluded NxContactStreamIterator::shapeFlags [variable] private -excluded NxContactStreamIterator::numPatches [variable] private -excluded NxContactStreamIterator::patchNormal [variable] private -excluded NxContactStreamIterator::numPoints [variable] private -excluded NxContactStreamIterator::point [variable] private -excluded NxContactStreamIterator::separation [variable] private -excluded NxContactStreamIterator::featureIndex0 [variable] private -excluded NxContactStreamIterator::featureIndex1 [variable] private -excluded NxContactStreamIterator::numPairsRemaining [variable] private -excluded NxContactStreamIterator::numPatchesRemaining [variable] private -excluded NxContactStreamIterator::numPointsRemaining [variable] private -excluded NxFluidDescBase::type [variable] protected -excluded NxArray<NxFluidEmitterDesc, NxAllocatorDefault>::first [variable] private -excluded NxArray<NxFluidEmitterDesc, NxAllocatorDefault>::last [variable] private -excluded NxArray<NxFluidEmitterDesc, NxAllocatorDefault>::memEnd [variable] private -excluded NxArray<NxFluidEmitterDesc, NxAllocatorDefault>::allocator [variable] private -excluded NxArray<NxShapeDesc*, NxAllocatorDefault>::first [variable] private -excluded NxArray<NxShapeDesc*, NxAllocatorDefault>::last [variable] private -excluded NxArray<NxShapeDesc*, NxAllocatorDefault>::memEnd [variable] private -excluded NxArray<NxShapeDesc*, NxAllocatorDefault>::allocator [variable] private -excluded NxEffectorDesc::type [variable] protected -excluding function ::NxArray<NxShapeDesc*, NxAllocatorDefault>::begin -excluding function ::NxArray<NxFluidEmitterDesc, NxAllocatorDefault>::deleteEntry -excluding function ::NxArray<NxShapeDesc*, NxAllocatorDefault>::end -excluding function ::NxCookingInterface::NxCreatePMap -excluding function ::NxForceField::releaseShape -excluding function ::NxUtilLib::NxGetBoxEdgesAxes -excluding function ::NxImplicitScreenMesh::getProjectionMatrix -excluding function ::NxVec3::get -excluding function ::NxBitField::rangeToDenseMask -excluding function ::NxBitField::maskToShift -NxSweepQueryHit [struct] -NxBitField [class] -NxBitField::FlagRef [class] -NxConvexShapeDesc [class] -NxMat33 [class] -NxVec3 [class] -NxJointLimitPairDesc [class] -NxWheelShape [class] -NxActorDescBase [class] -NxMaterialDesc [class] -NxRay [class] -NxPointInPlaneJoint [class] -NxWheelShapeDesc [class] -NxMaterial [class] -NxFluidEmitterDesc [class] -NxUserRaycastReport [class] -NxPlaneShape [class] -_ldiv_t [struct] -NxExtension [class] -_Nx3F32 [struct] -NxSphereShapeDesc [class] -NxContactPair [class] -NxSceneLimits [class] -NxCCDSkeleton [class] -NxCapsuleForceFieldShapeDesc [class] -_heapinfo [struct] -NxMeshData [class] -NxBox [class] -tagLC_ID [struct] -NxEffector [class] -_exception [struct] -NxTriangle32 [struct] -NxPrismaticJointDesc [class] -NxFluidEmitter [class] -NxGroupsMask [class] -NxTriangleMeshShape [class] -NxDebugRenderable [class] -NxFixedJoint [class] -NxBoxForceFieldShape [class] -NxDebugPoint [struct] -localeinfo_struct [struct] -NxSoftBodyDesc [class] -NxFluid [class] -_LDOUBLE [struct] -NxPulleyJointDesc [class] -NxForceFieldDesc [class] -NxAllocatorDefault [class] -NxFluidPacketData [class] -NxPrismaticJoint [class] -NxShape [class] -NxProfileData [class] -NxPointInPlaneJointDesc [class] -NxTriangleMeshDesc [class] -NxSimpleTriangleMesh [class] -NxSphereShape [class] -NxSweepCache [class] -NxAllocateable [class] -NxJointDesc [class] -NxUserNotify [class] -NxPulleyJoint [class] -NxTask [class] -NxSoftBodyMesh [class] -NxForceFieldShapeDesc [class] -NxFixedJointDesc [class] -NxPMap [class] -NxCapsuleShapeDesc [class] -NxShapeDesc [class] -_div_t [struct] -NxPhysicsSDKDesc [class] -NxUserContactModify [class] -NxUserContactModify::NxContactCallbackData [struct] -NxSoftBodySplitPairData [class] -_CRT_FLOAT [struct] -NxTireFunctionDesc [class] -NxPointOnLineJointDesc [class] -NxTriangle [class] -NxClothMeshDesc [class] -NxScene [class] -NxInterface [class] -NxCloth [class] -NxClothMesh [class] -NxSpringAndDamperEffectorDesc [class] -NxUserOutputStream [class] -NxHeightFieldDesc [class] -NxCapsule [class] -NxFluidUserNotify [class] -NxUserWheelContactModify [class] -NxSphereForceFieldShape [class] -NxCookingInterface [class] -NxJoint [class] -NxContactStreamIterator [class] -NxSceneQueryDesc [class] -NxConvexForceFieldShapeDesc [class] -NxSceneQuery [class] -NxSphere [class] -NxBoxShapeDesc [class] -NxUserScheduler [class] -NxDistanceJointDesc [class] -NxHeightField [class] -NxJointDriveDesc [class] -NxSphereForceFieldShapeDesc [class] -NxUserAllocator [class] -NxSceneStatistic [struct] -NxClothDesc [class] -NxPointOnLineJoint [class] -NxUserContactReport [class] -NxParticleIdData [class] -NxBoxForceFieldShapeDesc [class] -NxFluidDescBase [class] -NxImplicitScreenMeshDesc [class] -NxArray<NxFluidEmitterDesc, NxAllocatorDefault> [class] -NxArray<NxShapeDesc*, NxAllocatorDefault> [class] -NxPairFlag [class] -NxDistanceJoint [class] -NxSphericalJoint [class] -threadlocaleinfostruct [struct] -threadlocaleinfostruct [struct] -NxHeightFieldShape [class] -NxHeightFieldShapeDesc [class] -NxImplicitScreenMesh [class] -NxActorGroupPair [struct] -NxParticleData [class] -NxBounds3 [class] -_complex [struct] -NxActorPairFilter [class] -NxCapsuleShape [class] -NxTriangleMesh [class] -NxConstraintDominance [struct] -NxUserEntityReport<NxShape*> [class] -NxUserEntityReport<unsigned int> [class] -NxUserEntityReport<NxSweepQueryHit> [class] -NxWheelContactData [class] -NxProfilerData [class] -NxPlaneShapeDesc [class] -NxQuat [class] -_LDBL12 [struct] -NxRevoluteJoint [class] -NxSceneStats2 [class] -NxMat34 [class] -NxJointLimitSoftDesc [class] -NxHeightFieldSample [struct] -NxFluidPacket [struct] -NxForceFieldShape [class] -NxSpringDesc [class] -NxActiveTransform [struct] -NxJointLimitDesc [class] -NxSceneStats [class] -NxRevoluteJointDesc [class] -NxMotorDesc [class] -NxFluidDesc [class] -NxDebugTriangle [struct] -NxRemoteDebuggerEventListener [class] -NxSegment [class] -NxCookingParams [struct] -Nx9Real [class] -Nx9Real::S [struct] -Nx9Real [union] -NxConvexMeshDesc [class] -_LONGDOUBLE [struct] -NxFoundationSDK [class] -NxSceneQueryReport [class] -NxBodyDesc [class] -NxConvexMesh [class] -NxTriangleMeshShapeDesc [class] -NxSpringAndDamperEffector [class] -NxCompartment [class] -NxSoftBodySplitPair [class] -NxRemoteDebugger [class] -NxUserTriggerReport [class] -NxPlane [class] -NxStream [class] -NxDebugLine [struct] -NxParticleUpdateData [class] -NxD6Joint [class] -NxUserActorPairFiltering [class] -NxPhysicsSDK [class] -NxActor [class] -_CRT_DOUBLE [struct] -NxSceneDesc [class] -NxMath [class] -NxCylindricalJointDesc [class] -NxCapsuleForceFieldShape [class] -NxActorDesc [class] -NxUtilLib [class] -NxD6JointDesc [class] -NxConvexShape [class] -NxCylindricalJoint [class] -NxRaycastHit [struct] -NxCompartmentDesc [class] -NxSoftBody [class] -NxConvexForceFieldShape [class] -NxJointLimitSoftPairDesc [class] -NxEffectorDesc [class] -NxBoxShape [class] -NxSoftBodyMeshDesc [class] -NxForceField [class] -NxProfileZone [class] -NxSphericalJointDesc [class] -__si_class_type_info_pseudo [struct] -__class_type_info_pseudo [struct] -__vmi_class_type_info_pseudo1 [struct] -__type_info_pseudo [struct] -__base_class_type_info_pseudo [struct] -Excluding Class: NxArray<NxShapeDesc*, NxAllocatorDefault> -Excluding Class: NxArray<NxFluidEmitterDesc, NxAllocatorDefault> -Excluding: NxReal const * NxVec3::get() const [member function] -Excluding Operator: NxReal & NxMat33::operator()(int row, int col) [member operator] -CHECK bool NxTriangleMeshShape::overlapAABBTriangles(NxBounds3 const & bounds, NxU32 flags, NxUserEntityReport<unsigned int> * callback) const [member function] 2 -CHECK bool NxJoint::getNextLimitPlane(NxVec3 & planeNormal, NxReal & planeD, NxReal * restitution=0) [member function] 2 -CHECK bool NxHeightFieldShape::overlapAABBTriangles(NxBounds3 const & bounds, NxU32 flags, NxUserEntityReport<unsigned int> * callback) const [member function] 2 -CHECK void NxImplicitScreenMesh::setProjectionMatrix(NxReal const * projection44) [member function] 0 -CHECK bool NxUserEntityReport<unsigned int>::onEvent(NxU32 nbEntities, unsigned int * entities) [member function] 1 -CHECK void NxQuat::setWXYZ(NxReal const * d) [member function] 0 -CHECK void NxQuat::setXYZW(NxReal const * d) [member function] 0 -CHECK static NxU32 NxMath::hash(unsigned int const * k, NxU32 length) [member function] 0 -CHECK NxU32 NxUtilLib::NxRayCapsuleIntersect(NxVec3 const & origin, NxVec3 const & dir, NxCapsule const & capsule, NxReal * t) [member function] 3 -CHECK bool NxUtilLib::NxBuildSmoothNormals(NxU32 nbTris, NxU32 nbVerts, NxVec3 const * verts, unsigned int const * dFaces, NxU16 const * wFaces, NxVec3 * normals, bool flip=false) [member function] 3 -CHECK bool NxUtilLib::NxSweepBoxTriangles(NxU32 nb_tris, NxTriangle const * triangles, NxTriangle const * edge_triangles, unsigned int const * edge_flags, NxBounds3 const & box, NxVec3 const & dir, float length, NxVec3 & hit, NxVec3 & normal, float & d, NxU32 & index, NxU32 * cachedIndex=0) [member function] 3 -CHECK bool NxUtilLib::NxSweepCapsuleTriangles(NxU32 up_direction, NxU32 nb_tris, NxTriangle const * triangles, unsigned int const * edge_flags, NxVec3 const & center, float const radius, float const height, NxVec3 const & dir, float length, NxVec3 & hit, NxVec3 & normal, float & d, NxU32 & index, NxU32 * cachedIndex=0) [member function] 3 -CHECK float NxUtilLib::NxSegmentOBBSqrDist(NxSegment const & segment, NxVec3 const & c0, NxVec3 const & e0, NxMat33 const & r0, float * t, NxVec3 * p) [member function] 4 -Excluding: NxVec3::NxVec3(NxReal const * v) [constructor] -Excluding: NxDebugRenderable::NxDebugRenderable(NxU32 np, NxDebugPoint const * p, NxU32 nl, NxDebugLine const * l, NxU32 nt, NxDebugTriangle const * t) [constructor] -Excluding (function): unsigned int const * NxUtilLib::NxGetBoxEdges() [member function] as it returns (pointer) unsigned int -Excluding (function): unsigned int const * NxUtilLib::NxGetBoxTriangles() [member function] as it returns (pointer) unsigned int -Excluding (function): unsigned int const * NxUtilLib::NxGetBoxQuads() [member function] as it returns (pointer) unsigned int -Excluding (function): unsigned int const * NxUtilLib::NxBoxVertexToQuad(NxU32 vertexIndex) [member function] as it returns (pointer) unsigned int -Wrapped: NxFluidEmitter * * NxFluid::getEmitters() const [member function] -Wrapped: NxImplicitScreenMesh * * NxFluid::getScreenSurfaceMeshes() const [member function] -Wrapped: NxForceField * * NxScene::getForceFields() [member function] -Wrapped: NxActor * * NxScene::getActors() [member function] -Wrapped: NxFluid * * NxScene::getFluids() [member function] -Wrapped: NxImplicitScreenMesh * * NxScene::getImplicitScreenMeshes() [member function] -Wrapped: NxCloth * * NxScene::getCloths() [member function] -Wrapped: NxSoftBody * * NxScene::getSoftBodies() [member function] -Excluded: NxShapeDesc * * NxArray<Nx - -WARNING: NxSweepQueryHit [struct] - -> warning W1025: Py++ will generate class wrapper - class contains - -> "hitShape" - T* member variable - - -WARNING: NxSweepQueryHit [struct] - -> warning W1025: Py++ will generate class wrapper - class contains - -> "sweepShape" - T* member variable - - -WARNING: NxSweepQueryHit::userData [variable] - -> compilation error W1036: Py++ can not expose pointer to Python - -> immutable member variables. This could be changed in future. - - -WARNING: NxConvexShapeDesc [class] - -> warning W1025: Py++ will generate class wrapper - class contains - -> "meshData" - T* member variable - - -WARNING: void NxVec3::set(NxF32 const * v) [member function] - -> execution error W1010: The function introduces registration order - -> problem. For more information about the problem read next document: - -> http://language- - -> binding.net/pyplusplus/documentation/functions/registration_order.html - -> Problematic functions list: void NxVec3::set(NxReal v) - -> [member function] - - -WARNING: void NxVec3::set(NxReal v) [member function] - -> execution error W1010: The function introduces registration order - -> problem. For more information about the problem read next document: - -> http://language- - -> binding.net/pyplusplus/documentation/functions/registration_order.html - -> Problematic functions list: void NxVec3::set(NxF32 const * - -> v) [member function] - - -WARNING: NxWheelShape [class] - -> warning W1023: Py++ will generate class wrapper - there are few - -> functions that should be redefined in class wrapper. The functions - -> are: checkOverlapAABB, checkOverlapCapsule, checkOverlapOBB, - -> checkOverlapSphere, getActor, getCCDSkeleton, getFlag, - -> getGlobalOrientation, getGlobalPose, getGlobalPosition, getGroup, - -> getGroupsMask, getLocalOrientation, getLocalPose, getLocalPosition, - -> getMaterial, getName, getSkinWidth, getType, getWorldBounds, is, is, - -> raycast, setCCDSkeleton, setFlag, setGlobalOrientation, setGlobalPose, - -> setGlobalPosition, setGroup, setGroupsMask, setLocalOrientation, - -> setLocalPose, setLocalPosition, setMaterial, setName, setSkinWidth. - - -WARNING: NxActorDescBase [class] - -> warning W1025: Py++ will generate class wrapper - class contains - -> "body" - T* member variable - - -WARNING: NxActorDescBase [class] - -> warning W1025: Py++ will generate class wrapper - class contains - -> "compartment" - T* member variable - - -WARNING: NxActorDescBase [class] - -> warning W1031: Py++ will generate class wrapper - user asked to expose - -> non - public member function "NxActorDescBase" - - -WARNING: NxActorDescBase [class] - -> warning W1031: Py++ will generate class wrapper - user asked to expose - -> non - public member function "isValidInternal" - - -WARNING: NxActorDescBase::userData [variable] - -> compilation error W1036: Py++ can not expose pointer to Python - -> immutable member variables. This could be changed in future. - - -WARNING: NxActorDescBase::name [variable] - -> compilation error W1036: Py++ can not expose pointer to Python - -> immutable member variables. This could be changed in future. - - -WARNING: NxMaterialDesc [class] - -> warning W1025: Py++ will generate class wrapper - class contains - -> "spring" - T* member variable - - -WARNING: NxPointInPlaneJoint [class] - -> warning W1023: Py++ will generate class wrapper - there are few - -> functions that should be redefined in class wrapper. The functions - -> are: addLimitPlane, getActors, getBreakable, getGlobalAnchor, - -> getGlobalAxis, getLimitPoint, getName, getNextLimitPlane, getScene, - -> getState, getType, hasMoreLimitPlanes, is, purgeLimitPlanes, - -> resetLimitPlaneIterator, setBreakable, setGlobalAnchor, setGlobalAxis, - -> setLimitPoint, setName. - - -WARNING: NxWheelShapeDesc [class] - -> warning W1025: Py++ will generate class wrapper - class contains - -> "wheelContactModify" - T* member variable - - -WARNING: NxMaterial [class] - -> warning W1031: Py++ will generate class wrapper - user asked to expose - -> non - public member function "NxMaterial" - - -WARNING: NxMaterial::userData [variable] - -> compilation error W1036: Py++ can not expose pointer to Python - -> immutable member variables. This could be changed in future. - - -WARNING: NxScene & NxMaterial::getScene() const [member function] - -> warning W1049: This method could not be overriden in Python - method - -> returns reference to local variable! - - -WARNING: NxFluidEmitterDesc [class] - -> warning W1025: Py++ will generate class wrapper - class contains - -> "frameShape" - T* member variable - - -WARNING: NxFluidEmitterDesc::userData [variable] - -> compilation error W1036: Py++ can not expose pointer to Python - -> immutable member variables. This could be changed in future. - - -WARNING: NxFluidEmitterDesc::name [variable] - -> compilation error W1036: Py++ can not expose pointer to Python - -> immutable member variables. This could be changed in future. - - -WARNING: NxPlaneShape [class] - -> warning W1023: Py++ will generate class wrapper - there are few - -> functions that should be redefined in class wrapper. The functions - -> are: checkOverlapAABB, checkOverlapCapsule, checkOverlapOBB, - -> checkOverlapSphere, getActor, getCCDSkeleton, getFlag, - -> getGlobalOrientation, getGlobalPose, getGlobalPosition, getGroup, - -> getGroupsMask, getLocalOrientation, getLocalPose, getLocalPosition, - -> getMaterial, getName, getSkinWidth, getType, getWorldBounds, is, is, - -> raycast, setCCDSkeleton, setFlag, setGlobalOrientation, setGlobalPose, - -> setGlobalPosition, setGroup, setGroupsMask, setLocalOrientation, - -> setLocalPose, setLocalPosition, setMaterial, setName, setSkinWidth. - - -WARNING: NxContactPair [class] - -> warning W1027: Py++ will generate class wrapper - class contains - -> "actors" - array member variable - - -WARNING: NxContactPair::stream [variable] - -> compilation error W1036: Py++ can not expose pointer to Python - -> immutable member variables. This could be changed in future. - - -WARNING: NxMeshData::verticesPosBegin [variable] - -> compilation error W1036: Py++ can not expose pointer to Python - -> immutable member variables. This could be changed in future. - - -WARNING: NxMeshData::verticesNormalBegin [variable] - -> compilation error W1036: Py++ can not expose pointer to Python - -> immutable member variables. This could be changed in future. - - -WARNING: NxMeshData::numVerticesPtr [variable] - -> compilation error W1036: Py++ can not expose pointer to Python - -> immutable member variables. This could be changed in future. - - -WARNING: NxMeshData::indicesBegin [variable] - -> compilation error W1036: Py++ can not expose pointer to Python - -> immutable member variables. This could be changed in future. - - -WARNING: NxMeshData::numIndicesPtr [variable] - -> compilation error W1036: Py++ can not expose pointer to Python - -> immutable member variables. This could be changed in future. - - -WARNING: NxMeshData::parentIndicesBegin [variable] - -> compilation error W1036: Py++ can not expose pointer to Python - -> immutable member variables. This could be changed in future. - - -WARNING: NxMeshData::numParentIndicesPtr [variable] - -> compilation error W1036: Py++ can not expose pointer to Python - -> immutable member variables. This could be changed in future. - - -WARNING: NxMeshData::dirtyBufferFlagsPtr [variable] - -> compilation error W1036: Py++ can not expose pointer to Python - -> immutable member variables. This could be changed in future. - - -WARNING: NxMeshData::name [variable] - -> compilation error W1036: Py++ can not expose pointer to Python - -> immutable member variables. This could be changed in future. - - -WARNING: NxEffector [class] - -> warning W1031: Py++ will generate class wrapper - user asked to expose - -> non - public member function "NxEffector" - - -WARNING: NxEffector::userData [variable] - -> compilation error W1036: Py++ can not expose pointer to Python - -> immutable member variables. This could be changed in future. - - -WARNING: NxEffector::appData [variable] - -> compilation error W1036: Py++ can not expose pointer to Python - -> immutable member variables. This could be changed in future. - - -WARNING: NxScene & NxEffector::getScene() const [member function] - -> warning W1049: This method could not be overriden in Python - method - -> returns reference to local variable! - - -WARNING: NxTriangle32 [struct] - -> warning W1027: Py++ will generate class wrapper - class contains "v" - - -> array member variable - - -WARNING: NxFluidEmitter [class] - -> warning W1031: Py++ will generate class wrapper - user asked to expose - -> non - public member function "NxFluidEmitter" - - -WARNING: NxFluidEmitter::userData [variable] - -> compilation error W1036: Py++ can not expose pointer to Python - -> immutable member variables. This could be changed in future. - - -WARNING: NxFluid & NxFluidEmitter::getFluid() const [member function] - -> warning W1049: This method could not be overriden in Python - method - -> returns reference to local variable! - - -WARNING: NxTriangleMeshShape [class] - -> warning W1020: Py++ will generate class wrapper - hand written code - -> should be added to the wrapper class - - -WARNING: NxTriangleMeshShape [class] - -> warning W1023: Py++ will generate class wrapper - there are few - -> functions that should be redefined in class wrapper. The functions - -> are: checkOverlapAABB, checkOverlapCapsule, checkOverlapOBB, - -> checkOverlapSphere, getActor, getCCDSkeleton, getFlag, - -> getGlobalOrientation, getGlobalPose, getGlobalPosition, getGroup, - -> getGroupsMask, getLocalOrientation, getLocalPose, getLocalPosition, - -> getMaterial, getName, getSkinWidth, getType, getWorldBounds, is, is, - -> raycast, setCCDSkeleton, setFlag, setGlobalOrientation, setGlobalPose, - -> setGlobalPosition, setGroup, setGroupsMask, setLocalOrientation, - -> setLocalPose, setLocalPosition, setMaterial, setName, setSkinWidth. - - -WARNING: NxTriangleMesh & NxTriangleMeshShape::getTriangleMesh() [member function] - -> warning W1049: This method could not be overriden in Python - method - -> returns reference to local variable! - - -WARNING: NxTriangleMesh const & NxTriangleMeshShape::getTriangleMesh() const [member function] - -> warning W1049: This method could not be overriden in Python - method - -> returns reference to local variable! - - -WARNING: bool NxRayPlaneIntersect(NxRay const & ray, NxPlane const & plane, NxReal & dist, NxVec3 & pointOnPlane) [free function] - -> execution error W1009: The function takes as argument (name=dist, - -> pos=2) non-const reference to Python immutable type - function could - -> not be called from Python. Take a look on "Function Transformation" - -> functionality and define the transformation. - - -WARNING: NxFixedJoint [class] - -> warning W1023: Py++ will generate class wrapper - there are few - -> functions that should be redefined in class wrapper. The functions - -> are: addLimitPlane, getActors, getBreakable, getGlobalAnchor, - -> getGlobalAxis, getLimitPoint, getName, getNextLimitPlane, getScene, - -> getState, getType, hasMoreLimitPlanes, is, purgeLimitPlanes, - -> resetLimitPlaneIterator, setBreakable, setGlobalAnchor, setGlobalAxis, - -> setLimitPoint, setName. - - -WARNING: NxBoxForceFieldShape [class] - -> warning W1023: Py++ will generate class wrapper - there are few - -> functions that should be redefined in class wrapper. The functions - -> are: getFlags, getForceField, getName, getPose, getType, setFlags, - -> setName, setPose. - - -WARNING: NxSoftBodyDesc [class] - -> warning W1025: Py++ will generate class wrapper - class contains - -> "softBodyMesh" - T* member variable - - -WARNING: NxSoftBodyDesc [class] - -> warning W1025: Py++ will generate class wrapper - class contains - -> "compartment" - T* member variable - - -WARNING: NxSoftBodyDesc::userData [variable] - -> compilation error W1036: Py++ can not expose pointer to Python - -> immutable member variables. This could be changed in future. - - -WARNING: NxSoftBodyDesc::name [variable] - -> compilation error W1036: Py++ can not expose pointer to Python - -> immutable member variables. This could be changed in future. - - -WARNING: NxFluid [class] - -> warning W1020: Py++ will generate class wrapper - hand written code - -> should be added to the wrapper class - - -WARNING: NxFluid [class] - -> warning W1031: Py++ will generate class wrapper - user asked to expose - -> non - public member function "NxFluid" - - -WARNING: NxFluid::userData [variable] - -> compilation error W1036: Py++ can not expose pointer to Python - -> immutable member variables. This could be changed in future. - - -WARNING: NxScene & NxFluid::getScene() const [member function] - -> warning W1049: This method could not be overriden in Python - method - -> returns reference to local variable! - - -WARNING: NxPulleyJointDesc [class] - -> warning W1027: Py++ will generate class wrapper - class contains - -> "pulley" - array member variable - - -WARNING: NxForceFieldDesc [class] - -> warning W1025: Py++ will generate class wrapper - class contains - -> "actor" - T* member variable - - -WARNING: NxForceFieldDesc::name [variable] - -> compilation error W1036: Py++ can not expose pointer to Python - -> immutable member variables. This could be changed in future. - - -WARNING: NxForceFieldDesc::userData [variable] - -> compilation error W1036: Py++ can not expose pointer to Python - -> immutable member variables. This could be changed in future. - - -WARNING: bool NxRayTriIntersect(NxVec3 const & orig, NxVec3 const & dir, NxVec3 const & vert0, NxVec3 const & vert1, NxVec3 const & vert2, float & t, float & u, float & v, bool cull) [free function] - -> execution error W1009: The function takes as argument (name=t, pos=5) - -> non-const reference to Python immutable type - function could not be - -> called from Python. Take a look on "Function Transformation" - -> functionality and define the transformation. - - -WARNING: bool NxRayTriIntersect(NxVec3 const & orig, NxVec3 const & dir, NxVec3 const & vert0, NxVec3 const & vert1, NxVec3 const & vert2, float & t, float & u, float & v, bool cull) [free function] - -> execution error W1009: The function takes as argument (name=u, pos=6) - -> non-const reference to Python immutable type - function could not be - -> called from Python. Take a look on "Function Transformation" - -> functionality and define the transformation. - - -WARNING: bool NxRayTriIntersect(NxVec3 const & orig, NxVec3 const & dir, NxVec3 const & vert0, NxVec3 const & vert1, NxVec3 const & vert2, float & t, float & u, float & v, bool cull) [free function] - -> execution error W1009: The function takes as argument (name=v, pos=7) - -> non-const reference to Python immutable type - function could not be - -> called from Python. Take a look on "Function Transformation" - -> functionality and define the transformation. - - -WARNING: NxFluidPacketData [class] - -> warning W1025: Py++ will generate class wrapper - class contains - -> "bufferFluidPackets" - T* member variable - - -WARNING: NxFluidPacketData::numFluidPacketsPtr [variable] - -> compilation error W1036: Py++ can not expose pointer to Python - -> immutable member variables. This could be changed in future. - - -WARNING: NxPrismaticJoint [class] - -> warning W1023: Py++ will generate class wrapper - there are few - -> functions that should be redefined in class wrapper. The functions - -> are: addLimitPlane, getActors, getBreakable, getGlobalAnchor, - -> getGlobalAxis, getLimitPoint, getName, getNextLimitPlane, getScene, - -> getState, getType, hasMoreLimitPlanes, is, purgeLimitPlanes, - -> resetLimitPlaneIterator, setBreakable, setGlobalAnchor, setGlobalAxis, - -> setLimitPoint, setName. - - -WARNING: NxCompartmentType [enumeration] - -> execution error W1032: Boost.Python library does not support enums - -> with duplicate values. You can read more about this here: - -> http://boost.org/libs/python/todo.html#support-for-enums-with- - -> duplicate-values . The quick work around is to add new class variable - -> to the exported enum, from Python. - - -WARNING: NxShape [class] - -> warning W1031: Py++ will generate class wrapper - user asked to expose - -> non - public member function "NxShape" - - -WARNING: NxShape::userData [variable] - -> compilation error W1036: Py++ can not expose pointer to Python - -> immutable member variables. This could be changed in future. - - -WARNING: NxShape::appData [variable] - -> compilation error W1036: Py++ can not expose pointer to Python - -> immutable member variables. This could be changed in future. - - -WARNING: NxActor & NxShape::getActor() const [member function] - -> warning W1049: This method could not be overriden in Python - method - -> returns reference to local variable! - - -WARNING: NxProfileData [class] - -> warning W1031: Py++ will generate class wrapper - user asked to expose - -> non - public member function "NxProfileData" - - -WARNING: NxTriangleMeshDesc [class] - -> warning W1025: Py++ will generate class wrapper - class contains - -> "pmap" - T* member variable - - -WARNING: NxTriangleMeshDesc::materialIndices [variable] - -> compilation error W1036: Py++ can not expose pointer to Python - -> immutable member variables. This could be changed in future. - - -WARNING: NxSimpleTriangleMesh::points [variable] - -> compilation error W1036: Py++ can not expose pointer to Python - -> immutable member variables. This could be changed in future. - - -WARNING: NxSimpleTriangleMesh::triangles [variable] - -> compilation error W1036: Py++ can not expose pointer to Python - -> immutable member variables. This could be changed in future. - - -WARNING: NxSphereShape [class] - -> warning W1023: Py++ will generate class wrapper - there are few - -> functions that should be redefined in class wrapper. The functions - -> are: checkOverlapAABB, checkOverlapCapsule, checkOverlapOBB, - -> checkOverlapSphere, getActor, getCCDSkeleton, getFlag, - -> getGlobalOrientation, getGlobalPose, getGlobalPosition, getGroup, - -> getGroupsMask, getLocalOrientation, getLocalPose, getLocalPosition, - -> getMaterial, getName, getSkinWidth, getType, getWorldBounds, is, is, - -> raycast, setCCDSkeleton, setFlag, setGlobalOrientation, setGlobalPose, - -> setGlobalPosition, setGroup, setGroupsMask, setLocalOrientation, - -> setLocalPose, setLocalPosition, setMaterial, setName, setSkinWidth. - - -WARNING: NxSweepCache [class] - -> warning W1031: Py++ will generate class wrapper - user asked to expose - -> non - public member function "NxSweepCache" - - -WARNING: static void * NxAllocateable::operator new(size_t size, NxMemoryType type) [member operator] - -> compilation error W1014: "operator new" is not supported. See - -> Boost.Python documentation: - -> http://www.boost.org/libs/python/doc/v2/operators.html#introduction. - - -WARNING: static void * NxAllocateable::operator new [](size_t size, NxMemoryType type) [member operator] - -> compilation error W1014: "operator new []" is not supported. See - -> Boost.Python documentation: - -> http://www.boost.org/libs/python/doc/v2/operators.html#introduction. - - -WARNING: static void NxAllocateable::operator delete(void * p) [member operator] - -> compilation error W1014: "operator delete" is not supported. See - -> Boost.Python documentation: - -> http://www.boost.org/libs/python/doc/v2/operators.html#introduction. - - -WARNING: static void NxAllocateable::operator delete [](void * p) [member operator] - -> compilation error W1014: "operator delete []" is not supported. See - -> Boost.Python documentation: - -> http://www.boost.org/libs/python/doc/v2/operators.html#introduction. - - -WARNING: NxJointDesc [class] - -> warning W1027: Py++ will generate class wrapper - class contains - -> "actor" - array member variable - - -WARNING: NxJointDesc [class] - -> warning W1027: Py++ will generate class wrapper - class contains - -> "localNormal" - array member variable - - -WARNING: NxJointDesc [class] - -> warning W1027: Py++ will generate class wrapper - class contains - -> "localAxis" - array member variable - - -WARNING: NxJointDesc [class] - -> warning W1027: Py++ will generate class wrapper - class contains - -> "localAnchor" - array member variable - - -WARNING: NxJointDesc [class] - -> warning W1031: Py++ will generate class wrapper - user asked to expose - -> non - public member function "NxJointDesc" - - -WARNING: NxJointDesc::userData [variable] - -> compilation error W1036: Py++ can not expose pointer to Python - -> immutable member variables. This could be changed in future. - - -WARNING: NxJointDesc::name [variable] - -> compilation error W1036: Py++ can not expose pointer to Python - -> immutable member variables. This could be changed in future. - - -WARNING: void NxUserNotify::onWake(NxActor * * actors, NxU32 count) [member function] - -> warning W1051: The function takes as argument (name=actors, pos=0) - -> "NxActor * *" type. You have to specify a call policies or to use - -> "Function Transformation" functionality. - - -WARNING: void NxUserNotify::onSleep(NxActor * * actors, NxU32 count) [member function] - -> warning W1051: The function takes as argument (name=actors, pos=0) - -> "NxActor * *" type. You have to specify a call policies or to use - -> "Function Transformation" functionality. - - -WARNING: NxPulleyJoint [class] - -> warning W1023: Py++ will generate class wrapper - there are few - -> functions that should be redefined in class wrapper. The functions - -> are: addLimitPlane, getActors, getBreakable, getGlobalAnchor, - -> getGlobalAxis, getLimitPoint, getName, getNextLimitPlane, getScene, - -> getState, getType, hasMoreLimitPlanes, is, purgeLimitPlanes, - -> resetLimitPlaneIterator, setBreakable, setGlobalAnchor, setGlobalAxis, - -> setLimitPoint, setName. - - -WARNING: void NxSegmentPlaneIntersect(NxVec3 const & v1, NxVec3 const & v2, NxPlane const & plane, NxReal & dist, NxVec3 & pointOnPlane) [free function] - -> execution error W1009: The function takes as argument (name=dist, - -> pos=3) non-const reference to Python immutable type - function could - -> not be called from Python. Take a look on "Function Transformation" - -> functionality and define the transformation. - - -WARNING: NxSoftBodyMesh [class] - -> warning W1031: Py++ will generate class wrapper - user asked to expose - -> non - public member function "NxSoftBodyMesh" - - -WARNING: NxForceFieldShapeDesc [class] - -> warning W1031: Py++ will generate class wrapper - user asked to expose - -> non - public member function "NxForceFieldShapeDesc" - - -WARNING: NxForceFieldShapeDesc::userData [variable] - -> compilation error W1036: Py++ can not expose pointer to Python - -> immutable member variables. This could be changed in future. - - -WARNING: NxForceFieldShapeDesc::name [variable] - -> compilation error W1036: Py++ can not expose pointer to Python - -> immutable member variables. This could be changed in future. - - -WARNING: NxPMap::data [variable] - -> compilation error W1036: Py++ can not expose pointer to Python - -> immutable member variables. This could be changed in future. - - -WARNING: NxShapeDesc [class] - -> warning W1025: Py++ will generate class wrapper - class contains - -> "ccdSkeleton" - T* member variable - - -WARNING: NxShapeDesc [class] - -> warning W1031: Py++ will generate class wrapper - user asked to expose - -> non - public member function "NxShapeDesc" - - -WARNING: NxShapeDesc::userData [variable] - -> compilation error W1036: Py++ can not expose pointer to Python - -> immutable member variables. This could be changed in future. - - -WARNING: NxShapeDesc::name [variable] - -> compilation error W1036: Py++ can not expose pointer to Python - -> immutable member variables. This could be changed in future. - - -WARNING: bool NxUserContactModify::onContactConstraint(NxU32 & changeFlags, NxShape const * shape0, NxShape const * shape1, unsigned int const featureIndex0, unsigned int const featureIndex1, NxUserContactModify::NxContactCallbackData & data) [member function] - -> execution error W1009: The function takes as argument - -> (name=changeFlags, pos=... [truncated message content] |
From: <and...@us...> - 2008-02-16 01:21:21
|
Revision: 566 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=566&view=rev Author: andy_miller Date: 2008-02-15 17:21:27 -0800 (Fri, 15 Feb 2008) Log Message: ----------- Various Updates for the 1.2 release Modified Paths: -------------- trunk/python-ogre/demos/nxogre/BetaGui.py trunk/python-ogre/demos/nxogre/CakeFramework.py trunk/python-ogre/demos/nxogre/config.yaml trunk/python-ogre/demos/nxogre/plugins.cfg trunk/python-ogre/demos/ogre/tests/Test_ConfigFile.py trunk/python-ogre/demos/ogre/tests/Test_Corners.py trunk/python-ogre/demos/ogre/tests/Test_RenderQueue.py trunk/python-ogre/demos/ogre/tests/Test_TextureGetByName.py trunk/python-ogre/demos/ogre/tests/Test_WriteToTexture.py trunk/python-ogre/demos/ogre/tests/test.material trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.down.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.over.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.checked.down.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.checked.over.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.checked.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.image.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.scrollbar.horizontal.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.scrollbar.horizontal.slider.down.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.scrollbar.horizontal.slider.over.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.scrollbar.horizontal.slider.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.scrollbar.vertical.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.scrollbar.vertical.slider.down.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.scrollbar.vertical.slider.over.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.scrollbar.vertical.slider.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.window.border.bottom.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.window.border.left.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.window.border.right.png trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.window.border.top.png trunk/python-ogre/demos/qgui/plugins.cfg Modified: trunk/python-ogre/demos/nxogre/BetaGui.py =================================================================== --- trunk/python-ogre/demos/nxogre/BetaGui.py 2008-02-15 10:55:55 UTC (rev 565) +++ trunk/python-ogre/demos/nxogre/BetaGui.py 2008-02-16 01:21:27 UTC (rev 566) @@ -69,7 +69,7 @@ mDragWindowX + (x - self.mDragX), mDragWindowY + (y - self.mDragY) ) - return True + return True elif (self.mDragWindowAction != WA_NONE): self.mDragWindowAction = WA_NONE self.mActiveDraggedWindow = None Modified: trunk/python-ogre/demos/nxogre/CakeFramework.py =================================================================== --- trunk/python-ogre/demos/nxogre/CakeFramework.py 2008-02-15 10:55:55 UTC (rev 565) +++ trunk/python-ogre/demos/nxogre/CakeFramework.py 2008-02-16 01:21:27 UTC (rev 566) @@ -443,11 +443,11 @@ ##///////////////////////////////////////////////////////////////////////////// -class Frosting ( Decoration, BetaGUI.BetaGUIListener ): +class Frosting ( Decoration, BetaGUI.GUIListener ): def __init__(self, r, i, t) : - BetaGUI.BetaGUIListener.__init__(self) + BetaGUI.GUIListener.__init__(self) Decoration.__init__(self,r,i,t) self.SceneMgr = r.createSceneMgr("Main") self.Camera = self.SceneMgr.createCamera("Main") @@ -513,13 +513,16 @@ self.SceneMgr.setShadowCameraSetup(self.shadowCamera) - self.Gui = BetaGUI.GUI("SandBoxGUI", "nxogrefont", 14, self.Renderer.getWindow()) +# self.Gui = BetaGUI.GUI("SandBoxGUI", "nxogrefont", 14, self.Renderer.getWindow()) + self.Gui = BetaGUI.GUI( self.Renderer.getWindow()) - self.Cursor = self.Gui.createMousePointer(ogre.Vector2(24, 24), "bgui.pointer") +# self.Cursor = self.Gui.createMousePointer(ogre.Vector2(24, 24), "bgui.pointer") + self.Cursor = self.Gui.createMousePointer("bgui.pointer",24,24) self.Gui.injectMouse(200,200, False) self.Cursor.hide() - self.WidgetMenu = self.Gui.createWindow(ogre.Vector4(100,100,64,128), "widget.mm", BetaGUI.WindowFeatureType.WFT_NONE, "") +# self.WidgetMenu = self.Gui.createWindow(ogre.Vector4(100,100,64,128), "widget.mm", BetaGUI.WindowFeatureType.WFT_NONE, "") + self.WidgetMenu = self.Gui.createWindow(100,100,64,128, "widget.mm", BetaGUI.WindowFeatureType.WFT_NONE, "", self) self.callback = BetaGUI.Callback(self) self.WidgetMenuButton=[] Modified: trunk/python-ogre/demos/nxogre/config.yaml =================================================================== --- trunk/python-ogre/demos/nxogre/config.yaml 2008-02-15 10:55:55 UTC (rev 565) +++ trunk/python-ogre/demos/nxogre/config.yaml 2008-02-16 01:21:27 UTC (rev 566) @@ -6,4 +6,5 @@ aa:0 vsync:No fullscreen:No -pluginspath:../../../root/usr/lib/OGRE +pluginspath:../../plugins +#pluginspath:../../../root/usr/lib/OGRE Modified: trunk/python-ogre/demos/nxogre/plugins.cfg =================================================================== --- trunk/python-ogre/demos/nxogre/plugins.cfg 2008-02-15 10:55:55 UTC (rev 565) +++ trunk/python-ogre/demos/nxogre/plugins.cfg 2008-02-16 01:21:27 UTC (rev 566) @@ -2,18 +2,19 @@ ## Use this for Windows # Define plugin folder -PluginFolder=../../../root/usr/lib/OGRE -#Plugin=RenderSystem_GL.dll -#Plugin=RenderSystem_Direct3D9.dll -#Plugin=Plugin_ParticleFX.dll -#Plugin=Plugin_BSPSceneManager.dll -#Plugin=Plugin_OctreeSceneManager.dll -#Plugin=Plugin_CgProgramManager.dll +PluginFolder=../../plugins +Plugin=RenderSystem_GL.dll +Plugin=RenderSystem_Direct3D9.dll +Plugin=Plugin_ParticleFX.dll +Plugin=Plugin_BSPSceneManager.dll +Plugin=Plugin_OctreeSceneManager.dll +Plugin=Plugin_CgProgramManager.dll ## ## NOTE use this for MacOS or Linux -Plugin=RenderSystem_GL -Plugin=Plugin_ParticleFX -Plugin=Plugin_BSPSceneManager -Plugin=Plugin_OctreeSceneManager -Plugin=Plugin_CgProgramManager +#PluginFolder=../../../root/usr/lib/OGRE +#Plugin=RenderSystem_GL +#Plugin=Plugin_ParticleFX +#Plugin=Plugin_BSPSceneManager +#Plugin=Plugin_OctreeSceneManager +#Plugin=Plugin_CgProgramManager Modified: trunk/python-ogre/demos/ogre/tests/Test_ConfigFile.py =================================================================== --- trunk/python-ogre/demos/ogre/tests/Test_ConfigFile.py 2008-02-15 10:55:55 UTC (rev 565) +++ trunk/python-ogre/demos/ogre/tests/Test_ConfigFile.py 2008-02-16 01:21:27 UTC (rev 566) @@ -23,7 +23,3 @@ for item in Section: print SectionName, item.key, item.value -config = Ogre.ConfigFile() -config.load_special('resources.cfg' ) #, '', False ) -for section, key, path in config.values: - print section, key, path \ No newline at end of file Modified: trunk/python-ogre/demos/ogre/tests/Test_Corners.py =================================================================== --- trunk/python-ogre/demos/ogre/tests/Test_Corners.py 2008-02-15 10:55:55 UTC (rev 565) +++ trunk/python-ogre/demos/ogre/tests/Test_Corners.py 2008-02-16 01:21:27 UTC (rev 566) @@ -8,42 +8,14 @@ import SampleFramework import math -class FilePtr ( ogre.DataStream ): - def __init__ ( self, filename ): - ogre.DataStream.__init__(self) - datain = file(filename, 'r').read() # should put error checking etc here - self.length = len ( datain ) - self.source = ctypes.create_string_buffer( datain ) ## Note it allocates one extra byte - def read ( self, dest, size ): - if size <= self.length: - print ogre.CastInt(dest) - ctypes.memmove ( ogre.CastInt(dest), self.source, size ) # again should check here for - def size ( self ): - return self.length - + class TutorialApplication(SampleFramework.Application): def _createScene(self): sm = self.sceneManager -# f= file("test.material", 'r') -# MatString = f.read() -# RawMemBuffer = ctypes.create_string_buffer( MatString ) ## Note it allocates one extra byte -# dataptr = ogre.MemoryDataStream ( ctypes.addressof ( RawMemBuffer ), len (MatString) + 1 ) -# ogre.MaterialManager.getSingleton().parseScript( dataptr, "General" ) -# print "MATERIAL OK" - fp = FilePtr ( "test.material") - print "##", fp - dataptr = ogre.MemoryDataStream ( fp ) - ogre.MaterialManager.getSingleton().parseScript( dataptr, "General" ) - print "MATERIAL OK" - - try: - - - entity = self.sceneManager.getEntity("Junk") except ogre.OgreItemIdentityException, e: print"\nException OK: OgreItemIdentityException \n",e, "\n" @@ -67,7 +39,12 @@ node1.attachObject(ent1) # should fail as you can only attach once except ogre.OgreInvalidParametersException, e: print "Exception OK\n", e, "\n" - dummy = node1.getAttachedObject ("doesnt_exist") + + try: + dummy = node1.getAttachedObject ("doesnt_exist") + except ogre.OgreItemIdentityException, e: + print "Exception OK\n", e, "\n" + ent2 = sm.createEntity("Robot2",'robot.mesh') Modified: trunk/python-ogre/demos/ogre/tests/Test_RenderQueue.py =================================================================== --- trunk/python-ogre/demos/ogre/tests/Test_RenderQueue.py 2008-02-15 10:55:55 UTC (rev 565) +++ trunk/python-ogre/demos/ogre/tests/Test_RenderQueue.py 2008-02-16 01:21:27 UTC (rev 566) @@ -6,12 +6,17 @@ ogre.RenderQueueListener.__init__(self) def renderQueueStarted (self, id , invocation, skipThisInvocation): - + print "In Queue Started", id, invocation, skipThisInvocation + print ogre.RENDER_QUEUE_OVERLAY + print type (id) + print type (ogre.RENDER_QUEUE_OVERLAY) if (id == ogre.RENDER_QUEUE_OVERLAY): print "Queue Start Skip %i %i " % (id,ogre.RENDER_QUEUE_OVERLAY) return True + print "returning false" return False def renderQueueEnded (self, id , invocation,repeatThisInvocation): + print "In QueueEnded" if (id == ogre.RENDER_QUEUE_OVERLAY): print "Queue End Repeat %i %i" % (id, ogre.RENDER_QUEUE_OVERLAY) return False Modified: trunk/python-ogre/demos/ogre/tests/Test_TextureGetByName.py =================================================================== --- trunk/python-ogre/demos/ogre/tests/Test_TextureGetByName.py 2008-02-15 10:55:55 UTC (rev 565) +++ trunk/python-ogre/demos/ogre/tests/Test_TextureGetByName.py 2008-02-16 01:21:27 UTC (rev 566) @@ -6,7 +6,9 @@ class TestApplication(sf.Application): def _createScene(self): sceneManager = self.sceneManager - +# # result = materialManager.createOrRetrieve(texture, group) +# # created = result.second +# # material = materialManager.getByName(texture) ## getByName returns a 'Resource' object tm=ogre.TextureManager.getSingleton() for r in tm.getResourceIterator(): Modified: trunk/python-ogre/demos/ogre/tests/Test_WriteToTexture.py =================================================================== --- trunk/python-ogre/demos/ogre/tests/Test_WriteToTexture.py 2008-02-15 10:55:55 UTC (rev 565) +++ trunk/python-ogre/demos/ogre/tests/Test_WriteToTexture.py 2008-02-16 01:21:27 UTC (rev 566) @@ -13,8 +13,6 @@ import SampleFramework as sf import ctypes - - def WriteToTexture(in_string, destTexture, destRectangle, font, color, justify = 'l', wordwrap = True): if destTexture.getHeight() < destRectangle.bottom: destRectangle.bottom = destTexture.getHeight() Modified: trunk/python-ogre/demos/ogre/tests/test.material =================================================================== --- trunk/python-ogre/demos/ogre/tests/test.material 2008-02-15 10:55:55 UTC (rev 565) +++ trunk/python-ogre/demos/ogre/tests/test.material 2008-02-16 01:21:27 UTC (rev 566) @@ -13,4 +13,4 @@ } } } -} +} \ No newline at end of file Modified: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.down.png =================================================================== (Binary files differ) Modified: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.over.png =================================================================== (Binary files differ) Modified: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.button.png =================================================================== (Binary files differ) Modified: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.checked.down.png =================================================================== (Binary files differ) Modified: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.checked.over.png =================================================================== (Binary files differ) Modified: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.checked.png =================================================================== (Binary files differ) Modified: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.image.png =================================================================== (Binary files differ) Modified: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.scrollbar.horizontal.png =================================================================== (Binary files differ) Modified: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.scrollbar.horizontal.slider.down.png =================================================================== (Binary files differ) Modified: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.scrollbar.horizontal.slider.over.png =================================================================== (Binary files differ) Modified: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.scrollbar.horizontal.slider.png =================================================================== (Binary files differ) Modified: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.scrollbar.vertical.png =================================================================== (Binary files differ) Modified: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.scrollbar.vertical.slider.down.png =================================================================== (Binary files differ) Modified: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.scrollbar.vertical.slider.over.png =================================================================== (Binary files differ) Modified: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.scrollbar.vertical.slider.png =================================================================== (Binary files differ) Modified: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.window.border.bottom.png =================================================================== (Binary files differ) Modified: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.window.border.left.png =================================================================== (Binary files differ) Modified: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.window.border.right.png =================================================================== (Binary files differ) Modified: trunk/python-ogre/demos/qgui/media/skins/qgui/qgui.window.border.top.png =================================================================== (Binary files differ) Modified: trunk/python-ogre/demos/qgui/plugins.cfg =================================================================== --- trunk/python-ogre/demos/qgui/plugins.cfg 2008-02-15 10:55:55 UTC (rev 565) +++ trunk/python-ogre/demos/qgui/plugins.cfg 2008-02-16 01:21:27 UTC (rev 566) @@ -2,18 +2,18 @@ ## Use this for Windows # Define plugin folder -PluginFolder=/home/andy/development/root/usr/lib/OGRE -#Plugin=RenderSystem_GL.dll -#Plugin=RenderSystem_Direct3D9.dll -#Plugin=Plugin_ParticleFX.dll -#Plugin=Plugin_BSPSceneManager.dll -#Plugin=Plugin_OctreeSceneManager.dll -#Plugin=Plugin_CgProgramManager.dll +PluginFolder=../../plugins +Plugin=RenderSystem_GL.dll +Plugin=RenderSystem_Direct3D9.dll +Plugin=Plugin_ParticleFX.dll +Plugin=Plugin_BSPSceneManager.dll +Plugin=Plugin_OctreeSceneManager.dll +Plugin=Plugin_CgProgramManager.dll ## ## NOTE use this for MacOS or Linux - Plugin=RenderSystem_GL - Plugin=Plugin_ParticleFX - Plugin=Plugin_BSPSceneManager - Plugin=Plugin_OctreeSceneManager - Plugin=Plugin_CgProgramManager +# Plugin=RenderSystem_GL +# Plugin=Plugin_ParticleFX +# Plugin=Plugin_BSPSceneManager +# Plugin=Plugin_OctreeSceneManager +# Plugin=Plugin_CgProgramManager This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2008-02-15 10:55:50
|
Revision: 565 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=565&view=rev Author: andy_miller Date: 2008-02-15 02:55:55 -0800 (Fri, 15 Feb 2008) Log Message: ----------- Particle Universe Media update Modified Paths: -------------- trunk/python-ogre/demos/particleuniverse/Media/ParticleUniverse/gui/puviewer.layout trunk/python-ogre/demos/particleuniverse/Media/ParticleUniverse/scripts/pu_example_11_20.pu trunk/python-ogre/demos/particleuniverse/Media/ParticleUniverse/scripts/pu_example_1_10.pu trunk/python-ogre/demos/particleuniverse/Media/ParticleUniverse/scripts/pu_example_21_30.pu trunk/python-ogre/demos/particleuniverse/Media/ParticleUniverse/scripts/pu_explosion.pu trunk/python-ogre/demos/particleuniverse/Media/ParticleUniverse/scripts/pu_flame.pu trunk/python-ogre/demos/particleuniverse/Media/ParticleUniverse/scripts/pu_lightning.pu trunk/python-ogre/demos/particleuniverse/Media/ParticleUniverse/scripts/pu_rain.pu trunk/python-ogre/demos/particleuniverse/Media/ParticleUniverse/scripts/pu_tornado.pu Modified: trunk/python-ogre/demos/particleuniverse/Media/ParticleUniverse/gui/puviewer.layout =================================================================== --- trunk/python-ogre/demos/particleuniverse/Media/ParticleUniverse/gui/puviewer.layout 2008-02-13 09:29:59 UTC (rev 564) +++ trunk/python-ogre/demos/particleuniverse/Media/ParticleUniverse/gui/puviewer.layout 2008-02-15 10:55:55 UTC (rev 565) @@ -51,15 +51,22 @@ <Property Name="Text" Value="Stop" /> </Window> + <Window Type="TaharezLook/Button" Name="ParticleUniverseViewer/ButtonQuit"> + <Property Name="UnifiedPosition" Value="{{0.1,0},{0.82,0}}" /> + <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> + <Property Name="UnifiedSize" Value="{{0.8,0},{0.05,0}}" /> + <Property Name="Text" Value="Quit" /> + </Window> + <Window Type="TaharezLook/Checkbox" Name="ParticleUniverseViewer/CheckResetCamera" > - <Property Name="UnifiedPosition" Value="{{0.1,0},{0.82,0}}" /> + <Property Name="UnifiedPosition" Value="{{0.1,0},{0.88,0}}" /> <Property Name="Text" Value="Reset Camera" /> <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> <Property Name="UnifiedSize" Value="{{0.8,0},{0.05,0}}" /> </Window> <Window Type="TaharezLook/Checkbox" Name="ParticleUniverseViewer/CheckSkybox" > - <Property Name="UnifiedPosition" Value="{{0.1,0},{0.88,0}}" /> + <Property Name="UnifiedPosition" Value="{{0.1,0},{0.94,0}}" /> <Property Name="Text" Value="Skybox" /> <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> <Property Name="UnifiedSize" Value="{{0.8,0},{0.05,0}}" /> Modified: trunk/python-ogre/demos/particleuniverse/Media/ParticleUniverse/scripts/pu_example_11_20.pu =================================================================== --- trunk/python-ogre/demos/particleuniverse/Media/ParticleUniverse/scripts/pu_example_11_20.pu 2008-02-13 09:29:59 UTC (rev 564) +++ trunk/python-ogre/demos/particleuniverse/Media/ParticleUniverse/scripts/pu_example_11_20.pu 2008-02-15 10:55:55 UTC (rev 565) @@ -101,7 +101,7 @@ // Change the scale of the particle affector Scale { - scale 10 + xyz_scale 10 } // Apply a boost if the Jet affector is enabled @@ -124,6 +124,8 @@ // --------------------------------------------------------------------------------------------------------------- system example_013 { + scale 0.5 0.5 0.5 + scale_velocity 0.5 technique { use_alias $defaultBillboardRenderer @@ -218,6 +220,7 @@ // --------------------------------------------------------------------------------------------------------------- system example_016 { + technique { renderer Billboard Modified: trunk/python-ogre/demos/particleuniverse/Media/ParticleUniverse/scripts/pu_example_1_10.pu =================================================================== --- trunk/python-ogre/demos/particleuniverse/Media/ParticleUniverse/scripts/pu_example_1_10.pu 2008-02-13 09:29:59 UTC (rev 564) +++ trunk/python-ogre/demos/particleuniverse/Media/ParticleUniverse/scripts/pu_example_1_10.pu 2008-02-15 10:55:55 UTC (rev 565) @@ -89,6 +89,8 @@ // --------------------------------------------------------------------------------------------------------------- system example_003 { + scale 0.5 0.5 0.5 + scale_velocity 0.5 technique { position 500 0 0 @@ -159,9 +161,10 @@ // --------------------------------------------------------------------------------------------------------------- system example_005 { + scale 5 5 5 + scale_velocity 5 technique { - position 0 0 1000 // Use the billboard renderer defined in the *.pua script use_alias $defaultBillboardRenderer material ParticleUniverse/Star @@ -175,7 +178,7 @@ vertex_em_segments 5 vertex_em_iterations 5 position 0 0 0 - emission_rate 500 + emission_rate 400 angle 360 direction 0 1 0 velocity 2 Modified: trunk/python-ogre/demos/particleuniverse/Media/ParticleUniverse/scripts/pu_example_21_30.pu =================================================================== --- trunk/python-ogre/demos/particleuniverse/Media/ParticleUniverse/scripts/pu_example_21_30.pu 2008-02-13 09:29:59 UTC (rev 564) +++ trunk/python-ogre/demos/particleuniverse/Media/ParticleUniverse/scripts/pu_example_21_30.pu 2008-02-15 10:55:55 UTC (rev 565) @@ -58,13 +58,13 @@ { // Set the quota low visual_particle_quota 40 - default_particle_width 10 material ParticleUniverse/RibbonTrail renderer RibbonTrail { ribbontrail_vertex_colours true ribbontrail_max_elements 60 ribbontrail_length 600 + ribbontrail_width 10 ribbontrail_random_initial_colour true ribbontrail_colour_change 0.8 0.8 0.8 0.8 } @@ -141,3 +141,115 @@ } } } + +// --------------------------------------------------------------------------------------------------------------- +// example_024a and example_024b: +// This is combination of Particle Systems where the emitter of Particle System 'example_024a' emits +// Particle System 'example_024b' particles. +// With the use of the 'keep_local' attribute, the 'star' material sticks to the emitted particle system. +// --------------------------------------------------------------------------------------------------------------- +system example_024a +{ + technique + { + emitted_system_quota 10 + visual_particle_quota 10 + material ParticleUniverse/RibbonTrail + renderer RibbonTrail + { + ribbontrail_vertex_colours true + ribbontrail_max_elements 40 + ribbontrail_length 1000 + ribbontrail_width 15 + ribbontrail_random_initial_colour true + ribbontrail_colour_change 0.8 0.8 0.8 0.8 + } + + emitter Point + { + emits system_particle example_024b + angle 60 + emission_rate 1 + direction 0 1 0 + velocity 400 + time_to_live 7 + } + affector LinearForce + { + force_aff_vector 0 -200 0 + } + } +} + +system example_024b +{ + technique + { + default_particle_width 160 + default_particle_height 160 + visual_particle_quota 1 + material ParticleUniverse/Star + use_alias $defaultBillboardRenderer + keep_local true + + emitter Point + { + angle 360 + emission_rate 1 + force_emission true + direction 0 0 0 + velocity 0 + time_to_live 7 + } + } + technique + { + default_particle_width 10 + default_particle_height 10 + visual_particle_quota 100 + use_alias $defaultBillboardRenderer + material Examples/Flare + + emitter Point + { + angle 360 + emission_rate 50 + direction 0 -1 0 + velocity 100 + time_to_live 2 + } + affector LinearForce + { + force_aff_vector 0 -200 0 + } + } +} + +// --------------------------------------------------------------------------------------------------------------- +// example_025: PositionEmitter +// --------------------------------------------------------------------------------------------------------------- +system example_025 +{ + technique + { + default_particle_width 100 + default_particle_height 100 + use_alias $defaultBillboardRenderer + material Examples/Flare + emitter Position + { + emission_rate 10 + time_to_live 3 + random_position true + add_position 200 100 300 + add_position 0 400 0 + add_position -200 200 -100 + add_position 100 -200 0 + } + affector LinearForce + { + force_aff_vector 0 -200 0 + } + } +} + Modified: trunk/python-ogre/demos/particleuniverse/Media/ParticleUniverse/scripts/pu_explosion.pu =================================================================== --- trunk/python-ogre/demos/particleuniverse/Media/ParticleUniverse/scripts/pu_explosion.pu 2008-02-13 09:29:59 UTC (rev 564) +++ trunk/python-ogre/demos/particleuniverse/Media/ParticleUniverse/scripts/pu_explosion.pu 2008-02-15 10:55:55 UTC (rev 565) @@ -33,7 +33,7 @@ // Let it grow fast, equally in all dimensions affector Scale { - scale 200 + xyz_scale 200 } // After 0.7 seconds, the emitters stops @@ -133,7 +133,7 @@ // Make the projectile smaller over time affector Scale { - scale -5 + xyz_scale -5 } } Modified: trunk/python-ogre/demos/particleuniverse/Media/ParticleUniverse/scripts/pu_flame.pu =================================================================== --- trunk/python-ogre/demos/particleuniverse/Media/ParticleUniverse/scripts/pu_flame.pu 2008-02-13 09:29:59 UTC (rev 564) +++ trunk/python-ogre/demos/particleuniverse/Media/ParticleUniverse/scripts/pu_flame.pu 2008-02-15 10:55:55 UTC (rev 565) @@ -73,7 +73,7 @@ // Affector that affects all (visual) particles in general affector Scale { - scale -10 + xyz_scale -10 } // Affect with a random Sine force (also affects the Gravity affector particles) @@ -109,7 +109,7 @@ renderer Billboard { - // Put the fire in front of the smoke (just for testing) + // Put the fire in front of the smoke render_queue_group 80 } @@ -141,7 +141,7 @@ affector Scale { - scale -5 + xyz_scale -5 } affector Colour @@ -179,7 +179,7 @@ affector Scale { - scale 20 + xyz_scale 20 } affector Colour Modified: trunk/python-ogre/demos/particleuniverse/Media/ParticleUniverse/scripts/pu_lightning.pu =================================================================== --- trunk/python-ogre/demos/particleuniverse/Media/ParticleUniverse/scripts/pu_lightning.pu 2008-02-13 09:29:59 UTC (rev 564) +++ trunk/python-ogre/demos/particleuniverse/Media/ParticleUniverse/scripts/pu_lightning.pu 2008-02-15 10:55:55 UTC (rev 565) @@ -31,7 +31,7 @@ affector Line { - line_aff_max_deviation 140 + line_aff_max_deviation 100 line_aff_time_step 0.03 line_aff_end 1500 300 0 line_aff_drift 0.3 @@ -68,7 +68,7 @@ affector Line { - line_aff_max_deviation 200 + line_aff_max_deviation 140 line_aff_time_step 0.01 line_aff_end 1500 300 0 line_aff_drift 0.1 Modified: trunk/python-ogre/demos/particleuniverse/Media/ParticleUniverse/scripts/pu_rain.pu =================================================================== --- trunk/python-ogre/demos/particleuniverse/Media/ParticleUniverse/scripts/pu_rain.pu 2008-02-13 09:29:59 UTC (rev 564) +++ trunk/python-ogre/demos/particleuniverse/Media/ParticleUniverse/scripts/pu_rain.pu 2008-02-15 10:55:55 UTC (rev 565) @@ -78,7 +78,7 @@ affector Scale { - scale 40 + xyz_scale 40 } } @@ -214,7 +214,7 @@ affector Scale { - scale 40 + xyz_scale 40 } } Modified: trunk/python-ogre/demos/particleuniverse/Media/ParticleUniverse/scripts/pu_tornado.pu =================================================================== --- trunk/python-ogre/demos/particleuniverse/Media/ParticleUniverse/scripts/pu_tornado.pu 2008-02-13 09:29:59 UTC (rev 564) +++ trunk/python-ogre/demos/particleuniverse/Media/ParticleUniverse/scripts/pu_tornado.pu 2008-02-15 10:55:55 UTC (rev 565) @@ -8,7 +8,7 @@ { renderer Billboard { - billboard_sorting true + sorting true } material ParticleUniverse/Tornado default_particle_width 250 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2008-02-13 09:29:54
|
Revision: 564 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=564&view=rev Author: andy_miller Date: 2008-02-13 01:29:59 -0800 (Wed, 13 Feb 2008) Log Message: ----------- syntax error Modified Paths: -------------- trunk/python-ogre/code_generators/physx/hand_made_wrappers.py Modified: trunk/python-ogre/code_generators/physx/hand_made_wrappers.py =================================================================== --- trunk/python-ogre/code_generators/physx/hand_made_wrappers.py 2008-02-13 09:28:50 UTC (rev 563) +++ trunk/python-ogre/code_generators/physx/hand_made_wrappers.py 2008-02-13 09:29:59 UTC (rev 564) @@ -141,7 +141,7 @@ returnType = f.return_type.decl_string if 'void' in returnType or returnType == '' : returnSomething = '' - else + else: returnSomething = 'return' values = { 'returnType':returnType, 'function_name':funcname, 'classname':classname, 'getsizefunction' : getsizefunction, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2008-02-13 09:28:54
|
Revision: 563 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=563&view=rev Author: andy_miller Date: 2008-02-13 01:28:50 -0800 (Wed, 13 Feb 2008) Log Message: ----------- Updates to various module code generation for 1.2 release Modified Paths: -------------- trunk/python-ogre/code_generators/bullet/generate_code.py trunk/python-ogre/code_generators/bullet/python_bullet_aliases.h trunk/python-ogre/code_generators/nxogre/generate_code.py trunk/python-ogre/code_generators/nxogre/python_nxogre.h trunk/python-ogre/code_generators/nxogre/python_nxogre_aliases.h trunk/python-ogre/code_generators/nxogre_09/customization_data.py trunk/python-ogre/code_generators/nxogre_09/generate_code.py trunk/python-ogre/code_generators/nxogre_09/python_nxogre.h trunk/python-ogre/code_generators/nxogre_09/python_nxogre_aliases.h trunk/python-ogre/code_generators/nxogre_09/python_nxogre_sizeof.h trunk/python-ogre/code_generators/ogre/generate_code.py trunk/python-ogre/code_generators/ogre/hand_made_wrappers.py trunk/python-ogre/code_generators/opcode/generate_code.py trunk/python-ogre/code_generators/physx/1 trunk/python-ogre/code_generators/physx/generate_code.py trunk/python-ogre/code_generators/physx/hand_made_wrappers.py trunk/python-ogre/code_generators/quickgui/generate_code.py trunk/python-ogre/code_generators/quickgui/python_quickgui_aliases.h Modified: trunk/python-ogre/code_generators/bullet/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/bullet/generate_code.py 2008-02-13 09:25:34 UTC (rev 562) +++ trunk/python-ogre/code_generators/bullet/generate_code.py 2008-02-13 09:28:50 UTC (rev 563) @@ -60,8 +60,13 @@ for m in c.member_functions(): if m.name in excludes: m.exclude() - excludes=['::btAlignedObjectArray<int>::expand' - ,'::btCollisionDispatcher::getNewManifold' + excludes=['resize', 'expand'] #needs 'T' changed to native class + for c in global_ns.classes(): + if 'btAlignedObjectArray' in c.name: + for m in c.member_functions(): + if m.name in excludes: + m.exclude() + excludes=[ '::btCollisionDispatcher::getNewManifold' ,'::btCollisionDispatcher::defaultNearCallback' ,'::btCollisionDispatcher::getInternalManifoldPointer' ,'::btCollisionDispatcher::getNearCallback' @@ -101,16 +106,16 @@ excludes = ['btAlignedAllocator<btCollisionObject*, 16u>' # ,'btAlignedAllocator<btCollisionShape*, 16>' ,'btAlignedAllocator<int, 16u>' + ,'btAlignedAllocator<float, 16u>' ,'btAlignedAllocator<btPersistentManifold*, 16u>' ,'btAlignedAllocator<btTypedConstraint*, 16u>' ,'btAlignedAllocator<btRaycastVehicle*, 16u>' - - ,'btAlignedObjectArray<btIndexedMesh>' - ,'btAlignedObjectArray<int>' - ,'btAlignedObjectArray<btQuantizedBvhNode>' - ,'btAlignedObjectArray<btOptimizedBvhNode>' - ,'btAlignedObjectArray<btCollisionObject*>' +# ,'btAlignedObjectArray<btIndexedMesh>' +# ,'btAlignedObjectArray<int>' +# ,'btAlignedObjectArray<btQuantizedBvhNode>' +# ,'btAlignedObjectArray<btOptimizedBvhNode>' +# ,'btAlignedObjectArray<btCollisionObject*>' ] for e in excludes: print "excluding class", e Modified: trunk/python-ogre/code_generators/bullet/python_bullet_aliases.h =================================================================== --- trunk/python-ogre/code_generators/bullet/python_bullet_aliases.h 2008-02-13 09:25:34 UTC (rev 562) +++ trunk/python-ogre/code_generators/bullet/python_bullet_aliases.h 2008-02-13 09:28:50 UTC (rev 563) @@ -6,6 +6,7 @@ typedef btAlignedObjectArray<btBvhSubtreeInfo> BvhSubtreeInfoArray; typedef btAlignedAllocator<btWheelInfo, 16> btWheelInfo16; typedef btAlignedObjectArray<int> IntArray; +typedef btAlignedObjectArray<float> FloatArray; typedef btAlignedObjectArray<btVector3> btVector3Array; typedef btAlignedObjectArray<btRaycastVehicle*> btRaycastVehiclePtrArray; typedef btAlignedObjectArray<btTypedConstraint*> btTypesConstraintPtrArray; Modified: trunk/python-ogre/code_generators/nxogre/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/nxogre/generate_code.py 2008-02-13 09:25:34 UTC (rev 562) +++ trunk/python-ogre/code_generators/nxogre/generate_code.py 2008-02-13 09:28:50 UTC (rev 563) @@ -52,6 +52,9 @@ def ManualExclude ( mb ): global_ns = mb.global_ns main_ns = global_ns.namespace( MAIN_NAMESPACE ) + return + + for c in main_ns.classes(): if c.decl_string.startswith('::NxOgre::Container<') and '*' not in c.decl_string: print "EXCLUDING: ", c @@ -158,7 +161,7 @@ ] for e in excludes: print "excluding ", e - main_ns.member_functions(e).exclude() +# # # main_ns.member_functions(e).exclude() ## this is probably excessive :) names = ['_begin','_end', '_atEnd', '_next'] @@ -190,7 +193,7 @@ ] for e in excludes: print "Excluding", e - main_ns.class_(e).exclude() +# # main_ns.class_(e).exclude() # # # # # # ## I have a challenge that Py++ doesn't recognise these classes by full name (perhaps because they are structs?) @@ -207,19 +210,19 @@ print ("Checking:",c.name) if c.name in excludeName: print ("SPECIAL excluding ", c.name) - c.exclude() +# # c.exclude() # a temporary fix for container based classes -- still an issue with them though... # AND this is an overkill -- not all classes need these removed... - if c.decl_string.startswith ('::NxOgre::Container<'): - for f in c.member_functions(allow_empty=True): - if f.name in ['begin','get','next','destroyAndEraseAll','destroyAllOwned','CopyTo']: - f.exclude() +# # if c.decl_string.startswith ('::NxOgre::Container<'): +# # for f in c.member_functions(allow_empty=True): +# # if f.name in ['begin','get','next','destroyAndEraseAll','destroyAllOwned','CopyTo']: +# # f.exclude() ### Variables excludes = ['::NxOgre::WheelSet::mEngine' # desctuctor in WheelSet is protected so can't wrap this.. ] - for e in excludes: - main_ns.variable(e).exclude() +# for e in excludes: +# main_ns.variable(e).exclude() ### Typedefs excludes = [ @@ -230,15 +233,15 @@ ### Operators excludes=['::NxOgre::Container<std::string, NxOgre::FluidDrain*>::operator[]' ,'::NxOgre::Container<std::string, NxOgre::FluidEmitter*>::operator[]'] - for e in excludes: - main_ns.operators(e).exclude() - +# for e in excludes: +# main_ns.operators(e).exclude() +# ### Constructors - for c in main_ns.class_('::NxOgre::Pose').constructors(): ## these hide the working constructors - for a in c.arguments: - if 'NxVec3' in a.type.decl_string or 'NxQuat' in a.type.decl_string: - c.exclude() - break +# # for c in main_ns.class_('::NxOgre::Pose').constructors(): ## these hide the working constructors +# # for a in c.arguments: +# # if 'NxVec3' in a.type.decl_string or 'NxQuat' in a.type.decl_string: +# # c.exclude() +# # break # # # ############################################################ @@ -250,6 +253,7 @@ def ManualInclude ( mb ): global_ns = mb.global_ns main_ns = global_ns.namespace( MAIN_NAMESPACE ) + return # for f in main_ns.member_functions(): # print f # sys.exit() @@ -257,7 +261,7 @@ c.include() for m in c.member_functions(): m.exclude() - c.member_function('getGlobalPosition').include() ## this is the only function implemented +# c.member_function('getGlobalPosition').include() ## this is the only function implemented # # global_ns.namespace( 'Ogre' ).class_('AxisAlignedBox').include(already_exposed=True) # # global_ns.namespace( 'Ogre' ).class_('Radian').include(already_exposed=True) @@ -293,6 +297,7 @@ # fix issue where the namespace isn't in the default values main_ns = global_ns.namespace( MAIN_NAMESPACE ) + return for c in main_ns.constructors(): for a in c.arguments: Modified: trunk/python-ogre/code_generators/nxogre/python_nxogre.h =================================================================== --- trunk/python-ogre/code_generators/nxogre/python_nxogre.h 2008-02-13 09:25:34 UTC (rev 562) +++ trunk/python-ogre/code_generators/nxogre/python_nxogre.h 2008-02-13 09:28:50 UTC (rev 563) @@ -1,7 +1,7 @@ #include "NxOgre.h" -#include "NxOgreSkeleton.h" //missing ?? -#include "NxOgreResourceMesh.h" // not included anywhere by default... +// // #include "NxOgreSkeleton.h" //missing ?? +// // #include "NxOgreResourceMesh.h" // not included anywhere by default... #include "Ogre.h" #include "OgrePlugin.h" #include <NxPhysics.h> Modified: trunk/python-ogre/code_generators/nxogre/python_nxogre_aliases.h =================================================================== --- trunk/python-ogre/code_generators/nxogre/python_nxogre_aliases.h 2008-02-13 09:25:34 UTC (rev 562) +++ trunk/python-ogre/code_generators/nxogre/python_nxogre_aliases.h 2008-02-13 09:28:50 UTC (rev 563) @@ -11,8 +11,8 @@ PairString; typedef NxOgre::List<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > ListString; -typedef NxOgre::List<NxOgre::Blueprints::ActorBlueprint*> ListBlueprints; -typedef NxOgre::Container<unsigned, NxOgre::ShapeBlueprint const&> ContainerShapeBlueprint; +// typedef NxOgre::List<NxOgre::Blueprints::ActorBlueprint*> ListBlueprints; +// typedef NxOgre::Container<unsigned, NxOgre::ShapeBlueprint const&> ContainerShapeBlueprint; //typedef NxOgre::Container<std::string, NxOgre::ActorBlueprint> ContainerActorBlueprint; //typedef NxOgre::Container<NxOgre::Scene::Renderables, float> ContainerSceneRencerables; typedef std::map<std::basic_string<char, std::char_traits<char>, std::allocator<char> >,float,std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >,std::allocator<std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char> >, float> > >\ @@ -20,7 +20,7 @@ typedef std::map<unsigned, float, std::less<unsigned>, std::allocator<std::pair<unsigned const, float> > >\ MapUnsignedFloat; typedef std::vector<NxOgre::Scene*, std::allocator<NxOgre::Scene*> > VectorScene; -typedef std::list<NxOgre::Blueprints::ActorBlueprint*, std::allocator<NxOgre::Blueprints::ActorBlueprint*> > ListBlueprintsActorBlueprint; +// typedef std::list<NxOgre::Blueprints::ActorBlueprint*, std::allocator<NxOgre::Blueprints::ActorBlueprint*> > ListBlueprintsActorBlueprint; typedef std::list<std::pair<std::string, std::string>, std::allocator<std::pair<std::string, std::string> > >\ ListPairString; typedef std::map<std::string, NxOgre::Container<std::string, NxOgre::DominanceGroup*>::Containee, std::less<std::string>, std::allocator<std::pair<std::string const, NxOgre::Container<std::string, NxOgre::DominanceGroup*>::Containee> > >\ @@ -129,8 +129,8 @@ // MapContainerActorBlueprint; typedef std::map<std::string, NxOgre::Container<std::string, NxOgre::ForceField*>::Containee, std::less<std::string>, std::allocator<std::pair<std::string const, NxOgre::Container<std::string, NxOgre::ForceField*>::Containee> > >\ MapContainerForceField; -typedef std::map<unsigned, NxOgre::Container<unsigned, NxOgre::ShapeBlueprint const&>::Containee, std::less<unsigned>, std::allocator<std::pair<unsigned const, NxOgre::Container<unsigned, NxOgre::ShapeBlueprint const&>::Containee> > >\ - MapContainerShapeBlueprint; +// typedef std::map<unsigned, NxOgre::Container<unsigned, NxOgre::ShapeBlueprint const&>::Containee, std::less<unsigned>, std::allocator<std::pair<unsigned const, NxOgre::Container<unsigned, NxOgre::ShapeBlueprint const&>::Containee> > >\ +// MapContainerShapeBlueprint; typedef std::vector<unsigned short, std::allocator<unsigned short> > VectorShort; typedef std::vector<std::pair<Ogre::Vector3, unsigned>, std::allocator<std::pair<Ogre::Vector3, unsigned> > > VectorPairVector3; typedef std::set<Ogre::Entity*,std::less<Ogre::Entity*>,std::allocator<Ogre::Entity*> > SetEntity; @@ -140,8 +140,8 @@ typedef std::map<unsigned short, NxOgre::Container<unsigned short, NxOgre::DominanceGroup*>::Containee, std::less<unsigned short>, std::allocator<std::pair<unsigned short const, NxOgre::Container<unsigned short, NxOgre::DominanceGroup*>::Containee> > >\ MapContainerDominanceGroupContainee; -typedef std::map<unsigned int, NxOgre::Container<unsigned int, NxOgre::ShapeBlueprint*>::Containee, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, NxOgre::Container<unsigned int, NxOgre::ShapeBlueprint*>::Containee> > >\ - MapContainerShapeBluePrint; +// typedef std::map<unsigned int, NxOgre::Container<unsigned int, NxOgre::ShapeBlueprint*>::Containee, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, NxOgre::Container<unsigned int, NxOgre::ShapeBlueprint*>::Containee> > >\ +// MapContainerShapeBluePrint; typedef std::map<unsigned int, NxOgre::Container<unsigned int, NxOgre::Machine*>::Containee, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, NxOgre::Container<unsigned int, NxOgre::Machine*>::Containee> > >\ MapContainerMachine; typedef std::map<unsigned int, NxOgre::Container<unsigned int, NxOgre::Wheel*>::Containee, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, NxOgre::Container<unsigned int, NxOgre::Wheel*>::Containee> > >\ Modified: trunk/python-ogre/code_generators/nxogre_09/customization_data.py =================================================================== --- trunk/python-ogre/code_generators/nxogre_09/customization_data.py 2008-02-13 09:25:34 UTC (rev 562) +++ trunk/python-ogre/code_generators/nxogre_09/customization_data.py 2008-02-13 09:28:50 UTC (rev 563) @@ -2,7 +2,7 @@ def header_files( version ): return [ 'NxOgre.h' ,'NxOgreSkeleton.h' - ,'NxOgreResourceMesh.h' + #,'NxOgreResourceMesh.h' ,'Ogre.h' ,'OgrePlugin.h' ,'NxPhysics.h' Modified: trunk/python-ogre/code_generators/nxogre_09/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/nxogre_09/generate_code.py 2008-02-13 09:25:34 UTC (rev 562) +++ trunk/python-ogre/code_generators/nxogre_09/generate_code.py 2008-02-13 09:28:50 UTC (rev 563) @@ -53,7 +53,7 @@ global_ns = mb.global_ns main_ns = global_ns.namespace( MAIN_NAMESPACE ) for c in main_ns.classes(): - if c.decl_string.startswith('::NxOgre::Container<') and '*' not in c.decl_string: + if c.decl_string.startswith('::NxOgre::Container<') and '&' in c.decl_string: # '*' not in c.decl_string: print "EXCLUDING: ", c c.exclude() @@ -72,7 +72,7 @@ v.exclude() print "excluded", v, v.access_type for t in main_ns.typedefs(): - if t.decl_string.startswith('::NxOgre::Container<') and '*' not in t.decl_string: + if t.decl_string.startswith('::NxOgre::Container<') and '&' in t.decl_string:# '*' not in t.decl_string: t.exclude() print "EXCLUDING: ", t @@ -132,29 +132,37 @@ ,'::NxOgre::SoftBody::simulate' ,'::NxOgre::SoftBody::render' - ,'::NxOgre::FileResourceSystem::getStream' # takes ::NxOgre::ResourceIdentifier as argument which needs fixing - ,'::NxOgre::OgreResourceSystem::getStream' - ,'::NxOgre::ResourceSystem::getStream' - ,'::NxOgre::RenderableSource::getStringType' # so we don't need a wrapper as it doesn't compile - ,'::NxOgre::RenderableSource::getType' +# # ,'::NxOgre::FileResourceSystem::getStream' # takes ::NxOgre::ResourceIdentifier as argument which needs fixing +# # ,'::NxOgre::OgreResourceSystem::getStream' +# ,'::NxOgre::ResourceSystem::getStream' +# ,'::NxOgre::RenderableSource::getStringType' # so we don't need a wrapper as it doesn't compile +# ,'::NxOgre::RenderableSource::getType' ,'::NxOgre::UserAllocator::mallocDEBUG' +# +# # ,'::NxOgre::Blueprints::ActorFactory' # not implemented, only in header.. +# ,'::NxOgre::ContactStream::getShape' +# ,'::NxOgre::ContactStream::getPatchNormal' +# ,'::NxOgre::ContactStream::getPoint' +# ,'::NxOgre::ContactStream::getNxActor' +# ,'::NxOgre::ContactStream::getActor' +# ,'::NxOgre::MemoryStream::skip' +# ,'::NxOgre::MemoryStream::seek' + ,'::NxOgre::WheelSet::createThreeWheelSet' + ,'::NxOgre::WheelSet::createSixWheelSet' + ,'::NxOgre::WheelSet::attachNewWheel' + ,'::NxOgre::Wheel::addEntity' + ,'::NxOgre::PhysXDriver::start' + ,'::NxOgre::PhysXDriver::stop' + ,'::NxOgre::PhysXDriver::hasHardware' + ,'::NxOgre::PhysXDriver::reset' + +# ,'::NxOgre::WheelSet::setBrakeTorque' +# ,'::NxOgre::WheelSet::turn' +# ,'::NxOgre::Material::setDirOfAnisotropy' +# ,'::NxOgre::OgreNodeRenderable::addSceneNode' +# # ,'::NxOgre::ResourceStreamPtr::ResourceStreamPtr' +# ,'::NxOgre::MaterialAlias::generateConversionList' -# ,'::NxOgre::Blueprints::ActorFactory' # not implemented, only in header.. - ,'::NxOgre::ContactStream::getShape' - ,'::NxOgre::ContactStream::getPatchNormal' - ,'::NxOgre::ContactStream::getPoint' - ,'::NxOgre::ContactStream::getNxActor' - ,'::NxOgre::ContactStream::getActor' - ,'::NxOgre::MemoryStream::skip' - ,'::NxOgre::MemoryStream::seek' - ,'::NxOgre::WheelSet::setMotorTorque' - ,'::NxOgre::WheelSet::setBrakeTorque' - ,'::NxOgre::WheelSet::turn' - ,'::NxOgre::Material::setDirOfAnisotropy' - ,'::NxOgre::OgreNodeRenderable::addSceneNode' -# ,'::NxOgre::ResourceStreamPtr::ResourceStreamPtr' - ,'::NxOgre::MaterialAlias::generateConversionList' - ] for e in excludes: print "excluding ", e @@ -177,19 +185,19 @@ ## Classes excludes = [ - 'DistanceJoint' ## constructor issue TOFIX - ,'JointCallback' ## also no suitable/defaul constructor TOFIX +# 'DistanceJoint' ## constructor issue TOFIX + 'JointCallback' ## also no suitable/defaul constructor TOFIX ,'Character' ## defined in header but not very much implementation # ,'RenderableSource' - ,'ResourceManager' +# ,'ResourceManager' # ,'ResourceStreamPtr' ,'::NxOgre::Blueprints::ActorFactory' ,'State' - ,'MeshResource' +# ,'MeshResource' ,'::NxOgre::Serialiser::SerialiserBase' ] for e in excludes: - print "Excluding", e + print "Excluding Class:", e main_ns.class_(e).exclude() # # # # # # @@ -201,6 +209,8 @@ ,'List<NxOgre::RemoteDebuggerConnection::Camera>' ,'List<NxOgre::Blueprints::ActorBlueprint*>' ,'Container<std::string, NxOgre::Joint*>' + ,'Container<std::string, NxOgre::RayCastHit>' +# ,'::NxOgre::Container< std::basic_string< char, std::char_traits< char >, std::allocator< char > >, NxOgre::RayCastHit >' ] for c in main_ns.classes(): # print c.decl_string @@ -216,15 +226,16 @@ f.exclude() ### Variables - excludes = ['::NxOgre::WheelSet::mEngine' # desctuctor in WheelSet is protected so can't wrap this.. + excludes = [ ## '::NxOgre::WheelSet::mEngine' # desctuctor in WheelSet is protected so can't wrap this.. ] for e in excludes: main_ns.variable(e).exclude() ### Typedefs - excludes = [ + excludes = [ '::NxOgre::RayCastReport' ] for e in excludes: + print "Excluding Typedef", e main_ns.typedefs(e).exclude() ### Operators Modified: trunk/python-ogre/code_generators/nxogre_09/python_nxogre.h =================================================================== --- trunk/python-ogre/code_generators/nxogre_09/python_nxogre.h 2008-02-13 09:25:34 UTC (rev 562) +++ trunk/python-ogre/code_generators/nxogre_09/python_nxogre.h 2008-02-13 09:28:50 UTC (rev 563) @@ -1,7 +1,7 @@ #include "NxOgre.h" #include "NxOgreSkeleton.h" //missing ?? -#include "NxOgreResourceMesh.h" // not included anywhere by default... +// #include "NxOgreResourceMesh.h" // not included anywhere by default... #include "Ogre.h" #include "OgrePlugin.h" #include <NxPhysics.h> Modified: trunk/python-ogre/code_generators/nxogre_09/python_nxogre_aliases.h =================================================================== --- trunk/python-ogre/code_generators/nxogre_09/python_nxogre_aliases.h 2008-02-13 09:25:34 UTC (rev 562) +++ trunk/python-ogre/code_generators/nxogre_09/python_nxogre_aliases.h 2008-02-13 09:28:50 UTC (rev 563) @@ -13,6 +13,7 @@ typedef NxOgre::List<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > ListString; typedef NxOgre::List<NxOgre::Blueprints::ActorBlueprint*> ListBlueprints; typedef NxOgre::Container<unsigned, NxOgre::ShapeBlueprint const&> ContainerShapeBlueprint; +typedef NxOgre::Container<unsigned, NxOgre::Wheel*> ContainerWheelPtr; //typedef NxOgre::Container<std::string, NxOgre::ActorBlueprint> ContainerActorBlueprint; //typedef NxOgre::Container<NxOgre::Scene::Renderables, float> ContainerSceneRencerables; typedef std::map<std::basic_string<char, std::char_traits<char>, std::allocator<char> >,float,std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >,std::allocator<std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char> >, float> > >\ @@ -103,12 +104,12 @@ typedef NxOgre::Container<std::string, NxConvexMesh*> NxConvexMeshes; typedef NxOgre::Container<std::string, NxTriangleMesh*> NxTriangleMeshes; -typedef NxOgre::Container<std::string, NxOgre::MaterialAlias*> MaterialAliases; +// typedef NxOgre::Container<std::string, NxOgre::MaterialAlias*> MaterialAliases; typedef NxOgre::Container<unsigned int, NxTriangleMesh*> NxTriangleMesheInts; -typedef NxOgre::Container<unsigned int, NxOgre::ResourceSystem*> ResourceSystemInts; -typedef NxOgre::Container<unsigned int, NxOgre::MaterialAlias*> MaterialAliasInts; -typedef NxOgre::Container<unsigned int, NxOgre::CharacterMovementModel*> CharacterMovementModelInts; +// typedef NxOgre::Container<unsigned int, NxOgre::ResourceSystem*> ResourceSystemInts; +// typedef NxOgre::Container<unsigned int, NxOgre::MaterialAlias*> MaterialAliasInts; +// typedef NxOgre::Container<unsigned int, NxOgre::CharacterMovementModel*> CharacterMovementModelInts; // typedef NxOgre::Container<NxOgre::NxString, ::ActorGroup*> ActorGroups; // typedef NxOgre::Container<NxOgre::NxActorGroup, NxOgre::ActorGroup*> ActorGroupsByIndex; @@ -142,28 +143,28 @@ typedef std::map<unsigned int, NxOgre::Container<unsigned int, NxOgre::ShapeBlueprint*>::Containee, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, NxOgre::Container<unsigned int, NxOgre::ShapeBlueprint*>::Containee> > >\ MapContainerShapeBluePrint; -typedef std::map<unsigned int, NxOgre::Container<unsigned int, NxOgre::Machine*>::Containee, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, NxOgre::Container<unsigned int, NxOgre::Machine*>::Containee> > >\ - MapContainerMachine; +// typedef std::map<unsigned int, NxOgre::Container<unsigned int, NxOgre::Machine*>::Containee, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, NxOgre::Container<unsigned int, NxOgre::Machine*>::Containee> > >\ +// MapContainerMachine; typedef std::map<unsigned int, NxOgre::Container<unsigned int, NxOgre::Wheel*>::Containee, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, NxOgre::Container<unsigned int, NxOgre::Wheel*>::Containee> > >\ MapContainerWheel; -typedef std::map<unsigned int, NxOgre::Container<unsigned int, NxOgre::RenderableSource*>::Containee, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, NxOgre::Container<unsigned int, NxOgre::RenderableSource*>::Containee> > >\ - MapContainerRenderableSource; +// typedef std::map<unsigned int, NxOgre::Container<unsigned int, NxOgre::RenderableSource*>::Containee, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, NxOgre::Container<unsigned int, NxOgre::RenderableSource*>::Containee> > >\ +// MapContainerRenderableSource; -typedef std::map<unsigned int, NxOgre::Container<unsigned int, NxOgre::CharacterMovementModel*>::Containee, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, NxOgre::Container<unsigned int, NxOgre::CharacterMovementModel*>::Containee> > >\ - MapContainerCharacterMovementModel; -typedef std::map<unsigned int, NxOgre::Container<unsigned int, NxOgre::MaterialAlias*>::Containee, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, NxOgre::Container<unsigned int, NxOgre::MaterialAlias*>::Containee> > >\ - MapContainerMaterialAlias; -typedef std::map<unsigned int, NxOgre::Container<unsigned int, NxOgre::ResourceSystem*>::Containee, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, NxOgre::Container<unsigned int, NxOgre::ResourceSystem*>::Containee> > >\ - MapContainerResourceSystem; +// typedef std::map<unsigned int, NxOgre::Container<unsigned int, NxOgre::CharacterMovementModel*>::Containee, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, NxOgre::Container<unsigned int, NxOgre::CharacterMovementModel*>::Containee> > >\ +// MapContainerCharacterMovementModel; +// typedef std::map<unsigned int, NxOgre::Container<unsigned int, NxOgre::MaterialAlias*>::Containee, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, NxOgre::Container<unsigned int, NxOgre::MaterialAlias*>::Containee> > >\ +// MapContainerMaterialAlias; +// typedef std::map<unsigned int, NxOgre::Container<unsigned int, NxOgre::ResourceSystem*>::Containee, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, NxOgre::Container<unsigned int, NxOgre::ResourceSystem*>::Containee> > >\ +// MapContainerResourceSystem; typedef std::map<unsigned int, NxOgre::Container<unsigned int, NxTriangleMesh*>::Containee, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, NxOgre::Container<unsigned int, NxTriangleMesh*>::Containee> > >\ MapContainerNxTriangleMesh; -typedef std::map<std::string, NxOgre::Container<std::string, NxOgre::MaterialAlias*>::Containee, std::less<std::string>, std::allocator<std::pair<std::string const, NxOgre::Container<std::string, NxOgre::MaterialAlias*>::Containee> > >\ - MapStringContainerMaterialAlias; +// typedef std::map<std::string, NxOgre::Container<std::string, NxOgre::MaterialAlias*>::Containee, std::less<std::string>, std::allocator<std::pair<std::string const, NxOgre::Container<std::string, NxOgre::MaterialAlias*>::Containee> > >\ +// MapStringContainerMaterialAlias; typedef std::map<std::string, NxOgre::Container<std::string, NxTriangleMesh*>::Containee, std::less<std::string>, std::allocator<std::pair<std::string const, NxOgre::Container<std::string, NxTriangleMesh*>::Containee> > >\ MapStringContainerNxTriangleMesh; -typedef std::map<std::string, NxOgre::Container<std::string, NxOgre::CharacterMovementModel*>::Containee, std::less<std::string>, std::allocator<std::pair<std::string const, NxOgre::Container<std::string, NxOgre::CharacterMovementModel*>::Containee> > >\ - MapStringContainerCharacterMovementModel; +// typedef std::map<std::string, NxOgre::Container<std::string, NxOgre::CharacterMovementModel*>::Containee, std::less<std::string>, std::allocator<std::pair<std::string const, NxOgre::Container<std::string, NxOgre::CharacterMovementModel*>::Containee> > >\ +// MapStringContainerCharacterMovementModel; typedef std::map<std::string, NxOgre::Container<std::string, NxConvexMesh*>::Containee, std::less<std::string>, std::allocator<std::pair<std::string const, NxOgre::Container<std::string, NxConvexMesh*>::Containee> > >\ MapStringContainerNxConvexMesh; \ No newline at end of file Modified: trunk/python-ogre/code_generators/nxogre_09/python_nxogre_sizeof.h =================================================================== --- trunk/python-ogre/code_generators/nxogre_09/python_nxogre_sizeof.h 2008-02-13 09:25:34 UTC (rev 562) +++ trunk/python-ogre/code_generators/nxogre_09/python_nxogre_sizeof.h 2008-02-13 09:28:50 UTC (rev 563) @@ -1,4 +1,6 @@ // sizeof ( NxControllersHit ); +sizeof (NxOgre::Container<NxOgre::NxString, NxOgre::RayCastHit>); + sizeof ( NxBoxShapeDesc ); sizeof ( NxPlaneShapeDesc ); sizeof ( NxControllerManager ); Modified: trunk/python-ogre/code_generators/ogre/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/ogre/generate_code.py 2008-02-13 09:25:34 UTC (rev 562) +++ trunk/python-ogre/code_generators/ogre/generate_code.py 2008-02-13 09:28:50 UTC (rev 563) @@ -865,6 +865,15 @@ print "Hand wrapper (as"+r.name+") created to cast from", c.name, "to", r.name ## b.access break +def FindProtectedVars ( mb ): + global_ns = mb.global_ns + main_ns = global_ns.namespace( MAIN_NAMESPACE ) + + for c in main_ns.classes(): + for v in c.variables(allow_empty=True): + if v.access_type == 'protected': + print "Protected Variable:", v, v.why_not_exportable(), v.exportable + # # the 'main'function # @@ -949,6 +958,8 @@ ManualAlias ( mb ) AutoFixes ( mb, MAIN_NAMESPACE ) ManualFixes ( mb ) + + FindProtectedVars ( mb ) # # indicated where underlying libraries are protected etc in the doc strings common_utils.Auto_Document( mb, MAIN_NAMESPACE ) Modified: trunk/python-ogre/code_generators/ogre/hand_made_wrappers.py =================================================================== --- trunk/python-ogre/code_generators/ogre/hand_made_wrappers.py 2008-02-13 09:25:34 UTC (rev 562) +++ trunk/python-ogre/code_generators/ogre/hand_made_wrappers.py 2008-02-13 09:28:50 UTC (rev 563) @@ -18,7 +18,66 @@ bp::return_value_policy< bp::return_opaque_pointer >());""" ] +WRAPPER_DEFINITION_MemoryDataStream =\ +""" +// return the data buffer - can't be handled 'normally' by Py++ +unsigned long MemoryDataStream_data ( ::Ogre::MemoryDataStream & me ) +{ + return (unsigned long) me.getPtr(); +} +void MemoryDataStream_setDataList ( ::Ogre::MemoryDataStream & me, boost::python::list listin ) +{ + Ogre::uchar * data = me.getPtr(); + size_t maxlen = len ( listin ); + size_t counter = 0; + for (counter=0;counter < maxlen; counter ++ ) + *data++ = boost::python::extract<Ogre::uchar> (listin[counter]); +} + +void MemoryDataStream_setDataStr ( ::Ogre::MemoryDataStream & me, boost::python::str listin ) +{ + Ogre::uchar * data = me.getPtr(); + char const* c_str = boost::python::extract<char const*>(listin); + size_t maxlen = len(listin); + size_t counter; + for (counter=0; counter < maxlen; counter ++ ) + *data++ = *c_str++; +} + +boost::python::list +MemoryDataStream_getData(::Ogre::MemoryDataStream & me) +{ + boost::python::list outlist; + size_t index; + Ogre::uchar * data = me.getPtr(); + size_t size = me.size(); + for (index=0;index<size;index++ ) { + outlist.append ( *data++ ); + } + return outlist; +} +""" +WRAPPER_REGISTRATION_MemoryDataStream = [ + """def( "getDataPointer", &::MemoryDataStream_data,\\ + "Python-Ogre Helper Function: Returns the data buffer.\\n\\ + Input: \\n\\ + Output: Unsigned Long address of the data buffer");""", + """def( "setData", &::MemoryDataStream_setDataList,\\ + "Python-Ogre Helper Function: Takes a python list and loads it into the memory buffer (as unsigned chars).\\n\\ + Input: Python List\\n\\ + Output: None");""", + """def( "setData", &::MemoryDataStream_setDataStr,\\ + "Python-Ogre Helper Function: Takes a python string and loads it into the memory buffer (as unsigned chars).\\n\\ + Input: Python String\\n\\ + Output: None");""", + """def( "getData", &::MemoryDataStream_getData,\\ + "Python-Ogre Helper Function: Copies the data buffer to a python list.\\n\\ + Input: None\\n\\ + Output: Python List");""" + ] + + WRAPPER_WRAPPER_RenderQueueListener =\ """ virtual void renderQueueEnded( ::Ogre::uint8 queueGroupId, ::Ogre::String const & invocation, bool & repeatThisInvocation ){ @@ -382,6 +441,28 @@ return outlist; } +void +Utility_setUchar(void * ptrin, boost::python::list listin) // unsigned short +{ + int index; + Ogre::uchar * newptr = reinterpret_cast<Ogre::uchar *>(ptrin); + for (index=0;index<len(listin);index++ ) { + *newptr++ = boost::python::extract<Ogre::uchar> (listin[index]); + } +} + +boost::python::list +Utility_getUchar(void * ptrin, int size) +{ + boost::python::list outlist; + int index; + Ogre::uchar * newptr = reinterpret_cast<Ogre::uchar *>(ptrin); + for (index=0;index<size;index++ ) { + outlist.append ( *newptr++ ); + } + return outlist; +} + // sometimes we need to take the ctypess addressof(), an int, and recast it as a general void * void * Utility_CastVoidPtr ( unsigned long address ) @@ -488,6 +569,16 @@ Input: void *, size\\n\\ Ouput: Python List\\n\\ The list is populated with ints from memory starting at the pointer" );""", + """bp::def( "setUchar", &Utility_setUchar, + "Python-Ogre Helper Function: Write Unsigned chars to Memory.\\n\\ + Input: void *, Python List (numerics)\\n\\ + Ouput: None\\n\\ + The list is extracted as unsigned ints and written to memory starting at the pointer" );""", + """bp::def( "getUchar", &Utility_getUchar, + "Python-Ogre Helper Function: Reads unsigned chars into a python list.\\n\\ + Input: void *, size\\n\\ + Ouput: Python List\\n\\ + The list is populated with ints from memory starting at the pointer" );""", """bp::def( "setUint32", &Utility_setUint32, "Python-Ogre Helper Function: Write Unsigned Ints 32 to Memory.\\n\\ Input: void *, Python List (numerics)\\n\\ @@ -869,6 +960,10 @@ rt.add_declaration_code( WRAPPER_DEFINITION_SceneManager ) apply_reg (rt, WRAPPER_REGISTRATION_SceneManager ) + rt = mb.class_( 'MemoryDataStream' ) + rt.add_declaration_code( WRAPPER_DEFINITION_MemoryDataStream ) + apply_reg (rt, WRAPPER_REGISTRATION_MemoryDataStream ) + rt = mb.class_( 'ParticleSystem' ) rt.add_declaration_code( WRAPPER_DEFINITION_ParticleSystem ) apply_reg (rt, WRAPPER_REGISTRATION_ParticleSystem ) Modified: trunk/python-ogre/code_generators/opcode/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/opcode/generate_code.py 2008-02-13 09:25:34 UTC (rev 562) +++ trunk/python-ogre/code_generators/opcode/generate_code.py 2008-02-13 09:28:50 UTC (rev 563) @@ -525,15 +525,19 @@ #IceMaths::Quat IceMaths::Matrix3x3::operator ::IceMaths::Quat() const [casting operator] c = mb.global_ns.namespace ( 'IceMaths').class_('Matrix3x3') for o in c.operators(): - if 'Quat' in o._decl_string(): +# print o +# print dir(o) +# print o.partial_decl_string +# print o.name + if 'Quat' in o.partial_decl_string: o.exclude() - print "Excluded Op", o, "\n", o._decl_string() + print "Excluded Op", o, "\n", o.partial_decl_string ## OP float const * IceMaths::Point::operator float const *() const [casting operator] c = mb.global_ns.namespace ( 'IceMaths').class_('Point') for o in c.operators(): - if 'float const *' in o._decl_string(): + if 'float const *' in o.partial_decl_string: o.exclude() - print "Excluded Op", o, "\n", o._decl_string() + print "Excluded Op", o, "\n", o.partial_decl_string ##Spere(udword nb_verts, const Point* verts); Not Implemented c = mb.global_ns.namespace ( 'IceMaths').class_('Sphere') for o in c.constructors(arg_types=("::udword","::IceMaths::Point const *") ): @@ -544,7 +548,7 @@ o.exclude() for o in c.member_functions(): if len (o.arguments) > 10: - print "Too Many Arguments - excluded:", o, o._decl_string() + print "Too Many Arguments - excluded:", o, o.partial_decl_string o.exclude() c = mb.global_ns.namespace ( 'IceMaths').class_('Matrix4x4') for o in c.casting_operators(): Modified: trunk/python-ogre/code_generators/physx/1 =================================================================== --- trunk/python-ogre/code_generators/physx/1 2008-02-13 09:25:34 UTC (rev 562) +++ trunk/python-ogre/code_generators/physx/1 2008-02-13 09:28:50 UTC (rev 563) @@ -0,0 +1,5261 @@ + + +INFO Parsing xml file "C:\Development\python-ogre\code_generators\cache\physx_2.7.3_cache.xml" ... + + +INFO GCCXML version - 0.9 +Included Free Function int NxIntFloor(NxF32 const & f) [free function] +Included Free Function void NxDecomposeVector(NxVec3 & normalCompo, NxVec3 & tangentCompo, NxVec3 const & outwardDir, NxVec3 const & outwardNormal) [free function] +Included Free Function void NxComputeBarycentricPoint(NxVec3 & pt, NxVec3 const & p0, NxVec3 const & p1, NxVec3 const & p2, float u, float v) [free function] +Included Free Function void NxSetFPUExceptions(bool b) [free function] +Included Free Function bool NxSegmentOBBIntersect(NxVec3 const & p0, NxVec3 const & p1, NxVec3 const & center, NxVec3 const & extents, NxMat33 const & rot) [free function] +Included Free Function extern NxU32 NxGetValue(NxCookingValue cookValue) [free function] +Included Free Function void NxSetFPURoundingNear() [free function] +Included Free Function void NxFlexiCopy(void const * src, void * dst, NxU32 nbElem, NxU32 elemSize, NxU32 stride) [free function] +Included Free Function NxReal NxComputeConeMass(NxReal radius, NxReal length, NxReal density) [free function] +Included Free Function extern bool NxCookTriangleMesh(NxTriangleMeshDesc const & desc, NxStream & stream) [free function] +Included Free Function bool NxComputeBoxPoints(NxBox const & box, NxVec3 * pts) [free function] +Included Free Function NxU32 NxCrc32(void const * buffer, NxU32 nbBytes) [free function] +Included Free Function void NxComputeSphereInertiaTensor(NxVec3 & diagInertia, NxReal mass, NxReal radius, bool hollow) [free function] +Included Free Function bool NxSegmentBoxIntersect(NxVec3 const & p1, NxVec3 const & p2, NxVec3 const & bbox_min, NxVec3 const & bbox_max, NxVec3 & intercept) [free function] +Included Free Function NxF32 NxAngle(NxVec3 const & v0, NxVec3 const & v1) [free function] +Included Free Function void NxComputeBoxInertiaTensor(NxVec3 & diagInertia, NxReal mass, NxReal xlength, NxReal ylength, NxReal zlength) [free function] +Included Free Function void NxComputeBoxAroundCapsule(NxCapsule const & capsule, NxBox & box) [free function] +Included Free Function bool NxRayPlaneIntersect(NxRay const & ray, NxPlane const & plane, NxReal & dist, NxVec3 & pointOnPlane) [free function] +Included Free Function void NxSegmentCapsuleIntersect(NxSegment const & segment, NxCapsule const & capsule, NxU32 * nbImpacts, NxReal * t) [free function] +Included Free Function NxReal NxComputeConeDensity(NxReal radius, NxReal length, NxReal mass) [free function] +Included Free Function bool NxRayTriIntersect(NxVec3 const & orig, NxVec3 const & dir, NxVec3 const & vert0, NxVec3 const & vert1, NxVec3 const & vert2, float & t, float & u, float & v, bool cull) [free function] +Included Free Function NxReal NxComputeSphereMass(NxReal radius, NxReal density) [free function] +Included Free Function bool NxRayAABBIntersect(NxVec3 const & min, NxVec3 const & max, NxVec3 const & origin, NxVec3 const & dir, NxVec3 & coord) [free function] +Included Free Function extern bool NxSetCookingParams(NxCookingParams const & params) [free function] +Included Free Function void NxComputeBoxWorldEdgeNormal(NxBox const & box, NxU32 edge_index, NxVec3 & world_normal) [free function] +Included Free Function unsigned int const * NxGetBoxTriangles() [free function] +Included Free Function void NxFindRotationMatrix(NxVec3 const & x, NxVec3 const & b, NxMat33 & M) [free function] +Included Free Function void NxMergeSpheres(NxSphere & merged, NxSphere const & sphere0, NxSphere const & sphere1) [free function] +Included Free Function bool NxBuildSmoothNormals(NxU32 nbTris, NxU32 nbVerts, NxVec3 const * verts, unsigned int const * dFaces, NxU16 const * wFaces, NxVec3 * normals, bool flip=false) [free function] +Included Free Function NxVec3 const * NxGetBoxLocalEdgeNormals() [free function] +Included Free Function extern NxCookingParams const & NxGetCookingParams() [free function] +Included Free Function extern NxFoundationSDK * NxGetFoundationSDK() [free function] +Included Free Function void NxSegmentPlaneIntersect(NxVec3 const & v1, NxVec3 const & v2, NxPlane const & plane, NxReal & dist, NxVec3 & pointOnPlane) [free function] +Included Free Function unsigned int const * NxGetBoxEdges() [free function] +Included Free Function NX_BOOL NxPointTriangleIntersect2D(NxReal px, NxReal pz, NxReal p0x, NxReal p0z, NxReal e10x, NxReal e10z, NxReal e20x, NxReal e20z) [free function] +Included Free Function extern NxUserAllocator * NxGetPhysicsSDKAllocator() [free function] +Included Free Function unsigned int const * NxBoxVertexToQuad(NxU32 vertexIndex) [free function] +Included Free Function NxReal NxComputeEllipsoidDensity(NxVec3 const & extents, NxReal mass) [free function] +Included Free Function extern bool NxScaleCookedConvexMesh(NxStream const & source, NxReal scale, NxStream & dest) [free function] +Included Free Function bool NxRaySphereIntersect(NxVec3 const & origin, NxVec3 const & dir, NxReal length, NxVec3 const & center, NxReal radius, NxReal & hit_time, NxVec3 & hit_pos) [free function] +Included Free Function bool NxFastComputeSphere(NxSphere & sphere, unsigned int nb_verts, NxVec3 const * verts) [free function] +Included Free Function bool NxComputeBoxPlanes(NxBox const & box, NxPlane * planes) [free function] +Included Free Function bool NxTriBoxIntersect(NxVec3 const & vertex0, NxVec3 const & vertex1, NxVec3 const & vertex2, NxVec3 const & center, NxVec3 const & extents) [free function] +Included Free Function extern bool NxCookConvexMesh(NxConvexMeshDesc const & desc, NxStream & stream) [free function] +Included Free Function extern NxCookingInterface * NxGetCookingLib(NxU32 sdk_version_number) [free function] +Included Free Function NxI32 const * NxGetBoxEdgesAxes() [free function] +Included Free Function NxSepAxis NxSeparatingAxis(NxBox const & obb0, NxBox const & obb1, bool fullTest=true) [free function] +Included Free Function NxSepAxis NxSeparatingAxis(NxVec3 const & extents0, NxVec3 const & center0, NxMat33 const & rotation0, NxVec3 const & extents1, NxVec3 const & center1, NxMat33 const & rotation1, bool fullTest=true) [free function] +Included Free Function void NxComputeNormalCompo(NxVec3 & normalCompo, NxVec3 const & outwardDir, NxVec3 const & outwardNormal) [free function] +Included Free Function NxU32 NxRayAABBIntersect2(NxVec3 const & min, NxVec3 const & max, NxVec3 const & origin, NxVec3 const & dir, NxVec3 & coord, NxReal & t) [free function] +Included Free Function void NxNormalToTangents(NxVec3 const & n, NxVec3 & t1, NxVec3 & t2) [free function] +Included Free Function void NxSetFPURoundingDown() [free function] +Included Free Function void NxMakeFatEdge(NxVec3 & p0, NxVec3 & p1, NxF32 fatCoeff) [free function] +Included Free Function NxU32 NxRayCapsuleIntersect(NxVec3 const & origin, NxVec3 const & dir, NxCapsule const & capsule, NxReal * t) [free function] +Included Free Function void NxSetFPURoundingUp() [free function] +Included Free Function NxReal NxComputeEllipsoidMass(NxVec3 const & extents, NxReal density) [free function] +Included Free Function extern NxUtilLib * NxGetUtilLib() [free function] +Included Free Function void NxCreateBox(NxBox & box, NxBounds3 const & aabb, NxMat34 const & mat) [free function] +Included Free Function bool NxSegmentAABBIntersect(NxVec3 const & p0, NxVec3 const & p1, NxVec3 const & min, NxVec3 const & max) [free function] +Included Free Function NxReal NxComputeCylinderMass(NxReal radius, NxReal length, NxReal density) [free function] +Included Free Function extern NxCookingInterface * NxGetCookingLibWithID(NxU32 sdk_version_number, char * companyNameStr, char * appNameStr, char * appVersionStr, char * appUserDefinedStr) [free function] +Included Free Function extern bool NxCreatePMap(NxPMap & pmap, NxTriangleMesh const & mesh, NxU32 density, NxUserOutputStream * outputStream=0) [free function] +Included Free Function NxBSphereMethod NxComputeSphere(NxSphere & sphere, unsigned int nb_verts, NxVec3 const * verts) [free function] +Included Free Function int NxIntChop(NxF32 const & f) [free function] +Included Free Function NX_BOOL NxPointTriangleIntersect(NxVec3 const & p, NxVec3 const & p0, NxVec3 const & edge10, NxVec3 const & edge20) [free function] +Included Free Function bool NxComputeBoxVertexNormals(NxBox const & box, NxVec3 * pts) [free function] +Included Free Function extern bool NxCookClothMesh(NxClothMeshDesc const & desc, NxStream & stream) [free function] +Included Free Function extern void NxReleasePhysicsSDK(NxPhysicsSDK * sdk) [free function] +Included Free Function extern void NxCloseCooking() [free function] +Included Free Function bool NxRayOBBIntersect(NxRay const & ray, NxVec3 const & center, NxVec3 const & extents, NxMat33 const & rot) [free function] +Included Free Function void NxComputeBounds(NxBounds3 & bounds, NxU32 nbVerts, NxVec3 const * verts) [free function] +Included Free Function void NxComputeBounds(NxVec3 & min, NxVec3 & max, NxU32 nbVerts, NxVec3 const * verts) [free function] +Included Free Function NxU32 NxNextPowerOfTwo(NxU32 x) [free function] +Included Free Function extern NxPhysicsSDK * NxCreatePhysicsSDKWithID(NxU32 sdkVersion, char * companyNameStr, char * appNameStr, char * appVersionStr, char * appUserDefinedStr, NxUserAllocator * allocator=0, NxUserOutputStream * outputStream=0, NxPhysicsSDKDesc const & desc=::NxPhysicsSDKDesc( ), NxSDKCreateError * errorCode=0) [free function] +Included Free Function extern bool NxCookSoftBodyMesh(NxSoftBodyMeshDesc const & desc, NxStream & stream) [free function] +Included Free Function extern bool NxPlatformMismatch() [free function] +Included Free Function NxF32 NxComputeSquareDistance(NxSegment const & seg, NxVec3 const & point, NxF32 * t) [free function] +Included Free Function bool NxBoxContainsPoint(NxBox const & box, NxVec3 const & p) [free function] +Included Free Function bool NxIsBoxAInsideBoxB(NxBox const & a, NxBox const & b) [free function] +Included Free Function extern bool NxReleasePMap(NxPMap & pmap) [free function] +Included Free Function void NxSetFPUPrecision24() [free function] +Included Free Function void NxComputeCapsuleAroundBox(NxBox const & box, NxCapsule & capsule) [free function] +Included Free Function void NxSetFPUPrecision53() [free function] +Included Free Function void NxSetFPUPrecision64() [free function] +Included Free Function int NxIntCeil(NxF32 const & f) [free function] +Included Free Function extern bool NxInitCooking(NxUserAllocator * allocator=0, NxUserOutputStream * outputStream=0) [free function] +Included Free Function NxReal NxComputeBoxMass(NxVec3 const & extents, NxReal density) [free function] +Included Free Function void NxSetFPURoundingChop() [free function] +Included Free Function extern void NxReportCooking() [free function] +Included Free Function void NxComputeTangentCompo(NxVec3 & outwardDir, NxVec3 const & outwardNormal) [free function] +Included Free Function NxReal NxComputeBoxDensity(NxVec3 const & extents, NxReal mass) [free function] +Included Free Function NxReal NxComputeCylinderDensity(NxReal radius, NxReal length, NxReal mass) [free function] +Included Free Function bool NxBoxBoxIntersect(NxBox const & obb0, NxBox const & obb1, bool fullTest=true) [free function] +Included Free Function bool NxBoxBoxIntersect(NxVec3 const & extents0, NxVec3 const & center0, NxMat33 const & rotation0, NxVec3 const & extents1, NxVec3 const & center1, NxMat33 const & rotation1, bool fullTest) [free function] +Included Free Function extern NxPhysicsSDK * NxGetPhysicsSDK() [free function] +Included Free Function unsigned int const * NxGetBoxQuads() [free function] +Included Free Function extern NxPhysicsSDK * NxCreatePhysicsSDK(NxU32 sdkVersion, NxUserAllocator * allocator=0, NxUserOutputStream * outputStream=0, NxPhysicsSDKDesc const & desc=::NxPhysicsSDKDesc( ), NxSDKCreateError * errorCode=0) [free function] +Included Free Function NxF32 NxComputeDistanceSquared(NxRay const & ray, NxVec3 const & point, NxF32 * t) [free function] +Included Free Function bool NxDiagonalizeInertiaTensor(NxMat33 const & denseInertia, NxVec3 & diagonalInertia, NxMat33 & rotation) [free function] +Included Free Function NxReal NxComputeSphereDensity(NxReal radius, NxReal mass) [free function] +Included Free Function bool NxSweptSpheresIntersect(NxSphere const & sphere0, NxVec3 const & velocity0, NxSphere const & sphere1, NxVec3 const & velocity1) [free function] +Excluding static const NxPiF32 [variable] +Excluding static const NxPiF64 [variable] +Excluding static const NxHalfPiF32 [variable] +Excluding static const NxHalfPiF64 [variable] +Excluding static const NX_NO_HIGH_LIMIT [variable] +Excluding static const NxTwoPiF32 [variable] +Excluding static const NxTwoPiF64 [variable] +Excluding static const NX_NO_LOW_LIMIT [variable] +Excluding static const NxInvPiF32 [variable] +Excluding static const NxInvPiF64 [variable] +excluded NxBitField::FlagRef::bitField [variable] private +excluded NxBitField::FlagRef::bitIndex [variable] private +excluded NxBitField::FlagRef::bitField [variable] private +excluded NxBitField::FlagRef::bitIndex [variable] private +excluded NxMat33::data [variable] private +excluded NxActorDescBase::type [variable] protected +excluded NxDebugRenderable::numPoints [variable] private +excluded NxDebugRenderable::numLines [variable] private +excluded NxDebugRenderable::numTriangles [variable] private +excluded NxDebugRenderable::points [variable] private +excluded NxDebugRenderable::lines [variable] private +excluded NxDebugRenderable::triangles [variable] private +excluded NxJointDesc::type [variable] protected +excluded NxForceFieldShapeDesc::type [variable] protected +excluded NxShapeDesc::type [variable] protected +excluded NxContactStreamIterator::pointNormalForce [variable] protected +excluded NxContactStreamIterator::stream [variable] protected +excluded NxContactStreamIterator::numPairs [variable] private +excluded NxContactStreamIterator::shapes [variable] private +excluded NxContactStreamIterator::shapeFlags [variable] private +excluded NxContactStreamIterator::numPatches [variable] private +excluded NxContactStreamIterator::patchNormal [variable] private +excluded NxContactStreamIterator::numPoints [variable] private +excluded NxContactStreamIterator::point [variable] private +excluded NxContactStreamIterator::separation [variable] private +excluded NxContactStreamIterator::featureIndex0 [variable] private +excluded NxContactStreamIterator::featureIndex1 [variable] private +excluded NxContactStreamIterator::numPairsRemaining [variable] private +excluded NxContactStreamIterator::numPatchesRemaining [variable] private +excluded NxContactStreamIterator::numPointsRemaining [variable] private +excluded NxFluidDescBase::type [variable] protected +excluded NxArray<NxFluidEmitterDesc, NxAllocatorDefault>::first [variable] private +excluded NxArray<NxFluidEmitterDesc, NxAllocatorDefault>::last [variable] private +excluded NxArray<NxFluidEmitterDesc, NxAllocatorDefault>::memEnd [variable] private +excluded NxArray<NxFluidEmitterDesc, NxAllocatorDefault>::allocator [variable] private +excluded NxArray<NxShapeDesc*, NxAllocatorDefault>::first [variable] private +excluded NxArray<NxShapeDesc*, NxAllocatorDefault>::last [variable] private +excluded NxArray<NxShapeDesc*, NxAllocatorDefault>::memEnd [variable] private +excluded NxArray<NxShapeDesc*, NxAllocatorDefault>::allocator [variable] private +excluded NxEffectorDesc::type [variable] protected +excluding function ::NxArray<NxShapeDesc*, NxAllocatorDefault>::begin +excluding function ::NxArray<NxFluidEmitterDesc, NxAllocatorDefault>::deleteEntry +excluding function ::NxArray<NxShapeDesc*, NxAllocatorDefault>::end +excluding function ::NxCookingInterface::NxCreatePMap +excluding function ::NxForceField::releaseShape +excluding function ::NxUtilLib::NxGetBoxEdgesAxes +excluding function ::NxImplicitScreenMesh::getProjectionMatrix +excluding function ::NxVec3::get +excluding function ::NxBitField::rangeToDenseMask +excluding function ::NxBitField::maskToShift +NxSweepQueryHit [struct] +NxBitField [class] +NxBitField::FlagRef [class] +NxConvexShapeDesc [class] +NxMat33 [class] +NxVec3 [class] +NxJointLimitPairDesc [class] +NxWheelShape [class] +NxActorDescBase [class] +NxMaterialDesc [class] +NxRay [class] +NxPointInPlaneJoint [class] +NxWheelShapeDesc [class] +NxMaterial [class] +NxFluidEmitterDesc [class] +NxUserRaycastReport [class] +NxPlaneShape [class] +_ldiv_t [struct] +NxExtension [class] +_Nx3F32 [struct] +NxSphereShapeDesc [class] +NxContactPair [class] +NxSceneLimits [class] +NxCCDSkeleton [class] +NxCapsuleForceFieldShapeDesc [class] +_heapinfo [struct] +NxMeshData [class] +NxBox [class] +tagLC_ID [struct] +NxEffector [class] +_exception [struct] +NxTriangle32 [struct] +NxPrismaticJointDesc [class] +NxFluidEmitter [class] +NxGroupsMask [class] +NxTriangleMeshShape [class] +NxDebugRenderable [class] +NxFixedJoint [class] +NxBoxForceFieldShape [class] +NxDebugPoint [struct] +localeinfo_struct [struct] +NxSoftBodyDesc [class] +NxFluid [class] +_LDOUBLE [struct] +NxPulleyJointDesc [class] +NxForceFieldDesc [class] +NxAllocatorDefault [class] +NxFluidPacketData [class] +NxPrismaticJoint [class] +NxShape [class] +NxProfileData [class] +NxPointInPlaneJointDesc [class] +NxTriangleMeshDesc [class] +NxSimpleTriangleMesh [class] +NxSphereShape [class] +NxSweepCache [class] +NxAllocateable [class] +NxJointDesc [class] +NxUserNotify [class] +NxPulleyJoint [class] +NxTask [class] +NxSoftBodyMesh [class] +NxForceFieldShapeDesc [class] +NxFixedJointDesc [class] +NxPMap [class] +NxCapsuleShapeDesc [class] +NxShapeDesc [class] +_div_t [struct] +NxPhysicsSDKDesc [class] +NxUserContactModify [class] +NxUserContactModify::NxContactCallbackData [struct] +NxSoftBodySplitPairData [class] +_CRT_FLOAT [struct] +NxTireFunctionDesc [class] +NxPointOnLineJointDesc [class] +NxTriangle [class] +NxClothMeshDesc [class] +NxScene [class] +NxInterface [class] +NxCloth [class] +NxClothMesh [class] +NxSpringAndDamperEffectorDesc [class] +NxUserOutputStream [class] +NxHeightFieldDesc [class] +NxCapsule [class] +NxFluidUserNotify [class] +NxUserWheelContactModify [class] +NxSphereForceFieldShape [class] +NxCookingInterface [class] +NxJoint [class] +NxContactStreamIterator [class] +NxSceneQueryDesc [class] +NxConvexForceFieldShapeDesc [class] +NxSceneQuery [class] +NxSphere [class] +NxBoxShapeDesc [class] +NxUserScheduler [class] +NxDistanceJointDesc [class] +NxHeightField [class] +NxJointDriveDesc [class] +NxSphereForceFieldShapeDesc [class] +NxUserAllocator [class] +NxSceneStatistic [struct] +NxClothDesc [class] +NxPointOnLineJoint [class] +NxUserContactReport [class] +NxParticleIdData [class] +NxBoxForceFieldShapeDesc [class] +NxFluidDescBase [class] +NxImplicitScreenMeshDesc [class] +NxArray<NxFluidEmitterDesc, NxAllocatorDefault> [class] +NxArray<NxShapeDesc*, NxAllocatorDefault> [class] +NxPairFlag [class] +NxDistanceJoint [class] +NxSphericalJoint [class] +threadlocaleinfostruct [struct] +threadlocaleinfostruct [struct] +NxHeightFieldShape [class] +NxHeightFieldShapeDesc [class] +NxImplicitScreenMesh [class] +NxActorGroupPair [struct] +NxParticleData [class] +NxBounds3 [class] +_complex [struct] +NxActorPairFilter [class] +NxCapsuleShape [class] +NxTriangleMesh [class] +NxConstraintDominance [struct] +NxUserEntityReport<NxShape*> [class] +NxUserEntityReport<unsigned int> [class] +NxUserEntityReport<NxSweepQueryHit> [class] +NxWheelContactData [class] +NxProfilerData [class] +NxPlaneShapeDesc [class] +NxQuat [class] +_LDBL12 [struct] +NxRevoluteJoint [class] +NxSceneStats2 [class] +NxMat34 [class] +NxJointLimitSoftDesc [class] +NxHeightFieldSample [struct] +NxFluidPacket [struct] +NxForceFieldShape [class] +NxSpringDesc [class] +NxActiveTransform [struct] +NxJointLimitDesc [class] +NxSceneStats [class] +NxRevoluteJointDesc [class] +NxMotorDesc [class] +NxFluidDesc [class] +NxDebugTriangle [struct] +NxRemoteDebuggerEventListener [class] +NxSegment [class] +NxCookingParams [struct] +Nx9Real [class] +Nx9Real::S [struct] +Nx9Real [union] +NxConvexMeshDesc [class] +_LONGDOUBLE [struct] +NxFoundationSDK [class] +NxSceneQueryReport [class] +NxBodyDesc [class] +NxConvexMesh [class] +NxTriangleMeshShapeDesc [class] +NxSpringAndDamperEffector [class] +NxCompartment [class] +NxSoftBodySplitPair [class] +NxRemoteDebugger [class] +NxUserTriggerReport [class] +NxPlane [class] +NxStream [class] +NxDebugLine [struct] +NxParticleUpdateData [class] +NxD6Joint [class] +NxUserActorPairFiltering [class] +NxPhysicsSDK [class] +NxActor [class] +_CRT_DOUBLE [struct] +NxSceneDesc [class] +NxMath [class] +NxCylindricalJointDesc [class] +NxCapsuleForceFieldShape [class] +NxActorDesc [class] +NxUtilLib [class] +NxD6JointDesc [class] +NxConvexShape [class] +NxCylindricalJoint [class] +NxRaycastHit [struct] +NxCompartmentDesc [class] +NxSoftBody [class] +NxConvexForceFieldShape [class] +NxJointLimitSoftPairDesc [class] +NxEffectorDesc [class] +NxBoxShape [class] +NxSoftBodyMeshDesc [class] +NxForceField [class] +NxProfileZone [class] +NxSphericalJointDesc [class] +__si_class_type_info_pseudo [struct] +__class_type_info_pseudo [struct] +__vmi_class_type_info_pseudo1 [struct] +__type_info_pseudo [struct] +__base_class_type_info_pseudo [struct] +Excluding Class: NxArray<NxShapeDesc*, NxAllocatorDefault> +Excluding Class: NxArray<NxFluidEmitterDesc, NxAllocatorDefault> +Excluding: NxReal const * NxVec3::get() const [member function] +Excluding Operator: NxReal & NxMat33::operator()(int row, int col) [member operator] +CHECK bool NxTriangleMeshShape::overlapAABBTriangles(NxBounds3 const & bounds, NxU32 flags, NxUserEntityReport<unsigned int> * callback) const [memb... [truncated message content] |
From: <and...@us...> - 2008-02-13 09:25:35
|
Revision: 562 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=562&view=rev Author: andy_miller Date: 2008-02-13 01:25:34 -0800 (Wed, 13 Feb 2008) Log Message: ----------- Updates for the 1.2 release.. Still broken however I need to get these into the svn Modified Paths: -------------- trunk/python-ogre/ThirdParty/caelum/Caelum.h trunk/python-ogre/ThirdParty/caelum/CaelumPrerequisites.h trunk/python-ogre/ThirdParty/caelum/CaelumSystem.cpp trunk/python-ogre/ThirdParty/caelum/CaelumSystem.h trunk/python-ogre/ThirdParty/caelum/CameraBoundElement.cpp trunk/python-ogre/ThirdParty/caelum/ImageHelper.cpp trunk/python-ogre/ThirdParty/caelum/ImageHelper.h trunk/python-ogre/ThirdParty/caelum/Sun.cpp trunk/python-ogre/ThirdParty/caelum/Sun.h trunk/python-ogre/ThirdParty/caelum/UniversalClock.cpp trunk/python-ogre/ThirdParty/caelum/UniversalClock.h trunk/python-ogre/ThirdParty/forests/ImpostorPage.cpp trunk/python-ogre/ThirdParty/forests/TreeLoader2D.cpp trunk/python-ogre/ThirdParty/forests/TreeLoader3D.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgre.h trunk/python-ogre/ThirdParty/nxogre/NxOgreActor.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreActor.h trunk/python-ogre/ThirdParty/nxogre/NxOgreActorBlueprint.h trunk/python-ogre/ThirdParty/nxogre/NxOgreAnimatedRenderable.h trunk/python-ogre/ThirdParty/nxogre/NxOgreBody.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreBody.h trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacter.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacter.h trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterController.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterController.h trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterModel.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterModel.h trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterMovementModel.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterMovementModel.h trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterSystem.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreCharacterSystem.h trunk/python-ogre/ThirdParty/nxogre/NxOgreCloth.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreCloth.h trunk/python-ogre/ThirdParty/nxogre/NxOgreClothRaycaster.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreClothRaycaster.h trunk/python-ogre/ThirdParty/nxogre/NxOgreCompoundActor.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreCompoundActor.h trunk/python-ogre/ThirdParty/nxogre/NxOgreContactStream.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreContactStream.h trunk/python-ogre/ThirdParty/nxogre/NxOgreContainer.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreContainer.h trunk/python-ogre/ThirdParty/nxogre/NxOgreCooking.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreCooking.h trunk/python-ogre/ThirdParty/nxogre/NxOgreDebugRenderer.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreDebugRenderer.h trunk/python-ogre/ThirdParty/nxogre/NxOgreDominanceGroup.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreDominanceGroup.h trunk/python-ogre/ThirdParty/nxogre/NxOgreEngine.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreEngine.h trunk/python-ogre/ThirdParty/nxogre/NxOgreError.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreError.h trunk/python-ogre/ThirdParty/nxogre/NxOgreExtendedTypes.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreExtendedTypes.h trunk/python-ogre/ThirdParty/nxogre/NxOgreFileResourceSystem.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreFileResourceSystem.h trunk/python-ogre/ThirdParty/nxogre/NxOgreFluid.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreFluid.h trunk/python-ogre/ThirdParty/nxogre/NxOgreFluidMesh.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreFluidMesh.h trunk/python-ogre/ThirdParty/nxogre/NxOgreForceField.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreForceField.h trunk/python-ogre/ThirdParty/nxogre/NxOgreGroup.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreGroup.h trunk/python-ogre/ThirdParty/nxogre/NxOgreHelpers.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreHelpers.h trunk/python-ogre/ThirdParty/nxogre/NxOgreIntersection.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreIntersection.h trunk/python-ogre/ThirdParty/nxogre/NxOgreJoint.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreJoint.h trunk/python-ogre/ThirdParty/nxogre/NxOgreJointSet1.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreJointSet1.h trunk/python-ogre/ThirdParty/nxogre/NxOgreJointSet2.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreJointSet2.h trunk/python-ogre/ThirdParty/nxogre/NxOgreLegacyCharacter.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreLegacyCharacter.h trunk/python-ogre/ThirdParty/nxogre/NxOgreLegacyCharacterController.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreLegacyCharacterController.h trunk/python-ogre/ThirdParty/nxogre/NxOgreLegacyCharacterHitReport.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreLegacyCharacterHitReport.h trunk/python-ogre/ThirdParty/nxogre/NxOgreLog.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreLog.h trunk/python-ogre/ThirdParty/nxogre/NxOgreMachine.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreMachine.h trunk/python-ogre/ThirdParty/nxogre/NxOgreMaterial.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreMaterial.h trunk/python-ogre/ThirdParty/nxogre/NxOgreMemoryStream.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreMemoryStream.h trunk/python-ogre/ThirdParty/nxogre/NxOgreNodeRenderable.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreNodeRenderable.h trunk/python-ogre/ThirdParty/nxogre/NxOgreNxActorController.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreNxActorController.h trunk/python-ogre/ThirdParty/nxogre/NxOgreNxCharacterController.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreNxCharacterController.h trunk/python-ogre/ThirdParty/nxogre/NxOgreOgreNodeRenderable.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreOgreNodeRenderable.h trunk/python-ogre/ThirdParty/nxogre/NxOgreOgreResourceSystem.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreOgreResourceSystem.h trunk/python-ogre/ThirdParty/nxogre/NxOgreOgreSceneRenderer.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreOgreSceneRenderer.h trunk/python-ogre/ThirdParty/nxogre/NxOgreParams.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreParams.h trunk/python-ogre/ThirdParty/nxogre/NxOgreParticleSystem.h trunk/python-ogre/ThirdParty/nxogre/NxOgrePerformer.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgrePerformer.h trunk/python-ogre/ThirdParty/nxogre/NxOgrePhysXDriver.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgrePhysXDriver.h trunk/python-ogre/ThirdParty/nxogre/NxOgrePose.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgrePose.h trunk/python-ogre/ThirdParty/nxogre/NxOgrePrerequisites.h trunk/python-ogre/ThirdParty/nxogre/NxOgreRaycaster.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreRaycaster.h trunk/python-ogre/ThirdParty/nxogre/NxOgreRemoteDebuggerConnection.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreRemoteDebuggerConnection.h trunk/python-ogre/ThirdParty/nxogre/NxOgreRenderable.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreRenderable.h trunk/python-ogre/ThirdParty/nxogre/NxOgreRenderableSource.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreRenderableSource.h trunk/python-ogre/ThirdParty/nxogre/NxOgreResourceManager.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreResourceManager.h trunk/python-ogre/ThirdParty/nxogre/NxOgreResourceManager_Convex.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreResourceManager_Triangle.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreResourceMesh.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreResourceMesh.h trunk/python-ogre/ThirdParty/nxogre/NxOgreResourceStream.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreResourceStream.h trunk/python-ogre/ThirdParty/nxogre/NxOgreResourceStreamPtr.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreResourceStreamPtr.h trunk/python-ogre/ThirdParty/nxogre/NxOgreResourceSystem.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreResourceSystem.h trunk/python-ogre/ThirdParty/nxogre/NxOgreScene.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreScene.h trunk/python-ogre/ThirdParty/nxogre/NxOgreSceneBlueprint.h trunk/python-ogre/ThirdParty/nxogre/NxOgreSceneContactController.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreSceneContactController.h trunk/python-ogre/ThirdParty/nxogre/NxOgreSceneController.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreSceneController.h trunk/python-ogre/ThirdParty/nxogre/NxOgreSceneRenderer.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreSceneRenderer.h trunk/python-ogre/ThirdParty/nxogre/NxOgreSceneSource.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreSceneSource.h trunk/python-ogre/ThirdParty/nxogre/NxOgreSceneTriggerController.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreSceneTriggerController.h trunk/python-ogre/ThirdParty/nxogre/NxOgreShape.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreShape.h trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeBlueprint.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeBlueprint.h trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeBlueprintConvex.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeBlueprintConvex.h trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeBlueprintMesh.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeBlueprintMesh.h trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeBlueprintPrimitives.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeBlueprintPrimitives.h trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeBlueprintTerrain.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeBlueprintTerrain.h trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeBlueprintWheel.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeBlueprintWheel.h trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeConvex.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeConvex.h trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeMesh.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeMesh.h trunk/python-ogre/ThirdParty/nxogre/NxOgreShapePrimitives.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreShapePrimitives.h trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeTerrain.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeTerrain.h trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeWheel.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeWheel.h trunk/python-ogre/ThirdParty/nxogre/NxOgreSimpleShape.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreSimpleShape.h trunk/python-ogre/ThirdParty/nxogre/NxOgreSkeletalRenderable.h trunk/python-ogre/ThirdParty/nxogre/NxOgreSkeleton.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreSkeleton.h trunk/python-ogre/ThirdParty/nxogre/NxOgreSoftBody.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreSoftBody.h trunk/python-ogre/ThirdParty/nxogre/NxOgreStable.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreStable.h trunk/python-ogre/ThirdParty/nxogre/NxOgreTesting.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreTesting.h trunk/python-ogre/ThirdParty/nxogre/NxOgreTrigger.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreTrigger.h trunk/python-ogre/ThirdParty/nxogre/NxOgreUserAllocator.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreUserAllocator.h trunk/python-ogre/ThirdParty/nxogre/NxOgreUserData.h trunk/python-ogre/ThirdParty/nxogre/NxOgreWheelSet.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreWheelSet.h trunk/python-ogre/ThirdParty/nxogre/NxOgreWorld.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreWorld.h trunk/python-ogre/ThirdParty/ogreal/OgreALOggSound.cpp trunk/python-ogre/ThirdParty/ogreal/OgreALPrereqs.h trunk/python-ogre/ThirdParty/ogreal/OgreALSound.cpp trunk/python-ogre/ThirdParty/ogreal/OgreALSound.h trunk/python-ogre/ThirdParty/ogreal/OgreALSoundManager.cpp trunk/python-ogre/ThirdParty/ogreal/OgreALSoundManager.h trunk/python-ogre/ThirdParty/ogreal/OgreALWavSound.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIBorder.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIBorder.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIButton.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIButton.h trunk/python-ogre/ThirdParty/quickgui/QuickGUICheckBox.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUICheckBox.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIComboBox.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIConsole.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIExportDLL.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIImage.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIImage.h trunk/python-ogre/ThirdParty/quickgui/QuickGUILabel.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUILabel.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIList.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIList.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIManager.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIManager.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIMouseCursor.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUINStateButton.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIPanel.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIPanel.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIProgressBar.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIProgressBar.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIQuad.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIQuad.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIQuadContainer.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIQuadContainer.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIRect.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIRect.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIScrollPane.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIScrollPane.h trunk/python-ogre/ThirdParty/quickgui/QuickGUISheet.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUISheet.h trunk/python-ogre/ThirdParty/quickgui/QuickGUISkinSet.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUISkinSet.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIText.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIText.h trunk/python-ogre/ThirdParty/quickgui/QuickGUITextBox.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUITextHelper.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUITextHelper.h trunk/python-ogre/ThirdParty/quickgui/QuickGUITree.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUITree.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIWidget.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIWidget.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIWindow.cpp Added Paths: ----------- trunk/python-ogre/ThirdParty/Hydrax/ trunk/python-ogre/ThirdParty/Hydrax/Enums.cpp trunk/python-ogre/ThirdParty/Hydrax/Enums.h trunk/python-ogre/ThirdParty/Hydrax/Help.cpp trunk/python-ogre/ThirdParty/Hydrax/Help.h trunk/python-ogre/ThirdParty/Hydrax/Hydrax.cpp trunk/python-ogre/ThirdParty/Hydrax/Hydrax.h trunk/python-ogre/ThirdParty/Hydrax/Mesh.cpp trunk/python-ogre/ThirdParty/Hydrax/Mesh.h trunk/python-ogre/ThirdParty/Hydrax/Perlin.cpp trunk/python-ogre/ThirdParty/Hydrax/Perlin.h trunk/python-ogre/ThirdParty/Hydrax/Prerequisites.cpp trunk/python-ogre/ThirdParty/Hydrax/Prerequisites.h trunk/python-ogre/ThirdParty/Hydrax/Structs.cpp trunk/python-ogre/ThirdParty/Hydrax/Structs.h trunk/python-ogre/ThirdParty/extra/ trunk/python-ogre/ThirdParty/extra/bin/ trunk/python-ogre/ThirdParty/extra/bin/avcodec.dll trunk/python-ogre/ThirdParty/extra/bin/avcodec.lib trunk/python-ogre/ThirdParty/extra/bin/avdevice.dll trunk/python-ogre/ThirdParty/extra/bin/avdevice.lib trunk/python-ogre/ThirdParty/extra/bin/avformat.dll trunk/python-ogre/ThirdParty/extra/bin/avformat.lib trunk/python-ogre/ThirdParty/extra/bin/avutil.dll trunk/python-ogre/ThirdParty/extra/bin/avutil.lib trunk/python-ogre/ThirdParty/extra/bin/ffmpeg.exe trunk/python-ogre/ThirdParty/extra/bin/libogg-0.dll trunk/python-ogre/ThirdParty/extra/include/ trunk/python-ogre/ThirdParty/extra/include/ffmpeg/ trunk/python-ogre/ThirdParty/extra/include/ffmpeg/adler32.h trunk/python-ogre/ThirdParty/extra/include/ffmpeg/avcodec.h trunk/python-ogre/ThirdParty/extra/include/ffmpeg/avdevice.h trunk/python-ogre/ThirdParty/extra/include/ffmpeg/avformat.h trunk/python-ogre/ThirdParty/extra/include/ffmpeg/avio.h trunk/python-ogre/ThirdParty/extra/include/ffmpeg/avstring.h trunk/python-ogre/ThirdParty/extra/include/ffmpeg/avutil.h trunk/python-ogre/ThirdParty/extra/include/ffmpeg/base64.h trunk/python-ogre/ThirdParty/extra/include/ffmpeg/common.h trunk/python-ogre/ThirdParty/extra/include/ffmpeg/crc.h trunk/python-ogre/ThirdParty/extra/include/ffmpeg/fifo.h trunk/python-ogre/ThirdParty/extra/include/ffmpeg/intfloat_readwrite.h trunk/python-ogre/ThirdParty/extra/include/ffmpeg/log.h trunk/python-ogre/ThirdParty/extra/include/ffmpeg/lzo.h trunk/python-ogre/ThirdParty/extra/include/ffmpeg/mathematics.h trunk/python-ogre/ThirdParty/extra/include/ffmpeg/md5.h trunk/python-ogre/ThirdParty/extra/include/ffmpeg/mem.h trunk/python-ogre/ThirdParty/extra/include/ffmpeg/opt.h trunk/python-ogre/ThirdParty/extra/include/ffmpeg/random.h trunk/python-ogre/ThirdParty/extra/include/ffmpeg/rational.h trunk/python-ogre/ThirdParty/extra/include/ffmpeg/rgb2rgb.h trunk/python-ogre/ThirdParty/extra/include/ffmpeg/rtsp.h trunk/python-ogre/ThirdParty/extra/include/ffmpeg/rtspcodes.h trunk/python-ogre/ThirdParty/extra/include/ffmpeg/sha1.h trunk/python-ogre/ThirdParty/extra/include/ffmpeg/swscale.h trunk/python-ogre/ThirdParty/extra/include/ogg/ trunk/python-ogre/ThirdParty/extra/include/ogg/config_types.h trunk/python-ogre/ThirdParty/extra/include/ogg/ogg.h trunk/python-ogre/ThirdParty/extra/include/ogg/os_types.h trunk/python-ogre/ThirdParty/extra/include/theora/ trunk/python-ogre/ThirdParty/extra/include/theora/theora.h trunk/python-ogre/ThirdParty/extra/lib/ trunk/python-ogre/ThirdParty/extra/lib/libogg.a trunk/python-ogre/ThirdParty/extra/lib/libogg.dll.a trunk/python-ogre/ThirdParty/extra/lib/libtheora.a trunk/python-ogre/ThirdParty/extra/lib/pkgconfig/ trunk/python-ogre/ThirdParty/extra/lib/pkgconfig/libavcodec.pc trunk/python-ogre/ThirdParty/extra/lib/pkgconfig/libavdevice.pc trunk/python-ogre/ThirdParty/extra/lib/pkgconfig/libavformat.pc trunk/python-ogre/ThirdParty/extra/lib/pkgconfig/libavutil.pc trunk/python-ogre/ThirdParty/extra/lib/pkgconfig/libswscale.pc trunk/python-ogre/ThirdParty/extra/lib/pkgconfig/ogg.pc trunk/python-ogre/ThirdParty/extra/lib/pkgconfig/theora.pc trunk/python-ogre/ThirdParty/opensteer/ Added: trunk/python-ogre/ThirdParty/Hydrax/Enums.cpp =================================================================== --- trunk/python-ogre/ThirdParty/Hydrax/Enums.cpp (rev 0) +++ trunk/python-ogre/ThirdParty/Hydrax/Enums.cpp 2008-02-13 09:25:34 UTC (rev 562) @@ -0,0 +1,31 @@ +/* +-------------------------------------------------------------------------------- +This source file is part of Hydrax. +Visit --- + +Copyright (C) 2007 Xavier Vergu\xEDn Gonz\xE1lez <xav...@ho...> + <xa...@gm...> + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software Foundation, Inc., +59 Temple Place - Suite 330, Boston, MA 02111-1307, USA, or go to +http://www.gnu.org/copyleft/gpl.html. +-------------------------------------------------------------------------------- +*/ + +#include "Enums.h" + +namespace Hydrax +{ + +} Added: trunk/python-ogre/ThirdParty/Hydrax/Enums.h =================================================================== --- trunk/python-ogre/ThirdParty/Hydrax/Enums.h (rev 0) +++ trunk/python-ogre/ThirdParty/Hydrax/Enums.h 2008-02-13 09:25:34 UTC (rev 562) @@ -0,0 +1,69 @@ +/* +-------------------------------------------------------------------------------- +This source file is part of Hydrax. +Visit --- + +Copyright (C) 2007 Xavier Vergu\xEDn Gonz\xE1lez <xav...@ho...> + <xa...@gm...> + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software Foundation, Inc., +59 Temple Place - Suite 330, Boston, MA 02111-1307, USA, or go to +http://www.gnu.org/copyleft/gpl.html. +-------------------------------------------------------------------------------- +*/ + +#ifndef _Enums_H_ +#define _Enums_H_ + +#include "Prerequisites.h" + +namespace Hydrax +{ + /** Texture quality enumeration(2^n) + */ + enum DllExport TextureQuality + { + TEX_QUA_2 = 2, + TEX_QUA_4 = 4, + TEX_QUA_8 = 8, + TEX_QUA_16 = 16, + TEX_QUA_32 = 32, + TEX_QUA_64 = 64, + TEX_QUA_128 = 128, + TEX_QUA_256 = 256, + TEX_QUA_512 = 512, + TEX_QUA_1024 = 1024 + }; + + /** Hydrax flags for select the components + that we want to use. + 0 for none, 1 for all. + */ + enum DllExport HydraxComponent + { + HYDRAX_COMPONENT_SUN = 1 << 0, + HYDRAX_COMPONENT_FOAM = 1 << 1, + HYDRAX_COMPONENT_DEPTH = 1 << 2, + /// Smooth transitions needs depth component + HYDRAX_COMPONENT_SMOOTH = 1 << 3, + HYDRAX_COMPONENT_CAUSTICS = 1 << 4, + /// See documentation + HYDRAX_COMPONENT_PLSM2 = 1 << 5, + + HYDRAX_COMPONENTS_NONE = 0x0000, + HYDRAX_COMPONENTS_ALL = 0x001F, + }; +} + +#endif Added: trunk/python-ogre/ThirdParty/Hydrax/Help.cpp =================================================================== --- trunk/python-ogre/ThirdParty/Hydrax/Help.cpp (rev 0) +++ trunk/python-ogre/ThirdParty/Hydrax/Help.cpp 2008-02-13 09:25:34 UTC (rev 562) @@ -0,0 +1,31 @@ +/* +-------------------------------------------------------------------------------- +This source file is part of Hydrax. +Visit --- + +Copyright (C) 2007 Xavier Vergu\xEDn Gonz\xE1lez <xav...@ho...> + <xa...@gm...> + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software Foundation, Inc., +59 Temple Place - Suite 330, Boston, MA 02111-1307, USA, or go to +http://www.gnu.org/copyleft/gpl.html. +-------------------------------------------------------------------------------- +*/ + +#include "Help.h" + +namespace Hydrax +{ + +} Added: trunk/python-ogre/ThirdParty/Hydrax/Help.h =================================================================== --- trunk/python-ogre/ThirdParty/Hydrax/Help.h (rev 0) +++ trunk/python-ogre/ThirdParty/Hydrax/Help.h 2008-02-13 09:25:34 UTC (rev 562) @@ -0,0 +1,193 @@ +/* +-------------------------------------------------------------------------------- +This source file is part of Hydrax. +Visit --- + +Copyright (C) 2007 Xavier Vergu\xEDn Gonz\xE1lez <xav...@ho...> + <xa...@gm...> + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software Foundation, Inc., +59 Temple Place - Suite 330, Boston, MA 02111-1307, USA, or go to +http://www.gnu.org/copyleft/gpl.html. +-------------------------------------------------------------------------------- +*/ + +#ifndef _Help_H_ +#define _Help_H_ + +#include "Prerequisites.h" + +#include "../noise/noise.h" +#include "../noise/noiseutils.h" + +namespace Hydrax +{ + /** Struct wich contains an especific width and height value + */ + struct DllExport Size + { + /// Width value + int Width; + /// Height value + int Height; + + /** Default constructor + */ + Size() + { + Width = 0; + Height = 0; + } + + /** Constructor + @param size The width and height values + */ + Size(int size) + { + Width = size; + Height = size; + } + + /** Constructor + @param width Width value + @param height Height value + */ + Size(int width, int height) + { + Width = width; + Height = height; + } + + /** Destructor + */ + ~Size() + { + } + + /** Sets the same width and height value + @param size The width and height values + */ + void setSize(int size) + { + Width = size; + Height = size; + } + + /** Sets the especified values + @param width Width value + @param height Height value + */ + void setSize(int width, int height) + { + Width = width; + Height = height; + } + }; + + /** Struct for store a float** data pointer, its size and its normal map + */ + struct DllExport NoiseBuffer + { + /// Our float pointer data + float** mData; + /// Size + Size mSize; + /// Normal map(its use is optional) + noise::utils::Image mNormalMap; + + /** Default constructor + */ + NoiseBuffer() : mData(0) + { + } + + /** Destructor + */ + ~NoiseBuffer() + { + if (mData) + { + for (int k = 0; k < mSize.Width; k++) + { + delete[] mData[k]; + } + + delete[] mData; + } + } + + /** Constructor + @param Data Data pointer + @param Size Data bidimensional array width/height size + */ + NoiseBuffer(float **Data, Size Size) + { + mData = Data; + mSize = Size; + } + + /** Constructor + @param Data Data pointer + @param Size Data bidimensional array width/height size + @param NormalMap noise::utils::Image that contains our data image normal map + */ + NoiseBuffer(float **Data, Size Size, noise::utils::Image NormalMap) + { + mData = Data; + mSize = Size; + mNormalMap = NormalMap; + } + + /** Set data and size + @param Data Data pointer + @param Size Data bidimensional array width/height size + */ + void Set(float **Data, Size Size) + { + mData = Data; + mSize = Size; + } + + /** Set data, size and normal map image + @param Data Data pointer + @param Size Data bidimensional array width/height size + @param NormalMap noise::utils::Image that contains our data image normal map + */ + void Set(float **Data, Size Size, noise::utils::Image NormalMap) + { + mData = Data; + mSize = Size; + mNormalMap = NormalMap; + } + + /** Get our data pointer + @return Data float** pointer + */ + float** getData() + { + return mData; + } + + /** Get float value from an especific x/y coordinates + @return x/y value of our data + */ + float getData(int x, int y) + { + return mData[x][y]; + } + + }; +} + +#endif Added: trunk/python-ogre/ThirdParty/Hydrax/Hydrax.cpp =================================================================== --- trunk/python-ogre/ThirdParty/Hydrax/Hydrax.cpp (rev 0) +++ trunk/python-ogre/ThirdParty/Hydrax/Hydrax.cpp 2008-02-13 09:25:34 UTC (rev 562) @@ -0,0 +1,1316 @@ +/* +-------------------------------------------------------------------------------- +This source file is part of Hydrax. +Visit --- + +Copyright (C) 2007 Xavier Vergu\xEDn Gonz\xE1lez <xav...@ho...> + <xa...@gm...> + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software Foundation, Inc., +59 Temple Place - Suite 330, Boston, MA 02111-1307, USA, or go to +http://www.gnu.org/copyleft/gpl.html. +-------------------------------------------------------------------------------- +*/ + +#include "Hydrax.h" + +namespace Hydrax +{ + + Hydrax::Hydrax(Ogre::SceneManager *sm, Ogre::Camera *c) + : mSceneManager(sm) + , mCamera(c) + , mCreated(false) + , mPolygonMode(0) + , mPosition(Ogre::Vector3(0,0,0)) + , mPlanesError(0) + , mVelocity(9.75) + , mFullReflectionDistance(90000000) + , mGlobalTransparency(0.05) + , mNormalDistortion(0.09) + , mSunPosition(Ogre::Vector3(5000,3000,1)) + , mSunStrength(1.75) + , mSunArea(150) + , mSunColor(Ogre::Vector3(1,0.75,0.25)) + , mFoamMaxDistance(75000000) + , mFoamScale(50) + , mFoamStart(0.5) + , mFoamTransparency(1.275) + , mDepthLimit(0) + , mDepthColor(Ogre::Vector3(0,0.1,0.172)) + , mSmoothPower(30) + , mCausticsScale(20) + , mCausticsPower(15) + , mCausticsEnd(0.55) + , mActualTexScrollPosition(0) + , mMesh(new Mesh(sm)) + , mSceneNode(0) + , mRefractionPlane(0) + , mReflectionPlane(0) + , mDepthPlane(0) + , mTextureRefraction(0) + , mTextureReflection(0) + , mTextureDepth(0) + , mPlanesSceneNode(0) + , mComponents(HYDRAX_COMPONENTS_NONE) + { + LOG("[Hydrax] Hydrax object created."); + } + + Hydrax::~Hydrax() + { + if (mSceneNode) + { + mSceneNode->detachAllObjects(); + mSceneNode->getParentSceneNode()->removeAndDestroyChild(mSceneNode->getName()); + + Ogre::TextureManager::getSingleton().remove("HydraxHeight"); + Ogre::TextureManager::getSingleton().remove("HydraxNormalMap"); + + delete mMesh; + } + + if (mPlanesSceneNode) + { + mPlanesSceneNode->detachAllObjects(); + mPlanesSceneNode->getParentSceneNode()->removeAndDestroyChild(mPlanesSceneNode->getName()); + + Ogre::RenderTarget* mRT_TextureRefraction = mTextureRefraction->getBuffer()->getRenderTarget(); + mRT_TextureRefraction->removeAllListeners(); + mRT_TextureRefraction->removeAllViewports(); + + Ogre::RenderTarget* mRT_TextureReflection = mTextureReflection->getBuffer()->getRenderTarget(); + mRT_TextureReflection->removeAllListeners(); + mRT_TextureReflection->removeAllViewports(); + + if (isComponent(HYDRAX_COMPONENT_DEPTH)) + { + Ogre::RenderTarget* mRT_TextureDepth = mTextureDepth->getBuffer()->getRenderTarget(); + mRT_TextureDepth->removeAllListeners(); + mRT_TextureDepth->removeAllViewports(); + + Ogre::TextureManager::getSingleton().remove("Depth"); + + Ogre::MeshManager::getSingleton().remove("DepthClipPlane"); + } + + Ogre::TextureManager::getSingleton().remove("Reflection"); + Ogre::TextureManager::getSingleton().remove("Refraction"); + + Ogre::MeshManager::getSingleton().remove("RefractionClipPlane"); + Ogre::MeshManager::getSingleton().remove("ReflectionClipPlane"); + } + + mNoiseBuffer[2].Set(mPerlin.getFreeData(), mPerlin.mSize); + mNoiseBuffer.clear(); + + LOG("[Hydrax] Hydrax object removed."); + } + + void Hydrax::create() + { + if (isCreated()) + { + LOG("[Hydrax] Hydrax alredy created, skipping..."); + + return; + } + + LOG("[Hydrax] Creating perlin noise textures and normal maps."); + _createTextures(); + _updateTextures(0); + LOG("[Hydrax] Perlin noise textures and normal maps created."); + + LOG("[Hydrax] Creating water mesh."); + mSceneNode = mSceneManager->getRootSceneNode()->createChildSceneNode(); + mMesh->create(mSceneNode); + mMesh->update(mNoiseBuffer[2]); + LOG("[Hydrax] Water mesh created"); + + LOG("[Hydrax] Creating RTListeners."); + _createRttListeners(); + LOG("[Hydrax] RTListeners created"); + + mCreated = true; + } + + void Hydrax::_createTextures() + { + mPerlin.setSize(mPerlinOptions.TexQuality, mPerlinOptions.TexQuality); + + mNoiseBuffer.reserve(3); + mNoiseBuffer.resize(3); + + mPerlin.mPerlinModule.SetFrequency(mPerlinOptions.Frecuency); + mPerlin.mPerlinModule.SetPersistence(mPerlinOptions.Persistence); + mPerlin.mPerlinModule.SetOctaveCount(mPerlinOptions.Octave); + mPerlin.mPerlinModule.SetLacunarity(mPerlinOptions.Lacunarity); + + mPerlin.createPerlinTexture(Ogre::String("HydraxHeight")); + mPerlin.createNMTexture(Ogre::String("HydraxNormalMap")); + + mPerlin.mPerlinModule.SetSeed(0); + mNoiseBuffer[0].Set(mPerlin.getData(true), mPerlin.mSize, mPerlin.getNormalMap(mPerlinOptions.NMHeight, true)); + mPerlin.mPerlinModule.SetSeed(1); + mNoiseBuffer[1].Set(mPerlin.getData(true), mPerlin.mSize, mPerlin.getNormalMap(mPerlinOptions.NMHeight, true)); + mNoiseBuffer[2].Set(mPerlin.getFreeData(), mPerlin.mSize); + mNoiseBuffer[2].mNormalMap.SetSize(mPerlin.mSize.Width, mPerlin.mSize.Height); + } + + void Hydrax::_updateTextures(Ogre::Real timeSinceLastFrame) + { + int x, y, newY1, newY1a, newY2, newY2a; + float a, b, c, d, diff, diffb; + + float** OriginalA = mNoiseBuffer[0].mData; + float** OriginalB = mNoiseBuffer[1].mData; + + diff = (mActualTexScrollPosition - static_cast<int>(mActualTexScrollPosition))/2; // Divide by 2 to avoid it in: mNoiseBuffer[2].mData[x][y] = (c+d)/2; + diffb = 0.5 - diff; + + for (y = 0; y < mNoiseBuffer[0].mSize.Height; y ++) + { + newY1 = y + static_cast<int>(mActualTexScrollPosition); + if (newY1>mNoiseBuffer[0].mSize.Height-1) + { + newY1-=mNoiseBuffer[0].mSize.Height; + } + + newY1a = (y+1) + static_cast<int>(mActualTexScrollPosition); + if (newY1a>mNoiseBuffer[0].mSize.Height-1) + { + newY1a-=mNoiseBuffer[0].mSize.Height; + } + + newY2 = y - static_cast<int>(mActualTexScrollPosition); + if (newY2<0) + { + newY2+=mNoiseBuffer[0].mSize.Height-1; + } + + newY2a = (y+1) - static_cast<int>(mActualTexScrollPosition); + if (newY2a<0) + { + newY2a+=mNoiseBuffer[0].mSize.Height-1; + } + if (newY2a>mNoiseBuffer[0].mSize.Height-1) + { + newY2a-=mNoiseBuffer[0].mSize.Height; + } + + for (x = 0; x < mNoiseBuffer[0].mSize.Width; x ++) + { + a = OriginalA[newY1][x]; + b = OriginalA[newY1a][x]; + + c=a*diffb+ b*diff; + + a = OriginalB[newY2][x]; + b = OriginalB[newY2a][x]; + + d=a*diff + b*diffb; + + mNoiseBuffer[2].mData[y][x] = (c+d); + } + } + + mActualTexScrollPosition += mVelocity*timeSinceLastFrame; + + if (mActualTexScrollPosition>mNoiseBuffer[0].mSize.Height) + { + mActualTexScrollPosition = 0; + } + + mPerlin.updatePerlinTexture(mNoiseBuffer[2].mData); + _updateNM(); + } + + void Hydrax::_updateNM() + { + int x, y, newY1, newY1a, newY2, newY2a; + float diff, diffb; + + diff = (mActualTexScrollPosition - static_cast<int>(mActualTexScrollPosition))/2; // Divide by 2 to avoid it in the bucle + diffb = 0.5 - diff; + + for (y = 0; y < mNoiseBuffer[0].mSize.Height; y ++) + { + newY1 = y + static_cast<int>(mActualTexScrollPosition); + if (newY1>mNoiseBuffer[0].mSize.Height-1) + { + newY1-=mNoiseBuffer[0].mSize.Height; + } + + newY1a = y+1 + static_cast<int>(mActualTexScrollPosition); + if (newY1a>mNoiseBuffer[0].mSize.Height-1) + { + newY1a-=mNoiseBuffer[0].mSize.Height; + } + + newY2 = y - static_cast<int>(mActualTexScrollPosition); + if (newY2<0) + { + newY2+=mNoiseBuffer[0].mSize.Height-1; + } + + newY2a = (y+1) - static_cast<int>(mActualTexScrollPosition); + if (newY2a<0) + { + newY2a+=mNoiseBuffer[0].mSize.Height-1; + } + if (newY2a>mNoiseBuffer[0].mSize.Height-1) + { + newY2a-=mNoiseBuffer[0].mSize.Height; + } + + for (x = 0; x < mNoiseBuffer[0].mSize.Width; x ++) + { + noise::utils::Color c = + noise::utils::Color( + // Red + (( mNoiseBuffer[1].mNormalMap.GetValue(newY1,x).red *diffb + mNoiseBuffer[1].mNormalMap.GetValue(newY1a,x).red *diff ) + +(mNoiseBuffer[0].mNormalMap.GetValue(newY2,x).red *diff + mNoiseBuffer[0].mNormalMap.GetValue(newY2a,x).red *diffb)), + // Green + (( mNoiseBuffer[1].mNormalMap.GetValue(newY1,x).green *diffb + mNoiseBuffer[1].mNormalMap.GetValue(newY1a,x).green *diff ) + +(mNoiseBuffer[0].mNormalMap.GetValue(newY2,x).green *diff + mNoiseBuffer[0].mNormalMap.GetValue(newY2a,x).green *diffb)), + // Blue + (( mNoiseBuffer[1].mNormalMap.GetValue(newY1,x).blue *diffb + mNoiseBuffer[1].mNormalMap.GetValue(newY1a,x).blue *diff ) + +(mNoiseBuffer[0].mNormalMap.GetValue(newY2,x).blue *diff + mNoiseBuffer[0].mNormalMap.GetValue(newY2a,x).blue *diffb)), + // Alpha + 255); + + mNoiseBuffer[2].mNormalMap.SetValue(y,x,c); + } + } + + mPerlin.updateNMTexture(mNoiseBuffer[2].mNormalMap); + } + + void Hydrax::_createRttListeners() + { + if (!isCreated()) + { + mRefractionPlane = new Ogre::MovablePlane("RefractionPlane"); + mReflectionPlane = new Ogre::MovablePlane("ReflectionPlane"); + + mRefractionPlane->d = 0; + mReflectionPlane->d = 0; + + mRefractionPlane->normal = Ogre::Vector3::NEGATIVE_UNIT_Y; + mReflectionPlane->normal = Ogre::Vector3::UNIT_Y; + + Ogre::MeshManager::getSingleton().createPlane( + "RefractionClipPlane",Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, + *mRefractionPlane, + mMesh->getSize().Width,mMesh->getSize().Height, + 10,10,true,1,5,5,Ogre::Vector3::UNIT_Z); + + Ogre::MeshManager::getSingleton().createPlane( + "ReflectionClipPlane",Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, + *mReflectionPlane, + mMesh->getSize().Width,mMesh->getSize().Height, + 10,10,true,1,5,5,Ogre::Vector3::UNIT_Z); + + mRefractionPlane->setCastShadows(false); + mReflectionPlane->setCastShadows(false); + + mPlanesSceneNode = mSceneManager->getRootSceneNode()->createChildSceneNode(); + mPlanesSceneNode->attachObject(mRefractionPlane); + mPlanesSceneNode->attachObject(mReflectionPlane); + + mReflectionListener.mHydrax = this; + mRefractionListener.mHydrax = this; + } + + Ogre::TextureManager::getSingleton().remove("Reflection"); + Ogre::TextureManager::getSingleton().remove("Refraction"); + + mTextureRefraction = Ogre::TextureManager::getSingleton().createManual( + "Refraction", + Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, + Ogre::TEX_TYPE_2D, + mRttOptions.RefractionQuality, mRttOptions.RefractionQuality, 0, + Ogre::PF_R8G8B8, + Ogre::TU_RENDERTARGET); + + Ogre::RenderTarget* mRT_TextureRefraction = mTextureRefraction->getBuffer()->getRenderTarget(); + { + Ogre::Viewport *v = mRT_TextureRefraction->addViewport(mCamera); + v->setClearEveryFrame(true); + v->setBackgroundColour(Ogre::ColourValue::White); + v->setOverlaysEnabled(false); + + mRT_TextureRefraction->addListener(&mRefractionListener); + + Ogre::MaterialPtr mat = Ogre::MaterialManager::getSingleton().getByName(mMesh->getMaterialName()); + Ogre::TextureUnitState* t = mat->getTechnique(0)->getPass(0)->getTextureUnitState(2); + t->setTextureName("Refraction"); + } + + mTextureReflection = Ogre::TextureManager::getSingleton().createManual( + "Reflection", + Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, + Ogre::TEX_TYPE_2D, + mRttOptions.ReflectionQuality, mRttOptions.ReflectionQuality, 0, + Ogre::PF_R8G8B8, + Ogre::TU_RENDERTARGET); + + Ogre::RenderTarget* mRT_TextureReflection = mTextureReflection->getBuffer()->getRenderTarget(); + { + Ogre::Viewport *v = mRT_TextureReflection->addViewport(mCamera); + v->setClearEveryFrame(true); + v->setBackgroundColour(Ogre::ColourValue::White); + v->setOverlaysEnabled(false); + + mRT_TextureReflection->addListener(&mReflectionListener); + + Ogre::MaterialPtr mat = Ogre::MaterialManager::getSingleton().getByName(mMesh->getMaterialName()); + Ogre::TextureUnitState* t = mat->getTechnique(0)->getPass(0)->getTextureUnitState(1); + t->setTextureName("Reflection"); + } + + if (isComponent(HYDRAX_COMPONENT_DEPTH)) + { + _createDepthRttListener(); + } + } + + void Hydrax::_createDepthRttListener(bool Create, bool Delete) + { + if (Create) + { + Ogre::TextureManager::getSingleton().remove("Depth"); + + if (!isCreated()) + { + mDepthPlane = new Ogre::MovablePlane("DepthPlane"); + + mDepthPlane->d = 0; + mDepthPlane->normal = Ogre::Vector3::NEGATIVE_UNIT_Y; + + Ogre::MeshManager::getSingleton().createPlane( + "DepthClipPlane",Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, + *mDepthPlane, + mMesh->getSize().Width,mMesh->getSize().Height, + 10,10,true,1,5,5,Ogre::Vector3::UNIT_Z); + + mDepthPlane->setCastShadows(false); + + mPlanesSceneNode->attachObject(mDepthPlane); + + mDepthListener.mHydrax = this; + } + + mTextureDepth = Ogre::TextureManager::getSingleton().createManual( + "Depth", + Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, + Ogre::TEX_TYPE_2D, + mRttOptions.DepthQuality, mRttOptions.DepthQuality, 0, + Ogre::PF_R8G8B8, + Ogre::TU_RENDERTARGET); + + Ogre::RenderTarget* mRT_TextureDepth = mTextureDepth->getBuffer()->getRenderTarget(); + { + Ogre::Viewport *v = mRT_TextureDepth->addViewport(mCamera); + v->setClearEveryFrame(true); + v->setBackgroundColour(Ogre::ColourValue::White); + v->setOverlaysEnabled(false); + v->setMaterialScheme("Depth"); + + mRT_TextureDepth->addListener(&mDepthListener); + + Ogre::MaterialPtr mat = Ogre::MaterialManager::getSingleton().getByName(mMesh->getMaterialName()); + Ogre::TextureUnitState* t = mat->getTechnique(0)->getPass(0)->getTextureUnitState(3); + t->setTextureName("Depth"); + } + + } + if (Delete) + { + Ogre::RenderTarget* mRT_TextureDepth = mTextureDepth->getBuffer()->getRenderTarget(); + mRT_TextureDepth->removeAllListeners(); + mRT_TextureDepth->removeAllViewports(); + + Ogre::TextureManager::getSingleton().remove("Depth"); + + Ogre::MeshManager::getSingleton().remove("DepthClipPlane"); + } + } + + void Hydrax::CReflectionListener::preRenderTargetUpdate(const Ogre::RenderTargetEvent& evt) + { + mHydrax->mMesh->getEntity()->setVisible(false); + mHydrax->mReflectionPlane->getParentNode()->translate(0,mHydrax->mPlanesError,0); + + mHydrax->mCamera->enableReflection(mHydrax->mReflectionPlane); + mHydrax->mCamera->enableCustomNearClipPlane(mHydrax->mReflectionPlane); + } + + void Hydrax::CReflectionListener::postRenderTargetUpdate(const Ogre::RenderTargetEvent& evt) + { + mHydrax->mMesh->getEntity()->setVisible(true); + mHydrax->mReflectionPlane->getParentNode()->translate(0,-mHydrax->mPlanesError,0); + + mHydrax->mCamera->disableReflection(); + mHydrax->mCamera->disableCustomNearClipPlane(); + } + + void Hydrax::CRefractionListener::preRenderTargetUpdate(const Ogre::RenderTargetEvent& evt) + { + mHydrax->mMesh->getEntity()->setVisible(false); + mHydrax->mRefractionPlane->getParentNode()->translate(0,mHydrax->mPlanesError,0); + + mHydrax->mCamera->enableCustomNearClipPlane(mHydrax->mRefractionPlane); + } + + void Hydrax::CRefractionListener::postRenderTargetUpdate(const Ogre::RenderTargetEvent& evt) + { + mHydrax->mMesh->getEntity()->setVisible(true); + mHydrax->mRefractionPlane->getParentNode()->translate(0,-mHydrax->mPlanesError,0); + + mHydrax->mCamera->disableCustomNearClipPlane(); + } + + void Hydrax::CDepthListener::preRenderTargetUpdate(const Ogre::RenderTargetEvent& evt) + { + mHydrax->mMesh->getEntity()->setVisible(false); + + Ogre::SceneManager::MovableObjectIterator it = mHydrax->mSceneManager->getMovableObjectIterator("Entity"); + + Ogre::Entity* cur; + mMaterials.empty(); + + while (it.hasMoreElements()) + { + cur = dynamic_cast<Ogre::Entity*>(it.peekNextValue()); + mMaterials.push(cur->getSubEntity(0)->getMaterialName()); + + if (mHydrax->isComponent(HYDRAX_COMPONENT_CAUSTICS)) + { + cur->getSubEntity(0)->setMaterialName("HydraxShaderDepthCaustics"); + } + else + { + cur->getSubEntity(0)->setMaterialName("HydraxShaderDepth"); + } + + it.moveNext(); + } + + mHydrax->mDepthPlane->getParentNode()->translate(0,mHydrax->mPlanesError,0); + mHydrax->mCamera->enableCustomNearClipPlane(mHydrax->mDepthPlane); + } + + void Hydrax::CDepthListener::postRenderTargetUpdate(const Ogre::RenderTargetEvent& evt) + { + Ogre::SceneManager::MovableObjectIterator it = mHydrax->mSceneManager->getMovableObjectIterator("Entity"); + + Ogre::Entity* cur; + + while (it.hasMoreElements()) + { + std::string name = mMaterials.front(); + + cur = dynamic_cast<Ogre::Entity*>(it.peekNextValue()); + if (Ogre::MaterialManager::getSingleton().resourceExists(name)) + cur->setMaterialName(name); + + mMaterials.pop(); + it.moveNext(); + } + + mHydrax->mMesh->getEntity()->setVisible(true); + + mHydrax->mCamera->disableCustomNearClipPlane(); + mHydrax->mDepthPlane->getParentNode()->translate(0,-mHydrax->mPlanesError,0); + } + + void Hydrax::setPerlinOptions(PerlinOptions PerlinOptions) + { + mPerlinOptions = PerlinOptions; + + if (isCreated()) + { + LOG("[Hydrax] Updating perlin options."); + + Ogre::TextureManager::getSingleton().remove("HydraxHeight"); + Ogre::TextureManager::getSingleton().remove("HydraxNormalMap"); + + mNoiseBuffer.clear(); + + _createTextures(); + _updateTextures(0); + + LOG("[Hydrax] Perlin options updated."); + } + } + + void Hydrax::setMeshOptions(MeshOptions MeshOptions) + { + if (isCreated()) + { + Ogre::String MaterialNameTmp = mMesh->getMaterialName(); + + LOG("[Hydrax] Updating water mesh."); + LOG("[Hydrax] Deleting water mesh."); + + delete mMesh; + + LOG("[Hydrax] Water mesh deleted."); + + LOG("[Hydrax] Creating water mesh."); + mMesh = new Mesh(mSceneManager); + mMesh->setMeshOptions(MeshOptions); + mMesh->setMaterialName(MaterialNameTmp); + mMesh->create(mSceneNode); + setPosition(mPosition); + mMesh->update(mNoiseBuffer[2]); + LOG("[Hydrax] Water mesh created"); + + return; + } + + mMesh->setMeshOptions(MeshOptions); + } + + void Hydrax::setRttOptions(RttOptions RttOptions) + { + mRttOptions = RttOptions; + + if (isCreated()) + { + LOG("[Hydrax] Updating Rtt options."); + + Ogre::RenderTarget* mRT_TextureRefraction = mTextureRefraction->getBuffer()->getRenderTarget(); + mRT_TextureRefraction->removeAllListeners(); + mRT_TextureRefraction->removeAllViewports(); + + Ogre::RenderTarget* mRT_TextureReflection = mTextureReflection->getBuffer()->getRenderTarget(); + mRT_TextureReflection->removeAllListeners(); + mRT_TextureReflection->removeAllViewports(); + + if (isComponent(HYDRAX_COMPONENT_DEPTH)) + { + Ogre::RenderTarget* mRT_TextureDepth = mTextureDepth->getBuffer()->getRenderTarget(); + mRT_TextureDepth->removeAllListeners(); + mRT_TextureDepth->removeAllViewports(); + + Ogre::TextureManager::getSingleton().remove("Depth"); + } + + Ogre::TextureManager::getSingleton().remove("Reflection"); + Ogre::TextureManager::getSingleton().remove("Refraction"); + + _createRttListeners(); + + LOG("[Hydrax] Rtt options updated."); + } + } + + void Hydrax::setPolygonMode(int Tipe) + { + Ogre::MaterialPtr mat = Ogre::MaterialManager::getSingleton().getByName(mMesh->getMaterialName()); + + if (Tipe == 0) + { + mat->getTechnique(0)->getPass(0)->setPolygonMode(Ogre::PM_SOLID); + } + else if (Tipe == 1) + { + mat->getTechnique(0)->getPass(0)->setPolygonMode(Ogre::PM_WIREFRAME); + } + else if (Tipe == 2) + { + mat->getTechnique(0)->getPass(0)->setPolygonMode(Ogre::PM_POINTS); + } + } + + void Hydrax::update(Ogre::Real timeSinceLastFrame) + { + if (mVelocity == 0) + { + return; + } + + _updateTextures(timeSinceLastFrame); + mMesh->update(mNoiseBuffer[2]); + } + + void Hydrax::setComponents(HydraxComponent Components) + { + // Create/Delete depth rtt listeners if it's necesary + if (isCreated()) + { + if (isComponent(HYDRAX_COMPONENT_DEPTH)) + { + if (!(Components & HYDRAX_COMPONENT_DEPTH)) + { + _createDepthRttListener(false, true); + } + } + else + { + if (Components & HYDRAX_COMPONENT_DEPTH) + { + _createDepthRttListener(); + } + } + } + + mComponents = Components; + + /* Shaders: + + 1 - Standard + 2 - Standard, Sun + 3 - Standard, Foam + 4 - Standard, Sun, Foam + + 5 - Depth + 6 - Depth, Sun + 7 - Depth, Foam + 8 - Depth, Sun, Foam + + 9 - Depth, Smooth + 10 - Depth, Smooth, Sun + 11 - Depth, Smooth, Foam + 12 - Depth, Smooth, Sun, Foam + + 13 - Depth, Caustics + 14 - Depth, Sun, Caustics + 15 - Depth, Foam, Caustics + 16 - Depth, Sun, Foam, Caustics + + 17 - Depth, Smooth, Caustics + 18 - Depth, Smooth, Sun, Caustics + 19 - Depth, Smooth, Foam, Caustics + 20 - Depth, Smooth, Sun, Foam, Caustics + */ + + int Index = 1; + + if (isComponent(HYDRAX_COMPONENT_SUN)) + { + Index ++; + } + + if (isComponent(HYDRAX_COMPONENT_FOAM)) + { + Index += 2; + } + + if (isComponent(HYDRAX_COMPONENT_DEPTH)) + { + Index += 4; + } + + if (isComponent(HYDRAX_COMPONENT_SMOOTH) || isComponent(HYDRAX_COMPONENT_CAUSTICS)) + { + if (isComponent(HYDRAX_COMPONENT_DEPTH)) + { + Index += 4; + + if (isComponent(HYDRAX_COMPONENT_CAUSTICS)) + { + Index += 8; + } + } + else + { + // Delete smooth component: Mask flags can't be removed + // so we have to evaluate all posibilities + // and reasign components... + + if (isComponent(HYDRAX_COMPONENT_SUN) && + isComponent(HYDRAX_COMPONENT_FOAM) && + isComponent(HYDRAX_COMPONENT_PLSM2)) + { + mComponents = static_cast<HydraxComponent> + (HYDRAX_COMPONENT_SUN | + HYDRAX_COMPONENT_FOAM | + HYDRAX_COMPONENT_PLSM2); + } + else + if (isComponent(HYDRAX_COMPONENT_SUN) && + isComponent(HYDRAX_COMPONENT_FOAM)) + { + mComponents = static_cast<HydraxComponent> + (HYDRAX_COMPONENT_SUN | + HYDRAX_COMPONENT_FOAM); + } + else + if (isComponent(HYDRAX_COMPONENT_SUN) && + isComponent(HYDRAX_COMPONENT_PLSM2)) + { + mComponents = static_cast<HydraxComponent> + (HYDRAX_COMPONENT_SUN | + HYDRAX_COMPONENT_PLSM2); + } + else + if (isComponent(HYDRAX_COMPONENT_FOAM) && + isComponent(HYDRAX_COMPONENT_PLSM2)) + { + mComponents = static_cast<HydraxComponent> + (HYDRAX_COMPONENT_FOAM | + HYDRAX_COMPONENT_PLSM2); + } + else + if (isComponent(HYDRAX_COMPONENT_SUN)) + { + mComponents = static_cast<HydraxComponent> + (HYDRAX_COMPONENT_SUN); + } + else + if (isComponent(HYDRAX_COMPONENT_FOAM)) + { + mComponents = static_cast<HydraxComponent> + (HYDRAX_COMPONENT_FOAM); + } + else + if (isComponent(HYDRAX_COMPONENT_PLSM2)) + { + mComponents = static_cast<HydraxComponent> + (HYDRAX_COMPONENT_PLSM2); + } + + LOG("[Hydrax] Requested component needs depth component... requested component desactivated."); + } + } + + mMesh->setMaterialName(Ogre::String("HydraxShader"+Ogre::StringConverter::toString(Index))); + } + + bool Hydrax::isComponent(HydraxComponent Component) + { + if (mComponents & Component) + { + return true; + } + + if (Component == HYDRAX_COMPONENTS_NONE && mComponents == HYDRAX_COMPONENTS_NONE) + { + ... [truncated message content] |
From: <and...@us...> - 2008-02-04 04:24:39
|
Revision: 561 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=561&view=rev Author: andy_miller Date: 2008-02-03 20:24:38 -0800 (Sun, 03 Feb 2008) Log Message: ----------- Updated Caelum media to the latest from the SVN Modified Paths: -------------- trunk/python-ogre/demos/caelum/media/CaelumShaders.cg trunk/python-ogre/demos/caelum/media/GroundFog.material trunk/python-ogre/demos/caelum/media/GroundFog.program trunk/python-ogre/demos/caelum/media/Haze.program trunk/python-ogre/demos/caelum/media/LayeredClouds.material trunk/python-ogre/demos/caelum/media/Terrain.material Modified: trunk/python-ogre/demos/caelum/media/CaelumShaders.cg =================================================================== --- trunk/python-ogre/demos/caelum/media/CaelumShaders.cg 2008-01-30 02:02:12 UTC (rev 560) +++ trunk/python-ogre/demos/caelum/media/CaelumShaders.cg 2008-02-04 04:24:38 UTC (rev 561) @@ -1,3 +1,23 @@ +/* +This file is part of Caelum. +See http://www.ogre3d.org/wiki/index.php/Caelum + +Copyright (c) 2006-2007 Caelum team. See Contributors.txt for details. + +Caelum is free software: you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published +by the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +Caelum is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with Caelum. If not, see <http://www.gnu.org/licenses/>. +*/ + half bias (half b, half x) { return pow (x, log (b) / log (0.5)); } @@ -145,23 +165,18 @@ sampler cloud_shape2 : register(s1); sampler cloud_detail : register(s2); -// Global cloud parameters. -uniform float cloudMassInvScale; -uniform float cloudDetailInvScale; - -uniform float2 cloudMassOffset; -uniform float2 cloudDetailOffset; - -uniform float cloudCover; -uniform float cloudMassBlend; -uniform float cloudDetailBlend; - -uniform float cloudSharpness; -uniform float cloudThickness; -uniform float cloudShininess; - // Get cloud layer intensity at a certain point. -float LayeredClouds_intensity(in float2 pos) +float LayeredClouds_intensity +( + in float2 pos, + float cloudMassInvScale, + float cloudDetailInvScale, + float2 cloudMassOffset, + float2 cloudDetailOffset, + float cloudMassBlend, + float cloudDetailBlend, + float cloudCoverageThreshold +) { // Calculate the base alpha float2 finalMassOffset = cloudMassOffset + pos; @@ -170,7 +185,7 @@ cloudMassBlend); float aDetail = tex2D(cloud_detail, (cloudDetailOffset + pos) * cloudDetailInvScale).r; aCloud = (aCloud + aDetail * cloudDetailBlend) / (1 + cloudDetailBlend); - return max(0, aCloud - (1 - cloudCover)); + return max(0, aCloud - cloudCoverageThreshold); } // Entry point for Cloud vertex program. @@ -179,52 +194,74 @@ in float4 position : POSITION, in float2 uv : TEXCOORD0, + uniform float4x4 worldViewProj, + uniform float3 sunDirection, + out float4 oPosition : POSITION, out float2 oUv : TEXCOORD0, - out float oGlow : TEXCOORD1, - out float3 relPosition : TEXCOORD2, - - uniform float4x4 worldViewProj, - uniform float3 sunDirection + out float3 relPosition : TEXCOORD1, + out float sunGlow : TEXCOORD2 ) { - relPosition = normalize (position); - oGlow = dot (relPosition, normalize (-sunDirection)); oPosition = mul(worldViewProj, position); oUv = uv; + + // This is the relative position, or view direction. + relPosition = normalize (position.xyz); + + // Calculate the angle between the direction of the sun and the current + // view direction. This we call "glow" and ranges from 1 next to the sun + // to -1 in the opposite direction. + sunGlow = dot (relPosition, normalize (-sunDirection)); } // Entry point for Cloud fragment program. void LayeredClouds_fp ( - in float2 uv : TEXCOORD0, - in float glow : TEXCOORD1, - in float3 relPosition : TEXCOORD2, + in float2 uv : TEXCOORD0, + in float3 relPosition : TEXCOORD1, + in float sunGlow : TEXCOORD2, - uniform float cameraHeight, - uniform float3 sunDirection, - uniform float4 sunColour, - uniform float4 fogColour, + uniform float cloudMassInvScale, + uniform float cloudDetailInvScale, + uniform float2 cloudMassOffset, + uniform float2 cloudDetailOffset, + uniform float cloudMassBlend, + uniform float cloudDetailBlend, + uniform float cloudCoverageThreshold, + + uniform float4 sunColour, + uniform float4 fogColour, + uniform float cloudSharpness, + uniform float cloudThickness, + out float4 oCol : COLOR ) { - // Initialize output. + // Initialize output. oCol.rgba = float4(1, 1, 1, 0); // Get cloud intensity. - float intensity = LayeredClouds_intensity(uv); + float intensity = LayeredClouds_intensity + ( + uv, + cloudMassInvScale, + cloudDetailInvScale, + cloudMassOffset, + cloudDetailOffset, + cloudMassBlend, + cloudDetailBlend, + cloudCoverageThreshold + ); // Opacity is exponential. float aCloud = saturate(exp(cloudSharpness * intensity) - 1); - float shine = pow(saturate(glow), 8) / 4; + float shine = pow(saturate(sunGlow), 8) / 4; sunColour.rgb *= 1.5; float3 cloudColour = fogColour.rgb * (1 - intensity / 3); float thickness = saturate(0.8 - exp(-cloudThickness * (intensity + 0.2 - shine))); oCol.rgb = lerp(sunColour.rgb, cloudColour.rgb, thickness); - //oCol.rgb = thickness; - //oCol.rgb = sunColour.rgb; - //oCol.rgb = cloudColour.rgb; // bottom 20th of the sky clouds vanish. // Simple and effective.e Modified: trunk/python-ogre/demos/caelum/media/GroundFog.material =================================================================== --- trunk/python-ogre/demos/caelum/media/GroundFog.material 2008-01-30 02:02:12 UTC (rev 560) +++ trunk/python-ogre/demos/caelum/media/GroundFog.material 2008-02-04 04:24:38 UTC (rev 561) @@ -1,3 +1,23 @@ +// +//This file is part of Caelum. +//See http://www.ogre3d.org/wiki/index.php/Caelum +// +//Copyright (c) 2006-2007 Caelum team. See Contributors.txt for details. +// +//Caelum is free software: you can redistribute it and/or modify +//it under the terms of the GNU Lesser General Public License as published +//by the Free Software Foundation, either version 3 of the License, or +//(at your option) any later version. +// +//Caelum is distributed in the hope that it will be useful, +//but WITHOUT ANY WARRANTY; without even the implied warranty of +//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +//GNU Lesser General Public License for more details. +// +//You should have received a copy of the GNU Lesser General Public License +//along with Caelum. If not, see <http://www.gnu.org/licenses/>. +// + // Sample base material for using CaelumGroundFog. material CaelumGroundFogBase { Modified: trunk/python-ogre/demos/caelum/media/GroundFog.program =================================================================== --- trunk/python-ogre/demos/caelum/media/GroundFog.program 2008-01-30 02:02:12 UTC (rev 560) +++ trunk/python-ogre/demos/caelum/media/GroundFog.program 2008-02-04 04:24:38 UTC (rev 561) @@ -1,3 +1,23 @@ +// +//This file is part of Caelum. +//See http://www.ogre3d.org/wiki/index.php/Caelum +// +//Copyright (c) 2006-2007 Caelum team. See Contributors.txt for details. +// +//Caelum is free software: you can redistribute it and/or modify +//it under the terms of the GNU Lesser General Public License as published +//by the Free Software Foundation, either version 3 of the License, or +//(at your option) any later version. +// +//Caelum is distributed in the hope that it will be useful, +//but WITHOUT ANY WARRANTY; without even the implied warranty of +//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +//GNU Lesser General Public License for more details. +// +//You should have received a copy of the GNU Lesser General Public License +//along with Caelum. If not, see <http://www.gnu.org/licenses/>. +// + vertex_program CaelumGroundFogVP cg { source CaelumShaders.cg Modified: trunk/python-ogre/demos/caelum/media/Haze.program =================================================================== --- trunk/python-ogre/demos/caelum/media/Haze.program 2008-01-30 02:02:12 UTC (rev 560) +++ trunk/python-ogre/demos/caelum/media/Haze.program 2008-02-04 04:24:38 UTC (rev 561) @@ -1,3 +1,23 @@ +// +//This file is part of Caelum. +//See http://www.ogre3d.org/wiki/index.php/Caelum +// +//Copyright (c) 2006-2007 Caelum team. See Contributors.txt for details. +// +//Caelum is free software: you can redistribute it and/or modify +//it under the terms of the GNU Lesser General Public License as published +//by the Free Software Foundation, either version 3 of the License, or +//(at your option) any later version. +// +//Caelum is distributed in the hope that it will be useful, +//but WITHOUT ANY WARRANTY; without even the implied warranty of +//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +//GNU Lesser General Public License for more details. +// +//You should have received a copy of the GNU Lesser General Public License +//along with Caelum. If not, see <http://www.gnu.org/licenses/>. +// + vertex_program CaelumHazeVP cg { source CaelumShaders.cg Modified: trunk/python-ogre/demos/caelum/media/LayeredClouds.material =================================================================== --- trunk/python-ogre/demos/caelum/media/LayeredClouds.material 2008-01-30 02:02:12 UTC (rev 560) +++ trunk/python-ogre/demos/caelum/media/LayeredClouds.material 2008-02-04 04:24:38 UTC (rev 561) @@ -1,3 +1,23 @@ +// +//This file is part of Caelum. +//See http://www.ogre3d.org/wiki/index.php/Caelum +// +//Copyright (c) 2006-2007 Caelum team. See Contributors.txt for details. +// +//Caelum is free software: you can redistribute it and/or modify +//it under the terms of the GNU Lesser General Public License as published +//by the Free Software Foundation, either version 3 of the License, or +//(at your option) any later version. +// +//Caelum is distributed in the hope that it will be useful, +//but WITHOUT ANY WARRANTY; without even the implied warranty of +//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +//GNU Lesser General Public License for more details. +// +//You should have received a copy of the GNU Lesser General Public License +//along with Caelum. If not, see <http://www.gnu.org/licenses/>. +// + vertex_program CaelumLayeredCloudsVP cg { source CaelumShaders.cg @@ -14,42 +34,46 @@ fragment_program CaelumLayeredCloudsFP cg { - source CaelumShaders.cg - entry_point LayeredClouds_fp - profiles ps_2_0 arbfp1 + source CaelumShaders.cg + entry_point LayeredClouds_fp + profiles ps_2_0 arbfp1 - default_params - { - // Caelum sky properties - param_named sunDirection float3 -1 -1 0 - param_named sunColour float4 1 1 1 1 - - // The inverse of the cloud forms scale - param_named cloudMassInvScale float 1.2 - // The inverse of the cloud details scale - param_named cloudDetailInvScale float 4.8 - - // Cloud mass offset - param_named cloudMassOffset float2 0 0 - // Cloud details offset - param_named cloudDetailOffset float2 0.5 0.5 - - // Cloud coverage, between 0 and 1 - param_named cloudCover float 0.9 - // Blending factor between Cloud1 and Cloud2 - param_named cloudMassBlend float 0.9 - // Cloud detail weight. - param_named cloudDetailBlend float 0.5 - - // Cloud sharpness. Lower values result in softer clouds. - param_named cloudSharpness float 4 - - // Cloud thickness. Bigger values results in darker clouds. - param_named cloudThickness float 3 - - // Fog colour; used as the base cloud colour. - param_named fogColour float4 - } + default_params + { + // Caelum sky properties + //param_named sunDirection float3 -1 -1 0 + param_named sunColour float4 1 1 1 1 + + // Fog colour; used as the base cloud colour. + param_named fogColour float4 + + + // The inverse of the cloud forms scale + param_named cloudMassInvScale float 1.2 + // The inverse of the cloud details scale + param_named cloudDetailInvScale float 4.8 + + // Cloud mass offset + param_named cloudMassOffset float2 0 0 + // Cloud details offset + param_named cloudDetailOffset float2 0.5 0.5 + + // Blending factor between Cloud1 and Cloud2 + param_named cloudMassBlend float 0.9 + // Cloud detail weight. + param_named cloudDetailBlend float 0.5 + + + // Cloud coverage, between 0 and 1 + param_named cloudCoverageThreshold float 0.9 + + // Cloud sharpness. Lower values result in softer clouds. + param_named cloudSharpness float 4 + + // Cloud thickness. Bigger values results in darker clouds. + param_named cloudThickness float 3 + + } } material CaelumLayeredClouds Modified: trunk/python-ogre/demos/caelum/media/Terrain.material =================================================================== --- trunk/python-ogre/demos/caelum/media/Terrain.material 2008-01-30 02:02:12 UTC (rev 560) +++ trunk/python-ogre/demos/caelum/media/Terrain.material 2008-02-04 04:24:38 UTC (rev 561) @@ -1,3 +1,23 @@ +// +//This file is part of Caelum. +//See http://www.ogre3d.org/wiki/index.php/Caelum +// +//Copyright (c) 2006-2007 Caelum team. See Contributors.txt for details. +// +//Caelum is free software: you can redistribute it and/or modify +//it under the terms of the GNU Lesser General Public License as published +//by the Free Software Foundation, either version 3 of the License, or +//(at your option) any later version. +// +//Caelum is distributed in the hope that it will be useful, +//but WITHOUT ANY WARRANTY; without even the implied warranty of +//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +//GNU Lesser General Public License for more details. +// +//You should have received a copy of the GNU Lesser General Public License +//along with Caelum. If not, see <http://www.gnu.org/licenses/>. +// + // Base class for materials in the caelum demo. // They have a main pass and additional fog passes. // Perhaps might be better to do this at runtime somehow? This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2008-01-30 02:02:14
|
Revision: 560 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=560&view=rev Author: andy_miller Date: 2008-01-29 18:02:12 -0800 (Tue, 29 Jan 2008) Log Message: ----------- Fix to the Automatice Function transformation code as it wasn't picking up constant void pointers This fixes PixelUtil::unpackColour and a number of other functions Modified Paths: -------------- trunk/python-ogre/code_generators/common_utils/__init__.py trunk/python-ogre/code_generators/ogre/generate_code.py Modified: trunk/python-ogre/code_generators/common_utils/__init__.py =================================================================== --- trunk/python-ogre/code_generators/common_utils/__init__.py 2008-01-30 00:14:01 UTC (rev 559) +++ trunk/python-ogre/code_generators/common_utils/__init__.py 2008-01-30 02:02:12 UTC (rev 560) @@ -203,22 +203,29 @@ arg_position = 0 trans=[] desc="" +# print "Checking", fun.decl_string for arg in fun.arguments: rawarg = declarations.remove_declarated( declarations.remove_const( declarations.remove_reference( declarations.remove_pointer ( arg.type )))) - print arg.type.decl_string + +# print fun.name, arg.type.decl_string, rawarg + + ## now check if the arg is a fundemental type (int float etc), a void + ## or a special .. if declarations.is_arithmetic (rawarg)\ - or declarations.is_void_pointer(arg.type)\ + or declarations.is_void(rawarg)\ or arg.type.decl_string in special_vars: # print "Auto:", arg.type.decl_string," is_integral|floating|void|special|" if declarations.is_pointer(arg.type): #we convert any pointers to unsigned int's +# print "Pointer" trans.append( ft.modify_type(arg_position,_ReturnUnsignedInt ) ) desc = desc +"Argument: "+arg.name+ "( pos:" + str(arg_position) + " - " +\ arg.type.decl_string + " ) takes a CTypes.addressof(xx). \\n" # print fullname,"Ctype Mod for ", arg.name, arg.type.decl_string elif declarations.is_reference(arg.type): +# print "Ref" matched = False for pre in prefix_output: # functions whose name starts in the list are consider output only if fun.name.startswith (pre): @@ -232,6 +239,12 @@ desc = desc + "Argument: "+arg.name+ "( pos:" + str(arg_position) + " - " +\ arg.type.decl_string + " ) converted to an input/output (change to return types).\\n" # print fullname," ft.inout ", arg.name, arg.type.decl_string + else: + pass +# print "Not Handled" + else: + pass +# print "Not valid to process" arg_position += 1 if trans: if fun.documentation: # it's already be tweaked: Modified: trunk/python-ogre/code_generators/ogre/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/ogre/generate_code.py 2008-01-30 00:14:01 UTC (rev 559) +++ trunk/python-ogre/code_generators/ogre/generate_code.py 2008-01-30 02:02:12 UTC (rev 560) @@ -642,12 +642,16 @@ # now we fix up the smart pointers ... Set_Smart_Pointers ( main_ns ) - # Functions that have void pointers in their argument list need to change to unsigned int's - pointee_types=['unsigned int','int', 'float', '::Ogre::Real', '::Ogre::uchar', '::Ogre::uint8', '::Ogre::uint16' - 'unsigned char', 'char', 'bool'] - ignore_names=['Matrices', 'Vertices', 'ExceptionFactory', 'UTFString' ] + ### This is now handled by Auto_Funtional_Transformation... + +# # # # Functions that have void pointers in their argument list need to change to unsigned int's +# # # pointee_types=['unsigned int','int', 'float', '::Ogre::Real', '::Ogre::uchar', '::Ogre::uint8', '::Ogre::uint16' +# # # 'unsigned char', 'char', 'bool'] +# # # ignore_names=['Matrices', 'Vertices', 'ExceptionFactory', 'UTFString' ] # # # common_utils.Fix_Void_Ptr_Args ( main_ns, pointee_types, ignore_names ) + + # and change functions that return a variety of pointers to instead return unsigned int's pointee_types=['unsigned int','int', 'float', '::Ogre::Real', '::Ogre::uchar', '::Ogre::uint8', 'unsigned char', 'char'] ignore_names=['ptr', 'useCountPointer'] # these are function names we know it's cool to exclude This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2008-01-30 00:13:57
|
Revision: 559 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=559&view=rev Author: andy_miller Date: 2008-01-29 16:14:01 -0800 (Tue, 29 Jan 2008) Log Message: ----------- General updates to the thirdparty code base Modified Paths: -------------- trunk/python-ogre/ThirdParty/caelum/CaelumPrerequisites.h trunk/python-ogre/ThirdParty/forests/BatchPage.cpp trunk/python-ogre/ThirdParty/forests/BatchedGeometry.cpp trunk/python-ogre/ThirdParty/forests/BatchedGeometry.h trunk/python-ogre/ThirdParty/forests/GrassLoader.cpp trunk/python-ogre/ThirdParty/forests/GrassLoader.h trunk/python-ogre/ThirdParty/forests/ImpostorPage.cpp trunk/python-ogre/ThirdParty/forests/ImpostorPage.h trunk/python-ogre/ThirdParty/forests/TreeLoader2D.cpp trunk/python-ogre/ThirdParty/forests/TreeLoader2D.h trunk/python-ogre/ThirdParty/nxogre/NxOgreGroup.h trunk/python-ogre/ThirdParty/nxogre/NxOgreHelpers.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgreHelpers.h trunk/python-ogre/ThirdParty/nxogre/NxOgreOgreNodeRenderable.cpp trunk/python-ogre/ThirdParty/nxogre/NxOgrePose.h trunk/python-ogre/ThirdParty/nxogre/NxOgreResourceStreamPtr.h trunk/python-ogre/ThirdParty/nxogre/NxOgreStable.h trunk/python-ogre/ThirdParty/ogreal/OgreALPrereqs.h trunk/python-ogre/ThirdParty/ogrebullet/Dynamics/OgreBulletDynamicsWorld.cpp trunk/python-ogre/ThirdParty/ogrebullet/Dynamics/OgreBulletDynamicsWorld.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIBorder.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIBorder.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIButton.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIButton.h trunk/python-ogre/ThirdParty/quickgui/QuickGUICheckBox.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUICheckBox.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIComboBox.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIComboBox.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIConfigScriptParser.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIConsole.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIConsole.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIEffect.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIEffect.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIEventArgs.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIHorizontalScrollBar.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIHorizontalScrollBar.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIHorizontalTrackBar.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIHorizontalTrackBar.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIImage.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIImage.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIKeyCode.h trunk/python-ogre/ThirdParty/quickgui/QuickGUILabel.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUILabel.h trunk/python-ogre/ThirdParty/quickgui/QuickGUILabelArea.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUILabelArea.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIList.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIList.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIManager.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIManager.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIMemberFunctionPointer.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIMenuLabel.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIMenuLabel.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIMouseButtonID.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIMouseCursor.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIMouseCursor.h trunk/python-ogre/ThirdParty/quickgui/QuickGUINStateButton.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUINStateButton.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIPanel.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIPanel.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIPoint.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIPoint.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIPrecompiledHeaders.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIProgressBar.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIProgressBar.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIQuad.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIQuad.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIQuadContainer.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIQuadContainer.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIRect.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIRect.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIRoot.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIRoot.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIScrollPane.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIScrollPane.h trunk/python-ogre/ThirdParty/quickgui/QuickGUISheet.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUISheet.h trunk/python-ogre/ThirdParty/quickgui/QuickGUISize.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUISize.h trunk/python-ogre/ThirdParty/quickgui/QuickGUISkinSet.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUISkinSet.h trunk/python-ogre/ThirdParty/quickgui/QuickGUISkinSetManager.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUISkinSetManager.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIText.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIText.h trunk/python-ogre/ThirdParty/quickgui/QuickGUITextArea.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUITextArea.h trunk/python-ogre/ThirdParty/quickgui/QuickGUITextBox.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUITextBox.h trunk/python-ogre/ThirdParty/quickgui/QuickGUITextHelper.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUITextHelper.h trunk/python-ogre/ThirdParty/quickgui/QuickGUITitleBar.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUITitleBar.h trunk/python-ogre/ThirdParty/quickgui/QuickGUITree.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIVertex.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIVertexBuffer.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIVertexBuffer.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIVerticalScrollBar.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIVerticalScrollBar.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIVerticalTrackBar.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIVerticalTrackBar.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIWidget.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIWidget.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIWindow.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIWindow.h Added Paths: ----------- trunk/python-ogre/ThirdParty/nxogre/FireState.cpp trunk/python-ogre/ThirdParty/nxogre/FireState.h Modified: trunk/python-ogre/ThirdParty/caelum/CaelumPrerequisites.h =================================================================== --- trunk/python-ogre/ThirdParty/caelum/CaelumPrerequisites.h 2008-01-30 00:12:44 UTC (rev 558) +++ trunk/python-ogre/ThirdParty/caelum/CaelumPrerequisites.h 2008-01-30 00:14:01 UTC (rev 559) @@ -25,19 +25,7 @@ #include "Ogre.h" // Define the dll export qualifier if compiling for Windows -// #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32 -// #ifdef CAELUM_LIB -// #define DllExport __declspec (dllexport) -// #else -// #ifdef __MINGW32__ -// #define DllExport -// #else -// #define DllExport __declspec (dllimport) -// #endif -// #endif -// #else #define DllExport -// #endif // Define the version code #define CAELUM_VERSION_MAIN 0 Modified: trunk/python-ogre/ThirdParty/forests/BatchPage.cpp =================================================================== --- trunk/python-ogre/ThirdParty/forests/BatchPage.cpp 2008-01-30 00:12:44 UTC (rev 558) +++ trunk/python-ogre/ThirdParty/forests/BatchPage.cpp 2008-01-30 00:14:01 UTC (rev 559) @@ -230,29 +230,36 @@ Pass *pass = tech->getPass(p); //Setup vertex program - pass->setVertexProgram(vertexProgName); - GpuProgramParametersSharedPtr params = pass->getVertexProgramParameters(); + if (pass->getVertexProgramName() == "") + pass->setVertexProgram(vertexProgName); - params->setNamedAutoConstant("objSpaceLight", GpuProgramParameters::ACT_LIGHT_POSITION_OBJECT_SPACE); - params->setNamedAutoConstant("lightDiffuse", GpuProgramParameters::ACT_DERIVED_LIGHT_DIFFUSE_COLOUR); - params->setNamedAutoConstant("lightAmbient", GpuProgramParameters::ACT_DERIVED_AMBIENT_LIGHT_COLOUR); + try{ + GpuProgramParametersSharedPtr params = pass->getVertexProgramParameters(); - params->setNamedAutoConstant("matAmbient", GpuProgramParameters::ACT_SURFACE_AMBIENT_COLOUR); - params->setNamedAutoConstant("worldViewProj", GpuProgramParameters::ACT_WORLDVIEWPROJ_MATRIX); + params->setNamedAutoConstant("objSpaceLight", GpuProgramParameters::ACT_LIGHT_POSITION_OBJECT_SPACE); + params->setNamedAutoConstant("lightDiffuse", GpuProgramParameters::ACT_DERIVED_LIGHT_DIFFUSE_COLOUR); + params->setNamedAutoConstant("lightAmbient", GpuProgramParameters::ACT_DERIVED_AMBIENT_LIGHT_COLOUR); - if (fadeEnabled){ - params->setNamedAutoConstant("camPos", GpuProgramParameters::ACT_CAMERA_POSITION_OBJECT_SPACE); + params->setNamedAutoConstant("matAmbient", GpuProgramParameters::ACT_SURFACE_AMBIENT_COLOUR); + params->setNamedAutoConstant("worldViewProj", GpuProgramParameters::ACT_WORLDVIEWPROJ_MATRIX); - //Set fade ranges - params->setNamedAutoConstant("invisibleDist", GpuProgramParameters::ACT_CUSTOM); - params->setNamedConstant("invisibleDist", invisibleDist); + if (fadeEnabled){ + params->setNamedAutoConstant("camPos", GpuProgramParameters::ACT_CAMERA_POSITION_OBJECT_SPACE); - params->setNamedAutoConstant("fadeGap", GpuProgramParameters::ACT_CUSTOM); - params->setNamedConstant("fadeGap", invisibleDist - visibleDist); + //Set fade ranges + params->setNamedAutoConstant("invisibleDist", GpuProgramParameters::ACT_CUSTOM); + params->setNamedConstant("invisibleDist", invisibleDist); - if (pass->getAlphaRejectFunction() == CMPF_ALWAYS_PASS) - pass->setSceneBlending(SBT_TRANSPARENT_ALPHA); + params->setNamedAutoConstant("fadeGap", GpuProgramParameters::ACT_CUSTOM); + params->setNamedConstant("fadeGap", invisibleDist - visibleDist); + + if (pass->getAlphaRejectFunction() == CMPF_ALWAYS_PASS) + pass->setSceneBlending(SBT_TRANSPARENT_ALPHA); + } } + catch (...) { + OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Error configuring batched geometry transitions. If you're using materials with custom vertex shaders, they will need to implement fade transitions to be compatible with BatchPage.", "BatchPage::_updateShaders()"); + } } } Modified: trunk/python-ogre/ThirdParty/forests/BatchedGeometry.cpp =================================================================== --- trunk/python-ogre/ThirdParty/forests/BatchedGeometry.cpp 2008-01-30 00:12:44 UTC (rev 558) +++ trunk/python-ogre/ThirdParty/forests/BatchedGeometry.cpp 2008-01-30 00:14:01 UTC (rev 559) @@ -25,6 +25,7 @@ #include "OgreStringConverter.h" #include "OgreEntity.h" #include "OgreSubMesh.h" +#include "OgreSubEntity.h" #include "OgreMesh.h" #include "OgreMeshManager.h" #include "OgreHardwareBufferManager.h" @@ -55,16 +56,16 @@ void BatchedGeometry::addEntity(Entity *ent, const Vector3 &position, const Quaternion &orientation, const Vector3 &scale, const Ogre::ColourValue &color) { - //For each submesh - Mesh::SubMeshIterator i = ent->getMesh()->getSubMeshIterator(); - while (i.hasMoreElements()){ - //Get the submesh - SubMesh *mesh = i.peekNext(); + //For each subentity + for (uint i = 0; i < ent->getNumSubEntities(); ++i){ + //Get the subentity + SubEntity *subEntity = ent->getSubEntity(i); + SubMesh *subMesh = subEntity->getSubMesh(); //Generate a format string that uniquely identifies this material & vertex/index format - if (mesh->vertexData == NULL) + if (subMesh->vertexData == NULL) OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "BatchedGeometry cannot use meshes with shared vertex data", "BatchedGeometry::addEntity()"); - String formatStr = getFormatString(mesh); + String formatStr = getFormatString(subEntity); //If a batch using an identical format exists... SubBatch *batch; @@ -74,15 +75,12 @@ batch = batchIter->second; } else { //Otherwise create a new batch - batch = new SubBatch(this, mesh); + batch = new SubBatch(this, subEntity); subBatchMap.insert(std::pair<String, SubBatch*>(formatStr, batch)); } //Now add the submesh to the compatible batch - batch->addSubMesh(mesh, position, orientation, scale, color); - - //Next item - i.getNext(); + batch->addSubEntity(subEntity, position, orientation, scale, color); } //Update bounding box @@ -110,14 +108,14 @@ return BatchedGeometry::SubBatchIterator((SubBatchMap&)subBatchMap); } -String BatchedGeometry::getFormatString(SubMesh *mesh) +String BatchedGeometry::getFormatString(SubEntity *ent) { StringUtil::StrStreamType str; - str << mesh->getMaterialName() << "|"; - str << mesh->indexData->indexBuffer->getType() << "|"; + str << ent->getMaterialName() << "|"; + str << ent->getSubMesh()->indexData->indexBuffer->getType() << "|"; - const VertexDeclaration::VertexElementList &elemList = mesh->vertexData->vertexDeclaration->getElements(); + const VertexDeclaration::VertexElementList &elemList = ent->getSubMesh()->vertexData->vertexDeclaration->getElements(); VertexDeclaration::VertexElementList::const_iterator i; for (i = elemList.begin(); i != elemList.end(); ++i) { @@ -229,16 +227,18 @@ -BatchedGeometry::SubBatch::SubBatch(BatchedGeometry *parent, SubMesh *mesh) +BatchedGeometry::SubBatch::SubBatch(BatchedGeometry *parent, SubEntity *ent) { - meshType = mesh; - material = MaterialManager::getSingleton().getByName(mesh->getMaterialName()); + meshType = ent->getSubMesh(); this->parent = parent; built = false; + Material *origMat = ((MaterialPtr)MaterialManager::getSingleton().getByName(ent->getMaterialName())).getPointer(); + material = MaterialManager::getSingleton().getByName(getMaterialClone(origMat)->getName()); + //Setup vertex/index data structure - vertexData = mesh->vertexData->clone(false); - indexData = mesh->indexData->clone(false); + vertexData = meshType->vertexData->clone(false); + indexData = meshType->indexData->clone(false); //Remove blend weights from vertex format const VertexElement* blendIndices = vertexData->vertexDeclaration->findElementBySemantic(VES_BLEND_INDICES); @@ -275,13 +275,23 @@ delete indexData; } -void BatchedGeometry::SubBatch::addSubMesh(SubMesh *mesh, const Vector3 &position, const Quaternion &orientation, const Vector3 &scale, const Ogre::ColourValue &color) +Material *BatchedGeometry::SubBatch::getMaterialClone(Material *mat) { + String clonedName = mat->getName() + "_Batched"; + MaterialPtr clonedMat = MaterialManager::getSingleton().getByName(clonedName); + if (clonedMat.isNull()) + clonedMat = mat->clone(clonedName); + + return clonedMat.getPointer(); +} + +void BatchedGeometry::SubBatch::addSubEntity(SubEntity *ent, const Vector3 &position, const Quaternion &orientation, const Vector3 &scale, const Ogre::ColourValue &color) +{ assert(!built); //Add this submesh to the queue QueuedMesh newMesh; - newMesh.mesh = mesh; + newMesh.mesh = ent->getSubMesh(); newMesh.position = position; newMesh.orientation = orientation; newMesh.scale = scale; @@ -302,8 +312,8 @@ meshQueue.push_back(newMesh); //Increment the vertex/index count so the buffers will have room for this mesh - vertexData->vertexCount += mesh->vertexData->vertexCount; - indexData->indexCount += mesh->indexData->indexCount; + vertexData->vertexCount += ent->getSubMesh()->vertexData->vertexCount; + indexData->indexCount += ent->getSubMesh()->indexData->indexCount; } void BatchedGeometry::SubBatch::build() @@ -640,4 +650,5 @@ { return parent->queryLights(); } + #endif Modified: trunk/python-ogre/ThirdParty/forests/BatchedGeometry.h =================================================================== --- trunk/python-ogre/ThirdParty/forests/BatchedGeometry.h 2008-01-30 00:12:44 UTC (rev 558) +++ trunk/python-ogre/ThirdParty/forests/BatchedGeometry.h 2008-01-30 00:14:01 UTC (rev 559) @@ -49,10 +49,10 @@ class SubBatch: public Ogre::Renderable { public: - SubBatch(BatchedGeometry *parent, Ogre::SubMesh *mesh); + SubBatch(BatchedGeometry *parent, Ogre::SubEntity *ent); ~SubBatch(); - void addSubMesh(Ogre::SubMesh *mesh, const Ogre::Vector3 &position, const Ogre::Quaternion &orientation, const Ogre::Vector3 &scale, const Ogre::ColourValue &color = Ogre::ColourValue::White); + void addSubEntity(Ogre::SubEntity *ent, const Ogre::Vector3 &position, const Ogre::Quaternion &orientation, const Ogre::Vector3 &scale, const Ogre::ColourValue &color = Ogre::ColourValue::White); void build(); void clear(); @@ -73,6 +73,11 @@ bool castsShadows(void) const { return parent->getCastShadows(); } private: + //This function is used to make a single clone of materials used, since the materials + //will be modified by the batch system (and it wouldn't be good to modify the original materials + //that the user may be using somewhere else). + Ogre::Material *getMaterialClone(Ogre::Material *mat); + //A structure defining the desired position/orientation/scale of a batched mesh. The //SubMesh is not specified since that can be determined by which MeshQueue this belongs to. struct QueuedMesh @@ -100,7 +105,7 @@ }; private: - Ogre::String getFormatString(Ogre::SubMesh *mesh); + Ogre::String getFormatString(Ogre::SubEntity *ent); typedef std::map<Ogre::String, SubBatch*> SubBatchMap; //Stores a list of GeomBatch'es, using a format string (generated with getGeometryFormatString()) as the key value SubBatchMap subBatchMap; Modified: trunk/python-ogre/ThirdParty/forests/GrassLoader.cpp =================================================================== --- trunk/python-ogre/ThirdParty/forests/GrassLoader.cpp 2008-01-30 00:12:44 UTC (rev 558) +++ trunk/python-ogre/ThirdParty/forests/GrassLoader.cpp 2008-01-30 00:14:01 UTC (rev 559) @@ -43,6 +43,9 @@ { GrassLoader::geom = geom; + heightFunction = NULL; + heightFunctionUserData = NULL; + windDir = Vector3::UNIT_X; densityFactor = 1.0f; renderQueue = RENDER_QUEUE_6; @@ -246,8 +249,8 @@ float y1, y2; if (heightFunction){ - y1 = heightFunction(x1, z1); - y2 = heightFunction(x2, z2); + y1 = heightFunction(x1, z1, heightFunctionUserData); + y2 = heightFunction(x2, z2, heightFunctionUserData); } else { y1 = 0; y2 = 0; @@ -384,8 +387,8 @@ float y1, y2; if (heightFunction){ - y1 = heightFunction(x1, z1); - y2 = heightFunction(x2, z2); + y1 = heightFunction(x1, z1, heightFunctionUserData); + y2 = heightFunction(x2, z2, heightFunctionUserData); } else { y1 = 0; y2 = 0; @@ -420,8 +423,8 @@ float y3, y4; if (heightFunction){ - y3 = heightFunction(x3, z3); - y4 = heightFunction(x4, z4); + y3 = heightFunction(x3, z3, heightFunctionUserData); + y4 = heightFunction(x4, z4, heightFunctionUserData); } else { y3 = 0; y4 = 0; @@ -540,7 +543,7 @@ //Calculate height float y; if (heightFunction){ - y = heightFunction(x, z); + y = heightFunction(x, z, heightFunctionUserData); } else { y = 0; } @@ -675,6 +678,8 @@ { if (material.isNull() || matName != material->getName()){ material = MaterialManager::getSingleton().getByName(matName); + if (material.isNull()) + OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "The specified grass material does not exist", "GrassLayer::setMaterialName()"); shaderNeedsUpdate = true; } } @@ -784,7 +789,7 @@ float z = Math::RangeRandom(page.bounds.top, page.bounds.bottom); //Calculate height - float y = parent->heightFunction(x, z); + float y = parent->heightFunction(x, z, parent->heightFunctionUserData); //Add to list if in range if (y >= min && y <= max){ @@ -839,7 +844,7 @@ //For example, if localDensity is .32, grasses will be added 32% of the time. if (Math::UnitRandom() < densityMap->_getDensityAt_Unfiltered(x, z)){ //Calculate height - float y = parent->heightFunction(x, z); + float y = parent->heightFunction(x, z, parent->heightFunctionUserData); //Add to list if in range if (y >= min && y <= max){ @@ -889,7 +894,7 @@ //For example, if localDensity is .32, grasses will be added 32% of the time. if (Math::UnitRandom() < densityMap->_getDensityAt_Bilinear(x, z)){ //Calculate height - float y = parent->heightFunction(x, z); + float y = parent->heightFunction(x, z, parent->heightFunctionUserData); //Add to list if in range if (y >= min && y <= max){ Modified: trunk/python-ogre/ThirdParty/forests/GrassLoader.h =================================================================== --- trunk/python-ogre/ThirdParty/forests/GrassLoader.h 2008-01-30 00:12:44 UTC (rev 558) +++ trunk/python-ogre/ThirdParty/forests/GrassLoader.h 2008-01-30 00:14:01 UTC (rev 559) @@ -140,16 +140,32 @@ function anything you want): \code - Real getHeightAt(Real x, Real z); + Real getHeightAt(Real x, Real z, void *userData); \endcode - + + \note If you're not using the default coordinate system (where x = right, z = back), the + x/z parameters will actually be representing the appropriate equivalents. + + The userData parameter allows you to include any additional data you want when your height + function is called, and is completely optional (although you can't actually omit it from the + declaration, you can ignore it). Any userData value you choose to supply to setHeightFunction() + will be passed on to your height function every time it is called. + After you've defined a height function, using setHeightFunction is easy: \code pageLoader2D->setHeightFunction(&getHeightAt); + //Or (if you want to pass additional data on to your height function)... + pageLoader2D->setHeightFunction(&getHeightAt, myUserData); \endcode + + In most cases, you may not even need to use the extra "userData" parameter, but it's there in + the event that your height function needs extra contextual data. */ - void setHeightFunction(Ogre::Real (*heightFunction)(Ogre::Real x, Ogre::Real z)) { this->heightFunction = heightFunction; } + void setHeightFunction(Ogre::Real (*heightFunction)(Ogre::Real x, Ogre::Real z, void *userData), void *userData = NULL) { + this->heightFunction = heightFunction; + heightFunctionUserData = userData; + } /** INTERNAL FUNCTION - DO NOT USE */ @@ -171,7 +187,8 @@ std::list<GrassLayer*> layerList; //Height data - Ogre::Real (*heightFunction)(Ogre::Real x, Ogre::Real z); //Pointer to height function + Ogre::Real (*heightFunction)(Ogre::Real x, Ogre::Real z, void *userData); //Pointer to height function + void *heightFunctionUserData; //Misc. PagedGeometry *geom; Modified: trunk/python-ogre/ThirdParty/forests/ImpostorPage.cpp =================================================================== --- trunk/python-ogre/ThirdParty/forests/ImpostorPage.cpp 2008-01-30 00:12:44 UTC (rev 558) +++ trunk/python-ogre/ThirdParty/forests/ImpostorPage.cpp 2008-01-30 00:14:01 UTC (rev 559) @@ -21,6 +21,7 @@ #include "OgreVector3.h" #include "OgreQuaternion.h" #include "OgreEntity.h" +#include "OgreSubEntity.h" #include "OgreHardwarePixelBuffer.h" using namespace Ogre; @@ -52,7 +53,7 @@ ImpostorPage::~ImpostorPage() { //Delete all impostor batches - std::map<ResourceHandle, ImpostorBatch *>::iterator iter; + std::map<String, ImpostorBatch *>::iterator iter; for (iter = impostorBatches.begin(); iter != impostorBatches.end(); ++iter){ ImpostorBatch *ibatch = iter->second; delete ibatch; @@ -96,7 +97,7 @@ center.y = 0.0f; //Build all batches - std::map<ResourceHandle, ImpostorBatch *>::iterator iter; + std::map<String, ImpostorBatch *>::iterator iter; for (iter = impostorBatches.begin(); iter != impostorBatches.end(); ++iter){ ImpostorBatch *ibatch = iter->second; ibatch->build(); @@ -106,7 +107,7 @@ void ImpostorPage::setVisible(bool visible) { //Update visibility status of all batches - std::map<ResourceHandle, ImpostorBatch *>::iterator iter; + std::map<String, ImpostorBatch *>::iterator iter; for (iter = impostorBatches.begin(); iter != impostorBatches.end(); ++iter){ ImpostorBatch *ibatch = iter->second; ibatch->setVisible(visible); @@ -116,7 +117,7 @@ void ImpostorPage::setFade(bool enabled, Real visibleDist, Real invisibleDist) { //Update fade status of all batches - std::map<ResourceHandle, ImpostorBatch *>::iterator iter; + std::map<String, ImpostorBatch *>::iterator iter; for (iter = impostorBatches.begin(); iter != impostorBatches.end(); ++iter){ ImpostorBatch *ibatch = iter->second; ibatch->setFade(enabled, visibleDist, invisibleDist); @@ -126,7 +127,7 @@ void ImpostorPage::removeEntities() { //Clear all impostor batches - std::map<ResourceHandle, ImpostorBatch *>::iterator iter; + std::map<String, ImpostorBatch *>::iterator iter; for (iter = impostorBatches.begin(); iter != impostorBatches.end(); ++iter){ ImpostorBatch *ibatch = iter->second; ibatch->clear(); @@ -157,7 +158,7 @@ yaw = Math::ATan2(-dir.x, -dir.z); } - std::map<ResourceHandle, ImpostorBatch *>::iterator iter; + std::map<String, ImpostorBatch *>::iterator iter; for (iter = impostorBatches.begin(); iter != impostorBatches.end(); ++iter){ ImpostorBatch *ibatch = iter->second; ibatch->setAngle(pitch.valueDegrees(), yaw.valueDegrees()); @@ -189,8 +190,6 @@ ImpostorBatch::ImpostorBatch(ImpostorPage *group, Entity *entity) { - typedef std::pair<ResourceHandle, ImpostorBatch *> ListItem; - //Render impostor texture for this entity tex = ImpostorTexture::getTexture(group, entity); @@ -205,9 +204,6 @@ yawIndex = -1; setAngle(0.0f, 0.0f); - //Add self to impostorBatches list - group->impostorBatches.insert(ListItem(tex->sourceMesh, this)); - //Init. variables igroup = group; } @@ -225,16 +221,24 @@ ImpostorBatch *ImpostorBatch::getBatch(ImpostorPage *group, Entity *entity) { //Search for an existing impostor batch for this entity - std::map<ResourceHandle, ImpostorBatch *>::iterator iter; - iter = group->impostorBatches.find(entity->getMesh()->getHandle()); + String entityKey = ImpostorBatch::generateEntityKey(entity); + std::map<String, ImpostorBatch *>::iterator iter; + iter = group->impostorBatches.find(entityKey); //If found.. if (iter != group->impostorBatches.end()){ //Return it return iter->second; } else { - //Otherwise, return a new batch - return (new ImpostorBatch(group, entity)); + //Otherwise, create a new batch + ImpostorBatch *batch = new ImpostorBatch(group, entity); + + //Add it to the impostorBatches list + typedef std::pair<String, ImpostorBatch *> ListItem; + group->impostorBatches.insert(ListItem(entityKey, batch)); + + //Return it + return batch; } } @@ -277,24 +281,34 @@ entityBBCenter = Vector3(tex->entityCenter.x, tex->entityCenter.y - tex->entityRadius, tex->entityCenter.z); } +String ImpostorBatch::generateEntityKey(Entity *entity) +{ + StringUtil::StrStreamType entityKey; + entityKey << entity->getMesh()->getName(); + for (uint i = 0; i < entity->getNumSubEntities(); ++i){ + entityKey << "-" << entity->getSubEntity(i)->getMaterialName(); + } + + return entityKey.str(); +} + //------------------------------------------------------------------------------------- -std::map<ResourceHandle, ImpostorTexture *> ImpostorTexture::selfList; +std::map<String, ImpostorTexture *> ImpostorTexture::selfList; unsigned long ImpostorTexture::GUID = 0; //Do not use this constructor yourself - instead, call getTexture() //to get/create an ImpostorTexture for an Entity. ImpostorTexture::ImpostorTexture(ImpostorPage *group, Entity *entity) { - typedef std::pair<ResourceHandle, ImpostorTexture *> ListItem; - //Store scene manager and entity ImpostorTexture::sceneMgr = group->sceneMgr; ImpostorTexture::entity = entity; //Add self to list of ImpostorTexture's - sourceMesh = entity->getMesh()->getHandle(); - selfList.insert(ListItem(sourceMesh, this)); + entityKey = ImpostorBatch::generateEntityKey(entity); + typedef std::pair<String, ImpostorTexture *> ListItem; + selfList.insert(ListItem(entityKey, this)); //Calculate the entity's bounding box and it's diameter boundingBox = entity->getBoundingBox(); @@ -378,7 +392,7 @@ } //Remove self from list of ImpostorTexture's - selfList.erase(sourceMesh); + selfList.erase(entityKey); } void ImpostorTexture::regenerate() @@ -395,7 +409,7 @@ void ImpostorTexture::regenerateAll() { - std::map<ResourceHandle, ImpostorTexture *>::iterator iter; + std::map<String, ImpostorTexture *>::iterator iter; for (iter = selfList.begin(); iter != selfList.end(); ++iter){ iter->second->regenerate(); } @@ -465,10 +479,20 @@ //uint8 oldRenderQueueGroup = entity->getRenderQueueGroup(); entity->setRenderQueueGroup(RENDER_QUEUE_6); - //Calculate the filename used to identity this render + //Calculate the filename used to uniquely identity this render + String strKey = entityKey; + char key[32] = {0}; + unsigned int i = 0; + for (String::const_iterator it = entityKey.begin(); it != entityKey.end(); ++it) + { + key[i] ^= *it; + i = (i+1) % sizeof(key); + } + for (i = 0; i < sizeof(key); ++i) + key[i] = (key[i] % 26) + 'A'; + ResourceGroupManager::getSingleton().addResourceLocation(".", "FileSystem", "BinFolder"); - String fileName = "Impostor." + entity->getMesh()->getGroup() + '.' + entity->getMesh()->getName() - + '.' + StringConverter::toString(textureSize) + ".png"; + String fileName = "Impostor." + String(key, sizeof(key)) + '.' + StringConverter::toString(textureSize) + ".png"; //Attempt to load the pre-render file if allowed bool needsRegen = force; @@ -538,10 +562,26 @@ TextureManager::getSingleton().remove(texName2); } +String ImpostorTexture::removeInvalidCharacters(String s) +{ + StringUtil::StrStreamType s2; + + for (unsigned int i = 0; i < s.length(); ++i){ + char c = s[i]; + if (c == '/' || c == '\\' || c == ':' || c == '*' || c == '?' || c == '\"' || c == '<' || c == '>' || c == '|'){ + s2 << '-'; + } else { + s2 << c; + } + } + + return s2.str(); +} + void ImpostorTexture::removeTexture(ImpostorTexture* Texture) { //Search for an existing impostor texture, in case it was already deleted - for(std::map<ResourceHandle, ImpostorTexture *>::iterator iter=selfList.begin(); + for(std::map<String, ImpostorTexture *>::iterator iter=selfList.begin(); iter!=selfList.end(); ++iter) { if(iter->second==Texture) @@ -556,8 +596,9 @@ ImpostorTexture *ImpostorTexture::getTexture(ImpostorPage *group, Entity *entity) { //Search for an existing impostor texture for the given entity - std::map<ResourceHandle, ImpostorTexture *>::iterator iter; - iter = selfList.find(entity->getMesh()->getHandle()); + String entityKey = ImpostorBatch::generateEntityKey(entity); + std::map<String, ImpostorTexture *>::iterator iter; + iter = selfList.find(entityKey); //If found.. if (iter != selfList.end()){ Modified: trunk/python-ogre/ThirdParty/forests/ImpostorPage.h =================================================================== --- trunk/python-ogre/ThirdParty/forests/ImpostorPage.h 2008-01-30 00:12:44 UTC (rev 558) +++ trunk/python-ogre/ThirdParty/forests/ImpostorPage.h 2008-01-30 00:14:01 UTC (rev 559) @@ -182,7 +182,7 @@ Ogre::Vector3 center; int aveCount; - std::map<Ogre::ResourceHandle, ImpostorBatch *> impostorBatches; + std::map<Ogre::String, ImpostorBatch *> impostorBatches; }; @@ -217,11 +217,11 @@ } void setBillboardOrigin(Ogre::BillboardOrigin origin); - inline void addBillboard(const Ogre::Vector3 &position, const Ogre::Quaternion &rotation, const Ogre::Vector3 &scale, const Ogre::ColourValue &color = Ogre::ColourValue::White); - void setAngle(float pitchDeg, float yawDeg); + static Ogre::String generateEntityKey(Ogre::Entity *entity); + protected: ImpostorBatch(ImpostorPage *group, Ogre::Entity *entity); @@ -274,9 +274,12 @@ void renderTextures(bool force); // Renders the impostor texture grid void updateMaterials(); // Updates the materials to use the latest rendered impostor texture grid - static std::map<Ogre::ResourceHandle, ImpostorTexture *> selfList; + Ogre::String removeInvalidCharacters(Ogre::String s); + + static std::map<Ogre::String, ImpostorTexture *> selfList; Ogre::SceneManager *sceneMgr; Ogre::Entity *entity; + Ogre::String entityKey; Ogre::MaterialPtr material[IMPOSTOR_PITCH_ANGLES][IMPOSTOR_YAW_ANGLES]; Ogre::TexturePtr texture; Modified: trunk/python-ogre/ThirdParty/forests/TreeLoader2D.cpp =================================================================== --- trunk/python-ogre/ThirdParty/forests/TreeLoader2D.cpp 2008-01-30 00:12:44 UTC (rev 558) +++ trunk/python-ogre/ThirdParty/forests/TreeLoader2D.cpp 2008-01-30 00:14:01 UTC (rev 559) @@ -29,6 +29,7 @@ //Reset height function heightFunction = NULL; + heightFunctionUserData = NULL; //Make sure the bounds are aligned with PagedGeometry's grid, so the TreeLoader's grid tiles will have a 1:1 relationship actualBounds = bounds; @@ -267,7 +268,7 @@ //Calculate terrain height at pos.x / pos.z to get pos.y if (heightFunction != NULL) - pos.y = heightFunction(pos.x, pos.z); + pos.y = heightFunction(pos.x, pos.z, heightFunctionUserData); else pos.y = 0.0f; @@ -377,7 +378,7 @@ //Calculate terrain height at x / z to get y if (trees->heightFunction != NULL) - currentTreeDat.position.y = trees->heightFunction(currentTreeDat.position.x, currentTreeDat.position.z); + currentTreeDat.position.y = trees->heightFunction(currentTreeDat.position.x, currentTreeDat.position.z, trees->heightFunctionUserData); else currentTreeDat.position.y = 0.0f; Modified: trunk/python-ogre/ThirdParty/forests/TreeLoader2D.h =================================================================== --- trunk/python-ogre/ThirdParty/forests/TreeLoader2D.h 2008-01-30 00:12:44 UTC (rev 558) +++ trunk/python-ogre/ThirdParty/forests/TreeLoader2D.h 2008-01-30 00:14:01 UTC (rev 559) @@ -89,6 +89,7 @@ /** \brief Sets the height function used to calculate tree height coordinates \param heightFunction A pointer to a height function + \param userData Optional user data to be supplied to the height function Unless you want all your trees placed at 0 height, you need to specify a height function so TreeLoader2D will be able to calculate the height coordinate. The height function given @@ -96,19 +97,33 @@ function anything you want): \code - Real getHeightAt(Real x, Real z); + Real getHeightAt(Real x, Real z, void *userData); \endcode \note If you're not using the default coordinate system (where x = right, z = back), the x/z parameters will actually be representing the appropriate equivalents. + + The userData parameter allows you to include any additional data you want when your height + function is called, and is completely optional (although you can't actually omit it from the + declaration, you can ignore it). Any userData value you choose to supply to setHeightFunction() + will be passed on to your height function every time it is called. After you've defined a height function, using setHeightFunction is easy: \code pageLoader2D->setHeightFunction(&getHeightAt); + //Or (if you want to pass additional data on to your height function)... + pageLoader2D->setHeightFunction(&getHeightAt, myUserData); \endcode + + In most cases, you may not even need to use the extra "userData" parameter, but it's there in + the event that your height function needs extra contextual data. */ - void setHeightFunction(Ogre::Real (*heightFunction)(Ogre::Real x, Ogre::Real z)) { this->heightFunction = heightFunction; } + void setHeightFunction(Ogre::Real (*heightFunction)(Ogre::Real x, Ogre::Real z, void *userData), void *userData = NULL) + { + this->heightFunction = heightFunction; + heightFunctionUserData = userData; + } /** \brief Gets an iterator which can be used to access all added trees. @@ -241,7 +256,8 @@ MapFilter colorMapFilter; //Height data - Ogre::Real (*heightFunction)(Ogre::Real x, Ogre::Real z); //Pointer to height function + Ogre::Real (*heightFunction)(Ogre::Real x, Ogre::Real z, void *userData); //Pointer to height function + void *heightFunctionUserData; //Misc. PagedGeometry *geom; Added: trunk/python-ogre/ThirdParty/nxogre/FireState.cpp =================================================================== --- trunk/python-ogre/ThirdParty/nxogre/FireState.cpp (rev 0) +++ trunk/python-ogre/ThirdParty/nxogre/FireState.cpp 2008-01-30 00:14:01 UTC (rev 559) @@ -0,0 +1 @@ +// FireState Added: trunk/python-ogre/ThirdParty/nxogre/FireState.h =================================================================== Modified: trunk/python-ogre/ThirdParty/nxogre/NxOgreGroup.h =================================================================== --- trunk/python-ogre/ThirdParty/nxogre/NxOgreGroup.h 2008-01-30 00:12:44 UTC (rev 558) +++ trunk/python-ogre/ThirdParty/nxogre/NxOgreGroup.h 2008-01-30 00:14:01 UTC (rev 559) @@ -99,21 +99,14 @@ ////////////////////////////////////////////////////////// /** @brief Method Ptr Constructor */ - #ifndef GCC_XML + template <typename T> explicit GroupCallback(T* v, void (T::*Start)(Actor*, Actor*), void (T::*End)(Actor*, Actor*), void (T::*Touch)(Actor*, Actor*)) - : mCallback(new TriMethodCallback<T>(v, Start, End, Touch), bool callbackOwned),mCallbackOwned(callbackOwned) {} - #else - template <typename T> explicit - GroupCallback(T* v, - void (T::*Start)(Actor*, Actor*), - void (T::*End)(Actor*, Actor*), - void (T::*Touch)(Actor*, Actor*)) - : mCallback(new TriMethodCallback<T>(v, Start, End, Touch)) {} - #endif + : mCallback(new TriMethodCallback<T>(v, Start, End, Touch)) {} + ////////////////////////////////////////////////////////// Modified: trunk/python-ogre/ThirdParty/nxogre/NxOgreHelpers.cpp =================================================================== --- trunk/python-ogre/ThirdParty/nxogre/NxOgreHelpers.cpp 2008-01-30 00:12:44 UTC (rev 558) +++ trunk/python-ogre/ThirdParty/nxogre/NxOgreHelpers.cpp 2008-01-30 00:14:01 UTC (rev 559) @@ -30,14 +30,14 @@ ////////////////////////////////////////////////////////////////////////////////// -NxExtendedVec3 toNxExtendedVec3(const Ogre::Vector3& v) { +inline NxExtendedVec3 toNxExtendedVec3(const Ogre::Vector3& v) { return NxExtendedVec3(v.x,v.y,v.z); } ////////////////////////////////////////////////////////////////////////////////// // Generates a 8 digit ID, based on groupCount and type of object (typeHash) -NxString NxCreateID(unsigned int groupCount, NxString typeHash) { +inline NxString NxCreateID(unsigned int groupCount, NxString typeHash) { std::stringstream ss; ss << typeHash << "-" << std::hex << (rand() % 1024) << "-" << groupCount; return ss.str(); @@ -45,7 +45,7 @@ ////////////////////////////////////////////////////////////////////////////////// -NxMat33 toNxMat33(const Ogre::Matrix3& matrix) { +inline NxMat33 toNxMat33(const Ogre::Matrix3& matrix) { NxReal* c = new NxReal[9]; c[0] = matrix[0][0]; c[1] = matrix[1][0]; c[2] = matrix[2][0]; @@ -63,7 +63,7 @@ ////////////////////////////////////////////////////////////////////////////////// -NxMat34 toNxMat34(const Ogre::Matrix4& matrix) { +inline NxMat34 toNxMat34(const Ogre::Matrix4& matrix) { NxUnderConstruction; @@ -156,10 +156,10 @@ std::stringstream stream; stream << quat.w << " " << quat.x << " " << quat.y << " " << quat.z; return stream.str(); -} +} //////////////////////////////////////////////////////////////// - + template <typename Type> Type NxFromString(const NxString& string) { @@ -167,8 +167,8 @@ Type val = 0; str >> val; return val; -} - +} + //////////////////////////////////////////////////////////////// template <> @@ -206,7 +206,7 @@ return quaternion; -} +} //////////////////////////////////////////////////////////////// @@ -273,9 +273,9 @@ } //////////////////////////////////////////////////////////////// + +inline Pose NxInterpolate(Pose First, Pose Second, NxReal c) { -Pose NxInterpolate(Pose First, Pose Second, NxReal c) { - Pose r; r.v.x = First.v.x * (1 - c) + Second.v.x * c; @@ -287,5 +287,5 @@ } //////////////////////////////////////////////////////////////// - -}; //End of NxOgre namespace. + +}; //End of NxOgre namespace. Modified: trunk/python-ogre/ThirdParty/nxogre/NxOgreHelpers.h =================================================================== --- trunk/python-ogre/ThirdParty/nxogre/NxOgreHelpers.h 2008-01-30 00:12:44 UTC (rev 558) +++ trunk/python-ogre/ThirdParty/nxogre/NxOgreHelpers.h 2008-01-30 00:14:01 UTC (rev 559) @@ -87,18 +87,18 @@ @result The rotated vector */ NxVec3 NxExport operator* (const NxQuat&, const NxVec3&); - - - // To Strings - - /** @brief Generic class/integral to String. - @note Uses STL stringstream for conversion. - @example - <code> - NxString str = NxToString<float>(1.2345f); - </code> - @result The converted string - */ + + + // To Strings + + /** @brief Generic class/integral to String. + @note Uses STL stringstream for conversion. + @example + <code> + NxString str = NxToString<float>(1.2345f); + </code> + @result The converted string + */ template <typename Type> NxString NxExport NxToString(const Type& type); @@ -281,8 +281,8 @@ /** @brief Interpolates */ - Pose NxExport NxInterpolate(Pose First, Pose Second, NxReal c = 0.5f); + inline Pose NxExport NxInterpolate(Pose First, Pose Second, NxReal c = 0.5f); }; -#endif +#endif Modified: trunk/python-ogre/ThirdParty/nxogre/NxOgreOgreNodeRenderable.cpp =================================================================== --- trunk/python-ogre/ThirdParty/nxogre/NxOgreOgreNodeRenderable.cpp 2008-01-30 00:12:44 UTC (rev 558) +++ trunk/python-ogre/ThirdParty/nxogre/NxOgreOgreNodeRenderable.cpp 2008-01-30 00:14:01 UTC (rev 559) @@ -315,7 +315,7 @@ node->detachAllObjects(); node->removeAndDestroyAllChildren(); - mSceneMgr->destroySceneNode(node->getName()); + mSceneMgr->destroySceneNode(node); } @@ -581,4 +581,4 @@ ///////////////////////////////////////////////////////////////////// -}; //End of NxOgre namespace. +}; //End of NxOgre namespace. Modified: trunk/python-ogre/ThirdParty/nxogre/NxOgrePose.h =================================================================== --- trunk/python-ogre/ThirdParty/nxogre/NxOgrePose.h 2008-01-30 00:12:44 UTC (rev 558) +++ trunk/python-ogre/ThirdParty/nxogre/NxOgrePose.h 2008-01-30 00:14:01 UTC (rev 559) @@ -52,12 +52,12 @@ void fromMat33(const NxMat33&); NxMat33 toMat33() const; - Ogre::Vector3 getVector3() const; - NxVec3 getVec3() const; - Ogre::Quaternion getQuaternion() const; - NxQuat getQuat() const; + inline Ogre::Vector3 getVector3() const; + inline NxVec3 getVec3() const; + inline Ogre::Quaternion getQuaternion() const; + inline NxQuat getQuat() const; - NxString toString() const; + inline NxString toString() const; //////////////////////////////////////////////////////////////////////////////// @@ -100,4 +100,4 @@ }; -#endif +#endif Modified: trunk/python-ogre/ThirdParty/nxogre/NxOgreResourceStreamPtr.h =================================================================== --- trunk/python-ogre/ThirdParty/nxogre/NxOgreResourceStreamPtr.h 2008-01-30 00:12:44 UTC (rev 558) +++ trunk/python-ogre/ThirdParty/nxogre/NxOgreResourceStreamPtr.h 2008-01-30 00:14:01 UTC (rev 559) @@ -50,7 +50,7 @@ ResourceStreamPtr(); ResourceStreamPtr(ResourceIdentifier); - //ResourceStreamPtr(ResourceIdentifier, void*); + ResourceStreamPtr(ResourceIdentifier, void*); ResourceStreamPtr(const ResourceStreamPtr& r) : pStream(0), pUseCount(0) @@ -172,4 +172,4 @@ }; // End of namespace -#endif +#endif Modified: trunk/python-ogre/ThirdParty/nxogre/NxOgreStable.h =================================================================== --- trunk/python-ogre/ThirdParty/nxogre/NxOgreStable.h 2008-01-30 00:12:44 UTC (rev 558) +++ trunk/python-ogre/ThirdParty/nxogre/NxOgreStable.h 2008-01-30 00:14:01 UTC (rev 559) @@ -120,14 +120,13 @@ # define NX_WIN32 # define NX_MEMORY_COOKING 1 # define NX_DISK_COOKING 1 -# define NxExport -// -// # if defined(NXOGRE_EXPORTS) -// # define NxExport __declspec(dllexport) -// # else -// # define NxExport __declspec(dllimport) -// # endif +# if defined(NXOGRE_EXPORTS) +# define NxExport __declspec(dllexport) +# else +# define NxExport __declspec(dllimport) +# endif + # if defined _DEBUG # define NX_DEBUG # endif Modified: trunk/python-ogre/ThirdParty/ogreal/OgreALPrereqs.h =================================================================== --- trunk/python-ogre/ThirdParty/ogreal/OgreALPrereqs.h 2008-01-30 00:12:44 UTC (rev 558) +++ trunk/python-ogre/ThirdParty/ogreal/OgreALPrereqs.h 2008-01-30 00:14:01 UTC (rev 559) @@ -42,8 +42,8 @@ #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32 # include "al.h" # include "alc.h" - # include "xram.h" - # define OgreAL_Export + # include "xram.h" + # define OgreAL_Export #elif OGRE_COMPILER == OGRE_COMPILER_GNUC # include "AL/al.h" # include "AL/alc.h" Modified: trunk/python-ogre/ThirdParty/ogrebullet/Dynamics/OgreBulletDynamicsWorld.cpp =================================================================== --- trunk/python-ogre/ThirdParty/ogrebullet/Dynamics/OgreBulletDynamicsWorld.cpp 2008-01-30 00:12:44 UTC (rev 558) +++ trunk/python-ogre/ThirdParty/ogrebullet/Dynamics/OgreBulletDynamicsWorld.cpp 2008-01-30 00:14:01 UTC (rev 559) @@ -43,7 +43,8 @@ DynamicsWorld::DynamicsWorld(Ogre::SceneManager *mgr, const Ogre::AxisAlignedBox &bounds, - const Ogre::Vector3 &gravity) : + const Ogre::Vector3 &gravity, + bool init) : CollisionsWorld(mgr, bounds, false), mDebugDrawer(0) { @@ -51,18 +52,19 @@ //btSequentialImpulseConstraintSolver3 mConstraintsolver = new btSequentialImpulseConstraintSolver(); - //mWorld = new btSimpleDynamicsWorld(); - mWorld = new btDiscreteDynamicsWorld(mDispatcher, mBroadphase, mConstraintsolver, &mDefaultCollisionConfiguration); + //only if init is true, otherwise you have to create mWorld manually later on + if (init) { + mWorld = new btDiscreteDynamicsWorld(mDispatcher, mBroadphase, mConstraintsolver, &mDefaultCollisionConfiguration); + static_cast <btDiscreteDynamicsWorld *> (mWorld)->setGravity(btVector3(gravity.x,gravity.y,gravity.z)); + } - - static_cast <btDiscreteDynamicsWorld *> (mWorld)->setGravity(btVector3(gravity.x,gravity.y,gravity.z)); - } // ------------------------------------------------------------------------- DynamicsWorld::~DynamicsWorld() { delete mConstraintsolver; } + // ------------------------------------------------------------------------- void DynamicsWorld::addRigidBody (RigidBody *rb, short collisionGroup, short collisionMask) { @@ -79,13 +81,13 @@ } } // ------------------------------------------------------------------------- - void DynamicsWorld::stepSimulation(const Ogre::Real elapsedTime, int maxSubSteps) + void DynamicsWorld::stepSimulation(const Ogre::Real elapsedTime, int maxSubSteps, const Ogre::Real fixedTimestep) { // Reset Debug Lines if (mDebugDrawer) mDebugDrawer->clear (); - static_cast <btDiscreteDynamicsWorld *> (mWorld)->stepSimulation(elapsedTime, maxSubSteps); + static_cast <btDiscreteDynamicsWorld *> (mWorld)->stepSimulation(elapsedTime, maxSubSteps, fixedTimestep); if (mDebugDrawer) { Modified: trunk/python-ogre/ThirdParty/ogrebullet/Dynamics/OgreBulletDynamicsWorld.h =================================================================== --- trunk/python-ogre/ThirdParty/ogrebullet/Dynamics/OgreBulletDynamicsWorld.h 2008-01-30 00:12:44 UTC (rev 558) +++ trunk/python-ogre/ThirdParty/ogrebullet/Dynamics/OgreBulletDynamicsWorld.h 2008-01-30 00:14:01 UTC (rev 559) @@ -32,7 +32,6 @@ #include "OgreBulletCollisionsWorld.h" #include "Debug/OgreBulletCollisionsDebugDrawer.h" - namespace OgreBulletDynamics { // ------------------------------------------------------------------------- @@ -42,12 +41,20 @@ public: DynamicsWorld(Ogre::SceneManager *mgr, const Ogre::AxisAlignedBox &bounds, - const Ogre::Vector3 &gravity); + const Ogre::Vector3 &gravity, + bool init = true); ~DynamicsWorld(); - void stepSimulation(const Ogre::Real elapsedTime, int maxSubSteps = 1); + template <class BTDNYWORLDCLASS> + void createBtDynamicsWorld(BTDNYWORLDCLASS *&createdWorld) + { + createdWorld = new BTDNYWORLDCLASS(mDispatcher, mBroadphase, mConstraintsolver, &mDefaultCollisionConfiguration); + mWorld = createdWorld; + } + void stepSimulation(const Ogre::Real elapsedTime, int maxSubSteps = 1, const Ogre::Real fixedTimestep = 1./60.); + void addRigidBody (RigidBody *rb, short collisionGroup, short collisionMask); void setDebugDrawer(OgreBulletCollisions::DebugDrawer *debugdrawer) Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIBorder.cpp =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIBorder.cpp 2008-01-30 00:12:44 UTC (rev 558) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIBorder.cpp 2008-01-30 00:14:01 UTC (rev 559) @@ -5,7 +5,7 @@ namespace QuickGUI { - Border::Border(const Ogre::String& name, GUIManager* gm) : + Border::Border(const std::string& name, GUIManager* gm) : Widget(name,gm), mThickness(5), mOverlap(1) @@ -82,7 +82,7 @@ MouseCursor* mc = mGUIManager->getMouseCursor(); mMouseCursorTexture = mc->getTexture(); - Ogre::String skin = mParentWidget->getSkin(); + std::string skin = mParentWidget->getSkin(); switch(mBorderType) { @@ -128,7 +128,7 @@ mBorderType = t; Size parentSize = mParentWidget->getSize(); - Ogre::String parentSkinComponent = mParentWidget->getSkinComponent(); + std::string parentSkinComponent = mParentWidget->getSkinComponent(); switch(mBorderType) { @@ -212,7 +212,7 @@ fireEvent(EVENT_PARENT_CHANGED,args); } - void Border::setSkin(const Ogre::String& skinName, Ogre::String extension, bool recursive) + void Border::setSkin(const std::string& skinName, std::string extension, bool recursive) { SkinSet* ss = SkinSetManager::getSingleton().getSkinSet(skinName); if(ss == NULL) Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIBorder.h =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIBorder.h 2008-01-30 00:12:44 UTC (rev 558) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIBorder.h 2008-01-30 00:14:01 UTC (rev 559) @@ -1,7 +1,7 @@ #ifndef QUICKGUIBORDER_H #define QUICKGUIBORDER_H -#include "QuickGUIPrerequisites.h" +#include "QuickGUIForwardDeclarations.h" #include "QuickGUIWidget.h" namespace QuickGUI @@ -44,12 +44,12 @@ @param ParentWidget parent widget which created this widget. */ - Border(const Ogre::String& name, GUIManager* gm); + Border(const std::string& name, GUIManager* gm); BorderType getBorderType(); void setBorderType(BorderType t); - void setSkin(const Ogre::String& skinName, Ogre::String extension = ".png", bool recursive = false); + void setSkin(const std::string& skinName, std::string extension = ".png", bool recursive = false); protected: virtual ~Border(); @@ -58,11 +58,11 @@ BorderType mBorderType; - Ogre::Real mThickness; - Ogre::Real mOverlap; + float mThickness; + float mOverlap; // used to restore mouse cursor when leaving. - Ogre::String mMouseCursorTexture; + std::string mMouseCursorTexture; void onDragged(const EventArgs& args); void onMouseEnter(const EventArgs& args); Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIButton.cpp =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIButton.cpp 2008-01-30 00:12:44 UTC (rev 558) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIButton.cpp 2008-01-30 00:14:01 UTC (rev 559) @@ -9,7 +9,7 @@ namespace QuickGUI { - Button::Button(const Ogre::String& name, GUIManager* gm) : + Button::Button(const std::string& name, GUIManager* gm) : Label(name,gm), mButtonDown(false) { Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIButton.h =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIButton.h 2008-01-30 00:12:44 UTC (rev 558) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIButton.h 2008-01-30 00:14:01 UTC (rev 559) @@ -1,7 +1,7 @@ #ifndef QUICKGUIBUTTON_H #define QUICKGUIBUTTON_H -#include "QuickGUIPrerequisites.h" +#include "QuickGUIForwardDeclarations.h" #include "QuickGUILabel.h" namespace QuickGUI @@ -40,7 +40,7 @@ @param ParentWidget parent widget which created this widget. */ - Button(const Ogre::String& name, GUIManager* gm); + Button(const std::string& name, GUIManager* gm); /** * Useful when you want to simulate the button being pressed down by the mouse. Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUICheckBox.cpp =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUICheckBox.cpp 2008-01-30 00:12:44 UTC (rev 558) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUICheckBox.cpp 2008-01-30 00:14:01 UTC (rev 559) @@ -4,7 +4,7 @@ namespace QuickGUI { - CheckBox::CheckBox(const Ogre::String& name, GUIManager* gm) : + CheckBox::CheckBox(const std::string& name, GUIManager* gm) : Button(name,gm), mChecked(false) { Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUICheckBox.h =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUICheckBox.h 2008-01-30 00:12:44 UTC (rev 558) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUICheckBox.h 2008-01-30 00:14:01 UTC (rev 559) @@ -9,7 +9,7 @@ public Button { public: - CheckBox(const Ogre::String& name, GUIManager* gm); + CheckBox(const std::string& name, GUIManager* gm); ~CheckBox(); /** Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIComboBox.cpp =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIComboBox.cpp 2008-01-30 00:12:44 UTC (rev 558) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIComboBox.cpp 2008-01-30 00:14:01 UTC (rev 559) @@ -7,7 +7,7 @@ namespace QuickGUI { - ComboBox::ComboBox(const Ogre::String& name, GUIManager* gm) : + ComboBox::ComboBox(const std::string& name, GUIManager* gm) : Widget(name,gm), mRightToLeft(false), mSelectedItem(0), @@ -267,20 +267,20 @@ mHighlightPanel->setVisible(false); } - void ComboBox::setDropDownHeight(Ogre::Real pixelHeight) + void ComboBox::setDropDownHeight(float pixelHeight) { mDropDownHeight = pixelHeight; mList->setHeight(mDropDownHeight); } - void ComboBox::setDropDownWidth(Ogre::Real pixelWidth) + void ComboBox::setDropDownWidth(float pixelWidth) { mDropDownWidth = pixelWidth; mList->setWidth(mDropDownWidth); mList->setHorizontalAnchor(ANCHOR_HORIZONTAL_LEFT); } - void ComboBox::setFont(const Ogre::String& fontScriptName, bool recursive) + void ComboBox::setFont(const std::string& fontScriptName, bool recursive) { if(fontScriptName == "") return; @@ -295,7 +295,7 @@ } } - void ComboBox::setHeight(Ogre::Real pixelHeight) + void ComboBox::setHeight(float pixelHeight) { Widget::setHeight(pixelHeight); mAutoSize = false; @@ -324,7 +324,7 @@ //mMenuLabel->setRightToLeft(mRightToLeft); } - void ComboBox::setSize(const Ogre::Real& pixelWidth, const Ogre::Real& pixelHeight) + void ComboBox::setSize(const float& pixelWidth, const float& pixelHeight) { Widget::setSize(pixelWidth,pixelHeight); mAutoSize = false; @@ -335,7 +335,7 @@ ComboBox::setSize(pixelSize.width,pixelSize.height); } - void ComboBox::setSkin(const Ogre::String& skinName, bool recursive) + void ComboBox::setSkin(const std::string& skinName, bool recursive) { Widget::setSkin(skinName,recursive); Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIComboBox.h =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIComboBox.h 2008-01-30 00:12:44 UTC (rev 558) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIComboBox.h 2008-01-30 00:14:01 UTC (rev 559) @@ -1,7 +1,7 @@ #ifndef QUICKGUICOMBOBOX_H #define QUICKGUICOMBOBOX_H -#include "QuickGUIPrerequisites.h" +#include "QuickGUIForwardDeclarations.h" #include "QuickGUIButton.h" #include "QuickGUIWidget.h" #include "QuickGUIMenuLabel.h" @@ -46,7 +46,7 @@ @param ParentWidget parent widget which created this widget. */ - ComboBox(const Ogre::String& name, GUIManager* gm); + ComboBox(const std::string& name, GUIManager* gm); MenuLabel* addItem(); /** @@ -68,17 +68,17 @@ int getVerticalPixelPadHeight(); void selectItem(unsigned int index); - void setDropDownHeight(Ogre::Real pixelHeight); - void setDropDownWidth(Ogre::Real pixelWidth); - virtual void setFont(const Ogre::String& fontScriptName, bool recursive = false); - virtual void setHeight(Ogre::Real pixelHeight); + void setDropDownHeight(float pixelHeight); + void setDropDownWidth(float pixelWidth); + virtual void setFont(const std::string& fontScriptName, bool recursive = false); + virtual void setHeight(float pixelHeight); void setRightToLeft(bool rightToLeft); /** * Manually set size of widget. */ - virtual void setSize(const Ogre::Real& pixelWidth, const Ogre::Real& pixelHeight); + virtual void setSize(const float& pixelWidth, const float& pixelHeight); virtual void setSize(const Size& pixelSize); - virtual void setSkin(const Ogre::String& skinName, bool recursive = false); + virtual void setSkin(const std::string& skinName, bool recursive = false); void setVerticalPixelPadHeight(unsigned int height); protected: @@ -107,7 +107,7 @@ void onSelection(const EventArgs& args); Quad* mHighlightPanel; - Ogre::String mHighlightSkinComponent; + std::string mHighlightSkinComponent; // The Widget that has been clicked/selected by the user. MenuLabel* mSelectedItem; @@ -118,8 +118,8 @@ // Drop down list. List* mList; - Ogre::Real mDropDownHeight; - Ogre::Real mDropDownWidth; + float mDropDownHeight; + float mDropDownWidth; bool mRightToLeft; Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIConfigScriptParser.h =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIConfigScriptParser.h 2008-01-30 00:12:44 UTC (rev 558) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIConfigScriptParser.h 2008-01-30 00:14:01 UTC (rev 559) @@ -4,9 +4,12 @@ #ifndef __QuickGuiSkinSetParser_h_ #define __QuickGuiSkinSetParser_h_ -#include "QuickGUIPrerequisites.h" +#include "QuickGUIForwardDeclarations.h" #include "QuickGUIExportDLL.h" +#include "OgreScriptLoader.h" +#include "OgreStringVector.h" + namespace QuickGUI { class ConfigNode; @@ -25,12 +28,12 @@ inline static ConfigScriptLoader *getSingletonPtr() { return &getSingleton(); } - Ogre::Real getLoadingOrder() const; + float getLoadingOrder() const; const Ogre::StringVector &getScriptPatterns() const; - ConfigNode *getConfigScript(const Ogre::String &type, const Ogre::String &name); + ConfigNode *... [truncated message content] |
From: <and...@us...> - 2008-01-30 00:12:40
|
Revision: 558 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=558&view=rev Author: andy_miller Date: 2008-01-29 16:12:44 -0800 (Tue, 29 Jan 2008) Log Message: ----------- Fix to addPoly function in OgreNewt, changes to Forests underlying api Modified Paths: -------------- trunk/python-ogre/code_generators/ogreforests/hand_made_wrappers.py trunk/python-ogre/code_generators/ogrenewt/generate_code.py trunk/python-ogre/code_generators/ogrenewt/hand_made_wrappers.py Modified: trunk/python-ogre/code_generators/ogreforests/hand_made_wrappers.py =================================================================== --- trunk/python-ogre/code_generators/ogreforests/hand_made_wrappers.py 2008-01-22 09:17:13 UTC (rev 557) +++ trunk/python-ogre/code_generators/ogreforests/hand_made_wrappers.py 2008-01-30 00:12:44 UTC (rev 558) @@ -5,12 +5,12 @@ """ static PyObject* mSubscriber_tree; static std::string mName_tree; -Ogre::Real HelperHeightFunction_Tree2D ( Ogre::Real x, Ogre::Real z) { +Ogre::Real HelperHeightFunction_Tree2D ( Ogre::Real x, Ogre::Real z, void *userData) { Ogre::Real y; if (mName_tree.length() == 0 ) - y = boost::python::call<Ogre::Real>(mSubscriber_tree, x, z); + y = boost::python::call<Ogre::Real>(mSubscriber_tree, x, z, userData); else - y = boost::python::call_method<Ogre::Real>(mSubscriber_tree, mName_tree.c_str(), x, z); + y = boost::python::call_method<Ogre::Real>(mSubscriber_tree, mName_tree.c_str(), x, z, userData); return y; } @@ -25,12 +25,12 @@ """ static PyObject* mSubscriber_grass; static std::string mName_grass; -Ogre::Real HelperHeightFunction_Grass ( Ogre::Real x, Ogre::Real z) { +Ogre::Real HelperHeightFunction_Grass ( Ogre::Real x, Ogre::Real z, void * userData) { Ogre::Real y; if (mName_grass.length() == 0 ) - y = boost::python::call<Ogre::Real>(mSubscriber_grass, x, z); + y = boost::python::call<Ogre::Real>(mSubscriber_grass, x, z, userData ); else - y = boost::python::call_method<Ogre::Real>(mSubscriber_grass, mName_grass.c_str(), x, z); + y = boost::python::call_method<Ogre::Real>(mSubscriber_grass, mName_grass.c_str(), x, z, userData); return y; } Modified: trunk/python-ogre/code_generators/ogrenewt/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/ogrenewt/generate_code.py 2008-01-22 09:17:13 UTC (rev 557) +++ trunk/python-ogre/code_generators/ogrenewt/generate_code.py 2008-01-30 00:12:44 UTC (rev 558) @@ -58,6 +58,7 @@ ## these need to be excluded due to callback functions - Have been wrapped ogrenewt_ns.class_( "World" ).member_functions("setLeaveWorldCallback").exclude() + ogrenewt_ns.class_( "Body" ).member_functions("addBouyancyForce").exclude() ogrenewt_ns.class_( "Body" ).member_functions("setAutoactiveCallback").exclude() @@ -75,6 +76,10 @@ ogrenewt_ns.class_( "Joint" ).member_functions("setUserData").exclude() ogrenewt_ns.class_( "Body" ).member_functions("getUserData").exclude() ogrenewt_ns.class_( "Joint" ).member_functions("getUserData").exclude() + + ## This one needs a list of vertices given to it + ogrenewt_ns.class_( "TreeCollision" ).member_functions("addPoly").exclude() + # ConvexHull has an overloaded constructor that takes 5 args, one is a pointer to a list of vectors which we can't # handle, so we created a helper function caller createConvexHull that takes a python list instead. Modified: trunk/python-ogre/code_generators/ogrenewt/hand_made_wrappers.py =================================================================== --- trunk/python-ogre/code_generators/ogrenewt/hand_made_wrappers.py 2008-01-22 09:17:13 UTC (rev 557) +++ trunk/python-ogre/code_generators/ogrenewt/hand_made_wrappers.py 2008-01-30 00:12:44 UTC (rev 558) @@ -398,6 +398,37 @@ 'def ("setAutoactiveCallback", &::Body_setAutoactiveCallback);', 'def ("setCustomTransformCallback", &::Body_setCustomTransformCallback);' ] + + + +WRAPPER_DEFINITION_TreeCollision=\ +""" +void +TreeCollision_addPoly( ::OgreNewt::CollisionPrimitives::TreeCollision & me, boost::python::list polys, unsigned int ID ) + { + + Ogre::Vector3* newverts = new Ogre::Vector3[ 3 ]; + Ogre::Vector3* startpos = newverts; + int index; + if (len(polys) < 3 ) { + throw std::runtime_error ( std::string ("addPoly called with a list with less than 3 verticies") ); + return; + } + for (index=0;index<3;index++ ) { + *newverts++ = boost::python::extract<Ogre::Vector3> (polys[index]); + } + me.addPoly( startpos, ID ); + return; + } + """ +WRAPPER_REGISTRATION_TreeCollision= [ + """def ("addPoly", &::TreeCollision_addPoly,\ + "Python-Ogre Helper Function: Adds a list of 3 Ogre:Vector3's to the collision system.\\n\\ + Input: List of 3 Ogre::Vector3's, ID\\n\\ + Output: Nothing" );""" + ] + + ######################################################################################## WRAPPER_DEFINITION_General=\ """ @@ -458,6 +489,10 @@ cs.add_declaration_code( WRAPPER_DEFINITION_BodyIterator ) apply_reg (cs, WRAPPER_REGISTRATION_BodyIterator ) + cs = mb.class_( 'TreeCollision' ) + cs.add_declaration_code( WRAPPER_DEFINITION_TreeCollision ) + apply_reg (cs, WRAPPER_REGISTRATION_TreeCollision ) + mb.add_declaration_code( WRAPPER_DEFINITION_General ) apply_reg (mb, WRAPPER_REGISTRATION_General ) \ 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-01-22 09:17:08
|
Revision: 557 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=557&view=rev Author: andy_miller Date: 2008-01-22 01:17:13 -0800 (Tue, 22 Jan 2008) Log Message: ----------- Fixed error in setup Modified Paths: -------------- trunk/python-ogre/setup.py Modified: trunk/python-ogre/setup.py =================================================================== --- trunk/python-ogre/setup.py 2008-01-18 11:10:37 UTC (rev 556) +++ trunk/python-ogre/setup.py 2008-01-22 09:17:13 UTC (rev 557) @@ -64,7 +64,7 @@ 'ogre.sound', 'ogre.sound.OgreAL', 'ogre.physics', '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.NxOgre_09' + 'ogre.physics.bullet','ogre.physics.PhysX','ogre.physics.NxOgre',## 'ogre.physics.NxOgre_09', 'ogre.physics.OgreBulletC', 'ogre.physics.OgreBulletD', 'ogre.addons','ogre.addons.theora', 'ogre.addons.ogrevideoffmpeg', 'ogre.addons.ogredshow', This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2008-01-18 11:10:32
|
Revision: 556 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=556&view=rev Author: andy_miller Date: 2008-01-18 03:10:37 -0800 (Fri, 18 Jan 2008) Log Message: ----------- Linux fix Modified Paths: -------------- trunk/python-ogre/ThirdParty/caelum/LayeredClouds.cpp Modified: trunk/python-ogre/ThirdParty/caelum/LayeredClouds.cpp =================================================================== --- trunk/python-ogre/ThirdParty/caelum/LayeredClouds.cpp 2008-01-18 05:56:11 UTC (rev 555) +++ trunk/python-ogre/ThirdParty/caelum/LayeredClouds.cpp 2008-01-18 11:10:37 UTC (rev 556) @@ -236,6 +236,6 @@ } void LayeredClouds::disableCloudCoverLookup () { - mCloudCoverLookup = 0; + mCloudCoverLookup.reset(0); } } // namespace caelum This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |