GL Studio C++ Runtime API
|
#include <gls_rso_interface_impl.h>
Public Member Functions | |
void | Calculate (double time) |
The RSO Interface methods. More... | |
RsoImplBaseInterface * | CloneObject () |
void | DeleteInstance () |
Safely delete the object. | |
void | Draw () |
bool | SetEmittedEventHandler (RsoImplBaseInterface::EmittedEventHandler *handler) |
bool | GetBoundingSphere (RsoImplBaseInterface::Vector *center, float *radius) |
bool | GetBoundingBox (RsoImplBaseInterface::Vector *min, RsoImplBaseInterface::Vector *max, const RSOMatrixT *transform=NULL) |
bool | HandleInput (RsoImplBaseInterface::Event *lci1_ev) |
bool | HandleMultiTouchInput (RsoImplMultiTouchInterface::MouseMultiTouchEvent *lci3_ev) |
bool | Pick3D (const RsoImplBaseInterface::Vector &winLoc, const RsoImplBaseInterface::Vector &logicalCoords, float scale, const RsoImplBaseInterface::Vector &directionVector, RsoImplBaseInterface::Vector &collisionWinLoc, const RsoImplBaseInterface::OpenGLMatrices &drawnMatrices) |
Pick3D returns true if the RSO was picked. | |
void | PreDraw (const RsoImplBaseInterface::OpenGLMatrices &parentMatrices, RsoImplBaseInterface::Culler &culler) |
void | SetResource (const char *resourceName, const char *resourceVal) |
Set the string value for a given named resource. | |
const char * | GetResource (const char *resourceName) |
Get the string value for the given resource. | |
const char * | GetResources (RsoImplBaseInterface::ResourceFilter *filter=NULL) |
ResourceHandle | CreateResourceHandle (const char *resourceName) |
void | ReleaseResourceHandle (ResourceHandle resourceHandle) |
Disposes of a resource handle. | |
bool | IsResourceHandleValid (ResourceHandle resourceHandle) |
Checks if a given resource handle is valid. | |
void | SetResource (ResourceHandle resourceHandle, const char *resourceVal) |
Set the string value for a resource specified by handle. | |
const char * | GetResource (ResourceHandle resourceHandle) |
Get the string value for a resource specified by handle. | |
void | SetIntResource (const char *resourceName, long resourceVal) |
Set the value as an integer for a given named resource. | |
long | GetIntResource (const char *resourceName) |
Get the value as an integer for a given named resource. | |
void | SetIntResource (ResourceHandle resourceHandle, long resourceVal) |
Set the value as an integer for a resource specified by handle. | |
long | GetIntResource (ResourceHandle resourceHandle) |
Set the value as an integer for a resource specified by handle. | |
void | SetFloatResource (const char *resourceName, double resourceVal) |
Set the value as a float for a given named resource. | |
double | GetFloatResource (const char *resourceName) |
Get the value as a float for a given named resource. | |
void | SetFloatResource (ResourceHandle resourceHandle, double resourceVal) |
Set the value as a float for a resource specified by handle. | |
double | GetFloatResource (ResourceHandle resourceHandle) |
Set the value as a float for a resource specified by handle. | |
CallbackID | RegisterResourceObserver (ResourceHandle resourceHandle, ResourceObserver *obs) |
void | UnregisterResourceObserver (ResourceHandle resourceHandle, CallbackID id) |
virtual void | Invalidate () |
virtual void | SetPainter (RSOPainterT *painter) |
Additional Inherited Members | |
Public Types inherited from RSOInterface4 | |
typedef unsigned int | CallbackID |
Type for unique identifiers. | |
Protected Member Functions inherited from RSOInterface5 | |
virtual | ~RSOInterface5 () |
Protected destructor so it can't be deleted directly. | |
Protected Member Functions inherited from RSOInterface4 | |
virtual | ~RSOInterface4 () |
Protected destructor so it can't be deleted directly. | |
Protected Member Functions inherited from RSOInterface3 | |
virtual | ~RSOInterface3 () |
Protected destructor so it can't be deleted directly. | |
Protected Member Functions inherited from RSOInterface2 | |
virtual | ~RSOInterface2 () |
Protected destructor so it can't be deleted directly. | |
Protected Member Functions inherited from RSOInterface1 | |
virtual | ~RSOInterface1 () |
Protected destructor so it can't be deleted directly. | |
Implementation of RSOInterface.
|
virtual |
The RSO Interface methods.
Perform component simulation. Any non-drawing activities can be performed here. Call this before PreDraw()
Implements RSOInterface1.
|
virtual |
Returns a new instance of the RSO that is a clone of this object or NULL if not possible.
Implements RSOInterface1.
|
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.
Implements RSOInterface2.
|
virtual |
Draw the object via OpenGL Call this after PreDraw()
Implements RSOInterface1.
|
virtual |
Get the extents of the component when drawn with the given transformation matrix, as a coordinate system-aligned box
min | If the method returns true, contains the point corresponding with the 1st corner of the box. If the method returns false, value is undefined. |
max | If the method returns true, contains the point corresponding with the 2nd corner of the box. If the method returns false, value is undefined. |
transform | Transformation matrix from A to B where A is the component's coordinate system and B is the coordinate system to compute the bounding box in. (If NULL then identity matrix is assumed) |
Implements RSOInterface1.
|
virtual |
Get the bounding sphere for the component in the components coordinate system
center | If the method returns true, contains the center point of the sphere. If the method returns false, value is undefined. |
radius | If the method returns true, contains the radius of the sphere. If the method returns false, value is undefined. |
Implements RSOInterface1.
|
virtual |
Get a list of the resources for the component. Each resource is separated by a newline ('
') with the output controlled by filter. filter may be NULL in which case the default values are used.
Implements RSOInterface1.
|
virtual |
Allow the object to handle an event Returns true if the event was handled by the component
Implements RSOInterface1.
|
virtual |
Allow the object to handle a multitouch event. Returns true if the event was handled by the component
Implements RSOInterface3.
|
virtual |
Calls Invalidate on the parent's painter, causing the scene to redraw in conditional rendering.
Implements GlsPainter.
|
virtual |
Calculate transformations and perform culling Call this before Draw()
Implements RSOInterface1.
|
virtual |
Register a resource observer to be notified when a resource changes *
resourceHandle | the resource handle |
observer | the observer to be notified. The RSO takes ownership of the observer and will call Destroy to delete it when needed. |
Implements RSOInterface4.
|
virtual |
Allow for handling events from inside the object. The emitted event handler will be passed events that are from inside the component
handler | pointer to the EmittedEventHandler object to use or NULL to remove the current event handler. |
Implements RSOInterface1.
|
virtual |
Assigns a parent painter to this RSO which will be updated when any RSO child object causes invalidation.
Implements RSOInterface5.
|
virtual |
Unregister a resource observer
resourceHandle | the resource handle used to register the observer |
id | the id used to register the resource observer |
Implements RSOInterface4.