[Yake-svn] SF.net SVN: yake: [1528] trunk/yake
Status: Beta
Brought to you by:
psyclonist
From: <psy...@us...> - 2006-12-07 20:39:40
|
Revision: 1528 http://svn.sourceforge.net/yake/?rev=1528&view=rev Author: psyclonist Date: 2006-12-07 12:39:41 -0800 (Thu, 07 Dec 2006) Log Message: ----------- reorganization Added Paths: ----------- trunk/yake/samples/base/events/yakePCH.h trunk/yake/samples/base/ved/yakeDemoApp.h trunk/yake/samples/base/ved/yakePCH.h trunk/yake/samples/common/ trunk/yake/samples/graphics/scripted/yakePCH.h trunk/yake/samples/gui/basics/CEGUIOgre_TestDriver1_REPLACE.h trunk/yake/samples/gui/basics/forward_buffer.h trunk/yake/samples/gui/basics/gui_test.h trunk/yake/samples/misc/cmdrmayhem/yakePCH.h trunk/yake/samples/misc/scripted/yakePCH.h trunk/yake/samples/misc/vehicle/yakePCH.h trunk/yake/samples/model/yakePCH.h trunk/yake/samples/raf/demo1/yakePCH.h trunk/yake/samples/raf/minimal/yakePCH.h Removed Paths: ------------- trunk/yake/samples/common/yakeHelper.h trunk/yake/yapp/plugins/terrainPhysMgr/ trunk/yake/yapp/samples/GUI/basics/CEGUIOgre_TestDriver1_REPLACE.h trunk/yake/yapp/samples/GUI/basics/forward_buffer.h trunk/yake/yapp/samples/GUI/basics/gui_test.h trunk/yake/yapp/samples/base/events/yakePCH.h trunk/yake/yapp/samples/base/ved/yakeDemoApp.h trunk/yake/yapp/samples/base/ved/yakePCH.h trunk/yake/yapp/samples/common/ trunk/yake/yapp/samples/graphics/scripted/yakePCH.h trunk/yake/yapp/samples/misc/cmdrmayhem/yakePCH.h trunk/yake/yapp/samples/misc/scripted/yakePCH.h trunk/yake/yapp/samples/misc/vehicle/yakePCH.h trunk/yake/yapp/samples/model/yakePCH.h trunk/yake/yapp/samples/raf/demo1/yakePCH.h trunk/yake/yapp/samples/raf/minimal/yakePCH.h Copied: trunk/yake/samples/base/events/yakePCH.h (from rev 1522, trunk/yake/yapp/samples/base/events/yakePCH.h) =================================================================== --- trunk/yake/samples/base/events/yakePCH.h (rev 0) +++ trunk/yake/samples/base/events/yakePCH.h 2006-12-07 20:39:41 UTC (rev 1528) @@ -0,0 +1,15 @@ +//============================================================================ +// IMPLEMENTATION HEADERS +//============================================================================ +// STL +#include <iostream> +// Yake +#include <yake/base/yake.h> +#include <yake/base/yakeDebugOutputStream.h> +#include <yake/base/yakeLog.h> +#include <yake/base/yakeLibrary.h> +#include <yake/scripting/yakeScriptingSystem.h> +#include <yake/graphics/yakeGraphicsSystem.h> + +#include <yake/samples/common/yakeExampleApplication.h> +#include <yake/data/yakeData.h> Copied: trunk/yake/samples/base/ved/yakeDemoApp.h (from rev 1522, trunk/yake/yapp/samples/base/ved/yakeDemoApp.h) =================================================================== --- trunk/yake/samples/base/ved/yakeDemoApp.h (rev 0) +++ trunk/yake/samples/base/ved/yakeDemoApp.h 2006-12-07 20:39:41 UTC (rev 1528) @@ -0,0 +1,238 @@ +#ifndef YAPP_DEMO_VED_H +#define YAPP_DEMO_VED_H +#include <yapp/samples/common/yakeHelper.h> +#include <yapp/common/yakeCEGUIRendererAdapter.h> + +using namespace yake; +using namespace yake::base::templates; +using namespace yake::base::math; +using namespace yake::graphics; +using namespace yake::data; + +using namespace yapp; +using namespace yake::app; + +namespace yake { + class RoadCreator; + class TrailCreator; +} +class TheApp : public yake::exapp::ExampleApplication +{ +//private: +public: + yake::ceguiadapter::RendererAdapterPlugin* mAdapterPlugin; + CameraFollowController* mpCfc; + + task::TaskManager mTaskMgr; + // task: render + class RenderTask : public task::DefTask + { + private: + IGraphicalWorld* mWorld; + public: + RenderTask( IGraphicalWorld* pWorld ); + virtual void execute(real timeElapsed); + + typedef Signal1< void(real) > PreSignal; + void subscribeToPre( const PreSignal::slot_type & slot ) + { mPreSig.connect( slot ); } + private: + PreSignal mPreSig; + }; + RenderTask* mRenderTask; + + // task: physics + class PhysicsTask : public task::DefTask + { + private: + physics::IWorld* mWorld; + public: + PhysicsTask( physics::IWorld* pWorld ); + virtual void execute(real timeElapsed); + + typedef Signal0< void > VoidSignal; + void subscribeToPre( const VoidSignal::slot_type & slot ) + { mPreSignal.connect( slot ); } + void subscribeToPost( const VoidSignal::slot_type & slot ) + { mPostSignal.connect( slot ); } + private: + VoidSignal mPreSignal; + VoidSignal mPostSignal; + }; + PhysicsTask* mPhysicsTask; + + // task: vehicle sim + class VehicleSimTask : public task::DefTask + { + private: + model::complex::vehicle::LandVehicle* mCar; + public: + VehicleSimTask( model::complex::vehicle::LandVehicle* theCar ); + virtual void execute(real timeElapsed); + }; + VehicleSimTask* mVehicleSimTask; + + // task: input + class InputTask : public task::DefTask + { + private: + TheApp* mApp; + model::complex::vehicle::LandVehicle* mCar; + + public: + InputTask( TheApp* theApp, model::complex::vehicle::LandVehicle* theCar ); + virtual void execute(real timeElapsed); + }; + InputTask* mInputTask; + + Vector<std::pair<IViewport*,ICamera*> > mVPs; + SharedPtr< IGraphicalWorld > mGWorld; + physics::IWorld* mPWorld; + audio::IWorld* mpAWorld; + + physics::IComplexObject* dbgChassis; + + audio::IListener* mpAListener; + audio::ISource* mpASource; + audio::ISoundData* mpAData; + + graphics::ISceneNode* mLightOneNode; + graphics::IParticleSystem* mSmoke; + + struct SimpleOne { + graphics::ISceneNode* pSN; + graphics::IEntity* pE; + physics::IComplexObject* pCO; + model::MovableUpdateController* updCtrl; + }; + SimpleOne mGround; + model::complex::Model* mCarModel; + model::complex::vehicle::LandVehicle* mCar; + SimpleOne mBall; + + RoadCreator* mRoadCreator; + TrailCreator* mSkidCreator; + + real mCurrentSimTime; +public: + TheApp() : ExampleApplication( true /*graphics*/, + true /*physics*/, + false /*scripting*/, + true /*input*/, + false /*script bindings*/, + false /*audio*/), + mCarModel(0), + mCar(0), + mpAWorld(0), + mpASource(0), + mpAListener(0), + mpAData(0), + mLightOneNode(0), + mRenderTask(0), + mPhysicsTask(0), + mInputTask(0), + mVehicleSimTask(0), + mAdapterPlugin(0), + mRoadCreator(0), + mSkidCreator(0), + mCurrentSimTime(0), + mpCfc(0) + { + } + + InputTask* getInputTask() const + { + return mInputTask; + } + RenderTask* getRenderTask() const + { + return mRenderTask; + } + PhysicsTask* getPhysicsTask() const + { + return mPhysicsTask; + } + + real getSimulationTime() + { + return mCurrentSimTime; + } + + void preRender( real timeElapsed ); + + void handleInput( real timeElapsed ); + + void onKey(const yake::input::KeyboardEvent & e) + { + if (e.keyCode == input::KC_ESCAPE) + requestShutdown(); + } + void onMBUp(uint8 btn) + { + CEGUI::System::getSingleton().injectMouseButtonUp( CEGUI::LeftButton ); + } + void onMBDown(uint8 btn) + { + CEGUI::System::getSingleton().injectMouseButtonDown( CEGUI::LeftButton ); + } + void onMouseMoved( const Vector3 & position ) + { + real scale = 1; + static Vector3 lastPosition = position; + Vector3 diff = position - lastPosition; + lastPosition = position; + + CEGUI::System::getSingleton().injectMouseMove(diff.x*scale, diff.y*scale); + //CEGUI::Renderer* rend = CEGUI::System::getSingleton().getRenderer(); + //CEGUI::System::getSingleton().injectMouseMove(e->getRelX() * rend->getWidth(), e->getRelY() * rend->getHeight()); + } + + int createCameraViewportPair( real sx, real sy, real w, real h, int z ); + void setupDotScene(); + void setupGround(); + void setupAudio(); + void cleanUpAudio(); + + void setupBall(); + void cleanUpBall(); + + void createWheel( + model::complex::vehicle::Wheel *& pWheel, + physics::IComplexObject *& pCO, + SharedPtr<physics::IJoint> & pJ, + physics::IComplexObject* pCOChassis, + const real radius, + const Vector3 & position, + const Quaternion & orientation, + const Vector3 & anchorPt, + const Vector3 & hingeSteeringAxis, + const Vector3 & hingeSuspensionAxis, + const real suspSpring, + const real suspDamping, + const real wheelMass ); + model::complex::vehicle::Wheel* createWheel( + const Vector3 & position, + const Quaternion & orientation, + physics::IComplexObject* pCOChassis, + SharedPtr<model::Physical> & pPhysical, + const real radius, + const real suspSpring, + const real suspDamping, + const real wheelMass, + Vector<graphics::ISceneNode*> & nodeList, + SharedMUCList & mucList, + const String & wheelMesh = "wheel1.mesh"); + void setupCar(); + void setupLights(); + void setupGui(); + void cleanUpGui(); + void createGuiWindows(); + + void setupRoad(); + void cleanUpRoad(); + + virtual void run(); +}; + + +#endif \ No newline at end of file Copied: trunk/yake/samples/base/ved/yakePCH.h (from rev 1522, trunk/yake/yapp/samples/base/ved/yakePCH.h) =================================================================== --- trunk/yake/samples/base/ved/yakePCH.h (rev 0) +++ trunk/yake/samples/base/ved/yakePCH.h 2006-12-07 20:39:41 UTC (rev 1528) @@ -0,0 +1,18 @@ +//============================================================================ +// IMPLEMENTATION HEADERS +//============================================================================ +// STL +#include <iostream> +// Yake +#include <yake/base/yake.h> +#include <yake/base/yakeDebugOutputStream.h> +#include <yake/base/yakeLog.h> +#include <yake/base/yakeLibrary.h> +#include <yake/scripting/yakeScriptingSystem.h> +#include <yake/graphics/yakeGraphicsSystem.h> + +#include <yake/samples/common/yakeExampleApplication.h> +#include <yake/data/yakeData.h> + +#include <yapp/base/yapp.h> +#include "CEGUI.h" Copied: trunk/yake/samples/common (from rev 1522, trunk/yake/yapp/samples/common) Deleted: trunk/yake/samples/common/yakeHelper.h =================================================================== --- trunk/yake/yapp/samples/common/yakeHelper.h 2006-12-07 20:06:03 UTC (rev 1522) +++ trunk/yake/samples/common/yakeHelper.h 2006-12-07 20:39:41 UTC (rev 1528) @@ -1,159 +0,0 @@ -/* - ------------------------------------------------------------------------------------ - This file is part of YAKE - Copyright \xA9 2004 The YAKE Team - For the latest information visit http://www.yake.org - ------------------------------------------------------------------------------------ - 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. - ------------------------------------------------------------------------------------ - If you are interested in another license model contact the Yake Team via - E-Mail: te...@ya.... - For more information see the LICENSE file in the root directory of the - source code distribution. - ------------------------------------------------------------------------------------ -*/ -#ifndef YAPP_SAMPLES_HELPER_H -#define YAPP_SAMPLES_HELPER_H - -using namespace yake; -using namespace yake::templates; -using namespace yake::math; -using namespace yake::graphics; - -namespace yake { - - class CameraFollowController - { - private: - Movable* mCamMovable; - Movable* mTarget; - public: - CameraFollowController( Movable* pCamMovable, Movable* pTarget ) : - mTarget(pTarget), mCamMovable(pCamMovable) - {} - - void update( real timeElapsed ) - { - YAKE_ASSERT( mCamMovable ); - YAKE_ASSERT( mTarget ); - - Vector3 targetDir = mTarget->getOrientation() * (Vector3::kUnitZ); - //mCamMovable->setPosition( mTarget->getPosition() + Vector3(0,7,14) ); - mCamMovable->setPosition( mTarget->getPosition() + Vector3(0,1.7,7) ); - //mCamMovable->setOrientation( mTarget->getOrientation() ); - } - }; - - model::MovableUpdateController* createMovableUpdateController( - Movable* pSrc, Movable* pTgt, bool position, bool orientation ) - { - YAKE_ASSERT( pSrc ); - YAKE_ASSERT( pTgt ); - YAKE_ASSERT( position || orientation ); - model::MovableUpdateController* pMUC = new model::MovableUpdateController(); - YAKE_ASSERT( pMUC ); - pMUC->setUpdateSource( pSrc ); - if (position) - pMUC->subscribeToPositionChanged( pTgt ); - if (orientation) - pMUC->subscribeToOrientationChanged( pTgt ); - return pMUC; - } - - typedef Vector<SharedPtr<graphics::ISceneNode> > SharedSceneNodeList; - typedef Vector<SharedPtr<model::MovableUpdateController> > SharedMUCList; - - void createDebugGeometryForComplexPhysical( - const physics::IActor* pComplex, - graphics::IWorld* pWorld, - Vector<graphics::ISceneNode*> & nodes, - SharedMUCList & ctrlrs, - const String & overrideMesh = "", - real overrideMeshScaleFactor = 1. ) - { - //YAKE_ASSERT( pComplex ); - //YAKE_ASSERT( pWorld ); - //const physics::IShapePtrList geoms = pComplex->getShapes(); - //if (geoms.size() == 0) - // return; - //ConstVectorIterator< physics::IShapePtrList > it( geoms.begin(), geoms.end() ); - //while (it.hasMoreElements()) - //{ - // physics::IShape* pGeom = it.getNext(); - // YAKE_ASSERT( pGeom ); - - // graphics::ISceneNode* pSN = pWorld->createSceneNode(); - // YAKE_ASSERT( pSN ); - // graphics::IEntity* pE = 0; - - // switch (pGeom->getType()) - // { - // case physics::ST_BOX: - // { - // pE = pWorld->createEntity( (overrideMesh == "") ? "box_1x1x1.mesh" : overrideMesh ); - // pE->setCastsShadow( true ); - // Vector3 dim = pGeom->boxGetDimensions(); - // pSN->setScale( dim ); - // } - // break; - // case physics::ST_SPHERE: - // { - // pE = pWorld->createEntity( (overrideMesh == "") ? "sphere_d1.mesh": overrideMesh); - // pE->setCastsShadow( true ); - // real scale = overrideMeshScaleFactor * 2 /* x2 because diameter is 1, therefore radius is 0.5 by default*/ * pGeom->sphereGetRadius(); - // if (scale < 0.0001) - // scale = 1.; - // pSN->setScale( Vector3(scale,scale,scale) ); - // } - // break; - // default: - // YAKE_ASSERT( 1==0 ).error("unhandled debug geometry."); - // break; - // } - - // YAKE_ASSERT( pE ); - // pSN->attachEntity( pE ); - // nodes.push_back( pSN ); - - // model::MovableUpdateController* pMUC = new model::MovableUpdateController(); - // YAKE_ASSERT( pMUC ); - // pMUC->setUpdateSource( pGeom ); - // pMUC->subscribeToPositionChanged( pSN ); - // pMUC->subscribeToOrientationChanged( pSN ); - // ctrlrs.push_back( SharedPtr<model::MovableUpdateController>(pMUC) ); - //} - } - - void createDebugGeometryForComplexPhysical( - const physics::IActor* pComplex, - graphics::IWorld* pWorld, - SharedSceneNodeList & nodes, - SharedMUCList & ctrlrs, - const String & overrideMesh = "", - real overrideMeshScaleFactor = 1.) - { - Vector<graphics::ISceneNode*> newNodes; - createDebugGeometryForComplexPhysical( pComplex, pWorld, newNodes, ctrlrs, overrideMesh, overrideMeshScaleFactor ); - VectorIterator< Vector<graphics::ISceneNode*> > it( newNodes.begin(), newNodes.end() ); - while (it.hasMoreElements()) - { - graphics::ISceneNode* pSN = it.getNext(); - nodes.push_back( SharedPtr<graphics::ISceneNode>( pSN ) ); - } - } - -} // yake - -#endif Copied: trunk/yake/samples/graphics/scripted/yakePCH.h (from rev 1522, trunk/yake/yapp/samples/graphics/scripted/yakePCH.h) =================================================================== --- trunk/yake/samples/graphics/scripted/yakePCH.h (rev 0) +++ trunk/yake/samples/graphics/scripted/yakePCH.h 2006-12-07 20:39:41 UTC (rev 1528) @@ -0,0 +1,13 @@ +//============================================================================ +// IMPLEMENTATION HEADERS +//============================================================================ +// STL +#include <iostream> +// Yake +#include <yake/base/yake.h> +#include <yake/scripting/yakeScriptingSystem.h> +#include <yake/graphics/yakeGraphicsSystem.h> +#include <yake/data/yakeData.h> +#include <yapp/base/yapp.h> + +#include <yake/samples/common/yakeExampleApplication.h> Copied: trunk/yake/samples/gui/basics/CEGUIOgre_TestDriver1_REPLACE.h (from rev 1522, trunk/yake/yapp/samples/GUI/basics/CEGUIOgre_TestDriver1_REPLACE.h) =================================================================== --- trunk/yake/samples/gui/basics/CEGUIOgre_TestDriver1_REPLACE.h (rev 0) +++ trunk/yake/samples/gui/basics/CEGUIOgre_TestDriver1_REPLACE.h 2006-12-07 20:39:41 UTC (rev 1528) @@ -0,0 +1,173 @@ +#ifndef _CEGUIOgre_TestDriver1_h_ +#define _CEGUIOgre_TestDriver1_h_ + +#include <boost/shared_ptr.hpp> + +#include "CEGUI.h" +#include "renderers/OgreGUIRenderer/ogrerenderer.h" +#include "ExampleApplication.h" +#include "OgreEventQueue.h" + +#include "gui_test.h" + +class CEGUIOgre_FrameListener : public ExampleFrameListener, Ogre::MouseMotionListener, Ogre::MouseListener +{ +public: + CEGUIOgre_FrameListener(RenderWindow* win, Camera* cam) : ExampleFrameListener(win, cam) + { + mEventProcessor = new EventProcessor(); + mEventProcessor->initialise(win); + mEventProcessor->startProcessingEvents(); + mEventProcessor->addKeyListener(this); + mEventProcessor->addMouseMotionListener(this); + mEventProcessor->addMouseListener(this); + mInputDevice = mEventProcessor->getInputReader(); + + mQuit = false; + mSkipCount = 0; + mUpdateFreq = 0; + } + + + virtual void mouseMoved (MouseEvent *e) + { + CEGUI::Renderer* rend = CEGUI::System::getSingleton().getRenderer(); + CEGUI::System::getSingleton().injectMouseMove(e->getRelX() * rend->getWidth(), e->getRelY() * rend->getHeight()); + e->consume(); + } + + + virtual void mouseDragged (MouseEvent *e) + { + mouseMoved(e); + } + + + virtual void keyPressed (KeyEvent *e) + { + // give 'quitting' priority + if (e->getKey() == KC_ESCAPE) + { + mQuit = true; + e->consume(); + return; + } + + // do event injection + CEGUI::System& cegui = CEGUI::System::getSingleton(); + + // key down + cegui.injectKeyDown(e->getKey()); + + // now character + cegui.injectChar(e->getKeyChar()); + + e->consume(); + } + + + virtual void keyReleased (KeyEvent *e) + { + CEGUI::System::getSingleton().injectKeyUp(e->getKey()); + } + + + + virtual void mousePressed (MouseEvent *e) + { + CEGUI::System::getSingleton().injectMouseButtonDown(convertOgreButtonToCegui(e->getButtonID())); + e->consume(); + } + + + virtual void mouseReleased (MouseEvent *e) + { + CEGUI::System::getSingleton().injectMouseButtonUp(convertOgreButtonToCegui(e->getButtonID())); + e->consume(); + } + + // do-nothing events + virtual void keyClicked (KeyEvent *e) {} + virtual void mouseClicked (MouseEvent *e) {} + virtual void mouseEntered (MouseEvent *e) {} + virtual void mouseExited (MouseEvent *e) {} + + + bool frameStarted(const FrameEvent& evt); + +protected: + CEGUI::MouseButton convertOgreButtonToCegui(int ogre_button_id) + { + switch (ogre_button_id) + { + case MouseEvent::BUTTON0_MASK: + return CEGUI::LeftButton; + break; + + case MouseEvent::BUTTON1_MASK: + return CEGUI::RightButton; + break; + + case MouseEvent::BUTTON2_MASK: + return CEGUI::MiddleButton; + break; + + case MouseEvent::BUTTON3_MASK: + return CEGUI::X1Button; + break; + + default: + return CEGUI::LeftButton; + break; + } + + } + +protected: + float mSkipCount; + float mUpdateFreq; + + bool mQuit; +}; + +class CEGUIOgre_TestDriver1 : public ExampleApplication +{ +public: + CEGUIOgre_TestDriver1(void) + : mGUIRenderer(NULL) + {} + + virtual bool configure() + { + if(mRoot->restoreConfig()) + { + mWindow = mRoot->initialise(true); + return true; + } + else + { + return false; + } + } + + virtual void cleanup(void); + +protected: + /************************************************************************* + Methods + *************************************************************************/ + virtual void createScene(void); + virtual void createFrameListener(void); + + // new demo methods + void createDemoWindows(void); + + /************************************************************************* + Data + *************************************************************************/ + CEGUI::OgreRenderer * mGUIRenderer; + boost::shared_ptr<yake::gui_test> m_gui_test; +}; + + +#endif // end of guard _CEGUIOgre_TestDriver1_h_ Copied: trunk/yake/samples/gui/basics/forward_buffer.h (from rev 1522, trunk/yake/yapp/samples/GUI/basics/forward_buffer.h) =================================================================== --- trunk/yake/samples/gui/basics/forward_buffer.h (rev 0) +++ trunk/yake/samples/gui/basics/forward_buffer.h 2006-12-07 20:39:41 UTC (rev 1528) @@ -0,0 +1,34 @@ +#ifndef _FORWARD_BUFFER_H_ +#define _FORWARD_BUFFER_H_ + +// todo: what is causing this mess? +#ifdef realloc +# undef realloc +#endif + +#include <iostream> +#include <string> +#include <boost/io/stream_facade.hpp> +#include <boost/io/categories.hpp> +#include <boost/function.hpp> + + +struct forward_sink +{ + typedef char char_type; + typedef boost::io::sink_tag category; + typedef boost::function<void (const std::string &)> forward_fnc; + + forward_sink(forward_fnc fnc) : m_forward_fnc( fnc ) + {} + + void write(const char * s, std::streamsize n) + { m_forward_fnc(std::string(s, n)); } + +private: + forward_fnc m_forward_fnc; +}; + +typedef boost::io::streambuf_facade<forward_sink> forward_buf; + +#endif // _FORWARD_BUFFER_H_ Copied: trunk/yake/samples/gui/basics/gui_test.h (from rev 1522, trunk/yake/yapp/samples/GUI/basics/gui_test.h) =================================================================== --- trunk/yake/samples/gui/basics/gui_test.h (rev 0) +++ trunk/yake/samples/gui/basics/gui_test.h 2006-12-07 20:39:41 UTC (rev 1528) @@ -0,0 +1,117 @@ +#ifndef _GUI_TEST_H_ +#define _GUI_TEST_H_ + +#include <string> + +#include <reflection.h> +#include <bind_lua/bind_lua.h> +#undef free // todo: find conflict with tnl and move to bind_network.h +//#include <bind_network/bind_network.h> // todo: remove + +#include <Ogre.h> + +#include "default_window.h" +#include "forward_buffer.h" +#include "editor/widget_editor.h" + +namespace yake +{ +using namespace gui; + +button_base * get_fire_button(); +multi_line_edit_box_base * get_cout_box(); + +void forward_cout_here(const std::string & data); +void forward_cout_here_lua(const std::string & data); + +struct forward_cout +{ + forward_cout() + : m_forward_buf(&forward_cout_here), + m_temp_cout(*std::cout.rdbuf()) + { + // forward cout + std::cout.rdbuf(&m_forward_buf); + } + + ~forward_cout() + { + // reset cout + std::cout.rdbuf(&m_temp_cout); + } + + forward_buf m_forward_buf; + std::streambuf & m_temp_cout; +}; + +struct test_entity +{ + test_entity() {} + virtual ~test_entity() {}; + + CLASS(test_entity, reflection::NullClass); + EVENT(public, birth, (const std::string &)); +}; + +struct pawn : public reflection::Registered, public test_entity +{ + pawn() {} + pawn(const char * name) : reflection::Registered(name) {} + + CLASS(pawn, reflection::Registered); + + METHOD(public, void, on_birth, (const std::string & cry)) + { std::cout << ".on_birth( \"" << cry << "\" )" << std::endl; } + + METHOD(public, void, on_close, (const bool funky)) + { std::cout << ".on_close( " << ( funky ? "true" : "false" ) << " )" << std::endl; } + + METHOD(public, void, on_click, (const int funky)) + { std::cout << ".on_click( " << funky << " )" << std::endl; } + + METHOD(public, void, on_clicked, (const control_base & widget)) + { std::cout << getName() << ".on_clicked( " << widget.getImpl().getName().c_str() << " ): C++ here I am!" << std::endl; } +}; + +static bool handle_error_box(const CEGUI::EventArgs & e); +static void do_error_box(const char * text); + +class gui_test +{ +public: + gui_test(); + + bool on_clicked(const gui::control_base & widget); + + void handle_soft_wire(const gui::control_base & widget); + void handle_quit(const gui::control_base & widget); + void handle_events_window(const gui::control_base & widget); + void handle_codegen_window(const gui::control_base & widget); + void handle_editor_window(const gui::control_base & widget); + void handle_console_window(const gui::control_base & widget); + void handle_playground_window(const gui::control_base & widget); + + void handle_events_run_lua(const gui::control_base & widget); + void handle_playground_run_lua(const gui::control_base & widget); + +private: + forward_cout m_forward_cout; + + default_window m_win_menu; + default_window m_win_console; + default_window m_win_events; + default_window m_win_codegen; + default_window m_win_editor; + default_window m_win_editable; + default_window m_win_playground; + + multi_line_edit_box_base * m_events_win_lua_code_widget; + multi_line_edit_box_base * m_playground_win_lua_code_widget; + + pawn m_pawn; + boost::shared_ptr<widget_editor> m_editor; +}; + +} // namespace yake + +#endif // _GUI_TEST_H_ Copied: trunk/yake/samples/misc/cmdrmayhem/yakePCH.h (from rev 1522, trunk/yake/yapp/samples/misc/cmdrmayhem/yakePCH.h) =================================================================== --- trunk/yake/samples/misc/cmdrmayhem/yakePCH.h (rev 0) +++ trunk/yake/samples/misc/cmdrmayhem/yakePCH.h 2006-12-07 20:39:41 UTC (rev 1528) @@ -0,0 +1,10 @@ +//============================================================================ +// IMPLEMENTATION HEADERS +//============================================================================ +// STL +#include <iostream> +// Yake +#include <yake/base/yake.h> +#include <yake/scripting/yakeScriptingSystem.h> +#include <yapp/base/yapp.h> +#include <yake/ent/ent.h> Copied: trunk/yake/samples/misc/scripted/yakePCH.h (from rev 1522, trunk/yake/yapp/samples/misc/scripted/yakePCH.h) =================================================================== --- trunk/yake/samples/misc/scripted/yakePCH.h (rev 0) +++ trunk/yake/samples/misc/scripted/yakePCH.h 2006-12-07 20:39:41 UTC (rev 1528) @@ -0,0 +1,14 @@ +//============================================================================ +// IMPLEMENTATION HEADERS +//============================================================================ +// STL +#include <iostream> +// Yake +#include <yake/base/yake.h> +#include <yake/scripting/yakeScriptingSystem.h> +#include <yake/graphics/yakeGraphicsSystem.h> +#include <yake/data/yakeData.h> +#include <yake/samples/common/yakeExampleApplication.h> +// Yapp +#include <yapp/base/yapp.h> +#include <yapp/base/event/yakeEvent.h> Copied: trunk/yake/samples/misc/vehicle/yakePCH.h (from rev 1522, trunk/yake/yapp/samples/misc/vehicle/yakePCH.h) =================================================================== --- trunk/yake/samples/misc/vehicle/yakePCH.h (rev 0) +++ trunk/yake/samples/misc/vehicle/yakePCH.h 2006-12-07 20:39:41 UTC (rev 1528) @@ -0,0 +1,9 @@ +//============================================================================ +// IMPLEMENTATION HEADERS +//============================================================================ +// STL +#include <iostream> +// Yake +#include <yake/base/yake.h> +#include <yake/scripting/yakeScriptingSystem.h> +#include <yapp/base/yapp.h> Copied: trunk/yake/samples/model/yakePCH.h (from rev 1522, trunk/yake/yapp/samples/model/yakePCH.h) =================================================================== --- trunk/yake/samples/model/yakePCH.h (rev 0) +++ trunk/yake/samples/model/yakePCH.h 2006-12-07 20:39:41 UTC (rev 1528) @@ -0,0 +1,40 @@ +/* + ------------------------------------------------------------------------------------ + This file is part of YAKE + Copyright \xA9 2004 The YAKE Team + For the latest information visit http://www.yake.org + ------------------------------------------------------------------------------------ + 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. + ------------------------------------------------------------------------------------ + If you are interested in another license model contact the Yake Team via + E-Mail: te...@ya.... + For more information see the LICENSE file in the root directory of the + source code distribution. + ------------------------------------------------------------------------------------ +*/ +//============================================================================ +// IMPLEMENTATION HEADERS +//============================================================================ +// STL +#include <iostream> +// Yake +#include <yake/base/yake.h> +#include <yake/base/yakeDebugOutputStream.h> +#include <yake/base/yakeLog.h> +#include <yake/base/yakeLibrary.h> +#include <yake/physics/yakePhysics.h> + +#include <yake/samples/common/yakeExampleApplication.h> +#include <yake/data/yakeData.h> Copied: trunk/yake/samples/raf/demo1/yakePCH.h (from rev 1522, trunk/yake/yapp/samples/raf/demo1/yakePCH.h) =================================================================== --- trunk/yake/samples/raf/demo1/yakePCH.h (rev 0) +++ trunk/yake/samples/raf/demo1/yakePCH.h 2006-12-07 20:39:41 UTC (rev 1528) @@ -0,0 +1,9 @@ +//============================================================================ +// IMPLEMENTATION HEADERS +//============================================================================ +// STL +#include <iostream> +// Yake +#include <yake/base/yake.h> +#include <yake/scripting/yakeScriptingSystem.h> +#include <yapp/base/yapp.h> Copied: trunk/yake/samples/raf/minimal/yakePCH.h (from rev 1522, trunk/yake/yapp/samples/raf/minimal/yakePCH.h) =================================================================== --- trunk/yake/samples/raf/minimal/yakePCH.h (rev 0) +++ trunk/yake/samples/raf/minimal/yakePCH.h 2006-12-07 20:39:41 UTC (rev 1528) @@ -0,0 +1,9 @@ +//============================================================================ +// IMPLEMENTATION HEADERS +//============================================================================ +// STL +#include <iostream> +// Yake +#include <yake/base/yake.h> +#include <yake/scripting/yakeScriptingSystem.h> +#include <yapp/base/yapp.h> Deleted: trunk/yake/yapp/samples/GUI/basics/CEGUIOgre_TestDriver1_REPLACE.h =================================================================== --- trunk/yake/yapp/samples/GUI/basics/CEGUIOgre_TestDriver1_REPLACE.h 2006-12-07 20:34:59 UTC (rev 1527) +++ trunk/yake/yapp/samples/GUI/basics/CEGUIOgre_TestDriver1_REPLACE.h 2006-12-07 20:39:41 UTC (rev 1528) @@ -1,173 +0,0 @@ -#ifndef _CEGUIOgre_TestDriver1_h_ -#define _CEGUIOgre_TestDriver1_h_ - -#include <boost/shared_ptr.hpp> - -#include "CEGUI.h" -#include "renderers/OgreGUIRenderer/ogrerenderer.h" -#include "ExampleApplication.h" -#include "OgreEventQueue.h" - -#include "gui_test.h" - -class CEGUIOgre_FrameListener : public ExampleFrameListener, Ogre::MouseMotionListener, Ogre::MouseListener -{ -public: - CEGUIOgre_FrameListener(RenderWindow* win, Camera* cam) : ExampleFrameListener(win, cam) - { - mEventProcessor = new EventProcessor(); - mEventProcessor->initialise(win); - mEventProcessor->startProcessingEvents(); - mEventProcessor->addKeyListener(this); - mEventProcessor->addMouseMotionListener(this); - mEventProcessor->addMouseListener(this); - mInputDevice = mEventProcessor->getInputReader(); - - mQuit = false; - mSkipCount = 0; - mUpdateFreq = 0; - } - - - virtual void mouseMoved (MouseEvent *e) - { - CEGUI::Renderer* rend = CEGUI::System::getSingleton().getRenderer(); - CEGUI::System::getSingleton().injectMouseMove(e->getRelX() * rend->getWidth(), e->getRelY() * rend->getHeight()); - e->consume(); - } - - - virtual void mouseDragged (MouseEvent *e) - { - mouseMoved(e); - } - - - virtual void keyPressed (KeyEvent *e) - { - // give 'quitting' priority - if (e->getKey() == KC_ESCAPE) - { - mQuit = true; - e->consume(); - return; - } - - // do event injection - CEGUI::System& cegui = CEGUI::System::getSingleton(); - - // key down - cegui.injectKeyDown(e->getKey()); - - // now character - cegui.injectChar(e->getKeyChar()); - - e->consume(); - } - - - virtual void keyReleased (KeyEvent *e) - { - CEGUI::System::getSingleton().injectKeyUp(e->getKey()); - } - - - - virtual void mousePressed (MouseEvent *e) - { - CEGUI::System::getSingleton().injectMouseButtonDown(convertOgreButtonToCegui(e->getButtonID())); - e->consume(); - } - - - virtual void mouseReleased (MouseEvent *e) - { - CEGUI::System::getSingleton().injectMouseButtonUp(convertOgreButtonToCegui(e->getButtonID())); - e->consume(); - } - - // do-nothing events - virtual void keyClicked (KeyEvent *e) {} - virtual void mouseClicked (MouseEvent *e) {} - virtual void mouseEntered (MouseEvent *e) {} - virtual void mouseExited (MouseEvent *e) {} - - - bool frameStarted(const FrameEvent& evt); - -protected: - CEGUI::MouseButton convertOgreButtonToCegui(int ogre_button_id) - { - switch (ogre_button_id) - { - case MouseEvent::BUTTON0_MASK: - return CEGUI::LeftButton; - break; - - case MouseEvent::BUTTON1_MASK: - return CEGUI::RightButton; - break; - - case MouseEvent::BUTTON2_MASK: - return CEGUI::MiddleButton; - break; - - case MouseEvent::BUTTON3_MASK: - return CEGUI::X1Button; - break; - - default: - return CEGUI::LeftButton; - break; - } - - } - -protected: - float mSkipCount; - float mUpdateFreq; - - bool mQuit; -}; - -class CEGUIOgre_TestDriver1 : public ExampleApplication -{ -public: - CEGUIOgre_TestDriver1(void) - : mGUIRenderer(NULL) - {} - - virtual bool configure() - { - if(mRoot->restoreConfig()) - { - mWindow = mRoot->initialise(true); - return true; - } - else - { - return false; - } - } - - virtual void cleanup(void); - -protected: - /************************************************************************* - Methods - *************************************************************************/ - virtual void createScene(void); - virtual void createFrameListener(void); - - // new demo methods - void createDemoWindows(void); - - /************************************************************************* - Data - *************************************************************************/ - CEGUI::OgreRenderer * mGUIRenderer; - boost::shared_ptr<yake::gui_test> m_gui_test; -}; - - -#endif // end of guard _CEGUIOgre_TestDriver1_h_ Deleted: trunk/yake/yapp/samples/GUI/basics/forward_buffer.h =================================================================== --- trunk/yake/yapp/samples/GUI/basics/forward_buffer.h 2006-12-07 20:34:59 UTC (rev 1527) +++ trunk/yake/yapp/samples/GUI/basics/forward_buffer.h 2006-12-07 20:39:41 UTC (rev 1528) @@ -1,34 +0,0 @@ -#ifndef _FORWARD_BUFFER_H_ -#define _FORWARD_BUFFER_H_ - -// todo: what is causing this mess? -#ifdef realloc -# undef realloc -#endif - -#include <iostream> -#include <string> -#include <boost/io/stream_facade.hpp> -#include <boost/io/categories.hpp> -#include <boost/function.hpp> - - -struct forward_sink -{ - typedef char char_type; - typedef boost::io::sink_tag category; - typedef boost::function<void (const std::string &)> forward_fnc; - - forward_sink(forward_fnc fnc) : m_forward_fnc( fnc ) - {} - - void write(const char * s, std::streamsize n) - { m_forward_fnc(std::string(s, n)); } - -private: - forward_fnc m_forward_fnc; -}; - -typedef boost::io::streambuf_facade<forward_sink> forward_buf; - -#endif // _FORWARD_BUFFER_H_ Deleted: trunk/yake/yapp/samples/GUI/basics/gui_test.h =================================================================== --- trunk/yake/yapp/samples/GUI/basics/gui_test.h 2006-12-07 20:34:59 UTC (rev 1527) +++ trunk/yake/yapp/samples/GUI/basics/gui_test.h 2006-12-07 20:39:41 UTC (rev 1528) @@ -1,117 +0,0 @@ -#ifndef _GUI_TEST_H_ -#define _GUI_TEST_H_ - -#include <string> - -#include <reflection.h> -#include <bind_lua/bind_lua.h> -#undef free // todo: find conflict with tnl and move to bind_network.h -//#include <bind_network/bind_network.h> // todo: remove - -#include <Ogre.h> - -#include "default_window.h" -#include "forward_buffer.h" -#include "editor/widget_editor.h" - -namespace yake -{ -using namespace gui; - -button_base * get_fire_button(); -multi_line_edit_box_base * get_cout_box(); - -void forward_cout_here(const std::string & data); -void forward_cout_here_lua(const std::string & data); - -struct forward_cout -{ - forward_cout() - : m_forward_buf(&forward_cout_here), - m_temp_cout(*std::cout.rdbuf()) - { - // forward cout - std::cout.rdbuf(&m_forward_buf); - } - - ~forward_cout() - { - // reset cout - std::cout.rdbuf(&m_temp_cout); - } - - forward_buf m_forward_buf; - std::streambuf & m_temp_cout; -}; - -struct test_entity -{ - test_entity() {} - virtual ~test_entity() {}; - - CLASS(test_entity, reflection::NullClass); - EVENT(public, birth, (const std::string &)); -}; - -struct pawn : public reflection::Registered, public test_entity -{ - pawn() {} - pawn(const char * name) : reflection::Registered(name) {} - - CLASS(pawn, reflection::Registered); - - METHOD(public, void, on_birth, (const std::string & cry)) - { std::cout << ".on_birth( \"" << cry << "\" )" << std::endl; } - - METHOD(public, void, on_close, (const bool funky)) - { std::cout << ".on_close( " << ( funky ? "true" : "false" ) << " )" << std::endl; } - - METHOD(public, void, on_click, (const int funky)) - { std::cout << ".on_click( " << funky << " )" << std::endl; } - - METHOD(public, void, on_clicked, (const control_base & widget)) - { std::cout << getName() << ".on_clicked( " << widget.getImpl().getName().c_str() << " ): C++ here I am!" << std::endl; } -}; - -static bool handle_error_box(const CEGUI::EventArgs & e); -static void do_error_box(const char * text); - -class gui_test -{ -public: - gui_test(); - - bool on_clicked(const gui::control_base & widget); - - void handle_soft_wire(const gui::control_base & widget); - void handle_quit(const gui::control_base & widget); - void handle_events_window(const gui::control_base & widget); - void handle_codegen_window(const gui::control_base & widget); - void handle_editor_window(const gui::control_base & widget); - void handle_console_window(const gui::control_base & widget); - void handle_playground_window(const gui::control_base & widget); - - void handle_events_run_lua(const gui::control_base & widget); - void handle_playground_run_lua(const gui::control_base & widget); - -private: - forward_cout m_forward_cout; - - default_window m_win_menu; - default_window m_win_console; - default_window m_win_events; - default_window m_win_codegen; - default_window m_win_editor; - default_window m_win_editable; - default_window m_win_playground; - - multi_line_edit_box_base * m_events_win_lua_code_widget; - multi_line_edit_box_base * m_playground_win_lua_code_widget; - - pawn m_pawn; - boost::shared_ptr<widget_editor> m_editor; -}; - -} // namespace yake - -#endif // _GUI_TEST_H_ Deleted: trunk/yake/yapp/samples/base/events/yakePCH.h =================================================================== --- trunk/yake/yapp/samples/base/events/yakePCH.h 2006-12-07 20:34:59 UTC (rev 1527) +++ trunk/yake/yapp/samples/base/events/yakePCH.h 2006-12-07 20:39:41 UTC (rev 1528) @@ -1,15 +0,0 @@ -//============================================================================ -// IMPLEMENTATION HEADERS -//============================================================================ -// STL -#include <iostream> -// Yake -#include <yake/base/yake.h> -#include <yake/base/yakeDebugOutputStream.h> -#include <yake/base/yakeLog.h> -#include <yake/base/yakeLibrary.h> -#include <yake/scripting/yakeScriptingSystem.h> -#include <yake/graphics/yakeGraphicsSystem.h> - -#include <yake/samples/common/yakeExampleApplication.h> -#include <yake/data/yakeData.h> Deleted: trunk/yake/yapp/samples/base/ved/yakeDemoApp.h =================================================================== --- trunk/yake/yapp/samples/base/ved/yakeDemoApp.h 2006-12-07 20:34:59 UTC (rev 1527) +++ trunk/yake/yapp/samples/base/ved/yakeDemoApp.h 2006-12-07 20:39:41 UTC (rev 1528) @@ -1,238 +0,0 @@ -#ifndef YAPP_DEMO_VED_H -#define YAPP_DEMO_VED_H -#include <yapp/samples/common/yakeHelper.h> -#include <yapp/common/yakeCEGUIRendererAdapter.h> - -using namespace yake; -using namespace yake::base::templates; -using namespace yake::base::math; -using namespace yake::graphics; -using namespace yake::data; - -using namespace yapp; -using namespace yake::app; - -namespace yake { - class RoadCreator; - class TrailCreator; -} -class TheApp : public yake::exapp::ExampleApplication -{ -//private: -public: - yake::ceguiadapter::RendererAdapterPlugin* mAdapterPlugin; - CameraFollowController* mpCfc; - - task::TaskManager mTaskMgr; - // task: render - class RenderTask : public task::DefTask - { - private: - IGraphicalWorld* mWorld; - public: - RenderTask( IGraphicalWorld* pWorld ); - virtual void execute(real timeElapsed); - - typedef Signal1< void(real) > PreSignal; - void subscribeToPre( const PreSignal::slot_type & slot ) - { mPreSig.connect( slot ); } - private: - PreSignal mPreSig; - }; - RenderTask* mRenderTask; - - // task: physics - class PhysicsTask : public task::DefTask - { - private: - physics::IWorld* mWorld; - public: - PhysicsTask( physics::IWorld* pWorld ); - virtual void execute(real timeElapsed); - - typedef Signal0< void > VoidSignal; - void subscribeToPre( const VoidSignal::slot_type & slot ) - { mPreSignal.connect( slot ); } - void subscribeToPost( const VoidSignal::slot_type & slot ) - { mPostSignal.connect( slot ); } - private: - VoidSignal mPreSignal; - VoidSignal mPostSignal; - }; - PhysicsTask* mPhysicsTask; - - // task: vehicle sim - class VehicleSimTask : public task::DefTask - { - private: - model::complex::vehicle::LandVehicle* mCar; - public: - VehicleSimTask( model::complex::vehicle::LandVehicle* theCar ); - virtual void execute(real timeElapsed); - }; - VehicleSimTask* mVehicleSimTask; - - // task: input - class InputTask : public task::DefTask - { - private: - TheApp* mApp; - model::complex::vehicle::LandVehicle* mCar; - - public: - InputTask( TheApp* theApp, model::complex::vehicle::LandVehicle* theCar ); - virtual void execute(real timeElapsed); - }; - InputTask* mInputTask; - - Vector<std::pair<IViewport*,ICamera*> > mVPs; - SharedPtr< IGraphicalWorld > mGWorld; - physics::IWorld* mPWorld; - audio::IWorld* mpAWorld; - - physics::IComplexObject* dbgChassis; - - audio::IListener* mpAListener; - audio::ISource* mpASource; - audio::ISoundData* mpAData; - - graphics::ISceneNode* mLightOneNode; - graphics::IParticleSystem* mSmoke; - - struct SimpleOne { - graphics::ISceneNode* pSN; - graphics::IEntity* pE; - physics::IComplexObject* pCO; - model::MovableUpdateController* updCtrl; - }; - SimpleOne mGround; - model::complex::Model* mCarModel; - model::complex::vehicle::LandVehicle* mCar; - SimpleOne mBall; - - RoadCreator* mRoadCreator; - TrailCreator* mSkidCreator; - - real mCurrentSimTime; -public: - TheApp() : ExampleApplication( true /*graphics*/, - true /*physics*/, - false /*scripting*/, - true /*input*/, - false /*script bindings*/, - false /*audio*/), - mCarModel(0), - mCar(0), - mpAWorld(0), - mpASource(0), - mpAListener(0), - mpAData(0), - mLightOneNode(0), - mRenderTask(0), - mPhysicsTask(0), - mInputTask(0), - mVehicleSimTask(0), - mAdapterPlugin(0), - mRoadCreator(0), - mSkidCreator(0), - mCurrentSimTime(0), - mpCfc(0) - { - } - - InputTask* getInputTask() const - { - return mInputTask; - } - RenderTask* getRenderTask() const - { - return mRenderTask; - } - PhysicsTask* getPhysicsTask() const - { - return mPhysicsTask; - } - - real getSimulationTime() - { - return mCurrentSimTime; - } - - void preRender( real timeElapsed ); - - void handleInput( real timeElapsed ); - - void onKey(const yake::input::KeyboardEvent & e) - { - if (e.keyCode == input::KC_ESCAPE) - requestShutdown(); - } - void onMBUp(uint8 btn) - { - CEGUI::System::getSingleton().injectMouseButtonUp( CEGUI::LeftButton ); - } - void onMBDown(uint8 btn) - { - CEGUI::System::getSingleton().injectMouseButtonDown( CEGUI::LeftButton ); - } - void onMouseMoved( const Vector3 & position ) - { - real scale = 1; - static Vector3 lastPosition = position; - Vector3 diff = position - lastPosition; - lastPosition = position; - - CEGUI::System::getSingleton().injectMouseMove(diff.x*scale, diff.y*scale); - //CEGUI::Renderer* rend = CEGUI::System::getSingleton().getRenderer(); - //CEGUI::System::getSingleton().injectMouseMove(e->getRelX() * rend->getWidth(), e->getRelY() * rend->getHeight()); - } - - int createCameraViewportPair( real sx, real sy, real w, real h, int z ); - void setupDotScene(); - void setupGround(); - void setupAudio(); - void cleanUpAudio(); - - void setupBall(); - void cleanUpBall(); - - void createWheel( - model::complex::vehicle::Wheel *& pWheel, - physics::IComplexObject *& pCO, - SharedPtr<physics::IJoint> & pJ, - physics::IComplexObject* pCOChassis, - const real radius, - const Vector3 & position, - const Quaternion & orientation, - const Vector3 & anchorPt, - const Vector3 & hingeSteeringAxis, - const Vector3 & hingeSuspensionAxis, - const real suspSpring, - const real suspDamping, - const real wheelMass ); - model::complex::vehicle::Wheel* createWheel( - const Vector3 & position, - const Quaternion & orientation, - physics::IComplexObject* pCOChassis, - SharedPtr<model::Physical> & pPhysical, - const real radius, - const real suspSpring, - const real suspDamping, - const real wheelMass, - Vector<graphics::ISceneNode*> & nodeList, - SharedMUCList & mucList, - const String & wheelMesh = "wheel1.mesh"); - void setupCar(); - void setupLights(); - void setupGui(); - void cleanUpGui(); - void createGuiWindows(); - - void setupRoad(); - void cleanUpRoad(); - - virtual void run(); -}; - - -#endif \ No newline at end of file Deleted: trunk/yake/yapp/samples/base/ved/yakePCH.h =================================================================== --- trunk/yake/yapp/samples/base/ved/yakePCH.h 2006-12-07 20:34:59 UTC (rev 1527) +++ trunk/yake/yapp/samples/base/ved/yakePCH.h 2006-12-07 20:39:41 UTC (rev 1528) @@ -1,18 +0,0 @@ -//============================================================================ -// IMPLEMENTATION HEADERS -//============================================================================ -// STL -#include <iostream> -// Yake -#include <yake/base/yake.h> -#include <yake/base/yakeDebugOutputStream.h> -#include <yake/base/yakeLog.h> -#include <yake/base/yakeLibrary.h> -#include <yake/scripting/yakeScriptingSystem.h> -#include <yake/graphics/yakeGraphicsSystem.h> - -#include <yake/samples/common/yakeExampleApplication.h> -#include <yake/data/yakeData.h> - -#include <yapp/base/yapp.h> -#include "CEGUI.h" Deleted: trunk/yake/yapp/samples/graphics/scripted/yakePCH.h =================================================================== --- trunk/yake/yapp/samples/graphics/scripted/yakePCH.h 2006-12-07 20:34:59 UTC (rev 1527) +++ trunk/yake/yapp/samples/graphics/scripted/yakePCH.h 2006-12-07 20:39:41 UTC (rev 1528) @@ -1,13 +0,0 @@ -//============================================================================ -// IMPLEMENTATION HEADERS -//============================================================================ -// STL -#include <iostream> -// Yake -#include <yake/base/yake.h> -#include <yake/scripting/yakeScriptingSystem.h> -#include <yake/graphics/yakeGraphicsSystem.h> -#include <yake/data/yakeData.h> -#include <yapp/base/yapp.h> - -#include <yake/samples/common/yakeExampleApplication.h> Deleted: trunk/yake/yapp/samples/misc/cmdrmayhem/yakePCH.h =================================================================== --- trunk/yake/yapp/samples/misc/cmdrmayhem/yakePCH.h 2006-12-07 20:34:59 UTC (rev 1527) +++ trunk/yake/yapp/samples/misc/cmdrmayhem/yakePCH.h 2006-12-07 20:39:41 UTC (rev 1528) @@ -1,10 +0,0 @@ -//============================================================================ -// IMPLEMENTATION HEADERS -//============================================================================ -// STL -#include <iostream> -// Yake -#include <yake/base/yake.h> -#include <yake/scripting/yakeScriptingSystem.h> -#include <yapp/base/yapp.h> -#include <yake/ent/ent.h> Deleted: trunk/yake/yapp/samples/misc/scripted/yakePCH.h =================================================================== --- trunk/yake/yapp/samples/misc/scripted/yakePCH.h 2006-12-07 20:34:59 UTC (rev 1527) +++ trunk/yake/yapp/samples/misc/scripted/yakePCH.h 2006-12-07 20:39:41 UTC (rev 1528) @@ -1,14 +0,0 @@ -//============================================================================ -// IMPLEMENTATION HEADERS -//============================================================================ -// STL -#include <iostream> -// Yake -#include <yake/base/yake.h> -#include <yake/scripting/yakeScriptingSystem.h> -#include <yake/graphics/yakeGraphicsSystem.h> -#include <yake/data/yakeData.h> -#include <yake/samples/common/yakeExampleApplication.h> -// Yapp -#include <yapp/base/yapp.h> -#include <yapp/base/event/yakeEvent.h> Deleted: trunk/yake/yapp/samples/misc/vehicle/yakePCH.h =================================================================== --- trunk/yake/yapp/samples/misc/vehicle/yakePCH.h 2006-12-07 20:34:59 UTC (rev 1527) +++ trunk/yake/yapp/samples/misc/vehicle/yakePCH.h 2006-12-07 20:39:41 UTC (rev 1528) @@ -1,9 +0,0 @@ -//============================================================================ -// IMPLEMENTATION HEADERS -//============================================================================ -// STL -#include <iostream> -// Yake -#include <yake/base/yake.h> -#include <yake/scripting/yakeScriptingSystem.h> -#include <yapp/base/yapp.h> Deleted: trunk/yake/yapp/samples/model/yakePCH.h =================================================================== --- trunk/yake/yapp/samples/model/yakePCH.h 2006-12-07 20:34:59 UTC (rev 1527) +++ trunk/yake/yapp/samples/model/yakePCH.h 2006-12-07 20:39:41 UTC (rev 1528) @@ -1,40 +0,0 @@ -/* - ------------------------------------------------------------------------------------ - This file is part of YAKE - Copyright \xA9 2004 The YAKE Team - For the latest information visit http://www.yake.org - ------------------------------------------------------------------------------------ - 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. - ------------------------------------------------------------------------------------ - If you are interested in another license model contact the Yake Team via - E-Mail: te...@ya.... - For more information see the LICENSE file in the root directory of the - source code distribution. - ------------------------------------------------------------------------------------ -*/ -//============================================================================ -// IMPLEMENTATION HEADERS -//============================================================================ -// STL -#include <iostream> -// Yake -#include <yake/base/yake.h> -#include <yake/base/yakeDebugOutputStream.h> -#include <yake/base/yakeLog.h> -#include <yake/base/yakeLibrary.h> -#include <yake/physics/yakePhysics.h> - -#include <yake/samples/common/yakeExampleApplication.h> -#include <yake/data/yakeData.h> Deleted: trunk/yake/yapp/samples/raf/demo1/yakePCH.h =================================================================== --- trunk/yake/yapp/samples/raf/demo1/yakePCH.h 2006-12-07 20:34:59 UTC (rev 1527) +++ trunk/yake/yapp/samples/raf/demo1/yakePCH.h 2006-12-07 20:39:41 UTC (rev 1528) @@ -1,9 +0,0 @@ -//============================================================================ -// IMPLEMENTATION HEADERS -//============================================================================ -// STL -#include <iostream> -// Yake -#include <yake/base/yake.h> -#include <yake/scripting/yakeScriptingSystem.h> -#include <yapp/base/yapp.h> Deleted: trunk/yake/yapp/samples/raf/minimal/yakePCH.h =================================================================== --- trunk/yake/yapp/samples/raf/minimal/yakePCH.h 2006-12-07 20:34:59 UTC (rev 1527) +++ trunk/yake/yapp/samples/raf/minimal/yakePCH.h 2006-12-07 20:39:41 UTC (rev 1528) @@ -1,9 +0,0 @@ -//============================================================================ -// IMPLEMENTATION HEADERS -//============================================================================ -// STL -#include <iostream> -// Yake -#include <yake/base/yake.h> -#include <yake/scripting/yakeScriptingSystem.h> -#include <yapp/base/yapp.h> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |