27 #include "dart-vertex.hh"
32 using namespace GMap3d;
38 FParameterGMapV (AParameterGMapV),
39 FParameterNormalVector(AParameterNormalVector),
40 FParameterSelection (AParameterSelection)
42 assert(FParameterGMapV!=NULL);
43 assert(FParameterNormalVector!=NULL && FParameterSelection!=NULL);
53 FParameterGMapV (APrecompile.FParameterGMapV),
55 (APrecompile.FParameterNormalVector->copy())),
56 FParameterSelection (APrecompile.FParameterSelection)
58 assert(FParameterGMapV!=NULL);
59 assert(FParameterNormalVector!=NULL && FParameterSelection!=NULL);
81 setGMapVertex(static_cast<CParameterGMapVertex *>(AParameter));
87 setSelection(static_cast<CParameterSelection *>(AParameter));
93 {
return FParameterNormalVector; }
97 assert(AParameterGMapV != NULL);
100 FParameterGMapV = AParameterGMapV;
107 assert(ANormalVector != NULL);
110 FParameterNormalVector = ANormalVector;
116 assert(ASelection != NULL);
119 FParameterSelection = ASelection;
126 void CPrecompileNormalVector::drawNormal(CDart* ADart,
bool ATwoSides)
128 CVertex bary = FParameterGMapV->
getMap()->barycenter(ADart, ORBIT_01);
129 CVertex normal = FParameterGMapV->
getMap()->faceNormalVector(ADart);
133 CVertex p1 = bary + k*normal;
134 CVertex p2 = ATwoSides ? bary-k*normal : bary;
147 int treated = FParameterGMapV->
getMap()->getNewMark();
149 for (CDynamicCoverageAll it(FParameterGMapV->
getMap()); it.cont(); ++it)
150 if (! FParameterGMapV->
getMap()->isMarked(*it, treated))
153 for (CDynamicCoverage01 face(FParameterGMapV->
getMap(), *it); face.cont(); ++face)
155 if (! FParameterGMapV->
getMap()->isFree0(*face))
158 drawNormal(*face,
true);
161 FParameterGMapV->
getMap()->setMark(*face, treated);
162 FParameterGMapV->
getMap()->setMark(FParameterGMapV->
getMap()->alpha3(*face), treated);
166 drawNormal(*it,
false);
169 FParameterGMapV->
getMap()->negateMaskMark(treated);
170 FParameterGMapV->
getMap()->freeMark(treated);
177 drawNormal(last,
false);