You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(47) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(140) |
Feb
(98) |
Mar
(152) |
Apr
(104) |
May
(71) |
Jun
(94) |
Jul
(169) |
Aug
(83) |
Sep
(47) |
Oct
(134) |
Nov
(7) |
Dec
(20) |
2004 |
Jan
(41) |
Feb
(14) |
Mar
(42) |
Apr
(47) |
May
(68) |
Jun
(143) |
Jul
(65) |
Aug
(29) |
Sep
(40) |
Oct
(34) |
Nov
(33) |
Dec
(97) |
2005 |
Jan
(29) |
Feb
(30) |
Mar
(9) |
Apr
(37) |
May
(13) |
Jun
(31) |
Jul
(22) |
Aug
(23) |
Sep
|
Oct
(37) |
Nov
(34) |
Dec
(117) |
2006 |
Jan
(48) |
Feb
(6) |
Mar
(2) |
Apr
(71) |
May
(10) |
Jun
(16) |
Jul
(7) |
Aug
(1) |
Sep
(14) |
Oct
(17) |
Nov
(25) |
Dec
(26) |
2007 |
Jan
(8) |
Feb
(2) |
Mar
(7) |
Apr
(26) |
May
|
Jun
(12) |
Jul
(30) |
Aug
(14) |
Sep
(9) |
Oct
(4) |
Nov
(7) |
Dec
(6) |
2008 |
Jan
(10) |
Feb
(10) |
Mar
(6) |
Apr
(8) |
May
|
Jun
(10) |
Jul
(18) |
Aug
(15) |
Sep
(16) |
Oct
(5) |
Nov
(3) |
Dec
(10) |
2009 |
Jan
(11) |
Feb
(2) |
Mar
|
Apr
(15) |
May
(31) |
Jun
(18) |
Jul
(11) |
Aug
(26) |
Sep
(52) |
Oct
(17) |
Nov
(4) |
Dec
|
2010 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <sv...@ww...> - 2005-02-18 16:04:29
|
Author: lologramme Date: 2005-02-18 08:04:22 -0800 (Fri, 18 Feb 2005) New Revision: 1478 Added: trunk/CSP/CSPSim/Data/Models/Runway/Yellow.jpg Log: added runway texture Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1478 Added: trunk/CSP/CSPSim/Data/Models/Runway/Yellow.jpg =================================================================== (Binary files differ) Property changes on: trunk/CSP/CSPSim/Data/Models/Runway/Yellow.jpg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream |
From: <sv...@ww...> - 2005-02-18 15:59:44
|
Author: lologramme Date: 2005-02-18 07:58:05 -0800 (Fri, 18 Feb 2005) New Revision: 1477 Modified: trunk/CSP/CSPSim/Data/Models/Mirage2000/model.osg Log: mk2 correction Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1477 Diff omitted (2016927 bytes). |
Author: lologramme Date: 2005-02-17 13:28:30 -0800 (Thu, 17 Feb 2005) New Revision: 1476 Added: trunk/CSP/CSPSim/Data/Models/F16/ trunk/CSP/CSPSim/Data/Models/F16/DJ/ trunk/CSP/CSPSim/Data/Models/F16/DJ/F16DJ.osg trunk/CSP/CSPSim/Data/Models/F16/DJ/images/ trunk/CSP/CSPSim/Data/Models/F16/DJ/images/0f16-lak.tga trunk/CSP/CSPSim/Data/Models/F16/DJ/images/T1.tga trunk/CSP/CSPSim/Data/Models/F16/DJ/images/T2.tga trunk/CSP/CSPSim/Data/Models/F16/DJ/images/T3.tga trunk/CSP/CSPSim/Data/Models/F16/DJ/images/T4.tga trunk/CSP/CSPSim/Data/Models/F16/DJ/images/T5.tga trunk/CSP/CSPSim/Data/Models/F16/DJ/images/T6.tga trunk/CSP/CSPSim/Data/Models/F16/DJ/images/T7.tga trunk/CSP/CSPSim/Data/Models/F16/DJ/images/f16-lak.tga trunk/CSP/CSPSim/Data/Models/F16/DJ/model.xml trunk/CSP/CSPSim/Data/Models/caissons/caisson15/ trunk/CSP/CSPSim/Data/Models/caissons/caisson15/c15.jpg trunk/CSP/CSPSim/Data/Models/caissons/caisson15/caisson.jpg trunk/CSP/CSPSim/Data/Models/caissons/caisson15/caisson15.osg trunk/CSP/CSPSim/Data/Models/caissons/caisson16/ trunk/CSP/CSPSim/Data/Models/caissons/caisson16/c16.jpg trunk/CSP/CSPSim/Data/Models/caissons/caisson16/caisson.jpg trunk/CSP/CSPSim/Data/Models/caissons/caisson16/caisson16.osg trunk/CSP/CSPSim/Data/Models/caissons/caisson17/ trunk/CSP/CSPSim/Data/Models/caissons/caisson17/c17.jpg trunk/CSP/CSPSim/Data/Models/caissons/caisson17/caisson.jpg trunk/CSP/CSPSim/Data/Models/caissons/caisson17/caisson17.osg trunk/CSP/CSPSim/Data/XML/theater/balkan/caisson15.xml trunk/CSP/CSPSim/Data/XML/theater/balkan/caisson16.xml trunk/CSP/CSPSim/Data/XML/theater/balkan/caisson17.xml trunk/CSP/CSPSim/Data/XML/theater/balkan/caissons/caisson15/ trunk/CSP/CSPSim/Data/XML/theater/balkan/caissons/caisson15/model.xml trunk/CSP/CSPSim/Data/XML/theater/balkan/caissons/caisson16/ trunk/CSP/CSPSim/Data/XML/theater/balkan/caissons/caisson16/model.xml trunk/CSP/CSPSim/Data/XML/theater/balkan/caissons/caisson17/ trunk/CSP/CSPSim/Data/XML/theater/balkan/caissons/caisson17/model.xml trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/F16/ trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/F16/DJ/ trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/F16/DJ/fm.xml trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/F16/DJ/gear.xml trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/F16/DJ/model.xml trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/F16/DJ/remote.xml trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/F16/DJ/systems.xml trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/F16/DJ/thrust.xml trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/F16DJ.xml Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Data/Models/Runway/runway.3ds trunk/CSP/CSPSim/Data/XML/theater/balkan/airbase.xml Log: Added F16 D Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1476 Diff omitted (6751959 bytes). |
From: <sv...@ww...> - 2005-02-17 20:12:01
|
Author: delta Date: 2005-02-17 12:11:51 -0800 (Thu, 17 Feb 2005) New Revision: 1475 Added: trunk/CSP/CSPSim/Tools/HID/Maps/CHCS.map Modified: trunk/CSP/CSPSim/CHANGES.current Log: * Added a very basic CHCS.map under Tools/HID/Maps. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1475 Modified: trunk/CSP/CSPSim/CHANGES.current =================================================================== --- trunk/CSP/CSPSim/CHANGES.current 2005-02-16 22:59:10 UTC (rev 1474) +++ trunk/CSP/CSPSim/CHANGES.current 2005-02-17 20:11:51 UTC (rev 1475) @@ -1,6 +1,9 @@ Version 0.4.0 (in progress) =========================== +2005-02-17: delta + * Added a very basic CHCS.map under Tools/HID/Maps. + 2005-02-16: delta * Small changes in the Animation class. Fixed a bug (copy/paste typo) in DrivenRotation::Callback operator. Added: trunk/CSP/CSPSim/Tools/HID/Maps/CHCS.map =================================================================== --- trunk/CSP/CSPSim/Tools/HID/Maps/CHCS.map 2005-02-16 22:59:10 UTC (rev 1474) +++ trunk/CSP/CSPSim/Tools/HID/Maps/CHCS.map 2005-02-17 20:11:51 UTC (rev 1475) @@ -0,0 +1,60 @@ +# hid event identifier definitions for the CH product F-16 combat stick/throttle hotas. +# these values are correct for windows xp using minimal gameport driver. +# it is conceivable that value mapping is different under Linux. + +# primary buttons + +#define CH_CS:FireA 1 +#define CH_CS:FireB 2 +#define CH_CS:FireC 7 +#define CH_CS:FireD 4 + +# additional buttons + +#define CH_CS:Pinkie 6 +#define CH_CS:Launch 3 + +# thumb stick + +#define CH_CS:Mouse 5 +#define CH_CS:Mouse_Up 22 +#define CH_CS:Mouse_Right 23 +#define CH_CS:Mouse_Down 24 +#define CH_CS:Mouse_Left 25 + +# mode switch + +#define CH_CS:Mode1 8 +#define CH_CS:Mode2 9 +#define CH_CS:Mode3 10 + +# aux switch + +#define CH_CS:Aux1 11 +#define CH_CS:Aux2 12 +#define CH_CS:Aux3 13 + +# hat 2 + +define CH_CS:H2_Up 14 +define CH_CS:H2_Right 15 +define CH_CS:H2_Down 16 +define CH_CS:H2_Left 17 + +# hat 3 + +define CH_CS:H3_Up 18 +define CH_CS:H3_Right 19 +define CH_CS:H3_Down 20 +define CH_CS:H3_Left 21 + +# axes + +define CH_CS:Stick_X 0 +define CH_CS:Stick_Y 1 +define CH_CS:Rudder 3 +define CH_CS:Throttle 2 +define CH_CS:R1 2 +define CH_CS:R2 5 +define CH_CS:H1_H 6 +define CH_CS:H1_V 7 |
From: <sv...@ww...> - 2005-02-16 22:59:17
|
Author: delta Date: 2005-02-16 14:59:10 -0800 (Wed, 16 Feb 2005) New Revision: 1474 Modified: trunk/CSP/SimData/CHANGES.current trunk/CSP/SimData/Include/SimData/Enum.h trunk/CSP/SimData/Include/SimData/Ref.h trunk/CSP/SimData/Include/SimData/ScopedPointer.h trunk/CSP/SimData/VisualStudio2003/SimData.vcproj Log: * For some reasons, vs 2005 needs some template(!) classes to be exported whereas vs 2003 doesn't allow it... Back to a version which compiles with 2003. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1474 Modified: trunk/CSP/SimData/CHANGES.current =================================================================== --- trunk/CSP/SimData/CHANGES.current 2005-02-16 14:09:51 UTC (rev 1473) +++ trunk/CSP/SimData/CHANGES.current 2005-02-16 22:59:10 UTC (rev 1474) @@ -1,6 +1,11 @@ Version 0.4.0 (in progress) =========================== +2005-02-16: delta + * For some reasons, vs 2005 needs some template(!) classes to be + exported whereas vs 2003 doesn't allow it... Back to a version + which compiles with 2003. + 2005-02-14:delta * Exported more symbols to help compilation with vs 2005. Modified: trunk/CSP/SimData/Include/SimData/Enum.h =================================================================== --- trunk/CSP/SimData/Include/SimData/Enum.h 2005-02-16 14:09:51 UTC (rev 1473) +++ trunk/CSP/SimData/Include/SimData/Enum.h 2005-02-16 22:59:10 UTC (rev 1474) @@ -624,7 +624,7 @@ * @ingroup BaseTypes */ template <Enumeration const &E> -class SIMDATA_EXPORT Enum: public EnumLink { +class Enum: public EnumLink { public: Enum(std::string const &token): EnumLink(E, token) {} Enum(): EnumLink(E) {} Modified: trunk/CSP/SimData/Include/SimData/Ref.h =================================================================== --- trunk/CSP/SimData/Include/SimData/Ref.h 2005-02-16 14:09:51 UTC (rev 1473) +++ trunk/CSP/SimData/Include/SimData/Ref.h 2005-02-16 22:59:10 UTC (rev 1474) @@ -116,7 +116,7 @@ * @author Mark Rose <mr...@st...> */ template<class CLASS> -class SIMDATA_EXPORT Ref { +class Ref { public: typedef std::vector< Ref<CLASS> > vector; typedef std::list< Ref<CLASS> > list; @@ -306,7 +306,6 @@ } protected: - /** Unbind from the instance, deleting it if we are holding the only reference. */ inline void _unbind() { @@ -315,7 +314,6 @@ _reference = 0; } } - /** Rebind to a new object. Allows rebinding to base class pointers * using dynamic_cast. For assignments from the same class or child * classes this reduces to a simple (fast) static_cast. Modified: trunk/CSP/SimData/Include/SimData/ScopedPointer.h =================================================================== --- trunk/CSP/SimData/Include/SimData/ScopedPointer.h 2005-02-16 14:09:51 UTC (rev 1473) +++ trunk/CSP/SimData/Include/SimData/ScopedPointer.h 2005-02-16 22:59:10 UTC (rev 1474) @@ -44,7 +44,7 @@ * was borrowed from Boost C++. */ template <class T> -class SIMDATA_EXPORT ScopedPointer: public NonCopyable { +class ScopedPointer: public NonCopyable { T *_ptr; public: typedef T Type; Modified: trunk/CSP/SimData/VisualStudio2003/SimData.vcproj =================================================================== --- trunk/CSP/SimData/VisualStudio2003/SimData.vcproj 2005-02-16 14:09:51 UTC (rev 1473) +++ trunk/CSP/SimData/VisualStudio2003/SimData.vcproj 2005-02-16 22:59:10 UTC (rev 1474) @@ -123,7 +123,7 @@ SuppressStartupBanner="TRUE" DebugInformationFormat="3" CompileAs="2" - DisableSpecificWarnings="4511;4512;4100"/> + DisableSpecificWarnings="4511;4512"/> <Tool Name="VCCustomBuildTool"/> <Tool @@ -184,13 +184,13 @@ Name="Release|Win32"> <Tool Name="VCCLCompilerTool" - WarningLevel="3"/> + WarningLevel="2"/> </FileConfiguration> <FileConfiguration Name="Debug|Win32"> <Tool Name="VCCLCompilerTool" - WarningLevel="3" + WarningLevel="2" UndefinePreprocessorDefinitions="_DEBUG"/> </FileConfiguration> </File> |
From: <sv...@ww...> - 2005-02-16 14:09:59
|
Author: delta Date: 2005-02-16 06:09:51 -0800 (Wed, 16 Feb 2005) New Revision: 1473 Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Include/Animation.h trunk/CSP/CSPSim/Source/Animation.cpp Log: * Small changes in the Animation class. Fixed a bug (copy/paste typo) in DrivenRotation::Callback operator. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1473 Modified: trunk/CSP/CSPSim/CHANGES.current =================================================================== --- trunk/CSP/CSPSim/CHANGES.current 2005-02-15 18:19:56 UTC (rev 1472) +++ trunk/CSP/CSPSim/CHANGES.current 2005-02-16 14:09:51 UTC (rev 1473) @@ -1,5 +1,10 @@ Version 0.4.0 (in progress) =========================== + +2005-02-16: delta + * Small changes in the Animation class. Fixed a bug (copy/paste typo) in + DrivenRotation::Callback operator. + 2005-02-15: lologramme * Addes Taxi signalisation Modified: trunk/CSP/CSPSim/Include/Animation.h =================================================================== --- trunk/CSP/CSPSim/Include/Animation.h 2005-02-15 18:19:56 UTC (rev 1472) +++ trunk/CSP/CSPSim/Include/Animation.h 2005-02-16 14:09:51 UTC (rev 1473) @@ -27,6 +27,7 @@ #include <typeinfo> +#include <osg/AnimationPath> #include <osg/Node> #include <SimData/Key.h> @@ -52,7 +53,7 @@ * is not used and the transform is updated after * every callback. */ -class AnimationCallback: public osg::NodeCallback { +class AnimationCallback: public osg::AnimationPathCallback { protected: int m_DirtyCount; std::string m_ChannelName; @@ -109,6 +110,11 @@ float m_Limit1; float m_Gain; + void init(AnimationCallback *callback) const { + assert(callback); + callback->setChannelName(m_ChannelName); + callback->setDefault(m_Default); + } protected: /** * Small template class to reduce & simplify writing. @@ -116,15 +122,15 @@ * virtual void operator()(osg::Node* node, osg::NodeVisitor* nv) * in derived classes. */ - template <class A, class CT, class VT = float> class Callback_A_C: public AnimationCallback { + template <class A, class CT = double, class VT = float> class Callback_A_C: public AnimationCallback { protected: simdata::Ref<const A> m_Parameters; simdata::Ref<const DataChannel<CT> > m_Channel; VT m_Value; virtual void updateValue() = 0; public: - Callback_A_C(const Animation *const param): - m_Parameters(dynamic_cast<const A *const>(param)), + Callback_A_C(const A *const param): + m_Parameters(param), m_Value(0.0f) { assert(param); } @@ -138,7 +144,7 @@ virtual ~Callback_A_C(){} }; - template <class A> class Callback_A: public Callback_A_C<A, double> { + template <class A> class Callback_A: public Callback_A_C<A> { protected: virtual void updateValue() { if (m_Channel.valid()) { @@ -150,37 +156,27 @@ } } public: - Callback_A(const Animation *const param): - Callback_A_C<A,double>(param) {} + Callback_A(const A *const param): + Callback_A_C<A>(param) {} virtual ~Callback_A(){} }; float m_Default; - virtual AnimationCallback *newCallback(osg::Node *node, AnimationCallback *callback) const { + template <class A, class C> AnimationCallback *newCallback_(osg::Node *node) const { + AnimationCallback *callback = new C(dynamic_cast<const A* const>(this)); + init(callback); assert(node); - assert(callback); callback->bind(*node); - callback->setChannelName(m_ChannelName); return callback; } - template <class A, class C> AnimationCallback *newCallback_(osg::Node *node) const { - AnimationCallback *callback = Animation::newCallback(node, new C(dynamic_cast<const A* const>(this))); - callback->setDefault(m_Default); - return callback; - } - virtual AnimationCallback *newCallback(osg::NodeCallback* node_callback, AnimationCallback *callback) const { + template <class A, class C> AnimationCallback *newCallback_(osg::NodeCallback *node_callback) const { + AnimationCallback *callback = new C(dynamic_cast<const A* const>(this)); + init(callback); assert(node_callback); - assert(callback); callback->bind(*node_callback); - callback->setChannelName(m_ChannelName); return callback; } - template <class A, class C> AnimationCallback *newCallback_(osg::NodeCallback *nodeCallback) const { - AnimationCallback *callback = Animation::newCallback(nodeCallback, new C(dynamic_cast<const A* const>(this))); - callback->setDefault(m_Default); - return callback; - } public: BEGIN_SIMDATA_XML_VIRTUAL_INTERFACE(Animation) SIMDATA_XML("model_id", Animation::m_ModelID, true) @@ -212,7 +208,7 @@ /** * Abstract class regrouping usual infos (in its SimData interface) -* to make an Animation behaces like a rotation +* to make an Animation behaves like a rotation */ class Rotation: public Animation { simdata::Vector3 m_Axis; @@ -244,7 +240,7 @@ class DrivenRotation: public Rotation { class Callback: public Callback_A<DrivenRotation> { public: - Callback(const Animation * const param): Callback_A<DrivenRotation>(param){} + Callback(const DrivenRotation * const param): Callback_A<DrivenRotation>(param){} virtual void operator()(osg::Node* node, osg::NodeVisitor* nv); virtual ~Callback(){} }; @@ -258,10 +254,10 @@ virtual ~DrivenRotation(){} virtual AnimationCallback *newCallback(osg::Node *node) const { - return Animation::newCallback_<DrivenRotation,Callback>(node); + return newCallback_<DrivenRotation,Callback>(node); } virtual AnimationCallback *newCallback(osg::NodeCallback *nodeCallback) const { - return Animation::newCallback_<DrivenRotation,Callback>(nodeCallback); + return newCallback_<DrivenRotation,Callback>(nodeCallback); } }; @@ -304,7 +300,7 @@ class TimedRotation: public Rotation { class Callback: public Callback_A<TimedRotation> { public: - Callback(const Animation * const param): Callback_A<TimedRotation>(param){} + Callback(const TimedRotation * const param): Callback_A<TimedRotation>(param){} virtual void operator()(osg::Node* node, osg::NodeVisitor* nv); virtual ~Callback(){} }; @@ -321,10 +317,10 @@ virtual ~TimedRotation(){} virtual AnimationCallback *newCallback(osg::Node *node) const { - return Animation::newCallback_<TimedRotation,Callback>(node); + return newCallback_<TimedRotation,Callback>(node); } virtual AnimationCallback *newCallback(osg::NodeCallback *nodeCallback) const { - return Animation::newCallback_<TimedRotation,Callback>(nodeCallback); + return newCallback_<TimedRotation,Callback>(nodeCallback); } double getTimedAngle(double t) const { return getLimit0() + m_TimedAnimationProxy->getRate() * m_TimedAnimationProxy->getDelta_t0(t); @@ -374,7 +370,7 @@ class DrivenMagnitudeTranslation: public Translation { class Callback: public Callback_A<DrivenMagnitudeTranslation> { public: - Callback(const Animation * const param):Callback_A<DrivenMagnitudeTranslation>(param){} + Callback(const DrivenMagnitudeTranslation * const param):Callback_A<DrivenMagnitudeTranslation>(param){} virtual void operator()(osg::Node* node, osg::NodeVisitor* nv); virtual ~Callback(){} }; @@ -388,7 +384,7 @@ virtual ~DrivenMagnitudeTranslation(){} virtual AnimationCallback *newCallback(osg::Node *node) const { - return Animation::newCallback_<DrivenMagnitudeTranslation,Callback>(node); + return newCallback_<DrivenMagnitudeTranslation,Callback>(node); } }; @@ -421,7 +417,7 @@ virtual ~DrivenVectorialTranslation(){} virtual AnimationCallback *newCallback(osg::Node *node) const { - return Animation::newCallback_<DrivenVectorialTranslation,Callback>(node); + return newCallback_<DrivenVectorialTranslation,Callback>(node); } }; @@ -450,7 +446,7 @@ virtual ~TimedMagnitudeTranslation(){} virtual AnimationCallback *newCallback(osg::Node *node) const { - return Animation::newCallback_<TimedMagnitudeTranslation,Callback>(node); + return newCallback_<TimedMagnitudeTranslation,Callback>(node); } osg::Vec3 getTimedTranslation(double t) const { @@ -486,11 +482,10 @@ virtual ~DrivenSwitch(){} virtual AnimationCallback *newCallback(osg::Node *node) const { - return Animation::newCallback_<DrivenSwitch,Callback>(node); + return newCallback_<DrivenSwitch,Callback>(node); } }; - /** * TimedSequence controls TimedAnimation providing a basic time counter. * It exports (registers) 2 channels which can be imported; ReferenceTime Modified: trunk/CSP/CSPSim/Source/Animation.cpp =================================================================== --- trunk/CSP/CSPSim/Source/Animation.cpp 2005-02-15 18:19:56 UTC (rev 1472) +++ trunk/CSP/CSPSim/Source/Animation.cpp 2005-02-16 14:09:51 UTC (rev 1473) @@ -87,8 +87,8 @@ else if (needsUpdate(*node->getUpdateCallback())) { osg::MatrixTransform* t = dynamic_cast<osg::MatrixTransform*>(node); if (t) { - osg::Matrix m = osg::Matrix::rotate(m_Parameters->getGain()*m_Value + m_Parameters->getPhase() - + m_Parameters->getPhase(), m_Parameters->getAxis()); + osg::Matrix m = osg::Matrix::rotate(m_Parameters->getGain()*m_Value + m_Parameters->getPhase(), + m_Parameters->getAxis()); osg::Vec3 translation = t->getMatrix().getTrans(); m.preMult(t->getMatrix()); m.setTrans(translation); @@ -192,3 +192,4 @@ traverse(node, nv); } + |
Author: lologramme Date: 2005-02-15 10:19:56 -0800 (Tue, 15 Feb 2005) New Revision: 1472 Added: trunk/CSP/CSPSim/Data/Models/caissons/caisson10/ trunk/CSP/CSPSim/Data/Models/caissons/caisson10/E.jpg trunk/CSP/CSPSim/Data/Models/caissons/caisson10/caisson.jpg trunk/CSP/CSPSim/Data/Models/caissons/caisson10/caisson10.osg trunk/CSP/CSPSim/Data/Models/caissons/caisson11/ trunk/CSP/CSPSim/Data/Models/caissons/caisson11/E1.jpg trunk/CSP/CSPSim/Data/Models/caissons/caisson11/caisson.jpg trunk/CSP/CSPSim/Data/Models/caissons/caisson11/caisson11.osg trunk/CSP/CSPSim/Data/Models/caissons/caisson12/ trunk/CSP/CSPSim/Data/Models/caissons/caisson12/C1.jpg trunk/CSP/CSPSim/Data/Models/caissons/caisson12/caisson.jpg trunk/CSP/CSPSim/Data/Models/caissons/caisson12/caisson12.osg trunk/CSP/CSPSim/Data/Models/caissons/caisson13/ trunk/CSP/CSPSim/Data/Models/caissons/caisson13/C2.jpg trunk/CSP/CSPSim/Data/Models/caissons/caisson13/caisson.jpg trunk/CSP/CSPSim/Data/Models/caissons/caisson13/caisson13.osg trunk/CSP/CSPSim/Data/Models/caissons/caisson14/ trunk/CSP/CSPSim/Data/Models/caissons/caisson14/G.jpg trunk/CSP/CSPSim/Data/Models/caissons/caisson14/caisson.jpg trunk/CSP/CSPSim/Data/Models/caissons/caisson14/caisson14.osg trunk/CSP/CSPSim/Data/XML/theater/balkan/caisson10.xml trunk/CSP/CSPSim/Data/XML/theater/balkan/caisson11.xml trunk/CSP/CSPSim/Data/XML/theater/balkan/caisson12.xml trunk/CSP/CSPSim/Data/XML/theater/balkan/caisson13.xml trunk/CSP/CSPSim/Data/XML/theater/balkan/caisson14.xml trunk/CSP/CSPSim/Data/XML/theater/balkan/caissons/caisson10/ trunk/CSP/CSPSim/Data/XML/theater/balkan/caissons/caisson10/model.xml trunk/CSP/CSPSim/Data/XML/theater/balkan/caissons/caisson11/ trunk/CSP/CSPSim/Data/XML/theater/balkan/caissons/caisson11/model.xml trunk/CSP/CSPSim/Data/XML/theater/balkan/caissons/caisson12/ trunk/CSP/CSPSim/Data/XML/theater/balkan/caissons/caisson12/model.xml trunk/CSP/CSPSim/Data/XML/theater/balkan/caissons/caisson13/ trunk/CSP/CSPSim/Data/XML/theater/balkan/caissons/caisson13/model.xml trunk/CSP/CSPSim/Data/XML/theater/balkan/caissons/caisson14/ trunk/CSP/CSPSim/Data/XML/theater/balkan/caissons/caisson14/model.xml Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Data/Models/Hangar/hangar01.jpg trunk/CSP/CSPSim/Data/Models/Mirage2000/model.osg trunk/CSP/CSPSim/Data/Models/Runway/runway.3ds trunk/CSP/CSPSim/Data/XML/theater/balkan/airbase.xml trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/m2k.xml trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/m2k/fm.xml trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/m2k/model.xml Log: Added Taxi signalisation Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1472 Diff omitted (2122964 bytes). |
From: <sv...@ww...> - 2005-02-14 16:20:49
|
Author: delta Date: 2005-02-14 08:20:34 -0800 (Mon, 14 Feb 2005) New Revision: 1471 Modified: trunk/CSP/SimData/CHANGES.current trunk/CSP/SimData/Include/SimData/Enum.h trunk/CSP/SimData/Include/SimData/Random.h trunk/CSP/SimData/Include/SimData/Ref.h trunk/CSP/SimData/Include/SimData/ScopedPointer.h Log: * Exported more symbols to help compilation with vs 2005. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1471 Modified: trunk/CSP/SimData/CHANGES.current =================================================================== --- trunk/CSP/SimData/CHANGES.current 2005-02-14 13:10:16 UTC (rev 1470) +++ trunk/CSP/SimData/CHANGES.current 2005-02-14 16:20:34 UTC (rev 1471) @@ -1,6 +1,9 @@ Version 0.4.0 (in progress) =========================== +2005-02-14:delta + * Exported more symbols to help compilation with vs 2005. + 2005-02-05: onsight * Expose _postCreate so that complete objects can be created from Python + XML data. This is experimental (used by CSP layout), Modified: trunk/CSP/SimData/Include/SimData/Enum.h =================================================================== --- trunk/CSP/SimData/Include/SimData/Enum.h 2005-02-14 13:10:16 UTC (rev 1470) +++ trunk/CSP/SimData/Include/SimData/Enum.h 2005-02-14 16:20:34 UTC (rev 1471) @@ -245,7 +245,7 @@ * Enumeration Foo::MyEnumeration("apple orange cherry"); * @endcode */ -class Enumeration { +class SIMDATA_EXPORT Enumeration { friend class EnumLink; /// Reference counted smart-pointer to the associated EnumerationCore. Ref<EnumerationCore const> __core; @@ -624,7 +624,7 @@ * @ingroup BaseTypes */ template <Enumeration const &E> -class Enum: public EnumLink { +class SIMDATA_EXPORT Enum: public EnumLink { public: Enum(std::string const &token): EnumLink(E, token) {} Enum(): EnumLink(E) {} Modified: trunk/CSP/SimData/Include/SimData/Random.h =================================================================== --- trunk/CSP/SimData/Include/SimData/Random.h 2005-02-14 13:10:16 UTC (rev 1470) +++ trunk/CSP/SimData/Include/SimData/Random.h 2005-02-14 16:20:34 UTC (rev 1471) @@ -451,7 +451,7 @@ * typically about 20%. */ template <class RNG> -class RandomNumberGenerator: public RandomNumberGeneratorInterface { +class SIMDATA_EXPORT RandomNumberGenerator: public RandomNumberGeneratorInterface { /** Random number generator state. */ Modified: trunk/CSP/SimData/Include/SimData/Ref.h =================================================================== --- trunk/CSP/SimData/Include/SimData/Ref.h 2005-02-14 13:10:16 UTC (rev 1470) +++ trunk/CSP/SimData/Include/SimData/Ref.h 2005-02-14 16:20:34 UTC (rev 1471) @@ -116,7 +116,7 @@ * @author Mark Rose <mr...@st...> */ template<class CLASS> -class Ref { +class SIMDATA_EXPORT Ref { public: typedef std::vector< Ref<CLASS> > vector; typedef std::list< Ref<CLASS> > list; Modified: trunk/CSP/SimData/Include/SimData/ScopedPointer.h =================================================================== --- trunk/CSP/SimData/Include/SimData/ScopedPointer.h 2005-02-14 13:10:16 UTC (rev 1470) +++ trunk/CSP/SimData/Include/SimData/ScopedPointer.h 2005-02-14 16:20:34 UTC (rev 1471) @@ -44,7 +44,7 @@ * was borrowed from Boost C++. */ template <class T> -class ScopedPointer: public NonCopyable { +class SIMDATA_EXPORT ScopedPointer: public NonCopyable { T *_ptr; public: typedef T Type; |
From: <sv...@ww...> - 2005-02-14 13:10:24
|
Author: delta Date: 2005-02-14 05:10:16 -0800 (Mon, 14 Feb 2005) New Revision: 1470 Added: trunk/CSP/CSPSim/Tools/Layout/VisualStudio2003/Loader/ trunk/CSP/CSPSim/Tools/Layout/VisualStudio2003/Loader/Loader.vcproj Modified: trunk/CSP/CSPSim/CHANGES.current Log: * Added Loader vs project. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1470 Modified: trunk/CSP/CSPSim/CHANGES.current =================================================================== --- trunk/CSP/CSPSim/CHANGES.current 2005-02-09 12:58:32 UTC (rev 1469) +++ trunk/CSP/CSPSim/CHANGES.current 2005-02-14 13:10:16 UTC (rev 1470) @@ -1,6 +1,9 @@ Version 0.4.0 (in progress) =========================== +2005-02-14: delta + * Added Tools/Loader vs project. + 2005-02-09: delta * Added Include/Export.h Added: trunk/CSP/CSPSim/Tools/Layout/VisualStudio2003/Loader/Loader.vcproj =================================================================== --- trunk/CSP/CSPSim/Tools/Layout/VisualStudio2003/Loader/Loader.vcproj 2005-02-09 12:58:32 UTC (rev 1469) +++ trunk/CSP/CSPSim/Tools/Layout/VisualStudio2003/Loader/Loader.vcproj 2005-02-14 13:10:16 UTC (rev 1470) @@ -0,0 +1,113 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="7.10" + Name="Loader" + ProjectGUID="{8E5E75D5-0A46-40EB-AB25-676CA88EE05C}" + Keyword="MakeFileProj"> + <Platforms> + <Platform + Name="Win32"/> + </Platforms> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="Debug" + IntermediateDirectory="Debug" + ConfigurationType="0"> + <Tool + Name="VCNMakeTool" + Output="Loader.exe"/> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="Release" + IntermediateDirectory="Release" + ConfigurationType="2"> + <Tool + Name="VCCLCompilerTool" + AdditionalIncludeDirectories=""$(PYTHON_PATH)/include";../../../../..;../../../../../SimData/Include;../../../../Include" + PreprocessorDefinitions="WIN32" + RuntimeTypeInfo="TRUE" + WarningLevel="3"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="osg.lib _cSimData.lib osgDB.lib _cCSP.lib" + OutputFile="../../_c$(ProjectName).dll" + AdditionalLibraryDirectories="../../../../../SimData/SimData;../../../../Bin;"$(PYTHON_PATH)/libs"" + ImportLibrary="$(OutDir)/$_c(TargetName).lib"/> + <Tool + Name="VCMIDLTool"/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCWebDeploymentTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Source Files" + Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"> + <File + RelativePath="..\..\cLoader_wrap.cpp"> + </File> + <File + RelativePath="..\..\Handle.cpp"> + </File> + <File + RelativePath="..\..\Loader.cpp"> + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl;inc;xsd" + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"> + <File + RelativePath="..\..\cLayout_wrap.h"> + </File> + <File + RelativePath="..\..\Handle.h"> + </File> + <File + RelativePath="..\..\Loader.h"> + </File> + </Filter> + <Filter + Name="Resource Files" + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"> + </Filter> + <File + RelativePath="..\..\cLoader.i"> + <FileConfiguration + Name="Release|Win32"> + <Tool + Name="VCCustomBuildTool" + CommandLine="$(SWIG_PATH)\swig -runtime -c++ -python -noexcept -I..\..\..\SimData\Include -I..\..\.. -o ..\..\$(InputName)_wrap.cpp ..\..\$(InputName).i +" + Outputs="..\..\$(InputName)_wrap.cpp"/> + </FileConfiguration> + </File> + </Files> + <Globals> + </Globals> +</VisualStudioProject> |
From: <sv...@ww...> - 2005-02-09 12:58:44
|
Author: delta Date: 2005-02-09 04:58:32 -0800 (Wed, 09 Feb 2005) New Revision: 1469 Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Include/ObjectModel.h trunk/CSP/CSPSim/Include/Theater/ElevationCorrection.h trunk/CSP/CSPSim/Include/Theater/LayoutTransform.h trunk/CSP/CSPSim/Source/ObjectModel.cpp Log: * Exported a few symbols for the layout loader. * Uncomment the optimizer (I don't get anymore the systematic segfault as before). Changed m_ContactMarkers to be an osg::Switch. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1469 Modified: trunk/CSP/CSPSim/CHANGES.current =================================================================== --- trunk/CSP/CSPSim/CHANGES.current 2005-02-08 23:26:38 UTC (rev 1468) +++ trunk/CSP/CSPSim/CHANGES.current 2005-02-09 12:58:32 UTC (rev 1469) @@ -5,6 +5,12 @@ * Added Include/Export.h * Minor tweak to the vs project file to send _cCSP.lib to Bin/ + + * Exported a few symbols for the layout loader. + + * Uncomment the optimizer in ObjectModel.cpp (I don't get + anymore a systematic segfault like before). Changed + m_ContactMarkers to be an osg::Switch. 2005-02-05: onsight * Disable displaylist/stateset compiler visitor when creating Modified: trunk/CSP/CSPSim/Include/ObjectModel.h =================================================================== --- trunk/CSP/CSPSim/Include/ObjectModel.h 2005-02-08 23:26:38 UTC (rev 1468) +++ trunk/CSP/CSPSim/Include/ObjectModel.h 2005-02-09 12:58:32 UTC (rev 1469) @@ -37,6 +37,8 @@ #include <osg/ref_ptr> +#include <Export.h> + class Animation; class AnimationCallback; class AnimationChannel; @@ -68,13 +70,13 @@ * TODO: add LOD support here. * */ -class ObjectModel: public simdata::Object { +class CSPSIM_EXPORT ObjectModel: public simdata::Object { static const simdata::Enumeration EffectItems; osg::ref_ptr<osg::MatrixTransform> m_Transform; osg::ref_ptr<osg::Node> m_Model; osg::ref_ptr<osg::Switch> m_DebugMarkers; - osg::ref_ptr<osg::Group> m_ContactMarkers; + osg::ref_ptr<osg::Switch> m_ContactMarkers; public: typedef std::vector<simdata::Vector3> ContactList; Modified: trunk/CSP/CSPSim/Include/Theater/ElevationCorrection.h =================================================================== --- trunk/CSP/CSPSim/Include/Theater/ElevationCorrection.h 2005-02-08 23:26:38 UTC (rev 1468) +++ trunk/CSP/CSPSim/Include/Theater/ElevationCorrection.h 2005-02-09 12:58:32 UTC (rev 1469) @@ -40,7 +40,7 @@ * A helper class for correcting the elevation of static objects to match * the local terrain. */ -class ElevationCorrection: public LayoutTransform { +class CSPSIM_EXPORT ElevationCorrection: public LayoutTransform { TerrainObject *m_Terrain; ElevationCorrection() {} public: Modified: trunk/CSP/CSPSim/Include/Theater/LayoutTransform.h =================================================================== --- trunk/CSP/CSPSim/Include/Theater/LayoutTransform.h 2005-02-08 23:26:38 UTC (rev 1468) +++ trunk/CSP/CSPSim/Include/Theater/LayoutTransform.h 2005-02-09 12:58:32 UTC (rev 1469) @@ -28,6 +28,8 @@ #include <osg/Vec3> +#include <Export.h> + namespace simdata { class Vector3; } @@ -38,7 +40,7 @@ * * A helper class for accumulationg and applying 2D displacements and rotations. */ -class LayoutTransform { +class CSPSIM_EXPORT LayoutTransform { float m_X, m_Y, m_Angle; float c, s; public: Modified: trunk/CSP/CSPSim/Source/ObjectModel.cpp =================================================================== --- trunk/CSP/CSPSim/Source/ObjectModel.cpp 2005-02-08 23:26:38 UTC (rev 1468) +++ trunk/CSP/CSPSim/Source/ObjectModel.cpp 2005-02-09 12:58:32 UTC (rev 1469) @@ -442,14 +442,15 @@ // 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() { - m_ContactMarkers = new osg::Group; + m_ContactMarkers = new osg::Switch; osg::CullFace *cf = new osg::CullFace; cf->setMode(osg::CullFace::BACK); m_ContactMarkers->getOrCreateStateSet()->setAttributeAndModes(cf, osg::StateAttribute::ON); @@ -459,15 +460,15 @@ m_ContactMarkers->addChild(diamond); } // set markers not visible by default - m_ContactMarkers->setNodeMask(0x0); + m_ContactMarkers->setAllChildrenOff(); m_DebugMarkers->addChild(m_ContactMarkers.get()); } void ObjectModel::showContactMarkers(bool on) { if (on) - m_ContactMarkers->setNodeMask(0xffffffff); + m_ContactMarkers->setAllChildrenOff(); else - m_ContactMarkers->setNodeMask(0x0); + m_ContactMarkers->setAllChildrenOn(); } bool ObjectModel::getMarkersVisible() const { |
From: <sv...@ww...> - 2005-02-08 23:26:46
|
Author: delta Date: 2005-02-08 15:26:38 -0800 (Tue, 08 Feb 2005) New Revision: 1468 Added: trunk/CSP/CSPSim/Include/Export.h Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/VisualStudio/CSPSimDLL/CSPSimDLL.vcproj Log: * Added Include/Export.h * Minor tweak to the vs project file to send _cCSP.lib to Bin/ Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1468 Modified: trunk/CSP/CSPSim/CHANGES.current =================================================================== --- trunk/CSP/CSPSim/CHANGES.current 2005-02-07 17:41:25 UTC (rev 1467) +++ trunk/CSP/CSPSim/CHANGES.current 2005-02-08 23:26:38 UTC (rev 1468) @@ -1,6 +1,11 @@ Version 0.4.0 (in progress) =========================== +2005-02-09: delta + * Added Include/Export.h + + * Minor tweak to the vs project file to send _cCSP.lib to Bin/ + 2005-02-05: onsight * Disable displaylist/stateset compiler visitor when creating ObjectModels, since it segfaults for models loaded using the Added: trunk/CSP/CSPSim/Include/Export.h =================================================================== --- trunk/CSP/CSPSim/Include/Export.h 2005-02-07 17:41:25 UTC (rev 1467) +++ trunk/CSP/CSPSim/Include/Export.h 2005-02-08 23:26:38 UTC (rev 1468) @@ -0,0 +1,49 @@ + // Combat Simulator Project + // Copyright (C) 2002-2005 The Combat Simulator Project + // http://csp.sourceforge.net + // + // 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. + // + + +/** + * @file Export.h + * @brief Macros needed to export/import symbols from shared libraries. + */ + +#ifndef __CSPSIM_EXPORT_H__ +#define __CSPSIM_EXPORT_H__ + +#if defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW32__) || defined( __BCPLUSPLUS__) || defined( __MWERKS__) + # ifdef SWIG + # undef __declspec + # define __declspec(x) + # endif // SWIG + # ifdef CSPSIMDLL_EXPORTS + # define CSPSIM_EXPORT __declspec(dllexport) + # else + # define CSPSIM_EXPORT __declspec(dllimport) + # endif // CSPSIMDLL_EXPORTS +#else + # define CSPSIM_EXPORT +#endif + +# if defined(_MSC_VER) && (_MSC_VER <= 1310) +#pragma warning (disable : 4786 4251 4290) +# endif + + +#endif // __CSPSIM_EXPORT_H__ + Modified: trunk/CSP/CSPSim/VisualStudio/CSPSimDLL/CSPSimDLL.vcproj =================================================================== --- trunk/CSP/CSPSim/VisualStudio/CSPSimDLL/CSPSimDLL.vcproj 2005-02-07 17:41:25 UTC (rev 1467) +++ trunk/CSP/CSPSim/VisualStudio/CSPSimDLL/CSPSimDLL.vcproj 2005-02-08 23:26:38 UTC (rev 1468) @@ -133,7 +133,7 @@ AssemblyDebug="0" GenerateMapFile="FALSE" MapExports="FALSE" - ImportLibrary=".\Release/_CSP.lib" + ImportLibrary="../../Bin/_cCSP.lib" TargetMachine="1"/> <Tool Name="VCMIDLTool" @@ -488,6 +488,9 @@ RelativePath="..\..\Include\Exception.h"> </File> <File + RelativePath="..\..\Include\Export.h"> + </File> + <File RelativePath="..\..\Include\FlightDynamics.h"> </File> <File |
From: <sv...@ww...> - 2005-02-07 17:41:36
|
Author: delta Date: 2005-02-07 09:41:25 -0800 (Mon, 07 Feb 2005) New Revision: 1467 Modified: trunk/CSP/CSPSim/Tools/Layout/Loader.cpp trunk/CSP/CSPSim/Tools/Layout/VisualStudio2003/Layout/Layout.vcproj trunk/CSP/CSPSim/Tools/Layout/VisualStudio2003/VisualStudio.sln Log: * Small correction to the project file. * Added #include <Animation.h> to Loader.cpp to make it compile on vs. Loader doesn't link properly yet. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1467 Modified: trunk/CSP/CSPSim/Tools/Layout/Loader.cpp =================================================================== --- trunk/CSP/CSPSim/Tools/Layout/Loader.cpp 2005-02-07 03:27:53 UTC (rev 1466) +++ trunk/CSP/CSPSim/Tools/Layout/Loader.cpp 2005-02-07 17:41:25 UTC (rev 1467) @@ -26,6 +26,7 @@ #include <Theater/FeatureSceneGroup.h> #include <Theater/ElevationCorrection.h> #include <Theater/LayoutTransform.h> +#include <Animation.h> #include <ObjectModel.h> #include <osgDB/ReadFile> Modified: trunk/CSP/CSPSim/Tools/Layout/VisualStudio2003/Layout/Layout.vcproj =================================================================== --- trunk/CSP/CSPSim/Tools/Layout/VisualStudio2003/Layout/Layout.vcproj 2005-02-07 03:27:53 UTC (rev 1466) +++ trunk/CSP/CSPSim/Tools/Layout/VisualStudio2003/Layout/Layout.vcproj 2005-02-07 17:41:25 UTC (rev 1467) @@ -28,7 +28,7 @@ <Tool Name="VCLinkerTool" AdditionalDependencies="osgd.lib OpenThreadsWin32d.lib osgGAd.lib osgProducerd.lib osgDBd.lib Producerd.lib osgUtild.lib" - OutputFile="../../.bin/$(ProjectName)d.dll" + OutputFile="../../_c$(ProjectName)d.dll" AdditionalLibraryDirectories="$(PYTHON_PATH)/libs" OptimizeReferences="2" ImportLibrary="$(OutDir)/$(TargetName).lib"/> @@ -70,7 +70,7 @@ <Tool Name="VCLinkerTool" AdditionalDependencies="osg.lib OpenThreadsWin32.lib osgGA.lib osgProducer.lib osgDB.lib Producer.lib osgUtil.lib" - OutputFile="../../.bin/$(ProjectName).dll" + OutputFile="../../_c$(ProjectName).dll" AdditionalLibraryDirectories="$(PYTHON_PATH)/libs"/> <Tool Name="VCMIDLTool"/> @@ -168,7 +168,8 @@ Name="Release|Win32"> <Tool Name="VCCustomBuildTool" - CommandLine="$(SWIG_PATH)\swig -runtime -c++ -python -noexcept -I..\..\..\SimData\Include -I..\..\.. -o ..\..\$(InputName)_wrap.cpp ..\..\$(InputName).i" + CommandLine="$(SWIG_PATH)\swig -runtime -c++ -python -noexcept -I..\..\..\SimData\Include -I..\..\.. -o ..\..\$(InputName)_wrap.cpp ..\..\$(InputName).i +" Outputs="..\..\$(InputName)_wrap.cpp"/> </FileConfiguration> </File> Modified: trunk/CSP/CSPSim/Tools/Layout/VisualStudio2003/VisualStudio.sln =================================================================== --- trunk/CSP/CSPSim/Tools/Layout/VisualStudio2003/VisualStudio.sln 2005-02-07 03:27:53 UTC (rev 1466) +++ trunk/CSP/CSPSim/Tools/Layout/VisualStudio2003/VisualStudio.sln 2005-02-07 17:41:25 UTC (rev 1467) @@ -3,6 +3,10 @@ ProjectSection(ProjectDependencies) = postProject EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Loader", "Loader\Loader.vcproj", "{8E5E75D5-0A46-40EB-AB25-676CA88EE05C}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject Global GlobalSection(SolutionConfiguration) = preSolution Debug = Debug @@ -13,6 +17,10 @@ {93A0D0F8-4393-42B1-9BB6-B8DB08952FB7}.Debug.Build.0 = Debug|Win32 {93A0D0F8-4393-42B1-9BB6-B8DB08952FB7}.Release.ActiveCfg = Release|Win32 {93A0D0F8-4393-42B1-9BB6-B8DB08952FB7}.Release.Build.0 = Release|Win32 + {8E5E75D5-0A46-40EB-AB25-676CA88EE05C}.Debug.ActiveCfg = Debug|Win32 + {8E5E75D5-0A46-40EB-AB25-676CA88EE05C}.Debug.Build.0 = Debug|Win32 + {8E5E75D5-0A46-40EB-AB25-676CA88EE05C}.Release.ActiveCfg = Release|Win32 + {8E5E75D5-0A46-40EB-AB25-676CA88EE05C}.Release.Build.0 = Release|Win32 EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution EndGlobalSection |
From: <sv...@ww...> - 2005-02-07 03:28:01
|
Author: mkrose Date: 2005-02-06 19:27:53 -0800 (Sun, 06 Feb 2005) New Revision: 1466 Modified: trunk/CSP/CSPSim/Tools/Layout/UI.py trunk/CSP/CSPSim/Tools/Layout/View.cpp trunk/CSP/CSPSim/Tools/Layout/View.h trunk/CSP/CSPSim/Tools/Layout/csplayout Log: Clean up some platform dependency problems in related to threading in CSPLayout. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1466 Modified: trunk/CSP/CSPSim/Tools/Layout/UI.py =================================================================== --- trunk/CSP/CSPSim/Tools/Layout/UI.py 2005-02-05 19:25:19 UTC (rev 1465) +++ trunk/CSP/CSPSim/Tools/Layout/UI.py 2005-02-07 03:27:53 UTC (rev 1466) @@ -801,7 +801,12 @@ wxMessageDialog(self, 'Inserting "%s" into the active group would create an infinite recursion.' % path, "Load", style = wxOK|wxICON_ERROR).ShowModal() return None + # stop the 3d rendering loop while we modify the scene graph + self._view.lock(); feature_layout.realizeAsChild(parent, node_map) + # restart the 3d rendering loop + self._view.unlock(); + model = node_map.getRoot() self.UpdateTree(model) @@ -878,7 +883,6 @@ self.Close() def OnItemActivated(self, event): - print 'activated' id = event.GetItem() path = self.GetItemPath(id) if path: @@ -991,11 +995,15 @@ wxMessageDialog(self, "Cannot open leaf node FeatureModels; use insert instead.", "Error loading feature", style = wxOK|wxICON_ERROR).ShowModal() return 0 + # stop the 3d rendering loop while we load the new scene graph + self._view.lock(); node_map = graph.realize() self._node_map = node_map node = node_map.getRoot() assert(node is not None and node.isGroup()) self._view.graph().setRoot(node) + # restart the 3d rendering loop + self._view.unlock(); node.thisown = 0 self.UpdateTree(node) Modified: trunk/CSP/CSPSim/Tools/Layout/View.cpp =================================================================== --- trunk/CSP/CSPSim/Tools/Layout/View.cpp 2005-02-05 19:25:19 UTC (rev 1465) +++ trunk/CSP/CSPSim/Tools/Layout/View.cpp 2005-02-07 03:27:53 UTC (rev 1466) @@ -63,6 +63,7 @@ #include <osg/Drawable> #include <osg/ref_ptr> #include <osg/Vec3> +#include <OpenThreads/Thread> #include <iostream> #include <cstdio> @@ -70,6 +71,8 @@ View::View(): m_Viewer(0), m_FeatureGraph(0), m_Manipulator(0) { + // TODO move elsewhere in startup logic + OpenThreads::Thread::Init(); } int View::init(int argc, char **argv) { @@ -157,20 +160,29 @@ #endif m_Viewer->realize(); while (!m_Viewer->done() && !m_Quit) { - m_Viewer->sync(); - m_Viewer->update(); - m_Viewer->frame(); - m_DynamicGrid->setLook(getCameraTarget(), getCameraPosition()); + if (trylock() == 0) { + m_Viewer->sync(); + m_Viewer->update(); + m_Viewer->frame(); + m_DynamicGrid->setLook(getCameraTarget(), getCameraPosition()); + unlock(); + } Py_BEGIN_ALLOW_THREADS; -#ifndef _MSC_VER - nanosleep(&sleeptime, 0); -#else - Sleep(1); -#endif + OpenThreads::Thread::YieldCurrentThread(); Py_END_ALLOW_THREADS; } - //m_Viewer->sync(); - delete m_Viewer; + + // XXX + // Intentionally leak Viewer to prevent an xlib error on exit: + // + // Xlib: unexpected async reply (sequence 0x2e)! + // + // More likely than not we are only masking the problem, which + // probably results from asynchronous xlib access from the 2d + // and 3d threads. This hasn't caused any other noticible problems + // and by not deleting the viewer we get a clean exit. + // + //delete m_Viewer; m_Viewer = 0; } @@ -190,6 +202,7 @@ } Producer::Matrix view_matrix; view_matrix.makeLookAt(from ,to, up); + assert(m_Viewer); m_Viewer->setViewByMatrix(view_matrix); } @@ -221,6 +234,7 @@ } osg::Vec3 View::getCameraPosition() const { + assert(m_Viewer); const Producer::Matrix::value_type *view_matrix = m_Viewer->getCamera(0)->getPositionAndAttitudeMatrix(); Producer::Matrix matrix(view_matrix); Producer::Vec3 offset(matrix(3, 0), matrix(3, 1), matrix(3, 2)); @@ -247,6 +261,7 @@ void View::screenToSurface(float x, float y, float &surface_x, float &surface_y) { surface_x = surface_y = 0.0; float pixel_x, pixel_y; + assert(m_Viewer); if (m_Viewer->computePixelCoords(x, y, 0 /*camera_num*/, pixel_x, pixel_y)) { Producer::Camera *camera = m_Viewer->getCamera(0); int pr_wx, pr_wy; @@ -278,6 +293,7 @@ } bool View::computePixelCoords(float x, float y, float& pixel_x, float& pixel_y) { + assert(m_Viewer); return m_Viewer->computePixelCoords(x, y, 0 /*camera_num*/, pixel_x, pixel_y); } @@ -345,6 +361,7 @@ } void View::prepareScene() { + assert(m_Viewer); osg::Group *group = new osg::Group; makeLights(group); makeGround(group); Modified: trunk/CSP/CSPSim/Tools/Layout/View.h =================================================================== --- trunk/CSP/CSPSim/Tools/Layout/View.h 2005-02-05 19:25:19 UTC (rev 1465) +++ trunk/CSP/CSPSim/Tools/Layout/View.h 2005-02-07 03:27:53 UTC (rev 1466) @@ -171,6 +171,21 @@ */ float getGridScale() const; + /** Mutex synchronization for 2d and 3d threads. */ + int trylock() { + return m_Mutex.trylock(); + } + + /** Mutex synchronization for 2d and 3d threads. */ + int lock() { + return m_Mutex.lock(); + } + + /** Mutex synchronization for 2d and 3d threads. */ + int unlock() { + return m_Mutex.unlock(); + } + private: void setViewAxis(osg::Vec3 const &axis, osg::Vec3 const &up); void prepareScene(); @@ -190,6 +205,7 @@ typedef std::list< osg::ref_ptr<ViewCallback> > ViewCallbackList; ViewCallbackList m_ViewCallbacks; + OpenThreads::Mutex m_Mutex; }; Modified: trunk/CSP/CSPSim/Tools/Layout/csplayout =================================================================== --- trunk/CSP/CSPSim/Tools/Layout/csplayout 2005-02-05 19:25:19 UTC (rev 1465) +++ trunk/CSP/CSPSim/Tools/Layout/csplayout 2005-02-07 03:27:53 UTC (rev 1466) @@ -21,7 +21,7 @@ """ import sys -import threading +import thread import os.path import cLayout @@ -29,34 +29,23 @@ from CSP.base import app +def run(view, ui): + view.run() + ui.ExitMainLoop() -class UIThread(threading.Thread): - def __init__(self, view, xml_path, model_path): - threading.Thread.__init__(self) - self.setDaemon(1) - self._view = view - self._ui = UI.Init(view, xml_path, model_path) - - def run(self): - print "Combat Simulator Project Theater Layout Tool" - print "============================================" - self._ui.MainLoop() - self._view.quit() - - def main(args): + print "Combat Simulator Project Theater Layout Tool" + print "============================================" view = cLayout.View() - # was sys.argv, now argument parsing handled in python. at some point - # we may want to declare options for some of the flags that the osg - # ArgumentParser accepts and pass them explicitly (e.g. --stereo). - argv = [app.programName()] + argv = [app.programName()] + list(args) if view.init(argv): sys.exit(1) - ui = UIThread(view, app.options.xml, app.options.model) - ui.start() - view.run() + ui = UI.Init(view, app.options.xml, app.options.model) + thread.start_new_thread(run, (view, ui)) + ui.MainLoop() + view.quit() # find the root of the CSP workspace base = os.path.dirname(os.path.dirname(app.__file__)) @@ -70,4 +59,4 @@ app.addOption('--xml', default=xml_path, type='string', help='path to theater data') app.addOption('--model', default=model_path, type='string', help='path to 3d models') app.start() - +print 'end' |
From: <sv...@ww...> - 2005-02-05 19:25:27
|
Author: mkrose Date: 2005-02-05 11:25:19 -0800 (Sat, 05 Feb 2005) New Revision: 1465 Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Source/ObjectModel.cpp Log: Disable displaylist/stateset compiler visitor when creating ObjectModels, since it segfaults for models loaded using the CSP theater layout tool. There isn't an obvious impact on performance in the sim, but should still be sorted out at some point. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1465 Modified: trunk/CSP/CSPSim/CHANGES.current =================================================================== --- trunk/CSP/CSPSim/CHANGES.current 2005-02-05 18:40:32 UTC (rev 1464) +++ trunk/CSP/CSPSim/CHANGES.current 2005-02-05 19:25:19 UTC (rev 1465) @@ -1,6 +1,13 @@ Version 0.4.0 (in progress) =========================== +2005-02-05: onsight + * Disable displaylist/stateset compiler visitor when creating + ObjectModels, since it segfaults for models loaded using the + CSP theater layout tool. There isn't an obvious impact on + performance in the sim, but should still be sorted out at + some point. + 2005-01-30: onsight * Move IsoContour classes out of RandomBillboardModel.cpp and use them in RandomForestModel.cpp. Modified: trunk/CSP/CSPSim/Source/ObjectModel.cpp =================================================================== --- trunk/CSP/CSPSim/Source/ObjectModel.cpp 2005-02-05 18:40:32 UTC (rev 1464) +++ trunk/CSP/CSPSim/Source/ObjectModel.cpp 2005-02-05 19:25:19 UTC (rev 1465) @@ -414,14 +414,23 @@ CSP_LOG(APP, DEBUG, "LoadModel: add contact markers"); addContactMarkers(); + /* + // FIXME Segfaults when creating objects using the CSP theater layout tool. + // Need to figure out why, but for now just disable. + osg::ref_ptr<osg::State> state = new osg::State; + CSP_LOG(APP, DEBUG, "LoadModel: setting state"); osgUtil::GLObjectsVisitor ov; ov.setState(state.get()); ov.setNodeMaskOverride(0xffffffff); m_Model->accept(ov); + CSP_LOG(APP, DEBUG, "LoadModel: setting state for debug markers"); m_DebugMarkers->accept(ov); + */ + CSP_LOG(APP, DEBUG, "LoadModel: done"); + // 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) // 2) it appears in the debug built systematically on the second times the |
From: <sv...@ww...> - 2005-02-05 18:40:42
|
Author: mkrose Date: 2005-02-05 10:40:32 -0800 (Sat, 05 Feb 2005) New Revision: 1464 Added: trunk/CSP/CSPSim/Tools/Layout/Images/ trunk/CSP/CSPSim/Tools/Layout/Images/move-on.png trunk/CSP/CSPSim/Tools/Layout/Images/move.png trunk/CSP/CSPSim/Tools/Layout/Images/move.xcf trunk/CSP/CSPSim/Tools/Layout/Images/rotate-on.png trunk/CSP/CSPSim/Tools/Layout/Images/rotate.png trunk/CSP/CSPSim/Tools/Layout/Images/rotate.xcf trunk/CSP/CSPSim/Tools/Layout/Images/views.xcf trunk/CSP/CSPSim/Tools/Layout/Images/viewz.png Modified: trunk/CSP/CSPSim/Tools/Layout/UI.py Log: Add icons needed by CSP layout. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1464 Added: trunk/CSP/CSPSim/Tools/Layout/Images/move-on.png =================================================================== (Binary files differ) Property changes on: trunk/CSP/CSPSim/Tools/Layout/Images/move-on.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/CSP/CSPSim/Tools/Layout/Images/move.png =================================================================== (Binary files differ) Property changes on: trunk/CSP/CSPSim/Tools/Layout/Images/move.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/CSP/CSPSim/Tools/Layout/Images/move.xcf =================================================================== (Binary files differ) Property changes on: trunk/CSP/CSPSim/Tools/Layout/Images/move.xcf ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/CSP/CSPSim/Tools/Layout/Images/rotate-on.png =================================================================== (Binary files differ) Property changes on: trunk/CSP/CSPSim/Tools/Layout/Images/rotate-on.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/CSP/CSPSim/Tools/Layout/Images/rotate.png =================================================================== (Binary files differ) Property changes on: trunk/CSP/CSPSim/Tools/Layout/Images/rotate.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/CSP/CSPSim/Tools/Layout/Images/rotate.xcf =================================================================== (Binary files differ) Property changes on: trunk/CSP/CSPSim/Tools/Layout/Images/rotate.xcf ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/CSP/CSPSim/Tools/Layout/Images/views.xcf =================================================================== (Binary files differ) Property changes on: trunk/CSP/CSPSim/Tools/Layout/Images/views.xcf ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/CSP/CSPSim/Tools/Layout/Images/viewz.png =================================================================== (Binary files differ) Property changes on: trunk/CSP/CSPSim/Tools/Layout/Images/viewz.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: trunk/CSP/CSPSim/Tools/Layout/UI.py =================================================================== --- trunk/CSP/CSPSim/Tools/Layout/UI.py 2005-02-05 18:20:23 UTC (rev 1463) +++ trunk/CSP/CSPSim/Tools/Layout/UI.py 2005-02-05 18:40:32 UTC (rev 1464) @@ -558,8 +558,8 @@ control = None if type == RADIO: handler, name, help = tool[1:] - bm0 = wxBitmapFromImage(wxImage("%s.bmp" % name)) - bm1 = wxBitmapFromImage(wxImage("%s-on.bmp" % name)) + bm0 = wxBitmapFromImage(wxImage(os.path.join("Images", "%s.png" % name))) + bm1 = wxBitmapFromImage(wxImage(os.path.join("Images", "%s-on.png" % name))) toolbar.AddRadioTool(id, bm0, bm1, name, help) if handler is not None: EVT_TOOL(self, id, handler) @@ -574,22 +574,22 @@ EVT_BUTTON(self, id, handler) elif type == TOOL: handler, name, help = tool[1:] - bm0 = wxBitmapFromImage(wxImage("%s.bmp" % name)) + bm0 = wxBitmapFromImage(wxImage(os.path.join("Images", "%s.png" % name))) bm1 = wxNullBitmap toolbar.AddTool(id, bm0, bm1, 1, name, help) if handler is not None: EVT_TOOL(self, id, handler) elif type == CHECK: handler, name, help = tool[1:] - bm0 = wxBitmapFromImage(wxImage("%s.bmp" % name)) - bm1 = wxBitmapFromImage(wxImage("%s-on.bmp" % name)) + bm0 = wxBitmapFromImage(wxImage(os.path.join("Images", "%s.png" % name))) + bm1 = wxBitmapFromImage(wxImage(os.path.join("Images", "%s-on.png" % name))) toolbar.AddCheckTool(id, bm0, bm1, name, help) if handler is not None: EVT_TOOL(self, id, handler) elif type == TOGGLE: handler, name, help = tool[1:] - bm0 = wxBitmapFromImage(wxImage("%s.bmp" % name)) - bm1 = wxBitmapFromImage(wxImage("%s-on.bmp" % name)) + bm0 = wxBitmapFromImage(wxImage(os.path.join("Images", "%s.png" % name))) + bm1 = wxBitmapFromImage(wxImage(os.path.join("Images", "%s-on.png" % name))) control = wxBitmapToggleButton(toolbar, id, bm0) control.SetToolTip(wxToolTip(help)) control.SetBitmaps(bm0, bm1) |
From: <sv...@ww...> - 2005-02-05 18:20:36
|
Author: mkrose Date: 2005-02-05 10:20:23 -0800 (Sat, 05 Feb 2005) New Revision: 1463 Modified: trunk/CSP/SimData/CHANGES.current trunk/CSP/SimData/Include/SimData/Object.h Log: Expose _postCreate so that complete objects can be created from Python + XML data. This is experimental (used by CSP layout), and some issues remain to be resolved (e.g. Link members aren't automatically constructed). Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1463 Modified: trunk/CSP/SimData/CHANGES.current =================================================================== --- trunk/CSP/SimData/CHANGES.current 2005-02-05 17:58:05 UTC (rev 1462) +++ trunk/CSP/SimData/CHANGES.current 2005-02-05 18:20:23 UTC (rev 1463) @@ -1,11 +1,17 @@ Version 0.4.0 (in progress) =========================== +2005-02-05: onsight + * Expose _postCreate so that complete objects can be created from + Python + XML data. This is experimental (used by CSP layout), + and some issues remain to be resolved (e.g. Link members aren't + automatically constructed). + 2005-01-19: delta * Got ride of a few throw(Type) for 2 main reasons. It will ease the maintenance and it avoids a few warnings on vs2005. In fact, vs2003 already treats throw(Type) like throw(...). - + 2005-01-03: onsight * Fix logging priority/category calls in Compile.py. Modified: trunk/CSP/SimData/Include/SimData/Object.h =================================================================== --- trunk/CSP/SimData/Include/SimData/Object.h 2005-02-05 17:58:05 UTC (rev 1462) +++ trunk/CSP/SimData/Include/SimData/Object.h 2005-02-05 18:20:23 UTC (rev 1463) @@ -149,7 +149,7 @@ Object const &operator=(Object const &); void _setPath(hasht); - + hasht _path; protected: @@ -243,6 +243,12 @@ */ static hasht _getHash(const char* c); + /** Expose the postCreate method. Experimental --- use with great caution. + * Ordinarily postCreate is called only by DataArchive after deserializing + * an object. This method is intended to assist with object creation directly + * from XML data (typically in Python). + */ + void _postCreate() { postCreate(); } }; |
From: <sv...@ww...> - 2005-02-05 17:58:13
|
Author: mkrose Date: 2005-02-05 09:58:05 -0800 (Sat, 05 Feb 2005) New Revision: 1462 Added: trunk/CSP/CSPSim/Tools/Layout/Config.py trunk/CSP/CSPSim/Tools/Layout/DataTree.py trunk/CSP/CSPSim/Tools/Layout/Object.py trunk/CSP/CSPSim/Tools/Layout/ObjectInterface.py trunk/CSP/CSPSim/Tools/Layout/UI.py trunk/CSP/CSPSim/Tools/Layout/csplayout trunk/CSP/CSPSim/Tools/Layout/domtree.py trunk/CSP/CSPSim/Tools/Layout/ids.py Log: Add the python modules for the theater layout tool (2D UI and XML). Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1462 Diff omitted (74961 bytes). |
From: <sv...@ww...> - 2005-02-05 16:34:11
|
Author: mkrose Date: 2005-02-05 08:34:01 -0800 (Sat, 05 Feb 2005) New Revision: 1461 Modified: trunk/CSP/CSPSim/Bin/CSPSim.py Log: Find CSPSim/Data/CSPSim.ini relative to the CSPSim.py module instead of the current working directory, and return the absolute path. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1461 Modified: trunk/CSP/CSPSim/Bin/CSPSim.py =================================================================== --- trunk/CSP/CSPSim/Bin/CSPSim.py 2005-02-05 10:16:18 UTC (rev 1460) +++ trunk/CSP/CSPSim/Bin/CSPSim.py 2005-02-05 16:34:01 UTC (rev 1461) @@ -269,14 +269,14 @@ def findConfig(): # do our best to find the correct configuration file - config_paths = [".", "~/.cspsim", "/etc/cspsim", "../Data"] + config_paths = [".", "~/.cspsim", "/etc/cspsim", os.path.join(os.path.dirname(__file__), "../Data")] config = "CSPSim.ini" for path in config_paths: path = os.path.join(path, "CSPSim.ini") path = os.path.expanduser(path) if os.path.exists(path): - config = path + config = os.path.abspath(path) break return config |
From: <sv...@ww...> - 2005-02-05 10:16:27
|
Author: delta Date: 2005-02-05 02:16:18 -0800 (Sat, 05 Feb 2005) New Revision: 1460 Added: trunk/CSP/CSPSim/Tools/Layout/VisualStudio2003/ trunk/CSP/CSPSim/Tools/Layout/VisualStudio2003/Layout/ trunk/CSP/CSPSim/Tools/Layout/VisualStudio2003/Layout/Layout.vcproj trunk/CSP/CSPSim/Tools/Layout/VisualStudio2003/VisualStudio.sln Modified: trunk/CSP/CSPSim/Tools/Layout/LayoutNodes.h trunk/CSP/CSPSim/Tools/Layout/View.cpp Log: * Initial vs2003 project files. Builds Layout only for now. A few mods were needed, in particular the timespec struct and the nanosleep function are not known here and have been replaced by Sleep(1), protected behind #ifdef _MSC_VER. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1460 Modified: trunk/CSP/CSPSim/Tools/Layout/LayoutNodes.h =================================================================== --- trunk/CSP/CSPSim/Tools/Layout/LayoutNodes.h 2005-02-05 04:08:48 UTC (rev 1459) +++ trunk/CSP/CSPSim/Tools/Layout/LayoutNodes.h 2005-02-05 10:16:18 UTC (rev 1460) @@ -240,7 +240,7 @@ virtual void traverse(LayoutNodeVisitor &v) { } virtual bool isGroup() const { return false; } - virtual LayoutGroup *asGroup() { assert(0); } + virtual LayoutGroup *asGroup() { assert(0); return 0; } virtual void setModel(osg::ref_ptr<osg::Node> node) { _graph = node; rebind(); Modified: trunk/CSP/CSPSim/Tools/Layout/View.cpp =================================================================== --- trunk/CSP/CSPSim/Tools/Layout/View.cpp 2005-02-05 04:08:48 UTC (rev 1459) +++ trunk/CSP/CSPSim/Tools/Layout/View.cpp 2005-02-05 10:16:18 UTC (rev 1460) @@ -30,9 +30,20 @@ #undef _POSIX_C_SOURCE #endif -#include <Python.h> -#include <unistd.h> +#ifdef _MSC_VER + #ifdef _DEBUG + #undef _DEBUG + #include <Python.h> + #define _DEBUG + #else + #include <Python.h> + #endif +#else + #include <Python.h> + #include <unistd.h> +#endif + #include <osgUtil/Optimizer> #include <osgDB/ReadFile> #include <osgProducer/Viewer> @@ -51,6 +62,7 @@ #include <osg/Geometry> #include <osg/Drawable> #include <osg/ref_ptr> +#include <osg/Vec3> #include <iostream> #include <cstdio> @@ -138,9 +150,11 @@ void View::run() { if (!m_Viewer) return; m_Quit = false; +#ifndef _MSC_VER timespec sleeptime; sleeptime.tv_sec = 0; sleeptime.tv_nsec = 1000000; +#endif m_Viewer->realize(); while (!m_Viewer->done() && !m_Quit) { m_Viewer->sync(); @@ -148,7 +162,11 @@ m_Viewer->frame(); m_DynamicGrid->setLook(getCameraTarget(), getCameraPosition()); Py_BEGIN_ALLOW_THREADS; +#ifndef _MSC_VER nanosleep(&sleeptime, 0); +#else + Sleep(1); +#endif Py_END_ALLOW_THREADS; } //m_Viewer->sync(); @@ -249,12 +267,12 @@ } osg::Matrixd inverseMVPW; inverseMVPW.invert(vum); - osg::Vec3 near = osg::Vec3(rx, ry, -1.0) * inverseMVPW; - osg::Vec3 far = osg::Vec3(rx, ry, 1.0) * inverseMVPW; - osg::Vec3 ray = near - far; + osg::Vec3 near_ = osg::Vec3(rx, ry, -1.0) * inverseMVPW; + osg::Vec3 far_ = osg::Vec3(rx, ry, 1.0) * inverseMVPW; + osg::Vec3 ray = near_ - far_; if (ray.z() != 0) { - surface_x = near.x() - near.z() * (ray.x() / ray.z()); - surface_y = near.y() - near.z() * (ray.y() / ray.z()); + surface_x = near_.x() - near_.z() * (ray.x() / ray.z()); + surface_y = near_.y() - near_.z() * (ray.y() / ray.z()); } } } Added: trunk/CSP/CSPSim/Tools/Layout/VisualStudio2003/Layout/Layout.vcproj =================================================================== --- trunk/CSP/CSPSim/Tools/Layout/VisualStudio2003/Layout/Layout.vcproj 2005-02-05 04:08:48 UTC (rev 1459) +++ trunk/CSP/CSPSim/Tools/Layout/VisualStudio2003/Layout/Layout.vcproj 2005-02-05 10:16:18 UTC (rev 1460) @@ -0,0 +1,178 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="7.10" + Name="Layout" + ProjectGUID="{93A0D0F8-4393-42B1-9BB6-B8DB08952FB7}" + Keyword="MakeFileProj"> + <Platforms> + <Platform + Name="Win32"/> + </Platforms> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="Debug" + IntermediateDirectory="Debug" + ConfigurationType="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="../../../../../SimData/Include;$(PYTHON_PATH)/include" + PreprocessorDefinitions="WIN32" + RuntimeLibrary="3" + RuntimeTypeInfo="TRUE" + WarningLevel="3"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="osgd.lib OpenThreadsWin32d.lib osgGAd.lib osgProducerd.lib osgDBd.lib Producerd.lib osgUtild.lib" + OutputFile="../../.bin/$(ProjectName)d.dll" + AdditionalLibraryDirectories="$(PYTHON_PATH)/libs" + OptimizeReferences="2" + ImportLibrary="$(OutDir)/$(TargetName).lib"/> + <Tool + Name="VCMIDLTool"/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCWebDeploymentTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="Release" + IntermediateDirectory="Release" + ConfigurationType="2"> + <Tool + Name="VCCLCompilerTool" + AdditionalIncludeDirectories="../../../../../SimData/Include;$(PYTHON_PATH)/include" + PreprocessorDefinitions="WIN32" + RuntimeLibrary="2" + RuntimeTypeInfo="TRUE" + WarningLevel="3"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="osg.lib OpenThreadsWin32.lib osgGA.lib osgProducer.lib osgDB.lib Producer.lib osgUtil.lib" + OutputFile="../../.bin/$(ProjectName).dll" + AdditionalLibraryDirectories="$(PYTHON_PATH)/libs"/> + <Tool + Name="VCMIDLTool"/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCWebDeploymentTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Source Files" + Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"> + <File + RelativePath="..\..\cLayout_wrap.cpp"> + <FileConfiguration + Name="Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + WarningLevel="2" + UndefinePreprocessorDefinitions="_DEBUG"/> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32"> + <Tool + Name="VCCLCompilerTool" + WarningLevel="2"/> + </FileConfiguration> + </File> + <File + RelativePath="..\..\DynamicGrid.cpp"> + </File> + <File + RelativePath="..\..\FeatureGraph.cpp"> + </File> + <File + RelativePath="..\..\LayoutNodes.cpp"> + </File> + <File + RelativePath="..\..\PickHandler.cpp"> + </File> + <File + RelativePath="..\..\View.cpp"> + </File> + <File + RelativePath="..\..\ViewEventHandler.cpp"> + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl;inc;xsd" + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"> + <File + RelativePath="..\..\cLayout_wrap.h"> + </File> + <File + RelativePath="..\..\DynamicGrid.h"> + </File> + <File + RelativePath="..\..\FeatureGraph.h"> + </File> + <File + RelativePath="..\..\LayoutNodes.h"> + </File> + <File + RelativePath="..\..\PickHandler.h"> + </File> + <File + RelativePath="..\..\View.h"> + </File> + <File + RelativePath="..\..\ViewEventHandler.h"> + </File> + </Filter> + <File + RelativePath="..\..\cLayout.i"> + <FileConfiguration + Name="Release|Win32"> + <Tool + Name="VCCustomBuildTool" + CommandLine="$(SWIG_PATH)\swig -runtime -c++ -python -noexcept -I..\..\..\SimData\Include -I..\..\.. -o ..\..\$(InputName)_wrap.cpp ..\..\$(InputName).i" + Outputs="..\..\$(InputName)_wrap.cpp"/> + </FileConfiguration> + </File> + </Files> + <Globals> + </Globals> +</VisualStudioProject> Added: trunk/CSP/CSPSim/Tools/Layout/VisualStudio2003/VisualStudio.sln =================================================================== --- trunk/CSP/CSPSim/Tools/Layout/VisualStudio2003/VisualStudio.sln 2005-02-05 04:08:48 UTC (rev 1459) +++ trunk/CSP/CSPSim/Tools/Layout/VisualStudio2003/VisualStudio.sln 2005-02-05 10:16:18 UTC (rev 1460) @@ -0,0 +1,21 @@ +Microsoft Visual Studio Solution File, Format Version 8.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Layout", "Layout\Layout.vcproj", "{93A0D0F8-4393-42B1-9BB6-B8DB08952FB7}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + Debug = Debug + Release = Release + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {93A0D0F8-4393-42B1-9BB6-B8DB08952FB7}.Debug.ActiveCfg = Debug|Win32 + {93A0D0F8-4393-42B1-9BB6-B8DB08952FB7}.Debug.Build.0 = Debug|Win32 + {93A0D0F8-4393-42B1-9BB6-B8DB08952FB7}.Release.ActiveCfg = Release|Win32 + {93A0D0F8-4393-42B1-9BB6-B8DB08952FB7}.Release.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal |
From: <sv...@ww...> - 2005-02-05 04:08:58
|
Author: mkrose Date: 2005-02-04 20:08:48 -0800 (Fri, 04 Feb 2005) New Revision: 1459 Added: trunk/CSP/CSPSim/Tools/Layout/cLayout.i trunk/CSP/CSPSim/Tools/Layout/cLoader.i Log: Oops, forgot the swig files. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1459 Added: trunk/CSP/CSPSim/Tools/Layout/cLayout.i =================================================================== --- trunk/CSP/CSPSim/Tools/Layout/cLayout.i 2005-01-31 01:25:00 UTC (rev 1458) +++ trunk/CSP/CSPSim/Tools/Layout/cLayout.i 2005-02-05 04:08:48 UTC (rev 1459) @@ -0,0 +1,97 @@ +// CSP Layout - Copyright 2003-2005 Mark Rose <mk...@us...> +// +// 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, US + +%module(directors="1") cLayout +%{ +#include "View.h" +#include "LayoutNodes.h" +#include "FeatureGraph.h" +#include "InsertDeleteCommand.h" +%} + +%include "typemaps.i" +%include "std_string.i" +%include "std_vector.i" +%include "std_list.i" + +%template(vector_LayoutNodePtr) std::vector<LayoutNode*>; +%template(list_LayoutNodePtr) std::list<LayoutNode*>; + +%feature("director") ViewCallback; +%feature("director") GraphCallback; +%feature("director") LayoutNodeVisitor; + +%typemap(python, in) (int argc, char **argv) +{ + /* Check if is a list */ + if (PyList_Check($input)) + { + int i; + $1 = PyList_Size($input); + $2 = (char **) malloc(($1+1)*sizeof(char *)); + for (i = 0; i < $1; i++) + { + PyObject *o = PyList_GetItem($input,i); + if (PyString_Check(o)) + { + $2[i] = PyString_AsString(PyList_GetItem($input,i)); + } + else + { + PyErr_SetString(PyExc_TypeError,"list must contain strings"); + free($2); + return NULL; + } + } + $2[i] = 0; + } + else + { + PyErr_SetString(PyExc_TypeError,"not a list"); + return NULL; + } +} + +%typemap(python, out) (osg::Vec3) +{ + PyObject* target = PyTuple_New(3); + PyTuple_SetItem(target, 0, PyFloat_FromDouble($1.x())); + PyTuple_SetItem(target, 1, PyFloat_FromDouble($1.y())); + PyTuple_SetItem(target, 2, PyFloat_FromDouble($1.z())); + $result = target; +} + +namespace osg { +class Referenced { +protected: + ~Referenced() { } +}; +} + +// Suppress director warning: +// FeatureGraph.h:30: Warning(515): +// Target language argument 'osg::Matrix const &to_world' discards const +// in director method GraphCallback::onActivate. +// Basically, just be careful not to modify to_world when subclassing +// GraphCallback in Python. +%warnfilter(515); + +%include "LayoutNodes.h" +%include "FeatureGraph.h" +%include "Undo.h" +%include "InsertDeleteCommand.h" +%include "View.h" + Added: trunk/CSP/CSPSim/Tools/Layout/cLoader.i =================================================================== --- trunk/CSP/CSPSim/Tools/Layout/cLoader.i 2005-01-31 01:25:00 UTC (rev 1458) +++ trunk/CSP/CSPSim/Tools/Layout/cLoader.i 2005-02-05 04:08:48 UTC (rev 1459) @@ -0,0 +1,27 @@ +// CSP Layout - Copyright 2003-2005 Mark Rose <mk...@us...> +// +// 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, US + +%module cLoader +%{ +#include "Loader.h" +#include <osg/Node> +%} + +%include "typemaps.i" +%include "std_string.i" + +%include "Loader.h" + |
From: <sv...@ww...> - 2005-01-31 01:25:12
|
Author: mkrose Date: 2005-01-30 17:25:00 -0800 (Sun, 30 Jan 2005) New Revision: 1458 Added: trunk/CSP/CSPSim/Tools/Layout/ trunk/CSP/CSPSim/Tools/Layout/DynamicGrid.cpp trunk/CSP/CSPSim/Tools/Layout/DynamicGrid.h trunk/CSP/CSPSim/Tools/Layout/FeatureGraph.cpp trunk/CSP/CSPSim/Tools/Layout/FeatureGraph.h trunk/CSP/CSPSim/Tools/Layout/Handle.cpp trunk/CSP/CSPSim/Tools/Layout/Handle.h trunk/CSP/CSPSim/Tools/Layout/InsertDeleteCommand.h trunk/CSP/CSPSim/Tools/Layout/LayoutNodes.cpp trunk/CSP/CSPSim/Tools/Layout/LayoutNodes.h trunk/CSP/CSPSim/Tools/Layout/Loader.cpp trunk/CSP/CSPSim/Tools/Layout/Loader.h trunk/CSP/CSPSim/Tools/Layout/PickHandler.cpp trunk/CSP/CSPSim/Tools/Layout/PickHandler.h trunk/CSP/CSPSim/Tools/Layout/SConstruct trunk/CSP/CSPSim/Tools/Layout/Undo.h trunk/CSP/CSPSim/Tools/Layout/View.cpp trunk/CSP/CSPSim/Tools/Layout/View.h trunk/CSP/CSPSim/Tools/Layout/ViewEventHandler.cpp trunk/CSP/CSPSim/Tools/Layout/ViewEventHandler.h trunk/CSP/CSPSim/Tools/Layout/ViewManipulator.h Log: Initial checkin for a GUI theater layout tool. This is only the C++ code, primarily focused on the 3D interface. The 2D GUI and XML loader/saver are implemented and will be submitted separately. Includes a SConstruct script for building under Linux, but still needs a project for for Windows. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1458 Diff omitted (109689 bytes). |
From: <sv...@ww...> - 2005-01-30 23:54:14
|
Author: delta Date: 2005-01-30 15:54:05 -0800 (Sun, 30 Jan 2005) New Revision: 1457 Modified: trunk/CSP/CSPSim/VisualStudio/CSPSimDLL/CSPSimDLL.vcproj Log: Added Source/Theater/IsoCountour.cpp to the build. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1457 Modified: trunk/CSP/CSPSim/VisualStudio/CSPSimDLL/CSPSimDLL.vcproj =================================================================== --- trunk/CSP/CSPSim/VisualStudio/CSPSimDLL/CSPSimDLL.vcproj 2005-01-30 23:42:39 UTC (rev 1456) +++ trunk/CSP/CSPSim/VisualStudio/CSPSimDLL/CSPSimDLL.vcproj 2005-01-30 23:54:05 UTC (rev 1457) @@ -127,7 +127,7 @@ OutputFile="../../Bin/_cCSP.dll" LinkIncremental="1" SuppressStartupBanner="TRUE" - AdditionalLibraryDirectories="../../../SimNet/.bin;../../../lib;"$(PYTHON_PATH)/libs";../../../SimData/SimData;../../../SpatialIndex/.bin;../../../SimCore/.bin" + AdditionalLibraryDirectories="../../../SimNet/.bin;../../../lib;$(PYTHON_PATH)/libs;../../../SimData/SimData;../../../SpatialIndex/.bin;../../../SimCore/.bin" IgnoreDefaultLibraryNames="" GenerateDebugInformation="FALSE" AssemblyDebug="0" @@ -363,6 +363,9 @@ RelativePath="..\..\Source\Theater\FeatureSceneModel.cpp"> </File> <File + RelativePath="..\..\Source\Theater\IsoContour.cpp"> + </File> + <File RelativePath="..\..\Source\Theater\LayoutTransform.cpp"> </File> <File @@ -623,6 +626,9 @@ RelativePath="..\..\Include\Theater\FeatureSceneModel.h"> </File> <File + RelativePath="..\..\Include\Theater\IsoContour.h"> + </File> + <File RelativePath="..\..\Include\Theater\LayoutTransform.h"> </File> <File |
From: <sv...@ww...> - 2005-01-30 23:42:47
|
Author: mkrose Date: 2005-01-30 15:42:39 -0800 (Sun, 30 Jan 2005) New Revision: 1456 Added: trunk/CSP/CSPSim/Include/Theater/IsoContour.h trunk/CSP/CSPSim/Source/Theater/IsoContour.cpp Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Include/Theater/RandomForestModel.h trunk/CSP/CSPSim/Source/SConscript trunk/CSP/CSPSim/Source/Theater/RandomBillboardModel.cpp trunk/CSP/CSPSim/Source/Theater/RandomForestModel.cpp Log: Move IsoContour classes out of RandomBillboardModel.cpp and use them in RandomForestModel.cpp. Update the RandomForestModel interface to be the same as RandomBillboardModel. Fix quad normals for "X" shaped trees in RandomForestModel. These geometries could still use a lot of work (e.g. polygon offset instead of a fixed offset, bump mapped shaders, a skirt for better top-down viewing, etc.) ==> Windows users: add CSPSim/Source/IsoContour.cpp to the build. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1456 Diff omitted (11969 bytes). |
From: <sv...@ww...> - 2005-01-30 22:10:29
|
Author: mkrose Date: 2005-01-30 14:10:22 -0800 (Sun, 30 Jan 2005) New Revision: 1455 Modified: trunk/CSP/tools/build.py Log: SCons build script enhancements: - fix swig dependency tracking. - add a utility class for setting global build configurations. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1455 Modified: trunk/CSP/tools/build.py =================================================================== --- trunk/CSP/tools/build.py 2005-01-30 21:35:45 UTC (rev 1454) +++ trunk/CSP/tools/build.py 2005-01-30 22:10:22 UTC (rev 1455) @@ -400,7 +400,31 @@ SConsEnvironment.Documentation = MakeDocumentation +class GlobalSettings: + def __init__(self, config=None): + self._platform = sys.platform + self._config = config + self._dict = {} + def IsWindows(self): + return self._platform.startswith('win') + def IsLinux(self): + return self._platform.startswith('linux') + def UnsupportedPlatform(self): + print 'Platform "%s" not supported' % self._platform + sys.exit(1) + def __setattr__(self, key, value): + if key.startswith('_'): + self.__dict__[key] = value + else: + self._dict[key] = value + def env(self): + env = SCons.Environment.Environment(**self._dict) + GlobalSetup(env) + if self._config is not None: + env.SetConfig(self._config) + return env + ############################################################################ # ENHANCED SWIG SUPPORT @@ -430,7 +454,7 @@ def AddSwigDep(env): def SwigScanner(node, env, path, arg=None): - cmd = env.subst('$SWIG -MM $_CPPINCFLAGS %s' % str(node)) + cmd = env.subst('$SWIG $SWIGFLAGS $SWIGINCLUDES -MM %s' % str(node)) stdin, stdout, stderr = os.popen3(cmd, 't') deps = ''.join(map(lambda x: x.strip(), stdout.readlines())) deps = map(lambda x: "#/"+x.strip(), deps.split('\\'))[1:] |
From: <sv...@ww...> - 2005-01-30 21:35:53
|
Author: mkrose Date: 2005-01-30 13:35:45 -0800 (Sun, 30 Jan 2005) New Revision: 1454 Modified: trunk/CSP/tools/CSP_bootstrap Log: Clean up the bootstrap loader and add better checking for case errors in the workspace root directory name. Please run './setup.py --force' to install the new loader. (must be run as admin/su) Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1454 Modified: trunk/CSP/tools/CSP_bootstrap =================================================================== --- trunk/CSP/tools/CSP_bootstrap 2005-01-26 10:26:02 UTC (rev 1453) +++ trunk/CSP/tools/CSP_bootstrap 2005-01-30 21:35:45 UTC (rev 1454) @@ -37,26 +37,46 @@ self = sys.modules['CSP'] del sys.modules['CSP'] -case_insensitive = os.name.startswith('win') or os.name.startswith('nt') -if case_insensitive: - tr_case = string.upper -else: - tr_case = lambda x: x +# on windows it isn't uncommon/difficult to accidentally check out +# the repository under 'csp' instead of 'CSP'. we go to some trouble +# here to detect this problem and complain accordingly. this requires +# a case insensitive search for the root directory under windows. +# this isn't necessary (or desirable) under linux, but nevertheless +# we do the same in order to help keep the windows and linux development +# environments in sync. For example, adding a directory 'csp' below the +# root CSP directory is a bad thing, and we will catch it on either +# platform. -# look for the root of the current workspace +# look for the root of the current workspace (first 'CSP' directory +# above cwd). cwd = os.getcwd() parts = cwd.split(os.sep) -if not 'CSP' in map(tr_case, parts): +if not 'CSP' in map(string.upper, parts): + print print 'Error: trying to import CSP from outside of a workspace.' print 'Current working directory is %s' % cwd sys.exit(1) -while tr_case(parts[-1]) != 'CSP': +while parts[-1].upper() != 'CSP': parts = parts[:-1] +# hmm, found some mixed or lower-case variant of 'CSP'. the user +# probably made a mistake when checking out the repository. +if parts[-1] != 'CSP' and parts[-1].upper() == 'CSP': + print + print 'Error: the current workspace appears to be under a directory named "csp"' + print ' ==> %s' % os.path.join(*parts) + print + print 'The correct top-level directory should be all uppercase ("CSP"). You may' + print 'have made a mistake when checking out the repository (which is easy to do' + print 'with TortoiseSVN and other GUI clients). Please rename "csp" to "CSP" and' + print 'try again.' + sys.exit(1) + CSP_PATH = os.path.sep.join(parts[:-1]) ROOT = os.path.join(CSP_PATH, 'CSP') if not os.path.exists(os.path.join(ROOT, '.svn')): + print print 'Warning: %s does not contain .svn and may not be a valid CSP workspace.' % ROOT # load the real CSP package. we strip away the original sys.path to @@ -74,6 +94,7 @@ # cleanup, notify, and pass the error along. del sys.CSP_PATH sys.path = old_path + print print 'Unable to bootstrap a CSP module space from the current working directory.' raise |