Revision: 6893
http://playerstage.svn.sourceforge.net/playerstage/?rev=6893&view=rev
Author: alexcb
Date: 2008-07-21 06:08:31 +0000 (Mon, 21 Jul 2008)
Log Message:
-----------
minor optimization
Modified Paths:
--------------
code/stage/trunk/libstage/model.cc
Modified: code/stage/trunk/libstage/model.cc
===================================================================
--- code/stage/trunk/libstage/model.cc 2008-07-21 06:07:19 UTC (rev 6892)
+++ code/stage/trunk/libstage/model.cc 2008-07-21 06:08:31 UTC (rev 6893)
@@ -635,7 +635,7 @@
for( GList* it=blocks; it; it=it->next )
((StgBlock*)it->data)->UnMap();
-}
+}
void StgModel::Subscribe( void )
@@ -1589,9 +1589,9 @@
double bearing = atan2( dy,dx );
stg_pose_t edgepose;
- bzero(&edgepose,sizeof(edgepose));
edgepose.x = pt1->x;
edgepose.y = pt1->y;
+ edgepose.z = 0;
edgepose.a = bearing;
// shift the edge ray vector by the local change in
pose
@@ -1639,14 +1639,15 @@
}
// convert usec to sec
+ //TODO make this static-ish
double interval = (double)world->interval_sim / 1e6;
// find the change of pose due to our velocity vector
stg_pose_t p;
- bzero(&p,sizeof(p));
- p.x += velocity.x * interval;
- p.y += velocity.y * interval;
- p.a += velocity.a * interval;
+ p.x = velocity.x * interval;
+ p.y = velocity.y * interval;
+ p.z = 0;
+ p.a = velocity.a * interval;
// test to see if this pose change would cause us to crash
StgModel* hitthing = this->TestCollision( p, NULL, NULL );
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit