Code_TYMPAN  4.2.0
Industrial site acoustic simulation
Public Member Functions | Static Public Member Functions | List of all members
OPoint3D Class Reference

The 3D point class. More...

#include <3d.h>

Inheritance diagram for OPoint3D:
Inheritance graph
[legend]
Collaboration diagram for OPoint3D:
Collaboration graph
[legend]

Public Member Functions

 OPoint3D ()
 Default constructor. More...
 
 OPoint3D (const OPoint3D &pt)
 Copy constructor. More...
 
 OPoint3D (const OCoord3D &coord)
 Constructor from a 3D coord. More...
 
 OPoint3D (double x, double y, double z)
 Constructs a new object from 3 doubles. More...
 
 OPoint3D (double v[])
 Constructs a new object from 3 doubles. More...
 
virtual ~OPoint3D ()
 Destructor. More...
 
virtual void set (double x, double y, double z)
 
virtual void setFromOGL (double x, double y, double z)
 
virtual void setFromOGL (float x, float y, float z)
 
virtual void setFromOGL (float coords[3])
 
virtual void setFromOGL (double coords[3])
 
virtual void getToOGL (double &x, double &y, double &z)
 
virtual void getToOGL (double coords[3])
 
double distFrom (const OPoint3D &pt) const
 Computes the distance from this point to another. More...
 
double dist2DFrom (const OPoint3D &pt) const
 Computes the distance from this point to another in 2D plan. More...
 
bool isEqual (const OPoint3D &oPoint) const
 Compatibility alias for operator==. More...
 
 OPoint3D ()
 Default constructor. More...
 
 OPoint3D (const OPoint3D &pt)
 Copy constructor. More...
 
 OPoint3D (const OCoord3D &coord)
 Constructor from a 3D coord. More...
 
 OPoint3D (double x, double y, double z)
 
 OPoint3D (double v[])
 
virtual ~OPoint3D ()
 Destructor. More...
 
virtual void set (double x, double y, double z)
 
virtual void setFromOGL (double x, double y, double z)
 
virtual void setFromOGL (float x, float y, float z)
 
virtual void setFromOGL (float coords[3])
 
virtual void setFromOGL (double coords[3])
 
virtual void getToOGL (double &x, double &y, double &z)
 
virtual void getToOGL (double coords[3])
 
double distFrom (const OPoint3D &pt) const
 
double dist2DFrom (const OPoint3D &pt) const
 
bool isEqual (const OPoint3D &oPoint) const
 Compatibility alias for operator==. More...
 
- Public Member Functions inherited from OCoord3D
 OCoord3D ()
 Default constructor. More...
 
 OCoord3D (const OCoord3D &coord)
 Copy constructor. More...
 
 OCoord3D (double x, double y, double z)
 Constructor with 3D point coordinates. More...
 
virtual ~OCoord3D ()
 Destructor. More...
 
OCoord3Doperator= (const OCoord3D &coord)
 operator= More...
 
bool operator== (const OCoord3D &coord) const
 operator== More...
 
bool operator!= (const OCoord3D &coord) const
 operator!= More...
 
void setCoords (double x, double y, double z)
 Sets the coordinates as an array of double. More...
 
void setCoords (double coords[3])
 Sets the coordinates as an array of double. More...
 
void getCoords (double coords[3])
 Gets the coordinates as an array of double. More...
 
double * getCoords ()
 Gets the coordinates as an array of double. More...
 
 operator const double * () const
 
 operator double * ()
 
 OCoord3D ()
 Default constructor. More...
 
 OCoord3D (const OCoord3D &coord)
 Copy constructor. More...
 
 OCoord3D (double x, double y, double z)
 Constructor with 3D point coordinates. More...
 
virtual ~OCoord3D ()
 Destructor. More...
 
OCoord3Doperator= (const OCoord3D &coord)
 operator= More...
 
bool operator== (const OCoord3D &coord) const
 operator== More...
 
bool operator!= (const OCoord3D &coord) const
 operator!= More...
 
void setCoords (double x, double y, double z)
 
void setCoords (double coords[3])
 
void getCoords (double coords[3])
 
double * getCoords ()
 
 operator const double * () const
 
 operator double * ()
 

Static Public Member Functions

static TabPoint3D checkPointsMaxDistance (const TabPoint3D &points, const double &distanceMax)
 
static TabPoint3D checkPointsMaxDistance (const OPoint3D &point1, const OPoint3D &point2, const double &distanceMax)
 Same as previous function taking two points instead of a tab of points. More...
 
static TabPoint3D checkPointsMaxDistance (const TabPoint3D &points, const double &distanceMax)
 
