Skip to content
Snippets Groups Projects
Commit 4d477065 authored by Alexis Girault's avatar Alexis Girault
Browse files

ENH: Add switch API for light

parent 24abf7da
No related branches found
No related tags found
No related merge requests found
......@@ -96,15 +96,27 @@ Light::setFocalPoint(const double& x,
}
const bool
Light::isDirectional()
Light::isOn()
{
return !this->isPositional();
return m_vtkLight->GetSwitch();
}
void
Light::setDirectional()
Light::switchOn()
{
m_vtkLight->PositionalOff();
m_vtkLight->SwitchOn();
}
const bool
Light::isOff()
{
return !this->isOn();
}
void
Light::switchOff()
{
m_vtkLight->SwitchOff();
}
const bool
......@@ -119,6 +131,18 @@ Light::setPositional()
m_vtkLight->PositionalOn();
}
const bool
Light::isDirectional()
{
return !this->isPositional();
}
void
Light::setDirectional()
{
m_vtkLight->PositionalOff();
}
const double
Light::getSpotAngle() const
{
......
......@@ -50,6 +50,8 @@ public:
const LightType getType();
void setType(const LightType& type);
const Vec3d getPosition() const;
void setPosition(const Vec3d& p);
void setPosition(const double& x,
......@@ -62,12 +64,18 @@ public:
const double& y,
const double& z);
const bool isDirectional();
void setDirectional();
const bool isOn();
void switchOn();
const bool isOff();
void switchOff();
const bool isPositional();
void setPositional();
const bool isDirectional();
void setDirectional();
const double getSpotAngle() const;
void setSpotAngle(const double& angle);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment