InternalGraphics::InternalView Class Reference
#include <internalview.h>
Inheritance diagram for InternalGraphics::InternalView:
Detailed Description
A graphics View is used to render a Stage through a CameraEntity into a RenderTarget. Any number of views can be associated with the same Stage. Views may depend on other views. When a View is rendered, it will first ask the Views it depends on to render themselves. Subclasses of View may implement their own rendering strategies.(C) 2007 Radon Labs GmbH
Public Member Functions | |
InternalView () | |
constructor | |
virtual | ~InternalView () |
destructor | |
bool | IsAttachedToServer () const |
return true if currently attached to graphics server | |
const Util::StringAtom & | GetName () const |
get human-readable name | |
void | SetStage (const Ptr< InternalStage > &stage) |
set the stage this View is associated with | |
const Ptr< InternalStage > & | GetStage () const |
get the stage this View is associated with | |
void | SetCameraEntity (const Ptr< InternalCameraEntity > &camera) |
set the CameraEntity this View looks through | |
const Ptr< InternalCameraEntity > & | GetCameraEntity () const |
get the CameraEntity this View looks through | |
void | SetRenderTarget (const Ptr< CoreGraphics::RenderTarget > &renderTarget) |
set the render target this view renders to | |
const Ptr< CoreGraphics::RenderTarget > & | GetRenderTarget () const |
get the render target this view renders to | |
bool | HasRenderTarget () const |
check if rendertarget is set | |
void | SetMultipleRenderTarget (const Ptr< CoreGraphics::MultipleRenderTarget > &renderTarget) |
set the render target this view renders to | |
const Ptr< CoreGraphics::MultipleRenderTarget > & | GetMultipleRenderTarget () const |
get the render target this view renders to | |
void | SetFrameShader (const Ptr< Frame::FrameShader > &frameShader) |
set the view's frame shader | |
const Ptr< Frame::FrameShader > & | GetFrameShader () const |
get the view's frame shader | |
void | AddDependency (const Ptr< InternalView > &view) |
add a view which this view depends on | |
const Util::Array< Ptr< InternalView > > & | GetDependencies () const |
get all dependency views | |
virtual void | UpdateVisibilityLinks () |
update the visibility links for this view | |
void | ApplyCameraSettings () |
apply camera settings | |
virtual void | Render (IndexT frameIndex) |
render the view into its render target | |
virtual void | RenderDebug () |
render a debug view of the world | |
int | GetRefCount () const |
get the current refcount | |
void | AddRef () |
increment refcount by one | |
void | Release () |
decrement refcount and destroy object if refcount is zero | |
bool | IsInstanceOf (const Rtti &rtti) const |
return true if this object is instance of given class | |
bool | IsInstanceOf (const Util::String &className) const |
return true if this object is instance of given class by string | |
bool | IsInstanceOf (const Util::FourCC &classFourCC) const |
return true if this object is instance of given class by fourcc | |
bool | IsA (const Rtti &rtti) const |
return true if this object is instance of given class, or a derived class | |
bool | IsA (const Util::String &rttiName) const |
return true if this object is instance of given class, or a derived class, by string | |
bool | IsA (const Util::FourCC &rttiFourCC) const |
return true if this object is instance of given class, or a derived class, by fourcc | |
const Util::String & | GetClassName () const |
get the class name | |
Util::FourCC | GetClassFourCC () const |
get the class FourCC code | |
Static Public Member Functions | |
static void | DumpRefCountingLeaks () |
dump refcounting leaks, call at end of application (NEBULA3_DEBUG builds only!) | |
Protected Member Functions | |
void | SetName (const Util::StringAtom &name) |
set a human-readable name of the view | |
virtual void | OnAttachToServer () |
called when attached to graphics server | |
virtual void | OnRemoveFromServer () |
called when detached from graphics server | |
void | ResolveVisibleLights () |
resolve visible lights | |
void | ResolveVisibleModelNodeInstances (IndexT frameIndex) |
resolve visibility for optimal batch rendering |
Member Function Documentation
void InternalGraphics::InternalView::UpdateVisibilityLinks | ( | ) | [virtual] |
update the visibility links for this view
This method updates the visibility links for the view's camera. This method should usually be called before Render().
void InternalGraphics::InternalView::ApplyCameraSettings | ( | ) |
apply camera settings
This method sets the new camera transforms valid for this frame in the transformdevice
void InternalGraphics::InternalView::Render | ( | IndexT | frameIndex | ) | [virtual] |
render the view into its render target
This method renders the current view into the render target. This method must be called sometimes after UpdateVisibilityLinks()
void InternalGraphics::InternalView::RenderDebug | ( | ) | [virtual] |
render a debug view of the world
Renders a debug visualization. Can be called alone or after Render().
void InternalGraphics::InternalView::ResolveVisibleLights | ( | ) | [protected] |
resolve visible lights
This attaches visible lights to the light and shadow server.
- Todo:
- : currently this methods needs to go over all visible graphics entities to find the lights...
void InternalGraphics::InternalView::ResolveVisibleModelNodeInstances | ( | IndexT | frameIndex | ) | [protected] |
resolve visibility for optimal batch rendering
Resolve all visible ModelNodeInstances by following the visibility links of our camera. This is necessary as preparation for rendering. This is also where the OnRenderBefore() callback will be invoked on entities.
int Core::RefCounted::GetRefCount | ( | ) | const [inline, inherited] |
get the current refcount
Return the current refcount of the object.
void Core::RefCounted::AddRef | ( | ) | [inline, inherited] |
increment refcount by one
Increment the refcount of the object.
void Core::RefCounted::Release | ( | ) | [inline, inherited] |
decrement refcount and destroy object if refcount is zero
Decrement the refcount and destroy object if refcount is zero.
const Util::String & Core::RefCounted::GetClassName | ( | ) | const [inline, inherited] |
get the class name
Get the class name of the object.
Util::FourCC Core::RefCounted::GetClassFourCC | ( | ) | const [inline, inherited] |
get the class FourCC code
Get the class FourCC of the object.
void Core::RefCounted::DumpRefCountingLeaks | ( | ) | [static, inherited] |
dump refcounting leaks, call at end of application (NEBULA3_DEBUG builds only!)
This method should be called as the very last before an application exits.