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