Castor3D 0.16.0
Multiplatform 3D engine
Public Types | Public Member Functions | Protected Attributes | List of all members
castor3d::BillboardBase Class Reference

#include <BillboardList.hpp>

Inheritance diagram for castor3d::BillboardBase:
Inheritance graph
[legend]
Collaboration diagram for castor3d::BillboardBase:
Collaboration graph
[legend]

Public Types

using IdRenderNode = castor::Pair< uint32_t, BillboardRenderNode const * >
 
using Quad = castor::Array< BillboardVertex, 4u >
 

Public Member Functions

C3D_API BillboardBase (Scene &scene, SceneNode *node, ashes::PipelineVertexInputStateCreateInfoPtr vertexLayout, uint32_t vertexStride, GpuBufferOffsetT< uint8_t > vertexBuffer={})
 Constructor.
 
virtual C3D_API ~BillboardBase () noexcept=default
 Destructor.
 
C3D_API bool initialise (RenderDevice const &device, uint32_t count)
 Initialises GPU side elements.
 
C3D_API void cleanup (RenderDevice const &device)
 Cleans GPU side elements up.
 
C3D_API void update (GpuUpdater &updater)
 Updates the render pass, GPU wise.
 
C3D_API uint32_t getId (Pass const &pass) const
 Retrieves the object ID in models buffer.
 
C3D_API BillboardRenderNode const * getRenderNode (Pass const &pass) const
 Retrieves the object render node.
 
C3D_API void fillData (BillboardUboConfiguration &data) const
 Fills the given data with this billboard's properties.
 
C3D_API void setId (Pass const &pass, BillboardRenderNode const *renderNode, uint32_t id)
 Sets the object render node and ID in models buffer.
 
C3D_API ProgramFlags getProgramFlags () const
 
SubmeshComponentCombineID getComponentCombineID () const
 
MaterialObs getMaterial () const
 
castor::Point2f const & getDimensions () const
 
uint32_t getCount () const
 
bool isInitialised () const
 
GpuBufferOffsetT< uint8_t > const & getVertexBuffer () const
 
GpuBufferOffsetT< uint8_t > & getVertexBuffer ()
 
uint32_t getVertexStride ()
 
GeometryBuffers const & getGeometryBuffers () const
 
ObjectBufferOffset const & getBufferOffsets () const
 
Scene const & getParentScene () const
 
ScenegetParentScene ()
 
SceneNodegetNode () const
 
BillboardType getBillboardType () const
 
BillboardSize getBillboardSize () const
 
castor::UnorderedMap< Pass const *, IdRenderNode > const & getIds () const
 
void setDimensions (castor::Point2f const &value)
 
void setCenterOffset (uint32_t value)
 
void setNode (SceneNode &value)
 
void setBillboardType (BillboardType value)
 
void setBillboardSize (BillboardSize value)
 
void setGpuFilled (bool value)
 
C3D_API void setMaterial (MaterialObs value)
 
C3D_API void setCount (uint32_t value)
 
- Public Member Functions inherited from castor3d::RenderedObject
C3D_API void fillEntry (uint32_t nodeId, Pass const &pass, SceneNode const &sceneNode, uint32_t meshletCount, ModelBufferConfiguration &modelData)
 
C3D_API void fillEntryOffsets (uint32_t nodeId, VkDeviceSize vertexOffset, VkDeviceSize indexOffset, VkDeviceSize meshletOffset)
 
void setVisible (bool value) noexcept
 
void setShadowCaster (bool value) noexcept
 
void setShadowReceiver (bool value) noexcept
 
void setCullable (bool value) noexcept
 
bool isVisible () const noexcept
 
bool isShadowCaster () const noexcept
 
bool isShadowReceiver () const noexcept
 
bool isCullable () const noexcept
 

Protected Attributes

Scenem_scene
 
SceneNodem_node {}
 
MaterialObs m_material {}
 
castor::Point2f m_dimensions
 
castor::Point3f m_cameraPosition
 
GpuBufferOffsetT< uint8_t > m_vertexBuffer
 
ashes::PipelineVertexInputStateCreateInfoPtr m_vertexLayout
 
uint32_t m_vertexStride
 
ashes::PipelineVertexInputStateCreateInfoPtr m_quadLayout
 
ObjectBufferOffset m_bufferOffsets
 
GeometryBuffers m_geometryBuffers
 
bool m_needUpdate { true }
 
bool m_initialised { false }
 
bool m_gpuFilled { false }
 
