Jpp test-rotations-new
the software that should make you happy
Loading...
Searching...
No Matches
JEllipse Struct Reference

Auxiliary data structure for ellipse. More...

Public Attributes

double x1
 
double y1
 
double r1
 
double r2
 
double phimin
 
double phimax
 

Friends

std::istream & operator>> (std::istream &in, JEllipse &ellipse)
 Read ellipse from input stream.
 
std::ostream & operator<< (std::ostream &out, const JEllipse &ellipse)
 Write ellipse to output stream.
 

Detailed Description

Auxiliary data structure for ellipse.

Definition at line 17 of file JEllipse.cc.

Friends And Related Symbol Documentation

◆ operator>>

std::istream & operator>> ( std::istream & in,
JEllipse & ellipse )
friend

Read ellipse from input stream.

Parameters
ininput stream
ellipseellipse
Returns
input stream

Definition at line 26 of file JEllipse.cc.

27 {
28 if (in >> ellipse.x1 >> ellipse.y1 >> ellipse.r1) {
29
30 if (in >> ellipse.r2) {
31
32 if (in >> ellipse.phimin >> ellipse.phimax) {
33
34 } else {
35
36 ellipse.phimin = 0.0;
37 ellipse.phimax = 360.0;
38 }
39
40 } else {
41
42 ellipse.r2 = ellipse.r1;
43 ellipse.phimin = 0.0;
44 ellipse.phimax = 360.0;
45 }
46
47 in.clear();
48 }
49
50 return in;
51 }
double r2
Definition JEllipse.cc:75
double y1
Definition JEllipse.cc:73
double x1
Definition JEllipse.cc:72
double phimin
Definition JEllipse.cc:76
double phimax
Definition JEllipse.cc:77
double r1
Definition JEllipse.cc:74

◆ operator<<

std::ostream & operator<< ( std::ostream & out,
const JEllipse & ellipse )
friend

Write ellipse to output stream.

Parameters
outoutput stream
ellipseellipse
Returns
output stream

Definition at line 60 of file JEllipse.cc.

61 {
62 out << ellipse.x1 << ' '
63 << ellipse.y1 << ' '
64 << ellipse.r1 << ' '
65 << ellipse.r2 << ' '
66 << ellipse.phimin << ' '
67 << ellipse.phimax;
68
69 return out;
70 }

Member Data Documentation

◆ x1

double JEllipse::x1

Definition at line 72 of file JEllipse.cc.

◆ y1

double JEllipse::y1

Definition at line 73 of file JEllipse.cc.

◆ r1

double JEllipse::r1

Definition at line 74 of file JEllipse.cc.

◆ r2

double JEllipse::r2

Definition at line 75 of file JEllipse.cc.

◆ phimin

double JEllipse::phimin

Definition at line 76 of file JEllipse.cc.

◆ phimax

double JEllipse::phimax

Definition at line 77 of file JEllipse.cc.


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