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
ef7decaa
Commit
ef7decaa
authored
Jan 05, 2014
by
Laurent Belcour
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updating class names for documentation
parent
bd7fc1ad
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
40 additions
and
37 deletions
+40
-37
sources/core/args.h
sources/core/args.h
+1
-0
sources/core/data.h
sources/core/data.h
+2
-2
sources/core/plugins_manager.cpp
sources/core/plugins_manager.cpp
+2
-2
sources/core/vertical_segment.cpp
sources/core/vertical_segment.cpp
+2
-0
sources/plugins/nonlinear_fresnel_schlick/function.cpp
sources/plugins/nonlinear_fresnel_schlick/function.cpp
+13
-13
sources/plugins/nonlinear_fresnel_schlick/function.h
sources/plugins/nonlinear_fresnel_schlick/function.h
+2
-2
sources/plugins/nonlinear_shadowing_schlick/function.cpp
sources/plugins/nonlinear_shadowing_schlick/function.cpp
+16
-16
sources/plugins/nonlinear_shadowing_schlick/function.h
sources/plugins/nonlinear_shadowing_schlick/function.h
+2
-2
No files found.
sources/core/args.h
View file @
ef7decaa
...
...
@@ -186,6 +186,7 @@ class arguments
if
(
_map
.
count
(
key
)
>
0
)
{
std
::
string
s
=
_map
.
find
(
key
)
->
second
;
std
::
cout
<<
s
<<
std
::
endl
;
if
(
s
[
0
]
==
'['
)
// Is an array of type [a, b, c]
{
int
i
=
0
;
...
...
sources/core/data.h
View file @
ef7decaa
...
...
@@ -27,8 +27,8 @@ class data : public parametrized
{
std
::
ofstream
file
(
filename
.
c_str
(),
std
::
ios_base
::
trunc
);
file
<<
"#DIM "
<<
_nX
<<
" "
<<
_nY
<<
std
::
endl
;
file
<<
"PARAM_IN "
<<
params
::
get_name
(
input_parametrization
())
<<
std
::
endl
;
file
<<
"PARAM_OUT "
<<
params
::
get_name
(
output_parametrization
())
<<
std
::
endl
;
file
<<
"
#
PARAM_IN "
<<
params
::
get_name
(
input_parametrization
())
<<
std
::
endl
;
file
<<
"
#
PARAM_OUT "
<<
params
::
get_name
(
output_parametrization
())
<<
std
::
endl
;
for
(
int
i
=
0
;
i
<
size
();
++
i
)
{
vec
x
=
this
->
get
(
i
);
...
...
sources/core/plugins_manager.cpp
View file @
ef7decaa
...
...
@@ -454,9 +454,9 @@ void plugins_manager::check_compatibility(data*& d, function*& f,
std
::
cout
<<
"<<DEBUG>> function will take the parametrization of the data"
<<
std
::
endl
;
f
->
setParametrization
(
d
->
input_parametrization
());
}
else
if
(
d
->
input_parametrization
()
!=
f
->
input_parametrization
())
else
if
(
d
->
input_parametrization
()
!=
f
->
input_parametrization
()
&&
args
.
is_defined
(
"change-param"
)
)
{
std
::
cout
<<
"<<INFO>> has to change the parametrization of the input data
"
<<
std
::
endl
;
std
::
cout
<<
"<<INFO>> has to change the parametrization of the input data
"
<<
params
::
get_name
(
d
->
input_parametrization
())
<<
std
::
endl
;
std
::
cout
<<
"<<INFO>> to "
<<
params
::
get_name
(
f
->
input_parametrization
())
<<
std
::
endl
;
data_params
*
dd
=
new
data_params
(
d
,
f
->
input_parametrization
());
d
=
dd
;
...
...
sources/core/vertical_segment.cpp
View file @
ef7decaa
...
...
@@ -60,9 +60,11 @@ void vertical_segment::load(const std::string& filename, const arguments& args)
min
=
args
.
get_vec
(
"min"
,
_nX
,
-
std
::
numeric_limits
<
float
>::
max
())
;
max
=
args
.
get_vec
(
"max"
,
_nX
,
std
::
numeric_limits
<
float
>::
max
())
;
std
::
cout
<<
"<<DEBUG>> data will remove outside of "
<<
min
<<
" -> "
<<
max
<<
" x-interval"
<<
std
::
endl
;
ymin
=
args
.
get_vec
(
"ymin"
,
_nY
,
-
std
::
numeric_limits
<
float
>::
max
())
;
ymax
=
args
.
get_vec
(
"ymax"
,
_nY
,
std
::
numeric_limits
<
float
>::
max
())
;
std
::
cout
<<
"<<DEBUG>> data will remove outside of "
<<
ymin
<<
" -> "
<<
ymax
<<
" y-interval"
<<
std
::
endl
;
/*
for(int k=0; k<dimX(); ++k)
...
...
sources/plugins/nonlinear_fresnel_schlick/function.cpp
View file @
ef7decaa
...
...
@@ -11,11 +11,11 @@
ALTA_DLL_EXPORT
function
*
provide_function
()
{
return
new
schlick
();
return
new
schlick
_fresnel
();
}
//! Load function specific files
bool
schlick
::
load
(
std
::
istream
&
in
)
bool
schlick
_fresnel
::
load
(
std
::
istream
&
in
)
{
// fresnel::load(in);
...
...
@@ -31,7 +31,7 @@ bool schlick::load(std::istream& in)
return
false
;
}
// Checking for the comment line #FUNC nonlinear_fresnel_schlick
// Checking for the comment line #FUNC nonlinear_fresnel_schlick
_fresnel
std
::
string
token
;
in
>>
token
;
if
(
token
!=
"#FUNC"
)
...
...
@@ -55,7 +55,7 @@ bool schlick::load(std::istream& in)
return
true
;
}
void
schlick
::
save_call
(
std
::
ostream
&
out
,
const
arguments
&
args
)
const
void
schlick
_fresnel
::
save_call
(
std
::
ostream
&
out
,
const
arguments
&
args
)
const
{
bool
is_alta
=
!
args
.
is_defined
(
"export"
)
||
args
[
"export"
]
==
"alta"
;
...
...
@@ -80,7 +80,7 @@ void schlick::save_call(std::ostream& out, const arguments& args) const
}
}
void
schlick
::
save_body
(
std
::
ostream
&
out
,
const
arguments
&
args
)
const
void
schlick
_fresnel
::
save_body
(
std
::
ostream
&
out
,
const
arguments
&
args
)
const
{
bool
is_shader
=
args
[
"export"
]
==
"shader"
||
args
[
"export"
]
==
"explorer"
;
...
...
@@ -97,7 +97,7 @@ void schlick::save_body(std::ostream& out, const arguments& args) const
}
vec
schlick
::
value
(
const
vec
&
x
)
const
vec
schlick
_fresnel
::
value
(
const
vec
&
x
)
const
{
double
xp
[
3
],
cart
[
6
];
params
::
convert
(
&
x
[
0
],
input_parametrization
(),
params
::
RUSIN_VH
,
xp
);
...
...
@@ -119,12 +119,12 @@ vec schlick::value(const vec& x) const
}
//! \brief Number of parameters to this non-linear function
int
schlick
::
nbParameters
()
const
int
schlick
_fresnel
::
nbParameters
()
const
{
return
dimY
();
}
vec
schlick
::
getParametersMin
()
const
vec
schlick
_fresnel
::
getParametersMin
()
const
{
vec
m
(
dimY
());
for
(
int
i
=
0
;
i
<
dimY
();
++
i
)
{
m
[
i
]
=
0.0
;
}
...
...
@@ -132,7 +132,7 @@ vec schlick::getParametersMin() const
}
//! Get the vector of min parameters for the function
vec
schlick
::
getParametersMax
()
const
vec
schlick
_fresnel
::
getParametersMax
()
const
{
vec
M
(
dimY
());
for
(
int
i
=
0
;
i
<
dimY
();
++
i
)
{
M
[
i
]
=
1.0
;
}
...
...
@@ -140,7 +140,7 @@ vec schlick::getParametersMax() const
}
//! \brief Get the vector of parameters for the function
vec
schlick
::
parameters
()
const
vec
schlick
_fresnel
::
parameters
()
const
{
vec
p
(
dimY
());
for
(
int
i
=
0
;
i
<
dimY
();
++
i
)
{
p
[
i
]
=
R
[
i
];
}
...
...
@@ -148,14 +148,14 @@ vec schlick::parameters() const
}
//! \brief Update the vector of parameters for the function
void
schlick
::
setParameters
(
const
vec
&
p
)
void
schlick
_fresnel
::
setParameters
(
const
vec
&
p
)
{
for
(
int
i
=
0
;
i
<
dimY
();
++
i
)
{
R
[
i
]
=
p
[
i
];
}
}
//! \brief Obtain the derivatives of the function with respect to the
//! parameters.
vec
schlick
::
parametersJacobian
(
const
vec
&
x
)
const
vec
schlick
_fresnel
::
parametersJacobian
(
const
vec
&
x
)
const
{
const
int
nY
=
dimY
();
double
xp
[
3
],
cart
[
6
];
...
...
@@ -179,7 +179,7 @@ vec schlick::parametersJacobian(const vec& x) const
}
void
schlick
::
bootstrap
(
const
data
*
d
,
const
arguments
&
args
)
void
schlick
_fresnel
::
bootstrap
(
const
data
*
d
,
const
arguments
&
args
)
{
for
(
int
i
=
0
;
i
<
dimY
();
++
i
)
{
R
[
i
]
=
0.5
;
}
}
sources/plugins/nonlinear_fresnel_schlick/function.h
View file @
ef7decaa
...
...
@@ -16,12 +16,12 @@
* \ingroup functions
* \brief Schlick's rational approximation of the Fresnel term.
*/
class
schlick
:
public
nonlinear_function
//fresnel
class
schlick
_fresnel
:
public
nonlinear_function
{
public:
// methods
schlick
()
schlick
_fresnel
()
{
setParametrization
(
params
::
CARTESIAN
);
setDimX
(
6
);
...
...
sources/plugins/nonlinear_shadowing_schlick/function.cpp
View file @
ef7decaa
...
...
@@ -11,11 +11,11 @@
ALTA_DLL_EXPORT
function
*
provide_function
()
{
return
new
schlick
();
return
new
schlick
_masking
();
}
//! Load function specific files
bool
schlick
::
load
(
std
::
istream
&
in
)
bool
schlick
_masking
::
load
(
std
::
istream
&
in
)
{
// fresnel::load(in);
...
...
@@ -31,7 +31,7 @@ bool schlick::load(std::istream& in)
return
false
;
}
// Checking for the comment line #FUNC nonlinear_fresnel_schlick
// Checking for the comment line #FUNC nonlinear_fresnel_schlick
_masking
std
::
string
token
;
in
>>
token
;
if
(
token
!=
"#FUNC"
)
...
...
@@ -41,7 +41,7 @@ bool schlick::load(std::istream& in)
}
in
>>
token
;
if
(
token
!=
"nonlinear_
fresnel
_schlick"
)
if
(
token
!=
"nonlinear_
masking
_schlick"
)
{
std
::
cerr
<<
"<<ERROR>> parsing the stream. function name is not the next token."
<<
std
::
endl
;
return
false
;
...
...
@@ -55,13 +55,13 @@ bool schlick::load(std::istream& in)
return
true
;
}
void
schlick
::
save_call
(
std
::
ostream
&
out
,
const
arguments
&
args
)
const
void
schlick
_masking
::
save_call
(
std
::
ostream
&
out
,
const
arguments
&
args
)
const
{
bool
is_alta
=
!
args
.
is_defined
(
"export"
)
||
args
[
"export"
]
==
"alta"
;
if
(
is_alta
)
{
out
<<
"#FUNC nonlinear_
shadow
ing_schlick"
<<
std
::
endl
;
out
<<
"#FUNC nonlinear_
mask
ing_schlick"
<<
std
::
endl
;
for
(
int
i
=
0
;
i
<
dimY
();
++
i
)
{
out
<<
"K "
<<
w
[
i
]
<<
std
::
endl
;
...
...
@@ -70,7 +70,7 @@ void schlick::save_call(std::ostream& out, const arguments& args) const
}
else
{
out
<<
"
shadow
ing_schlick(L, V, N, X, Y, vec3"
;
out
<<
"
mask
ing_schlick(L, V, N, X, Y, vec3"
;
for
(
int
i
=
0
;
i
<
dimY
();
++
i
)
{
out
<<
w
[
i
];
...
...
@@ -80,14 +80,14 @@ void schlick::save_call(std::ostream& out, const arguments& args) const
}
}
void
schlick
::
save_body
(
std
::
ostream
&
out
,
const
arguments
&
args
)
const
void
schlick
_masking
::
save_body
(
std
::
ostream
&
out
,
const
arguments
&
args
)
const
{
bool
is_shader
=
args
[
"export"
]
==
"shader"
||
args
[
"export"
]
==
"explorer"
;
if
(
is_shader
)
{
out
<<
std
::
endl
;
out
<<
"vec3
shadow
ing_schlick(vec3 L, vec3 V, vec3 N, vec3 X, vec3 Y, vec3 K)"
<<
std
::
endl
;
out
<<
"vec3
mask
ing_schlick(vec3 L, vec3 V, vec3 N, vec3 X, vec3 Y, vec3 K)"
<<
std
::
endl
;
out
<<
"{"
<<
std
::
endl
;
out
<<
"
\t
const float dotLN = dot(L, N);"
<<
std
::
endl
;
out
<<
"
\t
const float dotVN = dot(L, N);"
<<
std
::
endl
;
...
...
@@ -102,7 +102,7 @@ void schlick::save_body(std::ostream& out, const arguments& args) const
}
vec
schlick
::
value
(
const
vec
&
x
)
const
vec
schlick
_masking
::
value
(
const
vec
&
x
)
const
{
vec
res
(
dimY
());
const
double
u
=
x
[
5
];
...
...
@@ -118,12 +118,12 @@ vec schlick::value(const vec& x) const
}
//! \brief Number of parameters to this non-linear function
int
schlick
::
nbParameters
()
const
int
schlick
_masking
::
nbParameters
()
const
{
return
dimY
();
}
vec
schlick
::
getParametersMin
()
const
vec
schlick
_masking
::
getParametersMin
()
const
{
vec
m
(
dimY
());
for
(
int
i
=
0
;
i
<
dimY
();
++
i
)
{
m
[
i
]
=
0.0
;
}
...
...
@@ -131,7 +131,7 @@ vec schlick::getParametersMin() const
}
//! \brief Get the vector of parameters for the function
vec
schlick
::
parameters
()
const
vec
schlick
_masking
::
parameters
()
const
{
vec
p
(
dimY
());
for
(
int
i
=
0
;
i
<
dimY
();
++
i
)
{
p
[
i
]
=
w
[
i
];
}
...
...
@@ -139,14 +139,14 @@ vec schlick::parameters() const
}
//! \brief Update the vector of parameters for the function
void
schlick
::
setParameters
(
const
vec
&
p
)
void
schlick
_masking
::
setParameters
(
const
vec
&
p
)
{
for
(
int
i
=
0
;
i
<
dimY
();
++
i
)
{
w
[
i
]
=
p
[
i
];
}
}
//! \brief Obtain the derivatives of the function with respect to the
//! parameters.
vec
schlick
::
parametersJacobian
(
const
vec
&
x
)
const
vec
schlick
_masking
::
parametersJacobian
(
const
vec
&
x
)
const
{
const
int
nY
=
dimY
();
vec
jac
(
nY
*
nY
);
...
...
@@ -178,7 +178,7 @@ vec schlick::parametersJacobian(const vec& x) const
}
void
schlick
::
bootstrap
(
const
data
*
,
const
arguments
&
)
void
schlick
_masking
::
bootstrap
(
const
data
*
,
const
arguments
&
)
{
// Start with a non occluding value for k
for
(
int
i
=
0
;
i
<
dimY
();
++
i
)
{
w
[
i
]
=
0.0
;
}
...
...
sources/plugins/nonlinear_shadowing_schlick/function.h
View file @
ef7decaa
...
...
@@ -16,12 +16,12 @@
* \ingroup functions
* \brief Schlick's rational approximation of the Masking term.
*/
class
schlick
:
public
nonlinear_function
//fresnel
class
schlick
_masking
:
public
nonlinear_function
{
public:
// methods
schlick
()
schlick
_masking
()
{
setParametrization
(
params
::
CARTESIAN
);
setDimX
(
6
);
...
...
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