Revision: 8513
http://playerstage.svn.sourceforge.net/playerstage/?rev=8513&view=rev
Author: hsujohnhsu
Date: 2010-01-16 04:06:01 +0000 (Sat, 16 Jan 2010)
Log Message:
-----------
Mesh.cc: fix stl loading bug, proper way to make sure floats are stuffed into
visual mesh vector.
Modified Paths:
--------------
code/gazebo/trunk/server/Mesh.cc
Modified: code/gazebo/trunk/server/Mesh.cc
===================================================================
--- code/gazebo/trunk/server/Mesh.cc 2010-01-15 09:51:24 UTC (rev 8512)
+++ code/gazebo/trunk/server/Mesh.cc 2010-01-16 04:06:01 UTC (rev 8513)
@@ -294,13 +294,6 @@
/// Add a vertex to the mesh
void SubMesh::AddVertex( Vector3 v )
{
- if (fabs(v.x) < 0.00001)
- v.x = 0.0;
- if (fabs(v.y) < 0.00001)
- v.y = 0.0;
- if (fabs(v.z) < 0.00001)
- v.z = 0.0;
-
this->vertices.push_back( v );
}
@@ -315,15 +308,7 @@
/// Add a normal to the mesh
void SubMesh::AddNormal( Vector3 n )
{
- if (fabs(n.x) < 0.00001)
- n.x = 0.0;
- if (fabs(n.y) < 0.00001)
- n.y = 0.0;
- if (fabs(n.z) < 0.00001)
- n.z = 0.0;
-
-
- this->normals.push_back(n);
+ this->normals.push_back( n );
}
////////////////////////////////////////////////////////////////////////////////
@@ -556,9 +541,9 @@
for (viter = this->vertices.begin(), i = 0; viter != this->vertices.end();
viter++)
{
- (*vertArr)[i++] = (*viter).x;
- (*vertArr)[i++] = (*viter).y;
- (*vertArr)[i++] = (*viter).z;
+ (*vertArr)[i++] = (float)(*viter).x;
+ (*vertArr)[i++] = (float)(*viter).y;
+ (*vertArr)[i++] = (float)(*viter).z;
}
for (iiter = this->indices.begin(), i=0;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit