59 # include <OpenGL/gl.h> 66 class Feedback3DColor ;
69 #define EPS_SMOOTH_LINE_FACTOR 0.06 78 :
_pos(loc[0],loc[1],loc[2]),
84 inline GLfloat
red()
const {
return _red ; }
129 virtual const Vector3& vertex(
size_t)
const = 0 ;
132 Vect3 VerticalProjectPointOnSupportPlane(
const Vector3 &)
const ;
133 void IntersectPrimitiveWithSupportPlane(
Primitive *,
int[],
FLOAT[],Vect3 *&,Vect3 *&) ;
134 inline FLOAT Equation(
const Vect3& p) {
return p*_normal-_C ; }
137 FLOAT Const()
const {
return _C ; }
139 int depth()
const {
return _depth ; }
140 void setDepth(
int d)
const { _depth = d ; }
143 virtual size_t nbVertices()
const = 0 ;
156 virtual const Vector3& vertex(
size_t)
const ;
171 virtual const Vector3& vertex(
size_t)
const ;
187 Polygone(
const std::vector<Feedback3DColor>&) ;
190 virtual int IsAPolygon() {
return 1 ; }
192 void InitEquation(
double &,
double &,
double &,
double &) ;
195 virtual const Vector3& vertex(
size_t)
const ;
196 virtual size_t nbVertices()
const {
return _vertices.size() ; }
198 double equation(
const Vector3& p)
const ;
200 double c()
const {
return _c ; }
205 virtual void initNormal() ;
206 void CheckInfoForPositionOperators() ;
const NVector3 & normal() const
friend Feedback3DColor operator*(const GLFLOAT &f, const Feedback3DColor &F)
static size_t sizeInBuffer()
virtual size_t nbVertices() const
Feedback3DColor _position_and_color
Feedback3DColor operator+(const Feedback3DColor &v) const
Segment(const Feedback3DColor &p1, const Feedback3DColor &p2)
friend std::ostream & operator<<(std::ostream &, const Feedback3DColor &)
Feedback3DColor(FLOAT x, FLOAT y, FLOAT z, GLfloat r, GLfloat g, GLfloat b, GLfloat a)
virtual size_t nbVertices() const
virtual size_t nbVertices() const
const Vector3 & pos() const
Feedback3DColor operator*(const GLFLOAT &f) const
Feedback3DColor(GLfloat *loc)
std::vector< Feedback3DColor > _vertices