You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(153) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(48) |
Feb
(46) |
Mar
(12) |
Apr
(4) |
May
(4) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2007 |
Jan
|
Feb
(263) |
Mar
(235) |
Apr
(66) |
May
(42) |
Jun
(270) |
Jul
(65) |
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Markus R. <rol...@us...> - 2007-04-25 20:30:24
|
Update of /cvsroot/simspark/simspark/spark/oxygen/sceneserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv11564 Modified Files: Tag: RSGEDIT_FILEREF sceneserver.cpp Log Message: - set SceneDict pointer before calling an importer Index: sceneserver.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/sceneserver/sceneserver.cpp,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** sceneserver.cpp 15 Mar 2007 07:26:28 -0000 1.3 --- sceneserver.cpp 25 Apr 2007 20:30:20 -0000 1.3.2.1 *************** *** 30,33 **** --- 30,34 ---- #include "scene.h" #include "sceneimporter.h" + #include "scenedict.h" #include <oxygen/physicsserver/world.h> #include <oxygen/physicsserver/space.h> *************** *** 215,218 **** --- 216,221 ---- shared_static_cast<SceneImporter>(*iter); + importer->SetSceneDict(&SceneDict::GetInstance()); + GetLog()->Debug() << "(SceneServer) trying importer " << importer->GetName() << std::endl; |
From: Markus R. <rol...@us...> - 2007-04-25 20:29:52
|
Update of /cvsroot/simspark/simspark/spark/oxygen/sceneserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv11132 Modified Files: Tag: RSGEDIT_FILEREF sceneimporter.h Log Message: - hold a SceneDict mement in every SceneImporter instance. We can't use the static ::GetInstance method here as SceneImporters are usually created from within a plugin Index: sceneimporter.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/sceneserver/sceneimporter.h,v retrieving revision 1.1 retrieving revision 1.1.6.1 diff -C2 -d -r1.1 -r1.1.6.1 *** sceneimporter.h 5 Dec 2005 21:21:17 -0000 1.1 --- sceneimporter.h 25 Apr 2007 20:29:49 -0000 1.1.6.1 *************** *** 30,38 **** { class BaseNode; class SceneImporter : public zeitgeist::Leaf { public: ! SceneImporter() : zeitgeist::Leaf() {} virtual ~SceneImporter() {}; --- 30,39 ---- { class BaseNode; + class SceneDict; class SceneImporter : public zeitgeist::Leaf { public: ! SceneImporter() : zeitgeist::Leaf(), mSceneDict(0) {} virtual ~SceneImporter() {}; *************** *** 46,49 **** --- 47,57 ---- boost::shared_ptr<BaseNode> root, boost::shared_ptr<zeitgeist::ParameterList> parameter) = 0; + + + /** sets up the reference to the SceneDict instance */ + void SetSceneDict(SceneDict* dict) { mSceneDict = dict; } + + protected: + SceneDict* mSceneDict; }; |
From: Markus R. <rol...@us...> - 2007-04-25 20:28:35
|
Update of /cvsroot/simspark/simspark/spark/oxygen/sceneserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv10621 Added Files: Tag: RSGEDIT_FILEREF scenedict.cpp scenedict.h Log Message: - added SceneDict class that maintains a mapping from a weak leaf pointer to a File reference. A file reference is the name of a file and an associated line number --- NEW FILE: scenedict.h --- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- this file is part of rcssserver3D Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group $Id: scenedict.h,v 1.1.2.1 2007/04/25 20:28:31 rollmark Exp $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef OXYGEN_SCENEDICT_H #define OXYGEN_SCENEDICT_H #include <zeitgeist/leaf.h> #include <map> namespace oxygen { class SceneDict { public: struct FileRef { public: std::string fname; unsigned int line; public: FileRef(const std::string& f = std::string(), unsigned int l = 0) : fname(f), line(l) { } }; typedef std::map<boost::weak_ptr<zeitgeist::Leaf>, FileRef> TDictionary; public: static SceneDict& GetInstance(); const FileRef* Loookup(boost::weak_ptr<zeitgeist::Leaf> leaf); void Insert(boost::weak_ptr<zeitgeist::Leaf> leaf, const FileRef& ref); void Clear(); private: SceneDict(); protected: TDictionary mDictionary; }; } // namespace oxygen #endif // OXYGEN_SCENEDICT_H --- NEW FILE: scenedict.cpp --- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- this file is part of rcssserver3D Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group $Id: scenedict.cpp,v 1.1.2.1 2007/04/25 20:28:31 rollmark Exp $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <oxygen/sceneserver/scenedict.h> using namespace boost; using namespace oxygen; using namespace zeitgeist; SceneDict::SceneDict() { } SceneDict& SceneDict::GetInstance() { static SceneDict theInstance; return theInstance; } const SceneDict::FileRef* SceneDict::Loookup(boost::weak_ptr<zeitgeist::Leaf> leaf) { if (leaf.expired()) { return 0; } TDictionary::const_iterator iter = mDictionary.find(leaf); if (iter == mDictionary.end()) { return 0; } return &((*iter).second); } void SceneDict::Insert(boost::weak_ptr<zeitgeist::Leaf> leaf, const FileRef& ref) { if (leaf.expired()) { return; } mDictionary[leaf] = ref; } void SceneDict::Clear() { mDictionary.clear(); } |
From: Markus R. <rol...@us...> - 2007-04-25 20:27:21
|
Update of /cvsroot/simspark/simspark/spark/utility/sfsexp In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv10140 Modified Files: Tag: RSGEDIT_FILEREF parser.c sexp.c sexp.h sexp_ops.c Log Message: - attribute parsed s_expression with a line number; a 'line' member is therefore added to sexp_t - maintain a line counter in the parser and increment whenever a \n is read. Copy current line counter in every create sexp_t instance Index: sexp.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/utility/sfsexp/sexp.h,v retrieving revision 1.1.6.1 retrieving revision 1.1.6.2 diff -C2 -d -r1.1.6.1 -r1.1.6.2 *** sexp.h 25 Apr 2007 20:24:35 -0000 1.1.6.1 --- sexp.h 25 Apr 2007 20:27:17 -0000 1.1.6.2 *************** *** 291,294 **** --- 291,299 ---- */ unsigned int binlength; + + /** + * The line number of the element start + */ + unsigned int line; } sexp_t; *************** *** 462,465 **** --- 467,475 ---- */ char *bindata; + + /** + * The current line number, i.e. the number of \n seen + */ + unsigned int line; } pcont_t; Index: parser.c =================================================================== RCS file: /cvsroot/simspark/simspark/spark/utility/sfsexp/parser.c,v retrieving revision 1.1.6.1 retrieving revision 1.1.6.2 diff -C2 -d -r1.1.6.1 -r1.1.6.2 *** parser.c 25 Apr 2007 20:24:35 -0000 1.1.6.1 --- parser.c 25 Apr 2007 20:27:17 -0000 1.1.6.2 *************** *** 330,333 **** --- 330,334 ---- cc->qdepth = 0; cc->squoted = 0; + cc->line = 1; return cc; *************** *** 458,461 **** --- 459,464 ---- t = s; cc->sbuffer = str; + + cc->line = 1; } *************** *** 487,490 **** --- 490,497 ---- /* space,tab,CR,LF considered white space */ case '\n': + cc->line++; + t++; + break; + case ' ': case '\t': *************** *** 567,570 **** --- 574,578 ---- sx->next = NULL; sx->list = NULL; + sx->line = cc->line; if (stack->height < 1) *************** *** 708,711 **** --- 716,721 ---- sx->val_used = val_used; sx->next = NULL; + sx->line = cc->line; + if (squoted != 0) sx->aty = SEXP_SQUOTE; *************** *** 838,841 **** --- 848,852 ---- sx->val_allocated = val_allocated; sx->next = NULL; + sx->line = cc->line; if (squoted == 1) { *************** *** 993,996 **** --- 1004,1008 ---- sx->next = NULL; sx->aty = SEXP_SQUOTE; + sx->line = cc->line; val = (char *)malloc(sizeof(char)*sexp_val_start_size); *************** *** 1060,1063 **** --- 1072,1076 ---- case 11: if (t[0] == '\n') { + cc->line++; state = 1; } *************** *** 1161,1164 **** --- 1174,1178 ---- sx->next = NULL; sx->aty = SEXP_BINARY; + sx->line = cc->line; bindata = NULL; Index: sexp_ops.c =================================================================== RCS file: /cvsroot/simspark/simspark/spark/utility/sfsexp/sexp_ops.c,v retrieving revision 1.1.6.1 retrieving revision 1.1.6.2 diff -C2 -d -r1.1.6.1 -r1.1.6.2 *** sexp_ops.c 25 Apr 2007 20:24:35 -0000 1.1.6.1 --- sexp_ops.c 25 Apr 2007 20:27:17 -0000 1.1.6.2 *************** *** 147,150 **** --- 147,151 ---- } + snew->line = s->line; snew->next = copy_sexp(s->next); *************** *** 218,221 **** --- 219,224 ---- /* copy the head of the sexpr */ + cr->line = s->line; + if (s->list->ty == SEXP_VALUE) { cr->ty = SEXP_VALUE; *************** *** 257,260 **** --- 260,264 ---- cd->next = NULL; cd->list = copy_sexp(s->list->next); + cd->line = s->line; return cd; } Index: sexp.c =================================================================== RCS file: /cvsroot/simspark/simspark/spark/utility/sfsexp/sexp.c,v retrieving revision 1.2.2.1 retrieving revision 1.2.2.2 diff -C2 -d -r1.2.2.1 -r1.2.2.2 *** sexp.c 25 Apr 2007 20:24:35 -0000 1.2.2.1 --- sexp.c 25 Apr 2007 20:27:17 -0000 1.2.2.2 *************** *** 96,99 **** --- 96,100 ---- fakehead->next = NULL; /* this is the important part of fakehead */ fakehead->aty = sx->aty; + fakehead->line = 0; if (fakehead->ty == SEXP_VALUE) { *************** *** 342,345 **** --- 343,347 ---- fakehead->next = NULL; /* this is the important part of fakehead */ fakehead->aty = sx->aty; + fakehead->line = 0; if (fakehead->ty == SEXP_VALUE) { *************** *** 476,479 **** --- 478,483 ---- sx->val_used = sx->val_allocated = 0; + sx->line = 0; + return sx; } *************** *** 496,499 **** --- 500,505 ---- sx->list = sx->next = NULL; + sx->line = 0; + return sx; } |
From: Markus R. <rol...@us...> - 2007-04-25 20:24:42
|
Update of /cvsroot/simspark/simspark/spark/utility/sfsexp In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv8837 Modified Files: Tag: RSGEDIT_FILEREF parser.c sexp.c sexp.h sexp_ops.c Log Message: - ws change Index: sexp.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/utility/sfsexp/sexp.h,v retrieving revision 1.1 retrieving revision 1.1.6.1 diff -C2 -d -r1.1 -r1.1.6.1 *** sexp.h 19 Dec 2005 19:13:30 -0000 1.1 --- sexp.h 25 Apr 2007 20:24:35 -0000 1.1.6.1 *************** *** 49,58 **** * * \section intro Intro ! * * This library was created to provide s-expression parsing and manipulation ! * facilities to C and C++ programs. The primary goals were speed and * efficiency - low memory impact, and the highest speed we could achieve in ! * parsing. Suprisingly, no other libraries on the net were found that ! * were not bloated with features or involved embedding a full-fledged * LISP or Scheme interpreter into our programs. So, this library evolved * to fill this gap. As such, it does not guarantee that every valid LISP --- 49,58 ---- * * \section intro Intro ! * * This library was created to provide s-expression parsing and manipulation ! * facilities to C and C++ programs. The primary goals were speed and * efficiency - low memory impact, and the highest speed we could achieve in ! * parsing. Suprisingly, no other libraries on the net were found that ! * were not bloated with features or involved embedding a full-fledged * LISP or Scheme interpreter into our programs. So, this library evolved * to fill this gap. As such, it does not guarantee that every valid LISP *************** *** 83,87 **** * 1,000 times. The following numbers reflect tests done on a * representative expression from Supermon, the tool that this code was ! * created for. * * - <B>v0.1.1</B> : 1.61s --- 83,87 ---- * 1,000 times. The following numbers reflect tests done on a * representative expression from Supermon, the tool that this code was ! * created for. * * - <B>v0.1.1</B> : 1.61s *************** *** 94,98 **** * - <B>v0.3.1</B> : ?.??s * - <B>v0.3.2</B> : ?.??s ! * * \section license License Information * --- 94,98 ---- * - <B>v0.3.1</B> : ?.??s * - <B>v0.3.2</B> : ?.??s ! * * \section license License Information * *************** *** 120,124 **** * This software is licensed under the GNU Public License, which * is included as LICENSE_GPL in this source distribution. ! * * This library is part of the Supermon project, hence the name * "Supermon" above. See http://www.acl.lanl.gov/supermon/ for details on --- 120,124 ---- * This software is licensed under the GNU Public License, which * is included as LICENSE_GPL in this source distribution. ! * * This library is part of the Supermon project, hence the name * "Supermon" above. See http://www.acl.lanl.gov/supermon/ for details on *************** *** 145,149 **** * the head element of the associated s-expression. */ ! typedef enum { /** * An atom of some type. See atom type (aty) field of element structure --- 145,149 ---- * the head element of the associated s-expression. */ ! typedef enum { /** * An atom of some type. See atom type (aty) field of element structure *************** *** 157,161 **** */ SEXP_LIST ! } elt_t; /** --- 157,161 ---- */ SEXP_LIST ! } elt_t; /** *************** *** 172,180 **** * of programming languages. */ ! typedef enum { /** * Basic, unquoted value. */ ! SEXP_BASIC, /** --- 172,180 ---- * of programming languages. */ ! typedef enum { /** * Basic, unquoted value. */ ! SEXP_BASIC, /** *************** *** 182,186 **** * a non-parsed portion of the s-expression. */ ! SEXP_SQUOTE, /** --- 182,186 ---- * a non-parsed portion of the s-expression. */ ! SEXP_SQUOTE, /** *************** *** 227,231 **** * and their values given with the fields themselves. Notice that a single * quote can appear directly before an s-expression or atom, similar to the ! * use in LISP. */ typedef struct elt { --- 227,231 ---- * and their values given with the fields themselves. Notice that a single * quote can appear directly before an s-expression or atom, similar to the ! * use in LISP. */ typedef struct elt { *************** *** 234,238 **** * the type is <B>SEXP_VALUE</B>, then a programmer knows that the val field * is meaningful and contains the data associated with this element of the ! * s-expression. If the type is <B>SEXP_LIST</B>, then the list field * contains a pointer to the s-expression element representing the head of * the list. For each case, the field for the opposite case contains no --- 234,238 ---- * the type is <B>SEXP_VALUE</B>, then a programmer knows that the val field * is meaningful and contains the data associated with this element of the ! * s-expression. If the type is <B>SEXP_LIST</B>, then the list field * contains a pointer to the s-expression element representing the head of * the list. For each case, the field for the opposite case contains no *************** *** 251,260 **** */ int val_allocated; ! /** * Number of bytes used in val (<= val_allocated). */ int val_used; ! /** * If the type of the element is <B>SEXP_LIST</B>, this field will contain --- 251,260 ---- */ int val_allocated; ! /** * Number of bytes used in val (<= val_allocated). */ int val_used; ! /** * If the type of the element is <B>SEXP_LIST</B>, this field will contain *************** *** 283,291 **** * point to a memory location where the data resides. The length * of this memory blob is the next field. char* implies byte sized ! * elements. */ char *bindata; ! /** * The length of the data pointed at by bindata in bytes. */ --- 283,291 ---- * point to a memory location where the data resides. The length * of this memory blob is the next field. char* implies byte sized ! * elements. */ char *bindata; ! /** * The length of the data pointed at by bindata in bytes. */ *************** *** 318,322 **** * advance (this would require more memory management than we want...). * So, by using a continuation-based parser, we can call it with this string ! * and have it return a continuation when it has parsed the first * s-expression. Once we have processed the s-expression (accessible * through the <i>last_sexpr</i> field of the continuation), we can call --- 318,322 ---- * advance (this would require more memory management than we want...). * So, by using a continuation-based parser, we can call it with this string ! * and have it return a continuation when it has parsed the first * s-expression. Once we have processed the s-expression (accessible * through the <i>last_sexpr</i> field of the continuation), we can call *************** *** 457,461 **** */ unsigned int binread; ! /** * Pointer to the memory containing the binary data being read in. --- 457,461 ---- */ unsigned int binread; ! /** * Pointer to the memory containing the binary data being read in. *************** *** 487,491 **** */ char buf[BUFSIZ]; ! /** * Byte count for last read. If it is -1, there was an error. Otherwise, --- 487,491 ---- */ char buf[BUFSIZ]; ! /** * Byte count for last read. If it is -1, there was an error. Otherwise, *************** *** 537,541 **** * one from the stack or a new one if none are available. Use this instead * of manually mallocing if you want to avoid excessive mallocs. <I>Note: ! * Mallocing your own expressions is fine - you can even use * sexp_t_deallocate to deallocate them and put them in the pool.</I> * Also, if the stack has not been initialized yet, this does so. --- 537,541 ---- * one from the stack or a new one if none are available. Use this instead * of manually mallocing if you want to avoid excessive mallocs. <I>Note: ! * Mallocing your own expressions is fine - you can even use * sexp_t_deallocate to deallocate them and put them in the pool.</I> * Also, if the stack has not been initialized yet, this does so. *************** *** 549,553 **** */ void sexp_t_deallocate(sexp_t *s); ! /** * In the event that someone wants us to release ALL of the memory used --- 549,553 ---- */ void sexp_t_deallocate(sexp_t *s); ! /** * In the event that someone wants us to release ALL of the memory used *************** *** 580,591 **** */ sexp_t *new_sexp_list(sexp_t *l); ! /** ! * allocate a new sexp_t element representing a value */ sexp_t *new_sexp_atom(char *buf, int bs); ! ! /** ! * create an initial continuation for parsing the given string */ pcont_t *init_continuation(char *str); --- 580,591 ---- */ sexp_t *new_sexp_list(sexp_t *l); ! /** ! * allocate a new sexp_t element representing a value */ sexp_t *new_sexp_atom(char *buf, int bs); ! ! /** ! * create an initial continuation for parsing the given string */ pcont_t *init_continuation(char *str); *************** *** 614,635 **** */ sexp_t *read_one_sexp(sexp_iowrap_t *iow); ! ! /** ! * wrapper around parser for compatibility. */ sexp_t *parse_sexp(char *s, int len); ! /** ! * wrapper around parser for friendlier continuation use ! * pre-condition : continuation (cc) is NON-NULL! */ sexp_t *iparse_sexp(char *s, int len, pcont_t *cc); ! /** * given a LISP style s-expression string, parse it into a set of ! * connected sexp_t structures. */ pcont_t *cparse_sexp(char *s, int len, pcont_t *pc); ! /** * given a sexp_t structure, free the memory it uses (and recursively free --- 614,635 ---- */ sexp_t *read_one_sexp(sexp_iowrap_t *iow); ! ! /** ! * wrapper around parser for compatibility. */ sexp_t *parse_sexp(char *s, int len); ! /** ! * wrapper around parser for friendlier continuation use ! * pre-condition : continuation (cc) is NON-NULL! */ sexp_t *iparse_sexp(char *s, int len, pcont_t *cc); ! /** * given a LISP style s-expression string, parse it into a set of ! * connected sexp_t structures. */ pcont_t *cparse_sexp(char *s, int len, pcont_t *pc); ! /** * given a sexp_t structure, free the memory it uses (and recursively free Index: parser.c =================================================================== RCS file: /cvsroot/simspark/simspark/spark/utility/sfsexp/parser.c,v retrieving revision 1.1 retrieving revision 1.1.6.1 diff -C2 -d -r1.1 -r1.1.6.1 *** parser.c 19 Dec 2005 19:13:30 -0000 1.1 --- parser.c 25 Apr 2007 20:24:35 -0000 1.1.6.1 *************** *** 50,54 **** if (ss > 0) sexp_val_start_size = ss; ! else fprintf(stderr,"%s: Cannot set buffer start size to value<1.\n",__FILE__); --- 50,54 ---- if (ss > 0) sexp_val_start_size = ss; ! else fprintf(stderr,"%s: Cannot set buffer start size to value<1.\n",__FILE__); [...1275 lines suppressed...] /* the null check used to be part of the guard on the while loop. unfortunately, if we're in state 15, null is considered a perfectly valid byte. This means the length passed in better ! be accurate for the parser to not walk off the end of the string! */ if (state != 15 && t[0] == '\0') keepgoing = 0; *************** *** 1249,1253 **** cc->error = 0; } ! return cc; } --- 1249,1253 ---- cc->error = 0; } ! return cc; } Index: sexp_ops.c =================================================================== RCS file: /cvsroot/simspark/simspark/spark/utility/sfsexp/sexp_ops.c,v retrieving revision 1.1 retrieving revision 1.1.6.1 diff -C2 -d -r1.1 -r1.1.6.1 *** sexp_ops.c 19 Dec 2005 19:13:30 -0000 1.1 --- sexp_ops.c 25 Apr 2007 20:24:35 -0000 1.1.6.1 *************** *** 33,37 **** /** ! * Given an s-expression, find the atom inside of it with the * value matchine name, and return a reference to it. If the atom * doesn't occur inside start, return NULL. --- 33,37 ---- /** ! * Given an s-expression, find the atom inside of it with the * value matchine name, and return a reference to it. If the atom * doesn't occur inside start, return NULL. *************** *** 49,55 **** temp = find_sexp (name, start->list); if (temp == NULL) ! return find_sexp (name, start->next); else ! return temp; } else --- 49,55 ---- temp = find_sexp (name, start->list); if (temp == NULL) ! return find_sexp (name, start->next); else ! return temp; } else *************** *** 57,66 **** assert(start->val != NULL); if (strcmp (start->val, name) == 0) ! return start; else ! return find_sexp (name, start->next); } ! return NULL; /* shouldn't get here */ } --- 57,66 ---- assert(start->val != NULL); if (strcmp (start->val, name) == 0) ! return start; else ! return find_sexp (name, start->next); } ! return NULL; /* shouldn't get here */ } *************** *** 72,76 **** sexp_t *t = sx; sexp_t *rt; ! if (sx == NULL) return NULL; --- 72,76 ---- sexp_t *t = sx; sexp_t *rt; ! if (sx == NULL) return NULL; *************** *** 79,85 **** assert(t->val != NULL); if (strcmp(t->val,str) == 0) { ! return t; } ! } t = t->next; --- 79,85 ---- assert(t->val != NULL); if (strcmp(t->val,str) == 0) { ! return t; } ! } t = t->next; *************** *** 92,96 **** if (rt != NULL) return rt; } ! t = t->next; } --- 92,96 ---- if (rt != NULL) return rt; } ! t = t->next; } *************** *** 111,115 **** t = sx->list; ! while (t != NULL) { len++; --- 111,115 ---- t = sx->list; ! while (t != NULL) { len++; *************** *** 146,150 **** snew->list = copy_sexp(s->list); } ! snew->next = copy_sexp(s->next); --- 146,150 ---- snew->list = copy_sexp(s->list); } ! snew->next = copy_sexp(s->next); *************** *** 191,233 **** */ sexp_t *car_sexp(sexp_t *s) { ! sexp_t *cr, *ocr; ! /* really dumb - calling on null */ ! if (s == NULL) { ! fprintf(stderr,"car called on null sexpr.\n"); ! return NULL; ! } ! /* less dumb - calling on an atom */ ! if (s->ty == SEXP_VALUE) { ! fprintf(stderr,"car called on an atom.\n"); ! return NULL; ! } ! /* ocr = (sexp_t *)malloc(sizeof(sexp_t));*/ ocr = sexp_t_allocate(); ! assert(ocr != NULL); ! ocr->ty = SEXP_LIST; ! ocr->next = NULL; ! /* allocate the new sexp_t */ ! /* cr = (sexp_t *)malloc(sizeof(sexp_t)); */ cr = sexp_t_allocate(); ! assert(cr != NULL); ! ocr->list = cr; ! /* copy the head of the sexpr */ ! if (s->list->ty == SEXP_VALUE) { ! cr->ty = SEXP_VALUE; assert(s->list->val != NULL); ! strcpy(cr->val,s->list->val); ! cr->next = cr->list = NULL; ! } else { ! cr->ty = SEXP_LIST; ! cr->next = NULL; ! cr->list = copy_sexp(s->list->list); ! } ! return ocr; } --- 191,233 ---- */ sexp_t *car_sexp(sexp_t *s) { ! sexp_t *cr, *ocr; ! /* really dumb - calling on null */ ! if (s == NULL) { ! fprintf(stderr,"car called on null sexpr.\n"); ! return NULL; ! } ! /* less dumb - calling on an atom */ ! if (s->ty == SEXP_VALUE) { ! fprintf(stderr,"car called on an atom.\n"); ! return NULL; ! } ! /* ocr = (sexp_t *)malloc(sizeof(sexp_t));*/ ocr = sexp_t_allocate(); ! assert(ocr != NULL); ! ocr->ty = SEXP_LIST; ! ocr->next = NULL; ! /* allocate the new sexp_t */ ! /* cr = (sexp_t *)malloc(sizeof(sexp_t)); */ cr = sexp_t_allocate(); ! assert(cr != NULL); ! ocr->list = cr; ! /* copy the head of the sexpr */ ! if (s->list->ty == SEXP_VALUE) { ! cr->ty = SEXP_VALUE; assert(s->list->val != NULL); ! strcpy(cr->val,s->list->val); ! cr->next = cr->list = NULL; ! } else { ! cr->ty = SEXP_LIST; ! cr->next = NULL; ! cr->list = copy_sexp(s->list->list); ! } ! return ocr; } *************** *** 236,261 **** */ sexp_t *cdr_sexp(sexp_t *s) { ! sexp_t *cd; ! /* really dumb */ ! if (s == NULL) { ! fprintf(stderr,"cdr called on null.\n"); ! return NULL; ! } ! /* less dumb */ ! if (s->ty != SEXP_LIST) { ! fprintf(stderr,"cdr called on atom.\n"); ! return NULL; ! } ! /* cd = (sexp_t *)malloc(sizeof(sexp_t)); */ cd = sexp_t_allocate(); ! assert(cd != NULL); ! cd->ty = SEXP_LIST; ! cd->next = NULL; ! cd->list = copy_sexp(s->list->next); ! return cd; } --- 236,261 ---- */ sexp_t *cdr_sexp(sexp_t *s) { ! sexp_t *cd; ! /* really dumb */ ! if (s == NULL) { ! fprintf(stderr,"cdr called on null.\n"); ! return NULL; ! } ! /* less dumb */ ! if (s->ty != SEXP_LIST) { ! fprintf(stderr,"cdr called on atom.\n"); ! return NULL; ! } ! /* cd = (sexp_t *)malloc(sizeof(sexp_t)); */ cd = sexp_t_allocate(); ! assert(cd != NULL); ! cd->ty = SEXP_LIST; ! cd->next = NULL; ! cd->list = copy_sexp(s->list->next); ! return cd; } Index: sexp.c =================================================================== RCS file: /cvsroot/simspark/simspark/spark/utility/sfsexp/sexp.c,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -C2 -d -r1.2 -r1.2.2.1 *** sexp.c 15 Mar 2007 07:26:30 -0000 1.2 --- sexp.c 25 Apr 2007 20:24:35 -0000 1.2.2.1 *************** *** 111,115 **** { fprintf (stderr, ! "Warning: print_sexp not provided sufficient space.\n"); return -1; } --- 111,115 ---- { fprintf (stderr, ! "Warning: print_sexp not provided sufficient space.\n"); return -1; } *************** *** 125,177 **** if (tdata == NULL) ! { ! pop (stack); ! if (depth > 0) ! { ! b[0] = ')'; ! b++; ! left--; ! depth--; ! if (left == 0) ! { ! fprintf (stderr, ! "Warning: print_sexp out of buffer space.\n"); ! break; ! } ! } ! if (stack->top == NULL) ! break; ! top = stack->top; ! top->data = ((sexp_t *) top->data)->next; ! if (top->data != NULL) ! { ! b[0] = ' '; ! b++; ! left--; ! if (left == 0) ! { ! fprintf (stderr, ! "Warning: print_sexp out of buffer space.\n"); ! break; ! } ! } ! } else if (tdata->ty == SEXP_VALUE) ! { ! if (tdata->aty == SEXP_DQUOTE) ! { ! b[0] = '\"'; ! b++; ! left--; ! } ! else if (tdata->aty == SEXP_SQUOTE) ! { ! b[0] = '\''; ! b++; ! left--; ! } if (tdata->aty != SEXP_BINARY) { --- 125,177 ---- if (tdata == NULL) ! { ! pop (stack); ! if (depth > 0) ! { ! b[0] = ')'; ! b++; ! left--; ! depth--; ! if (left == 0) ! { ! fprintf (stderr, ! "Warning: print_sexp out of buffer space.\n"); ! break; ! } ! } ! if (stack->top == NULL) ! break; ! top = stack->top; ! top->data = ((sexp_t *) top->data)->next; ! if (top->data != NULL) ! { ! b[0] = ' '; ! b++; ! left--; ! if (left == 0) ! { ! fprintf (stderr, ! "Warning: print_sexp out of buffer space.\n"); ! break; ! } ! } ! } else if (tdata->ty == SEXP_VALUE) ! { ! if (tdata->aty == SEXP_DQUOTE) ! { ! b[0] = '\"'; ! b++; ! left--; ! } ! else if (tdata->aty == SEXP_SQUOTE) ! { ! b[0] = '\''; ! b++; ! left--; ! } if (tdata->aty != SEXP_BINARY) { *************** *** 190,194 **** if (left == 0) break; } ! b[0] = tc[0]; b++; --- 190,194 ---- if (left == 0) break; } ! b[0] = tc[0]; b++; *************** *** 210,214 **** b += sz; left -= sz; ! if (left < tdata->binlength) { left = 0; --- 210,214 ---- b += sz; left -= sz; ! if (left < tdata->binlength) { left = 0; *************** *** 222,280 **** } else { ! left = 0; break; } } ! if (tdata->aty == SEXP_DQUOTE && left > 0) ! { ! b[0] = '\"'; ! b++; ! left--; ! } ! if (left < 0) ! left = 0; ! if (left == 0) ! { ! fprintf (stderr, "Warning: print_sexp out of buffer space.\n"); ! break; ! } ! top->data = ((sexp_t *) top->data)->next; ! if (top->data != NULL) ! { ! b[0] = ' '; ! b++; ! left--; ! if (left == 0) ! { ! fprintf (stderr, ! "Warning: print_sexp out of buffer space.\n"); ! break; ! } ! } ! } else if (tdata->ty == SEXP_LIST) ! { ! depth++; ! b[0] = '('; ! b++; ! left--; ! if (left == 0) ! { ! fprintf (stderr, "Warning: print_sexp out of buffer space.\n"); ! break; ! } ! push (stack, tdata->list); ! } else ! { ! fprintf (stderr, "ERROR: Unknown type in sexp_t.\n"); ! fflush (stderr); ! return -1; ! } } --- 222,280 ---- } else { ! left = 0; break; } } ! if (tdata->aty == SEXP_DQUOTE && left > 0) ! { ! b[0] = '\"'; ! b++; ! left--; ! } ! if (left < 0) ! left = 0; ! if (left == 0) ! { ! fprintf (stderr, "Warning: print_sexp out of buffer space.\n"); ! break; ! } ! top->data = ((sexp_t *) top->data)->next; ! if (top->data != NULL) ! { ! b[0] = ' '; ! b++; ! left--; ! if (left == 0) ! { ! fprintf (stderr, ! "Warning: print_sexp out of buffer space.\n"); ! break; ! } ! } ! } else if (tdata->ty == SEXP_LIST) ! { ! depth++; ! b[0] = '('; ! b++; ! left--; ! if (left == 0) ! { ! fprintf (stderr, "Warning: print_sexp out of buffer space.\n"); ! break; ! } ! push (stack, tdata->list); ! } else ! { ! fprintf (stderr, "ERROR: Unknown type in sexp_t.\n"); ! fflush (stderr); ! return -1; ! } } *************** *** 286,293 **** depth--; if (left == 0) ! { ! fprintf (stderr, "Warning: print_sexp out of buffer space.\n"); ! break; ! } } --- 286,293 ---- depth--; if (left == 0) ! { ! fprintf (stderr, "Warning: print_sexp out of buffer space.\n"); ! break; ! } } *************** *** 345,349 **** if (fakehead->ty == SEXP_VALUE) { assert(sx->val != NULL); ! /* duplicate the value of the head into the fake head */ fakehead->val = (char *)malloc(sizeof(char)*sx->val_used); --- 345,349 ---- if (fakehead->ty == SEXP_VALUE) { assert(sx->val != NULL); ! /* duplicate the value of the head into the fake head */ fakehead->val = (char *)malloc(sizeof(char)*sx->val_used); *************** *** 364,396 **** if (tdata == NULL) ! { ! pop (stack); ! if (depth > 0) ! { ! _s = saddch(_s, ')'); ! depth--; ! } ! if (stack->top == NULL) ! break; ! top = stack->top; ! top->data = ((sexp_t *) top->data)->next; ! if (top->data != NULL) ! { ! _s = saddch(_s, ' '); ! } ! } else if (tdata->ty == SEXP_VALUE) ! { ! if (tdata->aty == SEXP_DQUOTE) ! { ! _s = saddch(_s,'\"'); ! } ! else if (tdata->aty == SEXP_SQUOTE) ! { ! _s = saddch(_s,'\''); ! } if (tdata->aty == SEXP_BINARY) { --- 364,396 ---- if (tdata == NULL) ! { ! pop (stack); ! if (depth > 0) ! { ! _s = saddch(_s, ')'); ! depth--; ! } ! if (stack->top == NULL) ! break; ! top = stack->top; ! top->data = ((sexp_t *) top->data)->next; ! if (top->data != NULL) ! { ! _s = saddch(_s, ' '); ! } ! } else if (tdata->ty == SEXP_VALUE) ! { ! if (tdata->aty == SEXP_DQUOTE) ! { ! _s = saddch(_s,'\"'); ! } ! else if (tdata->aty == SEXP_SQUOTE) ! { ! _s = saddch(_s,'\''); ! } if (tdata->aty == SEXP_BINARY) { *************** *** 405,409 **** assert(tdata->val != NULL); tc = tdata->val; ! /* copy value into string */ while (tc[0] != 0) --- 405,409 ---- assert(tdata->val != NULL); tc = tdata->val; ! /* copy value into string */ while (tc[0] != 0) *************** *** 415,419 **** _s = saddch(_s,'\\'); } ! _s = saddch(_s,tc[0]); tc++; --- 415,419 ---- _s = saddch(_s,'\\'); } ! _s = saddch(_s,tc[0]); tc++; *************** *** 421,448 **** } ! if (tdata->aty == SEXP_DQUOTE) ! { ! _s = saddch(_s,'\"'); ! } ! top->data = ((sexp_t *) top->data)->next; ! if (top->data != NULL) ! { ! _s = saddch(_s,' '); ! } ! } else if (tdata->ty == SEXP_LIST) ! { ! depth++; ! _s = saddch(_s,'('); ! push (stack, tdata->list); ! } else ! { ! fprintf (stderr, "ERROR: Unknown type in sexp_t.\n"); ! fflush (stderr); ! return -1; ! } } --- 421,448 ---- } ! if (tdata->aty == SEXP_DQUOTE) ! { ! _s = saddch(_s,'\"'); ! } ! top->data = ((sexp_t *) top->data)->next; ! if (top->data != NULL) ! { ! _s = saddch(_s,' '); ! } ! } else if (tdata->ty == SEXP_LIST) ! { ! depth++; ! _s = saddch(_s,'('); ! push (stack, tdata->list); ! } else ! { ! fprintf (stderr, "ERROR: Unknown type in sexp_t.\n"); ! fflush (stderr); ! return -1; ! } } *************** *** 480,484 **** /** ! * allocate a new sexp_t element representing a value */ sexp_t *new_sexp_atom(char *buf, int bs) { --- 480,484 ---- /** ! * allocate a new sexp_t element representing a value */ sexp_t *new_sexp_atom(char *buf, int bs) { |
From: Markus R. <rol...@us...> - 2007-04-25 20:08:48
|
Update of /cvsroot/simspark/simspark/contrib/rsgedit In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv1700 Modified Files: sparktree.cpp Log Message: - applied fix to SparkTree::SelectLeaf; use GetNextSibling instead of GetNextChild (thanks Jan) Index: sparktree.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/sparktree.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** sparktree.cpp 15 Apr 2007 12:19:31 -0000 1.6 --- sparktree.cpp 25 Apr 2007 20:08:43 -0000 1.7 *************** *** 247,252 **** } } ! ! item = mTree->GetNextChild(item, cookie); } --- 247,251 ---- } } ! item = mTree->GetNextSibling(item); } |
From: Markus R. <rol...@us...> - 2007-04-22 07:41:52
|
Update of /cvsroot/simspark/simspark/simulations/parts/rsg/boxspheres In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv7614 Modified Files: ccylinder.rsg Log Message: - added missing ContactJointHandler Index: ccylinder.rsg =================================================================== RCS file: /cvsroot/simspark/simspark/simulations/parts/rsg/boxspheres/ccylinder.rsg,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ccylinder.rsg 15 Mar 2007 07:26:25 -0000 1.2 --- ccylinder.rsg 22 Apr 2007 07:41:46 -0000 1.3 *************** *** 17,20 **** --- 17,32 ---- (node CCylinderCollider (setParams $radius $length) + (node ContactJointHandler + (setContactBounceMode false) + + (setContactSlipMode true) + (setContactSlip 0.1 0.1) + + (setContactSoftERPMode true) + (setContactSoftERP 0.2) + + (setContactSoftCFM true) + (setContactSoftCFM 0.01) + ) ) ) |
From: Jan M. <ja...@us...> - 2007-04-21 21:35:35
|
Update of /cvsroot/simspark/simspark/contrib/rsgedit In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv15783 Modified Files: Makefile.am Log Message: added sparkcontext.{cpp|h} and sparkcontextevent.{cpp|h} to source files Index: Makefile.am =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/Makefile.am,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Makefile.am 15 Mar 2007 07:26:24 -0000 1.6 --- Makefile.am 21 Apr 2007 21:35:30 -0000 1.7 *************** *** 31,35 **** sparkglrender.cpp \ sparktree.cpp \ ! aboutDlg.h \ agentframe.h \ constants.h \ --- 31,37 ---- sparkglrender.cpp \ sparktree.cpp \ ! sparkcontext.cpp \ ! sparkcontextevent.cpp \ ! aboutDlg.h \ agentframe.h \ constants.h \ *************** *** 43,46 **** --- 45,50 ---- sparkglcanvas.h \ sparkglrender.h \ + sparkcontext.h \ + sparkcontextevent.h \ sparktree.h |
From: Markus R. <rol...@us...> - 2007-04-15 15:40:30
|
Update of /cvsroot/simspark/simspark/simulations/parts/rsg/boxspheres In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv28298 Modified Files: arena.rsg Log Message: Index: arena.rsg =================================================================== RCS file: /cvsroot/simspark/simspark/simulations/parts/rsg/boxspheres/arena.rsg,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** arena.rsg 24 Feb 2006 12:04:14 -0000 1.1 --- arena.rsg 15 Apr 2007 15:40:24 -0000 1.2 *************** *** 3,15 **** (RubySceneGraph 0 1) ( ; create the base plane (node Transform (setLocalPos 0 0 -1) (node Box (setMaterial matGreen) (setExtents 100 100 4) ) (node PlaneCollider ! (setParams 0 0 1.0 0) (node ContactJointHandler (setContactBounceMode false) --- 3,37 ---- (RubySceneGraph 0 1) ( + ; add lights + (node Transform + (setLocalPos -10 10 10) + (node Light + (setDiffuse 1.0 1.0 1.0 1.0) + (setSpecular 0.1 0.1 0.1 1.0) + (setAmbient 0.8 0.8 0.8 1.0) + ) + + ) + + ; add lights + (node Transform + (setLocalPos 10 -10 10) + (node Light + (setDiffuse 1.0 1.0 1.0 1.0) + (setSpecular 0.1 0.1 0.1 1.0) + (setAmbient 0.0 0.0 0.0 1.0) + ) + ) + ; create the base plane (node Transform (setLocalPos 0 0 -1) (node Box + (setName basePlane) (setMaterial matGreen) (setExtents 100 100 4) ) (node PlaneCollider ! (setParams 0 0 1.0 1) (node ContactJointHandler (setContactBounceMode false) *************** *** 22,25 **** --- 44,48 ---- (setLocalPos -50 0 10) (node Box + (setName leftSide) (setMaterial matWhite) (setExtents 1 100 20) *************** *** 34,37 **** --- 57,61 ---- (setLocalPos 0 50 10) (node Box + (setName backSide) (setMaterial matGrey) (setExtents 100 1 20) *************** *** 46,50 **** (setLocalPos 50 0 10) (node Box ! (setMaterial matWhite) (setExtents 1 100 20) ) --- 70,75 ---- (setLocalPos 50 0 10) (node Box ! (setName rightSide) ! (setMaterial matWhite) (setExtents 1 100 20) ) *************** *** 58,61 **** --- 83,87 ---- (setLocalPos 0 -50 10) (node Box + (setName frontSide) (setMaterial matGrey) (setExtents 100 1 20) |
From: Markus R. <rol...@us...> - 2007-04-15 15:17:41
|
Update of /cvsroot/simspark/simspark/simulations/parts/rsg/boxspheres In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv5872 Modified Files: Tag: WIN32 arena.rsg Log Message: - fixed baseplane collider setup Index: arena.rsg =================================================================== RCS file: /cvsroot/simspark/simspark/simulations/parts/rsg/boxspheres/arena.rsg,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** arena.rsg 1 Apr 2007 15:30:36 -0000 1.1.2.1 --- arena.rsg 15 Apr 2007 15:17:25 -0000 1.1.2.2 *************** *** 28,36 **** (setLocalPos 0 0 -1) (node Box (setMaterial matGreen) (setExtents 100 100 4) ) (node PlaneCollider ! (setParams 0 0 1.0 0) (node ContactJointHandler (setContactBounceMode false) --- 28,37 ---- (setLocalPos 0 0 -1) (node Box + (setName basePlane) (setMaterial matGreen) (setExtents 100 100 4) ) (node PlaneCollider ! (setParams 0 0 1.0 1) (node ContactJointHandler (setContactBounceMode false) *************** *** 43,46 **** --- 44,48 ---- (setLocalPos -50 0 10) (node Box + (setName leftSide) (setMaterial matWhite) (setExtents 1 100 20) *************** *** 55,58 **** --- 57,61 ---- (setLocalPos 0 50 10) (node Box + (setName backSide) (setMaterial matGrey) (setExtents 100 1 20) *************** *** 67,71 **** (setLocalPos 50 0 10) (node Box ! (setMaterial matWhite) (setExtents 1 100 20) ) --- 70,75 ---- (setLocalPos 50 0 10) (node Box ! (setName rightSide) ! (setMaterial matWhite) (setExtents 1 100 20) ) *************** *** 79,82 **** --- 83,87 ---- (setLocalPos 0 -50 10) (node Box + (setName frontSide) (setMaterial matGrey) (setExtents 100 1 20) |
From: Markus R. <rol...@us...> - 2007-04-15 12:19:58
|
Update of /cvsroot/simspark/simspark/spark/kerosin/sceneserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv32166 Modified Files: axis.cpp axis.h Log Message: - added static method RenderAxis() Index: axis.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/sceneserver/axis.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** axis.h 15 Feb 2006 00:59:02 -0000 1.2 --- axis.h 15 Apr 2007 12:19:54 -0000 1.3 *************** *** 45,48 **** --- 45,50 ---- virtual void ComputeBoundingBox(); + static void RenderAxis(float size); + protected: virtual void RenderInternal(); Index: axis.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/sceneserver/axis.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** axis.cpp 15 Mar 2007 07:26:26 -0000 1.3 --- axis.cpp 15 Apr 2007 12:19:53 -0000 1.4 *************** *** 30,34 **** } ! void Axis::RenderInternal() { RGBA colX(1,0,0,1); --- 30,34 ---- } ! void Axis::RenderAxis(float size) { RGBA colX(1,0,0,1); *************** *** 41,45 **** glBegin(GL_LINE_LOOP); glVertex3f(0,0,0); ! glVertex3f(mSize,0,0); glEnd(); --- 41,45 ---- glBegin(GL_LINE_LOOP); glVertex3f(0,0,0); ! glVertex3f(size,0,0); glEnd(); *************** *** 49,53 **** glBegin(GL_LINE_LOOP); glVertex3f(0,0,0); ! glVertex3f(0,mSize,0); glEnd(); --- 49,53 ---- glBegin(GL_LINE_LOOP); glVertex3f(0,0,0); ! glVertex3f(0,size,0); glEnd(); *************** *** 58,65 **** glBegin(GL_LINE_LOOP); glVertex3f(0,0,0); ! glVertex3f(0,0,mSize); glEnd(); } float Axis::GetSize() { --- 58,70 ---- glBegin(GL_LINE_LOOP); glVertex3f(0,0,0); ! glVertex3f(0,0,size); glEnd(); } + void Axis::RenderInternal() + { + RenderAxis(mSize); + } + float Axis::GetSize() { |
From: Markus R. <rol...@us...> - 2007-04-15 12:19:35
|
Update of /cvsroot/simspark/simspark/contrib/rsgedit In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv32058 Modified Files: sparktree.cpp Log Message: - allow empty selection Index: sparktree.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/sparktree.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** sparktree.cpp 15 Apr 2007 11:48:41 -0000 1.5 --- sparktree.cpp 15 Apr 2007 12:19:31 -0000 1.6 *************** *** 174,178 **** if (leaf.expired()) { - assert(false); return false; } --- 174,177 ---- |
From: Markus R. <rol...@us...> - 2007-04-15 12:19:20
|
Update of /cvsroot/simspark/simspark/contrib/rsgedit In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv31715 Modified Files: sparkglrender.cpp sparkglrender.h Log Message: - render selected BaseNodes with axis lines. This allows highlighting of everything derived from BaseNode (Transform, Body, etc.) Index: sparkglrender.h =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/sparkglrender.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** sparkglrender.h 15 Apr 2007 10:31:05 -0000 1.5 --- sparkglrender.h 15 Apr 2007 12:19:12 -0000 1.6 *************** *** 34,37 **** --- 34,38 ---- class Camera; class SceneServer; + class BaseNode; } *************** *** 51,54 **** --- 52,56 ---- protected: + void RenderNodeSelection(boost::shared_ptr<oxygen::BaseNode> node); void RenderSelection(); Index: sparkglrender.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/sparkglrender.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** sparkglrender.cpp 15 Apr 2007 10:31:04 -0000 1.4 --- sparkglrender.cpp 15 Apr 2007 12:19:12 -0000 1.5 *************** *** 25,29 **** --- 25,31 ---- #include <kerosin/renderserver/rendernode.h> #include <kerosin/sceneserver/singlematnode.h> + #include <kerosin/sceneserver/axis.h> #include <kerosin/materialserver/material.h> + #include "constants.h" #include "simspark.h" #include "sparkcontext.h" *************** *** 96,102 **** } void SparkGLRender::RenderSelection() { ! shared_ptr<RenderNode> node = shared_dynamic_cast<RenderNode> (SparkContext::GetInstance().GetSelection().lock()); --- 98,143 ---- } + void SparkGLRender::RenderNodeSelection(shared_ptr<BaseNode> node) + { + if (node.get() == 0) + { + return; + } + + shared_ptr<SingleMatNode> sMatNode = + shared_dynamic_cast<SingleMatNode>(node); + + if (sMatNode.get() != 0) + { + shared_ptr<Material> material = sMatNode->GetMaterial(); + sMatNode->SetMaterial("matSelected"); + + sMatNode->RenderInternal(); + + if (material.get() != 0) + { + sMatNode->SetMaterial(material->GetName()); + } + + return; + } + + shared_ptr<RenderNode> renderNode = + shared_dynamic_cast<RenderNode>(node); + + if (renderNode.get() != 0) + { + renderNode->RenderInternal(); + return; + } + + const salt::AABB3& bb = node->GetWorldBoundingBox(); + float size = std::max<float>(GLRENDER_MIN_AXIS_WIDTH, bb.GetRadius()); + Axis::RenderAxis(size); + } + void SparkGLRender::RenderSelection() { ! shared_ptr<BaseNode> node = shared_dynamic_cast<BaseNode> (SparkContext::GetInstance().GetSelection().lock()); *************** *** 112,133 **** glMultMatrixf(node->GetWorldTransform().m); ! shared_ptr<SingleMatNode> sMatNode = ! shared_dynamic_cast<SingleMatNode>(node); ! ! if (sMatNode.get() != 0) ! { ! shared_ptr<Material> material = sMatNode->GetMaterial(); ! sMatNode->SetMaterial("matSelected"); ! ! node->RenderInternal(); ! ! if (material.get() != 0) ! { ! sMatNode->SetMaterial(material->GetName()); ! } ! } else ! { ! node->RenderInternal(); ! } glPopMatrix(); --- 153,157 ---- glMultMatrixf(node->GetWorldTransform().m); ! RenderNodeSelection(node); glPopMatrix(); |
From: Markus R. <rol...@us...> - 2007-04-15 12:18:28
|
Update of /cvsroot/simspark/simspark/contrib/rsgedit In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv31205 Modified Files: constants.cpp constants.h Log Message: - added GLRENDER_MIN_AXIS_WIDTH Index: constants.h =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/constants.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** constants.h 15 Apr 2007 11:15:06 -0000 1.4 --- constants.h 15 Apr 2007 12:18:20 -0000 1.5 *************** *** 69,71 **** --- 69,74 ---- extern const wxString MAINFRAME_FPS_CONTROLLER; + // minimal axis width uses to render selected BaseNodes + extern const float GLRENDER_MIN_AXIS_WIDTH; + #endif // RSGEDIT_CONSTANTS_H Index: constants.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/constants.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** constants.cpp 31 Mar 2007 13:25:13 -0000 1.3 --- constants.cpp 15 Apr 2007 12:18:20 -0000 1.4 *************** *** 37,38 **** --- 37,43 ---- // the default path to the fps controller const wxString MAINFRAME_FPS_CONTROLLER = "/usr/scene/camera/physics/controller"; + + // minimal axis width uses to render selected BaseNodes + const float GLRENDER_MIN_AXIS_WIDTH = 2.0; + + |
From: Markus R. <rol...@us...> - 2007-04-15 11:49:19
|
Update of /cvsroot/simspark/simspark/contrib/rsgedit In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv13103 Modified Files: mainframe.cpp Log Message: - reflect changed SparkContext selection in SparkTree Index: mainframe.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/mainframe.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** mainframe.cpp 15 Apr 2007 11:16:10 -0000 1.15 --- mainframe.cpp 15 Apr 2007 11:49:06 -0000 1.16 *************** *** 859,866 **** case SparkContextEvent::T_SELECTION_CHANGED: ! // redraw gl canvas bool swapBuffers = true; wxClientDC dc(this); mCanvas->Render(dc, swapBuffers); break; } --- 859,867 ---- case SparkContextEvent::T_SELECTION_CHANGED: ! // redraw gl canvas bool swapBuffers = true; wxClientDC dc(this); mCanvas->Render(dc, swapBuffers); + mSparkTree.SelectLeaf(SparkContext::GetInstance().GetSelection()); break; } |
From: Markus R. <rol...@us...> - 2007-04-15 11:48:54
|
Update of /cvsroot/simspark/simspark/contrib/rsgedit In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv12849 Modified Files: sparktree.cpp sparktree.h Log Message: - added method SelectLeaf that expands the SparkTree down to the given Leaf node and selects it Index: sparktree.h =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/sparktree.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** sparktree.h 15 Mar 2007 07:26:24 -0000 1.3 --- sparktree.h 15 Apr 2007 11:48:42 -0000 1.4 *************** *** 52,55 **** --- 52,56 ---- bool GetLocation(const wxTreeItemId id, wxString& location); + bool SelectLeaf(boost::weak_ptr<zeitgeist::Leaf> leaf); protected: Index: sparktree.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/sparktree.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** sparktree.cpp 15 Mar 2007 07:26:24 -0000 1.4 --- sparktree.cpp 15 Apr 2007 11:48:41 -0000 1.5 *************** *** 26,29 **** --- 26,30 ---- #include <zeitgeist/leaf.h> + #include <zeitgeist/node.h> #include <zeitgeist/class.h> *************** *** 168,169 **** --- 169,265 ---- return true; } + + bool SparkTree::SelectLeaf(weak_ptr<Leaf> leaf) + { + if (leaf.expired()) + { + assert(false); + return false; + } + + // build parent chain + Leaf::TLeafList leafList; + leafList.push_back(leaf.lock()); + + weak_ptr<Leaf> curLeaf(leaf); + for (;;) + { + weak_ptr<Leaf> parent = curLeaf.lock()->GetParent(); + if (! parent.expired()) + { + leafList.push_back(parent.lock()); + curLeaf = parent; + } else + { + break; + } + } + + + if (leafList.size() <= 1) + { + return false; + } + + // pop root nodea + leafList.pop_back(); + + // expand nodes in reverse order + wxTreeItemId curItem = mRootId; + + for ( + Leaf::TLeafList::reverse_iterator iter = leafList.rbegin(); + iter != leafList.rend(); + ++iter + ) + { + CreateChildren(curItem); + mTree->Expand(curItem); + + weak_ptr<Leaf> leaf = (*iter); + if (leaf.expired()) + { + assert(false); + return false; + } + + wxTreeItemIdValue cookie; + wxTreeItemId item = mTree->GetFirstChild(curItem, cookie); + + bool foundChild = false; + + while (item.IsOk()) + { + ItemData* data = GetItemData(item); + if (data != 0) + { + weak_ptr<Leaf> child = data->leaf; + if (child.expired()) + { + assert(false); + return false; + } + + if (leaf.lock() == child.lock()) + { + curItem = item; + foundChild = true; + break; + } + } + + item = mTree->GetNextChild(item, cookie); + } + + if (! foundChild) + { + assert(false); + return false; + } + } + + mTree->SelectItem(curItem); + mTree->EnsureVisible(curItem); + + return true; + } |
From: Markus R. <rol...@us...> - 2007-04-15 11:17:58
|
Update of /cvsroot/simspark/simspark/contrib/rsgedit In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv31605 Modified Files: rsgedit.vcproj Log Message: - add SpakrContextEvent files Index: rsgedit.vcproj =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/rsgedit.vcproj,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** rsgedit.vcproj 15 Apr 2007 10:31:04 -0000 1.3 --- rsgedit.vcproj 15 Apr 2007 11:17:53 -0000 1.4 *************** *** 272,275 **** --- 272,283 ---- </File> <File + RelativePath=".\sparkcontextevent.cpp" + > + </File> + <File + RelativePath=".\sparkcontextevent.h" + > + </File> + <File RelativePath=".\sparkglcanvas.cpp" > |
From: Markus R. <rol...@us...> - 2007-04-15 11:17:45
|
Update of /cvsroot/simspark/simspark/contrib/rsgedit In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv31483 Modified Files: sparkglcanvas.cpp sparkglcanvas.h Log Message: - remove custom redrawing this ist handled centrally from the mainframe in response to SparkContextEvents Index: sparkglcanvas.h =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/sparkglcanvas.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** sparkglcanvas.h 9 Apr 2007 17:42:50 -0000 1.7 --- sparkglcanvas.h 15 Apr 2007 11:17:39 -0000 1.8 *************** *** 69,73 **** void Reset(); - void ResetSelection(wxDC& dc); void Pick(wxDC& dc); --- 69,72 ---- Index: sparkglcanvas.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/sparkglcanvas.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** sparkglcanvas.cpp 15 Apr 2007 10:31:04 -0000 1.10 --- sparkglcanvas.cpp 15 Apr 2007 11:17:39 -0000 1.11 *************** *** 109,120 **** } - void SparkGLCanvas::ResetSelection(wxDC& dc) - { - SparkContext::GetInstance().ResetSelection(); - - bool swapBuffers = true; - Render(dc, swapBuffers); - } - void SparkGLCanvas::Pick(wxDC& dc) { --- 109,112 ---- *************** *** 226,230 **** { wxClientDC dc(this); ! ResetSelection(dc); } --- 218,222 ---- { wxClientDC dc(this); ! SparkContext::GetInstance().ResetSelection(); } |
From: Markus R. <rol...@us...> - 2007-04-15 11:17:16
|
Update of /cvsroot/simspark/simspark/contrib/rsgedit In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv31114 Modified Files: sparkcontext.cpp sparkcontext.h Log Message: - use SparkContextEvent to notify about state changes Index: sparkcontext.h =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/sparkcontext.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** sparkcontext.h 15 Apr 2007 10:50:12 -0000 1.2 --- sparkcontext.h 15 Apr 2007 11:17:10 -0000 1.3 *************** *** 29,32 **** --- 29,34 ---- } + class wxEvtHandler; + class SparkContext { *************** *** 39,47 **** --- 41,59 ---- void ResetSelection(); + void SetEventHandler(wxEvtHandler* handler, int id); + wxEvtHandler* GetEventHandler(); + int GetEventId(); + private: SparkContext(); protected: + //! the current selection boost::weak_ptr<zeitgeist::Leaf> mSelectedNode; + + //! assigned event notification target + wxEvtHandler* mEventHandler; + int mEventId; + }; Index: sparkcontext.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/sparkcontext.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** sparkcontext.cpp 15 Apr 2007 10:50:12 -0000 1.2 --- sparkcontext.cpp 15 Apr 2007 11:17:08 -0000 1.3 *************** *** 19,22 **** --- 19,23 ---- */ #include "sparkcontext.h" + #include "sparkcontextevent.h" using namespace zeitgeist; *************** *** 24,27 **** --- 25,29 ---- SparkContext::SparkContext() + : mEventHandler(0), mEventId(1) { } *************** *** 40,43 **** --- 42,53 ---- { mSelectedNode = node; + + if (mEventHandler == 0) + { + return; + } + + SparkContextEvent event(mEventId,SparkContextEvent::T_SELECTION_CHANGED); + wxPostEvent(mEventHandler,event); } *************** *** 49,53 **** void SparkContext::ResetSelection() { ! mSelectedNode.reset(); } --- 59,78 ---- void SparkContext::ResetSelection() { ! SetSelection(weak_ptr<Leaf>()); } + void SparkContext::SetEventHandler(wxEvtHandler* handler, int id) + { + mEventHandler = handler; + mEventId = id; + } + + wxEvtHandler* SparkContext::GetEventHandler() + { + return mEventHandler; + } + + int SparkContext::GetEventId() + { + return mEventId; + } |
From: Markus R. <rol...@us...> - 2007-04-15 11:16:17
|
Update of /cvsroot/simspark/simspark/contrib/rsgedit In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv29401 Modified Files: mainframe.cpp mainframe.h Log Message: - handle SparkContextEvents Index: mainframe.h =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/mainframe.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** mainframe.h 15 Apr 2007 10:50:51 -0000 1.11 --- mainframe.h 15 Apr 2007 11:16:11 -0000 1.12 *************** *** 33,36 **** --- 33,37 ---- class SparkGLCanvas; + class SparkContextEvent; namespace oxygen *************** *** 133,136 **** --- 134,139 ---- void OnTreeItemRightClick(wxTreeEvent& event); + void OnSparkContext(SparkContextEvent& event); + void SplitHor(); void SplitVert(); Index: mainframe.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/mainframe.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** mainframe.cpp 15 Apr 2007 10:50:50 -0000 1.14 --- mainframe.cpp 15 Apr 2007 11:16:10 -0000 1.15 *************** *** 33,36 **** --- 33,37 ---- #include <rsgedit/res/xpm_reload.xpm> #include <rsgedit/res/xpm_agent.xpm> + #include "sparkcontextevent.h" #include "aboutdlg.h" *************** *** 84,87 **** --- 85,90 ---- EVT_TREE_ITEM_ACTIVATED(1, mainframe::OnTreeItemActivated) EVT_TREE_ITEM_RIGHT_CLICK(1, mainframe::OnTreeItemRightClick) + + EVT_SPARK_CONTEXT(ID_SPARK_CONTEXT, mainframe::OnSparkContext) END_EVENT_TABLE() *************** *** 172,175 **** --- 175,182 ---- mTimer.Start(LOGWND_UPDATE_INTERVAL); + // init spark context + SparkContext::GetInstance().ResetSelection(); + SparkContext::GetInstance().SetEventHandler(this, ID_SPARK_CONTEXT); + PrintSimState(); UpdateTitle(); *************** *** 617,624 **** SparkContext::GetInstance().SetSelection(leaf); - - bool swapBuffers = true; - wxClientDC dc(this); - mCanvas->Render(dc, swapBuffers); } --- 624,627 ---- *************** *** 846,847 **** --- 849,867 ---- mSimState->SetValue(state + wxString::Format("t=%.1lf",now)); } + + void mainframe::OnSparkContext(SparkContextEvent& event) + { + switch (event.GetType()) + { + default: + assert(false); + break; + + case SparkContextEvent::T_SELECTION_CHANGED: + // redraw gl canvas + bool swapBuffers = true; + wxClientDC dc(this); + mCanvas->Render(dc, swapBuffers); + break; + } + } |
From: Markus R. <rol...@us...> - 2007-04-15 11:15:47
|
Update of /cvsroot/simspark/simspark/contrib/rsgedit In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv29402 Added Files: sparkcontextevent.cpp sparkcontextevent.h Log Message: - define a SparkContextEvent as a custom wxWidgets event class that notifies about context changes --- NEW FILE: sparkcontextevent.cpp --- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- this file is part of rcssserver3D Fri May 9 2003 Copyright (C) 2003 Koblenz University $Id: sparkcontextevent.cpp,v 1.1 2007/04/15 11:15:40 rollmark Exp $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "sparkcontextevent.h" const wxEventType wxEVT_REQUEST = wxNewEventType(); SparkContextEvent::SparkContextEvent(int id) : wxNotifyEvent(wxEVT_REQUEST, id) { mType = T_INVALID; } SparkContextEvent::SparkContextEvent(int id, EType type, const wxString& str) : wxNotifyEvent(wxEVT_REQUEST, id) { mType = type; SetString(str); } SparkContextEvent::~SparkContextEvent() { } wxEvent* SparkContextEvent::Clone() const { return new SparkContextEvent(GetId(), mType); } void SparkContextEvent::SetType(EType type) { mType = type; } SparkContextEvent::EType SparkContextEvent::GetType() const { return mType; } --- NEW FILE: sparkcontextevent.h --- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- this file is part of rcssserver3D Fri May 9 2003 Copyright (C) 2003 Koblenz University $Id: sparkcontextevent.h,v 1.1 2007/04/15 11:15:41 rollmark Exp $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef SPARKCONTEXTEVENT_H__ #define SPARKCONTEXTEVENT_H__ #include <wx/event.h> #include <wx/string.h> extern const wxEventType wxEVT_REQUEST; class SparkContextEvent : public wxNotifyEvent { public: enum EType { T_INVALID, T_SELECTION_CHANGED }; public: SparkContextEvent(int id); SparkContextEvent(int id, EType type, const wxString& str = ""); virtual ~SparkContextEvent(); void SetType(EType type); EType GetType() const; virtual wxEvent *Clone() const; protected: EType mType; }; typedef void (wxEvtHandler::*wxSparkContextEventFunction)(SparkContextEvent& event); #define EVT_SPARK_CONTEXT(id, fn) \ DECLARE_EVENT_TABLE_ENTRY( \ wxEVT_REQUEST, id, -1, \ (wxObjectEventFunction)(wxEventFunction)(wxSparkContextEventFunction)&fn, \ (wxObject *) NULL \ ), #endif // SPARKCONTEXTEVENT_H__ |
From: Markus R. <rol...@us...> - 2007-04-15 11:15:14
|
Update of /cvsroot/simspark/simspark/contrib/rsgedit In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv29377 Modified Files: constants.h Log Message: - define ID_SPARK_CONTEXT Index: constants.h =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/constants.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** constants.h 31 Mar 2007 13:25:13 -0000 1.3 --- constants.h 15 Apr 2007 11:15:06 -0000 1.4 *************** *** 46,50 **** ID_AGENT_OPEN = (wxID_HIGHEST+26), ID_AGENT_START = (wxID_HIGHEST+27), ! ID_AGENT_KILL = (wxID_HIGHEST+28) }; --- 46,52 ---- ID_AGENT_OPEN = (wxID_HIGHEST+26), ID_AGENT_START = (wxID_HIGHEST+27), ! ID_AGENT_KILL = (wxID_HIGHEST+28), ! ! ID_SPARK_CONTEXT = (wxID_HIGHEST+29) }; |
From: Markus R. <rol...@us...> - 2007-04-15 10:51:01
|
Update of /cvsroot/simspark/simspark/contrib/rsgedit In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv15264 Modified Files: mainframe.cpp mainframe.h Log Message: - move spawning of property frame to tree right click handler - update selection in tree double click handler Index: mainframe.h =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/mainframe.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** mainframe.h 1 Apr 2007 16:10:13 -0000 1.10 --- mainframe.h 15 Apr 2007 10:50:51 -0000 1.11 *************** *** 131,134 **** --- 131,135 ---- void OnTreeSelChanged(wxTreeEvent& event); void OnTreeItemActivated(wxTreeEvent& event); + void OnTreeItemRightClick(wxTreeEvent& event); void SplitHor(); Index: mainframe.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/mainframe.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** mainframe.cpp 9 Apr 2007 17:43:09 -0000 1.13 --- mainframe.cpp 15 Apr 2007 10:50:50 -0000 1.14 *************** *** 46,49 **** --- 46,50 ---- #include <kerosin/inputserver/inputcontrol.h> #include "simspark.h" + #include "sparkcontext.h" #define TI_LOG 1 *************** *** 82,86 **** EVT_TREE_SEL_CHANGED(1, mainframe::OnTreeSelChanged) EVT_TREE_ITEM_ACTIVATED(1, mainframe::OnTreeItemActivated) ! END_EVENT_TABLE() --- 83,87 ---- EVT_TREE_SEL_CHANGED(1, mainframe::OnTreeSelChanged) EVT_TREE_ITEM_ACTIVATED(1, mainframe::OnTreeItemActivated) ! EVT_TREE_ITEM_RIGHT_CLICK(1, mainframe::OnTreeItemRightClick) END_EVENT_TABLE() *************** *** 591,595 **** } ! void mainframe::OnTreeItemActivated(wxTreeEvent& event) { shared_ptr<Leaf> leaf = mSparkTree.GetLeaf(event.GetItem()).lock(); --- 592,596 ---- } ! void mainframe::OnTreeItemRightClick(wxTreeEvent& event) { shared_ptr<Leaf> leaf = mSparkTree.GetLeaf(event.GetItem()).lock(); *************** *** 607,610 **** --- 608,626 ---- } + void mainframe::OnTreeItemActivated(wxTreeEvent& event) + { + shared_ptr<Leaf> leaf = mSparkTree.GetLeaf(event.GetItem()).lock(); + if (leaf.get() == 0) + { + return; + } + + SparkContext::GetInstance().SetSelection(leaf); + + bool swapBuffers = true; + wxClientDC dc(this); + mCanvas->Render(dc, swapBuffers); + } + void mainframe::RefreshProperties() { |
From: Markus R. <rol...@us...> - 2007-04-15 10:50:23
|
Update of /cvsroot/simspark/simspark/contrib/rsgedit In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv14824 Modified Files: sparkcontext.cpp sparkcontext.h Log Message: - change type of selection pointer to zeitgeist::Leaf Index: sparkcontext.h =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/sparkcontext.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** sparkcontext.h 15 Apr 2007 10:31:11 -0000 1.1 --- sparkcontext.h 15 Apr 2007 10:50:12 -0000 1.2 *************** *** 24,30 **** #include <boost/weak_ptr.hpp> ! namespace oxygen { ! class BaseNode; } --- 24,30 ---- #include <boost/weak_ptr.hpp> ! namespace zeitgeist { ! class Leaf; } *************** *** 35,40 **** ~SparkContext(); ! void SetSelection(boost::weak_ptr<oxygen::BaseNode> node); ! boost::weak_ptr<oxygen::BaseNode> GetSelection() const; void ResetSelection(); --- 35,40 ---- ~SparkContext(); ! void SetSelection(boost::weak_ptr<zeitgeist::Leaf> node); ! boost::weak_ptr<zeitgeist::Leaf> GetSelection() const; void ResetSelection(); *************** *** 43,47 **** protected: ! boost::weak_ptr<oxygen::BaseNode> mSelectedNode; }; --- 43,47 ---- protected: ! boost::weak_ptr<zeitgeist::Leaf> mSelectedNode; }; Index: sparkcontext.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/sparkcontext.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** sparkcontext.cpp 15 Apr 2007 10:31:09 -0000 1.1 --- sparkcontext.cpp 15 Apr 2007 10:50:12 -0000 1.2 *************** *** 20,24 **** #include "sparkcontext.h" ! using namespace oxygen; using namespace boost; --- 20,24 ---- #include "sparkcontext.h" ! using namespace zeitgeist; using namespace boost; *************** *** 37,46 **** } ! void SparkContext::SetSelection(weak_ptr<BaseNode> node) { mSelectedNode = node; } ! boost::weak_ptr<BaseNode> SparkContext::GetSelection() const { return mSelectedNode; --- 37,46 ---- } ! void SparkContext::SetSelection(weak_ptr<Leaf> node) { mSelectedNode = node; } ! boost::weak_ptr<Leaf> SparkContext::GetSelection() const { return mSelectedNode; |
From: Markus R. <rol...@us...> - 2007-04-15 10:49:47
|
Update of /cvsroot/simspark/simspark/contrib/rsgedit In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv14583 Modified Files: rsgedit.rb Log Message: - change selection color to purple Index: rsgedit.rb =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/rsgedit.rb,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** rsgedit.rb 9 Apr 2007 17:39:38 -0000 1.6 --- rsgedit.rb 15 Apr 2007 10:49:42 -0000 1.7 *************** *** 65,67 **** material = new('kerosin/MaterialSolid', $serverPath+'material/matSelected'); ! material.setDiffuse(0.9,0.9,1.0,0.9) --- 65,67 ---- material = new('kerosin/MaterialSolid', $serverPath+'material/matSelected'); ! material.setDiffuse(0.9,0.1,0.9,0.9) |