Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
iMSTK
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ruiliang Gao
iMSTK
Commits
4d477065
Commit
4d477065
authored
8 years ago
by
Alexis Girault
Browse files
Options
Downloads
Patches
Plain Diff
ENH: Add switch API for light
parent
24abf7da
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Base/Scene/imstkLight.cpp
+28
-4
28 additions, 4 deletions
Base/Scene/imstkLight.cpp
Base/Scene/imstkLight.h
+10
-2
10 additions, 2 deletions
Base/Scene/imstkLight.h
with
38 additions
and
6 deletions
Base/Scene/imstkLight.cpp
+
28
−
4
View file @
4d477065
...
...
@@ -96,15 +96,27 @@ Light::setFocalPoint(const double& x,
}
const
bool
Light
::
is
Directional
()
Light
::
is
On
()
{
return
!
this
->
isPositional
();
return
m_vtkLight
->
GetSwitch
();
}
void
Light
::
s
etDirectional
()
Light
::
s
witchOn
()
{
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
{
...
...
This diff is collapsed.
Click to expand it.
Base/Scene/imstkLight.h
+
10
−
2
View file @
4d477065
...
...
@@ -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
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment