Model Railroad System 2.2.2
|
Bezier Body elements: T, E, S, and C lines are collected. More...
#include <BezierBody.h>
Classes | |
struct | Pos |
Position structure. More... | |
Public Types | |
enum | BezierBodyEltType { None , BezierEnd , BezierStraightSegment , BezierCurvedSegment } |
Element types. More... | |
Public Member Functions | |
BezierBodyElt () | |
Constructor. More... | |
~BezierBodyElt () | |
Destructor. More... | |
BezierBodyEltType | TheType () const |
Type accessor. More... | |
int | GetStraightSegment (float &x1, float &y1, float &x2, float &y2) const |
Fetch straight segment data. More... | |
int | GetCurveSegment (float &r, float &x, float &y, float &a0, float &a1) const |
Fetch curve segment data. More... | |
Static Public Member Functions | |
static void | InitTSegId () |
Segment count initializer. More... | |
static BezierBodyElt * | MakeTrackEnd (TrackBodyElt *tbe) |
Create an endpoint (T or E lines). More... | |
static BezierBodyElt * | MakeStraightSegment (float x1, float y1, float x2, float y2) |
Create a straight segment (S lines). More... | |
static BezierBodyElt * | MakeCurveSegment (float r, float x, float y, float a0, float a1) |
Create a curve segment (C lines). More... | |
Private Attributes | |
BezierBodyEltType | theType |
Element type. More... | |
TrackBodyElt * | theEnd |
Pointer to T or E line data. More... | |
int | segmentId |
Segment index (S or C lines). More... | |
Pos | pos1 |
First position. More... | |
Pos | pos2 |
Second position. More... | |
float | radius |
A radius value. More... | |
float | ang0 |
An angle value. More... | |
float | ang1 |
Another angle value. More... | |
Static Private Attributes | |
static int | segCount |
Counter for S and C segments. More... | |
Friends | |
class | TrackGraph |
class | BezierBody |
Bezier Body elements: T, E, S, and C lines are collected.
others are discarded.
|
inline |
Constructor.
References None, theEnd, and theType.
Referenced by MakeCurveSegment(), MakeStraightSegment(), and MakeTrackEnd().
|
inline |
Destructor.
|
inline |
Fetch curve segment data.
References ang0, ang1, pos1, radius, segmentId, Parsers::BezierBodyElt::Pos::x, and Parsers::BezierBodyElt::Pos::y.
|
inline |
Fetch straight segment data.
References pos1, pos2, segmentId, Parsers::BezierBodyElt::Pos::x, and Parsers::BezierBodyElt::Pos::y.
|
inlinestatic |
Segment count initializer.
References segCount.
|
inlinestatic |
Create a curve segment (C lines).
References ang0, ang1, BezierBodyElt(), BezierCurvedSegment, pos1, radius, segCount, segmentId, theType, Parsers::BezierBodyElt::Pos::x, and Parsers::BezierBodyElt::Pos::y.
|
inlinestatic |
Create a straight segment (S lines).
References BezierBodyElt(), BezierStraightSegment, pos1, pos2, segCount, segmentId, theType, Parsers::BezierBodyElt::Pos::x, and Parsers::BezierBodyElt::Pos::y.
|
inlinestatic |
Create an endpoint (T or E lines).
References BezierBodyElt(), BezierEnd, theEnd, and theType.
|
inline |
Type accessor.
References theType.
|
friend |
|
friend |
|
private |
An angle value.
Referenced by GetCurveSegment(), and MakeCurveSegment().
|
private |
Another angle value.
Referenced by GetCurveSegment(), and MakeCurveSegment().
|
private |
First position.
Referenced by GetCurveSegment(), GetStraightSegment(), MakeCurveSegment(), and MakeStraightSegment().
|
private |
Second position.
Referenced by GetStraightSegment(), and MakeStraightSegment().
|
private |
A radius value.
Referenced by GetCurveSegment(), and MakeCurveSegment().
|
staticprivate |
Counter for S and C segments.
Referenced by InitTSegId(), MakeCurveSegment(), and MakeStraightSegment().
|
private |
Segment index (S or C lines).
Referenced by GetCurveSegment(), GetStraightSegment(), MakeCurveSegment(), and MakeStraightSegment().
|
private |
Pointer to T or E line data.
Referenced by BezierBodyElt(), Parsers::BezierBody::BezierEnds(), Parsers::BezierBody::CleanUpElement(), and MakeTrackEnd().
|
private |
Element type.
Referenced by BezierBodyElt(), Parsers::BezierBody::BezierEnds(), Parsers::BezierBody::BezierSegmentCount(), Parsers::BezierBody::CleanUpElement(), MakeCurveSegment(), MakeStraightSegment(), MakeTrackEnd(), and TheType().