GL Studio C++ Runtime API
display_types.h
Go to the documentation of this file.
1 /*! \file
2  \brief GL Studio Enumerations and constants.
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 _DISPLAY_TYPES_H
41 #define _DISPLAY_TYPES_H
42 
43 #include "gls_include.h"
44 
45 namespace disti
46 {
47 // Number of texture points per object
48 #define NUM_TEXTURE_POINTS 4
49 
50 #define OBJECT_SETTING_UNDEFINED -1
51 
52 /** Enumeration for texture mapping mode of the object */
53 typedef enum
54 {
55  TEXTURE_MAP_MODULATE, /**< Texture color and alpha are modulated with polygon color and alpha */
56  TEXTURE_MAP_DECAL, /**< Texture color is blended with polygon color */
57  TEXTURE_MAP_BLEND, /**< Texture color is blended with polygon color, texture alpha is modulated with polygon alpha */
58  TEXTURE_MAP_REPLACE /**< Texture color and alpha replace polygon color and alpha */
59 } TextureMap_e;
60 
61 /** Enumeration for texture filtering mode of the object */
62 typedef enum
63 {
64  TEXTURE_FILTER_NEAREST, /**< Nearest pixel filtering */
65  TEXTURE_FILTER_LINEAR, /**< Bilinear interpolation filtering */
66  TEXTURE_FILTER_NEAREST_MIPMAP_NEAREST, /**< Selects nearest pixel in the nearest mipmap */
67  TEXTURE_FILTER_LINEAR_MIPMAP_LINEAR, /**< Linearly interpolates in two mipmaps then linearly interpolates between them */
68  TEXTURE_FILTER_NEAREST_MIPMAP_LINEAR, /**< Selects nearest pixel in two mipmaps then linearly interpolates between them */
69  TEXTURE_FILTER_LINEAR_MIPMAP_NEAREST /**< Linearly interpolates in the nearest mipmap */
71 
72 /** Enumeration for the Depth Testing and Writting mode */
73 typedef enum
74 {
75  DEPTH_BUFFER_NO_TEST_NO_WRITE = 0, //Save as 0 for compatability /**< Doesn't Test or Write */
76  DEPTH_BUFFER_TEST_AND_WRITE, //Save as 1 for compatability /**< Both Tests and Writes */
77  DEPTH_BUFFER_TEST_NO_WRITE, /**< Tests but doesn't write */
78  DEPTH_BUFFER_NO_TEST_AND_WRITE /**< Doesn't test but does write*/
80 
81 /** Enumeration for polygon drawing mode of the object */
82 typedef enum
83 {
84  POLY_MODE_UNDEFINED, /**< Polygon draw style is not defined; not a drawable type. Used with the properties page */
85  POLY_MODE_POINTS, /**< Polygon will be rendered with a point at each vertex */
86  POLY_MODE_OUTLINE, /**< Polygon will be rendered as an outline */
87  POLY_MODE_FILLED, /**< Polygon will be rendered filled-in */
88  POLY_MODE_FILL_AND_OUTLINE /**< Polygon will be rendered filled-in and with an outline */
90 
91 /** Enumeration for Alpha Blending/Testing mode */
92 typedef enum
93 {
94  ALPHA_MODE_UNDEFINED, /**< Alpha mode is not defined. Used by the properties page */
95  ALPHA_MODE_OPAQUE, /**< Alpha testing and blending are disabled */
96  ALPHA_MODE_2_LEVEL, /**< Alpha testing with a threshold of 0.5 is enabled, alpha blending is enabled. */
97  ALPHA_MODE_256_LEVEL /**< Alpha blending is enabled, alpha testing is disabled. */
98 } AlphaMode_e;
99 
100 /** Enumeration for whether or not polygon is closed or open */
101 typedef enum
102 {
103  POLY_OPEN, /**< Polygon will be drawn open */
104  POLY_CLOSED /**< Polygon will be drawn closed */
106 
107 /** Enumeration for the type of rendering projection for a display frame */
108 typedef enum
109 {
110  SHADING_FLAT, /**< The object will be drawn with flat shading (monochromatic) */
111  SHADING_GOURAUD /**< The object will be drawn with gouraud shading (linear color interpolation) */
112 } ShadingType_e;
113 
114 /** Enumeration for the C++ protection status of an object */
115 typedef enum
116 {
117  PUBLIC, /**< The object will be C++ public status */
118  PRIVATE, /**< The object will be C++ private status */
119  PROTECTED /**< The object will be C++ protected status */
121 
122 /** Enumeration for the redraw behavior for a display frame */
123 typedef enum
124 {
125  REDRAW_CONDITIONAL, /**< The display frame is only redrawn when the scene changes */
126  REDRAW_CONSTANT, /**< The display frame is constantly redrawn at a specified rate */
127  REDRAW_CONTINUOUS /**< The display frame is constantly redrawn as fast as possible */
129 
130 /** Enumeration for the type of picking for an object */
131 typedef enum
132 {
133  PICK_NEVER, /**< Picking will be disabled for this object and all children */
134  PICK_FIRST, /**< Picking will be based on draw order only. The first geometry hit wins. */
135  PICK_BEST, /**< Picking will find the best geometry hit of all available children */
136  PICK_ALWAYS /**< Picking will ignore geometry of this object, and always return a pick as if hit.
137  This is still only found through normal draw order traversal.*/
139 
140 /** Enumeration for an object's usage of glColorMaterial */
141 typedef enum
142 {
143  NO_COLOR_MATERIAL, /**< glColorMaterial will be disabled for the object */
144  DIFFUSE_COLOR_MATERIAL, /**< glColorMaterial will be enabled for the diffuse material */
145  AMBIENT_COLOR_MATERIAL, /**< glColorMaterial will be enabled for the ambient material */
146  DIFFUSE_AND_AMBIENT_COLOR_MATERIAL, /**< glColorMaterial will be enabled for the diffuse & ambient materials */
147  EMISSION_COLOR_MATERIAL, /**< glColorMaterial will be enabled for the emission material */
148  SPECULAR_COLOR_MATERIAL /**< glColorMaterial will be enabled for the specular material */
150 
151 /////////////////////////////////////////////////////////////////////////
152 //
153 // Default field values
154 //
155 /////////////////////////////////////////////////////////////////////////
156 #define DEF_WINDOW_SIZE 500
157 #define DEF_FILE_NAME "Untitled"
158 
159 #define DEF_LINE_RCOLOR 0
160 #define DEF_LINE_GCOLOR 0
161 #define DEF_LINE_BCOLOR 0
162 #define DEF_LINE_ALPHA 255
163 
164 #define DEF_FILL_RCOLOR 255
165 #define DEF_FILL_GCOLOR 255
166 #define DEF_FILL_BCOLOR 255
167 #define DEF_FILL_ALPHA 255
168 
169 #define DEF_GRID_RCOLOR 0
170 #define DEF_GRID_GCOLOR 0
171 #define DEF_GRID_BCOLOR 0
172 #define DEF_GRID_ALPHA 255
173 
174 #define DEF_AXES_RCOLOR 0
175 #define DEF_AXES_GCOLOR 0
176 #define DEF_AXES_BCOLOR 0
177 #define DEF_AXES_ALPHA 255
178 
179 #define DEF_TEXTURE_BLEND_RCOLOR 255
180 #define DEF_TEXTURE_BLEND_GCOLOR 255
181 #define DEF_TEXTURE_BLEND_BCOLOR 255
182 #define DEF_TEXTURE_BLEND_ALPHA 255
183 
184 #define DEF_BACKGROUND_RCOLOR 160
185 #define DEF_BACKGROUND_GCOLOR 168
186 #define DEF_BACKGROUND_BCOLOR 176
187 #define DEF_BACKGROUND_ALPHA 255
188 
189 #define DEF_LIGHT_COLOR 255
190 
191 #define DEF_LINE_WIDTH 1.0
192 #define DEF_LINE_STIPPLE_PATTERN 65535
193 #define DEF_LINE_STIPPLE_MULTIPLIER 1
194 
195 #define DEF_QUAD_WIDTH 25.0
196 #define DEF_QUAD_HEIGHT 25.0
197 
198 #define DEF_CIRCLE_WIDTH 25.0
199 #define DEF_CIRCLE_HEIGHT 25.0
200 #define DEF_SHADING SHADING_FLAT
201 #define DEF_LIGHTING_ENABLED 0
202 #define DEF_USE_PARENT_LIGHTING true
203 #define DEF_POLY_MODE POLY_MODE_OUTLINE
204 #define DEF_POLY_END POLY_CLOSED
205 #define DEF_TEXTURE_REPEAT TRUE
206 #define DEF_TEXTURE_MAGNIFICATION TEXTURE_FILTER_LINEAR
207 #define DEF_TEXTURE_MINIFICATION TEXTURE_FILTER_LINEAR
208 #define DEF_TEXTURE_MAP TEXTURE_MAP_REPLACE
209 #define DEF_POLYGON_MIN_DIMENSION 1
210 
211 #define DEF_POLYGON_OFFSET 0
212 
213 #define DEF_DOUBLE_CLICK 500
214 #define DEF_DOUBLE_CLICK_TOLERANCE 5
215 
216 #define DEF_STATIC_FLAG FALSE
217 #define DEF_ALPHAMODE ALPHA_MODE_256_LEVEL
218 #define DEF_VISIBILITY TRUE
219 #define DEF_CULLBACKFACE FALSE
220 #define DEF_ZBUFFER DEPTH_BUFFER_TEST_NO_WRITE
221 #define DEF_ANTIALIAS FALSE
222 #define DEF_CIRCLE_SEGMENTS 30
223 #define DEF_PROTECTION_MODE PUBLIC
224 #define DEF_ARC_ANGLE_AMOUNT 90.0
225 #define DEF_ARC_START_ANGLE 270.0
226 #define DEF_PROJECTION ORTHOGRAPHIC
227 #define DEF_BUFFER DOUBLE_BUFFER
228 #define DEF_FRAME_RATE 30
229 #define DEF_REDRAW REDRAW_CONSTANT
230 #define DEF_BLINK false
231 #define DEF_BLINK_RATE 2.0
232 #define DEF_PICKABLE PICK_FIRST
233 #define DEF_MATERIAL_INDEX 0
234 
235 #define DEF_TEXTURE_PALETTE_SIZE 50
236 
237 static const int MULTIPLE_TEXTURES_ON_OBJECT = -2;
238 
239 //////////////////////////////////////////////////////////////////////////
240 //
241 // "View" of a window, either in runtime or in the editor
242 //
243 //////////////////////////////////////////////////////////////////////////
244 /**
245  View
246 */
247 enum Views
248 {
249  VIEW_XY = 1,
250  VIEW_XZ = 2,
251  VIEW_ZY = 4,
252  VIEW_PERSPECTIVE = 8,
253  VIEW_EYEPOINT = 16
254 };
255 
256 //////////////////////////////////////////////////////////////////////////
257 //
258 // Used in Generated Code
259 //
260 //////////////////////////////////////////////////////////////////////////
261 /**
262  Initializers
263 */
264 typedef enum
265 {
266  GLS_INSTANCE_NAME = 1,
267  GLS_LOCATION,
268  GLS_ROTATION_POINT,
269  GLS_ACTION_CALLBACK,
270  GLS_OBJECT_NAME,
271  GLS_ATTRIBUTE_NAME,
272  GLS_TEXTURE_INDEX,
273  GLS_TEXTURE_REPEAT,
274  GLS_TEXTURE_MAP_MODE,
275  GLS_TEXTURE_MIN_FILTER,
276  GLS_TEXTURE_MAG_FILTER,
277  GLS_TEXTURE_BLEND_COLOR,
278  GLS_TEXTURE_ROTATION,
279  GLS_TEXTURE_SCALE_H,
280  GLS_TEXTURE_SCALE_V,
281  GLS_TEXTURE_OFFSET_X,
282  GLS_TEXTURE_OFFSET_Y,
283  GLS_POLYGON_MODE,
284  GLS_POLYGON_END,
285  GLS_POLYGON_OFFSET,
286  GLS_COLOR,
287  GLS_COLOR_MATERIAL_MODE,
288  GLS_LINE_WIDTH,
289  GLS_LINE_STIPPLE_PATTERN,
290  GLS_LINE_STIPPLE_MULTIPLIER,
291  GLS_VISIBILITY,
292  GLS_CULLBACKFACE,
293  GLS_ALPHAMODE,
294  GLS_ANTIALIAS,
295  GLS_ZBUFFER,
296  GLS_SHADING,
297  GLS_BLINKING,
298  GLS_BLINK_RATE,
299  GLS_PICKABLE,
300  GLS_LIGHTING_ENABLED,
301  GLS_MATERIAL_INDEX,
302  GLS_MATERIAL_INDICES,
303  GLS_DCS_MATRIX,
304  GLS_COMPONENT_ABSOLUTE_PLACEMENT,
305  GLS_COMPONENT_EDITOR_TRANSFORM,
306  GLS_TEXTURE_POINTS,
307  GLS_LAST_INITIALIZER
309 
310 } // namespace disti
311 
312 #endif
Definition: display_types.h:69
Definition: display_types.h:78
Definition: display_types.h:94
Definition: display_types.h:67
ShadingType_e
Definition: display_types.h:108
Definition: display_types.h:135
GLS_Initializers
Definition: display_types.h:264
RedrawBehavior_e
Definition: display_types.h:123
Definition: display_types.h:126
PolygonMode_e
Definition: display_types.h:82
TextureFilter_e
Definition: display_types.h:62
Definition: display_types.h:147
Definition: display_types.h:145
Definition: display_types.h:85
Definition: display_types.h:97
Definition: display_types.h:86
Definition: display_types.h:96
Definition: display_types.h:104
A file for all GL Studio files to include.
Definition: display_types.h:57
Definition: display_types.h:110
Definition: display_types.h:84
Views
Definition: display_types.h:247
Definition: display_types.h:95
Definition: display_types.h:127
Definition: display_types.h:117
Definition: display_types.h:146
Definition: display_types.h:58
Definition: display_types.h:56
DepthBuffer_e
Definition: display_types.h:73
Definition: display_types.h:125
ColorMaterialMode_e
Definition: display_types.h:141
Definition: display_types.h:55
AlphaMode_e
Definition: display_types.h:92
PickableType_e
Definition: display_types.h:131
Definition: display_types.h:88
TextureMap_e
Definition: display_types.h:53
Definition: display_types.h:65
Definition: display_types.h:144
Definition: display_types.h:111
Definition: display_types.h:77
MemberAccess_e
Definition: display_types.h:115
Definition: display_types.h:87
Definition: display_types.h:68
Definition: display_types.h:64
Definition: display_types.h:133
PolygonClose_e
Definition: display_types.h:101
Definition: display_types.h:66
Definition: display_types.h:148
Definition: display_types.h:119
Definition: display_types.h:118
Definition: bmpimage.h:46
Definition: display_types.h:143
Definition: display_types.h:134
Definition: display_types.h:136
Definition: display_types.h:103