Class WebScenePart#

Inheritance Relationships#

Base Types#

Class Documentation#

class WebScenePart : public Karana::Scene::WebSceneNode, public Karana::Scene::GraphicalScenePart#

GraphicalScenePart implementation for WebScene.

Public Functions

WebScenePart(std::string_view name, const Karana::Core::ks_ptr<Karana::WebUI::Server> &server, const Karana::Core::ks_ptr<WebResourceManager> &resource_manager, const VarStaticGeometry &geometry, const VarMaterial &material, layer_t layers, const kc::ks_ptr<Scene> &scene)#

WebScenePart constructor.

Parameters:
  • name – - Name of the WebScenePart.

  • server – - Server to communicate with frontends.

  • resource_manager – - Helper to manage frontend resources.

  • geometry – - Geometry of the WebScenePart.

  • material – - Material for the WebScenePart.

  • layers – - Layers to use for the WebScenePart.

  • scene – - The WebScene to add the part to.

virtual void setMaterial(const VarMaterial &material) override#

Set the part’s material.

Parameters:

material – - The part’s new material.

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.

virtual const Karana::Math::Vec3 &getIntrinsicScale() const override#

Get the part’s intrinsic scale.

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

Returns:

The part’s intrinsic scale.

Public Static Functions

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

Create a WebScenePart.

Parameters:
Returns:

The new WebScene part.