uint32_t m_count { 0u }
 
uint32_t m_centerOffset { 0u }
 
BillboardType m_billboardType { BillboardType::eCylindrical }
 
BillboardSize m_billboardSize { BillboardSize::eDynamic }
 
castor::UnorderedMap< Pass const *, IdRenderNodem_ids {}
 
SubmeshComponentCombine m_proxyCombine
 

Member Typedef Documentation

◆ IdRenderNode

◆ Quad

Constructor & Destructor Documentation

◆ BillboardBase()

C3D_API castor3d::BillboardBase::BillboardBase ( Scene & scene,
SceneNode * node,
ashes::PipelineVertexInputStateCreateInfoPtr vertexLayout,
uint32_t vertexStride,
GpuBufferOffsetT< uint8_t > vertexBuffer = {} )

Constructor.

Parameters
[in]sceneThe parent scene.
[in]nodeThe parent scene node.
[in]vertexLayoutThe layout for the vertex buffer.
[in]vertexStrideThe vertex stride.
[in]vertexBufferThe vertex buffer.

◆ ~BillboardBase()

virtual C3D_API castor3d::BillboardBase::~BillboardBase ( )
virtualdefaultnoexcept

Destructor.

Member Function Documentation

◆ cleanup()

C3D_API void castor3d::BillboardBase::cleanup ( RenderDevice const & device)

Cleans GPU side elements up.

Parameters
deviceThe current device.

◆ fillData()

C3D_API void castor3d::BillboardBase::fillData ( BillboardUboConfiguration & data) const

Fills the given data with this billboard's properties.

Parameters
[out]dataThe data to fill.

◆ getBillboardSize()

BillboardSize castor3d::BillboardBase::getBillboardSize ( ) const
inline

References m_billboardSize.

◆ getBillboardType()

BillboardType castor3d::BillboardBase::getBillboardType ( ) const
inline

References m_billboardType.

◆ getBufferOffsets()

ObjectBufferOffset const & castor3d::BillboardBase::getBufferOffsets ( ) const
inline

References m_bufferOffsets.

◆ getComponentCombineID()

SubmeshComponentCombineID castor3d::BillboardBase::getComponentCombineID ( ) const
inline

◆ getCount()

uint32_t castor3d::BillboardBase::getCount ( ) const
inline

References m_count.

◆ getDimensions()

castor::Point2f const & castor3d::BillboardBase::getDimensions ( ) const
inline

References m_dimensions.

◆ getGeometryBuffers()

GeometryBuffers const & castor3d::BillboardBase::getGeometryBuffers ( ) const
inline

References m_geometryBuffers.

◆ getId()

C3D_API uint32_t castor3d::BillboardBase::getId ( Pass const & pass) const

Retrieves the object ID in models buffer.

Parameters
[in]passThe material pass.

◆ getIds()

castor::UnorderedMap< Pass const *, IdRenderNode > const & castor3d::BillboardBase::getIds ( ) const
inline

References m_ids.

◆ getMaterial()

MaterialObs castor3d::BillboardBase::getMaterial ( ) const
inline

References m_material.

◆ getNode()

SceneNode * castor3d::BillboardBase::getNode ( ) const
inline

References m_node.

◆ getParentScene() [1/2]

Scene & castor3d::BillboardBase::getParentScene ( )
inline

References m_scene.

◆ getParentScene() [2/2]

Scene const & castor3d::BillboardBase::getParentScene ( ) const
inline

References m_scene.

◆ getProgramFlags()

C3D_API ProgramFlags castor3d::BillboardBase::getProgramFlags ( ) const

name Getters.

◆ getRenderNode()

C3D_API BillboardRenderNode const * castor3d::BillboardBase::getRenderNode ( Pass const & pass) const

Retrieves the object render node.

Parameters
[in]passThe material pass.

◆ getVertexBuffer() [1/2]

GpuBufferOffsetT< uint8_t > & castor3d::BillboardBase::getVertexBuffer ( )
inline

References m_vertexBuffer.

◆ getVertexBuffer() [2/2]

GpuBufferOffsetT< uint8_t > const & castor3d::BillboardBase::getVertexBuffer ( ) const
inline

References m_vertexBuffer.

◆ getVertexStride()

uint32_t castor3d::BillboardBase::getVertexStride ( )
inline

References m_vertexStride.

◆ initialise()

C3D_API bool castor3d::BillboardBase::initialise ( RenderDevice const & device,
uint32_t count )

Initialises GPU side elements.

