Castor3D  ..
Classes | Public Member Functions | List of all members
Castor3D::BillboardList Class Reference

Billboards list. More...

+ Inheritance diagram for Castor3D::BillboardList:
+ Collaboration diagram for Castor3D::BillboardList:

Classes

class  BinaryParser
 BillboardList loader. More...
 
class  TextLoader
 Camera loader. More...
 

Public Member Functions

C3D_API BillboardList (Castor::String const &p_name, Scene &p_scene, SceneNodeSPtr p_parent, RenderSystem &p_renderSystem)
 Constructor. More...
 
C3D_API ~BillboardList ()
 Destructor. More...
 
C3D_API bool Initialise ()
 Initialises GPU side elements. More...
 
C3D_API void Cleanup ()
 Cleans GPU side elements up. More...
 
C3D_API void SetMaterial (MaterialSPtr p_pMaterial)
 Sets the material. More...
 
C3D_API void RemovePoint (uint32_t p_index)
 Removes a point from the list. More...
 
C3D_API void AddPoint (Castor::Point3r const &p_position)
 Adds a point to the list. More...
 
C3D_API void AddPoints (Castor::Point3rArray const &p_ptPositions)
 Adds a points list to the list. More...
 
C3D_API void Draw (ShaderProgram const &p_program)
 Renders the billboards. More...
 
C3D_API void SetDimensions (Castor::Size const &p_dimensions)
 Sets the billboards dimensions. More...
 
C3D_API void SortPoints (Castor::Point3r const &p_cameraPosition)
 Sorts the points from farthest to nearest from the camera. More...
 
Castor::Point3r const & GetAt (uint32_t p_index) const
 Gets a point from the list. More...
 
uint32_t GetCount () const
 Gets the list size. More...
 
void SetAt (uint32_t p_index, Castor::Point3r const &p_position)
 Sets a point in the list. More...
 
MaterialSPtr GetMaterial () const
 Retrieves the material. More...
 
Castor::Size const & GetDimensions () const
 Retrieves the billboards dimensions. More...
 
Castor::Point3rArrayIt begin ()
 Gets an iterator to the beginning of the list. More...
 
Castor::Point3rArrayConstIt begin () const
 Gets an iterator to the beginning of the list. More...
 
Castor::Point3rArrayIt end ()
 Gets an iterator to the end of the list. More...
 
Castor::Point3rArrayConstIt end () const
 Gets an iterator to the end of the list. More...
 
- Public Member Functions inherited from Castor3D::MovableObject
C3D_API MovableObject (Castor::String const &p_name, Scene &p_scene, eMOVABLE_TYPE p_type, SceneNodeSPtr p_sn)
 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 (SceneNodeSPtr p_node)
 Attaches the movable object to a node. More...
 
Castor::String const & GetName () const
 Retrieves the object name. More...
 
SceneNodeSPtr GetParent () const
 Retrieves the parent node. More...
 
eMOVABLE_TYPE GetType () const
 Retrieves the object type. More...
 
void SetName (Castor::String const &p_name)
 Sets the object name. More...
 
- Public Member Functions inherited from Castor3D::Animable
C3D_API AnimationSPtr CreateAnimation (Castor::String const &p_name)
 Creates an animation. More...
 
C3D_API void CleanupAnimations ()
 Empties the animations map. More...
 
C3D_API AnimationSPtr GetAnimation (Castor::String const &p_name)
 Retrieves an animation. More...
 
AnimationPtrStrMap const & GetAnimations () const
 

Additional Inherited Members

- Protected Member Functions inherited from Castor3D::Animable
 Animable ()
 Constructor. More...
 
 ~Animable ()
 Destructor. More...
 
- Protected Attributes inherited from Castor3D::MovableObject
eMOVABLE_TYPE m_type
 Movable object type. More...
 
Castor::String m_name
 The object name. More...
 
Castor::String m_strNodeName
 The parent node name. More...
 
SceneNodeWPtr m_pSceneNode
 The parent scene node. More...
 
uint32_t m_notifyIndex = 0
 The node change notification index. More...
 
- Protected Attributes inherited from Castor3D::Animable
AnimationPtrStrMap m_animations
 All animations. More...
 

