Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
alta
alta
Commits
8ceb67b5
Commit
8ceb67b5
authored
Aug 29, 2013
by
Laurent Belcour
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing a redundant code. Need to refactor here
parent
70bd1135
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
10 deletions
+4
-10
sources/core/params.cpp
sources/core/params.cpp
+4
-10
No files found.
sources/core/params.cpp
View file @
8ceb67b5
...
...
@@ -174,15 +174,9 @@ void params::from_cartesian(const double* invec, params::input outtype,
diff
[
2
]
=
invec
[
2
];
rotate_normal
(
diff
,
-
atan2
(
half
[
1
],
half
[
0
]));
#ifdef DEBUG
std
::
cout
<<
"diff* = [ "
<<
diff
[
0
]
<<
", "
<<
diff
[
1
]
<<
", "
<<
diff
[
2
]
<<
"]"
<<
std
::
endl
;
#endif
rotate_binormal
(
diff
,
-
outvec
[
0
]);
#ifdef DEBUG
std
::
cout
<<
"half = [ "
<<
half
[
0
]
<<
", "
<<
half
[
1
]
<<
", "
<<
half
[
2
]
<<
"]"
<<
std
::
endl
;
std
::
cout
<<
"diff = [ "
<<
diff
[
0
]
<<
", "
<<
diff
[
1
]
<<
", "
<<
diff
[
2
]
<<
"]"
<<
std
::
endl
;
#endif
outvec
[
1
]
=
acos
(
diff
[
2
]);
outvec
[
1
]
=
acos
(
diff
[
2
]);
outvec
[
2
]
=
atan2
(
diff
[
1
],
diff
[
0
]);
break
;
case
params
::
ISOTROPIC_TV_TL_DPHI
:
...
...
@@ -200,11 +194,11 @@ void params::from_cartesian(const double* invec, params::input outtype,
diff
[
0
]
=
invec
[
0
];
diff
[
1
]
=
invec
[
1
];
diff
[
2
]
=
invec
[
2
];
rotate_normal
(
diff
,
-
atan2
(
half
[
1
],
half
[
0
]));
rotate_binormal
(
diff
,
-
outvec
[
0
]);
rotate_normal
(
diff
,
-
outvec
[
1
]);
outvec
[
2
]
=
acos
(
diff
[
2
]);
outvec
[
3
]
=
atan2
(
diff
[
0
],
diff
[
1
]);
outvec
[
3
]
=
atan2
(
diff
[
1
],
diff
[
0
]);
break
;
case
params
::
SPHERICAL_TL_PL_TV_PV
:
...
...
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