class methods
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, for instance:
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.
ofTessellator(...)
ofTessellator::ofTessellator(const ofTessellator &mom)
Copy constructor to copy properties from one tessellator to another.
operator=(...)
ofTessellator & ofTessellator::operator=(const ofTessellator &mom)
Operator overloading to copy properties from one tessellator to another.
tessellateToMesh(...)
void ofTessellator::tessellateToMesh(const 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.
tessellateToMesh(...)
void ofTessellator::tessellateToMesh(const 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(...)
void ofTessellator::tessellateToPolylines(const ofPolyline &src, ofPolyWindingMode polyWindingMode, vector< ofPolyline > &dstpoly, bool bIs2D=false)
Tessellates a vector of ofPolyline instances into vector of ofPolyline instances using the winding mode set in ofPolyWindingMode.
Documentation from code comments
Tessellate multiple polylines into a single polyline.
tessellateToPolylines(...)
void ofTessellator::tessellateToPolylines(const vector< ofPolyline > &src, ofPolyWindingMode polyWindingMode, vector< ofPolyline > &dstpoly, bool bIs2D=false)
Tessellates a vector of ofPolyline instances into vector of ofPolyline instances using the winding mode set in ofPolyWindingMode.
Last updated 火曜日, 19 11月 2024 17:24:31 UTC - 2537ee49f6d46d5fe98e408849448314fd1f180e
If you have any doubt about the usage of this module you can ask in the forum.
If you want to contribute better documentation or start documenting this section you can do so here
If you find anything wrong with this docs you can report any error by opening an issue