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
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
vector.h
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2007 INRIA
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: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
19
*/
20
#ifndef NS3_VECTOR_H
21
#define NS3_VECTOR_H
22
23
#include "attribute.h"
24
#include "attribute-helper.h"
25
26
namespace
ns3 {
27
31
class
Vector3D
32
{
33
public
:
41
Vector3D
(
double
_x,
double
_y,
double
_z);
45
Vector3D
();
49
double
x
;
53
double
y
;
57
double
z
;
58
};
59
63
class
Vector2D
64
{
65
public
:
72
Vector2D
(
double
_x,
double
_y);
76
Vector2D
();
80
double
x
;
84
double
y
;
85
};
86
92
double
CalculateDistance
(
const
Vector3D
&a,
const
Vector3D
&b);
93
99
double
CalculateDistance
(
const
Vector2D
&a,
const
Vector2D
&b);
100
109
ATTRIBUTE_HELPER_HEADER
(
Vector3D
);
110
ATTRIBUTE_HELPER_HEADER
(
Vector2D
);
111
112
std::ostream &
operator <<
(std::ostream &os,
const
Vector3D
&vector);
113
std::istream &
operator >>
(std::istream &is,
Vector3D
&vector);
114
std::ostream &
operator <<
(std::ostream &os,
const
Vector2D
&vector);
115
std::istream &
operator >>
(std::istream &is,
Vector2D
&vector);
116
117
// for compatibility with mobility models
118
typedef
Vector3D
Vector
;
119
typedef
Vector3DValue
VectorValue
;
120
typedef
Vector3DChecker VectorChecker;
121
ATTRIBUTE_ACCESSOR_DEFINE
(
Vector
);
122
Ptr<const AttributeChecker>
MakeVectorChecker (
void
);
123
124
}
// namespace ns3
125
126
#endif
/* NS3_VECTOR_H */
ns3::operator>>
std::istream & operator>>(std::istream &is, Angles &a)
Definition:
angles.cc:49
ns3::Vector3D::x
double x
Definition:
vector.h:49
ns3::Ptr
smart pointer class similar to boost::intrusive_ptr
Definition:
ptr.h:59
ns3::Vector3D
a 3d vector
Definition:
vector.h:31
ns3::Vector2D::x
double x
Definition:
vector.h:80
ns3::Vector2D::Vector2D
Vector2D()
Definition:
vector.cc:63
ns3::Vector2D::y
double y
Definition:
vector.h:84
ns3::CalculateDistance
double CalculateDistance(const Vector3D &a, const Vector3D &b)
Definition:
vector.cc:71
ns3::Vector3D::Vector3D
Vector3D()
Definition:
vector.cc:48
ATTRIBUTE_HELPER_HEADER
#define ATTRIBUTE_HELPER_HEADER(type)
Definition:
attribute-helper.h:235
ns3::operator<<
std::ostream & operator<<(std::ostream &os, const Angles &a)
Definition:
angles.cc:43
ns3::Vector2D
a 3d vector
Definition:
vector.h:63
ns3::Vector3D::y
double y
Definition:
vector.h:53
ATTRIBUTE_ACCESSOR_DEFINE
#define ATTRIBUTE_ACCESSOR_DEFINE(type)
Definition:
attribute-helper.h:100
ns3::Vector3DValue
hold objects of type ns3::Vector3D
ns3::Vector3D::z
double z
Definition:
vector.h:57
src
core
model
vector.h
Generated on Sun Mar 16 2014 11:25:02 for ns-3 by
1.8.6