#include "TxsVertex.h" #include "TxsFace.h" using namespace TXS; void TxsVertex::calcAvgNormal() { this->avgNormal.Set(0,0,0); list::iterator fit; for(fit = this->incidentFaces.begin(); fit != this->incidentFaces.end(); ++fit) { TxsFace* f = *fit; this->avgNormal += f->getNormal(); } BOOL normOk = this->avgNormal.Normalize(); if(!normOk) { __ERROR__("could not normalize avg normal: " << this->avgNormal); } }