Cleanup: use Blender's code style for doxygen commetns in freestyle

This commit is contained in:
2021-06-24 15:57:33 +10:00
parent 4b9ff3cd42
commit 1f778dbefc
88 changed files with 1359 additions and 1359 deletions

View File

@@ -32,21 +32,21 @@ class AppCanvas : public Canvas {
AppCanvas(const AppCanvas &iBrother); AppCanvas(const AppCanvas &iBrother);
virtual ~AppCanvas(); virtual ~AppCanvas();
/*! operations that need to be done before a draw */ /** operations that need to be done before a draw */
virtual void preDraw(); virtual void preDraw();
/*! operations that need to be done after a draw */ /** operations that need to be done after a draw */
virtual void postDraw(); virtual void postDraw();
/*! Erases the layers and clears the canvas */ /** Erases the layers and clears the canvas */
virtual void Erase(); virtual void Erase();
/* init the canvas */ /* init the canvas */
virtual void init(); virtual void init();
/*! Reads a pixel area from the canvas */ /** Reads a pixel area from the canvas */
virtual void readColorPixels(int x, int y, int w, int h, RGBImage &oImage) const; virtual void readColorPixels(int x, int y, int w, int h, RGBImage &oImage) const;
/*! Reads a depth pixel area from the canvas */ /** Reads a depth pixel area from the canvas */
virtual void readDepthPixels(int x, int y, int w, int h, GrayImage &oImage) const; virtual void readDepthPixels(int x, int y, int w, int h, GrayImage &oImage) const;
virtual BBox<Vec3r> scene3DBBox() const; virtual BBox<Vec3r> scene3DBBox() const;
@@ -55,7 +55,7 @@ class AppCanvas : public Canvas {
virtual void RenderStroke(Stroke *); virtual void RenderStroke(Stroke *);
virtual void update(); virtual void update();
/*! accessors */ /** accessors */
virtual int width() const; virtual int width() const;
virtual int height() const; virtual int height() const;
virtual BBox<Vec2i> border() const; virtual BBox<Vec2i> border() const;
@@ -67,7 +67,7 @@ class AppCanvas : public Canvas {
return _pViewer; return _pViewer;
} }
/*! modifiers */ /** modifiers */
void setViewer(AppView *iViewer); void setViewer(AppView *iViewer);
/* soc */ /* soc */

View File

@@ -83,7 +83,7 @@ class AppView {
float _thickness; float _thickness;
public: public:
/*! Sets the model to draw in the viewer /** Sets the model to draw in the viewer
* iModel * iModel
* The Root Node of the model * The Root Node of the model
*/ */
@@ -97,7 +97,7 @@ class AppView {
AddModel(iModel); AddModel(iModel);
} }
/*! Adds a model for displaying in the viewer */ /** Adds a model for displaying in the viewer */
inline void AddModel(NodeGroup *iModel) inline void AddModel(NodeGroup *iModel)
{ {
_ModelRootNode->AddChild(iModel); _ModelRootNode->AddChild(iModel);
@@ -226,14 +226,14 @@ class AppView {
real zfar(); real zfar();
public: public:
/*! Core scene drawing */ /** Core scene drawing */
void DrawScene(SceneVisitor *iRenderer); void DrawScene(SceneVisitor *iRenderer);
/*! 2D Scene Drawing */ /** 2D Scene Drawing */
void Draw2DScene(SceneVisitor *iRenderer); void Draw2DScene(SceneVisitor *iRenderer);
protected: protected:
/*! fabs or abs */ /** fabs or abs */
inline int rabs(int x) inline int rabs(int x)
{ {
return abs(x); return abs(x);

View File

@@ -80,28 +80,28 @@ struct LoaderState {
class BlenderFileLoader { class BlenderFileLoader {
public: public:
/*! Builds a MaxFileLoader */ /** Builds a MaxFileLoader */
BlenderFileLoader(Render *re, ViewLayer *view_layer, Depsgraph *depsgraph); BlenderFileLoader(Render *re, ViewLayer *view_layer, Depsgraph *depsgraph);
virtual ~BlenderFileLoader(); virtual ~BlenderFileLoader();
/*! Loads the 3D scene and returns a pointer to the scene root node */ /** Loads the 3D scene and returns a pointer to the scene root node */
NodeGroup *Load(); NodeGroup *Load();
/*! Gets the number of read faces */ /** Gets the number of read faces */
inline unsigned int numFacesRead() inline unsigned int numFacesRead()
{ {
return _numFacesRead; return _numFacesRead;
} }
#if 0 #if 0
/*! Gets the smallest edge size read */ /** Gets the smallest edge size read */
inline real minEdgeSize() inline real minEdgeSize()
{ {
return _minEdgeSize; return _minEdgeSize;
} }
#endif #endif
/*! Modifiers */ /** Modifiers */
inline void setRenderMonitor(RenderMonitor *iRenderMonitor) inline void setRenderMonitor(RenderMonitor *iRenderMonitor)
{ {
_pRenderMonitor = iRenderMonitor; _pRenderMonitor = iRenderMonitor;

View File

@@ -44,7 +44,7 @@ class BlenderStrokeRenderer : public StrokeRenderer {
BlenderStrokeRenderer(Render *re, int render_count); BlenderStrokeRenderer(Render *re, int render_count);
virtual ~BlenderStrokeRenderer(); virtual ~BlenderStrokeRenderer();
/*! Renders a stroke rep */ /** Renders a stroke rep */
virtual void RenderStrokeRep(StrokeRep *iStrokeRep) const; virtual void RenderStrokeRep(StrokeRep *iStrokeRep) const;
virtual void RenderStrokeRepBasic(StrokeRep *iStrokeRep) const; virtual void RenderStrokeRepBasic(StrokeRep *iStrokeRep) const;

View File

@@ -25,7 +25,7 @@
namespace Freestyle { namespace Freestyle {
/*! Class to define a regular grid used for ray casting computations /** Class to define a regular grid used for ray casting computations
* We don't use a hashtable here. The grid is explicitly stored for faster computations. * We don't use a hashtable here. The grid is explicitly stored for faster computations.
* However, this might result in significant increase in memory usage * However, this might result in significant increase in memory usage
* (compared to the regular grid). * (compared to the regular grid).
@@ -43,13 +43,13 @@ class FastGrid : public Grid {
clear(); clear();
} }
/*! /**
* clears the grid * clears the grid
* Deletes all the cells, clears the hashtable, resets size, size of cell, number of cells. * Deletes all the cells, clears the hashtable, resets size, size of cell, number of cells.
*/ */
virtual void clear(); virtual void clear();
/*! Sets the different parameters of the grid /** Sets the different parameters of the grid
* orig * orig
* The grid origin * The grid origin
* size * size
@@ -59,10 +59,10 @@ class FastGrid : public Grid {
*/ */
virtual void configure(const Vec3r &orig, const Vec3r &size, unsigned nb); virtual void configure(const Vec3r &orig, const Vec3r &size, unsigned nb);
/*! returns the cell whose coordinates are passed as argument */ /** returns the cell whose coordinates are passed as argument */
Cell *getCell(const Vec3u &p); Cell *getCell(const Vec3u &p);
/*! Fills the case p with the cell iCell */ /** Fills the case p with the cell iCell */
virtual void fillCell(const Vec3u &p, Cell &cell); virtual void fillCell(const Vec3u &p, Cell &cell);
protected: protected:

View File

@@ -72,7 +72,7 @@ class FitCurveWrapper {
public: public:
~FitCurveWrapper(); ~FitCurveWrapper();
/*! Fits a set of 2D data points to a set of Bezier Curve segments /** Fits a set of 2D data points to a set of Bezier Curve segments
* data * data
* Input data points * Input data points
* oCurve * oCurve
@@ -90,7 +90,7 @@ class FitCurveWrapper {
*/ */
void FitCurve(Vector2 *d, int nPts, double error); void FitCurve(Vector2 *d, int nPts, double error);
/*! Draws a Bezier curve segment /** Draws a Bezier curve segment
* n * n
* degree of curve (=3) * degree of curve (=3)
* curve * curve

View File

@@ -180,7 +180,7 @@ void GeomCleaner::SortAndCompressIndexedVertexArray(const float *iVertices,
delete[] tmpIndices; delete[] tmpIndices;
} }
/*! Defines a hash table used for searching the Cells */ /** Defines a hash table used for searching the Cells */
struct GeomCleanerHasher { struct GeomCleanerHasher {
#define _MUL 950706376UL #define _MUL 950706376UL
#define _MOD 2147483647UL #define _MOD 2147483647UL

View File

@@ -42,7 +42,7 @@ class GeomCleaner {
{ {
} }
/*! Sorts an array of Indexed vertices /** Sorts an array of Indexed vertices
* iVertices * iVertices
* Array of vertices to sort. * Array of vertices to sort.
* It is organized as a float series of vertex coordinates: XYZXYZXYZ... * It is organized as a float series of vertex coordinates: XYZXYZXYZ...
@@ -70,7 +70,7 @@ class GeomCleaner {
float **oVertices, float **oVertices,
unsigned **oIndices); unsigned **oIndices);
/*! Compress a SORTED indexed vertex array by eliminating multiple /** Compress a SORTED indexed vertex array by eliminating multiple
* appearing occurrences of a single vertex. * appearing occurrences of a single vertex.
* iVertices * iVertices
* The SORTED vertex array to compress. * The SORTED vertex array to compress.
@@ -99,7 +99,7 @@ class GeomCleaner {
unsigned *oVSize, unsigned *oVSize,
unsigned **oIndices); unsigned **oIndices);
/*! Sorts and compress an array of indexed vertices. /** Sorts and compress an array of indexed vertices.
* iVertices * iVertices
* The vertex array to sort then compress. It is organized as a float series of * The vertex array to sort then compress. It is organized as a float series of
* vertex coordinates: XYZXYZXYZ... * vertex coordinates: XYZXYZXYZ...
@@ -127,7 +127,7 @@ class GeomCleaner {
unsigned *oVSize, unsigned *oVSize,
unsigned **oIndices); unsigned **oIndices);
/*! Cleans an indexed vertex array. /** Cleans an indexed vertex array.
* (Identical to SortAndCompress except that we use here a hash table to create the new array.) * (Identical to SortAndCompress except that we use here a hash table to create the new array.)
* iVertices * iVertices
* The vertex array to sort then compress. It is organized as a float series of * The vertex array to sort then compress. It is organized as a float series of
@@ -161,10 +161,10 @@ class GeomCleaner {
#endif #endif
}; };
/*! Binary operators */ /** Binary operators */
// inline bool operator<(const IndexedVertex& iv1, const IndexedVertex& iv2); // inline bool operator<(const IndexedVertex& iv1, const IndexedVertex& iv2);
/*! Class Indexed Vertex. Used to represent an indexed vertex by storing the vertex coordinates as /** Class Indexed Vertex. Used to represent an indexed vertex by storing the vertex coordinates as
* well as its index */ * well as its index */
class IndexedVertex { class IndexedVertex {
private: private:
@@ -182,7 +182,7 @@ class IndexedVertex {
_index = iIndex; _index = iIndex;
} }
/*! accessors */ /** accessors */
inline const Vec3f &vector() const inline const Vec3f &vector() const
{ {
return _Vector; return _Vector;
@@ -208,7 +208,7 @@ class IndexedVertex {
return _Vector[2]; return _Vector[2];
} }
/*! modifiers */ /** modifiers */
inline void setVector(const Vec3f &iVector) inline void setVector(const Vec3f &iVector)
{ {
_Vector = iVector; _Vector = iVector;
@@ -219,7 +219,7 @@ class IndexedVertex {
_index = iIndex; _index = iIndex;
} }
/*! operators */ /** operators */
IndexedVertex &operator=(const IndexedVertex &iv) IndexedVertex &operator=(const IndexedVertex &iv)
{ {
_Vector = iv._Vector; _Vector = iv._Vector;

View File

@@ -40,7 +40,7 @@ namespace GeomUtils {
// //
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
/*! Computes the distance from a point P to a segment AB */ /** Computes the distance from a point P to a segment AB */
template<class T> real distPointSegment(const T &P, const T &A, const T &B) template<class T> real distPointSegment(const T &P, const T &A, const T &B)
{ {
T AB, AP, BP; T AB, AP, BP;
@@ -97,16 +97,16 @@ intersection_test intersect2dSeg2dSegParametric(const Vec2r &p1,
real &u, // I = P3 + u * P3P4 real &u, // I = P3 + u * P3P4
real epsilon = M_EPSILON); real epsilon = M_EPSILON);
/*! check whether a 2D segment intersect a 2D region or not */ /** check whether a 2D segment intersect a 2D region or not */
bool intersect2dSeg2dArea(const Vec2r &min, const Vec2r &max, const Vec2r &A, const Vec2r &B); bool intersect2dSeg2dArea(const Vec2r &min, const Vec2r &max, const Vec2r &A, const Vec2r &B);
/*! check whether a 2D segment is included in a 2D region or not */ /** check whether a 2D segment is included in a 2D region or not */
bool include2dSeg2dArea(const Vec2r &min, const Vec2r &max, const Vec2r &A, const Vec2r &B); bool include2dSeg2dArea(const Vec2r &min, const Vec2r &max, const Vec2r &A, const Vec2r &B);
/*! Box-triangle overlap test, adapted from Tomas Akenine-Möller code */ /** Box-triangle overlap test, adapted from Tomas Akenine-Möller code */
bool overlapTriangleBox(Vec3r &boxcenter, Vec3r &boxhalfsize, Vec3r triverts[3]); bool overlapTriangleBox(Vec3r &boxcenter, Vec3r &boxhalfsize, Vec3r triverts[3]);
/*! Fast, Minimum Storage Ray-Triangle Intersection, adapted from Tomas Möller and Ben Trumbore /** Fast, Minimum Storage Ray-Triangle Intersection, adapted from Tomas Möller and Ben Trumbore
* code. */ * code. */
bool intersectRayTriangle(const Vec3r &orig, bool intersectRayTriangle(const Vec3r &orig,
const Vec3r &dir, const Vec3r &dir,
@@ -118,7 +118,7 @@ bool intersectRayTriangle(const Vec3r &orig,
real &v, // I = (1 - u - v) * v0 + u * v1 + v * v2 real &v, // I = (1 - u - v) * v0 + u * v1 + v * v2
const real epsilon = M_EPSILON); // the epsilon to use const real epsilon = M_EPSILON); // the epsilon to use
/*! Intersection between plane and ray adapted from Graphics Gems, Didier Badouel */ /** Intersection between plane and ray adapted from Graphics Gems, Didier Badouel */
intersection_test intersectRayPlane(const Vec3r &orig, intersection_test intersectRayPlane(const Vec3r &orig,
const Vec3r &dir, // ray origin and direction const Vec3r &dir, // ray origin and direction
// plane's normal and offset (plane = { P / P.N + d = 0 }) // plane's normal and offset (plane = { P / P.N + d = 0 })
@@ -127,7 +127,7 @@ intersection_test intersectRayPlane(const Vec3r &orig,
real &t, // I = orig + t * dir real &t, // I = orig + t * dir
const real epsilon = M_EPSILON); // the epsilon to use const real epsilon = M_EPSILON); // the epsilon to use
/*! Intersection Ray-Bounding box (axis aligned). /** Intersection Ray-Bounding box (axis aligned).
* Adapted from Williams et al, "An Efficient Robust Ray-Box Intersection Algorithm", JGT 10:1 * Adapted from Williams et al, "An Efficient Robust Ray-Box Intersection Algorithm", JGT 10:1
* (2005), pp. 49-54. * (2005), pp. 49-54.
*/ */
@@ -142,7 +142,7 @@ bool intersectRayBBox(const Vec3r &orig,
real &tmax, // Imax = orig + tmax * dir is the second intersection real &tmax, // Imax = orig + tmax * dir is the second intersection
real epsilon = M_EPSILON); // the epsilon to use real epsilon = M_EPSILON); // the epsilon to use
/*! Checks whether 3D point P lies inside or outside of the triangle ABC */ /** Checks whether 3D point P lies inside or outside of the triangle ABC */
bool includePointTriangle(const Vec3r &P, const Vec3r &A, const Vec3r &B, const Vec3r &C); bool includePointTriangle(const Vec3r &P, const Vec3r &A, const Vec3r &B, const Vec3r &C);
void transformVertex(const Vec3r &vert, const Matrix44r &matrix, Vec3r &res); void transformVertex(const Vec3r &vert, const Matrix44r &matrix, Vec3r &res);
@@ -156,7 +156,7 @@ Vec3r rotateVector(const Matrix44r &mat, const Vec3r &v);
// //
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
/*! From world to image /** From world to image
* p * p
* point's coordinates expressed in world coordinates system * point's coordinates expressed in world coordinates system
* q * q
@@ -176,7 +176,7 @@ void fromWorldToImage(const Vec3r &p,
const real projection_matrix[4][4], const real projection_matrix[4][4],
const int viewport[4]); const int viewport[4]);
/*! From world to image /** From world to image
* p * p
* point's coordinates expressed in world coordinates system * point's coordinates expressed in world coordinates system
* q * q
@@ -189,7 +189,7 @@ void fromWorldToImage(const Vec3r &p,
*/ */
void fromWorldToImage(const Vec3r &p, Vec3r &q, const real transform[4][4], const int viewport[4]); void fromWorldToImage(const Vec3r &p, Vec3r &q, const real transform[4][4], const int viewport[4]);
/*! Projects from world coordinates to camera coordinates /** Projects from world coordinates to camera coordinates
* Returns the point's coordinates expressed in the camera's * Returns the point's coordinates expressed in the camera's
* coordinates system. * coordinates system.
* p * p
@@ -202,7 +202,7 @@ void fromWorldToImage(const Vec3r &p, Vec3r &q, const real transform[4][4], cons
*/ */
void fromWorldToCamera(const Vec3r &p, Vec3r &q, const real model_view_matrix[4][4]); void fromWorldToCamera(const Vec3r &p, Vec3r &q, const real model_view_matrix[4][4]);
/*! Projects from World Coordinates to retina coordinates /** Projects from World Coordinates to retina coordinates
* Returns the point's coordinates expressed in Retina system. * Returns the point's coordinates expressed in Retina system.
* p * p
* point's coordinates expressed in camera system * point's coordinates expressed in camera system
@@ -214,7 +214,7 @@ void fromWorldToCamera(const Vec3r &p, Vec3r &q, const real model_view_matrix[4]
*/ */
void fromCameraToRetina(const Vec3r &p, Vec3r &q, const real projection_matrix[4][4]); void fromCameraToRetina(const Vec3r &p, Vec3r &q, const real projection_matrix[4][4]);
/*! From retina to image. /** From retina to image.
* Returns the coordinates expressed in Image coordinates system. * Returns the coordinates expressed in Image coordinates system.
* p * p
* point's coordinates expressed in retina system * point's coordinates expressed in retina system
@@ -225,7 +225,7 @@ void fromCameraToRetina(const Vec3r &p, Vec3r &q, const real projection_matrix[4
*/ */
void fromRetinaToImage(const Vec3r &p, Vec3r &q, const int viewport[4]); void fromRetinaToImage(const Vec3r &p, Vec3r &q, const int viewport[4]);
/*! From image to retina /** From image to retina
* p * p
* point's coordinates expressed in image system * point's coordinates expressed in image system
* q * q
@@ -235,7 +235,7 @@ void fromRetinaToImage(const Vec3r &p, Vec3r &q, const int viewport[4]);
*/ */
void fromImageToRetina(const Vec3r &p, Vec3r &q, const int viewport[4]); void fromImageToRetina(const Vec3r &p, Vec3r &q, const int viewport[4]);
/*! computes the coordinates of q in the camera coordinates system, /** computes the coordinates of q in the camera coordinates system,
* using the known z coordinates of the 3D point. * using the known z coordinates of the 3D point.
* That means that this method does not inverse any matrices, * That means that this method does not inverse any matrices,
* it only computes X and Y from x,y and Z) * it only computes X and Y from x,y and Z)
@@ -249,7 +249,7 @@ void fromImageToRetina(const Vec3r &p, Vec3r &q, const int viewport[4]);
*/ */
void fromRetinaToCamera(const Vec3r &p, Vec3r &q, real focal, const real projection_matrix[4][4]); void fromRetinaToCamera(const Vec3r &p, Vec3r &q, real focal, const real projection_matrix[4][4]);
/*! Projects from camera coordinates to world coordinates /** Projects from camera coordinates to world coordinates
* Returns the point's coordinates expressed in the world's * Returns the point's coordinates expressed in the world's
* coordinates system. * coordinates system.
* p * p

View File

@@ -114,7 +114,7 @@ class GridVisitor {
#endif #endif
}; };
/*! Gathers all the occluders belonging to the cells traversed by the ray */ /** Gathers all the occluders belonging to the cells traversed by the ray */
class allOccludersGridVisitor : public GridVisitor { class allOccludersGridVisitor : public GridVisitor {
public: public:
allOccludersGridVisitor(OccludersSet &occluders) : GridVisitor(), occluders_(occluders) allOccludersGridVisitor(OccludersSet &occluders) : GridVisitor(), occluders_(occluders)
@@ -137,7 +137,7 @@ class allOccludersGridVisitor : public GridVisitor {
OccludersSet &occluders_; OccludersSet &occluders_;
}; };
/*! Finds the first intersection and breaks. /** Finds the first intersection and breaks.
* The occluder and the intersection information are stored and accessible. * The occluder and the intersection information are stored and accessible.
*/ */
class firstIntersectionGridVisitor : public GridVisitor { class firstIntersectionGridVisitor : public GridVisitor {
@@ -190,7 +190,7 @@ class firstIntersectionGridVisitor : public GridVisitor {
class Grid { class Grid {
public: public:
/*! Builds a Grid. Must be followed by a call to configure() */ /** Builds a Grid. Must be followed by a call to configure() */
Grid() Grid()
{ {
} }
@@ -200,12 +200,12 @@ class Grid {
clear(); clear();
} }
/*! clears the grid /** clears the grid
* Deletes all the cells, clears the hashtable, resets size, size of cell, number of cells. * Deletes all the cells, clears the hashtable, resets size, size of cell, number of cells.
*/ */
virtual void clear(); virtual void clear();
/*! Sets the different parameters of the grid /** Sets the different parameters of the grid
* orig * orig
* The grid origin * The grid origin
* size * size
@@ -215,7 +215,7 @@ class Grid {
*/ */
virtual void configure(const Vec3r &orig, const Vec3r &size, unsigned nb); virtual void configure(const Vec3r &orig, const Vec3r &size, unsigned nb);
/*! returns a vector of integer containing the coordinates of the cell containing the point /** returns a vector of integer containing the coordinates of the cell containing the point
* passed as argument * passed as argument
* p * p
* The point for which we're looking the cell * The point for which we're looking the cell
@@ -237,13 +237,13 @@ class Grid {
} }
} }
/*! Fills the case corresponding to coord with the cell */ /** Fills the case corresponding to coord with the cell */
virtual void fillCell(const Vec3u &coord, Cell &cell) = 0; virtual void fillCell(const Vec3u &coord, Cell &cell) = 0;
/*! returns the cell whose coordinates are passed as argument */ /** returns the cell whose coordinates are passed as argument */
virtual Cell *getCell(const Vec3u &coord) = 0; virtual Cell *getCell(const Vec3u &coord) = 0;
/*! returns the cell containing the point passed as argument. /** returns the cell containing the point passed as argument.
* If the cell is empty (contains no occluder), NULL is returned: * If the cell is empty (contains no occluder), NULL is returned:
* p * p
* The point for which we're looking the cell * The point for which we're looking the cell
@@ -255,7 +255,7 @@ class Grid {
return getCell(coord); return getCell(coord);
} }
/*! Retrieves the x,y,z coordinates of the origin of the cell whose coordinates (i,j,k) /** Retrieves the x,y,z coordinates of the origin of the cell whose coordinates (i,j,k)
* is passed as argument: * is passed as argument:
* cell_coord * cell_coord
* i,j,k integer coordinates for the cell * i,j,k integer coordinates for the cell
@@ -269,7 +269,7 @@ class Grid {
} }
} }
/*! Retrieves the box corresponding to the cell whose coordinates are passed as argument: /** Retrieves the box corresponding to the cell whose coordinates are passed as argument:
* cell_coord * cell_coord
* i,j,k integer coordinates for the cell * i,j,k integer coordinates for the cell
* min_out * min_out
@@ -283,19 +283,19 @@ class Grid {
max_out = min_out + _cell_size; max_out = min_out + _cell_size;
} }
/*! inserts a convex polygon occluder /** inserts a convex polygon occluder
* This method is quite coarse insofar as it adds all cells intersecting the polygon bounding * This method is quite coarse insofar as it adds all cells intersecting the polygon bounding
* box convex_poly The list of 3D points constituting a convex polygon * box convex_poly The list of 3D points constituting a convex polygon
*/ */
void insertOccluder(Polygon3r *occluder); void insertOccluder(Polygon3r *occluder);
/*! Adds an occluder to the list of occluders */ /** Adds an occluder to the list of occluders */
void addOccluder(Polygon3r *occluder) void addOccluder(Polygon3r *occluder)
{ {
_occluders.push_back(occluder); _occluders.push_back(occluder);
} }
/*! Casts a ray between a starting point and an ending point /** Casts a ray between a starting point and an ending point
* Returns the list of occluders contained in the cells intersected by this ray * Returns the list of occluders contained in the cells intersected by this ray
* Starts with a call to InitRay. * Starts with a call to InitRay.
*/ */
@@ -304,7 +304,7 @@ class Grid {
// Prepares to cast ray without generating OccludersSet // Prepares to cast ray without generating OccludersSet
void initAcceleratedRay(const Vec3r &orig, const Vec3r &end, unsigned timestamp); void initAcceleratedRay(const Vec3r &orig, const Vec3r &end, unsigned timestamp);
/*! Casts an infinite ray (still finishing at the end of the grid) from a starting point and in a /** Casts an infinite ray (still finishing at the end of the grid) from a starting point and in a
* given direction. Returns the list of occluders contained in the cells intersected by this ray * given direction. Returns the list of occluders contained in the cells intersected by this ray
* Starts with a call to InitRay. * Starts with a call to InitRay.
*/ */
@@ -316,22 +316,22 @@ class Grid {
// Prepares to cast ray without generating OccludersSet. // Prepares to cast ray without generating OccludersSet.
bool initAcceleratedInfiniteRay(const Vec3r &orig, const Vec3r &dir, unsigned timestamp); bool initAcceleratedInfiniteRay(const Vec3r &orig, const Vec3r &dir, unsigned timestamp);
/*! Casts an infinite ray (still finishing at the end of the grid) from a starting point and in a /** Casts an infinite ray (still finishing at the end of the grid) from a starting point and in a
* given direction. Returns the first intersection (occluder,t,u,v) or null. Starts with a call * given direction. Returns the first intersection (occluder,t,u,v) or null. Starts with a call
* to InitRay. * to InitRay.
*/ */
Polygon3r *castRayToFindFirstIntersection( Polygon3r *castRayToFindFirstIntersection(
const Vec3r &orig, const Vec3r &dir, double &t, double &u, double &v, unsigned timestamp); const Vec3r &orig, const Vec3r &dir, double &t, double &u, double &v, unsigned timestamp);
/*! Init all structures and values for computing the cells intersected by this new ray */ /** Init all structures and values for computing the cells intersected by this new ray */
void initRay(const Vec3r &orig, const Vec3r &end, unsigned timestamp); void initRay(const Vec3r &orig, const Vec3r &end, unsigned timestamp);
/*! Init all structures and values for computing the cells intersected by this infinite ray. /** Init all structures and values for computing the cells intersected by this infinite ray.
* Returns false if the ray doesn't intersect the grid. * Returns false if the ray doesn't intersect the grid.
*/ */
bool initInfiniteRay(const Vec3r &orig, const Vec3r &dir, unsigned timestamp); bool initInfiniteRay(const Vec3r &orig, const Vec3r &dir, unsigned timestamp);
/*! Accessors */ /** Accessors */
inline const Vec3r &getOrigin() const inline const Vec3r &getOrigin() const
{ {
return _orig; return _orig;
@@ -362,7 +362,7 @@ class Grid {
} }
protected: protected:
/*! Core of castRay and castInfiniteRay, find occluders along the given ray */ /** Core of castRay and castInfiniteRay, find occluders along the given ray */
inline void castRayInternal(GridVisitor &visitor) inline void castRayInternal(GridVisitor &visitor)
{ {
Cell *current_cell = NULL; Cell *current_cell = NULL;
@@ -383,7 +383,7 @@ class Grid {
} while ((!visitor.stop()) && (nextRayCell(_current_cell, _current_cell))); } while ((!visitor.stop()) && (nextRayCell(_current_cell, _current_cell)));
} }
/*! returns the cell next to the cell passed as argument. */ /** returns the cell next to the cell passed as argument. */
bool nextRayCell(Vec3u &current_cell, Vec3u &next_cell); bool nextRayCell(Vec3u &current_cell, Vec3u &next_cell);
unsigned int _timestamp; unsigned int _timestamp;

View File

@@ -38,7 +38,7 @@ namespace Freestyle {
namespace GridHelpers { namespace GridHelpers {
/*! Computes the distance from a point P to a segment AB */ /** Computes the distance from a point P to a segment AB */
template<class T> T closestPointToSegment(const T &P, const T &A, const T &B, real &distance) template<class T> T closestPointToSegment(const T &P, const T &A, const T &B, real &distance)
{ {
T AB, AP, BP; T AB, AP, BP;

View File

@@ -37,7 +37,7 @@
namespace Freestyle { namespace Freestyle {
/*! Defines a hash table used for searching the Cells */ /** Defines a hash table used for searching the Cells */
struct GridHasher { struct GridHasher {
#define _MUL 950706376UL #define _MUL 950706376UL
#define _MOD 2147483647UL #define _MOD 2147483647UL
@@ -51,7 +51,7 @@ struct GridHasher {
#undef _MOD #undef _MOD
}; };
/*! Class to define a regular grid used for ray casting computations */ /** Class to define a regular grid used for ray casting computations */
class HashGrid : public Grid { class HashGrid : public Grid {
public: public:
typedef map<Vec3u, Cell *> GridHashTable; typedef map<Vec3u, Cell *> GridHashTable;
@@ -65,12 +65,12 @@ class HashGrid : public Grid {
clear(); clear();
} }
/*! clears the grid /** clears the grid
* Deletes all the cells, clears the hashtable, resets size, size of cell, number of cells. * Deletes all the cells, clears the hashtable, resets size, size of cell, number of cells.
*/ */
virtual void clear(); virtual void clear();
/*! Sets the different parameters of the grid /** Sets the different parameters of the grid
* orig * orig
* The grid origin * The grid origin
* size * size
@@ -80,7 +80,7 @@ class HashGrid : public Grid {
*/ */
virtual void configure(const Vec3r &orig, const Vec3r &size, unsigned nb); virtual void configure(const Vec3r &orig, const Vec3r &size, unsigned nb);
/*! returns the cell whose coordinates are passed as argument */ /** returns the cell whose coordinates are passed as argument */
virtual Cell *getCell(const Vec3u &p) virtual Cell *getCell(const Vec3u &p)
{ {
Cell *found_cell = NULL; Cell *found_cell = NULL;
@@ -92,7 +92,7 @@ class HashGrid : public Grid {
return found_cell; return found_cell;
} }
/*! Fills the case p with the cell iCell */ /** Fills the case p with the cell iCell */
virtual void fillCell(const Vec3u &p, Cell &cell) virtual void fillCell(const Vec3u &p, Cell &cell)
{ {
_cells[p] = &cell; _cells[p] = &cell;

View File

@@ -37,33 +37,33 @@ namespace Freestyle {
using namespace Geometry; using namespace Geometry;
/*! Class to provide Perlin Noise functionalities */ /** Class to provide Perlin Noise functionalities */
class Noise { class Noise {
public: public:
/*! Builds a Noise object */ /** Builds a Noise object */
Noise(long seed = -1); Noise(long seed = -1);
/*! Destructor */ /** Destructor */
~Noise() ~Noise()
{ {
} }
/*! Returns a noise value for a 1D element */ /** Returns a noise value for a 1D element */
float turbulence1(float arg, float freq, float amp, unsigned oct = 4); float turbulence1(float arg, float freq, float amp, unsigned oct = 4);
/*! Returns a noise value for a 2D element */ /** Returns a noise value for a 2D element */
float turbulence2(Vec2f &v, float freq, float amp, unsigned oct = 4); float turbulence2(Vec2f &v, float freq, float amp, unsigned oct = 4);
/*! Returns a noise value for a 3D element */ /** Returns a noise value for a 3D element */
float turbulence3(Vec3f &v, float freq, float amp, unsigned oct = 4); float turbulence3(Vec3f &v, float freq, float amp, unsigned oct = 4);
/*! Returns a smooth noise value for a 1D element */ /** Returns a smooth noise value for a 1D element */
float smoothNoise1(float arg); float smoothNoise1(float arg);
/*! Returns a smooth noise value for a 2D element */ /** Returns a smooth noise value for a 2D element */
float smoothNoise2(Vec2f &vec); float smoothNoise2(Vec2f &vec);
/*! Returns a smooth noise value for a 3D element */ /** Returns a smooth noise value for a 3D element */
float smoothNoise3(Vec3f &vec); float smoothNoise3(Vec3f &vec);
private: private:

View File

@@ -205,7 +205,7 @@ class Polygon3r : public Polygon<Vec3r> {
return _normal; return _normal;
} }
/*! Check whether the Polygon intersects with the ray or not */ /** Check whether the Polygon intersects with the ray or not */
inline bool rayIntersect(const Vec3r &orig, inline bool rayIntersect(const Vec3r &orig,
const Vec3r &dir, const Vec3r &dir,
real &t, real &t,

View File

@@ -30,7 +30,7 @@
namespace Freestyle { namespace Freestyle {
/*! Class to define the intersection between two segments*/ /** Class to define the intersection between two segments*/
template<class Edge> class Intersection { template<class Edge> class Intersection {
public: public:
template<class EdgeClass> Intersection(EdgeClass *eA, real ta, EdgeClass *eB, real tb) template<class EdgeClass> Intersection(EdgeClass *eA, real ta, EdgeClass *eB, real tb)
@@ -51,7 +51,7 @@ template<class Edge> class Intersection {
userdata = 0; userdata = 0;
} }
/*! returns the parameter giving the intersection, for the edge iEdge */ /** returns the parameter giving the intersection, for the edge iEdge */
real getParameter(Edge *iEdge) real getParameter(Edge *iEdge)
{ {
if (iEdge == EdgeA) { if (iEdge == EdgeA) {
@@ -144,7 +144,7 @@ template<class T, class Point> class Segment {
_Intersections.push_back(i); _Intersections.push_back(i);
} }
/*! Checks for a common vertex with another edge */ /** Checks for a common vertex with another edge */
inline bool CommonVertex(const Segment<T, Point> &S, Point &CP) inline bool CommonVertex(const Segment<T, Point> &S, Point &CP)
{ {
if ((A == S[0]) || (A == S[1])) { if ((A == S[0]) || (A == S[1])) {
@@ -190,7 +190,7 @@ template<class T, class Point> class Segment {
# pragma warning(pop) # pragma warning(pop)
#endif #endif
/*! defines a binary function that can be overload by the user to specify at each condition the /** defines a binary function that can be overload by the user to specify at each condition the
* intersection between 2 edges must be computed * intersection between 2 edges must be computed
*/ */
template<class T1, class T2> struct binary_rule { template<class T1, class T2> struct binary_rule {

View File

@@ -54,7 +54,7 @@ class GaussianFilter {
GaussianFilter &operator=(const GaussianFilter &); GaussianFilter &operator=(const GaussianFilter &);
virtual ~GaussianFilter(); virtual ~GaussianFilter();
/*! Returns the value for pixel x,y of image "map" after a gaussian blur, made using the sigma /** Returns the value for pixel x,y of image "map" after a gaussian blur, made using the sigma
* value. The sigma value determines the mask size (~ 2 x sigma). * value. The sigma value determines the mask size (~ 2 x sigma).
* \param map: The image we wish to work on. * \param map: The image we wish to work on.
* The Map template must implement the following methods: * The Map template must implement the following methods:
@@ -70,12 +70,12 @@ class GaussianFilter {
*/ */
template<class Map> float getSmoothedPixel(Map *map, int x, int y); template<class Map> float getSmoothedPixel(Map *map, int x, int y);
/*! Compute the mask size and returns the REAL mask size ((2*_maskSize)-1) /** Compute the mask size and returns the REAL mask size ((2*_maskSize)-1)
* This method is provided for convenience. * This method is provided for convenience.
*/ */
static int computeMaskSize(float sigma); static int computeMaskSize(float sigma);
/*! accessors */ /** accessors */
inline float sigma() const inline float sigma() const
{ {
return _sigma; return _sigma;
@@ -91,7 +91,7 @@ class GaussianFilter {
return _bound; return _bound;
} }
/*! modifiers */ /** modifiers */
void setSigma(float sigma); void setSigma(float sigma);
#if 0 #if 0
void SetMaskSize(int size) void SetMaskSize(int size)

View File

@@ -34,14 +34,14 @@ namespace Freestyle {
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
/*! This class allows the storing of part of an image, while allowing a normal access to its pixel /** This class allows the storing of part of an image, while allowing a normal access to its pixel
* values. You can for example only a rectangle of sw*sh, whose lower-left corner is at (ox, oy), * values. You can for example only a rectangle of sw*sh, whose lower-left corner is at (ox, oy),
* of an image of size w*h, and access these pixels using x,y coordinates specified in the whole * of an image of size w*h, and access these pixels using x,y coordinates specified in the whole
* image coordinate system. * image coordinate system.
*/ */
class FrsImage { class FrsImage {
public: public:
/*! Default constructor */ /** Default constructor */
FrsImage() FrsImage()
{ {
_storedWidth = 0; _storedWidth = 0;
@@ -52,7 +52,7 @@ class FrsImage {
_Oy = 0; _Oy = 0;
} }
/*! Copy constructor */ /** Copy constructor */
FrsImage(const FrsImage &brother) FrsImage(const FrsImage &brother)
{ {
_storedWidth = brother._storedWidth; _storedWidth = brother._storedWidth;
@@ -63,7 +63,7 @@ class FrsImage {
_Oy = brother._Oy; _Oy = brother._Oy;
} }
/*! Builds an FrsImage from its width and height. /** Builds an FrsImage from its width and height.
* The memory is allocated consequently. * The memory is allocated consequently.
*/ */
FrsImage(unsigned w, unsigned h) FrsImage(unsigned w, unsigned h)
@@ -76,7 +76,7 @@ class FrsImage {
_Oy = 0; _Oy = 0;
} }
/*! Builds a partial-storing image. /** Builds a partial-storing image.
* \param w: * \param w:
* The width of the complete image * The width of the complete image
* \param h: * \param h:
@@ -100,7 +100,7 @@ class FrsImage {
_Oy = oy; _Oy = oy;
} }
/*! Operator= */ /** Operator= */
FrsImage &operator=(const FrsImage &brother) FrsImage &operator=(const FrsImage &brother)
{ {
_width = brother._width; _width = brother._width;
@@ -112,27 +112,27 @@ class FrsImage {
return *this; return *this;
} }
/*! Destructor */ /** Destructor */
virtual ~FrsImage() virtual ~FrsImage()
{ {
} }
/*! Returns the width of the complete image */ /** Returns the width of the complete image */
inline unsigned width() const inline unsigned width() const
{ {
return _width; return _width;
} }
/*! Returns the height of the complete image */ /** Returns the height of the complete image */
inline unsigned height() const inline unsigned height() const
{ {
return _height; return _height;
} }
/*! Returns the gray value for pixel x,y */ /** Returns the gray value for pixel x,y */
virtual float pixel(unsigned x, unsigned y) const = 0; virtual float pixel(unsigned x, unsigned y) const = 0;
/*! Sets the array. /** Sets the array.
* \param array: * \param array:
* The array containing the values we wish to store. * The array containing the values we wish to store.
* Its size is sw*sh. * Its size is sw*sh.
@@ -160,7 +160,7 @@ class FrsImage {
unsigned y, unsigned y,
bool copy = true) = 0; bool copy = true) = 0;
/*! Returns the array containing the pixels values. /** Returns the array containing the pixels values.
* Its size is sw*sh, i.e. potentially a smaller rectangular part of the complete image. * Its size is sw*sh, i.e. potentially a smaller rectangular part of the complete image.
*/ */
virtual float *getArray() = 0; virtual float *getArray() = 0;
@@ -206,7 +206,7 @@ class RGBImage : public FrsImage {
memcpy(_rgb, rgb, 3 * _width * _height * sizeof(float)); memcpy(_rgb, rgb, 3 * _width * _height * sizeof(float));
} }
/*! Builds an RGB partial image from the useful part buffer. /** Builds an RGB partial image from the useful part buffer.
* \param rgb: * \param rgb:
* The array of size 3*sw*sh containing the RGB values of the sw*sh pixels we need to stored. * The array of size 3*sw*sh containing the RGB values of the sw*sh pixels we need to stored.
* These sw*sh pixels constitute a rectangular part of a bigger * These sw*sh pixels constitute a rectangular part of a bigger
@@ -279,7 +279,7 @@ class RGBImage : public FrsImage {
return res / 32.0f; return res / 32.0f;
} }
/*! Sets the RGB array. /** Sets the RGB array.
* copy * copy
* If true, the array is copied, otherwise the pointer is copied * If true, the array is copied, otherwise the pointer is copied
*/ */
@@ -333,7 +333,7 @@ class GrayImage : public FrsImage {
memcpy(_lvl, brother._lvl, _storedWidth * _storedHeight * sizeof(*_lvl)); memcpy(_lvl, brother._lvl, _storedWidth * _storedHeight * sizeof(*_lvl));
} }
/*! Builds an empty gray image */ /** Builds an empty gray image */
GrayImage(unsigned w, unsigned h) : FrsImage(w, h) GrayImage(unsigned w, unsigned h) : FrsImage(w, h)
{ {
_lvl = new float[_width * _height]; _lvl = new float[_width * _height];
@@ -345,7 +345,7 @@ class GrayImage : public FrsImage {
memcpy(_lvl, lvl, _width * _height * sizeof(*_lvl)); memcpy(_lvl, lvl, _width * _height * sizeof(*_lvl));
} }
/*! Builds a partial image from the useful part buffer. /** Builds a partial image from the useful part buffer.
* \param lvl: * \param lvl:
* The array of size sw*sh containing the gray values of the sw*sh pixels we need to stored. * The array of size sw*sh containing the gray values of the sw*sh pixels we need to stored.
* These sw*sh pixels constitute a rectangular part of a bigger * These sw*sh pixels constitute a rectangular part of a bigger
@@ -391,7 +391,7 @@ class GrayImage : public FrsImage {
return _lvl[(y - _Oy) * _storedWidth + (x - _Ox)]; return _lvl[(y - _Oy) * _storedWidth + (x - _Ox)];
} }
/*! Sets the array. /** Sets the array.
* copy * copy
* If true, the array is copied, otherwise the pounsigneder is copied * If true, the array is copied, otherwise the pounsigneder is copied
*/ */
@@ -418,7 +418,7 @@ class GrayImage : public FrsImage {
memcpy(_lvl, lvl, _storedWidth * _storedHeight * sizeof(float)); memcpy(_lvl, lvl, _storedWidth * _storedHeight * sizeof(float));
} }
/*! Returns the array containing the gray values. */ /** Returns the array containing the gray values. */
virtual float *getArray() virtual float *getArray()
{ {
return _lvl; return _lvl;

View File

@@ -45,17 +45,17 @@ class ImagePyramid {
// ImagePyramid(const GrayImage& level0, unsigned nbLevels); // ImagePyramid(const GrayImage& level0, unsigned nbLevels);
virtual ~ImagePyramid(); virtual ~ImagePyramid();
/*! Builds the pyramid. /** Builds the pyramid.
* must be overloaded by inherited classes. * must be overloaded by inherited classes.
* if nbLevels==0, the complete pyramid is built * if nbLevels==0, the complete pyramid is built
*/ */
virtual void BuildPyramid(const GrayImage &level0, unsigned nbLevels) = 0; virtual void BuildPyramid(const GrayImage &level0, unsigned nbLevels) = 0;
/*! Builds a pyramid without copying the base level */ /** Builds a pyramid without copying the base level */
virtual void BuildPyramid(GrayImage *level0, unsigned nbLevels) = 0; virtual void BuildPyramid(GrayImage *level0, unsigned nbLevels) = 0;
virtual GrayImage *getLevel(int l); virtual GrayImage *getLevel(int l);
/*! Returns the pixel x,y using bilinear interpolation. /** Returns the pixel x,y using bilinear interpolation.
* \param x: * \param x:
* the abscissa specified in the finest level coordinate system * the abscissa specified in the finest level coordinate system
* \param y: * \param y:
@@ -65,13 +65,13 @@ class ImagePyramid {
*/ */
virtual float pixel(int x, int y, int level = 0); virtual float pixel(int x, int y, int level = 0);
/*! Returns the width of the level-th level image */ /** Returns the width of the level-th level image */
virtual int width(int level = 0); virtual int width(int level = 0);
/*! Returns the height of the level-th level image */ /** Returns the height of the level-th level image */
virtual int height(int level = 0); virtual int height(int level = 0);
/*! Returns the number of levels in the pyramid */ /** Returns the number of levels in the pyramid */
inline int getNumberOfLevels() const inline int getNumberOfLevels() const
{ {
return _levels.size(); return _levels.size();

View File

@@ -50,7 +50,7 @@ class DrawingStyle {
{ {
} }
/*! operators */ /** operators */
inline DrawingStyle &operator=(const DrawingStyle &ds); inline DrawingStyle &operator=(const DrawingStyle &ds);
inline void setStyle(const STYLE iStyle) inline void setStyle(const STYLE iStyle)

View File

@@ -29,13 +29,13 @@
namespace Freestyle { namespace Freestyle {
/*! Class defining a material */ /** Class defining a material */
class FrsMaterial { class FrsMaterial {
public: public:
/*! Default constructor */ /** Default constructor */
inline FrsMaterial(); inline FrsMaterial();
/*! Builds a Material from its line, diffuse, ambient, specular, emissive /** Builds a Material from its line, diffuse, ambient, specular, emissive
* colors, a shininess coefficient and line color priority. * colors, a shininess coefficient and line color priority.
* \param iLine: * \param iLine:
* A 4 element float-array containing the line color. * A 4 element float-array containing the line color.
@@ -60,177 +60,177 @@ class FrsMaterial {
const float iShininess, const float iShininess,
const int iPriority); const int iPriority);
/*! Copy constructor */ /** Copy constructor */
inline FrsMaterial(const FrsMaterial &m); inline FrsMaterial(const FrsMaterial &m);
/*! Destructor */ /** Destructor */
virtual ~FrsMaterial() virtual ~FrsMaterial()
{ {
} }
/*! Returns the line color as a 4 float array */ /** Returns the line color as a 4 float array */
inline const float *line() const inline const float *line() const
{ {
return Line; return Line;
} }
/*! Returns the red component of the line color */ /** Returns the red component of the line color */
inline const float lineR() const inline const float lineR() const
{ {
return Line[0]; return Line[0];
} }
/*! Returns the green component of the line color */ /** Returns the green component of the line color */
inline const float lineG() const inline const float lineG() const
{ {
return Line[1]; return Line[1];
} }
/*! Returns the blue component of the line color */ /** Returns the blue component of the line color */
inline const float lineB() const inline const float lineB() const
{ {
return Line[2]; return Line[2];
} }
/*! Returns the alpha component of the line color */ /** Returns the alpha component of the line color */
inline const float lineA() const inline const float lineA() const
{ {
return Line[3]; return Line[3];
} }
/*! Returns the diffuse color as a 4 float array */ /** Returns the diffuse color as a 4 float array */
inline const float *diffuse() const inline const float *diffuse() const
{ {
return Diffuse; return Diffuse;
} }
/*! Returns the red component of the diffuse color */ /** Returns the red component of the diffuse color */
inline const float diffuseR() const inline const float diffuseR() const
{ {
return Diffuse[0]; return Diffuse[0];
} }
/*! Returns the green component of the diffuse color */ /** Returns the green component of the diffuse color */
inline const float diffuseG() const inline const float diffuseG() const
{ {
return Diffuse[1]; return Diffuse[1];
} }
/*! Returns the blue component of the diffuse color */ /** Returns the blue component of the diffuse color */
inline const float diffuseB() const inline const float diffuseB() const
{ {
return Diffuse[2]; return Diffuse[2];
} }
/*! Returns the alpha component of the diffuse color */ /** Returns the alpha component of the diffuse color */
inline const float diffuseA() const inline const float diffuseA() const
{ {
return Diffuse[3]; return Diffuse[3];
} }
/*! Returns the specular color as a 4 float array */ /** Returns the specular color as a 4 float array */
inline const float *specular() const inline const float *specular() const
{ {
return Specular; return Specular;
} }
/*! Returns the red component of the specular color */ /** Returns the red component of the specular color */
inline const float specularR() const inline const float specularR() const
{ {
return Specular[0]; return Specular[0];
} }
/*! Returns the green component of the specular color */ /** Returns the green component of the specular color */
inline const float specularG() const inline const float specularG() const
{ {
return Specular[1]; return Specular[1];
} }
/*! Returns the blue component of the specular color */ /** Returns the blue component of the specular color */
inline const float specularB() const inline const float specularB() const
{ {
return Specular[2]; return Specular[2];
} }
/*! Returns the alpha component of the specular color */ /** Returns the alpha component of the specular color */
inline const float specularA() const inline const float specularA() const
{ {
return Specular[3]; return Specular[3];
} }
/*! Returns the ambient color as a 4 float array */ /** Returns the ambient color as a 4 float array */
inline const float *ambient() const inline const float *ambient() const
{ {
return Ambient; return Ambient;
} }
/*! Returns the red component of the ambient color */ /** Returns the red component of the ambient color */
inline const float ambientR() const inline const float ambientR() const
{ {
return Ambient[0]; return Ambient[0];
} }
/*! Returns the green component of the ambient color */ /** Returns the green component of the ambient color */
inline const float ambientG() const inline const float ambientG() const
{ {
return Ambient[1]; return Ambient[1];
} }
/*! Returns the blue component of the ambient color */ /** Returns the blue component of the ambient color */
inline const float ambientB() const inline const float ambientB() const
{ {
return Ambient[2]; return Ambient[2];
} }
/*! Returns the alpha component of the ambient color */ /** Returns the alpha component of the ambient color */
inline const float ambientA() const inline const float ambientA() const
{ {
return Ambient[3]; return Ambient[3];
} }
/*! Returns the emissive color as a 4 float array */ /** Returns the emissive color as a 4 float array */
inline const float *emission() const inline const float *emission() const
{ {
return Emission; return Emission;
} }
/*! Returns the red component of the emissive color */ /** Returns the red component of the emissive color */
inline const float emissionR() const inline const float emissionR() const
{ {
return Emission[0]; return Emission[0];
} }
/*! Returns the green component of the emissive color */ /** Returns the green component of the emissive color */
inline const float emissionG() const inline const float emissionG() const
{ {
return Emission[1]; return Emission[1];
} }
/*! Returns the blue component of the emissive color */ /** Returns the blue component of the emissive color */
inline const float emissionB() const inline const float emissionB() const
{ {
return Emission[2]; return Emission[2];
} }
/*! Returns the alpha component of the emissive color */ /** Returns the alpha component of the emissive color */
inline const float emissionA() const inline const float emissionA() const
{ {
return Emission[3]; return Emission[3];
} }
/*! Returns the shininess coefficient */ /** Returns the shininess coefficient */
inline const float shininess() const inline const float shininess() const
{ {
return Shininess; return Shininess;
} }
/*! Returns the line color priority */ /** Returns the line color priority */
inline const int priority() const inline const int priority() const
{ {
return Priority; return Priority;
} }
/*! Sets the line color. /** Sets the line color.
* \param r: * \param r:
* Red component * Red component
* \param g: * \param g:
@@ -242,7 +242,7 @@ class FrsMaterial {
*/ */
inline void setLine(const float r, const float g, const float b, const float a); inline void setLine(const float r, const float g, const float b, const float a);
/*! Sets the diffuse color. /** Sets the diffuse color.
* \param r: * \param r:
* Red component * Red component
* \param g: * \param g:
@@ -254,7 +254,7 @@ class FrsMaterial {
*/ */
inline void setDiffuse(const float r, const float g, const float b, const float a); inline void setDiffuse(const float r, const float g, const float b, const float a);
/*! Sets the specular color. /** Sets the specular color.
* \param r: * \param r:
* Red component * Red component
* \param g: * \param g:
@@ -266,7 +266,7 @@ class FrsMaterial {
*/ */
inline void setSpecular(const float r, const float g, const float b, const float a); inline void setSpecular(const float r, const float g, const float b, const float a);
/*! Sets the ambient color. /** Sets the ambient color.
* \param r: * \param r:
* Red component * Red component
* \param g: * \param g:
@@ -278,7 +278,7 @@ class FrsMaterial {
*/ */
inline void setAmbient(const float r, const float g, const float b, const float a); inline void setAmbient(const float r, const float g, const float b, const float a);
/*! Sets the emissive color. /** Sets the emissive color.
* \param r: * \param r:
* Red component * Red component
* \param g: * \param g:
@@ -290,13 +290,13 @@ class FrsMaterial {
*/ */
inline void setEmission(const float r, const float g, const float b, const float a); inline void setEmission(const float r, const float g, const float b, const float a);
/*! Sets the shininess. /** Sets the shininess.
* \param s: * \param s:
* Shininess * Shininess
*/ */
inline void setShininess(const float s); inline void setShininess(const float s);
/*! Sets the line color priority. /** Sets the line color priority.
* \param priority: * \param priority:
* Priority * Priority
*/ */
@@ -308,7 +308,7 @@ class FrsMaterial {
inline bool operator==(const FrsMaterial &m) const; inline bool operator==(const FrsMaterial &m) const;
private: private:
/*! Material properties */ /** Material properties */
float Line[4]; float Line[4];
float Diffuse[4]; float Diffuse[4];
float Specular[4]; float Specular[4];

View File

@@ -33,14 +33,14 @@ namespace Freestyle {
class IndexedFaceSet : public Rep { class IndexedFaceSet : public Rep {
public: public:
/*! Triangles description style:*/ /** Triangles description style:*/
enum TRIANGLES_STYLE { enum TRIANGLES_STYLE {
TRIANGLE_STRIP, TRIANGLE_STRIP,
TRIANGLE_FAN, TRIANGLE_FAN,
TRIANGLES, TRIANGLES,
}; };
/*! User-specified face and edge marks for feature edge detection */ /** User-specified face and edge marks for feature edge detection */
/* XXX Why in hell not use an enum here too? */ /* XXX Why in hell not use an enum here too? */
typedef unsigned char FaceEdgeMark; typedef unsigned char FaceEdgeMark;
static const FaceEdgeMark FACE_MARK = 1 << 0; static const FaceEdgeMark FACE_MARK = 1 << 0;
@@ -48,10 +48,10 @@ class IndexedFaceSet : public Rep {
static const FaceEdgeMark EDGE_MARK_V2V3 = 1 << 2; static const FaceEdgeMark EDGE_MARK_V2V3 = 1 << 2;
static const FaceEdgeMark EDGE_MARK_V3V1 = 1 << 3; static const FaceEdgeMark EDGE_MARK_V3V1 = 1 << 3;
/*! Builds an empty indexed face set. */ /** Builds an empty indexed face set. */
IndexedFaceSet(); IndexedFaceSet();
/*! Builds an indexed face set /** Builds an indexed face set
* iVertices * iVertices
* The array of object vertices 3D coordinates (for all faces). * The array of object vertices 3D coordinates (for all faces).
* If iCopy != 0, the array is copied; you must deallocate iVertices. Else you must not. * If iCopy != 0, the array is copied; you must deallocate iVertices. Else you must not.
@@ -126,7 +126,7 @@ class IndexedFaceSet : public Rep {
unsigned iTISize, unsigned iTISize,
unsigned iCopy = 1); unsigned iCopy = 1);
/*! Builds an indexed face set from an other indexed face set */ /** Builds an indexed face set from an other indexed face set */
IndexedFaceSet(const IndexedFaceSet &iBrother); IndexedFaceSet(const IndexedFaceSet &iBrother);
void swap(IndexedFaceSet &ioOther) void swap(IndexedFaceSet &ioOther)
@@ -166,18 +166,18 @@ class IndexedFaceSet : public Rep {
return *this; return *this;
} }
/*! Destructor /** Destructor
* deallocates all the resources * deallocates all the resources
*/ */
virtual ~IndexedFaceSet(); virtual ~IndexedFaceSet();
/*! Accept the corresponding visitor */ /** Accept the corresponding visitor */
virtual void accept(SceneVisitor &v); virtual void accept(SceneVisitor &v);
/*! Compute the Bounding Box */ /** Compute the Bounding Box */
virtual void ComputeBBox(); virtual void ComputeBBox();
/*! Accessors */ /** Accessors */
virtual const float *vertices() const virtual const float *vertices() const
{ {
return _Vertices; return _Vertices;

View File

@@ -32,10 +32,10 @@ using namespace std;
namespace Freestyle { namespace Freestyle {
/*! Base class for all lines objects */ /** Base class for all lines objects */
class LineRep : public Rep { class LineRep : public Rep {
public: public:
/*! Line description style */ /** Line description style */
enum LINES_STYLE { enum LINES_STYLE {
LINES, LINES,
LINE_STRIP, LINE_STRIP,
@@ -47,7 +47,7 @@ class LineRep : public Rep {
_width = 0.0f; _width = 0.0f;
} }
/*! Builds a single line from 2 vertices /** Builds a single line from 2 vertices
* v1 * v1
* first vertex * first vertex
* v2 * v2
@@ -61,7 +61,7 @@ class LineRep : public Rep {
_width = 0.0f; _width = 0.0f;
} }
/*! Builds a line rep from a vertex chain */ /** Builds a line rep from a vertex chain */
inline LineRep(const vector<Vec3r> &vertices) : Rep() inline LineRep(const vector<Vec3r> &vertices) : Rep()
{ {
_vertices = vertices; _vertices = vertices;
@@ -69,7 +69,7 @@ class LineRep : public Rep {
_width = 0.0f; _width = 0.0f;
} }
/*! Builds a line rep from a vertex chain */ /** Builds a line rep from a vertex chain */
inline LineRep(const list<Vec3r> &vertices) : Rep() inline LineRep(const list<Vec3r> &vertices) : Rep()
{ {
for (list<Vec3r>::const_iterator v = vertices.begin(), end = vertices.end(); v != end; ++v) { for (list<Vec3r>::const_iterator v = vertices.begin(), end = vertices.end(); v != end; ++v) {
@@ -84,7 +84,7 @@ class LineRep : public Rep {
_vertices.clear(); _vertices.clear();
} }
/*! accessors */ /** accessors */
inline const LINES_STYLE style() const inline const LINES_STYLE style() const
{ {
return _Style; return _Style;
@@ -100,7 +100,7 @@ class LineRep : public Rep {
return _width; return _width;
} }
/*! modifiers */ /** modifiers */
inline void setStyle(const LINES_STYLE iStyle) inline void setStyle(const LINES_STYLE iStyle)
{ {
_Style = iStyle; _Style = iStyle;
@@ -127,14 +127,14 @@ class LineRep : public Rep {
_width = iWidth; _width = iWidth;
} }
/*! Accept the corresponding visitor */ /** Accept the corresponding visitor */
virtual void accept(SceneVisitor &v) virtual void accept(SceneVisitor &v)
{ {
Rep::accept(v); Rep::accept(v);
v.visitLineRep(*this); v.visitLineRep(*this);
} }
/*! Computes the line bounding box.*/ /** Computes the line bounding box.*/
virtual void ComputeBBox(); virtual void ComputeBBox();
private: private:

View File

@@ -52,7 +52,7 @@ class Node : public BaseObject {
{ {
} }
/*! Accept the corresponding visitor /** Accept the corresponding visitor
* Each inherited node must overload this method * Each inherited node must overload this method
*/ */
virtual void accept(SceneVisitor &v) virtual void accept(SceneVisitor &v)
@@ -60,8 +60,8 @@ class Node : public BaseObject {
v.visitNode(*this); v.visitNode(*this);
} }
/*! bounding box management */ /** bounding box management */
/*! Returns the node bounding box /** Returns the node bounding box
* If no bounding box exists, an empty bbox is returned * If no bounding box exists, an empty bbox is returned
*/ */
virtual const BBox<Vec3r> &bbox() const virtual const BBox<Vec3r> &bbox() const
@@ -69,13 +69,13 @@ class Node : public BaseObject {
return _BBox; return _BBox;
} }
/*! Sets the Node bounding box */ /** Sets the Node bounding box */
virtual void setBBox(const BBox<Vec3r> &iBox) virtual void setBBox(const BBox<Vec3r> &iBox)
{ {
_BBox = iBox; _BBox = iBox;
} }
/*! Makes the union of _BBox and iBox */ /** Makes the union of _BBox and iBox */
virtual void AddBBox(const BBox<Vec3r> &iBox) virtual void AddBBox(const BBox<Vec3r> &iBox)
{ {
if (iBox.empty()) { if (iBox.empty()) {
@@ -90,13 +90,13 @@ class Node : public BaseObject {
} }
} }
/*! Updates the BBox */ /** Updates the BBox */
virtual const BBox<Vec3r> &UpdateBBox() virtual const BBox<Vec3r> &UpdateBBox()
{ {
return _BBox; return _BBox;
} }
/*! Clears the bounding box */ /** Clears the bounding box */
virtual void clearBBox() virtual void clearBBox()
{ {
_BBox.clear(); _BBox.clear();

View File

@@ -43,7 +43,7 @@ class NodeCamera : public Node {
GENERIC, GENERIC,
} CameraType; } CameraType;
/*! Default matrices: Identity for both projection and modelview. */ /** Default matrices: Identity for both projection and modelview. */
NodeCamera(CameraType camera_type = GENERIC); NodeCamera(CameraType camera_type = GENERIC);
#if 0 /* UNUSED, gives warning in gcc */ #if 0 /* UNUSED, gives warning in gcc */
NodeCamera(const NodeCamera &iBrother); NodeCamera(const NodeCamera &iBrother);
@@ -53,13 +53,13 @@ class NodeCamera : public Node {
{ {
} }
/*! Accept the corresponding visitor */ /** Accept the corresponding visitor */
virtual void accept(SceneVisitor &v); virtual void accept(SceneVisitor &v);
/*! Matrix is copied */ /** Matrix is copied */
void setModelViewMatrix(double modelview_matrix[16]); void setModelViewMatrix(double modelview_matrix[16]);
/*! Matrix is copied */ /** Matrix is copied */
void setProjectionMatrix(double projection_matrix[16]); void setProjectionMatrix(double projection_matrix[16]);
double *modelViewMatrix() double *modelViewMatrix()
@@ -89,7 +89,7 @@ class NodeOrthographicCamera : public NodeCamera {
public: public:
NodeOrthographicCamera(); NodeOrthographicCamera();
/*! Builds a parallel projection matrix a la glOrtho. /** Builds a parallel projection matrix a la glOrtho.
* A 0 0 tx * A 0 0 tx
* 0 B 0 ty * 0 B 0 ty
* 0 0 C tz * 0 0 C tz
@@ -155,7 +155,7 @@ class NodePerspectiveCamera : public NodeCamera {
public: public:
NodePerspectiveCamera(); NodePerspectiveCamera();
/*! Builds a perspective projection matrix a la gluPerspective. /** Builds a perspective projection matrix a la gluPerspective.
* Given f defined as follows: * Given f defined as follows:
* fovy * fovy
* f = cotangent(____) * f = cotangent(____)
@@ -177,7 +177,7 @@ class NodePerspectiveCamera : public NodeCamera {
*/ */
NodePerspectiveCamera(double fovy, double aspect, double zNear, double zFar); NodePerspectiveCamera(double fovy, double aspect, double zNear, double zFar);
/*! Builds a perspective projection matrix a la glFrustum. /** Builds a perspective projection matrix a la glFrustum.
* ( 2*zNear ) * ( 2*zNear )
* | __________ 0 A 0 | * | __________ 0 A 0 |
* | right-left | * | right-left |

View File

@@ -48,34 +48,34 @@ class NodeDrawingStyle : public NodeGroup {
_DrawingStyle = iDrawingStyle; _DrawingStyle = iDrawingStyle;
} }
/*! Sets the style. Must be one of FILLED, LINES, POINTS, INVISIBLE. */ /** Sets the style. Must be one of FILLED, LINES, POINTS, INVISIBLE. */
inline void setStyle(const DrawingStyle::STYLE iStyle) inline void setStyle(const DrawingStyle::STYLE iStyle)
{ {
_DrawingStyle.setStyle(iStyle); _DrawingStyle.setStyle(iStyle);
} }
/*! Sets the line width in the LINES style case */ /** Sets the line width in the LINES style case */
inline void setLineWidth(const float iLineWidth) inline void setLineWidth(const float iLineWidth)
{ {
_DrawingStyle.setLineWidth(iLineWidth); _DrawingStyle.setLineWidth(iLineWidth);
} }
/*! Sets the Point size in the POINTS style case */ /** Sets the Point size in the POINTS style case */
inline void setPointSize(const float iPointSize) inline void setPointSize(const float iPointSize)
{ {
_DrawingStyle.setPointSize(iPointSize); _DrawingStyle.setPointSize(iPointSize);
} }
/*! Enables or disables the lighting. true = enable */ /** Enables or disables the lighting. true = enable */
inline void setLightingEnabled(const bool iEnableLighting) inline void setLightingEnabled(const bool iEnableLighting)
{ {
_DrawingStyle.setLightingEnabled(iEnableLighting); _DrawingStyle.setLightingEnabled(iEnableLighting);
} }
/*! Accept the corresponding visitor */ /** Accept the corresponding visitor */
virtual void accept(SceneVisitor &v); virtual void accept(SceneVisitor &v);
/*! accessors */ /** accessors */
inline DrawingStyle::STYLE style() const inline DrawingStyle::STYLE style() const
{ {
return _DrawingStyle.style(); return _DrawingStyle.style();

View File

@@ -37,7 +37,7 @@ void NodeGroup::AddChild(Node *iChild)
int NodeGroup::destroy() int NodeGroup::destroy()
{ {
/*! Node::destroy makes a release on the object and then returns the reference counter. /** Node::destroy makes a release on the object and then returns the reference counter.
* If the reference counter is equal to 0, that means that nobody else is linking this node * If the reference counter is equal to 0, that means that nobody else is linking this node
* group and that we can destroy the whole underlying tree. Else, one or several Node link this * group and that we can destroy the whole underlying tree. Else, one or several Node link this
* node group, and we only returns the reference counter decremented by Node::destroy(); * node group, and we only returns the reference counter decremented by Node::destroy();

View File

@@ -42,33 +42,33 @@ class NodeGroup : public Node {
{ {
} }
/*! Adds a child. Makes a addRef on the iChild reference counter */ /** Adds a child. Makes a addRef on the iChild reference counter */
virtual void AddChild(Node *iChild); virtual void AddChild(Node *iChild);
/*! destroys all the underlying nodes /** destroys all the underlying nodes
* Returns the reference counter after having done a release() * Returns the reference counter after having done a release()
*/ */
virtual int destroy(); virtual int destroy();
/*! Detaches all the children */ /** Detaches all the children */
virtual void DetachChildren(); virtual void DetachChildren();
/*! Detached the specified child */ /** Detached the specified child */
virtual void DetachChild(Node *iChild); virtual void DetachChild(Node *iChild);
/*! Retrieve children */ /** Retrieve children */
virtual void RetrieveChildren(vector<Node *> &oNodes); virtual void RetrieveChildren(vector<Node *> &oNodes);
/*! Renders every children */ /** Renders every children */
// virtual void Render(Renderer *iRenderer); // virtual void Render(Renderer *iRenderer);
/*! Accept the corresponding visitor */ /** Accept the corresponding visitor */
virtual void accept(SceneVisitor &v); virtual void accept(SceneVisitor &v);
/*! Updates the BBox */ /** Updates the BBox */
virtual const BBox<Vec3r> &UpdateBBox(); virtual const BBox<Vec3r> &UpdateBBox();
/*! Returns the number of children */ /** Returns the number of children */
virtual int numberOfChildren() virtual int numberOfChildren()
{ {
return _Children.size(); return _Children.size();

View File

@@ -40,10 +40,10 @@ class NodeLight : public Node {
{ {
} }
/*! Accept the corresponding visitor */ /** Accept the corresponding visitor */
virtual void accept(SceneVisitor &v); virtual void accept(SceneVisitor &v);
/*! Accessors for the light properties */ /** Accessors for the light properties */
inline const float *ambient() const inline const float *ambient() const
{ {
return Ambient; return Ambient;
@@ -78,24 +78,24 @@ class NodeLight : public Node {
// Data members // Data members
// ============ // ============
/*! on=true, the light is on */ /** on=true, the light is on */
bool on; bool on;
/*! The color definition */ /** The color definition */
float Ambient[4]; float Ambient[4];
float Diffuse[4]; float Diffuse[4];
float Specular[4]; float Specular[4];
/*! Light position. if w = 0, the light is placed at infinite. */ /** Light position. if w = 0, the light is placed at infinite. */
float Position[4]; float Position[4];
/*! used to manage the number of lights */ /** used to manage the number of lights */
/*! numberOfLights /** numberOfLights
* the number of lights in the scene. * the number of lights in the scene.
* Initially, 0. * Initially, 0.
*/ */
static int numberOfLights; static int numberOfLights;
/*! The current lignt number */ /** The current lignt number */
int _number; int _number;
}; };

View File

@@ -46,7 +46,7 @@ class NodeShape : public Node {
virtual ~NodeShape(); virtual ~NodeShape();
/*! Adds a Rep to the _Shapes list /** Adds a Rep to the _Shapes list
* The delete of the rep is done when it is not used any more by the Scene Manager. * The delete of the rep is done when it is not used any more by the Scene Manager.
* So, it must not be deleted by the caller * So, it must not be deleted by the caller
*/ */
@@ -62,17 +62,17 @@ class NodeShape : public Node {
AddBBox(iRep->bbox()); AddBBox(iRep->bbox());
} }
/*! Accept the corresponding visitor */ /** Accept the corresponding visitor */
virtual void accept(SceneVisitor &v); virtual void accept(SceneVisitor &v);
/*! Sets the shape material */ /** Sets the shape material */
inline void setFrsMaterial(const FrsMaterial &iMaterial) inline void setFrsMaterial(const FrsMaterial &iMaterial)
{ {
_FrsMaterial = iMaterial; _FrsMaterial = iMaterial;
} }
/*! accessors */ /** accessors */
/*! returns the shape's material */ /** returns the shape's material */
inline FrsMaterial &frs_material() inline FrsMaterial &frs_material()
{ {
return _FrsMaterial; return _FrsMaterial;
@@ -84,10 +84,10 @@ class NodeShape : public Node {
} }
private: private:
/*! list of shapes */ /** list of shapes */
vector<Rep *> _Shapes; vector<Rep *> _Shapes;
/*! Shape Material */ /** Shape Material */
FrsMaterial _FrsMaterial; FrsMaterial _FrsMaterial;
}; };

View File

@@ -44,10 +44,10 @@ class NodeTransform : public NodeGroup {
{ {
} }
/*! multiplies the current matrix by the x, y, z translation matrix. */ /** multiplies the current matrix by the x, y, z translation matrix. */
void Translate(real x, real y, real z); void Translate(real x, real y, real z);
/*! multiplies the current matrix by a rotation matrix /** multiplies the current matrix by a rotation matrix
* iAngle * iAngle
* The rotation angle * The rotation angle
* x, y, z * x, y, z
@@ -55,32 +55,32 @@ class NodeTransform : public NodeGroup {
*/ */
void Rotate(real iAngle, real x, real y, real z); void Rotate(real iAngle, real x, real y, real z);
/*! multiplies the current matrix by a scaling matrix. /** multiplies the current matrix by a scaling matrix.
* x, y, z * x, y, z
* The scaling coefficients with respect to the x,y,z axis * The scaling coefficients with respect to the x,y,z axis
*/ */
void Scale(real x, real y, real z); void Scale(real x, real y, real z);
/*! Multiplies the current matrix by iMatrix */ /** Multiplies the current matrix by iMatrix */
void MultiplyMatrix(const Matrix44r &iMatrix); void MultiplyMatrix(const Matrix44r &iMatrix);
/*! Sets the current matrix to iMatrix */ /** Sets the current matrix to iMatrix */
void setMatrix(const Matrix44r &iMatrix); void setMatrix(const Matrix44r &iMatrix);
/*! Accept the corresponding visitor */ /** Accept the corresponding visitor */
virtual void accept(SceneVisitor &v); virtual void accept(SceneVisitor &v);
/*! Overloads the Node::AddBBox in order to take care about the transformation */ /** Overloads the Node::AddBBox in order to take care about the transformation */
virtual void AddBBox(const BBox<Vec3r> &iBBox); virtual void AddBBox(const BBox<Vec3r> &iBBox);
/*! Checks whether a matrix contains a scale factor or not. /** Checks whether a matrix contains a scale factor or not.
* Returns true if yes. * Returns true if yes.
* M * M
* The matrix to check * The matrix to check
*/ */
bool isScaled(const Matrix44r &M); bool isScaled(const Matrix44r &M);
/*! accessors */ /** accessors */
inline const Matrix44r &matrix() const inline const Matrix44r &matrix() const
{ {
return _Matrix; return _Matrix;

View File

@@ -49,7 +49,7 @@ class NodeViewLayer : public Node {
return _ViewLayer; return _ViewLayer;
} }
/*! Accept the corresponding visitor */ /** Accept the corresponding visitor */
virtual void accept(SceneVisitor &v); virtual void accept(SceneVisitor &v);
protected: protected:

View File

@@ -32,7 +32,7 @@ class OrientedLineRep : public LineRep {
OrientedLineRep() : LineRep() OrientedLineRep() : LineRep()
{ {
} }
/*! Builds a single line from 2 vertices /** Builds a single line from 2 vertices
* v1 * v1
* first vertex * first vertex
* v2 * v2
@@ -42,12 +42,12 @@ class OrientedLineRep : public LineRep {
{ {
} }
/*! Builds a line rep from a vertex chain */ /** Builds a line rep from a vertex chain */
inline OrientedLineRep(const vector<Vec3r> &vertices) : LineRep(vertices) inline OrientedLineRep(const vector<Vec3r> &vertices) : LineRep(vertices)
{ {
} }
/*! Builds a line rep from a vertex chain */ /** Builds a line rep from a vertex chain */
inline OrientedLineRep(const list<Vec3r> &vertices) : LineRep(vertices) inline OrientedLineRep(const list<Vec3r> &vertices) : LineRep(vertices)
{ {
} }
@@ -56,7 +56,7 @@ class OrientedLineRep : public LineRep {
{ {
} }
/*! Accept the corresponding visitor */ /** Accept the corresponding visitor */
virtual void accept(SceneVisitor &v); virtual void accept(SceneVisitor &v);
}; };

View File

@@ -102,7 +102,7 @@ class Rep : public BaseObject {
} }
} }
/*! Accept the corresponding visitor /** Accept the corresponding visitor
* Must be overload by inherited classes * Must be overload by inherited classes
*/ */
virtual void accept(SceneVisitor &v) virtual void accept(SceneVisitor &v)
@@ -113,13 +113,13 @@ class Rep : public BaseObject {
v.visitRep(*this); v.visitRep(*this);
} }
/*! Computes the rep bounding box. /** Computes the rep bounding box.
* Each Inherited rep must compute its bbox depending on the way the data are stored. So, each * Each Inherited rep must compute its bbox depending on the way the data are stored. So, each
* inherited class must overload this method * inherited class must overload this method
*/ */
virtual void ComputeBBox() = 0; virtual void ComputeBBox() = 0;
/*! Returns the rep bounding box */ /** Returns the rep bounding box */
virtual const BBox<Vec3f> &bbox() const virtual const BBox<Vec3f> &bbox() const
{ {
return _BBox; return _BBox;
@@ -145,7 +145,7 @@ class Rep : public BaseObject {
return _FrsMaterial; return _FrsMaterial;
} }
/*! Sets the Rep bounding box */ /** Sets the Rep bounding box */
virtual void setBBox(const BBox<Vec3f> &iBox) virtual void setBBox(const BBox<Vec3f> &iBox)
{ {
_BBox = iBox; _BBox = iBox;

View File

@@ -26,10 +26,10 @@
namespace Freestyle { namespace Freestyle {
/*! Base class for all lines objects */ /** Base class for all lines objects */
class TriangleRep : public Rep { class TriangleRep : public Rep {
public: public:
/*! Line description style */ /** Line description style */
enum TRIANGLE_STYLE { enum TRIANGLE_STYLE {
FILL, FILL,
LINES, LINES,
@@ -46,7 +46,7 @@ class TriangleRep : public Rep {
_Style = FILL; _Style = FILL;
} }
/*! Builds a triangle from 3 vertices /** Builds a triangle from 3 vertices
* v0 * v0
* first vertex * first vertex
* v1 * v1
@@ -83,7 +83,7 @@ class TriangleRep : public Rep {
{ {
} }
/*! accessors */ /** accessors */
inline const TRIANGLE_STYLE style() const inline const TRIANGLE_STYLE style() const
{ {
return _Style; return _Style;
@@ -99,7 +99,7 @@ class TriangleRep : public Rep {
return _colors[index]; return _colors[index];
} }
/*! modifiers */ /** modifiers */
inline void setStyle(const TRIANGLE_STYLE iStyle) inline void setStyle(const TRIANGLE_STYLE iStyle)
{ {
_Style = iStyle; _Style = iStyle;
@@ -129,14 +129,14 @@ class TriangleRep : public Rep {
_colors[2] = c2; _colors[2] = c2;
} }
/*! Accept the corresponding visitor */ /** Accept the corresponding visitor */
virtual void accept(SceneVisitor &v) virtual void accept(SceneVisitor &v)
{ {
Rep::accept(v); Rep::accept(v);
v.visitTriangleRep(*this); v.visitTriangleRep(*this);
} }
/*! Computes the triangle bounding box.*/ /** Computes the triangle bounding box.*/
virtual void ComputeBBox(); virtual void ComputeBBox();
}; };

View File

@@ -47,17 +47,17 @@ class VertexRep : public Rep {
{ {
} }
/*! Accept the corresponding visitor */ /** Accept the corresponding visitor */
virtual void accept(SceneVisitor &v) virtual void accept(SceneVisitor &v)
{ {
Rep::accept(v); Rep::accept(v);
v.visitVertexRep(*this); v.visitVertexRep(*this);
} }
/*! Computes the rep bounding box. */ /** Computes the rep bounding box. */
virtual void ComputeBBox(); virtual void ComputeBBox();
/*! accessors */ /** accessors */
inline const int vid() const inline const int vid() const
{ {
return _vid; return _vid;
@@ -88,7 +88,7 @@ class VertexRep : public Rep {
return _PointSize; return _PointSize;
} }
/*! modifiers */ /** modifiers */
inline void setVid(int id) inline void setVid(int id)
{ {
_vid = id; _vid = id;

View File

@@ -36,13 +36,13 @@ namespace Freestyle {
namespace Functions0D { namespace Functions0D {
// DensityF0D // DensityF0D
/*! Returns the density of the (result) image evaluated at an Interface0D. /** Returns the density of the (result) image evaluated at an Interface0D.
* This density is evaluated using a pixels square window around the evaluation point and * This density is evaluated using a pixels square window around the evaluation point and
* integrating these values using a gaussian. * integrating these values using a gaussian.
*/ */
class DensityF0D : public UnaryFunction0D<double> { class DensityF0D : public UnaryFunction0D<double> {
public: public:
/*! Builds the functor from the gaussian sigma value. /** Builds the functor from the gaussian sigma value.
* \param sigma: * \param sigma:
* sigma indicates the x value for which the gaussian function is 0.5. * sigma indicates the x value for which the gaussian function is 0.5.
* It leads to the window size value. (the larger, the smoother) * It leads to the window size value. (the larger, the smoother)
@@ -52,13 +52,13 @@ class DensityF0D : public UnaryFunction0D<double> {
_filter.setSigma((float)sigma); _filter.setSigma((float)sigma);
} }
/*! Returns the string "DensityF0D" */ /** Returns the string "DensityF0D" */
string getName() const string getName() const
{ {
return "DensityF0D"; return "DensityF0D";
} }
/*! The () operator. */ /** The () operator. */
int operator()(Interface0DIterator &iter); int operator()(Interface0DIterator &iter);
private: private:
@@ -66,7 +66,7 @@ class DensityF0D : public UnaryFunction0D<double> {
}; };
// LocalAverageDepthF0D // LocalAverageDepthF0D
/*! Returns the average depth around a point. /** Returns the average depth around a point.
* The result is obtained by querying the depth buffer on a window around that point. * The result is obtained by querying the depth buffer on a window around that point.
*/ */
class LocalAverageDepthF0D : public UnaryFunction0D<double> { class LocalAverageDepthF0D : public UnaryFunction0D<double> {
@@ -74,31 +74,31 @@ class LocalAverageDepthF0D : public UnaryFunction0D<double> {
GaussianFilter _filter; GaussianFilter _filter;
public: public:
/*! Builds the functor from the size of the mask that will be used. */ /** Builds the functor from the size of the mask that will be used. */
LocalAverageDepthF0D(real maskSize = 5.0f) : UnaryFunction0D<double>() LocalAverageDepthF0D(real maskSize = 5.0f) : UnaryFunction0D<double>()
{ {
_filter.setSigma((float)maskSize / 2.0f); _filter.setSigma((float)maskSize / 2.0f);
} }
/*! Returns the string "LocalAverageDepthF0D" */ /** Returns the string "LocalAverageDepthF0D" */
string getName() const string getName() const
{ {
return "LocalAverageDepthF0D"; return "LocalAverageDepthF0D";
} }
/*! the () operator. */ /** the () operator. */
int operator()(Interface0DIterator &iter); int operator()(Interface0DIterator &iter);
}; };
// ReadMapPixel // ReadMapPixel
/*! Reads a pixel in a map. */ /** Reads a pixel in a map. */
class ReadMapPixelF0D : public UnaryFunction0D<float> { class ReadMapPixelF0D : public UnaryFunction0D<float> {
private: private:
const char *_mapName; const char *_mapName;
int _level; int _level;
public: public:
/*! Builds the functor from name of the /** Builds the functor from name of the
* Map that must be read. * Map that must be read.
* \param iMapName: * \param iMapName:
* The name of the map. * The name of the map.
@@ -111,25 +111,25 @@ class ReadMapPixelF0D : public UnaryFunction0D<float> {
_level = level; _level = level;
} }
/*! Returns the string "ReadMapPixelF0D" */ /** Returns the string "ReadMapPixelF0D" */
string getName() const string getName() const
{ {
return "ReadMapPixelF0D"; return "ReadMapPixelF0D";
} }
/*! the () operator. */ /** the () operator. */
int operator()(Interface0DIterator &iter); int operator()(Interface0DIterator &iter);
}; };
// ReadSteerableViewMapPixel // ReadSteerableViewMapPixel
/*! Reads a pixel in one of the level of one of the steerable viewmaps. */ /** Reads a pixel in one of the level of one of the steerable viewmaps. */
class ReadSteerableViewMapPixelF0D : public UnaryFunction0D<float> { class ReadSteerableViewMapPixelF0D : public UnaryFunction0D<float> {
private: private:
unsigned _orientation; unsigned _orientation;
int _level; int _level;
public: public:
/*! Builds the functor /** Builds the functor
* \param nOrientation: * \param nOrientation:
* The integer belonging to [0,4] indicating the orientation (E,NE,N,NW) we are interested in. * The integer belonging to [0,4] indicating the orientation (E,NE,N,NW) we are interested in.
* \param level: * \param level:
@@ -141,24 +141,24 @@ class ReadSteerableViewMapPixelF0D : public UnaryFunction0D<float> {
_level = level; _level = level;
} }
/*! Returns the string "ReadSteerableViewMapPixelF0D" */ /** Returns the string "ReadSteerableViewMapPixelF0D" */
string getName() const string getName() const
{ {
return "ReadSteerableViewMapPixelF0D"; return "ReadSteerableViewMapPixelF0D";
} }
/*! the () operator. */ /** the () operator. */
int operator()(Interface0DIterator &iter); int operator()(Interface0DIterator &iter);
}; };
// ReadCompleteViewMapPixel // ReadCompleteViewMapPixel
/*! Reads a pixel in one of the level of the complete viewmap. */ /** Reads a pixel in one of the level of the complete viewmap. */
class ReadCompleteViewMapPixelF0D : public UnaryFunction0D<float> { class ReadCompleteViewMapPixelF0D : public UnaryFunction0D<float> {
private: private:
int _level; int _level;
public: public:
/*! Builds the functor /** Builds the functor
* \param level: * \param level:
* The level of the pyramid from which the pixel must be read. * The level of the pyramid from which the pixel must be read.
*/ */
@@ -167,25 +167,25 @@ class ReadCompleteViewMapPixelF0D : public UnaryFunction0D<float> {
_level = level; _level = level;
} }
/*! Returns the string "ReadCompleteViewMapPixelF0D" */ /** Returns the string "ReadCompleteViewMapPixelF0D" */
string getName() const string getName() const
{ {
return "ReadCompleteViewMapPixelF0D"; return "ReadCompleteViewMapPixelF0D";
} }
/*! the () operator. */ /** the () operator. */
int operator()(Interface0DIterator &iter); int operator()(Interface0DIterator &iter);
}; };
// GetViewMapGradientNormF0D // GetViewMapGradientNormF0D
/*! Returns the norm of the gradient of the global viewmap density image. */ /** Returns the norm of the gradient of the global viewmap density image. */
class GetViewMapGradientNormF0D : public UnaryFunction0D<float> { class GetViewMapGradientNormF0D : public UnaryFunction0D<float> {
private: private:
int _level; int _level;
float _step; float _step;
public: public:
/*! Builds the functor /** Builds the functor
* \param level: * \param level:
* The level of the pyramid from which the pixel must be read. * The level of the pyramid from which the pixel must be read.
*/ */
@@ -195,13 +195,13 @@ class GetViewMapGradientNormF0D : public UnaryFunction0D<float> {
_step = (float)pow(2.0, _level); _step = (float)pow(2.0, _level);
} }
/*! Returns the string "GetOccludeeF0D" */ /** Returns the string "GetOccludeeF0D" */
string getName() const string getName() const
{ {
return "GetViewMapGradientNormF0D"; return "GetViewMapGradientNormF0D";
} }
/*! the () operator. */ /** the () operator. */
int operator()(Interface0DIterator &iter); int operator()(Interface0DIterator &iter);
}; };

View File

@@ -35,7 +35,7 @@ namespace Freestyle {
namespace Functions1D { namespace Functions1D {
// DensityF1D // DensityF1D
/*! Returns the density evaluated for an Interface1D. /** Returns the density evaluated for an Interface1D.
* The density is evaluated for a set of points along the Interface1D (using the DensityF0D * The density is evaluated for a set of points along the Interface1D (using the DensityF0D
* functor) with a user-defined sampling and then integrated into a single value using a * functor) with a user-defined sampling and then integrated into a single value using a
* user-defined integration method. * user-defined integration method.
@@ -45,7 +45,7 @@ class DensityF1D : public UnaryFunction1D<double> {
float _sampling; float _sampling;
public: public:
/*! Builds the functor. /** Builds the functor.
* \param sigma: * \param sigma:
* Thesigma used in DensityF0D and determining the window size used in each density query. * Thesigma used in DensityF0D and determining the window size used in each density query.
* \param iType: * \param iType:
@@ -61,18 +61,18 @@ class DensityF1D : public UnaryFunction1D<double> {
_sampling = sampling; _sampling = sampling;
} }
/*! Destructor */ /** Destructor */
virtual ~DensityF1D() virtual ~DensityF1D()
{ {
} }
/*! Returns the string "DensityF1D"*/ /** Returns the string "DensityF1D"*/
string getName() const string getName() const
{ {
return "DensityF1D"; return "DensityF1D";
} }
/*! the () operator.*/ /** the () operator.*/
int operator()(Interface1D &inter) int operator()(Interface1D &inter)
{ {
result = integrate( result = integrate(
@@ -85,14 +85,14 @@ class DensityF1D : public UnaryFunction1D<double> {
}; };
// LocalAverageDepthF1D // LocalAverageDepthF1D
/*! Returns the average depth evaluated for an Interface1D. /** Returns the average depth evaluated for an Interface1D.
* The average depth is evaluated for a set of points along the Interface1D (using the * The average depth is evaluated for a set of points along the Interface1D (using the
* LocalAverageDepthF0D functor) with a user-defined sampling and then integrated into a single * LocalAverageDepthF0D functor) with a user-defined sampling and then integrated into a single
* value using a user-defined integration method. * value using a user-defined integration method.
*/ */
class LocalAverageDepthF1D : public UnaryFunction1D<double> { class LocalAverageDepthF1D : public UnaryFunction1D<double> {
public: public:
/*! Builds the functor. /** Builds the functor.
* \param sigma: * \param sigma:
* The sigma used in DensityF0D and determining the window size used in each density query. * The sigma used in DensityF0D and determining the window size used in each density query.
* \param iType: * \param iType:
@@ -103,13 +103,13 @@ class LocalAverageDepthF1D : public UnaryFunction1D<double> {
{ {
} }
/*! Returns the string "LocalAverageDepthF1D" */ /** Returns the string "LocalAverageDepthF1D" */
string getName() const string getName() const
{ {
return "LocalAverageDepthF1D"; return "LocalAverageDepthF1D";
} }
/*! the () operator. */ /** the () operator. */
int operator()(Interface1D &inter) int operator()(Interface1D &inter)
{ {
result = integrate(_fun, inter.verticesBegin(), inter.verticesEnd(), _integration); result = integrate(_fun, inter.verticesBegin(), inter.verticesEnd(), _integration);
@@ -121,14 +121,14 @@ class LocalAverageDepthF1D : public UnaryFunction1D<double> {
}; };
// GetCompleteViewMapDensity // GetCompleteViewMapDensity
/*! Returns the density evaluated for an Interface1D in the complete viewmap image. /** Returns the density evaluated for an Interface1D in the complete viewmap image.
* The density is evaluated for a set of points along the Interface1D (using the * The density is evaluated for a set of points along the Interface1D (using the
* ReadCompleteViewMapPixelF0D functor) and then integrated into a single value using a * ReadCompleteViewMapPixelF0D functor) and then integrated into a single value using a
* user-defined integration method. * user-defined integration method.
*/ */
class GetCompleteViewMapDensityF1D : public UnaryFunction1D<double> { class GetCompleteViewMapDensityF1D : public UnaryFunction1D<double> {
public: public:
/*! Builds the functor. /** Builds the functor.
* \param level: * \param level:
* The level of the pyramid from which * The level of the pyramid from which
* the pixel must be read. * the pixel must be read.
@@ -147,13 +147,13 @@ class GetCompleteViewMapDensityF1D : public UnaryFunction1D<double> {
_sampling = sampling; _sampling = sampling;
} }
/*! Returns the string "GetCompleteViewMapDensityF1D" */ /** Returns the string "GetCompleteViewMapDensityF1D" */
string getName() const string getName() const
{ {
return "GetCompleteViewMapDensityF1D"; return "GetCompleteViewMapDensityF1D";
} }
/*! the () operator. */ /** the () operator. */
int operator()(Interface1D &inter); int operator()(Interface1D &inter);
private: private:
@@ -162,7 +162,7 @@ class GetCompleteViewMapDensityF1D : public UnaryFunction1D<double> {
}; };
// GetDirectionalViewMapDensity // GetDirectionalViewMapDensity
/*! Returns the density evaluated for an Interface1D in of the steerable viewmaps image. /** Returns the density evaluated for an Interface1D in of the steerable viewmaps image.
* The direction telling which Directional map to choose is explicitly specified by the user. * The direction telling which Directional map to choose is explicitly specified by the user.
* The density is evaluated for a set of points along the Interface1D * The density is evaluated for a set of points along the Interface1D
* (using the ReadSteerableViewMapPixelF0D functor) * (using the ReadSteerableViewMapPixelF0D functor)
@@ -170,7 +170,7 @@ class GetCompleteViewMapDensityF1D : public UnaryFunction1D<double> {
*/ */
class GetDirectionalViewMapDensityF1D : public UnaryFunction1D<double> { class GetDirectionalViewMapDensityF1D : public UnaryFunction1D<double> {
public: public:
/*! Builds the functor. /** Builds the functor.
* \param iOrientation: * \param iOrientation:
* The number of the directional map we must work with. * The number of the directional map we must work with.
* \param level: * \param level:
@@ -191,13 +191,13 @@ class GetDirectionalViewMapDensityF1D : public UnaryFunction1D<double> {
_sampling = sampling; _sampling = sampling;
} }
/*! Returns the string "GetDirectionalViewMapDensityF1D" */ /** Returns the string "GetDirectionalViewMapDensityF1D" */
string getName() const string getName() const
{ {
return "GetDirectionalViewMapDensityF1D"; return "GetDirectionalViewMapDensityF1D";
} }
/*! the () operator. */ /** the () operator. */
int operator()(Interface1D &inter); int operator()(Interface1D &inter);
private: private:
@@ -206,7 +206,7 @@ class GetDirectionalViewMapDensityF1D : public UnaryFunction1D<double> {
}; };
// GetSteerableViewMapDensityF1D // GetSteerableViewMapDensityF1D
/*! Returns the density of the viewmap for a given Interface1D. The density of each FEdge is /** Returns the density of the viewmap for a given Interface1D. The density of each FEdge is
* evaluated in the proper steerable ViewMap depending on its orientation. * evaluated in the proper steerable ViewMap depending on its orientation.
*/ */
class GetSteerableViewMapDensityF1D : public UnaryFunction1D<double> { class GetSteerableViewMapDensityF1D : public UnaryFunction1D<double> {
@@ -215,7 +215,7 @@ class GetSteerableViewMapDensityF1D : public UnaryFunction1D<double> {
float _sampling; float _sampling;
public: public:
/*! Builds the functor from the level of the pyramid from which the pixel must be read. /** Builds the functor from the level of the pyramid from which the pixel must be read.
* \param level: * \param level:
* The level of the pyramid from which the pixel must be read. * The level of the pyramid from which the pixel must be read.
* \param iType: * \param iType:
@@ -232,23 +232,23 @@ class GetSteerableViewMapDensityF1D : public UnaryFunction1D<double> {
_sampling = sampling; _sampling = sampling;
} }
/*! Destructor */ /** Destructor */
virtual ~GetSteerableViewMapDensityF1D() virtual ~GetSteerableViewMapDensityF1D()
{ {
} }
/*! Returns the string "GetSteerableViewMapDensityF1D" */ /** Returns the string "GetSteerableViewMapDensityF1D" */
string getName() const string getName() const
{ {
return "GetSteerableViewMapDensityF1D"; return "GetSteerableViewMapDensityF1D";
} }
/*! the () operator. */ /** the () operator. */
int operator()(Interface1D &inter); int operator()(Interface1D &inter);
}; };
// GetViewMapGradientNormF1D // GetViewMapGradientNormF1D
/*! Returns the density of the viewmap for a given Interface1D. The density of each FEdge is /** Returns the density of the viewmap for a given Interface1D. The density of each FEdge is
* evaluated in the proper steerable ViewMap depending on its orientation. * evaluated in the proper steerable ViewMap depending on its orientation.
*/ */
class GetViewMapGradientNormF1D : public UnaryFunction1D<double> { class GetViewMapGradientNormF1D : public UnaryFunction1D<double> {
@@ -258,7 +258,7 @@ class GetViewMapGradientNormF1D : public UnaryFunction1D<double> {
Functions0D::GetViewMapGradientNormF0D _func; Functions0D::GetViewMapGradientNormF0D _func;
public: public:
/*! Builds the functor from the level of the pyramid from which the pixel must be read. /** Builds the functor from the level of the pyramid from which the pixel must be read.
* \param level: * \param level:
* The level of the pyramid from which the pixel must be read. * The level of the pyramid from which the pixel must be read.
* \param iType: * \param iType:
@@ -275,13 +275,13 @@ class GetViewMapGradientNormF1D : public UnaryFunction1D<double> {
_sampling = sampling; _sampling = sampling;
} }
/*! Returns the string "GetSteerableViewMapDensityF1D" */ /** Returns the string "GetSteerableViewMapDensityF1D" */
string getName() const string getName() const
{ {
return "GetViewMapGradientNormF1D"; return "GetViewMapGradientNormF1D";
} }
/*! the () operator. */ /** the () operator. */
int operator()(Interface1D &inter); int operator()(Interface1D &inter);
}; };

View File

@@ -38,12 +38,12 @@ namespace Freestyle {
namespace Predicates1D { namespace Predicates1D {
// DensityLowerThanUP1D // DensityLowerThanUP1D
/*! Returns true if the density evaluated for the /** Returns true if the density evaluated for the
* Interface1D is less than a user-defined density value. * Interface1D is less than a user-defined density value.
*/ */
class DensityLowerThanUP1D : public UnaryPredicate1D { class DensityLowerThanUP1D : public UnaryPredicate1D {
public: public:
/*! Builds the functor. /** Builds the functor.
* \param threshold: * \param threshold:
* The value of the threshold density. * The value of the threshold density.
* Any Interface1D having a density lower than this threshold will match. * Any Interface1D having a density lower than this threshold will match.
@@ -56,13 +56,13 @@ class DensityLowerThanUP1D : public UnaryPredicate1D {
_sigma = sigma; _sigma = sigma;
} }
/*! Returns the string "DensityLowerThanUP1D" */ /** Returns the string "DensityLowerThanUP1D" */
string getName() const string getName() const
{ {
return "DensityLowerThanUP1D"; return "DensityLowerThanUP1D";
} }
/*! The () operator. */ /** The () operator. */
int operator()(Interface1D &inter) int operator()(Interface1D &inter)
{ {
Functions1D::DensityF1D fun(_sigma); Functions1D::DensityF1D fun(_sigma);

View File

@@ -25,14 +25,14 @@
namespace Freestyle { namespace Freestyle {
/*! [ Thickness Shader ]. /** [ Thickness Shader ].
* Assigns thicknesses to the stroke vertices so that the stroke looks like made with a * Assigns thicknesses to the stroke vertices so that the stroke looks like made with a
* calligraphic tool. i.e. The stroke will be the thickest in a main direction, the thinnest in the * calligraphic tool. i.e. The stroke will be the thickest in a main direction, the thinnest in the
* direction perpendicular to this one, and an interpolation in between. * direction perpendicular to this one, and an interpolation in between.
*/ */
class CalligraphicShader : public StrokeShader { class CalligraphicShader : public StrokeShader {
public: public:
/*! Builds the shader. /** Builds the shader.
* \param iMinThickness: * \param iMinThickness:
* The minimum thickness in the direction perpendicular to the main direction. * The minimum thickness in the direction perpendicular to the main direction.
* \param iMaxThickness: * \param iMaxThickness:
@@ -47,12 +47,12 @@ class CalligraphicShader : public StrokeShader {
const Vec2f &iOrientation, const Vec2f &iOrientation,
bool clamp); bool clamp);
/*! Destructor. */ /** Destructor. */
virtual ~CalligraphicShader() virtual ~CalligraphicShader()
{ {
} }
/*! The shading method */ /** The shading method */
virtual int shade(Stroke &ioStroke) const; virtual int shade(Stroke &ioStroke) const;
protected: protected:
@@ -62,14 +62,14 @@ class CalligraphicShader : public StrokeShader {
bool _clamp; bool _clamp;
}; };
/*! [ Geometry Shader ]. /** [ Geometry Shader ].
* Spatial Noise stroke shader. * Spatial Noise stroke shader.
* Moves the vertices to make the stroke more noisy. * Moves the vertices to make the stroke more noisy.
* \see \htmlonly <a href=noise/noise.html>noise/noise.html</a> \endhtmlonly * \see \htmlonly <a href=noise/noise.html>noise/noise.html</a> \endhtmlonly
*/ */
class SpatialNoiseShader : public StrokeShader { class SpatialNoiseShader : public StrokeShader {
public: public:
/*! Builds the shader. /** Builds the shader.
* \param iAmount: * \param iAmount:
* The amplitude of the noise. * The amplitude of the noise.
* \param ixScale: * \param ixScale:
@@ -83,12 +83,12 @@ class SpatialNoiseShader : public StrokeShader {
*/ */
SpatialNoiseShader(float iAmount, float ixScale, int nbOctave, bool smooth, bool pureRandom); SpatialNoiseShader(float iAmount, float ixScale, int nbOctave, bool smooth, bool pureRandom);
/*! Destructor. */ /** Destructor. */
virtual ~SpatialNoiseShader() virtual ~SpatialNoiseShader()
{ {
} }
/*! The shading method. */ /** The shading method. */
virtual int shade(Stroke &ioStroke) const; virtual int shade(Stroke &ioStroke) const;
protected: protected:
@@ -99,7 +99,7 @@ class SpatialNoiseShader : public StrokeShader {
bool _pureRandom; bool _pureRandom;
}; };
/*! [ Geometry Shader ]. /** [ Geometry Shader ].
* Smooths the stroke. * Smooths the stroke.
* (Moves the vertices to make the stroke smoother). * (Moves the vertices to make the stroke smoother).
* Uses curvature flow to converge towards a curve of constant curvature. The diffusion method we * Uses curvature flow to converge towards a curve of constant curvature. The diffusion method we
@@ -108,7 +108,7 @@ class SpatialNoiseShader : public StrokeShader {
*/ */
class SmoothingShader : public StrokeShader { class SmoothingShader : public StrokeShader {
public: public:
/*! Builds the shader. /** Builds the shader.
* \param iNbIteration: * \param iNbIteration:
* The number of iterations. (400) * The number of iterations. (400)
* \param iFactorPoint: * \param iFactorPoint:
@@ -135,12 +135,12 @@ class SmoothingShader : public StrokeShader {
real iAnisoCurvature, real iAnisoCurvature,
real icarricatureFactor); real icarricatureFactor);
/*! Destructor. */ /** Destructor. */
virtual ~SmoothingShader() virtual ~SmoothingShader()
{ {
} }
/*! The shading method. */ /** The shading method. */
virtual int shade(Stroke &ioStroke) const; virtual int shade(Stroke &ioStroke) const;
protected: protected:
@@ -213,7 +213,7 @@ class Omitter : public Smoother {
real _lengthFlat; real _lengthFlat;
}; };
/*! Omission shader */ /** Omission shader */
class OmissionShader : public StrokeShader { class OmissionShader : public StrokeShader {
public: public:
OmissionShader(real sizeWindow, real thrVari, real thrFlat, real lFlat); OmissionShader(real sizeWindow, real thrVari, real thrFlat, real lFlat);

View File

@@ -47,12 +47,12 @@ namespace StrokeShaders {
// //
////////////////////////////////////////////////////// //////////////////////////////////////////////////////
/*! [ Thickness Shader ]. /** [ Thickness Shader ].
* Assigns an absolute constant thickness to every vertices of the Stroke. * Assigns an absolute constant thickness to every vertices of the Stroke.
*/ */
class ConstantThicknessShader : public StrokeShader { class ConstantThicknessShader : public StrokeShader {
public: public:
/*! Builds the shader. /** Builds the shader.
* \param thickness: * \param thickness:
* The thickness that must be assigned to the stroke. * The thickness that must be assigned to the stroke.
*/ */
@@ -61,18 +61,18 @@ class ConstantThicknessShader : public StrokeShader {
_thickness = thickness; _thickness = thickness;
} }
/*! Destructor. */ /** Destructor. */
virtual ~ConstantThicknessShader() virtual ~ConstantThicknessShader()
{ {
} }
/*! Returns the string "ConstantThicknessShader".*/ /** Returns the string "ConstantThicknessShader".*/
virtual string getName() const virtual string getName() const
{ {
return "ConstantThicknessShader"; return "ConstantThicknessShader";
} }
/*! The shading method. */ /** The shading method. */
virtual int shade(Stroke &stroke) const; virtual int shade(Stroke &stroke) const;
private: private:
@@ -106,7 +106,7 @@ class ConstantExternThicknessShader : public StrokeShader {
float _thickness; float _thickness;
}; };
/*! [ Thickness Shader ]. /** [ Thickness Shader ].
* Assigns thicknesses values such as the thickness increases from a thickness value A to a * Assigns thicknesses values such as the thickness increases from a thickness value A to a
* thickness value B between the first vertex to the midpoint vertex and then decreases from B to a * thickness value B between the first vertex to the midpoint vertex and then decreases from B to a
* A between this midpoint vertex and the last vertex. The thickness is linearly interpolated from * A between this midpoint vertex and the last vertex. The thickness is linearly interpolated from
@@ -114,7 +114,7 @@ class ConstantExternThicknessShader : public StrokeShader {
*/ */
class IncreasingThicknessShader : public StrokeShader { class IncreasingThicknessShader : public StrokeShader {
public: public:
/*! Builds the shader. /** Builds the shader.
* \param iThicknessMin: * \param iThicknessMin:
* The first thickness value. * The first thickness value.
* \param iThicknessMax: * \param iThicknessMax:
@@ -126,7 +126,7 @@ class IncreasingThicknessShader : public StrokeShader {
_ThicknessMax = iThicknessMax; _ThicknessMax = iThicknessMax;
} }
/*! Destructor.*/ /** Destructor.*/
virtual ~IncreasingThicknessShader() virtual ~IncreasingThicknessShader()
{ {
} }
@@ -136,7 +136,7 @@ class IncreasingThicknessShader : public StrokeShader {
return "IncreasingThicknessShader"; return "IncreasingThicknessShader";
} }
/*! The shading method. */ /** The shading method. */
virtual int shade(Stroke &stroke) const; virtual int shade(Stroke &stroke) const;
private: private:
@@ -144,7 +144,7 @@ class IncreasingThicknessShader : public StrokeShader {
float _ThicknessMax; float _ThicknessMax;
}; };
/*! [ Thickness shader ]. /** [ Thickness shader ].
* Same as previous but here we allow the user to control the ratio thickness/length so that we * Same as previous but here we allow the user to control the ratio thickness/length so that we
* don't get fat short lines * don't get fat short lines
*/ */
@@ -155,7 +155,7 @@ class ConstrainedIncreasingThicknessShader : public StrokeShader {
float _ratio; float _ratio;
public: public:
/*! Builds the shader. /** Builds the shader.
* \param iThicknessMin: * \param iThicknessMin:
* The first thickness value. * The first thickness value.
* \param iThicknessMax: * \param iThicknessMax:
@@ -171,7 +171,7 @@ class ConstrainedIncreasingThicknessShader : public StrokeShader {
_ratio = iRatio; _ratio = iRatio;
} }
/*! Destructor.*/ /** Destructor.*/
virtual ~ConstrainedIncreasingThicknessShader() virtual ~ConstrainedIncreasingThicknessShader()
{ {
} }
@@ -181,7 +181,7 @@ class ConstrainedIncreasingThicknessShader : public StrokeShader {
return "ConstrainedIncreasingThicknessShader"; return "ConstrainedIncreasingThicknessShader";
} }
/*! The shading method. */ /** The shading method. */
virtual int shade(Stroke &stroke) const; virtual int shade(Stroke &stroke) const;
}; };
@@ -217,7 +217,7 @@ class LengthDependingThicknessShader : public StrokeShader {
virtual int shade(Stroke &stroke) const; virtual int shade(Stroke &stroke) const;
}; };
/*! [ Thickness Shader ]. /** [ Thickness Shader ].
* Adds some noise to the stroke thickness. * Adds some noise to the stroke thickness.
* \see \htmlonly <a href=noise/noise.html>noise/noise.html</a>\endhtmlonly * \see \htmlonly <a href=noise/noise.html>noise/noise.html</a>\endhtmlonly
*/ */
@@ -229,7 +229,7 @@ class ThicknessNoiseShader : public StrokeShader {
public: public:
ThicknessNoiseShader(); ThicknessNoiseShader();
/*! Builds a Thickness Noise Shader /** Builds a Thickness Noise Shader
* \param iAmplitude: * \param iAmplitude:
* The amplitude of the noise signal * The amplitude of the noise signal
* \param iPeriod: * \param iPeriod:
@@ -242,7 +242,7 @@ class ThicknessNoiseShader : public StrokeShader {
return "ThicknessNoiseShader"; return "ThicknessNoiseShader";
} }
/*! The shading method. */ /** The shading method. */
virtual int shade(Stroke &stroke) const; virtual int shade(Stroke &stroke) const;
}; };
@@ -250,12 +250,12 @@ class ThicknessNoiseShader : public StrokeShader {
// Color shaders // Color shaders
// //
///////////////////////////////////////////////////////// /////////////////////////////////////////////////////////
/*! [ Color Shader ]. /** [ Color Shader ].
* Assigns a constant color to every vertices of the Stroke. * Assigns a constant color to every vertices of the Stroke.
*/ */
class ConstantColorShader : public StrokeShader { class ConstantColorShader : public StrokeShader {
public: public:
/*! Builds the shader from a user-specified color. /** Builds the shader from a user-specified color.
* \param iR: * \param iR:
* The red component * The red component
* \param iG: * \param iG:
@@ -278,14 +278,14 @@ class ConstantColorShader : public StrokeShader {
return "ConstantColorShader"; return "ConstantColorShader";
} }
/*! The shading method. */ /** The shading method. */
virtual int shade(Stroke &stroke) const; virtual int shade(Stroke &stroke) const;
private: private:
float _color[4]; float _color[4];
}; };
/*! [ Color Shader ]. /** [ Color Shader ].
* Assigns a varying color to the stroke. * Assigns a varying color to the stroke.
* The user specifies 2 colors A and B. The stroke color will change linearly from A to B between * The user specifies 2 colors A and B. The stroke color will change linearly from A to B between
* the first and the last vertex. * the first and the last vertex.
@@ -296,7 +296,7 @@ class IncreasingColorShader : public StrokeShader {
float _colorMax[4]; float _colorMax[4];
public: public:
/*! Builds the shader from 2 user-specified colors. /** Builds the shader from 2 user-specified colors.
* \param iRm: * \param iRm:
* The first color red component * The first color red component
* \param iGm: * \param iGm:
@@ -340,7 +340,7 @@ class IncreasingColorShader : public StrokeShader {
return "IncreasingColorShader"; return "IncreasingColorShader";
} }
/*! The shading method. */ /** The shading method. */
virtual int shade(Stroke &stroke) const; virtual int shade(Stroke &stroke) const;
}; };
@@ -366,7 +366,7 @@ class MaterialColorShader : public StrokeShader {
virtual int shade(Stroke &stroke) const; virtual int shade(Stroke &stroke) const;
}; };
/*! [ Color Shader ]. /** [ Color Shader ].
* Shader to add noise to the stroke colors. * Shader to add noise to the stroke colors.
*/ */
class ColorNoiseShader : public StrokeShader { class ColorNoiseShader : public StrokeShader {
@@ -377,7 +377,7 @@ class ColorNoiseShader : public StrokeShader {
public: public:
ColorNoiseShader(); ColorNoiseShader();
/*! Builds a Color Noise Shader /** Builds a Color Noise Shader
* \param iAmplitude: * \param iAmplitude:
* The amplitude of the noise signal * The amplitude of the noise signal
* \param iPeriod: * \param iPeriod:
@@ -390,7 +390,7 @@ class ColorNoiseShader : public StrokeShader {
return "ColorNoiseShader"; return "ColorNoiseShader";
} }
/*! The shading method. */ /** The shading method. */
virtual int shade(Stroke &stroke) const; virtual int shade(Stroke &stroke) const;
}; };
@@ -398,7 +398,7 @@ class ColorNoiseShader : public StrokeShader {
// Geometry Shaders // Geometry Shaders
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
/*! [ Geometry Shader ]. /** [ Geometry Shader ].
* Stretches the stroke at its two extremities and following the respective directions: v(1)v(0) * Stretches the stroke at its two extremities and following the respective directions: v(1)v(0)
* and v(n-1)v(n). * and v(n-1)v(n).
*/ */
@@ -407,7 +407,7 @@ class BackboneStretcherShader : public StrokeShader {
float _amount; float _amount;
public: public:
/*! Builds the shader. /** Builds the shader.
* \param iAmount: * \param iAmount:
* The stretching amount value. * The stretching amount value.
*/ */
@@ -421,11 +421,11 @@ class BackboneStretcherShader : public StrokeShader {
return "BackboneStretcherShader"; return "BackboneStretcherShader";
} }
/*! The shading method */ /** The shading method */
virtual int shade(Stroke &stroke) const; virtual int shade(Stroke &stroke) const;
}; };
/*! [ Geometry Shader. ] /** [ Geometry Shader. ]
* Resamples the stroke. * Resamples the stroke.
* \see Stroke::Resample(float). * \see Stroke::Resample(float).
*/ */
@@ -434,7 +434,7 @@ class SamplingShader : public StrokeShader {
float _sampling; float _sampling;
public: public:
/*! Builds the shader. /** Builds the shader.
* \param sampling: * \param sampling:
* The sampling to use for the stroke resampling * The sampling to use for the stroke resampling
*/ */
@@ -448,7 +448,7 @@ class SamplingShader : public StrokeShader {
return "SamplingShader"; return "SamplingShader";
} }
/*! The shading method */ /** The shading method */
virtual int shade(Stroke &stroke) const; virtual int shade(Stroke &stroke) const;
}; };
@@ -471,7 +471,7 @@ class ExternalContourStretcherShader : public StrokeShader {
}; };
// Bezier curve stroke shader // Bezier curve stroke shader
/*! [ Geometry Shader ]. /** [ Geometry Shader ].
* Transforms the stroke backbone geometry so that it corresponds to a Bezier Curve approximation * Transforms the stroke backbone geometry so that it corresponds to a Bezier Curve approximation
* of the original backbone geometry. \see \htmlonly <a * of the original backbone geometry. \see \htmlonly <a
* href=bezier/bezier.html>bezier/bezier.html</a> \endhtmlonly * href=bezier/bezier.html>bezier/bezier.html</a> \endhtmlonly
@@ -481,7 +481,7 @@ class BezierCurveShader : public StrokeShader {
float _error; float _error;
public: public:
/*! Builds the shader. /** Builds the shader.
* \param error: * \param error:
* The error we're allowing for the approximation. * The error we're allowing for the approximation.
* This error is the max distance allowed between the new curve and the original geometry. * This error is the max distance allowed between the new curve and the original geometry.
@@ -496,11 +496,11 @@ class BezierCurveShader : public StrokeShader {
return "BezierCurveShader"; return "BezierCurveShader";
} }
/*! The shading method */ /** The shading method */
virtual int shade(Stroke &stroke) const; virtual int shade(Stroke &stroke) const;
}; };
/*! [ Geometry Shader ]. /** [ Geometry Shader ].
* Shader to modify the Stroke geometry so that it looks more "polygonal". * Shader to modify the Stroke geometry so that it looks more "polygonal".
* The basic idea is to start from the minimal stroke approximation consisting in a line joining * The basic idea is to start from the minimal stroke approximation consisting in a line joining
* the first vertex to the last one and to subdivide using the original stroke vertices until a * the first vertex to the last one and to subdivide using the original stroke vertices until a
@@ -511,7 +511,7 @@ class PolygonalizationShader : public StrokeShader {
float _error; float _error;
public: public:
/*! Builds the shader. /** Builds the shader.
* \param iError: * \param iError:
* The error we want our polygonal approximation to have with respect to the original * The error we want our polygonal approximation to have with respect to the original
* geometry. The smaller, the closer the new stroke to the original one. * geometry. The smaller, the closer the new stroke to the original one.
@@ -527,11 +527,11 @@ class PolygonalizationShader : public StrokeShader {
return "PolygonalizationShader"; return "PolygonalizationShader";
} }
/*! The shading method */ /** The shading method */
virtual int shade(Stroke &stroke) const; virtual int shade(Stroke &stroke) const;
}; };
/*! [ Geometry Shader ]. /** [ Geometry Shader ].
* Shader to modify the Stroke geometry so that it corresponds to its main direction line. * Shader to modify the Stroke geometry so that it corresponds to its main direction line.
* This shader must be used together with the splitting operator using the curvature criterion. * This shader must be used together with the splitting operator using the curvature criterion.
* Indeed, the precision of the approximation will depend on the size of the stroke's pieces. * Indeed, the precision of the approximation will depend on the size of the stroke's pieces.
@@ -542,7 +542,7 @@ class GuidingLinesShader : public StrokeShader {
float _offset; float _offset;
public: public:
/*! Builds a Guiding Lines shader /** Builds a Guiding Lines shader
* \param iOffset: * \param iOffset:
* The line that replaces the stroke is initially in the middle of the initial stroke * The line that replaces the stroke is initially in the middle of the initial stroke
* "bbox". iOffset is the value of the displacement which is applied to this line along its * "bbox". iOffset is the value of the displacement which is applied to this line along its
@@ -558,27 +558,27 @@ class GuidingLinesShader : public StrokeShader {
return "GuidingLinesShader"; return "GuidingLinesShader";
} }
/*! The shading method */ /** The shading method */
virtual int shade(Stroke &stroke) const; virtual int shade(Stroke &stroke) const;
}; };
/*! [ Geometry Shader ]. /** [ Geometry Shader ].
* Removes the stroke's extremities. * Removes the stroke's extremities.
*/ */
class TipRemoverShader : public StrokeShader { class TipRemoverShader : public StrokeShader {
public: public:
/*! Builds the shader. /** Builds the shader.
* \param tipLength: * \param tipLength:
* The length of the piece of stroke we want to remove at each extremity. * The length of the piece of stroke we want to remove at each extremity.
*/ */
TipRemoverShader(real tipLength); TipRemoverShader(real tipLength);
/*! Destructor. */ /** Destructor. */
virtual ~TipRemoverShader() virtual ~TipRemoverShader()
{ {
} }
/*! The shading method */ /** The shading method */
virtual string getName() const virtual string getName() const
{ {
return "TipRemoverShader"; return "TipRemoverShader";
@@ -590,7 +590,7 @@ class TipRemoverShader : public StrokeShader {
real _tipLength; real _tipLength;
}; };
/*! [ Texture Shader ]. /** [ Texture Shader ].
* Shader to assign texture to the Stroke material. * Shader to assign texture to the Stroke material.
*/ */
@@ -600,7 +600,7 @@ class BlenderTextureShader : public StrokeShader {
bNodeTree *_nodeTree; bNodeTree *_nodeTree;
public: public:
/*! Builds the shader. /** Builds the shader.
* \param mtex: * \param mtex:
* The blender texture to use. * The blender texture to use.
*/ */
@@ -610,7 +610,7 @@ class BlenderTextureShader : public StrokeShader {
_nodeTree = NULL; _nodeTree = NULL;
} }
/*! Builds the shader. /** Builds the shader.
* \param nodetree: * \param nodetree:
* A node tree (of new shading nodes) to define textures. * A node tree (of new shading nodes) to define textures.
*/ */
@@ -625,11 +625,11 @@ class BlenderTextureShader : public StrokeShader {
return "BlenderTextureShader"; return "BlenderTextureShader";
} }
/*! The shading method */ /** The shading method */
virtual int shade(Stroke &stroke) const; virtual int shade(Stroke &stroke) const;
}; };
/*! [ Texture Shader ]. /** [ Texture Shader ].
* Shader to assign texture to the Stroke material. * Shader to assign texture to the Stroke material.
*/ */
@@ -638,7 +638,7 @@ class StrokeTextureStepShader : public StrokeShader {
float _step; float _step;
public: public:
/*! Builds the shader. /** Builds the shader.
* \param id: * \param id:
* The number of the preset to use. * The number of the preset to use.
*/ */
@@ -652,7 +652,7 @@ class StrokeTextureStepShader : public StrokeShader {
return "StrokeTextureStepShader"; return "StrokeTextureStepShader";
} }
/*! The shading method */ /** The shading method */
virtual int shade(Stroke &stroke) const; virtual int shade(Stroke &stroke) const;
}; };

View File

@@ -60,12 +60,12 @@ class ImagePyramid;
class SteerableViewMap; class SteerableViewMap;
class StyleModule; class StyleModule;
/*! Class to define the canvas on which strokes are drawn. /** Class to define the canvas on which strokes are drawn.
* It's used to store state information about the drawing. * It's used to store state information about the drawing.
*/ */
class Canvas { class Canvas {
public: public:
/*! Returns a pointer on the Canvas instance */ /** Returns a pointer on the Canvas instance */
static Canvas *getInstance() static Canvas *getInstance()
{ {
return _pInstance; return _pInstance;
@@ -136,7 +136,7 @@ class Canvas {
} }
/* Maps management */ /* Maps management */
/*! Loads an image map. The map will be scaled /** Loads an image map. The map will be scaled
* (without preserving the ratio in order to fit the actual canvas size.). * (without preserving the ratio in order to fit the actual canvas size.).
* The image must be a gray values image... * The image must be a gray values image...
* \param iFileName: * \param iFileName:
@@ -152,7 +152,7 @@ class Canvas {
unsigned iNbLevels = 4, unsigned iNbLevels = 4,
float iSigma = 1.0f); float iSigma = 1.0f);
/*! Reads a pixel value in a map. /** Reads a pixel value in a map.
* Returns a value between 0 and 1. * Returns a value between 0 and 1.
* \param iMapName: * \param iMapName:
* The name of the map * The name of the map
@@ -167,19 +167,19 @@ class Canvas {
*/ */
float readMapPixel(const char *iMapName, int level, int x, int y); float readMapPixel(const char *iMapName, int level, int x, int y);
/*! Sets the steerable viewmap */ /** Sets the steerable viewmap */
void loadSteerableViewMap(SteerableViewMap *iSVM) void loadSteerableViewMap(SteerableViewMap *iSVM)
{ {
_steerableViewMap = iSVM; _steerableViewMap = iSVM;
} }
/*! Returns the steerable VM */ /** Returns the steerable VM */
SteerableViewMap *getSteerableViewMap() SteerableViewMap *getSteerableViewMap()
{ {
return _steerableViewMap; return _steerableViewMap;
} }
/*! accessors */ /** accessors */
inline const FEdge *selectedFEdge() const inline const FEdge *selectedFEdge() const
{ {
return _SelectedFEdge; return _SelectedFEdge;
@@ -215,13 +215,13 @@ class Canvas {
return stroke_count; return stroke_count;
} }
/*! modifiers */ /** modifiers */
inline void setSelectedFEdge(FEdge *iFEdge) inline void setSelectedFEdge(FEdge *iFEdge)
{ {
_SelectedFEdge = iFEdge; _SelectedFEdge = iFEdge;
} }
/*! inserts a shader at pos index+1 */ /** inserts a shader at pos index+1 */
void PushBackStyleModule(StyleModule *iStyleModule); void PushBackStyleModule(StyleModule *iStyleModule);
void InsertStyleModule(unsigned index, StyleModule *iStyleModule); void InsertStyleModule(unsigned index, StyleModule *iStyleModule);
void RemoveStyleModule(unsigned index); void RemoveStyleModule(unsigned index);

View File

@@ -27,7 +27,7 @@
namespace Freestyle { namespace Freestyle {
/*! Class to represent a 1D elements issued from the chaining process. /** Class to represent a 1D elements issued from the chaining process.
* A Chain is the last step before the Stroke and is used in the Splitting and Creation processes. * A Chain is the last step before the Stroke and is used in the Splitting and Creation processes.
*/ */
class Chain : public Curve { class Chain : public Curve {
@@ -38,28 +38,28 @@ class Chain : public Curve {
_fedgeB; // the last FEdge of the ViewEdge passed to the last call for push_viewedge_back(). _fedgeB; // the last FEdge of the ViewEdge passed to the last call for push_viewedge_back().
public: public:
/*! Default constructor. */ /** Default constructor. */
Chain() : Curve() Chain() : Curve()
{ {
_splittingId = 0; _splittingId = 0;
_fedgeB = 0; _fedgeB = 0;
} }
/*! Builds a chain from its Id. */ /** Builds a chain from its Id. */
Chain(const Id &id) : Curve(id) Chain(const Id &id) : Curve(id)
{ {
_splittingId = 0; _splittingId = 0;
_fedgeB = 0; _fedgeB = 0;
} }
/*! Copy Constructor */ /** Copy Constructor */
Chain(const Chain &iBrother) : Curve(iBrother) Chain(const Chain &iBrother) : Curve(iBrother)
{ {
_splittingId = iBrother._splittingId; _splittingId = iBrother._splittingId;
_fedgeB = iBrother._fedgeB; _fedgeB = iBrother._fedgeB;
} }
/*! Destructor. */ /** Destructor. */
virtual ~Chain() virtual ~Chain()
{ {
// only the last splitted deletes this id // only the last splitted deletes this id
@@ -70,13 +70,13 @@ class Chain : public Curve {
} }
} }
/*! Returns the string "Chain" */ /** Returns the string "Chain" */
virtual string getExactTypeName() const virtual string getExactTypeName() const
{ {
return "Chain"; return "Chain";
} }
/*! Adds a ViewEdge at the end of the chain /** Adds a ViewEdge at the end of the chain
* \param iViewEdge: * \param iViewEdge:
* The ViewEdge that must be added. * The ViewEdge that must be added.
* \param orientation: * \param orientation:
@@ -84,7 +84,7 @@ class Chain : public Curve {
*/ */
void push_viewedge_back(ViewEdge *iViewEdge, bool orientation); void push_viewedge_back(ViewEdge *iViewEdge, bool orientation);
/*! Adds a ViewEdge at the beginning of the chain /** Adds a ViewEdge at the beginning of the chain
* \param iViewEdge: * \param iViewEdge:
* The ViewEdge that must be added. * The ViewEdge that must be added.
* \param orientation: * \param orientation:

View File

@@ -98,11 +98,11 @@ class AdjacencyIterator : public Iterator {
return _internalIterator.isBegin(); return _internalIterator.isBegin();
} }
/*! Returns true if the current ViewEdge is coming towards the iteration vertex. /** Returns true if the current ViewEdge is coming towards the iteration vertex.
* False otherwise. */ * False otherwise. */
bool isIncoming() const; bool isIncoming() const;
/*! Returns a *pointer* to the pointed ViewEdge. */ /** Returns a *pointer* to the pointed ViewEdge. */
virtual ViewEdge *operator*(); virtual ViewEdge *operator*();
virtual ViewEdge *operator->() virtual ViewEdge *operator->()
@@ -140,7 +140,7 @@ class AdjacencyIterator : public Iterator {
// //
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
/*! Base class for chaining iterators. /** Base class for chaining iterators.
* This class is designed to be overloaded in order to describe chaining rules. * This class is designed to be overloaded in order to describe chaining rules.
* It makes the works of chaining rules description easier. * It makes the works of chaining rules description easier.
* The two main methods that need to overloaded are traverse() and init(). * The two main methods that need to overloaded are traverse() and init().
@@ -159,7 +159,7 @@ class ChainingIterator : public ViewEdgeInternal::ViewEdgeIterator {
ViewEdge *result; ViewEdge *result;
void *py_c_it; void *py_c_it;
/*! Builds a Chaining Iterator from the first ViewEdge used for iteration and its orientation. /** Builds a Chaining Iterator from the first ViewEdge used for iteration and its orientation.
* \param iRestrictToSelection: * \param iRestrictToSelection:
* Indicates whether to force the chaining to stay within * Indicates whether to force the chaining to stay within
* the set of selected ViewEdges or not. * the set of selected ViewEdges or not.
@@ -183,7 +183,7 @@ class ChainingIterator : public ViewEdgeInternal::ViewEdgeIterator {
py_c_it = NULL; py_c_it = NULL;
} }
/*! Copy constructor */ /** Copy constructor */
ChainingIterator(const ChainingIterator &brother) : ViewEdgeIterator(brother) ChainingIterator(const ChainingIterator &brother) : ViewEdgeIterator(brother)
{ {
_restrictToSelection = brother._restrictToSelection; _restrictToSelection = brother._restrictToSelection;
@@ -192,19 +192,19 @@ class ChainingIterator : public ViewEdgeInternal::ViewEdgeIterator {
py_c_it = brother.py_c_it; py_c_it = brother.py_c_it;
} }
/*! Returns the string "ChainingIterator" */ /** Returns the string "ChainingIterator" */
virtual string getExactTypeName() const virtual string getExactTypeName() const
{ {
return "ChainingIterator"; return "ChainingIterator";
} }
/*! Inits the iterator context. /** Inits the iterator context.
* This method is called each time a new chain is started. * This method is called each time a new chain is started.
* It can be used to reset some history information that you might want to keep. * It can be used to reset some history information that you might want to keep.
*/ */
virtual int init(); virtual int init();
/*! This method iterates over the potential next ViewEdges and returns the one that will be /** This method iterates over the potential next ViewEdges and returns the one that will be
* followed next. returns the next ViewEdge to follow or 0 when the end of the chain is reached. * followed next. returns the next ViewEdge to follow or 0 when the end of the chain is reached.
* \param it: * \param it:
* The iterator over the ViewEdges adjacent to the end vertex of the current ViewEdge. * The iterator over the ViewEdges adjacent to the end vertex of the current ViewEdge.
@@ -214,11 +214,11 @@ class ChainingIterator : public ViewEdgeInternal::ViewEdgeIterator {
virtual int traverse(const AdjacencyIterator &it); virtual int traverse(const AdjacencyIterator &it);
/* accessors */ /* accessors */
/*! Returns true if the orientation of the current ViewEdge corresponds to its natural /** Returns true if the orientation of the current ViewEdge corresponds to its natural
* orientation */ * orientation */
// inline bool getOrientation() const {} // inline bool getOrientation() const {}
/*! Returns the vertex which is the next crossing */ /** Returns the vertex which is the next crossing */
inline ViewVertex *getVertex() inline ViewVertex *getVertex()
{ {
if (_increment) { if (_increment) {
@@ -239,7 +239,7 @@ class ChainingIterator : public ViewEdgeInternal::ViewEdgeIterator {
} }
} }
/*! Returns true if the current iteration is an incrementation */ /** Returns true if the current iteration is an incrementation */
inline bool isIncrementing() const inline bool isIncrementing() const
{ {
return _increment; return _increment;
@@ -255,7 +255,7 @@ class ChainingIterator : public ViewEdgeInternal::ViewEdgeIterator {
// //
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
/*! A ViewEdge Iterator used to follow ViewEdges the most naturally. /** A ViewEdge Iterator used to follow ViewEdges the most naturally.
* For example, it will follow visible ViewEdges of same nature. * For example, it will follow visible ViewEdges of same nature.
* As soon, as the nature or the visibility changes, the iteration stops (by setting the pointed * As soon, as the nature or the visibility changes, the iteration stops (by setting the pointed
* ViewEdge to 0). In the case of an iteration over a set of ViewEdge that are both Silhouette * ViewEdge to 0). In the case of an iteration over a set of ViewEdge that are both Silhouette
@@ -263,7 +263,7 @@ class ChainingIterator : public ViewEdgeInternal::ViewEdgeIterator {
*/ */
class ChainSilhouetteIterator : public ChainingIterator { class ChainSilhouetteIterator : public ChainingIterator {
public: public:
/*! Builds a ChainSilhouetteIterator from the first ViewEdge used for iteration and its /** Builds a ChainSilhouetteIterator from the first ViewEdge used for iteration and its
* orientation. * orientation.
* \param iRestrictToSelection: * \param iRestrictToSelection:
* Indicates whether to force the chaining to stay within the set of selected ViewEdges or * Indicates whether to force the chaining to stay within the set of selected ViewEdges or
@@ -282,24 +282,24 @@ class ChainSilhouetteIterator : public ChainingIterator {
{ {
} }
/*! Copy constructor */ /** Copy constructor */
ChainSilhouetteIterator(const ChainSilhouetteIterator &brother) : ChainingIterator(brother) ChainSilhouetteIterator(const ChainSilhouetteIterator &brother) : ChainingIterator(brother)
{ {
} }
/*! Returns the string "ChainSilhouetteIterator" */ /** Returns the string "ChainSilhouetteIterator" */
virtual string getExactTypeName() const virtual string getExactTypeName() const
{ {
return "ChainSilhouetteIterator"; return "ChainSilhouetteIterator";
} }
/*! This method iterates over the potential next ViewEdges and returns the one that will be /** This method iterates over the potential next ViewEdges and returns the one that will be
* followed next. * followed next.
* When reaching the end of a chain, 0 is returned. * When reaching the end of a chain, 0 is returned.
*/ */
virtual int traverse(const AdjacencyIterator &it); virtual int traverse(const AdjacencyIterator &it);
/*! Inits the iterator context */ /** Inits the iterator context */
virtual int init() virtual int init()
{ {
return 0; return 0;
@@ -311,7 +311,7 @@ class ChainSilhouetteIterator : public ChainingIterator {
// //
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
/*! A "generic" user-controlled ViewEdge iterator. This iterator is in particular built from a /** A "generic" user-controlled ViewEdge iterator. This iterator is in particular built from a
* unary predicate and a binary predicate. * unary predicate and a binary predicate.
* First, the unary predicate is evaluated for all potential next ViewEdges in order to only * First, the unary predicate is evaluated for all potential next ViewEdges in order to only
* keep the ones respecting a certain constraint. * keep the ones respecting a certain constraint.
@@ -327,7 +327,7 @@ class ChainPredicateIterator : public ChainingIterator {
UnaryPredicate1D *_unary_predicate; // the caller is responsible for the deletion of this object UnaryPredicate1D *_unary_predicate; // the caller is responsible for the deletion of this object
public: public:
/*! Builds a ChainPredicateIterator from a starting ViewEdge and its orientation. /** Builds a ChainPredicateIterator from a starting ViewEdge and its orientation.
* \param iRestrictToSelection: * \param iRestrictToSelection:
* Indicates whether to force the chaining to stay * Indicates whether to force the chaining to stay
* within the set of selected ViewEdges or not. * within the set of selected ViewEdges or not.
@@ -350,7 +350,7 @@ class ChainPredicateIterator : public ChainingIterator {
_unary_predicate = 0; _unary_predicate = 0;
} }
/*! Builds a ChainPredicateIterator from a unary predicate, a binary predicate, a starting /** Builds a ChainPredicateIterator from a unary predicate, a binary predicate, a starting
* ViewEdge and its orientation. * ViewEdge and its orientation.
* \param iRestrictToSelection: * \param iRestrictToSelection:
* Indicates whether to force the chaining to stay * Indicates whether to force the chaining to stay
@@ -381,32 +381,32 @@ class ChainPredicateIterator : public ChainingIterator {
_binary_predicate = &bpred; _binary_predicate = &bpred;
} }
/*! Copy constructor */ /** Copy constructor */
ChainPredicateIterator(const ChainPredicateIterator &brother) : ChainingIterator(brother) ChainPredicateIterator(const ChainPredicateIterator &brother) : ChainingIterator(brother)
{ {
_unary_predicate = brother._unary_predicate; _unary_predicate = brother._unary_predicate;
_binary_predicate = brother._binary_predicate; _binary_predicate = brother._binary_predicate;
} }
/*! Destructor. */ /** Destructor. */
virtual ~ChainPredicateIterator() virtual ~ChainPredicateIterator()
{ {
_unary_predicate = 0; _unary_predicate = 0;
_binary_predicate = 0; _binary_predicate = 0;
} }
/*! Returns the string "ChainPredicateIterator" */ /** Returns the string "ChainPredicateIterator" */
virtual string getExactTypeName() const virtual string getExactTypeName() const
{ {
return "ChainPredicateIterator"; return "ChainPredicateIterator";
} }
/*! This method iterates over the potential next ViewEdges and returns the one that will be /** This method iterates over the potential next ViewEdges and returns the one that will be
* followed next. When reaching the end of a chain, 0 is returned. * followed next. When reaching the end of a chain, 0 is returned.
*/ */
virtual int traverse(const AdjacencyIterator &it); virtual int traverse(const AdjacencyIterator &it);
/*! Inits the iterator context */ /** Inits the iterator context */
virtual int init() virtual int init()
{ {
return 0; return 0;

View File

@@ -33,34 +33,34 @@ namespace Freestyle {
// Context Functions definitions // Context Functions definitions
// //
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
/*! namespace containing all the Context related functions */ /** namespace containing all the Context related functions */
namespace ContextFunctions { namespace ContextFunctions {
// GetTimeStamp // GetTimeStamp
/*! Returns the system time stamp */ /** Returns the system time stamp */
unsigned GetTimeStampCF(); unsigned GetTimeStampCF();
// GetCanvasWidth // GetCanvasWidth
/*! Returns the canvas width */ /** Returns the canvas width */
unsigned GetCanvasWidthCF(); unsigned GetCanvasWidthCF();
// GetCanvasHeight // GetCanvasHeight
/*! Returns the canvas height */ /** Returns the canvas height */
unsigned GetCanvasHeightCF(); unsigned GetCanvasHeightCF();
// GetBorder // GetBorder
/*! Returns the border */ /** Returns the border */
BBox<Vec2i> GetBorderCF(); BBox<Vec2i> GetBorderCF();
// Load map // Load map
/*! Loads an image map for further reading */ /** Loads an image map for further reading */
void LoadMapCF(const char *iFileName, void LoadMapCF(const char *iFileName,
const char *iMapName, const char *iMapName,
unsigned iNbLevels = 4, unsigned iNbLevels = 4,
float iSigma = 1.0f); float iSigma = 1.0f);
// ReadMapPixel // ReadMapPixel
/*! Reads a pixel in a user-defined map /** Reads a pixel in a user-defined map
* \return the floating value stored for that pixel * \return the floating value stored for that pixel
* \param iMapName: * \param iMapName:
* The name of the map * The name of the map
@@ -74,7 +74,7 @@ void LoadMapCF(const char *iFileName,
float ReadMapPixelCF(const char *iMapName, int level, unsigned x, unsigned y); float ReadMapPixelCF(const char *iMapName, int level, unsigned x, unsigned y);
// ReadCompleteViewMapPixel // ReadCompleteViewMapPixel
/*! Reads a pixel in the complete view map /** Reads a pixel in the complete view map
* \return the floating value stored for that pixel * \return the floating value stored for that pixel
* \param level: * \param level:
* The level of the pyramid in which we wish to read the pixel * The level of the pyramid in which we wish to read the pixel
@@ -86,7 +86,7 @@ float ReadMapPixelCF(const char *iMapName, int level, unsigned x, unsigned y);
float ReadCompleteViewMapPixelCF(int level, unsigned x, unsigned y); float ReadCompleteViewMapPixelCF(int level, unsigned x, unsigned y);
// ReadOrientedViewMapPixel // ReadOrientedViewMapPixel
/*! Reads a pixel in one of the oriented view map images /** Reads a pixel in one of the oriented view map images
* \return the floating value stored for that pixel * \return the floating value stored for that pixel
* \param iOrientation: * \param iOrientation:
* The number telling which orientation we want to check * The number telling which orientation we want to check

View File

@@ -573,7 +573,7 @@ Curve::~Curve()
} }
} }
/*! iterators access */ /** iterators access */
Curve::point_iterator Curve::points_begin(float step) Curve::point_iterator Curve::points_begin(float step)
{ {
vertex_container::iterator second = _Vertices.begin(); vertex_container::iterator second = _Vertices.begin();

View File

@@ -52,7 +52,7 @@ using namespace Geometry;
/* */ /* */
/**********************************/ /**********************************/
/*! Class to represent a point of a curve. /** Class to represent a point of a curve.
* A CurvePoint can be any point of a 1D curve (it doesn't have to be a vertex of the curve). * A CurvePoint can be any point of a 1D curve (it doesn't have to be a vertex of the curve).
* Any Interface1D is built upon ViewEdges, themselves built upon FEdges. Therefore, a curve is * Any Interface1D is built upon ViewEdges, themselves built upon FEdges. Therefore, a curve is
* basically a polyline made of a list SVertex. Thus, a CurvePoint is built by linearly * basically a polyline made of a list SVertex. Thus, a CurvePoint is built by linearly
@@ -61,56 +61,56 @@ using namespace Geometry;
*/ */
class CurvePoint : public Interface0D { class CurvePoint : public Interface0D {
public: // Implementation of Interface0D public: // Implementation of Interface0D
/*! Returns the string "CurvePoint"*/ /** Returns the string "CurvePoint"*/
virtual string getExactTypeName() const virtual string getExactTypeName() const
{ {
return "CurvePoint"; return "CurvePoint";
} }
// Data access methods // Data access methods
/*! Returns the 3D X coordinate of the point */ /** Returns the 3D X coordinate of the point */
virtual real getX() const virtual real getX() const
{ {
return _Point3d.x(); return _Point3d.x();
} }
/*! Returns the 3D Y coordinate of the point */ /** Returns the 3D Y coordinate of the point */
virtual real getY() const virtual real getY() const
{ {
return _Point3d.y(); return _Point3d.y();
} }
/*! Returns the 3D Z coordinate of the point */ /** Returns the 3D Z coordinate of the point */
virtual real getZ() const virtual real getZ() const
{ {
return _Point3d.z(); return _Point3d.z();
} }
/*! Returns the 3D point. */ /** Returns the 3D point. */
virtual Vec3r getPoint3D() const virtual Vec3r getPoint3D() const
{ {
return _Point3d; return _Point3d;
} }
/*! Returns the projected 3D X coordinate of the point */ /** Returns the projected 3D X coordinate of the point */
virtual real getProjectedX() const virtual real getProjectedX() const
{ {
return _Point2d.x(); return _Point2d.x();
} }
/*! Returns the projected 3D Y coordinate of the point */ /** Returns the projected 3D Y coordinate of the point */
virtual real getProjectedY() const virtual real getProjectedY() const
{ {
return _Point2d.y(); return _Point2d.y();
} }
/*! Returns the projected 3D Z coordinate of the point */ /** Returns the projected 3D Z coordinate of the point */
virtual real getProjectedZ() const virtual real getProjectedZ() const
{ {
return _Point2d.z(); return _Point2d.z();
} }
/*! Returns the 2D point. */ /** Returns the 2D point. */
virtual Vec2r getPoint2D() const virtual Vec2r getPoint2D() const
{ {
return Vec2r(_Point2d.x(), _Point2d.y()); return Vec2r(_Point2d.x(), _Point2d.y());
@@ -118,7 +118,7 @@ class CurvePoint : public Interface0D {
virtual FEdge *getFEdge(Interface0D &inter); virtual FEdge *getFEdge(Interface0D &inter);
/*! Returns the CurvePoint's Id */ /** Returns the CurvePoint's Id */
virtual Id getId() const virtual Id getId() const
{ {
Id id; Id id;
@@ -131,7 +131,7 @@ class CurvePoint : public Interface0D {
return id; return id;
} }
/*! Returns the CurvePoint's Nature */ /** Returns the CurvePoint's Nature */
virtual Nature::VertexNature getNature() const virtual Nature::VertexNature getNature() const
{ {
Nature::VertexNature nature = Nature::POINT; Nature::VertexNature nature = Nature::POINT;
@@ -144,7 +144,7 @@ class CurvePoint : public Interface0D {
return nature; return nature;
} }
/*! Cast the Interface0D in SVertex if it can be. */ /** Cast the Interface0D in SVertex if it can be. */
virtual SVertex *castToSVertex() virtual SVertex *castToSVertex()
{ {
if (_t2d == 0) { if (_t2d == 0) {
@@ -156,7 +156,7 @@ class CurvePoint : public Interface0D {
return Interface0D::castToSVertex(); return Interface0D::castToSVertex();
} }
/*! Cast the Interface0D in ViewVertex if it can be. */ /** Cast the Interface0D in ViewVertex if it can be. */
virtual ViewVertex *castToViewVertex() virtual ViewVertex *castToViewVertex()
{ {
if (_t2d == 0) { if (_t2d == 0) {
@@ -168,7 +168,7 @@ class CurvePoint : public Interface0D {
return Interface0D::castToViewVertex(); return Interface0D::castToViewVertex();
} }
/*! Cast the Interface0D in NonTVertex if it can be. */ /** Cast the Interface0D in NonTVertex if it can be. */
virtual NonTVertex *castToNonTVertex() virtual NonTVertex *castToNonTVertex()
{ {
if (_t2d == 0) { if (_t2d == 0) {
@@ -180,7 +180,7 @@ class CurvePoint : public Interface0D {
return Interface0D::castToNonTVertex(); return Interface0D::castToNonTVertex();
} }
/*! Cast the Interface0D in TVertex if it can be. */ /** Cast the Interface0D in TVertex if it can be. */
virtual TVertex *castToTVertex() virtual TVertex *castToTVertex()
{ {
if (_t2d == 0) { if (_t2d == 0) {
@@ -204,10 +204,10 @@ class CurvePoint : public Interface0D {
Vec3r _Point3d; Vec3r _Point3d;
public: public:
/*! Default Constructor. */ /** Default Constructor. */
CurvePoint(); CurvePoint();
/*! Builds a CurvePoint from two SVertex and an interpolation parameter. /** Builds a CurvePoint from two SVertex and an interpolation parameter.
* \param iA: * \param iA:
* The first SVertex * The first SVertex
* \param iB: * \param iB:
@@ -217,7 +217,7 @@ class CurvePoint : public Interface0D {
*/ */
CurvePoint(SVertex *iA, SVertex *iB, float t); CurvePoint(SVertex *iA, SVertex *iB, float t);
/*! Builds a CurvePoint from two CurvePoint and an interpolation parameter. /** Builds a CurvePoint from two CurvePoint and an interpolation parameter.
* \param iA: * \param iA:
* The first CurvePoint * The first CurvePoint
* \param iB: * \param iB:
@@ -229,35 +229,35 @@ class CurvePoint : public Interface0D {
// CurvePoint(SVertex *iA, SVertex *iB, float t2d, float t3d); // CurvePoint(SVertex *iA, SVertex *iB, float t2d, float t3d);
/*! Copy Constructor. */ /** Copy Constructor. */
CurvePoint(const CurvePoint &iBrother); CurvePoint(const CurvePoint &iBrother);
/*! Operator = */ /** Operator = */
CurvePoint &operator=(const CurvePoint &iBrother); CurvePoint &operator=(const CurvePoint &iBrother);
/*! Destructor */ /** Destructor */
virtual ~CurvePoint() = default; virtual ~CurvePoint() = default;
/*! Operator == */ /** Operator == */
bool operator==(const CurvePoint &b) bool operator==(const CurvePoint &b)
{ {
return ((__A == b.__A) && (__B == b.__B) && (_t2d == b._t2d)); return ((__A == b.__A) && (__B == b.__B) && (_t2d == b._t2d));
} }
/* accessors */ /* accessors */
/*! Returns the first SVertex upon which the CurvePoint is built. */ /** Returns the first SVertex upon which the CurvePoint is built. */
inline SVertex *A() inline SVertex *A()
{ {
return __A; return __A;
} }
/*! Returns the second SVertex upon which the CurvePoint is built. */ /** Returns the second SVertex upon which the CurvePoint is built. */
inline SVertex *B() inline SVertex *B()
{ {
return __B; return __B;
} }
/*! Returns the interpolation parameter. */ /** Returns the interpolation parameter. */
inline float t2d() const inline float t2d() const
{ {
return _t2d; return _t2d;
@@ -271,19 +271,19 @@ class CurvePoint : public Interface0D {
#endif #endif
/* modifiers */ /* modifiers */
/*! Sets the first SVertex upon which to build the CurvePoint. */ /** Sets the first SVertex upon which to build the CurvePoint. */
inline void setA(SVertex *iA) inline void setA(SVertex *iA)
{ {
__A = iA; __A = iA;
} }
/*! Sets the second SVertex upon which to build the CurvePoint. */ /** Sets the second SVertex upon which to build the CurvePoint. */
inline void setB(SVertex *iB) inline void setB(SVertex *iB)
{ {
__B = iB; __B = iB;
} }
/*! Sets the 2D interpolation parameter to use. */ /** Sets the 2D interpolation parameter to use. */
inline void setT2d(float t) inline void setT2d(float t)
{ {
_t2d = t; _t2d = t;
@@ -339,7 +339,7 @@ class CurvePoint : public Interface0D {
} }
Vec3r curvature2d_as_vector() const; Vec3r curvature2d_as_vector() const;
/*! angle in radians */ /** angle in radians */
real curvature2d_as_angle() const; real curvature2d_as_angle() const;
real curvatureFredo() const; real curvatureFredo() const;
@@ -368,7 +368,7 @@ class CurvePointIterator;
} // end of namespace CurveInternal } // end of namespace CurveInternal
/*! Base class for curves made of CurvePoints. /** Base class for curves made of CurvePoints.
* SVertex is the type of the initial curve vertices. * SVertex is the type of the initial curve vertices.
* A Chain is a specialization of a Curve. * A Chain is a specialization of a Curve.
*/ */
@@ -396,7 +396,7 @@ class Curve : public Interface1D {
unsigned _nSegments; // number of segments unsigned _nSegments; // number of segments
public: public:
/*! Default Constructor. */ /** Default Constructor. */
Curve() Curve()
{ {
_Length = 0; _Length = 0;
@@ -404,7 +404,7 @@ class Curve : public Interface1D {
_nSegments = 0; _nSegments = 0;
} }
/*! Builds a Curve from its id */ /** Builds a Curve from its id */
Curve(const Id &id) Curve(const Id &id)
{ {
_Length = 0; _Length = 0;
@@ -412,7 +412,7 @@ class Curve : public Interface1D {
_nSegments = 0; _nSegments = 0;
} }
/*! Copy Constructor. */ /** Copy Constructor. */
Curve(const Curve &iBrother) Curve(const Curve &iBrother)
{ {
_Length = iBrother._Length; _Length = iBrother._Length;
@@ -421,10 +421,10 @@ class Curve : public Interface1D {
_nSegments = 0; _nSegments = 0;
} }
/*! Destructor. */ /** Destructor. */
virtual ~Curve(); virtual ~Curve();
/*! Returns the string "Curve" */ /** Returns the string "Curve" */
virtual string getExactTypeName() const virtual string getExactTypeName() const
{ {
return "Curve"; return "Curve";
@@ -435,7 +435,7 @@ class Curve : public Interface1D {
void computeCurvatureAndOrientation(); void computeCurvatureAndOrientation();
#endif #endif
/*! Adds a single vertex (CurvePoint) at the end of the Curve */ /** Adds a single vertex (CurvePoint) at the end of the Curve */
inline void push_vertex_back(Vertex *iVertex) inline void push_vertex_back(Vertex *iVertex)
{ {
if (!_Vertices.empty()) { if (!_Vertices.empty()) {
@@ -447,7 +447,7 @@ class Curve : public Interface1D {
_Vertices.push_back(new_vertex); _Vertices.push_back(new_vertex);
} }
/*! Adds a single vertex (SVertex) at the end of the Curve */ /** Adds a single vertex (SVertex) at the end of the Curve */
inline void push_vertex_back(SVertex *iVertex) inline void push_vertex_back(SVertex *iVertex)
{ {
if (!_Vertices.empty()) { if (!_Vertices.empty()) {
@@ -459,7 +459,7 @@ class Curve : public Interface1D {
_Vertices.push_back(new_vertex); _Vertices.push_back(new_vertex);
} }
/*! Adds a single vertex (CurvePoint) at the front of the Curve */ /** Adds a single vertex (CurvePoint) at the front of the Curve */
inline void push_vertex_front(Vertex *iVertex) inline void push_vertex_front(Vertex *iVertex)
{ {
if (!_Vertices.empty()) { if (!_Vertices.empty()) {
@@ -471,7 +471,7 @@ class Curve : public Interface1D {
_Vertices.push_front(new_vertex); _Vertices.push_front(new_vertex);
} }
/*! Adds a single vertex (SVertex) at the front of the Curve */ /** Adds a single vertex (SVertex) at the front of the Curve */
inline void push_vertex_front(SVertex *iVertex) inline void push_vertex_front(SVertex *iVertex)
{ {
if (!_Vertices.empty()) { if (!_Vertices.empty()) {
@@ -483,25 +483,25 @@ class Curve : public Interface1D {
_Vertices.push_front(new_vertex); _Vertices.push_front(new_vertex);
} }
/*! Returns true is the Curve doesn't have any Vertex yet. */ /** Returns true is the Curve doesn't have any Vertex yet. */
inline bool empty() const inline bool empty() const
{ {
return _Vertices.empty(); return _Vertices.empty();
} }
/*! Returns the 2D length of the Curve. */ /** Returns the 2D length of the Curve. */
inline real getLength2D() const inline real getLength2D() const
{ {
return _Length; return _Length;
} }
/*! Returns the Id of the 1D element. */ /** Returns the Id of the 1D element. */
virtual Id getId() const virtual Id getId() const
{ {
return _Id; return _Id;
} }
/*! Returns the number of segments in the polyline constituting the Curve. */ /** Returns the number of segments in the polyline constituting the Curve. */
inline unsigned int nSegments() const inline unsigned int nSegments() const
{ {
return _nSegments; return _nSegments;
@@ -549,7 +549,7 @@ class Curve : public Interface1D {
float local_depth_variance(int iCombination = 0) const; float local_depth_variance(int iCombination = 0) const;
real local_average_density(float sigma = 2.3f, int iCombination = 0) const; real local_average_density(float sigma = 2.3f, int iCombination = 0) const;
Vec3r curvature2d_as_vector(int iCombination = 0) const; Vec3r curvature2d_as_vector(int iCombination = 0) const;
/*! angle in radians */ /** angle in radians */
real curvature2d_as_angle(int iCombination = 0) const; real curvature2d_as_angle(int iCombination = 0) const;
#endif #endif
@@ -573,23 +573,23 @@ class Curve : public Interface1D {
CurveInternal::CurvePointIterator curveVerticesEnd(); CurveInternal::CurvePointIterator curveVerticesEnd();
// Iterators access // Iterators access
/*! Returns an Interface0DIterator pointing onto the first vertex of the Curve and that can /** Returns an Interface0DIterator pointing onto the first vertex of the Curve and that can
* iterate over the \a vertices of the Curve. * iterate over the \a vertices of the Curve.
*/ */
virtual Interface0DIterator verticesBegin(); virtual Interface0DIterator verticesBegin();
/*! Returns an Interface0DIterator pointing after the last vertex of the Curve and that can /** Returns an Interface0DIterator pointing after the last vertex of the Curve and that can
* iterate over the \a vertices of the Curve. * iterate over the \a vertices of the Curve.
*/ */
virtual Interface0DIterator verticesEnd(); virtual Interface0DIterator verticesEnd();
/*! Returns an Interface0DIterator pointing onto the first point of the Curve and that can /** Returns an Interface0DIterator pointing onto the first point of the Curve and that can
* iterate over the \a points of the Curve at any resolution. At each iteration a virtual * iterate over the \a points of the Curve at any resolution. At each iteration a virtual
* temporary CurvePoint is created. * temporary CurvePoint is created.
*/ */
virtual Interface0DIterator pointsBegin(float t = 0.0f); virtual Interface0DIterator pointsBegin(float t = 0.0f);
/*! Returns an Interface0DIterator pointing after the last point of the Curve and that can /** Returns an Interface0DIterator pointing after the last point of the Curve and that can
* iterate over the \a points of the Curve at any resolution. At each iteration a virtual * iterate over the \a points of the Curve at any resolution. At each iteration a virtual
* temporary CurvePoint is created. * temporary CurvePoint is created.
*/ */

View File

@@ -50,7 +50,7 @@ class CurvePoint_nonconst_traits : public Nonconst_traits<CurvePoint *> {
/* */ /* */
/**********************************/ /**********************************/
/*! iterator on a curve. Allows an iterating outside initial vertices. A CurvePoint is /** iterator on a curve. Allows an iterating outside initial vertices. A CurvePoint is
* instantiated and returned when the iterator is dereferenced. * instantiated and returned when the iterator is dereferenced.
*/ */
template<class Traits> template<class Traits>

View File

@@ -28,7 +28,7 @@ namespace Freestyle {
namespace CurveInternal { namespace CurveInternal {
/*! iterator on a curve. Allows an iterating outside /** iterator on a curve. Allows an iterating outside
* initial vertices. A CurvePoint is instantiated an returned * initial vertices. A CurvePoint is instantiated an returned
* when the iterator is dereferenced. * when the iterator is dereferenced.
*/ */

View File

@@ -35,16 +35,16 @@ namespace Freestyle {
* * * *
* ----------------------------------------- */ * ----------------------------------------- */
/*! Base class for modifiers. /** Base class for modifiers.
* Modifiers are used in the Operators in order to "mark" the processed Interface1D. * Modifiers are used in the Operators in order to "mark" the processed Interface1D.
*/ */
template<class Edge> struct EdgeModifier : public unary_function<Edge, void> { template<class Edge> struct EdgeModifier : public unary_function<Edge, void> {
/*! Default construction */ /** Default construction */
EdgeModifier() : unary_function<Edge, void>() EdgeModifier() : unary_function<Edge, void>()
{ {
} }
/*! the () operator */ /** the () operator */
virtual void operator()(Edge &iEdge) virtual void operator()(Edge &iEdge)
{ {
} }
@@ -54,14 +54,14 @@ template<class Edge> struct EdgeModifier : public unary_function<Edge, void> {
#endif #endif
}; };
/*! Modifier that sets the time stamp of an Interface1D to the time stamp of the system. */ /** Modifier that sets the time stamp of an Interface1D to the time stamp of the system. */
template<class Edge> struct TimestampModifier : public EdgeModifier<Edge> { template<class Edge> struct TimestampModifier : public EdgeModifier<Edge> {
/*! Default constructor */ /** Default constructor */
TimestampModifier() : EdgeModifier<Edge>() TimestampModifier() : EdgeModifier<Edge>()
{ {
} }
/*! The () operator. */ /** The () operator. */
virtual void operator()(Edge &iEdge) virtual void operator()(Edge &iEdge)
{ {
TimeStamp *timestamp = TimeStamp::instance(); TimeStamp *timestamp = TimeStamp::instance();

View File

@@ -41,7 +41,7 @@
namespace Freestyle { namespace Freestyle {
/*! Class defining the operators used in a style module. /** Class defining the operators used in a style module.
* There are 4 classes of operators: Selection, Chaining, Splitting and Creating. * There are 4 classes of operators: Selection, Chaining, Splitting and Creating.
* All these operators are user controlled in the scripting language through Functors, Predicates * All these operators are user controlled in the scripting language through Functors, Predicates
* and Shaders that are taken as arguments. * and Shaders that are taken as arguments.
@@ -57,12 +57,12 @@ class Operators {
// //
//////////////////////////////////////////////// ////////////////////////////////////////////////
/*! Selects the ViewEdges of the ViewMap verifying a specified condition. /** Selects the ViewEdges of the ViewMap verifying a specified condition.
* \param pred: The predicate expressing this condition * \param pred: The predicate expressing this condition
*/ */
static int select(UnaryPredicate1D &pred); static int select(UnaryPredicate1D &pred);
/*! Builds a set of chains from the current set of ViewEdges. /** Builds a set of chains from the current set of ViewEdges.
* Each ViewEdge of the current list starts a new chain. * Each ViewEdge of the current list starts a new chain.
* The chaining operator then iterates over the ViewEdges * The chaining operator then iterates over the ViewEdges
* of the ViewMap using the user specified iterator. * of the ViewMap using the user specified iterator.
@@ -80,7 +80,7 @@ class Operators {
UnaryPredicate1D &pred, UnaryPredicate1D &pred,
UnaryFunction1D_void &modifier); UnaryFunction1D_void &modifier);
/*! Builds a set of chains from the current set of ViewEdges. /** Builds a set of chains from the current set of ViewEdges.
* Each ViewEdge of the current list starts a new chain. The chaining operator then iterates * Each ViewEdge of the current list starts a new chain. The chaining operator then iterates
* over the ViewEdges * over the ViewEdges
* of the ViewMap using the user specified iterator. * of the ViewMap using the user specified iterator.
@@ -95,7 +95,7 @@ class Operators {
*/ */
static int chain(ViewEdgeInternal::ViewEdgeIterator &it, UnaryPredicate1D &pred); static int chain(ViewEdgeInternal::ViewEdgeIterator &it, UnaryPredicate1D &pred);
/*! Builds a set of chains from the current set of ViewEdges. /** Builds a set of chains from the current set of ViewEdges.
* Each ViewEdge of the current list potentially starts a new chain. The chaining operator then * Each ViewEdge of the current list potentially starts a new chain. The chaining operator then
* iterates over the ViewEdges of the ViewMap using the user specified iterator. * iterates over the ViewEdges of the ViewMap using the user specified iterator.
* This operator iterates both using the increment and decrement operators and is therefore * This operator iterates both using the increment and decrement operators and is therefore
@@ -111,7 +111,7 @@ class Operators {
*/ */
static int bidirectionalChain(ChainingIterator &it, UnaryPredicate1D &pred); static int bidirectionalChain(ChainingIterator &it, UnaryPredicate1D &pred);
/*! The only difference with the above bidirectional chaining algorithm is that we don't need to /** The only difference with the above bidirectional chaining algorithm is that we don't need to
* pass a stopping criterion. This might be desirable when the stopping criterion is already * pass a stopping criterion. This might be desirable when the stopping criterion is already
* contained in the iterator definition. Builds a set of chains from the current set of * contained in the iterator definition. Builds a set of chains from the current set of
* ViewEdges. Each ViewEdge of the current list potentially starts a new chain. The chaining * ViewEdges. Each ViewEdge of the current list potentially starts a new chain. The chaining
@@ -127,7 +127,7 @@ class Operators {
*/ */
static int bidirectionalChain(ChainingIterator &it); static int bidirectionalChain(ChainingIterator &it);
/*! Splits each chain of the current set of chains in a sequential way. /** Splits each chain of the current set of chains in a sequential way.
* The points of each chain are processed (with a specified sampling) sequentially. * The points of each chain are processed (with a specified sampling) sequentially.
* Each time a user specified starting condition is verified, a new chain begins and ends as * Each time a user specified starting condition is verified, a new chain begins and ends as
* soon as a user-defined stopping predicate is verified. * soon as a user-defined stopping predicate is verified.
@@ -147,7 +147,7 @@ class Operators {
UnaryPredicate0D &stoppingPred, UnaryPredicate0D &stoppingPred,
float sampling = 0.0f); float sampling = 0.0f);
/*! Splits each chain of the current set of chains in a sequential way. /** Splits each chain of the current set of chains in a sequential way.
* The points of each chain are processed (with a specified sampling) sequentially and each time * The points of each chain are processed (with a specified sampling) sequentially and each time
* a user specified condition is verified, the chain is split into two chains. * a user specified condition is verified, the chain is split into two chains.
* The resulting set of chains is a partition of the initial chain * The resulting set of chains is a partition of the initial chain
@@ -160,7 +160,7 @@ class Operators {
*/ */
static int sequentialSplit(UnaryPredicate0D &pred, float sampling = 0.0f); static int sequentialSplit(UnaryPredicate0D &pred, float sampling = 0.0f);
/*! Splits the current set of chains in a recursive way. /** Splits the current set of chains in a recursive way.
* We process the points of each chain (with a specified sampling) to find the point * We process the points of each chain (with a specified sampling) to find the point
* minimizing a specified function. The chain is split in two at this point and the two new * minimizing a specified function. The chain is split in two at this point and the two new
* chains are processed in the same way. The recursivity level is controlled through a * chains are processed in the same way. The recursivity level is controlled through a
@@ -181,7 +181,7 @@ class Operators {
UnaryPredicate1D &pred, UnaryPredicate1D &pred,
float sampling = 0); float sampling = 0);
/*! Splits the current set of chains in a recursive way. /** Splits the current set of chains in a recursive way.
* We process the points of each chain (with a specified sampling) to find the point minimizing * We process the points of each chain (with a specified sampling) to find the point minimizing
* a specified function. The chain is split in two at this point and the two new chains are * a specified function. The chain is split in two at this point and the two new chains are
* processed in the same way. The user can specify a 0D predicate to make a first selection on * processed in the same way. The user can specify a 0D predicate to make a first selection on
@@ -210,14 +210,14 @@ class Operators {
UnaryPredicate1D &pred, UnaryPredicate1D &pred,
float sampling = 0.0f); float sampling = 0.0f);
/*! Sorts the current set of chains (or viewedges) /** Sorts the current set of chains (or viewedges)
* according to the comparison predicate given as argument. * according to the comparison predicate given as argument.
* \param pred: * \param pred:
* The binary predicate used for the comparison * The binary predicate used for the comparison
*/ */
static int sort(BinaryPredicate1D &pred); static int sort(BinaryPredicate1D &pred);
/*! Creates and shades the strokes from the current set of chains. /** Creates and shades the strokes from the current set of chains.
* A predicate can be specified to make a selection pass on the chains. * A predicate can be specified to make a selection pass on the chains.
* \param pred: * \param pred:
* The predicate that a chain must verify in order to be transform as a stroke * The predicate that a chain must verify in order to be transform as a stroke

View File

@@ -41,7 +41,7 @@ class PSStrokeRenderer : public StrokeRenderer {
public: public:
PSStrokeRenderer(const char *iFileName = NULL); PSStrokeRenderer(const char *iFileName = NULL);
/*! Renders a stroke rep */ /** Renders a stroke rep */
virtual void RenderStrokeRep(StrokeRep *iStrokeRep) const; virtual void RenderStrokeRep(StrokeRep *iStrokeRep) const;
virtual void RenderStrokeRepBasic(StrokeRep *iStrokeRep) const; virtual void RenderStrokeRepBasic(StrokeRep *iStrokeRep) const;

View File

@@ -34,7 +34,7 @@ namespace Freestyle {
// //
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
/*! Base class for Unary Predicates that work on Interface0DIterator. /** Base class for Unary Predicates that work on Interface0DIterator.
* A UnaryPredicate0D is a functor that evaluates a condition on a Interface0DIterator and returns * A UnaryPredicate0D is a functor that evaluates a condition on a Interface0DIterator and returns
* true or false depending on whether this condition is satisfied or not. * true or false depending on whether this condition is satisfied or not.
* The UnaryPredicate0D is used by calling its () operator. * The UnaryPredicate0D is used by calling its () operator.
@@ -45,24 +45,24 @@ class UnaryPredicate0D {
bool result; bool result;
void *py_up0D; void *py_up0D;
/*! Default constructor. */ /** Default constructor. */
UnaryPredicate0D() UnaryPredicate0D()
{ {
py_up0D = 0; py_up0D = 0;
} }
/*! Destructor. */ /** Destructor. */
virtual ~UnaryPredicate0D() virtual ~UnaryPredicate0D()
{ {
} }
/*! Returns the string of the name of the UnaryPredicate0D. */ /** Returns the string of the name of the UnaryPredicate0D. */
virtual string getName() const virtual string getName() const
{ {
return "UnaryPredicate0D"; return "UnaryPredicate0D";
} }
/*! The () operator. Must be overload by inherited classes. /** The () operator. Must be overload by inherited classes.
* \param it: * \param it:
* The Interface0DIterator pointing onto the Interface0D at which we wish to evaluate the * The Interface0DIterator pointing onto the Interface0D at which we wish to evaluate the
* predicate. \return true if the condition is satisfied, false otherwise. * predicate. \return true if the condition is satisfied, false otherwise.
@@ -79,7 +79,7 @@ class UnaryPredicate0D {
// //
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
/*! Base class for Binary Predicates working on Interface0D. /** Base class for Binary Predicates working on Interface0D.
* A BinaryPredicate0D is typically an ordering relation between two Interface0D. * A BinaryPredicate0D is typically an ordering relation between two Interface0D.
* It evaluates a relation between 2 Interface0D and returns true or false. * It evaluates a relation between 2 Interface0D and returns true or false.
* It is used by calling the () operator. * It is used by calling the () operator.
@@ -89,24 +89,24 @@ class BinaryPredicate0D {
bool result; bool result;
void *py_bp0D; void *py_bp0D;
/*! Default constructor. */ /** Default constructor. */
BinaryPredicate0D() BinaryPredicate0D()
{ {
py_bp0D = 0; py_bp0D = 0;
} }
/*! Destructor. */ /** Destructor. */
virtual ~BinaryPredicate0D() virtual ~BinaryPredicate0D()
{ {
} }
/*! Returns the string of the name of the binary predicate. */ /** Returns the string of the name of the binary predicate. */
virtual string getName() const virtual string getName() const
{ {
return "BinaryPredicate0D"; return "BinaryPredicate0D";
} }
/*! The () operator. Must be overload by inherited classes. /** The () operator. Must be overload by inherited classes.
* It evaluates a relation between 2 Interface0D. * It evaluates a relation between 2 Interface0D.
* \param inter1: * \param inter1:
* The first Interface0D. * The first Interface0D.
@@ -129,21 +129,21 @@ class BinaryPredicate0D {
namespace Predicates0D { namespace Predicates0D {
// TrueUP0D // TrueUP0D
/*! Returns true any time */ /** Returns true any time */
class TrueUP0D : public UnaryPredicate0D { class TrueUP0D : public UnaryPredicate0D {
public: public:
/*! Default constructor. */ /** Default constructor. */
TrueUP0D() TrueUP0D()
{ {
} }
/*! Returns the string "TrueUP0D"*/ /** Returns the string "TrueUP0D"*/
string getName() const string getName() const
{ {
return "TrueUP0D"; return "TrueUP0D";
} }
/*! The () operator. */ /** The () operator. */
int operator()(Interface0DIterator &) int operator()(Interface0DIterator &)
{ {
result = true; result = true;
@@ -152,21 +152,21 @@ class TrueUP0D : public UnaryPredicate0D {
}; };
// FalseUP0D // FalseUP0D
/*! Returns false any time */ /** Returns false any time */
class FalseUP0D : public UnaryPredicate0D { class FalseUP0D : public UnaryPredicate0D {
public: public:
/*! Default constructor. */ /** Default constructor. */
FalseUP0D() FalseUP0D()
{ {
} }
/*! Returns the string "FalseUP0D"*/ /** Returns the string "FalseUP0D"*/
string getName() const string getName() const
{ {
return "FalseUP0D"; return "FalseUP0D";
} }
/*! The () operator. */ /** The () operator. */
int operator()(Interface0DIterator &) int operator()(Interface0DIterator &)
{ {
result = false; result = false;

View File

@@ -41,7 +41,7 @@ namespace Freestyle {
// //
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
/*! Base class for Unary Predicates that work on Interface1D. /** Base class for Unary Predicates that work on Interface1D.
* A UnaryPredicate1D is a functor that evaluates a condition on a Interface1D and returns * A UnaryPredicate1D is a functor that evaluates a condition on a Interface1D and returns
* true or false depending on whether this condition is satisfied or not. * true or false depending on whether this condition is satisfied or not.
* The UnaryPredicate1D is used by calling its () operator. * The UnaryPredicate1D is used by calling its () operator.
@@ -52,24 +52,24 @@ class UnaryPredicate1D {
bool result; bool result;
void *py_up1D; void *py_up1D;
/*! Default constructor. */ /** Default constructor. */
UnaryPredicate1D() UnaryPredicate1D()
{ {
py_up1D = NULL; py_up1D = NULL;
} }
/*! Destructor. */ /** Destructor. */
virtual ~UnaryPredicate1D() virtual ~UnaryPredicate1D()
{ {
} }
/*! Returns the string of the name of the UnaryPredicate1D. */ /** Returns the string of the name of the UnaryPredicate1D. */
virtual string getName() const virtual string getName() const
{ {
return "UnaryPredicate1D"; return "UnaryPredicate1D";
} }
/*! The () operator. Must be overload by inherited classes. /** The () operator. Must be overload by inherited classes.
* \param inter: * \param inter:
* The Interface1D on which we wish to evaluate the predicate. * The Interface1D on which we wish to evaluate the predicate.
* \return true if the condition is satisfied, false otherwise. * \return true if the condition is satisfied, false otherwise.
@@ -86,7 +86,7 @@ class UnaryPredicate1D {
// //
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
/*! Base class for Binary Predicates working on Interface1D. /** Base class for Binary Predicates working on Interface1D.
* A BinaryPredicate1D is typically an ordering relation between two Interface1D. * A BinaryPredicate1D is typically an ordering relation between two Interface1D.
* It evaluates a relation between 2 Interface1D and returns true or false. * It evaluates a relation between 2 Interface1D and returns true or false.
* It is used by calling the () operator. * It is used by calling the () operator.
@@ -96,24 +96,24 @@ class BinaryPredicate1D {
bool result; bool result;
void *py_bp1D; void *py_bp1D;
/*! Default constructor. */ /** Default constructor. */
BinaryPredicate1D() BinaryPredicate1D()
{ {
py_bp1D = NULL; py_bp1D = NULL;
} }
/*! Destructor. */ /** Destructor. */
virtual ~BinaryPredicate1D() virtual ~BinaryPredicate1D()
{ {
} }
/*! Returns the string of the name of the binary predicate. */ /** Returns the string of the name of the binary predicate. */
virtual string getName() const virtual string getName() const
{ {
return "BinaryPredicate1D"; return "BinaryPredicate1D";
} }
/*! The () operator. Must be overload by inherited classes. /** The () operator. Must be overload by inherited classes.
* It evaluates a relation between 2 Interface1D. * It evaluates a relation between 2 Interface1D.
* \param inter1: * \param inter1:
* The first Interface1D. * The first Interface1D.
@@ -136,21 +136,21 @@ class BinaryPredicate1D {
namespace Predicates1D { namespace Predicates1D {
// TrueUP1D // TrueUP1D
/*! Returns true */ /** Returns true */
class TrueUP1D : public UnaryPredicate1D { class TrueUP1D : public UnaryPredicate1D {
public: public:
/*! Constructor */ /** Constructor */
TrueUP1D() TrueUP1D()
{ {
} }
/*! Returns the string "TrueUP1D"*/ /** Returns the string "TrueUP1D"*/
string getName() const string getName() const
{ {
return "TrueUP1D"; return "TrueUP1D";
} }
/*! the () operator */ /** the () operator */
int operator()(Interface1D &) int operator()(Interface1D &)
{ {
result = true; result = true;
@@ -159,21 +159,21 @@ class TrueUP1D : public UnaryPredicate1D {
}; };
// FalseUP1D // FalseUP1D
/*! Returns false */ /** Returns false */
class FalseUP1D : public UnaryPredicate1D { class FalseUP1D : public UnaryPredicate1D {
public: public:
/*! Constructor */ /** Constructor */
FalseUP1D() FalseUP1D()
{ {
} }
/*! Returns the string "FalseUP1D"*/ /** Returns the string "FalseUP1D"*/
string getName() const string getName() const
{ {
return "FalseUP1D"; return "FalseUP1D";
} }
/*! the () operator */ /** the () operator */
int operator()(Interface1D &) int operator()(Interface1D &)
{ {
result = false; result = false;
@@ -182,12 +182,12 @@ class FalseUP1D : public UnaryPredicate1D {
}; };
// QuantitativeInvisibilityUP1D // QuantitativeInvisibilityUP1D
/*! Returns true if the Quantitative Invisibility evaluated at an Interface1D, using the /** Returns true if the Quantitative Invisibility evaluated at an Interface1D, using the
* QuantitativeInvisibilityF1D functor, equals a certain user-defined value. * QuantitativeInvisibilityF1D functor, equals a certain user-defined value.
*/ */
class QuantitativeInvisibilityUP1D : public UnaryPredicate1D { class QuantitativeInvisibilityUP1D : public UnaryPredicate1D {
public: public:
/*! Builds the Predicate. /** Builds the Predicate.
* \param qi: * \param qi:
* The Quantitative Invisibility you want the Interface1D to have * The Quantitative Invisibility you want the Interface1D to have
*/ */
@@ -195,13 +195,13 @@ class QuantitativeInvisibilityUP1D : public UnaryPredicate1D {
{ {
} }
/*! Returns the string "QuantitativeInvisibilityUP1D" */ /** Returns the string "QuantitativeInvisibilityUP1D" */
string getName() const string getName() const
{ {
return "QuantitativeInvisibilityUP1D"; return "QuantitativeInvisibilityUP1D";
} }
/*! the () operator */ /** the () operator */
int operator()(Interface1D &inter) int operator()(Interface1D &inter)
{ {
Functions1D::QuantitativeInvisibilityF1D func; Functions1D::QuantitativeInvisibilityF1D func;
@@ -217,7 +217,7 @@ class QuantitativeInvisibilityUP1D : public UnaryPredicate1D {
}; };
// ContourUP1D // ContourUP1D
/*! Returns true if the Interface1D is a contour. /** Returns true if the Interface1D is a contour.
* An Interface1D is a contour if it is bordered by a different shape on each of its sides. * An Interface1D is a contour if it is bordered by a different shape on each of its sides.
*/ */
class ContourUP1D : public UnaryPredicate1D { class ContourUP1D : public UnaryPredicate1D {
@@ -225,13 +225,13 @@ class ContourUP1D : public UnaryPredicate1D {
Functions1D::CurveNatureF1D _getNature; Functions1D::CurveNatureF1D _getNature;
public: public:
/*! Returns the string "ContourUP1D"*/ /** Returns the string "ContourUP1D"*/
string getName() const string getName() const
{ {
return "ContourUP1D"; return "ContourUP1D";
} }
/*! The () operator. */ /** The () operator. */
int operator()(Interface1D &inter) int operator()(Interface1D &inter)
{ {
if (_getNature(inter) < 0) { if (_getNature(inter) < 0) {
@@ -252,7 +252,7 @@ class ContourUP1D : public UnaryPredicate1D {
}; };
// ExternalContourUP1D // ExternalContourUP1D
/*! Returns true if the Interface1D is an external contour. /** Returns true if the Interface1D is an external contour.
* An Interface1D is an external contour if it is bordered by no shape on one of its sides. * An Interface1D is an external contour if it is bordered by no shape on one of its sides.
*/ */
class ExternalContourUP1D : public UnaryPredicate1D { class ExternalContourUP1D : public UnaryPredicate1D {
@@ -260,13 +260,13 @@ class ExternalContourUP1D : public UnaryPredicate1D {
Functions1D::CurveNatureF1D _getNature; Functions1D::CurveNatureF1D _getNature;
public: public:
/*! Returns the string "ExternalContourUP1D" */ /** Returns the string "ExternalContourUP1D" */
string getName() const string getName() const
{ {
return "ExternalContourUP1D"; return "ExternalContourUP1D";
} }
/*! The () operator. */ /** The () operator. */
int operator()(Interface1D &inter) int operator()(Interface1D &inter)
{ {
if (_getNature(inter) < 0) { if (_getNature(inter) < 0) {
@@ -289,7 +289,7 @@ class ExternalContourUP1D : public UnaryPredicate1D {
}; };
// EqualToTimeStampUP1D // EqualToTimeStampUP1D
/*! Returns true if the Interface1D's time stamp is equal to a certain user-defined value. */ /** Returns true if the Interface1D's time stamp is equal to a certain user-defined value. */
class EqualToTimeStampUP1D : public UnaryPredicate1D { class EqualToTimeStampUP1D : public UnaryPredicate1D {
protected: protected:
unsigned _timeStamp; unsigned _timeStamp;
@@ -300,13 +300,13 @@ class EqualToTimeStampUP1D : public UnaryPredicate1D {
_timeStamp = ts; _timeStamp = ts;
} }
/*! Returns the string "EqualToTimeStampUP1D"*/ /** Returns the string "EqualToTimeStampUP1D"*/
string getName() const string getName() const
{ {
return "EqualToTimeStampUP1D"; return "EqualToTimeStampUP1D";
} }
/*! The () operator. */ /** The () operator. */
int operator()(Interface1D &inter) int operator()(Interface1D &inter)
{ {
result = (inter.getTimeStamp() == _timeStamp); result = (inter.getTimeStamp() == _timeStamp);
@@ -315,7 +315,7 @@ class EqualToTimeStampUP1D : public UnaryPredicate1D {
}; };
// EqualToChainingTimeStampUP1D // EqualToChainingTimeStampUP1D
/*! Returns true if the Interface1D's time stamp is equal to a certain user-defined value. */ /** Returns true if the Interface1D's time stamp is equal to a certain user-defined value. */
class EqualToChainingTimeStampUP1D : public UnaryPredicate1D { class EqualToChainingTimeStampUP1D : public UnaryPredicate1D {
protected: protected:
unsigned _timeStamp; unsigned _timeStamp;
@@ -326,13 +326,13 @@ class EqualToChainingTimeStampUP1D : public UnaryPredicate1D {
_timeStamp = ts; _timeStamp = ts;
} }
/*! Returns the string "EqualToChainingTimeStampUP1D"*/ /** Returns the string "EqualToChainingTimeStampUP1D"*/
string getName() const string getName() const
{ {
return "EqualToChainingTimeStampUP1D"; return "EqualToChainingTimeStampUP1D";
} }
/*! The () operator. */ /** The () operator. */
int operator()(Interface1D &inter) int operator()(Interface1D &inter)
{ {
ViewEdge *edge = dynamic_cast<ViewEdge *>(&inter); ViewEdge *edge = dynamic_cast<ViewEdge *>(&inter);
@@ -346,14 +346,14 @@ class EqualToChainingTimeStampUP1D : public UnaryPredicate1D {
}; };
// ShapeUP1D // ShapeUP1D
/*! Returns true if the shape to which the Interface1D belongs to has the same Id as the one /** Returns true if the shape to which the Interface1D belongs to has the same Id as the one
* specified by the user. */ * specified by the user. */
class ShapeUP1D : public UnaryPredicate1D { class ShapeUP1D : public UnaryPredicate1D {
private: private:
Id _id; Id _id;
public: public:
/*! Builds the Predicate. /** Builds the Predicate.
* \param idFirst: * \param idFirst:
* The first Id component. * The first Id component.
* \param idSecond: * \param idSecond:
@@ -364,13 +364,13 @@ class ShapeUP1D : public UnaryPredicate1D {
_id = Id(idFirst, idSecond); _id = Id(idFirst, idSecond);
} }
/*! Returns the string "ShapeUP1D"*/ /** Returns the string "ShapeUP1D"*/
string getName() const string getName() const
{ {
return "ShapeUP1D"; return "ShapeUP1D";
} }
/*! The () operator. */ /** The () operator. */
int operator()(Interface1D &inter) int operator()(Interface1D &inter)
{ {
set<ViewShape *> shapes; set<ViewShape *> shapes;
@@ -387,13 +387,13 @@ class ShapeUP1D : public UnaryPredicate1D {
}; };
// WithinImageBoundaryUP1D // WithinImageBoundaryUP1D
/*! Returns true if the Interface1D is (partly) within the image boundary. */ /** Returns true if the Interface1D is (partly) within the image boundary. */
class WithinImageBoundaryUP1D : public UnaryPredicate1D { class WithinImageBoundaryUP1D : public UnaryPredicate1D {
private: private:
real _xmin, _ymin, _xmax, _ymax; real _xmin, _ymin, _xmax, _ymax;
public: public:
/*! Builds the Predicate. /** Builds the Predicate.
* \param xmin: * \param xmin:
* The X lower bound of the image boundary. * The X lower bound of the image boundary.
* \param ymin: * \param ymin:
@@ -408,13 +408,13 @@ class WithinImageBoundaryUP1D : public UnaryPredicate1D {
{ {
} }
/*! Returns the string "WithinImageBoundaryUP1D" */ /** Returns the string "WithinImageBoundaryUP1D" */
string getName() const string getName() const
{ {
return "WithinImageBoundaryUP1D"; return "WithinImageBoundaryUP1D";
} }
/*! The () operator. */ /** The () operator. */
int operator()(Interface1D &inter) int operator()(Interface1D &inter)
{ {
// 1st pass: check if a point is within the image boundary. // 1st pass: check if a point is within the image boundary.
@@ -454,16 +454,16 @@ class WithinImageBoundaryUP1D : public UnaryPredicate1D {
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
// TrueBP1D // TrueBP1D
/*! Returns true. */ /** Returns true. */
class TrueBP1D : public BinaryPredicate1D { class TrueBP1D : public BinaryPredicate1D {
public: public:
/*! Returns the string "TrueBP1D" */ /** Returns the string "TrueBP1D" */
string getName() const string getName() const
{ {
return "TrueBP1D"; return "TrueBP1D";
} }
/*! The () operator. */ /** The () operator. */
int operator()(Interface1D & /*i1*/, Interface1D & /*i2*/) int operator()(Interface1D & /*i1*/, Interface1D & /*i2*/)
{ {
result = true; result = true;
@@ -472,16 +472,16 @@ class TrueBP1D : public BinaryPredicate1D {
}; };
// FalseBP1D // FalseBP1D
/*! Returns false. */ /** Returns false. */
class FalseBP1D : public BinaryPredicate1D { class FalseBP1D : public BinaryPredicate1D {
public: public:
/*! Returns the string "FalseBP1D" */ /** Returns the string "FalseBP1D" */
string getName() const string getName() const
{ {
return "FalseBP1D"; return "FalseBP1D";
} }
/*! The () operator. */ /** The () operator. */
int operator()(Interface1D & /*i1*/, Interface1D & /*i2*/) int operator()(Interface1D & /*i1*/, Interface1D & /*i2*/)
{ {
result = false; result = false;
@@ -490,17 +490,17 @@ class FalseBP1D : public BinaryPredicate1D {
}; };
// Length2DBP1D // Length2DBP1D
/*! Returns true if the 2D length of the Interface1D i1 is less than the 2D length of the /** Returns true if the 2D length of the Interface1D i1 is less than the 2D length of the
* Interface1D i2. */ * Interface1D i2. */
class Length2DBP1D : public BinaryPredicate1D { class Length2DBP1D : public BinaryPredicate1D {
public: public:
/*! Returns the string "Length2DBP1D" */ /** Returns the string "Length2DBP1D" */
string getName() const string getName() const
{ {
return "Length2DBP1D"; return "Length2DBP1D";
} }
/*! The () operator. */ /** The () operator. */
int operator()(Interface1D &i1, Interface1D &i2) int operator()(Interface1D &i1, Interface1D &i2)
{ {
result = (i1.getLength2D() > i2.getLength2D()); result = (i1.getLength2D() > i2.getLength2D());
@@ -509,16 +509,16 @@ class Length2DBP1D : public BinaryPredicate1D {
}; };
// SameShapeIdBP1D // SameShapeIdBP1D
/*! Returns true if the Interface1D i1 and i2 belong to the same shape. */ /** Returns true if the Interface1D i1 and i2 belong to the same shape. */
class SameShapeIdBP1D : public BinaryPredicate1D { class SameShapeIdBP1D : public BinaryPredicate1D {
public: public:
/*! Returns the string "SameShapeIdBP1D" */ /** Returns the string "SameShapeIdBP1D" */
string getName() const string getName() const
{ {
return "SameShapeIdBP1D"; return "SameShapeIdBP1D";
} }
/*! The () operator. */ /** The () operator. */
int operator()(Interface1D &i1, Interface1D &i2) int operator()(Interface1D &i1, Interface1D &i2)
{ {
set<ViewShape *> shapes1; set<ViewShape *> shapes1;
@@ -542,7 +542,7 @@ class SameShapeIdBP1D : public BinaryPredicate1D {
}; };
// ViewMapGradientNormBP1D // ViewMapGradientNormBP1D
/*! Returns true if the evaluation of the Gradient norm Function is higher for Interface1D i1 than /** Returns true if the evaluation of the Gradient norm Function is higher for Interface1D i1 than
* for i2. */ * for i2. */
class ViewMapGradientNormBP1D : public BinaryPredicate1D { class ViewMapGradientNormBP1D : public BinaryPredicate1D {
private: private:
@@ -554,13 +554,13 @@ class ViewMapGradientNormBP1D : public BinaryPredicate1D {
{ {
} }
/*! Returns the string "ViewMapGradientNormBP1D" */ /** Returns the string "ViewMapGradientNormBP1D" */
string getName() const string getName() const
{ {
return "ViewMapGradientNormBP1D"; return "ViewMapGradientNormBP1D";
} }
/*! The () operator. */ /** The () operator. */
int operator()(Interface1D &i1, Interface1D &i2) int operator()(Interface1D &i1, Interface1D &i2)
{ {
if (_func(i1) < 0) { if (_func(i1) < 0) {

View File

@@ -52,18 +52,18 @@ namespace Freestyle {
// //
//////////////////////////////////////////////////////// ////////////////////////////////////////////////////////
/*! Class to define an attribute associated to a Stroke Vertex. /** Class to define an attribute associated to a Stroke Vertex.
* This attribute stores the color, alpha and thickness values for a Stroke Vertex. * This attribute stores the color, alpha and thickness values for a Stroke Vertex.
*/ */
class StrokeAttribute { class StrokeAttribute {
public: public:
/*! default constructor */ /** default constructor */
StrokeAttribute(); StrokeAttribute();
/*! Copy constructor */ /** Copy constructor */
StrokeAttribute(const StrokeAttribute &iBrother); StrokeAttribute(const StrokeAttribute &iBrother);
/*! Builds a stroke vertex attribute from a set of parameters. /** Builds a stroke vertex attribute from a set of parameters.
* \param iRColor: * \param iRColor:
* The Red Component value. * The Red Component value.
* \param iGColor: * \param iGColor:
@@ -84,7 +84,7 @@ class StrokeAttribute {
float iRThickness, float iRThickness,
float iLThickness); float iLThickness);
/*! Interpolation constructor. /** Interpolation constructor.
* Builds a StrokeAttribute from two StrokeAttributes and an interpolation parameter. * Builds a StrokeAttribute from two StrokeAttributes and an interpolation parameter.
* \param a1: * \param a1:
* The first Attribute. * The first Attribute.
@@ -95,15 +95,15 @@ class StrokeAttribute {
*/ */
StrokeAttribute(const StrokeAttribute &a1, const StrokeAttribute &a2, float t); StrokeAttribute(const StrokeAttribute &a1, const StrokeAttribute &a2, float t);
/*! destructor */ /** destructor */
virtual ~StrokeAttribute(); virtual ~StrokeAttribute();
/* operators */ /* operators */
/*! operator = */ /** operator = */
StrokeAttribute &operator=(const StrokeAttribute &iBrother); StrokeAttribute &operator=(const StrokeAttribute &iBrother);
/* accessors */ /* accessors */
/*! Returns the attribute's color. /** Returns the attribute's color.
* \return The array of 3 floats containing the R,G,B values of the attribute's color. * \return The array of 3 floats containing the R,G,B values of the attribute's color.
*/ */
inline const float *getColor() const inline const float *getColor() const
@@ -111,37 +111,37 @@ class StrokeAttribute {
return _color; return _color;
} }
/*! Returns the R color component. */ /** Returns the R color component. */
inline const float getColorR() const inline const float getColorR() const
{ {
return _color[0]; return _color[0];
} }
/*! Returns the G color component. */ /** Returns the G color component. */
inline const float getColorG() const inline const float getColorG() const
{ {
return _color[1]; return _color[1];
} }
/*! Returns the B color component. */ /** Returns the B color component. */
inline const float getColorB() const inline const float getColorB() const
{ {
return _color[2]; return _color[2];
} }
/*! Returns the RGB color components. */ /** Returns the RGB color components. */
inline Vec3f getColorRGB() const inline Vec3f getColorRGB() const
{ {
return Vec3f(_color[0], _color[1], _color[2]); return Vec3f(_color[0], _color[1], _color[2]);
} }
/*! Returns the alpha color component. */ /** Returns the alpha color component. */
inline float getAlpha() const inline float getAlpha() const
{ {
return _alpha; return _alpha;
} }
/*! Returns the attribute's thickness. /** Returns the attribute's thickness.
* \return an array of 2 floats. the first value is the thickness on the right of the vertex * \return an array of 2 floats. the first value is the thickness on the right of the vertex
* when following the stroke, the second one is the thickness on the left. * when following the stroke, the second one is the thickness on the left.
*/ */
@@ -150,60 +150,60 @@ class StrokeAttribute {
return _thickness; return _thickness;
} }
/*! Returns the thickness on the right of the vertex when following the stroke. */ /** Returns the thickness on the right of the vertex when following the stroke. */
inline const float getThicknessR() const inline const float getThicknessR() const
{ {
return _thickness[0]; return _thickness[0];
} }
/*! Returns the thickness on the left of the vertex when following the stroke. */ /** Returns the thickness on the left of the vertex when following the stroke. */
inline const float getThicknessL() const inline const float getThicknessL() const
{ {
return _thickness[1]; return _thickness[1];
} }
/*! Returns the thickness on the right and on the left of the vertex when following the stroke. /** Returns the thickness on the right and on the left of the vertex when following the stroke.
*/ */
inline Vec2f getThicknessRL() const inline Vec2f getThicknessRL() const
{ {
return Vec2f(_thickness[0], _thickness[1]); return Vec2f(_thickness[0], _thickness[1]);
} }
/*! Returns true if the strokevertex is visible, false otherwise */ /** Returns true if the strokevertex is visible, false otherwise */
inline bool isVisible() const inline bool isVisible() const
{ {
return _visible; return _visible;
} }
/*! Returns an attribute of type real /** Returns an attribute of type real
* \param iName: * \param iName:
* The name of the attribute * The name of the attribute
*/ */
float getAttributeReal(const char *iName) const; float getAttributeReal(const char *iName) const;
/*! Returns an attribute of type Vec2f /** Returns an attribute of type Vec2f
* \param iName: * \param iName:
* The name of the attribute * The name of the attribute
*/ */
Vec2f getAttributeVec2f(const char *iName) const; Vec2f getAttributeVec2f(const char *iName) const;
/*! Returns an attribute of type Vec3f /** Returns an attribute of type Vec3f
* \param iName: * \param iName:
* The name of the attribute * The name of the attribute
*/ */
Vec3f getAttributeVec3f(const char *iName) const; Vec3f getAttributeVec3f(const char *iName) const;
/*! Checks whether the attribute iName is available */ /** Checks whether the attribute iName is available */
bool isAttributeAvailableReal(const char *iName) const; bool isAttributeAvailableReal(const char *iName) const;
/*! Checks whether the attribute iName is available */ /** Checks whether the attribute iName is available */
bool isAttributeAvailableVec2f(const char *iName) const; bool isAttributeAvailableVec2f(const char *iName) const;
/*! Checks whether the attribute iName is available */ /** Checks whether the attribute iName is available */
bool isAttributeAvailableVec3f(const char *iName) const; bool isAttributeAvailableVec3f(const char *iName) const;
/* modifiers */ /* modifiers */
/*! sets the attribute's color. /** sets the attribute's color.
* \param r: * \param r:
* The new R value. * The new R value.
* \param g: * \param g:
@@ -218,7 +218,7 @@ class StrokeAttribute {
_color[2] = b; _color[2] = b;
} }
/*! sets the attribute's color. /** sets the attribute's color.
* \param iRGB: * \param iRGB:
* The new RGB values. * The new RGB values.
*/ */
@@ -229,7 +229,7 @@ class StrokeAttribute {
_color[2] = iRGB[2]; _color[2] = iRGB[2];
} }
/*! sets the attribute's alpha value. /** sets the attribute's alpha value.
* \param alpha: * \param alpha:
* The new alpha value. * The new alpha value.
*/ */
@@ -238,7 +238,7 @@ class StrokeAttribute {
_alpha = alpha; _alpha = alpha;
} }
/*! sets the attribute's thickness. /** sets the attribute's thickness.
* \param tr: * \param tr:
* The thickness on the right of the vertex when following the stroke. * The thickness on the right of the vertex when following the stroke.
* \param tl: * \param tl:
@@ -250,7 +250,7 @@ class StrokeAttribute {
_thickness[1] = tl; _thickness[1] = tl;
} }
/*! sets the attribute's thickness. /** sets the attribute's thickness.
* \param tRL: * \param tRL:
* The thickness on the right and on the left of the vertex when following the stroke. * The thickness on the right and on the left of the vertex when following the stroke.
*/ */
@@ -260,13 +260,13 @@ class StrokeAttribute {
_thickness[1] = tRL[1]; _thickness[1] = tRL[1];
} }
/*! sets the visible flag. True means visible. */ /** sets the visible flag. True means visible. */
inline void setVisible(bool iVisible) inline void setVisible(bool iVisible)
{ {
_visible = iVisible; _visible = iVisible;
} }
/*! Adds a user defined attribute of type real /** Adds a user defined attribute of type real
* If there is no attribute of name iName, it is added. * If there is no attribute of name iName, it is added.
* Otherwise, the new value replaces the old one. * Otherwise, the new value replaces the old one.
* \param iName: * \param iName:
@@ -276,7 +276,7 @@ class StrokeAttribute {
*/ */
void setAttributeReal(const char *iName, float att); void setAttributeReal(const char *iName, float att);
/*! Adds a user defined attribute of type Vec2f /** Adds a user defined attribute of type Vec2f
* If there is no attribute of name iName, it is added. * If there is no attribute of name iName, it is added.
* Otherwise, the new value replaces the old one. * Otherwise, the new value replaces the old one.
* \param iName: * \param iName:
@@ -286,7 +286,7 @@ class StrokeAttribute {
*/ */
void setAttributeVec2f(const char *iName, const Vec2f &att); void setAttributeVec2f(const char *iName, const Vec2f &att);
/*! Adds a user defined attribute of type Vec3f /** Adds a user defined attribute of type Vec3f
* If there is no attribute of name iName, it is added. * If there is no attribute of name iName, it is added.
* Otherwise, the new value replaces the old one. * Otherwise, the new value replaces the old one.
* \param iName: * \param iName:
@@ -322,10 +322,10 @@ class StrokeAttribute {
// //
//////////////////////////////////////////////////////// ////////////////////////////////////////////////////////
/*! Class to define a stroke vertex. */ /** Class to define a stroke vertex. */
class StrokeVertex : public CurvePoint { class StrokeVertex : public CurvePoint {
public: // Implementation of Interface0D public: // Implementation of Interface0D
/*! Returns the string "StrokeVertex" */ /** Returns the string "StrokeVertex" */
virtual string getExactTypeName() const virtual string getExactTypeName() const
{ {
return "StrokeVertex"; return "StrokeVertex";
@@ -337,129 +337,129 @@ class StrokeVertex : public CurvePoint {
float _StrokeLength; // stroke length float _StrokeLength; // stroke length
public: public:
/*! default constructor */ /** default constructor */
StrokeVertex(); StrokeVertex();
/*! Copy constructor */ /** Copy constructor */
StrokeVertex(const StrokeVertex &iBrother); StrokeVertex(const StrokeVertex &iBrother);
/*! Builds a stroke vertex from a SVertex */ /** Builds a stroke vertex from a SVertex */
StrokeVertex(SVertex *iSVertex); StrokeVertex(SVertex *iSVertex);
/*! Builds a stroke vertex from a CurvePoint */ /** Builds a stroke vertex from a CurvePoint */
StrokeVertex(CurvePoint *iPoint); StrokeVertex(CurvePoint *iPoint);
/*! Builds Stroke Vertex from 2 stroke vertices and an interpolation parameter*/ /** Builds Stroke Vertex from 2 stroke vertices and an interpolation parameter*/
StrokeVertex(StrokeVertex *iA, StrokeVertex *iB, float t3); StrokeVertex(StrokeVertex *iA, StrokeVertex *iB, float t3);
/*! Builds a stroke from a view vertex and an attribute */ /** Builds a stroke from a view vertex and an attribute */
StrokeVertex(SVertex *iSVertex, const StrokeAttribute &iAttribute); StrokeVertex(SVertex *iSVertex, const StrokeAttribute &iAttribute);
/* operators */ /* operators */
/*! operator = */ /** operator = */
StrokeVertex &operator=(const StrokeVertex &iBrother); StrokeVertex &operator=(const StrokeVertex &iBrother);
/* accessors */ /* accessors */
/*! Returns the 2D point x coordinate */ /** Returns the 2D point x coordinate */
inline real x() const inline real x() const
{ {
return _Point2d[0]; return _Point2d[0];
} }
/*! Returns the 2D point y coordinate */ /** Returns the 2D point y coordinate */
inline real y() const inline real y() const
{ {
return _Point2d[1]; return _Point2d[1];
} }
/*! Returns the 2D point coordinates as a Vec2r */ /** Returns the 2D point coordinates as a Vec2r */
inline Vec2r getPoint() const inline Vec2r getPoint() const
{ {
return getPoint2D(); return getPoint2D();
} }
/*! Returns the ith 2D point coordinate (i=0 or 1)*/ /** Returns the ith 2D point coordinate (i=0 or 1)*/
inline real operator[](const int i) const inline real operator[](const int i) const
{ {
return _Point2d[i]; return _Point2d[i];
} }
/*! Returns the StrokeAttribute for this StrokeVertex */ /** Returns the StrokeAttribute for this StrokeVertex */
inline const StrokeAttribute &attribute() const inline const StrokeAttribute &attribute() const
{ {
return _Attribute; return _Attribute;
} }
/*! Returns a non-const reference to the StrokeAttribute of this StrokeVertex */ /** Returns a non-const reference to the StrokeAttribute of this StrokeVertex */
inline StrokeAttribute &attribute() inline StrokeAttribute &attribute()
{ {
return _Attribute; return _Attribute;
} }
/*! Returns the curvilinear abscissa */ /** Returns the curvilinear abscissa */
inline float curvilinearAbscissa() const inline float curvilinearAbscissa() const
{ {
return _CurvilignAbscissa; return _CurvilignAbscissa;
} }
/*! Returns the length of the Stroke to which this StrokeVertex belongs */ /** Returns the length of the Stroke to which this StrokeVertex belongs */
inline float strokeLength() const inline float strokeLength() const
{ {
return _StrokeLength; return _StrokeLength;
} }
/*! Returns the curvilinear abscissa of this StrokeVertex in the Stroke */ /** Returns the curvilinear abscissa of this StrokeVertex in the Stroke */
inline float u() const inline float u() const
{ {
return _CurvilignAbscissa / _StrokeLength; return _CurvilignAbscissa / _StrokeLength;
} }
/* modifiers */ /* modifiers */
/*! sets the 2D x value */ /** sets the 2D x value */
inline void setX(real x) inline void setX(real x)
{ {
_Point2d[0] = x; _Point2d[0] = x;
} }
/*! sets the 2D y value */ /** sets the 2D y value */
inline void setY(real y) inline void setY(real y)
{ {
_Point2d[1] = y; _Point2d[1] = y;
} }
/*! sets the 2D x and y values */ /** sets the 2D x and y values */
inline void setPoint(real x, real y) inline void setPoint(real x, real y)
{ {
_Point2d[0] = x; _Point2d[0] = x;
_Point2d[1] = y; _Point2d[1] = y;
} }
/*! sets the 2D x and y values */ /** sets the 2D x and y values */
inline void setPoint(const Vec2r &p) inline void setPoint(const Vec2r &p)
{ {
_Point2d[0] = p[0]; _Point2d[0] = p[0];
_Point2d[1] = p[1]; _Point2d[1] = p[1];
} }
/*! Returns a reference to the ith 2D point coordinate (i=0 or 1) */ /** Returns a reference to the ith 2D point coordinate (i=0 or 1) */
inline real &operator[](const int i) inline real &operator[](const int i)
{ {
return _Point2d[i]; return _Point2d[i];
} }
/*! sets the attribute. */ /** sets the attribute. */
inline void setAttribute(const StrokeAttribute &iAttribute) inline void setAttribute(const StrokeAttribute &iAttribute)
{ {
_Attribute = iAttribute; _Attribute = iAttribute;
} }
/*! sets the curvilinear abscissa of this StrokeVertex in the Stroke */ /** sets the curvilinear abscissa of this StrokeVertex in the Stroke */
inline void setCurvilinearAbscissa(float iAbscissa) inline void setCurvilinearAbscissa(float iAbscissa)
{ {
_CurvilignAbscissa = iAbscissa; _CurvilignAbscissa = iAbscissa;
} }
/*! sets the Stroke's length (it's only a value stored by the Stroke Vertex, it won't change the /** sets the Stroke's length (it's only a value stored by the Stroke Vertex, it won't change the
* real Stroke's length.) * real Stroke's length.)
*/ */
inline void setStrokeLength(float iLength) inline void setStrokeLength(float iLength)
@@ -492,7 +492,7 @@ class StrokeVertexIterator;
} // end of namespace StrokeInternal } // end of namespace StrokeInternal
/*! Class to define a stroke. /** Class to define a stroke.
* A stroke is made of a set of 2D vertices (StrokeVertex), regularly spaced out. * A stroke is made of a set of 2D vertices (StrokeVertex), regularly spaced out.
* This set of vertices defines the stroke's backbone geometry. * This set of vertices defines the stroke's backbone geometry.
* Each of these stroke vertices defines the stroke's shape and appearance at this vertex * Each of these stroke vertices defines the stroke's shape and appearance at this vertex
@@ -500,7 +500,7 @@ class StrokeVertexIterator;
*/ */
class Stroke : public Interface1D { class Stroke : public Interface1D {
public: // Implementation of Interface1D public: // Implementation of Interface1D
/*! Returns the string "Stroke" */ /** Returns the string "Stroke" */
virtual string getExactTypeName() const virtual string getExactTypeName() const
{ {
return "Stroke"; return "Stroke";
@@ -508,17 +508,17 @@ class Stroke : public Interface1D {
// Data access methods // Data access methods
/*! Returns the Id of the Stroke */ /** Returns the Id of the Stroke */
virtual Id getId() const virtual Id getId() const
{ {
return _id; return _id;
} }
/*! The different blending modes available to similate the interaction media-medium. */ /** The different blending modes available to similate the interaction media-medium. */
typedef enum { typedef enum {
DRY_MEDIUM, /*!< To simulate a dry medium such as Pencil or Charcoal.*/ DRY_MEDIUM, /**< To simulate a dry medium such as Pencil or Charcoal.*/
HUMID_MEDIUM, /*!< To simulate ink painting (color subtraction blending).*/ HUMID_MEDIUM, /**< To simulate ink painting (color subtraction blending).*/
OPAQUE_MEDIUM, /*!< To simulate an opaque medium (oil, spray...).*/ OPAQUE_MEDIUM, /**< To simulate an opaque medium (oil, spray...).*/
} MediumType; } MediumType;
public: public:
@@ -549,13 +549,13 @@ class Stroke : public Interface1D {
Vec2r _extremityOrientations[2]; // the orientations of the first and last extermity Vec2r _extremityOrientations[2]; // the orientations of the first and last extermity
public: public:
/*! default constructor */ /** default constructor */
Stroke(); Stroke();
/*! copy constructor */ /** copy constructor */
Stroke(const Stroke &iBrother); Stroke(const Stroke &iBrother);
/*! Builds a stroke from a set of StrokeVertex. /** Builds a stroke from a set of StrokeVertex.
* This constructor is templated by an iterator type. * This constructor is templated by an iterator type.
* This iterator type must allow the vertices parsing using the ++ operator. * This iterator type must allow the vertices parsing using the ++ operator.
* \param iBegin: * \param iBegin:
@@ -565,14 +565,14 @@ class Stroke : public Interface1D {
*/ */
template<class InputVertexIterator> Stroke(InputVertexIterator iBegin, InputVertexIterator iEnd); template<class InputVertexIterator> Stroke(InputVertexIterator iBegin, InputVertexIterator iEnd);
/*! Destructor */ /** Destructor */
virtual ~Stroke(); virtual ~Stroke();
/* operators */ /* operators */
/*! operator = */ /** operator = */
Stroke &operator=(const Stroke &iBrother); Stroke &operator=(const Stroke &iBrother);
/*! Compute the sampling needed to get iNVertices vertices. /** Compute the sampling needed to get iNVertices vertices.
* If the specified number of vertices is less than the actual number of vertices, the actual * If the specified number of vertices is less than the actual number of vertices, the actual
* sampling value is returned. (To remove Vertices, use the RemoveVertex() method of this class). * sampling value is returned. (To remove Vertices, use the RemoveVertex() method of this class).
* \param iNVertices: * \param iNVertices:
@@ -583,7 +583,7 @@ class Stroke : public Interface1D {
*/ */
float ComputeSampling(int iNVertices); float ComputeSampling(int iNVertices);
/*! Resampling method. /** Resampling method.
* Resamples the curve so that it eventually has iNPoints. That means it is going to add * Resamples the curve so that it eventually has iNPoints. That means it is going to add
* iNPoints-vertices_size, if vertices_size is the number of points we already have. If * iNPoints-vertices_size, if vertices_size is the number of points we already have. If
* vertices_size >= iNPoints, no resampling is done. * vertices_size >= iNPoints, no resampling is done.
@@ -592,7 +592,7 @@ class Stroke : public Interface1D {
*/ */
int Resample(int iNPoints); int Resample(int iNPoints);
/*! Resampling method. /** Resampling method.
* Resamples the curve with a given sampling. * Resamples the curve with a given sampling.
* If this sampling is < to the actual sampling value, no resampling is done. * If this sampling is < to the actual sampling value, no resampling is done.
* \param iSampling: * \param iSampling:
@@ -600,18 +600,18 @@ class Stroke : public Interface1D {
*/ */
int Resample(float iSampling); int Resample(float iSampling);
/*! Removes all vertices from the Stroke. /** Removes all vertices from the Stroke.
*/ */
void RemoveAllVertices(); void RemoveAllVertices();
/*! Removes the stroke vertex iVertex /** Removes the stroke vertex iVertex
* from the stroke. * from the stroke.
* The length and curvilinear abscissa are updated * The length and curvilinear abscissa are updated
* consequently. * consequently.
*/ */
void RemoveVertex(StrokeVertex *iVertex); void RemoveVertex(StrokeVertex *iVertex);
/*! Inserts the stroke vertex iVertex in the stroke before next. /** Inserts the stroke vertex iVertex in the stroke before next.
* The length, curvilinear abscissa are updated consequently. * The length, curvilinear abscissa are updated consequently.
* \param iVertex: * \param iVertex:
* The StrokeVertex to insert in the Stroke. * The StrokeVertex to insert in the Stroke.
@@ -620,7 +620,7 @@ class Stroke : public Interface1D {
*/ */
void InsertVertex(StrokeVertex *iVertex, StrokeInternal::StrokeVertexIterator next); void InsertVertex(StrokeVertex *iVertex, StrokeInternal::StrokeVertexIterator next);
/*! Updates the 2D length of the Stroke */ /** Updates the 2D length of the Stroke */
void UpdateLength(); void UpdateLength();
/* Render method */ /* Render method */
@@ -631,50 +631,50 @@ class Stroke : public Interface1D {
/* Iterator definition */ /* Iterator definition */
/* accessors */ /* accessors */
/*! Returns the 2D length of the Stroke */ /** Returns the 2D length of the Stroke */
inline real getLength2D() const inline real getLength2D() const
{ {
return _Length; return _Length;
} }
/*! Returns a reference to the time stamp value of the stroke. */ /** Returns a reference to the time stamp value of the stroke. */
/*! Returns the MediumType used for this Stroke. */ /** Returns the MediumType used for this Stroke. */
inline MediumType getMediumType() const inline MediumType getMediumType() const
{ {
return _mediumType; return _mediumType;
} }
/*! Returns the id of the texture used to simulate th marks system for this Stroke */ /** Returns the id of the texture used to simulate th marks system for this Stroke */
inline unsigned int getTextureId() inline unsigned int getTextureId()
{ {
return _textureId; return _textureId;
} }
/*! Returns the spacing of texture coordinates along the stroke length */ /** Returns the spacing of texture coordinates along the stroke length */
inline float getTextureStep() inline float getTextureStep()
{ {
return _textureStep; return _textureStep;
} }
/*! Returns the texture used at given index to simulate the marks system for this Stroke */ /** Returns the texture used at given index to simulate the marks system for this Stroke */
inline MTex *getMTex(int idx) inline MTex *getMTex(int idx)
{ {
return _mtex[idx]; return _mtex[idx];
} }
/*! Return the shader node tree to define textures. */ /** Return the shader node tree to define textures. */
inline bNodeTree *getNodeTree() inline bNodeTree *getNodeTree()
{ {
return _nodeTree; return _nodeTree;
} }
/*! Returns true if this Stroke has textures assigned, false otherwise. */ /** Returns true if this Stroke has textures assigned, false otherwise. */
inline bool hasTex() const inline bool hasTex() const
{ {
return (_mtex[0] != NULL) || _nodeTree; return (_mtex[0] != NULL) || _nodeTree;
} }
/*! Returns true if this Stroke uses a texture with tips, false otherwise. */ /** Returns true if this Stroke uses a texture with tips, false otherwise. */
inline bool hasTips() const inline bool hasTips() const
{ {
return _tips; return _tips;
@@ -742,34 +742,34 @@ class Stroke : public Interface1D {
} }
/* modifiers */ /* modifiers */
/*! sets the Id of the Stroke. */ /** sets the Id of the Stroke. */
inline void setId(const Id &id) inline void setId(const Id &id)
{ {
_id = id; _id = id;
} }
/*! sets the 2D length of the Stroke. */ /** sets the 2D length of the Stroke. */
void setLength(float iLength); void setLength(float iLength);
/*! sets the medium type that must be used for this Stroke. */ /** sets the medium type that must be used for this Stroke. */
inline void setMediumType(MediumType iType) inline void setMediumType(MediumType iType)
{ {
_mediumType = iType; _mediumType = iType;
} }
/*! sets the texture id to be used to simulate the marks system for this Stroke. */ /** sets the texture id to be used to simulate the marks system for this Stroke. */
inline void setTextureId(unsigned int id) inline void setTextureId(unsigned int id)
{ {
_textureId = id; _textureId = id;
} }
/*! sets the spacing of texture coordinates along the stroke length. */ /** sets the spacing of texture coordinates along the stroke length. */
inline void setTextureStep(float step) inline void setTextureStep(float step)
{ {
_textureStep = step; _textureStep = step;
} }
/*! assigns a blender texture to the first available slot. */ /** assigns a blender texture to the first available slot. */
inline int setMTex(MTex *mtex) inline int setMTex(MTex *mtex)
{ {
for (int a = 0; a < MAX_MTEX; a++) { for (int a = 0; a < MAX_MTEX; a++) {
@@ -781,13 +781,13 @@ class Stroke : public Interface1D {
return -1; /* no free slots */ return -1; /* no free slots */
} }
/*! assigns a node tree (of new shading nodes) to define textures. */ /** assigns a node tree (of new shading nodes) to define textures. */
inline void setNodeTree(bNodeTree *iNodeTree) inline void setNodeTree(bNodeTree *iNodeTree)
{ {
_nodeTree = iNodeTree; _nodeTree = iNodeTree;
} }
/*! sets the flag telling whether this stroke is using a texture with tips or not. */ /** sets the flag telling whether this stroke is using a texture with tips or not. */
inline void setTips(bool iTips) inline void setTips(bool iTips)
{ {
_tips = iTips; _tips = iTips;
@@ -836,7 +836,7 @@ class Stroke : public Interface1D {
const_vertex_iterator vertices_end() const; const_vertex_iterator vertices_end() const;
vertex_iterator vertices_end(); vertex_iterator vertices_end();
/*! Returns a StrokeVertexIterator pointing on the first StrokeVertex of the Stroke. One can /** Returns a StrokeVertexIterator pointing on the first StrokeVertex of the Stroke. One can
* specify a sampling value to re-sample the Stroke on the fly if needed. * specify a sampling value to re-sample the Stroke on the fly if needed.
* *
* \param t: The resampling value with which we want our Stroke to be resampled. * \param t: The resampling value with which we want our Stroke to be resampled.
@@ -844,26 +844,26 @@ class Stroke : public Interface1D {
*/ */
StrokeInternal::StrokeVertexIterator strokeVerticesBegin(float t = 0.0f); StrokeInternal::StrokeVertexIterator strokeVerticesBegin(float t = 0.0f);
/*! Returns a StrokeVertexIterator pointing after the last StrokeVertex of the Stroke. */ /** Returns a StrokeVertexIterator pointing after the last StrokeVertex of the Stroke. */
StrokeInternal::StrokeVertexIterator strokeVerticesEnd(); StrokeInternal::StrokeVertexIterator strokeVerticesEnd();
/*! Returns the number of StrokeVertex constituting the Stroke. */ /** Returns the number of StrokeVertex constituting the Stroke. */
inline unsigned int strokeVerticesSize() const inline unsigned int strokeVerticesSize() const
{ {
return _Vertices.size(); return _Vertices.size();
} }
/*! Returns the i-th StrokeVertex constituting the Stroke. */ /** Returns the i-th StrokeVertex constituting the Stroke. */
inline StrokeVertex &strokeVerticeAt(unsigned int i) inline StrokeVertex &strokeVerticeAt(unsigned int i)
{ {
return *(_Vertices.at(i)); return *(_Vertices.at(i));
} }
// Iterator access (Interface1D) // Iterator access (Interface1D)
/*! Returns an Interface0DIterator pointing on the first StrokeVertex of the Stroke. */ /** Returns an Interface0DIterator pointing on the first StrokeVertex of the Stroke. */
virtual Interface0DIterator verticesBegin(); virtual Interface0DIterator verticesBegin();
/*! Returns an Interface0DIterator pointing after the last StrokeVertex of the Stroke. */ /** Returns an Interface0DIterator pointing after the last StrokeVertex of the Stroke. */
virtual Interface0DIterator verticesEnd(); virtual Interface0DIterator verticesEnd();
virtual Interface0DIterator pointsBegin(float t = 0.0f); virtual Interface0DIterator pointsBegin(float t = 0.0f);

View File

@@ -158,7 +158,7 @@ class vertex_iterator_base : public IteratorBase<Traits, BidirectionalIteratorTa
return &(operator*()); return &(operator*());
} }
/*! accessors */ /** accessors */
inline vertex_container_iterator it() const inline vertex_container_iterator it() const
{ {
return _it; return _it;

View File

@@ -32,7 +32,7 @@ namespace StrokeInternal {
// //
///////////////////////////////////////////////// /////////////////////////////////////////////////
/*! Class defining an iterator designed to iterate over the StrokeVertex of a Stroke. /** Class defining an iterator designed to iterate over the StrokeVertex of a Stroke.
* An instance of a StrokeVertexIterator can only be obtained from a Stroke by calling * An instance of a StrokeVertexIterator can only be obtained from a Stroke by calling
* strokeVerticesBegin() or strokeVerticesEnd(). It is iterating over the same vertices as an * strokeVerticesBegin() or strokeVerticesEnd(). It is iterating over the same vertices as an
* Interface0DIterator. The difference resides in the object access. Indeed, an Interface0DIterator * Interface0DIterator. The difference resides in the object access. Indeed, an Interface0DIterator
@@ -46,12 +46,12 @@ namespace StrokeInternal {
*/ */
class StrokeVertexIterator : public Interface0DIteratorNested { class StrokeVertexIterator : public Interface0DIteratorNested {
public: public:
/*! Default constructor. */ /** Default constructor. */
StrokeVertexIterator() StrokeVertexIterator()
{ {
} }
/*! Copy constructor. */ /** Copy constructor. */
StrokeVertexIterator(const StrokeVertexIterator &vi) StrokeVertexIterator(const StrokeVertexIterator &vi)
{ {
_it = vi._it; _it = vi._it;
@@ -72,7 +72,7 @@ class StrokeVertexIterator : public Interface0DIteratorNested {
{ {
} }
/*! Casts this StrokeVertexIterator into an Interface0DIterator. /** Casts this StrokeVertexIterator into an Interface0DIterator.
* Useful for any call to a function of the type UnaryFunction0D. * Useful for any call to a function of the type UnaryFunction0D.
*/ */
inline Interface0DIterator castToInterface0DIterator() const inline Interface0DIterator castToInterface0DIterator() const
@@ -81,7 +81,7 @@ class StrokeVertexIterator : public Interface0DIteratorNested {
return ret; return ret;
} }
/*! operator= /** operator=
* \attention In the scripting language, you must call \code it2 = StrokeVertexIterator(it1) * \attention In the scripting language, you must call \code it2 = StrokeVertexIterator(it1)
* \endcode instead of \code it2 = it1 \endcode where \a it1 and \a it2 are 2 * \endcode instead of \code it2 = it1 \endcode where \a it1 and \a it2 are 2
* StrokeVertexIterator. Otherwise, incrementing \a it1 will also increment \a it2. * StrokeVertexIterator. Otherwise, incrementing \a it1 will also increment \a it2.
@@ -94,13 +94,13 @@ class StrokeVertexIterator : public Interface0DIteratorNested {
return *this; return *this;
} }
/*! Returns the string "StrokeVertexIterator". */ /** Returns the string "StrokeVertexIterator". */
virtual string getExactTypeName() const virtual string getExactTypeName() const
{ {
return "StrokeVertexIterator"; return "StrokeVertexIterator";
} }
/*! Returns a reference to the pointed StrokeVertex. /** Returns a reference to the pointed StrokeVertex.
* In the scripting language, you must call "getObject()"instead. * In the scripting language, you must call "getObject()"instead.
*/ */
virtual StrokeVertex &operator*() virtual StrokeVertex &operator*()
@@ -108,7 +108,7 @@ class StrokeVertexIterator : public Interface0DIteratorNested {
return **_it; return **_it;
} }
/*! Returns a pointer to the pointed StrokeVertex. /** Returns a pointer to the pointed StrokeVertex.
* Can't be called in the scripting language. * Can't be called in the scripting language.
*/ */
virtual StrokeVertex *operator->() virtual StrokeVertex *operator->()
@@ -116,14 +116,14 @@ class StrokeVertexIterator : public Interface0DIteratorNested {
return &(operator*()); return &(operator*());
} }
/*! Increments. In the scripting language, call "increment()". */ /** Increments. In the scripting language, call "increment()". */
virtual StrokeVertexIterator &operator++() virtual StrokeVertexIterator &operator++()
{ {
increment(); increment();
return *this; return *this;
} }
/*! Increments. In the scripting language, call "increment()". */ /** Increments. In the scripting language, call "increment()". */
virtual StrokeVertexIterator operator++(int) virtual StrokeVertexIterator operator++(int)
{ {
StrokeVertexIterator ret(*this); StrokeVertexIterator ret(*this);
@@ -131,14 +131,14 @@ class StrokeVertexIterator : public Interface0DIteratorNested {
return ret; return ret;
} }
/*! Decrements. In the scripting language, call "decrement()". */ /** Decrements. In the scripting language, call "decrement()". */
virtual StrokeVertexIterator &operator--() virtual StrokeVertexIterator &operator--()
{ {
decrement(); decrement();
return *this; return *this;
} }
/*! Decrements. In the scripting language, call "decrement()". */ /** Decrements. In the scripting language, call "decrement()". */
virtual StrokeVertexIterator operator--(int) virtual StrokeVertexIterator operator--(int)
{ {
StrokeVertexIterator ret(*this); StrokeVertexIterator ret(*this);
@@ -146,27 +146,27 @@ class StrokeVertexIterator : public Interface0DIteratorNested {
return ret; return ret;
} }
/*! Increments. */ /** Increments. */
virtual int increment() virtual int increment()
{ {
++_it; ++_it;
return 0; return 0;
} }
/*! Decrements. */ /** Decrements. */
virtual int decrement() virtual int decrement()
{ {
--_it; --_it;
return 0; return 0;
} }
/*! Returns true if the pointed StrokeVertex is the first of the Stroke. */ /** Returns true if the pointed StrokeVertex is the first of the Stroke. */
bool isBegin() const bool isBegin() const
{ {
return _it == _begin; return _it == _begin;
} }
/*! Returns true if the pointed StrokeVertex is the final valid StrokeVertex of the Stroke. */ /** Returns true if the pointed StrokeVertex is the final valid StrokeVertex of the Stroke. */
bool atLast() bool atLast()
{ {
if (_it == _end) { if (_it == _end) {
@@ -179,13 +179,13 @@ class StrokeVertexIterator : public Interface0DIteratorNested {
return result; return result;
} }
/*! Returns true if the pointed StrokeVertex is after the last StrokeVertex of the Stroke. */ /** Returns true if the pointed StrokeVertex is after the last StrokeVertex of the Stroke. */
bool isEnd() const bool isEnd() const
{ {
return _it == _end; return _it == _end;
} }
/*! operator == */ /** operator == */
virtual bool operator==(const Interface0DIteratorNested &it) const virtual bool operator==(const Interface0DIteratorNested &it) const
{ {
const StrokeVertexIterator *it_exact = dynamic_cast<const StrokeVertexIterator *>(&it); const StrokeVertexIterator *it_exact = dynamic_cast<const StrokeVertexIterator *>(&it);
@@ -195,19 +195,19 @@ class StrokeVertexIterator : public Interface0DIteratorNested {
return (_it == it_exact->_it); return (_it == it_exact->_it);
} }
/*! Returns the curvilinear abscissa of the current point */ /** Returns the curvilinear abscissa of the current point */
virtual float t() const virtual float t() const
{ {
return (*_it)->curvilinearAbscissa(); return (*_it)->curvilinearAbscissa();
} }
/*! Returns the point's parameter in the stroke */ /** Returns the point's parameter in the stroke */
virtual float u() const virtual float u() const
{ {
return (*_it)->u(); return (*_it)->u();
} }
/*! Cloning method */ /** Cloning method */
virtual StrokeVertexIterator *copy() const virtual StrokeVertexIterator *copy() const
{ {
return new StrokeVertexIterator(*this); return new StrokeVertexIterator(*this);

View File

@@ -55,15 +55,15 @@ class StrokeLayer {
virtual ~StrokeLayer(); virtual ~StrokeLayer();
/*! Render method */ /** Render method */
void ScaleThickness(float iFactor); void ScaleThickness(float iFactor);
void Render(const StrokeRenderer *iRenderer); void Render(const StrokeRenderer *iRenderer);
void RenderBasic(const StrokeRenderer *iRenderer); void RenderBasic(const StrokeRenderer *iRenderer);
/*! clears the layer */ /** clears the layer */
void clear(); void clear();
/*! accessors */ /** accessors */
inline stroke_container::iterator strokes_begin() inline stroke_container::iterator strokes_begin()
{ {
return _strokes.begin(); return _strokes.begin();
@@ -84,7 +84,7 @@ class StrokeLayer {
return _strokes.empty(); return _strokes.empty();
} }
/*! modifiers */ /** modifiers */
inline void setStrokes(stroke_container &iStrokes) inline void setStrokes(stroke_container &iStrokes)
{ {
_strokes = iStrokes; _strokes = iStrokes;

View File

@@ -46,7 +46,7 @@ namespace Freestyle {
/* */ /* */
/**********************************/ /**********************************/
/*! Class to load textures */ /** Class to load textures */
class TextureManager { class TextureManager {
public: public:
TextureManager(); TextureManager();
@@ -117,13 +117,13 @@ class TextureManager {
/* */ /* */
/**********************************/ /**********************************/
/*! Class to render a stroke. Creates a triangle strip and stores it strip is lazily created at the /** Class to render a stroke. Creates a triangle strip and stores it strip is lazily created at the
* first rendering */ * first rendering */
class StrokeRenderer { class StrokeRenderer {
public: public:
virtual ~StrokeRenderer(); virtual ~StrokeRenderer();
/*! Renders a stroke rep */ /** Renders a stroke rep */
virtual void RenderStrokeRep(StrokeRep *iStrokeRep) const = 0; virtual void RenderStrokeRep(StrokeRep *iStrokeRep) const = 0;
virtual void RenderStrokeRepBasic(StrokeRep *iStrokeRep) const = 0; virtual void RenderStrokeRepBasic(StrokeRep *iStrokeRep) const = 0;

View File

@@ -197,13 +197,13 @@ class StrokeRep {
StrokeRep(Stroke *iStroke); StrokeRep(Stroke *iStroke);
virtual ~StrokeRep(); virtual ~StrokeRep();
/*! Creates the strips */ /** Creates the strips */
virtual void create(); virtual void create();
/*! Renders the stroke using a Renderer */ /** Renders the stroke using a Renderer */
virtual void Render(const StrokeRenderer *iRenderer); virtual void Render(const StrokeRenderer *iRenderer);
/*! accessors */ /** accessors */
inline Stroke::MediumType getMediumType() const inline Stroke::MediumType getMediumType() const
{ {
return _strokeType; return _strokeType;
@@ -249,7 +249,7 @@ class StrokeRep {
return _stroke; return _stroke;
} }
/*! modifiers */ /** modifiers */
inline void setMediumType(Stroke::MediumType itype) inline void setMediumType(Stroke::MediumType itype)
{ {
_strokeType = itype; _strokeType = itype;

View File

@@ -39,7 +39,7 @@ namespace Freestyle {
class Stroke; class Stroke;
/*! Base class for Stroke Shaders. /** Base class for Stroke Shaders.
* Any Stroke Shader must inherit from this class and overload the shade() method. * Any Stroke Shader must inherit from this class and overload the shade() method.
* A StrokeShader is designed to modify any Stroke's attribute such as Thickness, Color, * A StrokeShader is designed to modify any Stroke's attribute such as Thickness, Color,
* Geometry, Texture, Blending mode... * Geometry, Texture, Blending mode...
@@ -65,24 +65,24 @@ class StrokeShader {
public: public:
void *py_ss; void *py_ss;
/*! Default constructor. */ /** Default constructor. */
StrokeShader() StrokeShader()
{ {
py_ss = 0; py_ss = 0;
} }
/*! Destructor. */ /** Destructor. */
virtual ~StrokeShader() virtual ~StrokeShader()
{ {
} }
/*! Returns the string corresponding to the shader's name. */ /** Returns the string corresponding to the shader's name. */
virtual string getName() const virtual string getName() const
{ {
return "StrokeShader"; return "StrokeShader";
} }
/*! The shading method. This method must be overloaded by inherited classes. /** The shading method. This method must be overloaded by inherited classes.
* \param ioStroke: * \param ioStroke:
* The stroke we wish to shade. this Stroke is modified by the Shader (which typically * The stroke we wish to shade. this Stroke is modified by the Shader (which typically
* modifies the Stroke's attribute's values such as Color, Thickness, Geometry...) * modifies the Stroke's attribute's values such as Color, Thickness, Geometry...)

View File

@@ -43,10 +43,10 @@ class StrokeTesselator {
{ {
} }
/*! Builds a line rep contained from a Stroke */ /** Builds a line rep contained from a Stroke */
LineRep *Tesselate(Stroke *iStroke); LineRep *Tesselate(Stroke *iStroke);
/*! Builds a set of lines rep contained under a a NodeShape, itself contained under a NodeGroup /** Builds a set of lines rep contained under a a NodeShape, itself contained under a NodeGroup
* from a set of strokes. * from a set of strokes.
*/ */
template<class StrokeIterator> NodeGroup *Tesselate(StrokeIterator begin, StrokeIterator end); template<class StrokeIterator> NodeGroup *Tesselate(StrokeIterator begin, StrokeIterator end);

View File

@@ -54,7 +54,7 @@ class TextStrokeRenderer : public StrokeRenderer {
public: public:
TextStrokeRenderer(const char *iFileName = NULL); TextStrokeRenderer(const char *iFileName = NULL);
/*! Renders a stroke rep */ /** Renders a stroke rep */
virtual void RenderStrokeRep(StrokeRep *iStrokeRep) const; virtual void RenderStrokeRep(StrokeRep *iStrokeRep) const;
virtual void RenderStrokeRepBasic(StrokeRep *iStrokeRep) const; virtual void RenderStrokeRepBasic(StrokeRep *iStrokeRep) const;

View File

@@ -39,7 +39,7 @@ class BaseObject {
{ {
} }
/*! At least makes a release on this. /** At least makes a release on this.
* The BaseObject::destroy method must be explicitly called at the end of any overloaded destroy * The BaseObject::destroy method must be explicitly called at the end of any overloaded destroy
*/ */
virtual int destroy() virtual int destroy()
@@ -47,13 +47,13 @@ class BaseObject {
return release(); return release();
} }
/*! Increments the reference counter */ /** Increments the reference counter */
inline int addRef() inline int addRef()
{ {
return ++_ref_counter; return ++_ref_counter;
} }
/*! Decrements the reference counter */ /** Decrements the reference counter */
inline int release() inline int release()
{ {
if (_ref_counter) { if (_ref_counter) {

View File

@@ -27,21 +27,21 @@
namespace Freestyle { namespace Freestyle {
/*! Class used to tag any object by an id. /** Class used to tag any object by an id.
* It is made of two unsigned integers. * It is made of two unsigned integers.
*/ */
class Id { class Id {
public: public:
typedef unsigned id_type; typedef unsigned id_type;
/*! Default constructor */ /** Default constructor */
Id() Id()
{ {
_first = 0; _first = 0;
_second = 0; _second = 0;
} }
/*! Builds an Id from an integer. /** Builds an Id from an integer.
* The second number is set to 0. * The second number is set to 0.
*/ */
Id(id_type id) Id(id_type id)
@@ -50,21 +50,21 @@ class Id {
_second = 0; _second = 0;
} }
/*! Builds the Id from the two numbers */ /** Builds the Id from the two numbers */
Id(id_type ifirst, id_type isecond) Id(id_type ifirst, id_type isecond)
{ {
_first = ifirst; _first = ifirst;
_second = isecond; _second = isecond;
} }
/*! Copy constructor */ /** Copy constructor */
Id(const Id &iBrother) Id(const Id &iBrother)
{ {
_first = iBrother._first; _first = iBrother._first;
_second = iBrother._second; _second = iBrother._second;
} }
/*! Operator= */ /** Operator= */
Id &operator=(const Id &iBrother) Id &operator=(const Id &iBrother)
{ {
_first = iBrother._first; _first = iBrother._first;
@@ -72,43 +72,43 @@ class Id {
return *this; return *this;
} }
/*! Returns the first Id number */ /** Returns the first Id number */
id_type getFirst() const id_type getFirst() const
{ {
return _first; return _first;
} }
/*! Returns the second Id number */ /** Returns the second Id number */
id_type getSecond() const id_type getSecond() const
{ {
return _second; return _second;
} }
/*! Sets the first number constituting the Id */ /** Sets the first number constituting the Id */
void setFirst(id_type first) void setFirst(id_type first)
{ {
_first = first; _first = first;
} }
/*! Sets the second number constituting the Id */ /** Sets the second number constituting the Id */
void setSecond(id_type second) void setSecond(id_type second)
{ {
_second = second; _second = second;
} }
/*! Operator== */ /** Operator== */
bool operator==(const Id &id) const bool operator==(const Id &id) const
{ {
return ((_first == id._first) && (_second == id._second)); return ((_first == id._first) && (_second == id._second));
} }
/*! Operator!= */ /** Operator!= */
bool operator!=(const Id &id) const bool operator!=(const Id &id) const
{ {
return !((*this) == id); return !((*this) == id);
} }
/*! Operator< */ /** Operator< */
bool operator<(const Id &id) const bool operator<(const Id &id) const
{ {
if (_first < id._first) { if (_first < id._first) {

View File

@@ -64,7 +64,7 @@ class ProgressBar {
_label = s; _label = s;
} }
/*! accessors */ /** accessors */
inline unsigned int getTotalSteps() const inline unsigned int getTotalSteps() const
{ {
return _numtotalsteps; return _numtotalsteps;

View File

@@ -42,7 +42,7 @@ namespace Freestyle {
using namespace Geometry; using namespace Geometry;
/*! This class takes as input a WXEdge structure and fills it */ /** This class takes as input a WXEdge structure and fills it */
class FEdgeXDetector { class FEdgeXDetector {
public: public:
FEdgeXDetector() FEdgeXDetector()
@@ -69,7 +69,7 @@ class FEdgeXDetector {
{ {
} }
/*! Process shapes from a WingedEdge containing a list of WShapes */ /** Process shapes from a WingedEdge containing a list of WShapes */
virtual void processShapes(WingedEdge &); virtual void processShapes(WingedEdge &);
// GENERAL STUFF // GENERAL STUFF
@@ -86,7 +86,7 @@ class FEdgeXDetector {
virtual void processCreaseShape(WXShape *iWShape); virtual void processCreaseShape(WXShape *iWShape);
virtual void ProcessCreaseEdge(WXEdge *iEdge); virtual void ProcessCreaseEdge(WXEdge *iEdge);
/*! Sets the minimum angle for detecting crease edges /** Sets the minimum angle for detecting crease edges
* \param angle: * \param angle:
* The angular threshold in degrees (between 0 and 180) for detecting crease edges. An edge is * The angular threshold in degrees (between 0 and 180) for detecting crease edges. An edge is
* considered a crease edge if the angle between two faces sharing the edge is smaller than the * considered a crease edge if the angle between two faces sharing the edge is smaller than the
@@ -121,7 +121,7 @@ class FEdgeXDetector {
virtual void ProcessSuggestiveContourFace(WXFace *iFace); virtual void ProcessSuggestiveContourFace(WXFace *iFace);
virtual void postProcessSuggestiveContourShape(WXShape *iShape); virtual void postProcessSuggestiveContourShape(WXShape *iShape);
virtual void postProcessSuggestiveContourFace(WXFace *iFace); virtual void postProcessSuggestiveContourFace(WXFace *iFace);
/*! Sets the minimal derivative of the radial curvature for suggestive contours /** Sets the minimal derivative of the radial curvature for suggestive contours
* \param dkr: * \param dkr:
* The minimal derivative of the radial curvature * The minimal derivative of the radial curvature
*/ */
@@ -144,7 +144,7 @@ class FEdgeXDetector {
// EVERYBODY // EVERYBODY
virtual void buildSmoothEdges(WXShape *iShape); virtual void buildSmoothEdges(WXShape *iShape);
/*! Sets the current viewpoint */ /** Sets the current viewpoint */
inline void setViewpoint(const Vec3f &ivp) inline void setViewpoint(const Vec3f &ivp)
{ {
_Viewpoint = ivp; _Viewpoint = ivp;
@@ -186,7 +186,7 @@ class FEdgeXDetector {
} }
} }
/*! Sets the radius of the geodesic sphere around each vertex (for the curvature computation) /** Sets the radius of the geodesic sphere around each vertex (for the curvature computation)
* \param r: * \param r:
* The radius of the sphere expressed as a ratio of the mean edge size * The radius of the sphere expressed as a ratio of the mean edge size
*/ */

View File

@@ -52,7 +52,7 @@ using namespace Geometry;
// //
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
/*! Base class for Unary Functions (functors) working on Interface0DIterator. /** Base class for Unary Functions (functors) working on Interface0DIterator.
* A unary function will be used by calling its operator() on an Interface0DIterator. * A unary function will be used by calling its operator() on an Interface0DIterator.
* \attention In the scripting language, there exists several prototypes depending on the returned * \attention In the scripting language, there exists several prototypes depending on the returned
* value type. For example, you would inherit from a UnaryFunction0DDouble if you wish to define a * value type. For example, you would inherit from a UnaryFunction0DDouble if you wish to define a
@@ -74,27 +74,27 @@ template<class T> class UnaryFunction0D {
T result; T result;
void *py_uf0D; void *py_uf0D;
/*! The type of the value returned by the functor. */ /** The type of the value returned by the functor. */
typedef T ReturnedValueType; typedef T ReturnedValueType;
/*! Default constructor. */ /** Default constructor. */
UnaryFunction0D() UnaryFunction0D()
{ {
py_uf0D = NULL; py_uf0D = NULL;
} }
/*! Destructor; */ /** Destructor; */
virtual ~UnaryFunction0D() virtual ~UnaryFunction0D()
{ {
} }
/*! Returns the string "UnaryFunction0D" */ /** Returns the string "UnaryFunction0D" */
virtual string getName() const virtual string getName() const
{ {
return "UnaryFunction0D"; return "UnaryFunction0D";
} }
/*! The operator (). /** The operator ().
* \param iter: * \param iter:
* An Interface0DIterator pointing onto the point at which we wish to evaluate the function. * An Interface0DIterator pointing onto the point at which we wish to evaluate the function.
* \return the result of the function of type T. * \return the result of the function of type T.
@@ -139,16 +139,16 @@ class ViewShape;
namespace Functions0D { namespace Functions0D {
// GetXF0D // GetXF0D
/*! Returns the X 3D coordinate of an Interface0D. */ /** Returns the X 3D coordinate of an Interface0D. */
class GetXF0D : public UnaryFunction0D<double> { class GetXF0D : public UnaryFunction0D<double> {
public: public:
/*! Returns the string "GetXF0D" */ /** Returns the string "GetXF0D" */
string getName() const string getName() const
{ {
return "GetXF0D"; return "GetXF0D";
} }
/*! the () operator. */ /** the () operator. */
int operator()(Interface0DIterator &iter) int operator()(Interface0DIterator &iter)
{ {
result = iter->getX(); result = iter->getX();
@@ -157,16 +157,16 @@ class GetXF0D : public UnaryFunction0D<double> {
}; };
// GetYF0D // GetYF0D
/*! Returns the Y 3D coordinate of an Interface0D. */ /** Returns the Y 3D coordinate of an Interface0D. */
class GetYF0D : public UnaryFunction0D<double> { class GetYF0D : public UnaryFunction0D<double> {
public: public:
/*! Returns the string "GetYF0D" */ /** Returns the string "GetYF0D" */
string getName() const string getName() const
{ {
return "GetYF0D"; return "GetYF0D";
} }
/*! the () operator. */ /** the () operator. */
int operator()(Interface0DIterator &iter) int operator()(Interface0DIterator &iter)
{ {
result = iter->getY(); result = iter->getY();
@@ -175,16 +175,16 @@ class GetYF0D : public UnaryFunction0D<double> {
}; };
// GetZF0D // GetZF0D
/*! Returns the Z 3D coordinate of an Interface0D. */ /** Returns the Z 3D coordinate of an Interface0D. */
class GetZF0D : public UnaryFunction0D<double> { class GetZF0D : public UnaryFunction0D<double> {
public: public:
/*! Returns the string "GetZF0D" */ /** Returns the string "GetZF0D" */
string getName() const string getName() const
{ {
return "GetZF0D"; return "GetZF0D";
} }
/*! the () operator. */ /** the () operator. */
int operator()(Interface0DIterator &iter) int operator()(Interface0DIterator &iter)
{ {
result = iter->getZ(); result = iter->getZ();
@@ -193,16 +193,16 @@ class GetZF0D : public UnaryFunction0D<double> {
}; };
// GetProjectedXF0D // GetProjectedXF0D
/*! Returns the X 3D projected coordinate of an Interface0D. */ /** Returns the X 3D projected coordinate of an Interface0D. */
class GetProjectedXF0D : public UnaryFunction0D<double> { class GetProjectedXF0D : public UnaryFunction0D<double> {
public: public:
/*! Returns the string "GetProjectedXF0D" */ /** Returns the string "GetProjectedXF0D" */
string getName() const string getName() const
{ {
return "GetProjectedXF0D"; return "GetProjectedXF0D";
} }
/*! the () operator. */ /** the () operator. */
int operator()(Interface0DIterator &iter) int operator()(Interface0DIterator &iter)
{ {
result = iter->getProjectedX(); result = iter->getProjectedX();
@@ -211,16 +211,16 @@ class GetProjectedXF0D : public UnaryFunction0D<double> {
}; };
// GetProjectedYF0D // GetProjectedYF0D
/*! Returns the Y projected 3D coordinate of an Interface0D. */ /** Returns the Y projected 3D coordinate of an Interface0D. */
class GetProjectedYF0D : public UnaryFunction0D<double> { class GetProjectedYF0D : public UnaryFunction0D<double> {
public: public:
/*! Returns the string "GetProjectedYF0D" */ /** Returns the string "GetProjectedYF0D" */
string getName() const string getName() const
{ {
return "GetProjectedYF0D"; return "GetProjectedYF0D";
} }
/*! the () operator. */ /** the () operator. */
int operator()(Interface0DIterator &iter) int operator()(Interface0DIterator &iter)
{ {
result = iter->getProjectedY(); result = iter->getProjectedY();
@@ -229,16 +229,16 @@ class GetProjectedYF0D : public UnaryFunction0D<double> {
}; };
// GetProjectedZF0D // GetProjectedZF0D
/*! Returns the Z projected 3D coordinate of an Interface0D. */ /** Returns the Z projected 3D coordinate of an Interface0D. */
class GetProjectedZF0D : public UnaryFunction0D<double> { class GetProjectedZF0D : public UnaryFunction0D<double> {
public: public:
/*! Returns the string "GetProjectedZF0D" */ /** Returns the string "GetProjectedZF0D" */
string getName() const string getName() const
{ {
return "GetProjectedZF0D"; return "GetProjectedZF0D";
} }
/*! the () operator. */ /** the () operator. */
int operator()(Interface0DIterator &iter) int operator()(Interface0DIterator &iter)
{ {
result = iter->getProjectedZ(); result = iter->getProjectedZ();
@@ -247,16 +247,16 @@ class GetProjectedZF0D : public UnaryFunction0D<double> {
}; };
// GetCurvilinearAbscissaF0D // GetCurvilinearAbscissaF0D
/*! Returns the curvilinear abscissa of an Interface0D in the context of its 1D element. */ /** Returns the curvilinear abscissa of an Interface0D in the context of its 1D element. */
class GetCurvilinearAbscissaF0D : public UnaryFunction0D<float> { class GetCurvilinearAbscissaF0D : public UnaryFunction0D<float> {
public: public:
/*! Returns the string "GetCurvilinearAbscissaF0D" */ /** Returns the string "GetCurvilinearAbscissaF0D" */
string getName() const string getName() const
{ {
return "GetCurvilinearAbscissaF0D"; return "GetCurvilinearAbscissaF0D";
} }
/*! the () operator. */ /** the () operator. */
int operator()(Interface0DIterator &iter) int operator()(Interface0DIterator &iter)
{ {
result = iter.t(); result = iter.t();
@@ -265,16 +265,16 @@ class GetCurvilinearAbscissaF0D : public UnaryFunction0D<float> {
}; };
// GetParameterF0D // GetParameterF0D
/*! Returns the parameter of an Interface0D in the context of its 1D element. */ /** Returns the parameter of an Interface0D in the context of its 1D element. */
class GetParameterF0D : public UnaryFunction0D<float> { class GetParameterF0D : public UnaryFunction0D<float> {
public: public:
/*! Returns the string "GetCurvilinearAbscissaF0D" */ /** Returns the string "GetCurvilinearAbscissaF0D" */
string getName() const string getName() const
{ {
return "GetParameterF0D"; return "GetParameterF0D";
} }
/*! the () operator. */ /** the () operator. */
int operator()(Interface0DIterator &iter) int operator()(Interface0DIterator &iter)
{ {
result = iter.u(); result = iter.u();
@@ -283,93 +283,93 @@ class GetParameterF0D : public UnaryFunction0D<float> {
}; };
// VertexOrientation2DF0D // VertexOrientation2DF0D
/*! Returns a Vec2r giving the 2D oriented tangent to the 1D element to which the /** Returns a Vec2r giving the 2D oriented tangent to the 1D element to which the
* Interface0DIterator& belongs to and evaluated at the Interface0D pointed by this * Interface0DIterator& belongs to and evaluated at the Interface0D pointed by this
* Interface0DIterator&. * Interface0DIterator&.
*/ */
class VertexOrientation2DF0D : public UnaryFunction0D<Vec2f> { class VertexOrientation2DF0D : public UnaryFunction0D<Vec2f> {
public: public:
/*! Returns the string "VertexOrientation2DF0D" */ /** Returns the string "VertexOrientation2DF0D" */
string getName() const string getName() const
{ {
return "VertexOrientation2DF0D"; return "VertexOrientation2DF0D";
} }
/*! the () operator. */ /** the () operator. */
int operator()(Interface0DIterator &iter); int operator()(Interface0DIterator &iter);
}; };
// VertexOrientation3DF0D // VertexOrientation3DF0D
/*! Returns a Vec3r giving the 3D oriented tangent to the 1D element to which the /** Returns a Vec3r giving the 3D oriented tangent to the 1D element to which the
* Interface0DIterator& belongs to and evaluated at the Interface0D pointed by this * Interface0DIterator& belongs to and evaluated at the Interface0D pointed by this
* Interface0DIterator&. * Interface0DIterator&.
*/ */
class VertexOrientation3DF0D : public UnaryFunction0D<Vec3f> { class VertexOrientation3DF0D : public UnaryFunction0D<Vec3f> {
public: public:
/*! Returns the string "VertexOrientation3DF0D" */ /** Returns the string "VertexOrientation3DF0D" */
string getName() const string getName() const
{ {
return "VertexOrientation3DF0D"; return "VertexOrientation3DF0D";
} }
/*! the () operator. */ /** the () operator. */
int operator()(Interface0DIterator &iter); int operator()(Interface0DIterator &iter);
}; };
// Curvature2DAngleF0D // Curvature2DAngleF0D
/*! Returns a real giving the 2D curvature (as an angle) of the 1D element to which the /** Returns a real giving the 2D curvature (as an angle) of the 1D element to which the
* Interface0DIterator& belongs to and evaluated at the Interface0D pointed by this * Interface0DIterator& belongs to and evaluated at the Interface0D pointed by this
* Interface0DIterator&. * Interface0DIterator&.
*/ */
class Curvature2DAngleF0D : public UnaryFunction0D<double> { class Curvature2DAngleF0D : public UnaryFunction0D<double> {
public: public:
/*! Returns the string "Curvature2DAngleF0D" */ /** Returns the string "Curvature2DAngleF0D" */
string getName() const string getName() const
{ {
return "Curvature2DAngleF0D"; return "Curvature2DAngleF0D";
} }
/*! the () operator. */ /** the () operator. */
int operator()(Interface0DIterator &iter); int operator()(Interface0DIterator &iter);
}; };
// ZDiscontinuity // ZDiscontinuity
/*! Returns a real giving the distance between and Interface0D and the shape that lies behind /** Returns a real giving the distance between and Interface0D and the shape that lies behind
* (occludee). This distance is evaluated in the camera space and normalized between 0 and 1. * (occludee). This distance is evaluated in the camera space and normalized between 0 and 1.
* Therefore, if no object is occluded by the shape to which the Interface0D belongs to, 1 is * Therefore, if no object is occluded by the shape to which the Interface0D belongs to, 1 is
* returned. * returned.
*/ */
class ZDiscontinuityF0D : public UnaryFunction0D<double> { class ZDiscontinuityF0D : public UnaryFunction0D<double> {
public: public:
/*! Returns the string "ZDiscontinuityF0D" */ /** Returns the string "ZDiscontinuityF0D" */
string getName() const string getName() const
{ {
return "ZDiscontinuityF0D"; return "ZDiscontinuityF0D";
} }
/*! the () operator. */ /** the () operator. */
int operator()(Interface0DIterator &iter); int operator()(Interface0DIterator &iter);
}; };
// Normal2DF0D // Normal2DF0D
/*! Returns a Vec2f giving the normalized 2D normal to the 1D element to which the /** Returns a Vec2f giving the normalized 2D normal to the 1D element to which the
* Interface0DIterator& belongs to and evaluated at the Interface0D pointed by this * Interface0DIterator& belongs to and evaluated at the Interface0D pointed by this
* Interface0DIterator&. * Interface0DIterator&.
*/ */
class Normal2DF0D : public UnaryFunction0D<Vec2f> { class Normal2DF0D : public UnaryFunction0D<Vec2f> {
public: public:
/*! Returns the string "Normal2DF0D" */ /** Returns the string "Normal2DF0D" */
string getName() const string getName() const
{ {
return "Normal2DF0D"; return "Normal2DF0D";
} }
/*! the () operator. */ /** the () operator. */
int operator()(Interface0DIterator &iter); int operator()(Interface0DIterator &iter);
}; };
// MaterialF0D // MaterialF0D
/*! Returns the material of the object evaluated at the Interface0D. /** Returns the material of the object evaluated at the Interface0D.
* This evaluation can be ambiguous (in the case of a TVertex for example. * This evaluation can be ambiguous (in the case of a TVertex for example.
* This functor tries to remove this ambiguity using the context offered by the 1D element to * This functor tries to remove this ambiguity using the context offered by the 1D element to
* which the Interface0DIterator& belongs to and by arbitrary choosing the material of the face * which the Interface0DIterator& belongs to and by arbitrary choosing the material of the face
@@ -379,18 +379,18 @@ class Normal2DF0D : public UnaryFunction0D<Vec2f> {
*/ */
class MaterialF0D : public UnaryFunction0D<FrsMaterial> { class MaterialF0D : public UnaryFunction0D<FrsMaterial> {
public: public:
/*! Returns the string "MaterialF0D" */ /** Returns the string "MaterialF0D" */
string getName() const string getName() const
{ {
return "MaterialF0D"; return "MaterialF0D";
} }
/*! the () operator. */ /** the () operator. */
int operator()(Interface0DIterator &iter); int operator()(Interface0DIterator &iter);
}; };
// ShapeIdF0D // ShapeIdF0D
/*! Returns the Id of the Shape the Interface0D belongs to. /** Returns the Id of the Shape the Interface0D belongs to.
* This evaluation can be ambiguous (in the case of a TVertex for example). * This evaluation can be ambiguous (in the case of a TVertex for example).
* This functor tries to remove this ambiguity using the context offered by the 1D element to * This functor tries to remove this ambiguity using the context offered by the 1D element to
* which the Interface0DIterator& belongs to. However, there still can be problematic cases, and * which the Interface0DIterator& belongs to. However, there still can be problematic cases, and
@@ -399,18 +399,18 @@ class MaterialF0D : public UnaryFunction0D<FrsMaterial> {
*/ */
class ShapeIdF0D : public UnaryFunction0D<Id> { class ShapeIdF0D : public UnaryFunction0D<Id> {
public: public:
/*! Returns the string "ShapeIdF0D" */ /** Returns the string "ShapeIdF0D" */
string getName() const string getName() const
{ {
return "ShapeIdF0D"; return "ShapeIdF0D";
} }
/*! the () operator. */ /** the () operator. */
int operator()(Interface0DIterator &iter); int operator()(Interface0DIterator &iter);
}; };
// QiF0D // QiF0D
/*! Returns the quantitative invisibility of this Interface0D. /** Returns the quantitative invisibility of this Interface0D.
* This evaluation can be ambiguous (in the case of a TVertex for example). * This evaluation can be ambiguous (in the case of a TVertex for example).
* This functor tries to remove this ambiguity using the context offered by the 1D element to * This functor tries to remove this ambiguity using the context offered by the 1D element to
* which the Interface0DIterator& belongs to. However, there still can be problematic cases, and * which the Interface0DIterator& belongs to. However, there still can be problematic cases, and
@@ -419,69 +419,69 @@ class ShapeIdF0D : public UnaryFunction0D<Id> {
*/ */
class QuantitativeInvisibilityF0D : public UnaryFunction0D<unsigned int> { class QuantitativeInvisibilityF0D : public UnaryFunction0D<unsigned int> {
public: public:
/*! Returns the string "QuantitativeInvisibilityF0D" */ /** Returns the string "QuantitativeInvisibilityF0D" */
string getName() const string getName() const
{ {
return "QuantitativeInvisibilityF0D"; return "QuantitativeInvisibilityF0D";
} }
/*! the () operator. */ /** the () operator. */
int operator()(Interface0DIterator &iter); int operator()(Interface0DIterator &iter);
}; };
// CurveNatureF0D // CurveNatureF0D
/*! Returns the Nature::EdgeNature of the 1D element the Interface0DIterator& belongs to. */ /** Returns the Nature::EdgeNature of the 1D element the Interface0DIterator& belongs to. */
class CurveNatureF0D : public UnaryFunction0D<Nature::EdgeNature> { class CurveNatureF0D : public UnaryFunction0D<Nature::EdgeNature> {
public: public:
/*! Returns the string "QuantitativeInvisibilityF0D" */ /** Returns the string "QuantitativeInvisibilityF0D" */
string getName() const string getName() const
{ {
return "CurveNatureF0D"; return "CurveNatureF0D";
} }
/*! the () operator. */ /** the () operator. */
int operator()(Interface0DIterator &iter); int operator()(Interface0DIterator &iter);
}; };
// GetShapeF0D // GetShapeF0D
/*! Returns the ViewShape* containing the Interface0D */ /** Returns the ViewShape* containing the Interface0D */
class GetShapeF0D : public UnaryFunction0D<ViewShape *> { class GetShapeF0D : public UnaryFunction0D<ViewShape *> {
public: public:
/*! Returns the string "GetShapeF0D" */ /** Returns the string "GetShapeF0D" */
string getName() const string getName() const
{ {
return "GetShapeF0D"; return "GetShapeF0D";
} }
/*! the () operator. */ /** the () operator. */
int operator()(Interface0DIterator &iter); int operator()(Interface0DIterator &iter);
}; };
// GetOccludersF0D // GetOccludersF0D
/*! Returns a vector containing the ViewShape* occluding the Interface0D */ /** Returns a vector containing the ViewShape* occluding the Interface0D */
class GetOccludersF0D : public UnaryFunction0D<std::vector<ViewShape *>> { class GetOccludersF0D : public UnaryFunction0D<std::vector<ViewShape *>> {
public: public:
/*! Returns the string "GetOccludersF0D" */ /** Returns the string "GetOccludersF0D" */
string getName() const string getName() const
{ {
return "GetOccludersF0D"; return "GetOccludersF0D";
} }
/*! the () operator. */ /** the () operator. */
int operator()(Interface0DIterator &iter); int operator()(Interface0DIterator &iter);
}; };
// GetOccludeeF0D // GetOccludeeF0D
/*! Returns the ViewShape* "occluded" by the Interface0D */ /** Returns the ViewShape* "occluded" by the Interface0D */
class GetOccludeeF0D : public UnaryFunction0D<ViewShape *> { class GetOccludeeF0D : public UnaryFunction0D<ViewShape *> {
public: public:
/*! Returns the string "GetOccludeeF0D" */ /** Returns the string "GetOccludeeF0D" */
string getName() const string getName() const
{ {
return "GetOccludeeF0D"; return "GetOccludeeF0D";
} }
/*! the () operator. */ /** the () operator. */
int operator()(Interface0DIterator &iter); int operator()(Interface0DIterator &iter);
}; };

View File

@@ -42,7 +42,7 @@ namespace Freestyle {
// //
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
/*! Base class for Unary Functions (functors) working on Interface1D. /** Base class for Unary Functions (functors) working on Interface1D.
* A unary function will be used by calling its operator() on an Interface1D. * A unary function will be used by calling its operator() on an Interface1D.
* \attention In the scripting language, there exists several prototypes depending on the returned * \attention In the scripting language, there exists several prototypes depending on the returned
* value type. For example, you would inherit from a UnaryFunction1DDouble if you wish to define a * value type. For example, you would inherit from a UnaryFunction1DDouble if you wish to define a
@@ -61,16 +61,16 @@ template<class T> class UnaryFunction1D {
T result; T result;
void *py_uf1D; void *py_uf1D;
/*! The type of the value returned by the functor. */ /** The type of the value returned by the functor. */
typedef T ReturnedValueType; typedef T ReturnedValueType;
/*! Default constructor */ /** Default constructor */
UnaryFunction1D() UnaryFunction1D()
{ {
_integration = MEAN; _integration = MEAN;
} }
/*! Builds a UnaryFunction1D from an integration type. /** Builds a UnaryFunction1D from an integration type.
* \param iType: * \param iType:
* In case the result for the Interface1D would be obtained by evaluating a 0D function over * In case the result for the Interface1D would be obtained by evaluating a 0D function over
* the different Interface0D of the Interface1D, \a iType tells which integration method to use. * the different Interface0D of the Interface1D, \a iType tells which integration method to use.
@@ -81,18 +81,18 @@ template<class T> class UnaryFunction1D {
_integration = iType; _integration = iType;
} }
/*! destructor. */ /** destructor. */
virtual ~UnaryFunction1D() virtual ~UnaryFunction1D()
{ {
} }
/*! returns the string "UnaryFunction1D". */ /** returns the string "UnaryFunction1D". */
virtual string getName() const virtual string getName() const
{ {
return "UnaryFunction1D"; return "UnaryFunction1D";
} }
/*! The operator (). /** The operator ().
* \param inter: * \param inter:
* The Interface1D on which we wish to evaluate the function. * The Interface1D on which we wish to evaluate the function.
* \return the result of the function of type T. * \return the result of the function of type T.
@@ -103,13 +103,13 @@ template<class T> class UnaryFunction1D {
return Director_BPy_UnaryFunction1D___call__(this, py_uf1D, inter); return Director_BPy_UnaryFunction1D___call__(this, py_uf1D, inter);
} }
/*! Sets the integration method */ /** Sets the integration method */
void setIntegrationType(IntegrationType integration) void setIntegrationType(IntegrationType integration)
{ {
_integration = integration; _integration = integration;
} }
/*! Returns the integration method. */ /** Returns the integration method. */
IntegrationType getIntegrationType() const IntegrationType getIntegrationType() const
{ {
return _integration; return _integration;
@@ -178,13 +178,13 @@ class UnaryFunction1D_void {
namespace Functions1D { namespace Functions1D {
// GetXF1D // GetXF1D
/*! Returns the X 3D coordinate of an Interface1D. */ /** Returns the X 3D coordinate of an Interface1D. */
class GetXF1D : public UnaryFunction1D<double> { class GetXF1D : public UnaryFunction1D<double> {
private: private:
Functions0D::GetXF0D _func; Functions0D::GetXF0D _func;
public: public:
/*! Builds the functor. /** Builds the functor.
* \param iType: * \param iType:
* The integration method used to compute a single value from a set of values. * The integration method used to compute a single value from a set of values.
*/ */
@@ -192,24 +192,24 @@ class GetXF1D : public UnaryFunction1D<double> {
{ {
} }
/*! Returns the string "GetXF1D" */ /** Returns the string "GetXF1D" */
string getName() const string getName() const
{ {
return "GetXF1D"; return "GetXF1D";
} }
/*! the () operator. */ /** the () operator. */
int operator()(Interface1D &inter); int operator()(Interface1D &inter);
}; };
// GetYF1D // GetYF1D
/*! Returns the Y 3D coordinate of an Interface1D. */ /** Returns the Y 3D coordinate of an Interface1D. */
class GetYF1D : public UnaryFunction1D<double> { class GetYF1D : public UnaryFunction1D<double> {
private: private:
Functions0D::GetYF0D _func; Functions0D::GetYF0D _func;
public: public:
/*! Builds the functor. /** Builds the functor.
* \param iType: * \param iType:
* The integration method used to compute a single value from a set of values. * The integration method used to compute a single value from a set of values.
*/ */
@@ -217,24 +217,24 @@ class GetYF1D : public UnaryFunction1D<double> {
{ {
} }
/*! Returns the string "GetYF1D" */ /** Returns the string "GetYF1D" */
string getName() const string getName() const
{ {
return "GetYF1D"; return "GetYF1D";
} }
/*! the () operator. */ /** the () operator. */
int operator()(Interface1D &inter); int operator()(Interface1D &inter);
}; };
// GetZF1D // GetZF1D
/*! Returns the Z 3D coordinate of an Interface1D. */ /** Returns the Z 3D coordinate of an Interface1D. */
class GetZF1D : public UnaryFunction1D<double> { class GetZF1D : public UnaryFunction1D<double> {
private: private:
Functions0D::GetZF0D _func; Functions0D::GetZF0D _func;
public: public:
/*! Builds the functor. /** Builds the functor.
* \param iType: * \param iType:
* The integration method used to compute a single value from a set of values. * The integration method used to compute a single value from a set of values.
*/ */
@@ -242,24 +242,24 @@ class GetZF1D : public UnaryFunction1D<double> {
{ {
} }
/*! Returns the string "GetZF1D" */ /** Returns the string "GetZF1D" */
string getName() const string getName() const
{ {
return "GetZF1D"; return "GetZF1D";
} }
/*! the () operator. */ /** the () operator. */
int operator()(Interface1D &inter); int operator()(Interface1D &inter);
}; };
// GetProjectedXF1D // GetProjectedXF1D
/*! Returns the projected X 3D coordinate of an Interface1D. */ /** Returns the projected X 3D coordinate of an Interface1D. */
class GetProjectedXF1D : public UnaryFunction1D<double> { class GetProjectedXF1D : public UnaryFunction1D<double> {
private: private:
Functions0D::GetProjectedXF0D _func; Functions0D::GetProjectedXF0D _func;
public: public:
/*! Builds the functor. /** Builds the functor.
* \param iType: * \param iType:
* The integration method used to compute a single value from a set of values. * The integration method used to compute a single value from a set of values.
*/ */
@@ -267,24 +267,24 @@ class GetProjectedXF1D : public UnaryFunction1D<double> {
{ {
} }
/*! Returns the string "GetProjectedXF1D" */ /** Returns the string "GetProjectedXF1D" */
string getName() const string getName() const
{ {
return "GetProjectedXF1D"; return "GetProjectedXF1D";
} }
/*! the () operator. */ /** the () operator. */
int operator()(Interface1D &inter); int operator()(Interface1D &inter);
}; };
// GetProjectedYF1D // GetProjectedYF1D
/*! Returns the projected Y 3D coordinate of an Interface1D. */ /** Returns the projected Y 3D coordinate of an Interface1D. */
class GetProjectedYF1D : public UnaryFunction1D<double> { class GetProjectedYF1D : public UnaryFunction1D<double> {
private: private:
Functions0D::GetProjectedYF0D _func; Functions0D::GetProjectedYF0D _func;
public: public:
/*! Builds the functor. /** Builds the functor.
* \param iType: * \param iType:
* The integration method used to compute a single value from a set of values. * The integration method used to compute a single value from a set of values.
*/ */
@@ -292,24 +292,24 @@ class GetProjectedYF1D : public UnaryFunction1D<double> {
{ {
} }
/*! Returns the string "GetProjectedYF1D" */ /** Returns the string "GetProjectedYF1D" */
string getName() const string getName() const
{ {
return "GetProjectedYF1D"; return "GetProjectedYF1D";
} }
/*! the () operator. */ /** the () operator. */
int operator()(Interface1D &inter); int operator()(Interface1D &inter);
}; };
// GetProjectedZF1D // GetProjectedZF1D
/*! Returns the projected Z 3D coordinate of an Interface1D. */ /** Returns the projected Z 3D coordinate of an Interface1D. */
class GetProjectedZF1D : public UnaryFunction1D<double> { class GetProjectedZF1D : public UnaryFunction1D<double> {
private: private:
Functions0D::GetProjectedZF0D _func; Functions0D::GetProjectedZF0D _func;
public: public:
/*! Builds the functor. /** Builds the functor.
* \param iType: * \param iType:
* The integration method used to compute a single value from a set of values. * The integration method used to compute a single value from a set of values.
*/ */
@@ -317,24 +317,24 @@ class GetProjectedZF1D : public UnaryFunction1D<double> {
{ {
} }
/*! Returns the string "GetProjectedZF1D" */ /** Returns the string "GetProjectedZF1D" */
string getName() const string getName() const
{ {
return "GetProjectedZF1D"; return "GetProjectedZF1D";
} }
/*! the () operator. */ /** the () operator. */
int operator()(Interface1D &inter); int operator()(Interface1D &inter);
}; };
// Orientation2DF1D // Orientation2DF1D
/*! Returns the 2D orientation as a Vec2f*/ /** Returns the 2D orientation as a Vec2f*/
class Orientation2DF1D : public UnaryFunction1D<Vec2f> { class Orientation2DF1D : public UnaryFunction1D<Vec2f> {
private: private:
Functions0D::VertexOrientation2DF0D _func; Functions0D::VertexOrientation2DF0D _func;
public: public:
/*! Builds the functor. /** Builds the functor.
* \param iType: * \param iType:
* The integration method used to compute a single value from a set of values. * The integration method used to compute a single value from a set of values.
*/ */
@@ -342,24 +342,24 @@ class Orientation2DF1D : public UnaryFunction1D<Vec2f> {
{ {
} }
/*! Returns the string "Orientation2DF1D" */ /** Returns the string "Orientation2DF1D" */
string getName() const string getName() const
{ {
return "Orientation2DF1D"; return "Orientation2DF1D";
} }
/*! the () operator. */ /** the () operator. */
int operator()(Interface1D &inter); int operator()(Interface1D &inter);
}; };
// Orientation3DF1D // Orientation3DF1D
/*! Returns the 3D orientation as a Vec3f. */ /** Returns the 3D orientation as a Vec3f. */
class Orientation3DF1D : public UnaryFunction1D<Vec3f> { class Orientation3DF1D : public UnaryFunction1D<Vec3f> {
private: private:
Functions0D::VertexOrientation3DF0D _func; Functions0D::VertexOrientation3DF0D _func;
public: public:
/*! Builds the functor. /** Builds the functor.
* \param iType: * \param iType:
* The integration method used to compute a single value from a set of values. * The integration method used to compute a single value from a set of values.
*/ */
@@ -367,18 +367,18 @@ class Orientation3DF1D : public UnaryFunction1D<Vec3f> {
{ {
} }
/*! Returns the string "Orientation3DF1D" */ /** Returns the string "Orientation3DF1D" */
string getName() const string getName() const
{ {
return "Orientation3DF1D"; return "Orientation3DF1D";
} }
/*! the () operator. */ /** the () operator. */
int operator()(Interface1D &inter); int operator()(Interface1D &inter);
}; };
// ZDiscontinuityF1D // ZDiscontinuityF1D
/*! Returns a real giving the distance between and Interface1D and the shape that lies behind /** Returns a real giving the distance between and Interface1D and the shape that lies behind
* (occludee). This distance is evaluated in the camera space and normalized between 0 and 1. * (occludee). This distance is evaluated in the camera space and normalized between 0 and 1.
* Therefore, if no object is occluded by the shape to which the Interface1D belongs to, 1 is * Therefore, if no object is occluded by the shape to which the Interface1D belongs to, 1 is
* returned. * returned.
@@ -388,7 +388,7 @@ class ZDiscontinuityF1D : public UnaryFunction1D<double> {
Functions0D::ZDiscontinuityF0D _func; Functions0D::ZDiscontinuityF0D _func;
public: public:
/*! Builds the functor. /** Builds the functor.
* \param iType: * \param iType:
* The integration method used to compute a single value from a set of values. * The integration method used to compute a single value from a set of values.
*/ */
@@ -396,18 +396,18 @@ class ZDiscontinuityF1D : public UnaryFunction1D<double> {
{ {
} }
/*! Returns the string "ZDiscontinuityF1D" */ /** Returns the string "ZDiscontinuityF1D" */
string getName() const string getName() const
{ {
return "ZDiscontinuityF1D"; return "ZDiscontinuityF1D";
} }
/*! the () operator. */ /** the () operator. */
int operator()(Interface1D &inter); int operator()(Interface1D &inter);
}; };
// QuantitativeInvisibilityF1D // QuantitativeInvisibilityF1D
/*! Returns the Quantitative Invisibility of an Interface1D element. /** Returns the Quantitative Invisibility of an Interface1D element.
* If the Interface1D is a ViewEdge, then there is no ambiguity concerning the result. But, if the * If the Interface1D is a ViewEdge, then there is no ambiguity concerning the result. But, if the
* Interface1D results of a chaining (chain, stroke), then it might be made of several 1D elements * Interface1D results of a chaining (chain, stroke), then it might be made of several 1D elements
* of different Quantitative Invisibilities. * of different Quantitative Invisibilities.
@@ -417,7 +417,7 @@ class QuantitativeInvisibilityF1D : public UnaryFunction1D<unsigned> {
Functions0D::QuantitativeInvisibilityF0D _func; Functions0D::QuantitativeInvisibilityF0D _func;
public: public:
/*! Builds the functor. /** Builds the functor.
* \param iType: * \param iType:
* The integration method used to compute a single value from a set of values. * The integration method used to compute a single value from a set of values.
*/ */
@@ -425,18 +425,18 @@ class QuantitativeInvisibilityF1D : public UnaryFunction1D<unsigned> {
{ {
} }
/*! Returns the string "QuantitativeInvisibilityF1D" */ /** Returns the string "QuantitativeInvisibilityF1D" */
string getName() const string getName() const
{ {
return "QuantitativeInvisibilityF1D"; return "QuantitativeInvisibilityF1D";
} }
/*! the () operator. */ /** the () operator. */
int operator()(Interface1D &inter); int operator()(Interface1D &inter);
}; };
// CurveNatureF1D // CurveNatureF1D
/*! Returns the nature of the Interface1D (silhouette, ridge, crease...). /** Returns the nature of the Interface1D (silhouette, ridge, crease...).
* Except if the Interface1D is a ViewEdge, this result might be ambiguous. * Except if the Interface1D is a ViewEdge, this result might be ambiguous.
* Indeed, the Interface1D might result from the gathering of several 1D elements, each one being * Indeed, the Interface1D might result from the gathering of several 1D elements, each one being
* of a different nature. An integration method, such as the MEAN, might give, in this case, * of a different nature. An integration method, such as the MEAN, might give, in this case,
@@ -447,7 +447,7 @@ class CurveNatureF1D : public UnaryFunction1D<Nature::EdgeNature> {
Functions0D::CurveNatureF0D _func; Functions0D::CurveNatureF0D _func;
public: public:
/*! Builds the functor. /** Builds the functor.
* \param iType: * \param iType:
* The integration method used to compute a single value from a set of values. * The integration method used to compute a single value from a set of values.
*/ */
@@ -455,63 +455,63 @@ class CurveNatureF1D : public UnaryFunction1D<Nature::EdgeNature> {
{ {
} }
/*! Returns the string "CurveNatureF1D" */ /** Returns the string "CurveNatureF1D" */
string getName() const string getName() const
{ {
return "CurveNatureF1D"; return "CurveNatureF1D";
} }
/*! the () operator. */ /** the () operator. */
int operator()(Interface1D &inter); int operator()(Interface1D &inter);
}; };
// TimeStampF1D // TimeStampF1D
/*! Returns the time stamp of the Interface1D. */ /** Returns the time stamp of the Interface1D. */
class TimeStampF1D : public UnaryFunction1D_void { class TimeStampF1D : public UnaryFunction1D_void {
public: public:
/*! Returns the string "TimeStampF1D" */ /** Returns the string "TimeStampF1D" */
string getName() const string getName() const
{ {
return "TimeStampF1D"; return "TimeStampF1D";
} }
/*! the () operator. */ /** the () operator. */
int operator()(Interface1D &inter); int operator()(Interface1D &inter);
}; };
// IncrementChainingTimeStampF1D // IncrementChainingTimeStampF1D
/*! Increments the chaining time stamp of the Interface1D. */ /** Increments the chaining time stamp of the Interface1D. */
class IncrementChainingTimeStampF1D : public UnaryFunction1D_void { class IncrementChainingTimeStampF1D : public UnaryFunction1D_void {
public: public:
/*! Returns the string "IncrementChainingTimeStampF1D" */ /** Returns the string "IncrementChainingTimeStampF1D" */
string getName() const string getName() const
{ {
return "IncrementChainingTimeStampF1D"; return "IncrementChainingTimeStampF1D";
} }
/*! the () operator. */ /** the () operator. */
int operator()(Interface1D &inter); int operator()(Interface1D &inter);
}; };
// ChainingTimeStampF1D // ChainingTimeStampF1D
/*! Sets the chaining time stamp of the Interface1D. */ /** Sets the chaining time stamp of the Interface1D. */
class ChainingTimeStampF1D : public UnaryFunction1D_void { class ChainingTimeStampF1D : public UnaryFunction1D_void {
public: public:
/*! Returns the string "ChainingTimeStampF1D" */ /** Returns the string "ChainingTimeStampF1D" */
string getName() const string getName() const
{ {
return "ChainingTimeStampF1D"; return "ChainingTimeStampF1D";
} }
/*! the () operator. */ /** the () operator. */
int operator()(Interface1D &inter); int operator()(Interface1D &inter);
}; };
// Curvature2DAngleF1D // Curvature2DAngleF1D
/*! Returns the 2D curvature as an angle for an Interface1D. */ /** Returns the 2D curvature as an angle for an Interface1D. */
class Curvature2DAngleF1D : public UnaryFunction1D<double> { class Curvature2DAngleF1D : public UnaryFunction1D<double> {
public: public:
/*! Builds the functor. /** Builds the functor.
* \param iType: * \param iType:
* The integration method used to compute a single value from a set of values. * The integration method used to compute a single value from a set of values.
*/ */
@@ -519,13 +519,13 @@ class Curvature2DAngleF1D : public UnaryFunction1D<double> {
{ {
} }
/*! Returns the string "Curvature2DAngleF1D" */ /** Returns the string "Curvature2DAngleF1D" */
string getName() const string getName() const
{ {
return "Curvature2DAngleF1D"; return "Curvature2DAngleF1D";
} }
/*! the () operator.*/ /** the () operator.*/
int operator()(Interface1D &inter) int operator()(Interface1D &inter)
{ {
result = integrate(_fun, inter.verticesBegin(), inter.verticesEnd(), _integration); result = integrate(_fun, inter.verticesBegin(), inter.verticesEnd(), _integration);
@@ -537,10 +537,10 @@ class Curvature2DAngleF1D : public UnaryFunction1D<double> {
}; };
// Normal2DF1D // Normal2DF1D
/*! Returns the 2D normal for an interface 1D. */ /** Returns the 2D normal for an interface 1D. */
class Normal2DF1D : public UnaryFunction1D<Vec2f> { class Normal2DF1D : public UnaryFunction1D<Vec2f> {
public: public:
/*! Builds the functor. /** Builds the functor.
* \param iType: * \param iType:
* The integration method used to compute a single value from a set of values. * The integration method used to compute a single value from a set of values.
*/ */
@@ -548,13 +548,13 @@ class Normal2DF1D : public UnaryFunction1D<Vec2f> {
{ {
} }
/*! Returns the string "Normal2DF1D" */ /** Returns the string "Normal2DF1D" */
string getName() const string getName() const
{ {
return "Normal2DF1D"; return "Normal2DF1D";
} }
/*! the () operator.*/ /** the () operator.*/
int operator()(Interface1D &inter) int operator()(Interface1D &inter)
{ {
result = integrate(_fun, inter.verticesBegin(), inter.verticesEnd(), _integration); result = integrate(_fun, inter.verticesBegin(), inter.verticesEnd(), _integration);
@@ -566,59 +566,59 @@ class Normal2DF1D : public UnaryFunction1D<Vec2f> {
}; };
// GetShapeF1D // GetShapeF1D
/*! Returns list of shapes covered by this Interface1D. */ /** Returns list of shapes covered by this Interface1D. */
class GetShapeF1D : public UnaryFunction1D<std::vector<ViewShape *>> { class GetShapeF1D : public UnaryFunction1D<std::vector<ViewShape *>> {
public: public:
/*! Builds the functor. */ /** Builds the functor. */
GetShapeF1D() : UnaryFunction1D<std::vector<ViewShape *>>() GetShapeF1D() : UnaryFunction1D<std::vector<ViewShape *>>()
{ {
} }
/*! Returns the string "GetShapeF1D" */ /** Returns the string "GetShapeF1D" */
string getName() const string getName() const
{ {
return "GetShapeF1D"; return "GetShapeF1D";
} }
/*! the () operator. */ /** the () operator. */
int operator()(Interface1D &inter); int operator()(Interface1D &inter);
}; };
// GetOccludersF1D // GetOccludersF1D
/*! Returns list of occluding shapes covered by this Interface1D. */ /** Returns list of occluding shapes covered by this Interface1D. */
class GetOccludersF1D : public UnaryFunction1D<std::vector<ViewShape *>> { class GetOccludersF1D : public UnaryFunction1D<std::vector<ViewShape *>> {
public: public:
/*! Builds the functor. */ /** Builds the functor. */
GetOccludersF1D() : UnaryFunction1D<std::vector<ViewShape *>>() GetOccludersF1D() : UnaryFunction1D<std::vector<ViewShape *>>()
{ {
} }
/*! Returns the string "GetOccludersF1D" */ /** Returns the string "GetOccludersF1D" */
string getName() const string getName() const
{ {
return "GetOccludersF1D"; return "GetOccludersF1D";
} }
/*! the () operator. */ /** the () operator. */
int operator()(Interface1D &inter); int operator()(Interface1D &inter);
}; };
// GetOccludeeF1D // GetOccludeeF1D
/*! Returns list of occluded shapes covered by this Interface1D. */ /** Returns list of occluded shapes covered by this Interface1D. */
class GetOccludeeF1D : public UnaryFunction1D<std::vector<ViewShape *>> { class GetOccludeeF1D : public UnaryFunction1D<std::vector<ViewShape *>> {
public: public:
/*! Builds the functor. */ /** Builds the functor. */
GetOccludeeF1D() : UnaryFunction1D<std::vector<ViewShape *>>() GetOccludeeF1D() : UnaryFunction1D<std::vector<ViewShape *>>()
{ {
} }
/*! Returns the string "GetOccludeeF1D" */ /** Returns the string "GetOccludeeF1D" */
string getName() const string getName() const
{ {
return "GetOccludeeF1D"; return "GetOccludeeF1D";
} }
/*! the () operator. */ /** the () operator. */
int operator()(Interface1D &inter); int operator()(Interface1D &inter);
}; };

View File

@@ -51,18 +51,18 @@ class ViewVertex;
class NonTVertex; class NonTVertex;
class TVertex; class TVertex;
/*! Base class for any 0D element. */ /** Base class for any 0D element. */
class Interface0D { class Interface0D {
public: public:
/*! Default constructor */ /** Default constructor */
Interface0D() Interface0D()
{ {
} }
/*! Destructor */ /** Destructor */
virtual ~Interface0D(){}; virtual ~Interface0D(){};
/*! Returns the string "Interface0D". */ /** Returns the string "Interface0D". */
virtual string getExactTypeName() const virtual string getExactTypeName() const
{ {
return "Interface0D"; return "Interface0D";
@@ -70,50 +70,50 @@ class Interface0D {
// Data access methods // Data access methods
/*! Returns the 3D x coordinate of the point. */ /** Returns the 3D x coordinate of the point. */
virtual real getX() const; virtual real getX() const;
/*! Returns the 3D y coordinate of the point. */ /** Returns the 3D y coordinate of the point. */
virtual real getY() const; virtual real getY() const;
/*! Returns the 3D z coordinate of the point. */ /** Returns the 3D z coordinate of the point. */
virtual real getZ() const; virtual real getZ() const;
/*! Returns the 3D point. */ /** Returns the 3D point. */
virtual Geometry::Vec3r getPoint3D() const; virtual Geometry::Vec3r getPoint3D() const;
/*! Returns the 2D x coordinate of the point. */ /** Returns the 2D x coordinate of the point. */
virtual real getProjectedX() const; virtual real getProjectedX() const;
/*! Returns the 2D y coordinate of the point. */ /** Returns the 2D y coordinate of the point. */
virtual real getProjectedY() const; virtual real getProjectedY() const;
/*! Returns the 2D z coordinate of the point. */ /** Returns the 2D z coordinate of the point. */
virtual real getProjectedZ() const; virtual real getProjectedZ() const;
/*! Returns the 2D point. */ /** Returns the 2D point. */
virtual Geometry::Vec2r getPoint2D() const; virtual Geometry::Vec2r getPoint2D() const;
/*! Returns the FEdge that lies between this Interface0D and the Interface0D given as argument. /** Returns the FEdge that lies between this Interface0D and the Interface0D given as argument.
*/ */
virtual FEdge *getFEdge(Interface0D &); virtual FEdge *getFEdge(Interface0D &);
/*! Returns the Id of the point. */ /** Returns the Id of the point. */
virtual Id getId() const; virtual Id getId() const;
/*! Returns the nature of the point. */ /** Returns the nature of the point. */
virtual Nature::VertexNature getNature() const; virtual Nature::VertexNature getNature() const;
/*! Cast the Interface0D in SVertex if it can be. */ /** Cast the Interface0D in SVertex if it can be. */
virtual SVertex *castToSVertex(); virtual SVertex *castToSVertex();
/*! Cast the Interface0D in ViewVertex if it can be. */ /** Cast the Interface0D in ViewVertex if it can be. */
virtual ViewVertex *castToViewVertex(); virtual ViewVertex *castToViewVertex();
/*! Cast the Interface0D in NonTVertex if it can be. */ /** Cast the Interface0D in NonTVertex if it can be. */
virtual NonTVertex *castToNonTVertex(); virtual NonTVertex *castToNonTVertex();
/*! Cast the Interface0D in TVertex if it can be. */ /** Cast the Interface0D in TVertex if it can be. */
virtual TVertex *castToTVertex(); virtual TVertex *castToTVertex();
#ifdef WITH_CXX_GUARDEDALLOC #ifdef WITH_CXX_GUARDEDALLOC
@@ -159,10 +159,10 @@ class Interface0DIteratorNested : public Iterator {
return !(*this == it); return !(*this == it);
} }
/*! Returns the curvilinear abscissa */ /** Returns the curvilinear abscissa */
virtual float t() const = 0; virtual float t() const = 0;
/*! Returns the point parameter 0<u<1 */ /** Returns the point parameter 0<u<1 */
virtual float u() const = 0; virtual float u() const = 0;
virtual Interface0DIteratorNested *copy() const = 0; virtual Interface0DIteratorNested *copy() const = 0;
@@ -173,7 +173,7 @@ class Interface0DIteratorNested : public Iterator {
// //
////////////////////////////////////////////////// //////////////////////////////////////////////////
/*! Class defining an iterator over Interface0D elements. /** Class defining an iterator over Interface0D elements.
* An instance of this iterator is always obtained from a 1D element. * An instance of this iterator is always obtained from a 1D element.
* \attention In the scripting language, you must call \code it2 = Interface0DIterator(it1) * \attention In the scripting language, you must call \code it2 = Interface0DIterator(it1)
* \endcode instead of \code it2 = it1 \endcode where \a it1 and \a it2 are 2 Interface0DIterator. * \endcode instead of \code it2 = it1 \endcode where \a it1 and \a it2 are 2 Interface0DIterator.
@@ -186,13 +186,13 @@ class Interface0DIterator : public Iterator {
_iterator = it; _iterator = it;
} }
/*! Copy constructor */ /** Copy constructor */
Interface0DIterator(const Interface0DIterator &it) Interface0DIterator(const Interface0DIterator &it)
{ {
_iterator = it._iterator->copy(); _iterator = it._iterator->copy();
} }
/*! Destructor */ /** Destructor */
virtual ~Interface0DIterator() virtual ~Interface0DIterator()
{ {
if (_iterator) { if (_iterator) {
@@ -200,7 +200,7 @@ class Interface0DIterator : public Iterator {
} }
} }
/*! Operator = /** Operator =
* \attention In the scripting language, you must call \code it2 = Interface0DIterator(it1) * \attention In the scripting language, you must call \code it2 = Interface0DIterator(it1)
* \endcode instead of \code it2 = it1 \endcode where \a it1 and \a it2 are 2 * \endcode instead of \code it2 = it1 \endcode where \a it1 and \a it2 are 2
* Interface0DIterator. Otherwise, incrementing \a it1 will also increment \a it2. * Interface0DIterator. Otherwise, incrementing \a it1 will also increment \a it2.
@@ -214,7 +214,7 @@ class Interface0DIterator : public Iterator {
return *this; return *this;
} }
/*! Returns the string "Interface0DIterator". */ /** Returns the string "Interface0DIterator". */
virtual string getExactTypeName() const virtual string getExactTypeName() const
{ {
if (!_iterator) { if (!_iterator) {
@@ -225,7 +225,7 @@ class Interface0DIterator : public Iterator {
// FIXME test it != 0 (exceptions ?) // FIXME test it != 0 (exceptions ?)
/*! Returns a reference to the pointed Interface0D. /** Returns a reference to the pointed Interface0D.
* In the scripting language, you must call "getObject()" instead using this operator. * In the scripting language, you must call "getObject()" instead using this operator.
*/ */
Interface0D &operator*() Interface0D &operator*()
@@ -233,7 +233,7 @@ class Interface0DIterator : public Iterator {
return _iterator->operator*(); return _iterator->operator*();
} }
/*! Returns a pointer to the pointed Interface0D. /** Returns a pointer to the pointed Interface0D.
* Can't be called in the scripting language. * Can't be called in the scripting language.
*/ */
Interface0D *operator->() Interface0D *operator->()
@@ -241,14 +241,14 @@ class Interface0DIterator : public Iterator {
return &(operator*()); return &(operator*());
} }
/*! Increments. In the scripting language, call "increment()". */ /** Increments. In the scripting language, call "increment()". */
Interface0DIterator &operator++() Interface0DIterator &operator++()
{ {
_iterator->increment(); _iterator->increment();
return *this; return *this;
} }
/*! Increments. In the scripting language, call "increment()". */ /** Increments. In the scripting language, call "increment()". */
Interface0DIterator operator++(int) Interface0DIterator operator++(int)
{ {
Interface0DIterator ret(*this); Interface0DIterator ret(*this);
@@ -256,14 +256,14 @@ class Interface0DIterator : public Iterator {
return ret; return ret;
} }
/*! Decrements. In the scripting language, call "decrement()". */ /** Decrements. In the scripting language, call "decrement()". */
Interface0DIterator &operator--() Interface0DIterator &operator--()
{ {
_iterator->decrement(); _iterator->decrement();
return *this; return *this;
} }
/*! Decrements. In the scripting language, call "decrement()". */ /** Decrements. In the scripting language, call "decrement()". */
Interface0DIterator operator--(int) Interface0DIterator operator--(int)
{ {
Interface0DIterator ret(*this); Interface0DIterator ret(*this);
@@ -271,19 +271,19 @@ class Interface0DIterator : public Iterator {
return ret; return ret;
} }
/*! Increments. */ /** Increments. */
virtual int increment() virtual int increment()
{ {
return _iterator->increment(); return _iterator->increment();
} }
/*! Decrements. */ /** Decrements. */
virtual int decrement() virtual int decrement()
{ {
return _iterator->decrement(); return _iterator->decrement();
} }
/*! Returns true if the pointed Interface0D is the first of the 1D element containing the points /** Returns true if the pointed Interface0D is the first of the 1D element containing the points
* over which we're iterating. * over which we're iterating.
*/ */
virtual bool isBegin() const virtual bool isBegin() const
@@ -291,14 +291,14 @@ class Interface0DIterator : public Iterator {
return _iterator->isBegin(); return _iterator->isBegin();
} }
/*! Returns true if the pointed Interface0D is after the after the last point of the 1D element /** Returns true if the pointed Interface0D is after the after the last point of the 1D element
* we're iterating from. */ * we're iterating from. */
virtual bool isEnd() const virtual bool isEnd() const
{ {
return _iterator->isEnd(); return _iterator->isEnd();
} }
/*! Returns true when the iterator is pointing to the final valid element. */ /** Returns true when the iterator is pointing to the final valid element. */
virtual bool atLast() const virtual bool atLast() const
{ {
if (_iterator->isEnd()) { if (_iterator->isEnd()) {
@@ -311,25 +311,25 @@ class Interface0DIterator : public Iterator {
return result; return result;
} }
/*! operator == . */ /** operator == . */
bool operator==(const Interface0DIterator &it) const bool operator==(const Interface0DIterator &it) const
{ {
return _iterator->operator==(*(it._iterator)); return _iterator->operator==(*(it._iterator));
} }
/*! operator != . */ /** operator != . */
bool operator!=(const Interface0DIterator &it) const bool operator!=(const Interface0DIterator &it) const
{ {
return !(*this == it); return !(*this == it);
} }
/*! Returns the curvilinear abscissa. */ /** Returns the curvilinear abscissa. */
inline float t() const inline float t() const
{ {
return _iterator->t(); return _iterator->t();
} }
/*! Returns the point parameter in the curve 0<=u<=1. */ /** Returns the point parameter in the curve 0<=u<=1. */
inline float u() const inline float u() const
{ {
return _iterator->u(); return _iterator->u();

View File

@@ -41,23 +41,23 @@ using namespace std;
namespace Freestyle { namespace Freestyle {
// Integration method // Integration method
/*! The different integration methods that can be invoked to integrate into a single value the set /** The different integration methods that can be invoked to integrate into a single value the set
* of values obtained from each 0D element of a 1D element. * of values obtained from each 0D element of a 1D element.
*/ */
typedef enum { typedef enum {
MEAN, /*!< The value computed for the 1D element is the mean of the values obtained for the 0D MEAN, /**< The value computed for the 1D element is the mean of the values obtained for the 0D
elements.*/ elements.*/
MIN, /*!< The value computed for the 1D element is the minimum of the values obtained for the 0D MIN, /**< The value computed for the 1D element is the minimum of the values obtained for the 0D
elements.*/ elements.*/
MAX, /*!< The value computed for the 1D element is the maximum of the values obtained for the 0D MAX, /**< The value computed for the 1D element is the maximum of the values obtained for the 0D
elements.*/ elements.*/
FIRST, /*!< The value computed for the 1D element is the first of the values obtained for the 0D FIRST, /**< The value computed for the 1D element is the first of the values obtained for the 0D
elements.*/ elements.*/
LAST, /*!< The value computed for the 1D element is the last of the values obtained for the 0D LAST, /**< The value computed for the 1D element is the last of the values obtained for the 0D
elements.*/ elements.*/
} IntegrationType; } IntegrationType;
/*! Returns a single value from a set of values evaluated at each 0D element of this 1D element. /** Returns a single value from a set of values evaluated at each 0D element of this 1D element.
* \param fun: * \param fun:
* The UnaryFunction0D used to compute a value at each Interface0D. * The UnaryFunction0D used to compute a value at each Interface0D.
* \param it: * \param it:
@@ -127,19 +127,19 @@ T integrate(UnaryFunction0D<T> &fun,
// //
////////////////////////////////////////////////// //////////////////////////////////////////////////
/*! Base class for any 1D element. */ /** Base class for any 1D element. */
class Interface1D { class Interface1D {
public: public:
/*! Default constructor */ /** Default constructor */
Interface1D() Interface1D()
{ {
_timeStamp = 0; _timeStamp = 0;
} }
/*! Destructor */ /** Destructor */
virtual ~Interface1D(){}; virtual ~Interface1D(){};
/*! Returns the string "Interface1D". */ /** Returns the string "Interface1D". */
virtual string getExactTypeName() const virtual string getExactTypeName() const
{ {
return "Interface1D"; return "Interface1D";
@@ -147,13 +147,13 @@ class Interface1D {
// Iterator access // Iterator access
/*! Returns an iterator over the Interface1D vertices, pointing to the first vertex. */ /** Returns an iterator over the Interface1D vertices, pointing to the first vertex. */
virtual Interface0DIterator verticesBegin(); virtual Interface0DIterator verticesBegin();
/*! Returns an iterator over the Interface1D vertices, pointing after the last vertex. */ /** Returns an iterator over the Interface1D vertices, pointing after the last vertex. */
virtual Interface0DIterator verticesEnd(); virtual Interface0DIterator verticesEnd();
/*! Returns an iterator over the Interface1D points, pointing to the first point. The difference /** Returns an iterator over the Interface1D points, pointing to the first point. The difference
* with verticesBegin() is that here we can iterate over points of the 1D element at a any given * with verticesBegin() is that here we can iterate over points of the 1D element at a any given
* sampling. Indeed, for each iteration, a virtual point is created. * sampling. Indeed, for each iteration, a virtual point is created.
* *
@@ -161,7 +161,7 @@ class Interface1D {
*/ */
virtual Interface0DIterator pointsBegin(float t = 0.0f); virtual Interface0DIterator pointsBegin(float t = 0.0f);
/*! Returns an iterator over the Interface1D points, pointing after the last point. The /** Returns an iterator over the Interface1D points, pointing after the last point. The
* difference with verticesEnd() is that here we can iterate over points of the 1D element at a * difference with verticesEnd() is that here we can iterate over points of the 1D element at a
* any given sampling. Indeed, for each iteration, a virtual point is created. * any given sampling. Indeed, for each iteration, a virtual point is created.
* *
@@ -171,23 +171,23 @@ class Interface1D {
// Data access methods // Data access methods
/*! Returns the 2D length of the 1D element. */ /** Returns the 2D length of the 1D element. */
virtual real getLength2D() const; virtual real getLength2D() const;
/*! Returns the Id of the 1D element. */ /** Returns the Id of the 1D element. */
virtual Id getId() const; virtual Id getId() const;
// FIXME: ce truc n'a rien a faire la...(c une requete complexe qui doit etre ds les Function1D) // FIXME: ce truc n'a rien a faire la...(c une requete complexe qui doit etre ds les Function1D)
/*! Returns the nature of the 1D element. */ /** Returns the nature of the 1D element. */
virtual Nature::EdgeNature getNature() const; virtual Nature::EdgeNature getNature() const;
/*! Returns the time stamp of the 1D element. Mainly used for selection. */ /** Returns the time stamp of the 1D element. Mainly used for selection. */
virtual unsigned getTimeStamp() const virtual unsigned getTimeStamp() const
{ {
return _timeStamp; return _timeStamp;
} }
/*! Sets the time stamp for the 1D element. */ /** Sets the time stamp for the 1D element. */
inline void setTimeStamp(unsigned iTimeStamp) inline void setTimeStamp(unsigned iTimeStamp)
{ {
_timeStamp = iTimeStamp; _timeStamp = iTimeStamp;

View File

@@ -66,86 +66,86 @@ class FEdge;
class ViewVertex; class ViewVertex;
class SShape; class SShape;
/*! Class to define a vertex of the embedding. */ /** Class to define a vertex of the embedding. */
class SVertex : public Interface0D { class SVertex : public Interface0D {
public: // Implementation of Interface0D public: // Implementation of Interface0D
/*! Returns the string "SVertex". */ /** Returns the string "SVertex". */
virtual string getExactTypeName() const virtual string getExactTypeName() const
{ {
return "SVertex"; return "SVertex";
} }
// Data access methods // Data access methods
/*! Returns the 3D x coordinate of the vertex. */ /** Returns the 3D x coordinate of the vertex. */
virtual real getX() const virtual real getX() const
{ {
return _Point3D.x(); return _Point3D.x();
} }
/*! Returns the 3D y coordinate of the vertex. */ /** Returns the 3D y coordinate of the vertex. */
virtual real getY() const virtual real getY() const
{ {
return _Point3D.y(); return _Point3D.y();
} }
/*! Returns the 3D z coordinate of the vertex. */ /** Returns the 3D z coordinate of the vertex. */
virtual real getZ() const virtual real getZ() const
{ {
return _Point3D.z(); return _Point3D.z();
} }
/*! Returns the 3D point. */ /** Returns the 3D point. */
virtual Vec3r getPoint3D() const virtual Vec3r getPoint3D() const
{ {
return _Point3D; return _Point3D;
} }
/*! Returns the projected 3D x coordinate of the vertex. */ /** Returns the projected 3D x coordinate of the vertex. */
virtual real getProjectedX() const virtual real getProjectedX() const
{ {
return _Point2D.x(); return _Point2D.x();
} }
/*! Returns the projected 3D y coordinate of the vertex. */ /** Returns the projected 3D y coordinate of the vertex. */
virtual real getProjectedY() const virtual real getProjectedY() const
{ {
return _Point2D.y(); return _Point2D.y();
} }
/*! Returns the projected 3D z coordinate of the vertex. */ /** Returns the projected 3D z coordinate of the vertex. */
virtual real getProjectedZ() const virtual real getProjectedZ() const
{ {
return _Point2D.z(); return _Point2D.z();
} }
/*! Returns the 2D point. */ /** Returns the 2D point. */
virtual Vec2r getPoint2D() const virtual Vec2r getPoint2D() const
{ {
return Vec2r(_Point2D.x(), _Point2D.y()); return Vec2r(_Point2D.x(), _Point2D.y());
} }
/*! Returns the FEdge that lies between this Svertex and the Interface0D given as argument. */ /** Returns the FEdge that lies between this Svertex and the Interface0D given as argument. */
virtual FEdge *getFEdge(Interface0D &); virtual FEdge *getFEdge(Interface0D &);
/*! Returns the Id of the vertex. */ /** Returns the Id of the vertex. */
virtual Id getId() const virtual Id getId() const
{ {
return _Id; return _Id;
} }
/*! Returns the nature of the vertex. */ /** Returns the nature of the vertex. */
virtual Nature::VertexNature getNature() const; virtual Nature::VertexNature getNature() const;
/*! Cast the Interface0D in SVertex if it can be. */ /** Cast the Interface0D in SVertex if it can be. */
virtual SVertex *castToSVertex(); virtual SVertex *castToSVertex();
/*! Cast the Interface0D in ViewVertex if it can be. */ /** Cast the Interface0D in ViewVertex if it can be. */
virtual ViewVertex *castToViewVertex(); virtual ViewVertex *castToViewVertex();
/*! Cast the Interface0D in NonTVertex if it can be. */ /** Cast the Interface0D in NonTVertex if it can be. */
virtual NonTVertex *castToNonTVertex(); virtual NonTVertex *castToNonTVertex();
/*! Cast the Interface0D in TVertex if it can be. */ /** Cast the Interface0D in TVertex if it can be. */
virtual TVertex *castToTVertex(); virtual TVertex *castToTVertex();
public: public:
@@ -166,12 +166,12 @@ class SVertex : public Interface0D {
CurvatureInfo *_curvature_info; CurvatureInfo *_curvature_info;
public: public:
/*! A field that can be used by the user to store any data. /** A field that can be used by the user to store any data.
* This field must be reset afterwards using ResetUserData(). * This field must be reset afterwards using ResetUserData().
*/ */
void *userdata; void *userdata;
/*! Default constructor.*/ /** Default constructor.*/
inline SVertex() inline SVertex()
{ {
_Id = 0; _Id = 0;
@@ -181,7 +181,7 @@ class SVertex : public Interface0D {
_curvature_info = 0; _curvature_info = 0;
} }
/*! Builds a SVertex from 3D coordinates and an Id. */ /** Builds a SVertex from 3D coordinates and an Id. */
inline SVertex(const Vec3r &iPoint3D, const Id &id) inline SVertex(const Vec3r &iPoint3D, const Id &id)
{ {
_Point3D = iPoint3D; _Point3D = iPoint3D;
@@ -192,7 +192,7 @@ class SVertex : public Interface0D {
_curvature_info = 0; _curvature_info = 0;
} }
/*! Copy constructor. */ /** Copy constructor. */
inline SVertex(SVertex &iBrother) inline SVertex(SVertex &iBrother)
{ {
_Id = iBrother._Id; _Id = iBrother._Id;
@@ -212,7 +212,7 @@ class SVertex : public Interface0D {
userdata = 0; userdata = 0;
} }
/*! Destructor. */ /** Destructor. */
virtual ~SVertex() virtual ~SVertex()
{ {
if (_curvature_info) { if (_curvature_info) {
@@ -220,14 +220,14 @@ class SVertex : public Interface0D {
} }
} }
/*! Cloning method. */ /** Cloning method. */
virtual SVertex *duplicate() virtual SVertex *duplicate()
{ {
SVertex *clone = new SVertex(*this); SVertex *clone = new SVertex(*this);
return clone; return clone;
} }
/*! operator == */ /** operator == */
virtual bool operator==(const SVertex &iBrother) virtual bool operator==(const SVertex &iBrother)
{ {
return ((_Point2D == iBrother._Point2D) && (_Point3D == iBrother._Point3D)); return ((_Point2D == iBrother._Point2D) && (_Point3D == iBrother._Point3D));
@@ -244,7 +244,7 @@ class SVertex : public Interface0D {
return _Point2D; return _Point2D;
} }
/*! Returns the set of normals for this Vertex. /** Returns the set of normals for this Vertex.
* In a smooth surface, a vertex has exactly one normal. * In a smooth surface, a vertex has exactly one normal.
* In a sharp surface, a vertex can have any number of normals. * In a sharp surface, a vertex can have any number of normals.
*/ */
@@ -253,7 +253,7 @@ class SVertex : public Interface0D {
return _Normals; return _Normals;
} }
/*! Returns the number of different normals for this vertex. */ /** Returns the number of different normals for this vertex. */
inline unsigned normalsSize() const inline unsigned normalsSize() const
{ {
return _Normals.size(); return _Normals.size();
@@ -284,7 +284,7 @@ class SVertex : public Interface0D {
return _Point2D[2]; return _Point2D[2];
} }
/*! If this SVertex is also a ViewVertex, this method returns a pointer onto this ViewVertex. /** If this SVertex is also a ViewVertex, this method returns a pointer onto this ViewVertex.
* 0 is returned otherwise. * 0 is returned otherwise.
*/ */
inline ViewVertex *viewvertex() inline ViewVertex *viewvertex()
@@ -292,20 +292,20 @@ class SVertex : public Interface0D {
return _pViewVertex; return _pViewVertex;
} }
/*! modifiers */ /** modifiers */
/*! Sets the 3D coordinates of the SVertex. */ /** Sets the 3D coordinates of the SVertex. */
inline void setPoint3D(const Vec3r &iPoint3D) inline void setPoint3D(const Vec3r &iPoint3D)
{ {
_Point3D = iPoint3D; _Point3D = iPoint3D;
} }
/*! Sets the 3D projected coordinates of the SVertex. */ /** Sets the 3D projected coordinates of the SVertex. */
inline void setPoint2D(const Vec3r &iPoint2D) inline void setPoint2D(const Vec3r &iPoint2D)
{ {
_Point2D = iPoint2D; _Point2D = iPoint2D;
} }
/*! Adds a normal to the Svertex's set of normals. If the same normal is already in the set, /** Adds a normal to the Svertex's set of normals. If the same normal is already in the set,
* nothing changes. */ * nothing changes. */
inline void AddNormal(const Vec3r &iNormal) inline void AddNormal(const Vec3r &iNormal)
{ {
@@ -348,7 +348,7 @@ class SVertex : public Interface0D {
} }
#endif #endif
/*! Sets the Id */ /** Sets the Id */
inline void setId(const Id &id) inline void setId(const Id &id)
{ {
_Id = id; _Id = id;
@@ -369,13 +369,13 @@ class SVertex : public Interface0D {
_pViewVertex = iViewVertex; _pViewVertex = iViewVertex;
} }
/*! Add an FEdge to the list of edges emanating from this SVertex. */ /** Add an FEdge to the list of edges emanating from this SVertex. */
inline void AddFEdge(FEdge *iFEdge) inline void AddFEdge(FEdge *iFEdge)
{ {
_FEdges.push_back(iFEdge); _FEdges.push_back(iFEdge);
} }
/*! Remove an FEdge from the list of edges emanating from this SVertex. */ /** Remove an FEdge from the list of edges emanating from this SVertex. */
inline void RemoveFEdge(FEdge *iFEdge) inline void RemoveFEdge(FEdge *iFEdge)
{ {
for (vector<FEdge *>::iterator fe = _FEdges.begin(), fend = _FEdges.end(); fe != fend; fe++) { for (vector<FEdge *>::iterator fe = _FEdges.begin(), fend = _FEdges.end(); fe != fend; fe++) {
@@ -447,7 +447,7 @@ class SVertex : public Interface0D {
inline Vec3r orientation2d() const; inline Vec3r orientation2d() const;
inline Vec3r orientation3d() const; inline Vec3r orientation3d() const;
inline Vec3r curvature2d_as_vector() const; inline Vec3r curvature2d_as_vector() const;
/*! angle in radians */ /** angle in radians */
inline real curvature2d_as_angle() const; inline real curvature2d_as_angle() const;
#endif #endif
@@ -466,7 +466,7 @@ class SVertex : public Interface0D {
class ViewEdge; class ViewEdge;
/*! Base Class for feature edges. /** Base Class for feature edges.
* This FEdge can represent a silhouette, a crease, a ridge/valley, a border or a suggestive * This FEdge can represent a silhouette, a crease, a ridge/valley, a border or a suggestive
* contour. For silhouettes, the FEdge is oriented such as, the visible face lies on the left of * contour. For silhouettes, the FEdge is oriented such as, the visible face lies on the left of
* the edge. For borders, the FEdge is oriented such as, the face lies on the left of the edge. An * the edge. For borders, the FEdge is oriented such as, the face lies on the left of the edge. An
@@ -476,7 +476,7 @@ class ViewEdge;
*/ */
class FEdge : public Interface1D { class FEdge : public Interface1D {
public: // Implementation of Interface0D public: // Implementation of Interface0D
/*! Returns the string "FEdge". */ /** Returns the string "FEdge". */
virtual string getExactTypeName() const virtual string getExactTypeName() const
{ {
return "FEdge"; return "FEdge";
@@ -484,7 +484,7 @@ class FEdge : public Interface1D {
// Data access methods // Data access methods
/*! Returns the 2D length of the FEdge. */ /** Returns the 2D length of the FEdge. */
virtual real getLength2D() const virtual real getLength2D() const
{ {
if (!_VertexA || !_VertexB) { if (!_VertexA || !_VertexB) {
@@ -493,7 +493,7 @@ class FEdge : public Interface1D {
return (_VertexB->getPoint2D() - _VertexA->getPoint2D()).norm(); return (_VertexB->getPoint2D() - _VertexA->getPoint2D()).norm();
} }
/*! Returns the Id of the FEdge. */ /** Returns the Id of the FEdge. */
virtual Id getId() const virtual Id getId() const
{ {
return _Id; return _Id;
@@ -533,12 +533,12 @@ class FEdge : public Interface1D {
bool _isTemporary; bool _isTemporary;
public: public:
/*! A field that can be used by the user to store any data. /** A field that can be used by the user to store any data.
* This field must be reset afterwards using ResetUserData(). * This field must be reset afterwards using ResetUserData().
*/ */
void *userdata; void *userdata;
/*! Default constructor */ /** Default constructor */
inline FEdge() inline FEdge()
{ {
userdata = NULL; userdata = NULL;
@@ -555,7 +555,7 @@ class FEdge : public Interface1D {
_isTemporary = false; _isTemporary = false;
} }
/*! Builds an FEdge going from vA to vB. */ /** Builds an FEdge going from vA to vB. */
inline FEdge(SVertex *vA, SVertex *vB) inline FEdge(SVertex *vA, SVertex *vB)
{ {
userdata = NULL; userdata = NULL;
@@ -572,7 +572,7 @@ class FEdge : public Interface1D {
_isTemporary = false; _isTemporary = false;
} }
/*! Copy constructor */ /** Copy constructor */
inline FEdge(FEdge &iBrother) inline FEdge(FEdge &iBrother)
{ {
_VertexA = iBrother.vertexA(); _VertexA = iBrother.vertexA();
@@ -594,12 +594,12 @@ class FEdge : public Interface1D {
userdata = 0; userdata = 0;
} }
/*! Destructor */ /** Destructor */
virtual ~FEdge() virtual ~FEdge()
{ {
} }
/*! Cloning method. */ /** Cloning method. */
virtual FEdge *duplicate() virtual FEdge *duplicate()
{ {
FEdge *clone = new FEdge(*this); FEdge *clone = new FEdge(*this);
@@ -607,31 +607,31 @@ class FEdge : public Interface1D {
} }
/* accessors */ /* accessors */
/*! Returns the first SVertex. */ /** Returns the first SVertex. */
inline SVertex *vertexA() inline SVertex *vertexA()
{ {
return _VertexA; return _VertexA;
} }
/*! Returns the second SVertex. */ /** Returns the second SVertex. */
inline SVertex *vertexB() inline SVertex *vertexB()
{ {
return _VertexB; return _VertexB;
} }
/*! Returns the first SVertex if i=0, the second SVertex if i=1. */ /** Returns the first SVertex if i=0, the second SVertex if i=1. */
inline SVertex *operator[](const unsigned short int &i) const inline SVertex *operator[](const unsigned short int &i) const
{ {
return (i % 2 == 0) ? _VertexA : _VertexB; return (i % 2 == 0) ? _VertexA : _VertexB;
} }
/*! Returns the nature of the FEdge. */ /** Returns the nature of the FEdge. */
inline Nature::EdgeNature getNature() const inline Nature::EdgeNature getNature() const
{ {
return _Nature; return _Nature;
} }
/*! Returns the FEdge following this one in the ViewEdge. /** Returns the FEdge following this one in the ViewEdge.
* If this FEdge is the last of the ViewEdge, 0 is returned. * If this FEdge is the last of the ViewEdge, 0 is returned.
*/ */
inline FEdge *nextEdge() inline FEdge *nextEdge()
@@ -639,7 +639,7 @@ class FEdge : public Interface1D {
return _NextEdge; return _NextEdge;
} }
/*! Returns the Edge preceding this one in the ViewEdge. /** Returns the Edge preceding this one in the ViewEdge.
* If this FEdge is the first one of the ViewEdge, 0 is returned. * If this FEdge is the first one of the ViewEdge, 0 is returned.
*/ */
inline FEdge *previousEdge() inline FEdge *previousEdge()
@@ -668,7 +668,7 @@ class FEdge : public Interface1D {
} }
#endif #endif
/*! Returns a pointer to the ViewEdge to which this FEdge belongs to. */ /** Returns a pointer to the ViewEdge to which this FEdge belongs to. */
inline ViewEdge *viewedge() const inline ViewEdge *viewedge() const
{ {
return _ViewEdge; return _ViewEdge;
@@ -716,7 +716,7 @@ class FEdge : public Interface1D {
return _occludeeEmpty; return _occludeeEmpty;
} }
/*! Returns true if this FEdge is a smooth FEdge. */ /** Returns true if this FEdge is a smooth FEdge. */
inline bool isSmooth() const inline bool isSmooth() const
{ {
return _isSmooth; return _isSmooth;
@@ -733,37 +733,37 @@ class FEdge : public Interface1D {
} }
/* modifiers */ /* modifiers */
/*! Sets the first SVertex. */ /** Sets the first SVertex. */
inline void setVertexA(SVertex *vA) inline void setVertexA(SVertex *vA)
{ {
_VertexA = vA; _VertexA = vA;
} }
/*! Sets the second SVertex. */ /** Sets the second SVertex. */
inline void setVertexB(SVertex *vB) inline void setVertexB(SVertex *vB)
{ {
_VertexB = vB; _VertexB = vB;
} }
/*! Sets the FEdge Id . */ /** Sets the FEdge Id . */
inline void setId(const Id &id) inline void setId(const Id &id)
{ {
_Id = id; _Id = id;
} }
/*! Sets the pointer to the next FEdge. */ /** Sets the pointer to the next FEdge. */
inline void setNextEdge(FEdge *iEdge) inline void setNextEdge(FEdge *iEdge)
{ {
_NextEdge = iEdge; _NextEdge = iEdge;
} }
/*! Sets the pointer to the previous FEdge. */ /** Sets the pointer to the previous FEdge. */
inline void setPreviousEdge(FEdge *iEdge) inline void setPreviousEdge(FEdge *iEdge)
{ {
_PreviousEdge = iEdge; _PreviousEdge = iEdge;
} }
/*! Sets the nature of this FEdge. */ /** Sets the nature of this FEdge. */
inline void setNature(Nature::EdgeNature iNature) inline void setNature(Nature::EdgeNature iNature)
{ {
_Nature = iNature; _Nature = iNature;
@@ -776,7 +776,7 @@ class FEdge : public Interface1D {
} }
#endif #endif
/*! Sets the ViewEdge to which this FEdge belongs to. */ /** Sets the ViewEdge to which this FEdge belongs to. */
inline void setViewEdge(ViewEdge *iViewEdge) inline void setViewEdge(ViewEdge *iViewEdge)
{ {
_ViewEdge = iViewEdge; _ViewEdge = iViewEdge;
@@ -814,7 +814,7 @@ class FEdge : public Interface1D {
_occludeeEmpty = iempty; _occludeeEmpty = iempty;
} }
/*! Sets the flag telling whether this FEdge is smooth or sharp. /** Sets the flag telling whether this FEdge is smooth or sharp.
* true for Smooth, false for Sharp. * true for Smooth, false for Sharp.
*/ */
inline void setSmooth(bool iFlag) inline void setSmooth(bool iFlag)
@@ -946,13 +946,13 @@ class FEdge : public Interface1D {
#endif #endif
// Iterator access (Interface1D) // Iterator access (Interface1D)
/*! Returns an iterator over the 2 (!) SVertex pointing to the first SVertex. */ /** Returns an iterator over the 2 (!) SVertex pointing to the first SVertex. */
virtual inline Interface0DIterator verticesBegin(); virtual inline Interface0DIterator verticesBegin();
/*! Returns an iterator over the 2 (!) SVertex pointing after the last SVertex. */ /** Returns an iterator over the 2 (!) SVertex pointing after the last SVertex. */
virtual inline Interface0DIterator verticesEnd(); virtual inline Interface0DIterator verticesEnd();
/*! Returns an iterator over the FEdge points, pointing to the first point. The difference with /** Returns an iterator over the FEdge points, pointing to the first point. The difference with
* verticesBegin() is that here we can iterate over points of the FEdge at a any given sampling. * verticesBegin() is that here we can iterate over points of the FEdge at a any given sampling.
* Indeed, for each iteration, a virtual point is created. * Indeed, for each iteration, a virtual point is created.
* \param t: * \param t:
@@ -960,7 +960,7 @@ class FEdge : public Interface1D {
*/ */
virtual inline Interface0DIterator pointsBegin(float t = 0.0f); virtual inline Interface0DIterator pointsBegin(float t = 0.0f);
/*! Returns an iterator over the FEdge points, pointing after the last point. The difference with /** Returns an iterator over the FEdge points, pointing after the last point. The difference with
* verticesEnd() is that here we can iterate over points of the FEdge at a any given sampling. * verticesEnd() is that here we can iterate over points of the FEdge at a any given sampling.
* Indeed, for each iteration, a virtual point is created. * Indeed, for each iteration, a virtual point is created.
* \param t: * \param t:
@@ -1138,7 +1138,7 @@ Interface0DIterator FEdge::pointsEnd(float /*t*/)
return verticesEnd(); return verticesEnd();
} }
/*! Class defining a sharp FEdge. A Sharp FEdge corresponds to an initial edge of the input mesh. /** Class defining a sharp FEdge. A Sharp FEdge corresponds to an initial edge of the input mesh.
* It can be a silhouette, a crease or a border. If it is a crease edge, then it is bordered * It can be a silhouette, a crease or a border. If it is a crease edge, then it is bordered
* by two faces of the mesh. Face a lies on its right whereas Face b lies on its left. * by two faces of the mesh. Face a lies on its right whereas Face b lies on its left.
* If it is a border edge, then it doesn't have any face on its right, and thus Face a = 0. * If it is a border edge, then it doesn't have any face on its right, and thus Face a = 0.
@@ -1153,27 +1153,27 @@ class FEdgeSharp : public FEdge {
bool _bFaceMark; bool _bFaceMark;
public: public:
/*! Returns the string "FEdgeSharp" . */ /** Returns the string "FEdgeSharp" . */
virtual string getExactTypeName() const virtual string getExactTypeName() const
{ {
return "FEdgeSharp"; return "FEdgeSharp";
} }
/*! Default constructor. */ /** Default constructor. */
inline FEdgeSharp() : FEdge() inline FEdgeSharp() : FEdge()
{ {
_aFrsMaterialIndex = _bFrsMaterialIndex = 0; _aFrsMaterialIndex = _bFrsMaterialIndex = 0;
_aFaceMark = _bFaceMark = false; _aFaceMark = _bFaceMark = false;
} }
/*! Builds an FEdgeSharp going from vA to vB. */ /** Builds an FEdgeSharp going from vA to vB. */
inline FEdgeSharp(SVertex *vA, SVertex *vB) : FEdge(vA, vB) inline FEdgeSharp(SVertex *vA, SVertex *vB) : FEdge(vA, vB)
{ {
_aFrsMaterialIndex = _bFrsMaterialIndex = 0; _aFrsMaterialIndex = _bFrsMaterialIndex = 0;
_aFaceMark = _bFaceMark = false; _aFaceMark = _bFaceMark = false;
} }
/*! Copy constructor. */ /** Copy constructor. */
inline FEdgeSharp(FEdgeSharp &iBrother) : FEdge(iBrother) inline FEdgeSharp(FEdgeSharp &iBrother) : FEdge(iBrother)
{ {
_aNormal = iBrother._aNormal; _aNormal = iBrother._aNormal;
@@ -1184,19 +1184,19 @@ class FEdgeSharp : public FEdge {
_bFaceMark = iBrother._bFaceMark; _bFaceMark = iBrother._bFaceMark;
} }
/*! Destructor. */ /** Destructor. */
virtual ~FEdgeSharp() virtual ~FEdgeSharp()
{ {
} }
/*! Cloning method. */ /** Cloning method. */
virtual FEdge *duplicate() virtual FEdge *duplicate()
{ {
FEdge *clone = new FEdgeSharp(*this); FEdge *clone = new FEdgeSharp(*this);
return clone; return clone;
} }
/*! Returns the normal to the face lying on the right of the FEdge. If this FEdge is a border, /** Returns the normal to the face lying on the right of the FEdge. If this FEdge is a border,
* it has no Face on its right and therefore, no normal. * it has no Face on its right and therefore, no normal.
*/ */
inline const Vec3r &normalA() inline const Vec3r &normalA()
@@ -1204,13 +1204,13 @@ class FEdgeSharp : public FEdge {
return _aNormal; return _aNormal;
} }
/*! Returns the normal to the face lying on the left of the FEdge. */ /** Returns the normal to the face lying on the left of the FEdge. */
inline const Vec3r &normalB() inline const Vec3r &normalB()
{ {
return _bNormal; return _bNormal;
} }
/*! Returns the index of the material of the face lying on the /** Returns the index of the material of the face lying on the
* right of the FEdge. If this FEdge is a border, * right of the FEdge. If this FEdge is a border,
* it has no Face on its right and therefore, no material. * it has no Face on its right and therefore, no material.
*/ */
@@ -1219,21 +1219,21 @@ class FEdgeSharp : public FEdge {
return _aFrsMaterialIndex; return _aFrsMaterialIndex;
} }
/*! Returns the material of the face lying on the right of the FEdge. If this FEdge is a border, /** Returns the material of the face lying on the right of the FEdge. If this FEdge is a border,
* it has no Face on its right and therefore, no material. * it has no Face on its right and therefore, no material.
*/ */
const FrsMaterial &aFrsMaterial() const; const FrsMaterial &aFrsMaterial() const;
/*! Returns the index of the material of the face lying on the left of the FEdge. */ /** Returns the index of the material of the face lying on the left of the FEdge. */
inline unsigned bFrsMaterialIndex() const inline unsigned bFrsMaterialIndex() const
{ {
return _bFrsMaterialIndex; return _bFrsMaterialIndex;
} }
/*! Returns the material of the face lying on the left of the FEdge. */ /** Returns the material of the face lying on the left of the FEdge. */
const FrsMaterial &bFrsMaterial() const; const FrsMaterial &bFrsMaterial() const;
/*! Returns the face mark of the face lying on the right of the FEdge. /** Returns the face mark of the face lying on the right of the FEdge.
* If this FEdge is a border, it has no Face on its right and thus false is returned. * If this FEdge is a border, it has no Face on its right and thus false is returned.
*/ */
inline bool aFaceMark() const inline bool aFaceMark() const
@@ -1241,43 +1241,43 @@ class FEdgeSharp : public FEdge {
return _aFaceMark; return _aFaceMark;
} }
/*! Returns the face mark of the face lying on the left of the FEdge. */ /** Returns the face mark of the face lying on the left of the FEdge. */
inline bool bFaceMark() const inline bool bFaceMark() const
{ {
return _bFaceMark; return _bFaceMark;
} }
/*! Sets the normal to the face lying on the right of the FEdge. */ /** Sets the normal to the face lying on the right of the FEdge. */
inline void setNormalA(const Vec3r &iNormal) inline void setNormalA(const Vec3r &iNormal)
{ {
_aNormal = iNormal; _aNormal = iNormal;
} }
/*! Sets the normal to the face lying on the left of the FEdge. */ /** Sets the normal to the face lying on the left of the FEdge. */
inline void setNormalB(const Vec3r &iNormal) inline void setNormalB(const Vec3r &iNormal)
{ {
_bNormal = iNormal; _bNormal = iNormal;
} }
/*! Sets the index of the material lying on the right of the FEdge.*/ /** Sets the index of the material lying on the right of the FEdge.*/
inline void setaFrsMaterialIndex(unsigned i) inline void setaFrsMaterialIndex(unsigned i)
{ {
_aFrsMaterialIndex = i; _aFrsMaterialIndex = i;
} }
/*! Sets the index of the material lying on the left of the FEdge.*/ /** Sets the index of the material lying on the left of the FEdge.*/
inline void setbFrsMaterialIndex(unsigned i) inline void setbFrsMaterialIndex(unsigned i)
{ {
_bFrsMaterialIndex = i; _bFrsMaterialIndex = i;
} }
/*! Sets the face mark of the face lying on the right of the FEdge. */ /** Sets the face mark of the face lying on the right of the FEdge. */
inline void setaFaceMark(bool iFaceMark) inline void setaFaceMark(bool iFaceMark)
{ {
_aFaceMark = iFaceMark; _aFaceMark = iFaceMark;
} }
/*! Sets the face mark of the face lying on the left of the FEdge. */ /** Sets the face mark of the face lying on the left of the FEdge. */
inline void setbFaceMark(bool iFaceMark) inline void setbFaceMark(bool iFaceMark)
{ {
_bFaceMark = iFaceMark; _bFaceMark = iFaceMark;
@@ -1288,7 +1288,7 @@ class FEdgeSharp : public FEdge {
#endif #endif
}; };
/*! Class defining a smooth edge. This kind of edge typically runs across a face of the input mesh. /** Class defining a smooth edge. This kind of edge typically runs across a face of the input mesh.
* It can be a silhouette, a ridge or valley, a suggestive contour. * It can be a silhouette, a ridge or valley, a suggestive contour.
*/ */
class FEdgeSmooth : public FEdge { class FEdgeSmooth : public FEdge {
@@ -1305,13 +1305,13 @@ class FEdgeSmooth : public FEdge {
bool _FaceMark; bool _FaceMark;
public: public:
/*! Returns the string "FEdgeSmooth" . */ /** Returns the string "FEdgeSmooth" . */
virtual string getExactTypeName() const virtual string getExactTypeName() const
{ {
return "FEdgeSmooth"; return "FEdgeSmooth";
} }
/*! Default constructor. */ /** Default constructor. */
inline FEdgeSmooth() : FEdge() inline FEdgeSmooth() : FEdge()
{ {
_Face = NULL; _Face = NULL;
@@ -1320,7 +1320,7 @@ class FEdgeSmooth : public FEdge {
_isSmooth = true; _isSmooth = true;
} }
/*! Builds an FEdgeSmooth going from vA to vB. */ /** Builds an FEdgeSmooth going from vA to vB. */
inline FEdgeSmooth(SVertex *vA, SVertex *vB) : FEdge(vA, vB) inline FEdgeSmooth(SVertex *vA, SVertex *vB) : FEdge(vA, vB)
{ {
_Face = NULL; _Face = NULL;
@@ -1329,7 +1329,7 @@ class FEdgeSmooth : public FEdge {
_isSmooth = true; _isSmooth = true;
} }
/*! Copy constructor. */ /** Copy constructor. */
inline FEdgeSmooth(FEdgeSmooth &iBrother) : FEdge(iBrother) inline FEdgeSmooth(FEdgeSmooth &iBrother) : FEdge(iBrother)
{ {
_Normal = iBrother._Normal; _Normal = iBrother._Normal;
@@ -1339,12 +1339,12 @@ class FEdgeSmooth : public FEdge {
_isSmooth = true; _isSmooth = true;
} }
/*! Destructor. */ /** Destructor. */
virtual ~FEdgeSmooth() virtual ~FEdgeSmooth()
{ {
} }
/*! Cloning method. */ /** Cloning method. */
virtual FEdge *duplicate() virtual FEdge *duplicate()
{ {
FEdge *clone = new FEdgeSmooth(*this); FEdge *clone = new FEdgeSmooth(*this);
@@ -1356,25 +1356,25 @@ class FEdgeSmooth : public FEdge {
return _Face; return _Face;
} }
/*! Returns the face mark of the face it is running across. */ /** Returns the face mark of the face it is running across. */
inline bool faceMark() const inline bool faceMark() const
{ {
return _FaceMark; return _FaceMark;
} }
/*! Returns the normal to the Face it is running across. */ /** Returns the normal to the Face it is running across. */
inline const Vec3r &normal() inline const Vec3r &normal()
{ {
return _Normal; return _Normal;
} }
/*! Returns the index of the material of the face it is running across. */ /** Returns the index of the material of the face it is running across. */
inline unsigned frs_materialIndex() const inline unsigned frs_materialIndex() const
{ {
return _FrsMaterialIndex; return _FrsMaterialIndex;
} }
/*! Returns the material of the face it is running across. */ /** Returns the material of the face it is running across. */
const FrsMaterial &frs_material() const; const FrsMaterial &frs_material() const;
inline void setFace(void *iFace) inline void setFace(void *iFace)
@@ -1382,19 +1382,19 @@ class FEdgeSmooth : public FEdge {
_Face = iFace; _Face = iFace;
} }
/*! Sets the face mark of the face it is running across. */ /** Sets the face mark of the face it is running across. */
inline void setFaceMark(bool iFaceMark) inline void setFaceMark(bool iFaceMark)
{ {
_FaceMark = iFaceMark; _FaceMark = iFaceMark;
} }
/*! Sets the normal to the Face it is running across. */ /** Sets the normal to the Face it is running across. */
inline void setNormal(const Vec3r &iNormal) inline void setNormal(const Vec3r &iNormal)
{ {
_Normal = iNormal; _Normal = iNormal;
} }
/*! Sets the index of the material of the face it is running across. */ /** Sets the index of the material of the face it is running across. */
inline void setFrsMaterialIndex(unsigned i) inline void setFrsMaterialIndex(unsigned i)
{ {
_FrsMaterialIndex = i; _FrsMaterialIndex = i;
@@ -1413,7 +1413,7 @@ class FEdgeSmooth : public FEdge {
/* */ /* */
/**********************************/ /**********************************/
/*! Class to define a feature shape. It is the gathering of feature elements from an identified /** Class to define a feature shape. It is the gathering of feature elements from an identified
* input shape */ * input shape */
class SShape { class SShape {
private: private:
@@ -1431,12 +1431,12 @@ class SShape {
ViewShape *_ViewShape; ViewShape *_ViewShape;
public: public:
/*! A field that can be used by the user to store any data. /** A field that can be used by the user to store any data.
* This field must be reset afterwards using ResetUserData(). * This field must be reset afterwards using ResetUserData().
*/ */
void *userdata; // added by E.T. void *userdata; // added by E.T.
/*! Default constructor */ /** Default constructor */
inline SShape() inline SShape()
{ {
userdata = NULL; userdata = NULL;
@@ -1444,7 +1444,7 @@ class SShape {
_ViewShape = NULL; _ViewShape = NULL;
} }
/*! Copy constructor */ /** Copy constructor */
inline SShape(SShape &iBrother) inline SShape(SShape &iBrother)
{ {
userdata = NULL; userdata = NULL;
@@ -1528,14 +1528,14 @@ class SShape {
} }
} }
/*! Cloning method. */ /** Cloning method. */
virtual SShape *duplicate() virtual SShape *duplicate()
{ {
SShape *clone = new SShape(*this); SShape *clone = new SShape(*this);
return clone; return clone;
} }
/*! Destructor. */ /** Destructor. */
virtual inline ~SShape() virtual inline ~SShape()
{ {
vector<SVertex *>::iterator sv, svend; vector<SVertex *>::iterator sv, svend;
@@ -1561,13 +1561,13 @@ class SShape {
} }
} }
/*! Adds a FEdge to the list of FEdges. */ /** Adds a FEdge to the list of FEdges. */
inline void AddEdge(FEdge *iEdge) inline void AddEdge(FEdge *iEdge)
{ {
_edgesList.push_back(iEdge); _edgesList.push_back(iEdge);
} }
/*! Adds a SVertex to the list of SVertex of this Shape. /** Adds a SVertex to the list of SVertex of this Shape.
* The SShape attribute of the SVertex is also set to 'this'. * The SShape attribute of the SVertex is also set to 'this'.
*/ */
inline void AddNewVertex(SVertex *iv) inline void AddNewVertex(SVertex *iv)
@@ -1589,7 +1589,7 @@ class SShape {
return Ia; return Ia;
} }
/*! Splits an edge into several edges. /** Splits an edge into several edges.
* The edge's vertices are passed rather than the edge itself. This way, all feature edges * The edge's vertices are passed rather than the edge itself. This way, all feature edges
* (SILHOUETTE, CREASE, BORDER) are split in the same time. The processed edges are flagged as * (SILHOUETTE, CREASE, BORDER) are split in the same time. The processed edges are flagged as
* done (using the user-data flag).One single new vertex is created whereas several split edges * done (using the user-data flag).One single new vertex is created whereas several split edges
@@ -1773,13 +1773,13 @@ class SShape {
return newEdge; return newEdge;
} }
/*! Sets the Bounding Box of the Shape */ /** Sets the Bounding Box of the Shape */
inline void setBBox(const BBox<Vec3r> &iBBox) inline void setBBox(const BBox<Vec3r> &iBBox)
{ {
_BBox = iBBox; _BBox = iBBox;
} }
/*! Compute the bbox of the sshape */ /** Compute the bbox of the sshape */
inline void ComputeBBox() inline void ComputeBBox()
{ {
if (0 == _verticesList.size()) { if (0 == _verticesList.size()) {
@@ -1853,13 +1853,13 @@ class SShape {
} }
/* accessors */ /* accessors */
/*! Returns the list of SVertex of the Shape. */ /** Returns the list of SVertex of the Shape. */
inline vector<SVertex *> &getVertexList() inline vector<SVertex *> &getVertexList()
{ {
return _verticesList; return _verticesList;
} }
/*! Returns the list of FEdges of the Shape. */ /** Returns the list of FEdges of the Shape. */
inline vector<FEdge *> &getEdgeList() inline vector<FEdge *> &getEdgeList()
{ {
return _edgesList; return _edgesList;
@@ -1870,19 +1870,19 @@ class SShape {
return _chains; return _chains;
} }
/*! Returns the bounding box of the shape. */ /** Returns the bounding box of the shape. */
inline const BBox<Vec3r> &bbox() inline const BBox<Vec3r> &bbox()
{ {
return _BBox; return _BBox;
} }
/*! Returns the ith material of the shape. */ /** Returns the ith material of the shape. */
inline const FrsMaterial &frs_material(unsigned i) const inline const FrsMaterial &frs_material(unsigned i) const
{ {
return _FrsMaterials[i]; return _FrsMaterials[i];
} }
/*! Returns the list of materials of the Shape. */ /** Returns the list of materials of the Shape. */
inline const vector<FrsMaterial> &frs_materials() const inline const vector<FrsMaterial> &frs_materials() const
{ {
return _FrsMaterials; return _FrsMaterials;
@@ -1898,44 +1898,44 @@ class SShape {
return _importance; return _importance;
} }
/*! Returns the Id of the Shape. */ /** Returns the Id of the Shape. */
inline Id getId() const inline Id getId() const
{ {
return _Id; return _Id;
} }
/*! Returns the name of the Shape. */ /** Returns the name of the Shape. */
inline const string &getName() const inline const string &getName() const
{ {
return _Name; return _Name;
} }
/*! Returns the library path of the Shape. */ /** Returns the library path of the Shape. */
inline const string &getLibraryPath() const inline const string &getLibraryPath() const
{ {
return _LibraryPath; return _LibraryPath;
} }
/* Modififers */ /* Modififers */
/*! Sets the Id of the shape.*/ /** Sets the Id of the shape.*/
inline void setId(Id id) inline void setId(Id id)
{ {
_Id = id; _Id = id;
} }
/*! Sets the name of the shape.*/ /** Sets the name of the shape.*/
inline void setName(const string &name) inline void setName(const string &name)
{ {
_Name = name; _Name = name;
} }
/*! Sets the library path of the shape.*/ /** Sets the library path of the shape.*/
inline void setLibraryPath(const string &path) inline void setLibraryPath(const string &path)
{ {
_LibraryPath = path; _LibraryPath = path;
} }
/*! Sets the list of materials for the shape */ /** Sets the list of materials for the shape */
inline void setFrsMaterials(const vector<FrsMaterial> &iMaterials) inline void setFrsMaterials(const vector<FrsMaterial> &iMaterials)
{ {
_FrsMaterials = iMaterials; _FrsMaterials = iMaterials;

View File

@@ -68,7 +68,7 @@ class SilhouetteGeomEngine {
static SilhouetteGeomEngine *_pInstance; static SilhouetteGeomEngine *_pInstance;
public: public:
/*! retrieves an instance on the singleton */ /** retrieves an instance on the singleton */
static SilhouetteGeomEngine *getInstance() static SilhouetteGeomEngine *getInstance()
{ {
if (_pInstance == NULL) { if (_pInstance == NULL) {
@@ -77,13 +77,13 @@ class SilhouetteGeomEngine {
return _pInstance; return _pInstance;
} }
/*! Sets the current viewpoint */ /** Sets the current viewpoint */
static inline void setViewpoint(const Vec3r &ivp) static inline void setViewpoint(const Vec3r &ivp)
{ {
_Viewpoint = ivp; _Viewpoint = ivp;
} }
/*! Sets the current transformation /** Sets the current transformation
* iModelViewMatrix * iModelViewMatrix
* The 4x4 model view matrix, in column major order (openGL like). * The 4x4 model view matrix, in column major order (openGL like).
* iProjection matrix * iProjection matrix
@@ -98,13 +98,13 @@ class SilhouetteGeomEngine {
const int iViewport[4], const int iViewport[4],
real iFocal); real iFocal);
/*! Sets the current znear and zfar */ /** Sets the current znear and zfar */
static void setFrustum(real iZNear, real iZFar); static void setFrustum(real iZNear, real iZFar);
/* accessors */ /* accessors */
static void retrieveViewport(int viewport[4]); static void retrieveViewport(int viewport[4]);
/*! Projects the silhouette in camera coordinates /** Projects the silhouette in camera coordinates
* This method modifies the ioEdges passed as argument. * This method modifies the ioEdges passed as argument.
* ioVertices * ioVertices
* The vertices to project. It is modified during the operation. * The vertices to project. It is modified during the operation.
@@ -112,7 +112,7 @@ class SilhouetteGeomEngine {
static void ProjectSilhouette(std::vector<SVertex *> &ioVertices); static void ProjectSilhouette(std::vector<SVertex *> &ioVertices);
static void ProjectSilhouette(SVertex *ioVertex); static void ProjectSilhouette(SVertex *ioVertex);
/*! transforms the parameter t defining a 2D intersection for edge fe in order to obtain /** transforms the parameter t defining a 2D intersection for edge fe in order to obtain
* the parameter giving the corresponding 3D intersection. * the parameter giving the corresponding 3D intersection.
* Returns the 3D parameter * Returns the 3D parameter
* fe * fe
@@ -122,10 +122,10 @@ class SilhouetteGeomEngine {
*/ */
static real ImageToWorldParameter(FEdge *fe, real t); static real ImageToWorldParameter(FEdge *fe, real t);
/*! From world to image */ /** From world to image */
static Vec3r WorldToImage(const Vec3r &M); static Vec3r WorldToImage(const Vec3r &M);
/*! From camera to image */ /** From camera to image */
static Vec3r CameraToImage(const Vec3r &M); static Vec3r CameraToImage(const Vec3r &M);
#ifdef WITH_CXX_GUARDEDALLOC #ifdef WITH_CXX_GUARDEDALLOC

View File

@@ -87,7 +87,7 @@ class SphericalGrid {
}; };
public: public:
/*! Iterator needs to allow the user to avoid full 3D comparison in two cases: /** Iterator needs to allow the user to avoid full 3D comparison in two cases:
* *
* (1) Where (*current)->deepest < target[2], where the occluder is unambiguously in front of * (1) Where (*current)->deepest < target[2], where the occluder is unambiguously in front of
* the target point. * the target point.

View File

@@ -42,7 +42,7 @@ class FEdge;
class ImagePyramid; class ImagePyramid;
class GrayImage; class GrayImage;
/*! This class checks for every FEdge in which steerable it belongs and stores the mapping /** This class checks for every FEdge in which steerable it belongs and stores the mapping
* allowing to retrieve this information from the FEdge Id. * allowing to retrieve this information from the FEdge Id.
*/ */
class SteerableViewMap { class SteerableViewMap {
@@ -62,31 +62,31 @@ class SteerableViewMap {
SteerableViewMap(const SteerableViewMap &iBrother); SteerableViewMap(const SteerableViewMap &iBrother);
virtual ~SteerableViewMap(); virtual ~SteerableViewMap();
/*! Resets everything */ /** Resets everything */
virtual void Reset(); virtual void Reset();
/*! Adds a FEdge to steerable VM. /** Adds a FEdge to steerable VM.
* Returns the nbOrientations weights corresponding to the FEdge contributions to the * Returns the nbOrientations weights corresponding to the FEdge contributions to the
* nbOrientations directional maps. * nbOrientations directional maps.
*/ */
double *AddFEdge(FEdge *iFEdge); double *AddFEdge(FEdge *iFEdge);
/*! Compute the weight of direction dir for orientation iNOrientation */ /** Compute the weight of direction dir for orientation iNOrientation */
double ComputeWeight(const Vec2d &dir, unsigned iNOrientation); double ComputeWeight(const Vec2d &dir, unsigned iNOrientation);
/*! Returns the number of the SVM to which a direction belongs to. /** Returns the number of the SVM to which a direction belongs to.
* \param dir: * \param dir:
* The direction * The direction
*/ */
unsigned getSVMNumber(Vec2f dir); unsigned getSVMNumber(Vec2f dir);
/*! Returns the number of the SVM to which a FEdge belongs most. /** Returns the number of the SVM to which a FEdge belongs most.
* \param id: * \param id:
* The First element of the Id struct of the FEdge we're interested in. * The First element of the Id struct of the FEdge we're interested in.
*/ */
unsigned getSVMNumber(unsigned id); unsigned getSVMNumber(unsigned id);
/*! Builds _nbOrientations+1 pyramids of images from the _nbOrientations+1 base images of the /** Builds _nbOrientations+1 pyramids of images from the _nbOrientations+1 base images of the
* steerable viewmap. * steerable viewmap.
* \param steerableBases: * \param steerableBases:
* The _nbOrientations+1 images constituting the basis for the steerable pyramid. * The _nbOrientations+1 images constituting the basis for the steerable pyramid.
@@ -105,7 +105,7 @@ class SteerableViewMap {
unsigned iNbLevels = 4, unsigned iNbLevels = 4,
float iSigma = 1.0f); float iSigma = 1.0f);
/*! Reads a pixel value in one of the VewMap density steerable pyramids. /** Reads a pixel value in one of the VewMap density steerable pyramids.
* Returns a value between 0 and 1. * Returns a value between 0 and 1.
* \param iOrientation: * \param iOrientation:
* the number telling which orientation we need to check. * the number telling which orientation we need to check.
@@ -126,23 +126,23 @@ class SteerableViewMap {
*/ */
float readSteerableViewMapPixel(unsigned iOrientation, int iLevel, int x, int y); float readSteerableViewMapPixel(unsigned iOrientation, int iLevel, int x, int y);
/*! Reads a pixel in the one of the level of the pyramid containing the images /** Reads a pixel in the one of the level of the pyramid containing the images
* of the complete ViewMap. * of the complete ViewMap.
* Returns a value between 0 and 1. * Returns a value between 0 and 1.
* Equivalent to : readSteerableViewMapPixel(nbOrientations, x, y) * Equivalent to : readSteerableViewMapPixel(nbOrientations, x, y)
*/ */
float readCompleteViewMapPixel(int iLevel, int x, int y); float readCompleteViewMapPixel(int iLevel, int x, int y);
/*! Returns the number of levels in the pyramids */ /** Returns the number of levels in the pyramids */
unsigned int getNumberOfPyramidLevels() const; unsigned int getNumberOfPyramidLevels() const;
/*! Returns the number of orientations */ /** Returns the number of orientations */
unsigned int getNumberOfOrientations() const unsigned int getNumberOfOrientations() const
{ {
return _nbOrientations; return _nbOrientations;
} }
/*! for debug purposes */ /** for debug purposes */
void saveSteerableViewMap() const; void saveSteerableViewMap() const;
protected: protected:

View File

@@ -53,7 +53,7 @@ using namespace Geometry;
class SVertex; class SVertex;
/*! Defines a hash table used for searching the SVertex */ /** Defines a hash table used for searching the SVertex */
struct SVertexHasher { struct SVertexHasher {
#define _MUL 950706376UL #define _MUL 950706376UL
#define _MOD 2147483647UL #define _MOD 2147483647UL
@@ -81,7 +81,7 @@ typedef map<Vec3r, SVertex *> SVertexMap;
class WXFaceLayer; class WXFaceLayer;
/*! class to describe an oriented smooth edge */ /** class to describe an oriented smooth edge */
class OWXFaceLayer { class OWXFaceLayer {
public: public:
WXFaceLayer *fl; WXFaceLayer *fl;
@@ -123,7 +123,7 @@ class OWXFaceLayer {
class WXEdge; class WXEdge;
/*! class to describe an oriented sharp edge */ /** class to describe an oriented sharp edge */
class OWXEdge { class OWXEdge {
public: public:
WXEdge *e; WXEdge *e;
@@ -190,7 +190,7 @@ class ViewEdgeXBuilder {
{ {
} }
/*! Builds a view shape from a WXShape in which the feature edges are flagged /** Builds a view shape from a WXShape in which the feature edges are flagged
* Builds chains of feature edges (so ViewEdges) from a WXShape * Builds chains of feature edges (so ViewEdges) from a WXShape
* iWShape * iWShape
* The Winged Edge structure in which all silhouette edges and vertices are flagged. * The Winged Edge structure in which all silhouette edges and vertices are flagged.
@@ -212,14 +212,14 @@ class ViewEdgeXBuilder {
std::vector<FEdge *> &ioFEdges, std::vector<FEdge *> &ioFEdges,
std::vector<SVertex *> &ioSVertices); std::vector<SVertex *> &ioSVertices);
/*! Builds a smooth view edge, starting the face iFace. */ /** Builds a smooth view edge, starting the face iFace. */
ViewEdge *BuildSmoothViewEdge(const OWXFaceLayer &iFaceLayer); ViewEdge *BuildSmoothViewEdge(const OWXFaceLayer &iFaceLayer);
/*! Makes a sharp viewedge. */ /** Makes a sharp viewedge. */
ViewEdge *BuildSharpViewEdge(const OWXEdge &iWEdge); ViewEdge *BuildSharpViewEdge(const OWXEdge &iWEdge);
public: public:
/*! accessors */ /** accessors */
inline int currentViewId() const inline int currentViewId() const
{ {
return _currentViewId; return _currentViewId;
@@ -235,7 +235,7 @@ class ViewEdgeXBuilder {
return _currentSVertexId; return _currentSVertexId;
} }
/*! modifiers */ /** modifiers */
inline void setCurrentViewId(int id) inline void setCurrentViewId(int id)
{ {
_currentViewId = id; _currentViewId = id;
@@ -252,18 +252,18 @@ class ViewEdgeXBuilder {
} }
protected: protected:
/*! Init the view edges building */ /** Init the view edges building */
virtual void Init(ViewShape *oVShape); virtual void Init(ViewShape *oVShape);
// SMOOTH // // SMOOTH //
/*! checks whether a face has already been processed or not */ /** checks whether a face has already been processed or not */
bool stopSmoothViewEdge(WXFaceLayer *iFaceLayer); bool stopSmoothViewEdge(WXFaceLayer *iFaceLayer);
OWXFaceLayer FindNextFaceLayer(const OWXFaceLayer &iFaceLayer); OWXFaceLayer FindNextFaceLayer(const OWXFaceLayer &iFaceLayer);
OWXFaceLayer FindPreviousFaceLayer(const OWXFaceLayer &iFaceLayer); OWXFaceLayer FindPreviousFaceLayer(const OWXFaceLayer &iFaceLayer);
FEdge *BuildSmoothFEdge(FEdge *feprevious, const OWXFaceLayer &ifl); FEdge *BuildSmoothFEdge(FEdge *feprevious, const OWXFaceLayer &ifl);
// SHARP // // SHARP //
/*! checks whether a WEdge has already been processed or not */ /** checks whether a WEdge has already been processed or not */
bool stopSharpViewEdge(WXEdge *iEdge); bool stopSharpViewEdge(WXEdge *iEdge);
int retrieveFaceMarks(WXEdge *iEdge); int retrieveFaceMarks(WXEdge *iEdge);
OWXEdge FindNextWEdge(const OWXEdge &iEdge); OWXEdge FindNextWEdge(const OWXEdge &iEdge);
@@ -271,11 +271,11 @@ class ViewEdgeXBuilder {
FEdge *BuildSharpFEdge(FEdge *feprevious, const OWXEdge &iwe); FEdge *BuildSharpFEdge(FEdge *feprevious, const OWXEdge &iwe);
// GENERAL // // GENERAL //
/*! Instantiate a SVertex */ /** Instantiate a SVertex */
SVertex *MakeSVertex(Vec3r &iPoint); SVertex *MakeSVertex(Vec3r &iPoint);
/*! Instantiate a SVertex if it hasn't been already created */ /** Instantiate a SVertex if it hasn't been already created */
SVertex *MakeSVertex(Vec3r &iPoint, bool shared); SVertex *MakeSVertex(Vec3r &iPoint, bool shared);
/*! instantiate a ViewVertex from a SVertex, if it doesn't exist yet */ /** instantiate a ViewVertex from a SVertex, if it doesn't exist yet */
ViewVertex *MakeViewVertex(SVertex *iSVertex); ViewVertex *MakeViewVertex(SVertex *iSVertex);
// oldtmp values // oldtmp values

View File

@@ -432,7 +432,7 @@ void TVertex::Replace(ViewEdge *iOld, ViewEdge *iNew)
} }
} }
/*! iterators access */ /** iterators access */
ViewVertex::edge_iterator TVertex::edges_begin() ViewVertex::edge_iterator TVertex::edges_begin()
{ {
// return edge_iterator(_FrontEdgeA, _FrontEdgeB, _BackEdgeA, _BackEdgeB, _FrontEdgeA); // return edge_iterator(_FrontEdgeA, _FrontEdgeB, _BackEdgeA, _BackEdgeB, _FrontEdgeA);
@@ -584,7 +584,7 @@ void NonTVertex::AddIncomingViewEdge(ViewEdge *iVEdge)
} }
} }
/*! iterators access */ /** iterators access */
ViewVertex::edge_iterator NonTVertex::edges_begin() ViewVertex::edge_iterator NonTVertex::edges_begin()
{ {
return edge_iterator(_ViewEdges.begin(), _ViewEdges.end(), _ViewEdges.begin()); return edge_iterator(_ViewEdges.begin(), _ViewEdges.end(), _ViewEdges.begin());

View File

@@ -56,7 +56,7 @@ class ViewEdge;
class ViewShape; class ViewShape;
class TVertex; class TVertex;
/*! Class defining the ViewMap.*/ /** Class defining the ViewMap.*/
class ViewMap { class ViewMap {
public: public:
typedef vector<ViewEdge *> viewedges_container; typedef vector<ViewEdge *> viewedges_container;
@@ -79,29 +79,29 @@ class ViewMap {
id_to_index_map _shapeIdToIndex; id_to_index_map _shapeIdToIndex;
public: public:
/*! A field that can be used by the user to store any data. /** A field that can be used by the user to store any data.
* This field must be reset afterwards using ResetUserData(). * This field must be reset afterwards using ResetUserData().
*/ */
void *userdata; void *userdata;
/*! Default constructor. */ /** Default constructor. */
ViewMap() ViewMap()
{ {
_pInstance = this; _pInstance = this;
userdata = NULL; userdata = NULL;
} }
/*! Destructor. */ /** Destructor. */
virtual ~ViewMap(); virtual ~ViewMap();
/*! Gets the viewedge the nearest to the 2D position specified as argument */ /** Gets the viewedge the nearest to the 2D position specified as argument */
const ViewEdge *getClosestViewEdge(real x, real y) const; const ViewEdge *getClosestViewEdge(real x, real y) const;
/*! Gets the Fedge the nearest to the 2D position specified as argument */ /** Gets the Fedge the nearest to the 2D position specified as argument */
const FEdge *getClosestFEdge(real x, real y) const; const FEdge *getClosestFEdge(real x, real y) const;
/* accessors */ /* accessors */
/*! The ViewMap is a singleton class. This static method returns the instance of the ViewMap. */ /** The ViewMap is a singleton class. This static method returns the instance of the ViewMap. */
static inline ViewMap *getInstance() static inline ViewMap *getInstance()
{ {
return _pInstance; return _pInstance;
@@ -160,7 +160,7 @@ class ViewMap {
return _shapeIdToIndex; return _shapeIdToIndex;
} }
/*! Returns the scene 3D bounding box. */ /** Returns the scene 3D bounding box. */
inline BBox<Vec3r> getScene3dBBox() const inline BBox<Vec3r> getScene3dBBox() const
{ {
return _scene3DBBox; return _scene3DBBox;
@@ -189,7 +189,7 @@ class ViewMap {
_SVertices.push_back(iSVertex); _SVertices.push_back(iSVertex);
} }
/*! Sets the scene 3D bounding box. */ /** Sets the scene 3D bounding box. */
inline void setScene3dBBox(const BBox<Vec3r> &bbox) inline void setScene3dBBox(const BBox<Vec3r> &bbox)
{ {
_scene3DBBox = bbox; _scene3DBBox = bbox;
@@ -259,7 +259,7 @@ class orientedViewEdgeIterator;
} // namespace ViewVertexInternal } // namespace ViewVertexInternal
/*! Class to define a view vertex. /** Class to define a view vertex.
* A view vertex is a feature vertex corresponding to a point of the image graph, where the * A view vertex is a feature vertex corresponding to a point of the image graph, where the
* characteristics of an edge might change (nature, visibility, ...). A ViewVertex can be of two * characteristics of an edge might change (nature, visibility, ...). A ViewVertex can be of two
* kinds: a TVertex when it corresponds to the intersection between two ViewEdges or a NonTVertex * kinds: a TVertex when it corresponds to the intersection between two ViewEdges or a NonTVertex
@@ -269,7 +269,7 @@ class orientedViewEdgeIterator;
*/ */
class ViewVertex : public Interface0D { class ViewVertex : public Interface0D {
public: // Implementation of Interface0D public: // Implementation of Interface0D
/*! Returns the string "ViewVertex". */ /** Returns the string "ViewVertex". */
virtual string getExactTypeName() const virtual string getExactTypeName() const
{ {
return "ViewVertex"; return "ViewVertex";
@@ -290,12 +290,12 @@ class ViewVertex : public Interface0D {
Nature::VertexNature _Nature; Nature::VertexNature _Nature;
public: public:
/*! A field that can be used by the user to store any data. /** A field that can be used by the user to store any data.
* This field must be reset afterwards using ResetUserData(). * This field must be reset afterwards using ResetUserData().
*/ */
void *userdata; void *userdata;
/*! Default constructor.*/ /** Default constructor.*/
inline ViewVertex() inline ViewVertex()
{ {
userdata = NULL; userdata = NULL;
@@ -309,7 +309,7 @@ class ViewVertex : public Interface0D {
} }
protected: protected:
/*! Copy constructor. */ /** Copy constructor. */
inline ViewVertex(ViewVertex &iBrother) inline ViewVertex(ViewVertex &iBrother)
{ {
_Nature = iBrother._Nature; _Nature = iBrother._Nature;
@@ -317,24 +317,24 @@ class ViewVertex : public Interface0D {
userdata = NULL; userdata = NULL;
} }
/*! Cloning method. */ /** Cloning method. */
virtual ViewVertex *duplicate() = 0; virtual ViewVertex *duplicate() = 0;
public: public:
/*! Destructor. */ /** Destructor. */
virtual ~ViewVertex() virtual ~ViewVertex()
{ {
} }
/* accessors */ /* accessors */
/*! Returns the nature of the vertex. */ /** Returns the nature of the vertex. */
virtual Nature::VertexNature getNature() const virtual Nature::VertexNature getNature() const
{ {
return _Nature; return _Nature;
} }
/* modifiers */ /* modifiers */
/*! Sets the nature of the vertex. */ /** Sets the nature of the vertex. */
inline void setNature(Nature::VertexNature iNature) inline void setNature(Nature::VertexNature iNature)
{ {
_Nature = iNature; _Nature = iNature;
@@ -357,18 +357,18 @@ class ViewVertex : public Interface0D {
virtual const_edge_iterator edges_iterator(ViewEdge *iEdge) const = 0; virtual const_edge_iterator edges_iterator(ViewEdge *iEdge) const = 0;
// Iterator access // Iterator access
/*! Returns an iterator over the ViewEdges that goes to or comes from this ViewVertex pointing to /** Returns an iterator over the ViewEdges that goes to or comes from this ViewVertex pointing to
* the first ViewEdge of the list. The orientedViewEdgeIterator allows to iterate in CCW order * the first ViewEdge of the list. The orientedViewEdgeIterator allows to iterate in CCW order
* over these ViewEdges and to get the orientation for each ViewEdge (incoming/outgoing). * over these ViewEdges and to get the orientation for each ViewEdge (incoming/outgoing).
*/ */
virtual ViewVertexInternal::orientedViewEdgeIterator edgesBegin() = 0; virtual ViewVertexInternal::orientedViewEdgeIterator edgesBegin() = 0;
/*! Returns an orientedViewEdgeIterator over the ViewEdges around this ViewVertex, pointing after /** Returns an orientedViewEdgeIterator over the ViewEdges around this ViewVertex, pointing after
* the last ViewEdge. * the last ViewEdge.
*/ */
virtual ViewVertexInternal::orientedViewEdgeIterator edgesEnd() = 0; virtual ViewVertexInternal::orientedViewEdgeIterator edgesEnd() = 0;
/*! Returns an orientedViewEdgeIterator pointing to the ViewEdge given as argument. */ /** Returns an orientedViewEdgeIterator pointing to the ViewEdge given as argument. */
virtual ViewVertexInternal::orientedViewEdgeIterator edgesIterator(ViewEdge *iEdge) = 0; virtual ViewVertexInternal::orientedViewEdgeIterator edgesIterator(ViewEdge *iEdge) = 0;
#ifdef WITH_CXX_GUARDEDALLOC #ifdef WITH_CXX_GUARDEDALLOC
@@ -384,7 +384,7 @@ class ViewVertex : public Interface0D {
/* */ /* */
/**********************************/ /**********************************/
/*! class to define a T vertex, i.e. an intersection between two edges. /** class to define a T vertex, i.e. an intersection between two edges.
* It points towards 2 SVertex and 4 View edges. * It points towards 2 SVertex and 4 View edges.
* Among these ViewEdges, 2 are front and 2 are back. * Among these ViewEdges, 2 are front and 2 are back.
* Basically the front edge hides part of the back edge. * Basically the front edge hides part of the back edge.
@@ -395,7 +395,7 @@ class TVertex : public ViewVertex {
typedef vector<directedViewEdge *> edge_pointers_container; typedef vector<directedViewEdge *> edge_pointers_container;
public: // Implementation of Interface0D public: // Implementation of Interface0D
/*! Returns the string "TVertex". */ /** Returns the string "TVertex". */
virtual string getExactTypeName() const virtual string getExactTypeName() const
{ {
return "TVertex"; return "TVertex";
@@ -421,20 +421,20 @@ class TVertex : public ViewVertex {
return _FrontSVertex->point3D().z(); return _FrontSVertex->point3D().z();
} }
/*! Returns the 3D point. */ /** Returns the 3D point. */
virtual Vec3r getPoint3D() const virtual Vec3r getPoint3D() const
{ {
cerr << "Warning: getPoint3D() undefined for this point" << endl; cerr << "Warning: getPoint3D() undefined for this point" << endl;
return _FrontSVertex->getPoint3D(); return _FrontSVertex->getPoint3D();
} }
/*! Returns the projected 3D x coordinate of the vertex. */ /** Returns the projected 3D x coordinate of the vertex. */
virtual real getProjectedX() const virtual real getProjectedX() const
{ {
return _FrontSVertex->point2D().x(); return _FrontSVertex->point2D().x();
} }
/*! Returns the projected 3D y coordinate of the vertex. */ /** Returns the projected 3D y coordinate of the vertex. */
virtual real getProjectedY() const virtual real getProjectedY() const
{ {
return _FrontSVertex->point2D().y(); return _FrontSVertex->point2D().y();
@@ -445,26 +445,26 @@ class TVertex : public ViewVertex {
return _FrontSVertex->point2D().z(); return _FrontSVertex->point2D().z();
} }
/*! Returns the 2D point. */ /** Returns the 2D point. */
virtual Vec2r getPoint2D() const virtual Vec2r getPoint2D() const
{ {
return _FrontSVertex->getPoint2D(); return _FrontSVertex->getPoint2D();
} }
/*! Returns the Id of the TVertex. */ /** Returns the Id of the TVertex. */
virtual Id getId() const virtual Id getId() const
{ {
return _Id; return _Id;
} }
/*! Cast the Interface0D in SVertex if it can be. */ /** Cast the Interface0D in SVertex if it can be. */
// it can't // it can't
virtual ViewVertex *castToViewVertex() virtual ViewVertex *castToViewVertex()
{ {
return this; return this;
} }
/*! Cast the Interface0D in TVertex if it can be. */ /** Cast the Interface0D in TVertex if it can be. */
virtual TVertex *castToTVertex() virtual TVertex *castToTVertex()
{ {
return this; return this;
@@ -483,7 +483,7 @@ class TVertex : public ViewVertex {
_sortedEdges; // the list of the four ViewEdges, ordered in CCW order (in the image plan) _sortedEdges; // the list of the four ViewEdges, ordered in CCW order (in the image plan)
public: public:
/*! Default constructor.*/ /** Default constructor.*/
inline TVertex() : ViewVertex(Nature::T_VERTEX) inline TVertex() : ViewVertex(Nature::T_VERTEX)
{ {
_FrontSVertex = NULL; _FrontSVertex = NULL;
@@ -507,7 +507,7 @@ class TVertex : public ViewVertex {
} }
protected: protected:
/*! Copy constructor. */ /** Copy constructor. */
inline TVertex(TVertex &iBrother) : ViewVertex(iBrother) inline TVertex(TVertex &iBrother) : ViewVertex(iBrother)
{ {
_FrontSVertex = iBrother._FrontSVertex; _FrontSVertex = iBrother._FrontSVertex;
@@ -519,7 +519,7 @@ class TVertex : public ViewVertex {
_sortedEdges = iBrother._sortedEdges; _sortedEdges = iBrother._sortedEdges;
} }
/*! Cloning method. */ /** Cloning method. */
virtual ViewVertex *duplicate() virtual ViewVertex *duplicate()
{ {
TVertex *clone = new TVertex(*this); TVertex *clone = new TVertex(*this);
@@ -528,13 +528,13 @@ class TVertex : public ViewVertex {
public: public:
/* accessors */ /* accessors */
/*! Returns the SVertex that is closer to the viewpoint. */ /** Returns the SVertex that is closer to the viewpoint. */
inline SVertex *frontSVertex() inline SVertex *frontSVertex()
{ {
return _FrontSVertex; return _FrontSVertex;
} }
/*! Returns the SVertex that is further away from the viewpoint. */ /** Returns the SVertex that is further away from the viewpoint. */
inline SVertex *backSVertex() inline SVertex *backSVertex()
{ {
return _BackSVertex; return _BackSVertex;
@@ -561,14 +561,14 @@ class TVertex : public ViewVertex {
} }
/* modifiers */ /* modifiers */
/*! Sets the SVertex that is closer to the viewpoint. */ /** Sets the SVertex that is closer to the viewpoint. */
inline void setFrontSVertex(SVertex *iFrontSVertex) inline void setFrontSVertex(SVertex *iFrontSVertex)
{ {
_FrontSVertex = iFrontSVertex; _FrontSVertex = iFrontSVertex;
_FrontSVertex->setViewVertex(this); _FrontSVertex->setViewVertex(this);
} }
/*! Sets the SVertex that is further away from the viewpoint. */ /** Sets the SVertex that is further away from the viewpoint. */
inline void setBackSVertex(SVertex *iBackSVertex) inline void setBackSVertex(SVertex *iBackSVertex)
{ {
_BackSVertex = iBackSVertex; _BackSVertex = iBackSVertex;
@@ -580,13 +580,13 @@ class TVertex : public ViewVertex {
void setBackEdgeA(ViewEdge *iBackEdgeA, bool incoming = true); void setBackEdgeA(ViewEdge *iBackEdgeA, bool incoming = true);
void setBackEdgeB(ViewEdge *iBackEdgeB, bool incoming = true); void setBackEdgeB(ViewEdge *iBackEdgeB, bool incoming = true);
/*! Sets the Id. */ /** Sets the Id. */
inline void setId(const Id &iId) inline void setId(const Id &iId)
{ {
_Id = iId; _Id = iId;
} }
/*! Returns the SVertex (among the 2) belonging to the FEdge iFEdge */ /** Returns the SVertex (among the 2) belonging to the FEdge iFEdge */
inline SVertex *getSVertex(FEdge *iFEdge) inline SVertex *getSVertex(FEdge *iFEdge)
{ {
const vector<FEdge *> &vfEdges = _FrontSVertex->fedges(); const vector<FEdge *> &vfEdges = _FrontSVertex->fedges();
@@ -608,7 +608,7 @@ class TVertex : public ViewVertex {
virtual void Replace(ViewEdge *iOld, ViewEdge *iNew); virtual void Replace(ViewEdge *iOld, ViewEdge *iNew);
/*! returns the mate edge of iEdgeA. /** returns the mate edge of iEdgeA.
* For example, if iEdgeA is frontEdgeA, then frontEdgeB is returned. If iEdgeA is frontEdgeB * For example, if iEdgeA is frontEdgeA, then frontEdgeB is returned. If iEdgeA is frontEdgeB
* then frontEdgeA is returned. Same for back edges * then frontEdgeA is returned. Same for back edges
*/ */
@@ -637,18 +637,18 @@ class TVertex : public ViewVertex {
virtual edge_iterator edges_iterator(ViewEdge *iEdge); virtual edge_iterator edges_iterator(ViewEdge *iEdge);
virtual const_edge_iterator edges_iterator(ViewEdge *iEdge) const; virtual const_edge_iterator edges_iterator(ViewEdge *iEdge) const;
/*! Returns an iterator over the ViewEdges that goes to or comes from this ViewVertex pointing to /** Returns an iterator over the ViewEdges that goes to or comes from this ViewVertex pointing to
* the first ViewEdge of the list. The orientedViewEdgeIterator allows to iterate in CCW order * the first ViewEdge of the list. The orientedViewEdgeIterator allows to iterate in CCW order
* over these ViewEdges and to get the orientation for each ViewEdge (incoming/outgoing). * over these ViewEdges and to get the orientation for each ViewEdge (incoming/outgoing).
*/ */
virtual ViewVertexInternal::orientedViewEdgeIterator edgesBegin(); virtual ViewVertexInternal::orientedViewEdgeIterator edgesBegin();
/*! Returns an orientedViewEdgeIterator over the ViewEdges around this ViewVertex, pointing after /** Returns an orientedViewEdgeIterator over the ViewEdges around this ViewVertex, pointing after
* the last ViewEdge. * the last ViewEdge.
*/ */
virtual ViewVertexInternal::orientedViewEdgeIterator edgesEnd(); virtual ViewVertexInternal::orientedViewEdgeIterator edgesEnd();
/*! Returns an orientedViewEdgeIterator pointing to the ViewEdge given as argument. */ /** Returns an orientedViewEdgeIterator pointing to the ViewEdge given as argument. */
virtual ViewVertexInternal::orientedViewEdgeIterator edgesIterator(ViewEdge *iEdge); virtual ViewVertexInternal::orientedViewEdgeIterator edgesIterator(ViewEdge *iEdge);
#ifdef WITH_CXX_GUARDEDALLOC #ifdef WITH_CXX_GUARDEDALLOC
@@ -665,7 +665,7 @@ class TVertex : public ViewVertex {
/**********************************/ /**********************************/
// (non T vertex) // (non T vertex)
/*! View vertex for corners, cusps, etc... /** View vertex for corners, cusps, etc...
* Associated to a single SVertex. * Associated to a single SVertex.
* Can be associated to 2 or several view edges * Can be associated to 2 or several view edges
*/ */
@@ -674,80 +674,80 @@ class NonTVertex : public ViewVertex {
typedef vector<directedViewEdge> edges_container; typedef vector<directedViewEdge> edges_container;
public: // Implementation of Interface0D public: // Implementation of Interface0D
/*! Returns the string "ViewVertex". */ /** Returns the string "ViewVertex". */
virtual string getExactTypeName() const virtual string getExactTypeName() const
{ {
return "NonTVertex"; return "NonTVertex";
} }
// Data access methods // Data access methods
/*! Returns the 3D x coordinate of the vertex. */ /** Returns the 3D x coordinate of the vertex. */
virtual real getX() const virtual real getX() const
{ {
return _SVertex->point3D().x(); return _SVertex->point3D().x();
} }
/*! Returns the 3D y coordinate of the vertex. */ /** Returns the 3D y coordinate of the vertex. */
virtual real getY() const virtual real getY() const
{ {
return _SVertex->point3D().y(); return _SVertex->point3D().y();
} }
/*! Returns the 3D z coordinate of the vertex. */ /** Returns the 3D z coordinate of the vertex. */
virtual real getZ() const virtual real getZ() const
{ {
return _SVertex->point3D().z(); return _SVertex->point3D().z();
} }
/*! Returns the 3D point. */ /** Returns the 3D point. */
virtual Vec3r getPoint3D() const virtual Vec3r getPoint3D() const
{ {
return _SVertex->getPoint3D(); return _SVertex->getPoint3D();
} }
/*! Returns the projected 3D x coordinate of the vertex. */ /** Returns the projected 3D x coordinate of the vertex. */
virtual real getProjectedX() const virtual real getProjectedX() const
{ {
return _SVertex->point2D().x(); return _SVertex->point2D().x();
} }
/*! Returns the projected 3D y coordinate of the vertex. */ /** Returns the projected 3D y coordinate of the vertex. */
virtual real getProjectedY() const virtual real getProjectedY() const
{ {
return _SVertex->point2D().y(); return _SVertex->point2D().y();
} }
/*! Returns the projected 3D z coordinate of the vertex. */ /** Returns the projected 3D z coordinate of the vertex. */
virtual real getProjectedZ() const virtual real getProjectedZ() const
{ {
return _SVertex->point2D().z(); return _SVertex->point2D().z();
} }
/*! Returns the 2D point. */ /** Returns the 2D point. */
virtual Vec2r getPoint2D() const virtual Vec2r getPoint2D() const
{ {
return _SVertex->getPoint2D(); return _SVertex->getPoint2D();
} }
/*! Returns the Id of the vertex. */ /** Returns the Id of the vertex. */
virtual Id getId() const virtual Id getId() const
{ {
return _SVertex->getId(); return _SVertex->getId();
} }
/*! Cast the Interface0D in SVertex if it can be. */ /** Cast the Interface0D in SVertex if it can be. */
virtual SVertex *castToSVertex() virtual SVertex *castToSVertex()
{ {
return _SVertex; return _SVertex;
} }
/*! Cast the Interface0D in ViewVertex if it can be. */ /** Cast the Interface0D in ViewVertex if it can be. */
virtual ViewVertex *castToViewVertex() virtual ViewVertex *castToViewVertex()
{ {
return this; return this;
} }
/*! Cast the Interface0D in NonTVertex if it can be. */ /** Cast the Interface0D in NonTVertex if it can be. */
virtual NonTVertex *castToNonTVertex() virtual NonTVertex *castToNonTVertex()
{ {
return this; return this;
@@ -758,13 +758,13 @@ class NonTVertex : public ViewVertex {
edges_container _ViewEdges; edges_container _ViewEdges;
public: public:
/*! Default constructor.*/ /** Default constructor.*/
inline NonTVertex() : ViewVertex(Nature::NON_T_VERTEX) inline NonTVertex() : ViewVertex(Nature::NON_T_VERTEX)
{ {
_SVertex = NULL; _SVertex = NULL;
} }
/*! Builds a NonTVertex from a SVertex. */ /** Builds a NonTVertex from a SVertex. */
inline NonTVertex(SVertex *iSVertex) : ViewVertex(Nature::NON_T_VERTEX) inline NonTVertex(SVertex *iSVertex) : ViewVertex(Nature::NON_T_VERTEX)
{ {
_SVertex = iSVertex; _SVertex = iSVertex;
@@ -772,7 +772,7 @@ class NonTVertex : public ViewVertex {
} }
protected: protected:
/*! Copy constructor. */ /** Copy constructor. */
inline NonTVertex(NonTVertex &iBrother) : ViewVertex(iBrother) inline NonTVertex(NonTVertex &iBrother) : ViewVertex(iBrother)
{ {
_SVertex = iBrother._SVertex; _SVertex = iBrother._SVertex;
@@ -780,7 +780,7 @@ class NonTVertex : public ViewVertex {
_ViewEdges = iBrother._ViewEdges; _ViewEdges = iBrother._ViewEdges;
} }
/*! Cloning method. */ /** Cloning method. */
virtual ViewVertex *duplicate() virtual ViewVertex *duplicate()
{ {
NonTVertex *clone = new NonTVertex(*this); NonTVertex *clone = new NonTVertex(*this);
@@ -788,13 +788,13 @@ class NonTVertex : public ViewVertex {
} }
public: public:
/*! destructor. */ /** destructor. */
virtual ~NonTVertex() virtual ~NonTVertex()
{ {
} }
/* accessors */ /* accessors */
/*! Returns the SVertex on top of which this NonTVertex is built. */ /** Returns the SVertex on top of which this NonTVertex is built. */
inline SVertex *svertex() inline SVertex *svertex()
{ {
return _SVertex; return _SVertex;
@@ -806,7 +806,7 @@ class NonTVertex : public ViewVertex {
} }
/* modifiers */ /* modifiers */
/*! Sets the SVertex on top of which this NonTVertex is built. */ /** Sets the SVertex on top of which this NonTVertex is built. */
inline void setSVertex(SVertex *iSVertex) inline void setSVertex(SVertex *iSVertex)
{ {
_SVertex = iSVertex; _SVertex = iSVertex;
@@ -857,18 +857,18 @@ class NonTVertex : public ViewVertex {
virtual edge_iterator edges_iterator(ViewEdge *iEdge); virtual edge_iterator edges_iterator(ViewEdge *iEdge);
virtual const_edge_iterator edges_iterator(ViewEdge *iEdge) const; virtual const_edge_iterator edges_iterator(ViewEdge *iEdge) const;
/*! Returns an iterator over the ViewEdges that goes to or comes from this ViewVertex pointing to /** Returns an iterator over the ViewEdges that goes to or comes from this ViewVertex pointing to
* the first ViewEdge of the list. The orientedViewEdgeIterator allows to iterate in CCW order * the first ViewEdge of the list. The orientedViewEdgeIterator allows to iterate in CCW order
* over these ViewEdges and to get the orientation for each ViewEdge (incoming/outgoing). * over these ViewEdges and to get the orientation for each ViewEdge (incoming/outgoing).
*/ */
virtual ViewVertexInternal::orientedViewEdgeIterator edgesBegin(); virtual ViewVertexInternal::orientedViewEdgeIterator edgesBegin();
/*! Returns an orientedViewEdgeIterator over the ViewEdges around this ViewVertex, pointing after /** Returns an orientedViewEdgeIterator over the ViewEdges around this ViewVertex, pointing after
* the last ViewEdge. * the last ViewEdge.
*/ */
virtual ViewVertexInternal::orientedViewEdgeIterator edgesEnd(); virtual ViewVertexInternal::orientedViewEdgeIterator edgesEnd();
/*! Returns an orientedViewEdgeIterator pointing to the ViewEdge given as argument. */ /** Returns an orientedViewEdgeIterator pointing to the ViewEdge given as argument. */
virtual ViewVertexInternal::orientedViewEdgeIterator edgesIterator(ViewEdge *iEdge); virtual ViewVertexInternal::orientedViewEdgeIterator edgesIterator(ViewEdge *iEdge);
#ifdef WITH_CXX_GUARDEDALLOC #ifdef WITH_CXX_GUARDEDALLOC
@@ -902,25 +902,25 @@ template<class Traits> class vertex_iterator_base;
} // end of namespace ViewEdgeInternal } // end of namespace ViewEdgeInternal
/*! Class defining a ViewEdge. A ViewEdge in an edge of the image graph. it connects two /** Class defining a ViewEdge. A ViewEdge in an edge of the image graph. it connects two
* ViewVertex. It is made by connecting a set of FEdges. * ViewVertex. It is made by connecting a set of FEdges.
*/ */
class ViewEdge : public Interface1D { class ViewEdge : public Interface1D {
public: // Implementation of Interface0D public: // Implementation of Interface0D
/*! Returns the string "ViewEdge". */ /** Returns the string "ViewEdge". */
virtual string getExactTypeName() const virtual string getExactTypeName() const
{ {
return "ViewEdge"; return "ViewEdge";
} }
// Data access methods // Data access methods
/*! Returns the Id of the vertex. */ /** Returns the Id of the vertex. */
virtual Id getId() const virtual Id getId() const
{ {
return _Id; return _Id;
} }
/*! Returns the nature of the ViewEdge. */ /** Returns the nature of the ViewEdge. */
virtual Nature::EdgeNature getNature() const virtual Nature::EdgeNature getNature() const
{ {
return _Nature; return _Nature;
@@ -960,12 +960,12 @@ class ViewEdge : public Interface1D {
Id *_splittingId; Id *_splittingId;
public: public:
/*! A field that can be used by the user to store any data. /** A field that can be used by the user to store any data.
* This field must be reset afterwards using ResetUserData(). * This field must be reset afterwards using ResetUserData().
*/ */
void *userdata; void *userdata;
/*! Default constructor. */ /** Default constructor. */
inline ViewEdge() inline ViewEdge()
{ {
__A = NULL; __A = NULL;
@@ -1028,7 +1028,7 @@ class ViewEdge : public Interface1D {
} }
// soc protected: // soc protected:
/*! Copy constructor. */ /** Copy constructor. */
inline ViewEdge(ViewEdge &iBrother) inline ViewEdge(ViewEdge &iBrother)
{ {
__A = iBrother.__A; __A = iBrother.__A;
@@ -1047,7 +1047,7 @@ class ViewEdge : public Interface1D {
userdata = NULL; userdata = NULL;
} }
/*! Cloning method. */ /** Cloning method. */
virtual ViewEdge *duplicate() virtual ViewEdge *duplicate()
{ {
ViewEdge *clone = new ViewEdge(*this); ViewEdge *clone = new ViewEdge(*this);
@@ -1055,7 +1055,7 @@ class ViewEdge : public Interface1D {
} }
public: public:
/*! Destructor. */ /** Destructor. */
virtual ~ViewEdge() virtual ~ViewEdge()
{ {
#if 0 #if 0
@@ -1073,37 +1073,37 @@ class ViewEdge : public Interface1D {
} }
/* accessors */ /* accessors */
/*! Returns the first ViewVertex. */ /** Returns the first ViewVertex. */
inline ViewVertex *A() inline ViewVertex *A()
{ {
return __A; return __A;
} }
/*! Returns the second ViewVertex. */ /** Returns the second ViewVertex. */
inline ViewVertex *B() inline ViewVertex *B()
{ {
return __B; return __B;
} }
/*! Returns the first FEdge that constitutes this ViewEdge. */ /** Returns the first FEdge that constitutes this ViewEdge. */
inline FEdge *fedgeA() inline FEdge *fedgeA()
{ {
return _FEdgeA; return _FEdgeA;
} }
/*! Returns the last FEdge that constitutes this ViewEdge. */ /** Returns the last FEdge that constitutes this ViewEdge. */
inline FEdge *fedgeB() inline FEdge *fedgeB()
{ {
return _FEdgeB; return _FEdgeB;
} }
/*! Returns the ViewShape to which this ViewEdge belongs to. */ /** Returns the ViewShape to which this ViewEdge belongs to. */
inline ViewShape *viewShape() inline ViewShape *viewShape()
{ {
return _Shape; return _Shape;
} }
/*! Returns the shape that is occluded by the ViewShape to which this ViewEdge belongs to. If no /** Returns the shape that is occluded by the ViewShape to which this ViewEdge belongs to. If no
* object is occluded, NULL is returned. \return The occluded ViewShape. * object is occluded, NULL is returned. \return The occluded ViewShape.
*/ */
inline ViewShape *aShape() inline ViewShape *aShape()
@@ -1111,7 +1111,7 @@ class ViewEdge : public Interface1D {
return _aShape; return _aShape;
} }
/*! Tells whether this ViewEdge forms a closed loop or not. */ /** Tells whether this ViewEdge forms a closed loop or not. */
inline bool isClosed() inline bool isClosed()
{ {
if (!__B) { if (!__B) {
@@ -1120,7 +1120,7 @@ class ViewEdge : public Interface1D {
return false; return false;
} }
/*! Returns the time stamp of this ViewEdge. */ /** Returns the time stamp of this ViewEdge. */
inline unsigned getChainingTimeStamp() inline unsigned getChainingTimeStamp()
{ {
return _ChainingTimeStamp; return _ChainingTimeStamp;
@@ -1152,64 +1152,64 @@ class ViewEdge : public Interface1D {
} }
/* modifiers */ /* modifiers */
/*! Sets the first ViewVertex of the ViewEdge. */ /** Sets the first ViewVertex of the ViewEdge. */
inline void setA(ViewVertex *iA) inline void setA(ViewVertex *iA)
{ {
__A = iA; __A = iA;
} }
/*! Sets the last ViewVertex of the ViewEdge. */ /** Sets the last ViewVertex of the ViewEdge. */
inline void setB(ViewVertex *iB) inline void setB(ViewVertex *iB)
{ {
__B = iB; __B = iB;
} }
/*! Sets the nature of the ViewEdge. */ /** Sets the nature of the ViewEdge. */
inline void setNature(Nature::EdgeNature iNature) inline void setNature(Nature::EdgeNature iNature)
{ {
_Nature = iNature; _Nature = iNature;
} }
/*! Sets the first FEdge of the ViewEdge. */ /** Sets the first FEdge of the ViewEdge. */
inline void setFEdgeA(FEdge *iFEdge) inline void setFEdgeA(FEdge *iFEdge)
{ {
_FEdgeA = iFEdge; _FEdgeA = iFEdge;
} }
/*! Sets the last FEdge of the ViewEdge. */ /** Sets the last FEdge of the ViewEdge. */
inline void setFEdgeB(FEdge *iFEdge) inline void setFEdgeB(FEdge *iFEdge)
{ {
_FEdgeB = iFEdge; _FEdgeB = iFEdge;
} }
/*! Sets the ViewShape to which this ViewEdge belongs to.*/ /** Sets the ViewShape to which this ViewEdge belongs to.*/
inline void setShape(ViewShape *iVShape) inline void setShape(ViewShape *iVShape)
{ {
_Shape = iVShape; _Shape = iVShape;
} }
/*! Sets the ViewEdge id. */ /** Sets the ViewEdge id. */
inline void setId(const Id &id) inline void setId(const Id &id)
{ {
_Id = id; _Id = id;
} }
/*! Sets Viewedge to this for all embedded fedges */ /** Sets Viewedge to this for all embedded fedges */
void UpdateFEdges(); void UpdateFEdges();
/*! Sets the occluded ViewShape */ /** Sets the occluded ViewShape */
inline void setaShape(ViewShape *iShape) inline void setaShape(ViewShape *iShape)
{ {
_aShape = iShape; _aShape = iShape;
} }
/*! Sets the quantitative invisibility value. */ /** Sets the quantitative invisibility value. */
inline void setQI(int qi) inline void setQI(int qi)
{ {
_qi = qi; _qi = qi;
} }
/*! Sets the time stamp value. */ /** Sets the time stamp value. */
inline void setChainingTimeStamp(unsigned ts) inline void setChainingTimeStamp(unsigned ts)
{ {
_ChainingTimeStamp = ts; _ChainingTimeStamp = ts;
@@ -1279,7 +1279,7 @@ class ViewEdge : public Interface1D {
float viewedge_length() const; float viewedge_length() const;
#endif #endif
/*! Returns the 2D length of the Viewedge. */ /** Returns the 2D length of the Viewedge. */
real getLength2D() const; real getLength2D() const;
#if 0 #if 0
@@ -1366,24 +1366,24 @@ class ViewEdge : public Interface1D {
vertex_iterator vertices_end(); vertex_iterator vertices_end();
// Iterator access (Interface1D) // Iterator access (Interface1D)
/*! Returns an Interface0DIterator to iterate over the SVertex constituting the embedding of this /** Returns an Interface0DIterator to iterate over the SVertex constituting the embedding of this
* ViewEdge. The returned Interface0DIterator points to the first SVertex of the ViewEdge. * ViewEdge. The returned Interface0DIterator points to the first SVertex of the ViewEdge.
*/ */
virtual Interface0DIterator verticesBegin(); virtual Interface0DIterator verticesBegin();
/*! Returns an Interface0DIterator to iterate over the SVertex constituting the embedding of this /** Returns an Interface0DIterator to iterate over the SVertex constituting the embedding of this
* ViewEdge. The returned Interface0DIterator points after the last SVertex of the ViewEdge. * ViewEdge. The returned Interface0DIterator points after the last SVertex of the ViewEdge.
*/ */
virtual Interface0DIterator verticesEnd(); virtual Interface0DIterator verticesEnd();
/*! Returns an Interface0DIterator to iterate over the points of this ViewEdge at a given /** Returns an Interface0DIterator to iterate over the points of this ViewEdge at a given
* resolution. The returned Interface0DIterator points on the first Point of the ViewEdge. * resolution. The returned Interface0DIterator points on the first Point of the ViewEdge.
* \param t: * \param t:
* the sampling value. * the sampling value.
*/ */
virtual Interface0DIterator pointsBegin(float t = 0.0f); virtual Interface0DIterator pointsBegin(float t = 0.0f);
/*! Returns an Interface0DIterator to iterate over the points of this ViewEdge at a given /** Returns an Interface0DIterator to iterate over the points of this ViewEdge at a given
* resolution. The returned Interface0DIterator points after the last Point of the ViewEdge. * resolution. The returned Interface0DIterator points after the last Point of the ViewEdge.
* \param t: * \param t:
* the sampling value. * the sampling value.
@@ -1403,7 +1403,7 @@ class ViewEdge : public Interface1D {
/* */ /* */
/**********************************/ /**********************************/
/*! Class gathering the elements of the ViewMap (ViewVertex, ViewEdge) that are issued from the /** Class gathering the elements of the ViewMap (ViewVertex, ViewEdge) that are issued from the
* same input shape. */ * same input shape. */
class ViewShape { class ViewShape {
private: private:
@@ -1412,19 +1412,19 @@ class ViewShape {
SShape *_SShape; SShape *_SShape;
public: public:
/*! A field that can be used by the user to store any data. /** A field that can be used by the user to store any data.
* This field must be reset afterwards using ResetUserData(). * This field must be reset afterwards using ResetUserData().
*/ */
void *userdata; void *userdata;
/*! Default constructor.*/ /** Default constructor.*/
inline ViewShape() inline ViewShape()
{ {
userdata = NULL; userdata = NULL;
_SShape = NULL; _SShape = NULL;
} }
/*! Builds a ViewShape from a SShape. */ /** Builds a ViewShape from a SShape. */
inline ViewShape(SShape *iSShape) inline ViewShape(SShape *iSShape)
{ {
userdata = NULL; userdata = NULL;
@@ -1432,7 +1432,7 @@ class ViewShape {
//_SShape->setViewShape(this); //_SShape->setViewShape(this);
} }
/*! Copy constructor. */ /** Copy constructor. */
inline ViewShape(ViewShape &iBrother) inline ViewShape(ViewShape &iBrother)
{ {
userdata = NULL; userdata = NULL;
@@ -1519,14 +1519,14 @@ class ViewShape {
} }
} }
/*! Cloning method. */ /** Cloning method. */
virtual ViewShape *duplicate() virtual ViewShape *duplicate()
{ {
ViewShape *clone = new ViewShape(*this); ViewShape *clone = new ViewShape(*this);
return clone; return clone;
} }
/*! Destructor. */ /** Destructor. */
virtual ~ViewShape(); virtual ~ViewShape();
/* splits a view edge into several view edges. /* splits a view edge into several view edges.
@@ -1545,75 +1545,75 @@ class ViewShape {
vector<ViewEdge *> &ioNewViewEdges); vector<ViewEdge *> &ioNewViewEdges);
/* accessors */ /* accessors */
/*! Returns the SShape on top of which this ViewShape is built. */ /** Returns the SShape on top of which this ViewShape is built. */
inline SShape *sshape() inline SShape *sshape()
{ {
return _SShape; return _SShape;
} }
/*! Returns the SShape on top of which this ViewShape is built. */ /** Returns the SShape on top of which this ViewShape is built. */
inline const SShape *sshape() const inline const SShape *sshape() const
{ {
return _SShape; return _SShape;
} }
/*! Returns the list of ViewVertex contained in this ViewShape. */ /** Returns the list of ViewVertex contained in this ViewShape. */
inline vector<ViewVertex *> &vertices() inline vector<ViewVertex *> &vertices()
{ {
return _Vertices; return _Vertices;
} }
/*! Returns the list of ViewEdge contained in this ViewShape. */ /** Returns the list of ViewEdge contained in this ViewShape. */
inline vector<ViewEdge *> &edges() inline vector<ViewEdge *> &edges()
{ {
return _Edges; return _Edges;
} }
/*! Returns the ViewShape id. */ /** Returns the ViewShape id. */
inline Id getId() const inline Id getId() const
{ {
return _SShape->getId(); return _SShape->getId();
} }
/*! Returns the ViewShape name. */ /** Returns the ViewShape name. */
inline const string &getName() const inline const string &getName() const
{ {
return _SShape->getName(); return _SShape->getName();
} }
/*! Returns the ViewShape library path. */ /** Returns the ViewShape library path. */
inline const string &getLibraryPath() const inline const string &getLibraryPath() const
{ {
return _SShape->getLibraryPath(); return _SShape->getLibraryPath();
} }
/* modifiers */ /* modifiers */
/*! Sets the SShape on top of which the ViewShape is built. */ /** Sets the SShape on top of which the ViewShape is built. */
inline void setSShape(SShape *iSShape) inline void setSShape(SShape *iSShape)
{ {
_SShape = iSShape; _SShape = iSShape;
} }
/*! Sets the list of ViewVertex contained in this ViewShape. */ /** Sets the list of ViewVertex contained in this ViewShape. */
inline void setVertices(const vector<ViewVertex *> &iVertices) inline void setVertices(const vector<ViewVertex *> &iVertices)
{ {
_Vertices = iVertices; _Vertices = iVertices;
} }
/*! Sets the list of ViewEdge contained in this ViewShape. */ /** Sets the list of ViewEdge contained in this ViewShape. */
inline void setEdges(const vector<ViewEdge *> &iEdges) inline void setEdges(const vector<ViewEdge *> &iEdges)
{ {
_Edges = iEdges; _Edges = iEdges;
} }
/*! Adds a ViewVertex to the list. */ /** Adds a ViewVertex to the list. */
inline void AddVertex(ViewVertex *iVertex) inline void AddVertex(ViewVertex *iVertex)
{ {
_Vertices.push_back(iVertex); _Vertices.push_back(iVertex);
//_SShape->AddNewVertex(iVertex->svertex()); //_SShape->AddNewVertex(iVertex->svertex());
} }
/*! Adds a ViewEdge to the list */ /** Adds a ViewEdge to the list */
inline void AddEdge(ViewEdge *iEdge) inline void AddEdge(ViewEdge *iEdge)
{ {
_Edges.push_back(iEdge); _Edges.push_back(iEdge);

View File

@@ -363,9 +363,9 @@ class edge_iterator_base : public IteratorBase<Traits, InputIteratorTag_Traits>
namespace ViewEdgeInternal { namespace ViewEdgeInternal {
/*!----------------------*/ /**----------------------*/
/*! Iterators definition */ /** Iterators definition */
/*!----------------------*/ /**----------------------*/
template<class Traits> template<class Traits>
class edge_iterator_base : public IteratorBase<Traits, BidirectionalIteratorTag_Traits> { class edge_iterator_base : public IteratorBase<Traits, BidirectionalIteratorTag_Traits> {
public: public:

View File

@@ -107,28 +107,28 @@ class ViewMapBuilder {
} }
/* Build Grid for ray casting */ /* Build Grid for ray casting */
/*! Build non-culled Grid in camera space for ray casting */ /** Build non-culled Grid in camera space for ray casting */
void BuildGrid(WingedEdge &we, const BBox<Vec3r> &bbox, unsigned int sceneNumFaces); void BuildGrid(WingedEdge &we, const BBox<Vec3r> &bbox, unsigned int sceneNumFaces);
/*! Compute Shapes from a WingedEdge containing a list of WShapes */ /** Compute Shapes from a WingedEdge containing a list of WShapes */
void computeInitialViewEdges(WingedEdge &); void computeInitialViewEdges(WingedEdge &);
/*! Compute Cusps */ /** Compute Cusps */
void computeCusps(ViewMap *ioViewMap); void computeCusps(ViewMap *ioViewMap);
/*! Detects cusps (for a single ViewEdge) among SVertices and builds a ViewVertex on top of each /** Detects cusps (for a single ViewEdge) among SVertices and builds a ViewVertex on top of each
* cusp SVertex We use a hysteresis approach to avoid noise. * cusp SVertex We use a hysteresis approach to avoid noise.
*/ */
void DetectCusps(ViewEdge *ioEdge); void DetectCusps(ViewEdge *ioEdge);
/*! Sets the current viewpoint */ /** Sets the current viewpoint */
inline void setViewpoint(const Vec3r &ivp) inline void setViewpoint(const Vec3r &ivp)
{ {
_viewpoint = ivp; _viewpoint = ivp;
SilhouetteGeomEngine::setViewpoint(ivp); SilhouetteGeomEngine::setViewpoint(ivp);
} }
/*! Sets the current transformation /** Sets the current transformation
* iModelViewMatrix * iModelViewMatrix
* The 4x4 model view matrix, in column major order (openGL like). * The 4x4 model view matrix, in column major order (openGL like).
* iProjection matrix * iProjection matrix
@@ -153,7 +153,7 @@ class ViewMapBuilder {
SilhouetteGeomEngine::setFrustum(iZnear, iZfar); SilhouetteGeomEngine::setFrustum(iZnear, iZfar);
} }
/*! Builds the scene view map returns the list the view map /** Builds the scene view map returns the list the view map
* it is up to the caller to delete this ViewMap * it is up to the caller to delete this ViewMap
* iWRoot * iWRoot
* The root group node containing the WEdge structured scene * The root group node containing the WEdge structured scene
@@ -169,7 +169,7 @@ class ViewMapBuilder {
real occluderProscenium[4], real occluderProscenium[4],
bool extensiveFEdgeSearch = true); bool extensiveFEdgeSearch = true);
/*! computes the intersection between all 2D feature edges of the scene. /** computes the intersection between all 2D feature edges of the scene.
* ioViewMap * ioViewMap
* The view map. It is modified by the method. * The view map. It is modified by the method.
* The list of all features edges of the scene. * The list of all features edges of the scene.
@@ -181,7 +181,7 @@ class ViewMapBuilder {
intersection_algo iAlgo = sweep_line, intersection_algo iAlgo = sweep_line,
real epsilon = 1.0e-06); real epsilon = 1.0e-06);
/*! Computes the 2D scene silhouette edges visibility /** Computes the 2D scene silhouette edges visibility
* iGrid * iGrid
* For the Ray Casting algorithm. * For the Ray Casting algorithm.
*/ */
@@ -197,9 +197,9 @@ class ViewMapBuilder {
_Grid = iGrid; _Grid = iGrid;
} }
/*! accessors */ /** accessors */
/*! Modifiers */ /** Modifiers */
inline void setProgressBar(ProgressBar *iProgressBar) inline void setProgressBar(ProgressBar *iProgressBar)
{ {
_pProgressBar = iProgressBar; _pProgressBar = iProgressBar;
@@ -216,10 +216,10 @@ class ViewMapBuilder {
} }
protected: protected:
/*! Computes intersections on all edges of the scene using a sweep line algorithm */ /** Computes intersections on all edges of the scene using a sweep line algorithm */
void ComputeSweepLineIntersections(ViewMap *ioViewMap, real epsilon = 1.0e-6); void ComputeSweepLineIntersections(ViewMap *ioViewMap, real epsilon = 1.0e-6);
/*! Computes the 2D scene silhouette edges visibility using a ray casting. On each edge, a ray is /** Computes the 2D scene silhouette edges visibility using a ray casting. On each edge, a ray is
* cast to check its quantitative invisibility. The list of occluders are each time stored in the * cast to check its quantitative invisibility. The list of occluders are each time stored in the
* tested edge. ioViewMap The view map. The 2D scene silhouette edges as FEdges. These edges have * tested edge. ioViewMap The view map. The 2D scene silhouette edges as FEdges. These edges have
* already been splitted at their intersections points. Thus, these edges do not intersect * already been splitted at their intersections points. Thus, these edges do not intersect
@@ -242,7 +242,7 @@ class ViewMapBuilder {
bool cull, bool cull,
GridDensityProviderFactory &factory); GridDensityProviderFactory &factory);
/*! Compute the visibility for the FEdge fe. /** Compute the visibility for the FEdge fe.
* The occluders are added to fe occluders list. * The occluders are added to fe occluders list.
* fe * fe
* The FEdge * The FEdge

View File

@@ -45,7 +45,7 @@ namespace Freestyle {
namespace ViewVertexInternal { namespace ViewVertexInternal {
/*! Class representing an iterator over oriented ViewEdges around a ViewVertex. This iterator /** Class representing an iterator over oriented ViewEdges around a ViewVertex. This iterator
* allows a CCW iteration (in the image plane). An instance of an orientedViewEdgeIterator can only * allows a CCW iteration (in the image plane). An instance of an orientedViewEdgeIterator can only
* be obtained from a ViewVertex by calling edgesBegin() or edgesEnd(). * be obtained from a ViewVertex by calling edgesBegin() or edgesEnd().
*/ */
@@ -73,7 +73,7 @@ class orientedViewEdgeIterator : public Iterator {
edges_container::iterator _nontvertex_iter; edges_container::iterator _nontvertex_iter;
public: public:
/*! Default constructor */ /** Default constructor */
inline orientedViewEdgeIterator() inline orientedViewEdgeIterator()
{ {
} }
@@ -83,7 +83,7 @@ class orientedViewEdgeIterator : public Iterator {
_Nature = iNature; _Nature = iNature;
} }
/*! Copy constructor */ /** Copy constructor */
orientedViewEdgeIterator(const orientedViewEdgeIterator &iBrother) orientedViewEdgeIterator(const orientedViewEdgeIterator &iBrother)
{ {
_Nature = iBrother._Nature; _Nature = iBrother._Nature;
@@ -125,7 +125,7 @@ class orientedViewEdgeIterator : public Iterator {
} }
public: public:
/*! Tells whether the ViewEdge pointed by this iterator is the first one of the iteration list or /** Tells whether the ViewEdge pointed by this iterator is the first one of the iteration list or
* not. */ * not. */
virtual bool isBegin() const virtual bool isBegin() const
{ {
@@ -137,7 +137,7 @@ class orientedViewEdgeIterator : public Iterator {
} }
} }
/*! Tells whether the ViewEdge pointed by this iterator is after the last one of the iteration /** Tells whether the ViewEdge pointed by this iterator is after the last one of the iteration
* list or not. */ * list or not. */
virtual bool isEnd() const virtual bool isEnd() const
{ {
@@ -150,7 +150,7 @@ class orientedViewEdgeIterator : public Iterator {
} }
// operators // operators
/*! Increments. In the scripting language, call "increment()". */ /** Increments. In the scripting language, call "increment()". */
// operator corresponding to ++i // operator corresponding to ++i
virtual orientedViewEdgeIterator &operator++() virtual orientedViewEdgeIterator &operator++()
{ {
@@ -168,7 +168,7 @@ class orientedViewEdgeIterator : public Iterator {
} }
// comparibility // comparibility
/*! operator != */ /** operator != */
virtual bool operator!=(const orientedViewEdgeIterator &b) const virtual bool operator!=(const orientedViewEdgeIterator &b) const
{ {
if (_Nature & Nature::T_VERTEX) { if (_Nature & Nature::T_VERTEX) {
@@ -179,14 +179,14 @@ class orientedViewEdgeIterator : public Iterator {
} }
} }
/*! operator == */ /** operator == */
virtual bool operator==(const orientedViewEdgeIterator &b) const virtual bool operator==(const orientedViewEdgeIterator &b) const
{ {
return !(*this != b); return !(*this != b);
} }
// dereferencing // dereferencing
/*! Returns a reference to the pointed orientedViewEdge. /** Returns a reference to the pointed orientedViewEdge.
* In the scripting language, you must call "getObject()" instead. * In the scripting language, you must call "getObject()" instead.
*/ */
virtual ViewVertex::directedViewEdge &operator*() const virtual ViewVertex::directedViewEdge &operator*() const
@@ -199,7 +199,7 @@ class orientedViewEdgeIterator : public Iterator {
return (*_nontvertex_iter); return (*_nontvertex_iter);
} }
} }
/*! Returns a pointer to the pointed orientedViewEdge. /** Returns a pointer to the pointed orientedViewEdge.
* Can't be called in the scripting language. * Can't be called in the scripting language.
*/ */
virtual ViewVertex::directedViewEdge *operator->() const virtual ViewVertex::directedViewEdge *operator->() const
@@ -208,7 +208,7 @@ class orientedViewEdgeIterator : public Iterator {
} }
public: public:
/*! increments.*/ /** increments.*/
virtual inline int increment() virtual inline int increment()
{ {
if (_Nature & Nature::T_VERTEX) { if (_Nature & Nature::T_VERTEX) {
@@ -415,14 +415,14 @@ class SVertexIterator : public Interface0DIteratorNested {
// //
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
/*! Base class for iterators over ViewEdges of the ViewMap Graph. /** Base class for iterators over ViewEdges of the ViewMap Graph.
* Basically the "increment()" operator of this class should be able to take the decision of * Basically the "increment()" operator of this class should be able to take the decision of
* "where" (on which ViewEdge) to go when pointing on a given ViewEdge. * "where" (on which ViewEdge) to go when pointing on a given ViewEdge.
* ::Caution::: the dereferencing operator returns a *pointer* to the pointed ViewEdge. * ::Caution::: the dereferencing operator returns a *pointer* to the pointed ViewEdge.
*/ */
class ViewEdgeIterator : public Iterator { class ViewEdgeIterator : public Iterator {
public: public:
/*! Builds a ViewEdgeIterator from a starting ViewEdge and its orientation. /** Builds a ViewEdgeIterator from a starting ViewEdge and its orientation.
* \param begin: * \param begin:
* The ViewEdge from where to start the iteration. * The ViewEdge from where to start the iteration.
* \param orientation: * \param orientation:
@@ -437,7 +437,7 @@ class ViewEdgeIterator : public Iterator {
_begin = begin; _begin = begin;
} }
/*! Copy constructor */ /** Copy constructor */
ViewEdgeIterator(const ViewEdgeIterator &it) ViewEdgeIterator(const ViewEdgeIterator &it)
{ {
_orientation = it._orientation; _orientation = it._orientation;
@@ -449,55 +449,55 @@ class ViewEdgeIterator : public Iterator {
{ {
} }
/*! Returns the string "ViewEdgeIterator" */ /** Returns the string "ViewEdgeIterator" */
virtual string getExactTypeName() const virtual string getExactTypeName() const
{ {
return "ViewEdgeIterator"; return "ViewEdgeIterator";
} }
/*! Returns the current pointed ViewEdge. */ /** Returns the current pointed ViewEdge. */
ViewEdge *getCurrentEdge() ViewEdge *getCurrentEdge()
{ {
return _edge; return _edge;
} }
/*! Sets the current pointed ViewEdge. */ /** Sets the current pointed ViewEdge. */
void setCurrentEdge(ViewEdge *edge) void setCurrentEdge(ViewEdge *edge)
{ {
_edge = edge; _edge = edge;
} }
/*! Returns the first ViewEdge used for the iteration. */ /** Returns the first ViewEdge used for the iteration. */
ViewEdge *getBegin() ViewEdge *getBegin()
{ {
return _begin; return _begin;
} }
/*! Sets the first ViewEdge used for the iteration. */ /** Sets the first ViewEdge used for the iteration. */
void setBegin(ViewEdge *begin) void setBegin(ViewEdge *begin)
{ {
_begin = begin; _begin = begin;
} }
/*! Gets the orientation of the pointed ViewEdge in the iteration. */ /** Gets the orientation of the pointed ViewEdge in the iteration. */
bool getOrientation() const bool getOrientation() const
{ {
return _orientation; return _orientation;
} }
/*! Sets the orientation of the pointed ViewEdge in the iteration. */ /** Sets the orientation of the pointed ViewEdge in the iteration. */
void setOrientation(bool orientation) void setOrientation(bool orientation)
{ {
_orientation = orientation; _orientation = orientation;
} }
/*! Changes the current orientation. */ /** Changes the current orientation. */
void changeOrientation() void changeOrientation()
{ {
_orientation = !_orientation; _orientation = !_orientation;
} }
/*! Returns a *pointer* to the pointed ViewEdge. */ /** Returns a *pointer* to the pointed ViewEdge. */
virtual ViewEdge *operator*() virtual ViewEdge *operator*()
{ {
return _edge; return _edge;
@@ -508,14 +508,14 @@ class ViewEdgeIterator : public Iterator {
return operator*(); return operator*();
} }
/*! Increments. In the scripting language, call "increment()". */ /** Increments. In the scripting language, call "increment()". */
virtual ViewEdgeIterator &operator++() virtual ViewEdgeIterator &operator++()
{ {
increment(); increment();
return *this; return *this;
} }
/*! Increments. In the scripting language, call "increment()". */ /** Increments. In the scripting language, call "increment()". */
virtual ViewEdgeIterator operator++(int) virtual ViewEdgeIterator operator++(int)
{ {
ViewEdgeIterator tmp(*this); ViewEdgeIterator tmp(*this);
@@ -523,21 +523,21 @@ class ViewEdgeIterator : public Iterator {
return tmp; return tmp;
} }
/*! increments. */ /** increments. */
virtual int increment() virtual int increment()
{ {
cerr << "Warning: method increment() not implemented" << endl; cerr << "Warning: method increment() not implemented" << endl;
return 0; return 0;
} }
/*! Decrements. In the scripting language, call "decrement()". */ /** Decrements. In the scripting language, call "decrement()". */
virtual ViewEdgeIterator &operator--() virtual ViewEdgeIterator &operator--()
{ {
decrement(); decrement();
return *this; return *this;
} }
/*! Decrements. In the scripting language, call "decrement()". */ /** Decrements. In the scripting language, call "decrement()". */
virtual ViewEdgeIterator operator--(int) virtual ViewEdgeIterator operator--(int)
{ {
ViewEdgeIterator tmp(*this); ViewEdgeIterator tmp(*this);
@@ -545,32 +545,32 @@ class ViewEdgeIterator : public Iterator {
return tmp; return tmp;
} }
/*! decrements. */ /** decrements. */
virtual int decrement() virtual int decrement()
{ {
cerr << "Warning: method decrement() not implemented" << endl; cerr << "Warning: method decrement() not implemented" << endl;
return 0; return 0;
} }
/*! Returns true if the pointed ViewEdge is the first one used for the iteration. */ /** Returns true if the pointed ViewEdge is the first one used for the iteration. */
virtual bool isBegin() const virtual bool isBegin() const
{ {
return _edge == _begin; return _edge == _begin;
} }
/*! Returns true if the pointed ViewEdge* equals 0. */ /** Returns true if the pointed ViewEdge* equals 0. */
virtual bool isEnd() const virtual bool isEnd() const
{ {
return !_edge; return !_edge;
} }
/*! operator == */ /** operator == */
virtual bool operator==(ViewEdgeIterator &it) const virtual bool operator==(ViewEdgeIterator &it) const
{ {
return _edge == it._edge; return _edge == it._edge;
} }
/*! operator != */ /** operator != */
virtual bool operator!=(ViewEdgeIterator &it) const virtual bool operator!=(ViewEdgeIterator &it) const
{ {
return !(*this == it); return !(*this == it);

View File

@@ -56,17 +56,17 @@ class ViewMapTesselator {
{ {
} }
/*! Builds a set of lines rep contained under a a NodeShape, itself contained under a NodeGroup /** Builds a set of lines rep contained under a a NodeShape, itself contained under a NodeGroup
* from a ViewMap */ * from a ViewMap */
NodeGroup *Tesselate(ViewMap *iViewMap); NodeGroup *Tesselate(ViewMap *iViewMap);
/*! Builds a set of lines rep contained under a a NodeShape, itself contained under a NodeGroup /** Builds a set of lines rep contained under a a NodeShape, itself contained under a NodeGroup
* from a set of view edges * from a set of view edges
*/ */
template<class ViewEdgesIterator> template<class ViewEdgesIterator>
NodeGroup *Tesselate(ViewEdgesIterator begin, ViewEdgesIterator end); NodeGroup *Tesselate(ViewEdgesIterator begin, ViewEdgesIterator end);
/*! Builds a set of lines rep contained among a NodeShape, from a WShape */ /** Builds a set of lines rep contained among a NodeShape, from a WShape */
NodeGroup *Tesselate(WShape *iWShape); NodeGroup *Tesselate(WShape *iWShape);
inline void setNature(Nature::EdgeNature iNature) inline void setNature(Nature::EdgeNature iNature)
@@ -103,7 +103,7 @@ class ViewMapTesselator {
#endif #endif
}; };
/*! Class to tesselate the 2D projected silhouette */ /** Class to tesselate the 2D projected silhouette */
class ViewMapTesselator2D : public ViewMapTesselator { class ViewMapTesselator2D : public ViewMapTesselator {
public: public:
inline ViewMapTesselator2D() : ViewMapTesselator() inline ViewMapTesselator2D() : ViewMapTesselator()
@@ -124,7 +124,7 @@ class ViewMapTesselator2D : public ViewMapTesselator {
#endif #endif
}; };
/*! Class to tesselate the 3D silhouette */ /** Class to tesselate the 3D silhouette */
class ViewMapTesselator3D : public ViewMapTesselator { class ViewMapTesselator3D : public ViewMapTesselator {
public: public:
inline ViewMapTesselator3D() : ViewMapTesselator() inline ViewMapTesselator3D() : ViewMapTesselator()

View File

@@ -104,7 +104,7 @@ static real angle_from_cotan(WVertex *vo, WVertex *v1, WVertex *v2)
return (fabs(atan2(denom, udotv))); return (fabs(atan2(denom, udotv)));
} }
/*! gts_vertex_mean_curvature_normal: /** gts_vertex_mean_curvature_normal:
* \param v: a #WVertex. * \param v: a #WVertex.
* \param s: a #GtsSurface. * \param s: a #GtsSurface.
* \param Kh: the Mean Curvature Normal at \a v. * \param Kh: the Mean Curvature Normal at \a v.
@@ -175,7 +175,7 @@ bool gts_vertex_mean_curvature_normal(WVertex *v, Vec3r &Kh)
return true; return true;
} }
/*! gts_vertex_gaussian_curvature: /** gts_vertex_gaussian_curvature:
* \param v: a #WVertex. * \param v: a #WVertex.
* \param s: a #GtsSurface. * \param s: a #GtsSurface.
* \param Kg: the Discrete Gaussian Curvature approximation at \a v. * \param Kg: the Discrete Gaussian Curvature approximation at \a v.
@@ -226,7 +226,7 @@ bool gts_vertex_gaussian_curvature(WVertex *v, real *Kg)
return true; return true;
} }
/*! gts_vertex_principal_curvatures: /** gts_vertex_principal_curvatures:
* @Kh: mean curvature. * @Kh: mean curvature.
* @Kg: Gaussian curvature. * @Kg: Gaussian curvature.
* @K1: first principal curvature. * @K1: first principal curvature.
@@ -279,7 +279,7 @@ static void eigenvector(real a, real b, real c, Vec3r e)
e[2] = 0.0; e[2] = 0.0;
} }
/*! gts_vertex_principal_directions: /** gts_vertex_principal_directions:
* \param v: a #WVertex. * \param v: a #WVertex.
* \param s: a #GtsSurface. * \param s: a #GtsSurface.
* \param Kh: mean curvature normal (a #Vec3r). * \param Kh: mean curvature normal (a #Vec3r).

View File

@@ -23,44 +23,44 @@
namespace Freestyle { namespace Freestyle {
/*! Namespace gathering the different possible natures of 0D and 1D elements of the ViewMap */ /** Namespace gathering the different possible natures of 0D and 1D elements of the ViewMap */
namespace Nature { namespace Nature {
/* XXX Why not using enums??? */ /* XXX Why not using enums??? */
/* In order to optimize for space (enum is int) - T.K. */ /* In order to optimize for space (enum is int) - T.K. */
typedef unsigned short VertexNature; typedef unsigned short VertexNature;
/*! true for any 0D element */ /** true for any 0D element */
static const VertexNature POINT = 0; // 0 static const VertexNature POINT = 0; // 0
/*! true for SVertex */ /** true for SVertex */
static const VertexNature S_VERTEX = (1 << 0); // 1 static const VertexNature S_VERTEX = (1 << 0); // 1
/*! true for ViewVertex */ /** true for ViewVertex */
static const VertexNature VIEW_VERTEX = (1 << 1); // 2 static const VertexNature VIEW_VERTEX = (1 << 1); // 2
/*! true for NonTVertex */ /** true for NonTVertex */
static const VertexNature NON_T_VERTEX = (1 << 2); // 4 static const VertexNature NON_T_VERTEX = (1 << 2); // 4
/*! true for TVertex */ /** true for TVertex */
static const VertexNature T_VERTEX = (1 << 3); // 8 static const VertexNature T_VERTEX = (1 << 3); // 8
/*! true for CUSP */ /** true for CUSP */
static const VertexNature CUSP = (1 << 4); // 16 static const VertexNature CUSP = (1 << 4); // 16
typedef unsigned short EdgeNature; typedef unsigned short EdgeNature;
/*! true for non feature edges (always false for 1D elements of the ViewMap) */ /** true for non feature edges (always false for 1D elements of the ViewMap) */
static const EdgeNature NO_FEATURE = 0; // 0 static const EdgeNature NO_FEATURE = 0; // 0
/*! true for silhouettes */ /** true for silhouettes */
static const EdgeNature SILHOUETTE = (1 << 0); // 1 static const EdgeNature SILHOUETTE = (1 << 0); // 1
/*! true for borders */ /** true for borders */
static const EdgeNature BORDER = (1 << 1); // 2 static const EdgeNature BORDER = (1 << 1); // 2
/*! true for creases */ /** true for creases */
static const EdgeNature CREASE = (1 << 2); // 4 static const EdgeNature CREASE = (1 << 2); // 4
/*! true for ridges */ /** true for ridges */
static const EdgeNature RIDGE = (1 << 3); // 8 static const EdgeNature RIDGE = (1 << 3); // 8
/*! true for valleys */ /** true for valleys */
static const EdgeNature VALLEY = (1 << 4); // 16 static const EdgeNature VALLEY = (1 << 4); // 16
/*! true for suggestive contours */ /** true for suggestive contours */
static const EdgeNature SUGGESTIVE_CONTOUR = (1 << 5); // 32 static const EdgeNature SUGGESTIVE_CONTOUR = (1 << 5); // 32
/*! true for material boundaries */ /** true for material boundaries */
static const EdgeNature MATERIAL_BOUNDARY = (1 << 6); // 64 static const EdgeNature MATERIAL_BOUNDARY = (1 << 6); // 64
/*! true for user-defined edge marks */ /** true for user-defined edge marks */
static const EdgeNature EDGE_MARK = (1 << 7); // 128 static const EdgeNature EDGE_MARK = (1 << 7); // 128
} // end of namespace Nature } // end of namespace Nature

View File

@@ -25,7 +25,7 @@
namespace Freestyle { namespace Freestyle {
/*! Temporary structures */ /** Temporary structures */
class vertexdata { class vertexdata {
public: public:
WVertex *_copy; WVertex *_copy;

View File

@@ -76,14 +76,14 @@ class WVertex {
_Border = -1; _Border = -1;
} }
/*! Copy constructor */ /** Copy constructor */
WVertex(WVertex &iBrother); WVertex(WVertex &iBrother);
virtual WVertex *duplicate(); virtual WVertex *duplicate();
virtual ~WVertex() virtual ~WVertex()
{ {
} }
/*! accessors */ /** accessors */
inline Vec3f &GetVertex() inline Vec3f &GetVertex()
{ {
return _Vertex; return _Vertex;
@@ -111,7 +111,7 @@ class WVertex {
bool isBoundary(); bool isBoundary();
/*! modifiers */ /** modifiers */
inline void setVertex(const Vec3f &v) inline void setVertex(const Vec3f &v)
{ {
_Vertex = v; _Vertex = v;
@@ -147,7 +147,7 @@ class WVertex {
} }
} }
/*! Adds an edge to the edges list */ /** Adds an edge to the edges list */
void AddEdge(WEdge *iEdge); void AddEdge(WEdge *iEdge);
virtual void ResetUserData() virtual void ResetUserData()
@@ -156,7 +156,7 @@ class WVertex {
} }
public: public:
/*! Iterator to iterate over a vertex incoming edges in the CCW order*/ /** Iterator to iterate over a vertex incoming edges in the CCW order*/
#if defined(__GNUC__) && (__GNUC__ < 3) #if defined(__GNUC__) && (__GNUC__ < 3)
class incoming_edge_iterator : public input_iterator<WOEdge *, ptrdiff_t> class incoming_edge_iterator : public input_iterator<WOEdge *, ptrdiff_t>
#else #else
@@ -247,7 +247,7 @@ class WVertex {
#endif #endif
}; };
/*! Iterator to iterate over a vertex faces in the CCW order */ /** Iterator to iterate over a vertex faces in the CCW order */
#if defined(__GNUC__) && (__GNUC__ < 3) #if defined(__GNUC__) && (__GNUC__ < 3)
class face_iterator : public input_iterator<WFace *, ptrdiff_t> class face_iterator : public input_iterator<WFace *, ptrdiff_t>
#else #else
@@ -336,7 +336,7 @@ class WVertex {
}; };
public: public:
/*! iterators access */ /** iterators access */
virtual incoming_edge_iterator incoming_edges_begin(); virtual incoming_edge_iterator incoming_edges_begin();
virtual incoming_edge_iterator incoming_edges_end(); virtual incoming_edge_iterator incoming_edges_end();
@@ -404,11 +404,11 @@ class WOEdge {
virtual ~WOEdge(){}; // soc virtual ~WOEdge(){}; // soc
/*! copy constructor */ /** copy constructor */
WOEdge(WOEdge &iBrother); WOEdge(WOEdge &iBrother);
virtual WOEdge *duplicate(); virtual WOEdge *duplicate();
/*! accessors */ /** accessors */
#if 0 #if 0
inline WOEdge *GetaCWEdge() inline WOEdge *GetaCWEdge()
{ {
@@ -466,7 +466,7 @@ class WOEdge {
return _angle; return _angle;
} }
/*! modifiers */ /** modifiers */
#if 0 #if 0
inline void SetaCWEdge(WOEdge *pe) inline void SetaCWEdge(WOEdge *pe)
{ {
@@ -520,7 +520,7 @@ class WOEdge {
_pOwner = pe; _pOwner = pe;
} }
/*! Retrieves the list of edges in CW order */ /** Retrieves the list of edges in CW order */
inline void RetrieveCWOrderedEdges(vector<WEdge *> &oEdges); inline void RetrieveCWOrderedEdges(vector<WEdge *> &oEdges);
WOEdge *twin(); WOEdge *twin();
@@ -579,7 +579,7 @@ class WEdge {
userdata = NULL; userdata = NULL;
} }
/*! Copy constructor */ /** Copy constructor */
WEdge(WEdge &iBrother); WEdge(WEdge &iBrother);
virtual WEdge *duplicate(); virtual WEdge *duplicate();
@@ -596,7 +596,7 @@ class WEdge {
} }
} }
/*! checks whether two WEdge have a common vertex. /** checks whether two WEdge have a common vertex.
* Returns a pointer on the common vertex if it exists, NULL otherwise. * Returns a pointer on the common vertex if it exists, NULL otherwise.
*/ */
static inline WVertex *CommonVertex(WEdge *iEdge1, WEdge *iEdge2) static inline WVertex *CommonVertex(WEdge *iEdge1, WEdge *iEdge2)
@@ -619,7 +619,7 @@ class WEdge {
return NULL; return NULL;
} }
/*! accessors */ /** accessors */
inline WOEdge *GetaOEdge() inline WOEdge *GetaOEdge()
{ {
return _paOEdge; return _paOEdge;
@@ -675,7 +675,7 @@ class WEdge {
} }
} }
/*! modifiers */ /** modifiers */
inline void setaOEdge(WOEdge *iEdge) inline void setaOEdge(WOEdge *iEdge)
{ {
_paOEdge = iEdge; _paOEdge = iEdge;
@@ -754,14 +754,14 @@ class WFace {
_FrsMaterialIndex = 0; _FrsMaterialIndex = 0;
} }
/*! copy constructor */ /** copy constructor */
WFace(WFace &iBrother); WFace(WFace &iBrother);
virtual WFace *duplicate(); virtual WFace *duplicate();
virtual ~WFace() virtual ~WFace()
{ {
} }
/*! accessors */ /** accessors */
inline const vector<WOEdge *> &getEdgeList() inline const vector<WOEdge *> &getEdgeList()
{ {
return _OEdgeList; return _OEdgeList;
@@ -794,7 +794,7 @@ class WFace {
const FrsMaterial &frs_material(); const FrsMaterial &frs_material();
/*! The vertex of index i corresponds to the a vertex of the edge of index i */ /** The vertex of index i corresponds to the a vertex of the edge of index i */
inline WVertex *GetVertex(unsigned int index) inline WVertex *GetVertex(unsigned int index)
{ {
#if 0 #if 0
@@ -805,7 +805,7 @@ class WFace {
return _OEdgeList[index]->GetaVertex(); return _OEdgeList[index]->GetaVertex();
} }
/*! returns the index at which iVertex is stored in the array. /** returns the index at which iVertex is stored in the array.
* returns -1 if iVertex doesn't belong to the face. * returns -1 if iVertex doesn't belong to the face.
*/ */
inline int GetIndex(WVertex *iVertex) inline int GetIndex(WVertex *iVertex)
@@ -868,19 +868,19 @@ class WFace {
return _VerticesTexCoords; return _VerticesTexCoords;
} }
/*! Returns the normal of the vertex of index index */ /** Returns the normal of the vertex of index index */
inline Vec3f &GetVertexNormal(int index) inline Vec3f &GetVertexNormal(int index)
{ {
return _VerticesNormals[index]; return _VerticesNormals[index];
} }
/*! Returns the tex coords of the vertex of index index */ /** Returns the tex coords of the vertex of index index */
inline Vec2f &GetVertexTexCoords(int index) inline Vec2f &GetVertexTexCoords(int index)
{ {
return _VerticesTexCoords[index]; return _VerticesTexCoords[index];
} }
/*! Returns the normal of the vertex iVertex for that face */ /** Returns the normal of the vertex iVertex for that face */
inline Vec3f &GetVertexNormal(WVertex *iVertex) inline Vec3f &GetVertexNormal(WVertex *iVertex)
{ {
int i = 0; int i = 0;
@@ -933,7 +933,7 @@ class WFace {
return _OEdgeList.size(); return _OEdgeList.size();
} }
/*! Returns true if the face has one ot its edge which is a border edge */ /** Returns true if the face has one ot its edge which is a border edge */
inline bool isBorder() const inline bool isBorder() const
{ {
for (vector<WOEdge *>::const_iterator woe = _OEdgeList.begin(), woeend = _OEdgeList.end(); for (vector<WOEdge *>::const_iterator woe = _OEdgeList.begin(), woeend = _OEdgeList.end();
@@ -946,7 +946,7 @@ class WFace {
return false; return false;
} }
/*! modifiers */ /** modifiers */
inline void setEdgeList(const vector<WOEdge *> &iEdgeList) inline void setEdgeList(const vector<WOEdge *> &iEdgeList)
{ {
_OEdgeList = iEdgeList; _OEdgeList = iEdgeList;
@@ -982,13 +982,13 @@ class WFace {
_Mark = iMark; _Mark = iMark;
} }
/*! designed to build a specialized WEdge for use in MakeEdge */ /** designed to build a specialized WEdge for use in MakeEdge */
virtual WEdge *instanciateEdge() const virtual WEdge *instanciateEdge() const
{ {
return new WEdge; return new WEdge;
} }
/*! Builds an oriented edge /** Builds an oriented edge
* Returns the built edge. * Returns the built edge.
* v1, v2 * v1, v2
* Vertices at the edge's extremities * Vertices at the edge's extremities
@@ -996,18 +996,18 @@ class WFace {
*/ */
virtual WOEdge *MakeEdge(WVertex *v1, WVertex *v2); virtual WOEdge *MakeEdge(WVertex *v1, WVertex *v2);
/*! Adds an edge to the edges list */ /** Adds an edge to the edges list */
inline void AddEdge(WOEdge *iEdge) inline void AddEdge(WOEdge *iEdge)
{ {
_OEdgeList.push_back(iEdge); _OEdgeList.push_back(iEdge);
} }
/*! For triangles, returns the edge opposite to the vertex in e. /** For triangles, returns the edge opposite to the vertex in e.
* returns false if the face is not a triangle or if the vertex is not found * returns false if the face is not a triangle or if the vertex is not found
*/ */
bool getOppositeEdge(const WVertex *v, WOEdge *&e); bool getOppositeEdge(const WVertex *v, WOEdge *&e);
/*! compute the area of the face */ /** compute the area of the face */
float getArea(); float getArea();
WShape *getShape(); WShape *getShape();
@@ -1057,7 +1057,7 @@ class WShape {
_SceneCurrentId++; _SceneCurrentId++;
} }
/*! copy constructor */ /** copy constructor */
WShape(WShape &iBrother); WShape(WShape &iBrother);
virtual WShape *duplicate(); virtual WShape *duplicate();
@@ -1088,7 +1088,7 @@ class WShape {
} }
} }
/*! accessors */ /** accessors */
inline vector<WEdge *> &getEdgeList() inline vector<WEdge *> &getEdgeList()
{ {
return _EdgeList; return _EdgeList;
@@ -1144,7 +1144,7 @@ class WShape {
return _LibraryPath; return _LibraryPath;
} }
/*! modifiers */ /** modifiers */
static inline void setCurrentId(const unsigned id) static inline void setCurrentId(const unsigned id)
{ {
_SceneCurrentId = id; _SceneCurrentId = id;
@@ -1198,13 +1198,13 @@ class WShape {
_LibraryPath = path; _LibraryPath = path;
} }
/*! designed to build a specialized WFace for use in MakeFace */ /** designed to build a specialized WFace for use in MakeFace */
virtual WFace *instanciateFace() const virtual WFace *instanciateFace() const
{ {
return new WFace; return new WFace;
} }
/*! adds a new face to the shape /** adds a new face to the shape
* returns the built face. * returns the built face.
* iVertexList * iVertexList
* List of face's vertices. These vertices are not added to the WShape vertex list; they are * List of face's vertices. These vertices are not added to the WShape vertex list; they are
@@ -1217,7 +1217,7 @@ class WShape {
vector<bool> &iFaceEdgeMarksList, vector<bool> &iFaceEdgeMarksList,
unsigned iMaterialIndex); unsigned iMaterialIndex);
/*! adds a new face to the shape. The difference with the previous method is that this one is /** adds a new face to the shape. The difference with the previous method is that this one is
* designed to build a WingedEdge structure for which there are per vertex normals, opposed to * designed to build a WingedEdge structure for which there are per vertex normals, opposed to
* per face normals. returns the built face. iVertexList List of face's vertices. These vertices * per face normals. returns the built face. iVertexList List of face's vertices. These vertices
* are not added to the WShape vertex list; they are supposed to be already stored when calling * are not added to the WShape vertex list; they are supposed to be already stored when calling
@@ -1309,7 +1309,7 @@ class WShape {
#endif #endif
protected: protected:
/*! /**
* Builds the face passed as argument (which as already been allocated) * Builds the face passed as argument (which as already been allocated)
* - iVertexList * - iVertexList
* List of face's vertices. These vertices are not added to the WShape vertex list; * List of face's vertices. These vertices are not added to the WShape vertex list;

View File

@@ -47,7 +47,7 @@ class WFillGrid {
void fillGrid(); void fillGrid();
/*! Accessors */ /** Accessors */
WingedEdge *getWingedEdge() WingedEdge *getWingedEdge()
{ {
return _winged_edge; return _winged_edge;
@@ -58,7 +58,7 @@ class WFillGrid {
return _grid; return _grid;
} }
/*! Modifiers */ /** Modifiers */
void setWingedEdge(WingedEdge *winged_edge) void setWingedEdge(WingedEdge *winged_edge)
{ {
if (winged_edge) { if (winged_edge) {

View File

@@ -43,7 +43,7 @@ class WSFillGrid {
void fillGrid(); void fillGrid();
/*! Accessors */ /** Accessors */
WingedEdge *getWingedEdge() WingedEdge *getWingedEdge()
{ {
return _winged_edge; return _winged_edge;
@@ -54,7 +54,7 @@ class WSFillGrid {
return _grid; return _grid;
} }
/*! Modifiers */ /** Modifiers */
void setWingedEdge(WingedEdge *winged_edge) void setWingedEdge(WingedEdge *winged_edge)
{ {
if (winged_edge) { if (winged_edge) {

View File

@@ -52,7 +52,7 @@ class WXVertex : public WVertex {
_curvatures = NULL; _curvatures = NULL;
} }
/*! Copy constructor */ /** Copy constructor */
WXVertex(WXVertex &iBrother) : WVertex(iBrother) WXVertex(WXVertex &iBrother) : WVertex(iBrother)
{ {
_curvatures = new CurvatureInfo(*iBrother._curvatures); _curvatures = new CurvatureInfo(*iBrother._curvatures);
@@ -135,7 +135,7 @@ class WXEdge : public WEdge {
_order = 0; _order = 0;
} }
/*! Copy constructor */ /** Copy constructor */
inline WXEdge(WXEdge &iBrother) : WEdge(iBrother) inline WXEdge(WXEdge &iBrother) : WEdge(iBrother)
{ {
_nature = iBrother.nature(); _nature = iBrother.nature();
@@ -159,7 +159,7 @@ class WXEdge : public WEdge {
_nature = _nature & ~Nature::SUGGESTIVE_CONTOUR; _nature = _nature & ~Nature::SUGGESTIVE_CONTOUR;
} }
/*! accessors */ /** accessors */
inline WXNature nature() inline WXNature nature()
{ {
return _nature; return _nature;
@@ -175,7 +175,7 @@ class WXEdge : public WEdge {
return _order; return _order;
} }
/*! modifiers */ /** modifiers */
inline void setFront(bool iFront) inline void setFront(bool iFront)
{ {
_front = iFront; _front = iFront;
@@ -209,7 +209,7 @@ class WXEdge : public WEdge {
* * * *
**********************************/ **********************************/
/*! Class to store a smooth edge (i.e Hertzman & Zorin smooth silhouette edges) */ /** Class to store a smooth edge (i.e Hertzman & Zorin smooth silhouette edges) */
class WXSmoothEdge { class WXSmoothEdge {
public: public:
typedef unsigned short Configuration; typedef unsigned short Configuration;
@@ -278,7 +278,7 @@ class WXSmoothEdge {
return _config; return _config;
} }
/*! modifiers */ /** modifiers */
inline void setWOeA(WOEdge *iwoea) inline void setWOeA(WOEdge *iwoea)
{ {
_woea = iwoea; _woea = iwoea;
@@ -439,15 +439,15 @@ class WXFaceLayer {
} }
} }
/*! If one of the face layer vertex has a DotP equal to 0, this method returns the vertex where /** If one of the face layer vertex has a DotP equal to 0, this method returns the vertex where
* it happens */ * it happens */
unsigned int Get0VertexIndex() const; unsigned int Get0VertexIndex() const;
/*! In case one of the edge of the triangle is a smooth edge, this method allows to retrieve the /** In case one of the edge of the triangle is a smooth edge, this method allows to retrieve the
* concerned edge */ * concerned edge */
unsigned int GetSmoothEdgeIndex() const; unsigned int GetSmoothEdgeIndex() const;
/*! retrieves the edges of the triangle for which the signs are different (a null value is not /** retrieves the edges of the triangle for which the signs are different (a null value is not
* considered) for the dotp values at each edge extremity * considered) for the dotp values at each edge extremity
*/ */
void RetrieveCuspEdgesIndices(vector<int> &oCuspEdges); void RetrieveCuspEdgesIndices(vector<int> &oCuspEdges);
@@ -512,7 +512,7 @@ class WXFace : public WFace {
_front = false; _front = false;
} }
/*! Copy constructor */ /** Copy constructor */
WXFace(WXFace &iBrother) : WFace(iBrother) WXFace(WXFace &iBrother) : WFace(iBrother)
{ {
_center = iBrother.center(); _center = iBrother.center();
@@ -545,13 +545,13 @@ class WXFace : public WFace {
} }
} }
/*! designed to build a specialized WEdge for use in MakeEdge */ /** designed to build a specialized WEdge for use in MakeEdge */
virtual WEdge *instanciateEdge() const virtual WEdge *instanciateEdge() const
{ {
return new WXEdge; return new WXEdge;
} }
/*! accessors */ /** accessors */
inline Vec3f &center() inline Vec3f &center()
{ {
return _center; return _center;
@@ -590,7 +590,7 @@ class WXFace : public WFace {
return _SmoothLayers; return _SmoothLayers;
} }
/*! retrieve the smooth edges that match the Nature given as argument */ /** retrieve the smooth edges that match the Nature given as argument */
void retrieveSmoothEdges(WXNature iNature, vector<WXSmoothEdge *> &oSmoothEdges) void retrieveSmoothEdges(WXNature iNature, vector<WXSmoothEdge *> &oSmoothEdges)
{ {
for (vector<WXFaceLayer *>::iterator wxf = _SmoothLayers.begin(), wxfend = _SmoothLayers.end(); for (vector<WXFaceLayer *>::iterator wxf = _SmoothLayers.begin(), wxfend = _SmoothLayers.end();
@@ -624,7 +624,7 @@ class WXFace : public WFace {
} }
} }
/*! modifiers */ /** modifiers */
inline void setCenter(const Vec3f &iCenter) inline void setCenter(const Vec3f &iCenter)
{ {
_center = iCenter; _center = iCenter;
@@ -674,7 +674,7 @@ class WXFace : public WFace {
_SmoothLayers = layersToKeep; _SmoothLayers = layersToKeep;
} }
/*! Clears everything */ /** Clears everything */
inline void Clear() inline void Clear()
{ {
for (vector<WXFaceLayer *>::iterator wxf = _SmoothLayers.begin(), wxfend = _SmoothLayers.end(); for (vector<WXFaceLayer *>::iterator wxf = _SmoothLayers.begin(), wxfend = _SmoothLayers.end();
@@ -724,7 +724,7 @@ class WXShape : public WShape {
_computeViewIndependent = true; _computeViewIndependent = true;
} }
/*! copy constructor */ /** copy constructor */
inline WXShape(WXShape &iBrother) : WShape(iBrother) inline WXShape(WXShape &iBrother) : WShape(iBrother)
{ {
_computeViewIndependent = iBrother._computeViewIndependent; _computeViewIndependent = iBrother._computeViewIndependent;
@@ -750,13 +750,13 @@ class WXShape : public WShape {
_computeViewIndependent = iFlag; _computeViewIndependent = iFlag;
} }
/*! designed to build a specialized WFace for use in MakeFace */ /** designed to build a specialized WFace for use in MakeFace */
virtual WFace *instanciateFace() const virtual WFace *instanciateFace() const
{ {
return new WXFace; return new WXFace;
} }
/*! /**
* Adds a new face to the shape returns the built face. * Adds a new face to the shape returns the built face.
* - iVertexList * - iVertexList
* List of face's vertices. * List of face's vertices.
@@ -768,7 +768,7 @@ class WXShape : public WShape {
vector<bool> &iFaceEdgeMarksList, vector<bool> &iFaceEdgeMarksList,
unsigned iMaterialIndex); unsigned iMaterialIndex);
/*! /**
* Adds a new face to the shape. * Adds a new face to the shape.
* The difference with the previous method is that this one is designed to build a WingedEdge * The difference with the previous method is that this one is designed to build a WingedEdge
* structure for which there are per vertex normals, opposed to per face normals. * structure for which there are per vertex normals, opposed to per face normals.
@@ -792,7 +792,7 @@ class WXShape : public WShape {
vector<bool> &iFaceEdgeMarksList, vector<bool> &iFaceEdgeMarksList,
unsigned iMaterialIndex); unsigned iMaterialIndex);
/*! Reset all edges and vertices flags (which might have been set up on a previous pass) */ /** Reset all edges and vertices flags (which might have been set up on a previous pass) */
virtual void Reset() virtual void Reset()
{ {
// Reset Edges // Reset Edges
@@ -807,7 +807,7 @@ class WXShape : public WShape {
((WXFace *)(*wf))->Reset(); ((WXFace *)(*wf))->Reset();
} }
} }
/*! accessors */ /** accessors */
#ifdef WITH_CXX_GUARDEDALLOC #ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:WXShape") MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:WXShape")