40 #ifndef _RSO_INTERFACE_1_H
41 #define _RSO_INTERFACE_1_H
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;
141 const Vector& logicalCoords,
143 const Vector& directionVector,
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; }
502 _initiator =
new char[RSOInterface1::strlen(value)+1];
503 RSOInterface1::strcpy(_initiator,value);
522 _eventName =
new char[RSOInterface1::strlen(value)+1];
523 RSOInterface1::strcpy(_eventName,value);
542 _eventData =
new char[RSOInterface1::strlen(value)+1];
543 RSOInterface1::strcpy(_eventData,value);
573 virtual void LevelsUp(
int value) = 0;
595 virtual const char*
GetExclude(
int index)
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++; }
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 ¤t, 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
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: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
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.