Jpp 19.3.0-rc.3
the software that should make you happy
Loading...
Searching...
No Matches
JDETECTOR::JTripod Class Reference

Data structure for tripod. More...

#include <JTripod.hh>

Inheritance diagram for JDETECTOR::JTripod:
JLANG::JObjectID JUTM::JUTMPosition JLANG::JComparable< JObjectID > JLANG::JComparable< JObjectID, int > JMATH::JMath< JFirst_t, JSecond_t >

Public Member Functions

 JTripod ()
 Default constructor.
 
 JTripod (const int id, const JUTMPosition &position)
 Constructor.
 
int getID () const
 Get identifier.
 
int & getID ()
 Get identifier.
 
void setID (const int id)
 Set identifier.
 
bool less (const JObjectID &object) const
 Less than method.
 
bool less (const int id) const
 Less than method.
 
bool more (const int id) const
 More than method.
 
const JUTMPositiongetUTMPosition () const
 Get UTM position.
 
void setUTMPosition (const JUTMPosition &position)
 Set UTM position.
 
JPosition3D getPosition () const
 Get position.
 
 operator JPosition3D () const
 Type conversion operator.
 
double getUTMEast () const
 Get UTM east.
 
double getUTMNorth () const
 Get UTM north.
 
double getUTMZ () const
 Get UTM Z.
 
double getX () const
 Get x.
 
double getY () const
 Get y.
 
double getZ () const
 Get z.
 
JUTMPositionnegate ()
 Negate UTM position.
 
JUTMPositionadd (const JUTMPosition &pos)
 Add UTM position.
 
JUTMPositionsub (const JUTMPosition &pos)
 Subtract UTM position.
 
JUTMPositionmul (const double factor)
 Scale UTM position.
 
JFirst_t & mul (const JSecond_t &object)
 Multiply with object.
 
JUTMPositiondiv (const double factor)
 Scale UTM position.
 
double getDisplacement (const JUTMPosition &position) const
 Get displacement to position.
 

Protected Attributes

int __id
 
double east
 
double north
 
double z
 

Friends

std::istream & operator>> (std::istream &in, JTripod &tripod)
 Read tripod from input.
 
std::ostream & operator<< (std::ostream &out, const JTripod &tripod)
 Write tripod to output.
 
JReaderoperator>> (JReader &in, JTripod &tripod)
 Read tripod from input.
 
JWriteroperator<< (JWriter &out, const JTripod &tripod)
 Write tripod to output.
 

Detailed Description

Data structure for tripod.

Definition at line 32 of file JTripod.hh.

Constructor & Destructor Documentation

◆ JTripod() [1/2]

JDETECTOR::JTripod::JTripod ( )
inline

Default constructor.

Definition at line 40 of file JTripod.hh.

41 {}

◆ JTripod() [2/2]

JDETECTOR::JTripod::JTripod ( const int id,
const JUTMPosition & position )
inline

Constructor.

Parameters
ididentifier
positionUTM positiom

Definition at line 50 of file JTripod.hh.

51 :
52 JObjectID(id),
53 JUTMPosition(position)
54 {}
JObjectID()
Default constructor.
Definition JObjectID.hh:30
JUTMPosition()
Default constructor.

Member Function Documentation

◆ getID() [1/2]

int JLANG::JObjectID::getID ( ) const
inlineinherited

Get identifier.

Returns
identifier

Definition at line 50 of file JObjectID.hh.

51 {
52 return __id;
53 }

◆ getID() [2/2]

int & JLANG::JObjectID::getID ( )
inlineinherited

Get identifier.

Returns
identifier

Definition at line 61 of file JObjectID.hh.

62 {
63 return __id;
64 }

◆ setID()

void JLANG::JObjectID::setID ( const int id)
inlineinherited

Set identifier.

Parameters
ididentifier

Definition at line 72 of file JObjectID.hh.

73 {
74 this->__id = id;
75 }

◆ less() [1/2]

bool JLANG::JObjectID::less ( const JObjectID & object) const
inlineinherited

Less than method.

Parameters
objectobject identifier
Returns
true if this identifier less than given identifier; else false

Definition at line 84 of file JObjectID.hh.

85 {
86 return this->getID() < object.getID();
87 }
int getID() const
Get identifier.
Definition JObjectID.hh:50

