Public Member Functions | |
EdgeArcCircle (std::istream &lineInXfig) | |
EdgeArcCircle (Node *start, Node *middle, Node *end, bool direction=true) | |
EdgeArcCircle (double sX, double sY, double mX, double mY, double eX, double eY) | |
EdgeArcCircle (Node *start, Node *end, const double *center, double radius, double angle0, double deltaAngle, bool direction=true) | |
void | changeMiddle (Node *newMiddle) |
void | dumpInXfigFile (std::ostream &stream, bool direction, int resolution, const Bounds &box) const |
void | update (Node *m) |
double | getAreaOfZone () const |
double | getCurveLength () const |
void | getBarycenter (double *bary) const |
void | getBarycenterOfZone (double *bary) const |
bool | isIn (double characterVal) const |
Node * | buildRepresentantOfMySelf () const |
bool | isLower (double val1, double val2) const |
double | getCharactValue (const Node &node) const |
double | getCharactValueBtw0And1 (const Node &node) const |
double | getDistanceToPoint (const double *pt) const |
bool | isNodeLyingOn (const double *coordOfNode) const |
TypeOfFunction | getTypeOfFunc () const |
void | dynCastFunction (const EdgeLin *&seg, const EdgeArcCircle *&arcSeg) const |
const double * | getCenter () const |
void | getCenter (double *center) const |
bool | doIHaveSameDirectionAs (const Edge &other) const |
void | applySimilarity (double xBary, double yBary, double dimChar) |
void | unApplySimilarity (double xBary, double yBary, double dimChar) |
double | getAngle0 () const |
double | getRadius () const |
double | getAngle () const |
void | tesselate (const int *conn, int offset, double eps, std::vector< int > &newConn, std::vector< double > &addCoo) const |
![]() | |
Edge (Node *start, Node *end, bool direction=true) | |
Edge (double sX, double sY, double eX, double eY) | |
TypeOfEdgeLocInPolygon | getLoc () const |
void | incrRef () const |
bool | decrRef () |
void | initLocs () const |
void | declareOn () const |
void | declareIn () const |
void | declareOut () const |
const Bounds & | getBounds () const |
void | fillXfigStreamForLoc (std::ostream &stream) const |
Node * | getNode (TypeOfLocInEdge where) const |
Node * | getStartNode () const |
Node * | getEndNode () const |
void | setEndNodeWithoutChange (Node *newEnd) |
void | setStartNodeWithoutChange (Node *newStart) |
bool | changeStartNodeWith (Node *otherStartNode) const |
bool | changeStartNodeWithAndKeepTrack (Node *otherStartNode, std::vector< Node * > &track) const |
bool | changeEndNodeWith (Node *otherEndNode) const |
bool | changeEndNodeWithAndKeepTrack (Node *otherEndNode, std::vector< Node * > &track) const |
void | addSubEdgeInVector (Node *start, Node *end, ComposedEdge &vec) const |
void | getNormalVector (double *vectOutput) const |
bool | intersectWith (const Edge *other, MergePoints &commonNode, ComposedEdge &outVal1, ComposedEdge &outVal2) const |
bool | isEqual (const Edge &other) const |
void | sortIdsAbs (const std::vector< INTERP_KERNEL::Node * > &addNodes, const std::map< INTERP_KERNEL::Node *, int > &mapp1, const std::map< INTERP_KERNEL::Node *, int > &mapp2, std::vector< int > &edgesThis) |
Static Public Member Functions | |
static EdgeArcCircle * | BuildFromNodes (Node *start, Node *middle, Node *end) |
static double | GetAbsoluteAngle (const double *vect, double &normVect) |
static double | GetAbsoluteAngleOfNormalizedVect (double ux, double uy) |
static void | GetArcOfCirclePassingThru (const double *start, const double *middle, const double *end, double *center, double &radius, double &angleInRad, double &angleInRad0) |
static double | SafeSqrt (double val) |
static double | SafeAcos (double cosAngle) |
static double | SafeAsin (double sinAngle) |
static bool | IsIn2Pi (double start, double delta, double angleIn) |
static bool | IsAngleNotIn (double start, double delta, double angleIn) |
static double | NormalizeAngle (double angle) |
![]() | |
static EdgeIntersector * | BuildIntersectorWith (const Edge *e1, const Edge *e2) |
static Edge * | BuildFromXfigLine (std::istream &str) |
static Edge * | BuildEdgeFrom (Node *start, Node *end) |
template<TypeOfMod4QuadEdge type> | |
static Edge * | BuildEdgeFrom (Node *start, Node *middle, Node *end) |
static bool | IntersectOverlapped (const Edge *f1, const Edge *f2, EdgeIntersector *intersector, MergePoints &commonNode, ComposedEdge &outValForF1, ComposedEdge &outValForF2) |
static void | Interpolate1DLin (const std::vector< double > &distrib1, const std::vector< double > &distrib2, std::map< int, std::map< int, double > > &result) |
Protected Member Functions | |
void | updateBounds () |
Edge * | buildEdgeLyingOnMe (Node *start, Node *end, bool direction=true) const |
void | fillGlobalInfoAbs (bool direction, const std::map< INTERP_KERNEL::Node *, int > &mapThis, const std::map< INTERP_KERNEL::Node *, int > &mapOther, int offset1, int offset2, double fact, double baryX, double baryY, std::vector< int > &edgesThis, std::vector< double > &addCoo, std::map< INTERP_KERNEL::Node *, int > mapAddCoo) const |
void | fillGlobalInfoAbs2 (const std::map< INTERP_KERNEL::Node *, int > &mapThis, const std::map< INTERP_KERNEL::Node *, int > &mapOther, int offset1, int offset2, double fact, double baryX, double baryY, std::vector< int > &edgesOther, std::vector< double > &addCoo, std::map< INTERP_KERNEL::Node *, int > &mapAddCoo) const |
![]() | |
Edge () | |
virtual | ~Edge () |
Protected Attributes | |
double | _angle |
double | _angle0 |
double | _radius |
double | _center [2] |
![]() | |
unsigned char | _cnt |
TypeOfEdgeLocInPolygon | _loc |
Bounds | _bounds |
Node * | _start |
Node * | _end |
Additional Inherited Members | |
![]() | |
static int | CombineCodes (TypeOfLocInEdge code1, TypeOfLocInEdge code2) |
static bool | Intersect (const Edge *f1, const Edge *f2, EdgeIntersector *intersector, const Bounds *whereToFind, MergePoints &commonNode, ComposedEdge &outValForF1, ComposedEdge &outValForF2) |
static bool | SplitOverlappedEdges (const Edge *e1, const Edge *e2, Node *nS, Node *nE, bool direction, int code, ComposedEdge &outVal1, ComposedEdge &outVal2) |
![]() | |
static const int | OFFSET_FOR_TYPEOFLOCINEDGE = 8 |
EdgeArcCircle::EdgeArcCircle | ( | std::istream & | lineInXfig | ) |
References _angle, _angle0, _center, INTERP_KERNEL::Edge::_end, _radius, INTERP_KERNEL::Edge::_start, INTERP_KERNEL::Node::decrRef(), GetArcOfCirclePassingThru(), and updateBounds().
Referenced by buildEdgeLyingOnMe(), and BuildFromNodes().
References _angle, _angle0, _center, INTERP_KERNEL::Edge::_end, _radius, INTERP_KERNEL::Edge::_start, GetArcOfCirclePassingThru(), and updateBounds().
EdgeArcCircle::EdgeArcCircle | ( | double | sX, |
double | sY, | ||
double | mX, | ||
double | mY, | ||
double | eX, | ||
double | eY | ||
) |
References _angle, _angle0, _center, INTERP_KERNEL::Edge::_end, _radius, INTERP_KERNEL::Edge::_start, GetArcOfCirclePassingThru(), and updateBounds().
EdgeArcCircle::EdgeArcCircle | ( | Node * | start, |
Node * | end, | ||
const double * | center, | ||
double | radius, | ||
double | angle0, | ||
double | deltaAngle, | ||
bool | direction = true |
||
) |
angle0 | in ]-Pi;Pi[ |
deltaAngle | in ]-2.*Pi;2.*Pi[ |
References _center, and updateBounds().
void EdgeArcCircle::changeMiddle | ( | Node * | newMiddle | ) |
for tests
References _angle, _angle0, _center, INTERP_KERNEL::Edge::_end, _radius, INTERP_KERNEL::Edge::_start, GetArcOfCirclePassingThru(), and updateBounds().
|
virtual |
|
virtual |
Implements INTERP_KERNEL::Edge.
References _angle, _angle0, _center, INTERP_KERNEL::Edge::_end, _radius, INTERP_KERNEL::Edge::_start, GetArcOfCirclePassingThru(), and updateBounds().
|
virtual |
This methods computes :
Implements INTERP_KERNEL::Edge.
References _angle, _radius, and INTERP_KERNEL::Edge::_start.
|
virtual |
return the length of arc. Value is always > 0. !
Implements INTERP_KERNEL::Edge.
|
virtual |
Implements INTERP_KERNEL::Edge.
|
virtual |
|
virtual |
Characteristic value used is angle in ]_Pi;Pi[ from axe 0x.
Implements INTERP_KERNEL::Edge.
|
virtual |
Retrieves a point that is owning to this, well placed for IN/OUT detection of this. Typically midlle of this is returned.
Implements INTERP_KERNEL::Edge.
References _angle, _angle0, _center, and _radius.
Referenced by dumpInXfigFile().
|
virtual |
Characteristic value used is angle in ]_Pi;Pi[ from axe 0x. 'val1' and 'val2' have been detected previously as owning to this.
Implements INTERP_KERNEL::Edge.
|
virtual |
For Arc circle the caract value is angle with Ox between -Pi and Pi.
Implements INTERP_KERNEL::Edge.
References _center, _radius, and GetAbsoluteAngleOfNormalizedVect().
|
virtual |
node is expected to lay on 'this'. It returns a characteristic magnitude between 0 and 1.
Implements INTERP_KERNEL::Edge.
References _angle, _angle0, _center, _radius, and GetAbsoluteAngleOfNormalizedVect().
|
virtual |
retrieves the distance to this : The min distance from pt and any point of this.
Implements INTERP_KERNEL::Edge.
References _angle, _angle0, _center, INTERP_KERNEL::Edge::_end, _radius, INTERP_KERNEL::Edge::_start, INTERP_KERNEL::Node::computeAngle(), INTERP_KERNEL::Node::distanceBtw2Pt(), and IsIn2Pi().
|
virtual |
return if node with coords 'coordOfNode' is on this (with precision).
Implements INTERP_KERNEL::Edge.
References _angle, _angle0, _center, _radius, INTERP_KERNEL::Node::areDoubleEquals(), INTERP_KERNEL::Node::computeAngle(), INTERP_KERNEL::Node::distanceBtw2Pt(), and IsIn2Pi().
|
virtual |
Implements INTERP_KERNEL::Edge.
References INTERP_KERNEL::ARC_CIRCLE.
|
virtual |
Implements INTERP_KERNEL::Edge.
const double* INTERP_KERNEL::EdgeArcCircle::getCenter | ( | ) | const |
void INTERP_KERNEL::EdgeArcCircle::getCenter | ( | double * | center | ) | const |
bool INTERP_KERNEL::EdgeArcCircle::doIHaveSameDirectionAs | ( | const Edge & | other | ) | const |
|
virtual |
apply a similiraty transformation on 'this'
See Node::applySimilarity to see signification of params.
Reimplemented from INTERP_KERNEL::Edge.
|
virtual |
apply the inverse similiraty transformation on 'this'
Reimplemented from INTERP_KERNEL::Edge.
double INTERP_KERNEL::EdgeArcCircle::getAngle0 | ( | ) | const |
double INTERP_KERNEL::EdgeArcCircle::getRadius | ( | ) | const |
double INTERP_KERNEL::EdgeArcCircle::getAngle | ( | ) | const |
Referenced by INTERP_KERNEL::ArcCArcCIntersector::haveTheySameDirection().
void EdgeArcCircle::tesselate | ( | const int * | conn, |
int | offset, | ||
double | eps, | ||
std::vector< int > & | newConn, | ||
std::vector< double > & | addCoo | ||
) | const |
'eps' is expected to be > 0. 'conn' is of size 3. conn[0] is start id, conn[1] is end id and conn[2] is middle id. 'offset' is typically the number of nodes already existing in global 2D curve mesh. Additionnal coords 'addCoo' ids will be put after the already existing.
References _angle, _angle0, _center, _radius, and INTERP_KERNEL::NORM_POLYL.
Referenced by ParaMEDMEM::MEDCouplingUMesh::tessellate2DCurve().
|
static |
References INTERP_KERNEL::SegSegIntersector::areColinears(), INTERP_KERNEL::Node::decrRef(), and EdgeArcCircle().
Referenced by ParaMEDMEM::MEDCouplingUMesh::tessellate2DCurve().
|
static |
Given an NON normalized vector 'vect', returns its norm 'normVect' and its angle in ]-Pi,Pi] relative to Ox axe.
References GetAbsoluteAngleOfNormalizedVect(), and INTERP_KERNEL::Node::norm().
|
static |
Given a normalized vector defined by (ux,uy) returns its angle in ]-Pi;Pi]. So before using this method ux*ux+uy*uy should as much as possible close to 1. This methods is quite time consuming in order to keep as much as possible precision. It is NOT ALWAYS possible to do that only in one call of acos. Sometimes call to asin is necessary due to imperfection of acos near 0. and Pi (cos x ~ 1-x*x/2.)
References SafeAcos(), and SafeAsin().
Referenced by buildEdgeLyingOnMe(), INTERP_KERNEL::Node::computeAngle(), GetAbsoluteAngle(), GetArcOfCirclePassingThru(), getCharactValue(), getCharactValueBtw0And1(), and INTERP_KERNEL::ArcCArcCIntersector::getIntersectionsCharacteristicVal().
|
static |
References GetAbsoluteAngleOfNormalizedVect(), IsAngleNotIn(), and SafeSqrt().
Referenced by changeMiddle(), EdgeArcCircle(), and update().
|
static |
To avoid in aggressive optimizations nan.
Referenced by GetArcOfCirclePassingThru(), INTERP_KERNEL::ArcCArcCIntersector::getIntersectionsCharacteristicVal(), and INTERP_KERNEL::ArcCSegIntersector::getIntersectionsCharacteristicVal().
|
static |
Referenced by INTERP_KERNEL::Node::computeSlope(), and GetAbsoluteAngleOfNormalizedVect().
|
static |
Referenced by GetAbsoluteAngleOfNormalizedVect().
|
static |
start | and |
angleIn | in ]-Pi;Pi] and |
delta | in ]-2*Pi,2*Pi[ |
Idem IsAngleNotIn except that here 'start' in ]-Pi;Pi[ and delta in ]-2*Pi;2Pi[.
angleIn | in ]-Pi;Pi[. |
Referenced by getDistanceToPoint(), INTERP_KERNEL::ArcCArcCIntersector::getPlacements(), isIn(), isNodeLyingOn(), and updateBounds().
|
static |
'delta' 'start' in ]-Pi;Pi[
Given the arc 'a' defined by 'start' angle and a 'delta' [-Pi;Pi] states for the angle 'angleIn' [-Pi;Pi] if it owns or not 'a'.
Referenced by GetArcOfCirclePassingThru().
|
static |
for an angle 'angle' in ]-3*Pi;3*Pi[ returns angle in ]-Pi;Pi[
Referenced by INTERP_KERNEL::ArcCArcCIntersector::getIntersectionsCharacteristicVal().
|
protected |
References _angle, _angle0, INTERP_KERNEL::Edge::_bounds, _center, INTERP_KERNEL::Edge::_end, _radius, INTERP_KERNEL::Edge::_start, and IsIn2Pi().
Referenced by changeMiddle(), EdgeArcCircle(), and update().
|
protectedvirtual |
Implements INTERP_KERNEL::Edge.
References _angle, _center, _radius, EdgeArcCircle(), and GetAbsoluteAngleOfNormalizedVect().
|
protectedvirtual |
Implements INTERP_KERNEL::Edge.
References INTERP_KERNEL::Edge::_end, INTERP_KERNEL::Edge::_start, and INTERP_KERNEL::Node::fillGlobalInfoAbs().
|
protectedvirtual |
Implements INTERP_KERNEL::Edge.
References INTERP_KERNEL::Edge::_end, INTERP_KERNEL::Edge::_start, and INTERP_KERNEL::Node::fillGlobalInfoAbs2().
|
protected |
Value between -2Pi and 2Pi.
Referenced by buildEdgeLyingOnMe(), buildRepresentantOfMySelf(), changeMiddle(), dumpInXfigFile(), EdgeArcCircle(), getAreaOfZone(), getBarycenter(), getBarycenterOfZone(), getCharactValueBtw0And1(), getCurveLength(), getDistanceToPoint(), isIn(), isLower(), isNodeLyingOn(), tesselate(), update(), and updateBounds().
|
protected |
Value between -Pi and Pi.
Referenced by buildRepresentantOfMySelf(), changeMiddle(), EdgeArcCircle(), getBarycenter(), getBarycenterOfZone(), getCharactValueBtw0And1(), getDistanceToPoint(), isIn(), isLower(), isNodeLyingOn(), tesselate(), update(), and updateBounds().
|
protected |
Referenced by applySimilarity(), buildEdgeLyingOnMe(), buildRepresentantOfMySelf(), changeMiddle(), EdgeArcCircle(), getAreaOfZone(), getBarycenter(), getBarycenterOfZone(), getCharactValue(), getCharactValueBtw0And1(), getCurveLength(), getDistanceToPoint(), isLower(), isNodeLyingOn(), tesselate(), unApplySimilarity(), update(), and updateBounds().
|
protected |
Referenced by applySimilarity(), buildEdgeLyingOnMe(), buildRepresentantOfMySelf(), changeMiddle(), dumpInXfigFile(), EdgeArcCircle(), getBarycenter(), getBarycenterOfZone(), getCharactValue(), getCharactValueBtw0And1(), getDistanceToPoint(), isNodeLyingOn(), tesselate(), unApplySimilarity(), update(), and updateBounds().