Nebula
Loading...
Searching...
No Matches
Base::InstanceServerBase Class Reference

#include <instanceserverbase.h>

Inherits Core::RefCounted.

Inherited by Vulkan::VkInstanceServer.

Public Member Functions

 InstanceServerBase ()
 constructor
virtual ~InstanceServerBase ()
 destructor
virtual bool Open ()
 open the InstanceServerBase
virtual void Close ()
 close the InstanceServerBase
bool IsOpen () const
 return if InstanceServerBase is open
void BeginInstancing (const Ptr< Models::ModelNode > &modelNode, const SizeT multiplier, const Ptr< CoreGraphics::Shader > &shader, const IndexT &pass)
 begins adding model instances to server
void AddInstance (const IndexT &instanceCode, const Ptr< Models::ModelNodeInstance > &instance)
 adds instance to current model
void EndInstancing ()
 ends adding model instances
virtual void Render (IndexT frameIndex)
 updates instance server (call from batch)
Public Member Functions inherited from Core::RefCounted
 RefCounted ()
 constructor
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::StringGetClassName () const
 get the class name
Util::FourCC GetClassFourCC () const
 get the class FourCC code

Protected Attributes

IndexT pass
Ptr< CoreGraphics::Shader > shader
Ptr< Instancing::InstanceRendererrenderer
Ptr< Models::ModelNodemodelNode
Util::Dictionary< IndexT, Util::Array< Ptr< Models::ModelNodeInstance > > > instancesByCode
bool isBeginInstancing
bool isOpen
SizeT multiplier

Private Member Functions

 __DeclareSingleton (InstanceServerBase)
 __DeclareClass (InstanceServerBase)

Additional Inherited Members

Static Public Member Functions inherited from Core::RefCounted
static void DumpRefCountingLeaks ()
 dump refcounting leaks, call at end of application (NEBULA_DEBUG builds only!)
Protected Member Functions inherited from Core::RefCounted
virtual ~RefCounted ()
 destructor (called when refcount reaches zero)

Constructor & Destructor Documentation

◆ InstanceServerBase()

Base::InstanceServerBase::InstanceServerBase ( )

constructor

◆ ~InstanceServerBase()

Base::InstanceServerBase::~InstanceServerBase ( )
virtual

destructor

Member Function Documentation

◆ __DeclareClass()

Base::InstanceServerBase::__DeclareClass ( InstanceServerBase )
private

◆ __DeclareSingleton()

Base::InstanceServerBase::__DeclareSingleton ( InstanceServerBase )
private

◆ AddInstance()

void Base::InstanceServerBase::AddInstance ( const IndexT & instanceCode,
const Ptr< Models::ModelNodeInstance > & instance )

adds instance to current model

Add model instances to list.

◆ BeginInstancing()

void Base::InstanceServerBase::BeginInstancing ( const Ptr< Models::ModelNode > & modelNode,
const SizeT multiplier,
const Ptr< CoreGraphics::Shader > & shader,
const IndexT & pass )

begins adding model instances to server

Prepare to render model.

◆ Close()

void Base::InstanceServerBase::Close ( )
virtual

close the InstanceServerBase

Reimplemented in Vulkan::VkInstanceServer.

◆ EndInstancing()

void Base::InstanceServerBase::EndInstancing ( )

ends adding model instances

End the instancing.

◆ IsOpen()

bool Base::InstanceServerBase::IsOpen ( ) const
inline

return if InstanceServerBase is open

◆ Open()

bool Base::InstanceServerBase::Open ( )
virtual

open the InstanceServerBase

Reimplemented in Vulkan::VkInstanceServer.

◆ Render()

void Base::InstanceServerBase::Render ( IndexT frameIndex)
virtual

updates instance server (call from batch)

Performs actual instanced rendering, override this in a subclass.

Reimplemented in Vulkan::VkInstanceServer.

Member Data Documentation

◆ instancesByCode

Util::Dictionary<IndexT, Util::Array<Ptr<Models::ModelNodeInstance> > > Base::InstanceServerBase::instancesByCode
protected

◆ isBeginInstancing

bool Base::InstanceServerBase::isBeginInstancing
protected

◆ isOpen

bool Base::InstanceServerBase::isOpen
protected

◆ modelNode

Ptr<Models::ModelNode> Base::InstanceServerBase::modelNode
protected

◆ multiplier

SizeT Base::InstanceServerBase::multiplier
protected

◆ pass

IndexT Base::InstanceServerBase::pass
protected

◆ renderer

Ptr<Instancing::InstanceRenderer> Base::InstanceServerBase::renderer
protected

◆ shader

Ptr<CoreGraphics::Shader> Base::InstanceServerBase::shader
protected

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