static TabPoint3D checkPointsMaxDistance (const OPoint3D &point1, const OPoint3D &point2, const double &distanceMax)
 Same as previous function taking two points instead of a tab of points. More...
 

Additional Inherited Members

- Public Attributes inherited from OCoord3D
union {
   struct {
      double   _x
 x coordinate of OCoord3D More...
 
      double   _y
 y coordinate of OCoord3D More...
 
      double   _z
 z coordinate of OCoord3D More...
 
   } 
 
   double   _value [3]
 
}; 
 
union {
   struct {
      double   _x
 x coordinate of OCoord3D More...
 
      double   _y
 y coordinate of OCoord3D More...
 
      double   _z
 z coordinate of OCoord3D More...
 
   } 
 
   double   _value [3]
 
}; 
 

Detailed Description

The 3D point class.

Definition at line 484 of file 3d.h.

Constructor & Destructor Documentation

◆ OPoint3D() [1/10]

OPoint3D::OPoint3D ( )

Default constructor.

Definition at line 349 of file 3d.cpp.

Here is the caller graph for this function:

◆ OPoint3D() [2/10]

OPoint3D::OPoint3D ( const OPoint3D pt)

Copy constructor.

Parameters
ptThe object to be copied.

Definition at line 354 of file 3d.cpp.

◆ OPoint3D() [3/10]

OPoint3D::OPoint3D ( const OCoord3D coord)

Constructor from a 3D coord.

Parameters
coordThe object to be copied.

Definition at line 359 of file 3d.cpp.

◆ OPoint3D() [4/10]

OPoint3D::OPoint3D ( double  x,
double  y,
double  z 
)

Constructs a new object from 3 doubles.

Parameters
xX coordinate.
yY coordinate.
zZ coordinate.

Definition at line 364 of file 3d.cpp.

◆ OPoint3D() [5/10]

OPoint3D::OPoint3D ( double  v[])

Constructs a new object from 3 doubles.

Parameters
vtable of coordinates.

Definition at line 369 of file 3d.cpp.

◆ ~OPoint3D() [1/2]

OPoint3D::~OPoint3D ( )
virtual

Destructor.

Definition at line 374 of file 3d.cpp.

Here is the caller graph for this function:

◆ OPoint3D() [6/10]

OPoint3D::OPoint3D ( )

Default constructor.

◆ OPoint3D() [7/10]

OPoint3D::OPoint3D ( const OPoint3D pt)

Copy constructor.

Parameters
ptThe object to be copied.

◆ OPoint3D() [8/10]

OPoint3D::OPoint3D ( const OCoord3D coord)

Constructor from a 3D coord.

Parameters
coordThe object to be copied.

◆ OPoint3D() [9/10]

OPoint3D::OPoint3D ( double  x,
double  y,
double  z 
)

◆ OPoint3D() [10/10]

OPoint3D::OPoint3D ( double  v[])

◆ ~OPoint3D() [2/2]

virtual OPoint3D::~OPoint3D ( )
virtual

Destructor.

Member Function Documentation

◆ checkPointsMaxDistance() [1/4]

static TabPoint3D OPoint3D::checkPointsMaxDistance ( const TabPoint3D points,
const double &  distanceMax 
)
static

Utility method assuring that two consecutive points are spaced within a maximal length adding add new points if necessary

Parameters
pointsThe array of points to check.
distanceMaxMaximal distance between two points.
Returns
A new array containing points spaced less than distanceMax

◆ checkPointsMaxDistance() [2/4]

TabPoint3D OPoint3D::checkPointsMaxDistance ( const TabPoint3D points,
const double &  distanceMax 
)
static

Utility method assuring that two consecutive points are spaced within a maximal length adding add new points if necessary

Parameters
pointsThe array of points to check.
distanceMaxMaximal distance between two points.
Returns
A new array containing points spaced less than distanceMax

Definition at line 424 of file 3d.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ checkPointsMaxDistance() [3/4]

static TabPoint3D OPoint3D::checkPointsMaxDistance ( const OPoint3D point1,
const OPoint3D point2,
const double &  distanceMax 
)
static

Same as previous function taking two points instead of a tab of points.

◆ checkPointsMaxDistance() [4/4]

TabPoint3D OPoint3D::checkPointsMaxDistance ( const OPoint3D point1,
const OPoint3D point2,
const double &  distanceMax 
)
static

Same as previous function taking two points instead of a tab of points.

Definition at line 458 of file 3d.cpp.

Here is the call graph for this function:

◆ dist2DFrom() [1/2]

double OPoint3D::dist2DFrom ( const OPoint3D pt) const

