Code_TYMPAN  4.4.0
Industrial site acoustic simulation
Public Member Functions | Public Attributes | Private Member Functions | List of all members
OBox2 Class Reference

Class to define a box (not necessary parallel to the axis as OBox) More...

#include <3d.h>

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

Public Member Functions

 OBox2 ()
 Default constructor. More...
 
 OBox2 (const OBox2 &box)
 Copy constructor. More...
 
 OBox2 (const OBox &box)
 Constructor from a box and its local coordinate system. More...
 
 OBox2 (const double &length, const double &width, const double &height)
 build a box centered on [0, 0, 0] from its length, width and height More...
 
virtual ~OBox2 ()
 Destructor. More...
 
virtual OBox2operator= (const OBox2 &box)
 
virtual bool operator== (const OBox2 &box) const
 
virtual bool operator!= (const OBox2 &box) const
 
OPoint3D BoxCoord (int N) const
 Returns the coordinates of one of the box corner. \ We consider that the first corner is the one on the bottom left side \ and then we go clockwise, upper and the same. \ N must be between 0 and 8, where 0 represents the box center. \ 1(0,0,0) 2(0,1,0) 3(1,1,0) 4(1,0,0) 5(1,0,1) 6(0,0,1) 7(0,1,1) 8(1,1,1) More...
 
virtual bool isInside (const OPoint3D &pt) const
 Test whether the point is inside the box or not. More...
 
virtual bool isInside2D (const OPoint3D &pt) const
 Test whether the point is inside the box or not (from upper point of view). More...
 
virtual void Translate (const OVector3D &vect)
 Translate this box. More...
 
OBox2 boxRotation (const OPoint3D &O, const OPoint3D &P2)
 
void BoxRotationOzOy (double alpha, double theta)
 Computes the box rotation around Oz and Oy (usual coordinates system). More...
 
void moveAndRotate (const OPoint3D &origin, const OVector3D &vec)
 Move and rotate the box. More...
 
- Public Member Functions inherited from OBox
 OBox ()
 Default constructor. More...
 
 OBox (const OBox &box)
 Copy constructor. More...
 
 OBox (const OCoord3D &min, const OCoord3D &max)
 
 OBox (double x1, double y1, double z1, double x2, double y2, double z2)
 
virtual ~OBox ()
 Destructor. More...
 
virtual OBoxoperator= (const OBox &box)
 
virtual bool operator== (const OBox &box) const
 
virtual bool operator!= (const OBox &box) const
 
virtual bool isInContact (const OBox &box) const
 Test whether the boxes are in contact or not. More...
 
virtual void Enlarge (const OPoint3D &pt)
 Enlarge the box with the point if the point is outside the box. More...
 
virtual void Enlarge (float x, float y, float z)
 Enlarge the box with the point (x,y, z) if the point is outside the box. More...
 
virtual void Enlarge (const OBox &box)
 Enlarge this box with the box passed if this box does not contain the box passed. More...
 
virtual void Translate (const OPoint3D &vectorTranslate)
 Translate this box. More...
 

Public Attributes

ORepere3D _repere
 
OPoint3D _center
 
OPoint3D _A
 
OPoint3D _B
 
OPoint3D _C
 
OPoint3D _D
 
OPoint3D _E
 
OPoint3D _F
 
OPoint3D _G
 
OPoint3D _H
 
double _length
 
double _height
 
double _width
 
- Public Attributes inherited from OBox
OPoint3D _min
 Minimal coordinates of the OBox. More...
 
OPoint3D _max
 Maximal coordinates of the OBox. More...
 

Private Member Functions

 OBox2 (const OBox2 &box, const ORepere3D &repere, const OPoint3D &centre)
 Constructor from a box and its local coordinate system. More...
 
OBox2 rotInXOYOnly (const OVector3D &v1, const OVector3D &v2, const OPoint3D &O, const OPoint3D &P2)
 
OBox2 rotInXOZOnly (const OVector3D &v1, const OVector3D &v2, const OPoint3D &O, const OPoint3D &P2)
 
OBox2 rot3D (const OVector3D &v1, const OVector3D &v2, const OPoint3D &O, const OPoint3D &P2)
 

Detailed Description

Class to define a box (not necessary parallel to the axis as OBox)

Definition at line 1379 of file 3d.h.

Constructor & Destructor Documentation

◆ OBox2() [1/5]

OBox2::OBox2 ( )

Default constructor.

Definition at line 1700 of file 3d.cpp.

Here is the caller graph for this function:

◆ OBox2() [2/5]

OBox2::OBox2 ( const OBox2 box)

Copy constructor.

Definition at line 1707 of file 3d.cpp.

◆ OBox2() [3/5]

OBox2::OBox2 ( const OBox box)

Constructor from a box and its local coordinate system.

Parameters
boxThe box define in the local coordinate system

Definition at line 1712 of file 3d.cpp.

◆ OBox2() [4/5]

OBox2::OBox2 ( const double &  length,
const double &  width,
const double &  height 
)

build a box centered on [0, 0, 0] from its length, width and height

Definition at line 1753 of file 3d.cpp.

◆ OBox2() [5/5]

OBox2::OBox2 ( const OBox2 box,
const ORepere3D repere,
const OPoint3D centre 
)
private

Constructor from a box and its local coordinate system.

