KJB
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
kjb::Cylinder_section Class Reference

Cylinder_section: a section of a cylinder, specified by angle and position. More...

#include <g_cylinder_section.h>

Inheritance diagram for kjb::Cylinder_section:
kjb::Cylinder kjb::Readable kjb::Writeable

Public Member Functions

 Cylinder_section (const Vector &p1, const Vector &p2, double radius, double angle, const Vector &angle_startpt, const Vector &angle_endpt)
 Constructs a cylinder section. More...
 
 Cylinder_section (const char *fname) throw (kjb::Illegal_argument, kjb::IO_error)
 Reads a cylinder section from an input file. More...
 
 Cylinder_section (std::istream &in) throw (kjb::Illegal_argument, kjb::IO_error)
 Reads a cylinder section from an input file. More...
 
 Cylinder_section (const Cylinder_section &c)
 Copy constructor. More...
 
virtual Cylinder_sectionoperator= (const Cylinder_section &c)
 Copies a cylinder section into this one. More...
 
virtual ~Cylinder_section ()
 Destructor of a cylinder section. More...
 
virtual void read (std::istream &in)
 Reads this Readable from an input stream. More...
 
virtual void write (std::ostream &out) const
 Writes this Writeable to an output stream. More...
 
double get_angle () const
 
const Vectorget_startpoint_of_angle () const
 
const Vectorget_endpoint_of_angle () const
 
- Public Member Functions inherited from kjb::Cylinder
 Cylinder (const Vector &p1, const Vector &p2, double radius)
 
 Cylinder (const char *filename)
 
 Cylinder (std::istream &in)
 
virtual Cylinderoperator= (const Cylinder &c)
 Copies a Cylinder into this one. More...
 
virtual void read (const char *filename)
 Reads this Readable from a file. More...
 
virtual void write (const char *filename) const
 Writes this Writeable to a file. More...
 
const Vectorget_p1 () const
 
const Vectorget_p2 () const
 
double get_radius () const
 
double get_length () const
 
double get_width () const
 
Vector get_direction () const
 
- Public Member Functions inherited from kjb::Readable
virtual ~Readable ()
 Deletes this Readable. More...
 
- Public Member Functions inherited from kjb::Writeable
virtual ~Writeable ()
 Deletes this Writeable. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from kjb::Readable
static const char * read_field_value (std::istream &in, const char *field_name, char *field_buf, size_t buf_len, char separator=':')
 Reads a line off in into a buffer and returns a pointer to the field value in the buffer. More...
 
static const char * read_field_value (std::istream &in, const char *field_name, char separator=':')
 Reads a line off in into an internal buffer and returns a pointer to the field value in the buffer. More...
 
- Protected Attributes inherited from kjb::Cylinder
Vector p1_
 
Vector p2_
 
double r_
 

Detailed Description

Cylinder_section: a section of a cylinder, specified by angle and position.

Constructor & Destructor Documentation

kjb::Cylinder_section::Cylinder_section ( const Vector p1,
const Vector p2,
double  radius,
double  angle,
const Vector angle_startpt,
const Vector angle_endpt 
)
inline

Constructs a cylinder section.

kjb::Cylinder_section::Cylinder_section ( const char *  fname)
throw (kjb::Illegal_argument,
kjb::IO_error
)
inline

Reads a cylinder section from an input file.

kjb::Cylinder_section::Cylinder_section ( std::istream &  in)
throw (kjb::Illegal_argument,
kjb::IO_error
)
inline

Reads a cylinder section from an input file.

Cylinder_section::Cylinder_section ( const Cylinder_section c)

Copy constructor.

Parameters
cthe Cylinder_section to copy into this one.
Cylinder_section::~Cylinder_section ( )
virtual

Destructor of a cylinder section.

Frees all space allocated by this Cylinder_section.

Member Function Documentation

double kjb::Cylinder_section::get_angle ( ) const
inline
const Vector& kjb::Cylinder_section::get_endpoint_of_angle ( ) const
inline
const Vector& kjb::Cylinder_section::get_startpoint_of_angle ( ) const
inline
Cylinder_section & Cylinder_section::operator= ( const Cylinder_section c)
virtual

Copies a cylinder section into this one.

Performs a deep copy of the center points of the cylinder bases, the radius, the angle covered by the cylinder, and the bottom edge points.

Parameters
cthe Cylinder_section to copy into this one.
Returns
A reference to this Cylinder_section.
void Cylinder_section::read ( std::istream &  in)
virtual

Reads this Readable from an input stream.

Reimplemented from kjb::Cylinder.

void Cylinder_section::write ( std::ostream &  out) const
virtual

Writes this Writeable to an output stream.

Reimplemented from kjb::Cylinder.


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