Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
alta
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
5
Issues
5
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alta
alta
Commits
c0709c9e
Commit
c0709c9e
authored
Apr 17, 2013
by
Laurent Belcour
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding a 1D parametrization for blinn-phong shading model.
parent
74e59925
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
2 deletions
+16
-2
sources/core/params.h
sources/core/params.h
+16
-2
No files found.
sources/core/params.h
View file @
c0709c9e
...
...
@@ -21,6 +21,7 @@ class params
RUSIN_TH_PH_TD
,
RUSIN_TH_TD_PD
,
RUSIN_TH_PH_TD_PD
,
COS_TH
,
COS_TH_TD
,
ISOTROPIC_TV_TL_DPHI
,
ISOTROPIC_TD_PD
,
// Difference between two directions such as R and H
...
...
@@ -70,10 +71,13 @@ class params
static
void
to_cartesian
(
const
double
*
invec
,
params
::
type
intype
,
double
*
outvec
)
{
double
half
[
3
];
switch
(
intype
)
{
// 1D Parametrizations
case
params
::
COS_TH
:
half_to_cartesian
(
acos
(
invec
[
0
]),
0.0
,
0.0
,
0.0
,
outvec
);
break
;
// 2D Parametrizations
case
params
::
COS_TH_TD
:
half_to_cartesian
(
acos
(
invec
[
0
]),
0.0
,
acos
(
invec
[
1
]),
0.0
,
outvec
);
...
...
@@ -123,6 +127,11 @@ class params
switch
(
outtype
)
{
// 1D Parametrizations
case
params
::
COS_TH
:
outvec
[
0
]
=
half
[
2
];
break
;
// 2D Parametrizations
case
params
::
COS_TH_TD
:
outvec
[
0
]
=
half
[
2
];
...
...
@@ -152,6 +161,11 @@ class params
{
switch
(
t
)
{
// 1D Parametrizations
case
params
::
COS_TH
:
return
1
;
break
;
// 2D Parametrizations
case
params
::
ISOTROPIC_TD_PD
:
case
params
::
ROMEIRO_TH_TD
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment