1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
#pragma once
#include "SyntopiaCore/Math/Vector3.h"
#include "Object3D.h"
#include <GL/glu.h>
#include <GL/glut.h>
namespace SyntopiaCore {
namespace GLEngine {
class Sphere : public Object3D {
public:
Sphere(SyntopiaCore::Math::Vector3f center, float radius);
virtual ~Sphere();
virtual QString name() { return "Sphere"; }
virtual void draw() const;
void setCenter(SyntopiaCore::Math::Vector3f center) { this->center = center; }
virtual bool intersectsRay(RayInfo* /*rayInfo*/);
virtual bool intersectsAABB(SyntopiaCore::Math::Vector3f /*from*/, SyntopiaCore::Math::Vector3f /*to*/);
private:
SyntopiaCore::Math::Vector3f center;
float radius;
GLUquadric* myQuad;
static int displayListIndex;
};
}
}
|