Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Attributes | Friends | List of all members
JUTM::JUTMPosition Class Reference

Data structure for UTM position. More...

#include <JUTMPosition.hh>

Inheritance diagram for JUTM::JUTMPosition:
JDETECTOR::JDetectorHeader JDETECTOR::JDetector JDETECTOR::JMonteCarloDetector

Public Member Functions

 JUTMPosition ()
 Default constructor. More...
 
 JUTMPosition (const JVector3D &pos)
 Constructor. More...
 
 JUTMPosition (const double east, const double north, const double z)
 Constructor. More...
 
JPosition3D getPosition () const
 Get position. More...
 
double getUTMEast () const
 Get UTM east. More...
 
double getUTMNorth () const
 Get UTM north. More...
 
double getUTMZ () const
 Get UTM Z. More...
 

Protected Attributes

double east
 
double north
 
double z
 

Friends

std::istream & operator>> (std::istream &in, JUTMPosition &pos)
 Read UTM position from input. More...
 
std::ostream & operator<< (std::ostream &out, const JUTMPosition &pos)
 Write UTM position to output. More...
 
JReaderoperator>> (JReader &in, JUTMPosition &pos)
 Read UTM position from input. More...
 
JWriteroperator<< (JWriter &out, const JUTMPosition &pos)
 Write UTM position to output. More...
 

Detailed Description

Data structure for UTM position.

The z-coordinate corresponds to the depth where z = 0 is at sea level.

Definition at line 30 of file JUTMPosition.hh.

Constructor & Destructor Documentation

JUTM::JUTMPosition::JUTMPosition ( )
inline

Default constructor.

Definition at line 35 of file JUTMPosition.hh.

35  :
36  east (0.0),
37  north(0.0),
38  z (0.0)
39  {}
JUTM::JUTMPosition::JUTMPosition ( const JVector3D pos)
inline

Constructor.

Parameters
posUTM position

Definition at line 47 of file JUTMPosition.hh.

47  :
48  east (pos.getX()),
49  north(pos.getY()),
50  z (pos.getZ())
51  {}
JUTM::JUTMPosition::JUTMPosition ( const double  east,
const double  north,
const double  z 
)
inline

Constructor.

Parameters
eastUTM East
northUTM North
zUTM Z

Definition at line 61 of file JUTMPosition.hh.

64  {
65  this->east = east;
66  this->north = north;
67  this->z = z;
68  }

Member Function Documentation

JPosition3D JUTM::JUTMPosition::getPosition ( ) const
inline

Get position.

Returns
position

Definition at line 76 of file JUTMPosition.hh.

77  {
78  return JPosition3D(east, north, z);
79  }
double JUTM::JUTMPosition::getUTMEast ( ) const
inline

Get UTM east.

Returns
UTM East

Definition at line 87 of file JUTMPosition.hh.

88  {
89  return this->east;
90  }
double JUTM::JUTMPosition::getUTMNorth ( ) const
inline

Get UTM north.

Returns
UTM North

Definition at line 98 of file JUTMPosition.hh.

99  {
100  return this->north;
101  }
double JUTM::JUTMPosition::getUTMZ ( ) const
inline

Get UTM Z.

Returns
UTM Z

Definition at line 109 of file JUTMPosition.hh.

110  {
111  return this->z;
112  }

Friends And Related Function Documentation

std::istream& operator>> ( std::istream &  in,
JUTMPosition pos 
)
friend

Read UTM position from input.

Parameters
ininput stream
posUTM position
Returns
input stream

Definition at line 122 of file JUTMPosition.hh.

123  {
124  return in >> pos.east >> pos.north >> pos.z;
125  }
std::ostream& operator<< ( std::ostream &  out,
const JUTMPosition pos 
)
friend

Write UTM position to output.

Parameters
outoutput stream
posUTM position
Returns
output stream

Definition at line 135 of file JUTMPosition.hh.

136  {
137  return out << pos.east << ' ' << pos.north << ' ' << pos.z;
138  }
JReader& operator>> ( JReader in,
JUTMPosition pos 
)
friend

Read UTM position from input.

Parameters
ininput stream
posUTM position
Returns
input stream

Definition at line 149 of file JUTMPosition.hh.

150  {
151  return in >> pos.east >> pos.north >> pos.z;
152  }
JWriter& operator<< ( JWriter out,
const JUTMPosition pos 
)
friend

Write UTM position to output.

Parameters
outoutput stream
posUTM position
Returns
output stream

Definition at line 162 of file JUTMPosition.hh.

163  {
164  return out << pos.east << pos.north << pos.z;
165  }

Member Data Documentation

double JUTM::JUTMPosition::east
protected

Definition at line 169 of file JUTMPosition.hh.

double JUTM::JUTMPosition::north
protected

Definition at line 170 of file JUTMPosition.hh.

double JUTM::JUTMPosition::z
protected

Definition at line 171 of file JUTMPosition.hh.


The documentation for this class was generated from the following file: