Crazy Eddies GUI System
0.7.1
|
RenderingWindow is a RenderingSurface that can be "drawn back" onto another RenderingSurface and is primarily intended to be used as a kind of cache for rendered imagery. More...
Public Member Functions | |
RenderingWindow (TextureTarget &target, RenderingSurface &owner) | |
Constructor for RenderingWindow objects. More... | |
~RenderingWindow () | |
Destructor for RenderingWindow objects. | |
void | setClippingRegion (const Rect ®ion) |
Set the clipping region that will be used when rendering the imagery for this RenderingWindow back onto the RenderingSurface that owns it. More... | |
void | setPosition (const Vector2 &position) |
Set the two dimensional position of the RenderingWindow in pixels. The origin is at the top-left corner. More... | |
void | setSize (const Size &size) |
Set the size of the RenderingWindow in pixels. More... | |
void | setRotation (const Vector3 &rotation) |
Set the rotation factors to be used when rendering the RenderingWindow back onto it's owning RenderingSurface. More... | |
void | setPivot (const Vector3 &pivot) |
Set the location of the pivot point around which the RenderingWindow will be rotated. More... | |
const Vector2 & | getPosition () const |
Return the current pixel position of the RenderingWindow. The origin is at the top-left corner. More... | |
const Size & | getSize () const |
Return the current size of the RenderingWindow in pixels. More... | |
const Vector3 & | getRotation () const |
Return the current rotations being applied to the RenderingWindow, in degrees. More... | |
const Vector3 & | getPivot () const |
Return the rotation pivot point location for the RenderingWindow. More... | |
const TextureTarget & | getTextureTarget () const |
Return the TextureTarget object that is the target for content rendered to this RenderingWindows. This is the same object passed into the constructor. More... | |
TextureTarget & | getTextureTarget () |
void | update (const float elapsed) |
Peform time based updated for the RenderingWindow. More... | |
void | setRenderEffect (RenderEffect *effect) |
Set the RenderEffect that should be used with the RenderingWindow. This may be 0 to remove a previously set RenderEffect. More... | |
RenderEffect * | getRenderEffect () |
Return a pointer to the RenderEffect currently being used with the RenderingWindow. A return value of 0 indicates that no RenderEffect is being used. More... | |
void | realiseGeometry () |
generate geometry to be used when rendering back the RenderingWindow to it's owning RenderingSurface. More... | |
const RenderingSurface & | getOwner () const |
Return the RenderingSurface that owns the RenderingWindow. This is also the RenderingSurface that will be used when the RenderingWindow renders back it's cached imagery content. More... | |
RenderingSurface & | getOwner () |
void | unprojectPoint (const Vector2 &p_in, Vector2 &p_out) |
Fill in Vector2 object p_out with an unprojected version of the point described by Vector2 p_in. | |
void | draw () |
Draw the GeometryBuffers for all rendering queues to the RenderTarget that this RenderingSurface is targetting. More... | |
void | invalidate () |
Marks the RenderingSurface as invalid, causing the geometry to be rerendered to the RenderTarget next time draw is called. More... | |
bool | isRenderingWindow () const |
Return whether this RenderingSurface is actually an instance of the RenderingWindow subclass. More... | |
Public Member Functions inherited from CEGUI::RenderingSurface | |
RenderingSurface (RenderTarget &target) | |
Constructor for RenderingSurface objects. More... | |
virtual | ~RenderingSurface () |
Destructor for RenderingSurface objects. | |
void | addGeometryBuffer (const RenderQueueID queue, const GeometryBuffer &buffer) |
Add the specified GeometryBuffer to the specified queue for rendering when the RenderingSurface is drawn. More... | |
void | removeGeometryBuffer (const RenderQueueID queue, const GeometryBuffer &buffer) |
Remove the specified GeometryBuffer from the specified queue. More... | |
void | clearGeometry (const RenderQueueID queue) |
Clears all GeometryBuffers from the specified rendering queue. More... | |
void | clearGeometry () |
Clears all GeometryBuffers from all rendering queues. More... | |
bool | isInvalidated () const |
Return whether this RenderingSurface is invalidated. More... | |
virtual RenderingWindow & | createRenderingWindow (TextureTarget &target) |
Create and return a reference to a child RenderingWindow object that will render back onto this RenderingSurface when it's draw member function is called. More... | |
virtual void | destroyRenderingWindow (RenderingWindow &window) |
Destroy a RenderingWindow we own. If we are not the present owner of the given RenderingWindow, nothing happens. More... | |
virtual void | transferRenderingWindow (RenderingWindow &window) |
transfer ownership of the RenderingWindow to this RenderingSurface. More... | |
const RenderTarget & | getRenderTarget () const |
Return the RenderTarget object that this RenderingSurface is drawing to. More... | |
RenderTarget & | getRenderTarget () |
Public Member Functions inherited from CEGUI::EventSet | |
EventSet () | |
Constructor for EventSet objects. | |
virtual | ~EventSet (void) |
Destructor for EventSet objects. | |
void | addEvent (const String &name) |
Add a new Event to the EventSet with the given name. More... | |
void | removeEvent (const String &name) |
Removes the Event with the given name. All connections to the event are disconnected. More... | |
void | removeAllEvents (void) |
Remove all Event objects from the EventSet. More... | |
bool | isEventPresent (const String &name) |
Checks to see if an Event with the given name is present in the EventSet. More... | |
virtual Event::Connection | subscribeEvent (const String &name, Event::Subscriber subscriber) |
Subscribes a handler to the named Event. If the named Event is not yet present in the EventSet, it is created and added. More... | |
virtual Event::Connection | subscribeEvent (const String &name, Event::Group group, Event::Subscriber subscriber) |
Subscribes a handler to the specified group of the named Event. If the named Event is not yet present in the EventSet, it is created and added. More... | |
virtual Event::Connection | subscribeScriptedEvent (const String &name, const String &subscriber_name) |
Subscribes the named Event to a scripted funtion. More... | |
virtual Event::Connection | subscribeScriptedEvent (const String &name, Event::Group group, const String &subscriber_name) |
Subscribes the specified group of the named Event to a scripted funtion. More... | |
virtual void | fireEvent (const String &name, EventArgs &args, const String &eventNamespace="") |
Fires the named event passing the given EventArgs object. More... | |
bool | isMuted (void) const |
Return whether the EventSet is muted or not. More... | |
void | setMutedState (bool setting) |
Set the mute state for this EventSet. More... | |
Iterator | getIterator (void) const |
Return a EventSet::Iterator object to iterate over the events currently added to the EventSet. | |
Protected Member Functions | |
virtual void | realiseGeometry_impl () |
default generates geometry to draw window as a single quad. | |
void | setOwner (RenderingSurface &owner) |
set a new owner for this RenderingWindow object | |
Protected Member Functions inherited from CEGUI::RenderingSurface | |
void | draw (const RenderQueue &queue, RenderQueueEventArgs &args) |
draw a rendering queue, firing events before and after. | |
void | detatchWindow (RenderingWindow &w) |
detatch ReneringWindow from this RenderingSurface | |
void | attachWindow (RenderingWindow &w) |
attach ReneringWindow from this RenderingSurface | |
Protected Member Functions inherited from CEGUI::EventSet | |
Event * | getEventObject (const String &name, bool autoAdd=false) |
Return a pointer to the Event object with the given name, optionally adding such an Event object to the EventSet if it does not already exist. More... | |
void | fireEvent_impl (const String &name, EventArgs &args) |
Implementation event firing member. | |
EventSet (EventSet &) | |
EventSet & | operator= (EventSet &) |
Protected Attributes | |
Renderer & | d_renderer |
holds ref to renderer | |
TextureTarget & | d_textarget |
TextureTarget to draw to. Like d_target in base, but avoiding downcasts. | |
RenderingSurface * | d_owner |
RenderingSurface that owns this object, we render back to this object. | |
GeometryBuffer * | d_geometry |
GeometryBuffer that holds geometry for drawing this window. | |
bool | d_geometryValid |
indicates whether data in GeometryBuffer is up-to-date | |
Vector2 | d_position |
Position of this RenderingWindow. | |
Size | d_size |
Size of this RenderingWindow. | |
Vector3 | d_rotation |
Rotaions for this RenderingWindow. | |
Vector3 | d_pivot |
Pivot point used for the rotation. | |
Protected Attributes inherited from CEGUI::RenderingSurface | |
RenderQueueList | d_queues |
the collection of RenderQueue objects. | |
RenderingWindowList | d_windows |
collection of RenderingWindow object we own | |
RenderTarget & | d_target |
RenderTarget that this surface actually draws to. | |
bool | d_invalidated |
holds invalidated state of target (as far as we are concerned) | |
Protected Attributes inherited from CEGUI::EventSet | |
EventMap | d_events |
bool | d_muted |
true if events for this EventSet have been muted. | |
Friends | |
void | RenderingSurface::transferRenderingWindow (RenderingWindow &) |
Additional Inherited Members | |
Public Types inherited from CEGUI::EventSet | |
typedef ConstBaseIterator < EventMap > | Iterator |
Static Public Attributes inherited from CEGUI::RenderingSurface | |
static const String | EventNamespace |
Namespace for global events from RenderingSurface objects. | |
static const String | EventRenderQueueStarted |
Event that signals the start of rendering for a queue. | |
static const String | EventRenderQueueEnded |
Event that signals the end of rendering for a queue. | |
Protected Types inherited from CEGUI::RenderingSurface | |
typedef std::map < RenderQueueID, RenderQueue > | RenderQueueList |
collection type for the queues | |
typedef std::vector < RenderingWindow * > | RenderingWindowList |
collection type for created RenderingWindow objects | |
RenderingWindow is a RenderingSurface that can be "drawn back" onto another RenderingSurface and is primarily intended to be used as a kind of cache for rendered imagery.
CEGUI::RenderingWindow::RenderingWindow | ( | TextureTarget & | target, |
RenderingSurface & | owner | ||
) |
Constructor for RenderingWindow objects.
target | The TextureTarget based object that will be used as the target for content rendering done by the RenderingWindow. |
owner | The RenderingSurface object that will be our initial owner. This RenderingSurface is also the target where our cached imagery will be rendered back to. |
|
virtual |
Draw the GeometryBuffers for all rendering queues to the RenderTarget that this RenderingSurface is targetting.
The GeometryBuffers remain in the rendering queues after the draw operation is complete. This allows the next draw operation to occur without needing to requeue all the GeometryBuffers (if for instance the sequence of buffers to be drawn remains unchanged).
Reimplemented from CEGUI::RenderingSurface.
const RenderingSurface& CEGUI::RenderingWindow::getOwner | ( | ) | const |
Return the RenderingSurface that owns the RenderingWindow. This is also the RenderingSurface that will be used when the RenderingWindow renders back it's cached imagery content.
const Vector3& CEGUI::RenderingWindow::getPivot | ( | ) | const |
Return the rotation pivot point location for the RenderingWindow.
const Vector2& CEGUI::RenderingWindow::getPosition | ( | ) | const |
Return the current pixel position of the RenderingWindow. The origin is at the top-left corner.
RenderEffect* CEGUI::RenderingWindow::getRenderEffect | ( | ) |
Return a pointer to the RenderEffect currently being used with the RenderingWindow. A return value of 0 indicates that no RenderEffect is being used.
const Vector3& CEGUI::RenderingWindow::getRotation | ( | ) | const |
Return the current rotations being applied to the RenderingWindow, in degrees.
const Size& CEGUI::RenderingWindow::getSize | ( | ) | const |
Return the current size of the RenderingWindow in pixels.
const TextureTarget& CEGUI::RenderingWindow::getTextureTarget | ( | ) | const |
Return the TextureTarget object that is the target for content rendered to this RenderingWindows. This is the same object passed into the constructor.
|
virtual |
Marks the RenderingSurface as invalid, causing the geometry to be rerendered to the RenderTarget next time draw is called.
Note that some surface types can never be in a 'valid' state and so rerendering occurs whenever draw is called. This function mainly exists as a means to hint to other surface types - those that physically cache the rendered output - that geometry content has changed and the cached imagery should be cleared and redrawn.
Reimplemented from CEGUI::RenderingSurface.
|
virtual |
Return whether this RenderingSurface is actually an instance of the RenderingWindow subclass.
Reimplemented from CEGUI::RenderingSurface.
void CEGUI::RenderingWindow::realiseGeometry | ( | ) |
generate geometry to be used when rendering back the RenderingWindow to it's owning RenderingSurface.
void CEGUI::RenderingWindow::setClippingRegion | ( | const Rect & | region | ) |
Set the clipping region that will be used when rendering the imagery for this RenderingWindow back onto the RenderingSurface that owns it.
region | Rect object describing a rectangular clipping region. |
void CEGUI::RenderingWindow::setPivot | ( | const Vector3 & | pivot | ) |
Set the location of the pivot point around which the RenderingWindow will be rotated.
pivot | Vector3 describing the three dimensional point around which the RenderingWindow will be rotated. |
void CEGUI::RenderingWindow::setPosition | ( | const Vector2 & | position | ) |
Set the two dimensional position of the RenderingWindow in pixels. The origin is at the top-left corner.
position | Vector2 object describing the desired location of the RenderingWindow, in pixels. |
void CEGUI::RenderingWindow::setRenderEffect | ( | RenderEffect * | effect | ) |
Set the RenderEffect that should be used with the RenderingWindow. This may be 0 to remove a previously set RenderEffect.
void CEGUI::RenderingWindow::setRotation | ( | const Vector3 & | rotation | ) |
Set the rotation factors to be used when rendering the RenderingWindow back onto it's owning RenderingSurface.
rotation | Vector3 object describing the rotaions to be used. Values are in degrees. |
void CEGUI::RenderingWindow::setSize | ( | const Size & | size | ) |
Set the size of the RenderingWindow in pixels.
size | Size object that describes the desired size of the RenderingWindow, in pixels. |
void CEGUI::RenderingWindow::update | ( | const float | elapsed | ) |
Peform time based updated for the RenderingWindow.
elapsed | float value describing the number of seconds that have passed since the previous call to update. |