Parameters
deviceThe current device.
[in]countThe elements count.
Returns
true if all is OK.

◆ isInitialised()

bool castor3d::BillboardBase::isInitialised ( ) const
inline

References m_initialised.

◆ setBillboardSize()

void castor3d::BillboardBase::setBillboardSize ( BillboardSize value)
inline

References m_billboardSize.

◆ setBillboardType()

void castor3d::BillboardBase::setBillboardType ( BillboardType value)
inline

References m_billboardType.

◆ setCenterOffset()

void castor3d::BillboardBase::setCenterOffset ( uint32_t value)
inline

References m_centerOffset.

◆ setCount()

C3D_API void castor3d::BillboardBase::setCount ( uint32_t value)

◆ setDimensions()

void castor3d::BillboardBase::setDimensions ( castor::Point2f const & value)
inline

name Setters.

References m_dimensions.

◆ setGpuFilled()

void castor3d::BillboardBase::setGpuFilled ( bool value)
inline

References m_gpuFilled.

◆ setId()

C3D_API void castor3d::BillboardBase::setId ( Pass const & pass,
BillboardRenderNode const * renderNode,
uint32_t id )

Sets the object render node and ID in models buffer.

Parameters
[in]passThe material pass.
[in]renderNodeThe render node.
[in]idThe ID.

◆ setMaterial()

C3D_API void castor3d::BillboardBase::setMaterial ( MaterialObs value)

◆ setNode()

void castor3d::BillboardBase::setNode ( SceneNode & value)
inline

References m_node.

◆ update()

C3D_API void castor3d::BillboardBase::update ( GpuUpdater & updater)

Updates the render pass, GPU wise.

Parameters
[in,out]updaterThe update data.

Member Data Documentation

◆ m_billboardSize

BillboardSize castor3d::BillboardBase::m_billboardSize { BillboardSize::eDynamic }
protected

◆ m_billboardType

BillboardType castor3d::BillboardBase::m_billboardType { BillboardType::eCylindrical }
protected

◆ m_bufferOffsets

ObjectBufferOffset castor3d::BillboardBase::m_bufferOffsets
protected

Referenced by getBufferOffsets().

◆ m_cameraPosition

castor::Point3f castor3d::BillboardBase::m_cameraPosition
protected

◆ m_centerOffset

uint32_t castor3d::BillboardBase::m_centerOffset { 0u }
protected

Referenced by setCenterOffset().

◆ m_count

uint32_t castor3d::BillboardBase::m_count { 0u }
protected

Referenced by getCount().

◆ m_dimensions

castor::Point2f castor3d::BillboardBase::m_dimensions
protected

Referenced by getDimensions(), and setDimensions().

◆ m_geometryBuffers

GeometryBuffers castor3d::BillboardBase::m_geometryBuffers
protected

Referenced by getGeometryBuffers().

◆ m_gpuFilled

bool castor3d::BillboardBase::m_gpuFilled { false }
protected

Referenced by setGpuFilled().

◆ m_ids

castor::UnorderedMap< Pass const *, IdRenderNode > castor3d::BillboardBase::m_ids {}
protected

Referenced by getIds().

◆ m_initialised

bool castor3d::BillboardBase::m_initialised { false }
protected

Referenced by isInitialised().

◆ m_material

MaterialObs castor3d::BillboardBase::m_material {}
protected

Referenced by getMaterial().

◆ m_needUpdate

bool castor3d::BillboardBase::m_needUpdate { true }
protected

◆ m_node

SceneNode* castor3d::BillboardBase::m_node {}
protected

Referenced by getNode(), and setNode().

◆ m_proxyCombine

SubmeshComponentCombine castor3d::BillboardBase::m_proxyCombine
protected

Referenced by getComponentCombineID().

◆ m_quadLayout

ashes::PipelineVertexInputStateCreateInfoPtr castor3d::BillboardBase::m_quadLayout
protected

◆ m_scene

Scene& castor3d::BillboardBase::m_scene
protected

Referenced by getParentScene(), and getParentScene().

◆ m_vertexBuffer

GpuBufferOffsetT< uint8_t > castor3d::BillboardBase::m_vertexBuffer
protected

Referenced by getVertexBuffer(), and getVertexBuffer().

◆ m_vertexLayout

ashes::PipelineVertexInputStateCreateInfoPtr castor3d::BillboardBase::m_vertexLayout
protected

◆ m_vertexStride

uint32_t castor3d::BillboardBase::m_vertexStride
protected

Referenced by getVertexStride().


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