pandore::Point3d Class Reference

#include <point.h>

Inheritance diagram for pandore::Point3d:

pandore::Point List of all members.

Detailed Description

A 3D point.

A point3d represents a 3D location in (x, y, z) coordinate space, specified in Long precision. A Point3d is a Pobject, and thus can be saved in and loaded from a file.
Use of Point3d:

 Point3d p1(10, 15, 20);
 Point3d * p2 = new Point3d(10, 15, 20);
 Point3d p3; p3.z = 10; p3.y = 15; p3.x = 20;
 Point3d p4 = p3 * 2;

For the use of Point3d see The Points.


Public Member Functions

Typobj Type () const
std::string Name () const
 Point3d ()
 Point3d (Long i)
 Point3d (Long z, Long y, Long x)
 Point3d (const Dimension3d &p)
 Point3d (const Point3d &p)
Point3d operator= (Point3d pt)
bool operator== (const Point3d &pt) const
bool operator!= (const Point3d &pt) const
Point3doperator+= (const Point3d &pt)
Point3doperator-= (const Point3d &pt)
Point3doperator *= (const Point3d &pt)
Point3doperator/= (const Point3d &pt)
Point3d operator+ (const Point3d &pt) const
Point3d operator- (const Point3d &pt) const
Point3d operator * (const Point3d &pt) const
Point3d operator/ (const Point3d &pt) const
Pobject * Clone () const
Errc LoadData (FILE *df)
Errc SaveData (FILE *df) const

Public Attributes

Long z
Long y
Long x


Constructor & Destructor Documentation

pandore::Point3d::Point3d  )  [inline]
 

Constructs and initializes a point at the origin (0, 0, 0) of the coordinate space.

pandore::Point3d::Point3d Long  i  )  [inline]
 

Constructs and initializes a point at the specified (i, i, i) location in the coordinate space.

Parameters:
i the value for x, y and z coordinates.

pandore::Point3d::Point3d Long  z,
Long  y,
Long  x
[inline]
 

Constructs and initializes a point at the specified (z, y, x) location in the coordinate space.

Parameters:
x the x coordinate.
y the y coordinate.
z the z coordinate.

pandore::Point3d::Point3d const Dimension3d p  )  [inline]
 

Constructs and initializes a point with a specified dimension.

Parameters:
p a dimension.

pandore::Point3d::Point3d const Point3d p  )  [inline]
 

Constructs and initializes a point with the same location as the reference point.

Parameters:
p a point.


Member Function Documentation

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

Creates and returns a distinct copy of this object.

Errc pandore::Point3d::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::Point3d::Name  )  const [inline]
 

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

Returns:
the name in a string.

Point3d pandore::Point3d::operator * const Point3d pt  )  const [inline]
 

Returns a new point from the multiplication of the coordinates of the object with the coordinates of the specified point.

Parameters:
pt the specified point.
Returns:
a new point.

Point3d& pandore::Point3d::operator *= const Point3d pt  )  [inline]
 

Multiplies the coordinates with the coordinates of the specified point.

Parameters:
pt a point.
Returns:
the objet itself.

bool pandore::Point3d::operator!= const Point3d pt  )  const [inline]
 

Checks if the coordinates are different from the specified coordinates.

Parameters:
pt a point.
Returns:
true if coordinates are different.

Point3d pandore::Point3d::operator+ const Point3d pt  )  const [inline]
 

Returns a new point from the addition of the coordinates of the object with the coordinates of the specified point.

Parameters:
pt the specified point.
Returns:
a new point.

Point3d& pandore::Point3d::operator+= const Point3d pt  )  [inline]
 

Adds the coordinates with the coordinates of the specified point.

Parameters:
pt a point.
Returns:
the objet itself.

Point3d pandore::Point3d::operator- const Point3d pt  )  const [inline]
 

Returns a new point from the subtraction of the coordinates of the object with the coordinates of the specified point.

Parameters:
pt the specified point.
Returns:
a new point.

Point3d& pandore::Point3d::operator-= const Point3d pt  )  [inline]
 

Subtracts the coordinates with the coordinates of the specified point.

Parameters:
pt a point.
Returns:
the objet itself.

Point3d pandore::Point3d::operator/ const Point3d pt  )  const [inline]
 

Returns a new point from the division of the coordinates of the object with the coordinates of the specified point.

Parameters:
pt the specified point.
Returns:
a new point.

Point3d& pandore::Point3d::operator/= const Point3d pt  )  [inline]
 

Divides the coordinates with the coordinates of the specified point.

Parameters:
pt a point.
Returns:
the objet itself.

Point3d pandore::Point3d::operator= Point3d  pt  )  [inline]
 

Sets the coordinates with the coordinates of specified point.

Parameters:
pt a point.
Returns:
the point itself.

bool pandore::Point3d::operator== const Point3d pt  )  const [inline]
 

Checks if the coordinates are equal to the coordinates of the specified point.

Parameters:
pt a point.
Returns:
true if coordinates are equal.

Errc pandore::Point3d::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::Point3d::Type  )  const [inline]
 

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

Returns:
the magic number.


Member Data Documentation

Long pandore::Point3d::x
 

The x coordinate -depth.

Long pandore::Point3d::y
 

The y coordinate -ordinate.

Long pandore::Point3d::z
 

The z coordinate -abscissa.


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