Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F78612014
aka_ball.cc
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, Aug 21, 23:22
Size
1 KB
Mime Type
text/x-c++
Expires
Fri, Aug 23, 23:22 (1 d, 21 h)
Engine
blob
Format
Raw Data
Handle
20044425
Attached To
rAKA akantu
aka_ball.cc
View Options
/**
* @file aka_ball.cc
*
* @author Alejandro M. Aragón <alejandro.aragon@epfl.ch>
*
* @date creation: Sun Sep 26 2010
* @date last modification: Sun Oct 19 2014
*
* @brief bounding sphere classes
*
* @section LICENSE
*
* Copyright (©) 2010-2012, 2014, 2015 EPFL (Ecole Polytechnique Fédérale de
* Lausanne) Laboratory (LSMS - Laboratoire de Simulation en Mécanique des
* Solides)
*
* Akantu is free software: you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free
* Software Foundation, either version 3 of the License, or (at your option) any
* later version.
*
* Akantu is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
* A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Akantu. If not, see <http://www.gnu.org/licenses/>.
*
*/
/* -------------------------------------------------------------------------- */
#include "aka_ball.hh"
__BEGIN_AKANTU__
template
<>
std
::
ostream
&
Interval
::
print
(
std
::
ostream
&
os
)
const
{
os
<<
"Interval["
<<
c_
<<
", "
<<
r_
<<
"]"
;
return
os
;
}
template
<>
std
::
ostream
&
Circle
::
print
(
std
::
ostream
&
os
)
const
{
os
<<
"Disk["
<<
c_
<<
", "
<<
r_
<<
"]"
;
return
os
;
}
template
<>
std
::
ostream
&
Sphere
::
print
(
std
::
ostream
&
os
)
const
{
os
<<
"Sphere["
<<
c_
<<
", "
<<
r_
<<
"]"
;
return
os
;
}
template
<>
typename
Ball
<
1
>::
value_type
Ball
<
1
>::
measure
()
const
{
return
r_
;
}
template
<>
typename
Ball
<
2
>::
value_type
Ball
<
2
>::
measure
()
const
{
return
pow
(
r_
,
2
);
}
template
<>
typename
Ball
<
3
>::
value_type
Ball
<
3
>::
measure
()
const
{
return
pow
(
r_
,
3
);
}
__END_AKANTU__
Event Timeline
Log In to Comment