vengine  0.1.0
3D graphics engine made with Vulkan
Loading...
Searching...
No Matches
ven::Object Class Reference

#include <Object.hpp>

+ Collaboration diagram for ven::Object:

Public Types

using Map = std::unordered_map<id_t, Object>
 

Public Member Functions

 ~Object ()=default
 
 Object (const Object &)=delete
 
Objectoperator= (const Object &)=delete
 
 Object (Object &&)=default
 
Objectoperator= (Object &&)=default
 
id_t getId () const
 

Static Public Member Functions

static Object createObject ()
 
static Object makePointLight (float intensity=10.F, float radius=0.1F, glm::vec3 color=glm::vec3(1.F))
 

Public Attributes

std::shared_ptr< Modelmodel {}
 
glm::vec3 color {}
 
Transform3DComponent transform3D {}
 
std::unique_ptr< PointLightComponentpointLight = nullptr
 

Private Member Functions

 Object (const id_t objId)
 

Private Attributes

id_t m_objId
 

Detailed Description

Definition at line 33 of file Object.hpp.

Member Typedef Documentation

◆ Map

using ven::Object::Map = std::unordered_map<id_t, Object>

Definition at line 37 of file Object.hpp.

Constructor & Destructor Documentation

◆ ~Object()

ven::Object::~Object ( )
default

◆ Object() [1/3]

ven::Object::Object ( const Object & )
delete

Referenced by createObject().

+ Here is the caller graph for this function:

◆ Object() [2/3]

ven::Object::Object ( Object && )
default

◆ Object() [3/3]

ven::Object::Object ( const id_t objId)
inlineexplicitprivate

Definition at line 60 of file Object.hpp.

Member Function Documentation

◆ createObject()

static Object ven::Object::createObject ( )
inlinestatic

Definition at line 40 of file Object.hpp.

References Object().

Referenced by ven::Engine::loadObjects(), ven::Engine::mainLoop(), and makePointLight().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getId()

id_t ven::Object::getId ( ) const
inlinenodiscard

Definition at line 51 of file Object.hpp.

References m_objId.

Referenced by ven::Engine::loadObjects().

+ Here is the caller graph for this function:

◆ makePointLight()

ven::Object ven::Object::makePointLight ( float intensity = 10.F,
float radius = 0.1F,
glm::vec3 color = glm::vec3(1.F) )
static

Definition at line 67 of file object.cpp.

References color, createObject(), pointLight, ven::Transform3DComponent::scale, and transform3D.

Referenced by ven::Engine::loadObjects().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator=() [1/2]

Object & ven::Object::operator= ( const Object & )
delete

◆ operator=() [2/2]

Object & ven::Object::operator= ( Object && )
default

Member Data Documentation

◆ color

glm::vec3 ven::Object::color {}

Definition at line 54 of file Object.hpp.

Referenced by ven::Engine::loadObjects(), and makePointLight().

◆ m_objId

id_t ven::Object::m_objId
private

Definition at line 62 of file Object.hpp.

Referenced by getId().

◆ model

std::shared_ptr<Model> ven::Object::model {}

Definition at line 53 of file Object.hpp.

Referenced by ven::Engine::loadObjects().

◆ pointLight

std::unique_ptr<PointLightComponent> ven::Object::pointLight = nullptr

Definition at line 57 of file Object.hpp.

Referenced by makePointLight().

◆ transform3D

Transform3DComponent ven::Object::transform3D {}

Definition at line 55 of file Object.hpp.

Referenced by ven::Engine::loadObjects(), ven::Engine::mainLoop(), and makePointLight().


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