19 1 / rayAxis.
x, 1 / rayAxis.
y,
37 double& toOrigin)
const {
52 assert(minCorner.
x <= maxCorner.
x);
53 assert(minCorner.
y <= maxCorner.
y);
54 assert(minCorner.
z <= maxCorner.
z);
75 if (tmin > tymax || tymin > tmax)
return false;
76 if (tymin > tmin) tmin = tymin;
77 if (tymax < tmax) tmax = tymax;
82 if (tmin > tzmax || tzmin > tmax)
return false;
83 if (tzmin > tmin) tmin = tzmin;
84 if (tzmax < tmax) tmax = tzmax;
Tuple3Tpl< int > Tuple3i
Tuple of 3 int values.
void normalize()
Sets vector norm to unity.
double norm2d() const
Returns vector square norm (forces double precision output)
Vector3Tpl cross(const Vector3Tpl &v) const
Cross product.
Simple axis aligned box structure.
AABB(const Vector3Tpl< T > &minCorner, const Vector3Tpl< T > &maxCorner)
Vector3Tpl< T > corners[2]
bool intersects(const Ray< T > &r, T *t0=0, T *t1=0) const
Ray(const Vector3Tpl< T > &rayAxis, const Vector3Tpl< T > &rayOrigin)
double squareDistanceToOrigin(const Vector3Tpl< T > &P) const
double radialSquareDistance(const Vector3Tpl< T > &P) const
void squareDistances(const Vector3Tpl< T > &P, double &radial, double &toOrigin) const