PickRay is a class containing all the information needed to do a pick in perspective and parallel views.class PickRay.
|
| PickRay () |
|
| PickRay (const Line3d &pickray) |
|
| PickRay (const Point2d &normalizedScreenPoint, bool normalizedScreenYUp=false) |
| normalizedScreenPoint: Normalized screen space point. More...
|
|
| PickRay (const Point2d &normalizedScreenPoint1, const Point2d &normalizedScreenPoint2) |
| This ctor takes 2 normalized screen points and does a "window select". More...
|
|
| PickRay (const Line3d &pickrayLine, const 1::vector< Plane > &planes, double screenPickRayRadius, double perspectiveScaleFactor, double baseRadius) |
| This ctor takes all the information the pickray needs. More...
|
|
virtual | ~PickRay () |
|
void | AddPlane (Plane &plane, bool negate=false) |
| Add a Plane to the pick frustum. More...
|
|
void | AddPlanes (const 1::vector< Plane > &planes) |
| Add a list of Planes to the pick frustum. More...
|
|
void | ClearPlanes () |
| Clear the list of planes. More...
|
|
| operator const Line3d & () const |
| Get the Line3d for this PickRay. More...
|
|
const Line3d & | GetLine () const |
| Get the Line3d for this PickRay. More...
|
|
void | SetLine (const WSM::Line3d &l) |
| Set the WSM::Line3d. More...
|
|
| operator const 1::vector< Plane > & () const |
| Get the vector of Planes for thisPickRay. More...
|
|
const ::vector< Plane > & | GetPlanes () const |
| Get the vector of Planes for thisPickRay. More...
|
|
double | ModelSpacePickRayRadius (const Point3d &atPoint) const |
| Get the model space pick radius for this PickRay at the given 3d point. More...
|
|
double | ScreenSpacePickRayRadius () const |
| Get the screen space pick radius for this PickRay. More...
|
|
bool | SetScreenSpacePickRayRadius (double radius) |
| Returns true if successful. More...
|
|
int | ClosestToEye (const WSM::Point3d &pt1, const WSM::Point3d &pt2) const |
| ClosestToEye returns the argument # that is closest to m_PickRay.point. More...
|
|
int | ClosestToRayScreenPoint (const WSM::Point3d &pt1, const WSM::Point3d &pt2) const |
| ClosestToRayScreenPoint returns the argument # that is closest to m_PickRay's screen point. More...
|
|
bool | IntersectWithLine (const Line3d &line, WSM::Point3d &intersPoint, double ¶mRay, double ¶mLine, bool useFrustum=false, bool mustAlsoIntersectClosestPoint=false) const |
| Intersect a pick ray and a 3d line. More...
|
|
bool | IntersectsWithPoint (const WSM::Point3d &pt, bool useFrustum=false) const |
| IntersectsWithPoint determines if the point lies within the PickRay. More...
|
|
void | CalculatePerspectiveScaleFactor () |
| CalculatePerspectiveScaleFactor calculates the World to screen scale factor. More...
|
|
double | GetPerspectiveScaleFactor () const |
| GetPerspectiveScaleFactor returns the World to screen scale factor. More...
|
|
void | SetPerspectiveScaleFactor (double factor) |
| SetPerspectiveScaleFactor sets the World to screen scale factor. More...
|
|
double | GetBaseRadius () const |
| GetBaseRadius returns the base radius of the PickRay. More...
|
|
Point2d | GetNormalizedScreenPoint () const |
| Get/Set the NormalizedScreenPoint that produced this PickRay. More...
|
|
void | SetNormalizedScreenPoint (const Point2d &pt) |
|
bool WSM::Utils::PickRay::IntersectWithLine |
( |
const Line3d & |
line, |
|
|
WSM::Point3d & |
intersPoint, |
|
|
double & |
paramRay, |
|
|
double & |
paramLine, |
|
|
bool |
useFrustum = false , |
|
|
bool |
mustAlsoIntersectClosestPoint = false |
|
) |
| const |
Intersect a pick ray and a 3d line.
In general, the line and ray (center line) will not be in the same plane. Thus, if not parallel, there will be two points, one on each, that represent the closest distance between them. If that closest distance is less that the ray's radius at that point, we return true. Also returned are the parameters of the intersection points on the lines The useFrustum flag will do a frustum pick instead of a 'cone' pick. The reason one would want to do a frustum pick is to match how WSM picks Edges. mustAlsoIntersectClosestPoint also tests whether the closest point on the line also is within pick tolerance.