#include <rso_interface_2.h>
|
typedef unsigned int | ResourceHandle |
| Typedef for a unique resource identifier.
|
|
|
virtual ResourceHandle | CreateResourceHandle (const char *resourceName)=0 |
|
virtual void | ReleaseResourceHandle (ResourceHandle resourceHandle)=0 |
|
virtual bool | IsResourceHandleValid (ResourceHandle resourceHandle)=0 |
|
virtual void | SetResource (ResourceHandle resourceHandle, const char *resourceVal)=0 |
|
virtual const char * | GetResource (ResourceHandle resourceHandle)=0 |
|
virtual void | SetIntResource (const char *resourceName, long resourceVal)=0 |
|
virtual long | GetIntResource (const char *resourceName)=0 |
|
virtual void | SetIntResource (ResourceHandle handle, long resourceVal)=0 |
|
virtual long | GetIntResource (ResourceHandle resourceHandle)=0 |
|
virtual void | SetFloatResource (const char *resourceName, double resourceVal)=0 |
|
virtual double | GetFloatResource (const char *resourceName)=0 |
|
virtual void | SetFloatResource (ResourceHandle handle, double resourceVal)=0 |
|
virtual double | GetFloatResource (ResourceHandle resourceHandle)=0 |
|
virtual const char * | GetResource (const char *resourceName)=0 |
|
virtual void | SetResource (const char *resourceName, const char *resourceVal)=0 |
|
virtual void | Calculate (double time)=0 |
| The RSO Interface methods. More...
|
|
virtual void | PreDraw (const OpenGLMatrices ¤t, Culler &culler)=0 |
|
virtual void | Draw ()=0 |
|
virtual void | SetResource (const char *resourceName, const char *resourceVal)=0 |
|
virtual const char * | GetResource (const char *resourceName)=0 |
|
virtual const char * | GetResources (ResourceFilter *filter=0)=0 |
|
virtual bool | HandleInput (Event *ev)=0 |
|
virtual bool | SetEmittedEventHandler (EmittedEventHandler *handler)=0 |
|
virtual bool | Pick3D (const Vector &winLoc, const Vector &logicalCoords, float scale, const Vector &directionVector, Vector &collisionWinLoc, const OpenGLMatrices &drawnMatrices)=0 |
|
virtual bool | GetBoundingSphere (Vector *center, float *radius)=0 |
|
virtual bool | GetBoundingBox (Vector *min, Vector *max, const MatrixD *transform=0)=0 |
|
virtual RSOInterface1 * | CloneObject ()=0 |
|
virtual void | DeleteInstance ()=0 |
| Safely delete the object. More...
|
|
|
virtual | ~RSOInterface2 () |
| Protected destructor so it can't be deleted directly.
|
|
virtual | ~RSOInterface1 () |
| Protected destructor so it can't be deleted directly.
|
|
|
static unsigned int | strlen (const char *str) |
|
static char * | strcpy (char *dest, const char *src) |
|
The RSOInterface2 class defines an abstract interface to an RSO instance.
◆ CreateResourceHandle()
virtual ResourceHandle CreateResourceHandle |
( |
const char * |
resourceName | ) |
|
|
pure virtual |
Obtains a resource handle to a given named resource This handle must be disposed of with the ReleaseResourceHandle method once it is no longer needed. If this method fails, the return value will not be a valid handle; this can be determined by calling IsResourceHandleValid.
- Parameters
-
resourceName | The resource name to create a handle for. |
- Returns
- A handle to the desired resource.
Implemented in GlsRSOInterfaceImpl.
◆ GetFloatResource() [1/2]
virtual double GetFloatResource |
( |
const char * |
resourceName | ) |
|
|
pure virtual |
- Returns
- The value as a float for a given named resource.
- Parameters
-
resourceName | The name to return the float value for. |
Implemented in GlsRSOInterfaceImpl.
◆ GetFloatResource() [2/2]
- Returns
- The value as a float for a resource specified by handle.
- Parameters
-
resourceHandle | The handle to return the integer value for. |
Implemented in GlsRSOInterfaceImpl.
◆ GetIntResource() [1/2]
virtual long GetIntResource |
( |
const char * |
resourceName | ) |
|
|
pure virtual |
- Returns
- The value as an integer for a given named resource.
- Parameters
-
resourceName | The name to return the integer value for. |
Implemented in GlsRSOInterfaceImpl.
◆ GetIntResource() [2/2]
- Returns
- The value as an integer for a resource specified by handle.
- Parameters
-
resourceHandle | The handle to return the integer value for. |
Implemented in GlsRSOInterfaceImpl.
◆ GetResource() [1/2]
virtual const char * GetResource |
( |
const char * |
resourceName | ) |
|
|
virtual |
Get the string value for the given resource
- Parameters
-
resourceName | The name of the resource whose value is to be returned. |
- Returns
- The string value for the given resource, or empty string if not found.
Implements RSOInterface1.
◆ GetResource() [2/2]
- Returns
- The string value for a resource specified by handle.
- Parameters
-
resourceHandle | The handle to return the string value for. |
Implemented in GlsRSOInterfaceImpl.
◆ IsResourceHandleValid()
Checks if a given resource handle is valid.
- Parameters
-
resourceHandle | The resource handle to check. |
- Returns
- Whether or not the handle is valid.
Implemented in GlsRSOInterfaceImpl.
◆ ReleaseResourceHandle()
Disposes of a resource handle.
- Parameters
-
resourceHandle | The resource handle to release. |
Implemented in GlsRSOInterfaceImpl.
◆ SetFloatResource() [1/2]
virtual void SetFloatResource |
( |
const char * |
resourceName, |
|
|
double |
resourceVal |
|
) |
| |
|
pure virtual |
Set the value as a float for a given named resource.
- Parameters
-
resourceName | The name of the resource to set. |
resourceVal | The new float value to set. |
Implemented in GlsRSOInterfaceImpl.
◆ SetFloatResource() [2/2]
virtual void SetFloatResource |
( |
ResourceHandle |
handle, |
|
|
double |
resourceVal |
|
) |
| |
|
pure virtual |
Set the value as a float for a resource specified by handle.
- Parameters
-
handle | The handle of the resource to set. |
resourceVal | The new float value to set. |
Implemented in GlsRSOInterfaceImpl.
◆ SetIntResource() [1/2]
virtual void SetIntResource |
( |
const char * |
resourceName, |
|
|
long |
resourceVal |
|
) |
| |
|
pure virtual |
Set the value as an integer for a given named resource.
- Parameters
-
resourceName | The name of the resource to set. |
resourceVal | The new integer value to set. |
Implemented in GlsRSOInterfaceImpl.
◆ SetIntResource() [2/2]
virtual void SetIntResource |
( |
ResourceHandle |
handle, |
|
|
long |
resourceVal |
|
) |
| |
|
pure virtual |
Set the value as an integer for a resource specified by handle.
- Parameters
-
handle | The handle of the resource to set. |
resourceVal | The new integer value to set. |
Implemented in GlsRSOInterfaceImpl.
◆ SetResource() [1/2]
virtual void SetResource |
( |
const char * |
resourceName, |
|
|
const char * |
resourceVal |
|
) |
| |
|
virtual |
Set the string value for a given named resource.
- Parameters
-
resourceName | The name of the resource to set. |
resourceVal | The new string value to set for the resource. |
Implements RSOInterface1.
◆ SetResource() [2/2]
virtual void SetResource |
( |
ResourceHandle |
resourceHandle, |
|
|
const char * |
resourceVal |
|
) |
| |
|
pure virtual |
Set the string value for a resource specified by handle
- Parameters
-
resourceHandle | The handle of the resource to set. |
resourceVal | The new string value to set. |
Implemented in GlsRSOInterfaceImpl.
The documentation for this class was generated from the following file: