PeriDyno
1.0.0
Toggle main menu visibility
Main Page
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
Variables
b
c
d
e
g
h
i
k
m
p
q
r
s
t
z
Typedefs
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
Enumerations
b
c
d
e
f
g
i
l
m
n
o
p
q
r
s
t
v
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
h
i
j
m
n
o
p
q
r
s
t
v
Enumerations
Enumerator
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
u
w
x
y
Related Symbols
Files
File List
File Members
All
_
a
b
c
d
e
f
g
i
l
m
n
o
p
q
r
s
t
u
v
w
x
Functions
_
a
b
c
d
f
g
i
l
m
o
p
q
s
t
v
w
x
Variables
Typedefs
Enumerations
Enumerator
g
v
w
Macros
_
a
b
c
d
e
f
g
i
l
m
n
o
p
q
r
s
t
u
v
w
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Loading...
Searching...
No Matches
D:
Peridyno
peridyno
src
Rendering
Core
Color.inl
Go to the documentation of this file.
1
#ifndef COLOR_SERIALIZATION
2
#define COLOR_SERIALIZATION
3
4
#include "
Field.h
"
5
6
namespace
dyno
7
{
8
template
<>
9
inline
std::string
FVar<Color>::serialize
()
10
{
11
if
(
isEmpty
())
12
return
""
;
13
14
Color
val = this->
getValue
();
15
16
std::stringstream ss;
17
ss << val.
r
<<
" "
<< val.
g
<<
" "
<< val.
b
;
18
19
return
ss.str();
20
}
9
inline
std::string
FVar<Color>::serialize
() {
…
}
21
22
template
<>
23
inline
bool
FVar<Color>::deserialize
(
const
std::string& str)
24
{
25
if
(str.empty())
26
return
false
;
27
28
std::stringstream ss(str);
29
std::string substr;
30
31
ss >> substr;
32
double
x = std::stod(substr);
33
34
ss >> substr;
35
double
y = std::stod(substr);
36
37
ss >> substr;
38
double
z = std::stod(substr);
39
40
this->
setValue
(
Color
(x, y, z));
41
42
return
true
;
43
}
23
inline
bool
FVar<Color>::deserialize
(
const
std::string& str) {
…
}
44
45
template
class
FVar<Color>
;
46
}
47
48
#endif
// !COLOR_SERIALIZATION
Field.h
dyno::Color
Definition
Color.h:7
dyno::Color::r
float r
Definition
Color.h:528
dyno::Color::b
float b
Definition
Color.h:530
dyno::Color::g
float g
Definition
Color.h:529
dyno::FVar
Definition
Field.h:34
dyno::FVar< float >::isEmpty
bool isEmpty() override
Definition
Field.h:58
dyno::FVar::serialize
std::string serialize() override
Definition
Field.h:55
dyno::FVar::deserialize
bool deserialize(const std::string &str) override
Definition
Field.h:56
dyno::FVar< float >::getValue
float getValue()
Definition
Field.h:130
dyno::FVar< float >::setValue
void setValue(float val)
Definition
Field.h:111
dyno
This is an implementation of AdditiveCCD based on peridyno.
Definition
Array.h:25
Generated by
1.13.2