Class SceneFileObject#
Defined in File SceneFileObject.h
Inheritance Relationships#
Base Type#
public Karana::Scene::SceneNode(Class SceneNode)
Derived Types#
public Karana::Scene::CoalSceneFileObject(Class CoalSceneFileObject)public Karana::Scene::ProxySceneFileObject(Class ProxySceneFileObject)public Karana::Scene::WebSceneFileObject(Class WebSceneFileObject)
Class Documentation#
-
class SceneFileObject : public virtual Karana::Scene::SceneNode#
Class for an opaque node with contents loaded from a file.
See Scene layer for more discussion on the scene layer.
Subclassed by Karana::Scene::CoalSceneFileObject, Karana::Scene::ProxySceneFileObject, Karana::Scene::WebSceneFileObject
Public Functions
-
virtual ~SceneFileObject()#
Destructor.
-
SceneFileObject(const SceneFileObject&) = delete#
-
SceneFileObject &operator=(const SceneFileObject&) = delete#
-
const std::filesystem::path &getFilepath() const#
Get the file node’s filepath.
- Returns:
The file node’s filepath
-
inline virtual bool isSceneFileObject() const override#
Return true if this scene node is a scene file node.
- Returns:
true if the node is a scene file node
Public Static Functions
-
static Karana::Core::ks_ptr<SceneFileObject> create(std::string_view name, const Karana::Core::ks_ptr<Scene> &scene, const std::filesystem::path &filepath, layer_t layers = LAYER_PHYSICAL)#
Create a SceneFileObject.
- Parameters:
name – Name of the SceneFileObject.
scene – The Scene to add the SceneFileObject to.
filepath – The filepath to load
layers – Bitmask for which layers the part belongs to.
- Returns:
The new scene part.
-
static std::string getLayersString(layer_t layer)#
Convert the layer value into a more readable string form.
The conversion only uses the pre-defined and known layer values (eg. COLLISION etc)
- Parameters:
layer – the layer value
- Returns:
A string representation of the bitmask for which layers the part belongs to.
Protected Functions
-
SceneFileObject(std::string_view name, const Karana::Core::ks_ptr<Scene> &scene, const std::filesystem::path &filepath, layer_t layers)#
Constructor for a SceneFileObject.
- Parameters:
name – Name of the SceneFileObject
scene – The Scene to add the SceneFileObject to.
filepath – The filepath to load
layers – Bitmask for which layers the part belongs to.
-
virtual Karana::Core::ks_ptr<Karana::Core::BaseVars> _getVars() const override#
Create the vars for this object.
- Returns:
The vars for this object.
-
void _discard(kc::ks_ptr<Base> &base) override#
Discard the provided SceneFileObject.
- Parameters:
base – - Base pointer to the SceneFileObject to discard.
-
void _defaultPopulate()#
Populate the SceneFileObject via AssimpImporter.
-
virtual ~SceneFileObject()#