| GL Studio C++ Runtime API

gls_multi_view.h
Go to the documentation of this file.
1/*! \file
2 \brief The disti::GlsMultiView 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
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 INCLUDED_DISTI_GLS_MULTI_VIEW_H
41#define INCLUDED_DISTI_GLS_MULTI_VIEW_H
42
43#include "display_types.h"
44#include "gls_eyepoint.h"
45#include "group.h"
46
47/// Automatically link the runtime library plugin (on Windows).
48#define LIB_BASE_NAME "gls_multi_view"
49#include "gls_auto_lib.h"
50#undef LIB_BASE_NAME
51
52/// Provides support for creating DLLs.
53#if( defined( GLSGEN_EXPORT_GlsMultiView ) || defined( GLSGEN_IMPORT_GlsMultiView ) || defined( GLS_EXPORT_GENERATED ) || defined( GLS_IMPORT_GENERATED ) ) \
54 && defined( _MSC_VER )
55# if defined( GLSGEN_EXPORT_GlsMultiView ) || defined( GLS_EXPORT_GENERATED )
56# define GLSGEN_GlsMultiView_EXPORT __declspec( dllexport )
57# else
58# define GLSGEN_GlsMultiView_EXPORT __declspec( dllimport )
59# endif
60#else
61# define GLSGEN_GlsMultiView_EXPORT
62#endif
63///////////////////////////////////////////////////////////////////////////////
64
65 namespace disti
66{
67// SetValue enumerations
68 enum
69{
70 GLS_GLSMULTIVIEW_FIRST_VALUE = GLS_LAST_INITIALIZER + 1,
71 GLS_GLSMULTIVIEW_VIEW_DATA,
72 GLS_GLSMULTIVIEW_VIEW_DRAWING_STATE
73};
74 class ComponentLightMgr;
75
76/** Runtime implementation of GlsMultiView */
77 class GlsMultiView : public Group
78{
79 friend class GlsMultiViewEditor;
80
81 public:
82 DISTI_DEPRECATED( "This identifier is forbidden by the C++ standard. Use BaseClass instead." )
83 typedef Group _BaseClass; ///< Deprecated typedef for the base class.
84 typedef Group BaseClass; ///< Typedef for the base class.
85
86 /** Create a new GlsMultiView.
87 * \param generateInstance Whether or not to generate an instance name
88 * for this inputdevice */
89 GLSGEN_GlsMultiView_EXPORT GlsMultiView( int generateInstance = FALSE );
90
91 /// Copy constructor
92 /// \param that The object to copy from.
93 /// \param generateNames Whether or not to generate an instance name.
94 GLSGEN_GlsMultiView_EXPORT GlsMultiView( const GlsMultiView& that, const bool generateNames );
95
96 /** GlsMultiView deconstructor */
97 virtual GLSGEN_GlsMultiView_EXPORT ~GlsMultiView();
98
99 /// \return A pointer to a new GlsMultiView object.
100 static GLSGEN_GlsMultiView_EXPORT DisplayObject* CreateInstance();
101
102 virtual GLSGEN_GlsMultiView_EXPORT void SetAvailableAttributes( unsigned int value ) DISTI_METHOD_OVERRIDE;
103 virtual GLSGEN_GlsMultiView_EXPORT DisplayObject* CloneObject( bool generateNames = FALSE ) DISTI_METHOD_OVERRIDE;
104 virtual GLSGEN_GlsMultiView_EXPORT void PreDraw( const OpenGLMatrices& parentMatrices, Culler& culler ) DISTI_METHOD_OVERRIDE;
105 virtual GLSGEN_GlsMultiView_EXPORT void Draw() DISTI_METHOD_OVERRIDE;
106 virtual GLSGEN_GlsMultiView_EXPORT void CopyProperties( DisplayObject* src ) DISTI_METHOD_OVERRIDE;
107
108#ifndef GLES
109 virtual GLSGEN_GlsMultiView_EXPORT InterfaceListType* GetCppInterfaceDescription( InterfaceListType* addToThisList = NULL ) DISTI_METHOD_OVERRIDE;
110 virtual GLSGEN_GlsMultiView_EXPORT void GetCppInterfaceDescriptionFree( InterfaceListType* array ) DISTI_METHOD_OVERRIDE;
111#endif
112
113 virtual GLSGEN_GlsMultiView_EXPORT DisplayObject* Pick3D( const Vector& winLoc,
114 const Vector& logicalCoords,
115 float scale,
116 const Vector& directionVector,
117 Vector& collisionWinLoc, /*Returned*/
118 const OpenGLMatrices& drawnMatrices ) DISTI_METHOD_OVERRIDE;
119
120 virtual GLSGEN_GlsMultiView_EXPORT DisplayObject* handle( DisplayEvent* ev ) DISTI_METHOD_OVERRIDE;
121 virtual GLSGEN_GlsMultiView_EXPORT DistiAttributeBase& Resource( const char* name ) DISTI_METHOD_OVERRIDE;
122 virtual GLSGEN_GlsMultiView_EXPORT void GetResources( std::ostream& outstr, GlsResourceFilter* filter = NULL ) DISTI_METHOD_OVERRIDE;
123 virtual GLSGEN_GlsMultiView_EXPORT void SetValue( int spec, va_list& args ) DISTI_METHOD_OVERRIDE;
124
125 //////////////////////////////////////////////////
126 // Object specific operations
127 //////////////////////////////////////////////////
128
129 /// \details The ClearBackgroundEnum enumeration. Describes how the background for a given view will be cleared.
130 enum
131 {
132 CLEAR_BG_OFF = 0,
133 CLEAR_BG_DEPTH_AND_COLOR = 1,
134 CLEAR_BG_DEPTH = 2,
135 CLEAR_BG_COLOR = 3
136 } ClearBackgroundEnum;
137
138 /// \details The ViewData class. Describes a single view within GlsMultiView.
139 class ViewData : virtual public AttributeChangedNotifier
140 {
141 friend class GlsMultiView;
142 friend class GlsMultiViewEditor;
143
144 float _bottom; ///< The bottom edge of the view from 0.0 to 1.0, or in pixels if _absolutePixels is true.
145 float _left; ///< The left edge of the view from 0.0 to 1.0, or in pixels if _absolutePixels is true.
146 float _top; ///< The top edge of the view from 0.0 to 1.0, or in pixels if _absolutePixels is true.
147 float _right; ///< The right edge of the view from 0.0 to 1.0, or in pixels if _absolutePixels is true.
148 bool _absolutePixels; ///< If true, the corners are defined in screen space pixels, otherwise is the portion of the screen from 0.0 to 1.0.
149 GlsEyePoint* _eyepoint; ///< The associated eyepoint for this view, can be NULL. In this case the parent's view is used.
150 std::string _desiredEyePoint; ///< The optional name of the eyepoint to associate to this view.
151 int _clearBackground; ///< Defines the clear behavior for this view, \see ClearBackgroundEnum.
152 bool _pickGeometry; ///< If true, allows the view itself to be picked.
153 bool _visible; ///< If true, this view will be drawn.
154 bool _pickable; ///< If true, geometry within the view can be picked.
155
156 DistiAttribDict _attribDict; ///< The attribute dictionary holding the members of this class.
157 GlsMatrixType* _modelMatrix; ///< The modelview matrix associated with this view.
158 GlsMatrixType* _projMatrix; ///< The projection matrix associated with this view.
159 int* _viewPort; ///< The viewport associated with this view.
160 bool _cullerVal; ///< The state of the incoming Culler object, used in PreDraw.
161
162 GlsMultiView* _multiView; ///< Parent pointer, back to the associated GlsMultiView object.
163
164 /// \note For public access, use GetEyePoint(). It requires an object pointer.
165 /// \return The pointer to the eyepoint for this view.
166 GlsEyePoint* EyePoint();
167
168 /// Set the associated parent GlsMultiView for this view.
169 /// \param view The new parent object to set.
170 void SetMultiview( GlsMultiView* view );
171
172 /// Initializes the attribute dictionary for this object, associating member variables.
173 void InitAttributes();
174
175 public:
176 GLSGEN_GlsMultiView_EXPORT ViewData();
177
178 /// Copy constructor
179 GLSGEN_GlsMultiView_EXPORT ViewData( const ViewData& );
180
181 GLSGEN_GlsMultiView_EXPORT ~ViewData();
182
183 /// Assignment operator
184 /// \return The resulting object (this).
185 GLSGEN_GlsMultiView_EXPORT const ViewData& operator=( const ViewData& );
186
187 /// Copies the baseline data from the other view object.
188 /// This does not include derived or cached values (like matrices / object pointers).
189 /// \param other The object to copy from.
190 GLSGEN_GlsMultiView_EXPORT void CopyBaseData( const ViewData& other );
191
192 /// \return The attribute dictionary for this view.
193 DistiAttribDict& Attributes() { return _attribDict; };
194
195 virtual GLSGEN_GlsMultiView_EXPORT void NotifyAttributeChanged( const AttributeName& name ) DISTI_METHOD_OVERRIDE;
196
197 /// Sets the Screen Rectangle
198 /// The screen rect is specified in 0.0-1.0 as a ratio of the available viewport
199 /// e.g. 0.0, 0.0, 1.0, 1.0 uses the full screen.
200 /// \param bottom The bottom corner of the view rectangle.
201 /// \param left The left corner of the view rectangle.
202 /// \param top The top corner of the view rectangle.
203 /// \param right The right corner of the view rectangle.
204 GLSGEN_GlsMultiView_EXPORT void SetScreenRect( float bottom, float left, float top, float right );
205
206 /// Returns the current screen rectangle.
207 /// \param bottom The returned bottom corner of the view rectangle.
208 /// \param left The returned left corner of the view rectangle.
209 /// \param top The returned top corner of the view rectangle.
210 /// \param right The returned right corner of the view rectangle.
211 GLSGEN_GlsMultiView_EXPORT void GetScreenRect( float* bottom, float* left, float* top, float* right ) const;
212
213 /// Set the bottom value.
214 GLSGEN_GlsMultiView_EXPORT void Bottom( const float& );
215
216 /// \return The bottom value.
217 GLSGEN_GlsMultiView_EXPORT float Bottom() const;
218
219 /// Set the left value.
220 GLSGEN_GlsMultiView_EXPORT void Left( const float& );
221
222 /// \return The left value.
223 GLSGEN_GlsMultiView_EXPORT float Left() const;
224
225 /// Set the top value.
226 GLSGEN_GlsMultiView_EXPORT void Top( const float& );
227
228 /// \return The top value.
229 GLSGEN_GlsMultiView_EXPORT float Top() const;
230
231 /// Set the right value.
232 GLSGEN_GlsMultiView_EXPORT void Right( const float& );
233
234 /// \return The right value.
235 GLSGEN_GlsMultiView_EXPORT float Right() const;
236
237 /// Set the absolute pixels flag.
238 /// When true, the Left-Right-Top-Bottom values are interpreted
239 /// as pixel coordinates, otherwise they are percentage of screen space.
240 GLSGEN_GlsMultiView_EXPORT void AbsolutePixels( const bool& );
241
242 /// Get the absolute pixels flag.
243 /// When true, the Left-Right-Top-Bottom values are interpreted
244 /// as pixel coordinates, otherwise they are percentage of screen space.
245 /// \return the current absolute pixels flag
246 GLSGEN_GlsMultiView_EXPORT bool AbsolutePixels() const;
247
248 /// Sets the eyepoint to view from. When NULL, the parent view is used.
249 GLSGEN_GlsMultiView_EXPORT void EyePoint( GlsEyePoint* );
250
251 /// Sets the clear background mode
252 /// 0 == Don't Clear; 1 == Clear both; 2 == Depth only; 3 == Color only
253 /// \sa ClearBackgroundEnum
254 GLSGEN_GlsMultiView_EXPORT void ClearBackground( const int& );
255
256 /// \return The clear background mode.
257 GLSGEN_GlsMultiView_EXPORT int ClearBackground() const;
258
259 /// Sets the pick geometry flag
260 /// When true, the geometry will be traversed with Pick3D in this view.
261 GLSGEN_GlsMultiView_EXPORT void PickGeometry( const bool& );
262
263 /// \return The pick geometry flag.
264 GLSGEN_GlsMultiView_EXPORT bool PickGeometry() const;
265
266 /// Set the visibility of this view .
267 GLSGEN_GlsMultiView_EXPORT void Visible( bool );
268
269 /// \return The visibility of this view.
270 GLSGEN_GlsMultiView_EXPORT bool Visible() const;
271
272 /// Set if this view is pickable.
273 /// If true, and PickGeometry() is false, the view area will be picked.
274 GLSGEN_GlsMultiView_EXPORT void Pickable( bool );
275
276 /// \return The pickability of this view.
277 GLSGEN_GlsMultiView_EXPORT bool Pickable() const;
278
279 /// Set the name of the view's eyepoint.
280 GLSGEN_GlsMultiView_EXPORT void DesiredEyePoint( const GlsPropString& );
281
282 /// \return The name of the view's eyepoint.
283 GLSGEN_GlsMultiView_EXPORT GlsPropString DesiredEyePoint() const;
284
285 /// Finds the eyepoint or returns a previously found one.
286 /// It will be based on the _desiredEyePoint.
287 /// \param heirarchiedObject The point in the hierarchy to start searching for the eyepoint.
288 /// \return A pointer to the found eyepoint, else NULL.
289 GLSGEN_GlsMultiView_EXPORT GlsEyePoint* GetEyePoint( const DisplayObject* heirarchiedObject );
290
291 /// Forces eyepoint reload, causes the multi view to trigger a redraw.
292 GLSGEN_GlsMultiView_EXPORT void ForceEyePointReload();
293
294 /// \return the cached OpenGL matrices from the previous frame's draw
295 GLSGEN_GlsMultiView_EXPORT OpenGLMatrices SavedMatrices() const;
296 };
297
298 typedef DynamicArray<ViewData> ViewDataArray; ///< Shorthand typedef for a list of views.
299
300 /// \details The ViewDrawStateEnum enumeration. Describes the drawing behavior for the multi view.
301 typedef enum
302 {
303 GEOMETRY_ONLY = 0,
304 GEOMETRY_AND_VIEWS,
305 VIEWS_ONLY
306 } ViewDrawStateEnum;
307
308 /// Set the ViewDrawingState.
309 GLSGEN_GlsMultiView_EXPORT void ViewDrawingState( ViewDrawStateEnum );
310
311 /// \return the ViewDrawingState
312 GLSGEN_GlsMultiView_EXPORT ViewDrawStateEnum ViewDrawingState();
313
314 /** Returns the number of views
315 * \return The view count
316 */
317 GLSGEN_GlsMultiView_EXPORT unsigned int ViewCount() const;
318
319 /// Returns a reference to the specified View object
320 /// Creates it (and all views with a lower id) if it doesn't exist
321 /// \param viewNumber The index of the view to return.
322 /// \return The associated view.
323 GLSGEN_GlsMultiView_EXPORT ViewData& View( unsigned int viewNumber );
324
325 /// \return A reference to the array containing the Views.
326 GLSGEN_GlsMultiView_EXPORT ViewDataArray& ViewArray();
327
328 /// Return the integer id of the last view that was picked or
329 /// -1 if no view has been picked yet or if the GlsMultiview
330 /// was picked because it is set to PICK_ALWAYS.
331 /// \return The id of the last view that was picked.
332 GLSGEN_GlsMultiView_EXPORT int LastViewPicked() const;
333
334 /** Set the value for _emitViewDrawEvents
335 * When true, an object event is emitted at the start and
336 * end the draw of each view.
337 * VIEW_DRAW_BEGIN and VIEW_DRAW_END
338 * The data of the event is the view index.
339 *
340 * These events are currently EXPERIMENTAL and may be removed or
341 * changed in a future release. They are not accessable from the
342 * plugin GUI for this reason.
343 */
344 GLSGEN_GlsMultiView_EXPORT void EmitViewDrawEvents( const bool& );
345
346 /// \return The value for _emitViewDrawEvents.
347 GLSGEN_GlsMultiView_EXPORT bool EmitViewDrawEvents() const;
348
349 /// Draws the given view.
350 /// \note Not normally called by users.
351 /// \param viewNumber The index of the view to draw.
352 /// \param view The view data of the view to draw.
353 GLSGEN_GlsMultiView_EXPORT void DrawView( unsigned int viewNumber, ViewData* view );
354
355 protected:
356 /// Calculate the matrices that are used for drawing the given view.
357 /// This method is called during the PreDraw, then the matrices
358 /// are used to setup the geometry for the Draw and Pick3D later.
359 /// \note Not normally called by users.
360 /// \param parentMatrices The initial matrix state at the parent view.
361 /// \param culler The intial culler state at the parent view.
362 /// \param view The view to calculate matrices for.
363 GLSGEN_GlsMultiView_EXPORT void CalculateViewMatrices( const OpenGLMatrices& parentMatrices, Culler& culler, GlsMultiView::ViewData* view ) const;
364
365 /// Applies the matrices for the given view to the geometry in preparation for a pick or draw.
366 /// \note Not normally called by users.
367 /// \param viewNumber The number of the last view predraw or -1 if predraw used parent's view.
368 /// \param view The view data to predraw for.
369 /// \return True if the predraw was successful (view data is valid).
370 GLSGEN_GlsMultiView_EXPORT bool PreDrawGeometryForView( int viewNumber, ViewData* view );
371
372 /// Forces a recalculation of parent lighting based on the current view.
373 /// \note Not normally called by users.
374 /// \param view The view to be used when calling ComponentLightMgr::ReapplyLightsForEyePoint().
375 GLSGEN_GlsMultiView_EXPORT void ReapplyGlobalLightsForView( ViewData* view );
376
377#ifdef GLES
378 /** Set a single attribute from the GLO file.
379 * \param data The attribute to set and its associated data.
380 */
381 GLSGEN_GlsMultiView_EXPORT virtual void SetFromGloData( GlsGloFileAttribute& data ) DISTI_METHOD_OVERRIDE;
382#endif
383
384 ViewDrawStateEnum _viewDrawingState; ///< The drawing behavior for the multi view, generally VIEWS_ONLY.
385 ViewDataArray _viewArray; ///< The list of all views associated with this multi view.
386 ViewData _mainViewData; ///< The main (parent) view used for drawing geometry based views.
387 int _lastViewPicked; ///< The index of the last view picked, or -1 if the main view.
388 int _lastViewPredraw; ///< The index of the last view predraw or -1 if predraw used parent's view.
389
390 bool _showHighlights; ///< Used by the editor to turn on and off highlights.
391 int _highlightView; ///< Used by the editor to highlight a specific view. -1 is none.
392
393 bool _emitViewDrawEvents; ///< If true, will emit VIEW_DRAW_BEGIN / VIEW_DRAW_END object events on draw.
394
395 ComponentLightMgr* _multiViewLightMgr; ///< Our very own light manager.
396 bool _childLightsAffectGlobal; ///< Calculated internally based on if geometry is drawn.
397
398 GlsMatrixType _savedProjectionMatrix; ///< Stores the projection matrix from PreDraw for restoring after DrawView
399
400 private:
401 void OnViewDataChanged();
402 void OnViewDrawingStateChanged();
403 void OnViewArrayChange();
404
405 void DummySetInt( const int& ) {} // Used for making a read only property
406 GlsMultiView& operator=( const GlsMultiView& ) DISTI_SPECIAL_MEM_FUN_DELETE;
407 GlsMultiView( const GlsMultiView& ) DISTI_SPECIAL_MEM_FUN_DELETE;
408};
409
410/// \details The DistiAttributeViewDataArray class. Allows access to GlsMultiView::ViewData through the resource interface.
411 class DistiAttributeViewDataArray : public DistiAttributeBase
412{
413 GlsMultiView::ViewDataArray& _array; ///< Observing reference to underlying view data storage.
414
415 public:
416 /// Constructor, uses existing storage
417 /// \param caller The callback to call when this attribute changes.
418 /// \param name The name of the attribute.
419 /// \param array The existing view data storage.
420 DistiAttributeViewDataArray( CallbackMethodCallerBase* caller, AttributeName name, GlsMultiView::ViewDataArray& array )
421 : DistiAttributeBase( caller, name, false )
422 , _array( array )
423 {
424 }
425
426 /// Assignment operator
427 /// \param oldClass The object to copy from.
428 /// \return The resulting object (this).
429 DistiAttributeBase& operator=( const DistiAttributeBase& oldClass ) DISTI_METHOD_OVERRIDE
430 {
431 const DistiAttributeViewDataArray* ptr;
432 if( ( ptr = dynamic_cast<const DistiAttributeViewDataArray*>( &oldClass ) ) )
433 {
434 // Copy array contents directly
435 _array = ptr->_array;
436 CallCallback();
437 }
438 else
439 {
440 // Copy by string value
441 return DistiAttributeBase::operator=( oldClass );
442 }
443 return *this;
444 }
445
446 std::istream& ReadValue( std::istream& instr ) DISTI_METHOD_OVERRIDE
447 {
448 // Scan through the token including the ':'
449 std::string buf;
450
451 // read through opening brace
452 instr.ignore( 1024, '{' );
453
454 // Clear the array before reading
455 _array.Clear();
456
457 while( DistiAttribDict::ScanToken( instr, buf ) )
458 {
459 if( buf.length() )
460 {
461 int index;
462 index = atoi( buf.c_str() );
463
464 // Eat the space between the : and the data
465 instr.get();
466 instr.ignore( 1024, '{' );
467
468 // This eats the closing brace
469 _array[ index ].Attributes().Read( instr );
470 }
471 }
472 CallCallback();
473
474 return instr;
475 }
476
477 std::ostream& WriteValue( std::ostream& outstr ) DISTI_METHOD_OVERRIDE
478 {
479 outstr << "\n"
480 << DistiAttribDict::SpacingString() << "{"
481 << "\n";
482 DistiAttribDict::SpacingInc();
483
484 for( unsigned int i = 0; i < _array.Count(); i++ )
485 {
486 outstr << DistiAttribDict::SpacingString() << i << ":\n";
487 outstr << DistiAttribDict::SpacingString() << "{\n";
488 DistiAttribDict::SpacingInc();
489
490 _array[ i ].Attributes().Write( outstr );
491
492 DistiAttribDict::SpacingDec();
493 outstr << DistiAttribDict::SpacingString() << "}\n";
494 }
495 DistiAttribDict::SpacingDec();
496 outstr << DistiAttribDict::SpacingString() << "}";
497 return outstr;
498 }
499
500 std::string Type() const DISTI_METHOD_OVERRIDE
501 {
502 return Demangle<GlsMultiView::ViewDataArray>();
503 }
504};
505
506} // namespace disti
507
508#endif
disti::AttributeChangedNotifier
Definition: disti_metadata.h:521
disti::AttributeName
Definition: disti_metadata.h:87
disti::CallbackMethodCallerBase
Definition: callback_caller_base.h:56
disti::ComponentLightMgr
Definition: component_light_mgr.h:56
disti::Culler
Definition: cull.h:50
disti::DisplayEvent
Definition: events.h:113
disti::DisplayObject
Definition: display.h:96
disti::DistiAttribDict
Definition: disti_metadata.h:750
disti::DistiAttribDict::ScanToken
static bool ScanToken(std::istream &instr, std::string &result)
disti::DistiAttribDict::SpacingInc
static void SpacingInc()
disti::DistiAttribDict::SpacingDec
static void SpacingDec()
disti::DistiAttribDict::SpacingString
static std::string SpacingString()
disti::DistiAttributeBase
Definition: disti_metadata.h:220
disti::DistiAttributeBase::CallCallback
virtual void CallCallback()
Calls callback CallType3 if it has been set.
disti::DistiAttributeBase::operator=
virtual DistiAttributeBase & operator=(const DistiAttributeBase &oldClass)
disti::DistiAttributeViewDataArray
Definition: gls_multi_view.h:412
disti::DistiAttributeViewDataArray::WriteValue
std::ostream & WriteValue(std::ostream &outstr) DISTI_METHOD_OVERRIDE
Definition: gls_multi_view.h:477
disti::DistiAttributeViewDataArray::DistiAttributeViewDataArray
DistiAttributeViewDataArray(CallbackMethodCallerBase *caller, AttributeName name, GlsMultiView::ViewDataArray &array)
Definition: gls_multi_view.h:420
disti::DistiAttributeViewDataArray::operator=
DistiAttributeBase & operator=(const DistiAttributeBase &oldClass) DISTI_METHOD_OVERRIDE
Definition: gls_multi_view.h:429
disti::DistiAttributeViewDataArray::ReadValue
std::istream & ReadValue(std::istream &instr) DISTI_METHOD_OVERRIDE
Definition: gls_multi_view.h:446
disti::DistiAttributeViewDataArray::Type
std::string Type() const DISTI_METHOD_OVERRIDE
Definition: gls_multi_view.h:500
disti::DynamicArray
Definition: dynamic_array.h:79
disti::DynamicArray::Count
unsigned Count() const
Definition: dynamic_array.h:218
disti::DynamicArray::Clear
void Clear()
Definition: dynamic_array.h:253
disti::GlsEyePoint
Definition: gls_eyepoint.h:117
disti::GlsGloFileAttribute
Definition: gls_glo_file.h:1243
disti::GlsMatrixAffine< double >
disti::GlsMultiView::ViewData
Definition: gls_multi_view.h:140
disti::GlsMultiView::ViewData::EyePoint
void EyePoint(GlsEyePoint *)
Sets the eyepoint to view from. When NULL, the parent view is used.
disti::GlsMultiView::ViewData::Bottom
float Bottom() const
disti::GlsMultiView::ViewData::Pickable
bool Pickable() const
disti::GlsMultiView::ViewData::AbsolutePixels
bool AbsolutePixels() const
disti::GlsMultiView::ViewData::ClearBackground
int ClearBackground() const
disti::GlsMultiView::ViewData::ForceEyePointReload
void ForceEyePointReload()
Forces eyepoint reload, causes the multi view to trigger a redraw.
disti::GlsMultiView::ViewData::NotifyAttributeChanged
virtual void NotifyAttributeChanged(const AttributeName &name) DISTI_METHOD_OVERRIDE
disti::GlsMultiView::ViewData::Bottom
void Bottom(const float &)
Set the bottom value.
disti::GlsMultiView::ViewData::SavedMatrices
OpenGLMatrices SavedMatrices() const
disti::GlsMultiView::ViewData::SetScreenRect
void SetScreenRect(float bottom, float left, float top, float right)
disti::GlsMultiView::ViewData::ClearBackground
void ClearBackground(const int &)
disti::GlsMultiView::ViewData::operator=
const ViewData & operator=(const ViewData &)
disti::GlsMultiView::ViewData::Right
void Right(const float &)
Set the right value.
disti::GlsMultiView::ViewData::ViewData
ViewData(const ViewData &)
Copy constructor.
disti::GlsMultiView::ViewData::Left
void Left(const float &)
Set the left value.
disti::GlsMultiView::ViewData::DesiredEyePoint
GlsPropString DesiredEyePoint() const
disti::GlsMultiView::ViewData::PickGeometry
bool PickGeometry() const
disti::GlsMultiView::ViewData::Top
float Top() const
disti::GlsMultiView::ViewData::Visible
void Visible(bool)
Set the visibility of this view .
disti::GlsMultiView::ViewData::DesiredEyePoint
void DesiredEyePoint(const GlsPropString &)
Set the name of the view's eyepoint.
disti::GlsMultiView::ViewData::AbsolutePixels
void AbsolutePixels(const bool &)
disti::GlsMultiView::ViewData::Visible
bool Visible() const
disti::GlsMultiView::ViewData::Attributes
DistiAttribDict & Attributes()
Definition: gls_multi_view.h:193
disti::GlsMultiView::ViewData::Top
void Top(const float &)
Set the top value.
disti::GlsMultiView::ViewData::Right
float Right() const
disti::GlsMultiView::ViewData::Left
float Left() const
disti::GlsMultiView::ViewData::GetScreenRect
void GetScreenRect(float *bottom, float *left, float *top, float *right) const
disti::GlsMultiView::ViewData::Pickable
void Pickable(bool)
disti::GlsMultiView::ViewData::PickGeometry
void PickGeometry(const bool &)
disti::GlsMultiView::ViewData::CopyBaseData
void CopyBaseData(const ViewData &other)
disti::GlsMultiView::ViewData::GetEyePoint
GlsEyePoint * GetEyePoint(const DisplayObject *heirarchiedObject)
disti::GlsMultiView
Definition: gls_multi_view.h:78
disti::GlsMultiView::GlsMultiView
GlsMultiView(int generateInstance=FALSE)
disti::GlsMultiView::SetAvailableAttributes
virtual void SetAvailableAttributes(unsigned int value) DISTI_METHOD_OVERRIDE
disti::GlsMultiView::Draw
virtual void Draw() DISTI_METHOD_OVERRIDE
disti::GlsMultiView::ReapplyGlobalLightsForView
void ReapplyGlobalLightsForView(ViewData *view)
disti::GlsMultiView::_savedProjectionMatrix
GlsMatrixType _savedProjectionMatrix
Stores the projection matrix from PreDraw for restoring after DrawView.
Definition: gls_multi_view.h:398
disti::GlsMultiView::PreDrawGeometryForView
bool PreDrawGeometryForView(int viewNumber, ViewData *view)
disti::GlsMultiView::SetFromGloData
virtual void SetFromGloData(GlsGloFileAttribute &data) DISTI_METHOD_OVERRIDE
disti::GlsMultiView::_mainViewData
ViewData _mainViewData
The main (parent) view used for drawing geometry based views.
Definition: gls_multi_view.h:386
disti::GlsMultiView::CloneObject
virtual DisplayObject * CloneObject(bool generateNames=FALSE) DISTI_METHOD_OVERRIDE
disti::GlsMultiView::ViewDrawingState
ViewDrawStateEnum ViewDrawingState()
disti::GlsMultiView::PreDraw
virtual void PreDraw(const OpenGLMatrices &parentMatrices, Culler &culler) DISTI_METHOD_OVERRIDE
disti::GlsMultiView::EmitViewDrawEvents
void EmitViewDrawEvents(const bool &)
disti::GlsMultiView::handle
virtual DisplayObject * handle(DisplayEvent *ev) DISTI_METHOD_OVERRIDE
disti::GlsMultiView::_emitViewDrawEvents
bool _emitViewDrawEvents
If true, will emit VIEW_DRAW_BEGIN / VIEW_DRAW_END object events on draw.
Definition: gls_multi_view.h:393
disti::GlsMultiView::EmitViewDrawEvents
bool EmitViewDrawEvents() const
disti::GlsMultiView::_lastViewPredraw
int _lastViewPredraw
The index of the last view predraw or -1 if predraw used parent's view.
Definition: gls_multi_view.h:388
disti::GlsMultiView::SetValue
virtual void SetValue(int spec, va_list &args) DISTI_METHOD_OVERRIDE
disti::GlsMultiView::_multiViewLightMgr
ComponentLightMgr * _multiViewLightMgr
Our very own light manager.
Definition: gls_multi_view.h:395
disti::GlsMultiView::_viewArray
ViewDataArray _viewArray
The list of all views associated with this multi view.
Definition: gls_multi_view.h:385
disti::GlsMultiView::_highlightView
int _highlightView
Used by the editor to highlight a specific view. -1 is none.
Definition: gls_multi_view.h:391
disti::GlsMultiView::ViewCount
unsigned int ViewCount() const
disti::GlsMultiView::LastViewPicked
int LastViewPicked() const
disti::GlsMultiView::_lastViewPicked
int _lastViewPicked
The index of the last view picked, or -1 if the main view.
Definition: gls_multi_view.h:387
disti::GlsMultiView::ClearBackgroundEnum
enum disti::GlsMultiView::@24 ClearBackgroundEnum
disti::GlsMultiView::CreateInstance
static DisplayObject * CreateInstance()
disti::GlsMultiView::ViewDrawStateEnum
ViewDrawStateEnum
Definition: gls_multi_view.h:302
disti::GlsMultiView::ViewDataArray
DynamicArray< ViewData > ViewDataArray
Shorthand typedef for a list of views.
Definition: gls_multi_view.h:298
disti::GlsMultiView::Resource
virtual DistiAttributeBase & Resource(const char *name) DISTI_METHOD_OVERRIDE
disti::GlsMultiView::View
ViewData & View(unsigned int viewNumber)
disti::GlsMultiView::Pick3D
virtual DisplayObject * Pick3D(const Vector &winLoc, const Vector &logicalCoords, float scale, const Vector &directionVector, Vector &collisionWinLoc, const OpenGLMatrices &drawnMatrices) DISTI_METHOD_OVERRIDE
disti::GlsMultiView::CopyProperties
virtual void CopyProperties(DisplayObject *src) DISTI_METHOD_OVERRIDE
disti::GlsMultiView::DrawView
void DrawView(unsigned int viewNumber, ViewData *view)
disti::GlsMultiView::GetResources
virtual void GetResources(std::ostream &outstr, GlsResourceFilter *filter=NULL) DISTI_METHOD_OVERRIDE
disti::GlsMultiView::_viewDrawingState
ViewDrawStateEnum _viewDrawingState
The drawing behavior for the multi view, generally VIEWS_ONLY.
Definition: gls_multi_view.h:384
disti::GlsMultiView::_showHighlights
bool _showHighlights
Used by the editor to turn on and off highlights.
Definition: gls_multi_view.h:390
disti::GlsMultiView::_childLightsAffectGlobal
bool _childLightsAffectGlobal
Calculated internally based on if geometry is drawn.
Definition: gls_multi_view.h:396
disti::GlsMultiView::ViewDrawingState
void ViewDrawingState(ViewDrawStateEnum)
Set the ViewDrawingState.
disti::GlsMultiView::ViewArray
ViewDataArray & ViewArray()
disti::GlsMultiView::CalculateViewMatrices
void CalculateViewMatrices(const OpenGLMatrices &parentMatrices, Culler &culler, GlsMultiView::ViewData *view) const
disti::GlsPropString
Definition: util.h:1607
disti::GlsResourceFilter
Definition: gls_resources.h:51
disti::Group
Definition: group.h:53
disti::OpenGLMatrices
Class to contain current OpenGL view, projection and draw matrices.
Definition: util.h:544
disti::VertexNoColor
Definition: vertex.h:85
display_types.h
GL Studio Enumerations and constants.
gls_auto_lib.h
The gls_auto_lib.
DISTI_SPECIAL_MEM_FUN_DELETE
#define DISTI_SPECIAL_MEM_FUN_DELETE
Macro to wrap function deletion, removed on compilers that don't support it.
Definition: gls_cpp_lang_support.h:246
DISTI_DEPRECATED
#define DISTI_DEPRECATED(msg)
Defines whether this compiler supports the C++14 deprecated attribute.
Definition: gls_cpp_lang_support.h:488
DISTI_METHOD_OVERRIDE
#define DISTI_METHOD_OVERRIDE
Macro to wrap the override keyword, removed on compilers that don't support it.
Definition: gls_cpp_lang_support.h:222
gls_eyepoint.h
The disti::GlsEyePoint class. Implements eyepoints.
GLSGEN_GlsMultiView_EXPORT
#define GLSGEN_GlsMultiView_EXPORT
Provides support for creating DLLs.
Definition: gls_multi_view.h:61
group.h
The disti::Group class. Implements groups of objects.
disti
Definition: bmpimage.h:47
FALSE
#define FALSE
False macro, for backward compatibility purposes.
Definition: util.h:107