Text archives Help
- From: bigler@sci.utah.edu
- To: manta@sci.utah.edu
- Subject: [MANTA] r1545 - trunk/Model/Groups
- Date: Tue, 24 Jul 2007 15:15:20 -0600 (MDT)
Author: bigler
Date: Tue Jul 24 15:15:19 2007
New Revision: 1545
Modified:
trunk/Model/Groups/Mesh.cc
Log:
Model/Groups/Mesh.cc
You can add objects via add(Object*) now. It attempts to
dynamically cast the pointer to make sure it is something we can
deal with before calling addTriangle on it.
Comment out unused original_size variable.
Modified: trunk/Model/Groups/Mesh.cc
==============================================================================
--- trunk/Model/Groups/Mesh.cc (original)
+++ trunk/Model/Groups/Mesh.cc Tue Jul 24 15:15:19 2007
@@ -131,8 +131,11 @@
void Mesh::add(Object* obj)
{
- //I don't think this should be allowed.
- throw SCIRun::InternalError(string("Illegal call to ") + __func__,
__FILE__, __LINE__);
+ WaldTriangle* waldtri = dynamic_cast<WaldTriangle*>(obj);
+ if (waldtri)
+ addTriangle(obj);
+ else
+ throw SCIRun::InternalError(string("Illegal type of object added to mesh
class") + __func__, __FILE__, __LINE__);
}
void Mesh::set( int i, Object *obj )
@@ -246,7 +249,7 @@
void Mesh::removeDegenerateTriangles()
{
//return;
- size_t original_size = vertex_indices.size();
+ // size_t original_size = vertex_indices.size();
for (size_t i=0; i < vertex_indices.size(); i+=3) {
const int index0 = vertex_indices[i+0];
const int index1 = vertex_indices[i+1];
- [MANTA] r1545 - trunk/Model/Groups, bigler, 07/24/2007
Archive powered by MHonArc 2.6.16.