A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
box.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2009 Dan Broyles
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: Dan Broyles <dbroyl01@ku.edu>
19
*/
20
#ifndef BOX_H
21
#define BOX_H
22
23
#include "ns3/attribute.h"
24
#include "ns3/attribute-helper.h"
25
#include "ns3/vector.h"
26
27
namespace
ns3 {
28
34
class
Box
35
{
36
public
:
40
enum
Side
{
41
RIGHT
,
42
LEFT
,
43
TOP
,
44
BOTTOM
,
45
UP
,
46
DOWN
47
};
58
Box
(
double
_xMin,
double
_xMax,
59
double
_yMin,
double
_yMax,
60
double
_zMin,
double
_zMax);
64
Box
();
72
bool
IsInside
(
const
Vector &position)
const
;
79
Side
GetClosestSide
(
const
Vector &position)
const
;
90
Vector
CalculateIntersection
(
const
Vector ¤t,
const
Vector &speed)
const
;
91
93
double
xMin
;
95
double
xMax
;
97
double
yMin
;
99
double
yMax
;
101
double
zMin
;
103
double
zMax
;
104
};
105
106
std::ostream &
operator <<
(std::ostream &os,
const
Box
&box);
107
std::istream &
operator >>
(std::istream &is,
Box
&box);
108
109
ATTRIBUTE_HELPER_HEADER
(
Box
);
110
111
}
// namespace ns3
112
113
#endif
/* BOX_H */
ns3::Box::Side
Side
Enum class to specify sides of a box.
Definition:
box.h:40
ns3::operator>>
std::istream & operator>>(std::istream &is, Angles &a)
initialize a struct Angles from input
Definition:
angles.cc:48
ns3::Box::DOWN
Definition:
box.h:46
ns3::Box::zMin
double zMin
The z coordinate of the down bound of the box.
Definition:
box.h:101
ns3::Box::CalculateIntersection
Vector CalculateIntersection(const Vector ¤t, const Vector &speed) const
Definition:
box.cc:110
ns3::Box::GetClosestSide
Side GetClosestSide(const Vector &position) const
Definition:
box.cc:63
ns3::ATTRIBUTE_HELPER_HEADER
ATTRIBUTE_HELPER_HEADER(BleAccessAddress)
ns3::Box::xMax
double xMax
The x coordinate of the right bound of the box.
Definition:
box.h:95
ns3::Box::UP
Definition:
box.h:45
ns3::Box
a 3d box
Definition:
box.h:34
ns3::Box::yMax
double yMax
The y coordinate of the top bound of the box.
Definition:
box.h:99
ns3::Box::LEFT
Definition:
box.h:42
ns3::Box::BOTTOM
Definition:
box.h:44
ns3::Box::yMin
double yMin
The y coordinate of the bottom bound of the box.
Definition:
box.h:97
ns3::operator<<
std::ostream & operator<<(std::ostream &os, const Angles &a)
print a struct Angles to output
Definition:
angles.cc:42
ns3::Box::zMax
double zMax
The z coordinate of the up bound of the box.
Definition:
box.h:103
ns3::Box::Box
Box()
Create a zero-sized box located at coordinates (0.0,0.0,0.0)
Definition:
box.cc:43
ns3::Box::RIGHT
Definition:
box.h:41
ns3::Box::TOP
Definition:
box.h:43
ns3::Box::IsInside
bool IsInside(const Vector &position) const
Definition:
box.cc:54
ns3::Box::xMin
double xMin
The x coordinate of the left bound of the box.
Definition:
box.h:93
src
mobility
model
box.h
Generated on Wed Jul 6 2016 17:11:35 for ns-3 by
1.8.6