GL Studio SCECpp Runtime Library
|
#include <gls_display_object_array.h>
Classes | |
struct | InitParameters |
Public Member Functions | |
GlsDisplayObjectArray (InitParameters &initParameters) | |
virtual | ~GlsDisplayObjectArray () |
void | Draw (GlsStateManager &gl, const GlsFloat64 time) |
void | Calculate (const GlsFloat64 time) |
GlsDisplayObject * | PickChildrenTest (const GlsVector2D &windowCoord, GlsInputManager &inputManager, const GlsMatrixAffineD::GLMatrixAffineF &parentDrawMatrix) |
void | SetChildrenAlphaMode (const GlsAlphaMode alphaMode) |
void | SetChildrenFillColor (const GlsColor &fillColor) |
void | SetChildrenLineColor (const GlsColor &lineColor) |
void | SetChildrenLineWidth (const GlsFloat32 lineWidth) |
void | SetChildrenPolygonMode (const GlsPolygonMode polygonMode) |
void | SetChildrenParent (GlsDisplayObject *const parent) |
void | InvalidateChildrenPickCache (void) |
GlsUInt32 | GetSize (void) const |
GlsDisplayObject & | GetObject (const GlsUInt32 index) |
Protected Attributes | |
GlsPointerArray | _objects |
GlsBool | _needCalculate |
This class encapsulates an array of display objects and allows operations to be performed on all of the entries in the array
GlsDisplayObjectArray::GlsDisplayObjectArray | ( | InitParameters & | initParameters | ) |
Constructor - create an instance
initParameters | initialization parameters |
|
virtual |
Destructor - shall never be called
void GlsDisplayObjectArray::Calculate | ( | const GlsFloat64 | time | ) |
Provides a mechanism for performing regular calculations, separate from drawing.
time | The elaspsed time in seconds since program start |
void GlsDisplayObjectArray::Draw | ( | GlsStateManager & | gl, |
const GlsFloat64 | time | ||
) |
Draws the objects in the array.
gl | GL State manager for OpenGL into which object is drawn |
time | the elaspsed time in seconds since program start |
GlsDisplayObject& GlsDisplayObjectArray::GetObject | ( | const GlsUInt32 | index | ) |
get a ref to the display object at the given index
index | index of desired object ( index < _objects.GetSize() ) |
GlsUInt32 GlsDisplayObjectArray::GetSize | ( | void | ) | const |
Get the number of display objects in the array
void GlsDisplayObjectArray::InvalidateChildrenPickCache | ( | void | ) |
Invalidate cached picking screen coordinates for contained objects
GlsDisplayObject* GlsDisplayObjectArray::PickChildrenTest | ( | const GlsVector2D & | windowCoord, |
GlsInputManager & | inputManager, | ||
const GlsMatrixAffineD::GLMatrixAffineF & | parentDrawMatrix | ||
) |
Perform a pick test of the given point in window coordinates against the contained objects
windowCoord | point in question |
inputManager | input manager managing input for this object |
parentDrawMatrix | draw matrix used when rendering parent object |
void GlsDisplayObjectArray::SetChildrenAlphaMode | ( | const GlsAlphaMode | alphaMode | ) |
Set the alpha mode of the contained objects
alphaMode | desired alpha mode |
void GlsDisplayObjectArray::SetChildrenFillColor | ( | const GlsColor & | fillColor | ) |
Set the fill color of the contained objects
fillColor | desired fill color |
void GlsDisplayObjectArray::SetChildrenLineColor | ( | const GlsColor & | lineColor | ) |
Set the line color of the contained objects
lineColor | desired line color |
void GlsDisplayObjectArray::SetChildrenLineWidth | ( | const GlsFloat32 | lineWidth | ) |
Set the line width of the contained objects
lineWidth | new line width, GlsRenderObject::LINE_WIDTH_MIN <= lineWidth <= GlsRenderObject::LINE_WIDTH_MAX |
void GlsDisplayObjectArray::SetChildrenParent | ( | GlsDisplayObject *const | parent | ) |
Set the parent of the contained objects
parent | parent of contained objects |
void GlsDisplayObjectArray::SetChildrenPolygonMode | ( | const GlsPolygonMode | polygonMode | ) |
Set the polygon mode of the contained objects
polygonMode | new polygon mode |
|
protected |
GLS_TRUE if any of the objects needs its Calculate() method called, else GLS_FALSE
|
protected |
array of display object pointers