40 #ifndef _RSO_INTERFACE_1_H
41 #define _RSO_INTERFACE_1_H
92 virtual void Calculate(
double time) = 0;
104 virtual void Draw() = 0;
109 virtual void SetResource(
const char* resourceName,
const char* resourceVal) = 0;
114 virtual const char* GetResource(
const char* resourceName) = 0;
127 virtual bool HandleInput(
Event *ev) = 0;
140 virtual bool Pick3D(
const Vector& winLoc,
141 const Vector& logicalCoords,
143 const Vector& directionVector,
153 virtual bool GetBoundingSphere(
Vector* center,
float* radius) = 0;
173 virtual void DeleteInstance() = 0;
196 inline void Set(
float x,
float y,
float z) { _x = x; _y = y; _z = z; }
198 inline float X() {
return _x; }
199 inline float Y() {
return _y; }
200 inline float Z() {
return _z; }
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];
240 _projMatrix(projMatrix),
241 _modelMatrix(modelMatrix)
252 _a(0),_b(0),_c(0),_d(0)
255 inline void Set(
float a,
float b,
float c,
float d) { _a = a; _b = b; _c = c; _d = d; }
257 inline float A() {
return _a; }
258 inline float B() {
return _b; }
259 inline float C() {
return _c; }
260 inline float D() {
return _d; }
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
330 inline unsigned short EventType() {
return _eventType; }
331 inline void EventType(
unsigned short value) { _eventType = value; }
333 inline unsigned short EventSubType() {
return _eventSubtype; }
334 inline void EventSubType(
unsigned short value) { _eventSubtype = value; }
354 inline void WinLoc(
Vector value) { _winLoc = value; }
377 _modifiers(NONE_STATE)
382 inline unsigned char ButtonMask() {
return _buttonMask; }
383 inline void ButtonMask(
unsigned char value) { _buttonMask = value; }
385 inline unsigned char Clicks() {
return _clicks; }
386 inline void Clicks(
unsigned char value) { _clicks = value; }
389 inline void Modifiers(
int value) { _modifiers = value; }
400 KEY_BackSpace = 0xff08,
404 KEY_Scroll_Lock = 0xff14,
411 KEY_Page_Up = 0xff55,
412 KEY_Page_Down = 0xff56,
417 KEY_Num_Lock = 0xff7f,
419 KEY_KP_Enter = 0xff8d,
420 KEY_KP_Last = 0xffbd,
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,
445 inline int KeySym() {
return _keysym; }
446 inline void KeySym(
int value) { _keysym = value; }
449 inline void Modifiers(
int value) { _modifiers = value; }
488 inline const char* Initiator()
const
493 virtual void Initiator(
const char* value)
502 _initiator =
new char[RSOInterface1::strlen(value)+1];
503 RSOInterface1::strcpy(_initiator,value);
508 inline const char* EventName()
const
513 virtual void EventName(
const char* value)
522 _eventName =
new char[RSOInterface1::strlen(value)+1];
523 RSOInterface1::strcpy(_eventName,value);
528 inline const char* EventData()
const
533 virtual void EventData(
const char* value)
542 _eventData =
new char[RSOInterface1::strlen(value)+1];
543 RSOInterface1::strcpy(_eventData,value);
560 virtual int HandleEvent(
Event *ev) = 0;
572 virtual int LevelsUp()
const = 0;
573 virtual void LevelsUp(
int value) = 0;
579 virtual int GroupLevelsDown()
const = 0;
580 virtual void GroupLevelsDown(
int value) = 0;
586 virtual bool NamesOnly()
const = 0;
587 virtual void NamesOnly(
bool value) = 0;
590 virtual void AddExclude(
const char* str) = 0;
593 virtual int ExcludeCount()
const = 0;
595 virtual const char* GetExclude(
int index)
const = 0;
598 virtual void AddInclude(
const char* str) = 0;
601 virtual int IncludeCount()
const = 0;
603 virtual const char* GetInclude(
int index)
const = 0;
607 virtual bool PassFilter(
const char* name)
const = 0;
614 static inline unsigned int strlen(
const char* str)
617 while(str[i] !=
'\0') { i++; }
621 static inline char* strcpy(
char* dest,
const char* src)
624 while((dest[i] = src[i]) !=
'\0') { i++; }
Definition: rso_interface_1.h:551
MouseButtonType
Definition: rso_interface_1.h:362
Definition: rso_interface_1.h:393
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
Definition: rso_interface_1.h:296
Definition: rso_interface_1.h:285
Definition: rso_interface_1.h:366
Definition: rso_interface_1.h:365
char * _initiator
Definition: rso_interface_1.h:456
int _modifiers
Definition: rso_interface_1.h:436
Definition: rso_interface_1.h:276
int _keysym
Definition: rso_interface_1.h:435
Definition: rso_interface_1.h:293
unsigned short _eventType
Definition: rso_interface_1.h:302
Definition: rso_interface_1.h:564
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
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
Definition: rso_interface_1.h:187
Definition: rso_interface_1.h:225
Definition: rso_interface_1.h:284
EventTypeEnum
Definition: rso_interface_1.h:280
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:367
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
Definition: rso_interface_1.h:297
Definition: bmpimage.h:46
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