Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
alta
alta
Commits
005b41b9
Commit
005b41b9
authored
Aug 27, 2013
by
Laurent Belcour
Browse files
Small corrections
parent
2a1ac82b
Changes
6
Hide whitespace changes
Inline
Side-by-side
sources/plugins/nonlinear_fresnel_schlick/function.cpp
View file @
005b41b9
...
...
@@ -15,10 +15,25 @@ ALTA_DLL_EXPORT function* provide_function()
}
//! Load function specific files
void
schlick
::
load
(
const
std
::
str
ing
&
filename
)
void
schlick
::
load
(
std
::
i
str
eam
&
in
)
{
std
::
cerr
<<
"Cannot load a Schlick file."
<<
std
::
endl
;
throw
;
// Parse line until the next comment
while
(
in
.
peek
()
!=
'#'
)
{
char
line
[
256
];
in
.
getline
(
line
,
256
);
}
// Checking for the comment line #FUNC nonlinear_fresnel_schlick
std
::
string
token
;
in
>>
token
;
if
(
token
!=
"FUNC"
)
{
std
::
cerr
<<
"<<ERROR>> parsing the stream. The #FUNC is not the next line defined."
<<
std
::
endl
;
}
in
>>
token
;
if
(
token
!=
"nonlinear_fresnel_schlick"
)
{
std
::
cerr
<<
"<<ERROR>> parsing the stream. function name is not the next token."
<<
std
::
endl
;
}
// R [double]
in
>>
token
>>
R
;
}
vec
schlick
::
fresnelValue
(
const
vec
&
x
)
const
...
...
sources/plugins/nonlinear_fresnel_schlick/function.h
View file @
005b41b9
...
...
@@ -18,7 +18,7 @@ class schlick : public fresnel
public:
// methods
//! \brief Load function specific files
virtual
void
load
(
const
std
::
str
ing
&
filename
)
;
virtual
void
load
(
std
::
i
str
eam
&
in
)
;
...
...
sources/plugins/nonlinear_function_diffuse/function.cpp
View file @
005b41b9
...
...
@@ -40,13 +40,13 @@ void diffuse_function::load(std::istream &in)
in
.
getline
(
line
,
256
);
}
// Checking for the comment line #FUNC nonlinear_diffuse
// Checking for the comment line #FUNC nonlinear_
function_
diffuse
std
::
string
token
;
in
>>
token
;
if
(
token
!=
"FUNC"
)
{
std
::
cerr
<<
"<<ERROR>> parsing the stream. The #FUNC is not the next line defined."
<<
std
::
endl
;
}
in
>>
token
;
if
(
token
!=
"nonlinear_diffuse"
)
{
std
::
cerr
<<
"<<ERROR>> parsing the stream. function name is not the next token."
<<
std
::
endl
;
}
if
(
token
!=
"nonlinear_
function_
diffuse"
)
{
std
::
cerr
<<
"<<ERROR>> parsing the stream. function name is not the next token."
<<
std
::
endl
;
}
// kd [double]
for
(
int
i
=
0
;
i
<
dimY
();
++
i
)
...
...
sources/plugins/nonlinear_function_isotropic_lafortune/function.cpp
View file @
005b41b9
...
...
@@ -315,13 +315,13 @@ void isotropic_lafortune_function::load(std::istream& in)
in
.
getline
(
line
,
256
);
}
// Checking for the comment line #FUNC nonlinear_
diffus
e
// Checking for the comment line #FUNC nonlinear_
function_lafortun
e
std
::
string
token
;
in
>>
token
;
if
(
token
!=
"FUNC"
)
{
std
::
cerr
<<
"<<ERROR>> parsing the stream. The #FUNC is not the next line defined."
<<
std
::
endl
;
}
in
>>
token
;
if
(
token
!=
"nonlinear_lafortune"
)
{
std
::
cerr
<<
"<<ERROR>> parsing the stream. function name is not the next token."
<<
std
::
endl
;
}
if
(
token
!=
"nonlinear_
function_
lafortune"
)
{
std
::
cerr
<<
"<<ERROR>> parsing the stream. function name is not the next token."
<<
std
::
endl
;
}
// Shoudl have the #NB_LOBES [int]
int
nb_lobes
;
...
...
sources/plugins/nonlinear_function_lafortune/function.cpp
View file @
005b41b9
...
...
@@ -358,13 +358,13 @@ void lafortune_function::load(std::istream& in)
in
.
getline
(
line
,
256
);
}
// Checking for the comment line #FUNC nonlinear_
diffus
e
// Checking for the comment line #FUNC nonlinear_
function_lafortun
e
std
::
string
token
;
in
>>
token
;
if
(
token
!=
"FUNC"
)
{
std
::
cerr
<<
"<<ERROR>> parsing the stream. The #FUNC is not the next line defined."
<<
std
::
endl
;
}
in
>>
token
;
if
(
token
!=
"nonlinear_lafortune"
)
{
std
::
cerr
<<
"<<ERROR>> parsing the stream. function name is not the next token."
<<
std
::
endl
;
}
if
(
token
!=
"nonlinear_
function_
lafortune"
)
{
std
::
cerr
<<
"<<ERROR>> parsing the stream. function name is not the next token."
<<
std
::
endl
;
}
// Shoudl have the #NB_LOBES [int]
int
nb_lobes
;
...
...
sources/plugins/nonlinear_function_phong/function.cpp
View file @
005b41b9
...
...
@@ -40,13 +40,13 @@ void phong_function::load(std::istream& in)
in
.
getline
(
line
,
256
);
}
// Checking for the comment line #FUNC nonlinear_
diffuse
// Checking for the comment line #FUNC nonlinear_
function_phong
std
::
string
token
;
in
>>
token
;
if
(
token
!=
"FUNC"
)
{
std
::
cerr
<<
"<<ERROR>> parsing the stream. The #FUNC is not the next line defined."
<<
std
::
endl
;
}
in
>>
token
;
if
(
token
!=
"nonlinear_phong"
)
{
std
::
cerr
<<
"<<ERROR>> parsing the stream. function name is not the next token."
<<
std
::
endl
;
}
if
(
token
!=
"nonlinear_
function_
phong"
)
{
std
::
cerr
<<
"<<ERROR>> parsing the stream. function name is not the next token."
<<
std
::
endl
;
}
// ks [double]
// N [double]
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment