Class WebSceneCamera#

Inheritance Relationships#

Base Types#

Class Documentation#

class WebSceneCamera : public Karana::Scene::WebSceneNode, public Karana::Scene::GraphicalSceneCamera#

Specialized node to provide a viewpoint for the WebScene.

See Scene layer for more discussion on the scene layer.

Public Functions

WebSceneCamera(std::string_view name, const Karana::Core::ks_ptr<Karana::WebUI::Server> &server, const kc::ks_ptr<Scene> &scene, const VarProjection &proj = PerspectiveProjection{})#

WebSceneCamera constructor. The constructor is not meant to be called directly. Please use the create(…) method instead to create an instance.

Parameters:
  • name – - Name for the WebSceneCamera

  • server – - Server to communicate with frontends

  • scene – - WebScene to add the camera to.

  • proj – - Camera projection parameters.

virtual void setProjection(const VarProjection &proj) override#

Set the camera projection parameters.

Parameters:

proj – The camera projection parameters

virtual void setMask(layer_t mask) override#

Set the bitmask for which layers should be visible.

Parameters:

mask – - The layers bitmask

virtual void pointCameraAt(const Karana::Math::Vec3 &offset, const Karana::Math::Vec3 &target, const Karana::Math::Vec3 &up) override#

Set the pose of the camera.

Parameters:
  • offset – The position of the camera.

  • target – The position the camera will point at.

  • up – The up vector of the camera.