-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathGraphicsCellBase.cpp
More file actions
121 lines (93 loc) · 2.86 KB
/
GraphicsCellBase.cpp
File metadata and controls
121 lines (93 loc) · 2.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
/***************************************************************************//**
* Project: Colony
*
* \file GraphicsCellBase.cpp
* \author Marc Weber\n
* The SiMBioSys group (CosmoLab)\n
* Parc Científic de Barcelona\n
* Barcelona, Spain.\n
* http://www.thesimbiosys.com
* \version 1.0
* \date 02/2011
*
* Copyright 2009 by Marc Weber
******************************************************************************/
#include "GraphicsCellBase.h"
//------------------------------------------------------------------------------
GraphicsCellBase::~GraphicsCellBase() {}
//------------------------------------------------------------------------------
GraphicsCellBase::GraphicsCellBase()
: cellLength_(0.0),
cellHeight_(0.0),
angle_(0.0),
cellIndex_(0),
posX_(0.0),
posY_(0.0),
posZ_(0.0),
hasFocus_(false)
{}
//------------------------------------------------------------------------------
GraphicsCellBase::GraphicsCellBase(const GraphicsCellBase &cell)
{
copy(cell);
}
//------------------------------------------------------------------------------
void GraphicsCellBase::copy(const GraphicsCellBase& c)
{
cellIndex_ = c.cellIndex_;
cellLength_ = c.cellLength_;
cellHeight_ = c.cellHeight_;
cellVolume_ = c.cellVolume_;
angle_ = c.angle_;
posX_ = c.posX_;
posY_ = c.posY_;
posZ_ = c.posZ_;
}
//------------------------------------------------------------------------------
void GraphicsCellBase::setCellLength(float length)
{
cellLength_ = length;
}
//------------------------------------------------------------------------------
void GraphicsCellBase::setCellHeight(float height)
{
cellHeight_ = height;
}
//------------------------------------------------------------------------------
void GraphicsCellBase::setCellIndex(int cellIndex)
{
cellIndex_ = cellIndex;
}
//------------------------------------------------------------------------------
void GraphicsCellBase::setPos(float x, float y, float z)
{
posX_ = x;
posY_ = y;
posZ_ = z;
}
//------------------------------------------------------------------------------
void GraphicsCellBase::setAngle(float angle)
{
angle_ = angle;
}
//------------------------------------------------------------------------------
int GraphicsCellBase::getCellIndex() const
{
return cellIndex_;
}
//------------------------------------------------------------------------------
float GraphicsCellBase::getCellLength() const
{
return cellLength_;
}
//------------------------------------------------------------------------------
float GraphicsCellBase::getCellHeight() const
{
return cellHeight_;
}
//------------------------------------------------------------------------------
float GraphicsCellBase::getAngle() const
{
return angle_;
}
//------------------------------------------------------------------------------