Castor3D 0.12.0
Multiplatform 3D engine
Public Member Functions | Protected Attributes | List of all members
castor3d::BillboardList Class Reference

#include <BillboardList.hpp>

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

Public Member Functions

C3D_API BillboardList (castor::String const &name, Scene &scene, SceneNode &parent)
 Constructor. More...
 
C3D_API BillboardList (castor::String const &name, Scene &scene)
 Constructor. More...
 
C3D_API bool initialise (RenderDevice const &device)
 Initialises GPU side elements. More...
 
C3D_API void removePoint (uint32_t index)
 Removes a point from the list. More...
 
C3D_API void addPoint (castor::Point3f const &position)
 adds a point to the list More...
 
C3D_API void addPoints (castor::Point3fArray const &positions)
 adds a points list to the list More...
 
C3D_API void attachTo (SceneNode &node) override
 Attaches the movable object to a node. More...
 
castor::Point3f const & getAt (uint32_t index) const
 
castor::Point3fArrayIt begin ()
 
castor::Point3fArrayConstIt begin () const
 
castor::Point3fArrayIt end ()
 
castor::Point3fArrayConstIt end () const
 
void setAt (uint32_t index, castor::Point3f const &position)
 
- Public Member Functions inherited from castor3d::MovableObject
C3D_API MovableObject (castor::String const &name, Scene &scene, MovableType type, SceneNode &node)
 Constructor. More...
 
C3D_API MovableObject (castor::String const &name, Scene &scene, MovableType type)
 Constructor. More...
 
virtual C3D_API ~MovableObject ()
 Destructor. More...
 
C3D_API void detach ()
 Detaches the movable object from it's parent. More...
 
virtual C3D_API void attachTo (SceneNode &node)
 Attaches the movable object to a node. More...
 
C3D_API EngineRPtr getEngine () const
 
SceneNodegetParent () const
 
MovableType getType () const
 
- Public Member Functions inherited from castor3d::BillboardBase
C3D_API BillboardBase (Scene &scene, SceneNode *node, ashes::PipelineVertexInputStateCreateInfoPtr vertexLayout, uint32_t vertexStride, GpuBufferOffsetT< uint8_t > vertexBuffer={})
 Constructor. More...
 
C3D_API ~BillboardBase ()
 Destructor. More...
 
C3D_API bool initialise (RenderDevice const &device, uint32_t count)
 Initialises GPU side elements. More...
 
C3D_API void cleanup (RenderDevice const &device)
 Cleans GPU side elements up. More...
 
C3D_API void sortByDistance (castor::Point3f const &cameraPosition)
 Sorts the points from farthest to nearest from the camera. More...
 
C3D_API void update (GpuUpdater &updater)
 Updates the render pass, GPU wise. More...
 
C3D_API ProgramFlags getProgramFlags () const
 
C3D_API uint32_t getId (Pass const &pass) const
 
MaterialRPtr getMaterial () const
 
castor::Point2f const & getDimensions () const
 
uint32_t getCount () const
 
bool isInitialised () const
 
GpuBufferOffsetT< uint8_t > const & getVertexBuffer () const
 
GpuBufferOffsetT< uint8_t > & getVertexBuffer ()
 
GeometryBuffers const & getGeometryBuffers () const
 
ObjectBufferOffset const & getBufferOffsets () const
 
Scene const & getParentScene () const
 
ScenegetParentScene ()
 
SceneNodegetNode () const
 
BillboardType getBillboardType () const
 
BillboardSize getBillboardSize () const
 
C3D_API void setId (Pass const &pass, uint32_t id)
 
void setDimensions (castor::Point2f const &value)
 
void setCenterOffset (uint32_t value)
 
void setNode (SceneNode &value)
 
void setBillboardType (BillboardType value)
 
void setBillboardSize (BillboardSize value)
 
C3D_API void setMaterial (MaterialRPtr value)
 
C3D_API void setCount (uint32_t value)
 
- Public Member Functions inherited from castor3d::RenderedObject
void setVisible (bool value)
 
