40#ifndef GLS_RSO_LOADER_H_INCLUDED
41#define GLS_RSO_LOADER_H_INCLUDED
51class LiveComponentLibRef;
57 unsigned int _rsoVersion;
58 LiveComponentLibRef* _liveComponentLibRef;
85 inline void SetResource(
const char* resourceName,
const char* resourceVal ) { _rso->
SetResource( resourceName, resourceVal ); }
154 void SetProjection(
int controlWidth,
int controlHeight,
float depthFactor = 4.0f,
float fov = 90.0f,
bool perspective =
false );
Definition: gls_rso_loader.h:371
void ExtractFrustum(disti::RSOInterface1::OpenGLMatrices ¤tMatrices)
Culler(bool enabled=true)
Definition: gls_rso_loader.h:387
void LevelsUp(int value)
Definition: gls_rso_loader.h:415
int LevelsUp() const
Definition: gls_rso_loader.h:413
int _groupLevelsDown
See GroupLevelsDown().
Definition: gls_rso_loader.h:390
const char * GetExclude(int index) const
GlsResourceFilter & operator=(const GlsResourceFilter &rhs)
assignment operator
const char * GetInclude(int index) const
void ClearExcludes()
Removes all entries from the exclude list.
void RemoveExclude(unsigned int index)
GlsResourceFilter(GlsResourceFilter &source)
Copy constructor.
void ClearIncludes()
Removes all entries from the include list.
bool NamesOnly() const
Definition: gls_rso_loader.h:439
int IncludeCount() const
Returns the number of includes in the filter.
void NamesOnly(bool value)
Definition: gls_rso_loader.h:441
int _levelsUp
See LevelsUp().
Definition: gls_rso_loader.h:389
virtual bool PassFilter(const char *name) const
Test a resource name against the filter.
bool _namesOnly
See NamesOnly().
Definition: gls_rso_loader.h:393
int GroupLevelsDown() const
Definition: gls_rso_loader.h:431
void AddInclude(const char *name)
void AddExclude(const char *name)
std::vector< std::string > _excludeList
Resource names that will not pass the filter.
Definition: gls_rso_loader.h:391
void RemoveInclude(unsigned int index)
void GroupLevelsDown(int value)
Definition: gls_rso_loader.h:433
int ExcludeCount() const
Returns the number of exclude entries in the filter.
std::vector< std::string > _includeList
Resource names that will pass the filter.
Definition: gls_rso_loader.h:392
Definition: gls_rso_loader.h:354
bool _needsDelete
Whether the matrix data is owned by this object and must be freed.
Definition: gls_rso_loader.h:356
Definition: gls_rso_loader.h:55
RSOReference(disti::RSOInterface1 *, LiveComponentLibRef *, unsigned int)
bool HandleMouseWheelPlus(int x, int y, int buttonMask)
bool GetFloatResource(disti::RSOInterface2::ResourceHandle resourceHandle, double &resourceVal)
disti::RSOInterface1 * GetRSOInterface1()
Definition: gls_rso_loader.h:74
bool SetIntResource(disti::RSOInterface2::ResourceHandle resourceHandle, long resourceVal)
bool HandleKeyUp(int key, int x, int y)
bool HandleMouseUp(int x, int y, int button)
void SetResources(const char *buf)
bool CreateResourceHandle(const char *resourceName, disti::RSOInterface2::ResourceHandle &resourceHandle)
bool GetBoundingBox(disti::RSOInterface1::Vector *min, disti::RSOInterface1::Vector *max, disti::RSOInterface1::MatrixD *transform=0)
bool SetFloatResource(disti::RSOInterface2::ResourceHandle resourceHandle, double resourceVal)
void Draw()
Definition: gls_rso_loader.h:111
bool IsResourceHandleValid(disti::RSOInterface2::ResourceHandle resourceHandle)
const char * GetResource(const char *resourceName)
Definition: gls_rso_loader.h:97
bool SetResource(disti::RSOInterface2::ResourceHandle resourceHandle, const char *resourceVal)
bool ReleaseResourceHandle(disti::RSOInterface2::ResourceHandle resourceHandle)
void SetRedraw(bool redraw)
Definition: gls_rso_loader.h:319
bool GetRedraw()
Definition: gls_rso_loader.h:324
bool HandleKeyDown(int key, int x, int y)
bool UnregisterResourceObserver(disti::RSOInterface2::ResourceHandle resourceHandle, disti::RSOInterface4::CallbackID id)
bool SetFloatResource(const char *resourceName, double resourceVal)
bool HandleMouseDown(int x, int y, int button)
void AbsolutePlacement(bool value)
bool HandleInput(disti::RSOInterface1::Event *ev)
Definition: gls_rso_loader.h:117
void PreDraw(const disti::RSOInterface1::OpenGLMatrices ¤t, disti::RSOInterface1::Culler &culler)
Definition: gls_rso_loader.h:108
void SetProjection(int controlWidth, int controlHeight, float depthFactor=4.0f, float fov=90.0f, bool perspective=false)
unsigned int GetRSOVersion()
Definition: gls_rso_loader.h:79
bool SetEmittedEventHandler(disti::RSOInterface1::EmittedEventHandler *handler)
Definition: gls_rso_loader.h:124
bool RegisterResourceObserver(disti::RSOInterface2::ResourceHandle resourceHandle, disti::RSOInterface4::ResourceObserver *obs, disti::RSOInterface4::CallbackID &id)
bool GetIntResource(disti::RSOInterface2::ResourceHandle resourceHandle, long &resourceVal)
void Invalidate()
Definition: gls_rso_loader.h:314
bool GetIntResource(const char *resourceName, long &resourceVal)
bool GetResource(disti::RSOInterface2::ResourceHandle resourceHandle, const char *&resourceValue)
bool GetFloatResource(const char *resourceName, double &resourceVal)
void GetBackgroundColor(unsigned char &r, unsigned char &g, unsigned char &b, unsigned char &a)
bool SetIntResource(const char *resourceName, long resourceVal)
bool HandleMouseMove(int x, int y, int buttonMask)
bool HandleMouseWheelMinus(int x, int y, int buttonMask)
void SetResource(const char *resourceName, const char *resourceVal)
Definition: gls_rso_loader.h:85
void Calculate(double time)
Definition: gls_rso_loader.h:503
ResourceMethodCallback(T *object, Callback method)
Definition: gls_rso_loader.h:509
virtual void Call(disti::RSOInterface2::ResourceHandle handle)
Definition: gls_rso_loader.h:517
Callback _method
The class method to call.
Definition: gls_rso_loader.h:529
virtual void Destroy()
Frees this observer.
Definition: gls_rso_loader.h:523
void(T::* Callback)(disti::RSOInterface2::ResourceHandle)
The class method pointer type that is called.
Definition: gls_rso_loader.h:505
T * _object
The object to call the method on.
Definition: gls_rso_loader.h:530
Definition: rso_interface_1.h:315
Definition: rso_interface_1.h:619
Definition: rso_interface_1.h:327
Definition: rso_interface_1.h:219
Definition: rso_interface_1.h:252
Definition: rso_interface_1.h:633
Definition: rso_interface_1.h:186
Definition: rso_interface_1.h:61
virtual bool SetEmittedEventHandler(EmittedEventHandler *handler)=0
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
virtual const char * GetResource(const char *resourceName)=0
Get the string value for the given resource.
virtual void PreDraw(const OpenGLMatrices ¤t, Culler &culler)=0
unsigned int ResourceHandle
Identifies a resource of an RSO instance.
Definition: rso_interface_2.h:65
Definition: rso_interface_4.h:64
unsigned int CallbackID
Type for unique identifiers.
Definition: rso_interface_4.h:79
Definition: rso_interface_5.h:66
Namespace for loading RSOs.
Definition: gls_rso_loader.h:50
RSOReference * LoadRSO(const char *fileName, const char *className=0, bool absolutePlacement=true)
void DestroyRSO(RSOReference *)
void SetOpenGLDefaultState(bool pushState)
disti::RSOInterface4::ResourceObserver * CreateResourceMethodCallback(Class *const obj, const typename ResourceMethodCallback< Class >::Callback method)
Definition: gls_rso_loader.h:538
void RestoreOpenGLState()
Defines the RSO interface v5, which extends v4 to add conditional rendering support.