◆ dist2DFrom() [2/2]

double OPoint3D::dist2DFrom ( const OPoint3D pt) const

Computes the distance from this point to another in 2D plan.

Definition at line 414 of file 3d.cpp.

Here is the caller graph for this function:

◆ distFrom() [1/2]

double OPoint3D::distFrom ( const OPoint3D pt) const

◆ distFrom() [2/2]

double OPoint3D::distFrom ( const OPoint3D pt) const

Computes the distance from this point to another.

Parameters
ptThe point to measure the distance from.

Definition at line 409 of file 3d.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getToOGL() [1/4]

virtual void OPoint3D::getToOGL ( double &  x,
double &  y,
double &  z 
)
virtual

Compatibility with OGL. Change from Tympan frame to OGL.

Parameters
xX coordinate.
yY coordinate.
zZ coordinate.

◆ getToOGL() [2/4]

void OPoint3D::getToOGL ( double &  x,
double &  y,
double &  z 
)
virtual

Compatibility with OGL. Change from Tympan frame to OGL.

Parameters
xX coordinate.
yY coordinate.
zZ coordinate.

Definition at line 397 of file 3d.cpp.

Here is the caller graph for this function:

◆ getToOGL() [3/4]

virtual void OPoint3D::getToOGL ( double  coords[3])
virtual

Compatibility with OGL. Change from Tympan frame to OGL.

Parameters
coords3D coordinates (double)

◆ getToOGL() [4/4]

void OPoint3D::getToOGL ( double  coords[3])
virtual

Compatibility with OGL. Change from Tympan frame to OGL.

Parameters
coords3D coordinates (double)

Definition at line 404 of file 3d.cpp.

Here is the call graph for this function:

◆ isEqual() [1/2]

bool OPoint3D::isEqual ( const OPoint3D oPoint) const
inline

Compatibility alias for operator==.

Definition at line 591 of file 3d.h.

Here is the call graph for this function:

◆ isEqual() [2/2]

bool OPoint3D::isEqual ( const OPoint3D oPoint) const
inline

Compatibility alias for operator==.

Definition at line 593 of file 3d.h.

Here is the call graph for this function:

◆ set() [1/2]

virtual void OPoint3D::set ( double  x,
double  y,
double  z 
)
virtual

Set coordinates to the object.

Parameters
xX coordinate.
yY coordinate.
zZ coordinate.

◆ set() [2/2]

void OPoint3D::set ( double  x,
double  y,
double  z 
)
virtual

Set coordinates to the object.

Parameters
xX coordinate.
yY coordinate.
zZ coordinate.

Definition at line 419 of file 3d.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setFromOGL() [1/8]

virtual void OPoint3D::setFromOGL ( double  x,
double  y,
double  z 
)
virtual

Compatibility with OGL. Change OGL frame to Tympan.

Parameters
xX coordinate.
yY coordinate.
zZ coordinate.

◆ setFromOGL() [2/8]

virtual void OPoint3D::setFromOGL ( float  x,
float  y,
float  z 
)
virtual

◆ setFromOGL() [3/8]

void OPoint3D::setFromOGL ( double  x,
double  y,
double  z 
)
virtual

Compatibility with OGL. Change OGL frame to Tympan.

Parameters
xX coordinate.
yY coordinate.
zZ coordinate.

Definition at line 378 of file 3d.cpp.

Here is the caller graph for this function:

◆ setFromOGL() [4/8]

void OPoint3D::setFromOGL ( float  x,
float  y,
float  z 
)
virtual

Definition at line 385 of file 3d.cpp.

◆ setFromOGL() [5/8]

virtual void OPoint3D::setFromOGL ( float  coords[3])
virtual

Compatibility with OGL. Change OGL frame to Tympan.

Parameters
coords3D coordinates (float)

◆ setFromOGL() [6/8]

void OPoint3D::setFromOGL ( float  coords[3])
virtual

Compatibility with OGL. Change OGL frame to Tympan.

Parameters
coords3D coordinates (float)

Definition at line 392 of file 3d.cpp.

Here is the call graph for this function:

◆ setFromOGL() [7/8]

virtual void OPoint3D::setFromOGL ( double  coords[3])
inlinevirtual

Compatibility with OGL. Change OGL frame to Tympan.

Parameters
coords3D coordinates (double)

Definition at line 557 of file 3d.h.

◆ setFromOGL() [8/8]

virtual void OPoint3D::setFromOGL ( double  coords[3])
inlinevirtual

Compatibility with OGL. Change OGL frame to Tympan.

Parameters
coords3D coordinates (double)

Definition at line 559 of file 3d.h.


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