Foray Library
rapid prototyping framework for crossplatform development of vulkan hardware ray tracing applications
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
foray::scene::ncomp::Transform Class Reference

Defines a nodes transform relative to its parent (or world origin, if no parent is set) More...

#include <foray_transform.hpp>

Inheritance diagram for foray::scene::ncomp::Transform:
foray::scene::NodeComponent foray::scene::Component foray::NoMoveDefaults foray::Polymorphic

Public Member Functions

 Transform ()
 
const glm::mat4 & GetGlobalMatrix ()
 
void RecalculateIfDirty (bool recursive=false)
 
void SetTranslation (const glm::vec3 &translation)
 
void SetRotation (const glm::quat &rotation)
 
void SetScale (const glm::vec3 &scale)
 
void SetLocalMatrix (const glm::mat4 &matrix)
 
- Public Member Functions inherited from foray::scene::NodeComponent
NodeGetNode ()
 Node this component is attached to. Casts mRegistry to Node.
 
virtual SceneGetScene () override
 Scene this component is a part of. Casts mRegistry->mCallbackDispatcher to Scene.
 
virtual RegistryGetGlobals () override
 Global component registry. Casts mRegistry->mCallbackDispatcher to Scene and returns Scene->GetGlobals()
 
virtual core::ContextGetContext () override
 Vulkan Context. Casts mRegistry->mCallbackDispatcher to Scene and returns Scene->GetContext()
 
- Public Member Functions inherited from foray::scene::Component
virtual ~Component ()
 Destructor. Provide virtual constructors in inheriting classes, to make sure they get finalized correctly.
 
- Public Member Functions inherited from foray::NoMoveDefaults
 NoMoveDefaults ()=default
 
 NoMoveDefaults (const NoMoveDefaults &other)=delete
 
 NoMoveDefaults (NoMoveDefaults &&other)=default
 
NoMoveDefaultsoperator= (const NoMoveDefaults &other)=delete
 

Protected Member Functions

void SetDirtyRecursively ()
 
void RecalculateLocalMatrix ()
 
void RecalculateGlobalMatrix ()
 
- Protected Member Functions inherited from foray::Polymorphic
virtual void __makeMePolymorphic ()
 

Protected Attributes

glm::vec3 mTranslation = {}
 
glm::quat mRotation = {}
 
glm::vec3 mScale = glm::vec3(1.f)
 
glm::mat4 mLocalMatrix = glm::mat4(1.f)
 
glm::mat4 mGlobalMatrix = glm::mat4(1.f)
 
bool mStatic = false
 
bool mLocalMatrixFixed = false
 
bool mDirty = true
 
- Protected Attributes inherited from foray::scene::Component
RegistrymRegistry = nullptr
 
std::string mName = ""
 

Additional Inherited Members

- Public Attributes inherited from foray::scene::Component
friend Registry
 

Detailed Description

Defines a nodes transform relative to its parent (or world origin, if no parent is set)

Constructor & Destructor Documentation

◆ Transform()

foray::scene::ncomp::Transform::Transform ( )
inline

Member Function Documentation

◆ GetGlobalMatrix()

const glm::mat4 & foray::scene::ncomp::Transform::GetGlobalMatrix ( )

◆ RecalculateGlobalMatrix()

void foray::scene::ncomp::Transform::RecalculateGlobalMatrix ( )
protected

◆ RecalculateIfDirty()

void foray::scene::ncomp::Transform::RecalculateIfDirty ( bool  recursive = false)

◆ RecalculateLocalMatrix()

void foray::scene::ncomp::Transform::RecalculateLocalMatrix ( )
protected

◆ SetDirtyRecursively()

void foray::scene::ncomp::Transform::SetDirtyRecursively ( )
protected

◆ SetLocalMatrix()

void foray::scene::ncomp::Transform::SetLocalMatrix ( const glm::mat4 &  matrix)

◆ SetRotation()

void foray::scene::ncomp::Transform::SetRotation ( const glm::quat &  rotation)

◆ SetScale()

void foray::scene::ncomp::Transform::SetScale ( const glm::vec3 &  scale)

◆ SetTranslation()

void foray::scene::ncomp::Transform::SetTranslation ( const glm::vec3 &  translation)

Member Data Documentation

◆ mDirty

bool foray::scene::ncomp::Transform::mDirty = true
protected

◆ mGlobalMatrix

glm::mat4 foray::scene::ncomp::Transform::mGlobalMatrix = glm::mat4(1.f)
protected

◆ mLocalMatrix

glm::mat4 foray::scene::ncomp::Transform::mLocalMatrix = glm::mat4(1.f)
protected

◆ mLocalMatrixFixed

bool foray::scene::ncomp::Transform::mLocalMatrixFixed = false
protected

◆ mRotation

glm::quat foray::scene::ncomp::Transform::mRotation = {}
protected

◆ mScale

glm::vec3 foray::scene::ncomp::Transform::mScale = glm::vec3(1.f)
protected

◆ mStatic

bool foray::scene::ncomp::Transform::mStatic = false
protected

◆ mTranslation

glm::vec3 foray::scene::ncomp::Transform::mTranslation = {}
protected

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