/
line.cpp
808 lines (688 loc) · 20.7 KB
/
line.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
/** @file line.cpp World map line.
*
* @authors Copyright © 2003-2013 Jaakko Keränen <jaakko.keranen@iki.fi>
* @authors Copyright © 2006-2013 Daniel Swanson <danij@dengine.net>
*
* @par License
* GPL: http://www.gnu.org/licenses/gpl.html
*
* <small>This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version. This program is distributed in the hope that it
* will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
* Public License for more details. You should have received a copy of the GNU
* General Public License along with this program; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA</small>
*/
#include <de/libdeng2.h>
#include <de/Vector>
#include "m_misc.h"
#include "BspLeaf"
#include "Sector"
#include "Segment"
#include "Vertex"
#include "world/line.h"
#ifdef WIN32
# undef max
# undef min
#endif
using namespace de;
/**
* Line side section of which there are three (middle, bottom and top).
*/
struct Section
{
Surface surface;
ddmobj_base_t soundEmitter;
Section(Line::Side &side) : surface(dynamic_cast<MapElement &>(side))
{
zap(soundEmitter);
}
};
DENG2_PIMPL_NOREF(Line::Side)
#ifdef __CLIENT__
, DENG2_OBSERVES(Line, FlagsChange)
#endif
{
struct Sections
{
Section middle;
Section bottom;
Section top;
Sections(Side &side) : middle(side), bottom(side), top(side)
{}
};
/// @ref sdefFlags
int flags;
/// Line owner of the side.
Line &line;
/// Sections.
QScopedPointer<Sections> sections;
/// Attributed sector (not owned).
Sector *sector;
/// Left-most segment on this side of the owning line (not owned).
Segment *leftSegment;
/// Right-most segment on this side of the owning line (not owned).
Segment *rightSegment;
/// Framecount of last time shadows were drawn on this side.
int shadowVisCount;
Instance(Line &line, Sector *sector)
: flags(0),
line(line),
sector(sector),
leftSegment(0),
rightSegment(0),
shadowVisCount(0)
{
#ifdef __CLIENT__
line.audienceForFlagsChange += this;
#endif
}
#ifdef __CLIENT__
void lineFlagsChanged(Line &line, int oldFlags)
{
if(!sections.isNull())
{
if((line.flags() & DDLF_DONTPEGTOP) != (oldFlags & DDLF_DONTPEGTOP))
{
sections->top.surface.markAsNeedingDecorationUpdate();
}
if((line.flags() & DDLF_DONTPEGBOTTOM) != (oldFlags & DDLF_DONTPEGBOTTOM))
{
sections->bottom.surface.markAsNeedingDecorationUpdate();
}
}
}
#endif
/**
* Retrieve the Section associated with @a sectionId.
*/
Section §ionById(int sectionId)
{
if(!sections.isNull())
{
switch(sectionId)
{
case Middle: return sections->middle;
case Bottom: return sections->bottom;
case Top: return sections->top;
}
}
/// @throw Line::InvalidSectionIdError The given section identifier is not valid.
throw Line::InvalidSectionIdError("Line::Side::section", QString("Invalid section id %1").arg(sectionId));
}
};
Line::Side::Side(Line &line, Sector *sector)
: MapElement(DMU_SIDE), d(new Instance(line, sector))
{}
Line &Line::Side::line() const
{
return d->line;
}
int Line::Side::sideId() const
{
return &d->line.front() == this? Line::Front : Line::Back;
}
bool Line::Side::considerOneSided() const
{
// Are we suppressing the back sector?
if(d->flags & SDF_SUPPRESS_BACK_SECTOR) return true;
if(!back().hasSector()) return true;
// Front side of a "one-way window"?
if(!back().hasSections()) return true;
if(!d->line.definesPolyobj())
{
// If no segment is linked then the convex subspace on "this" side must
// have been degenerate (thus no geometry).
if(!d->leftSegment)
return true;
Segment &segment = *d->leftSegment;
if(!segment.hasBack() || !segment.back().hasBspLeaf())
return true;
BspLeaf &backLeaf = segment.back().bspLeaf();
if(!backLeaf.hasSector() || backLeaf.isDegenerate())
return true;
}
return false;
}
bool Line::Side::hasSector() const
{
return d->sector != 0;
}
Sector &Line::Side::sector() const
{
if(d->sector)
{
return *d->sector;
}
/// @throw Line::MissingSectorError Attempted with no sector attributed.
throw Line::MissingSectorError("Line::Side::sector", "No sector is attributed");
}
bool Line::Side::hasSections() const
{
return !d->sections.isNull();
}
void Line::Side::addSections()
{
// Already defined?
if(hasSections()) return;
d->sections.reset(new Instance::Sections(*this));
}
Surface &Line::Side::surface(int sectionId)
{
return d->sectionById(sectionId).surface;
}
Surface const &Line::Side::surface(int sectionId) const
{
return const_cast<Surface const &>(const_cast<Side *>(this)->surface(sectionId));
}
ddmobj_base_t &Line::Side::soundEmitter(int sectionId)
{
return d->sectionById(sectionId).soundEmitter;
}
ddmobj_base_t const &Line::Side::soundEmitter(int sectionId) const
{
return const_cast<ddmobj_base_t const &>(const_cast<Side *>(this)->soundEmitter(sectionId));
}
Segment *Line::Side::leftSegment() const
{
return d->leftSegment;
}
void Line::Side::setLeftSegment(Segment *newSegment)
{
d->leftSegment = newSegment;
}
Segment *Line::Side::rightSegment() const
{
return d->rightSegment;
}
void Line::Side::setRightSegment(Segment *newSegment)
{
d->rightSegment = newSegment;
}
void Line::Side::updateSoundEmitterOrigin(int sectionId)
{
LOG_AS("Line::Side::updateSoundEmitterOrigin");
if(!hasSections()) return;
ddmobj_base_t &emitter = d->sectionById(sectionId).soundEmitter;
Vector2d lineCenter = d->line.center();
emitter.origin[VX] = lineCenter.x;
emitter.origin[VY] = lineCenter.y;
DENG_ASSERT(d->sector != 0);
coord_t const ffloor = d->sector->floor().height();
coord_t const fceil = d->sector->ceiling().height();
/// @todo fixme what if considered one-sided?
switch(sectionId)
{
case Middle:
if(!back().hasSections() || d->line.isSelfReferencing())
{
emitter.origin[VZ] = (ffloor + fceil) / 2;
}
else
{
emitter.origin[VZ] = (de::max(ffloor, back().sector().floor().height()) +
de::min(fceil, back().sector().ceiling().height())) / 2;
}
break;
case Bottom:
if(!back().hasSections() || d->line.isSelfReferencing() ||
back().sector().floor().height() <= ffloor)
{
emitter.origin[VZ] = ffloor;
}
else
{
emitter.origin[VZ] = (de::min(back().sector().floor().height(), fceil) + ffloor) / 2;
}
break;
case Top:
if(!back().hasSections() || d->line.isSelfReferencing() ||
back().sector().ceiling().height() >= fceil)
{
emitter.origin[VZ] = fceil;
}
else
{
emitter.origin[VZ] = (de::max(back().sector().ceiling().height(), ffloor) + fceil) / 2;
}
break;
}
}
void Line::Side::updateAllSoundEmitterOrigins()
{
if(!hasSections()) return;
updateMiddleSoundEmitterOrigin();
updateBottomSoundEmitterOrigin();
updateTopSoundEmitterOrigin();
}
void Line::Side::updateSurfaceNormals()
{
if(!hasSections()) return;
Vector3f normal(( to().origin().y - from().origin().y) / d->line.length(),
(from().origin().x - to().origin().x) / d->line.length(),
0);
// All line side surfaces have the same normals.
middle().setNormal(normal); // will normalize
bottom().setNormal(normal);
top().setNormal(normal);
}
int Line::Side::flags() const
{
return d->flags;
}
void Line::Side::setFlags(int flagsToChange, FlagOp operation)
{
applyFlagOperation(d->flags, flagsToChange, operation);
}
void Line::Side::chooseSurfaceTintColors(int sectionId, Vector3f const **topColor,
Vector3f const **bottomColor) const
{
if(hasSections())
{
switch(sectionId)
{
case Middle:
if(isFlagged(SDF_BLENDMIDTOTOP))
{
*topColor = &top().tintColor();
*bottomColor = &middle().tintColor();
}
else if(isFlagged(SDF_BLENDMIDTOBOTTOM))
{
*topColor = &middle().tintColor();
*bottomColor = &bottom().tintColor();
}
else
{
*topColor = &middle().tintColor();
*bottomColor = 0;
}
return;
case Top:
if(isFlagged(SDF_BLENDTOPTOMID))
{
*topColor = &top().tintColor();
*bottomColor = &middle().tintColor();
}
else
{
*topColor = &top().tintColor();
*bottomColor = 0;
}
return;
case Bottom:
if(isFlagged(SDF_BLENDBOTTOMTOMID))
{
*topColor = &middle().tintColor();
*bottomColor = &bottom().tintColor();
}
else
{
*topColor = &bottom().tintColor();
*bottomColor = 0;
}
return;
}
}
/// @throw Line::InvalidSectionIdError The given section identifier is not valid.
throw Line::InvalidSectionIdError("Line::Side::chooseSurfaceTintColors", QString("Invalid section id %1").arg(sectionId));
}
int Line::Side::shadowVisCount() const
{
return d->shadowVisCount;
}
void Line::Side::setShadowVisCount(int newCount)
{
d->shadowVisCount = newCount;
}
int Line::Side::property(DmuArgs &args) const
{
switch(args.prop)
{
case DMU_SECTOR:
args.setValue(DMT_LINESIDE_SECTOR, &d->sector, 0);
break;
case DMU_LINE: {
Line *line = &d->line;
args.setValue(DMT_LINESIDE_LINE, &line, 0);
break; }
case DMU_FLAGS:
args.setValue(DMT_LINESIDE_FLAGS, &d->flags, 0);
break;
default:
return MapElement::property(args);
}
return false; // Continue iteration.
}
int Line::Side::setProperty(DmuArgs const &args)
{
/**
* @todo fixme: Changing the sector references via the DMU API has been
* disabled. In order to effect such changes at run time we need to separate
* the two different purposes of sector referencing at this level.
*
* A) The playsim uses this for stuff like line specials, to determine
* which map elements are involved when building stairs or opening doors.
*
* B) The engine uses this for geometry construction and more.
*
* At best this will result in strange glitches but more than likely a
* fatal error (or worse) would happen should anyone try to use this...
*/
switch(args.prop)
{
/*case DMU_SECTOR: {
Sector *newSector = sectorPtr();
args.value(DMT_LINESIDE_SECTOR, &d->sector, 0);
break; } */
/*case DMU_LINE: { // Never changeable - throw exception?
Line *line = &_line;
args.value(DMT_LINESIDE_LINE, &line, 0);
break; }*/
case DMU_FLAGS: {
int newFlags;
args.value(DMT_LINESIDE_FLAGS, &newFlags, 0);
setFlags(newFlags, de::ReplaceFlags);
break; }
default:
return MapElement::setProperty(args);
}
return false; // Continue iteration.
}
DENG2_PIMPL(Line)
{
/// Public DDLF_* flags.
int flags;
/// Vertexes (not owned):
Vertex *from;
Vertex *to;
/// Direction vector from -> to.
Vector2d direction;
/// Calculated from the direction vector.
binangle_t angle;
/// Logical line slope (i.e., world angle) classification.
slopetype_t slopeType;
/// Accurate length.
coord_t length;
/// Bounding box encompassing the map space coordinates of both vertexes.
AABoxd aaBox;
/// Logical sides:
Side front;
Side back;
/// The polyobj which this line defines a section of, if any.
Polyobj *polyobj;
/// Used by legacy algorithms to prevent repeated processing.
int validCount;
/// Whether the line has been mapped by each player yet.
bool mapped[DDMAXPLAYERS];
Instance(Public *i, Vertex &from, Vertex &to, int flags,
Sector *frontSector, Sector *backSector)
: Base(i),
flags(flags),
from(&from),
to(&to),
direction(to.origin() - from.origin()),
angle(bamsAtan2(int( direction.y ), int( direction.x ))),
slopeType(M_SlopeTypeXY(direction.x, direction.y)),
length(direction.length()),
front(*i, frontSector),
back(*i, backSector),
polyobj(0),
validCount(0)
{
std::memset(mapped, 0, sizeof(mapped));
}
void notifyFlagsChanged(int oldFlags)
{
DENG2_FOR_PUBLIC_AUDIENCE(FlagsChange, i) i->lineFlagsChanged(self, oldFlags);
}
};
Line::Line(Vertex &from, Vertex &to, int flags, Sector *frontSector, Sector *backSector)
: MapElement(DMU_LINE),
_vo1(0),
_vo2(0),
_bspWindowSector(0),
d(new Instance(this, from, to, flags, frontSector, backSector))
{
updateAABox();
}
int Line::flags() const
{
return d->flags;
}
void Line::setFlags(int flagsToChange, FlagOp operation)
{
int newFlags = d->flags;
applyFlagOperation(newFlags, flagsToChange, operation);
if(d->flags != newFlags)
{
int oldFlags = d->flags;
d->flags = newFlags;
// Notify interested parties of the change.
d->notifyFlagsChanged(oldFlags);
}
}
bool Line::isBspWindow() const
{
return _bspWindowSector != 0;
}
bool Line::definesPolyobj() const
{
return d->polyobj != 0;
}
Polyobj &Line::polyobj() const
{
if(d->polyobj)
{
return *d->polyobj;
}
/// @throw Line::MissingPolyobjError Attempted with no polyobj attributed.
throw Line::MissingPolyobjError("Line::polyobj", "No polyobj is attributed");
}
void Line::setPolyobj(Polyobj *newPolyobj)
{
d->polyobj = newPolyobj;
}
Line::Side &Line::side(int back)
{
return back? d->back : d->front;
}
Line::Side const &Line::side(int back) const
{
return back? d->back : d->front;
}
Vertex &Line::vertex(int to) const
{
DENG_ASSERT((to? d->to : d->from) != 0);
return to? *d->to : *d->from;
}
void Line::replaceVertex(int to, Vertex &newVertex)
{
if(to) d->to = &newVertex;
else d->from = &newVertex;
}
AABoxd const &Line::aaBox() const
{
return d->aaBox;
}
void Line::updateAABox()
{
V2d_InitBoxXY(d->aaBox.arvec2, fromOrigin().x, fromOrigin().y);
V2d_AddToBoxXY(d->aaBox.arvec2, toOrigin().x, toOrigin().y);
}
coord_t Line::length() const
{
return d->length;
}
Vector2d const &Line::direction() const
{
return d->direction;
}
slopetype_t Line::slopeType() const
{
return d->slopeType;
}
void Line::updateSlopeType()
{
d->direction = d->to->origin() - d->from->origin();
d->angle = bamsAtan2(int( d->direction.y ), int( d->direction.x ));
d->slopeType = M_SlopeTypeXY(d->direction.x, d->direction.y);
}
binangle_t Line::angle() const
{
return d->angle;
}
int Line::boxOnSide(AABoxd const &box) const
{
coord_t fromOriginV1[2] = { fromOrigin().x, fromOrigin().y };
coord_t directionV1[2] = { direction().x, direction().y };
return M_BoxOnLineSide(&box, fromOriginV1, directionV1);
}
int Line::boxOnSide_FixedPrecision(AABoxd const &box) const
{
/*
* Apply an offset to both the box and the line to bring everything into
* the 16.16 fixed-point range. We'll use the midpoint of the line as the
* origin, as typically this test is called when a bounding box is
* somewhere in the vicinity of the line. The offset is floored to integers
* so we won't change the discretization of the fractional part into 16-bit
* precision.
*/
coord_t offset[2] = { std::floor(d->from->origin().x + d->direction.x/2.0),
std::floor(d->from->origin().y + d->direction.y/2.0) };
fixed_t boxx[4];
boxx[BOXLEFT] = DBL2FIX(box.minX - offset[VX]);
boxx[BOXRIGHT] = DBL2FIX(box.maxX - offset[VX]);
boxx[BOXBOTTOM] = DBL2FIX(box.minY - offset[VY]);
boxx[BOXTOP] = DBL2FIX(box.maxY - offset[VY]);
fixed_t pos[2] = { DBL2FIX(d->from->origin().x - offset[VX]),
DBL2FIX(d->from->origin().y - offset[VY]) };
fixed_t delta[2] = { DBL2FIX(d->direction.x),
DBL2FIX(d->direction.y) };
return M_BoxOnLineSide_FixedPrecision(boxx, pos, delta);
}
bool Line::isMappedByPlayer(int playerNum) const
{
DENG2_ASSERT(playerNum >= 0 && playerNum < DDMAXPLAYERS);
return d->mapped[playerNum];
}
void Line::markMappedByPlayer(int playerNum, bool yes)
{
DENG2_ASSERT(playerNum >= 0 && playerNum < DDMAXPLAYERS);
d->mapped[playerNum] = yes;
}
int Line::validCount() const
{
return d->validCount;
}
void Line::setValidCount(int newValidCount)
{
d->validCount = newValidCount;
}
int Line::property(DmuArgs &args) const
{
switch(args.prop)
{
case DMU_VERTEX0:
args.setValue(DMT_LINE_V, &d->from, 0);
break;
case DMU_VERTEX1:
args.setValue(DMT_LINE_V, &d->to, 0);
break;
case DMU_DX:
args.setValue(DMT_LINE_DX, &d->direction.x, 0);
break;
case DMU_DY:
args.setValue(DMT_LINE_DY, &d->direction.y, 0);
break;
case DMU_DXY:
args.setValue(DMT_LINE_DX, &d->direction.x, 0);
args.setValue(DMT_LINE_DY, &d->direction.y, 1);
break;
case DMU_LENGTH:
args.setValue(DMT_LINE_LENGTH, &d->length, 0);
break;
case DMU_ANGLE: {
angle_t lineAngle = BANG_TO_ANGLE(d->angle);
args.setValue(DDVT_ANGLE, &lineAngle, 0);
break; }
case DMU_SLOPETYPE:
args.setValue(DMT_LINE_SLOPETYPE, &d->slopeType, 0);
break;
case DMU_FLAGS:
args.setValue(DMT_LINE_FLAGS, &d->flags, 0);
break;
case DMU_FRONT: {
/// @todo Update the games so that sides without sections can be returned.
Line::Side const *frontAdr = hasFrontSections()? &d->front : 0;
args.setValue(DDVT_PTR, &frontAdr, 0);
break; }
case DMU_BACK: {
/// @todo Update the games so that sides without sections can be returned.
Line::Side const *backAdr = hasBackSections()? &d->back : 0;
args.setValue(DDVT_PTR, &backAdr, 0);
break; }
case DMU_BOUNDING_BOX:
if(args.valueType == DDVT_PTR)
{
AABoxd const *aaBoxAdr = &d->aaBox;
args.setValue(DDVT_PTR, &aaBoxAdr, 0);
}
else
{
args.setValue(DMT_LINE_AABOX, &d->aaBox.minX, 0);
args.setValue(DMT_LINE_AABOX, &d->aaBox.maxX, 1);
args.setValue(DMT_LINE_AABOX, &d->aaBox.minY, 2);
args.setValue(DMT_LINE_AABOX, &d->aaBox.maxY, 3);
}
break;
case DMU_VALID_COUNT:
args.setValue(DMT_LINE_VALIDCOUNT, &d->validCount, 0);
break;
default:
return MapElement::property(args);
}
return false; // Continue iteration.
}
int Line::setProperty(DmuArgs const &args)
{
/**
* @todo fixme: Changing the side references via the DMU API has been
* disabled. At best this will result in strange glitches but more than
* likely a fatal error (or worse) would happen should anyone try to use
* this...
*/
switch(args.prop)
{
/*case DMU_FRONT: {
SideDef *newFrontSideDef = frontSideDefPtr();
args.value(DMT_LINE_SIDE, &newFrontSideDef, 0);
d->front._sideDef = newFrontSideDef;
break; }
case DMU_BACK: {
SideDef *newBackSideDef = backSideDefPtr();
args.value(DMT_LINE_SIDE, &newBackSideDef, 0);
d->back._sideDef = newBackSideDef;
break; }*/
case DMU_VALID_COUNT:
args.value(DMT_LINE_VALIDCOUNT, &d->validCount, 0);
break;
case DMU_FLAGS: {
int newFlags;
args.value(DMT_LINE_FLAGS, &newFlags, 0);
setFlags(newFlags, de::ReplaceFlags);
break; }
default:
return MapElement::setProperty(args);
}
return false; // Continue iteration.
}
LineOwner *Line::vertexOwner(int to) const
{
DENG_ASSERT((to? _vo2 : _vo1) != 0);
return to? _vo2 : _vo1;
}