Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F90362743
aka_plane.hh
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
Thu, Oct 31, 23:52
Size
1 KB
Mime Type
text/x-c++
Expires
Sat, Nov 2, 23:52 (2 d)
Engine
blob
Format
Raw Data
Handle
22022911
Attached To
rAKA akantu
aka_plane.hh
View Options
/**
* @file aka_plane.hh
* @author Alejandro Aragon <alejandro.aragon@epfl.ch>
* @date Tue Sep 04 15:33:00 2012
*
* @brief class of a plane
*
* @section LICENSE
*
* Copyright (©) 2010-2011 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/>.
*
*/
/* -------------------------------------------------------------------------- */
#ifndef __AKANTU_AKA_PLANE_HH__
#define __AKANTU_AKA_PLANE_HH__
#include "aka_point.hh"
__BEGIN_AKANTU__
struct
Plane
{
typedef
Point
<
3
>
point_type
;
typedef
point_type
::
value_type
value_type
;
Plane
(
const
point_type
&
a
,
const
point_type
&
b
,
const
point_type
&
c
)
{
n_
=
cross
(
b
-
a
,
c
-
a
).
normalize
();
d_
=
n_
*
a
;
}
const
point_type
&
normal
()
const
{
return
n_
;
}
value_type
distance
()
const
{
return
d_
;
}
private
:
point_type
n_
;
//!< Plane unit normal
value_type
d_
;
//!< Distance from the plane to the origin
};
__END_AKANTU__
#endif
/* __AKANTU_AKA_PLANE_HH__ */
Event Timeline
Log In to Comment