LkEngine 0.1.2
 
Loading...
Searching...
No Matches
LkEngine::LScene Class Reference
Inheritance diagram for LkEngine::LScene:
LkEngine::LAsset LkEngine::LObject LkEngine::LObjectBase

Public Member Functions

 LScene (const std::string &SceneName, const bool IsEditorScene=false)
 
void OnRenderRuntime (TObjectPtr< LSceneRenderer > SceneRenderer, const float DeltaTime)
 
void OnUpdateRuntime (const float InDeltaTime)
 
void OnRenderEditor (TObjectPtr< LSceneRenderer > SceneRenderer, LEditorCamera &EditorCamera, const float DeltaTime)
 
void OnUpdateEditor (const float InDeltaTime)
 
void EndScene ()
 
FORCEINLINE LUUID GetUUID () const
 FIXME.
 
LEntity GetMainCameraEntity ()
 
template<typename T = LEntity>
std::vector< T > GetEntities ()
 
uint64_t GetEntityCount () const
 
void SortEntities ()
 
LEntity FindEntity (std::string_view EntityName)
 
LEntity GetEntityWithUUID (const LUUID UUID)
 
FORCEINLINE entt::registry & GetRegistry ()
 
void DestroyEntity (const LEntity Entity)
 
bool HasEntity (const LEntity Entity) const
 
bool IsEntityInRegistry (const LEntity Entity) const
 
LEntity CreateEntity (const std::string &InName="")
 
LEntity CreateEntityWithID (const LUUID UUID, const std::string &InName="")
 
LEntity CreateChildEntity (LEntity Parent, const std::string &InName="")
 
LEntity TryGetEntityWithUUID (const LUUID ID)
 
void ParentEntity (LEntity Entity, LEntity Parent)
 
void UnparentEntity (LEntity Entity, bool bConvertToWorldSpace=true)
 
glm::mat4 GetWorldSpaceTransform (LEntity Entity)
 
std::string GetName () const
 
void SetName (const std::string &InName)
 
void SetActive (const bool Active)
 
FORCEINLINE bool IsActive () const
 
void Clear ()
 
void Pause (const bool IsPaused)
 
void CopyTo (TObjectPtr< LScene > &TargetScene)
 
template<typename T >
void OnComponentAdded (LEntity Entity, T &TComponent)
 
template<typename TComponent >
void CopyComponentIfExists (entt::entity Destination, entt::registry &DestinationRegistry, entt::entity Source)
 
template<typename ... Components>
auto GetAllEntitiesWith ()
 
std::unordered_set< LUUIDGetAssetList ()
 
template<>
std::vector< LEntityGetEntities ()
 
template<>
std::vector< LUUIDGetEntities ()
 
template<>
void OnComponentAdded (LEntity Entity, LIDComponent &id)
 
template<>
void OnComponentAdded (LEntity Entity, LTransformComponent &rigidbody)
 
template<>
void OnComponentAdded (LEntity Entity, LSpriteComponent &SpriteComponent)
 
template<>
void OnComponentAdded (LEntity Entity, LCameraComponent &LCameraComponent)
 
template<>
void OnComponentAdded (LEntity Entity, LMeshComponent &MeshComponent)
 
template<>
void OnComponentAdded (LEntity Entity, LStaticMeshComponent &StaticMeshComponent)
 
template<>
void OnComponentAdded (LEntity Entity, LRigidBody2DComponent &rigidBody2DComponent)
 
template<>
void OnComponentAdded (LEntity InEntity, LBoxCollider2DComponent &boxColliderComponent)
 
- Public Member Functions inherited from LkEngine::LAsset
virtual FORCEINLINE EAssetType GetAssetType () const
 
FORCEINLINE bool HasFlag (const EAssetFlag Flag) const
 
FORCEINLINE void SetFlag (const EAssetFlag Flag, bool Value=true)
 
virtual FORCEINLINE bool IsValid () const
 
virtual bool operator== (const LAsset &Other) const
 
virtual bool operator!= (const LAsset &Other) const
 
- Public Member Functions inherited from LkEngine::LObject
 LObject (const LObject &Other)
 
virtual void Initialize ()
 Initialize object.
 
virtual void Destroy ()
 Destroy object, releasing all resources.
 
virtual FORCEINLINE bool IsInitialized () const
 Check if object is initialized.
 
FORCEINLINE FObjectHandle GetObjectHandle () const
 Get the object handle.
 
