Lugdunum  0.1.0
Classes | Public Member Functions | Private Attributes | Friends | List of all members
lug::Graphics::Scene::Node Class Reference

#include <Node.hpp>

Inheritance diagram for lug::Graphics::Scene::Node:
[legend]
Collaboration diagram for lug::Graphics::Scene::Node:
[legend]

Classes

struct  MeshInstance
 

Public Member Functions

 Node (Scene &scene, const std::string &name)
 
 Node (const Node &)=delete
 
 Node (Node &&)=delete
 
Nodeoperator= (const Node &)=delete
 
Nodeoperator= (Node &&)=delete
 
virtual ~Node ()=default
 
NodegetNode (const std::string &name)
 
const NodegetNode (const std::string &name) const
 
ScenegetScene ()
 
const ScenegetScene () const
 
NodecreateSceneNode (const std::string &name)
 
void attachLight (Resource::SharedPtr< Render::Light > light)
 
void attachMeshInstance (Resource::SharedPtr< Render::Mesh > mesh, Resource::SharedPtr< Render::Material > material=nullptr)
 
void attachCamera (Resource::SharedPtr< Render::Camera::Camera > camera)
 
Render::LightgetLight ()
 
const Render::LightgetLight () const
 
const MeshInstancegetMeshInstance () const
 
Render::Camera::CameragetCamera ()
 
const Render::Camera::CameragetCamera () const
 
void fetchVisibleObjects (const Renderer &renderer, const Render::View &renderView, const Render::Camera::Camera &camera, Render::Queue &renderQueue) const
 
virtual void needUpdate () override
 
- Public Member Functions inherited from lug::Graphics::Node
 Node (const std::string &name)
 
 Node (const Node &)=delete
 
 Node (Node &&)=delete
 
Nodeoperator= (const Node &)=delete
 
Nodeoperator= (Node &&)=delete
 
void setParent (Node *parent)
 
NodegetParent () const
 
const std::string & getName () const
 
NodegetNode (const std::string &name)
 
const NodegetNode (const std::string &name) const
 
const Math::Vec3f & getAbsolutePosition ()
 
const Math::QuatfgetAbsoluteRotation ()
 
const Math::Vec3f & getAbsoluteScale ()
 
const Math::Mat4x4f & getTransform ()
 
const std::vector< Node * > & getChildren () const
 
void attachChild (Node &child)
 
void translate (const Math::Vec3f &direction, TransformSpace space=TransformSpace::Local)
 
void rotate (float angle, const Math::Vec3f &axis, TransformSpace space=TransformSpace::Local)
 
void rotate (const Math::Quatf &quat, TransformSpace space=TransformSpace::Local)
 
void scale (const Math::Vec3f &scale)
 
void setPosition (const Math::Vec3f &position, TransformSpace space=TransformSpace::Local)
 
void setRotation (float angle, const Math::Vec3f &axis, TransformSpace space=TransformSpace::Local)
 
void setRotation (const Math::Quatf &rotation, TransformSpace space=TransformSpace::Local)
 
void setDirection (const Math::Vec3f &spaceTargetDirection, const Math::Vec3f &localDirectionVector, const Math::Vec3f &localUpVector, TransformSpace space=TransformSpace::Local)
 Rotates the node according to the direction given in parameter. More...
 
void lookAt (const Math::Vec3f &targetPosition, const Math::Vec3f &localDirectionVector, const Math::Vec3f &localUpVector, TransformSpace space=TransformSpace::Local)
 Rotates the node in order to look at the target position. More...
 
- Public Member Functions inherited from lug::Graphics::Render::DirtyObject
 DirtyObject ()=default
 
 DirtyObject (const DirtyObject &)=delete
 
 DirtyObject (DirtyObject &&)=delete
 
DirtyObjectoperator= (const DirtyObject &)=delete
 
DirtyObjectoperator= (DirtyObject &&)=delete
 
 ~DirtyObject ()=default
 
void setDirty ()
 
void setDirty (uint32_t currentFrame)
 
void clearDirty ()
 
void clearDirty (uint32_t currentFrame)
 
bool isDirty (uint32_t currentFrame) const
 
bool isDirty () const
 

Private Attributes

Scene_scene
 
Resource::SharedPtr< Render::Light_light {nullptr}
 
MeshInstance _meshInstance
 
Resource::SharedPtr< Render::Camera::Camera_camera {nullptr}
 

Friends

class Scene
 

Additional Inherited Members

