Detail data for pick on solid primitive. More...
#include <CurveDetails.h>
Classes | |
struct | FaceIndices |
FaceIndices is a triple of integers identifying a face within a solid primitive. More... | |
Public Types | |
typedef struct SolidLocationDetail::FaceIndices const & | FaceIndicesCR |
typedef struct SolidLocationDetail::FaceIndices const * | FaceIndicesCP |
typedef struct SolidLocationDetail::FaceIndices & | FaceIndicesR |
typedef struct SolidLocationDetail::FaceIndices * | FaceIndicesP |
Public Member Functions | |
SolidLocationDetail () | |
Default construtor. More... | |
SolidLocationDetail (int parentId, double s) | |
Construct with parameter, no point. More... | |
SolidLocationDetail (int parentId, double s, DPoint3dCR xyz) | |
Constructor with parameter and point. More... | |
SolidLocationDetail (int parentId, double s, DPoint3dCR xyz, double u, double v, DVec3dCR uVector, DVec3dCR vVector) | |
Constructor with parameter, point, uv parameters, and uv vectors. More... | |
void | Init () |
Initialize to zeroed state. More... | |
void | SetFaceIndices (ptrdiff_t _id0, ptrdiff_t _id1, ptrdiff_t _id2) |
Set all face selectors. More... | |
void | SetFaceIndices01 (ptrdiff_t _id0, ptrdiff_t _id1) |
Set all face selectors. More... | |
void | SetFaceIndices (SolidLocationDetail::FaceIndices const &indices) |
Set face selectors 0 and 1, leave selector 2 unchanged. More... | |
void | SetCapSelector (int id) |
Set selectors for cap id (typically 0 or 1) More... | |
int | GetParentId () const |
Return the parent id. More... | |
void | SetParentId (int id) |
Set the parent id. More... | |
int | GetPrimarySelector () const |
Return the primary selector. More... | |
int | GetSecondarySelector () const |
Return the secondary selector. More... | |
SolidLocationDetail::FaceIndices | GetFaceIndices () const |
return a structure with all selector indices. More... | |
double | GetPickParameter () const |
Return the parameter along the pick ray. More... | |
DPoint3d | GetXYZ () const |
Return the pick coordinates. More... | |
DPoint2d | GetUV () const |
Return u,v parameter information. More... | |
double | GetU () |
query the u parameter More... | |
double | GetV () |
query the v parameter More... | |
double | GetA () |
query the a parameter More... | |
DVec3d | GetUDirection () const |
Return u direction vector. More... | |
DVec3d | GetVDirection () const |
Return v direction vector. More... | |
void | SetUV (double u, double v, DVec3dCR uDirection, DVec3dCR vDirection) |
Set the u,v, and direction vectors. More... | |
void | SetUV (DPoint2dCR xyz) |
Set the u,v coordinates. More... | |
void | SetU (double u) |
Set u. More... | |
void | SetV (double v) |
Set v. More... | |
void | SetA (double a) |
Set a. More... | |
void | SetXYZ (DPoint3dCR xyz) |
Set the point coordinates. More... | |
void | SetUDirection (DVec3d dXdu) |
Set the u direction vector. More... | |
void | SetVDirection (DVec3d dXdv) |
Set the v direction vector. More... | |
void | SetPickParameter (double f) |
set the pick fraction. More... | |
bool | IsCapSelect (int &capId) const |
Ask if the selectors identify a cap. More... | |
void | TransformInPlace (TransformCR transform) |
TransformInPlace points and vectors by the transform. More... | |
bool | MapPickParameterFractionToRange (DRange1dCR range) |
Treat current pick parameter as fractions in new interval. More... | |
bool | UpdateIfSmallerA (SolidLocationDetailCR source) |
Static Public Member Functions | |
static bool | cb_compareLT_parameter (SolidLocationDetail const &dataA, SolidLocationDetail const &dataB) |
std::sort comparator for sort by parameter ... More... | |
static bool | IsCap0 (int selector0, int selector1) |
Ask if a selector pair is the start cap. More... | |
static bool | IsCap1 (int selector0, int selector1) |
Ask if a selector pair is the end cap. More... | |
Static Public Attributes | |
static const int | PrimaryIdCap = -1 |
Special value for primary id of cap faces. More... | |
Detail data for pick on solid primitive.
Data maintained is:
typedef struct SolidLocationDetail::FaceIndices const* FaceIndicesCP |
typedef struct SolidLocationDetail::FaceIndices const& FaceIndicesCR |
typedef struct SolidLocationDetail::FaceIndices* FaceIndicesP |
typedef struct SolidLocationDetail::FaceIndices& FaceIndicesR |
Default construtor.
SolidLocationDetail | ( | int | parentId, |
double | s | ||
) |
Construct with parameter, no point.
SolidLocationDetail | ( | int | parentId, |
double | s, | ||
DPoint3dCR | xyz | ||
) |
Constructor with parameter and point.
SolidLocationDetail | ( | int | parentId, |
double | s, | ||
DPoint3dCR | xyz, | ||
double | u, | ||
double | v, | ||
DVec3dCR | uVector, | ||
DVec3dCR | vVector | ||
) |
Constructor with parameter, point, uv parameters, and uv vectors.
|
static |
std::sort comparator for sort by parameter ...
double GetA | ( | ) |
query the a parameter
SolidLocationDetail::FaceIndices GetFaceIndices | ( | ) | const |
return a structure with all selector indices.
int GetParentId | ( | ) | const |
Return the parent id.
double GetPickParameter | ( | ) | const |
Return the parameter along the pick ray.
int GetPrimarySelector | ( | ) | const |
Return the primary selector.
int GetSecondarySelector | ( | ) | const |
Return the secondary selector.
double GetU | ( | ) |
query the u parameter
DVec3d GetUDirection | ( | ) | const |
Return u direction vector.
DPoint2d GetUV | ( | ) | const |
Return u,v parameter information.
double GetV | ( | ) |
query the v parameter
DVec3d GetVDirection | ( | ) | const |
Return v direction vector.
DPoint3d GetXYZ | ( | ) | const |
Return the pick coordinates.
void Init | ( | ) |
Initialize to zeroed state.
|
static |
Ask if a selector pair is the start cap.
|
static |
Ask if a selector pair is the end cap.
bool IsCapSelect | ( | int & | capId | ) | const |
Ask if the selectors identify a cap.
bool MapPickParameterFractionToRange | ( | DRange1dCR | range | ) |
Treat current pick parameter as fractions in new interval.
return false (and leave the pick parameter unchanged) if the range is undefined.
void SetA | ( | double | a | ) |
Set a.
void SetCapSelector | ( | int | id | ) |
Set selectors for cap id (typically 0 or 1)
void SetFaceIndices | ( | ptrdiff_t | _id0, |
ptrdiff_t | _id1, | ||
ptrdiff_t | _id2 | ||
) |
Set all face selectors.
void SetFaceIndices | ( | SolidLocationDetail::FaceIndices const & | indices | ) |
Set face selectors 0 and 1, leave selector 2 unchanged.
void SetFaceIndices01 | ( | ptrdiff_t | _id0, |
ptrdiff_t | _id1 | ||
) |
Set all face selectors.
void SetParentId | ( | int | id | ) |
Set the parent id.
void SetPickParameter | ( | double | f | ) |
set the pick fraction.
void SetU | ( | double | u | ) |
Set u.
void SetUDirection | ( | DVec3d | dXdu | ) |
Set the u direction vector.
void SetUV | ( | double | u, |
double | v, | ||
DVec3dCR | uDirection, | ||
DVec3dCR | vDirection | ||
) |
Set the u,v, and direction vectors.
void SetUV | ( | DPoint2dCR | xyz | ) |
Set the u,v coordinates.
void SetV | ( | double | v | ) |
Set v.
void SetVDirection | ( | DVec3d | dXdv | ) |
Set the v direction vector.
void SetXYZ | ( | DPoint3dCR | xyz | ) |
Set the point coordinates.
void TransformInPlace | ( | TransformCR | transform | ) |
TransformInPlace points and vectors by the transform.
bool UpdateIfSmallerA | ( | SolidLocationDetailCR | source | ) |
|
static |
Special value for primary id of cap faces.