63 #ifndef KJB_CYLINDER_SECTION_H
64 #define KJB_CYLINDER_SECTION_H
70 #define TWO_PI 6.28319
88 angle_startpt_(angle_startpt),
89 angle_endpt_(angle_endpt)
96 if(angle_startpt_.
size() < 3 || angle_startpt_.
size() > 4)
101 if(angle_endpt_.
size() < 3 || angle_endpt_.
size() > 4)
110 angle_startpt_(3, 0.0),
119 angle_startpt_(3, 0.0),
134 virtual void read(std::istream & in);
136 virtual void write(std::ostream & out)
const;
145 return angle_startpt_;
Cylinder_section: a section of a cylinder, specified by angle and position.
Definition: g_cylinder_section.h:80
virtual void write(std::ostream &out) const
Writes this Writeable to an output stream.
Definition: g_cylinder_section.cpp:159
size_type size() const
Alias to get_length(). Required to comply with stl Container concept.
Definition: m_vector.h:510
#define TWO_PI
Definition: g_cylinder_section.h:70
virtual Cylinder_section & operator=(const Cylinder_section &c)
Copies a cylinder section into this one.
Definition: g_cylinder_section.cpp:94
virtual ~Cylinder_section()
Destructor of a cylinder section.
Definition: g_cylinder_section.cpp:81
Cylinder_section(const Vector &p1, const Vector &p2, double radius, double angle, const Vector &angle_startpt, const Vector &angle_endpt)
Constructs a cylinder section.
Definition: g_cylinder_section.h:85
const Vector & get_startpoint_of_angle() const
Definition: g_cylinder_section.h:143
This class implements vectors, in the linear-algebra sense, with real-valued elements.
Definition: m_vector.h:87
virtual void read(std::istream &in)
Reads this Readable from an input stream.
Definition: g_cylinder_section.cpp:111
#define KJB_THROW_2(ex, msg)
Definition: l_exception.h:48
Cylinder(const Vector &p1, const Vector &p2, double radius)
Definition: g_cylinder.h:35
Cylinder_section(const char *fname)
Reads a cylinder section from an input file.
Definition: g_cylinder_section.h:108
Object thrown when an argument to a function is not acceptable.
Definition: l_exception.h:377
Definition: g_cylinder.h:32
Object thrown when input or output fails.
Definition: l_exception.h:496
const Vector & get_endpoint_of_angle() const
Definition: g_cylinder_section.h:148
Cylinder_section(std::istream &in)
Reads a cylinder section from an input file.
Definition: g_cylinder_section.h:117
double get_angle() const
Definition: g_cylinder_section.h:138