◆ less() [2/2]

bool JLANG::JObjectID::less ( const int id) const
inlineinherited

Less than method.

Parameters
ididentifier
Returns
true if this identifier less than given identifier; else false

Definition at line 96 of file JObjectID.hh.

97 {
98 return this->getID() < id;
99 }

◆ more()

bool JLANG::JObjectID::more ( const int id) const
inlineinherited

More than method.

Parameters
ididentifier
Returns
true if this identifier greater than given identifier; else false

Definition at line 108 of file JObjectID.hh.

109 {
110 return this->getID() > id;
111 }

◆ getUTMPosition()

const JUTMPosition & JUTM::JUTMPosition::getUTMPosition ( ) const
inlineinherited

Get UTM position.

Returns
position

Definition at line 84 of file JUTMPosition.hh.

85 {
86 return static_cast<const JUTMPosition&>(*this);
87 }

◆ setUTMPosition()

void JUTM::JUTMPosition::setUTMPosition ( const JUTMPosition & position)
inlineinherited

Set UTM position.

Parameters
positionposition

Definition at line 95 of file JUTMPosition.hh.

96 {
97 static_cast<JUTMPosition&>(*this) = position;
98 }

◆ getPosition()

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

Get position.

Returns
position

Definition at line 106 of file JUTMPosition.hh.

107 {
108 return JPosition3D(this->getX(), this->getY(), this->getZ());
109 }
double getZ() const
Get z.
double getY() const
Get y.
double getX() const
Get x.

◆ operator JPosition3D()

JUTM::JUTMPosition::operator JPosition3D ( ) const
inlineinherited

Type conversion operator.

Returns
position

Definition at line 117 of file JUTMPosition.hh.

118 {
119 return getPosition();
120 }
JPosition3D getPosition() const
Get position.

◆ getUTMEast()

double JUTM::JUTMPosition::getUTMEast ( ) const
inlineinherited

Get UTM east.

Returns
UTM East

Definition at line 128 of file JUTMPosition.hh.

129 {
130 return this->east;
131 }

◆ getUTMNorth()

double JUTM::JUTMPosition::getUTMNorth ( ) const
inlineinherited

Get UTM north.

Returns
UTM North

Definition at line 139 of file JUTMPosition.hh.

140 {
141 return this->north;
142 }

◆ getUTMZ()

double JUTM::JUTMPosition::getUTMZ ( ) const
inlineinherited

Get UTM Z.

Returns
UTM Z

Definition at line 150 of file JUTMPosition.hh.

151 {
152 return this->z;
153 }

◆ getX()

double JUTM::JUTMPosition::getX ( ) const
inlineinherited

Get x.

Returns
UTM East

Definition at line 161 of file JUTMPosition.hh.

162 {
163 return this->east;
164 }

◆ getY()

double JUTM::JUTMPosition::getY ( ) const
inlineinherited

Get y.

Returns
UTM North

Definition at line 172 of file JUTMPosition.hh.

173 {
174 return this->north;
175 }

◆ getZ()

double JUTM::JUTMPosition::getZ ( ) const
inlineinherited

Get z.

Returns
UTM Z

Definition at line 183 of file JUTMPosition.hh.

184 {
185 return this->z;
186 }

◆ negate()

JUTMPosition & JUTM::JUTMPosition::negate ( )
inlineinherited

Negate UTM position.

Returns
this UTM position

Definition at line 194 of file JUTMPosition.hh.

195 {
196 east = -east;
197 north = -north;
198 z = -z;
199
200 return *this;
201 }

◆ add()

JUTMPosition & JUTM::JUTMPosition::add ( const JUTMPosition & pos)
inlineinherited

Add UTM position.

Parameters
posUTM position
Returns
this UTM position

Definition at line 210 of file JUTMPosition.hh.

211 {
212 east += pos.getUTMEast();
213 north += pos.getUTMNorth();
214 z += pos.getUTMZ();
215
216 return *this;
217 }

◆ sub()

JUTMPosition & JUTM::JUTMPosition::sub ( const JUTMPosition & pos)
inlineinherited

Subtract UTM position.

Parameters
posUTM position
Returns
this UTM position

