Add distance method to node
This commit is contained in:
@@ -80,6 +80,16 @@ namespace openVulkanoCpp::Scene
|
||||
this->matrixUpdateFrequency = frequency;
|
||||
}
|
||||
|
||||
float Distance(const Math::Vector4f& pos) const
|
||||
{
|
||||
return Math::Utils::distance(worldMat[3], pos);
|
||||
}
|
||||
|
||||
float Distance2(const Math::Vector4f& pos) const
|
||||
{
|
||||
return Math::Utils::distance2(worldMat[3], pos);
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual void UpdateWorldMatrix(const Math::Matrix4f& parentWorldMat);
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ namespace openVulkanoCpp
|
||||
drawable->SetScene(nullptr);
|
||||
}
|
||||
|
||||
void SetCamera(Camera* camera)
|
||||
virtual void SetCamera(Camera* camera)
|
||||
{
|
||||
this->camera = camera;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user