MorphoGraphX
Main Page
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
src
SymmetricTensor.hpp
1
#ifndef SYMMETRIC_TENSOR_HPP
2
#define SYMMETRIC_TENSOR_HPP
3
4
#include <QTextStream>
5
#include <
Vector.hpp
>
6
7
namespace
mgx {
8
namespace
util {
9
typedef
Vector<3, float> Point3f;
10
11
class
SymmetricTensor
{
12
public
:
13
SymmetricTensor
()
14
: _ev1(1, 0, 0)
15
, _ev2(0, 1, 0)
16
, _evals(1, 1, 1)
17
{
18
}
19
20
SymmetricTensor
(
const
Point3f
& ev1,
const
Point3f
& ev2,
const
Point3f
& evals)
21
: _ev1(ev1)
22
, _ev2(ev2)
23
, _evals(evals)
24
{
25
}
26
27
SymmetricTensor
(
const
SymmetricTensor
& copy)
28
: _ev1(copy._ev1)
29
, _ev2(copy._ev2)
30
, _evals(copy._evals)
31
{
32
}
33
34
SymmetricTensor
& operator=(
const
SymmetricTensor
& other)
35
{
36
_ev1 = other._ev1;
37
_ev2 = other._ev2;
38
_evals = other._evals;
39
return
*
this
;
40
}
41
42
Point3f
& ev1() {
43
return
_ev1;
44
}
45
Point3f
& ev2() {
46
return
_ev2;
47
}
48
const
Point3f
& ev1()
const
{
49
return
_ev1;
50
}
51
const
Point3f
& ev2()
const
{
52
return
_ev2;
53
}
54
Point3f
ev3()
const
{
55
return
_ev1 ^ _ev2;
56
}
57
const
Point3f
& evals()
const
{
58
return
_evals;
59
}
60
Point3f
& evals() {
61
return
_evals;
62
}
63
64
protected
:
65
Point3f
_ev1, _ev2;
66
Point3f
_evals;
67
};
68
}
// namespace util
69
}
// namespace mgx
70
#endif
mgx::util::SymmetricTensor
Definition:
SymmetricTensor.hpp:11
mgx::util::Vector< 3, float >
Vector.hpp
Defines the Vector class template This file is shared by cuda, do not include headers that nvcc can't...
Generated on Thu Jul 9 2015 20:43:09 for MorphoGraphX by
1.8.6