12 #define DEFAULT_SPIRAL_MAX_STROKE_LENGTH 10000.0
73 static const int TransitionType_Unknown = 0;
74 static const int TransitionType_Clothoid = 10;
75 static const int TransitionType_Bloss = 11;
76 static const int TransitionType_Biquadratic = 12;
77 static const int TransitionType_Cosine = 13;
78 static const int TransitionType_Sine = 14;
79 static const int TransitionType_Viennese = 20;
80 static const int TransitionType_WeightedViennese = 21;
82 static const int TransitionType_FirstDirectEvaluate = 50;
83 static const int TransitionType_NewSouthWales = 50;
84 static const int TransitionType_Czech = 51;
85 static const int TransitionType_Australian = 52;
86 static const int TransitionType_Italian = 53;
87 static const int TransitionType_PolishCubic = 54;
88 static const int TransitionType_AremaCubic = 55;
89 static const int TransitionType_MXCubic = 56;
90 static const int TransitionType_MXCubicArc = 57;
93 public:
static DSpiral2dBaseP Create (
int transitionType);
96 public:
static int StringToTransitionType (
Utf8CP name);
99 public:
static bool TransitionTypeToString (
int type,
Utf8StringR string);
101 public:
static DSpiral2dBaseP CreateBearingCurvatureBearingCurvature
105 double startCurvature,
111 public:
static DSpiral2dBaseP CreateBearingCurvatureLengthCurvature
115 double startCurvature,
128 static double DefaultStrokeAngle ();
138 bool SetBearingAndCurvatureLimits
155 bool SetBearingCurvatureLengthCurvature
169 bool SetBearingCurvatureLengthBearing
178 void CopyBaseParameters (DSpiral2dBaseCP pSource);
180 double DistanceToFraction (
double distance)
const;
182 double FractionToDistance (
double fraction)
const;
196 double DistanceToGlobalAngle (
double distance)
const;
200 bool ScaleInPlace (
double s);
207 GEOMAPI_VIRTUAL double DistanceToLocalAngle (
double distance)
const = 0;
209 GEOMAPI_VIRTUAL double DistanceToCurvature (
double distance)
const = 0;
211 GEOMAPI_VIRTUAL double DistanceToCurvatureDerivative (
double distance)
const = 0;
217 #define DECLARE_DSPIRAL2DBASE_OVERRIDES \
218 double DistanceToLocalAngle (double distance) const override;\
219 double DistanceToCurvature (double distance) const override;\
220 DSpiral2dBaseP Clone () const override;\
221 double DistanceToCurvatureDerivative (double distance) const override;\
222 int GetTransitionTypeCode () const override;
224 #define DECLARE_DSPIRAL2DBASE_DIRECT_EVALUATION_MIDLEVEL_OVERRIDES \
225 double DistanceToLocalAngle (double distance) const override;\
226 double DistanceToCurvature (double distance) const override;\
227 double DistanceToCurvatureDerivative (double distance) const override;
229 #define DECLARE_DSPIRAL2DBASE_DIRECT_EVALUATION_OVERRIDES \
230 DSpiral2dBaseP Clone () const override;\
231 int GetTransitionTypeCode () const override;
282 double startFraction,
306 double startFraction,
333 double startFraction,
358 double startFraction,
363 double maxStrokeLength
382 double startFraction,
403 static bool StrokeToAnnouncer
406 double startFraction,
409 AnnounceDoubleDPoint2dR F,
424 static size_t GetIntervalCount
427 double startFraction,
445 static bool ClosestPoint
448 double startFraction,
453 double& spiralFraction,
477 static bool LineSpiralArcSpiralLineTransition
511 static bool SymmetricLineSpiralSpiralLineTransition
522 double &junctionRadius
539 static bool SymmetricPointShoulderTargetTransition
600 static int ArcSpiralLineSpiralArcTransition
723 virtual bool EvaluateAtDistance
725 double distanceAlong,
736 static void ApplyCCWRotation (
761 double distanceAlong,
769 static bool EvaluateAtDistanceInStandardOrientation
796 double distanceAlong,
803 static bool EvaluateAtDistanceInStandardOrientation
830 double distanceAlong,
837 static bool EvaluateAtDistanceInStandardOrientation
double fractionB
Definition: DSpiral2dBase.h:865
Definition: DSpiral2dBase.h:661
Definition: DSpiral2dBase.h:672
double mLength
Definition: DSpiral2dBase.h:125
struct DSpiral2dBase const * DSpiral2dBaseCP
Definition: DSpiral2dBase.h:14
RotMatrix ActiveFractionToDerivatives(double fraction) const
return xyz first, second, third derivatives as columns, scaled for active interval.
struct DVec2d const & DVec2dCR
Definition: msgeomstructs_typedefs.h:90
Definition: DSpiral2dBase.h:652
double SpiralLengthActiveInterval() const
absolute length of the partial spiral (between start and end fractions)
DPoint3d ActiveFractionToPoint(double fraction) const
#define END_BENTLEY_GEOMETRY_NAMESPACE
Definition: Bentley.r.h:30
Abstract interface for multi-variate function of a single variable.
Definition: BSIQuadrature.h:18
DSpiral2dBaseP spiral
Definition: DSpiral2dBase.h:862
DRay3d FractionToPointAndUnitTangent(double fraction) const
void EvaluateVectorIntegrand(double distance, double *pF) override
BSIVectorIntegrand query function.
DSpiral2dPlacement * DSpiral2dPlacementP
Definition: DSpiral2dBase.h:850
struct RotMatrix const & RotMatrixCR
Definition: msgeomstructs_typedefs.h:135
Transform frame
Definition: DSpiral2dBase.h:863
DVec3d DisplacementBetweenFractions(double f0, double f1) const
return the displacement between fractions. Having a close f0 is much faster than FractionToPoint with...
double MappedSpiralLengthActiveInterval(RotMatrixCR matrix) const
Length of the spiral after mapping by matrix*frame.matrix.
struct DVec2d * DVec2dP
Definition: msgeomstructs_typedefs.h:90
Transform ActiveFractionToFrenetFrame(double fraction) const
struct DSpiral2dBase * DSpiral2dBaseP
Definition: DSpiral2dBase.h:13
struct AnnounceDoubleDPoint2d & AnnounceDoubleDPoint2dR
Definition: DSpiral2dBase.h:24
struct DPoint2d & DPoint2dR
Definition: msgeomstructs_typedefs.h:78
Base class for virtuals that implement spiral curve variants.
Definition: DSpiral2dBase.h:70
Definition: DSpiral2dBase.h:642
struct DPoint3d * DPoint3dP
Definition: msgeomstructs_typedefs.h:79
GEOMAPI_VIRTUAL void Announce(double fraction, DVec2dCR xy)=0
struct DEllipse3d & DEllipse3dR
Definition: msgeomstructs_typedefs.h:114
double mTheta1
Definition: DSpiral2dBase.h:121
GEOMAPI_VIRTUAL int GetVectorIntegrandCount()=0
double ActiveFractionToGlobalFraction(double activeFraction) const
#define GEOMAPI_VIRTUAL
Definition: GeomApi.h:18
DSpiral2dPlacement & DSpiral2dPlacementR
Definition: DSpiral2dBase.h:853
A DSegment1d is an interval [x0,x1] on the real line.
Definition: DSegment1d.h:19
DSpiral2dPlacementP Clone(DSpiral2dPlacementCR source) const
Return a clone.
DSpiral2dPlacement()
Null spiral, identity transform, zero fractions;.
#define DECLARE_DSPIRAL2DBASE_DIRECT_EVALUATION_OVERRIDES
Definition: DSpiral2dBase.h:229
Definition: DSpiral2dBase.h:819
Spiral packaged with placement frame and fractional interval Note that the stored spiral is a pointer...
Definition: DSpiral2dBase.h:860
Definition: DSpiral2dBase.h:692
bool AlmostEqual(DSpiral2dPlacement const &other, double tolerance=0.0) const
Apply AlmostEqual to all components.
DVec3d DisplacementBetweenActiveFractions(double g0, double g1) const
Definition: DSpiral2dBase.h:631
struct DPoint2d const & DPoint2dCR
Definition: msgeomstructs_typedefs.h:78
A Bentley supplied implementation std::vector.
Definition: stdcxx/bvector.h:77
DRay3d ActiveFractionToPointAndUnitTangent(double fraction) const
Transform FractionToFrenetFrame(double fraction) const
struct DVec2d & DVec2dR
Definition: msgeomstructs_typedefs.h:90
interface declaration for function to receive announcements of (multiple) Arc-spiral-line-spiral-arc ...
Definition: DSpiral2dBase.h:554
double fractionA
Definition: DSpiral2dBase.h:864
struct DPoint3d & DPoint3dR
Definition: msgeomstructs_typedefs.h:79
Start point and direction (NOT necessarily unit) for a 3D ray.
Definition: dray3d.h:21
struct Bentley::Utf8String & Utf8StringR
Definition: Bentley.h:241
bool ReverseInPlace()
Reverse the fractions !!
virtual bool EvaluateAtDistance(double distanceAlong, DPoint2dR xyz, DVec2dP d1XYZ, DVec2dP d2XYZ, DVec2dP d3XYZ) const =0
Evaluate the spiral and derivatives at specified distance along.
DRay3d ActiveFractionToPointAndDerivative(double fraction) const
struct Transform const & TransformCR
Definition: msgeomstructs_typedefs.h:134
DSpiral2dPlacement const * DSpiral2dPlacementCP
Definition: DSpiral2dBase.h:852
DRay3d FractionToPointAndDerivative(double fraction) const
Utf8Char const * Utf8CP
Definition: Bentley.h:229
Definition: DSpiral2dBase.h:621
~DSpiral2dPlacement()
Free the spiral pointer.
DSpiral2dPlacement const & DSpiral2dPlacementCR
Definition: DSpiral2dBase.h:854
RotMatrix FractionToDerivatives(double fraction) const
return xyz first, second, third derivatives as columns.
#define BEGIN_BENTLEY_GEOMETRY_NAMESPACE
Definition: Bentley.r.h:29
struct DPoint3d const & DPoint3dCR
Definition: msgeomstructs_typedefs.h:79
GEOMAPI_VIRTUAL void EvaluateVectorIntegrand(double t, double *pF)=0
double mCurvature1
Definition: DSpiral2dBase.h:122
struct DSpiral2dBase & DSpiral2dBaseR
Definition: DSpiral2dBase.h:16
struct DSpiral2dBase const & DSpiral2dBaseCR
Definition: DSpiral2dBase.h:17
#define DECLARE_DSPIRAL2DBASE_DIRECT_EVALUATION_MIDLEVEL_OVERRIDES
Definition: DSpiral2dBase.h:224
void ReplaceSpiral(DSpiral2dBaseP callerSpiral)
Free the current spiral pointer and replace by (possibly NULL) arg.
intermediate class for "spirals" that really have distance-to-xy methods but need to act like spirals...
Definition: DSpiral2dBase.h:716
double SpiralLength01() const
absolute length of the reference spiral (between 0 and 1)
Definition: DSpiral2dBase.h:751
#define DECLARE_DSPIRAL2DBASE_OVERRIDES
Definition: DSpiral2dBase.h:217
Definition: DSpiral2dBase.h:20
bool AlmostEqual01(DSpiral2dPlacement const &other, double tolerance=0.0) const
Apply AlmostEqual to all components except fractions.
DSegment1d FractionInterval() const
Definition: DSpiral2dBase.h:785
DPoint3d FractionToPoint(double fraction) const
#define DEFAULT_SPIRAL_MAX_STROKE_LENGTH
Definition: DSpiral2dBase.h:12