JWS C++ Library
C++ language utility library
|
Cuboid defined by a width, height and length at the origin or a specified postion. More...
#include <cuboid.h>
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_d & | operator= (const Cuboid_d &c) |
Copies a cuboid into this one. | |
virtual Cuboid_d * | clone () const |
Clones this cuboid. |
Cuboid defined by a width, height and length at the origin or a specified postion.
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
width | Width along x. |
height | Height along y. |
length | Lengthh along z. |
jwscxx::base::Arg_error | Dimensions must be > 0. |
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
width | Width along x. |
height | Height along y. |
length | Lengthh along z. |
x | X-coord to position the corner of the cuboid at. |
y | Y-coord to position the corner of the cuboid at. |
z | Z-coord to position the corner of the cuboid at. |
jwscxx::base::Arg_error | Dimensions must be > 0. |
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
width | Width along x. |
height | Height along y. |
length | Lengthh along z. |
p | Position of the primary corner of the cuboid. |
jwscxx::base::Arg_error | Dimensions must be > 0. Vector postition must be in R^3. |
Definition at line 393 of file cuboid.cpp.
Cuboid_d::Cuboid_d | ( | const Cuboid_d & | c | ) |
Constructs a cuboid by copying another.
c | Cuboid 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.
fname | Input file to read this cuboid from. |
jwscxx::base::IO_error | Could not read from in. |
jwscxx::base::Arg_error | Invalid 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.
in | Input stream to read this cuboid from. |
jwscxx::base::IO_error | Could not read from in. |
jwscxx::base::Arg_error | Invalid 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.
Copies a cuboid into this one.
c | Cuboid to copy into this one. |
Definition at line 469 of file cuboid.cpp.
Cuboid_d * Cuboid_d::clone | ( | ) | const [virtual] |
Clones this cuboid.
Reimplemented from jwscxx::graphics::Parapiped_d.
Definition at line 478 of file cuboid.cpp.