* Distributable under the terms and conditions of the 2-clause BSD license;
* see the file COPYING for a complete text of the license.
*
* Distributable under the terms and conditions of the 2-clause BSD license;
* see the file COPYING for a complete text of the license.
*
#include <moof/contact.hh>
#include <moof/cullable.hh>
#include <moof/drawable.hh>
#include <moof/contact.hh>
#include <moof/cullable.hh>
#include <moof/drawable.hh>
bool intersect(const sphere<D>& sphere, contact<D>& hit) const
{
vector n = sphere.point - point;
bool intersect(const sphere<D>& sphere, contact<D>& hit) const
{
vector n = sphere.point - point;
// a ray inside the sphere will not intersect on its way out
bool intersect(const ray<D>& ray,
// a ray inside the sphere will not intersect on its way out
bool intersect(const ray<D>& ray,
{
vector b = point - ray.point;
scalar z = dot(b, ray.direction);
{
vector b = point - ray.point;
scalar z = dot(b, ray.direction);
{
GLUquadricObj* sphereObj = gluNewQuadric();
gluQuadricDrawStyle(sphereObj, GLU_LINE);
{
GLUquadricObj* sphereObj = gluNewQuadric();
gluQuadricDrawStyle(sphereObj, GLU_LINE);
{
GLUquadricObj* sphereObj = gluNewQuadric();
gluQuadricDrawStyle(sphereObj, GLU_LINE);
{
GLUquadricObj* sphereObj = gluNewQuadric();
gluQuadricDrawStyle(sphereObj, GLU_LINE);