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; }
213 double _data[ 4 * 4 ];
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 )
266 float _a, _b, _c, _d;
275 inline void Set(
float a,
float b,
float c,
float d )
283 inline float A() {
return _a; }
284 inline float B() {
return _b; }
285 inline float C() {
return _c; }
286 inline float D() {
return _d; }
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
357 inline unsigned short EventType() {
return _eventType; }
358 inline void EventType(
unsigned short value ) { _eventType = value; }
360 inline unsigned short EventSubType() {
return _eventSubtype; }
361 inline void EventSubType(
unsigned short value ) { _eventSubtype = value; }
381 inline void WinLoc(
Vector value ) { _winLoc = value; }
404 , _modifiers( NONE_STATE )
409 inline unsigned char ButtonMask() {
return _buttonMask; }
410 inline void ButtonMask(
unsigned char value ) { _buttonMask = value; }
412 inline unsigned char Clicks() {
return _clicks; }
413 inline void Clicks(
unsigned char value ) { _clicks = value; }
416 inline void Modifiers(
int value ) { _modifiers = value; }
427 KEY_BackSpace = 0xff08,
431 KEY_Scroll_Lock = 0xff14,
438 KEY_Page_Up = 0xff55,
439 KEY_Page_Down = 0xff56,
444 KEY_Num_Lock = 0xff7f,
446 KEY_KP_Enter = 0xff8d,
447 KEY_KP_Last = 0xffbd,
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,
472 inline int KeySym() {
return _keysym; }
473 inline void KeySym(
int value ) { _keysym = value; }
476 inline void Modifiers(
int value ) { _modifiers = value; }
515 inline const char* Initiator()
const
520 virtual void Initiator(
const char* value )
529 _initiator =
new char[ RSOInterface1::strlen( value ) + 1 ];
530 RSOInterface1::strcpy( _initiator, value );
535 inline const char* EventName()
const
540 virtual void EventName(
const char* value )
549 _eventName =
new char[ RSOInterface1::strlen( value ) + 1 ];
550 RSOInterface1::strcpy( _eventName, value );
555 inline const char* EventData()
const
560 virtual void EventData(
const char* value )
569 _eventData =
new char[ RSOInterface1::strlen( value ) + 1 ];
570 RSOInterface1::strcpy( _eventData, value );
602 virtual void LevelsUp(
int value ) = 0;
616 virtual void NamesOnly(
bool value ) = 0;
619 virtual void AddExclude(
const char* str ) = 0;
624 virtual const char*
GetExclude(
int index )
const = 0;
627 virtual void AddInclude(
const char* str ) = 0;
632 virtual const char* GetInclude(
int index )
const = 0;
636 virtual bool PassFilter(
const char* name )
const = 0;
643 static inline unsigned int strlen(
const char* str )
646 while( str[ i ] !=
'\0' )
653 static inline char* strcpy(
char* dest,
const char* src )
656 while( ( dest[ i ] = src[ i ] ) !=
'\0' )
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 ¤t, 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
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:394
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: bmpimage.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.