21 class gsSolidHalfEdge :
public gsSolidElement<T>
24 typedef gsSolidElement<T> SolidElement;
25 typedef typename SolidElement::scalar_t scalar_t;
26 typedef gsSolidHeVertex<T> Vertex;
27 typedef gsSolidHalfEdge<T> HalfEdge;
28 typedef gsSolidHalfFace<T> HalfFace;
48 int loopN()
const {
return loopNum;}
49 Vertex* target()
const {
return mate->source;}
52 gsSolidHalfEdge() : SolidElement() { eps = 2.220446049250313e-16; }
55 gsSolidHalfEdge(Vertex* v, HalfFace* f,
int i,
bool conv)
56 : SolidElement(i), source(v), face(f), is_convex(conv)
63 eps = 2.220446049250313e-16;
66 gsSolidHalfEdge(Vertex* v, HalfFace* f,
int i,
bool conv,
int loopN) :
67 SolidElement(i), source(v), face(f), is_convex(conv), loopNum(loopN)
72 eps = 2.220446049250313e-16;
76 explicit gsSolidHalfEdge(
int i) : SolidElement(i) { }
79 bool isEquiv(HalfEdge* other, T tolFactor=1e-8)
const
82 T tol = tolFactor*eps;
83 return source->isEquiv(other->source, tol) && target()->isEquiv(other->target(), tol);
86 virtual ~gsSolidHalfEdge() { }
89 virtual std::ostream &print(std::ostream &os)
const {
90 os<<
"\ngsSolidHalfEdge number: " << this->getId() <<
" source:" << *source <<
" target: " << *target() << std::endl;
96 int trimLoopInd(T tolerance){
GISMO_UNUSED(tolerance);
return this->face->indexOfEdge(
this); }
100 HalfEdge* moveAlongEdge(
int n = 1)
102 HalfEdge* edge =
this;
103 for (
int times = 0; times < n; times++)
118 std::ostream &operator<<(std::ostream &os, const gsSolidHalfEdge<T>& me)
119 {
return me.print(os); }
122 int gsSolidHalfEdge<T>::trimLoopInd()
124 return trimLoopInd(eps);
Provides gsSolidElement class - interface for an element (vertex, edge or face) of a solid...
#define GISMO_UNUSED(x)
Definition: gsDebug.h:112
EIGEN_STRONG_INLINE abs_expr< E > abs(const E &u)
Absolute value.
Definition: gsExpressions.h:4488