class Entity

Represents an entity instance.

File location: framework/cauldron/framework/inc/core/entity.h

Construction

Return type

Description

Entity (const wchar_t* name, Entity* parent = nullptr)
Constructor. Sets the entity’s name and parent in the scene hierarchy (if present)

Methods

Return type

Description

void

SetTransform (const Mat4 & transform)
Sets the entity’s transform.

void

SetPrevTransform (const Mat4 & transform)
Sets the entity’s previous transform.

Mat4 &

Gets the entity’s current transform.

const Mat4 &

GetTransform () const

Mat4 &

Gets the entity’s previous transform.

const Mat4 &

GetPrevTransform () const

void

SetParent (Entity* parent)
Sets an entity’s parent entity.

Entity*

Gets an entity’s parent entity.

bool

IsActive () const
Query entity status.

void

SetActive (bool active)
Sets entity status.

const wchar_t*

GetName () const
Gets the entity’s name.

void

AddChildEntity (Entity* pEntity)
Adds a child entity to this entity (parent).

uint32_t

GetChildCount () const
Returns the child count of an entity.

const std::vector<Entity*>&

GetChildren () const
Returns the list of children from an entity.

void

AddComponent (Component * pComponent)
Adds a component to the entity.

void

RemoveComponent (Component * pComponent)
Removes a component from the entity.

bool

HasComponent (const ComponentMgr * pManager) const
Checks if an entity has a specified component type (matched to “ComponentMgr“).

template <typename T> T*

GetComponent (const ComponentMgr * pManager) const
Retrieves a component from an entity by type (matched to “ComponentMgr“).

Detailed description

Represents an entity instance. An entity is any node that is present in our scene representation. It can be a simple transform or contain multiple components adding various functionality support to the entity (i.e. Mesh, Lighting, Camera, Animation, etc.)

Construction

Entity

Copied!

Entity (const wchar_t* name, Entity* parent = nullptr)

Constructor. Sets the entity’s name and parent in the scene hierarchy (if present)


Methods

SetTransform

Copied!

void SetTransform (const Mat4 & transform)

Sets the entity’s transform.


SetPrevTransform

Copied!

void SetPrevTransform (const Mat4 & transform)

Sets the entity’s previous transform.


GetTransform

Copied!

Mat4 & GetTransform ()

Gets the entity’s current transform.


GetPrevTransform

Copied!

Mat4 & GetPrevTransform ()

Gets the entity’s previous transform.


SetParent

Copied!

void SetParent (Entity* parent)

Sets an entity’s parent entity.


GetParent

Copied!

Entity* GetParent ()

Gets an entity’s parent entity.


IsActive

Copied!

bool IsActive () const

Query entity status.


SetActive

Copied!

void SetActive (bool active)

Sets entity status.


GetName

Copied!

const wchar_t* GetName () const

Gets the entity’s name.


AddChildEntity

Copied!

void AddChildEntity (Entity* pEntity)

Adds a child entity to this entity (parent).


GetChildCount

Copied!

uint32_t GetChildCount () const

Returns the child count of an entity.


GetChildren

Copied!

const std::vector<Entity*>& GetChildren () const

Returns the list of children from an entity.


AddComponent

Copied!

void AddComponent (Component * pComponent)

Adds a component to the entity.


RemoveComponent

Copied!

void RemoveComponent (Component * pComponent)

Removes a component from the entity.


HasComponent

Copied!

bool HasComponent (const ComponentMgr * pManager) const

Checks if an entity has a specified component type (matched to ComponentMgr).


GetComponent

Copied!

template <typename T>   T* GetComponent (const ComponentMgr * pManager) const

Retrieves a component from an entity by type (matched to ComponentMgr).


Related pages

  • Visit the FidelityFX SDK product page for download links and more information.

Looking for more documentation on GPUOpen?

AMD GPUOpen software blogs

Our handy software release blogs will help you make good use of our tools, SDKs, and effects, as well as sharing the latest features with new releases.

GPUOpen Manuals

Don’t miss our manual documentation! And if slide decks are what you’re after, you’ll find 100+ of our finest presentations here.

AMD GPUOpen Performance Guides

The home of great performance and optimization advice for AMD RDNA™ 2 GPUs, AMD Ryzen™ CPUs, and so much more.

Getting started: AMD GPUOpen software

New or fairly new to AMD’s tools, libraries, and effects? This is the best place to get started on GPUOpen!

AMD GPUOpen Getting Started Development and Performance

Looking for tips on getting started with developing and/or optimizing your game, whether on AMD hardware or generally? We’ve got you covered!

AMD GPUOpen Technical blogs

Browse our technical blogs, and find valuable advice on developing with AMD hardware, ray tracing, Vulkan®, DirectX®, Unreal Engine, and lots more.

Find out more about our software!

AMD GPUOpen Effects - AMD FidelityFX technologies

Create wonder. No black boxes. Meet the AMD FidelityFX SDK!

AMD GPUOpen Samples

Browse all our useful samples. Perfect for when you’re needing to get started, want to integrate one of our libraries, and much more.

AMD GPUOpen developer SDKs

Discover what our SDK technologies can offer you. Query hardware or software, manage memory, create rendering applications or machine learning, and much more!

AMD GPUOpen Developer Tools

Analyze, Optimize, Profile, Benchmark. We provide you with the developer tools you need to make sure your game is the best it can be!