Detailed Description

Billboards list.

Author
Sylvain DOREMUS
Version
0.7.0
Date
04/11/2013
Remarks
All billboards from this list shares the same texture

Constructor & Destructor Documentation

◆ BillboardList()

C3D_API Castor3D::BillboardList::BillboardList ( Castor::String const &  p_name,
Scene p_scene,
SceneNodeSPtr  p_parent,
RenderSystem p_renderSystem 
)

Constructor.

Parameters
[in]p_nameThe name.
[in]p_sceneThe parent scene.
[in]p_parentThe parent scene node.
[in]p_renderSystemThe RenderSystem.

◆ ~BillboardList()

C3D_API Castor3D::BillboardList::~BillboardList ( )

Destructor.

Member Function Documentation

◆ AddPoint()

C3D_API void Castor3D::BillboardList::AddPoint ( Castor::Point3r const &  p_position)

Adds a point to the list.

Parameters
[in]p_positionThe point

◆ AddPoints()

C3D_API void Castor3D::BillboardList::AddPoints ( Castor::Point3rArray const &  p_ptPositions)

Adds a points list to the list.

Parameters
[in]p_ptPositionsThe points list

◆ begin() [1/2]

Castor::Point3rArrayIt Castor3D::BillboardList::begin ( )
inline

Gets an iterator to the beginning of the list.

Returns
The iterator

◆ begin() [2/2]

Castor::Point3rArrayConstIt Castor3D::BillboardList::begin ( ) const
inline

Gets an iterator to the beginning of the list.

Returns
The iterator

◆ Cleanup()

C3D_API void Castor3D::BillboardList::Cleanup ( )

Cleans GPU side elements up.

◆ Draw()

C3D_API void Castor3D::BillboardList::Draw ( ShaderProgram const &  p_program)

Renders the billboards.

Parameters
[in]p_programThe shader program.

◆ end() [1/2]

Castor::Point3rArrayIt Castor3D::BillboardList::end ( )
inline

Gets an iterator to the end of the list.

Returns
The iterator

◆ end() [2/2]

Castor::Point3rArrayConstIt Castor3D::BillboardList::end ( ) const
inline

Gets an iterator to the end of the list.

Returns
The iterator

◆ GetAt()

Castor::Point3r const& Castor3D::BillboardList::GetAt ( uint32_t  p_index) const
inline

Gets a point from the list.

Parameters
[in]p_indexThe point index
Returns
The point

◆ GetCount()

uint32_t Castor3D::BillboardList::GetCount ( ) const
inline

Gets the list size.

Returns
The value

◆ GetDimensions()

Castor::Size const& Castor3D::BillboardList::GetDimensions ( ) const
inline

Retrieves the billboards dimensions.

Returns
The value

◆ GetMaterial()

MaterialSPtr Castor3D::BillboardList::GetMaterial ( ) const
inline

Retrieves the material.

Returns
The value

◆ Initialise()

C3D_API bool Castor3D::BillboardList::Initialise ( )

Initialises GPU side elements.

Returns
true if all is OK

◆ RemovePoint()

C3D_API void Castor3D::BillboardList::RemovePoint ( uint32_t  p_index)

Removes a point from the list.

Parameters
[in]p_indexThe point index

◆ SetAt()

void Castor3D::BillboardList::SetAt ( uint32_t  p_index,
Castor::Point3r const &  p_position 
)
inline

Sets a point in the list.

Parameters
[in]p_indexThe point index
[in]p_positionThe point

◆ SetDimensions()

C3D_API void Castor3D::BillboardList::SetDimensions ( Castor::Size const &  p_dimensions)

Sets the billboards dimensions.

Parameters
[in]p_dimensionsThe new value

◆ SetMaterial()

C3D_API void Castor3D::BillboardList::SetMaterial ( MaterialSPtr  p_pMaterial)

Sets the material.

Parameters
[in]p_pMaterialThe new value

◆ SortPoints()

C3D_API void Castor3D::BillboardList::SortPoints ( Castor::Point3r const &  p_cameraPosition)

Sorts the points from farthest to nearest from the camera.

Parameters
[in]p_cameraPositionThe camera position, relative to billboard.

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