GlsRSOLoader API  1.2.4
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
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  //@{
267  float _a, _b, _c, _d; /**< Coefficients to describe a 3D plane: aX + bY + cZ + d = 0 */
268  //@}
269 
270  PlaneClass()
271  : _a( 0 )
272  , _b( 0 )
273  , _c( 0 )
274  , _d( 0 )
275  {}
276 
277  inline void Set( float a, float b, float c, float d )
278  {
279  _a = a;
280  _b = b;
281  _c = c;
282  _d = d;
283  }
284 
285  inline float A() { return _a; }
286  inline float B() { return _b; }
287  inline float C() { return _c; }
288  inline float D() { return _d; }
289  };
290 
291  /** Defines culling parameters for PreDraw */
292  class Culler
293  {
294  public:
295  bool _enabled; /**< Whether or not culling is enabled */
296  PlaneClass _planes[ 6 ]; /**< Array of six clipping planes to define the frustum */
297 
298  Culler()
299  : _enabled( false )
300  {}
301  };
302 
303  /** Base class for events */
304  class Event
305  {
306  public:
307  /** Event Type Enum */
308  typedef enum
309  {
310  EVENT_MOUSE = 0, /**< A Mouse (or touch screen) event */
311  EVENT_KEYBOARD, /**< A Keyboard event */
312  EVENT_TIMER, /**< Unused */
313  EVENT_OBJECT, /**< An event emitted by an object */
314  EVENT_KEYBOARD_UP /**< A Keyboard up event (uses KeyboardEvent class) */
315  } EventTypeEnum;
316 
317  /** Event Subtype Enum */
318  typedef enum
319  {
320  MOUSE_DOWN = 0, /**< A Mouse button was pushed down */
321  MOUSE_UP, /**< A Mouse button was released */
322  MOUSE_MOVE, /**< The mouse moved */
323  MOUSE_DRAG, /**< The mouse moved while a button was held down */
324  MOUSE_LEAVE, /**< The mouse exited the object */
325  MOUSE_ENTER, /**< The mouse entered the object */
326  MOUSE_WHEEL_MINUS, /**< The mouse wheel was turned in the negative direction */
327  MOUSE_WHEEL_PLUS /**< The mouse wheel was turned in the positive direction */
329 
330  unsigned short _eventType; /**< Major event code. see EventTypeEnum */
331  unsigned short _eventSubtype; /**< Minor event code. see EventSubtypeEnum */
332 
333  /**
334  Special Key State
335  */
336  typedef enum
337  {
338  NONE_STATE = 0,
339  SHIFT_STATE = 0x00010000,
340  CAPS_LOCK_STATE = 0x00020000,
341  CTRL_STATE = 0x00040000,
342  ALT_STATE = 0x00080000,
343  NUM_LOCK_STATE = 0x00100000,
344  META_STATE = 0x00400000,
345  SCROLL_LOCK_STATE = 0x00800000,
346  BUTTON1_STATE = 0x01000000,
347  BUTTON2_STATE = 0x02000000,
348  BUTTON3_STATE = 0x04000000
349  } SpecialKeyState;
350 
351  Event()
352  : _eventType( 0 )
353  , // Derived classes MUST set the appropriate event type
354  _eventSubtype( MOUSE_DOWN )
355  {}
356 
357  virtual ~Event() {}
358 
359  inline unsigned short EventType() { return _eventType; }
360  inline void EventType( unsigned short value ) { _eventType = value; }
361 
362  inline unsigned short EventSubType() { return _eventSubtype; }
363  inline void EventSubType( unsigned short value ) { _eventSubtype = value; }
364  };
365 
366  /** An event associated with a specific location in the application window.
367  * Base class for MouseEvent and KeyboardEvent.
368  */
369  class LocationEvent : public Event
370  {
371  public:
372  Vector _winLoc; /**< Location of the event in window coordinates
373  * x and y window coordinates in pixels.
374  * z is from 0.0 -> 1.0 and represents the depth.
375  * z == 0 is at the near cliping plane.
376  * z == 0.5 represents half way between near
377  * and far cliping planes.
378  */
379  LocationEvent()
380  {}
381 
382  inline Vector WinLoc() { return _winLoc; }
383  inline void WinLoc( Vector value ) { _winLoc = value; }
384  };
385 
386  /** An event containing mouse input. */
387  class MouseEvent : public LocationEvent
388  {
389  public:
390  /** Mouse Button Type */
391  typedef enum
392  {
393  MOUSE_LBUTTON = 1, /**< Mask that matches only left mouse button */
394  MOUSE_MBUTTON = 2, /**< Mask that matches only middle mouse button */
395  MOUSE_RBUTTON = 4, /**< Mask that matches only right mouse button */
396  MOUSE_BUTTON_ANY = 7 /**< Mask that matches any mouse button */
397  } MouseButtonType;
398 
399  unsigned char _buttonMask; /**< bitfield: which button was pressed for this event ( MouseButtonType )*/
400  unsigned char _clicks; /**< # of times a button was pressed */
401  int _modifiers; /**< bitfield: which buttons or modifiers were depressed before event ( \sa SpecialKeyState) */
402 
403  MouseEvent()
404  : _buttonMask( 0 )
405  , _clicks( 0 )
406  , _modifiers( NONE_STATE )
407  {
409  }
410 
411  inline unsigned char ButtonMask() { return _buttonMask; }
412  inline void ButtonMask( unsigned char value ) { _buttonMask = value; }
413 
414  inline unsigned char Clicks() { return _clicks; }
415  inline void Clicks( unsigned char value ) { _clicks = value; }
416 
417  inline int Modifiers() { return _modifiers; }
418  inline void Modifiers( int value ) { _modifiers = value; }
419  };
420 
421  /** An event containing keyboard input */
423  {
424  public:
425  /// Keyboard key enum used by keysym (use ascii letters for all other keys):
426  enum
427  {
428  KEY_Button = 0xfee8,
429  KEY_BackSpace = 0xff08,
430  KEY_Tab = 0xff09,
431  KEY_Enter = 0xff0d,
432  KEY_Pause = 0xff13,
433  KEY_Scroll_Lock = 0xff14,
434  KEY_Escape = 0xff1b,
435  KEY_Home = 0xff50,
436  KEY_Left = 0xff51,
437  KEY_Up = 0xff52,
438  KEY_Right = 0xff53,
439  KEY_Down = 0xff54,
440  KEY_Page_Up = 0xff55,
441  KEY_Page_Down = 0xff56,
442  KEY_End = 0xff57,
443  KEY_Print = 0xff61,
444  KEY_Insert = 0xff63,
445  KEY_Menu = 0xff67,
446  KEY_Num_Lock = 0xff7f,
447  KEY_KP = 0xff80,
448  KEY_KP_Enter = 0xff8d,
449  KEY_KP_Last = 0xffbd,
450  KEY_F = 0xffbd,
451  KEY_F_Last = 0xffe0,
452  KEY_Shift_L = 0xffe1,
453  KEY_Shift_R = 0xffe2,
454  KEY_Control_L = 0xffe3,
455  KEY_Control_R = 0xffe4,
456  KEY_Caps_Lock = 0xffe5,
457  KEY_Meta_L = 0xffe7,
458  KEY_Meta_R = 0xffe8,
459  KEY_Alt_L = 0xffe9,
460  KEY_Alt_R = 0xffea,
461  KEY_Delete = 0xffff
462  } KeySymCodeEnum;
463 
464  int _keysym; /**< Code for key that was pressed \sa KeySymCodeEnum */
465  int _modifiers; /**< bitfield: which modifiers or buttons were pressed \sa SpecialKeyState */
466 
467  KeyboardEvent()
468  : _keysym( 0 )
469  , _modifiers( 0 )
470  {
472  }
473 
474  inline int KeySym() { return _keysym; }
475  inline void KeySym( int value ) { _keysym = value; }
476 
477  inline int Modifiers() { return _modifiers; }
478  inline void Modifiers( int value ) { _modifiers = value; }
479  };
480 
481  /** An event that is emitted from a simulation object */
482  class ObjectEvent : public Event
483  {
484  public:
485  char* _initiator; /**< The qualified name of the object that initiated the event */
486  char* _eventName; /**< String event name */
487  char* _eventData; /**< Any additional data for this event. A NULL terminated string */
488 
489  ObjectEvent()
490  : _initiator( 0 )
491  , _eventName( 0 )
492  , _eventData( 0 )
493  {
495  }
496 
497  virtual ~ObjectEvent()
498  {
499  if( _initiator )
500  {
501  delete _initiator;
502  _initiator = 0;
503  }
504  if( _eventName )
505  {
506  delete _eventName;
507  _eventName = 0;
508  }
509  if( _eventData )
510  {
511  delete _eventData;
512  _eventData = 0;
513  }
514  }
515 
516  /// Get the initiator name
517  inline const char* Initiator() const
518  {
519  return _initiator;
520  }
521  /// Set the initiator name
522  virtual void Initiator( const char* value )
523  {
524  if( _initiator )
525  {
526  delete[] _initiator;
527  _initiator = 0;
528  }
529  if( value )
530  {
531  _initiator = new char[ RSOInterface1::strlen( value ) + 1 ];
532  RSOInterface1::strcpy( _initiator, value );
533  }
534  }
535 
536  /// Get the event name
537  inline const char* EventName() const
538  {
539  return _eventName;
540  }
541  /// Set the event name
542  virtual void EventName( const char* value )
543  {
544  if( _eventName )
545  {
546  delete[] _eventName;
547  _eventName = 0;
548  }
549  if( value )
550  {
551  _eventName = new char[ RSOInterface1::strlen( value ) + 1 ];
552  RSOInterface1::strcpy( _eventName, value );
553  }
554  }
555 
556  /// Get the event data
557  inline const char* EventData() const
558  {
559  return _eventData;
560  }
561  /// Set the event data
562  virtual void EventData( const char* value )
563  {
564  if( _eventData )
565  {
566  delete[] _eventData;
567  _eventData = 0;
568  }
569  if( value )
570  {
571  _eventData = new char[ RSOInterface1::strlen( value ) + 1 ];
572  RSOInterface1::strcpy( _eventData, value );
573  }
574  }
575  };
576 
577  /** The emitted event handler is an object provided by the
578  container to handle events emitted from the component.
579  */
581  {
582  protected:
583  virtual ~EmittedEventHandler() {}
584 
585  public:
586  /// Called by the component to pass an event
587  /// to the container. Most containers will only handle
588  /// ObjectEvents.
589  /// \returns int Reserved. Currently always -1.
590  virtual int HandleEvent( Event* ev ) = 0;
591  };
592 
593  /** The resource filter is a parameter to the GetResources method */
595  {
596  protected:
597  virtual ~ResourceFilter() {}
598 
599  public:
600  /// How many levels of qualification to show in the name.
601  /// -1 means full qualification.
602  /// Default: 0 // TODO: confirm this default
603  virtual int LevelsUp() const = 0;
604  virtual void LevelsUp( int value ) = 0;
605 
606  /// How many levels of children to show.
607  /// 0 means don't show any children properties
608  /// -1 means all the way down.
609  /// Default: -1
610  virtual int GroupLevelsDown() const = 0;
611  virtual void GroupLevelsDown( int value ) = 0;
612 
613  /// If true, only a list of names will be returned.
614  /// Values will not be returned.
615  /// The format changes to not include the ":".
616  /// Default: false
617  virtual bool NamesOnly() const = 0;
618  virtual void NamesOnly( bool value ) = 0;
619 
620  /// Manage the list of excluded attributes
621  virtual void AddExclude( const char* str ) = 0;
622  /// Returns the number of entries in the exclude list.
623  /// Default: 0
624  virtual int ExcludeCount() const = 0;
625  /// Returns NULL if index >= ExcludeCount() or index < -1
626  virtual const char* GetExclude( int index ) const = 0;
627 
628  /// Manage the list of included attributes
629  virtual void AddInclude( const char* str ) = 0;
630  /// Returns the number of entries in the include list.
631  /// Default: 0
632  virtual int IncludeCount() const = 0;
633  // Returns NULL if index >= IncludeCount() or index < -1
634  virtual const char* GetInclude( int index ) const = 0;
635 
636  /// Check a name against the filters
637  /// Exclude list takes precedence
638  virtual bool PassFilter( const char* name ) const = 0;
639  };
640 
641  ////////////////////////////////////////////////////////////////////////////////
642  // Support class utility methods
643  ////////////////////////////////////////////////////////////////////////////////
644 
645  static inline unsigned int strlen( const char* str )
646  {
647  unsigned int i = 0;
648  while( str[ i ] != '\0' )
649  {
650  i++;
651  }
652  return i;
653  }
654 
655  static inline char* strcpy( char* dest, const char* src )
656  {
657  unsigned int i = 0;
658  while( ( dest[ i ] = src[ i ] ) != '\0' )
659  {
660  i++;
661  }
662  return dest;
663  }
664 };
665 
666 } // end namespace disti
667 
668 #endif
virtual RSOInterface1 * CloneObject()=0
double _data[4 *4]
raw column-major matrix data
Definition: rso_interface_1.h:213
Definition: rso_interface_1.h:580
bool _enabled
Definition: rso_interface_1.h:295
virtual int IncludeCount() const =0
virtual bool PassFilter(const char *name) const =0
MouseButtonType
Definition: rso_interface_1.h:391
Definition: rso_interface_1.h:422
MatrixD(double *data)
Copy from data.
Definition: rso_interface_1.h:220
virtual bool SetEmittedEventHandler(EmittedEventHandler *handler)=0
Definition: rso_interface_1.h:292
EventSubtypeEnum
Definition: rso_interface_1.h:318
unsigned char _buttonMask
Definition: rso_interface_1.h:399
unsigned short _eventSubtype
Definition: rso_interface_1.h:331
char * _eventName
Definition: rso_interface_1.h:486
Definition: rso_interface_1.h:310
const char * EventData() const
Get the event data.
Definition: rso_interface_1.h:557
virtual void EventData(const char *value)
Set the event data.
Definition: rso_interface_1.h:562
Definition: rso_interface_1.h:324
virtual void SetResource(const char *resourceName, const char *resourceVal)=0
Set the string value for a given named resource.
float _c
Definition: rso_interface_1.h:267
virtual bool HandleInput(Event *ev)=0
Definition: rso_interface_1.h:313
virtual const char * GetResources(ResourceFilter *filter=0)=0
Definition: rso_interface_1.h:395
virtual int LevelsUp() const =0
Definition: rso_interface_1.h:394
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:485
virtual ~RSOInterface1()
Protected destructor so it can't be deleted directly.
Definition: rso_interface_1.h:177
int _modifiers
Definition: rso_interface_1.h:465
float _d
Definition: rso_interface_1.h:267
Definition: rso_interface_1.h:304
int _keysym
Definition: rso_interface_1.h:464
virtual void PreDraw(const OpenGLMatrices &current, Culler &culler)=0
Definition: rso_interface_1.h:321
virtual void DeleteInstance()=0
Safely delete the object.
unsigned short _eventType
Definition: rso_interface_1.h:330
Definition: rso_interface_1.h:594
const char * EventName() const
Get the event name.
Definition: rso_interface_1.h:537
Definition: rso_interface_1.h:311
Definition: rso_interface_1.h:314
Definition: rso_interface_1.h:60
Definition: rso_interface_1.h:209
Definition: rso_interface_1.h:323
MatrixD()
Uninitialized data.
Definition: rso_interface_1.h:216
const char * Initiator() const
Get the initiator name.
Definition: rso_interface_1.h:517
virtual void Draw()=0
Definition: rso_interface_1.h:369
Definition: rso_interface_1.h:482
Definition: rso_interface_1.h:393
PlaneClass _planes[6]
Definition: rso_interface_1.h:296
Definition: rso_interface_1.h:185
float _b
Definition: rso_interface_1.h:267
virtual void Calculate(double time)=0
The RSO Interface methods.
Definition: rso_interface_1.h:242
Definition: rso_interface_1.h:312
virtual bool GetBoundingBox(Vector *min, Vector *max, const MatrixD *transform=0)=0
virtual void Initiator(const char *value)
Set the initiator name.
Definition: rso_interface_1.h:522
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.
int * _viewPort
Definition: rso_interface_1.h:245
EventTypeEnum
Definition: rso_interface_1.h:308
float _a
Definition: rso_interface_1.h:267
virtual int GroupLevelsDown() const =0
Vector _winLoc
Definition: rso_interface_1.h:372
Definition: rso_interface_1.h:263
Definition: rso_interface_1.h:322
int _modifiers
Definition: rso_interface_1.h:401
Definition: rso_interface_1.h:327
char * _eventData
Definition: rso_interface_1.h:487
unsigned char _clicks
Definition: rso_interface_1.h:400
enum disti::RSOInterface1::KeyboardEvent::@0 KeySymCodeEnum
Keyboard key enum used by keysym (use ascii letters for all other keys):
Definition: rso_interface_1.h:325
Definition: rso_interface_1.h:46
virtual void AddExclude(const char *str)=0
Manage the list of excluded attributes.
virtual void EventName(const char *value)
Set the event name.
Definition: rso_interface_1.h:542
Definition: rso_interface_1.h:387
SpecialKeyState
Definition: rso_interface_1.h:336
Definition: rso_interface_1.h:326
Definition: rso_interface_1.h:320
virtual int ExcludeCount() const =0
virtual int HandleEvent(Event *ev)=0
virtual void AddInclude(const char *str)=0
Manage the list of included attributes.