Class ScaledVectorVisualizer#
Defined in File VizUtils.h
Inheritance Relationships#
Base Type#
public Karana::KUtils::VectorVisualizer(Class VectorVisualizer)
Class Documentation#
-
class ScaledVectorVisualizer : public Karana::KUtils::VectorVisualizer#
A scaled version of VectorVisualizer.
This is like the VectorVisualizer class (see that class for more details) but the length of the vector can be scaled using get/setScale.
Public Functions
-
double getScale()#
Get the current scale.
- Returns:
The current scale.
-
void setScale(double scale)#
Set the current scale.
- Parameters:
scale – The current scale.
-
virtual void registerCallback() override#
Register the update callback with the scene.
-
VectorVisualizer(std::string_view name, const kc::ks_ptr<kf::Frame> &frame, const kc::ks_ptr<ks::ProxyScene> &scene, std::function<km::Vec3()> fn)#
VectorVisualizer 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 visualizer.
frame – The Frame where the vector starts.
scene – The ProxyScene to add the vector to.
fn – The function used to update the vector.
Public Static Functions
-
static kc::ks_ptr<ScaledVectorVisualizer> create(std::string_view name, const kc::ks_ptr<kf::Frame> &frame, const kc::ks_ptr<ks::ProxyScene> &scene, std::function<km::Vec3()> fn)#
Create a new instance of VectorVisualizer.
- Parameters:
name – Name of the visualizer.
frame – The Frame where the vector starts.
scene – The ProxyScene to add the vector to.
fn – The function used to update the vector.
- Returns:
A pointer to the newly created ScaledVectorVisualizer.
Protected Attributes
-
double _scale = 1.0#
The scale to use for the vector.
-
double getScale()#