Detail data for a point along a curve, allowing indexing into a subcomponent. More...
#include <CurveDetails.h>
Public Member Functions | |
CurveLocationDetail () | |
Construct as null state. More... | |
CurveLocationDetail (ICurvePrimitiveCP _curve, size_t _numComponent=1) | |
Construct curve data but no coordinate data. More... | |
CurveLocationDetail (ICurvePrimitiveCP _curve, double _fraction, DPoint3dCR _point) | |
Construct from simple fraction in single component curve. More... | |
CurveLocationDetail (ICurvePrimitiveCP _curve, double _fraction, DPoint3dCR _point, size_t _componentIndex, size_t _numComponent, double _componentFraction) | |
Construct with full indexing. More... | |
CurveLocationDetail (ICurvePrimitiveCP _curve, double _fraction, DPoint3dCR _point, size_t _componentIndex, size_t _numComponent, double _componentFraction, double _a) | |
Construct with full indexing. More... | |
bool | UpdateIfCloser (CurveLocationDetailCR otherDetail) |
conditional replace candidate, with minDistance update if needed. More... | |
double | SetDistanceFrom (DPoint3dCR refPoint) |
set xyz distance from point. More... | |
void | SetMaxDistance () |
set distance to very large value. More... | |
void | SetDistance (double value) |
set distance field ({a}) More... | |
void | SetSingleComponentData () |
copy fraction to componentFraction and set component index and count for single component. More... | |
void | SetSingleComponentFractionAndA (double fraction, double a) |
Set fraction and a fields from parameters. Make the component fraction match. Set componentIndex and numComponentIndex to 0 and 1. More... | |
double | Distance (CurveLocationDetailCR other) const |
Return distance between point fields of this and other. More... | |
bool | Interpolate (bvector< double > const ¶m, double &result) const |
Use the componentIndex and componentFraction to interpolate doubles. More... | |
ValidatedDRay3d | PointAndUnitTangent () const |
Try to evalute the point and unit tangent at the detail's fraction. More... | |
bool | TryFractionToPoint (DPoint3dR xyz, DVec3dR dXdf) const |
Try to evaluate the referenced curve at the detail's fraction. More... | |
bool | TryComponentFractionToPoint (DPoint3dR xyz, DVec3dR dXdf) const |
Try to evaluate the referenced curve at the detail's component fraction. More... | |
bool | AlmostEqualPoint (CurveLocationDetailCR other) const |
test if point coordinates are AlmostEqual More... | |
ValidatedCurveLocationDetail | Interpolate (double fraction, CurveLocationDetailCR dataB) const |
construct an interpolated detail. More... | |
void | SetFractionFromComponentFraction (double componentFraction, size_t componentIndex, size_t numComponent) |
Set the componentIndex, numComponent, componentFraction, and fraction. More... | |
void | SetComponentFractionFromFraction (double globalFraction, size_t numComponent) |
Set the componentIndex, numComponent, componentFraction, and fraction. More... | |
Static Public Member Functions | |
static void | SortByCurveAndFraction (bvector< CurveLocationDetail > &detail) |
Sort to gather CurveLocationDetail's with same curve, and then by fraction within those curves. More... | |
Public Attributes | |
ICurvePrimitiveCP | curve |
Containing curve. More... | |
double | fraction |
fraction from curve start to end More... | |
DPoint3d | point |
curve coordinates More... | |
size_t | componentIndex |
index of components within curve More... | |
size_t | numComponent |
number of indexed components. More... | |
double | componentFraction |
fraction within the indexed part. More... | |
double | a |
Context specific. More... | |
Detail data for a point along a curve, allowing indexing into a subcomponent.
Construct as null state.
CurveLocationDetail | ( | ICurvePrimitiveCP | _curve, |
size_t | _numComponent = 1 |
||
) |
Construct curve data but no coordinate data.
CurveLocationDetail | ( | ICurvePrimitiveCP | _curve, |
double | _fraction, | ||
DPoint3dCR | _point | ||
) |
Construct from simple fraction in single component curve.
CurveLocationDetail | ( | ICurvePrimitiveCP | _curve, |
double | _fraction, | ||
DPoint3dCR | _point, | ||
size_t | _componentIndex, | ||
size_t | _numComponent, | ||
double | _componentFraction | ||
) |
Construct with full indexing.
CurveLocationDetail | ( | ICurvePrimitiveCP | _curve, |
double | _fraction, | ||
DPoint3dCR | _point, | ||
size_t | _componentIndex, | ||
size_t | _numComponent, | ||
double | _componentFraction, | ||
double | _a | ||
) |
Construct with full indexing.
bool AlmostEqualPoint | ( | CurveLocationDetailCR | other | ) | const |
test if point coordinates are AlmostEqual
double Distance | ( | CurveLocationDetailCR | other | ) | const |
Return distance between point fields of this and other.
bool Interpolate | ( | bvector< double > const & | param, |
double & | result | ||
) | const |
Use the componentIndex and componentFraction to interpolate doubles.
ValidatedCurveLocationDetail Interpolate | ( | double | fraction, |
CurveLocationDetailCR | dataB | ||
) | const |
construct an interpolated detail.
the return has (1) the curve pointer from the first, (2) simple interpolation of fraction, point, and "a" value, (3) component data based on the interpolated fraction and the componentCount from the first. The result is marked valid only if the inputs have matching curve pointers and component counts. This operation makes clear sense if both curved details are from the same curve and (with allowance for start-end matchup) within the same component (linesegment ?) of that parent. It may or may not make sense if it spans interiors of two components of the same curve. It almost certainly does not make sense between curves.
ValidatedDRay3d PointAndUnitTangent | ( | ) | const |
Try to evalute the point and unit tangent at the detail's fraction.
void SetComponentFractionFromFraction | ( | double | globalFraction, |
size_t | numComponent | ||
) |
Set the componentIndex, numComponent, componentFraction, and fraction.
(Component fraction and index are computed from global fraction and indices) All other data (point, curve pointer, a) is left unchanged.
void SetDistance | ( | double | value | ) |
set distance field ({a})
double SetDistanceFrom | ( | DPoint3dCR | refPoint | ) |
set xyz distance from point.
void SetFractionFromComponentFraction | ( | double | componentFraction, |
size_t | componentIndex, | ||
size_t | numComponent | ||
) |
Set the componentIndex, numComponent, componentFraction, and fraction.
(Global fraction is computed as (componentIndex + componentFraction)/ numComponent. All other data (point, curve pointer, a) is left unchanged.
void SetMaxDistance | ( | ) |
set distance to very large value.
void SetSingleComponentData | ( | ) |
copy fraction to componentFraction and set component index and count for single component.
void SetSingleComponentFractionAndA | ( | double | fraction, |
double | a | ||
) |
Set fraction and a fields from parameters. Make the component fraction match. Set componentIndex and numComponentIndex to 0 and 1.
|
static |
Sort to gather CurveLocationDetail's with same curve, and then by fraction within those curves.
bool TryComponentFractionToPoint | ( | DPoint3dR | xyz, |
DVec3dR | dXdf | ||
) | const |
Try to evaluate the referenced curve at the detail's component fraction.
bool TryFractionToPoint | ( | DPoint3dR | xyz, |
DVec3dR | dXdf | ||
) | const |
Try to evaluate the referenced curve at the detail's fraction.
bool UpdateIfCloser | ( | CurveLocationDetailCR | otherDetail | ) |
conditional replace candidate, with minDistance update if needed.
double a |
Context specific.
double componentFraction |
fraction within the indexed part.
size_t componentIndex |
index of components within curve
ICurvePrimitiveCP curve |
Containing curve.
double fraction |
fraction from curve start to end
size_t numComponent |
number of indexed components.
DPoint3d point |
curve coordinates