pandore::Dimension3d Class Reference

#include <dimension.h>

Inheritance diagram for pandore::Dimension3d:

pandore::Dimension List of all members.

Detailed Description

A 3D dimension.

The Dimension3d class encapsulates the width, the height and the depth of a component (in Long precision) in a single object.
Use of Dimension3d:

 Dimension3d d1(30, 20, 10);
 Dimension3d * d2 = new Dimension3d(30, 20, 10);
 Dimension3d d3; d3.d = 30; d3.h = 20; d3.w = 10;
 Dimension3d d4 = d3 * 2;
 if (d3==d4) { ... }

For the use of Dimension3d see The Dimensions.


Public Member Functions

Typobj Type () const
std::string Name () const
 Dimension3d ()
 Dimension3d (Long depth, Long height, Long width)
 Dimension3d (const Dimension3d &d)
Dimension3d operator= (const Dimension3d &x)
bool operator== (const Dimension3d &x) const
bool operator!= (const Dimension3d &x) const
Dimension3d operator+ (int x) const
Dimension3d operator- (int x) const
Dimension3d operator * (int x) const
Dimension3d operator/ (int x) const
Pobject * Clone () const
Errc LoadData (FILE *df)
Errc SaveData (FILE *df) const

Public Attributes

Long d
Long h
Long w


Constructor & Destructor Documentation

pandore::Dimension3d::Dimension3d  )  [inline]
 

Creates a 3D dimension with a width of zero, a height of zero and a depth of zero.

pandore::Dimension3d::Dimension3d Long  depth,
Long  height,
Long  width
[inline]
 

Creates a 3D dimension with the specified width, height and depth values.

Parameters:
depth the specified depth.
height the specified height.
width the specified width.

pandore::Dimension3d::Dimension3d const Dimension3d d  )  [inline]
 

Creates a 3D dimension with the specified dimension.

Parameters:
d the specified dimension for the width, height and depth values.


Member Function Documentation

Pobject* pandore::Dimension3d::Clone  )  const [inline]
 

Creates and returns a distinct copy of this object.

Errc pandore::Dimension3d::LoadData FILE *  df  )  [inline]
 

Loads data from the given file.

Parameters:
df the file where to read data.
Returns:
SUCCESS or FAILURE in case of IO errors.

std::string pandore::Dimension3d::Name  )  const [inline]
 

Returns the type name (for instance "Dimension3d").

Returns:
the name in a string.

Dimension3d pandore::Dimension3d::operator * int  x  )  const [inline]
 

Creates a new 3D dimension from the multiplication of the each dimension values by the specified value.

Parameters:
x the specified value.
Returns:
a new dimension.

bool pandore::Dimension3d::operator!= const Dimension3d x  )  const [inline]
 

Checks if the dimension is different from a reference dimension.

Parameters:
x the reference dimension.
Returns:
true if dimensions are different.

Dimension3d pandore::Dimension3d::operator+ int  x  )  const [inline]
 

Creates a new 3D dimension from the addition of the each dimension values by the specified value.

Parameters:
x the specified value.
Returns:
a new dimension.

Dimension3d pandore::Dimension3d::operator- int  x  )  const [inline]
 

Creates a new 3D dimension from the subtraction of the each dimension values by the specified value.

Parameters:
x the specified value.
Returns:
a new dimension.

Dimension3d pandore::Dimension3d::operator/ int  x  )  const [inline]
 

Creates a new 3D dimension from the division of the each dimension values by the specified value.

Parameters:
x the specified value.
Returns:
a new dimension.

Dimension3d pandore::Dimension3d::operator= const Dimension3d x  )  [inline]
 

Sets the new dimension values with the specified dimension values.

Parameters:
x the specified dimension.
Returns:
the specified dimension.

bool pandore::Dimension3d::operator== const Dimension3d x  )  const [inline]
 

Checks if the dimension is equal to a reference dimension.

Parameters:
x the reference dimension.
Returns:
true if dimensions are equal.

Errc pandore::Dimension3d::SaveData FILE *  df  )  const [inline]
 

Saves data in the given file.

Parameters:
df the file where to save data.
Returns:
SUCCESS or FAILURE in case of IO errors.

Typobj pandore::Dimension3d::Type  )  const [inline]
 

Returns the magic number of the object (for instance Po_Dimension3d).

Returns:
the magic number.


Member Data Documentation

Long pandore::Dimension3d::d
 

The depth dimension; negative values can be used.

Long pandore::Dimension3d::h
 

The height dimension; negative values can be used.

Long pandore::Dimension3d::w
 

The width dimension; negative values can be used.


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

The Pantheon project
Image Team GREYC Laboratory
UMR CNRS 6072 - ENSICAEN - University of Caen, France
This page was last modified on 19 June 2015