39#ifndef INCLUDED_DISTI_GLS_MULTI_VIEW_H
40#define INCLUDED_DISTI_GLS_MULTI_VIEW_H
47#define LIB_BASE_NAME "gls_multi_view"
52#if( defined( GLSGEN_EXPORT_GlsMultiView ) || defined( GLSGEN_IMPORT_GlsMultiView ) || defined( GLS_EXPORT_GENERATED ) || defined( GLS_IMPORT_GENERATED ) ) \
53 && defined( _MSC_VER )
54# if defined( GLSGEN_EXPORT_GlsMultiView ) || defined( GLS_EXPORT_GENERATED )
55# define GLSGEN_GlsMultiView_EXPORT __declspec( dllexport )
57# define GLSGEN_GlsMultiView_EXPORT __declspec( dllimport )
60# define GLSGEN_GlsMultiView_EXPORT
69 GLS_GLSMULTIVIEW_FIRST_VALUE = GLS_LAST_INITIALIZER + 1,
70 GLS_GLSMULTIVIEW_VIEW_DATA,
71 GLS_GLSMULTIVIEW_VIEW_DRAWING_STATE
73class ComponentLightMgr;
78 friend class GlsMultiViewEditor;
81 DISTI_DEPRECATED(
"This identifier is forbidden by the C++ standard. Use BaseClass instead." )
113 const Vector& logicalCoords,
115 const Vector& directionVector,
132 CLEAR_BG_DEPTH_AND_COLOR = 1,
141 friend class GlsMultiViewEditor;
147 bool _absolutePixels;
149 std::string _desiredEyePoint;
150 int _clearBackground;
172 void InitAttributes();
400 void OnViewDataChanged();
401 void OnViewDrawingStateChanged();
402 void OnViewArrayChange();
433 _array = ptr->_array;
450 instr.ignore( 1024,
'{' );
460 index = atoi( buf.c_str() );
464 instr.ignore( 1024,
'{' );
467 _array[ index ].Attributes().Read( instr );
482 for(
unsigned int i = 0; i < _array.
Count(); ++i )
488 _array[ i ].Attributes().Write( outstr );
500 return Demangle<GlsMultiView::ViewDataArray>();
Definition: disti_metadata.h:521
Definition: disti_metadata.h:87
Definition: callback_caller_base.h:55
Definition: component_light_mgr.h:55
Definition: disti_metadata.h:750
static bool ScanToken(std::istream &instr, std::string &result)
static std::string SpacingString()
Definition: disti_metadata.h:220
virtual void CallCallback()
Calls callback CallType3 if it has been set.
virtual DistiAttributeBase & operator=(const DistiAttributeBase &oldClass)
Definition: gls_multi_view.h:410
std::ostream & WriteValue(std::ostream &outstr) DISTI_METHOD_OVERRIDE
Definition: gls_multi_view.h:475
DistiAttributeViewDataArray(CallbackMethodCallerBase *caller, AttributeName name, GlsMultiView::ViewDataArray &array)
Definition: gls_multi_view.h:418
DistiAttributeBase & operator=(const DistiAttributeBase &oldClass) DISTI_METHOD_OVERRIDE
Definition: gls_multi_view.h:427
std::istream & ReadValue(std::istream &instr) DISTI_METHOD_OVERRIDE
Definition: gls_multi_view.h:444
std::string Type() const DISTI_METHOD_OVERRIDE
Definition: gls_multi_view.h:498
Definition: dynamic_array.h:79
unsigned Count() const
Definition: dynamic_array.h:218
void Clear()
Definition: dynamic_array.h:253
Definition: gls_eyepoint.h:116
Definition: gls_glo_file.h:1241
Definition: gls_multi_view.h:139
void EyePoint(GlsEyePoint *)
Sets the eyepoint to view from. When NULL, the parent view is used.
bool AbsolutePixels() const
int ClearBackground() const
void ForceEyePointReload()
Forces eyepoint reload, causes the multi view to trigger a redraw.
void Bottom(const float &)
Set the bottom value.
OpenGLMatrices SavedMatrices() const
void SetScreenRect(float bottom, float left, float top, float right)
void ClearBackground(const int &)
const ViewData & operator=(const ViewData &)
void Right(const float &)
Set the right value.
ViewData(const ViewData &)
Copy constructor.
void Left(const float &)
Set the left value.
GlsPropString DesiredEyePoint() const
bool PickGeometry() const
void Visible(bool)
Set the visibility of this view .
void DesiredEyePoint(const GlsPropString &)
Set the name of the view's eyepoint.
void AbsolutePixels(const bool &)
DistiAttribDict & Attributes()
Definition: gls_multi_view.h:192
void Top(const float &)
Set the top value.
void GetScreenRect(float *bottom, float *left, float *top, float *right) const
void PickGeometry(const bool &)
void NotifyAttributeChanged(const AttributeName &name) DISTI_METHOD_OVERRIDE
void CopyBaseData(const ViewData &other)
GlsEyePoint * GetEyePoint(const DisplayObject *heirarchiedObject)
Definition: gls_multi_view.h:77
DisplayObject * CloneObject(bool generateNames=FALSE) DISTI_METHOD_OVERRIDE
GlsMultiView(int generateInstance=FALSE)
void ReapplyGlobalLightsForView(ViewData *view)
void SetValue(int spec, va_list &args) DISTI_METHOD_OVERRIDE
GlsMatrixType _savedProjectionMatrix
Stores the projection matrix from PreDraw for restoring after DrawView.
Definition: gls_multi_view.h:397
DistiAttributeBase & Resource(const char *name) DISTI_METHOD_OVERRIDE
bool PreDrawGeometryForView(int viewNumber, ViewData *view)
void CopyProperties(DisplayObject *src) DISTI_METHOD_OVERRIDE
enum disti::GlsMultiView::@22 ClearBackgroundEnum
ViewData _mainViewData
The main (parent) view used for drawing geometry based views.
Definition: gls_multi_view.h:385
ViewDrawStateEnum ViewDrawingState()
void EmitViewDrawEvents(const bool &)
void SetAvailableAttributes(unsigned int value) DISTI_METHOD_OVERRIDE
void GetCppInterfaceDescriptionFree(InterfaceListType *array) DISTI_METHOD_OVERRIDE
bool _emitViewDrawEvents
If true, will emit VIEW_DRAW_BEGIN / VIEW_DRAW_END object events on draw.
Definition: gls_multi_view.h:392
bool EmitViewDrawEvents() const
int _lastViewPredraw
The index of the last view predraw or -1 if predraw used parent's view.
Definition: gls_multi_view.h:387
ComponentLightMgr * _multiViewLightMgr
Our very own light manager.
Definition: gls_multi_view.h:394
ViewDataArray _viewArray
The list of all views associated with this multi view.
Definition: gls_multi_view.h:384
int _highlightView
Used by the editor to highlight a specific view. -1 is none.
Definition: gls_multi_view.h:390
unsigned int ViewCount() const
int LastViewPicked() const
DisplayObject * handle(DisplayEvent *ev) DISTI_METHOD_OVERRIDE
int _lastViewPicked
The index of the last view picked, or -1 if the main view.
Definition: gls_multi_view.h:386
void PreDraw(const OpenGLMatrices &parentMatrices, Culler &culler) DISTI_METHOD_OVERRIDE
static DisplayObject * CreateInstance()
void Draw() DISTI_METHOD_OVERRIDE
ViewDrawStateEnum
Definition: gls_multi_view.h:301
DynamicArray< ViewData > ViewDataArray
Shorthand typedef for a list of views.
Definition: gls_multi_view.h:297
ViewData & View(unsigned int viewNumber)
virtual DisplayObject * Pick3D(const Vector &winLoc, const Vector &logicalCoords, float scale, const Vector &directionVector, Vector &collisionWinLoc, const OpenGLMatrices &drawnMatrices) DISTI_METHOD_OVERRIDE
void DrawView(unsigned int viewNumber, ViewData *view)
ViewDrawStateEnum _viewDrawingState
The drawing behavior for the multi view, generally VIEWS_ONLY.
Definition: gls_multi_view.h:383
void GetResources(std::ostream &outstr, GlsResourceFilter *filter=NULL) DISTI_METHOD_OVERRIDE
bool _showHighlights
Used by the editor to turn on and off highlights.
Definition: gls_multi_view.h:389
bool _childLightsAffectGlobal
Calculated internally based on if geometry is drawn.
Definition: gls_multi_view.h:395
void ViewDrawingState(ViewDrawStateEnum)
Set the ViewDrawingState.
ViewDataArray & ViewArray()
InterfaceListType * GetCppInterfaceDescription(InterfaceListType *addToThisList=NULL) DISTI_METHOD_OVERRIDE
void CalculateViewMatrices(const OpenGLMatrices &parentMatrices, Culler &culler, GlsMultiView::ViewData *view) const
Definition: gls_resources.h:49
Class to contain current OpenGL view, projection and draw matrices.
Definition: util.h:540
GL Studio Enumerations and constants.
#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:245
#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::GlsEyePoint class. Implements eyepoints.
#define GLSGEN_GlsMultiView_EXPORT
Provides support for creating DLLs.
Definition: gls_multi_view.h:60
The disti::Group class. Implements groups of objects.
Definition: bmpimage.h:46
#define FALSE
False macro, for backward compatibility purposes.
Definition: util.h:104