This documentation is automatically generated from the openFrameworks source code using doxygen and refers to the most recent release, version 0.12.0.
ofTessellator exists for one purpose: to turn ofPolylines into ofMeshes so that they can be more efficiently displayed using OpenGL. The ofPath class uses tessellation to turn its paths into openGL-ready shapes under the hood, so if you're interested in just having ofPolyline instances converted to meshes, it's handled for you by ofPath. If you're interested in using the tessellation multiple polylines at a time, then you'll find what you need in the ofTessellator. Many shapes can't be drawn by OpenGL without tessellation, but by breaking them into triangles or quads, they can be drawn easily. More...
#include <ofTessellator.h>
Public Member Functions | |
ofTessellator () | |
~ofTessellator () | |
ofTessellator (const ofTessellator &mom) | |
Copy constructor to copy properties from one tessellator to another. | |
ofTessellator & | operator= (const ofTessellator &mom) |
Operator overloading to copy properties from one tessellator to another. | |
void | tessellateToMesh (const std::vector< ofPolyline > &src, ofPolyWindingMode polyWindingMode, ofMesh &dstmesh, bool bIs2D=false) |
Tessellates a vector of ofPolyline instances into a single ofMesh instance using the winding mode set in ofPolyWindingMode. | |
void | tessellateToMesh (const ofPolyline &src, ofPolyWindingMode polyWindingMode, ofMesh &dstmesh, bool bIs2D=false) |
Tessellates a ofPolyline instance into a single ofMesh instance using the winding mode set in ofPolyWindingMode. | |
void | tessellateToPolylines (const std::vector< ofPolyline > &src, ofPolyWindingMode polyWindingMode, std::vector< ofPolyline > &dstpoly, bool bIs2D=false) |
Tessellates a vector of ofPolyline instances into vector of ofPolyline instances using the winding mode set in ofPolyWindingMode. | |
void | tessellateToPolylines (const ofPolyline &src, ofPolyWindingMode polyWindingMode, std::vector< ofPolyline > &dstpoly, bool bIs2D=false) |
Tessellate multiple polylines into a single polyline. | |
Detailed Description
ofTessellator exists for one purpose: to turn ofPolylines into ofMeshes so that they can be more efficiently displayed using OpenGL. The ofPath class uses tessellation to turn its paths into openGL-ready shapes under the hood, so if you're interested in just having ofPolyline instances converted to meshes, it's handled for you by ofPath. If you're interested in using the tessellation multiple polylines at a time, then you'll find what you need in the ofTessellator. Many shapes can't be drawn by OpenGL without tessellation, but by breaking them into triangles or quads, they can be drawn easily.
An example: The fairly simple shape shown on the left needs to be broken into triangles to be displayed, an example of how this might be done is shown on the right.
Constructor & Destructor Documentation
◆ ofTessellator() [1/2]
ofTessellator::ofTessellator | ( | ) |
◆ ~ofTessellator()
ofTessellator::~ofTessellator | ( | ) |
◆ ofTessellator() [2/2]
ofTessellator::ofTessellator | ( | const ofTessellator & | mom | ) |
Copy constructor to copy properties from one tessellator to another.
Member Function Documentation
◆ operator=()
ofTessellator & ofTessellator::operator= | ( | const ofTessellator & | mom | ) |
Operator overloading to copy properties from one tessellator to another.
◆ tessellateToMesh() [1/2]
void ofTessellator::tessellateToMesh | ( | const ofPolyline & | src, |
ofPolyWindingMode | polyWindingMode, | ||
ofMesh & | dstmesh, | ||
bool | bIs2D = false |
||
) |
Tessellates a ofPolyline instance into a single ofMesh instance using the winding mode set in ofPolyWindingMode.
◆ tessellateToMesh() [2/2]
void ofTessellator::tessellateToMesh | ( | const std::vector< ofPolyline > & | src, |
ofPolyWindingMode | polyWindingMode, | ||
ofMesh & | dstmesh, | ||
bool | bIs2D = false |
||
) |
Tessellates a vector of ofPolyline instances into a single ofMesh instance using the winding mode set in ofPolyWindingMode.
◆ tessellateToPolylines() [1/2]
void ofTessellator::tessellateToPolylines | ( | const ofPolyline & | src, |
ofPolyWindingMode | polyWindingMode, | ||
std::vector< ofPolyline > & | dstpoly, | ||
bool | bIs2D = false |
||
) |
Tessellate multiple polylines into a single polyline.
◆ tessellateToPolylines() [2/2]
void ofTessellator::tessellateToPolylines | ( | const std::vector< ofPolyline > & | src, |
ofPolyWindingMode | polyWindingMode, | ||
std::vector< ofPolyline > & | dstpoly, | ||
bool | bIs2D = false |
||
) |
Tessellates a vector of ofPolyline instances into vector of ofPolyline instances using the winding mode set in ofPolyWindingMode.
The documentation for this class was generated from the following files:
- /Users/icq4ever/Desktop/oF0120/libs/openFrameworks/graphics/ofTessellator.h
- /Users/icq4ever/Desktop/oF0120/libs/openFrameworks/graphics/ofTessellator.cpp