40 #ifndef _RSO_INTERFACE_1_H
41 #define _RSO_INTERFACE_1_H
89 virtual void Calculate(
double time ) = 0;
101 virtual void Draw() = 0;
106 virtual void SetResource(
const char* resourceName,
const char* resourceVal ) = 0;
111 virtual const char*
GetResource(
const char* resourceName ) = 0;
138 const Vector& logicalCoords,
140 const Vector& directionVector,
196 inline void Set(
float x,
float y,
float z )
203 inline float X() {
return _x; }
204 inline float Y() {
return _y; }
205 inline float Z() {
return _z; }
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 ];
256 : _viewPort( viewPort )
257 , _projMatrix( projMatrix )
258 , _modelMatrix( modelMatrix )
277 inline void Set(
float a,
float b,
float c,
float d )
285 inline float A() {
return _a; }
286 inline float B() {
return _b; }
287 inline float C() {
return _c; }
288 inline float D() {
return _d; }
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
359 inline unsigned short EventType() {
return _eventType; }
360 inline void EventType(
unsigned short value ) { _eventType = value; }
362 inline unsigned short EventSubType() {
return _eventSubtype; }
363 inline void EventSubType(
unsigned short value ) { _eventSubtype = value; }
383 inline void WinLoc( Vector value ) { _winLoc = value; }
406 , _modifiers( NONE_STATE )
411 inline unsigned char ButtonMask() {
return _buttonMask; }
412 inline void ButtonMask(
unsigned char value ) { _buttonMask = value; }
414 inline unsigned char Clicks() {
return _clicks; }
415 inline void Clicks(
unsigned char value ) { _clicks = value; }
418 inline void Modifiers(
int value ) { _modifiers = value; }
429 KEY_BackSpace = 0xff08,
433 KEY_Scroll_Lock = 0xff14,
440 KEY_Page_Up = 0xff55,
441 KEY_Page_Down = 0xff56,
446 KEY_Num_Lock = 0xff7f,
448 KEY_KP_Enter = 0xff8d,
449 KEY_KP_Last = 0xffbd,
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,
474 inline int KeySym() {
return _keysym; }
475 inline void KeySym(
int value ) { _keysym = value; }
478 inline void Modifiers(
int value ) { _modifiers = value; }
531 _initiator =
new char[ RSOInterface1::strlen( value ) + 1 ];
532 RSOInterface1::strcpy( _initiator, value );
551 _eventName =
new char[ RSOInterface1::strlen( value ) + 1 ];
552 RSOInterface1::strcpy( _eventName, value );
571 _eventData =
new char[ RSOInterface1::strlen( value ) + 1 ];
572 RSOInterface1::strcpy( _eventData, value );
604 virtual void LevelsUp(
int value ) = 0;
618 virtual void NamesOnly(
bool value ) = 0;
621 virtual void AddExclude(
const char* str ) = 0;
626 virtual const char*
GetExclude(
int index )
const = 0;
629 virtual void AddInclude(
const char* str ) = 0;
634 virtual const char* GetInclude(
int index )
const = 0;
638 virtual bool PassFilter(
const char* name )
const = 0;
645 static inline unsigned int strlen(
const char* str )
648 while( str[ i ] !=
'\0' )
655 static inline char* strcpy(
char* dest,
const char* src )
658 while( ( dest[ i ] = src[ i ] ) !=
'\0' )
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 ¤t, 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
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:396
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.