59 # include <OpenGL/gl.h> 66 class Feedback3DColor ;
70 #define EPS_SMOOTH_LINE_FACTOR 0.06 79 :
_pos(loc[0],loc[1],loc[2]),
85 inline GLfloat
red()
const {
return _red ; }
130 virtual const Vector3& vertex(
int)
const = 0 ;
133 Vect3 VerticalProjectPointOnSupportPlane(
const Vector3 &)
const ;
134 void IntersectPrimitiveWithSupportPlane(
Primitive *,
int[],
FLOAT[],Vect3 *&,Vect3 *&) ;
135 inline FLOAT Equation(
const Vect3& p) {
return p*_normal-_C ; }
138 FLOAT Const()
const {
return _C ; }
140 int depth()
const {
return _depth ; }
141 void setDepth(
int d)
const { _depth = d ; }
144 virtual unsigned int nbVertices()
const = 0 ;
157 virtual const Vector3& vertex(
int)
const ;
172 virtual const Vector3& vertex(
int)
const ;
188 Polygone(
const std::vector<Feedback3DColor>&) ;
191 virtual int IsAPolygon() {
return 1 ; }
193 void InitEquation(
double &,
double &,
double &,
double &) ;
196 virtual const Vector3& vertex(
int)
const ;
197 virtual unsigned int nbVertices()
const {
return _vertices.size() ; }
199 double equation(
const Vector3& p)
const ;
201 double c()
const {
return _c ; }
206 virtual void initNormal() ;
207 void CheckInfoForPositionOperators() ;
virtual unsigned int nbVertices() const
friend Feedback3DColor operator*(const GLFLOAT &f, const Feedback3DColor &F)
Feedback3DColor operator*(const GLFLOAT &f) const
Feedback3DColor _position_and_color
virtual unsigned int nbVertices() const
const Vector3 & pos() const
Segment(const Feedback3DColor &p1, const Feedback3DColor &p2)
friend std::ostream & operator<<(std::ostream &, const Feedback3DColor &)
const NVector3 & normal() const
Feedback3DColor(FLOAT x, FLOAT y, FLOAT z, GLfloat r, GLfloat g, GLfloat b, GLfloat a)
Feedback3DColor(GLfloat *loc)
Feedback3DColor operator+(const Feedback3DColor &v) const
static int sizeInBuffer()
std::vector< Feedback3DColor > _vertices
virtual unsigned int nbVertices() const