#include <Sphere.h>
|
| Sphere () |
|
| Sphere (const vec3 ¢er, float radius) |
|
float | getRadius () const |
|
void | setRadius (float radius) |
|
vec3 | getCenter () const |
|
void | setCenter (const vec3 ¢er) |
|
bool | intersects (const AxisAlignedBox &box) const |
|
bool | intersects (const Ray &ray) const |
|
int | intersect (const Ray &ray, float *intersection) const |
|
int | intersect (const Ray &ray, float *min, float *max) const |
|
vec3 | closestPoint (const Ray &ray) const |
|
Sphere | transformed (const mat4 &transform) |
|
void | calcProjection (float focalLength, vec2 *outCenter, vec2 *outAxisA, vec2 *outAxisB) const |
|
void | calcProjection (float focalLength, vec2 screenSizePixels, vec2 *outCenter, vec2 *outAxisA, vec2 *outAxisB) const |
|
float | calcProjectedArea (float focalLength, vec2 screenSizePixels) const |
|
cinder::Sphere::Sphere |
( |
| ) |
|
cinder::Sphere::Sphere |
( |
const vec3 & |
center, |
|
|
float |
radius |
|
) |
| |
float cinder::Sphere::getRadius |
( |
| ) |
const |
void cinder::Sphere::setRadius |
( |
float |
radius | ) |
|
vec3 cinder::Sphere::getCenter |
( |
| ) |
const |
void cinder::Sphere::setCenter |
( |
const vec3 & |
center | ) |
|
bool cinder::Sphere::intersects |
( |
const Ray & |
ray | ) |
const |
int cinder::Sphere::intersect |
( |
const Ray & |
ray, |
|
|
float * |
intersection |
|
) |
| const |
int cinder::Sphere::intersect |
( |
const Ray & |
ray, |
|
|
float * |
min, |
|
|
float * |
max |
|
) |
| const |
vec3 cinder::Sphere::closestPoint |
( |
const Ray & |
ray | ) |
const |
Returns the closest point on ray to the Sphere. If ray intersects then returns the point of nearest intersection.
Sphere cinder::Sphere::calculateBoundingSphere |
( |
const std::vector< vec3 > & |
points | ) |
|
|
static |
Sphere cinder::Sphere::calculateBoundingSphere |
( |
const vec3 * |
points, |
|
|
size_t |
numPoints |
|
) |
| |
|
static |
Sphere cinder::Sphere::transformed |
( |
const mat4 & |
transform | ) |
|
Converts sphere to another coordinate system. Note that it will not return correct results if there are non-uniform scaling, shears, or other unusual transforms in transform.
void cinder::Sphere::calcProjection |
( |
float |
focalLength, |
|
|
vec2 * |
outCenter, |
|
|
vec2 * |
outAxisA, |
|
|
vec2 * |
outAxisB |
|
) |
| const |
Calculates the projection of the Sphere (an oriented ellipse) given focalLength. Returns false
if calculation failed, rendering only outCenter correct. Algorithm due to Iñigo Quilez.
void cinder::Sphere::calcProjection |
( |
float |
focalLength, |
|
|
vec2 |
screenSizePixels, |
|
|
vec2 * |
outCenter, |
|
|
vec2 * |
outAxisA, |
|
|
vec2 * |
outAxisB |
|
) |
| const |
Calculates the projection of the Sphere (an oriented ellipse) given focalLength. Algorithm due to Iñigo Quilez.
float cinder::Sphere::calcProjectedArea |
( |
float |
focalLength, |
|
|
vec2 |
screenSizePixels |
|
) |
| const |
Calculates the projected area of the Sphere given focalLength and screen size in pixels. Algorithm due to Iñigo Quilez.
vec3 cinder::Sphere::mCenter |
|
protected |
float cinder::Sphere::mRadius |
|
protected |
The documentation for this class was generated from the following files: