Bomberman
Public Member Functions | Public Attributes | List of all members
BBM::CameraComponent Class Reference

A class allowing one to place the camera in the scene. More...

#include <CameraComponent.hpp>

Inheritance diagram for BBM::CameraComponent:
Collaboration diagram for BBM::CameraComponent:

Public Member Functions

Componentclone (WAL::Entity &entity) const override
 Clone a component for another or the same entity. More...
 
 CameraComponent (WAL::Entity &, Vector3f cameraTarget=Vector3f())
 Ctor. More...
 
 CameraComponent (const CameraComponent &)=default
 A camera component is copy constructable. More...
 
 ~CameraComponent () override=default
 Default destructor. More...
 
CameraComponentoperator= (const CameraComponent &)=delete
 A camera component can't be assigned. More...
 
- Public Member Functions inherited from WAL::Component
Componentoperator= (const Component &)=delete
 A component can't be assigned. More...
 
virtual ~Component ()=default
 A virtual destructor. More...
 
virtual void onStart ()
 The entity or this component has just been enabled. More...
 
virtual void onStop ()
 The entity or this component has just been disable. More...
 

Public Attributes

Vector3f target
 The camera's target, the cam will look at this position. More...
 

Additional Inherited Members

- Protected Member Functions inherited from WAL::Component
 Component (Entity &entity)
 A component can't be instantiated, it should be derived. More...
 
 Component (const Component &)=default
 A component can't be instantiated, it should be derived. More...
 
- Protected Attributes inherited from WAL::Component
Entity_entity
 The entity that own this component. More...
 

Detailed Description

A class allowing one to place the camera in the scene.

Warning
Only one CameraComponent is allowed on the scene. Using more than one result in undefined behaviors.

Constructor & Destructor Documentation

◆ CameraComponent() [1/2]

BBM::CameraComponent::CameraComponent ( WAL::Entity entity,
Vector3f  cameraTarget = Vector3f() 
)
explicit

Ctor.

◆ CameraComponent() [2/2]

BBM::CameraComponent::CameraComponent ( const CameraComponent )
default

A camera component is copy constructable.

◆ ~CameraComponent()

BBM::CameraComponent::~CameraComponent ( )
overridedefault

Default destructor.

Member Function Documentation

◆ clone()

WAL::Component * BBM::CameraComponent::clone ( WAL::Entity entity) const
overridevirtual

Clone a component for another or the same entity.

Parameters
entityThe entity that owns the ne component.

Implements WAL::Component.

◆ operator=()

CameraComponent& BBM::CameraComponent::operator= ( const CameraComponent )
delete

A camera component can't be assigned.

Member Data Documentation

◆ target

Vector3f BBM::CameraComponent::target

The camera's target, the cam will look at this position.


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