Parameters
boxThe box define in the local coordinate system
repereThe global coordinate system of the box
centreIs the box center, this point is the middle of [S'R]

Definition at line 1734 of file 3d.cpp.

◆ ~OBox2()

virtual OBox2::~OBox2 ( )
inlinevirtual

Destructor.

Definition at line 1412 of file 3d.h.

Member Function Documentation

◆ BoxCoord()

OPoint3D OBox2::BoxCoord ( int  N) const

Returns the coordinates of one of the box corner. \ We consider that the first corner is the one on the bottom left side \ and then we go clockwise, upper and the same. \ N must be between 0 and 8, where 0 represents the box center. \ 1(0,0,0) 2(0,1,0) 3(1,1,0) 4(1,0,0) 5(1,0,1) 6(0,0,1) 7(0,1,1) 8(1,1,1)

Parameters
Nis the corner we want the coordinates of.

Definition at line 1859 of file 3d.cpp.

Here is the caller graph for this function:

◆ boxRotation()

OBox2 OBox2::boxRotation ( const OPoint3D O,
const OPoint3D P2 
)

brief return a box rotated by two vectors

Definition at line 1927 of file 3d.cpp.

Here is the call graph for this function:

◆ BoxRotationOzOy()

void OBox2::BoxRotationOzOy ( double  alpha,
double  theta 
)

Computes the box rotation around Oz and Oy (usual coordinates system).

Parameters
alphaAngle around Oz
thetaAngle around Oy

Definition at line 1976 of file 3d.cpp.

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

◆ isInside()

bool OBox2::isInside ( const OPoint3D pt) const
virtual

Test whether the point is inside the box or not.

Parameters
ptThe point to test.

Reimplemented from OBox.

Definition at line 1887 of file 3d.cpp.

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

◆ isInside2D()

bool OBox2::isInside2D ( const OPoint3D pt) const
virtual

Test whether the point is inside the box or not (from upper point of view).

Parameters
ptThe point to test.

Reimplemented from OBox.

Definition at line 1900 of file 3d.cpp.

Here is the call graph for this function:

◆ moveAndRotate()

void OBox2::moveAndRotate ( const OPoint3D origin,
const OVector3D vec 
)

Move and rotate the box.

Definition at line 2090 of file 3d.cpp.

Here is the call graph for this function:

◆ operator!=()

virtual bool OBox2::operator!= ( const OBox2 box) const
inlinevirtual

Definition at line 1416 of file 3d.h.

Here is the call graph for this function:

◆ operator=()

OBox2 & OBox2::operator= ( const OBox2 box)
virtual

Definition at line 1769 of file 3d.cpp.

Here is the call graph for this function:

◆ operator==()

bool OBox2::operator== ( const OBox2 box) const
virtual

Definition at line 1791 of file 3d.cpp.

Here is the caller graph for this function:

◆ rot3D()

OBox2 OBox2::rot3D ( const OVector3D v1,
const OVector3D v2,
const OPoint3D O,
const OPoint3D P2 
)
private

fn OBox2 rot3D(const OVector3D& v1, const OVector3D& v2) brief return a box rotated by two vectors

Definition at line 2050 of file 3d.cpp.

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

◆ rotInXOYOnly()

OBox2 OBox2::rotInXOYOnly ( const OVector3D v1,
const OVector3D v2,
const OPoint3D O,
const OPoint3D P2 
)
private

fn OBox2 rotInXOYOnly(const OVector3D& v1, const OVector3D& v2) brief return a box rotated by two vectors

Definition at line 2009 of file 3d.cpp.

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

◆ rotInXOZOnly()

OBox2 OBox2::rotInXOZOnly ( const OVector3D v1,
const OVector3D v2,
const OPoint3D O,
const OPoint3D P2 
)
private

fn OBox2 rotInXOZOnly(const OVector3D& v1, const OVector3D& v2) brief return a box rotated by two vectors

Definition at line 2028 of file 3d.cpp.

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

◆ Translate()

void OBox2::Translate ( const OVector3D vect)
virtual

Translate this box.

Parameters
vecttranslation.

Definition at line 1914 of file 3d.cpp.

Member Data Documentation

◆ _A

OPoint3D OBox2::_A

Definition at line 1485 of file 3d.h.

◆ _B

OPoint3D OBox2::_B

Definition at line 1486 of file 3d.h.

◆ _C

OPoint3D OBox2::_C

Definition at line 1487 of file 3d.h.

◆ _center

OPoint3D OBox2::_center

Definition at line 1484 of file 3d.h.

◆ _D

OPoint3D OBox2::_D

Definition at line 1488 of file 3d.h.

◆ _E

OPoint3D OBox2::_E

Definition at line 1489 of file 3d.h.

◆ _F

OPoint3D OBox2::_F

Definition at line 1490 of file 3d.h.

◆ _G

OPoint3D OBox2::_G

Definition at line 1491 of file 3d.h.

◆ _H

OPoint3D OBox2::_H

Definition at line 1492 of file 3d.h.

◆ _height

double OBox2::_height

Definition at line 1494 of file 3d.h.

◆ _length

double OBox2::_length

Definition at line 1493 of file 3d.h.

◆ _repere

ORepere3D OBox2::_repere

Definition at line 1483 of file 3d.h.

◆ _width

double OBox2::_width

Definition at line 1495 of file 3d.h.


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