Revision: 51708
http://brlcad.svn.sourceforge.net/brlcad/?rev=51708&view=rev
Author: cprecup
Date: 2012-07-29 23:52:46 +0000 (Sun, 29 Jul 2012)
Log Message:
-----------
Created a first version of the *ged_graph_objects_positions* routine that
returns objects' positions from a database. This will be used by GUI components
to draw objects in the graph editor's window.
Modified Paths:
--------------
brlcad/trunk/src/libged/dag.cpp
Modified: brlcad/trunk/src/libged/dag.cpp
===================================================================
--- brlcad/trunk/src/libged/dag.cpp 2012-07-29 20:58:29 UTC (rev 51707)
+++ brlcad/trunk/src/libged/dag.cpp 2012-07-29 23:52:46 UTC (rev 51708)
@@ -431,6 +431,24 @@
/**
+ * This routine returns a vector of vectors of points.
+ * A vector of points defines a polygon shape that corresponds to an object in
the database.
+ */
+std::vector<std::vector<Avoid::Point> >
+ged_graph_objects_positions(struct _ged_dag_data *dag) {
+ std::vector<std::vector<Avoid::Point> > positions;
+ ObstacleList::const_iterator finish = dag->router->m_obstacles.end();
+ positions.reserve(dag->object_nr);
+
+ for (ObstacleList::const_iterator it = dag->router->m_obstacles.begin();
it != finish; ++it) {
+ positions[(*it)->id()] = (*it)->polygon().ps;
+ }
+
+ return positions;
+}
+
+
+/**
* This routine calls the add_objects() method for a given database if the
"view"
* subcommand is used.
*/
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits