GL Studio C++ Runtime API
gls_clipping_group.h
Go to the documentation of this file.
1/// \file gls_clipping_group.h
2/// \brief The disti::GlsClippingGroup class.
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 INCLUDED_GLS_CLIPPING_GROUP_H
40#define INCLUDED_GLS_CLIPPING_GROUP_H
41
42#include "group.h"
43
44/// Provides support for creating DLLs.
45#if( defined( GLSGEN_EXPORT_GLSCLIPPINGGROUP ) || defined( GLSGEN_IMPORT_GLSCLIPPINGGROUP ) || defined( GLS_EXPORT_GENERATED ) || defined( GLS_IMPORT_GENERATED ) ) \
46 && defined( _MSC_VER )
47# if defined( GLSGEN_EXPORT_GLSCLIPPINGGROUP ) || defined( GLS_EXPORT_GENERATED )
48# define GLSGEN_GLSCLIPPINGGROUP_EXPORT __declspec( dllexport )
49# else
50# define GLSGEN_GLSCLIPPINGGROUP_EXPORT __declspec( dllimport )
51# endif
52#else
53# define GLSGEN_GLSCLIPPINGGROUP_EXPORT
54#endif
55///////////////////////////////////////////////////////////////////////////////
56
57/// Automatically link the runtime library plugin (on Windows).
58#define LIB_BASE_NAME "gls_clipping_group"
59#include "gls_auto_lib.h"
60#undef LIB_BASE_NAME
61
62namespace disti
63{
64#ifdef GLES
65class GlsGloFile;
66#endif
67
68// SetValue enumerations
69enum
70{
71 GLS_CLIPPING_GROUP_STATE = GLS_LAST_INITIALIZER + 1,
72 GLS_CLIPPING_GROUP_CLIPPING_ACTIVE,
73 GLS_CLIPPING_GROUP_BOTTOM_LEFT_CORNER,
74 GLS_CLIPPING_GROUP_TOP_RIGHT_CORNER,
75 GLS_CLIPPING_GROUP_SHOW_OUTLINE
76};
77
78/** Runtime implementation of a GlsClippingGroup */
79class GlsClippingGroup : public Group
80{
81public:
82 friend class GlsClippingGroupEditor;
83 DISTI_DEPRECATED( "This identifier is forbidden by the C++ standard. Use BaseClass instead." )
84 typedef Group _BaseClass; ///< Deprecated typedef for the base class.
85 typedef Group BaseClass; ///< Typedef for the base class.
86
87 /** Construct a new GlsClippingGroup.
88 * \param generateInstance Whether or not to generate an instance name for this clipping group
89 */
90 GLSGEN_GLSCLIPPINGGROUP_EXPORT explicit GlsClippingGroup( bool generateInstance = false );
91
92 /** Copy an existing clipping group's properties and clone its children to construct a new clipping group.
93 * \param clippingGroup The clipping group whose properties to copy and whose children to clone.
94 * \param generateInstance Whether or not to generate an instance name for this clipping group
95 */
96 GLSGEN_GLSCLIPPINGGROUP_EXPORT GlsClippingGroup( const GlsClippingGroup& clippingGroup, bool generateInstance );
97
98 /** Destructs a GlsClippingGroup object */
100
101 /// \return A pointer to a new GlsClippingGroup object.
103
107
108#ifndef GLES
111#endif
112
114
116 const Vector& logicalCoords,
117 float scale,
118 const Vector& directionVector,
119 Vector& collisionWinLoc /*Returned*/,
120 const OpenGLMatrices& drawnMatrices ) DISTI_METHOD_OVERRIDE;
121
123
124 //////////////////////////////////////////////////
125 // GlsClippingGroup specific operations
126 //////////////////////////////////////////////////
127
128 /** \return If clipping is active for this group */
130
131 /** Sets if clipping is active for this group
132 * \param value The new clipping value
133 */
135
136 /** \return Gets bottom left corner of clip region */
137 Vector Blc() { return _blc; }
138
139 /** Sets new bottom left corner for the clip region
140 * \param value The new blc
141 */
143
144 /** \return Gets top right corner of clip region */
145 Vector Trc() { return _trc; }
146
147 /** Sets new top right corner for the clip region
148 * \param value The new trc
149 */
151
152 /** \return If clip region should always be drawn in the editor */
153 bool ShowOutline() { return _showOutline; }
154
155 /** Sets if clip region should always be drawn in the editor
156 * \param value The new show value
157 */
159
160protected:
161 /** Get the four corners of the clip region transformed by the current DCS and offset by the group's location
162 * \param tlc [out] receives top left corner
163 * \param trc [out] receives top right corner
164 * \param brc [out] receives bottom right corner
165 * \param blc [out] receives bottom left corner
166 */
168
169#ifdef GLES
170 /** Set a single attribute from the GLO file.
171 * \param data The attribute to set and its associated data.
172 */
174#endif
175
176 bool _clippingActive; ///< Whether or not to call clipping is active.
177 Vector _blc; ///< Bottom Left Corner.
178 Vector _trc; ///< Top Right Corner.
179 bool _showOutline; ///< Outline always visible in editor.
180
181private:
182 // Deleted copy assignment; use CloneObject() or the copy constructor instead.
183 void operator=( const GlsClippingGroup& ); // = delete
184};
185
186} // namespace disti
187
188#endif
Definition: display.h:95
Definition: dynamic_array.h:79
Definition: gls_clipping_group.h:80
void SetValue(int spec, va_list &args) DISTI_METHOD_OVERRIDE
void GetClipRegionCorners(Vector &tlc, Vector &trc, Vector &brc, Vector &blc)
bool _showOutline
Outline always visible in editor.
Definition: gls_clipping_group.h:179
void CopyProperties(DisplayObject *src) DISTI_METHOD_OVERRIDE
void SetAvailableAttributes(unsigned int value) DISTI_METHOD_OVERRIDE
void GetCppInterfaceDescriptionFree(InterfaceListType *array) DISTI_METHOD_OVERRIDE
void Blc(const Vector &value)
Vector Blc()
Definition: gls_clipping_group.h:137
Vector Trc()
Definition: gls_clipping_group.h:145
Vector _blc
Bottom Left Corner.
Definition: gls_clipping_group.h:177
static DisplayObject * CreateInstance()
void Draw() DISTI_METHOD_OVERRIDE
bool _clippingActive
Whether or not to call clipping is active.
Definition: gls_clipping_group.h:176
bool ClippingActive()
Definition: gls_clipping_group.h:129
bool ShowOutline()
Definition: gls_clipping_group.h:153
virtual DisplayObject * Pick3D(const Vector &winLoc, const Vector &logicalCoords, float scale, const Vector &directionVector, Vector &collisionWinLoc, const OpenGLMatrices &drawnMatrices) DISTI_METHOD_OVERRIDE
void ClippingActive(bool value)
DisplayObject * CloneObject(bool generateNames=false) DISTI_METHOD_OVERRIDE
void ShowOutline(bool value)
void Trc(const Vector &value)
InterfaceListType * GetCppInterfaceDescription(InterfaceListType *addToThisList=NULL) DISTI_METHOD_OVERRIDE
Vector _trc
Top Right Corner.
Definition: gls_clipping_group.h:178
Definition: gls_glo_file.h:1241
Definition: group.h:52
Class to contain current OpenGL view, projection and draw matrices.
Definition: util.h:540
Definition: vertex.h:84
The gls_auto_lib.
#define GLSGEN_GLSCLIPPINGGROUP_EXPORT
Provides support for creating DLLs.
Definition: gls_clipping_group.h:53
#define DISTI_DEPRECATED(msg)
Defines whether this compiler supports the C++14 deprecated attribute.
Definition: gls_cpp_lang_support.h:487
#define DISTI_METHOD_OVERRIDE
Macro to wrap the override keyword, removed on compilers that don't support it.
Definition: gls_cpp_lang_support.h:221
The disti::Group class. Implements groups of objects.
Definition: bmpimage.h:46