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