- Public Types inherited from lug::Graphics::Node
enum  TransformSpace : uint8_t { TransformSpace::Local, TransformSpace::Parent, TransformSpace::World }
 
- Protected Attributes inherited from lug::Graphics::Node
Node_parent {nullptr}
 
std::string _name
 
std::vector< Node * > _children
 

Detailed Description

Definition at line 27 of file Node.hpp.

Constructor & Destructor Documentation

◆ Node() [1/3]

lug::Graphics::Scene::Node::Node ( Scene scene,
const std::string &  name 
)

Definition at line 9 of file Node.cpp.

◆ Node() [2/3]

lug::Graphics::Scene::Node::Node ( const Node )
delete

◆ Node() [3/3]

lug::Graphics::Scene::Node::Node ( Node &&  )
delete

◆ ~Node()

virtual lug::Graphics::Scene::Node::~Node ( )
virtualdefault

Reimplemented from lug::Graphics::Node.

Member Function Documentation

◆ operator=() [1/2]

Node& lug::Graphics::Scene::Node::operator= ( const Node )
delete

◆ operator=() [2/2]

Node& lug::Graphics::Scene::Node::operator= ( Node &&  )
delete

◆ getNode() [1/2]

Node * Node::getNode ( const std::string &  name)
inline

Definition at line 1 of file Node.inl.

◆ getNode() [2/2]

const Node * Node::getNode ( const std::string &  name) const
inline

Definition at line 5 of file Node.inl.

◆ getScene() [1/2]

Scene & Node::getScene ( )
inline

Definition at line 9 of file Node.inl.

◆ getScene() [2/2]

const Scene & Node::getScene ( ) const
inline

Definition at line 13 of file Node.inl.

◆ createSceneNode()

Node * lug::Graphics::Scene::Node::createSceneNode ( const std::string &  name)

Definition at line 11 of file Node.cpp.

◆ attachLight()

void lug::Graphics::Scene::Node::attachLight ( Resource::SharedPtr< Render::Light light)

Definition at line 15 of file Node.cpp.

◆ attachMeshInstance()

void lug::Graphics::Scene::Node::attachMeshInstance ( Resource::SharedPtr< Render::Mesh mesh,
Resource::SharedPtr< Render::Material material = nullptr 
)

Definition at line 19 of file Node.cpp.

◆ attachCamera()

void lug::Graphics::Scene::Node::attachCamera ( Resource::SharedPtr< Render::Camera::Camera camera)

Definition at line 33 of file Node.cpp.

◆ getLight() [1/2]

Render::Light * Node::getLight ( )
inline

Definition at line 17 of file Node.inl.

◆ getLight() [2/2]

const Render::Light * Node::getLight ( ) const
inline

Definition at line 21 of file Node.inl.

◆ getMeshInstance()

const Node::MeshInstance * Node::getMeshInstance ( ) const
inline

Definition at line 25 of file Node.inl.

◆ getCamera() [1/2]

Render::Camera::Camera * Node::getCamera ( )
inline

Definition at line 29 of file Node.inl.

◆ getCamera() [2/2]

const Render::Camera::Camera * Node::getCamera ( ) const
inline

Definition at line 33 of file Node.inl.

◆ fetchVisibleObjects()

void lug::Graphics::Scene::Node::fetchVisibleObjects ( const Renderer renderer,
const Render::View renderView,
const Render::Camera::Camera camera,
Render::Queue renderQueue 
) const

Definition at line 38 of file Node.cpp.

◆ needUpdate()

void lug::Graphics::Scene::Node::needUpdate ( )
overridevirtual

Reimplemented from lug::Graphics::Node.

Definition at line 53 of file Node.cpp.

Friends And Related Function Documentation

◆ Scene

friend class Scene
friend

Definition at line 28 of file Node.hpp.

Member Data Documentation

◆ _scene

Scene& lug::Graphics::Scene::Node::_scene
private

Definition at line 71 of file Node.hpp.

◆ _light

Resource::SharedPtr<Render::Light> lug::Graphics::Scene::Node::_light {nullptr}
private

Definition at line 73 of file Node.hpp.

◆ _meshInstance

MeshInstance lug::Graphics::Scene::Node::_meshInstance
private

Definition at line 74 of file Node.hpp.

◆ _camera

Resource::SharedPtr<Render::Camera::Camera> lug::Graphics::Scene::Node::_camera {nullptr}
private

Definition at line 75 of file Node.hpp.


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