GL Studio C++ Runtime API
RuntimeDisplayFrame Class Reference

#include <runtime_display_frame.h>

Inheritance diagram for RuntimeDisplayFrame:
DisplayFrame AttributeChangedNotifier EmbeddedDisplayFrame glsDisplayFrame

Public Member Functions

 RuntimeDisplayFrame (const char *name, int width, int height)
 
virtual ~RuntimeDisplayFrame ()
 
virtual void Clear (void)
 
virtual GlsEyePointCurrentEyePoint ()
 
virtual void CurrentEyePoint (GlsEyePoint *eye)
 
virtual void Scale (float scale)
 
virtual float Scale (void)
 
virtual DisplayObjecthandle (DisplayEvent *ev)
 
virtual void BackgroundColor (unsigned char r, unsigned char g, unsigned char b, unsigned char a)
 
virtual void GetBackgroundColor (unsigned char &r, unsigned char &g, unsigned char &b, unsigned char &a)
 
virtual void BackgroundColor (const GlsColor &color)
 
const char * Name (void)
 
void Name (char *name)
 
virtual GlsColor BackgroundColor (void)
 
virtual int FrameInterval (void)
 
virtual void FrameInterval (int interval)
 
virtual StatisticsStats ()
 
virtual void RecordCalculateStart (void)
 
virtual void RecordCalculateEnd (void)
 
virtual void ClearDragAndFocus ()
 
- Public Member Functions inherited from DisplayFrame
 DisplayFrame (int width, int height, bool allocateObjects=true)
 
void ClearBitfield (GLbitfield bitField)
 
GLbitfield ClearBitfield ()
 
virtual void DragObject (DisplayObject *obj)
 
virtual DisplayObjectDragObject (void)
 
virtual void ClearDrag ()
 
virtual void FocusObject (DisplayObject *obj)
 
virtual DisplayObjectFocusObject (void)
 
virtual void ClearFocus ()
 
virtual void MultitouchEnabled (bool enabled)
 
virtual bool MultitouchEnabled (void)
 
virtual InputHandlerGetInputHandler ()
 
virtual DisplayObjectHandleDisplayEvent (DisplayEvent *ev)
 
virtual void WriteResources (const char *filename, GlsResourceFilter *filter=NULL)
 
virtual void ReadResources (const char *filename)
 
virtual DistiAttributeBaseResource (const char *name)
 
virtual void GetResources (std::ostream &outstr, GlsResourceFilter *filter=NULL)
 
virtual void SetResources (std::istream &instr)
 
void SetResource (const std::string &resourceName, const std::string &resourceVal)
 
std::string GetResource (const std::string &resourceName)
 
virtual char * GetResource_CRTClean (const char *name)
 
virtual void GetResourceFree_CRTClean (char *memoryToFree)
 
virtual char * GetResources_CRTClean (GlsResourceFilter *filter)
 
virtual void GetResourcesFree_CRTClean (char *memoryToFree)
 
virtual void SetResource_CRTClean (const char *name, const char *value)
 
virtual void SetResources_CRTClean (const char *buf)
 
virtual void NotifyAttributeChanged (const AttributeName &name)
 
virtual InterfaceListTypeGetCppInterfaceDescription (InterfaceListType *addToThisList=NULL)
 
virtual void GetCppInterfaceDescriptionFree (InterfaceListType *array)
 
void SetTexturePaletteSize (int cnt)
 
void Draw (void)
 
void InsertObject (DisplayObject *obj, int loc)
 
void PushObject (DisplayObject *obj)
 
int Width (void)
 
int Height (void)
 
void SetWidth (int w)
 
void SetHeight (int h)
 
virtual void SetRedraw (void)
 
bool CullingEnabled (void)
 
void CullingEnabled (const bool enabled)
 
DistiAttribDictFrameAttribDict (void)
 
const DistiAttribDictFrameAttribDict (void) const
 
DynamicMaterialArrayMaterialPalette (void)
 
ComponentLightMgrLightMgr (void)
 
void LightMgr (ComponentLightMgr *val)
 
- Public Member Functions inherited from AttributeChangedNotifier
virtual ~AttributeChangedNotifier ()
 

Public Attributes

GlsColor _backgroundColor
 
- Public Attributes inherited from DisplayFrame
TexturePalettetexturePalette
 
SoundSystem_sound_player
 
Groupobjects
 

Protected Attributes

std::string _name
 
float _scale
 
unsigned int frameInterval
 
GlsEyePoint_currentEyePoint
 
