Class WebScenePart#
Defined in File WebScenePart.h
Inheritance Relationships#
Base Types#
public Karana::Scene::WebSceneNode(Class WebSceneNode)public Karana::Scene::GraphicalScenePart(Class GraphicalScenePart)
Class Documentation#
-
class WebScenePart : public Karana::Scene::WebSceneNode, public Karana::Scene::GraphicalScenePart#
GraphicalScenePart implementation for WebScene.
See Scene layer for more discussion on the scene layer.
Public Functions
-
WebScenePart(std::string_view name, const kc::ks_ptr<Scene> &scene, const VarStaticGeometry &geometry, const VarMaterial &material, layer_t layers, const Karana::Core::ks_ptr<Karana::WebUI::Server> &server, const Karana::Core::ks_ptr<WebResourceManager> &resource_manager)#
WebScenePart constructor. The constructor is not meant to be called directly. Please use the create(…) method instead to create an instance.
- Parameters:
name – - Name of the WebScenePart.
scene – - The WebScene to add the part to.
geometry – - Geometry of the WebScenePart.
material – - Material for the WebScenePart.
layers – - Layers to use for the WebScenePart.
server – - Server to communicate with frontends.
resource_manager – - Helper to manage frontend resources.
-
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.
-
void outline()#
Draw an outline around the part.
-
void removeOutline()#
Remove a previously added outline.
Public Static Functions
-
static kc::ks_ptr<WebScenePart> create(std::string_view name, const kc::ks_ptr<WebScene> &scene, const VarStaticGeometry &geometry, const VarMaterial &material = defaultMaterial(), layer_t layers = LAYER_PHYSICAL)#
Create a WebScenePart.
- Parameters:
name – - Name of the WebScenePart.
scene – - The GraphicalScene to add the WebScenePart to.
geometry – - Geometry of the WebScenePart.
material – - Material for the WebScenePart.
layers – - Layers to use for the WebScenePart.
- Returns:
The new WebScene part.
-
WebScenePart(std::string_view name, const kc::ks_ptr<Scene> &scene, const VarStaticGeometry &geometry, const VarMaterial &material, layer_t layers, const Karana::Core::ks_ptr<Karana::WebUI::Server> &server, const Karana::Core::ks_ptr<WebResourceManager> &resource_manager)#