A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
src
buildings
model
building.h
Go to the documentation of this file.
1
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
4
*
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License version 2 as
7
* published by the Free Software Foundation;
8
*
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
*
18
* Author: Marco Miozzo <marco.miozzo@cttc.es>
19
*
20
*/
21
#ifndef BUILDING_H
22
#define BUILDING_H
23
24
#include <ns3/attribute.h>
25
#include <ns3/attribute-helper.h>
26
#include <ns3/vector.h>
27
#include <ns3/box.h>
28
#include <ns3/simple-ref-count.h>
29
#include <ns3/object.h>
30
31
namespace
ns3
{
32
37
class
Building
:
public
Object
38
{
39
public
:
40
41
// inherited from Object
42
static
TypeId
GetTypeId
(
void
);
43
virtual
void
DoDispose
();
44
45
46
enum
BuildingType_t
47
{
48
Residential
,
Office
,
Commercial
49
};
50
enum
ExtWallsType_t
51
{
52
Wood
,
ConcreteWithWindows
,
ConcreteWithoutWindows
,
StoneBlocks
53
};
54
66
Building
(
double
xMin,
67
double
xMax,
68
double
yMin,
69
double
yMax,
70
double
zMin,
71
double
zMax);
72
77
Building
();
78
83
virtual
~Building
();
84
89
uint32_t
GetId
(
void
)
const
;
90
96
void
SetBoundaries
(
Box
box);
97
103
void
SetBuildingType
(
Building::BuildingType_t
t);
104
112
void
SetExtWallsType
(
Building::ExtWallsType_t
t);
113
120
void
SetNFloors
(uint16_t nfloors);
121
127
void
SetNRoomsX
(uint16_t nroomx);
128
134
void
SetNRoomsY
(uint16_t nroomy);
135
140
Box
GetBoundaries
()
const
;
141
145
BuildingType_t
GetBuildingType
()
const
;
146
150
ExtWallsType_t
GetExtWallsType
()
const
;
151
155
uint16_t
GetNFloors
()
const
;
156
160
uint16_t
GetNRoomsX
()
const
;
161
165
uint16_t
GetNRoomsY
()
const
;
166
174
bool
IsInside
(Vector position)
const
;
175
184
uint16_t
GetRoomX
(Vector position)
const
;
185
194
uint16_t
GetRoomY
(Vector position)
const
;
195
202
uint16_t
GetFloor
(Vector position)
const
;
203
204
205
206
207
private
:
208
209
Box
m_buildingBounds
;
210
215
uint16_t
m_floors
;
216
uint16_t
m_roomsX
;
217
uint16_t
m_roomsY
;
218
219
uint32_t
m_buildingId
;
220
BuildingType_t
m_buildingType
;
221
ExtWallsType_t
m_externalWalls
;
222
223
};
224
225
}
// namespace ns3
226
227
#endif
/* BUILDING_H */
ns3::Building::SetNRoomsY
void SetNRoomsY(uint16_t nroomy)
Definition:
building.cc:174
ns3::Building::BuildingType_t
BuildingType_t
Definition:
building.h:46
ns3::Building::StoneBlocks
Definition:
building.h:52
ns3::Building::GetFloor
uint16_t GetFloor(Vector position) const
Definition:
building.cc:267
ns3::Building::GetBuildingType
BuildingType_t GetBuildingType() const
Definition:
building.cc:188
ns3::Building::ConcreteWithWindows
Definition:
building.h:52
ns3::Building::m_roomsY
uint16_t m_roomsY
Definition:
building.h:217
ns3::Building::GetRoomY
uint16_t GetRoomY(Vector position) const
Definition:
building.cc:246
ns3::Building::m_floors
uint16_t m_floors
number of floors, must be greater than 0, and 1 means only one floor (i.e., groundfloor) ...
Definition:
building.h:215
ns3::Box
a 3d box
Definition:
box.h:34
ns3::Building::DoDispose
virtual void DoDispose()
Destructor implementation.
Definition:
building.cc:126
ns3::Building::Office
Definition:
building.h:48
ns3::Building::m_buildingId
uint32_t m_buildingId
Definition:
building.h:219
ns3::Building::ConcreteWithoutWindows
Definition:
building.h:52
ns3::Building::m_buildingType
BuildingType_t m_buildingType
Definition:
building.h:220
ns3::Building::SetNFloors
void SetNFloors(uint16_t nfloors)
Definition:
building.cc:160
ns3::Building::SetExtWallsType
void SetExtWallsType(Building::ExtWallsType_t t)
Definition:
building.cc:153
ns3::Building::GetTypeId
static TypeId GetTypeId(void)
Definition:
building.cc:39
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::Building::m_buildingBounds
Box m_buildingBounds
Definition:
building.h:209
ns3::Building::Wood
Definition:
building.h:52
ns3::Building::m_roomsX
uint16_t m_roomsX
Definition:
building.h:216
ns3::Building::GetBoundaries
Box GetBoundaries() const
Definition:
building.cc:181
ns3::Building::m_externalWalls
ExtWallsType_t m_externalWalls
Definition:
building.h:221
ns3::Building::Residential
Definition:
building.h:48
ns3::Building::GetNRoomsY
uint16_t GetNRoomsY() const
Definition:
building.cc:212
ns3::Building::GetRoomX
uint16_t GetRoomX(Vector position) const
Definition:
building.cc:225
ns3::Building::ExtWallsType_t
ExtWallsType_t
Definition:
building.h:50
ns3::Building::GetNFloors
uint16_t GetNFloors() const
Definition:
building.cc:200
ns3::Building::Building
Building()
Create a zero-sized building located at coordinates (0.0,0.0,0.0) and with 1 floors and 1 room...
Definition:
building.cc:114
ns3::Building
a 3d building block
Definition:
building.h:37
ns3::Building::GetExtWallsType
ExtWallsType_t GetExtWallsType() const
Definition:
building.cc:194
ns3::Building::SetNRoomsX
void SetNRoomsX(uint16_t nroomx)
Definition:
building.cc:167
ns3::Building::~Building
virtual ~Building()
Destructor.
Definition:
building.cc:120
ns3::Object
A base class which provides memory management and object aggregation.
Definition:
object.h:87
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:58
ns3::Building::SetBoundaries
void SetBoundaries(Box box)
Set the boundaries of the building.
Definition:
building.cc:139
ns3::Building::GetId
uint32_t GetId(void) const
Definition:
building.cc:132
ns3::Building::GetNRoomsX
uint16_t GetNRoomsX() const
Definition:
building.cc:206
ns3::Building::Commercial
Definition:
building.h:48
ns3::Building::IsInside
bool IsInside(Vector position) const
Definition:
building.cc:218
ns3::Building::SetBuildingType
void SetBuildingType(Building::BuildingType_t t)
Definition:
building.cc:146
Generated on Wed Nov 7 2018 10:01:48 for ns-3 by
1.8.14