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_f (float width, float height, float length) throw (jwscxx::base::Arg_error) | |
Constructs a cuboid at the origin. | |
Cuboid_f (float width, float height, float length, float x, float y, float z) throw (jwscxx::base::Arg_error) | |
Constructs a cuboid at a particular location. | |
Cuboid_f (float width, float height, float length, const jwsc::Vector_f *p) throw (jwscxx::base::Arg_error) | |
Constructs a cuboid at a particular location. | |
Cuboid_f (const Cuboid_f &c) | |
Constructs a cuboid by copying another. | |
Cuboid_f (const char *fname) throw (jwscxx::base::Arg_error, jwscxx::base::IO_error) | |
Reads a cuboid from an input file. | |
Cuboid_f (std::istream &in) throw (jwscxx::base::Arg_error, jwscxx::base::IO_error) | |
Reads a cuboid from an input stream. | |
virtual | ~Cuboid_f () |
Deletes this cuboid. | |
virtual Cuboid_f & | operator= (const Cuboid_f &c) |
Copies a cuboid into this one. | |
virtual Cuboid_f * | clone () const |
Clones this cuboid. |
Cuboid defined by a width, height and length at the origin or a specified postion.
Cuboid_f::Cuboid_f | ( | float | width, |
float | height, | ||
float | 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 95 of file cuboid.cpp.
Cuboid_f::Cuboid_f | ( | float | width, |
float | height, | ||
float | length, | ||
float | x, | ||
float | y, | ||
float | 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 137 of file cuboid.cpp.
Cuboid_f::Cuboid_f | ( | float | width, |
float | height, | ||
float | length, | ||
const jwsc::Vector_f * | 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 185 of file cuboid.cpp.
Cuboid_f::Cuboid_f | ( | const Cuboid_f & | c | ) |
Constructs a cuboid by copying another.
c | Cuboid to copy into this one. |
Definition at line 214 of file cuboid.cpp.
Cuboid_f::Cuboid_f | ( | 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 227 of file cuboid.cpp.
Cuboid_f::Cuboid_f | ( | 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 243 of file cuboid.cpp.
Cuboid_f::~Cuboid_f | ( | ) | [virtual] |
Deletes this cuboid.
Definition at line 251 of file cuboid.cpp.
Copies a cuboid into this one.
c | Cuboid to copy into this one. |
Definition at line 261 of file cuboid.cpp.
Cuboid_f * Cuboid_f::clone | ( | ) | const [virtual] |
Clones this cuboid.
Reimplemented from jwscxx::graphics::Parapiped_f.
Definition at line 270 of file cuboid.cpp.