Definition at line 226 of file JUTMPosition.hh.

227 {
228 east -= pos.getUTMEast();
229 north -= pos.getUTMNorth();
230 z -= pos.getUTMZ();
231
232 return *this;
233 }

◆ mul() [1/2]

JUTMPosition & JUTM::JUTMPosition::mul ( const double factor)
inlineinherited

Scale UTM position.

Parameters
factormultiplication factor
Returns
this UTM position

Definition at line 242 of file JUTMPosition.hh.

243 {
244 east *= factor;
245 north *= factor;
246 z *= factor;
247
248 return *this;
249 }

◆ mul() [2/2]

template<class JFirst_t , class JSecond_t >
JFirst_t & JMATH::JMath< JFirst_t, JSecond_t >::mul ( const JSecond_t & object)
inlineinherited

Multiply with object.

Parameters
objectobject
Returns
result object

Definition at line 354 of file JMath.hh.

355 {
356 return static_cast<JFirst_t&>(*this) = JFirst_t().mul(static_cast<const JFirst_t&>(*this), object);
357 }

◆ div()

JUTMPosition & JUTM::JUTMPosition::div ( const double factor)
inlineinherited

Scale UTM position.

Parameters
factordivision factor
Returns
this UTM position

Definition at line 258 of file JUTMPosition.hh.

259 {
260 east /= factor;
261 north /= factor;
262 z /= factor;
263
264 return *this;
265 }

◆ getDisplacement()

double JUTM::JUTMPosition::getDisplacement ( const JUTMPosition & position) const
inlineinherited

Get displacement to position.

The displacement corresponds to the 2D distance in the (East,North) plane.

Parameters
positionposition
Returns
displacement

Definition at line 276 of file JUTMPosition.hh.

277 {
278 const double x = this->getUTMEast() - position.getUTMEast();
279 const double y = this->getUTMNorth() - position.getUTMNorth();
280
281 return sqrt(x*x + y*y);
282 }
double getUTMNorth() const
Get UTM north.
double getUTMEast() const
Get UTM east.

Friends And Related Symbol Documentation

◆ operator>> [1/2]

std::istream & operator>> ( std::istream & in,
JTripod & tripod )
friend

Read tripod from input.

Parameters
ininput stream
tripodtripod
Returns
input stream

Definition at line 64 of file JTripod.hh.

65 {
66 in >> static_cast<JObjectID&> (tripod);
67 in >> static_cast<JUTMPosition&>(tripod);
68
69 return in;
70 }

◆ operator<< [1/2]

std::ostream & operator<< ( std::ostream & out,
const JTripod & tripod )
friend

Write tripod to output.

Parameters
outoutput stream
tripodtripod
Returns
output stream

Definition at line 80 of file JTripod.hh.

81 {
82 out << static_cast<const JObjectID&> (tripod);
83 out << ' ';
84 out << static_cast<const JUTMPosition&>(tripod);
85
86 return out;
87 }

◆ operator>> [2/2]

JReader & operator>> ( JReader & in,
JTripod & tripod )
friend

Read tripod from input.

Parameters
inreader
tripodtripod
Returns
reader

Definition at line 97 of file JTripod.hh.

98 {
99 in >> static_cast<JObjectID&> (tripod);
100 in >> static_cast<JUTMPosition&>(tripod);
101
102 return in;
103 }

◆ operator<< [2/2]

JWriter & operator<< ( JWriter & out,
const JTripod & tripod )
friend

Write tripod to output.

Parameters
outwriter
tripodtripod
Returns
writer

Definition at line 113 of file JTripod.hh.

114 {
115 out << static_cast<const JObjectID&> (tripod);
116 out << static_cast<const JUTMPosition&>(tripod);
117
118 return out;
119 }

Member Data Documentation

◆ __id

int JLANG::JObjectID::__id
protectedinherited

Definition at line 140 of file JObjectID.hh.

◆ east

double JUTM::JUTMPosition::east
protectedinherited

Definition at line 344 of file JUTMPosition.hh.

◆ north

double JUTM::JUTMPosition::north
protectedinherited

Definition at line 345 of file JUTMPosition.hh.

◆ z

double JUTM::JUTMPosition::z
protectedinherited

Definition at line 346 of file JUTMPosition.hh.


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