24 #ifndef PXR_BASE_GF_RAY_H
25 #define PXR_BASE_GF_RAY_H
97 return _startPoint + distance * _direction;
109 double *rayDistance = NULL)
const;
114 return (_startPoint == r._startPoint &&
115 _direction == r._direction);
121 return ! (*
this ==
r);
156 GfVec3d *barycentricCoords = NULL,
157 bool *frontFacing = NULL,
158 double maxDist = std::numeric_limits<double>::infinity())
170 bool *frontFacing = NULL)
const;
178 double *enterDistance = NULL,
179 double *exitDistance = NULL)
const;
187 double *enterDistance = NULL,
188 double *exitDistance = NULL)
const;
196 double *enterDistance = NULL,
197 double *exitDistance = NULL )
const;
211 double *enterDistance = NULL,
212 double *exitDistance = NULL)
const;
228 double *enterDistance = NULL,
229 double *exitDistance = NULL)
const;
236 double *,
double * );
240 double *,
double * );
245 bool _SolveQuadratic(
const double a,
248 double *enterDistance = NULL,
249 double *exitDistance = NULL)
const;
268 double *rayDistance =
nullptr,
269 double *lineDistance =
nullptr );
282 double *rayDistance =
nullptr,
283 double *segDistance =
nullptr );
291 #endif // PXR_BASE_GF_RAY_H
IMF_EXPORT IMATH_NAMESPACE::V3f direction(const IMATH_NAMESPACE::Box2i &dataWindow, const IMATH_NAMESPACE::V2f &pixelPosition)
GLboolean GLboolean GLboolean GLboolean a
const GfVec3d & GetStartPoint() const
Returns the starting point of the segment.
bool operator!=(const GfRay &r) const
GfRay()
The default constructor leaves the ray parameters undefined.
GLint GLsizei GLsizei height
const GfVec3d & GetDirection() const
GfVec3d GetPoint(double distance) const
GF_API void SetPointAndDirection(const GfVec3d &startPoint, const GfVec3d &direction)
Sets the ray by specifying a starting point and a direction.
GF_API bool Intersect(const GfVec3d &p0, const GfVec3d &p1, const GfVec3d &p2, double *distance=NULL, GfVec3d *barycentricCoords=NULL, bool *frontFacing=NULL, double maxDist=std::numeric_limits< double >::infinity()) const
GF_API void SetEnds(const GfVec3d &startPoint, const GfVec3d &endPoint)
Sets the ray by specifying a starting point and an ending point.
GLboolean GLboolean GLboolean b
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
bool operator==(const GfRay &r) const
#define PXR_NAMESPACE_CLOSE_SCOPE
GF_API GfVec3d FindClosestPoint(const GfVec3d &point, double *rayDistance=NULL) const
GF_API bool GfFindClosestPoints(const GfRay &ray, const GfLine &line, GfVec3d *rayPoint=nullptr, GfVec3d *linePoint=nullptr, double *rayDistance=nullptr, double *lineDistance=nullptr)
SIM_API const UT_StringHolder distance
GF_API friend bool GfFindClosestPoints(const GfRay &, const GfLine &, GfVec3d *, GfVec3d *, double *, double *)
GF_API std::ostream & operator<<(std::ostream &, const GfRay &)
GF_API GfRay & Transform(const GfMatrix4d &matrix)
Transforms the ray by the given matrix.
GfRay(const GfVec3d &startPoint, const GfVec3d &direction)
This constructor takes a starting point and a direction.