Bounding sphere data structure in three dimensions.
More...
#include <mitsuba/core/bsphere.h>
Bounding sphere data structure in three dimensions.
mitsuba::BSphere::BSphere |
( |
| ) |
|
|
inline |
Construct a bounding sphere at the origin having radius zero.
mitsuba::BSphere::BSphere |
( |
Stream * |
stream | ) |
|
|
inline |
Unserialize a bounding sphere from a binary data stream.
mitsuba::BSphere::BSphere |
( |
const Point & |
center, |
|
|
Float |
radius |
|
) |
| |
|
inline |
Create a bounding sphere from a given center point and radius.
mitsuba::BSphere::BSphere |
( |
const BSphere & |
boundingSphere | ) |
|
|
inline |
bool mitsuba::BSphere::contains |
( |
const Point |
p | ) |
const |
|
inline |
Check whether the specified point is inside or on the sphere.
void mitsuba::BSphere::expandBy |
( |
const Point |
p | ) |
|
|
inline |
Expand the bounding sphere radius to contain another point.
bool mitsuba::BSphere::isEmpty |
( |
| ) |
const |
|
inline |
Return whether this bounding sphere has a radius of zero or less.
bool mitsuba::BSphere::operator!= |
( |
const BSphere & |
boundingSphere | ) |
const |
|
inline |
bool mitsuba::BSphere::operator== |
( |
const BSphere & |
boundingSphere | ) |
const |
|
inline |
bool mitsuba::BSphere::rayIntersect |
( |
const Ray & |
ray, |
|
|
Float & |
nearHit, |
|
|
Float & |
farHit |
|
) |
| const |
|
inline |
Calculate the intersection points with the given ray.
- Returns
true
if the ray intersects the bounding sphere
void mitsuba::BSphere::serialize |
( |
Stream * |
stream | ) |
const |
|
inline |
Serialize this bounding sphere to a binary data stream.
std::string mitsuba::BSphere::toString |
( |
| ) |
const |
|
inline |
Return a string representation of the bounding sphere.
Point mitsuba::BSphere::center |
Float mitsuba::BSphere::radius |
The documentation for this struct was generated from the following file: