A writer for the VTK file format. More...
#include <VtkWriter.h>
Public Member Functions | |
VtkWriter (const char *name) | |
Constructor. More... | |
~VtkWriter () | |
Destructor. | |
void | addPoint (const Point2 &p, VtkColor color) |
Add a point with a specified color. More... | |
void | addPoints (const std::vector< Point2 * > &vPoints, VtkColor color) |
Add multiple points with a specified color. More... | |
void | addPoints (const std::vector< Point2 > &vPoints, VtkColor color) |
void | addSegment (const Point2 &source, const Point2 &target, VtkColor color, bool bWithEndPoints=false) |
Add a segment defined by source and target points. More... | |
void | addSegment (const Segment2 &segment, VtkColor color, bool bWithEndPoints=false) |
Add a segment with a specified color. More... | |
void | addSegments (const std::vector< Edge2 > &vEdges, VtkColor color, bool bWithEndPoints=false) |
Add multiple Edge2 objects with a specified color. More... | |
void | addSegments (const std::vector< Point2 > &vSegmentEndPoints, VtkColor color, bool bWithEndPoints=false) |
Add multiple segments with a specified color. More... | |
void | addSegments (const std::vector< Segment2 > &vSegments, VtkColor color, bool bWithEndPoints=false) |
Add multiple segments with a specified color. More... | |
void | addTriangle (const Point2 &p0, const Point2 &p1, const Point2 &p2, VtkColor color) |
Add a triangle defined by three points. More... | |
void | addTriangle (const Triangle2 &t, VtkColor color) |
Add a triangle with a specified color. More... | |
void | addTriangles (const std::vector< Point2 > &vTriangleCorners, VtkColor color) |
Add multiple triangles defined by their corner points. More... | |
void | addTriangles (const std::vector< Triangle2 * > &vT, VtkColor color) |
Add multiple triangles with a specified color. More... | |
VtkColor | getNextColor () |
Get the next color in the sequence. More... | |
void | writeFile () |
Write the VTK file. | |
A writer for the VTK file format.
|
explicit |
Constructor.
name | Name of the VTK file to write |
Add a point with a specified color.
p | The point to add |
color | The color of the point |
Add multiple points with a specified color.
vPoints | Vector of points to add |
color | The color of the points |
void GEOM_FADE25D::VtkWriter::addSegment | ( | const Point2 & | source, |
const Point2 & | target, | ||
VtkColor | color, | ||
bool | bWithEndPoints = false |
||
) |
Add a segment defined by source and target points.
source,target | Endpoints of the segment |
color | The color of the segment |
bWithEndPoints | Whether to include end points |
void GEOM_FADE25D::VtkWriter::addSegment | ( | const Segment2 & | segment, |
VtkColor | color, | ||
bool | bWithEndPoints = false |
||
) |
Add a segment with a specified color.
segment | The segment to add |
color | The color of the segment |
bWithEndPoints | Whether to include end points |
void GEOM_FADE25D::VtkWriter::addSegments | ( | const std::vector< Edge2 > & | vEdges, |
VtkColor | color, | ||
bool | bWithEndPoints = false |
||
) |
Add multiple Edge2 objects with a specified color.
vEdges | Vector of edges to add |
color | The color of the edges |
bWithEndPoints | Whether to include end points |
void GEOM_FADE25D::VtkWriter::addSegments | ( | const std::vector< Point2 > & | vSegmentEndPoints, |
VtkColor | color, | ||
bool | bWithEndPoints = false |
||
) |
Add multiple segments with a specified color.
vSegmentEndPoints | specifies n segments by 2*n endpoints |
color | The color of the segments |
bWithEndPoints | Whether to include end points |
void GEOM_FADE25D::VtkWriter::addSegments | ( | const std::vector< Segment2 > & | vSegments, |
VtkColor | color, | ||
bool | bWithEndPoints = false |
||
) |
Add multiple segments with a specified color.
vSegments | Vector of segments to add |
color | The color of the segments |
bWithEndPoints | Whether to include end points |
void GEOM_FADE25D::VtkWriter::addTriangle | ( | const Point2 & | p0, |
const Point2 & | p1, | ||
const Point2 & | p2, | ||
VtkColor | color | ||
) |
Add a triangle defined by three points.
p0,p1,p2 | Points defining the triangle |
color | The color of the triangle |
Add a triangle with a specified color.
t | The triangle to add |
color | The color of the triangle |
void GEOM_FADE25D::VtkWriter::addTriangles | ( | const std::vector< Point2 > & | vTriangleCorners, |
VtkColor | color | ||
) |
Add multiple triangles defined by their corner points.
vTriangleCorners | Vector of points defining the triangles |
color | The color of the triangles |
void GEOM_FADE25D::VtkWriter::addTriangles | ( | const std::vector< Triangle2 * > & | vT, |
VtkColor | color | ||
) |
Add multiple triangles with a specified color.
vT | Vector of triangle pointers to add |
color | The color of the triangles |
VtkColor GEOM_FADE25D::VtkWriter::getNextColor | ( | ) |
Get the next color in the sequence.