24 #if GEOM_PSEUDO3D==GEOM_TRUE
28 #include "VertexPair2.h"
30 namespace GEOM_FADE25D
47 static const char *
const CLIGHTBLUE;
48 static const char *
const CDARKBLUE;
49 static const char *
const CYELLOW;
50 static const char *
const CPINK;
51 static const char *
const CBLACK;
52 static const char *
const CLIGHTBROWN;
53 static const char *
const CDARKBROWN;
54 static const char *
const CORANGE;
55 static const char *
const CPURPLE;
56 static const char *
const CGRAY;
57 static const char *
const CLIGHTGRAY;
58 static const char *
const CRED;
59 static const char *
const CGREEN;
60 static const char *
const CWHITE;
61 static const char *
const CRIMSON;
62 static const char *
const CDARKORANGE;
63 static const char *
const CGOLDENROD;
64 static const char *
const COLIVE;
65 static const char *
const CLAWNGREEN;
66 static const char *
const CGREENYELLOW;
67 static const char *
const CPALEGREEN;
68 static const char *
const CMEDSPRINGGREEN;
69 static const char *
const CLIGHTSEAGREAN;
70 static const char *
const CCYAN;
71 static const char *
const CSTEELBLUE;
72 static const char *
const MIDNIGHTBLUE;
73 static const char *
const CWHEAT;
143 void writePoints(
const std::vector<Point2*>& vPoints,
unsigned linewidth,
const char* color) ;
155 void writePoints(
const std::vector<Point2>& vPoints,
unsigned linewidth,
const char* color) ;
192 void writeSegments(
const std::vector<Segment2>& vSegments,
const char* color,
bool bWithEndPoints=
false);
204 void writeSegments(
const std::vector<Edge2>& vEdge2,
const char* color,
bool bWithEndPoints=
false);
224 void writeCubes(
const std::vector<Point2>& vPoints,
const char* color);
236 void writeTriangles(
const std::vector<Triangle2*>& vT,
const char* color,
bool bWithNormals=
false);
248 void writeTriangles(
const std::vector<Point2>& vTriangleCorners,
const char* color,
bool bWithNNV);
293 void startList(
size_t numPoints,
size_t numTriangles,
bool bWithEdges);
295 std::ofstream* pOutFile;
296 static int nextColor;
302 #elif GEOM_PSEUDO3D==GEOM_FALSE
304 #error GEOM_PSEUDO3D is not defined
Represents a 2.5D point.
Definition: Point2.h:61
Represents a triangle in a triangulation.
Definition: Triangle2.h:59
Visualizer3 is a 3D scene writer for the Geomview viewer.
Definition: Visualizer3.h:45
void writePoints(const std::vector< Point2 * > &vPoints, unsigned linewidth, const char *color)
Write points to the output file.
void writePoint(const Point2 &p, unsigned linewidth, const char *color)
Write a single point to the output file.
Visualizer3(const char *name)
Constructor.
static const char * getNextColor()
Returns the next color in the sequence.
void closeFile()
Closes the output file.
void writeSegments(const std::vector< Segment2 > &vSegments, const char *color, bool bWithEndPoints=false)
Write multiple segments to the output file.
void writeTriangles(const std::vector< Point2 > &vTriangleCorners, const char *color, bool bWithNNV)
Write triangles using corner points to the output file.
static int getNextColorNum()
Returns the color index for the next color.
~Visualizer3()
Destructor.
void writeTriangles(const std::vector< Triangle2 * > &vT, const char *color, bool bWithNormals=false)
Write triangles to the output file.
void writeNormals(const std::vector< Triangle2 * > &vT, double scale)
Write normals to the output file.
void writeBall(const Point2 &p, double radius)
Write a ball (point with radius) to the output file.
void writePoints(const std::vector< Point2 > &vPoints, unsigned linewidth, const char *color)
Write points to the output file (overloaded)
static const char * getNextColorAndName(const char *&colorName)
Returns the next color and its name.
void writeCubes(const std::vector< Point2 > &vPoints, const char *color)
Write cubes to the output file.
void writeSegments(const std::vector< Edge2 > &vEdge2, const char *color, bool bWithEndPoints=false)
Write multiple edge segments to the output file.
void writeVertexPairs(const std::vector< VertexPair2 > &vVertexPairs, const char *color)
Write vertex pairs to the output file.
void writeSegment(const Point2 &src, const Point2 &trg, const char *color, bool bWithEndPoints=false)
Write a segment to the output file.
void writeTriangle(const Point2 &p0, const Point2 &p1, const Point2 &p2, const char *color)
Write a triangle to the output file using 3 points.
static const char * getColor(int i)
Returns a color by index.
void writeTriangle(const Triangle2 &t, const char *color)
Write a single triangle to the output file.
void setBackfaces(bool bWithBackfaces)
Set whether to show backfaces in a different color.