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

#include <instancerendererbase.h>

Inherits Core::RefCounted.

Inherited by Vulkan::VkInstanceRenderer.

Public Member Functions

 InstanceRendererBase ()
 constructor
 
virtual ~InstanceRendererBase ()
 destructor
 
void Setup ()
 setup renderer
 
void Close ()
 close rendered
 
void SetShader (const Ptr< CoreGraphics::Shader > &shader)
 sets the shader instance
 
const Ptr< CoreGraphics::Shader > & GetShader () const
 gets the shader instance
 
void SetInstanceMultiplier (SizeT multiplier)
 set instancing render multiplier
 
void BeginUpdate (SizeT amount)
 begins transform updates, clears transform array
 
void AddTransform (const Math::matrix44 &matrix)
 adds transform
 
void AddId (const int id)
 add id
 
void EndUpdate ()
 ends transform updates
 
virtual void Render (const SizeT multiplier)
 render instances
 
- 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

Ptr< CoreGraphics::Shader > shader
 
Util::Array< Math::matrix44 > modelTransforms
 
Util::Array< Math::matrix44 > modelViewTransforms
 
Util::Array< Math::matrix44 > modelViewProjectionTransforms
 
Util::Array< int > objectIds
 
bool inBeginUpdate
 
bool isOpen
 

Private Member Functions

 __DeclareClass (InstanceRendererBase)
 

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

◆ InstanceRendererBase()

Base::InstanceRendererBase::InstanceRendererBase ( )

constructor

◆ ~InstanceRendererBase()

Base::InstanceRendererBase::~InstanceRendererBase ( )
virtual

destructor

Member Function Documentation

◆ __DeclareClass()

Base::InstanceRendererBase::__DeclareClass ( InstanceRendererBase )
private

◆ AddId()

void Base::InstanceRendererBase::AddId ( const int id)

add id

◆ AddTransform()

void Base::InstanceRendererBase::AddTransform ( const Math::matrix44 & matrix)

adds transform

◆ BeginUpdate()

void Base::InstanceRendererBase::BeginUpdate ( SizeT amount)

begins transform updates, clears transform array

◆ Close()

void Base::InstanceRendererBase::Close ( )

close rendered

◆ EndUpdate()

void Base::InstanceRendererBase::EndUpdate ( )

ends transform updates

Assumes all transforms has been set.

Calculate remaining transforms.

◆ GetShader()

const Ptr< CoreGraphics::Shader > & Base::InstanceRendererBase::GetShader ( ) const
inline

gets the shader instance

◆ Render()

void Base::InstanceRendererBase::Render ( const SizeT multiplier)
virtual

render instances

Reimplemented in Vulkan::VkInstanceRenderer.

◆ SetInstanceMultiplier()

void Base::InstanceRendererBase::SetInstanceMultiplier ( SizeT multiplier)

set instancing render multiplier

◆ SetShader()

void Base::InstanceRendererBase::SetShader ( const Ptr< CoreGraphics::Shader > & shader)
inline

sets the shader instance

◆ Setup()

void Base::InstanceRendererBase::Setup ( )

setup renderer

Member Data Documentation

◆ inBeginUpdate

bool Base::InstanceRendererBase::inBeginUpdate
protected

◆ isOpen

bool Base::InstanceRendererBase::isOpen
protected

◆ modelTransforms

Util::Array<Math::matrix44> Base::InstanceRendererBase::modelTransforms
protected

◆ modelViewProjectionTransforms

Util::Array<Math::matrix44> Base::InstanceRendererBase::modelViewProjectionTransforms
protected

◆ modelViewTransforms

Util::Array<Math::matrix44> Base::InstanceRendererBase::modelViewTransforms
protected

◆ objectIds

Util::Array<int> Base::InstanceRendererBase::objectIds
protected

◆ shader

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

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