- Protected Attributes inherited from DisplayFrame
bool _cullingEnabled
 
int _width
 
int _height
 
float _lastPickedDepth
 
DynamicMaterialArray _materialPalette
 
ComponentLightMgr_lightMgr
 
GLbitfield _clearBitfield
 
std::string _componentHeaderFileName
 
unsigned int _currentCursor
 
bool _multitouchEnabled
 
unsigned int _cursorsDown
 

Additional Inherited Members

- Static Public Member Functions inherited from DisplayFrame
static void SetOpenGLDefaultState (bool saveVal)
 
static void RestoreOpenGLState (void)
 
- Protected Member Functions inherited from DisplayFrame
virtual void CurrentCursor (unsigned int cursor_id)
 
void CleanupDragMap ()
 
DisplayObjectGetDragObjectForCursor (unsigned int cursorID)
 
DisplayObjectFindDragObject ()
 

Detailed Description

Provides basic support for runtime display frames

Constructor & Destructor Documentation

RuntimeDisplayFrame ( const char *  name,
int  width,
int  height 
)

Ctor for RuntimeDisplayFrame

Parameters
nameThe title of the display frame. Shown in the window title bar.
widthThe width of the display frame window, in pixels.
heightThe height of the display frame window, in pixels.
virtual ~RuntimeDisplayFrame ( )
virtual

Member Function Documentation

virtual void BackgroundColor ( unsigned char  r,
unsigned char  g,
unsigned char  b,
unsigned char  a 
)
virtual

Sets the background color of the window to the given value

Parameters
rNew red color (0-255 range)
gNew green color (0-255 range)
bNew blue color (0-255 range)
aNew alpha color (0-255 range)
virtual void BackgroundColor ( const GlsColor color)
virtual

Sets the background color of the window to the given value

Parameters
colorThe new color
virtual GlsColor BackgroundColor ( void  )
virtual

Gets the background color of the window to the given value

Returns
The background color
virtual void Clear ( void  )
virtual

Clears the window associated with the display frame. The current _clearBitfield is used

virtual void ClearDragAndFocus ( )
virtual

Call this before deleting objects which may be being kept by the drag or focus objects

Reimplemented from DisplayFrame.

virtual GlsEyePoint* CurrentEyePoint ( )
virtual
Returns
The current eyepoint for the display frame
virtual void CurrentEyePoint ( GlsEyePoint eye)
virtual

Sets the current eyepoint for the display frame.

Parameters
eyeThe eyepoint to use for the display frame.
virtual int FrameInterval ( void  )
virtual

Returns the Frame Interval in microseconds

Returns
The Frame Interval in microseconds
virtual void FrameInterval ( int  interval)
virtual

Sets the target Frame Interval in microseconds

Parameters
intervalThe frame interval in microseconds
virtual void GetBackgroundColor ( unsigned char &  r,
unsigned char &  g,
unsigned char &  b,
unsigned char &  a 
)
virtual

Gets the background color of the window to the given value

Parameters
rGets red color (0-255 range)
gGets green color (0-255 range)
bGets blue color (0-255 range)
aGets alpha color (0-255 range)
virtual DisplayObject* handle ( DisplayEvent ev)
virtual

Handles keyboard and mouse events and dispatches them to the display objects.

Parameters
evA display event
Returns
Pointer to the object that handled the event or NULL if no object handled it.
const char* Name ( void  )

Gets the title(name) of this display frame

Returns
The name of this display frame
void Name ( char *  name)

Sets the name(title) for this display frame

Parameters
nameThe new title for the display frame
virtual void RecordCalculateEnd ( void  )
virtual

Part of display frame statistics, for recording time used in Calculate()

virtual void RecordCalculateStart ( void  )
virtual

Part of display frame statistics, for recording time used in Calculate()

virtual void Scale ( float  scale)
virtual

Set the scale for the display frame.

Parameters
scaleThe new scale factor. Must be non-zero. A value of zero will be ignored.
virtual float Scale ( void  )
virtual
Returns
The current scale for the display frame

Reimplemented from DisplayFrame.

virtual Statistics* Stats ( )
virtual

Creates and returns a pointer to a statistics object

Returns
A pointer to the statistics object

Member Data Documentation

GlsColor _backgroundColor

The background clear color

GlsEyePoint* _currentEyePoint
protected

The current eyepoint for viewing the scene

std::string _name
protected

The title of this display frame's window, if applicable

float _scale
protected

Scale of the window

unsigned int frameInterval
protected

The frame interval in microSeconds (inverse of frame rate)


The documentation for this class was generated from the following file: