GL Studio C++ Runtime API
|
#include <gls_rso_interface_impl.h>
Public Member Functions | |
void | Calculate (double time) override |
The RSO Interface methods. More... | |
RsoImplBaseInterface * | CloneObject () override |
void | DeleteInstance () override |
Safely delete the object. | |
void | Draw () override |
bool | SetEmittedEventHandler (RsoImplBaseInterface::EmittedEventHandler *handler) override |
bool | GetBoundingSphere (RsoImplBaseInterface::Vector *center, float *radius) override |
bool | GetBoundingBox (RsoImplBaseInterface::Vector *min, RsoImplBaseInterface::Vector *max, const RSOMatrixT *transform=NULL) override |
bool | HandleInput (RsoImplBaseInterface::Event *lci1_ev) override |
bool | HandleMultiTouchInput (RsoImplMultiTouchInterface::MouseMultiTouchEvent *lci3_ev) override |
bool | Pick3D (const RsoImplBaseInterface::Vector &winLoc, const RsoImplBaseInterface::Vector &logicalCoords, float scale, const RsoImplBaseInterface::Vector &directionVector, RsoImplBaseInterface::Vector &collisionWinLoc, const RsoImplBaseInterface::OpenGLMatrices &drawnMatrices) override |
Pick3D returns true if the RSO was picked. | |
void | PreDraw (const RsoImplBaseInterface::OpenGLMatrices &parentMatrices, RsoImplBaseInterface::Culler &culler) override |
void | SetResource (const char *resourceName, const char *resourceVal) override |
Set the string value for a given named resource. | |
const char * | GetResource (const char *resourceName) override |
Get the string value for the given resource. | |
const char * | GetResources (RsoImplBaseInterface::ResourceFilter *filter=NULL) override |
ResourceHandle | CreateResourceHandle (const char *resourceName) override |
void | ReleaseResourceHandle (ResourceHandle resourceHandle) override |
Disposes of a resource handle. | |
bool | IsResourceHandleValid (ResourceHandle resourceHandle) override |
Checks if a given resource handle is valid. | |
void | SetResource (ResourceHandle resourceHandle, const char *resourceVal) override |
Set the string value for a resource specified by handle. | |
const char * | GetResource (ResourceHandle resourceHandle) override |
Get the string value for a resource specified by handle. | |
void | SetIntResource (const char *resourceName, long resourceVal) override |
Set the value as an integer for a given named resource. | |
long | GetIntResource (const char *resourceName) override |
Get the value as an integer for a given named resource. | |
void | SetIntResource (ResourceHandle resourceHandle, long resourceVal) override |
Set the value as an integer for a resource specified by handle. | |
long | GetIntResource (ResourceHandle resourceHandle) override |
Set the value as an integer for a resource specified by handle. | |
void | SetFloatResource (const char *resourceName, double resourceVal) override |
Set the value as a float for a given named resource. | |
double | GetFloatResource (const char *resourceName) override |
Get the value as a float for a given named resource. | |
void | SetFloatResource (ResourceHandle resourceHandle, double resourceVal) override |
Set the value as a float for a resource specified by handle. | |
double | GetFloatResource (ResourceHandle resourceHandle) override |
Set the value as a float for a resource specified by handle. | |
CallbackID | RegisterResourceObserver (ResourceHandle resourceHandle, ResourceObserver *obs) override |
void | UnregisterResourceObserver (ResourceHandle resourceHandle, CallbackID id) override |
void | Invalidate () override |
bool | IsInvalidated () const override |
void | SetPainter (RSOPainterT *painter) override |
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.
|
overridevirtual |
The RSO Interface methods.
Perform component simulation. Any non-drawing activities can be performed here. Call this before PreDraw()
Implements RSOInterface1.
|
overridevirtual |
Returns a new instance of the RSO that is a clone of this object or NULL if not possible.
Implements RSOInterface1.
|
overridevirtual |
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.
|
overridevirtual |
Draw the object via OpenGL Call this after PreDraw()
Implements RSOInterface1.
|
overridevirtual |
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.
|
overridevirtual |
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.
|
overridevirtual |
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.
|
overridevirtual |
Allow the object to handle an event Returns true if the event was handled by the component
Implements RSOInterface1.
|
overridevirtual |
Allow the object to handle a multitouch event. Returns true if the event was handled by the component
Implements RSOInterface3.
|
overridevirtual |
Calls Invalidate on the parent's painter, causing the scene to redraw in conditional rendering.
Implements GlsPainter.
|
overridevirtual |
Returns whether or not the parent's painter has already been invalidated
Implements GlsPainter.
|
overridevirtual |
Calculate transformations and perform culling Call this before Draw()
Implements RSOInterface1.
|
overridevirtual |
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.
|
overridevirtual |
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.
|
overridevirtual |
Assigns a parent painter to this RSO which will be updated when any RSO child object causes invalidation.
Implements RSOInterface5.
|
overridevirtual |
Unregister a resource observer
resourceHandle | the resource handle used to register the observer |
id | the id used to register the resource observer |
Implements RSOInterface4.