OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
Public Member Functions | Protected Attributes | Friends | List of all members
ossimplugins::PositionVectorRecord Class Reference

This class is able to read a position vector record. More...

#include <PositionVectorRecord.h>

Public Member Functions

 PositionVectorRecord ()
 Constructor. More...
 
 ~PositionVectorRecord ()
 Destructor. More...
 
 PositionVectorRecord (const PositionVectorRecord &rhs)
 Copy constructor. More...
 
PositionVectorRecordoperator= (const PositionVectorRecord &rhs)
 Copy operator. More...
 
double * get_pos ()
 Data point position (m) More...
 
double * get_vel ()
 Data point velocity (mm/s) More...
 

Protected Attributes

double _pos [3]
 Data point position (m) More...
 
double _vel [3]
 Data point velocity (mm/s) More...
 

Friends

std::ostream & operator<< (std::ostream &os, const PositionVectorRecord &data)
 This function writes the PositionVectorRecord in a stream. More...
 
std::istream & operator>> (std::istream &is, PositionVectorRecord &data)
 This function reads a PositionVectorRecord from a stream. More...
 

Detailed Description

This class is able to read a position vector record.

Definition at line 24 of file PositionVectorRecord.h.

Constructor & Destructor Documentation

◆ PositionVectorRecord() [1/2]

ossimplugins::PositionVectorRecord::PositionVectorRecord ( )

Constructor.

Definition at line 16 of file PositionVectorRecord.cpp.

17 {
18 }

◆ ~PositionVectorRecord()

ossimplugins::PositionVectorRecord::~PositionVectorRecord ( )

Destructor.

Definition at line 20 of file PositionVectorRecord.cpp.

21 {
22 }

◆ PositionVectorRecord() [2/2]

ossimplugins::PositionVectorRecord::PositionVectorRecord ( const PositionVectorRecord rhs)

Copy constructor.

Definition at line 57 of file PositionVectorRecord.cpp.

References _pos, and _vel.

58 {
59  for (int i=0;i<3;i++)
60  {
61  _pos[i] = rhs._pos[i];
62  }
63 
64  for (int i=0;i<3;i++)
65  {
66  _vel[i] = rhs._vel[i];
67  }
68 }
double _vel[3]
Data point velocity (mm/s)
double _pos[3]
Data point position (m)

Member Function Documentation

◆ get_pos()

double* ossimplugins::PositionVectorRecord::get_pos ( )
inline

Data point position (m)

Definition at line 59 of file PositionVectorRecord.h.

References _pos.

60  {
61  return _pos;
62  };
double _pos[3]
Data point position (m)

◆ get_vel()

double* ossimplugins::PositionVectorRecord::get_vel ( )
inline

Data point velocity (mm/s)

Definition at line 67 of file PositionVectorRecord.h.

References _vel.

68  {
69  return _vel;
70  };
double _vel[3]
Data point velocity (mm/s)

◆ operator=()

PositionVectorRecord & ossimplugins::PositionVectorRecord::operator= ( const PositionVectorRecord rhs)

Copy operator.

Definition at line 70 of file PositionVectorRecord.cpp.

References _pos, and _vel.

71 {
72  for (int i=0;i<3;i++)
73  {
74  _pos[i] = rhs._pos[i];
75  }
76 
77  for (int i=0;i<3;i++)
78  {
79  _vel[i] = rhs._vel[i];
80  }
81  return *this;
82 }
double _vel[3]
Data point velocity (mm/s)
double _pos[3]
Data point position (m)

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const PositionVectorRecord data 
)
friend

This function writes the PositionVectorRecord in a stream.

Definition at line 24 of file PositionVectorRecord.cpp.

25 {
26  for (int i=0;i<3;i++)
27  {
28  os<<"pos["<<i<<"]:"<<data._pos[i]<<std::endl;
29  }
30 
31  for (int i=0;i<3;i++)
32  {
33  os<<"vel["<<i<<"]:"<<data._vel[i]<<std::endl;
34  }
35  return os;
36 }

◆ operator>>

std::istream& operator>> ( std::istream &  is,
PositionVectorRecord data 
)
friend

This function reads a PositionVectorRecord from a stream.

Definition at line 38 of file PositionVectorRecord.cpp.

39 {
40  char buf[23];
41  buf[22] = '\0';
42 
43  for (int i=0;i<3;i++)
44  {
45  is.read(buf,22);
46  data._pos[i] = atof(buf);
47  }
48 
49  for (int i=0;i<3;i++)
50  {
51  is.read(buf,22);
52  data._vel[i] = atof(buf);
53  }
54  return is;
55 }

Member Data Documentation

◆ _pos

double ossimplugins::PositionVectorRecord::_pos[3]
protected

◆ _vel

double ossimplugins::PositionVectorRecord::_vel[3]
protected

Data point velocity (mm/s)

Definition at line 80 of file PositionVectorRecord.h.

Referenced by get_vel(), ossimplugins::operator<<(), operator=(), ossimplugins::operator>>(), and PositionVectorRecord().


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