GlsRSOLoader API  1.5.0
gls_rso_loader.h
Go to the documentation of this file.
1 /*! \file gls_rso_loader.h
2 \brief The main class for loading an RSO.
3 
4 \par Copyright Information
5 
6  Copyright (c) 2013 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 GLS_RSO_LOADER_H_INCLUDED
41 #define GLS_RSO_LOADER_H_INCLUDED
42 
43 #include "rso_interface_5.h"
44 
45 #include <string>
46 #include <vector>
47 
48 /** \brief Namespace for loading RSOs. */
49 namespace GlsRSOLoader
50 {
51 class LiveComponentLibRef;
52 
53 /** RSOReference class. Main interface for GlsRSOLoader */
55 {
57  unsigned int _rsoVersion;
58  LiveComponentLibRef* _liveComponentLibRef;
59  bool _redraw;
60 
61  RSOReference( const RSOReference& );
62  RSOReference& operator=( const RSOReference& );
63 
64 public:
65  /** Constructor */
66  RSOReference( disti::RSOInterface1*, LiveComponentLibRef*, unsigned int );
67 
68  /** Destructor */
69  ~RSOReference();
70 
71  /** Accessor for RSOInterface contained within this RSO Reference
72  * \return Pointer to RSOInterface instance
73  */
74  inline disti::RSOInterface1* GetRSOInterface1() { return _rso; }
75 
76  /** Gets the version number for the RSO
77  * \return The RSO version number
78  */
79  inline unsigned int GetRSOVersion() { return _rsoVersion; }
80 
81  /** Sets a resource contained within the RSO
82  * \param resourceName Resource name
83  * \param resourceVal Resource value
84  */
85  inline void SetResource( const char* resourceName, const char* resourceVal ) { _rso->SetResource( resourceName, resourceVal ); }
86 
87  /** CRT Insensitive version of SetResources()
88  * Parse a buffer of resource value pairs.
89  * \param buf String containing resource data
90  */
91  void SetResources( const char* buf );
92 
93  /** Gets a resource value by name
94  * \param resourceName Resource name
95  * \return Value of given resource
96  */
97  inline const char* GetResource( const char* resourceName ) { return _rso->GetResource( resourceName ); }
98 
99  /** Calculate method. Should be called every frame for normal operation.
100  * \param time Elapsed time, in seconds
101  */
102  void Calculate( double time );
103 
104  /** Calculate transformations and perform culling. Call this before Draw()
105  * \param current Transformation matrices (Projection and Modelview) to apply
106  * \param culler Culler operation to apply on this RSO
107  */
108  inline void PreDraw( const disti::RSOInterface1::OpenGLMatrices& current, disti::RSOInterface1::Culler& culler ) { _rso->PreDraw( current, culler ); }
109 
110  /** Draw the object via OpenGL. Call this after PreDraw() */
111  inline void Draw() { _rso->Draw(); }
112 
113  /** Allow the object to handle an event.
114  * \param ev Event to be handled by the RSO
115  * \return true if the event was handled by the RSO
116  */
117  inline bool HandleInput( disti::RSOInterface1::Event* ev ) { return _rso->HandleInput( ev ); }
118 
119  /** Allow for handling events from inside the object.
120  * The emitted event handler will be passed events that are from inside the component
121  * \param handler pointer to the EmittedEventHandler object to use or NULL to remove the current event handler.
122  * \return true if this component may emit events, false if this component will never emit events.
123  */
125 
126  /** Sets the "AbsolutePlacement" property on the RSO
127  * \param value true to enable AbsolutePlacement property, false to disable it
128  */
129  void AbsolutePlacement( bool value );
130 
131  /** Gets the background color of the RSO's display frame
132  * \param r Red color component (0-255)
133  * \param g Green color component (0-255)
134  * \param b Blue color component (0-255)
135  * \param a Alpha color component (0-255)
136  */
137  void GetBackgroundColor( unsigned char& r, unsigned char& g, unsigned char& b, unsigned char& a );
138 
139  /** Get the extents of the RSO when drawn with the given transformation matrix, as a coordinate system-aligned box
140  * \param min If the method returns true, contains the point corresponding with the 1st corner of the box. If the method returns false, value is undefined.
141  * \param max If the method returns true, contains the point corresponding with the 2nd corner of the box. If the method returns false, value is undefined.
142  * \param transform Transformation matrix from A to B where A is the component�s coordinate system and B is the coordinate system to compute the bounding box in. (If NULL then identity matrix is assumed)
143  * \return true if the extents were calculated, false if the extents could not be calculated.
144  */
146 
147  /** Sets the projection of the RSO using glOrtho or gluSetPerspective. Sets the application's projection globally.
148  * \param controlWidth Width of the RSO (in pixels)
149  * \param controlHeight Height of the RSO (in pixels)
150  * \param depthFactor Used for autocalculating clipping planes.
151  * \param fov field of view (in degrees)
152  * \param perspective Whether the projection is perspective or orthographic
153  */
154  void SetProjection( int controlWidth, int controlHeight, float depthFactor = 4.0f, float fov = 90.0f, bool perspective = false );
155 
156  /** Mouse button down event handler
157  * \param x X screen coordinate of mouse cursor's current location
158  * \param y Y screen coordinate of mouse cursor's current location
159  * \param button Mouse button pressed (see RSOInterface1::MouseEvent::MouseButtonType)
160  * \return true if event handled successfully, false otherwise
161  */
162  bool HandleMouseDown( int x, int y, int button );
163 
164  /** Mouse button up event handler
165  * \param x X screen coordinate of mouse cursor's current location
166  * \param y Y screen coordinate of mouse cursor's current location
167  * \param button Mouse button released (see RSOInterface1::MouseEvent::MouseButtonType)
168  */
169  bool HandleMouseUp( int x, int y, int button );
170 
171  /** Mouse wheel plus event handler
172  * \param x X screen coordinate of mouse cursor's current location
173  * \param y Y screen coordinate of mouse cursor's current location
174  * \param buttonMask bitfield of which mouse buttons are currently held down (see RSOInterface1::MouseEvent::MouseButtonType)
175  * \return true if event handled successfully, false otherwise
176  */
177  bool HandleMouseWheelPlus( int x, int y, int buttonMask );
178 
179  /** Mouse wheel minus event handler
180  * \param x X screen coordinate of mouse cursor's current location
181  * \param y Y screen coordinate of mouse cursor's current location
182  * \param buttonMask bitfield of which mouse buttons are currently held down (see RSOInterface1::MouseEvent::MouseButtonType)
183  * \return true if event handled successfully, false otherwise
184  */
185  bool HandleMouseWheelMinus( int x, int y, int buttonMask );
186 
187  /** Mouse button up event handler
188  * \param x X screen coordinate of mouse cursor's current location
189  * \param y Y screen coordinate of mouse cursor's current location
190  * \param buttonMask bitfield of which mouse buttons are currently held down (see RSOInterface1::MouseEvent::MouseButtonType)
191  * \return true if event handled successfully, false otherwise
192  */
193  bool HandleMouseMove( int x, int y, int buttonMask );
194 
195  /** Keyboard key down event handler
196  * \param key Key code pressed. Either ascii value or RSOInterface1::KeyboardEvent::KeySymCodeEnum (for any non-ascii key).
197  * \param x X screen coordinate of mouse cursor's current location
198  * \param y Y screen coordinate of mouse cursor's current location
199  * \return true if event handled successfully, false otherwise
200  */
201  bool HandleKeyDown( int key, int x, int y );
202 
203  /** Keyboard key up event handler
204  * \param key Key code released. Either ascii value or RSOInterface1::KeyboardEvent::KeySymCodeEnum (for any non-ascii key).
205  * \param x X screen coordinate of mouse cursor's current location
206  * \param y Y screen coordinate of mouse cursor's current location
207  * \return true if event handled successfully, false otherwise
208  */
209  bool HandleKeyUp( int key, int x, int y );
210 
211  // Additions for RSO version 2
212 
213  /** Constructs a resource handle for rapid access to the named resource (RSO v2)
214  * \param resourceName resource name
215  * \param[out] resourceHandle reference to resource handle output location
216  * \return true if successful
217  */
218  bool CreateResourceHandle( const char* resourceName, disti::RSOInterface2::ResourceHandle& resourceHandle );
219 
220  /** Frees the given resource handle (RSO v2)
221  * \param resourceHandle resource handle
222  * \return true if successful
223  */
224  bool ReleaseResourceHandle( disti::RSOInterface2::ResourceHandle resourceHandle );
225 
226  /** Checks the given resource handle for validity (RSO v2)
227  * \param resourceHandle resource handle
228  * \return true if the given resource handle is connected to a valid resource
229  */
230  bool IsResourceHandleValid( disti::RSOInterface2::ResourceHandle resourceHandle );
231 
232  /** Sets a string resource by handle (RSO v2)
233  * \param resourceHandle resource handle
234  * \param resourceVal resource value
235  * \return true if successful
236  */
237  bool SetResource( disti::RSOInterface2::ResourceHandle resourceHandle, const char* resourceVal );
238 
239  /** Gets a string resource by handle (RSO v2)
240  * \param resourceHandle resource handle
241  * \param[out] resourceValue reference to resource value output location
242  * \return true if successful
243  */
244  bool GetResource( disti::RSOInterface2::ResourceHandle resourceHandle, const char*& resourceValue );
245 
246  /** Sets an integer resource by name (RSO v2)
247  * \param resourceName resource name
248  * \param resourceVal resource value
249  * \return true if successful
250  */
251  bool SetIntResource( const char* resourceName, long resourceVal );
252  /** Sets an integer resource by handle (RSO v2)
253  * \param resourceHandle resource handle
254  * \param resourceVal resource value
255  * \return true if successful
256  */
257  bool SetIntResource( disti::RSOInterface2::ResourceHandle resourceHandle, long resourceVal );
258 
259  /** Gets an integer resource by name (RSO v2)
260  * \param resourceName resource name
261  * \param[out] resourceVal reference to resource value output location
262  * \return true if successful
263  */
264  bool GetIntResource( const char* resourceName, long& resourceVal );
265  /** Gets an integer resource by handle (RSO v2)
266  * \param resourceHandle resource handle
267  * \param[out] resourceVal reference to resource value output location
268  * \return true if successful
269  */
270  bool GetIntResource( disti::RSOInterface2::ResourceHandle resourceHandle, long& resourceVal );
271 
272  /** Sets a float resource by name (RSO v2)
273  * \param resourceName resource name
274  * \param resourceVal resource value
275  * \return true if successful
276  */
277  bool SetFloatResource( const char* resourceName, double resourceVal );
278  /** Sets a float resource by handle (RSO v2)
279  * \param resourceHandle resource handle
280  * \param resourceVal resource value
281  * \return true if successful
282  */
283  bool SetFloatResource( disti::RSOInterface2::ResourceHandle resourceHandle, double resourceVal );
284 
285  /** Gets a float resource by name (RSO v2)
286  * \param resourceName resource name
287  * \param[out] resourceVal reference to resource value output location
288  * \return true if successful
289  */
290  bool GetFloatResource( const char* resourceName, double& resourceVal );
291  /** Gets a float resource by handle (RSO v2)
292  * \param resourceHandle resource name
293  * \param[out] resourceVal reference to resource value output location
294  * \return true if successful
295  */
296  bool GetFloatResource( disti::RSOInterface2::ResourceHandle resourceHandle, double& resourceVal );
297 
298  /** Register a resource observer to be notified when a resource changes *
299  * \param resourceHandle the resource handle
300  * \param obs the observer to be notified
301  * \param[out] id the id used to unregister the observer
302  * \return true if successful
303  */
304  bool RegisterResourceObserver( disti::RSOInterface2::ResourceHandle resourceHandle, disti::RSOInterface4::ResourceObserver* obs, disti::RSOInterface4::CallbackID& id );
305 
306  /** Unregister a resource observer
307  * \param resourceHandle the resource handle
308  * \param id the id used to register the resource observer
309  * \return true if successful
310  */
311  bool UnregisterResourceObserver( disti::RSOInterface2::ResourceHandle resourceHandle, disti::RSOInterface4::CallbackID id );
312 
313  /** Notify the painter that the scene needs to be redrawn */
314  void Invalidate() { SetRedraw( true ); }
315 
316  /** Set the redraw flag, notifying the application that this RSO should be redrawn
317  * \param redraw the new value of the redraw flag
318  */
319  void SetRedraw( bool redraw ) { _redraw = redraw; }
320 
321  /** Get the redraw flag, whether or not this RSO should be redrawn
322  * \return the current value of the redraw flag
323  */
324  bool GetRedraw() { return _redraw; }
325 };
326 
327 /** Create RSO static
328  * This will load the specified DLL and try to create the specified class.
329  * It will return the RSO1Reference* on success, and NULL on failure.
330  * \param fileName The name of the DLL
331  * \param className The class name to create. If NULL, the default class will be created.
332  * \param absolutePlacement Initial value of AbsolutePlacement
333  * \return NULL on failure.*/
334 RSOReference* LoadRSO( const char* fileName, const char* className = 0, bool absolutePlacement = true );
335 
336 /** Delete an RSO reference */
337 void DestroyRSO( RSOReference* );
338 
339 /** Sets up the OpenGL Pipeline to the state expected by RSO drawing.
340  * \param pushState Whether or not to save values. If true, this will call
341  * glPushClientAttrib(GL_CLIENT_ALL_ATTRIB_BITS) and glPushAttrib(GL_ALL_ATTRIB_BITS). You should call
342  * RestoreOpenGLState() after drawing to pop the attributes.
343  */
344 void SetOpenGLDefaultState( bool pushState );
345 
346 /** Call this after calling SetOpenGLDefaultState with saveVal == true.
347  * DO NOT call this after calling SetOpenGLDefaultState with saveVal == false
348  * because this will pop the attribute stack.
349  */
350 void RestoreOpenGLState();
351 
352 /** OpenGLMatrices is used to pass the current OpenGL matrices to PreDraw */
354 {
355 protected:
356  bool _needsDelete;
357 
358 public:
359  /** Constructor */
360  OpenGLMatrices();
361  /** Destructor */
362  ~OpenGLMatrices();
363 
364  /** Retrieves the current OpenGL Matrices from the
365  * OpenGL Subsystem */
366  void GetCurrent();
367 };
368 
369 /** Defines culling parameters (ie- clipping planes for frustum culling) for PreDraw */
371 {
372 public:
373  /** Culler constructor
374  * \param enabled Whether or not to actually do the culling test
375  */
376  Culler( bool enabled = true );
377 
378  /** Reads the current OpenGL projection matrices and determines the six frustum planes.
379  * \param currentMatrices Transformation matrices to apply to culling planes
380  */
381  void ExtractFrustum( disti::RSOInterface1::OpenGLMatrices& currentMatrices );
382 };
383 
384 /** Used for specifiying a filter for accessing resources
385  */
387 {
388 public:
389  int _levelsUp;
390  int _groupLevelsDown;
391  std::vector<std::string> _excludeList;
392  std::vector<std::string> _includeList;
393  bool _namesOnly;
394 
395 public:
397  /// Copy constructor
399 
400  virtual ~GlsResourceFilter();
401 
402  /** How many levels of qualification above the starting point to show in the attribute names.
403  * This is based on the component heirarchy, not the draw hierarchy.
404  * For example if you call Altimeter->GetResources() with:
405  * LevelsUp = 0, expect:
406  * Altitude: 1000
407  * LevelsUp = 1, expect:
408  * Altimeter.Altitude:
409  * LevelsUp = 2, expect:
410  * Cockpit.Altimeter.Altitude:
411  * -1 means full qualification.
412  */
413  inline int LevelsUp() const { return _levelsUp; }
414  inline void LevelsUp( int value ) { _levelsUp = value; }
415 
416  /** How many levels of children to show.
417  * This is different from LevelsUp because this is based on the draw
418  * heirarchy (Groups rather than components).
419  * For example with:
420  * GroupLevelsDown = 0, only the specified object's resources will be shown.
421  * GroupLevelsDown = 1, only the immeadiate children of the object's resources will be shown.
422  * GroupLevelsDown = -1, means all children will be shown.
423  * Note that the name stays fully qualified for the children. For example:
424  * if GroupLevelsDown == 1 the results would include:
425  * Altimeter.Visible: 1
426  * Altimeter.Group1.Visible: 1
427  * but NOT:
428  * Altimeter.Group1.Poly.Visible: 1
429  */
430  inline int GroupLevelsDown() const { return _groupLevelsDown; }
431  inline void GroupLevelsDown( int value ) { _groupLevelsDown = value; }
432 
433  /** If true, only a list of names will be returned.
434  * Values will not be returned.
435  * The format changes to not include the ":".
436  */
437  inline bool NamesOnly() const { return _namesOnly; }
438  inline void NamesOnly( bool value ) { _namesOnly = value; }
439 
440  /** Add a resource name to the exclude filter
441  * Resources on the exclude list will not pass the filter.
442  * Excludes take precedence over includes
443  */
444  void AddExclude( const char* name );
445 
446  /// Returns the number of exclude entries in the filter
447  int ExcludeCount() const;
448 
449  /** Returns the resource name for the given exclude list entry
450  * \pre index < ExcludeCount()
451  */
452  const char* GetExclude( int index ) const;
453 
454  /** Removes a entry from the exclude list
455  * This will reduce the ExcludeCount()
456  * \pre index < ExcludeCount()
457  */
458  void RemoveExclude( unsigned int index );
459 
460  /// Removes all entries from the exclude list
461  void ClearExcludes();
462 
463  /** Add a resource name to the include filter
464  * If there are no includes specified, all resources
465  * will pass the filter by default.
466  * If IncludeCount() > 0, then only resources that
467  * are included will pass the filter.
468  */
469  void AddInclude( const char* name );
470 
471  /// Returns the number of includes in the filter
472  int IncludeCount() const;
473 
474  /** Returns the resource name for the given include list entry
475  * \pre index < IncludeCount()
476  */
477  const char* GetInclude( int index ) const;
478 
479  /** Removes a entry from the include list
480  * This will reduce the IncludeCount()
481  * \pre index < IncludeCount()
482  */
483  void RemoveInclude( unsigned int index );
484 
485  /// Removes all entries from the include list
486  void ClearIncludes();
487 
488  /// Test a resource name against the filter
489  virtual bool PassFilter( const char* name ) const;
490 
491  /// assignment operator
492  GlsResourceFilter& operator=( const GlsResourceFilter& rhs );
493 };
494 
495 /** Template for a ResourceObserver that will call a class method whenever the attribute changes.
496  * Don't use this directly, use GlsRSOLoader::CreateResourceMethodCallback instead.
497  */
498 template<class T>
500 {
501 public:
502  typedef void ( T::*Callback )( disti::RSOInterface2::ResourceHandle );
503 
504  ResourceMethodCallback( T* object, Callback method )
505  : _method( method )
506  , _object( object )
507  {
508  }
509 
510  virtual void Call( disti::RSOInterface2::ResourceHandle handle )
511  {
512  ( _object->*( _method ) )( handle );
513  }
514 
515  virtual void Destroy()
516  {
517  delete this;
518  }
519 
520 protected:
521  Callback _method;
522  T* _object;
523 };
524 
525 /** Create an ResourceObserver that will call a class method whenever the attribute changes.
526  * \param obj the object to call the method on
527  * \param method a class method pointer
528  */
529 template<class Class>
531  Class* const obj,
532  const typename ResourceMethodCallback<Class>::Callback method )
533 {
534  return new ResourceMethodCallback<Class>( obj, method );
535 }
536 
537 } // namespace GlsRSOLoader
538 
539 #endif
RSOReference * LoadRSO(const char *fileName, const char *className=0, bool absolutePlacement=true)
Definition: rso_interface_1.h:578
bool SetIntResource(const char *resourceName, long resourceVal)
bool HandleInput(disti::RSOInterface1::Event *ev)
Definition: gls_rso_loader.h:117
void Draw()
Definition: gls_rso_loader.h:111
Definition: rso_interface_5.h:64
virtual bool SetEmittedEventHandler(EmittedEventHandler *handler)=0
Definition: rso_interface_1.h:290
bool HandleKeyDown(int key, int x, int y)
Culler()
Definition: rso_interface_1.h:296
int LevelsUp() const
Definition: gls_rso_loader.h:413
bool GetBoundingBox(disti::RSOInterface1::Vector *min, disti::RSOInterface1::Vector *max, disti::RSOInterface1::MatrixD *transform=0)
virtual void SetResource(const char *resourceName, const char *resourceVal)=0
Set the string value for a given named resource.
bool GetFloatResource(const char *resourceName, double &resourceVal)
void SetOpenGLDefaultState(bool pushState)
disti::RSOInterface4::ResourceObserver * CreateResourceMethodCallback(Class *const obj, const typename ResourceMethodCallback< Class >::Callback method)
Definition: gls_rso_loader.h:530
virtual bool HandleInput(Event *ev)=0
int IncludeCount() const
Returns the number of includes in the filter.
bool HandleMouseDown(int x, int y, int button)
bool RegisterResourceObserver(disti::RSOInterface2::ResourceHandle resourceHandle, disti::RSOInterface4::ResourceObserver *obs, disti::RSOInterface4::CallbackID &id)
void AbsolutePlacement(bool value)
void ClearExcludes()
Removes all entries from the exclude list.
void RemoveExclude(unsigned int index)
const char * GetInclude(int index) const
bool CreateResourceHandle(const char *resourceName, disti::RSOInterface2::ResourceHandle &resourceHandle)
void AddInclude(const char *name)
bool IsResourceHandleValid(disti::RSOInterface2::ResourceHandle resourceHandle)
Definition: gls_rso_loader.h:370
virtual const char * GetResource(const char *resourceName)=0
Get the string value for the given resource.
bool HandleMouseWheelPlus(int x, int y, int buttonMask)
Definition: rso_interface_4.h:63
Definition: gls_rso_loader.h:353
void GetBackgroundColor(unsigned char &r, unsigned char &g, unsigned char &b, unsigned char &a)
void RemoveInclude(unsigned int index)
Definition: rso_interface_1.h:302
bool UnregisterResourceObserver(disti::RSOInterface2::ResourceHandle resourceHandle, disti::RSOInterface4::CallbackID id)
virtual void PreDraw(const OpenGLMatrices &current, Culler &culler)=0
Definition: gls_rso_loader.h:386
void Calculate(double time)
void SetResource(const char *resourceName, const char *resourceVal)
Definition: gls_rso_loader.h:85
Definition: gls_rso_loader.h:54
Definition: rso_interface_1.h:592
bool ReleaseResourceHandle(disti::RSOInterface2::ResourceHandle resourceHandle)
bool HandleMouseUp(int x, int y, int button)
void SetResources(const char *buf)
int GroupLevelsDown() const
Definition: gls_rso_loader.h:430
void SetProjection(int controlWidth, int controlHeight, float depthFactor=4.0f, float fov=90.0f, bool perspective=false)
bool GetRedraw()
Definition: gls_rso_loader.h:324
void Invalidate()
Definition: gls_rso_loader.h:314
bool HandleMouseWheelMinus(int x, int y, int buttonMask)
Definition: rso_interface_1.h:60
Namespace for loading RSOs.
Definition: gls_rso_loader.h:49
Definition: rso_interface_1.h:209
void RestoreOpenGLState()
const char * GetResource(const char *resourceName)
Definition: gls_rso_loader.h:97
bool SetEmittedEventHandler(disti::RSOInterface1::EmittedEventHandler *handler)
Definition: gls_rso_loader.h:124
virtual void Draw()=0
disti::RSOInterface1 * GetRSOInterface1()
Definition: gls_rso_loader.h:74
Definition: rso_interface_1.h:185
bool HandleMouseMove(int x, int y, int buttonMask)
bool HandleKeyUp(int key, int x, int y)
virtual bool PassFilter(const char *name) const
Test a resource name against the filter.
Definition: rso_interface_1.h:242
void PreDraw(const disti::RSOInterface1::OpenGLMatrices &current, disti::RSOInterface1::Culler &culler)
Definition: gls_rso_loader.h:108
Definition: gls_rso_loader.h:499
bool NamesOnly() const
Definition: gls_rso_loader.h:437
bool SetFloatResource(const char *resourceName, double resourceVal)
int ExcludeCount() const
Returns the number of exclude entries in the filter.
void SetRedraw(bool redraw)
Definition: gls_rso_loader.h:319
void DestroyRSO(RSOReference *)
bool GetIntResource(const char *resourceName, long &resourceVal)
void ClearIncludes()
Removes all entries from the include list.
unsigned int GetRSOVersion()
Definition: gls_rso_loader.h:79
const char * GetExclude(int index) const
unsigned int CallbackID
Type for unique identifiers.
Definition: rso_interface_4.h:79
void AddExclude(const char *name)
void ExtractFrustum(disti::RSOInterface1::OpenGLMatrices &currentMatrices)
Defines the RSO interface v5, which extends v4 to add conditional rendering support.
GlsResourceFilter & operator=(const GlsResourceFilter &rhs)
assignment operator