40#ifndef INCLUDED_DISTI_GLS_MULTI_VIEW_H
41#define INCLUDED_DISTI_GLS_MULTI_VIEW_H
48#define LIB_BASE_NAME "gls_multi_view"
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 )
58# define GLSGEN_GlsMultiView_EXPORT __declspec( dllimport )
61# define GLSGEN_GlsMultiView_EXPORT
70 GLS_GLSMULTIVIEW_FIRST_VALUE = GLS_LAST_INITIALIZER + 1,
71 GLS_GLSMULTIVIEW_VIEW_DATA,
72 GLS_GLSMULTIVIEW_VIEW_DRAWING_STATE
74class ComponentLightMgr;
79 friend class GlsMultiViewEditor;
82 DISTI_DEPRECATED(
"This identifier is forbidden by the C++ standard. Use BaseClass instead." )
114 const Vector& logicalCoords,
116 const Vector& directionVector,
133 CLEAR_BG_DEPTH_AND_COLOR = 1,
142 friend class GlsMultiViewEditor;
148 bool _absolutePixels;
150 std::string _desiredEyePoint;
151 int _clearBackground;
173 void InitAttributes();
401 void OnViewDataChanged();
402 void OnViewDrawingStateChanged();
403 void OnViewArrayChange();
405 void DummySetInt(
const int& ) {}
435 _array = ptr->_array;
452 instr.ignore( 1024,
'{' );
462 index = atoi( buf.c_str() );
466 instr.ignore( 1024,
'{' );
469 _array[ index ].Attributes().Read( instr );
484 for(
unsigned int i = 0; i < _array.
Count(); i++ )
490 _array[ i ].Attributes().Write( outstr );
Definition: disti_metadata.h:514
Definition: disti_metadata.h:87
Definition: callback_caller_base.h:56
Definition: component_light_mgr.h:56
Definition: disti_metadata.h:734
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:412
std::ostream & WriteValue(std::ostream &outstr) DISTI_METHOD_OVERRIDE
Definition: gls_multi_view.h:477
DistiAttributeViewDataArray(CallbackMethodCallerBase *caller, AttributeName name, GlsMultiView::ViewDataArray &array)
Definition: gls_multi_view.h:420
DistiAttributeBase & operator=(const DistiAttributeBase &oldClass) DISTI_METHOD_OVERRIDE
Definition: gls_multi_view.h:429
std::istream & ReadValue(std::istream &instr) DISTI_METHOD_OVERRIDE
Definition: gls_multi_view.h:446
Definition: dynamic_array.h:79
unsigned Count() const
Definition: dynamic_array.h:218
void Clear()
Definition: dynamic_array.h:253
Definition: gls_eyepoint.h:117
Definition: gls_glo_file.h:1243
Definition: gls_multi_view.h:140
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.
virtual void NotifyAttributeChanged(const AttributeName &name) DISTI_METHOD_OVERRIDE
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:193
void Top(const float &)
Set the top value.
void GetScreenRect(float *bottom, float *left, float *top, float *right) const
void PickGeometry(const bool &)
void CopyBaseData(const ViewData &other)
GlsEyePoint * GetEyePoint(const DisplayObject *heirarchiedObject)
Definition: gls_multi_view.h:78
virtual InterfaceListType * GetCppInterfaceDescription(InterfaceListType *addToThisList=NULL) DISTI_METHOD_OVERRIDE
GlsMultiView(int generateInstance=FALSE)
virtual void SetAvailableAttributes(unsigned int value) DISTI_METHOD_OVERRIDE
virtual void Draw() DISTI_METHOD_OVERRIDE
virtual void GetCppInterfaceDescriptionFree(InterfaceListType *array) DISTI_METHOD_OVERRIDE
void ReapplyGlobalLightsForView(ViewData *view)
GlsMatrixType _savedProjectionMatrix
Stores the projection matrix from PreDraw for restoring after DrawView.
Definition: gls_multi_view.h:398
bool PreDrawGeometryForView(int viewNumber, ViewData *view)
enum disti::GlsMultiView::@22 ClearBackgroundEnum
ViewData _mainViewData
The main (parent) view used for drawing geometry based views.
Definition: gls_multi_view.h:386
virtual DisplayObject * CloneObject(bool generateNames=FALSE) DISTI_METHOD_OVERRIDE
ViewDrawStateEnum ViewDrawingState()
virtual void PreDraw(const OpenGLMatrices &parentMatrices, Culler &culler) DISTI_METHOD_OVERRIDE
void EmitViewDrawEvents(const bool &)
virtual DisplayObject * handle(DisplayEvent *ev) DISTI_METHOD_OVERRIDE
bool _emitViewDrawEvents
If true, will emit VIEW_DRAW_BEGIN / VIEW_DRAW_END object events on draw.
Definition: gls_multi_view.h:393
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:388
virtual void SetValue(int spec, va_list &args) DISTI_METHOD_OVERRIDE
ComponentLightMgr * _multiViewLightMgr
Our very own light manager.
Definition: gls_multi_view.h:395
ViewDataArray _viewArray
The list of all views associated with this multi view.
Definition: gls_multi_view.h:385
int _highlightView
Used by the editor to highlight a specific view. -1 is none.
Definition: gls_multi_view.h:391
unsigned int ViewCount() const
int LastViewPicked() const
int _lastViewPicked
The index of the last view picked, or -1 if the main view.
Definition: gls_multi_view.h:387
static DisplayObject * CreateInstance()
ViewDrawStateEnum
Definition: gls_multi_view.h:302
DynamicArray< ViewData > ViewDataArray
Shorthand typedef for a list of views.
Definition: gls_multi_view.h:298
virtual DistiAttributeBase & Resource(const char *name) DISTI_METHOD_OVERRIDE
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
virtual void CopyProperties(DisplayObject *src) DISTI_METHOD_OVERRIDE
void DrawView(unsigned int viewNumber, ViewData *view)
virtual void GetResources(std::ostream &outstr, GlsResourceFilter *filter=NULL) DISTI_METHOD_OVERRIDE
ViewDrawStateEnum _viewDrawingState
The drawing behavior for the multi view, generally VIEWS_ONLY.
Definition: gls_multi_view.h:384
bool _showHighlights
Used by the editor to turn on and off highlights.
Definition: gls_multi_view.h:390
bool _childLightsAffectGlobal
Calculated internally based on if geometry is drawn.
Definition: gls_multi_view.h:396
void ViewDrawingState(ViewDrawStateEnum)
Set the ViewDrawingState.
ViewDataArray & ViewArray()
void CalculateViewMatrices(const OpenGLMatrices &parentMatrices, Culler &culler, GlsMultiView::ViewData *view) const
Definition: gls_resources.h:51
Class to contain current OpenGL view, projection and draw matrices.
Definition: util.h:544
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:235
#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::GlsEyePoint class. Implements eyepoints.
#define GLSGEN_GlsMultiView_EXPORT
Provides support for creating DLLs.
Definition: gls_multi_view.h:61
The disti::Group class. Implements groups of objects.
Force inclusion of the DirectShow library.
Definition: bmpimage.h:47
#define FALSE
False macro, for backward compatibility purposes.
Definition: util.h:107