virtual FORCEINLINE bool IsObjectValid () const
 Check if object is valid for use.
 
virtual const LClassObjectRegistration ()=0
 Register object class.
 
virtual FORCEINLINE const LClassGetClass () const
 Get the class for this LObject.
 
virtual std::string ClassName () const =0
 Get name of the LObject class.
 
LObjectoperator= (const LObject &Other)
 
void MarkAsGarbage ()
 Mark object as garbage.
 
template<typename T >
T & As ()
 Cast object to type T.
 
template<typename T >
const T & As () const
 Cast object to type T.
 
template<typename T >
bool IsA () const
 Check if the object is or is a derivation of type T.
 
virtual FORCEINLINE bool IsAsset () const
 Check if object is an asset.
 
FORCEINLINE uint32_t GetReferenceCount () const
 Return current reference count from all object pointers.
 
- Public Member Functions inherited from LkEngine::LObjectBase
template<typename OtherClassType >
FORCEINLINE bool IsA (OtherClassType OtherObject) const
 Check if the object is the same type as the passed object's.
 

Static Public Member Functions

template<typename T >
static void CopyComponent (entt::registry &DestinationRegistry, entt::registry &SourceRegistry, const std::unordered_map< LUUID, entt::entity > &enttMap)
 
static TObjectPtr< LSceneGetActiveScene ()
 
static uint8_t GetSceneCount ()
 
- Static Public Member Functions inherited from LkEngine::LAsset
static FORCEINLINE EAssetType GetStaticType ()
 
- Static Public Member Functions inherited from LkEngine::LObject
static FORCEINLINE const LClassStaticClass ()
 Get static class object.
 
static FORCEINLINE std::string StaticClassName ()
 Static class name.
 
template<typename T >
static void ValidateLObjectImplementation ()
 Validate the implementation of a LObject.
 
- Static Public Member Functions inherited from LkEngine::LObjectBase
template<typename ClassType >
static FORCEINLINE bool IsChildOf (const ClassType *InObjectClass, const ClassType *InOtherClass)
 Check if the object is a child of another class.
 

Static Public Attributes

static constexpr const char * FILE_EXTENSION = "lkscene"
 

Friends

class LEntity
 
class LEditorLayer
 
class LSceneSerializer
 
class LSceneManagerPanel
 

Additional Inherited Members

- Public Attributes inherited from LkEngine::LAsset
FAssetHandle Handle = 0
 
std::underlying_type_t< EAssetFlagAssetFlags = static_cast<std::underlying_type_t<EAssetFlag>>(EAssetFlag::None)
 
- Protected Member Functions inherited from LkEngine::LObjectBase
void SetClass (LClass *InClass)
 Set the class.
 
FORCEINLINE const LClassGetClass () const
 Get the private class member.
 
FORCEINLINE bool IsClassValid () const
 Check if LObjectBase has a valid LClass object.
 
- Protected Attributes inherited from LkEngine::LObject
FObjectHandle ObjectHandle = 0
 
bool bObjectInitialized = false
 
EObjectFlag ObjectFlags = EObjectFlag::None
 
std::atomic< uint32_t > Ptr_ReferenceCount = 0
 

Member Function Documentation

◆ GetAllEntitiesWith()

template<typename ... Components>
auto LkEngine::LScene::GetAllEntitiesWith ( )
inline

@fixme: Problems on Linux

◆ GetEntityWithUUID()

LEntity LkEngine::LScene::GetEntityWithUUID ( const LUUID UUID)

@fixme: FIXME

◆ OnComponentAdded() [1/2]

template<>
void LkEngine::LScene::OnComponentAdded ( LEntity Entity,
LRigidBody2DComponent & rigidBody2DComponent )

DISABLED

◆ OnComponentAdded() [2/2]

template<>
void LkEngine::LScene::OnComponentAdded ( LEntity InEntity,
LBoxCollider2DComponent & boxColliderComponent )

DISABLED

◆ OnRenderEditor()

void LkEngine::LScene::OnRenderEditor ( TObjectPtr< LSceneRenderer > SceneRenderer,
LEditorCamera & EditorCamera,
const float DeltaTime )

Temporarily assigning different materials based on the entity name until material serialization is working as intended.

◆ TryGetEntityWithUUID()

LEntity LkEngine::LScene::TryGetEntityWithUUID ( const LUUID ID)

@fixme: FIXME


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