GL Studio C++ Runtime API
tessellate.h
Go to the documentation of this file.
1/// \file tessellate.h
2/// \brief Tesselator functions. Allows tesselation of complex polygons into simple ones.
3///
4/// \par Copyright Information
5///
6/// Copyright (c) 2017 by The DiSTI Corporation.<br>
7/// 12249 Science Drive; Suite 300<br>
8/// Orlando, Florida 32826<br>
9/// USA<br>
10/// <br>
11/// All rights reserved.<br>
12///
13/// This Software contains proprietary trade secrets of DiSTI and may not be
14/// reproduced, in whole or part, in any form, or by any means of electronic,
15/// mechanical, or otherwise, without the written permission of DiSTI. Said
16/// permission may be derived through the purchase of applicable DiSTI product
17/// licenses which detail the distribution rights of this content and any
18/// Derivative Works based on this or other copyrighted DiSTI Software.
19///
20/// NO WARRANTY. THE SOFTWARE IS PROVIDED "AS-IS," WITHOUT WARRANTY OF ANY KIND,
21/// AND ANY USE OF THIS SOFTWARE PRODUCT IS AT YOUR OWN RISK. TO THE MAXIMUM EXTENT
22/// PERMITTED BY APPLICABLE LAW, DISTI AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES
23/// AND CONDITIONS, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
24/// IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY AND/OR FITNESS FOR A
25/// PARTICULAR PURPOSE, TITLE, AND NON-INFRINGEMENT, WITH REGARD TO THE SOFTWARE.
26///
27/// LIMITATION OF LIABILITY. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW,
28/// IN NO EVENT SHALL DISTI OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
29/// INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION,
30/// DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS
31/// INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR
32/// INABILITY TO USE THE SOFTWARE, EVEN IF DISTI HAS BEEN ADVISED OF THE POSSIBILITY
33/// OF SUCH DAMAGES. DISTI'S ENTIRE LIABILITY AND YOUR EXCLUSIVE REMEDY SHALL NOT
34/// EXCEED FIVE DOLLARS (US$5.00).
35///
36/// The aforementioned terms and restrictions are governed by the laws of the
37/// State of Florida and the United States of America.
38
39#ifndef DISTI_INCLUDED_TESSELLATE_H
40#define DISTI_INCLUDED_TESSELLATE_H
41
42#include "dynamic_array.h"
43#include "gls_include.h"
44
45// copied from gui_defs.h
46#define ID_TESSELLATE_SINGLE 340 ///< Unused, kept for backward compatibility.
47#define ID_TESSELLATE_UNION 341 ///< Perform tessellation as a union of objects.
48#define ID_TESSELLATE_INTERSECT 342 ///< Perform tessellation as the intersection of objects.
49#define ID_TESSELLATE_DIFFERENCE 343 ///< Perform tessellation as a difference of objects.
50
51namespace disti
52{
53typedef DisplayObject* ( *CreateGroupFunc )(); ///< Typedef for a function pointer used to create a group.
54typedef DisplayObject* ( *CreatePolyFunc )(); ///< Typedef for a function pointer used to create a polygon.
55typedef Group* ( *DecomposeFunc )( DisplayObject* ); ///< Typedef for a function pointer used to decompose an object.
56
57/**
58 Tesselator functions. Implements polygon tessellation.
59 */
60
61/** Called by application to perform a CSG operation while tesselating one group of objects.
62 * \param obj_list Pointer to group of objects to tessellate
63 * \return Pointer to the group of the polygons generated during tesselation.
64 * The polygons will all be 2, or 3 vertices no more!
65 */
67
68/** Called by application to perform a CSG operation while tesselating two objects.
69 * \param object_list List containing the two objects to tessellate
70 * \param tesstype The operation to perform (union, intersect, subtract)
71 * \return Pointer to the group of the polygons generated during tesselation
72 */
73
75
76/** Called by application to perform a CSG operation on a character glyph
77 * \param obj_list Pointer to group of objects to tessellate
78 * \return Pointer to the group of the polygons generated during tesselation.
79 * The polygons will have OpenGl drawing primatives, e.g. TRIANGLE_FAN as
80 * generated by the tessellator
81 */
83
84} // namespace disti
85
86#endif
Definition: display.h:95
Definition: group.h:52
The disti::DynamicArray class. A templated array of objects capable of dynamically growing.
A file for all GL Studio files to include.
#define GLS_EXPORT
Macro denoting which functions should be visible from the runtime library.
Definition: gls_include.h:50
Definition: bmpimage.h:46
DisplayObject *(* CreatePolyFunc)()
Typedef for a function pointer used to create a polygon.
Definition: tessellate.h:54
Group * Tessellate(Group *obj_list, CreateGroupFunc, CreatePolyFunc, DecomposeFunc)
DisplayObject *(* CreateGroupFunc)()
Typedef for a function pointer used to create a group.
Definition: tessellate.h:53
Group *(* DecomposeFunc)(DisplayObject *)
Typedef for a function pointer used to decompose an object.
Definition: tessellate.h:55
Group * TessellateGlyph(Group *obj_list, CreateGroupFunc, CreatePolyFunc, DecomposeFunc)