From: <sv...@ww...> - 2004-12-31 23:58:21
|
Author: delta Date: 2004-12-31 15:58:11 -0800 (Fri, 31 Dec 2004) New Revision: 1429 Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/m2k/fm.xml trunk/CSP/CSPSim/Source/AircraftPhysicsModel.cpp trunk/CSP/CSPSim/Source/Console.cpp trunk/CSP/CSPSim/Source/ConsoleCommands.cpp trunk/CSP/CSPSim/Source/ObjectModel.cpp trunk/CSP/CSPSim/Source/ScreenInfo.cpp trunk/CSP/CSPSim/Source/ScreenInfoManager.cpp trunk/CSP/CSPSim/Source/SmokeEffects.cpp trunk/CSP/CSPSim/VisualStudio/CSPSimDLL/CSPSimDLL.vcproj Log: * Linked the release vesrion against pthreadVC1.lib. * Removed 0SG096 tag in the source files. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1429 Modified: trunk/CSP/CSPSim/CHANGES.current =================================================================== --- trunk/CSP/CSPSim/CHANGES.current 2004-12-31 23:53:37 UTC (rev 1428) +++ trunk/CSP/CSPSim/CHANGES.current 2004-12-31 23:58:11 UTC (rev 1429) @@ -1,6 +1,11 @@ Version 0.4.0 (in progress) =========================== +2004-12-26: delta + * Linked the release vesrion against pthreadVC1.lib. + + * Removed 0SG096 tag in the source files. + 2004-12-22: onsight * Rename new .3DS models to .3ds to match the XML path. Modified: trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/m2k/fm.xml =================================================================== --- trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/m2k/fm.xml 2004-12-31 23:53:37 UTC (rev 1428) +++ trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/m2k/fm.xml 2004-12-31 23:58:11 UTC (rev 1429) @@ -84,7 +84,7 @@ <!--Float name="cl_dh">0.62</Float--> <!-- Pitch Moment Parameters --> - <Float name="cm0">0.0001</Float> + <Float name="cm0">-0.001</Float> <Float name="cm_a">-1.33</Float> <Float name="cm_adot">-3.61</Float> <Float name="cm_q">-53</Float><!-- <0 --> Modified: trunk/CSP/CSPSim/Source/AircraftPhysicsModel.cpp =================================================================== --- trunk/CSP/CSPSim/Source/AircraftPhysicsModel.cpp 2004-12-31 23:53:37 UTC (rev 1428) +++ trunk/CSP/CSPSim/Source/AircraftPhysicsModel.cpp 2004-12-31 23:58:11 UTC (rev 1429) @@ -112,8 +112,8 @@ void AircraftPhysicsModel::doSimStep(double dt) { if (dt == 0.0) dt = 0.017; - //unsigned short n = std::min<unsigned short>(6,static_cast<unsigned short>(180 * dt)) + 1; - unsigned short n = 15*std::min<unsigned short>(1,static_cast<unsigned short>(210*dt)) + 1; + unsigned short n = std::min<unsigned short>(6,static_cast<unsigned short>(180 * dt)) + 1; + //unsigned short n = 15*std::min<unsigned short>(1,static_cast<unsigned short>(210*dt)) + 1; double dtlocal = dt/n; std::for_each(m_Dynamics.begin(),m_Dynamics.end(),InitializeSimulationStep(dtlocal)); Modified: trunk/CSP/CSPSim/Source/Console.cpp =================================================================== --- trunk/CSP/CSPSim/Source/Console.cpp 2004-12-31 23:53:37 UTC (rev 1428) +++ trunk/CSP/CSPSim/Source/Console.cpp 2004-12-31 23:58:11 UTC (rev 1429) @@ -109,11 +109,7 @@ void Console::_setFont(osg::ref_ptr<osgText::Text> &text, std::string const &font, int size) { text->setFont(font); -#ifdef OSG096 - text->setFontSize(size, size); -#else text->setFontResolution(size, size); -#endif // OSG096 text->setCharacterSize(size, 1.0); text->setColor(osg::Vec4(1, 1, 1, 1)); text->setAlignment(osgText::Text::LEFT_TOP); Modified: trunk/CSP/CSPSim/Source/ConsoleCommands.cpp =================================================================== --- trunk/CSP/CSPSim/Source/ConsoleCommands.cpp 2004-12-31 23:53:37 UTC (rev 1428) +++ trunk/CSP/CSPSim/Source/ConsoleCommands.cpp 2004-12-31 23:58:11 UTC (rev 1429) @@ -56,11 +56,7 @@ setMatrix(osg::Matrix::ortho2D(0, ScreenWidth, 0, ScreenHeight)); m_ModelViewAbs = new osg::MatrixTransform; -#ifdef OSG096 - m_ModelViewAbs->setReferenceFrame(osg::Transform::RELATIVE_TO_ABSOLUTE); -#else m_ModelViewAbs->setReferenceFrame(osg::Transform::ABSOLUTE_RF); -#endif // OSG096 m_ModelViewAbs->setMatrix(osg::Matrix::identity()); addChild(m_ModelViewAbs.get()); Modified: trunk/CSP/CSPSim/Source/ObjectModel.cpp =================================================================== --- trunk/CSP/CSPSim/Source/ObjectModel.cpp 2004-12-31 23:53:37 UTC (rev 1428) +++ trunk/CSP/CSPSim/Source/ObjectModel.cpp 2004-12-31 23:58:11 UTC (rev 1429) @@ -35,11 +35,7 @@ #include <osgDB/ReadFile> #include <osgFX/SpecularHighlights> #include <osgUtil/SmoothingVisitor> -#ifdef OSG096 -#include <osgUtil/DisplayListVisitor> -#else #include <osgUtil/GLObjectsVisitor> -#endif #include <osgUtil/Optimizer> #include <osg/CullFace> #include <osg/NodeVisitor> @@ -197,12 +193,8 @@ osg::StateSet::TextureAttributeList& attr = set->getTextureAttributeList(); osg::StateSet::TextureAttributeList::iterator i; for (i = attr.begin(); i != attr.end(); i++) { -#ifdef OSG096 - osg::StateSet::AttributeList::iterator tex = i->find(osg::StateAttribute::TEXTURE); -#else // TODO don't we need to consider other members within the TEXTURE group? osg::StateSet::AttributeList::iterator tex = i->find(osg::StateAttribute::TypeMemberPair(osg::StateAttribute::TEXTURE, 0)); -#endif // OSG096 if (tex != i->end()) { osg::Texture* texture = dynamic_cast<osg::Texture*>(tex->second.first.get()); if (texture) { @@ -424,19 +416,11 @@ osg::ref_ptr<osg::State> state = new osg::State; -#ifdef OSG096 - osgUtil::DisplayListVisitor dlv(osgUtil::DisplayListVisitor::COMPILE_DISPLAY_LISTS); - dlv.setState(state.get()); - dlv.setNodeMaskOverride(0xffffffff); - m_Model->accept(dlv); - m_DebugMarkers->accept(dlv); -#else osgUtil::GLObjectsVisitor ov; ov.setState(state.get()); ov.setNodeMaskOverride(0xffffffff); m_Model->accept(ov); m_DebugMarkers->accept(ov); -#endif // OSG096 // XXX: there is a really weird bug on vs with the optimizer: // 1) it rarely appears in the release built (never when called from this exact line) @@ -449,10 +433,10 @@ // 4) The bug only occurs when CSP is run from command line or clicking CSPSim.py; // it never occurs when running csp in debug mode from the ide. // 5) I'm unable to trace it :) - CSP_LOG(APP, DEBUG, "LoadModel: Optimizer run"); - osgUtil::Optimizer opt; - opt.optimize(m_Model.get()); - CSP_LOG(APP, DEBUG, "LoadModel: Optimizer done"); + //CSP_LOG(APP, DEBUG, "LoadModel: Optimizer run"); + //osgUtil::Optimizer opt; + //opt.optimize(m_Model.get()); + //CSP_LOG(APP, DEBUG, "LoadModel: Optimizer done"); } void ObjectModel::addContactMarkers() { @@ -559,11 +543,7 @@ m_Label = new osgText::Text(); m_Label->setFont("screeninfo.ttf"); -#ifdef OSG096 - m_Label->setFontSize(16, 16); -#else m_Label->setFontResolution(16, 16); -#endif // OSG096 m_Label->setColor(osg::Vec4(0.3f, 0.4f, 1.0f, 1.0f)); m_Label->setCharacterSize(100.0, 1.0); m_Label->setPosition(osg::Vec3(6, 0, 0)); @@ -576,11 +556,7 @@ label->getOrCreateStateSet()->setMode(GL_LIGHTING, osg::StateAttribute::OFF); //setMatrix(osg::Matrix::ortho2D(0,ScreenWidth,0,ScreenHeight)); osg::MatrixTransform *m_modelview_abs = new osg::MatrixTransform; -#ifdef OSG096 - m_modelview_abs->setReferenceFrame(osg::Transform::RELATIVE_TO_ABSOLUTE); -#else m_modelview_abs->setReferenceFrame(osg::Transform::ABSOLUTE_RF); -#endif // OSG096 m_modelview_abs->setMatrix(osg::Matrix::identity()); m_modelview_abs->addChild(label); Modified: trunk/CSP/CSPSim/Source/ScreenInfo.cpp =================================================================== --- trunk/CSP/CSPSim/Source/ScreenInfo.cpp 2004-12-31 23:53:37 UTC (rev 1428) +++ trunk/CSP/CSPSim/Source/ScreenInfo.cpp 2004-12-31 23:58:11 UTC (rev 1429) @@ -95,11 +95,7 @@ osgText::Text *ScreenInfo::makeText(float pos_x, float pos_y, std::string const &string_text) { osgText::Text *text = new osgText::Text; text->setFont(m_TTFPath); -#ifdef OSG096 - text->setFontSize(m_FontSize, m_FontSize); -#else text->setFontResolution(m_FontSize, m_FontSize); -#endif // OSG096 text->setColor(osg::Vec4(1.0f, 1.0f, 1.0f, 1.0f)); text->setCharacterSize(m_CharacterSize, 1.0); text->setPosition(osg::Vec3(pos_x, pos_y, 0)); Modified: trunk/CSP/CSPSim/Source/ScreenInfoManager.cpp =================================================================== --- trunk/CSP/CSPSim/Source/ScreenInfoManager.cpp 2004-12-31 23:53:37 UTC (rev 1428) +++ trunk/CSP/CSPSim/Source/ScreenInfoManager.cpp 2004-12-31 23:58:11 UTC (rev 1429) @@ -54,11 +54,7 @@ setMatrix(osg::Matrix::ortho2D(0,ScreenWidth,0,ScreenHeight)); m_modelview_abs = new osg::MatrixTransform; -#ifdef OSG096 - m_modelview_abs->setReferenceFrame(osg::Transform::RELATIVE_TO_ABSOLUTE); -#else m_modelview_abs->setReferenceFrame(osg::Transform::ABSOLUTE_RF); -#endif // OSG096 m_modelview_abs->setMatrix(osg::Matrix::identity()); set2dScene(m_modelview_abs,ScreenWidth,ScreenHeight); Modified: trunk/CSP/CSPSim/Source/SmokeEffects.cpp =================================================================== --- trunk/CSP/CSPSim/Source/SmokeEffects.cpp 2004-12-31 23:53:37 UTC (rev 1428) +++ trunk/CSP/CSPSim/Source/SmokeEffects.cpp 2004-12-31 23:58:11 UTC (rev 1429) @@ -140,11 +140,7 @@ P->setVelocity(simdata::toOSG(wind) + push.get_random()); place += d_place; wind += d_wind; -#ifdef OSG096 - if (getReferenceFrame() == RELATIVE_TO_PARENTS) { -#else if (getReferenceFrame() == RELATIVE_RF) { -#endif // OSG096 P->transformPositionVelocity(getLocalToWorldMatrix()); //P->transformPositionVelocity(getWorldToLocalMatrix()); } Modified: trunk/CSP/CSPSim/VisualStudio/CSPSimDLL/CSPSimDLL.vcproj =================================================================== --- trunk/CSP/CSPSim/VisualStudio/CSPSimDLL/CSPSimDLL.vcproj 2004-12-31 23:53:37 UTC (rev 1428) +++ trunk/CSP/CSPSim/VisualStudio/CSPSimDLL/CSPSimDLL.vcproj 2004-12-31 23:58:11 UTC (rev 1429) @@ -123,7 +123,7 @@ <Tool Name="VCLinkerTool" AdditionalOptions="/MACHINE:I386" - AdditionalDependencies="pthreadVC.lib SimNet.lib ws2_32.lib ccgnu2.lib osgFX.lib osgChunkLod.lib producer.lib osgText.lib DemeterVisualC6.lib opengl32.lib SDL.lib _cSimData.lib osgParticle.lib osgUtil.lib osgDB.lib osg.lib sigc-1.2.lib OpenThreadsWin32.lib ccext2.lib SpatialIndex.lib SimCore.lib" + AdditionalDependencies="pthreadVC1.lib SimNet.lib ws2_32.lib ccgnu2.lib osgFX.lib osgChunkLod.lib producer.lib osgText.lib DemeterVisualC6.lib opengl32.lib SDL.lib _cSimData.lib osgParticle.lib osgUtil.lib osgDB.lib osg.lib sigc-1.2.lib OpenThreadsWin32.lib ccext2.lib SpatialIndex.lib SimCore.lib" OutputFile="../../Bin/_cCSP.dll" LinkIncremental="1" SuppressStartupBanner="TRUE" |