xsi/algorithm/LineIntersector.xsi

filter: Statementstmt 91.6% 33 / 36 Branchbran 52.3% 44 / 84 Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 64.1% 77 / 120 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« xsi/LineSegment.xsi ↑ Summary xsi/Envelope.xsi »
1 MODULE = Geo::Geos PACKAGE = Geo::Geos::Algorithm::LineIntersector
2 PROTOTYPES: DISABLE
3  
4 Sv new(SV*, SV* precisionModel = NULL) {
5 12 ▶ PrecisionModel* pm = precisionModel ? xs::in<PrecisionModel*>(precisionModel) : NULL;
Branch: 2 branches
BranchTrueFalseTotal
PrecisionModel* pm = precisionModel ? xs::in<PrecisionModel*>(precisionModel) : NULL; 10 2 12
PrecisionModel* pm = precisionModel ? xs::in<PrecisionModel*>(precisionModel) : NULL; 10 0 10
6 12 ▶ Object wrapped = xs::out<LineIntersector*>(new LineIntersector(pm));
Branch: 5 branches
BranchTrueFalseTotal
Object wrapped = xs::out<LineIntersector*>(new LineIntersector(pm)); 12 0 12
Object wrapped = xs::out<LineIntersector*>(new LineIntersector(pm)); 12 0 12
Object wrapped = xs::out<LineIntersector*>(new LineIntersector(pm)); 12 0 12
Object wrapped = xs::out<LineIntersector*>(new LineIntersector(pm)); 12 0 12
Object wrapped = xs::out<LineIntersector*>(new LineIntersector(pm)); 0 0 0
7 12 ▶ if (pm) wrapped.payload_attach(precisionModel, &payload_marker);
Branch: 2 branches
BranchTrueFalseTotal
if (pm) wrapped.payload_attach(precisionModel, &payload_marker); 10 2 12
if (pm) wrapped.payload_attach(precisionModel, &payload_marker); 10 0 10
8 12 ▶ RETVAL = wrapped.ref();
Branch: 2 branches
BranchTrueFalseTotal
RETVAL = wrapped.ref(); 12 0 12
RETVAL = wrapped.ref(); 12 0 12
9 }
10  
11 1 ▶double interpolateZ(Coordinate *p, Coordinate *p0, Coordinate *p1) { RETVAL = LineIntersector::interpolateZ(*p, *p0, *p1); }
Branch: 1 branch
BranchTrueFalseTotal
double interpolateZ(Coordinate *p, Coordinate *p0, Coordinate *p1) { RETVAL = LineIntersector::interpolateZ(*p, *p0, *p1); } 0 1 1
12  
13 1 ▶double computeEdgeDistance(Coordinate *p, Coordinate *p0, Coordinate *p1) { RETVAL = LineIntersector::computeEdgeDistance(*p, *p0, *p1); }
Branch: 1 branch
BranchTrueFalseTotal
double computeEdgeDistance(Coordinate *p, Coordinate *p0, Coordinate *p1) { RETVAL = LineIntersector::computeEdgeDistance(*p, *p0, *p1); } 0 1 1
14  
15 1 ▶bool isSameSignAndNonZero(double a, double b) { RETVAL = LineIntersector::isSameSignAndNonZero(a, b); }
Branch: 1 branch
BranchTrueFalseTotal
bool isSameSignAndNonZero(double a, double b) { RETVAL = LineIntersector::isSameSignAndNonZero(a, b); } 1 0 1
16  
17 bool hasIntersection(Object arg0, Coordinate *p1 = NULL, Coordinate *p2 = NULL) {
18 6 ▶ if (p1 == NULL) RETVAL = xs::in<LineIntersector&>(arg0).hasIntersection();
Branch: 2 branches
BranchTrueFalseTotal
if (p1 == NULL) RETVAL = xs::in<LineIntersector&>(arg0).hasIntersection(); 5 1 6
if (p1 == NULL) RETVAL = xs::in<LineIntersector&>(arg0).hasIntersection(); 5 0 5
19 else {
20 1 ▶ auto& p0 = xs::in<Coordinate&>(arg0);
Branch: 1 branch
BranchTrueFalseTotal
auto& p0 = xs::in<Coordinate&>(arg0); 1 0 1
21 1 ▶ if(!p1) throw("undef not allowed");
Branch: 1 branch
BranchTrueFalseTotal
if(!p1) throw("undef not allowed"); 0 1 1
22 1 ▶ if(!p2) throw("undef not allowed");
Branch: 1 branch
BranchTrueFalseTotal
if(!p2) throw("undef not allowed"); 0 1 1
23 1 ▶ RETVAL = LineIntersector::hasIntersection(p0, *p1, *p2);
Branch: 1 branch
BranchTrueFalseTotal
RETVAL = LineIntersector::hasIntersection(p0, *p1, *p2); 1 0 1
24 }
25 }
26  
27  
28 bool LineIntersector::isInteriorIntersection (SV* arg = NULL) {
29 1 ▶ if(!arg) RETVAL = THIS->isInteriorIntersection();
Branch: 1 branch
BranchTrueFalseTotal
if(!arg) RETVAL = THIS->isInteriorIntersection(); 1 0 1
30 else {
31 0 int inputLineIndex = SvIV(arg);
32 0 RETVAL = THIS->isInteriorIntersection(inputLineIndex);
33 }
34 }
35  
36 void LineIntersector::setPrecisionModel (SV* pm) {
37 3 ▶ PrecisionModel& newPM = xs::in<PrecisionModel&>(pm);
Branch: 1 branch
BranchTrueFalseTotal
PrecisionModel& newPM = xs::in<PrecisionModel&>(pm); 3 0 3
38 3 THIS->setPrecisionModel(&newPM);
39 3 ▶ Object me {ST(0)};
Branch: 1 branch
BranchTrueFalseTotal
Object me {ST(0)}; 3 0 3
40 3 ▶ if (me.payload_exists(&payload_marker)) {
Branch: 1 branch
BranchTrueFalseTotal
if (me.payload_exists(&payload_marker)) { 1 2 3
41 1 ▶ me.payload_detach(&payload_marker);
Branch: 1 branch
BranchTrueFalseTotal
me.payload_detach(&payload_marker); 1 0 1
42 }
43 3 ▶ me.payload_attach(SvRV(pm), &payload_marker);
Branch: 1 branch
BranchTrueFalseTotal
me.payload_attach(SvRV(pm), &payload_marker); 3 0 3
44 }
45  
46 void LineIntersector::computeIntersection (Coordinate& p1, Coordinate& p2, Coordinate& p3, SV* p4arg = NULL) {
47 5 ▶ if (!p4arg) THIS->computeIntersection(p1, p2, p3);
Branch: 1 branch
BranchTrueFalseTotal
if (!p4arg) THIS->computeIntersection(p1, p2, p3); 1 4 5
48 else {
49 4 auto& p4 = xs::in<Coordinate&>(p4arg);
50 4 THIS->computeIntersection(p1, p2, p3, p4);
51 }
52 }
53  
54 1 ▶std::string LineIntersector::toString(...)
Branch: 1 branch
BranchTrueFalseTotal
std::string LineIntersector::toString(...) 1 0 1
55  
56 1 int LineIntersector::getIntersectionNum ()
57  
58 1 bool LineIntersector::isProper ()
59  
60 1 ▶int LineIntersector::getIndexAlongSegment (int segmentIndex, int intIndex)
Branch: 1 branch
BranchTrueFalseTotal
int LineIntersector::getIndexAlongSegment (int segmentIndex, int intIndex) 0 1 1
61  
62 4 ▶double LineIntersector::getEdgeDistance (int geomIndex, int intIndex)
Branch: 1 branch
BranchTrueFalseTotal
double LineIntersector::getEdgeDistance (int geomIndex, int intIndex) 0 4 4
63  
64 Coordinate* LineIntersector::getIntersectionAlongSegment (int segmentIndex, int intIndex) {
65 1 RETVAL = new Coordinate(THIS->getIntersectionAlongSegment(segmentIndex, intIndex));
66 1 ▶}
Branch: 4 branches
BranchTrueFalseTotal
} 1 0 1
} 1 0 1
} 1 0 1
} 0 0 0
67  
68 0 ▶int CLONE_SKIP (...) { PERL_UNUSED_VAR(items); RETVAL = 1; }
Branch: 1 branch
BranchTrueFalseTotal
int CLONE_SKIP (...) { PERL_UNUSED_VAR(items); RETVAL = 1; } 0 0 0
69  
70 BOOT {
71 46 ▶ auto this_stash = Stash(__PACKAGE__);
Branch: 1 branch
BranchTrueFalseTotal
auto this_stash = Stash(__PACKAGE__); 46 0 46
72 184 ▶ xs::exp::create_constants(this_stash, {
Branch: 4 branches
BranchTrueFalseTotal
xs::exp::create_constants(this_stash, { 46 0 46
xs::exp::create_constants(this_stash, { 46 0 46
xs::exp::create_constants(this_stash, { 138 46 184
xs::exp::create_constants(this_stash, { 0 0 0
73 {"TYPE_NO_INTERSECTION", LineIntersector::NO_INTERSECTION},
74 {"TYPE_POINT_INTERSECTION", LineIntersector::POINT_INTERSECTION},
75 {"TYPE_COLLINEAR_INTERSECTION", LineIntersector::COLLINEAR_INTERSECTION}
76 });
77 46 ▶ xs::exp::autoexport(this_stash);
Branch: 2 branches
BranchTrueFalseTotal
xs::exp::autoexport(this_stash); 46 0 46
xs::exp::autoexport(this_stash); 46 0 46
78 46 }
« xsi/LineSegment.xsi ↑ Summary xsi/Envelope.xsi »