Class ProxyScenePart#

Inheritance Relationships#

Base Types#

Class Documentation#

class ProxyScenePart : public Karana::Scene::ScenePart, public Karana::Scene::ProxySceneNode#

ScenePart acting as a proxy for client SceneParts.

See Scene layer for more discussion on the scene layer.

Public Functions

ProxyScenePart(std::string_view name, const VarStaticGeometry &geometry, const VarMaterial &material, layer_t layers, const Karana::Core::ks_ptr<ClientRegistry> &client_registry, const Karana::Core::ks_ptr<ImplDatabase> &impl_database, const kc::ks_ptr<ProxyScene> &scene)#

ProxyScenePart constructor.

Parameters:
virtual ~ProxyScenePart()#
virtual void setMaterial(const VarMaterial &material) override#

Set the part’s material.

Parameters:

material – - The part’s new material.

Karana::Core::ks_ptr<ScenePart> of(Scene &scene) const#

Get the implementation for a given client.

Parameters:

scene – - The client scene

Returns:

The implementation of this node for the client

Karana::Core::ks_ptr<GraphicalScenePart> graphics() const#

Get a graphical implementation If there is more than one graphical implementation only the first one found is returned.

Returns:

A graphical implementation or nullptr

Karana::Core::ks_ptr<GraphicalScenePart> graphics(Scene &scene) const#

Get the graphical implementation for a client.

Parameters:

scene – - The client scene

Returns:

The graphical implementation or for the client

Karana::Core::ks_ptr<CollisionScenePart> collision() const#

Get a collision implementation If there is more than one collision implementation only the first one found is returned.

Returns:

A collision implementation or nullptr

Karana::Core::ks_ptr<CollisionScenePart> collision(Scene &scene) const#

Get the collision implementation for a client.

Parameters:

scene – - The client scene

Returns:

The collision implementation or for the client

virtual void setIntrinsicScale(const Karana::Math::Vec3 &scale) override#

Set the part’s intrinsic scale.

The intrinsic scale can be non-uniform but does not apply to attached nodes.

Parameters:

scale – - The part’s intrinsic scale.

Public Static Functions

static kc::ks_ptr<ProxyScenePart> create(std::string_view name, const kc::ks_ptr<ProxyScene> &scene, const VarStaticGeometry &geometry, const VarMaterial &material = defaultMaterial(), layer_t layers = LAYER_PHYSICAL)#

Create a ProxyScenePart.

Parameters:
Returns:

The new ProxyScene part.

static kc::ks_ptr<ProxyScenePart> fromScenePartSpec(const kc::ks_ptr<ProxyScene> &scene, const ScenePartSpec &spec)#

Create a ProxyScenePart from a ScenePartSpec.

Parameters:
Returns:

The new ProxyScene part.

Protected Functions

virtual void _implement(Scene &scene) override#

Create the implementation for a client scene.

This is called automatically as needed and shouldn’t need to be called outside of ProxyScene internals.

Parameters:

scene – - The client to create an implementation for.

virtual void _unimplement(Scene &scene) override#

Destroy the implementation for a client scene.

This is called automatically as needed and shouldn’t need to be called outside of ProxyScene internals.

Parameters:

scene – - The client to destroy the implementation for.