GL Studio C++ Runtime API
tessellate.h
Go to the documentation of this file.
1 /*! \file
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  11301 Corporate Blvd; Suite 100<br>
8  Orlando, Florida 32817<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 */
40 #ifndef __TESSELLATE_H
41 #define __TESSELLATE_H
42 
43 #include "dynamic_array.h"
44 #include "gls_include.h"
45 
46 // copied from gui_defs.h
47 #define ID_TESSELLATE_SINGLE 340
48 #define ID_TESSELLATE_UNION 341
49 #define ID_TESSELLATE_INTERSECT 342
50 #define ID_TESSELLATE_DIFFERENCE 343
51 
52 namespace disti
53 {
54 typedef DisplayObject* ( *CreateGroupFunc )();
55 typedef DisplayObject* ( *CreatePolyFunc )();
56 typedef Group* ( *DecomposeFunc )( DisplayObject* );
57 
58 /**
59  Tesselator functions. Implements polygon tessellation.
60  */
61 
62 /** Called by application to perform a CSG operation while tesselating one group of objects.
63  * \param obj_list Pointer to group of objects to tessellate
64  * \return Pointer to the group of the polygons generated during tesselation.
65  * The polygons will all be 2, or 3 vertices no more!
66  */
67 GLS_EXPORT Group* Tessellate( Group* obj_list, CreateGroupFunc, CreatePolyFunc, DecomposeFunc );
68 
69 /** Called by application to perform a CSG operation while tesselating two objects.
70  * \param object_list List containing the two objects to tessellate
71  * \param tesstype The operation to perform (union, intersect, subtract)
72  * \return Pointer to the group of the polygons generated during tesselation
73  */
74 
75 GLS_EXPORT Group* Tessellate( Group* object_list, int tesstype, CreateGroupFunc, CreatePolyFunc, DecomposeFunc );
76 
77 /** Called by application to perform a CSG operation on a character glyph
78  * \param obj_list Pointer to group of objects to tessellate
79  * \return Pointer to the group of the polygons generated during tesselation.
80  * The polygons will have OpenGl drawing primatives, e.g. TRIANGLE_FAN as
81  * generated by the tessellator
82  */
83 GLS_EXPORT Group* TessellateGlyph( Group* obj_list, CreateGroupFunc, CreatePolyFunc, DecomposeFunc );
84 
85 } // namespace disti
86 
87 #endif
Group * TessellateGlyph(Group *obj_list, CreateGroupFunc, CreatePolyFunc, DecomposeFunc)
The disti::DynamicArray class. A templated array of objects capable of dynamically growing...
Group * Tessellate(Group *obj_list, CreateGroupFunc, CreatePolyFunc, DecomposeFunc)
A file for all GL Studio files to include.
Definition: bmpimage.h:46