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: <mk...@us...> - 2003-08-15 07:30:04
|
Update of /cvsroot/csp/APPLICATIONS/SimData/Doc In directory sc8-pr-cvs1:/tmp/cvs-serv18849/Doc Modified Files: Doxyfile Log Message: Index: Doxyfile =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/Doc/Doxyfile,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Doxyfile 2 May 2003 20:59:04 -0000 1.2 --- Doxyfile 15 Aug 2003 06:59:15 -0000 1.3 *************** *** 172,176 **** # explict @brief command for a brief description. ! JAVADOC_AUTOBRIEF = NO # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented --- 172,176 ---- # explict @brief command for a brief description. ! JAVADOC_AUTOBRIEF = YES # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented |
From: <mk...@us...> - 2003-08-15 07:30:04
|
Update of /cvsroot/csp/APPLICATIONS/SimData In directory sc8-pr-cvs1:/tmp/cvs-serv18849 Modified Files: CHANGES.current Makefile Log Message: Index: CHANGES.current =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/CHANGES.current,v retrieving revision 1.64 retrieving revision 1.65 diff -C2 -d -r1.64 -r1.65 *** CHANGES.current 14 Aug 2003 21:50:30 -0000 1.64 --- CHANGES.current 15 Aug 2003 06:59:15 -0000 1.65 *************** *** 5,8 **** --- 5,18 ---- Doxygen comment fixes. + Removed GlibCsp, replacing what little we used with + a few typedefs in Uniform.h (now in the simdata + namespace). Eliminates many macro definitions and + unqualified names. + + Cleaned up HashUtility.h, eliminating dead code and + superfluous typemaps. + + Moved timing code inside the simdata namespace. + 2003-08-13: onsight Complete rewrite of the Enumeration classes, using Enum Index: Makefile =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/Makefile,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** Makefile 14 Aug 2003 21:50:30 -0000 1.18 --- Makefile 15 Aug 2003 06:59:15 -0000 1.19 *************** *** 7,11 **** export GLDOPTS = -shared -lswigpy -ldl export GSWOPTS = -c -c++ -python -noexcept ! export CXX = g++-3.3 export SWIG = swig --- 7,11 ---- export GLDOPTS = -shared -lswigpy -ldl export GSWOPTS = -c -c++ -python -noexcept ! export CXX = g++ #-3.3 export SWIG = swig |
From: <mk...@us...> - 2003-08-15 05:34:51
|
Update of /cvsroot/csp/APPLICATIONS/SimData/Include/SimData In directory sc8-pr-cvs1:/tmp/cvs-serv3940 Modified Files: Date.h Log Message: Index: Date.h =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/Include/SimData/Date.h,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** Date.h 15 Aug 2003 01:17:06 -0000 1.13 --- Date.h 15 Aug 2003 04:52:05 -0000 1.14 *************** *** 646,654 **** ! /** ! * @brief Class combining time and date operations. ! * ! * @author Mark Rose <mr...@st...> ! */ class SIMDATA_EXPORT DateZulu: public Date, public Zulu { --- 646,652 ---- ! /// Class combining time and date operations. ! /// ! /// @author Mark Rose <mr...@st...> class SIMDATA_EXPORT DateZulu: public Date, public Zulu { *************** *** 657,662 **** --- 655,671 ---- public: + /// Default constructor + /// + /// @see Date() and Zulu() DateZulu(): Date(), Zulu() {} + /// Construct a new DateZulu. + /// + /// @param year the year (e.g. 2000) + /// @param the month (1-12) + /// @param the day (1-31) + /// @param hour the hour (0-23) + /// @param minute the minute (0-59) + /// @param second the second (0.0-60.0) DateZulu(year_t year, month_t month, day_t day, int hour, int minute, time_t second): Date(year, month, day), *************** *** 665,668 **** --- 674,683 ---- } + /// Construct a new DateZulu. + /// + /// @param julian the Julian date. + /// @param hour the hour (0-23) + /// @param minute the minute (0-59) + /// @param second the second (0.0-60.0) DateZulu(julian_t julian, int hour, int minute, time_t second): Date(julian), *************** *** 671,676 **** --- 686,694 ---- } + /// Copy constructor. DateZulu(const DateZulu &dz): Date(dz), Zulu(dz) { } + #ifndef SWIG + /// Assignment operator from another DateZulu. const DateZulu &operator=(const DateZulu &dz) { Date::operator=(dz); *************** *** 681,700 **** void convert(struct tm *tm, bool local=false) const; std::string formatString(const char *format, bool local=false) const; virtual std::string asString() const { return formatString("%Y/%m/%d %H:%M:%Sz"); } ! /** ! * Return a string representation of the type. ! */ virtual std::string typeString() const { return "type::DateZulu"; } ! /** ! * Increment the current time, with date rollover. ! * ! * @param dt The time interval (in seconds) ! */ int addTime(time_t dt) { int days = Zulu::addTime(dt); --- 699,732 ---- + /// Store the time into a standard time structure. + /// + /// @param The time structure to set (see <time.h>) + /// @param local Optionally adjust the time for the local + /// timezone. void convert(struct tm *tm, bool local=false) const; + + /// Format the date and time to a string. + /// + /// @param format Identical to the format string used by + /// strftime() (Google: strftime) + /// @param local Optionally adjust the time for the local + /// timezone. + /// @returns The formatted date/time string. std::string formatString(const char *format, bool local=false) const; + + /// Return a string representation of the date and time. + /// + /// The format is "YYYY/MM/DD HH:MM::SSz". virtual std::string asString() const { return formatString("%Y/%m/%d %H:%M:%Sz"); } ! /// Return a string representation of the type. virtual std::string typeString() const { return "type::DateZulu"; } ! /// Increment the current time, with date rollover. ! /// ! /// @param dt The time interval (in seconds) ! /// @returns The number of rollover days. int addTime(time_t dt) { int days = Zulu::addTime(dt); *************** *** 703,711 **** } ! /** ! * Set the current time, with date rollover. ! * ! * @param t The current time of day (in seconds) ! */ int setTime(time_t t) { int days = Zulu::setTime(t); --- 735,742 ---- } ! /// Set the current time, with date rollover. ! /// ! /// @param t The current time of day (in seconds) ! /// @returns The number of rollover days. int setTime(time_t t) { int days = Zulu::setTime(t); *************** *** 714,717 **** --- 745,754 ---- } + /// Get the real-valued Julian date. + /// + /// @returns The Julian date and time as a real value, + /// with the whole part of the result equal to + /// the Julian day, and the fractional part of + /// the result encoding the time of day. double getJulianDate() const { double j = getJulian(); *************** *** 720,724 **** --- 757,773 ---- } + /// Get the (accurate) Mean Sidereal time. + /// + /// @deprecated This routine now calls getMST and remains + /// only for backwards compatibility. It may + /// be removed in a future version of SimData. double getAccurateMST(radian_t longitude=0.0L) const; + + /// Get the Mean Sidereal time. + /// + /// @param longitude The local longitude in radians. + /// @returns The mean sidereal time (in radians) for the + /// specified latitude using a third-order + /// polynomial approximation. double getMST(radian_t longitude=0.0L) const; |
From: <mk...@us...> - 2003-08-15 01:32:11
|
Update of /cvsroot/csp/APPLICATIONS/SimData/Doc In directory sc8-pr-cvs1:/tmp/cvs-serv12409/Doc Modified Files: Makefile Log Message: Index: Makefile =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/Doc/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Makefile 26 Mar 2003 06:38:02 -0000 1.1 --- Makefile 15 Aug 2003 01:17:06 -0000 1.2 *************** *** 1,2 **** --- 1,8 ---- + DATESTR := $(shell date +'%Y%m%d') all: doxygen Doxyfile + + dist: + ln -s html simdata-docs-$(DATESTR) + tar vczhf simdata-docs-$(DATESTR).tgz simdata-docs-$(DATESTR) + rm -f simdata-docs-$(DATESTR) |
From: <mk...@us...> - 2003-08-15 01:26:01
|
Update of /cvsroot/csp/APPLICATIONS/SimData/Source In directory sc8-pr-cvs1:/tmp/cvs-serv12409/Source Modified Files: Interpolate.cpp LUT.cpp Version.cpp Log Message: Index: Interpolate.cpp =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/Source/Interpolate.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** Interpolate.cpp 14 Aug 2003 12:19:13 -0000 1.14 --- Interpolate.cpp 15 Aug 2003 01:17:06 -0000 1.15 *************** *** 33,43 **** const Enumeration InterpolatedData<T>::Method("LINEAR SPLINE"); - class load_check { - public: - load_check() { - printf("SimData %s loaded @ %p\n", getVersion(), this); - } - } check_interpolate; - //static load_check check_interpolate; --- 33,36 ---- Index: LUT.cpp =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/Source/LUT.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** LUT.cpp 6 Aug 2003 06:36:25 -0000 1.3 --- LUT.cpp 15 Aug 2003 01:17:06 -0000 1.4 *************** *** 77,80 **** --- 77,82 ---- /** + * @brief A helper class for storing second-derivatives. + * * A helper class for storing second-derivatives used * in spline interpolation. The structure mirrors that *************** *** 136,140 **** /** ! * Partial specialization of Curvature for one-dimension. * * This is essentially just a std::vector<X>. See Curvature --- 138,142 ---- /** ! * @brief Partial specialization of Curvature for one-dimension. * * This is essentially just a std::vector<X>. See Curvature *************** *** 165,169 **** /** ! * Zero-dimensional Curvatures are not allowed. */ template <class X> --- 167,171 ---- /** ! * @brief Stub to prevent zero-dimensional Curvatures. */ template <class X> Index: Version.cpp =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/Source/Version.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Version.cpp 14 Aug 2003 12:19:13 -0000 1.4 --- Version.cpp 15 Aug 2003 01:17:06 -0000 1.5 *************** *** 32,35 **** --- 32,47 ---- } + + /** + * @brief Print a startup message to verify proper loading of SimData + */ + class load_check { + public: + load_check() { + printf("SimData %s loaded @ %p\n", getVersion(), this); + } + } check_interpolate; + + NAMESPACE_SIMDATA_END |
From: <mk...@us...> - 2003-08-14 23:07:33
|
Update of /cvsroot/csp/APPLICATIONS/SimData/Include/SimData In directory sc8-pr-cvs1:/tmp/cvs-serv25095/Include/SimData Modified Files: Enum.h Log Message: Index: Enum.h =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/Include/SimData/Enum.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** Enum.h 14 Aug 2003 22:41:34 -0000 1.14 --- Enum.h 14 Aug 2003 22:55:07 -0000 1.15 *************** *** 246,253 **** /// /// Examples: ! /// @code /// "zero one two three" /// "one=1 two three ten=10 eleven" ! /// @endcode EnumerationCore(std::string const &s): Referenced() { __init(s); --- 246,253 ---- /// /// Examples: ! /// <pre> /// "zero one two three" /// "one=1 two three ten=10 eleven" ! /// </pre> EnumerationCore(std::string const &s): Referenced() { __init(s); |
From: <mk...@us...> - 2003-08-14 22:50:49
|
Update of /cvsroot/csp/APPLICATIONS/SimData/Include/SimData In directory sc8-pr-cvs1:/tmp/cvs-serv23059 Modified Files: Enum.h Log Message: Index: Enum.h =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/Include/SimData/Enum.h,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** Enum.h 14 Aug 2003 22:37:09 -0000 1.13 --- Enum.h 14 Aug 2003 22:41:34 -0000 1.14 *************** *** 351,354 **** --- 351,366 ---- /// Construct a new Enumeration, creating and binding to a new EnumerationCore. + /// + /// The enumeration tokens are must be separated by + /// white-space and can have an optional value assignment. + /// Tokens without explicit values will be assigned + /// sequential values following the last specified + /// value. The initial default value is zero. + /// + /// Examples: + /// @code + /// "zero one two three" + /// "one=1 two three ten=10 eleven" + /// @endcode Enumeration(std::string const &s) { __core = new EnumerationCore(s); |
From: <mk...@us...> - 2003-08-14 22:50:47
|
Update of /cvsroot/csp/APPLICATIONS/SimData/Include/SimData In directory sc8-pr-cvs1:/tmp/cvs-serv22413 Modified Files: Enum.h Log Message: Index: Enum.h =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/Include/SimData/Enum.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Enum.h 14 Aug 2003 21:50:30 -0000 1.12 --- Enum.h 14 Aug 2003 22:37:09 -0000 1.13 *************** *** 26,29 **** --- 26,31 ---- * * Examples: + * + * @code // C++ example ///////////////////////////////////////////////////// *************** *** 65,68 **** --- 67,71 ---- assert(items.cherry > "orange") + * @endcode */ *************** *** 124,134 **** --- 127,143 ---- typedef std::pair<std::string, int> Element; typedef std::vector<Element> Elements; + /// value to index lookup std::map<int, int> __i2idx; + /// string to index lookup std::map<std::string, int> __s2idx; + /// elements Elements __elements; + /// Parse enum string into lookup tables. + /// + /// @see EnumerationCore(std::string const &s) void __init(std::string const &s) { std::stringstream ss(s); *************** *** 158,167 **** --- 167,186 ---- if (__elements.size() <= 0) throw EnumError("Empty Enumeration"); } + + /// Return an element by index number. Element const &getElementByIndex(int idx) const { assert(validIndex(idx)); return __elements[idx]; } + + /// Return an element token by index number. std::string getTokenByIndex(int idx) const { return getElementByIndex(idx).first; } + + /// Return an element value by index number. int getValueByIndex(int idx) const { return getElementByIndex(idx).second; } + + /// Lookup the index of the element with the specified value. + /// + /// Throws EnumIndexError if the value does not exist. int getIndexByValue(int value) const { std::map<int, int>::const_iterator iter = __i2idx.find(value); *************** *** 173,179 **** --- 192,204 ---- return iter->second; } + + /// Get the token associated with a given value. std::string getTokenByValue(int value) const { return __elements[getIndexByValue(value)].first; } + + /// Lookup the index of the element with the specified token. + /// + /// Throws EnumIndexError if the token does not exist. int getIndexByToken(std::string const &token) const { std::map<std::string, int>::const_iterator iter = __s2idx.find(token); *************** *** 183,202 **** return iter->second; } int getValueByToken(std::string const &token) const { return __elements[getIndexByToken(token)].second; } int size() const { return __elements.size(); } bool containsToken(std::string const &token) const { return __s2idx.find(token) != __s2idx.end(); } bool containsValue(int value) const { return __i2idx.find(value) != __i2idx.end(); } bool validIndex(int idx) const { return idx >= 0 && idx <= size(); } ! /// Not defined; should never be called. EnumerationCore(); ! /// Construct a new enum from a white-space-separated string. EnumerationCore(std::string const &s): Referenced() { __init(s); --- 208,253 ---- return iter->second; } + + /// Get the value associated with a given token. int getValueByToken(std::string const &token) const { return __elements[getIndexByToken(token)].second; } + + /// Return the number of elements in the enumeration. int size() const { return __elements.size(); } + + /// Test if this enumeration contains a given token. bool containsToken(std::string const &token) const { return __s2idx.find(token) != __s2idx.end(); } + + /// Test if this enumeration contains a given value. bool containsValue(int value) const { return __i2idx.find(value) != __i2idx.end(); } + + /// Test if an index is valid. bool validIndex(int idx) const { return idx >= 0 && idx <= size(); } ! ! /// Private default constructor. ! /// ! /// This method is not defined and should never be called. EnumerationCore(); ! ! /// Construct a new enum from a string. ! /// ! /// The enumeration tokens are must be separated by ! /// white-space and can have an optional value assignment. ! /// Tokens without explicit values will be assigned ! /// sequential values following the last specified ! /// value. The initial default value is zero. ! /// ! /// Examples: ! /// @code ! /// "zero one two three" ! /// "one=1 two three ten=10 eleven" ! /// @endcode EnumerationCore(std::string const &s): Referenced() { __init(s); *************** *** 212,215 **** --- 263,267 ---- * static Enumeration as the template argument. For example: * + * @code * class Foo { * public: *************** *** 218,226 **** --- 270,281 ---- * ... * }; + * @endcode * * When defining the Enumeration, specify the items in order * as a white-space separated string, as in: * + * @code * Enumeration Foo::MyEnumeration("apple orange cherry"); + * @endcode */ class Enumeration { *************** *** 251,254 **** --- 306,310 ---- } + /// Return the index corresponding to a given token. int getIndexByToken(std::string const &token) const { assert(__core.valid()); *************** *** 256,259 **** --- 312,316 ---- } + /// Return the index corresponding to a given value. int getIndexByValue(int value) const { assert(__core.valid()); *************** *** 261,264 **** --- 318,322 ---- } + /// Return the token corresponding to a given index. std::string getTokenByIndex(int idx) const { assert(__core.valid()); *************** *** 266,269 **** --- 324,328 ---- } + /// Return the value corresponding to a given index. int getValueByIndex(int idx) const { assert(__core.valid()); *************** *** 271,275 **** } ! inline const std::vector<EnumLink> __range(int idx1, int idx2) const; --- 330,337 ---- } ! /// Return a list of enums in a range of indices. ! /// ! /// @param idx1 The lower index (inclusive). ! /// @param idx2 The upper index (inclusive). inline const std::vector<EnumLink> __range(int idx1, int idx2) const; *************** *** 278,281 **** --- 340,344 ---- } + /// Construct a new EnumLink bound to this Enumeration. inline EnumLink makeEnum(int idx) const; *************** *** 356,360 **** --- 419,426 ---- } + /// Return the last enum in the Enumeration set. inline EnumLink last() const; + + /// Return the first enum in the Enumeration set. inline EnumLink first() const; *************** *** 401,405 **** Enumeration __E; protected: ! /// integer index of the enum int _idx; --- 467,471 ---- Enumeration __E; protected: ! /// the index of the enum int _idx; *************** *** 410,419 **** --- 476,488 ---- EnumLink(): __E(), _idx(0) {} + /// Get the enumeration index of the enum. int getIndex() const { return _idx; } + /// Construct a new EnumLink bound to a given Enumeration. EnumLink(int idx, Enumeration const &E): __E(E), _idx(idx) { E.__checkIndex(idx); } + /// Construct a new EnumLink bound to the current Enumeration. EnumLink makeEnum(int idx) const { return EnumLink(idx, __E); *************** *** 429,433 **** } ! // create a new EnumLink bound to an existing Enumeration. EnumLink(Enumeration const &E, std::string const &token): __E(E), _idx(0) { _idx = __E.getIndexByToken(token); --- 498,502 ---- } ! // Create a new EnumLink bound to an existing Enumeration. EnumLink(Enumeration const &E, std::string const &token): __E(E), _idx(0) { _idx = __E.getIndexByToken(token); |
From: <mk...@us...> - 2003-08-14 21:56:47
|
Update of /cvsroot/csp/APPLICATIONS/SimData/Include/SimData In directory sc8-pr-cvs1:/tmp/cvs-serv15755/Include/SimData Modified Files: DataArchive.h DataManager.h Enum.h Quat.h Random.h Log Message: Index: DataArchive.h =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/Include/SimData/DataArchive.h,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** DataArchive.h 14 Aug 2003 12:19:12 -0000 1.15 --- DataArchive.h 14 Aug 2003 21:50:30 -0000 1.16 *************** *** 279,288 **** /** ! * Get all children of a given path. * ! * For path "A:X.Y", returns all object id's "A:X.Y.*". The id's * can be converted to human-readable form by getPathString(). * ! * @param path the path to search for children * @returns a list of object id's immediately below the given path. */ --- 279,288 ---- /** ! * Get all children of a given object id. * ! * For id "A:X.Y", returns all object id's "A:X.Y.*". The id's * can be converted to human-readable form by getPathString(). * ! * @param id the object id to search for children * @returns a list of object id's immediately below the given path. */ *************** *** 414,418 **** * Find the table entry corresponding to a given object. * ! * @param path the object id to lookup * @param path_str the path string, if available (only used for * error logging). --- 414,418 ---- * Find the table entry corresponding to a given object. * ! * @param id the object id to lookup * @param path_str the path string, if available (only used for * error logging). Index: DataManager.h =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/Include/SimData/DataManager.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** DataManager.h 14 Aug 2003 12:19:12 -0000 1.7 --- DataManager.h 14 Aug 2003 21:50:30 -0000 1.8 *************** *** 93,102 **** /** ! * Get all children of a given path. * ! * For path "A:X.Y", returns all object id's "A:X.Y.*". The id's * can be converted to human-readable form by getPathString(). * ! * @param path the path to search for children * @returns a list of object id's immediately below the given path. */ --- 93,102 ---- /** ! * Get all children of a given object id. * ! * For id "A:X.Y", returns all object id's "A:X.Y.*". The id's * can be converted to human-readable form by getPathString(). * ! * @param id the object id to search for children * @returns a list of object id's immediately below the given path. */ Index: Enum.h =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/Include/SimData/Enum.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Enum.h 14 Aug 2003 12:19:12 -0000 1.11 --- Enum.h 14 Aug 2003 21:50:30 -0000 1.12 *************** *** 333,337 **** /// Get a list of Enums in the range between two Enums (inclusive). ! inline const std::vector<EnumLink> range(const EnumLink& a, const EnumLink& b) const; /// Get a list of Enums in the range between two strings (inclusive). --- 333,337 ---- /// Get a list of Enums in the range between two Enums (inclusive). ! inline const std::vector<EnumLink> range(EnumLink const &a, EnumLink const &b) const; /// Get a list of Enums in the range between two strings (inclusive). *************** *** 342,346 **** /// Test for inclusion in the Enumeration set. ! inline bool contains(const EnumLink& x) const; /// Test for inclusion in the Enumeration set. --- 342,346 ---- /// Test for inclusion in the Enumeration set. ! inline bool contains(EnumLink const &x) const; /// Test for inclusion in the Enumeration set. *************** *** 351,355 **** /// Test for inclusion in the Enumeration set. ! bool contains(const std::string& token) const { assert(__core.valid()); return __core->containsToken(token); --- 351,355 ---- /// Test for inclusion in the Enumeration set. ! bool contains(std::string const &token) const { assert(__core.valid()); return __core->containsToken(token); *************** *** 595,599 **** EnumLink const & operator=(EnumLink const &e) { return EnumLink::operator=(e); } EnumLink const &operator =(int value) { return EnumLink::operator=(value); } ! EnumLink const &operator =(std::string &token) { return EnumLink::operator=(token); } #endif /// Return a string representation (for SWIG/Python). --- 595,599 ---- EnumLink const & operator=(EnumLink const &e) { return EnumLink::operator=(e); } EnumLink const &operator =(int value) { return EnumLink::operator=(value); } ! EnumLink const &operator =(std::string const &token) { return EnumLink::operator=(token); } #endif /// Return a string representation (for SWIG/Python). *************** *** 622,631 **** } ! inline const std::vector<EnumLink> Enumeration::range(const EnumLink& a, const EnumLink& b) const { if (a.__E != *this || b.__E != *this) throw EnumTypeError(); return __range(a.getIndex(), b.getIndex()); } ! inline const std::vector<EnumLink> Enumeration::range(const std::string& a, const std::string& b) const { return __range(getIndexByToken(a), getIndexByToken(b)); } --- 622,631 ---- } ! inline const std::vector<EnumLink> Enumeration::range(EnumLink const &a, EnumLink const &b) const { if (a.__E != *this || b.__E != *this) throw EnumTypeError(); return __range(a.getIndex(), b.getIndex()); } ! inline const std::vector<EnumLink> Enumeration::range(std::string const &a, std::string const &b) const { return __range(getIndexByToken(a), getIndexByToken(b)); } *************** *** 664,668 **** } ! inline bool Enumeration::contains(const EnumLink& x) const { return x.__E == *this; } inline EnumLink Enumeration::last() const { --- 664,668 ---- } ! inline bool Enumeration::contains(EnumLink const &x) const { return x.__E == *this; } inline EnumLink Enumeration::last() const { Index: Quat.h =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/Include/SimData/Quat.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Quat.h 14 Aug 2003 12:19:12 -0000 1.4 --- Quat.h 14 Aug 2003 21:50:30 -0000 1.5 *************** *** 318,322 **** * Set this Quat to represent a rotation about an axis. * ! * @param the angle of rotation (right-handed) in radians. * @param x the x component of the rotation axis. * @param y the y component of the rotation axis. --- 318,322 ---- * Set this Quat to represent a rotation about an axis. * ! * @param angle the angle of rotation (right-handed) in radians. * @param x the x component of the rotation axis. * @param y the y component of the rotation axis. *************** *** 329,333 **** * Set this Quat to represent a rotation about an axis. * ! * @param the angle of rotation (right-handed) in radians. * @param vec the rotation axis. */ --- 329,333 ---- * Set this Quat to represent a rotation about an axis. * ! * @param angle the angle of rotation (right-handed) in radians. * @param vec the rotation axis. */ Index: Random.h =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/Include/SimData/Random.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Random.h 7 Aug 2003 17:47:30 -0000 1.11 --- Random.h 14 Aug 2003 21:50:30 -0000 1.12 *************** *** 185,189 **** * Reseed the random number generator. * ! * @param seed the new seed. */ void setSeed(unsigned long int s); --- 185,189 ---- * Reseed the random number generator. * ! * @param s the new seed. */ void setSeed(unsigned long int s); *************** *** 356,360 **** * Reseed the random number generator. * ! * @param seed the new seed. */ void setSeed(unsigned long int s); --- 356,360 ---- * Reseed the random number generator. * ! * @param s the new seed. */ void setSeed(unsigned long int s); |
From: <mk...@us...> - 2003-08-14 21:56:35
|
Update of /cvsroot/csp/APPLICATIONS/SimData In directory sc8-pr-cvs1:/tmp/cvs-serv15755 Modified Files: CHANGES.current Makefile Log Message: Index: CHANGES.current =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/CHANGES.current,v retrieving revision 1.63 retrieving revision 1.64 diff -C2 -d -r1.63 -r1.64 *** CHANGES.current 14 Aug 2003 12:19:12 -0000 1.63 --- CHANGES.current 14 Aug 2003 21:50:30 -0000 1.64 *************** *** 2,5 **** --- 2,8 ---- =========================== + 2003-08-14: onsight + Doxygen comment fixes. + 2003-08-13: onsight Complete rewrite of the Enumeration classes, using Enum Index: Makefile =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/Makefile,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** Makefile 14 Aug 2003 12:19:12 -0000 1.17 --- Makefile 14 Aug 2003 21:50:30 -0000 1.18 *************** *** 7,11 **** export GLDOPTS = -shared -lswigpy -ldl export GSWOPTS = -c -c++ -python -noexcept ! export CXX = g++ export SWIG = swig --- 7,11 ---- export GLDOPTS = -shared -lswigpy -ldl export GSWOPTS = -c -c++ -python -noexcept ! export CXX = g++-3.3 export SWIG = swig |
From: <mk...@us...> - 2003-08-14 17:31:28
|
Update of /cvsroot/csp/APPLICATIONS/SimData In directory sc8-pr-cvs1:/tmp/cvs-serv26895 Modified Files: CHANGES.current Makefile README TODO Log Message: Index: CHANGES.current =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/CHANGES.current,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -d -r1.62 -r1.63 *** CHANGES.current 7 Aug 2003 18:05:35 -0000 1.62 --- CHANGES.current 14 Aug 2003 12:19:12 -0000 1.63 *************** *** 2,5 **** --- 2,65 ---- =========================== + 2003-08-13: onsight + Complete rewrite of the Enumeration classes, using Enum + templates, simdata::Ref, and an overall better design. The + new code allows the parent Enumerations to be bound to + member variable *types* duing static construction, so that + the possible values for a type can be querried without + instantiating the parent class. This is very useful for + introspecting classes, allowing a SimData XML editor to + determine a list of possible values for an Enum directly + from an ObjectInterface without creating an instance of + the corresponding class. The Python bindings for the + Enum classes have also been redesigned and improved. + + Changed some DataArchive and hash methods to use + std::string const& instead of const char*. + + Fixed some bugs in Date.h and Matrix.h that '-pedantic' + uncovered. Added more base class ctor calls to satisfy + '-pedantic' as well. + + Added isSubclass() method to ObjectInterface (and the + InterfaceProxy clases) to test the inherintance chain + using interfaces without creating object instances. The + class relationships used in the test are based on the + classes listed in the SIMDATA_XML_INTERFACE() macros, not + the full C++ class hierarchy. + + Added SIMDATA_SUBEXCEPTION macro for creating exception + hierarchies. + + Changed the default version string to report the build + date and time, which provides a helpful sanity check when + more than one version of the SimData is in your library + search path. + + 2003-08-10: onsight + Minor fixes/pragmas to reduce useless warning messages under + VS 2003. + + Added support to the object registry, object interfaces, + and member accessors for member variable type introspection. + BaseTypes other than Object must now override typeString() + to return a string identifier for their type (which should + start with "type::"). Other prefix convensions are as + follows: + * Type strings for builtin types (like 'float') start with + 'builtin::'. See ObjectInterface.h for a complete list. + * Type strings for BaseTypes other than Object start with + 'type::', followed by the name of the type (e.g. Date). + * Type strings for Objects are just the classname of the + object. + * Type strings for std::vectors start with 'vector::'. + * Type strings for templated classes are followed by the + template type (e.g. type::Link::SomeObjectClass). + + Added object interface lookup based on object id to DataArchive + and DataManager. Given an object ID (or path) you can now + determine the object class and introspect the member variables + without creating an instance of the object. + 2003-08-07: onsight Added SIMDATA_EXPORT to classes in Random.h Index: Makefile =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/Makefile,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** Makefile 6 Aug 2003 06:36:24 -0000 1.16 --- Makefile 14 Aug 2003 12:19:12 -0000 1.17 *************** *** 3,11 **** export PYTHON_INCLUDE := $(shell python setup.py python_include_path) ! export GDEBUGF = -g -Wall ! export GCFLAGS = -fPIC -O2 -pedantic# -march=athlon-tbird export GLDOPTS = -shared -lswigpy -ldl export GSWOPTS = -c -c++ -python -noexcept ! export CXX = g++-3.3 export SWIG = swig --- 3,11 ---- export PYTHON_INCLUDE := $(shell python setup.py python_include_path) ! export GDEBUGF = -g -W -Wall -Werror -pedantic ! export GCFLAGS = -fPIC -O2 # -march=athlon-tbird export GLDOPTS = -shared -lswigpy -ldl export GSWOPTS = -c -c++ -python -noexcept ! export CXX = g++ export SWIG = swig Index: README =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/README,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** README 26 Jul 2003 19:44:26 -0000 1.6 --- README 14 Aug 2003 12:19:12 -0000 1.7 *************** *** 1,5 **** SimData - A library for efficient use of data XML in simulations. ! Release 0.3.2 Copyright (C) 2002, 2003 Mark Rose <mr...@st...> --- 1,5 ---- SimData - A library for efficient use of data XML in simulations. ! Release 0.3.4 Copyright (C) 2002, 2003 Mark Rose <mr...@st...> *************** *** 7,18 **** See COPYING for details. ---------------------------------------------------------------------- CAVEATS ! This library is ALPHA! Do not expect it to be polished in any way. It ! does work, at least under the proper conditions, which is why it has ! been released. Only through testing and use will it evolve into a robust ! and stable platform for utilizing XML data in simulations. SimData is written primarily for the Combat Simulator Project (CSP) --- 7,20 ---- See COPYING for details. + For documentation, updates, and information, visit the SimData wiki + pages at http://csp.sourceforge.net/wiki/SimData + ---------------------------------------------------------------------- CAVEATS ! This library is BETA! Do not expect it to be completely polished. ! Only through testing and use will it evolve into a robust and stable ! platform for utilizing XML data in simulations. SimData is written primarily for the Combat Simulator Project (CSP) *************** *** 22,31 **** SimData was initially developed under Linux using GCC 2.95 and 3.0. ! Current development occurs mainly under GCC 3.2. GCC 3.3 has also been ! tested and will soon become the primary development platform. The ! library also receives routine testing under MS VC6 and now .NET as part ! of the Combat Simulator Project. If you encounter problems, please ! report them (with patches if possible) to the CSP developer's forum at ! http://csp.sourceforge.net/forum. --- 24,34 ---- SimData was initially developed under Linux using GCC 2.95 and 3.0. ! Current development occurs mainly under GCC 3.3, although support for ! GCC 3.2 is still actively maintained. The library also receives routine ! testing under MS Visual Studio .NET 2003 as part of the Combat Simulator ! Project. Earlier versions of VS and MSVC are no longer supported. ! ! If you encounter problems, please report them (with patches if possible) ! to the CSP developer's forum at http://csp.sourceforge.net/forum. *************** *** 42,46 **** Linux are available from http://www.python.org. Python version 2.2 or newer is required. Under Windows, be sure to add the Python path to ! your global path so that VC can find it. If you are using MS VC6 you will also need have at least SP5 installed --- 45,49 ---- Linux are available from http://www.python.org. Python version 2.2 or newer is required. Under Windows, be sure to add the Python path to ! your global path so that Visual Studio can find it. If you are using MS VC6 you will also need have at least SP5 installed *************** *** 106,115 **** - As a quick test, change to the Source directory and run Python. Try - typing "import SimData". You should see a line similar to "loaded @ - 0x4883012". If not, something went wrong... post to the CSP developer's - forum and we can try to find the problem. - - INSTALLING AND USING SIMDATA --- 109,112 ---- *************** *** 121,127 **** accomplish the same thing with 'python setup.py install'. ! Under Windows, run 'python setup.py make_install_win'. Under XP ! you may need to have sufficient priviledges to write to the Python ! directories. To use the SimData headers for development, just add the usual Python --- 118,124 ---- accomplish the same thing with 'python setup.py install'. ! Under Windows, run 'python setup.py make_install_win'. If you ! are running Windows XP you may need to have sufficient priviledges to ! write to the Python directories. To use the SimData headers for development, just add the usual Python Index: TODO =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/TODO,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** TODO 26 Jul 2003 19:44:26 -0000 1.5 --- TODO 14 Aug 2003 12:19:12 -0000 1.6 *************** *** 1,48 **** THE BIG PICTURE ! ---------------------------------------------------------------- ! This version is incomplete in the sense of being ALPHA, ! but also in a more fundamental sense. ! The original concept for SimData relied on Python/SWIG ! (with special support for cross-language polymorphism) to ! provide an interface for dynamically setting class member ! variables as indicated by the source XML stream. While ! this approach worked, it forced the application using ! SimData to wrap all classes that loaded external data ! with SWIG. ! Somewhere (well) along the way, I thought of a less intrusive ! way to allow SimData to access class member variables in ! the target application. The application still must define ! a minimal Python module in order to initialize the class ! interfaces, but this is much less onerous than the previous ! approach. The downside is this new method relies on nested ! classes to provide XML interfaces. Since SWIG does not ! currently support nested classes, it is no longer possible ! to extend XML interfaces of application classes using ! Python. Also, much of the Python code found in SimData.py ! which was intended to assist in such extension is now ! obsolete. Once a future version of SWIG supports nested ! classes (which appears to be a priority for SWIG's developers), ! new Python code will need to be written to replace much of ! what is now in SimData.py. ! Recently (April 2003) I've been considering Boost::Python ! bindings as well. Boost supports nested classes and poly- ! morphism, but requires more hands-on wrapping. A new ! project called Pyste promises to provide much more automated ! wrapping capabilities to Boost, using an interface design ! that is very similar to SWIG. This is still a bit too ! immature for use in SimData, but it may be a viable option ! before long. OTHER ! ---------------------------------------------------------------- * Improve the build on Linux and Windows. This has already gotten considerably better, but there's always more work to do. * Eliminate unnecessary inline code from headers. --- 1,51 ---- THE BIG PICTURE ! ----------------------------------------------------------------------- ! This version is incomplete in the sense of being BETA, but also in a ! more fundamental sense. ! The original concept for SimData relied on Python/SWIG (with special ! support for cross-language polymorphism) to provide an interface for ! dynamically setting class member variables as indicated by the source ! XML stream. While this approach worked, it forced the application using ! SimData to wrap all classes that loaded external data with SWIG. ! Somewhere (well) along the way, I thought of a less intrusive way to ! allow SimData to access class member variables in the target ! application. The application still must define a minimal Python module ! in order to initialize the class interfaces, but this is much less ! onerous than the previous approach. The downside is this new method ! relies on nested classes to provide XML interfaces. Since SWIG does not ! currently support nested classes, it is no longer possible to extend XML ! interfaces of application classes using Python. Also, much of the Python ! code developed to assist in such extension is now obsolete. Once a ! future version of SWIG supports nested classes (which appears to be a ! priority for SWIG's developers), new Python code will need to be written ! to bridge the object interface and registry code into Python. ! Another option I've been considering is using Boost::Python to provide ! bindings. Boost supports nested classes and polymorphism, but requires ! more hands-on wrapping. A new project called Pyste promises to provide ! much more automated wrapping capabilities to Boost, using an interface ! design that is very similar to SWIG. This is still a bit too immature ! for use in SimData, but it may be a viable option before long. On the ! downside, tests I've made with Boost generated wrappers that were as ! much as 10 times larger than the SWIG equivalents. OTHER ! ----------------------------------------------------------------------- * Improve the build on Linux and Windows. This has already gotten considerably better, but there's always more work to do. + + * Refine and extend the data classes; improve the Python bindings + + * Add examples to the doxygen file comments for each type class. + + * Add doxygen comments to uncommented methods + + * Improve the SimData wiki documentation * Eliminate unnecessary inline code from headers. |
From: <mk...@us...> - 2003-08-13 12:23:57
|
Update of /cvsroot/csp/APPLICATIONS/CSPSim/Tools/Terrain/tile In directory sc8-pr-cvs1:/tmp/cvs-serv11339 Modified Files: Makefile tile.cpp Log Message: Index: Makefile =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Tools/Terrain/tile/Makefile,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Makefile 26 Jul 2003 21:35:01 -0000 1.3 --- Makefile 13 Aug 2003 11:47:07 -0000 1.4 *************** *** 1,5 **** all: csptile csptile: tile.cpp ! g++ -O2 -g $^ -o $@ -I/usr/include/python2.2 -lSimData -lz --- 1,9 ---- + PYTHONLIB = /usr/lib/python2.2/site-packages + PYTHONINC = /usr/include/python2.2 + all: csptile csptile: tile.cpp ! g++ -O2 -g $^ -o $@ -I$(PYTHONINC) -L$(PYTHONLIB)/SimData -lSimData -lz ! Index: tile.cpp =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Tools/Terrain/tile/tile.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** tile.cpp 26 Jul 2003 21:35:01 -0000 1.3 --- tile.cpp 13 Aug 2003 11:47:08 -0000 1.4 *************** *** 64,71 **** public: GeodesicRestriction(double lat0, double lon0, double lat1, double lon1) { ! _lat0 = DegreesToRadians(lat0); ! _lon0 = DegreesToRadians(lon0); ! _lat1 = DegreesToRadians(lat1); ! _lon1 = DegreesToRadians(lon1); assert(lat1 >= lat0); assert(lon1 >= lon0); --- 64,71 ---- public: GeodesicRestriction(double lat0, double lon0, double lat1, double lon1) { ! _lat0 = simdata::toRadians(lat0); ! _lon0 = simdata::toRadians(lon0); ! _lat1 = simdata::toRadians(lat1); ! _lon1 = simdata::toRadians(lon1); assert(lat1 >= lat0); assert(lon1 >= lon0); *************** *** 316,331 **** READI(zone); gzread(fp, buffer, 4*sizeof(int)); ! READD(cor0.x); ! READD(cor1.x); ! READD(cor2.x); ! READD(cor3.x); ! READD(cor0.y); ! READD(cor1.y); ! READD(cor2.y); ! READD(cor3.y); ! //std::cout << cor0.x << ", " << cor0.y << " utm\n"; ! READD(res.x); ! READD(res.y); ! READD(res.z); READI(gnd_units); READI(elev_units); --- 316,331 ---- READI(zone); gzread(fp, buffer, 4*sizeof(int)); ! READD(cor0.x()); ! READD(cor1.x()); ! READD(cor2.x()); ! READD(cor3.x()); ! READD(cor0.y()); ! READD(cor1.y()); ! READD(cor2.y()); ! READD(cor3.y()); ! //std::cout << cor0.x() << ", " << cor0.y() << " utm\n"; ! READD(res.x()); ! READD(res.y()); ! READD(res.z()); READI(gnd_units); READI(elev_units); *************** *** 336,340 **** int n_col; READI(n_col); ! if (res.x != 30.0 || res.y != 30.0 || res.z != 1.0) { //std::cout << "10m\n"; //gzclose(fp); --- 336,340 ---- int n_col; READI(n_col); ! if (res.x() != 30.0 || res.y() != 30.0 || res.z() != 1.0) { //std::cout << "10m\n"; //gzclose(fp); *************** *** 354,361 **** std::cout << " > " << i << " of " << n_col << "\n"; std::cout << " > " << filename << "\n"; ! std::cout << " > " << res.x << " " << res.y << " " << res.z << "\n"; } if (n > 0) { ! //std::cout << "ROWS = " << n << " " << d.E << " " << res.x << "\n"; d.setSize(n); gzread(fp, d.elev, n * sizeof(unsigned short)); --- 354,361 ---- std::cout << " > " << i << " of " << n_col << "\n"; std::cout << " > " << filename << "\n"; ! std::cout << " > " << res.x() << " " << res.y() << " " << res.z() << "\n"; } if (n > 0) { ! //std::cout << "ROWS = " << n << " " << d.E << " " << res.x() << "\n"; d.setSize(n); gzread(fp, d.elev, n * sizeof(unsigned short)); *************** *** 378,384 **** gscale = 1.0; if (gnd_units == 1) gscale *= 12 * 0.0254; ! if (fabs(cols.begin()->E - cor0.x) >= 500.0) { std::cout << "Problem with DAT input for quad " << filename << "\n"; ! std::cout << "Corner0.x = " << cor0.x << "\n"; std::cout << "Cols[0].E = " << cols.begin()->E << "\n"; std::cout << "Differ by more than 500 m, possible zone mismatch?\n"; --- 378,384 ---- gscale = 1.0; if (gnd_units == 1) gscale *= 12 * 0.0254; ! if (fabs(cols.begin()->E - cor0.x()) >= 500.0) { std::cout << "Problem with DAT input for quad " << filename << "\n"; ! std::cout << "Corner0.x = " << cor0.x() << "\n"; std::cout << "Cols[0].E = " << cols.begin()->E << "\n"; std::cout << "Differ by more than 500 m, possible zone mismatch?\n"; *************** *** 401,410 **** */ int addNearest(std::vector<DEMcol>::iterator &i, UTM const &utm, ElevationFinder &finder) { ! double fN = (utm.northing() - i->N) / (res.y*gscale); double dN, dE = (utm.easting() - i->E); //std::cout << gscale << " " << fN << " " << dE << " <----\n"; int idx = int(fN); //std::cout << ":\n"; ! if (idx < -10 || idx >= i->n+10 || fabs(dE) > 10.0*res.x) { //std::cout << "OUT_OF_RANGE " << dE << "dE " << idx << " " << i->E << "E " << utm.asString() << "\n"; if (idx < -10) return -1; --- 401,410 ---- */ int addNearest(std::vector<DEMcol>::iterator &i, UTM const &utm, ElevationFinder &finder) { ! double fN = (utm.northing() - i->N) / (res.y()*gscale); double dN, dE = (utm.easting() - i->E); //std::cout << gscale << " " << fN << " " << dE << " <----\n"; int idx = int(fN); //std::cout << ":\n"; ! if (idx < -10 || idx >= i->n+10 || fabs(dE) > 10.0*res.x()) { //std::cout << "OUT_OF_RANGE " << dE << "dE " << idx << " " << i->E << "E " << utm.asString() << "\n"; if (idx < -10) return -1; *************** *** 413,421 **** } if (idx < 0) { ! int xside = cor0.x + cor3.x - 2.0*utm.easting() > 0 ? -1 : 1; //std::cout << "DOWN\n"; finder.setHint(0, -1); finder.setHint(xside, -1); ! dN = fN * res.y * gscale; //std::cout << "C- " << fN << " " << dN << " " << dE << std::endl; finder.setPartialElevation(_scale(i->elev[0]), dE*dE + dN*dN); --- 413,421 ---- } if (idx < 0) { ! int xside = cor0.x() + cor3.x() - 2.0*utm.easting() > 0 ? -1 : 1; //std::cout << "DOWN\n"; finder.setHint(0, -1); finder.setHint(xside, -1); ! dN = fN * res.y() * gscale; //std::cout << "C- " << fN << " " << dN << " " << dE << std::endl; finder.setPartialElevation(_scale(i->elev[0]), dE*dE + dN*dN); *************** *** 424,439 **** if (idx >= i->n-1) { //std::cout << "UP\n"; ! int xside = cor0.x + cor3.x - 2.0*utm.easting() > 0 ? -1 : 1; finder.setHint(0, +1); finder.setHint(xside, +1); ! dN = (fN - (i->n-1)) * res.y * gscale; //std::cout << "C+ " << (fN - (i->n-1)) << "|" << dN << " " << dE << std::endl; finder.setPartialElevation(_scale(i->elev[i->n-1]), dE*dE + dN*dN); return +1; } ! dN = (fN - idx) * res.y * gscale; //std::cout << "CA " << dN << " " << dE << std::endl; finder.setPartialElevation(_scale(i->elev[idx]), dE*dE + dN*dN); ! dN = (fN - idx - 1.0) * res.y * gscale; //std::cout << "CB " << dN << " " << dE << std::endl; finder.setPartialElevation(_scale(i->elev[idx+1]), dE*dE + dN*dN); --- 424,439 ---- if (idx >= i->n-1) { //std::cout << "UP\n"; ! int xside = cor0.x() + cor3.x() - 2.0*utm.easting() > 0 ? -1 : 1; finder.setHint(0, +1); finder.setHint(xside, +1); ! dN = (fN - (i->n-1)) * res.y() * gscale; //std::cout << "C+ " << (fN - (i->n-1)) << "|" << dN << " " << dE << std::endl; finder.setPartialElevation(_scale(i->elev[i->n-1]), dE*dE + dN*dN); return +1; } ! dN = (fN - idx) * res.y() * gscale; //std::cout << "CA " << dN << " " << dE << std::endl; finder.setPartialElevation(_scale(i->elev[idx]), dE*dE + dN*dN); ! dN = (fN - idx - 1.0) * res.y() * gscale; //std::cout << "CB " << dN << " " << dE << std::endl; finder.setPartialElevation(_scale(i->elev[idx+1]), dE*dE + dN*dN); *************** *** 445,449 **** */ inline double _scale(double elevation) { ! double scale = res.z; if (elev_units == 1) scale *= 12*0.0254; // feet to meters return (elevation - bias) * scale; --- 445,449 ---- */ inline double _scale(double elevation) { ! double scale = res.z(); if (elev_units == 1) scale *= 12*0.0254; // feet to meters return (elevation - bias) * scale; *************** *** 475,479 **** t_idx++; } ! int yside = cor0.y + cor1.y - 2.0*utm.northing() > 0 ? -1 : 1; if (i == j) { //std::cout << "END\n"; --- 475,479 ---- t_idx++; } ! int yside = cor0.y() + cor1.y() - 2.0*utm.northing() > 0 ? -1 : 1; if (i == j) { //std::cout << "END\n"; *************** *** 560,567 **** } virtual void setExtentDegrees(double left, double right, double bottom, double top) { ! _left = RadiansToDegrees(left); ! _right = RadiansToDegrees(right); ! _bottom = RadiansToDegrees(bottom); ! _top = RadiansToDegrees(top); } virtual void setExtentMeters(double left, double right, double bottom, double top) { --- 560,567 ---- } virtual void setExtentDegrees(double left, double right, double bottom, double top) { ! _left = simdata::toDegrees(left); ! _right = simdata::toDegrees(right); ! _bottom = simdata::toDegrees(bottom); ! _top = simdata::toDegrees(top); } virtual void setExtentMeters(double left, double right, double bottom, double top) { *************** *** 978,983 **** tile_dy = tile_height / (tile_y_size-overlap); Matrix3 Ry, Rz; ! Rz = RotationZMatrix3(center.longitude()); ! Ry = RotationYMatrix3(-center.latitude()); R_center = Rz * Ry; R = 6371010.0; // nominal radius of the earth --- 978,983 ---- tile_dy = tile_height / (tile_y_size-overlap); Matrix3 Ry, Rz; ! Rz.makeRotate(center.longitude(), Vector3::ZAXIS); ! Ry.makeRotate(-center.latitude(), Vector3::YAXIS); R_center = Rz * Ry; R = 6371010.0; // nominal radius of the earth *************** *** 996,1000 **** void prepareSampling() { ! Gauss g(0.0, 1.0); int i; double avg_x = 0.0; --- 996,1001 ---- void prepareSampling() { ! simdata::random::Gauss g; ! g->setDistribution(0.0, 1.0); int i; double avg_x = 0.0; *************** *** 1002,1007 **** if (subsamples < 1) subsamples = 1; for (i = 0; i < subsamples; i++) { ! double x = g.newRand(); ! double y = g.newRand(); x_subsamples.push_back(x); y_subsamples.push_back(y); --- 1003,1008 ---- if (subsamples < 1) subsamples = 1; for (i = 0; i < subsamples; i++) { ! double x = g.sample(); ! double y = g.sample(); x_subsamples.push_back(x); y_subsamples.push_back(y); *************** *** 1157,1163 **** void project(double x, double y, double &lat, double &lon) { Vector3 pos(R, x, y); ! pos = Normalized(R_center * pos); ! lon = atan2(pos.y, pos.x); ! lat = asin(pos.z); } --- 1158,1164 ---- void project(double x, double y, double &lat, double &lon) { Vector3 pos(R, x, y); ! pos = (R_center * pos).normalized(); ! lon = atan2(pos.y(), pos.x()); ! lat = asin(pos.z()); } *************** *** 1168,1173 **** */ DEM* getDEM(double lat, double lon) { ! lat *= 180.0/G_PI; ! lon *= 180.0/G_PI; int index = int((lat+90)*8)*10000 + int((lon+180)*8); //std::cout << lat << " " << lon << " " << index << std::endl; --- 1169,1174 ---- */ DEM* getDEM(double lat, double lon) { ! lat *= 180.0/simdata::PI; ! lon *= 180.0/simdata::PI; int index = int((lat+90)*8)*10000 + int((lon+180)*8); //std::cout << lat << " " << lon << " " << index << std::endl; *************** *** 1177,1185 **** // double check indexing UTM corner; ! corner.set(d->cor0.x, d->cor0.y, d->zone, 'X'); LLA cor0(corner, GeoRef::NAD27); ! corner.set(d->cor2.x, d->cor2.y, d->zone, 'X'); LLA cor2(corner, GeoRef::NAD27); ! if (!d->isZero() && !(lon+0.0001 >= cor0.longitude()*180.0/G_PI && lon-0.0001 <= cor2.longitude()*180.0/G_PI)) { std::cout << cor0.asString() << cor2.asString() << "\n"; std::cout << lat << " " << lon << "\n"; --- 1178,1186 ---- // double check indexing UTM corner; ! corner.set(d->cor0.x(), d->cor0.y(), d->zone, 'X'); LLA cor0(corner, GeoRef::NAD27); ! corner.set(d->cor2.x(), d->cor2.y(), d->zone, 'X'); LLA cor2(corner, GeoRef::NAD27); ! if (!d->isZero() && !(lon+0.0001 >= cor0.longitude()*180.0/simdata::PI && lon-0.0001 <= cor2.longitude()*180.0/simdata::PI)) { std::cout << cor0.asString() << cor2.asString() << "\n"; std::cout << lat << " " << lon << "\n"; *************** *** 1221,1225 **** while (finder.getHint(dx, dy)) { //std::cout << dx << " | " << dy << std::endl; ! dem = getDEM(lat + dy * 0.125 * G_PI / 180.0, lon + dx * 0.125 * G_PI / 180.0); //std::cout << "Looking for more " << lon << " - " << dx << ":" << dy << "\n"; dem->getElevation(finder); --- 1222,1226 ---- while (finder.getHint(dx, dy)) { //std::cout << dx << " | " << dy << std::endl; ! dem = getDEM(lat + dy * 0.125 * simdata::PI / 180.0, lon + dx * 0.125 * simdata::PI / 180.0); //std::cout << "Looking for more " << lon << " - " << dx << ":" << dy << "\n"; dem->getElevation(finder); |
From: <mk...@us...> - 2003-08-13 12:08:34
|
Update of /cvsroot/csp/APPLICATIONS/CSPSim In directory sc8-pr-cvs1:/tmp/cvs-serv11462 Modified Files: CHANGES.current Log Message: Index: CHANGES.current =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/CHANGES.current,v retrieving revision 1.63 retrieving revision 1.64 diff -C2 -d -r1.63 -r1.64 *** CHANGES.current 6 Aug 2003 07:56:56 -0000 1.63 --- CHANGES.current 13 Aug 2003 11:48:02 -0000 1.64 *************** *** 2,5 **** --- 2,10 ---- =========================== + 2003-08-12: onsight + Minor updates to Terrain/dem2dat and Terrain/tile to + sync with the latest SimData API changes. Improved + both Makefiles slightly but they're still very basic. + 2003-08-05: onsight Initial updates to use new SimData APIs for Random, |
From: <mk...@us...> - 2003-08-13 11:53:21
|
Update of /cvsroot/csp/APPLICATIONS/CSPSim/Tools/Terrain/dem2dat In directory sc8-pr-cvs1:/tmp/cvs-serv9681 Modified Files: Makefile dem2dat.h Log Message: Index: Makefile =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Tools/Terrain/dem2dat/Makefile,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Makefile 22 Jul 2003 21:18:13 -0000 1.2 --- Makefile 13 Aug 2003 11:34:30 -0000 1.3 *************** *** 1,13 **** all: dem2dat dem2dat: dem2dat.cpp dem2dat.h ! g++ -O2 -g dem2dat.cpp -o dem2dat -I/usr/include/python2.2 -lSimData -lz python: dem2dat_wrap.o ! g++ -shared -lswigpy -ldl -o _dem2dat.so dem2dat_wrap.o -lSimData -lz dem2dat_wrap.o: dem2dat_wrap.cxx ! g++ -c -fPIC -O2 -g dem2dat_wrap.cxx -I/usr/include/python2.2 dem2dat_wrap.cxx: dem2dat.i dem2dat.h ! swig -c -c++ -python -noexcept -I/usr/include/python2.2 dem2dat.i --- 1,17 ---- + PYTHONLIB = /usr/lib/python2.2/site-packages + PYTHONINC = /usr/include/python2.2 + all: dem2dat dem2dat: dem2dat.cpp dem2dat.h ! g++ -O2 -g dem2dat.cpp -o dem2dat -I$(PYTHONINC) -L$(PYTHONLIB)/SimData -lSimData -lz python: dem2dat_wrap.o ! g++ -shared -lswigpy -ldl -o _dem2dat.so dem2dat_wrap.o -L$(PYTHONLIB)/SimData -lSimData -lz dem2dat_wrap.o: dem2dat_wrap.cxx ! g++ -c -fPIC -O2 -g dem2dat_wrap.cxx -I$(PYTHONINC) dem2dat_wrap.cxx: dem2dat.i dem2dat.h ! swig -c -c++ -python -noexcept -I$(PYTHONINC) dem2dat.i ! Index: dem2dat.h =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Tools/Terrain/dem2dat/dem2dat.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** dem2dat.h 22 Jul 2003 21:18:13 -0000 1.2 --- dem2dat.h 13 Aug 2003 11:34:30 -0000 1.3 *************** *** 38,41 **** --- 38,42 ---- #include <vector> #include <zlib.h> + #include <cassert> using namespace simdata; *************** *** 341,346 **** UTM ref_utm = getReferenceUTM(); LLA ref_lla = getReferenceLLA(); ! int l0 = int((ref_lla.latitude()*180.0/G_PI+90)*8+0.5); ! int l1 = int((ref_lla.longitude()*180.0/G_PI+180)*8+0.5); sprintf(fn, "%04d_%04d.dat", l0, l1); _fn = fn; --- 342,347 ---- UTM ref_utm = getReferenceUTM(); LLA ref_lla = getReferenceLLA(); ! int l0 = int((ref_lla.latitude()*180.0/simdata::PI+90)*8+0.5); ! int l1 = int((ref_lla.longitude()*180.0/simdata::PI+180)*8+0.5); sprintf(fn, "%04d_%04d.dat", l0, l1); _fn = fn; *************** *** 598,603 **** static std::string DATname(double lat, double lon) { ! int l0 = int((RadiansToDegrees(lat)+90)*8+0.5); ! int l1 = int((RadiansToDegrees(lon)+180)*8+0.5); char fn[60]; sprintf(fn, "%04d_%04d.dat", l0, l1); --- 599,604 ---- static std::string DATname(double lat, double lon) { ! int l0 = int((simdata::toDegrees(lat)+90)*8+0.5); ! int l1 = int((simdata::toDegrees(lon)+180)*8+0.5); char fn[60]; sprintf(fn, "%04d_%04d.dat", l0, l1); *************** *** 613,617 **** bool read(double lat, double lon) { ! read(DATname(DegreesToRadians(lat), DegreesToRadians(lon))); } --- 614,618 ---- bool read(double lat, double lon) { ! read(DATname(simdata::toRadians(lat), simdata::toRadians(lon))); } |
From: <mk...@us...> - 2003-08-10 21:09:45
|
Update of /cvsroot/csp/APPLICATIONS/SimData/Include/SimData In directory sc8-pr-cvs1:/tmp/cvs-serv11481 Modified Files: Export.h Log Message: Index: Export.h =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/Include/SimData/Export.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Export.h 10 Aug 2003 17:52:08 -0000 1.7 --- Export.h 10 Aug 2003 21:09:42 -0000 1.8 *************** *** 40,44 **** # if defined(_MSC_VER) && (_MSC_VER <= 1310) ! #pragma warning (disable : 4786 4251) # endif --- 40,44 ---- # if defined(_MSC_VER) && (_MSC_VER <= 1310) ! #pragma warning (disable : 4786 4251 4290) # endif |
From: <mk...@us...> - 2003-08-10 19:02:13
|
Update of /cvsroot/csp/APPLICATIONS/SimData/Include/SimData In directory sc8-pr-cvs1:/tmp/cvs-serv22997 Modified Files: Exception.h Log Message: Index: Exception.h =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/Include/SimData/Exception.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Exception.h 10 Aug 2003 18:46:29 -0000 1.11 --- Exception.h 10 Aug 2003 19:02:10 -0000 1.12 *************** *** 103,107 **** * Base class for all SimData specific exceptions. */ ! class Exception: public ExceptionBase { public: Exception(std::string const &type="Exception", std::string const &msg=""): --- 103,107 ---- * Base class for all SimData specific exceptions. */ ! class SIMDATA_EXPORT Exception: public ExceptionBase { public: Exception(std::string const &type="Exception", std::string const &msg=""): |
From: <mk...@us...> - 2003-08-10 18:46:32
|
Update of /cvsroot/csp/APPLICATIONS/SimData/Include/SimData In directory sc8-pr-cvs1:/tmp/cvs-serv20503 Modified Files: Exception.h Log Message: Index: Exception.h =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/Include/SimData/Exception.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Exception.h 6 Aug 2003 06:36:24 -0000 1.10 --- Exception.h 10 Aug 2003 18:46:29 -0000 1.11 *************** *** 110,114 **** #define SIMDATA_EXCEPTION(a) \ ! class a: public Exception { \ public: \ a(std::string msg=""): \ --- 110,114 ---- #define SIMDATA_EXCEPTION(a) \ ! class SIMDATA_EXPORT a: public Exception { \ public: \ a(std::string msg=""): \ |
From: <sto...@us...> - 2003-08-10 18:34:18
|
Update of /cvsroot/csp/APPLICATIONS/SimData/VisualStudio2003 In directory sc8-pr-cvs1:/tmp/cvs-serv18529 Added Files: SimData.vcproj SimData.sln Log Message: Visual Studio 2003 Solution File --- NEW FILE: SimData.vcproj --- <?xml version="1.0" encoding="Windows-1252"?> <VisualStudioProject ProjectType="Visual C++" Version="7.10" Name="SimData" SccProjectName="" SccLocalPath=""> <Platforms> <Platform Name="Win32"/> </Platforms> <Configurations> <Configuration Name="Release|Win32" OutputDirectory="./Release" IntermediateDirectory="./Release" ConfigurationType="2" UseOfMFC="0" ATLMinimizesCRunTimeLibraryUsage="FALSE" CharacterSet="2"> <Tool Name="VCCLCompilerTool" InlineFunctionExpansion="1" AdditionalIncludeDirectories="../Include,C:/Python22/include" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SIMDATA_EXPORTS" StringPooling="TRUE" RuntimeLibrary="2" EnableFunctionLevelLinking="TRUE" RuntimeTypeInfo="TRUE" PrecompiledHeaderFile=".\Release/SimData.pch" AssemblerListingLocation=".\Release/" ObjectFile=".\Release/" ProgramDataBaseFileName=".\Release/" WarningLevel="3" SuppressStartupBanner="TRUE" CompileAs="0"/> <Tool Name="VCCustomBuildTool"/> <Tool Name="VCLinkerTool" AdditionalOptions="/MACHINE:I386" AdditionalDependencies="odbc32.lib odbccp32.lib" OutputFile="../SimData/_cSimData.dll" LinkIncremental="1" SuppressStartupBanner="TRUE" AdditionalLibraryDirectories="C:/Python22/libs" ProgramDatabaseFile=".\Release/_cSimData.pdb" ImportLibrary="../SimData/_cSimData.lib"/> <Tool Name="VCMIDLTool" PreprocessorDefinitions="NDEBUG" MkTypLibCompatible="TRUE" SuppressStartupBanner="TRUE" TargetEnvironment="1" TypeLibraryName=".\Release/SimData.tlb"/> <Tool Name="VCPostBuildEventTool" CommandLine="copy /Y cSimData.py ..\SimData"/> <Tool Name="VCPreBuildEventTool"/> <Tool Name="VCPreLinkEventTool"/> <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1036"/> <Tool Name="VCWebServiceProxyGeneratorTool"/> <Tool Name="VCXMLDataGeneratorTool"/> <Tool Name="VCWebDeploymentTool"/> <Tool Name="VCManagedWrapperGeneratorTool"/> <Tool Name="VCAuxiliaryManagedWrapperGeneratorTool"/> </Configuration> <Configuration Name="Debug|Win32" OutputDirectory=".\Debug" IntermediateDirectory=".\Debug" ConfigurationType="2" UseOfMFC="0" ATLMinimizesCRunTimeLibraryUsage="FALSE" CharacterSet="2"> <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="../Include,C:/Python22/include" PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;SIMDATA_EXPORTS" BasicRuntimeChecks="3" RuntimeLibrary="3" RuntimeTypeInfo="TRUE" PrecompiledHeaderFile=".\Debug/SimData.pch" AssemblerListingLocation=".\Debug/" ObjectFile=".\Debug/" ProgramDataBaseFileName=".\Debug/" WarningLevel="3" SuppressStartupBanner="TRUE" DebugInformationFormat="4" CompileAs="0"/> <Tool Name="VCCustomBuildTool"/> <Tool Name="VCLinkerTool" AdditionalOptions="/MACHINE:I386" AdditionalDependencies="odbc32.lib odbccp32.lib" OutputFile="../SimData/_cSimDatad.dll" LinkIncremental="2" SuppressStartupBanner="TRUE" AdditionalLibraryDirectories="C:/Python22/libs" GenerateDebugInformation="TRUE" ProgramDatabaseFile=".\Debug/_cSimDatad.pdb" ImportLibrary="../SimData/_cSimDatad.lib"/> <Tool Name="VCMIDLTool" PreprocessorDefinitions="_DEBUG" MkTypLibCompatible="TRUE" SuppressStartupBanner="TRUE" TargetEnvironment="1" TypeLibraryName=".\Debug/SimData.tlb"/> <Tool Name="VCPostBuildEventTool" CommandLine="copy /Y cSimData.py ..\SimData"/> <Tool Name="VCPreBuildEventTool"/> <Tool Name="VCPreLinkEventTool"/> <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1036"/> <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;rc;def;r;odl;idl;hpj;bat"> <File RelativePath="..\Source\BaseType.cpp"> </File> <File RelativePath="..\Source\cSimData_wrap.cpp"> <FileConfiguration Name="Release|Win32"> <Tool Name="VCCLCompilerTool" PreprocessorDefinitions="SWIG_GLOBAL"/> </FileConfiguration> <FileConfiguration Name="Debug|Win32"> <Tool Name="VCCLCompilerTool" PreprocessorDefinitions="SWIG_GLOBAL"/> </FileConfiguration> </File> <File RelativePath="..\Source\DataArchive.cpp"> </File> <File RelativePath="..\Source\DataManager.cpp"> </File> <File RelativePath="..\Source\Date.cpp"> </File> <File RelativePath="..\Source\Enum.cpp"> </File> <File RelativePath="..\Source\Exception.cpp"> </File> <File RelativePath="..\Source\External.cpp"> </File> <File RelativePath="..\Source\FileUtility.cpp"> </File> <File RelativePath="..\Source\GeoPos.cpp"> </File> <File RelativePath="..\Source\HashUtility.cpp"> </File> <File RelativePath="..\Source\InterfaceRegistry.cpp"> </File> <File RelativePath="..\Source\Interpolate.cpp"> </File> <File RelativePath="..\Source\Key.cpp"> </File> <File RelativePath="..\Source\Link.cpp"> </File> <File RelativePath="..\Source\List.cpp"> </File> <File RelativePath="..\Source\LogStream.cpp"> </File> <File RelativePath="..\Source\LUT.cpp"> </File> <File RelativePath="..\Source\Math.cpp"> </File> <File RelativePath="..\Source\Matrix3.cpp"> </File> <File RelativePath="..\Source\Noise.cpp"> </File> <File RelativePath="..\Source\Object.cpp"> </File> <File RelativePath="..\Source\Pack.cpp"> </File> <File RelativePath="..\Source\Path.cpp"> </File> <File RelativePath="..\Source\Quat.cpp"> </File> <File RelativePath="..\Source\Random.cpp"> </File> <File RelativePath="..\Source\Real.cpp"> </File> <File RelativePath="..\Source\TypeAdapter.cpp"> </File> <File RelativePath="..\Source\Vector3.cpp"> </File> <File RelativePath="..\Source\Version.cpp"> </File> </Filter> <Filter Name="Header Files" Filter="h;hpp;hxx;hm;inl"> <File RelativePath="..\Include\SimData\BaseType.h"> </File> <File RelativePath="..\Include\SimData\Conversions.h"> </File> <File RelativePath="..\Include\SimData\DataArchive.h"> </File> <File RelativePath="..\Include\SimData\Date.h"> </File> <File RelativePath="..\Include\SimData\Enum.h"> </File> <File RelativePath="..\Include\SimData\Exception.h"> </File> <File RelativePath="..\Include\SimData\Export.h"> </File> <File RelativePath="..\Include\SimData\External.h"> </File> <File RelativePath="..\Include\SimData\GeoPos.h"> </File> <File RelativePath="..\Include\SimData\GlibCsp.h"> </File> <File RelativePath="..\Include\SimData\hash_map.h"> </File> <File RelativePath="..\Include\SimData\HashUtility.h"> </File> <File RelativePath="..\Include\SimData\Integer.h"> </File> <File RelativePath="..\Include\SimData\InterfaceRegistry.h"> </File> <File RelativePath="..\Include\SimData\InterfaceRegistry_wrap.h"> </File> <File RelativePath="..\Include\SimData\Interpolate.h"> </File> <File RelativePath="..\Include\SimData\Key.h"> </File> <File RelativePath="..\Include\SimData\Link.h"> </File> <File RelativePath="..\Include\SimData\List.h"> </File> <File RelativePath="..\Include\SimData\Log.h"> </File> <File RelativePath="..\Include\SimData\LogStream.h"> </File> <File RelativePath="..\Include\SimData\LUT.h"> </File> <File RelativePath="..\Include\SimData\Math.h"> </File> <File RelativePath="..\Include\SimData\Matrix3.h"> </File> <File RelativePath="..\Include\SimData\ns-simdata.h"> </File> <File RelativePath="..\Include\SimData\Object.h"> </File> <File RelativePath="..\Include\SimData\ObjectInterface.h"> </File> <File RelativePath="..\Include\SimData\Pack.h"> </File> <File RelativePath="..\Include\SimData\Path.h"> </File> <File RelativePath="..\Include\SimData\Quat.h"> </File> <File RelativePath="..\Include\SimData\Random.h"> </File> <File RelativePath="..\Include\SimData\Real.h"> </File> <File RelativePath="..\Include\SimData\Ref.h"> </File> <File RelativePath="..\Include\SimData\String.h"> </File> <File RelativePath="..\Include\SimData\TypeAdapter.h"> </File> <File RelativePath="..\Include\SimData\Types.h"> </File> <File RelativePath="..\Include\SimData\Vector3.h"> </File> <File RelativePath="..\Include\SimData\Vector3.inl"> </File> </Filter> <Filter Name="Resource Files" Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"> </Filter> <File RelativePath="..\Source\cSimData.i"> <FileConfiguration Name="Release|Win32"> <Tool Name="VCCustomBuildTool" CommandLine="C:\progra~1\SWIG-1.3.19\swig -c++ -python -noexcept -D__NO_LUT__ -DWIN32 -I..\Include -o ..\Source\$(InputName)_wrap.cpp ..\Source\$(InputName).i " Outputs="..\Source\$(InputName)_wrap.cpp"/> </FileConfiguration> <FileConfiguration Name="Debug|Win32"> <Tool Name="VCCustomBuildTool" CommandLine="C:\progra~1\SWIG-1.3.19\swig -c++ -python -noexcept -D__NO_LUT__ -DWIN32 -I..\Include -o ..\Source\$(InputName)_wrap.cpp ..\Source\$(InputName).i " Outputs="..\Source\$(InputName)_wrap.cpp"/> </FileConfiguration> </File> </Files> <Globals> </Globals> </VisualStudioProject> --- NEW FILE: SimData.sln --- Microsoft Visual Studio Solution File, Format Version 8.00 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SimData", "SimData.vcproj", "{F9948756-70B5-4328-8A6A-F4BE5A521A27}" ProjectSection(ProjectDependencies) = postProject EndProjectSection EndProject Global GlobalSection(SolutionConfiguration) = preSolution Debug = Debug Release = Release EndGlobalSection GlobalSection(ProjectConfiguration) = postSolution {F9948756-70B5-4328-8A6A-F4BE5A521A27}.Debug.ActiveCfg = Debug|Win32 {F9948756-70B5-4328-8A6A-F4BE5A521A27}.Debug.Build.0 = Debug|Win32 {F9948756-70B5-4328-8A6A-F4BE5A521A27}.Release.ActiveCfg = Release|Win32 {F9948756-70B5-4328-8A6A-F4BE5A521A27}.Release.Build.0 = Release|Win32 EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution EndGlobalSection GlobalSection(ExtensibilityAddIns) = postSolution EndGlobalSection EndGlobal |
From: <sto...@us...> - 2003-08-10 18:33:39
|
Update of /cvsroot/csp/APPLICATIONS/SimData/VisualStudio2003 In directory sc8-pr-cvs1:/tmp/cvs-serv18418/VisualStudio2003 Log Message: Directory /cvsroot/csp/APPLICATIONS/SimData/VisualStudio2003 added to the repository |
From: <mk...@us...> - 2003-08-10 18:18:45
|
Update of /cvsroot/csp/APPLICATIONS/SimData/Include/SimData In directory sc8-pr-cvs1:/tmp/cvs-serv15831 Modified Files: DataArchive.h hash_map.h Log Message: Index: DataArchive.h =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/Include/SimData/DataArchive.h,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** DataArchive.h 10 Aug 2003 17:52:07 -0000 1.13 --- DataArchive.h 10 Aug 2003 18:18:42 -0000 1.14 *************** *** 53,56 **** --- 53,57 ---- class DataManager; class Object; + class InterfaceProxy; //For SWIG (not currently used): *************** *** 340,343 **** --- 341,348 ---- */ void cleanStatic(); + + // InterfaceProxy *getObjectInterface(ObjectID const &id) const; + // InterfaceProxy *getObjectInterface(std::string const &path) const; + // protected methods made public for Python access, don't use! Index: hash_map.h =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/Include/SimData/hash_map.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** hash_map.h 6 Aug 2003 06:36:25 -0000 1.7 --- hash_map.h 10 Aug 2003 18:18:43 -0000 1.8 *************** *** 49,56 **** #define HASH_MAP std::hash_map #define HASH std::hash ! #elif (_MSC_VER >= 1300) #include <hash_map> #define HASH_MAP std::hash_map #define HASH std::hash_compare #endif #else --- 49,60 ---- #define HASH_MAP std::hash_map #define HASH std::hash ! #elif (_MSC_VER == 1300) #include <hash_map> #define HASH_MAP std::hash_map #define HASH std::hash_compare + #elif (_MSC_VER > 1300) + #include <hash_map> + #define HASH_MAP stdext::hash_map + #define HASH stdext::hash_compare #endif #else |
From: <mk...@us...> - 2003-08-10 18:06:51
|
Update of /cvsroot/csp/APPLICATIONS/SimData/Include/SimData In directory sc8-pr-cvs1:/tmp/cvs-serv14087 Modified Files: LUT.h Log Message: Index: LUT.h =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/Include/SimData/LUT.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** LUT.h 6 Aug 2003 06:36:24 -0000 1.6 --- LUT.h 10 Aug 2003 18:06:48 -0000 1.7 *************** *** 266,270 **** * Base class for interpolated lookup tables. */ ! class Interpolation: public BaseType { public: typedef enum { LINEAR, SPLINE } Modes; --- 266,270 ---- * Base class for interpolated lookup tables. */ ! class SIMDATA_EXPORT Interpolation: public BaseType { public: typedef enum { LINEAR, SPLINE } Modes; *************** *** 311,315 **** */ template <typename X> ! class InterpolationType: public Interpolation { protected: X m_X0, m_X1, m_XS; --- 311,315 ---- */ template <typename X> ! class SIMDATA_EXPORT InterpolationType: public Interpolation { protected: X m_X0, m_X1, m_XS; |
From: <mk...@us...> - 2003-08-10 17:52:11
|
Update of /cvsroot/csp/APPLICATIONS/SimData/Include/SimData In directory sc8-pr-cvs1:/tmp/cvs-serv11836/Include/SimData Modified Files: DataArchive.h DataManager.h Date.i Enum.h Enum.i Export.h External.i Link.h Real.i TypeAdapter.h Types.i cSimData.i Log Message: Index: DataArchive.h =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/Include/SimData/DataArchive.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** DataArchive.h 6 Aug 2003 06:36:24 -0000 1.12 --- DataArchive.h 10 Aug 2003 17:52:07 -0000 1.13 *************** *** 27,42 **** #define __SIMDATA_DATAARCHIVE_H__ ! # if defined(_MSC_VER) && (_MSC_VER <= 1200) ! #pragma warning(disable : 4786) ! # endif ! ! #include <string> ! #include <cstdio> ! #include <cstdlib> ! #include <SimData/Link.h> #include <SimData/Exception.h> #include <SimData/HashUtility.h> #include <SimData/Namespace.h> --- 27,39 ---- #define __SIMDATA_DATAARCHIVE_H__ ! #include <SimData/Export.h> #include <SimData/Link.h> #include <SimData/Exception.h> #include <SimData/HashUtility.h> #include <SimData/Namespace.h> + + #include <string> + #include <cstdio> + #include <cstdlib> Index: DataManager.h =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/Include/SimData/DataManager.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** DataManager.h 6 Aug 2003 06:36:24 -0000 1.5 --- DataManager.h 10 Aug 2003 17:52:08 -0000 1.6 *************** *** 27,33 **** #define __SIMDATA_DATAMANAGER_H__ ! # if defined(_MSC_VER) && (_MSC_VER <= 1200) ! #pragma warning(disable : 4786) ! # endif #include <string> --- 27,34 ---- #define __SIMDATA_DATAMANAGER_H__ ! #include <SimData/Export.h> ! #include <SimData/Path.h> ! #include <SimData/HashUtility.h> ! #include <SimData/Namespace.h> #include <string> *************** *** 36,42 **** #include <vector> - #include <SimData/Path.h> - #include <SimData/HashUtility.h> - #include <SimData/Namespace.h> --- 37,40 ---- Index: Date.i =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/Include/SimData/Date.i,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Date.i 6 Aug 2003 06:36:24 -0000 1.5 --- Date.i 10 Aug 2003 17:52:08 -0000 1.6 *************** *** 25,29 **** %include "std_string.i" - //%import "SimData/Pack.i" NAMESPACE_SIMDATA --- 25,28 ---- Index: Enum.h =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/Include/SimData/Enum.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Enum.h 6 Aug 2003 06:36:24 -0000 1.9 --- Enum.h 10 Aug 2003 17:52:08 -0000 1.10 *************** *** 28,34 **** #define __SIMDATA_ENUM_H__ ! # if defined(_MSC_VER) && (_MSC_VER <= 1300) ! #pragma warning (disable : 4786 4251) ! # endif #include <string> --- 28,33 ---- #define __SIMDATA_ENUM_H__ ! #include <SimData/Export.h> ! #include <SimData/BaseType.h> #include <string> *************** *** 38,42 **** #include <map> - #include <SimData/BaseType.h> --- 37,40 ---- Index: Enum.i =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/Include/SimData/Enum.i,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Enum.i 6 Aug 2003 06:36:24 -0000 1.6 --- Enum.i 10 Aug 2003 17:52:08 -0000 1.7 *************** *** 37,41 **** #endif - //%import "SimData/Pack.i" //%ignore eqstring; //%ignore hashstring; --- 37,40 ---- Index: Export.h =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/Include/SimData/Export.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Export.h 6 Aug 2003 06:36:24 -0000 1.6 --- Export.h 10 Aug 2003 17:52:08 -0000 1.7 *************** *** 39,42 **** --- 39,47 ---- #endif + # if defined(_MSC_VER) && (_MSC_VER <= 1310) + #pragma warning (disable : 4786 4251) + # endif + + #endif // __SIMDATA_EXPORT_H__ Index: External.i =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/Include/SimData/External.i,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** External.i 23 Jul 2003 05:07:50 -0000 1.3 --- External.i 10 Aug 2003 17:52:08 -0000 1.4 *************** *** 25,31 **** %include "std_string.i" - //%import "SimData/Pack.i" %rename(__repr__) SIMDATA(External)::asString() const; %include "SimData/External.h" --- 25,31 ---- %include "std_string.i" %rename(__repr__) SIMDATA(External)::asString() const; %include "SimData/External.h" + Index: Link.h =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/Include/SimData/Link.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Link.h 6 Aug 2003 06:36:24 -0000 1.2 --- Link.h 10 Aug 2003 17:52:08 -0000 1.3 *************** *** 35,48 **** ! #if defined(_MSC_VER) && (_MSC_VER <= 1300) ! #include <cassert> ! #endif #include <string> - - - #include <SimData/Path.h> - #include <SimData/Object.h> --- 35,45 ---- ! #include <SimData/Export.h> ! #include <SimData/Path.h> ! #include <SimData/Object.h> #include <string> + #include <cassert> Index: Real.i =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/Include/SimData/Real.i,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Real.i 6 Aug 2003 06:36:24 -0000 1.3 --- Real.i 10 Aug 2003 17:52:08 -0000 1.4 *************** *** 25,29 **** %include "std_string.i" - //%import "SimData/Pack.i" %include "SimData/Namespace.h" --- 25,28 ---- Index: TypeAdapter.h =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/Include/SimData/TypeAdapter.h,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** TypeAdapter.h 6 Aug 2003 06:36:24 -0000 1.18 --- TypeAdapter.h 10 Aug 2003 17:52:08 -0000 1.19 *************** *** 29,38 **** #if defined(_MSC_VER) && (_MSC_VER <= 1300) ! #pragma warning (disable : 4290 4786) #endif ! #include <string> ! #include <iostream> ! #include <SimData/Exception.h> #include <SimData/Namespace.h> --- 29,36 ---- #if defined(_MSC_VER) && (_MSC_VER <= 1300) ! #pragma warning (disable : 4290) #endif ! #include <SimData/Export.h> #include <SimData/Exception.h> #include <SimData/Namespace.h> *************** *** 42,45 **** --- 40,46 ---- #include <SimData/Types.h> #include <SimData/PTS.h> + + #include <string> + #include <iostream> Index: Types.i =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/Include/SimData/Types.i,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Types.i 6 Aug 2003 06:36:24 -0000 1.10 --- Types.i 10 Aug 2003 17:52:08 -0000 1.11 *************** *** 34,37 **** --- 34,38 ---- %include "SimData/Object.i" %include "SimData/Pack.i" + //%include "SimData/Archive.i" %include "SimData/Path.i" %include "SimData/Link.i" Index: cSimData.i =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/Include/SimData/cSimData.i,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** cSimData.i 6 Aug 2003 06:36:25 -0000 1.10 --- cSimData.i 10 Aug 2003 17:52:08 -0000 1.11 *************** *** 67,74 **** } catch (SIMDATA(Exception) e) { printf("SWIG: caught a SimData Exception\n"); ! e.details(); return NULL; } catch (...) { printf("SWIG: passing C++ exception back\n"); return NULL; } --- 67,76 ---- } catch (SIMDATA(Exception) e) { printf("SWIG: caught a SimData Exception\n"); ! //e.details(); ! PyErr_SetString(PyExc_RuntimeError, e.getError().c_str()); return NULL; } catch (...) { printf("SWIG: passing C++ exception back\n"); + PyErr_SetString(PyExc_RuntimeError, "Unknownn C++ exception"); return NULL; } |
From: <mk...@us...> - 2003-08-07 18:05:38
|
Update of /cvsroot/csp/APPLICATIONS/SimData In directory sc8-pr-cvs1:/tmp/cvs-serv1590 Modified Files: CHANGES.current Log Message: Index: CHANGES.current =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/CHANGES.current,v retrieving revision 1.61 retrieving revision 1.62 diff -C2 -d -r1.61 -r1.62 *** CHANGES.current 6 Aug 2003 16:15:25 -0000 1.61 --- CHANGES.current 7 Aug 2003 18:05:35 -0000 1.62 *************** *** 2,5 **** --- 2,13 ---- =========================== + 2003-08-07: onsight + Added SIMDATA_EXPORT to classes in Random.h + + Fixed #include <float.h> bug in Math.h under Windows + + Moved some inline friend declarations out of the Vector3 + class declaration to help MSVC find them. + 2003-08-06: onsight Removed Math.i and Vector3.inl from setup.py. |
From: <mk...@us...> - 2003-08-07 17:47:33
|
Update of /cvsroot/csp/APPLICATIONS/SimData/Include/SimData In directory sc8-pr-cvs1:/tmp/cvs-serv31173 Modified Files: Random.h Log Message: Index: Random.h =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/Include/SimData/Random.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Random.h 7 Aug 2003 17:37:20 -0000 1.10 --- Random.h 7 Aug 2003 17:47:30 -0000 1.11 *************** *** 420,424 **** */ template <class RNG> ! class SIMDATA_EXPORT RandomNumberGenerator: public RandomNumberGeneratorInterface { struct RNGState: _State { typename RNG::State _state; --- 420,424 ---- */ template <class RNG> ! class RandomNumberGenerator: public RandomNumberGeneratorInterface { struct RNGState: _State { typename RNG::State _state; *************** *** 654,658 **** */ template <class RD> ! class SIMDATA_EXPORT RandomDistribution: public RandomDistributionInterface { struct RDState: _State { typename RD::State _state; --- 654,658 ---- */ template <class RD> ! class RandomDistribution: public RandomDistributionInterface { struct RDState: _State { typename RD::State _state; |
From: <mk...@us...> - 2003-08-07 17:37:22
|
Update of /cvsroot/csp/APPLICATIONS/SimData/Include/SimData In directory sc8-pr-cvs1:/tmp/cvs-serv29535 Modified Files: Quat.h Random.h osg.h Log Message: Index: Quat.h =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/Include/SimData/Quat.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Quat.h 6 Aug 2003 07:52:41 -0000 1.2 --- Quat.h 7 Aug 2003 17:37:19 -0000 1.3 *************** *** 49,54 **** ! /** ! * A quaternion class. It can be used to represent an orientation in 3D space. */ class SIMDATA_EXPORT Quat: public BaseType --- 49,59 ---- ! /** ! * class Quaternion ! * ! * Quaternions are four dimensional objects that form a compact ! * representation for rotations. Many thorough treatments of ! * quaternions and their use in simulations can be readily found ! * on the web. */ class SIMDATA_EXPORT Quat: public BaseType *************** *** 57,77 **** public: static const Quat IDENTITY; static const Quat ZERO; ! // BaseType interface virtual void pack(Packer&) const; virtual void unpack(UnPacker&); virtual void parseXML(const char* cdata); /** ! * String representation. */ std::string asString() const; inline Quat(): _x(0.0), _y(0.0), _z(0.0), _w(0.0) {} inline Quat(double x, double y, double z, double w): _x(x), _y(y), _z(z), _w(w) {} inline Quat(double angle, const Vector3& axis) { makeRotate(angle, axis); } inline Quat(const Matrix3 &m) { set(m); } inline Quat(double angle1, const Vector3& axis1, double angle2, const Vector3& axis2, --- 62,131 ---- public: + /// The identity Quat = (0,0,0,1) static const Quat IDENTITY; + /// The zero Quat = (0,0,0,0) static const Quat ZERO; ! /** ! * Serialize to a data archive. ! */ virtual void pack(Packer&) const; + + /** + * Deserialize from a data archive. + */ virtual void unpack(UnPacker&); + + /** + * Internal method used by the XML parser. + * + * The format for Quats is "X Y Z W" + */ virtual void parseXML(const char* cdata); /** ! * Standard representation string. */ std::string asString() const; + /** + * Construct a new quaternion. + * + * Initialize to (0,0,0,0) + */ inline Quat(): _x(0.0), _y(0.0), _z(0.0), _w(0.0) {} + + /** + * Construct a new quaternion. + * + * Specifiy the four real-valued components. + */ inline Quat(double x, double y, double z, double w): _x(x), _y(y), _z(z), _w(w) {} + + /** + * Construct a new quaternion representing a rotation. + * + * @param angle the rotation angle (right-handed) in radians. + * @param axis the rotation axis. + */ inline Quat(double angle, const Vector3& axis) { makeRotate(angle, axis); } + + /** + * Construct a new quaternion representing a rotation. + * + * @param m a matrix specifying the rotation. + */ inline Quat(const Matrix3 &m) { set(m); } + + /** + * Construct a new quaternion representing a product of three rotations. + * + * @param angle1 the first rotation angle (right-handed) in radians. + * @param axis1 the first rotation axis. + * @param angle2 the second rotation angle (right-handed) in radians. + * @param axis2 the second rotation axis. + * @param angle3 the third rotation angle (right-handed) in radians. + * @param axis3 the third rotation axis. + */ inline Quat(double angle1, const Vector3& axis1, double angle2, const Vector3& axis2, *************** *** 81,88 **** --- 135,148 ---- } + /** + * Return the 3-vector component of the quaternion (x,y,z) + */ inline const Vector3 asVector3() const { return Vector3(_x, _y, _z); } + /** + * Set the components. + */ inline void set(double x, double y, double z, double w) { _x = x; _y = y; _z = z; _w = w; *************** *** 90,93 **** --- 150,156 ---- #ifndef SWIG + /** + * Access a component by index (0,1,2,3 = x,y,z,w) + */ inline double& operator [] (int i) { switch (i) { *************** *** 100,103 **** --- 163,170 ---- } } + + /** + * Get a component value by index (0,1,2,3 = x,y,z,w) + */ inline double operator [] (int i) const { switch (i) { *************** *** 111,126 **** } inline double& x() { return _x; } inline double& y() { return _y; } inline double& z() { return _z; } inline double& w() { return _w; } inline double x() const { return _x; } inline double y() const { return _y; } inline double z() const { return _z; } inline double w() const { return _w; } #endif // SWIG ! /** return true if the Quat represents a zero rotation, and therefore can be ignored in computations.*/ bool zeroRotation() const { return _x==0.0 && _y==0.0 && _z==0.0 && _w==1.0; --- 178,205 ---- } + /// X component accessor inline double& x() { return _x; } + /// Y component accessor inline double& y() { return _y; } + /// Z component accessor inline double& z() { return _z; } + /// W component accessor inline double& w() { return _w; } + /// X component const accessor inline double x() const { return _x; } + /// Y component const accessor inline double y() const { return _y; } + /// Z component const accessor inline double z() const { return _z; } + /// W component const accessor inline double w() const { return _w; } #endif // SWIG ! /** ! * Test if the quaternion is zero. ! * ! * Zero rotations can generally be ignored in computations. ! */ bool zeroRotation() const { return _x==0.0 && _y==0.0 && _z==0.0 && _w==1.0; *************** *** 139,143 **** } ! /// Binary multiply --- adjusted relative to osg inline const Quat operator*(const Quat& rhs) const { return Quat(rhs._w*_x + rhs._x*_w - rhs._y*_z + rhs._z*_y, --- 218,222 ---- } ! /// Binary multiply --- adjusted relative to osg for active transformations! inline const Quat operator*(const Quat& rhs) const { return Quat(rhs._w*_x + rhs._x*_w - rhs._y*_z + rhs._z*_y, *************** *** 147,151 **** } ! /// Unary multiply --- adjusted relative to osg inline Quat& operator*=(const Quat& rhs) { double x = rhs._w*_x + rhs._x*_w - rhs._y*_z + rhs._z*_y; --- 226,230 ---- } ! /// Unary multiply --- adjusted relative to osg for active transformations! inline Quat& operator*=(const Quat& rhs) { double x = rhs._w*_x + rhs._x*_w - rhs._y*_z + rhs._z*_y; *************** *** 211,224 **** } ! /// Length of the quaternion = vec . vec double length2() const { return (_x*_x + _y*_y + _z*_z + _w*_w); } ! /// Conjugate ! inline Quat conj () const { return Quat(-_x, -_y, -_z, _w); } inline Quat operator ~() const { return Quat(-_x, -_y, -_z, _w); --- 290,304 ---- } ! /// Squared length of the quaternion = vec . vec double length2() const { return (_x*_x + _y*_y + _z*_z + _w*_w); } ! /// Get conjugate ! inline Quat conj() const { return Quat(-_x, -_y, -_z, _w); } + /// Get conjugate inline Quat operator ~() const { return Quat(-_x, -_y, -_z, _w); *************** *** 230,249 **** } void makeRotate(double angle, double x, double y, double z); void makeRotate(double angle, const Vector3& vec); void makeRotate(double angle1, const Vector3& axis1, double angle2, const Vector3& axis2, double angle3, const Vector3& axis3); ! /** Make a rotation Quat which will rotate vec1 to vec2. ! Generally take a dot product to get the angle between these ! and then use a cross product to get the rotation axis ! Watch out for the two special cases of when the vectors ! are co-incident or opposite in direction.*/ void makeRotate(const Vector3& vec1, const Vector3& vec2); void makeRotate(double roll, double pitch, double yaw); --- 310,358 ---- } + /** + * Set this Quat to represent a rotation about an axis. + * + * @param the angle of rotation (right-handed) in radians. + * @param x the x component of the rotation axis. + * @param y the y component of the rotation axis. + * @param z the z component of the rotation axis. + */ void makeRotate(double angle, double x, double y, double z); + /** + * Set this Quat to represent a rotation about an axis. + * + * @param the angle of rotation (right-handed) in radians. + * @param vec the rotation axis. + */ void makeRotate(double angle, const Vector3& vec); + /** + * Set this Quat to represent a product of three rotations. + * + * @param angle1 the first rotation angle (right-handed) in radians. + * @param axis1 the first rotation axis. + * @param angle2 the second rotation angle (right-handed) in radians. + * @param axis2 the second rotation axis. + * @param angle3 the third rotation angle (right-handed) in radians. + * @param axis3 the third rotation axis. + */ void makeRotate(double angle1, const Vector3& axis1, double angle2, const Vector3& axis2, double angle3, const Vector3& axis3); ! /** ! * Set this Quat to represent a rotation that transforms vec1 to vec2. ! */ void makeRotate(const Vector3& vec1, const Vector3& vec2); + /** + * Set this Quat to represent a rotation defined by Euler angles. + * + * @param roll The x-axis rotation angle (right-handed) in radians. + * @param pitch The y-axis rotation angle (right-handed) in radians. + * @param yaw The z-axis rotation angle (right-handed) in radians. + */ void makeRotate(double roll, double pitch, double yaw); Index: Random.h =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/Include/SimData/Random.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Random.h 6 Aug 2003 08:56:54 -0000 1.9 --- Random.h 7 Aug 2003 17:37:20 -0000 1.10 *************** *** 91,95 **** * The period of this generator is 2^{19937} - 1. */ ! class MT19937 { static const int N = 624; /* Period parameters */ static const int M = 397; --- 91,95 ---- * The period of this generator is 2^{19937} - 1. */ ! class SIMDATA_EXPORT MT19937 { static const int N = 624; /* Period parameters */ static const int M = 397; *************** *** 274,278 **** * */ ! class Taus2 { // state unsigned long int _s1, _s2, _s3; --- 274,278 ---- * */ ! class SIMDATA_EXPORT Taus2 { // state unsigned long int _s1, _s2, _s3; *************** *** 385,389 **** * Abstract interface for random number generators and random distributions. */ ! class RandomInterface { protected: struct _State: Referenced { }; --- 385,389 ---- * Abstract interface for random number generators and random distributions. */ ! class SIMDATA_EXPORT RandomInterface { protected: struct _State: Referenced { }; *************** *** 402,406 **** * Abstract interface for random number generators. */ ! class RandomNumberGeneratorInterface: public RandomInterface { public: virtual double unit()=0; --- 402,406 ---- * Abstract interface for random number generators. */ ! class SIMDATA_EXPORT RandomNumberGeneratorInterface: public RandomInterface { public: virtual double unit()=0; *************** *** 420,424 **** */ template <class RNG> ! class RandomNumberGenerator: public RandomNumberGeneratorInterface { struct RNGState: _State { typename RNG::State _state; --- 420,424 ---- */ template <class RNG> ! class SIMDATA_EXPORT RandomNumberGenerator: public RandomNumberGeneratorInterface { struct RNGState: _State { typename RNG::State _state; *************** *** 554,558 **** namespace rd { // random distributions ! class Gauss { rng::Taus2 _gen; double _mean, _sigma; --- 554,558 ---- namespace rd { // random distributions ! class SIMDATA_EXPORT Gauss { rng::Taus2 _gen; double _mean, _sigma; *************** *** 641,645 **** * Abstract interface for random distributions. */ ! class RandomDistributionInterface: public RandomInterface { public: virtual double sample()=0; --- 641,645 ---- * Abstract interface for random distributions. */ ! class SIMDATA_EXPORT RandomDistributionInterface: public RandomInterface { public: virtual double sample()=0; *************** *** 654,658 **** */ template <class RD> ! class RandomDistribution: public RandomDistributionInterface { struct RDState: _State { typename RD::State _state; --- 654,658 ---- */ template <class RD> ! class SIMDATA_EXPORT RandomDistribution: public RandomDistributionInterface { struct RDState: _State { typename RD::State _state; *************** *** 740,744 **** * Global random number generator. */ ! SIMDATA_EXPORT extern random::Taus2 g_Random; --- 740,744 ---- * Global random number generator. */ ! extern SIMDATA_EXPORT random::Taus2 g_Random; Index: osg.h =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/Include/SimData/osg.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** osg.h 6 Aug 2003 06:36:25 -0000 1.3 --- osg.h 7 Aug 2003 17:37:20 -0000 1.4 *************** *** 50,64 **** } inline osg::Matrix toOSG(Matrix3 const &m) { ! return osg::Matrix(m(0, 0), m(0, 1), m(0, 2), 0.0, ! m(1, 0), m(1, 1), m(1, 2), 0.0, ! m(2, 0), m(2, 1), m(2, 2), 0.0, 0.0, 0.0, 0.0, 1.0); } inline Matrix3 fromOSG(osg::Matrix const &m) { ! return Matrix3(m(0, 0), m(0, 1), m(0, 2), ! m(1, 0), m(1, 1), m(1, 2), ! m(2, 0), m(2, 1), m(2, 2)); } --- 50,66 ---- } + // transpose: osg matrix convension is v * M inline osg::Matrix toOSG(Matrix3 const &m) { ! return osg::Matrix(m(0, 0), m(1, 0), m(2, 0), 0.0, ! m(0, 1), m(1, 1), m(2, 1), 0.0, ! m(0, 2), m(1, 2), m(2, 2), 0.0, 0.0, 0.0, 0.0, 1.0); } + // transpose: osg matrix convension is v * M inline Matrix3 fromOSG(osg::Matrix const &m) { ! return Matrix3(m(0, 0), m(1, 0), m(2, 0), ! m(0, 1), m(1, 1), m(2, 1), ! m(0, 2), m(1, 2), m(2, 2)); } |