40 #ifndef GLS_RSO_LOADER_H_INCLUDED
41 #define GLS_RSO_LOADER_H_INCLUDED
50 class LiveComponentLibRef;
56 unsigned int _rsoVersion;
57 LiveComponentLibRef* _liveComponentLibRef;
83 inline void SetResource(
const char* resourceName,
const char* resourceVal) { _rso->
SetResource(resourceName, resourceVal); }
135 void GetBackgroundColor(
unsigned char &r,
unsigned char &g,
unsigned char &b,
unsigned char &a);
150 void SetProjection(
int controlWidth,
int controlHeight,
float depthFactor = 4.0f,
float fov = 90.0f,
bool perspective =
false);
214 bool CreateResourceHandle(
const char *resourceName, disti::RSOInterface2::ResourceHandle &resourceHandle);
233 bool SetResource(disti::RSOInterface2::ResourceHandle resourceHandle,
const char *resourceVal);
240 bool GetResource(disti::RSOInterface2::ResourceHandle resourceHandle,
const char *&resourceValue);
253 bool SetIntResource(disti::RSOInterface2::ResourceHandle resourceHandle,
long resourceVal);
266 bool GetIntResource(disti::RSOInterface2::ResourceHandle resourceHandle,
long &resourceVal);
279 bool SetFloatResource(disti::RSOInterface2::ResourceHandle resourceHandle,
double resourceVal);
292 bool GetFloatResource(disti::RSOInterface2::ResourceHandle resourceHandle,
double &resourceVal);
302 RSOReference* LoadRSO(
const char* fileName,
const char* className = 0,
bool absolutePlacement =
true);
305 void DestroyRSO(RSOReference*);
312 void SetOpenGLDefaultState(
bool pushState);
318 void RestoreOpenGLState();
343 Culler(
bool enabled=
true);
357 int _groupLevelsDown;
358 std::vector<std::string> _excludeList;
359 std::vector<std::string> _includeList;
381 inline void LevelsUp(
int value) { _levelsUp = value; }
405 inline void NamesOnly(
bool value) { _namesOnly = value; }
456 virtual bool PassFilter(
const char* name)
const;
459 GlsResourceFilter&
operator=(
const GlsResourceFilter &rhs );
Definition: rso_interface_1.h:551
bool SetIntResource(const char *resourceName, long resourceVal)
bool HandleInput(disti::RSOInterface1::Event *ev)
Definition: gls_rso_loader.h:115
void Draw()
Definition: gls_rso_loader.h:109
virtual bool SetEmittedEventHandler(EmittedEventHandler *handler)=0
Definition: rso_interface_1.h:264
bool HandleKeyDown(int key, int x, int y)
Culler()
Definition: rso_interface_1.h:270
int LevelsUp() const
Definition: gls_rso_loader.h:380
bool GetBoundingBox(disti::RSOInterface1::Vector *min, disti::RSOInterface1::Vector *max, disti::RSOInterface1::MatrixD *transform=0)
virtual void SetResource(const char *resourceName, const char *resourceVal)=0
Set the string value for a given named resource.
bool GetFloatResource(const char *resourceName, double &resourceVal)
virtual bool HandleInput(Event *ev)=0
int IncludeCount() const
Returns the number of includes in the filter.
bool HandleMouseDown(int x, int y, int button)
void AbsolutePlacement(bool value)
void ClearExcludes()
Removes all entries from the exclude list.
void RemoveExclude(unsigned int index)
const char * GetInclude(int index) const
bool CreateResourceHandle(const char *resourceName, disti::RSOInterface2::ResourceHandle &resourceHandle)
void AddInclude(const char *name)
bool IsResourceHandleValid(disti::RSOInterface2::ResourceHandle resourceHandle)
Definition: gls_rso_loader.h:337
virtual const char * GetResource(const char *resourceName)=0
Get the string value for the given resource.
bool HandleMouseWheelPlus(int x, int y, int buttonMask)
Definition: gls_rso_loader.h:321
void GetBackgroundColor(unsigned char &r, unsigned char &g, unsigned char &b, unsigned char &a)
void RemoveInclude(unsigned int index)
Definition: rso_interface_1.h:276
virtual void PreDraw(const OpenGLMatrices ¤t, Culler &culler)=0
Definition: gls_rso_loader.h:353
void Calculate(double time)
Definition: gls_rso_loader.h:100
void SetResource(const char *resourceName, const char *resourceVal)
Definition: gls_rso_loader.h:83
Definition: gls_rso_loader.h:53
Definition: rso_interface_1.h:564
bool ReleaseResourceHandle(disti::RSOInterface2::ResourceHandle resourceHandle)
bool HandleMouseUp(int x, int y, int button)
void SetResources(const char *buf)
int GroupLevelsDown() const
Definition: gls_rso_loader.h:397
void SetProjection(int controlWidth, int controlHeight, float depthFactor=4.0f, float fov=90.0f, bool perspective=false)
bool HandleMouseWheelMinus(int x, int y, int buttonMask)
Definition: rso_interface_1.h:63
Definition: gls_rso_loader.h:48
Definition: rso_interface_1.h:204
const char * GetResource(const char *resourceName)
Definition: gls_rso_loader.h:95
bool SetEmittedEventHandler(disti::RSOInterface1::EmittedEventHandler *handler)
Definition: gls_rso_loader.h:122
disti::RSOInterface1 * GetRSOInterface1()
Definition: gls_rso_loader.h:72
Definition: rso_interface_1.h:187
bool HandleMouseMove(int x, int y, int buttonMask)
virtual void Calculate(double time)=0
bool HandleKeyUp(int key, int x, int y)
virtual bool PassFilter(const char *name) const
Test a resource name against the filter.
Definition: rso_interface_1.h:225
void PreDraw(const disti::RSOInterface1::OpenGLMatrices ¤t, disti::RSOInterface1::Culler &culler)
Definition: gls_rso_loader.h:106
bool NamesOnly() const
Definition: gls_rso_loader.h:404
Defines the RSO interface v2, which provides a generic way of accessing RSOs and other content...
bool SetFloatResource(const char *resourceName, double resourceVal)
int ExcludeCount() const
Returns the number of exclude entries in the filter.
bool GetIntResource(const char *resourceName, long &resourceVal)
void ClearIncludes()
Removes all entries from the include list.
unsigned int GetRSOVersion()
Definition: gls_rso_loader.h:77
const char * GetExclude(int index) const
void AddExclude(const char *name)
void ExtractFrustum(disti::RSOInterface1::OpenGLMatrices ¤tMatrices)
GlsResourceFilter & operator=(const GlsResourceFilter &rhs)
assignment operator