37 real* out_hitT)
const;
121 template<
typename SurfaceToUv>
124 SurfaceToUv surfaceToUv,
129 bool isIntersectingNaive(
131 real* out_hitT)
const;
134 bool isIntersectingHearnBaker(
136 real* out_hitT)
const;
A 3-D Axis-Aligned Bounding Box (AABB).
Definition TAABB3D.h:32
Represents a line segment in space.
Definition TLineSegment.h:25
A sphere in 3-D space.
Definition TSphere.h:20
static TSphere makeUnit()
Definition TSphere.ipp:19
TVector2< T > surfaceToPhiTheta(const TVector3< T > &surface) const
Map Cartesian to spherical coordinates on the surface of the sphere.
Definition TSphere.ipp:422
bool isInside(const TVector3< T > &point) const
Same as isIntersecting(), except the cost is slightly higher to reduce numerical error.
Definition TSphere.ipp:63
TVector3< T > latLong01ToSurface(const TVector2< T > &latLong01) const
Definition TSphere.ipp:416
TVector2< T > surfaceToLatLong01(const TVector3< T > &surface) const
Definition TSphere.ipp:393
T getArea() const
Definition TSphere.ipp:266
TAABB3D< T > getAABB() const
Definition TSphere.ipp:272
TVector3< T > phiThetaToSurface(const TVector2< T > &phiTheta) const
Map spherical to Cartesian coordinates on the surface of the sphere.
Definition TSphere.ipp:440
TVector2< T > latLong01ToPhiTheta(const TVector2< T > &latLong01) const
Definition TSphere.ipp:405
T uniformSurfaceSamplePdfA() const
Definition TSphere.ipp:386
T getRadius() const
Definition TSphere.ipp:260
TVector3< T > sampleToSurfaceArchimedes(const std::array< T, 2 > &sample) const
Definition TSphere.ipp:319
TVector3< T > sampleToSurfaceAbsCosThetaWeighted(const std::array< T, 2 > &sample) const
Definition TSphere.ipp:349
bool mayOverlapVolume(const TAABB3D< T > &volume) const
Conservatively checks whether this sphere overlaps a volume. By conservative, it means true can be re...
Definition TSphere.ipp:283
std::pair< TVector3< T >, TVector3< T > > surfaceDerivativesWrtUv(const TVector3< T > &surface, SurfaceToUv surfaceToUv, T hInRadians=to_radians< T >(1)) const
Calculate dPdU and dPdV with finite difference.
Definition TSphere.ipp:457
bool isIntersecting(const TLineSegment< T > &segment, real *out_hitT) const
Checks whether the segment is interseting with this sphere.
Definition TSphere.ipp:32
Represents a 2-D vector.
Definition TVector2.h:19
Represents a 3-D vector.
Definition TVector3.h:17
Miscellaneous math utilities.
Math functions and utilities.
Definition TransformInfo.h:10
T to_radians(const T degrees)
Convert degrees to radians.
Definition math.h:140