JWS C++ Library
C++ language utility library
jwscxx::graphics::Cuboid_d Class Reference

Cuboid defined by a width, height and length at the origin or a specified postion. More...

#include <cuboid.h>

Inheritance diagram for jwscxx::graphics::Cuboid_d:
Collaboration diagram for jwscxx::graphics::Cuboid_d:

List of all members.

Public Member Functions

 Cuboid_d (double width, double height, double length) throw (jwscxx::base::Arg_error)
 Constructs a cuboid at the origin.
 Cuboid_d (double width, double height, double length, double x, double y, double z) throw (jwscxx::base::Arg_error)
 Constructs a cuboid at a particular location.
 Cuboid_d (double width, double height, double length, const jwsc::Vector_d *p) throw (jwscxx::base::Arg_error)
 Constructs a cuboid at a particular location.
 Cuboid_d (const Cuboid_d &c)
 Constructs a cuboid by copying another.
 Cuboid_d (const char *fname) throw (jwscxx::base::Arg_error, jwscxx::base::IO_error)
 Reads a cuboid from an input file.
 Cuboid_d (std::istream &in) throw (jwscxx::base::Arg_error, jwscxx::base::IO_error)
 Reads a cuboid from an input stream.
virtual ~Cuboid_d ()
 Deletes this cuboid.
virtual Cuboid_doperator= (const Cuboid_d &c)
 Copies a cuboid into this one.
virtual Cuboid_dclone () const
 Clones this cuboid.

Detailed Description

Cuboid defined by a width, height and length at the origin or a specified postion.

Definition at line 136 of file cuboid.h.


Constructor & Destructor Documentation

Cuboid_d::Cuboid_d ( double  width,
double  height,
double  length 
) throw (jwscxx::base::Arg_error)

Constructs a cuboid at the origin.

The mapping of width, height and length to the ordinates is as follows:

                                   height
                                      y
        +------------+                +
        |\           |\               |
        |  +------------+             |
        |  |         |  |             |
        |  |         |  |    ---->    |
        |  |         |  |             |
        +--|---------+  |           O +------------+ x width
         \ |          \ |              \
           +------------+               +
                                         z
                                       length
Parameters:
widthWidth along x.
heightHeight along y.
lengthLengthh along z.
Exceptions:
jwscxx::base::Arg_errorDimensions must be > 0.
See also:
jwscxx::graphics::Parapiped_d For information about face indices.

Definition at line 303 of file cuboid.cpp.

Cuboid_d::Cuboid_d ( double  width,
double  height,
double  length,
double  x,
double  y,
double  z 
) throw (jwscxx::base::Arg_error)

Constructs a cuboid at a particular location.

The mapping of width, height and length to the ordinates is as follows:

                                   height
                                      y
        +------------+                +
        |\           |\               |
        |  +------------+             |
        |  |         |  |             |
        |  |         |  |    ---->    |
        |  |         |  |             |
        +--|---------+  |     (x,y,z) +------------+ x width
         \ |          \ |              \
           +------------+               +
                                         z
                                       length
Parameters:
widthWidth along x.
heightHeight along y.
lengthLengthh along z.
xX-coord to position the corner of the cuboid at.
yY-coord to position the corner of the cuboid at.
zZ-coord to position the corner of the cuboid at.
Exceptions:
jwscxx::base::Arg_errorDimensions must be > 0.
See also:
jwscxx::graphics::Parapiped_d For information about face indices.

Definition at line 345 of file cuboid.cpp.

Cuboid_d::Cuboid_d ( double  width,
double  height,
double  length,
const jwsc::Vector_d *  p 
) throw (jwscxx::base::Arg_error)

Constructs a cuboid at a particular location.

The mapping of width, height and length to the ordinates is as follows:

                                   height
                                      y
        +------------+                +
        |\           |\               |
        |  +------------+             |
        |  |         |  |             |
        |  |         |  |    ---->    |
        |  |         |  |             |
        +--|---------+  |           p +------------+ x width
         \ |          \ |              \
           +------------+               +
                                         z
                                       length
Parameters:
widthWidth along x.
heightHeight along y.
lengthLengthh along z.
pPosition of the primary corner of the cuboid.
Exceptions:
jwscxx::base::Arg_errorDimensions must be > 0. Vector postition must be in R^3.
See also:
jwscxx::graphics::Parapiped_d For information about face indices.

Definition at line 393 of file cuboid.cpp.

Cuboid_d::Cuboid_d ( const Cuboid_d c)

Constructs a cuboid by copying another.

Parameters:
cCuboid to copy into this one.

Definition at line 422 of file cuboid.cpp.

Cuboid_d::Cuboid_d ( const char *  fname) throw (jwscxx::base::Arg_error, jwscxx::base::IO_error)

Reads a cuboid from an input file.

The file format is big-endian binary.

Parameters:
fnameInput file to read this cuboid from.
Exceptions:
jwscxx::base::IO_errorCould not read from in.
jwscxx::base::Arg_errorInvalid arguments in file to read from.

Definition at line 435 of file cuboid.cpp.

Cuboid_d::Cuboid_d ( std::istream &  in) throw (jwscxx::base::Arg_error, jwscxx::base::IO_error)

Reads a cuboid from an input stream.

The file format is big-endian binary.

Parameters:
inInput stream to read this cuboid from.
Exceptions:
jwscxx::base::IO_errorCould not read from in.
jwscxx::base::Arg_errorInvalid arguments in file to read from.

Definition at line 451 of file cuboid.cpp.

Cuboid_d::~Cuboid_d ( ) [virtual]

Deletes this cuboid.

Definition at line 459 of file cuboid.cpp.


Member Function Documentation

Cuboid_d & Cuboid_d::operator= ( const Cuboid_d c) [virtual]

Copies a cuboid into this one.

Parameters:
cCuboid to copy into this one.
Returns:
A reference to this cuboid.

Definition at line 469 of file cuboid.cpp.

Cuboid_d * Cuboid_d::clone ( ) const [virtual]

Clones this cuboid.

Returns:
A new copy of this cuboid.

Reimplemented from jwscxx::graphics::Parapiped_d.

Definition at line 478 of file cuboid.cpp.


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