Class ScenePart#
Defined in File ScenePart.h
Inheritance Relationships#
Base Type#
public Karana::Scene::SceneNode(Class SceneNode)
Derived Types#
public Karana::Scene::CollisionScenePart(Class CollisionScenePart)public Karana::Scene::GraphicalScenePart(Class GraphicalScenePart)public Karana::Scene::ProxyScenePart(Class ProxyScenePart)
Class Documentation#
-
class ScenePart : public virtual Karana::Scene::SceneNode#
Class for objects with geometry and material in the scene.
See Scene layer for more discussion on the scene layer.
Subclassed by Karana::Scene::CollisionScenePart, Karana::Scene::GraphicalScenePart, Karana::Scene::ProxyScenePart
Public Functions
-
virtual ~ScenePart()#
-
const VarStaticGeometry &getGeometry() const#
Get the part’s geometry.
- Returns:
The part’s geometry
-
const VarMaterial &getMaterial() const#
Get the part’s material.
- Returns:
The part’s material
-
virtual void setMaterial(const VarMaterial &material)#
Set the part’s material.
- Parameters:
material – - The part’s new material.
-
const layer_t &getLayers() const#
Get which layers the part belongs to.
- Returns:
Bitmask for which layers the part belongs to.
Public Static Functions
-
static Karana::Core::ks_ptr<ScenePart> create(std::string_view name, const VarStaticGeometry &geometry, const Karana::Core::ks_ptr<Scene> &scene, const VarMaterial &material = defaultMaterial(), layer_t layers = LAYER_PHYSICAL)#
Create a ScenePart.
Protected Functions
-
ScenePart(std::string_view name, const VarStaticGeometry &geometry, const VarMaterial &material, layer_t layers, const Karana::Core::ks_ptr<Scene> &scene)#
Constructor for a ScenePart.
-
virtual ~ScenePart()#