Points&Forces (survey)
Software tools facilitating the task of surveying architecture
include
a_contact.h
Go to the documentation of this file.
1
/*
2
Copyright 2010-2011 Pierre SMARS (smars@yuntech.edu.tw)
3
This program is free software: you can redistribute it and/or modify
4
it under the terms of the GNU General Public License as published by
5
the Free Software Foundation, either version 2 of the License, or
6
(at your option) any later version.
7
8
This program is distributed in the hope that it will be useful,
9
but WITHOUT ANY WARRANTY; without even the implied warranty of
10
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
GNU General Public License for more details.
12
13
You should have received a copy of the GNU General Public License
14
along with this program. If not, see <http://www.gnu.org/licenses/>.
15
*/
16
#ifndef _A_CONTACT_H_
17
#define _A_CONTACT_H_
18
19
#include <vector>
20
#include "
a_wrench.h
"
21
#include "a_point.h"
22
#include "a_segment.h"
23
27
class
a_contact
28
{
29
public
:
30
a_contact
() :
f_
() {
vertices_
.clear();}
31
a_contact
(
const
a_contact
& c);
33
int
nv
()
const
{
return
vertices_
.size();}
35
void
av
(
const
a_point p) {
vertices_
.push_back(p);}
37
a_point
v
(
const
int
i)
const
{
return
vertices_
[i];}
39
a_segment
s
(
const
int
i)
const
;
41
void
clean
();
43
void
f
(
const
a_wrench
&
f
) {
f_
=
f
;}
45
a_wrench
f
()
const
{
return
f_
;}
46
virtual
void
read
(std::istream &i);
47
virtual
void
write
(std::ostream &o)
const
;
48
//: input/output
49
friend
std::istream&
operator>>
(std::istream& i,
a_contact
& c);
50
friend
std::ostream&
operator<<
(std::ostream& o,
const
a_contact
& c);
51
52
protected
:
54
std::vector<a_point>
vertices_
;
56
a_wrench
f_
;
57
};
58
59
#endif
60
a_wrench.h
a_contact
Definition:
a_contact.h:28
a_contact::f
void f(const a_wrench &f)
set force on the face
Definition:
a_contact.h:43
a_contact::vertices_
std::vector< a_point > vertices_
points defining face
Definition:
a_contact.h:54
a_contact::clean
void clean()
clean
Definition:
a_contact.cxx:36
a_contact::f_
a_wrench f_
force on the face
Definition:
a_contact.h:56
a_contact::v
a_point v(const int i) const
get a vertex
Definition:
a_contact.h:37
a_contact::f
a_wrench f() const
get force on the face
Definition:
a_contact.h:45
a_contact::read
virtual void read(std::istream &i)
Definition:
a_contact.cxx:69
a_contact::s
a_segment s(const int i) const
get a segment
Definition:
a_contact.cxx:30
a_contact::av
void av(const a_point p)
add a vertex
Definition:
a_contact.h:35
a_contact::write
virtual void write(std::ostream &o) const
Definition:
a_contact.cxx:82
a_contact::nv
int nv() const
get number of vertices
Definition:
a_contact.h:33
a_contact::operator<<
friend std::ostream & operator<<(std::ostream &o, const a_contact &c)
Definition:
a_contact.cxx:96
a_contact::operator>>
friend std::istream & operator>>(std::istream &i, a_contact &c)
Definition:
a_contact.cxx:90
a_contact::a_contact
a_contact()
Definition:
a_contact.h:30
a_wrench
a wrench class
Definition:
a_wrench.h:30
Generated on Tue Sep 6 2022 18:45:48 for Points&Forces (survey) by
1.9.1