void setShadowCaster (bool value)
 
void setShadowReceiver (bool value)
 
void setCulled (bool value)
 
bool isVisible () const
 
bool isShadowCaster () const
 
bool isShadowReceiver () const
 
bool isCulled () const
 

Protected Attributes

castor::Point3fArray m_arrayPositions
 
- Protected Attributes inherited from castor3d::MovableObject
MovableType m_type
 
castor::String m_strNodeName
 
SceneNodem_sceneNode
 
OnSceneNodeChangedConnection m_notifyIndex
 
- Protected Attributes inherited from castor3d::BillboardBase
Scenem_scene
 
SceneNodem_node
 
MaterialRPtr 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
 
GeometryBuffers m_geometryBuffers
 
bool m_needUpdate { true }
 
bool m_initialised { false }
 
uint32_t m_count { 0u }
 
uint32_t m_centerOffset { 0u }
 
BillboardType m_billboardType { BillboardType::eCylindrical }
 
BillboardSize m_billboardSize { BillboardSize::eDynamic }
 
std::unordered_map< Pass const *, uint32_t > m_ids {}
 

Additional Inherited Members

- Public Types inherited from castor3d::BillboardBase
using Quad = std::array< BillboardVertex, 4u >
 
- Public Attributes inherited from castor3d::BillboardBase
OnBillboardMaterialChanged onMaterialChanged
 

Constructor & Destructor Documentation

◆ BillboardList() [1/2]

C3D_API castor3d::BillboardList::BillboardList ( castor::String const &  name,
Scene scene,
SceneNode parent 
)

Constructor.

Parameters
[in]nameThe name.
[in]sceneThe parent scene.
[in]parentThe parent scene node.

◆ BillboardList() [2/2]

C3D_API castor3d::BillboardList::BillboardList ( castor::String const &  name,
Scene scene 
)

Constructor.

Parameters
[in]nameThe name.
[in]sceneThe parent scene.

Member Function Documentation

◆ addPoint()

C3D_API void castor3d::BillboardList::addPoint ( castor::Point3f const &  position)

adds a point to the list

Parameters
[in]positionThe point

◆ addPoints()

C3D_API void castor3d::BillboardList::addPoints ( castor::Point3fArray const &  positions)

adds a points list to the list

Parameters
[in]positionsThe points list

◆ attachTo()

C3D_API void castor3d::BillboardList::attachTo ( SceneNode node)
overridevirtual

Attaches the movable object to a node.

Parameters
[in]nodeThe parent scene node.

Reimplemented from castor3d::MovableObject.

◆ begin() [1/2]

castor::Point3fArrayIt castor3d::BillboardList::begin ( )
inline

References m_arrayPositions.

◆ begin() [2/2]

castor::Point3fArrayConstIt castor3d::BillboardList::begin ( ) const
inline

References m_arrayPositions.

◆ end() [1/2]

castor::Point3fArrayIt castor3d::BillboardList::end ( )
inline

References m_arrayPositions.

◆ end() [2/2]

castor::Point3fArrayConstIt castor3d::BillboardList::end ( ) const
inline

References m_arrayPositions.

◆ getAt()

castor::Point3f const & castor3d::BillboardList::getAt ( uint32_t  index) const
inline

name Getters.

References m_arrayPositions.

◆ initialise()

C3D_API bool castor3d::BillboardList::initialise ( RenderDevice const &  device)

Initialises GPU side elements.

Parameters
deviceThe current device.
Returns
true if all is OK

◆ removePoint()

C3D_API void castor3d::BillboardList::removePoint ( uint32_t  index)

Removes a point from the list.

Parameters
[in]indexThe point index

◆ setAt()

void castor3d::BillboardList::setAt ( uint32_t  index,
castor::Point3f const &  position 
)
inline

Member Data Documentation

◆ m_arrayPositions

castor::Point3fArray castor3d::BillboardList::m_arrayPositions
protected

Referenced by begin(), end(), getAt(), and setAt().


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