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...> - 2004-09-12 22:23:07
|
Author: mkrose Date: 2004-09-12 15:22:59 -0700 (Sun, 12 Sep 2004) New Revision: 1225 Modified: trunk/CSP/make/depend.mk Log: Fix .dep file dependencies so that they are regenerated whenever any file that the source file depends on changes. Otherwise the dep files get stale as headers includes are modified, which can lead to inconsistent/broken builds. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1225 Modified: trunk/CSP/make/depend.mk =================================================================== --- trunk/CSP/make/depend.mk 2004-09-12 02:39:41 UTC (rev 1224) +++ trunk/CSP/make/depend.mk 2004-09-12 22:22:59 UTC (rev 1225) @@ -15,8 +15,9 @@ MKDEP = $(CXX) -M $(CXXFLAGS) SWDEP = $(SWIG) -M $(SWOPTS) DEPSOURCES = $(SOURCES:%=%.cpp.d) $(MESSAGES:%=%.cpp.d) $(INTERFACES:%=%.swigd) -DEPFILES = $(addprefix $(DEPDIR)/,$(DEPSOURCES)) -DEPFILTER := | sed -n 's/^\(.*:\)/.bin\/\1/;p' +DEPFILES := $(addprefix $(DEPDIR)/,$(DEPSOURCES)) +DEPSELF = | sed -n 's/^\(.*\):/\1 $(subst /,\/,$@):/;p' +DEPFILTER := DEPS_MAGIC := $(shell mkdir $(DEPDIR) > /dev/null 2>&1 || :) .PHONY: clean-deps clean-dependencies @@ -35,9 +36,9 @@ $(DEPDIR)/%.d : % @echo "Computing dependencies for $<..." - @echo $(MKDEP) $< $(DEPFILTER) > $@ - @$(MKDEP) $< $(DEPFILTER) > $@ + @echo $(MKDEP) $< $(DEPFILTER) $(DEPSELF) > $@ + @$(MKDEP) $< $(DEPFILTER) $(DEPSELF) > $@ $(DEPDIR)/%.swigd : % @echo "Computing dependencies for $<..." - @$(SWDEP) $(DEPFILTER) -o $(<:.i=_wrap.cpp) $< > $@ + @$(SWDEP) -o $(<:.i=_wrap.cpp) $< $(DEPFILTER) $(DEPSELF) > $@ |
From: <sv...@ww...> - 2004-09-12 02:40:03
|
Author: mkrose Date: 2004-09-11 19:39:41 -0700 (Sat, 11 Sep 2004) New Revision: 1224 Modified: trunk/CSP/SpatialIndex/QuadTree.h trunk/CSP/SpatialIndex/quadtree/QuadTree.cc Log: Add helper functions for writing Points and Regions to ostreams. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1224 Modified: trunk/CSP/SpatialIndex/QuadTree.h =================================================================== --- trunk/CSP/SpatialIndex/QuadTree.h 2004-09-11 15:15:38 UTC (rev 1223) +++ trunk/CSP/SpatialIndex/QuadTree.h 2004-09-12 02:39:41 UTC (rev 1224) @@ -223,13 +223,12 @@ Point _point; public: - /** Construct a new child, given an id number and <i>signed</i> 32-bit - * coordinates. The coordinates are converted to unsigned values used - * internally. + /** Construct a new child, given an id number and <i>unsigned</i> 32-bit + * coordinates. */ - Child(int id, int32 x, int32 y): + Child(int id, uint32 x, uint32 y): _id(id), - _point(Point::fromSigned(x, y)) { + _point(x, y) { } /** Copy ctor. @@ -369,6 +368,8 @@ }; extern std::ostream & operator << (std::ostream &os, QuadTree const &q); +extern std::ostream & operator << (std::ostream &os, Point const &p); +extern std::ostream & operator << (std::ostream &os, Region const &r); } // namespace IQuadTree Modified: trunk/CSP/SpatialIndex/quadtree/QuadTree.cc =================================================================== --- trunk/CSP/SpatialIndex/quadtree/QuadTree.cc 2004-09-11 15:15:38 UTC (rev 1223) +++ trunk/CSP/SpatialIndex/quadtree/QuadTree.cc 2004-09-12 02:39:41 UTC (rev 1224) @@ -349,7 +349,14 @@ return os; } +std::ostream & operator << (std::ostream &os, Point const &p) { + return os << '(' << p.x() << ',' << p.y() << ')'; +} +std::ostream & operator << (std::ostream &os, Region const &r) { + return os << '{' << r.x0() << ',' << r.y0() << ',' << r.x1() << ',' << r.y1() << '}'; +} + } // namespace IQuadTree } // namespace SpatialIndex |
From: <sv...@ww...> - 2004-09-11 15:15:45
|
Author: mkrose Date: 2004-09-11 08:15:38 -0700 (Sat, 11 Sep 2004) New Revision: 1223 Modified: trunk/CSP/CSPSim/Bin/TestObjects.py trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Data/XML/theater/balkan/objectives.xml Log: Adjusted airbase position slightly to move it to a flat area. Moved the initial position of the test aircraft to compensate. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1223 Modified: trunk/CSP/CSPSim/Bin/TestObjects.py =================================================================== --- trunk/CSP/CSPSim/Bin/TestObjects.py 2004-08-26 07:44:17 UTC (rev 1222) +++ trunk/CSP/CSPSim/Bin/TestObjects.py 2004-09-11 15:15:38 UTC (rev 1223) @@ -38,8 +38,8 @@ v = SimData.Vector3 m = SimData.LLA() vehicle = app.createVehicle - vehicle("sim:vehicles.aircraft.m2k", v(-29413, -12020, 88.5), v(0, 0, 0), v(0.0, 0.0, 179.0)) - vehicle("sim:vehicles.aircraft.m2k", v(-29413, -12020, 1000), v(0, 100.0, 0), v(5.0, 0.0, 0.0)) + vehicle("sim:vehicles.aircraft.m2k", v(-29413, -10980, 88.5), v(0, 0, 0), v(0.0, 0.0, 179.0)) + vehicle("sim:vehicles.aircraft.m2k", v(-29413, -10980, 1000), v(0, 100.0, 0), v(5.0, 0.0, 0.0)) def createNCA(app): v = SimData.Vector3 Modified: trunk/CSP/CSPSim/CHANGES.current =================================================================== --- trunk/CSP/CSPSim/CHANGES.current 2004-08-26 07:44:17 UTC (rev 1222) +++ trunk/CSP/CSPSim/CHANGES.current 2004-09-11 15:15:38 UTC (rev 1223) @@ -1,10 +1,16 @@ Version 0.4.0 (in progress) =========================== +2004-09-11: onsight + * Adjusted airbase position slightly to move it to a flat area. + Moved the initial position of the test aircraft to compensate. + (You'll need to recompile the dar file, otherwise the aircraft + will be in the wrong place initially.) + 2004-08-24: delta - * Used simdata::clampTo instead of std::min/max to avoid the usual - macro conflict on vs. - + * Used simdata::clampTo instead of std::min/max to avoid the usual + macro conflict on vs. + * Avoid a minor warning with an implicit cats from double to float. 2004-08-08: onsight Modified: trunk/CSP/CSPSim/Data/XML/theater/balkan/objectives.xml =================================================================== --- trunk/CSP/CSPSim/Data/XML/theater/balkan/objectives.xml 2004-08-26 07:44:17 UTC (rev 1222) +++ trunk/CSP/CSPSim/Data/XML/theater/balkan/objectives.xml 2004-09-11 15:15:38 UTC (rev 1223) @@ -10,7 +10,7 @@ the theater. --> <Object class="Objective"> <Path name="model">airbase</Path> - <LLA name="position">41.53 15.65 0.0</LLA> + <LLA name="position">41.54 15.65 0.0</LLA> <!--LLA name="position">41.521 15.655 0.0</LLA--> <Float name="orientation">0</Float> <Int name="strategic_value_modifier">0</Int> |
From: <sv...@ww...> - 2004-08-26 07:44:24
|
Author: mkrose Date: 2004-08-26 00:44:17 -0700 (Thu, 26 Aug 2004) New Revision: 1222 Modified: trunk/CSP/SimNet/HandlerSet.h trunk/CSP/SimNet/Makefile trunk/CSP/SimNet/MessageHandler.h trunk/CSP/SimNet/MessageQueue.h trunk/CSP/SimNet/NetBase.h trunk/CSP/SimNet/NetworkInterface.cpp trunk/CSP/SimNet/NetworkInterface.h trunk/CSP/SimNet/NetworkMessage.h trunk/CSP/SimNet/NetworkNode.cpp trunk/CSP/SimNet/NetworkNode.h trunk/CSP/SimNet/PacketDecoder.h trunk/CSP/SimNet/PeerInfo.cpp trunk/CSP/SimNet/PeerInfo.h trunk/CSP/SimNet/RecordCodec.cpp trunk/CSP/SimNet/Sockets.h trunk/CSP/SimNet/StopWatch.h Log: - Refactored makefile in terms of make/*.mk shared makefile components. - Fixed numerous compiler warnings. - Added basic support for initial connection handshaking. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1222 Diff omitted (30502 bytes). |
From: <sv...@ww...> - 2004-08-26 07:37:49
|
Author: mkrose Date: 2004-08-26 00:37:43 -0700 (Thu, 26 Aug 2004) New Revision: 1221 Modified: trunk/CSP/SimData/CHANGES.current trunk/CSP/SimData/Include/SimData/TaggedRecord.h trunk/CSP/SimData/Include/SimData/TaggedRecordRegistry.h trunk/CSP/SimData/Include/SimData/Trace.h trunk/CSP/SimData/Tools/TaggedRecordCompiler/BaseTypes.py trunk/CSP/SimData/Tools/TaggedRecordCompiler/trc.py Log: Clean up some compiler warnings, and a few misc. fixes. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1221 Modified: trunk/CSP/SimData/CHANGES.current =================================================================== --- trunk/CSP/SimData/CHANGES.current 2004-08-26 07:29:53 UTC (rev 1220) +++ trunk/CSP/SimData/CHANGES.current 2004-08-26 07:37:43 UTC (rev 1221) @@ -1,6 +1,9 @@ Version 0.4.0 (in progress) =========================== +2004-08-25: onsight + * Clean up some compiler warnings, and a few misc. fixes. + 2004-08-08: onsight * Removed restriction on serializing null+none Links. Added a validation callback in ObjectInterface to catch null+none Links Modified: trunk/CSP/SimData/Include/SimData/TaggedRecord.h =================================================================== --- trunk/CSP/SimData/Include/SimData/TaggedRecord.h 2004-08-26 07:29:53 UTC (rev 1220) +++ trunk/CSP/SimData/Include/SimData/TaggedRecord.h 2004-08-26 07:37:43 UTC (rev 1221) @@ -424,8 +424,8 @@ _lasttag = _tagstack.top(); _tagstack.pop(); } - int readLength() { - int length = 0; + unsigned int readLength() { + unsigned int length = 0; int sh = 0; unsigned char x; do { Modified: trunk/CSP/SimData/Include/SimData/TaggedRecordRegistry.h =================================================================== --- trunk/CSP/SimData/Include/SimData/TaggedRecordRegistry.h 2004-08-26 07:29:53 UTC (rev 1220) +++ trunk/CSP/SimData/Include/SimData/TaggedRecordRegistry.h 2004-08-26 07:37:43 UTC (rev 1221) @@ -90,7 +90,8 @@ * * @returns 0 if the interface is not found. */ - Ref<TaggedRecord> createRecord(hasht key) const { + Ref<TaggedRecord> createRecord(TaggedRecord::Id id) const { + HashT key(static_cast<uint32>(id), static_cast<uint32>(id>>32)); FactoryIdMap::const_iterator it = _id_map.find(key); if (it != _id_map.end()) return it->second->create(); return 0; @@ -109,7 +110,8 @@ * * @param key The object class hash. */ - bool hasFactory(hasht key) const { + bool hasFactory(TaggedRecord::Id id) const { + HashT key(static_cast<uint32>(id), static_cast<uint32>(id>>32)); FactoryIdMap::const_iterator it = _id_map.find(key); return it != _id_map.end(); } @@ -141,8 +143,10 @@ assert(factory != 0); assert(!hasFactory(factory->getName())); SIMDATA_LOG(LOG_ALL, LOG_INFO, "Registering TaggedRecordFactory<" << factory->getName() << "> [" << factory->getId() << "]"); + TaggedRecord::Id id = factory->getId(); + HashT key(static_cast<uint32>(id), static_cast<uint32>(id>>32)); _map[factory->getName()] = factory; - _id_map[factory->getId()] = factory; + _id_map[key] = factory; } TaggedRecordRegistry() { } Modified: trunk/CSP/SimData/Include/SimData/Trace.h =================================================================== --- trunk/CSP/SimData/Include/SimData/Trace.h 2004-08-26 07:29:53 UTC (rev 1220) +++ trunk/CSP/SimData/Include/SimData/Trace.h 2004-08-26 07:37:43 UTC (rev 1221) @@ -136,12 +136,12 @@ #if defined(__GNUC__) && !defined(__MINGW32__) private: - static void __sigsegv(int sign) { + static void __sigsegv(int /*sig_n*/) { getTrace().error(3, true); abort(); } - static void __sigabort(int sign) { + static void __sigabort(int /*sig_n*/) { getTrace().error(3); } Modified: trunk/CSP/SimData/Tools/TaggedRecordCompiler/BaseTypes.py =================================================================== --- trunk/CSP/SimData/Tools/TaggedRecordCompiler/BaseTypes.py 2004-08-26 07:29:53 UTC (rev 1220) +++ trunk/CSP/SimData/Tools/TaggedRecordCompiler/BaseTypes.py 2004-08-26 07:37:43 UTC (rev 1221) @@ -376,16 +376,16 @@ def dump_save(self, format): format.write('writer.writeLength(%s.size());' % self.varname()) - format.write('for (int i=0; i < %s.size(); ++i) {' % self.varname()) + format.write('for (unsigned i=0; i < %s.size(); ++i) {' % self.varname()) format.indent() self.child.dump_save(format) format.dedent() format.write('}') def dump_load(self, format): - format.write('int %s_len = reader.readLength();' % self.id) + format.write('unsigned %s_len = reader.readLength();' % self.id) format.write('%s.resize(%s_len);' % (self.varname(), self.id)) - format.write('for (int i=0; i < %s_len; ++i) {' % self.id) + format.write('for (unsigned i=0; i < %s_len; ++i) {' % self.id) format.indent() self.child.dump_load(format) format.dedent() @@ -394,7 +394,7 @@ def dump_print(self, format): format.write('os << "[\\n";') format.write('++indent;') - format.write('for (int i=0; i < %s.size(); ++i) {' % self.varname()) + format.write('for (unsigned i=0; i < %s.size(); ++i) {' % self.varname()) format.indent() self.child.dump_print(format) format.write('os << "\\n";') @@ -434,7 +434,8 @@ def dump_source(self, format=None, file=None): if not format: format = CodeFormat.Format(file=file) - format.write('int %s::m_CustomId = 0;' % (self.id)) + custom_id = int(self.opts.get('ID', '0')) + format.write('int %s::m_CustomId = %d;' % (self.id, custom_id)) format.write('const %s::Id %s::_Id;' % (self.id, self.id)) format.write('namespace { simdata::TaggedRecordFactory<%s> __%s_factory; }' % (self.id, self.id)) Modified: trunk/CSP/SimData/Tools/TaggedRecordCompiler/trc.py =================================================================== --- trunk/CSP/SimData/Tools/TaggedRecordCompiler/trc.py 2004-08-26 07:29:53 UTC (rev 1220) +++ trunk/CSP/SimData/Tools/TaggedRecordCompiler/trc.py 2004-08-26 07:37:43 UTC (rev 1221) @@ -113,6 +113,8 @@ self.error('syntax error') if trim.startswith('//'): continue + idx = trim.rfind('//') + if idx >= 0: trim = trim[:idx] header = 0 while trim: rest = '' |
From: <sv...@ww...> - 2004-08-26 07:30:01
|
Author: mkrose Date: 2004-08-26 00:29:53 -0700 (Thu, 26 Aug 2004) New Revision: 1220 Added: trunk/CSP/make/ trunk/CSP/make/bindir.mk trunk/CSP/make/clean.mk trunk/CSP/make/depend.mk trunk/CSP/make/doxygen.mk trunk/CSP/make/flags.mk trunk/CSP/make/init.mk trunk/CSP/make/rules.mk trunk/CSP/make/standard.mk Log: Centralize some of the makefile functionality. Will integrate into the various submakes eventually. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1220 Added: trunk/CSP/make/bindir.mk =================================================================== --- trunk/CSP/make/bindir.mk 2004-08-25 15:11:13 UTC (rev 1219) +++ trunk/CSP/make/bindir.mk 2004-08-26 07:29:53 UTC (rev 1220) @@ -0,0 +1,21 @@ +# create object files in a separate directory + +BINDIR = .bin +BIN_MAGIC := $(shell mkdir $(BINDIR) > /dev/null 2>&1 || :) + +# dependecy rules need to refer to the objects in the bindir +DEPFILTER:=$(DEPFILTER) | sed -n 's/^\(.*:\)/$(BINDIR)\/\1/;p' + +.PHONY: clean-objects + +CLEAN:=$(CLEAN) clean-objects + +clean-objects: + $(RM) -r $(RMFLAGS) $(BINDIR) + +OBJECTS = $(SOURCES:%=$(BINDIR)/%.o) +MSGOBJS = $(MESSAGES:%=$(BINDIR)/%.o) + +$(BINDIR)/%.o: %.cpp + $(CXX) -o $@ -c $(CXXFLAGS) $< + Added: trunk/CSP/make/clean.mk =================================================================== --- trunk/CSP/make/clean.mk 2004-08-25 15:11:13 UTC (rev 1219) +++ trunk/CSP/make/clean.mk 2004-08-26 07:29:53 UTC (rev 1220) @@ -0,0 +1,7 @@ +# trivial clean rule; triggers all targets that have been added +# to $(CLEAN) + +.PHONY: clean + +clean: $(CLEAN) + Added: trunk/CSP/make/depend.mk =================================================================== --- trunk/CSP/make/depend.mk 2004-08-25 15:11:13 UTC (rev 1219) +++ trunk/CSP/make/depend.mk 2004-08-26 07:29:53 UTC (rev 1220) @@ -0,0 +1,43 @@ +# Dependency tracking for c/c++/swig files. +# +# Notes: +# Include after default rule is defined, and make 'clean' +# depend on 'clean-deps'. +# +# Inputs: +# SOURCES: list of source files to track (no extensions) +# MESSAGES: list of messages descriptions to track (no extensions) +# INTERFACES: list of swig interfaces to track (no extensions) + + +DEPDIR = .dep + +MKDEP = $(CXX) -M $(CXXFLAGS) +SWDEP = $(SWIG) -M $(SWOPTS) +DEPSOURCES = $(SOURCES:%=%.cpp.d) $(MESSAGES:%=%.cpp.d) $(INTERFACES:%=%.swigd) +DEPFILES = $(addprefix $(DEPDIR)/,$(DEPSOURCES)) +DEPFILTER := | sed -n 's/^\(.*:\)/.bin\/\1/;p' +DEPS_MAGIC := $(shell mkdir $(DEPDIR) > /dev/null 2>&1 || :) + +.PHONY: clean-deps clean-dependencies + +CLEAN:=$(CLEAN) clean-deps + +clean-deps clean-dependencies: + $(RM) -r $(RMFLAGS) $(DEPDIR) + +ifeq ($(findstring clean,$(MAKECMDGOALS)),) +ifneq ($(strip $(DEPFILES)),) +-include $(DEPFILES) +endif +endif + + +$(DEPDIR)/%.d : % + @echo "Computing dependencies for $<..." + @echo $(MKDEP) $< $(DEPFILTER) > $@ + @$(MKDEP) $< $(DEPFILTER) > $@ + +$(DEPDIR)/%.swigd : % + @echo "Computing dependencies for $<..." + @$(SWDEP) $(DEPFILTER) -o $(<:.i=_wrap.cpp) $< > $@ Added: trunk/CSP/make/doxygen.mk =================================================================== --- trunk/CSP/make/doxygen.mk 2004-08-25 15:11:13 UTC (rev 1219) +++ trunk/CSP/make/doxygen.mk 2004-08-26 07:29:53 UTC (rev 1220) @@ -0,0 +1,19 @@ +# rules to run doxygen and clean up the documentation directory +# +# Doxyfile should exist in the current directory. Documentation +# will be generated in ./.dox/ + +DOCDIR = .dox + +DOC_MAGIC := $(shell mkdir $(DOCDIR) > /dev/null 2>&1 || :) + +.PHONY: clean-docs clean-dox clean-doc dox docs doc + +CLEAN:=$(CLEAN) clean-docs + +clean-docs clean-dox clean-doc: + $(RM) -r $(RMFLAGS) $(DOCDIR) + +dox docs doc: + @echo "Generating documentation..." + doxygen Added: trunk/CSP/make/flags.mk =================================================================== --- trunk/CSP/make/flags.mk 2004-08-25 15:11:13 UTC (rev 1219) +++ trunk/CSP/make/flags.mk 2004-08-26 07:29:53 UTC (rev 1220) @@ -0,0 +1,8 @@ +# standard build flags + +INCLUDE = -I.. -I../SimData/Include -I/usr/include/cc++2 +CXXFLAGS = $(INCLUDE) -g -O2 -W -Wall -pedantic -Wno-long-long + +SIMNET_LIB = -L$(TOPDIR)/SimNet -lSimNet +SIMDATA_LIB = -L$(TOPDIR)/SimData/SimData -lSimData + Added: trunk/CSP/make/init.mk =================================================================== --- trunk/CSP/make/init.mk 2004-08-25 15:11:13 UTC (rev 1219) +++ trunk/CSP/make/init.mk 2004-08-26 07:29:53 UTC (rev 1220) @@ -0,0 +1,4 @@ + +CLEAN= +DEPFILTER= + Added: trunk/CSP/make/rules.mk =================================================================== --- trunk/CSP/make/rules.mk 2004-08-25 15:11:13 UTC (rev 1219) +++ trunk/CSP/make/rules.mk 2004-08-26 07:29:53 UTC (rev 1220) @@ -0,0 +1,8 @@ +# specialty build rules + +%.cpp %.h: %.net + ../SimData/Tools/TaggedRecordCompiler/trc.py $< + +%_wrap.cpp %.py: %.i + $(SWIG) $(SWOPTS) -o $@ $< + Added: trunk/CSP/make/standard.mk =================================================================== --- trunk/CSP/make/standard.mk 2004-08-25 15:11:13 UTC (rev 1219) +++ trunk/CSP/make/standard.mk 2004-08-26 07:29:53 UTC (rev 1220) @@ -0,0 +1,28 @@ +# Standard Makefile includes +# +# Notes: +# This file must be included after defining the source +# files with SOURCES, MESSAGES, INTERFACES, etc. +# +# Example: +# +# TOPDIR = ... +# SOURCES = ... +# INTERFACES = ... +# +# include $(TOPDIR)/make/standard.mk +# +# custom targets: +# rules... +# + +.PHONY: all +default: all + +include $(TOPDIR)/make/init.mk +include $(TOPDIR)/make/flags.mk +include $(TOPDIR)/make/depend.mk +include $(TOPDIR)/make/bindir.mk +include $(TOPDIR)/make/doxygen.mk +include $(TOPDIR)/make/clean.mk +include $(TOPDIR)/make/rules.mk |
From: <sv...@ww...> - 2004-08-25 15:11:24
|
Author: mkrose Date: 2004-08-25 08:11:13 -0700 (Wed, 25 Aug 2004) New Revision: 1219 Modified: trunk/CSP/CSPSim/Include/DynamicObject.h trunk/CSP/CSPSim/Include/SimObject.h trunk/CSP/CSPSim/Source/AircraftObject.cpp trunk/CSP/CSPSim/Source/DynamicObject.cpp trunk/CSP/CSPSim/Source/SimObject.cpp trunk/CSP/CSPSim/Source/TankObject.cpp trunk/CSP/CSPSim/Source/Theater/FeatureGroup.cpp Log: First of several incremental changes to the SimObject api, retaining backwards compatability for now. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1219 Diff omitted (14488 bytes). |
From: <sv...@ww...> - 2004-08-25 05:15:32
|
Author: mkrose Date: 2004-08-24 22:15:25 -0700 (Tue, 24 Aug 2004) New Revision: 1218 Modified: trunk/CSP/SpatialIndex/QuadTree.h trunk/CSP/SpatialIndex/quadtree/QuadTree.cc Log: Slight quadtree api change to pass child references/pointers instead of ids and coordinates. Exposed a clear() method to remove the contents of a quadtree. Disabled the update() method, which turns out to be fairly dangerous for children stored in multiple quadtrees. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1218 Diff omitted (12100 bytes). |
From: <sv...@ww...> - 2004-08-24 17:59:48
|
Author: delta Date: 2004-08-24 10:59:41 -0700 (Tue, 24 Aug 2004) New Revision: 1217 Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Data/CSPSim.ini trunk/CSP/CSPSim/Source/LandingGear.cpp Log: Cosmetic changes. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1217 Modified: trunk/CSP/CSPSim/CHANGES.current =================================================================== --- trunk/CSP/CSPSim/CHANGES.current 2004-08-21 23:40:37 UTC (rev 1216) +++ trunk/CSP/CSPSim/CHANGES.current 2004-08-24 17:59:41 UTC (rev 1217) @@ -1,6 +1,12 @@ Version 0.4.0 (in progress) =========================== +2004-08-24: delta + * Used simdata::clampTo instead of std::min/max to avoid the usual + macro conflict on vs. + + * Avoid a minor warning with an implicit cats from double to float. + 2004-08-08: onsight * Clamp throttle to [0,1] when using keyboard controls (was [-1,1]). Modified: trunk/CSP/CSPSim/Data/CSPSim.ini =================================================================== --- trunk/CSP/CSPSim/Data/CSPSim.ini 2004-08-21 23:40:37 UTC (rev 1216) +++ trunk/CSP/CSPSim/Data/CSPSim.ini 2004-08-24 17:59:41 UTC (rev 1217) @@ -49,11 +49,10 @@ ;Date = 2003-05-15 14:19:30 [Networking] -UseNetworking = true +UseNetworking = false LocalMessagePort = 3150 LocalMessageHost = 127.0.0.1 RemoteMessagePort = 3160 RemoteMessageHost = 127.0.0.1 - Modified: trunk/CSP/CSPSim/Source/LandingGear.cpp =================================================================== --- trunk/CSP/CSPSim/Source/LandingGear.cpp 2004-08-21 23:40:37 UTC (rev 1216) +++ trunk/CSP/CSPSim/Source/LandingGear.cpp 2004-08-24 17:59:41 UTC (rev 1217) @@ -85,7 +85,7 @@ m_BrakeFriction = 1.0; m_BrakeSlip = 0.8; m_BrakeTemperature = 300.0; - m_RollingFriction.set(0.02, 0.002); + m_RollingFriction.set(0.02f, 0.002f); m_TireFriction = 0.8; m_TireSkidFriction = 0.6; m_TireStaticFriction = 1.0; @@ -175,7 +175,7 @@ // steering linkage (low pass filtered, XXX ad-hoc time constant) double f = dt*5.0; if (f > 1.0) f = 1.0; - double newBrake = std::min(1.0, std::max(0.0, m_BrakeSetting + m_BrakeSteer)); + double newBrake = simdata::clampTo(m_BrakeSetting + m_BrakeSteer,0.0,1.0); m_Brake = m_Brake * (1.0-f) + newBrake * f; if (m_Brake < 0.0) m_Brake = 0.0; if (m_Brake > 1.0) m_Brake = 1.0; |
From: <sv...@ww...> - 2004-08-21 23:40:50
|
Author: mkrose Date: 2004-08-21 16:40:37 -0700 (Sat, 21 Aug 2004) New Revision: 1216 Added: trunk/CSP/SpatialIndex/QuadTree.h trunk/CSP/SpatialIndex/quadtree/ trunk/CSP/SpatialIndex/quadtree/QuadTree.cc trunk/CSP/SpatialIndex/quadtree/makefile Modified: trunk/CSP/SpatialIndex/makefile Log: Implemented a quadtree over 32-bit integer coordinates. It doesn't fit into the SIL interface, which uses floating point coordinates, but this seems to be the best place to put it for now. The quadtree supports inserting, updating, and removing point-like elements, and querying over rectangular regions. One motivation for using a quadtree instead of an R*-tree is that updates (for moving objects) can be performed much more quickly. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1216 Diff omitted (22746 bytes). |
From: <sv...@ww...> - 2004-08-20 04:51:53
|
Author: mkrose Date: 2004-08-19 21:51:46 -0700 (Thu, 19 Aug 2004) New Revision: 1215 Removed: trunk/CSP/SpatialIndex/libspatialindex.a Log: Deleting binary library checked in by mistake. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1215 Deleted: trunk/CSP/SpatialIndex/libspatialindex.a =================================================================== (Binary files differ) |
From: <sv...@ww...> - 2004-08-20 04:50:56
|
Author: mkrose Date: 2004-08-19 21:50:46 -0700 (Thu, 19 Aug 2004) New Revision: 1214 Added: trunk/CSP/SpatialIndex/ trunk/CSP/SpatialIndex/Point.h trunk/CSP/SpatialIndex/README.txt trunk/CSP/SpatialIndex/Region.h trunk/CSP/SpatialIndex/SpatialIndex.h trunk/CSP/SpatialIndex/TimePoint.h trunk/CSP/SpatialIndex/TimeRegion.h trunk/CSP/SpatialIndex/copying trunk/CSP/SpatialIndex/libspatialindex.a trunk/CSP/SpatialIndex/makefile trunk/CSP/SpatialIndex/rtree/ trunk/CSP/SpatialIndex/rtree/Index.cc trunk/CSP/SpatialIndex/rtree/Index.h trunk/CSP/SpatialIndex/rtree/Leaf.cc trunk/CSP/SpatialIndex/rtree/Leaf.h trunk/CSP/SpatialIndex/rtree/Node.cc trunk/CSP/SpatialIndex/rtree/Node.h trunk/CSP/SpatialIndex/rtree/PointerPoolNode.h trunk/CSP/SpatialIndex/rtree/RTree.cc trunk/CSP/SpatialIndex/rtree/RTree.h trunk/CSP/SpatialIndex/rtree/Statistics.cc trunk/CSP/SpatialIndex/rtree/Statistics.h trunk/CSP/SpatialIndex/rtree/makefile trunk/CSP/SpatialIndex/spatialindex/ trunk/CSP/SpatialIndex/spatialindex/Point.cc trunk/CSP/SpatialIndex/spatialindex/PointerPool.h trunk/CSP/SpatialIndex/spatialindex/PoolPointer.h trunk/CSP/SpatialIndex/spatialindex/Region.cc trunk/CSP/SpatialIndex/spatialindex/SmartPointer.h trunk/CSP/SpatialIndex/spatialindex/SpatialIndexImpl.cc trunk/CSP/SpatialIndex/spatialindex/SpatialIndexImpl.h trunk/CSP/SpatialIndex/spatialindex/TimePoint.cc trunk/CSP/SpatialIndex/spatialindex/TimeRegion.cc trunk/CSP/SpatialIndex/spatialindex/makefile trunk/CSP/SpatialIndex/storagemanager/ trunk/CSP/SpatialIndex/storagemanager/Buffer.cc trunk/CSP/SpatialIndex/storagemanager/Buffer.h trunk/CSP/SpatialIndex/storagemanager/DiskStorageManager.cc trunk/CSP/SpatialIndex/storagemanager/DiskStorageManager.h trunk/CSP/SpatialIndex/storagemanager/MemoryStorageManager.cc trunk/CSP/SpatialIndex/storagemanager/MemoryStorageManager.h trunk/CSP/SpatialIndex/storagemanager/RandomEvictionsBuffer.cc trunk/CSP/SpatialIndex/storagemanager/RandomEvictionsBuffer.h trunk/CSP/SpatialIndex/storagemanager/StorageManager.cc trunk/CSP/SpatialIndex/storagemanager/StorageManager.h trunk/CSP/SpatialIndex/storagemanager/makefile trunk/CSP/SpatialIndex/test.dat.dat trunk/CSP/SpatialIndex/test.dat.idx Log: Add Spatial Index Library (v0.62b), Copyright 2002 Navel Ltd. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1214 Diff omitted (267148 bytes). |
From: <sv...@ww...> - 2004-08-08 20:06:56
|
Author: mkrose Date: 2004-08-08 13:06:50 -0700 (Sun, 08 Aug 2004) New Revision: 1213 Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Data/CSPSim.ini trunk/CSP/CSPSim/Data/XML/theater/balkan/airbase.xml Log: Clean up default ini file a bit. Move trees off of the runway. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1213 Modified: trunk/CSP/CSPSim/CHANGES.current =================================================================== --- trunk/CSP/CSPSim/CHANGES.current 2004-08-08 20:04:22 UTC (rev 1212) +++ trunk/CSP/CSPSim/CHANGES.current 2004-08-08 20:06:50 UTC (rev 1213) @@ -8,6 +8,10 @@ compatibility before assigning. Assigning incompatible Ref types now throws an exception (SimData). + * Clean up default ini file a bit. + + * Move trees off of the runway. + 2004-08-07: onsight * Cleaned up tree images a bit to remove purple pixels. Converted tree0.rgba to png. Adjusted the aspect ratios slightly. Modified: trunk/CSP/CSPSim/Data/CSPSim.ini =================================================================== --- trunk/CSP/CSPSim/Data/CSPSim.ini 2004-08-08 20:04:22 UTC (rev 1212) +++ trunk/CSP/CSPSim/Data/CSPSim.ini 2004-08-08 20:06:50 UTC (rev 1213) @@ -41,19 +41,19 @@ MudBubbleRadius = 40000 AirBubbleRadius = 80000 VisualRadius = 40000 +; balkan theater (demeter) +Theater = sim:theater.balkan Date = 2004-05-09 12:00:00 +; northern CA theater (chunkedLod) +;Theater = sim:theater.nca +;Date = 2003-05-15 14:19:30 [Networking] UseNetworking = true LocalMessagePort = 3150 LocalMessageHost = 127.0.0.1 RemoteMessagePort = 3160 -RemoteMessageHost = 82.101.7.217 -Theater = sim:theater.balkan +RemoteMessageHost = 127.0.0.1 -; balkan theater (demeter) -; northern CA theater (chunkedLod) -;Theater = sim:theater.nca -;Date = 2003-05-15 14:19:30 Modified: trunk/CSP/CSPSim/Data/XML/theater/balkan/airbase.xml =================================================================== --- trunk/CSP/CSPSim/Data/XML/theater/balkan/airbase.xml 2004-08-08 20:04:22 UTC (rev 1212) +++ trunk/CSP/CSPSim/Data/XML/theater/balkan/airbase.xml 2004-08-08 20:06:50 UTC (rev 1213) @@ -22,7 +22,7 @@ </Object> <Object class="FeatureLayout"> <Path name="model">forest</Path> - <Float name="x">100</Float> + <Float name="x">150</Float> <Float name="y">-200</Float> <Float name="orientation">0</Float> </Object> |
From: <sv...@ww...> - 2004-08-08 20:04:28
|
Author: mkrose Date: 2004-08-08 13:04:22 -0700 (Sun, 08 Aug 2004) New Revision: 1212 Modified: trunk/CSP/CSPSim/Source/Systems/AircraftInputSystem.cpp Log: Oops, forgot to check in a file. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1212 Modified: trunk/CSP/CSPSim/Source/Systems/AircraftInputSystem.cpp =================================================================== --- trunk/CSP/CSPSim/Source/Systems/AircraftInputSystem.cpp 2004-08-08 18:45:01 UTC (rev 1211) +++ trunk/CSP/CSPSim/Source/Systems/AircraftInputSystem.cpp 2004-08-08 20:04:22 UTC (rev 1212) @@ -31,7 +31,7 @@ DEFINE_INPUT_INTERFACE(AircraftInputSystem); AircraftInputSystem::AircraftInputSystem(): - m_ThrottleInput(0.2) + m_ThrottleInput(0.2 /*rate*/, 1.0 /*decay*/, 0.0 /*min*/, 1.0 /*max*/) { } |
From: <sv...@ww...> - 2004-08-08 18:45:08
|
Author: mkrose Date: 2004-08-08 11:45:01 -0700 (Sun, 08 Aug 2004) New Revision: 1211 Modified: trunk/CSP/SimData/CHANGES.current trunk/CSP/SimData/Include/SimData/TaggedRecord.h trunk/CSP/SimData/Include/SimData/Uniform.h trunk/CSP/SimData/Tools/TaggedRecordCompiler/BaseTypes.py Log: Added int64 and uint64 types. HashT already served this purpose for the most part, but could not be used in switch statements (which are handy for message decoding). Changed the tagged record compiler to generate uint64 ids. The types should work on both win32 and gnu/linux. Use the SIMDATA_LL and SIMDATA_ULL macros for defining 64-bit constants in a platform neutral way. Note the int64 and uint64 have not been added to the Reader/Writer interfaces yet. Cleanup up tagged record generation slightly to avoid warning messages under g++ (extra comma at end of an enum list). Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1211 Modified: trunk/CSP/SimData/CHANGES.current =================================================================== --- trunk/CSP/SimData/CHANGES.current 2004-08-08 18:39:29 UTC (rev 1210) +++ trunk/CSP/SimData/CHANGES.current 2004-08-08 18:45:01 UTC (rev 1211) @@ -17,6 +17,17 @@ * Made static thread methods inline to avoid declaring them in multiple translation units (silences a g++ warning). + * Added int64 and uint64 types. HashT already served this purpose for the + most part, but could not be used in switch statements (which are handy + for message decoding). Changed the tagged record compiler to generate + uint64 ids. The types should work on both win32 and gnu/linux. Use + the SIMDATA_LL and SIMDATA_ULL macros for defining 64-bit constants in + a platform neutral way. Note the int64 and uint64 have not been added + to the Reader/Writer interfaces yet. + + * Cleanup up tagged record generation slightly to avoid warning messages + under g++ (extra comma at end of an enum list). + 2004-07-26: delta * Removed some not needed SIMDATA_EXPORT for vs 7.1. Modified: trunk/CSP/SimData/Include/SimData/TaggedRecord.h =================================================================== --- trunk/CSP/SimData/Include/SimData/TaggedRecord.h 2004-08-08 18:39:29 UTC (rev 1210) +++ trunk/CSP/SimData/Include/SimData/TaggedRecord.h 2004-08-08 18:45:01 UTC (rev 1211) @@ -57,11 +57,7 @@ NAMESPACE_SIMDATA -// use our own, platform-neutral int64 representation -// TODO the base class (hasht) should probably renamed. -typedef hasht int64; - /** Simple Writer class for serializing to a memory buffer. */ class BufferWriter: public Writer { @@ -94,6 +90,7 @@ virtual Writer & operator<<(int16 const x) { SIMDATA_BW_COPY } virtual Writer & operator<<(int32 const x) { SIMDATA_BW_COPY } virtual Writer & operator<<(int64 const x) { SIMDATA_BW_COPY } + virtual Writer & operator<<(hasht const x) { SIMDATA_BW_COPY } virtual Writer & operator<<(uint8 const x) { SIMDATA_BW_COPY } virtual Writer & operator<<(uint16 const x) { SIMDATA_BW_COPY } virtual Writer & operator<<(uint32 const x) { SIMDATA_BW_COPY } @@ -101,7 +98,7 @@ virtual Writer & operator<<(double const x) { SIMDATA_BW_COPY } virtual Writer & operator<<(bool const x) { SIMDATA_BW_COPY } virtual Writer & operator<<(hasht const &x) { SIMDATA_BW_COPY } - virtual Writer & operator<<(char const *x) { + virtual Writer & operator<<(char const *) { assert(0); return *this; } @@ -146,13 +143,14 @@ virtual Reader & operator>>(int16 &x) { SIMDATA_BR_COPY } virtual Reader & operator>>(int32 &x) { SIMDATA_BR_COPY } virtual Reader & operator>>(int64 &x) { SIMDATA_BR_COPY } + virtual Reader & operator>>(hasht &x) { SIMDATA_BR_COPY } virtual Reader & operator>>(uint8 &x) { SIMDATA_BR_COPY } virtual Reader & operator>>(uint16 &x) { SIMDATA_BR_COPY } virtual Reader & operator>>(uint32 &x) { SIMDATA_BR_COPY } virtual Reader & operator>>(float &x) { SIMDATA_BR_COPY } virtual Reader & operator>>(double &x) { SIMDATA_BR_COPY } virtual Reader & operator>>(bool &x) { SIMDATA_BR_COPY } - virtual Reader & operator>>(char * &x) { + virtual Reader & operator>>(char * &) { assert(0); // avoid allocation issues for now -- no char*'s return *this; } @@ -194,6 +192,10 @@ _buffer.append(reinterpret_cast<const char*>(&x), sizeof(x)); return *this; } + virtual Writer & operator<<(hasht const x) { + _buffer.append(reinterpret_cast<const char*>(&x), sizeof(x)); + return *this; + } virtual Writer & operator<<(uint8 const x) { _buffer.append(reinterpret_cast<const char*>(&x), sizeof(x)); return *this; @@ -277,6 +279,13 @@ _bytes -= sizeof(x); return *this; } + virtual Reader & operator>>(hasht &x) { + assert(_bytes >= sizeof(x)); + x = *(reinterpret_cast<hasht const*>(_data)); + _data += sizeof(x); + _bytes -= sizeof(x); + return *this; + } virtual Reader & operator>>(uint8 &x) { assert(_bytes >= sizeof(x)); x = *(reinterpret_cast<uint8 const*>(_data)); @@ -436,7 +445,7 @@ class TaggedRecord: public Referenced { public: typedef Ref<TaggedRecord> Ref; - typedef int64 Id; + typedef uint64 Id; virtual void serialize(TagReader &reader) = 0; virtual void serialize(TagWriter &writer) const = 0; virtual Id getId() const=0; Modified: trunk/CSP/SimData/Include/SimData/Uniform.h =================================================================== --- trunk/CSP/SimData/Include/SimData/Uniform.h 2004-08-08 18:39:29 UTC (rev 1210) +++ trunk/CSP/SimData/Include/SimData/Uniform.h 2004-08-08 18:45:01 UTC (rev 1211) @@ -54,6 +54,26 @@ typedef unsigned short uint16; typedef signed int int32; typedef unsigned int uint32; + +#ifdef _WIN32 +typedef __int64 int64; +typedef unsigned __int64 uint64; +# define SIMDATA_ULL(x) x +# define SIMDATA_LL(x) x +#else +// use __extension__ to avoid G++ errors with -pedantic +#ifndef SWIG +__extension__ +#endif // SWIG +typedef long long int64; +#ifndef SWIG +__extension__ +#endif // SWIG +typedef unsigned long long uint64; +# define SIMDATA_ULL(x) x##ULL +# define SIMDATA_LL(x) x##LL +#endif + //@} /** Test for big-endian byte order */ Modified: trunk/CSP/SimData/Tools/TaggedRecordCompiler/BaseTypes.py =================================================================== --- trunk/CSP/SimData/Tools/TaggedRecordCompiler/BaseTypes.py 2004-08-08 18:39:29 UTC (rev 1210) +++ trunk/CSP/SimData/Tools/TaggedRecordCompiler/BaseTypes.py 2004-08-08 18:45:01 UTC (rev 1211) @@ -129,16 +129,21 @@ format.write('enum {') format.indent() idx = 8 - for element in self.elements: + # write all but the last element tag + for element in self.elements[:-1]: format.write('TAG_%s = %d,' % (element.id, idx)) idx = idx + 1 + # write last element without a trailing comma to prevent compiler + # warnings/errors + if self.elements: + element = self.elements[-1] + format.write('TAG_%s = %d' % (element.id, idx)) + idx = idx + 1 format.dedent() format.write('};') format.write() for element in self.elements: format.write('simdata::int32 m_has_%s : 1;' % (element.id)) - format.write() - for element in self.elements: element.dump_private(format); format.dedent() format.write() @@ -430,6 +435,7 @@ if not format: format = CodeFormat.Format(file=file) format.write('int %s::m_CustomId = 0;' % (self.id)) + format.write('const %s::Id %s::_Id;' % (self.id, self.id)) format.write('namespace { simdata::TaggedRecordFactory<%s> __%s_factory; }' % (self.id, self.id)) def _extra(self, format): @@ -440,8 +446,8 @@ except ValueError: print >>sys.stderr, 'ERROR: VERSION option on %s must be an integer' % name sys.exit(1) - id0, id1 = md5hash32('%s_%d' % (name, version)) - d = {'name': name, 'version': version, 'id0': id0, 'id1': id1} + id64 = md5hash64('%s_%d' % (name, version)) + d = {'name': name, 'version': version, 'id64': id64} format.template(Message.TRF_GETID, d) format.template(Message.TRF_GETVERSION, d) format.template(Message.TRF_GETNAME, d) @@ -464,7 +470,8 @@ TRF_GETID = ''' virtual Id getId() const { return _getId(); } - static inline Id _getId() { return Id(%(id0)du, %(id1)du); } + static const Id _Id = SIMDATA_ULL(%(id64)d); + static inline Id _getId() { return _Id; } virtual int getCustomId() const { return _getCustomId(); } static inline int _getCustomId() { return m_CustomId; } static inline void _setCustomId(int id) { m_CustomId = id; } |
From: <sv...@ww...> - 2004-08-08 18:39:38
|
Author: mkrose Date: 2004-08-08 11:39:29 -0700 (Sun, 08 Aug 2004) New Revision: 1210 Modified: trunk/CSP/SimData/CHANGES.current trunk/CSP/SimData/Include/SimData/Thread.h Log: Made static thread methods inline to avoid declaring them in multiple translation units (silences a g++ warning). Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1210 Modified: trunk/CSP/SimData/CHANGES.current =================================================================== --- trunk/CSP/SimData/CHANGES.current 2004-08-08 18:37:28 UTC (rev 1209) +++ trunk/CSP/SimData/CHANGES.current 2004-08-08 18:39:29 UTC (rev 1210) @@ -14,6 +14,9 @@ * Minor logging improvements. + * Made static thread methods inline to avoid declaring them in multiple + translation units (silences a g++ warning). + 2004-07-26: delta * Removed some not needed SIMDATA_EXPORT for vs 7.1. Modified: trunk/CSP/SimData/Include/SimData/Thread.h =================================================================== --- trunk/CSP/SimData/Include/SimData/Thread.h 2004-08-08 18:37:28 UTC (rev 1209) +++ trunk/CSP/SimData/Include/SimData/Thread.h 2004-08-08 18:39:29 UTC (rev 1210) @@ -54,7 +54,7 @@ * or higher priority. If no such threads are available, the calling * thread continues immediately. */ - static int yield() { + static inline int yield() { return sched_yield(); } @@ -64,14 +64,14 @@ /** Terminate the currently executing thread. */ - static void exit() { + static inline void exit() { pthread_exit(0); } /** Set the thread cancellation state to enabled. Requests to cancel * this thread will be honored. */ - static void enableCancel() { + static inline void enableCancel() { const int result = pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, 0); ThreadException::checkThrow(result); } @@ -79,7 +79,7 @@ /** Set the thread cancellation state to disabled. Requests to cancel * this thread will be remain pending until cancellation is reenabled. */ - static void disableCancel() { + static inline void disableCancel() { const int result = pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, 0); ThreadException::checkThrow(result); } @@ -89,7 +89,7 @@ * at cancellation points (most blocking functions). * @see Thread::cancel(). */ - static void testCancel() { + static inline void testCancel() { pthread_testcancel(); } @@ -99,7 +99,7 @@ * Asynchronous cancellation should only be used in very tight loops, * where calls to testCancel would be too expensive. */ - static void useAsynchronousCancel() { + static inline void useAsynchronousCancel() { const int result = pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, 0); ThreadException::checkThrow(result); } @@ -108,7 +108,7 @@ * deferred until a cancellation point is reached, i.e most blocking functions * or an explicit call to testCancel(). */ - static void useDeferredCancel() { + static inline void useDeferredCancel() { const int result = pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, 0); ThreadException::checkThrow(result); } @@ -118,7 +118,7 @@ * @param seconds seconds to pause (fractional values ok, but limited by * the granularity of the operating system's time slices). */ - static void sleep(double seconds) { + static inline void sleep(double seconds) { static ThreadCondition m_condition; ScopedLock<ThreadCondition> lock(m_condition); m_condition.wait(seconds); @@ -408,8 +408,8 @@ } private: + Ref<Task> m_task; Task::ThreadId m_thread_id; - Ref<Task> m_task; bool m_cancelled; }; |
From: <sv...@ww...> - 2004-08-08 18:37:35
|
Author: mkrose Date: 2004-08-08 11:37:28 -0700 (Sun, 08 Aug 2004) New Revision: 1209 Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Source/ObjectModel.cpp trunk/CSP/SimData/CHANGES.current trunk/CSP/SimData/Include/SimData/ObjectInterface.h trunk/CSP/SimData/Include/SimData/Ref.h trunk/CSP/SimData/Source/DataArchive.cpp trunk/CSP/SimData/Source/Link.cpp Log: Removed restriction on serializing null+none Links. Added a validation callback in ObjectInterface to catch null+none Links for required fields. Changed Ref assignment back to throwing an exception for incompatible types. This is the correct default behavior. If you expect a Ref assignment to fail, either use Ref<FOO>::compatible() to explicitly test for compatibility without throwing an exception, or catch the ConversionError. Minor logging improvements. Tweaked animation channel binding in CSPSim to explicitly test type- compatibility before assigning. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1209 Diff omitted (11522 bytes). |
From: <sv...@ww...> - 2004-08-08 18:33:49
|
Author: mkrose Date: 2004-08-08 11:33:40 -0700 (Sun, 08 Aug 2004) New Revision: 1208 Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Include/Systems/AircraftInputSystem.h Log: Clamp throttle to [0,1] when using keyboard controls (was [-1,1]). Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1208 Modified: trunk/CSP/CSPSim/CHANGES.current =================================================================== --- trunk/CSP/CSPSim/CHANGES.current 2004-08-07 17:02:48 UTC (rev 1207) +++ trunk/CSP/CSPSim/CHANGES.current 2004-08-08 18:33:40 UTC (rev 1208) @@ -1,6 +1,9 @@ Version 0.4.0 (in progress) =========================== +2004-08-08: onsight + * Clamp throttle to [0,1] when using keyboard controls (was [-1,1]). + 2004-08-07: onsight * Cleaned up tree images a bit to remove purple pixels. Converted tree0.rgba to png. Adjusted the aspect ratios slightly. Modified: trunk/CSP/CSPSim/Include/Systems/AircraftInputSystem.h =================================================================== --- trunk/CSP/CSPSim/Include/Systems/AircraftInputSystem.h 2004-08-07 17:02:48 UTC (rev 1207) +++ trunk/CSP/CSPSim/Include/Systems/AircraftInputSystem.h 2004-08-08 18:33:40 UTC (rev 1208) @@ -38,13 +38,17 @@ double m_Decay; int m_DecayCount; double m_Increment; + double m_Minimum; + double m_Maximum; DataChannel<double>::Ref m_Channel; public: - CombinedInput(double rate=0.4, double decay=0.9): + CombinedInput(double rate=0.4, double decay=0.9, double minimum=-1.0, double maximum=1.0): m_Rate(rate), - m_Decay(decay), - m_DecayCount(0), - m_Increment(0.0) + m_Decay(decay), + m_DecayCount(0), + m_Increment(0.0), + m_Minimum(minimum), + m_Maximum(maximum) { } void connect(Bus *bus, std::string const &name) { @@ -57,7 +61,7 @@ m_DecayCount--; if (m_Increment == 0.0) v *= m_Decay; } - m_Channel->value() = simdata::clampTo(v,-1.0,1.0); + m_Channel->value() = simdata::clampTo(v, m_Minimum, m_Maximum); } double getValue() { return m_Channel->value(); |
From: <sv...@ww...> - 2004-08-07 17:03:02
|
Author: mkrose Date: 2004-08-07 10:02:48 -0700 (Sat, 07 Aug 2004) New Revision: 1207 Added: trunk/CSP/CSPSim/Include/old/ObjectRangeInfo.h trunk/CSP/CSPSim/Source/old/ObjectRangeInfo.cpp Removed: trunk/CSP/CSPSim/Include/ObjectRangeInfo.h trunk/CSP/CSPSim/Source/ObjectRangeInfo.cpp Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Source/Makefile.in trunk/CSP/CSPSim/Source/VirtualBattlefield.cpp trunk/CSP/CSPSim/VisualStudio/CSPSimAppli/CSPSimAppli.dsp trunk/CSP/CSPSim/VisualStudio/CSPSimAppli/CSPSimAppli.vcproj trunk/CSP/CSPSim/VisualStudio/CSPSimDLL/CSPSimDLL.dsp trunk/CSP/CSPSim/VisualStudio/CSPSimDLL/CSPSimDLL.vcproj Log: Moved ObjectRangeInfo to old/ and removed it from the build (both Makefile and vcproj/dsp). Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1207 Diff omitted (11295 bytes). |
From: <sv...@ww...> - 2004-08-07 16:58:24
|
Author: mkrose Date: 2004-08-07 09:58:15 -0700 (Sat, 07 Aug 2004) New Revision: 1206 Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Source/Makefile.in Log: Modified Makefile.in to generate object files under Source/.objs rather than alongside the source files. Other small makefile cleanups. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1206 Modified: trunk/CSP/CSPSim/CHANGES.current =================================================================== --- trunk/CSP/CSPSim/CHANGES.current 2004-08-07 15:54:11 UTC (rev 1205) +++ trunk/CSP/CSPSim/CHANGES.current 2004-08-07 16:58:15 UTC (rev 1206) @@ -5,6 +5,10 @@ * Cleaned up tree images a bit to remove purple pixels. Converted tree0.rgba to png. Adjusted the aspect ratios slightly. + * Modified Makefile.in to generate object files under Source/.objs + rather than alongside the source files. Other small makefile + cleanups. + 2004-08-06: onsight * Fixed a pseudo-bug in demeter, which caused terrain height anomalies at the edges of flat and rough terrain blocks. Essentially, when a Modified: trunk/CSP/CSPSim/Source/Makefile.in =================================================================== --- trunk/CSP/CSPSim/Source/Makefile.in 2004-08-07 15:54:11 UTC (rev 1205) +++ trunk/CSP/CSPSim/Source/Makefile.in 2004-08-07 16:58:15 UTC (rev 1206) @@ -31,6 +31,9 @@ STATIC_LIB = libcspsim_static.a WRAPED_LIB = _cCSP.so +INTERFACES = \ + cCSP.i + SOURCES = \ Systems/AircraftFlightSensors.cpp \ Systems/AircraftInputSystem.cpp \ @@ -114,14 +117,17 @@ VirtualBattlefield.cpp \ VirtualScene.cpp -OBJECTS = $(SOURCES:%.cpp=%.o) +OBJDIR = .objs +OBJECTS = $(SOURCES:%.cpp=$(OBJDIR)/%.o) +OBJ_MAGIC := $(shell mkdir $(OBJDIR) $(addprefix $(OBJDIR)/,$(SUBDIRS)) > /dev/null 2>&1 || :) DEPDIR = .deps MKDEP = $(CXX) -M $(CFLAGS) SWDEP = $(SWIG) -M $(SWOPTS) -DEPFILES = $(addprefix $(DEPDIR)/,$(addsuffix .d, $(SOURCES))) $(DEPDIR)/cCSP.i.swigdep -DEPFILTER = -DEPS_MAGIC := $(shell mkdir $(DEPDIR) $(DEPDIR)/Theater $(DEPDIR)/Systems $(DEPDIR)/SimNet $(DEPDIR)/Views > /dev/null 2>&1 || :) +DEPFILES = $(addprefix $(DEPDIR)/,$(addsuffix .d, $(SOURCES))) \ + $(addprefix $(DEPDIR)/,$(addsuffix .swigd, $(INTERFACES))) +DEPFILTER = | sed -n 's/^\(.*:\)/$(OBJDIR)\/\1/;p' +DEP_MAGIC := $(shell mkdir $(DEPDIR) $(addprefix $(DEPDIR)/,$(SUBDIRS)) > /dev/null 2>&1 || :) .PHONY: clean-deps clean all default @@ -129,16 +135,14 @@ @echo "run make from top-level directory only" clean-objects: - rm -f $(SOURCES:%.cpp=%.o) - rm -f lib*.a - rm -f $(BIN)/_cCSP.so $(BIN)/cCSP.py cCSP_wrap.* + ${RM} -fr $(OBJDIR) + ${RM} -f lib*.a + ${RM} -f $(BIN)/_cCSP.so $(BIN)/cCSP.py cCSP_wrap.* -clean-dependencies: - @echo +clean-deps clean-dependencies: find $(DEPDIR) -name *.d -exec ${RM} {} \; + find $(DEPDIR) -name *.swigd -exec ${RM} {} \; -clean-deps: clean-dependencies - clean: clean-deps clean-objects ifeq ($(findstring clean,$(MAKECMDGOALS)),) @@ -147,23 +151,13 @@ endif endif -#clean clean-deps: -# for dir in $(SUBDIRS); do \ -# $(MAKE) -C $${dir} $@; \ -# done - -build-subdirs: -# @for dir in $(SUBDIRS); do \ -# $(MAKE) -C $${dir} all; \ -# done - $(DEPDIR)/%.d : % @echo "Computing dependencies for $<..." - @$(MKDEP) $< $(DEPFILTER) | sed -e 's!^[a-zA-Z0-9_]*.o:!$(<:%.cpp=%.o):!' > $@ + @$(MKDEP) $< $(DEPFILTER) > $@ -$(DEPDIR)/%.swigdep : % +$(DEPDIR)/%.swigd : % @echo "Computing dependencies for $<..." - @$(SWDEP) $(DEPFILTER) -o $(<:.i=_wrap.cpp) $< > $@ + @$(SWDEP) -o $(<:.i=_wrap.cpp) $< $(DEPFILTER) > $@ $(WRAPED_LIB) : $(OBJECTS) cCSP_wrap.o $(CXX) $(LDOPTS) -o$@ $^ $(LIBS) @@ -196,11 +190,11 @@ test: clientNode serverNode -%.o: %.cpp - $(CXX) -c $(CFLAGS) -o $@ $(@:.o=.cpp) +$(OBJDIR)/%.o: %.cpp + $(CXX) -c $(CFLAGS) -o $@ $< -AeroDynamics.o: AeroDynamics.cpp - $(CXX) -c $(CFLAGS) -O3 $(@:.o=.cpp) +$(OBJDIR)/AeroDynamics.o: AeroDynamics.cpp + $(CXX) -c $(CFLAGS) -O3 -o $@ $< #ClientNodeDriver.o: ClientNodeDriver.cpp # $(CXX) -c $(CFLAGS) $(INCLUDE) -o ClientNodeDriver.o ClientNodeDriver.cpp @@ -211,5 +205,5 @@ Makefile: Makefile.in cd $(TOPDIR) && ./configure -all: Makefile build-subdirs $(WRAPED_LIB) #$(STATIC_LIB) test #CSPapp +all: Makefile $(WRAPED_LIB) #$(STATIC_LIB) test #CSPapp |
From: <sv...@ww...> - 2004-08-07 15:54:20
|
Author: mkrose Date: 2004-08-07 08:54:11 -0700 (Sat, 07 Aug 2004) New Revision: 1205 Added: trunk/CSP/CSPSim/Data/Images/Trees/tree0.png Removed: trunk/CSP/CSPSim/Data/Images/Trees/tree0.rgba Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Data/Images/Trees/tree5.png trunk/CSP/CSPSim/Data/Images/Trees/tree6.png trunk/CSP/CSPSim/Data/XML/theater/balkan/forest.xml Log: Cleaned up tree images a bit to remove purple pixels. Converted tree0.rgba to png. Adjusted the aspect ratios slightly. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1205 Modified: trunk/CSP/CSPSim/CHANGES.current =================================================================== --- trunk/CSP/CSPSim/CHANGES.current 2004-08-07 02:14:02 UTC (rev 1204) +++ trunk/CSP/CSPSim/CHANGES.current 2004-08-07 15:54:11 UTC (rev 1205) @@ -1,6 +1,10 @@ Version 0.4.0 (in progress) =========================== +2004-08-07: onsight + * Cleaned up tree images a bit to remove purple pixels. Converted + tree0.rgba to png. Adjusted the aspect ratios slightly. + 2004-08-06: onsight * Fixed a pseudo-bug in demeter, which caused terrain height anomalies at the edges of flat and rough terrain blocks. Essentially, when a Added: trunk/CSP/CSPSim/Data/Images/Trees/tree0.png =================================================================== (Binary files differ) Property changes on: trunk/CSP/CSPSim/Data/Images/Trees/tree0.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Deleted: trunk/CSP/CSPSim/Data/Images/Trees/tree0.rgba =================================================================== (Binary files differ) Modified: trunk/CSP/CSPSim/Data/Images/Trees/tree5.png =================================================================== (Binary files differ) Modified: trunk/CSP/CSPSim/Data/Images/Trees/tree6.png =================================================================== (Binary files differ) Modified: trunk/CSP/CSPSim/Data/XML/theater/balkan/forest.xml =================================================================== --- trunk/CSP/CSPSim/Data/XML/theater/balkan/forest.xml 2004-08-07 02:14:02 UTC (rev 1204) +++ trunk/CSP/CSPSim/Data/XML/theater/balkan/forest.xml 2004-08-07 15:54:11 UTC (rev 1205) @@ -3,18 +3,18 @@ <Object class="RandomBillboardModel"> <List name="models"> <Object class="FeatureQuad"> - <External name="texture">Trees/tree0.rgba</External> - <Float name="width">4</Float> + <External name="texture">Trees/tree0.png</External> + <Float name="width">6</Float> <Float name="height">10</Float> </Object> <Object class="FeatureQuad"> <External name="texture">Trees/tree5.png</External> - <Float name="width">6</Float> + <Float name="width">8</Float> <Float name="height">12</Float> </Object> <Object class="FeatureQuad"> <External name="texture">Trees/tree6.png</External> - <Float name="width">8</Float> + <Float name="width">10</Float> <Float name="height">14</Float> </Object> </List> |
From: <sv...@ww...> - 2004-08-07 02:14:08
|
Author: mkrose Date: 2004-08-06 19:14:02 -0700 (Fri, 06 Aug 2004) New Revision: 1204 Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Include/CSPSim.i Log: Minor cleanup of the swig extensions to CSPSim for creating test objects. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1204 Modified: trunk/CSP/CSPSim/CHANGES.current =================================================================== --- trunk/CSP/CSPSim/CHANGES.current 2004-08-07 02:12:18 UTC (rev 1203) +++ trunk/CSP/CSPSim/CHANGES.current 2004-08-07 02:14:02 UTC (rev 1204) @@ -72,6 +72,8 @@ uniform across all parts (some where set to zero). Also increased the overall ambient lighting a bit. + * Minor cleanup of the swig extensions to CSPSim for creating test objects. + 2004-07-29: onsight * Removed a couple obsolete files from the Makefile, and added InputEvent. Modified: trunk/CSP/CSPSim/Include/CSPSim.i =================================================================== --- trunk/CSP/CSPSim/Include/CSPSim.i 2004-08-07 02:12:18 UTC (rev 1203) +++ trunk/CSP/CSPSim/Include/CSPSim.i 2004-08-07 02:14:02 UTC (rev 1204) @@ -23,9 +23,26 @@ #include "Projection.h" #include "Shell.h" #include <SimData/Math.h> -%} +void _createVehicleHelper(CSPSim *self, const char *path, simdata::Vector3 position, + simdata::Vector3 velocity, simdata::Vector3 attitude) { + simdata::Ref<DynamicObject> obj = self->getDataManager().getObject(path); + if (!obj) { + std::cout << "WARNING: Failed to create object '" << path << "'\n"; + return; + } + obj->setGlobalPosition(position); + obj->setVelocity(velocity); + simdata::Quat q_attitude; + attitude *= 3.1416 / 180.0; + q_attitude.makeRotate(attitude.x(), attitude.y(), -attitude.z()); + obj->setAttitude(q_attitude); + self->getBattlefield()->addUnit(obj); + if (!self->getActiveObject()) self->setActiveObject(obj); +} +%} + class CSPSim { public: @@ -68,38 +85,14 @@ %extend CSPSim { void createVehicle(const char *path, simdata::Vector3 position, - simdata::Vector3 velocity, simdata::Vector3 attitude) { - simdata::Ref<DynamicObject> obj = self->getDataManager().getObject(path); - if (!obj) { - std::cout << "WARNING: Failed to create object '" << path << "'\n"; - return; - } - obj->setGlobalPosition(position); - obj->setVelocity(velocity); - simdata::Quat q_attitude; - attitude *= 3.1416 / 180.0; - q_attitude.makeRotate(attitude.x(), attitude.y(), -attitude.z()); - obj->setAttitude(q_attitude); - self->getBattlefield()->addUnit(obj); - if (!self->getActiveObject()) self->setActiveObject(obj); + simdata::Vector3 velocity, simdata::Vector3 attitude) { + _createVehicleHelper(self, path, position, velocity, attitude); } void createVehicle(const char *path, simdata::LLA lla, simdata::Vector3 velocity, simdata::Vector3 attitude) { - simdata::Ref<DynamicObject> obj = self->getDataManager().getObject(path); - if (!obj) { - std::cout << "WARNING: Failed to create object '" << path << "'\n"; - return; - } Projection const &map = CSPSim::theSim->getTheater()->getTerrain()->getProjection(); simdata::Vector3 position = map.convert(lla); - obj->setGlobalPosition(position); - obj->setVelocity(velocity); - simdata::Quat q_attitude; - attitude *= 3.1416 / 180.0; - q_attitude.makeRotate(attitude.x(), attitude.y(), -attitude.z()); - obj->setAttitude(q_attitude); - self->getBattlefield()->addUnit(obj); - if (!self->getActiveObject()) self->setActiveObject(obj); + _createVehicleHelper(self, path, position, velocity, attitude); } void setShell(PyObject *shell) { self->getShell()->bind(shell); } std::string const &getTerrainName() { return self->getTheater()->getTerrain()->getName(); } |
From: <sv...@ww...> - 2004-08-07 02:12:29
|
Author: mkrose Date: 2004-08-06 19:12:18 -0700 (Fri, 06 Aug 2004) New Revision: 1203 Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Data/Models/Mirage2000/model.osg Log: Minor tweaks to the m2k model to make the ambient lighting coefficients uniform across all parts (some where set to zero). Also increased the overall ambient lighting a bit. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1203 Modified: trunk/CSP/CSPSim/CHANGES.current =================================================================== --- trunk/CSP/CSPSim/CHANGES.current 2004-08-07 02:09:58 UTC (rev 1202) +++ trunk/CSP/CSPSim/CHANGES.current 2004-08-07 02:12:18 UTC (rev 1203) @@ -68,6 +68,10 @@ misplacement and bad elevation corrections. Also minor cleanups of path handling and logging. + * Minor tweaks to the m2k model to make the ambient lighting coefficients + uniform across all parts (some where set to zero). Also increased the + overall ambient lighting a bit. + 2004-07-29: onsight * Removed a couple obsolete files from the Makefile, and added InputEvent. Modified: trunk/CSP/CSPSim/Data/Models/Mirage2000/model.osg =================================================================== --- trunk/CSP/CSPSim/Data/Models/Mirage2000/model.osg 2004-08-07 02:09:58 UTC (rev 1202) +++ trunk/CSP/CSPSim/Data/Models/Mirage2000/model.osg 2004-08-07 02:12:18 UTC (rev 1203) @@ -50,7 +50,7 @@ Material { DataVariance STATIC ColorMode OFF - ambientColor 0 0 0 1 + ambientColor 0.588 0.588 0.588 1 diffuseColor 1 1 1 1 specularColor 0.0225225 0.0225225 0.0225225 1 emissionColor 0 0 0 1 @@ -216,7 +216,7 @@ Material { DataVariance STATIC ColorMode OFF - ambientColor 0 0 0 1 + ambientColor 0.588 0.588 0.588 1 diffuseColor 1 1 1 1 specularColor 0.0225225 0.0225225 0.0225225 1 emissionColor 0 0 0 1 @@ -9760,7 +9760,7 @@ Material { DataVariance STATIC ColorMode OFF - ambientColor 0.0640517 0.158168 0.181698 1 + ambientColor 0.588 0.588 0.588 1 diffuseColor 1 1 1 1 specularColor 0.0225225 0.0225225 0.0225225 1 emissionColor 0 0 0 1 @@ -10698,7 +10698,7 @@ Material { DataVariance STATIC ColorMode OFF - ambientColor 0 0 0 1 + ambientColor 0.588 0.588 0.588 1 diffuseColor 1 1 1 1 specularColor 0.0225225 0.0225225 0.0225225 1 emissionColor 0 0 0 1 @@ -16920,7 +16920,7 @@ Material { DataVariance STATIC ColorMode OFF - ambientColor 0 0 0 1 + ambientColor 0.588 0.588 0.588 1 diffuseColor 0.588 0.588 0.588 1 specularColor 0 0 0 1 emissionColor 0 0 0 1 @@ -21426,7 +21426,7 @@ Material { DataVariance STATIC ColorMode OFF - ambientColor 0.0640517 0.158168 0.181698 1 + ambientColor 0.588 0.588 0.588 1 diffuseColor 1 1 1 1 specularColor 0.0225225 0.0225225 0.0225225 1 emissionColor 0 0 0 1 @@ -29354,7 +29354,7 @@ Material { DataVariance STATIC ColorMode OFF - ambientColor 0 0 0 1 + ambientColor 0.588 0.588 0.588 1 diffuseColor 0.588 0.588 0.588 1 specularColor 0 0 0 1 emissionColor 0 0 0 1 @@ -51541,7 +51541,7 @@ Material { DataVariance STATIC ColorMode OFF - ambientColor 0 0 0 1 + ambientColor 0.588 0.588 0.588 1 diffuseColor 0.588 0.588 0.588 1 specularColor 0 0 0 1 emissionColor 0 0 0 1 @@ -51587,7 +51587,7 @@ Material { DataVariance STATIC ColorMode OFF - ambientColor 0 0 0 1 + ambientColor 0.588 0.588 0.588 1 diffuseColor 0.588 0.588 0.588 1 specularColor 0 0 0 1 emissionColor 0 0 0 1 @@ -59153,7 +59153,7 @@ Material { DataVariance STATIC ColorMode OFF - ambientColor 0.0640517 0.158168 0.181698 1 + ambientColor 0.588 0.588 0.588 1 diffuseColor 1 1 1 1 specularColor 0.0225225 0.0225225 0.0225225 1 emissionColor 0 0 0 1 |
From: <sv...@ww...> - 2004-08-07 02:10:05
|
Author: mkrose Date: 2004-08-06 19:09:58 -0700 (Fri, 06 Aug 2004) New Revision: 1202 Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Source/Theater/ElevationCorrection.cpp trunk/CSP/CSPSim/Source/Theater/FeatureQuad.cpp trunk/CSP/CSPSim/Source/Theater/RandomBillboardModel.cpp Log: Fixed a bug in the layout logic for RandomBillboardModel that could cause misplacement and bad elevation corrections. Also minor cleanups of path handling and logging. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1202 Modified: trunk/CSP/CSPSim/CHANGES.current =================================================================== --- trunk/CSP/CSPSim/CHANGES.current 2004-08-07 02:05:39 UTC (rev 1201) +++ trunk/CSP/CSPSim/CHANGES.current 2004-08-07 02:09:58 UTC (rev 1202) @@ -64,6 +64,10 @@ * Reduced the gear damping coefficients slightly. The front gear is now slightly underdamped, which agrees with an F-16 cockpit video I've seen. + * Fixed a bug in the layout logic for RandomBillboardModel that could cause + misplacement and bad elevation corrections. Also minor cleanups of + path handling and logging. + 2004-07-29: onsight * Removed a couple obsolete files from the Makefile, and added InputEvent. Modified: trunk/CSP/CSPSim/Source/Theater/ElevationCorrection.cpp =================================================================== --- trunk/CSP/CSPSim/Source/Theater/ElevationCorrection.cpp 2004-08-07 02:05:39 UTC (rev 1201) +++ trunk/CSP/CSPSim/Source/Theater/ElevationCorrection.cpp 2004-08-07 02:09:58 UTC (rev 1202) @@ -25,6 +25,7 @@ #include "Theater/ElevationCorrection.h" #include "TerrainObject.h" +#include "Log.h" ElevationCorrection::ElevationCorrection(TerrainObject *terrain, float x, float y, float angle): LayoutTransform(x, y, angle) { @@ -34,12 +35,14 @@ osg::Vec3 ElevationCorrection::operator()(osg::Vec3 const &offset) const { osg::Vec3 absolute = LayoutTransform::operator()(offset); float elevation = 0.0; + CSP_LOG(SCENE, DEBUG, "Placing feature at absolute position " << absolute); if (m_Terrain != 0) { TerrainObject::IntersectionHint hint; elevation = m_Terrain->getGroundElevation(absolute.x(), absolute.y(), hint); + CSP_LOG(SCENE, DEBUG, "Feature elevation " << elevation << " m, offset " << offset); + } else { + CSP_LOG(SCENE, ERROR, "No elevation data available for feature!"); } - std::cout << "PLACING FEATURE @ " << absolute << "\n"; - std::cout << "ELEVATION = " << elevation << ", offset = " << offset << "\n"; return offset + osg::Z_AXIS * elevation; } Modified: trunk/CSP/CSPSim/Source/Theater/FeatureQuad.cpp =================================================================== --- trunk/CSP/CSPSim/Source/Theater/FeatureQuad.cpp 2004-08-07 02:05:39 UTC (rev 1201) +++ trunk/CSP/CSPSim/Source/Theater/FeatureQuad.cpp 2004-08-07 02:09:58 UTC (rev 1202) @@ -24,7 +24,10 @@ #include "Theater/FeatureQuad.h" +#include "Config.h" +#include <SimData/FileUtility.h> + #include <osg/Geometry> #include <osg/Texture2D> #include <osg/BlendFunc> @@ -35,12 +38,9 @@ #include <osg/Material> - - SIMDATA_REGISTER_INTERFACE(FeatureQuad) - osg::Geometry *FeatureQuad::makeGeometry() const { float vv[][3] = { { m_Width*(m_OffsetX-0.5), 0.0, m_Height*(m_OffsetY-0.5) }, @@ -82,7 +82,9 @@ osg::StateSet* FeatureQuad::makeStateSet() const { osg::Texture2D* tex = new osg::Texture2D; - osg::Image *image = osgDB::readImageFile("../Data/Images/"+m_Texture.getSource()); + std::string image_path = getDataPath("ImagePath"); + std::string path = simdata::ospath::join(image_path, m_Texture.getSource()); + osg::Image* image = osgDB::readImageFile(path); tex->setImage(image); osg::StateSet *state = new osg::StateSet; state->setTextureAttributeAndModes(0, tex, osg::StateAttribute::ON); Modified: trunk/CSP/CSPSim/Source/Theater/RandomBillboardModel.cpp =================================================================== --- trunk/CSP/CSPSim/Source/Theater/RandomBillboardModel.cpp 2004-08-07 02:05:39 UTC (rev 1201) +++ trunk/CSP/CSPSim/Source/Theater/RandomBillboardModel.cpp 2004-08-07 02:09:58 UTC (rev 1202) @@ -123,7 +123,7 @@ RandomBillboardModel::RandomBillboardModel(): m_Seed(0), - m_IsoContour(new RectangularCurve()) { + m_IsoContour(new RectangularCurve()) { } RandomBillboardModel::~RandomBillboardModel() { @@ -153,7 +153,17 @@ void RandomBillboardModel::addSceneModel(FeatureSceneGroup *group, LayoutTransform const &transform, ElevationCorrection const &correction) { int i, n = m_Models.size(); std::vector<simdata::Vector3>::iterator ofs, end; - FeatureSceneModel *scene_model = new FeatureSceneModel(transform); + + // the drawables in the billboard are already offset to the correct positions + // relative to the root scene group (ie. including all parent transformations), + // so the scene model should not reapply the same transformations. + // alternatively, we could set the transform in the scene model and set the + // x,y offsets of the drawables to be the local offsets. since each drawable + // will generally have a unique z position, the latter doesn't offer any + // obvious advantage. + //FeatureSceneModel *scene_model = new FeatureSceneModel(transform); + FeatureSceneModel *scene_model = new FeatureSceneModel(LayoutTransform()); + for (i = 0; i < n; i++) { osg::Billboard *bb = new osg::Billboard(); bb->setStateSet(m_Models[i]->getStateSet()); @@ -161,13 +171,17 @@ end = m_Offsets[i].end(); osg::Geometry *model = m_Models[i]->getGeometry(); for (; ofs != end; ofs++) { - bb->addDrawable(new osg::Geometry(*model), correction(transform(*ofs))); + // pos has the x, y coordinates of the drawable relative to the root + // FeatureSceneGroup. + osg::Vec3 pos = correction(transform(*ofs)); + bb->addDrawable(new osg::Geometry(*model), pos); } scene_model->addChild(bb); } group->addChild(scene_model); - osgUtil::Optimizer optimizer; - optimizer.optimize(group); + // FIXME this should be done at a higher level when the full FSG is complete + //osgUtil::Optimizer optimizer; + //optimizer.optimize(group); } |
From: <sv...@ww...> - 2004-08-07 02:05:45
|
Author: mkrose Date: 2004-08-06 19:05:39 -0700 (Fri, 06 Aug 2004) New Revision: 1201 Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/m2k/gear.xml trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/m2k/model.xml trunk/CSP/CSPSim/Include/LandingGear.h trunk/CSP/CSPSim/Source/LandingGear.cpp Log: Fixed a bug in the landing gear code that omitted lateral damping of tire oscillations when the wheels were rolling. Also increased the tire damping coefficient. Changed the tire rolling friction to a simdata::Real so that each wheel spins down at a slightly different rate. In practice this isn't very noticible, since the wheels generally leave the ground at different times, so they will have different initial speeds. Eliminated the nose-wheel castering routine. It isn't necessary any more (high speed taxiing is stable), and made the front wheel appear to have a very low friction coefficient for lateral sliding at low speeds. Increased the static friction coefficient of the tires (they were skidding too much / for too long). Improved tire rotation logic: wheels roll backward and forward as appropriate, tire rotation continues when airborne, damped by friction and brakes. Found the cause of mysterious "flips" of the aircraft on the ground. Turns out it isn't the landing gear physics: gusts of wind from behind the aircraft (20-30 m/s) are driving very poorly modelled parts of the "flight" envelope. No attempt to fix this yet. Update steering wheel angle in flight now. Aircraft model can disable this "manually" if desired (e.g. NWS disengaged when no WOW) by setting the steering channel to zero. Removed redundant contol of the aileron/elevators that was causing conflicts. If these inputs and control surfaces need to be coordinated, then a more specialized FCS system should be written. Adjusted the CM of the M2k forward by 30 cm to put more weight on the front wheel (reduce skidding when steering) and increase the takeoff pitchup speed. Adjusted the vertical height of the M2k nosewheel (6.8 cm) to put it on the ground. (Easier to see now that the camera can be panned down to ground level.) Added an info line to show when ABS is active. Reduced the gear damping coefficients slightly. The front gear is now slightly underdamped, which agrees with an F-16 cockpit video I've seen. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1201 Diff omitted (26755 bytes). |