#include "vtkModeloDeformable.h" #include "vtkObjectFactory.h" vtkCxxRevisionMacro(vtkModeloDeformable, "$Revision: 0.1 $"); vtkStandardNewMacro(vtkModeloDeformable); vtkModeloDeformable::~vtkModeloDeformable(){ if(idVerticesMovidos) delete[] idVerticesMovidos; if(vertices) delete[] vertices; if (caras) delete[] caras; }; vtkIdType vtkModeloDeformable::GetnumeroVertices() { return this->numeroVertices; }; vtkIdType vtkModeloDeformable::GetnumeroCaras() { return (vtkIdType)this->numeroCaras; }; vtkIdType vtkModeloDeformable::GetnumVerticesMovidos() { return (vtkIdType)this->numVerticesMovidos; }; float* vtkModeloDeformable::Getvertice(vtkIdType indice) { float *aux =new float[3]; aux[0]= this->vertices[indice*3+0]; aux[1]= this->vertices[indice*3+1]; aux[2]= this->vertices[indice*3+2]; return aux; } void vtkModeloDeformable::PrintSelf(ostream& os, vtkIndent indent) { this->Superclass::PrintSelf(os,indent); os << indent << "Numero de Vertices Movidos: " << this->GetnumVerticesMovidos() << endl; }