7 #ifndef PXR_BASE_GF_RAY_H
8 #define PXR_BASE_GF_RAY_H
80 return _startPoint + distance * _direction;
92 double *rayDistance = NULL)
const;
97 return (_startPoint == r._startPoint &&
98 _direction == r._direction);
104 return ! (*
this ==
r);
139 GfVec3d *barycentricCoords = NULL,
140 bool *frontFacing = NULL,
141 double maxDist = std::numeric_limits<double>::infinity())
153 bool *frontFacing = NULL)
const;
161 double *enterDistance = NULL,
162 double *exitDistance = NULL)
const;
170 double *enterDistance = NULL,
171 double *exitDistance = NULL)
const;
179 double *enterDistance = NULL,
180 double *exitDistance = NULL )
const;
194 double *enterDistance = NULL,
195 double *exitDistance = NULL)
const;
211 double *enterDistance = NULL,
212 double *exitDistance = NULL)
const;
219 double *,
double * );
223 double *,
double * );
228 bool _SolveQuadratic(
const double a,
231 double *enterDistance = NULL,
232 double *exitDistance = NULL)
const;
251 double *rayDistance =
nullptr,
252 double *lineDistance =
nullptr );
265 double *rayDistance =
nullptr,
266 double *segDistance =
nullptr );
274 #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.