GL Studio C++ Runtime API
gls_clipping_group.h
Go to the documentation of this file.
1/*! \file
2 \brief The disti::GlsClippingGroup class.
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
14reproduced, in whole or part, in any form, or by any means of electronic,
15mechanical, or otherwise, without the written permission of DiSTI. Said
16permission may be derived through the purchase of applicable DiSTI product
17licenses which detail the distribution rights of this content and any
18Derivative Works based on this or other copyrighted DiSTI Software.
19
20 NO WARRANTY. THE SOFTWARE IS PROVIDED "AS-IS," WITHOUT WARRANTY OF ANY KIND,
21AND ANY USE OF THIS SOFTWARE PRODUCT IS AT YOUR OWN RISK. TO THE MAXIMUM EXTENT
22PERMITTED BY APPLICABLE LAW, DISTI AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES
23AND CONDITIONS, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
24IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY AND/OR FITNESS FOR A
25PARTICULAR PURPOSE, TITLE, AND NON-INFRINGEMENT, WITH REGARD TO THE SOFTWARE.
26
27 LIMITATION OF LIABILITY. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW,
28IN NO EVENT SHALL DISTI OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
29INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION,
30DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS
31INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR
32INABILITY TO USE THE SOFTWARE, EVEN IF DISTI HAS BEEN ADVISED OF THE POSSIBILITY
33OF SUCH DAMAGES. DISTI'S ENTIRE LIABILITY AND YOUR EXCLUSIVE REMEDY SHALL NOT
34EXCEED FIVE DOLLARS (US$5.00).
35
36 The aforementioned terms and restrictions are governed by the laws of the
37State of Florida and the United States of America.
38
39*/
40
41#ifndef INCLUDED_GLS_CLIPPING_GROUP_H
42#define INCLUDED_GLS_CLIPPING_GROUP_H
43
44#include "group.h"
45
46/// Provides support for creating DLLs.
47#if( defined( GLSGEN_EXPORT_GLSCLIPPINGGROUP ) || defined( GLSGEN_IMPORT_GLSCLIPPINGGROUP ) || defined( GLS_EXPORT_GENERATED ) || defined( GLS_IMPORT_GENERATED ) ) \
48 && defined( _MSC_VER )
49# if defined( GLSGEN_EXPORT_GLSCLIPPINGGROUP ) || defined( GLS_EXPORT_GENERATED )
50# define GLSGEN_GLSCLIPPINGGROUP_EXPORT __declspec( dllexport )
51# else
52# define GLSGEN_GLSCLIPPINGGROUP_EXPORT __declspec( dllimport )
53# endif
54#else
55# define GLSGEN_GLSCLIPPINGGROUP_EXPORT
56#endif
57///////////////////////////////////////////////////////////////////////////////
58
59/// Automatically link the runtime library plugin (on Windows).
60#define LIB_BASE_NAME "gls_clipping_group"
61#include "gls_auto_lib.h"
62#undef LIB_BASE_NAME
63
64namespace disti
65{
66#ifdef GLES
67class GlsGloFile;
68#endif
69
70// SetValue enumerations
71enum
72{
73 GLS_CLIPPING_GROUP_STATE = GLS_LAST_INITIALIZER + 1,
74 GLS_CLIPPING_GROUP_CLIPPING_ACTIVE,
75 GLS_CLIPPING_GROUP_BOTTOM_LEFT_CORNER,
76 GLS_CLIPPING_GROUP_TOP_RIGHT_CORNER,
77 GLS_CLIPPING_GROUP_SHOW_OUTLINE
78};
79
80/** Runtime implementation of a GlsClippingGroup */
81class GlsClippingGroup : public Group
82{
83public:
84 friend class GlsClippingGroupEditor;
85 DISTI_DEPRECATED( "This identifier is forbidden by the C++ standard. Use BaseClass instead." )
86 typedef Group _BaseClass; ///< Deprecated typedef for the base class.
87 typedef Group BaseClass; ///< Typedef for the base class.
88
89 /** Construct a new GlsClippingGroup.
90 * \param generateInstance Whether or not to generate an instance name for this clipping group
91 */
92 GLSGEN_GLSCLIPPINGGROUP_EXPORT explicit GlsClippingGroup( bool generateInstance = false );
93
94 /** Copy an existing clipping group's properties and clone its children to construct a new clipping group.
95 * \param clippingGroup The clipping group whose properties to copy and whose children to clone.
96 * \param generateInstance Whether or not to generate an instance name for this clipping group
97 */
98 GLSGEN_GLSCLIPPINGGROUP_EXPORT GlsClippingGroup( const GlsClippingGroup& clippingGroup, bool generateInstance );
99
100 /** Destructs a GlsClippingGroup object */
102
103 /// \return A pointer to a new GlsClippingGroup object.
105
109
110#ifndef GLES
113#endif
114
116
118 const Vector& logicalCoords,
119 float scale,
120 const Vector& directionVector,
121 Vector& collisionWinLoc /*Returned*/,
122 const OpenGLMatrices& drawnMatrices ) DISTI_METHOD_OVERRIDE;
123
124 virtual GLSGEN_GLSCLIPPINGGROUP_EXPORT void SetValue( int spec, va_list& args ) DISTI_METHOD_OVERRIDE;
125
126 //////////////////////////////////////////////////
127 // GlsClippingGroup specific operations
128 //////////////////////////////////////////////////
129
130 /** \return If clipping is active for this group */
132
133 /** Sets if clipping is active for this group
134 * \param value The new clipping value
135 */
137
138 /** \return Gets bottom left corner of clip region */
140
141 /** Sets new bottom left corner for the clip region
142 * \param value The new blc
143 */
145
146 /** \return Gets top right corner of clip region */
148
149 /** Sets new top right corner for the clip region
150 * \param value The new trc
151 */
153
154 /** \return If clip region should always be drawn in the editor */
156
157 /** Sets if clip region should always be drawn in the editor
158 * \param value The new show value
159 */
161
162protected:
163 /** Get the four corners of the clip region transformed by the current DCS and offset by the group's location
164 * \param tlc [out] receives top left corner
165 * \param trc [out] receives top right corner
166 * \param brc [out] receives bottom right corner
167 * \param blc [out] receives bottom left corner
168 */
170
171#ifdef GLES
172 /** Set a single attribute from the GLO file.
173 * \param data The attribute to set and its associated data.
174 */
176#endif
177
178 bool _clippingActive; ///< Whether or not to call clipping is active.
179 Vector _blc; ///< Bottom Left Corner.
180 Vector _trc; ///< Top Right Corner.
181 bool _showOutline; ///< Outline always visible in editor.
182
183private:
184 // Deleted copy assignment; use CloneObject() or the copy constructor instead.
185 void operator=( const GlsClippingGroup& ); // = delete
186};
187
188} // namespace disti
189
190#endif
Definition: display.h:96
Definition: dynamic_array.h:79
Definition: gls_clipping_group.h:82
virtual InterfaceListType * GetCppInterfaceDescription(InterfaceListType *addToThisList=NULL) DISTI_METHOD_OVERRIDE
virtual void SetAvailableAttributes(unsigned int value) DISTI_METHOD_OVERRIDE
virtual void Draw() DISTI_METHOD_OVERRIDE
virtual void GetCppInterfaceDescriptionFree(InterfaceListType *array) 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:181
virtual DisplayObject * CloneObject(bool generateNames=false) DISTI_METHOD_OVERRIDE
virtual void SetValue(int spec, va_list &args) DISTI_METHOD_OVERRIDE
void Blc(const Vector &value)
Vector Blc()
Definition: gls_clipping_group.h:139
Vector Trc()
Definition: gls_clipping_group.h:147
Vector _blc
Bottom Left Corner.
Definition: gls_clipping_group.h:179
static DisplayObject * CreateInstance()
bool _clippingActive
Whether or not to call clipping is active.
Definition: gls_clipping_group.h:178
bool ClippingActive()
Definition: gls_clipping_group.h:131
bool ShowOutline()
Definition: gls_clipping_group.h:155
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)
virtual void CopyProperties(DisplayObject *src) DISTI_METHOD_OVERRIDE
void ShowOutline(bool value)
void Trc(const Vector &value)
Vector _trc
Top Right Corner.
Definition: gls_clipping_group.h:180
Definition: gls_glo_file.h:1243
Definition: group.h:53
Class to contain current OpenGL view, projection and draw matrices.
Definition: util.h:544
Definition: vertex.h:85
The gls_auto_lib.
#define GLSGEN_GLSCLIPPINGGROUP_EXPORT
Provides support for creating DLLs.
Definition: gls_clipping_group.h:55
#define DISTI_DEPRECATED(msg)
Defines whether this compiler supports the C++14 deprecated attribute.
Definition: gls_cpp_lang_support.h:457
#define DISTI_METHOD_OVERRIDE
Macro to wrap the override keyword, removed on compilers that don't support it.
Definition: gls_cpp_lang_support.h:214
The disti::Group class. Implements groups of objects.
Force inclusion of the DirectShow library.
Definition: bmpimage.h:47