GlsRSOLoader API  1.5.0
rso_interface_1.h
Go to the documentation of this file.
1 /*! \file
2  \brief Defines the RSO interface, which provides a generic way of accessing RSOs and other content, disti::RSOInterface1.
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 _RSO_INTERFACE_1_H
41 #define _RSO_INTERFACE_1_H
42 
43 // !!! NOTICE !!!
44 // To maintain compatibility with existing RSOs this header cannot be changed.
45 
46 namespace disti
47 {
48 ////////////////////////////////////////////////////////////////////////////////
49 // In order for the RSO to be discovered in a .DLL or .so file,
50 // The following "C" funtions need to be defined.
51 // They are only comments here.
52 ////////////////////////////////////////////////////////////////////////////////
53 // RSOInterface1* GetRSOInterface1_ClassNameHere()
54 // Optionally:
55 // const char* GlsDefaultClassName()
56 ////////////////////////////////////////////////////////////////////////////////
57 
58 /** The RSOInterface1 class defines an abstract interface to an RSO instance.
59  */
61 {
62 public:
63  ////////////////////////////////////////////////////////////////////////////////
64  // Forward declaration of support classes
65  ////////////////////////////////////////////////////////////////////////////////
66  class Vector;
67  class MatrixD;
68  class OpenGLMatrices;
69  class PlaneClass;
70  class Culler;
71  class Event;
72  class LocationEvent;
73  class MouseEvent;
74  class KeyboardEvent;
75  class ObjectEvent;
76  class EmittedEventHandler;
77  class ResourceFilter;
78 
79 public:
80  ////////////////////////////////////////////////////////////////////////////////
81  /// The RSO Interface methods
82  ////////////////////////////////////////////////////////////////////////////////
83 
84  ////////////////////////////////////////////////////////////////////////////////
85  /// Perform component simulation.
86  /// Any non-drawing activities can be performed here.
87  /// Call this before PreDraw()
88  ////////////////////////////////////////////////////////////////////////////////
89  virtual void Calculate( double time ) = 0;
90 
91  ////////////////////////////////////////////////////////////////////////////////
92  /// Calculate transformations and perform culling
93  /// Call this before Draw()
94  ////////////////////////////////////////////////////////////////////////////////
95  virtual void PreDraw( const OpenGLMatrices& current, Culler& culler ) = 0;
96 
97  ////////////////////////////////////////////////////////////////////////////////
98  /// Draw the object via OpenGL
99  /// Call this after PreDraw()
100  ////////////////////////////////////////////////////////////////////////////////
101  virtual void Draw() = 0;
102 
103  ////////////////////////////////////////////////////////////////////////////////
104  /// Set the string value for a given named resource
105  ////////////////////////////////////////////////////////////////////////////////
106  virtual void SetResource( const char* resourceName, const char* resourceVal ) = 0;
107 
108  ////////////////////////////////////////////////////////////////////////////////
109  /// Get the string value for the given resource
110  ////////////////////////////////////////////////////////////////////////////////
111  virtual const char* GetResource( const char* resourceName ) = 0;
112 
113  ////////////////////////////////////////////////////////////////////////////////
114  /// Get a list of the resources for the component.
115  /// Each resource is separated by a newline ('\n') with the output controlled by filter.
116  /// filter may be NULL in which case the default values are used.
117  ////////////////////////////////////////////////////////////////////////////////
118  virtual const char* GetResources( ResourceFilter* filter = 0 ) = 0;
119 
120  ////////////////////////////////////////////////////////////////////////////////
121  /// Allow the object to handle an event
122  /// Returns true if the event was handled by the component
123  ////////////////////////////////////////////////////////////////////////////////
124  virtual bool HandleInput( Event* ev ) = 0;
125 
126  ////////////////////////////////////////////////////////////////////////////////
127  /// Allow for handling events from inside the object.
128  /// The emitted event handler will be passed events that are from inside the component
129  /// \param handler pointer to the EmittedEventHandler object to use or NULL to remove the current event handler.
130  /// \return true if this component may emit events, false if this component will never emit events.
131  ////////////////////////////////////////////////////////////////////////////////
132  virtual bool SetEmittedEventHandler( EmittedEventHandler* handler ) = 0;
133 
134  ////////////////////////////////////////////////////////////////////////////////
135  /// Pick3D returns true if the RSO was picked.
136  ////////////////////////////////////////////////////////////////////////////////
137  virtual bool Pick3D( const Vector& winLoc,
138  const Vector& logicalCoords,
139  float scale,
140  const Vector& directionVector,
141  Vector& collisionWinLoc,
142  const OpenGLMatrices& drawnMatrices )
143  = 0;
144 
145  ////////////////////////////////////////////////////////////////////////////////
146  /// Get the bounding sphere for the component in the components coordinate system
147  /// \param center If the method returns true, contains the center point of the sphere. If the method returns false, value is undefined.
148  /// \param radius If the method returns true, contains the radius of the sphere. If the method returns false, value is undefined.
149  /// \returns true if the bounding sphere was returned, false if the bounding sphere is not available.
150  ////////////////////////////////////////////////////////////////////////////////
151  virtual bool GetBoundingSphere( Vector* center, float* radius ) = 0;
152 
153  ////////////////////////////////////////////////////////////////////////////////
154  /// Get the extents of the component when drawn with the given transformation matrix, as a coordinate system-aligned box
155  /// \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.
156  /// \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.
157  /// \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)
158  /// \returns true if the extents were calculated, false if the extents could not be calculated.
159  ////////////////////////////////////////////////////////////////////////////////
160  virtual bool GetBoundingBox( Vector* min, Vector* max, const MatrixD* transform = 0 ) = 0;
161 
162  ////////////////////////////////////////////////////////////////////////////////
163  /// Returns a new instance of the RSO
164  /// that is a clone of this object or NULL if not possible.
165  ////////////////////////////////////////////////////////////////////////////////
166  virtual RSOInterface1* CloneObject() = 0;
167 
168  ////////////////////////////////////////////////////////////////////////////////
169  /// Safely delete the object.
170  ////////////////////////////////////////////////////////////////////////////////
171  virtual void DeleteInstance() = 0;
172 
173 protected:
174  ////////////////////////////////////////////////////////////////////////////////
175  /// Protected destructor so it can't be deleted directly.
176  ////////////////////////////////////////////////////////////////////////////////
177  virtual ~RSOInterface1() {}
178 
179 public:
180  ////////////////////////////////////////////////////////////////////////////////
181  // Supporting classes
182  ////////////////////////////////////////////////////////////////////////////////
183 
184  /** Vector */
185  class Vector
186  {
187  public:
188  float _x, _y, _z;
189 
190  Vector()
191  : _x( 0 )
192  , _y( 0 )
193  , _z( 0 )
194  {}
195 
196  inline void Set( float x, float y, float z )
197  {
198  _x = x;
199  _y = y;
200  _z = z;
201  }
202 
203  inline float X() { return _x; }
204  inline float Y() { return _y; }
205  inline float Z() { return _z; }
206  };
207 
208  /** MatrixD contains the data for a 4x4 matrix */
209  class MatrixD
210  {
211  public:
212  // raw column-major matrix data
213  double _data[ 4 * 4 ];
214 
215  // Uninitialized data
216  MatrixD()
217  {}
218 
219  // Copy from data
220  MatrixD( double* data )
221  {
222  _data[ 0 ] = data[ 0 ];
223  _data[ 1 ] = data[ 1 ];
224  _data[ 2 ] = data[ 2 ];
225  _data[ 3 ] = data[ 3 ];
226  _data[ 4 ] = data[ 4 ];
227  _data[ 5 ] = data[ 5 ];
228  _data[ 6 ] = data[ 6 ];
229  _data[ 7 ] = data[ 7 ];
230  _data[ 8 ] = data[ 8 ];
231  _data[ 9 ] = data[ 9 ];
232  _data[ 10 ] = data[ 10 ];
233  _data[ 11 ] = data[ 11 ];
234  _data[ 12 ] = data[ 12 ];
235  _data[ 13 ] = data[ 13 ];
236  _data[ 14 ] = data[ 14 ];
237  _data[ 15 ] = data[ 15 ];
238  }
239  };
240 
241  /** OpenGLMatrices is used to pass the current OpenGL matrices to PreDraw */
243  {
244  public:
245  int* _viewPort; // pointer to array size 4
246  MatrixD* _projMatrix;
247  MatrixD* _modelMatrix;
248 
250  : _viewPort( 0 )
251  , _projMatrix( 0 )
252  , _modelMatrix( 0 )
253  {}
254 
255  OpenGLMatrices( int* viewPort, MatrixD* projMatrix, MatrixD* modelMatrix )
256  : _viewPort( viewPort )
257  , _projMatrix( projMatrix )
258  , _modelMatrix( modelMatrix )
259  {}
260  };
261 
262  /** The PlaneClass is used to define the clipping planes for culling */
264  {
265  public:
266  float _a, _b, _c, _d; /** Coefficients to describe a 3D plane: aX + bY + cZ + d = 0 */
267 
269  : _a( 0 )
270  , _b( 0 )
271  , _c( 0 )
272  , _d( 0 )
273  {}
274 
275  inline void Set( float a, float b, float c, float d )
276  {
277  _a = a;
278  _b = b;
279  _c = c;
280  _d = d;
281  }
282 
283  inline float A() { return _a; }
284  inline float B() { return _b; }
285  inline float C() { return _c; }
286  inline float D() { return _d; }
287  };
288 
289  /** Defines culling parameters for PreDraw */
290  class Culler
291  {
292  public:
293  bool _enabled; /** Whether or not culling is enabled */
294  PlaneClass _planes[ 6 ]; /** Array of six clipping planes to define the frustum */
295 
297  : _enabled( false )
298  {}
299  };
300 
301  /** Base class for events */
302  class Event
303  {
304  public:
305  /** Event Type Enum */
306  typedef enum
307  {
308  EVENT_MOUSE = 0, /**< A Mouse (or touch screen) event */
309  EVENT_KEYBOARD, /**< A Keyboard event */
310  EVENT_TIMER, /**< Unused */
311  EVENT_OBJECT, /**< An event emitted by an object */
312  EVENT_KEYBOARD_UP /**< A Keyboard up event (uses KeyboardEvent class) */
313  } EventTypeEnum;
314 
315  /** Event Subtype Enum */
316  typedef enum
317  {
318  MOUSE_DOWN = 0, /**< A Mouse button was pushed down */
319  MOUSE_UP, /**< A Mouse button was released */
320  MOUSE_MOVE, /**< The mouse moved */
321  MOUSE_DRAG, /**< The mouse moved while a button was held down */
322  MOUSE_LEAVE, /**< The mouse exited the object */
323  MOUSE_ENTER, /**< The mouse entered the object */
324  MOUSE_WHEEL_MINUS, /**< The mouse wheel was turned in the negative direction */
325  MOUSE_WHEEL_PLUS /**< The mouse wheel was turned in the positive direction */
327 
328  unsigned short _eventType; /**< Major event code. see EventTypeEnum */
329  unsigned short _eventSubtype; /**< Minor event code. see EventSubtypeEnum */
330 
331  /**
332  Special Key State
333  */
334  typedef enum
335  {
336  NONE_STATE = 0,
337  SHIFT_STATE = 0x00010000,
338  CAPS_LOCK_STATE = 0x00020000,
339  CTRL_STATE = 0x00040000,
340  ALT_STATE = 0x00080000,
341  NUM_LOCK_STATE = 0x00100000,
342  META_STATE = 0x00400000,
343  SCROLL_LOCK_STATE = 0x00800000,
344  BUTTON1_STATE = 0x01000000,
345  BUTTON2_STATE = 0x02000000,
346  BUTTON3_STATE = 0x04000000
347  } SpecialKeyState;
348 
349  Event()
350  : _eventType( 0 )
351  , // Derived classes MUST set the appropriate event type
352  _eventSubtype( MOUSE_DOWN )
353  {}
354 
355  virtual ~Event() {}
356 
357  inline unsigned short EventType() { return _eventType; }
358  inline void EventType( unsigned short value ) { _eventType = value; }
359 
360  inline unsigned short EventSubType() { return _eventSubtype; }
361  inline void EventSubType( unsigned short value ) { _eventSubtype = value; }
362  };
363 
364  /** An event associated with a specific location in the application window.
365  * Base class for MouseEvent and KeyboardEvent.
366  */
367  class LocationEvent : public Event
368  {
369  public:
370  Vector _winLoc; /**< Location of the event in window coordinates
371  * x and y window coordinates in pixels.
372  * z is from 0.0 -> 1.0 and represents the depth.
373  * z == 0 is at the near cliping plane.
374  * z == 0.5 represents half way between near
375  * and far cliping planes.
376  */
377  LocationEvent()
378  {}
379 
380  inline Vector WinLoc() { return _winLoc; }
381  inline void WinLoc( Vector value ) { _winLoc = value; }
382  };
383 
384  /** An event containing mouse input. */
385  class MouseEvent : public LocationEvent
386  {
387  public:
388  /** Mouse Button Type */
389  typedef enum
390  {
391  MOUSE_LBUTTON = 1, /**< Mask that matches only left mouse button */
392  MOUSE_MBUTTON = 2, /**< Mask that matches only middle mouse button */
393  MOUSE_RBUTTON = 4, /**< Mask that matches only right mouse button */
394  MOUSE_BUTTON_ANY = 7 /**< Mask that matches any mouse button */
395  } MouseButtonType;
396 
397  unsigned char _buttonMask; /**< bitfield: which button was pressed for this event ( MouseButtonType )*/
398  unsigned char _clicks; /**< # of times a button was pressed */
399  int _modifiers; /**< bitfield: which buttons or modifiers were depressed before event ( \sa SpecialKeyState) */
400 
401  MouseEvent()
402  : _buttonMask( 0 )
403  , _clicks( 0 )
404  , _modifiers( NONE_STATE )
405  {
407  }
408 
409  inline unsigned char ButtonMask() { return _buttonMask; }
410  inline void ButtonMask( unsigned char value ) { _buttonMask = value; }
411 
412  inline unsigned char Clicks() { return _clicks; }
413  inline void Clicks( unsigned char value ) { _clicks = value; }
414 
415  inline int Modifiers() { return _modifiers; }
416  inline void Modifiers( int value ) { _modifiers = value; }
417  };
418 
419  /** An event containing keyboard input */
421  {
422  public:
423  // Keyboard key enum used by keysym (use ascii letters for all other keys):
424  enum
425  {
426  KEY_Button = 0xfee8,
427  KEY_BackSpace = 0xff08,
428  KEY_Tab = 0xff09,
429  KEY_Enter = 0xff0d,
430  KEY_Pause = 0xff13,
431  KEY_Scroll_Lock = 0xff14,
432  KEY_Escape = 0xff1b,
433  KEY_Home = 0xff50,
434  KEY_Left = 0xff51,
435  KEY_Up = 0xff52,
436  KEY_Right = 0xff53,
437  KEY_Down = 0xff54,
438  KEY_Page_Up = 0xff55,
439  KEY_Page_Down = 0xff56,
440  KEY_End = 0xff57,
441  KEY_Print = 0xff61,
442  KEY_Insert = 0xff63,
443  KEY_Menu = 0xff67,
444  KEY_Num_Lock = 0xff7f,
445  KEY_KP = 0xff80,
446  KEY_KP_Enter = 0xff8d,
447  KEY_KP_Last = 0xffbd,
448  KEY_F = 0xffbd,
449  KEY_F_Last = 0xffe0,
450  KEY_Shift_L = 0xffe1,
451  KEY_Shift_R = 0xffe2,
452  KEY_Control_L = 0xffe3,
453  KEY_Control_R = 0xffe4,
454  KEY_Caps_Lock = 0xffe5,
455  KEY_Meta_L = 0xffe7,
456  KEY_Meta_R = 0xffe8,
457  KEY_Alt_L = 0xffe9,
458  KEY_Alt_R = 0xffea,
459  KEY_Delete = 0xffff
460  } KeySymCodeEnum;
461 
462  int _keysym; /**< Code for key that was pressed ( \sa KeySymCodeEnum) */
463  int _modifiers; /**< bitfield: which modifiers or buttons were pressed ( \sa SpecialKeyState) */
464 
465  KeyboardEvent()
466  : _keysym( 0 )
467  , _modifiers( 0 )
468  {
470  }
471 
472  inline int KeySym() { return _keysym; }
473  inline void KeySym( int value ) { _keysym = value; }
474 
475  inline int Modifiers() { return _modifiers; }
476  inline void Modifiers( int value ) { _modifiers = value; }
477  };
478 
479  /** An event that is emitted from a simulation object */
480  class ObjectEvent : public Event
481  {
482  public:
483  char* _initiator; /**< The qualified name of the object that initiated the event */
484  char* _eventName; /**< String event name */
485  char* _eventData; /**< Any additional data for this event. A NULL terminated string */
486 
487  ObjectEvent()
488  : _initiator( 0 )
489  , _eventName( 0 )
490  , _eventData( 0 )
491  {
493  }
494 
495  virtual ~ObjectEvent()
496  {
497  if( _initiator )
498  {
499  delete _initiator;
500  _initiator = 0;
501  }
502  if( _eventName )
503  {
504  delete _eventName;
505  _eventName = 0;
506  }
507  if( _eventData )
508  {
509  delete _eventData;
510  _eventData = 0;
511  }
512  }
513 
514  // Get the initiator name
515  inline const char* Initiator() const
516  {
517  return _initiator;
518  }
519  // Set the initiator name
520  virtual void Initiator( const char* value )
521  {
522  if( _initiator )
523  {
524  delete[] _initiator;
525  _initiator = 0;
526  }
527  if( value )
528  {
529  _initiator = new char[ RSOInterface1::strlen( value ) + 1 ];
530  RSOInterface1::strcpy( _initiator, value );
531  }
532  }
533 
534  // Get the event name
535  inline const char* EventName() const
536  {
537  return _eventName;
538  }
539  // Set the event name
540  virtual void EventName( const char* value )
541  {
542  if( _eventName )
543  {
544  delete[] _eventName;
545  _eventName = 0;
546  }
547  if( value )
548  {
549  _eventName = new char[ RSOInterface1::strlen( value ) + 1 ];
550  RSOInterface1::strcpy( _eventName, value );
551  }
552  }
553 
554  // Get the event data
555  inline const char* EventData() const
556  {
557  return _eventData;
558  }
559  // Set the event data
560  virtual void EventData( const char* value )
561  {
562  if( _eventData )
563  {
564  delete[] _eventData;
565  _eventData = 0;
566  }
567  if( value )
568  {
569  _eventData = new char[ RSOInterface1::strlen( value ) + 1 ];
570  RSOInterface1::strcpy( _eventData, value );
571  }
572  }
573  };
574 
575  /** The emitted event handler is an object provided by the
576  container to handle events emitted from the component.
577  */
579  {
580  protected:
581  virtual ~EmittedEventHandler() {}
582 
583  public:
584  /// Called by the component to pass an event
585  /// to the container. Most containers will only handle
586  /// ObjectEvents.
587  /// \returns int Reserved. Currently always -1.
588  virtual int HandleEvent( Event* ev ) = 0;
589  };
590 
591  /** The resource filter is a parameter to the GetResources method */
593  {
594  protected:
595  virtual ~ResourceFilter() {}
596 
597  public:
598  /// How many levels of qualification to show in the name.
599  /// -1 means full qualification.
600  /// Default: 0 // TODO: confirm this default
601  virtual int LevelsUp() const = 0;
602  virtual void LevelsUp( int value ) = 0;
603 
604  /// How many levels of children to show.
605  /// 0 means don't show any children properties
606  /// -1 means all the way down.
607  /// Default: -1
608  virtual int GroupLevelsDown() const = 0;
609  virtual void GroupLevelsDown( int value ) = 0;
610 
611  /// If true, only a list of names will be returned.
612  /// Values will not be returned.
613  /// The format changes to not include the ":".
614  /// Default: false
615  virtual bool NamesOnly() const = 0;
616  virtual void NamesOnly( bool value ) = 0;
617 
618  /// Manage the list of excluded attributes
619  virtual void AddExclude( const char* str ) = 0;
620  /// Returns the number of entries in the exclude list.
621  /// Default: 0
622  virtual int ExcludeCount() const = 0;
623  /// Returns NULL if index >= ExcludeCount() or index < -1
624  virtual const char* GetExclude( int index ) const = 0;
625 
626  /// Manage the list of included attributes
627  virtual void AddInclude( const char* str ) = 0;
628  /// Returns the number of entries in the include list.
629  /// Default: 0
630  virtual int IncludeCount() const = 0;
631  // Returns NULL if index >= IncludeCount() or index < -1
632  virtual const char* GetInclude( int index ) const = 0;
633 
634  /// Check a name against the filters
635  /// Exclude list takes precedence
636  virtual bool PassFilter( const char* name ) const = 0;
637  };
638 
639  ////////////////////////////////////////////////////////////////////////////////
640  // Support class utility methods
641  ////////////////////////////////////////////////////////////////////////////////
642 
643  static inline unsigned int strlen( const char* str )
644  {
645  unsigned int i = 0;
646  while( str[ i ] != '\0' )
647  {
648  i++;
649  }
650  return i;
651  }
652 
653  static inline char* strcpy( char* dest, const char* src )
654  {
655  unsigned int i = 0;
656  while( ( dest[ i ] = src[ i ] ) != '\0' )
657  {
658  i++;
659  }
660  return dest;
661  }
662 };
663 
664 } // end namespace disti
665 
666 #endif
virtual RSOInterface1 * CloneObject()=0
Definition: rso_interface_1.h:578
virtual int IncludeCount() const =0
virtual bool PassFilter(const char *name) const =0
MouseButtonType
Definition: rso_interface_1.h:389
Definition: rso_interface_1.h:420
virtual bool SetEmittedEventHandler(EmittedEventHandler *handler)=0
Definition: rso_interface_1.h:290
EventSubtypeEnum
Definition: rso_interface_1.h:316
Culler()
Definition: rso_interface_1.h:296
unsigned char _buttonMask
Definition: rso_interface_1.h:397
unsigned short _eventSubtype
Definition: rso_interface_1.h:329
char * _eventName
Definition: rso_interface_1.h:484
Definition: rso_interface_1.h:308
Definition: rso_interface_1.h:322
virtual void SetResource(const char *resourceName, const char *resourceVal)=0
Set the string value for a given named resource.
virtual bool HandleInput(Event *ev)=0
Definition: rso_interface_1.h:311
virtual const char * GetResources(ResourceFilter *filter=0)=0
Definition: rso_interface_1.h:393
virtual int LevelsUp() const =0
Definition: rso_interface_1.h:392
virtual const char * GetExclude(int index) const =0
Returns NULL if index >= ExcludeCount() or index < -1.
virtual bool NamesOnly() const =0
virtual bool GetBoundingSphere(Vector *center, float *radius)=0
virtual const char * GetResource(const char *resourceName)=0
Get the string value for the given resource.
char * _initiator
Definition: rso_interface_1.h:483
virtual ~RSOInterface1()
Protected destructor so it can't be deleted directly.
Definition: rso_interface_1.h:177
int _modifiers
Definition: rso_interface_1.h:463
Definition: rso_interface_1.h:302
int _keysym
Definition: rso_interface_1.h:462
virtual void PreDraw(const OpenGLMatrices &current, Culler &culler)=0
Definition: rso_interface_1.h:319
virtual void DeleteInstance()=0
Safely delete the object.
unsigned short _eventType
Definition: rso_interface_1.h:328
Definition: rso_interface_1.h:592
Definition: rso_interface_1.h:309
Definition: rso_interface_1.h:312
Definition: rso_interface_1.h:60
Definition: rso_interface_1.h:209
Definition: rso_interface_1.h:321
virtual void Draw()=0
Definition: rso_interface_1.h:367
Definition: rso_interface_1.h:480
Definition: rso_interface_1.h:391
PlaneClass _planes[6]
Definition: rso_interface_1.h:294
Definition: rso_interface_1.h:185
virtual void Calculate(double time)=0
The RSO Interface methods.
Definition: rso_interface_1.h:242
Definition: rso_interface_1.h:310
virtual bool GetBoundingBox(Vector *min, Vector *max, const MatrixD *transform=0)=0
virtual bool Pick3D(const Vector &winLoc, const Vector &logicalCoords, float scale, const Vector &directionVector, Vector &collisionWinLoc, const OpenGLMatrices &drawnMatrices)=0
Pick3D returns true if the RSO was picked.
EventTypeEnum
Definition: rso_interface_1.h:306
virtual int GroupLevelsDown() const =0
Vector _winLoc
Definition: rso_interface_1.h:370
Definition: rso_interface_1.h:263
Definition: rso_interface_1.h:320
int _modifiers
Definition: rso_interface_1.h:399
Definition: rso_interface_1.h:325
char * _eventData
Definition: rso_interface_1.h:485
unsigned char _clicks
Definition: rso_interface_1.h:398
PlaneClass()
Definition: rso_interface_1.h:268
Definition: rso_interface_1.h:323
Definition: rso_interface_1.h:46
virtual void AddExclude(const char *str)=0
Manage the list of excluded attributes.
Definition: rso_interface_1.h:385
SpecialKeyState
Definition: rso_interface_1.h:334
Definition: rso_interface_1.h:324
Definition: rso_interface_1.h:318
virtual int ExcludeCount() const =0
virtual int HandleEvent(Event *ev)=0
virtual void AddInclude(const char *str)=0
Manage the list of included attributes.