ESyS-Particle
2.2
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
Corner.h
Go to the documentation of this file.
1
2
// //
3
// Copyright (c) 2003-2013 by The University of Queensland //
4
// Earth Systems Science Computational Centre (ESSCC) //
5
// http://www.uq.edu.au/esscc //
6
// //
7
// Primary Business: Brisbane, Queensland, Australia //
8
// Licensed under the Open Software License version 3.0 //
9
// http://www.opensource.org/licenses/osl-3.0.php //
10
// //
12
13
#ifndef __CORNER_H
14
#define __CORNER_H
15
16
//-- Project includes --
17
#include "
Foundation/vec3.h
"
18
#include "
Geometry/Triangle.h
"
19
#include "
Geometry/Edge.h
"
20
21
//-- STL includes --
22
#include <vector>
23
24
using
std::vector;
25
34
class
Corner
35
{
36
private
:
37
Vec3
m_p
;
38
Vec3
m_old_pos
;
39
vector<Edge*>
m_edges
;
40
vector<Triangle*>
m_triangles
;
41
int
m_id
;
42
int
m_tag
;
43
44
public
:
45
Corner
(
const
Vec3
&,
int
,
int
);
46
47
void
addEdge
(
Edge
*);
48
void
addTriangle
(
Triangle
*);
49
double
sep
(
const
Vec3
&)
const
;
50
// pair<bool,double> dist(const Vec3&) const ; // signed separation according to direction of the normal
51
bool
isValidContact
(
const
Vec3
&)
const
;
52
Vec3
getDirectionFromPoint
(
const
Vec3
&)
const
;
53
void
move
(
const
Vec3
&);
54
Vec3
getPos
()
const
{
return
m_p
;};
55
void
setPos
(
const
Vec3
&p) {
m_p
= p;}
56
void
applyForce
(
const
Vec3
&f);
57
int
getID
()
const
{
return
m_id
;};
58
int
getTag
()
const
{
return
m_tag
;};
59
60
double
getDistMoved
() {
return
(
m_old_pos
-
m_p
).norm();};
61
void
resetOldPos
(){
m_old_pos
=
m_p
;};
62
};
63
64
#endif // __CORNER_H
Geometry
Corner.h
Generated on Mon May 6 2013 23:26:29 for ESyS-Particle by
1.8.3.1