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

#include <TYVisibilityCone.h>

Collaboration diagram for VisibilityCone:
Collaboration graph
[legend]

Public Member Functions

 VisibilityCone (const OPoint3D &pA, const OPoint3D &pB, const OPoint3D &pC)
 Builds a visibility cone spanned from point A into points B and C This cone is such that [BC] segment is inside the cone. More...
 
bool segmentIsVisibleInCone (const OSegment3D &segmentToTest) const
 Test if a segment is visible in the visibility cone. More...
 

Private Member Functions

void setupNormalsOfCone ()
 Compute exterior normal of the cone. More...
 
bool pointIsInCone (const OPoint3D &pM2D) const
 Test if the point M lies inside the visibility cone. More...
 
bool segmentIntersectsBorderCone (const OPoint3D &pM2D, const OPoint3D &pN2D) const
 Test if the segment [MN] intersects the borders of the visibility cone. More...
 
 FRIEND_TEST (test_TYVisibilityCone, pointIsInCone)
 
 FRIEND_TEST (test_TYVisibilityCone, segmentIntersectsBorderCone)
 

Private Attributes

OPoint3D _pA2D
 
OPoint3D _pB2D
 
OPoint3D _pC2D
 
OVector3D _vAB
 
OVector3D _vAC
 
OVector3D _nAB
 
OVector3D _nAC
 

Detailed Description

Definition at line 27 of file TYVisibilityCone.h.

Constructor & Destructor Documentation

◆ VisibilityCone()

VisibilityCone::VisibilityCone ( const OPoint3D pA,
const OPoint3D pB,
const OPoint3D pC 
)

Builds a visibility cone spanned from point A into points B and C This cone is such that [BC] segment is inside the cone.

Parameters
pAA point (third coordinate is ignored)
pBB point (third coordinate is ignored)
pCC point (third coordinate is ignored)

Definition at line 18 of file TYVisibilityCone.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ FRIEND_TEST() [1/2]

VisibilityCone::FRIEND_TEST ( test_TYVisibilityCone  ,
pointIsInCone   
)
private

◆ FRIEND_TEST() [2/2]

VisibilityCone::FRIEND_TEST ( test_TYVisibilityCone  ,
segmentIntersectsBorderCone   
)
private

◆ pointIsInCone()

bool VisibilityCone::pointIsInCone ( const OPoint3D pM2D) const
private

Test if the point M lies inside the visibility cone.

Parameters
pMM point (third coordinate is assumed to be 0)
Returns
true if M is inside the cone, false otherwise

Definition at line 41 of file TYVisibilityCone.cpp.

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

◆ segmentIntersectsBorderCone()

bool VisibilityCone::segmentIntersectsBorderCone ( const OPoint3D pM2D,
const OPoint3D pN2D 
) const
private

Test if the segment [MN] intersects the borders of the visibility cone.

Parameters
pMM point (third coordinate is assumed to be 0)
pNN point (third coordinate is assumed to be 0)
Returns
true if [MN] intersects one of the borders of the cone, false otherwise

Definition at line 49 of file TYVisibilityCone.cpp.

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

◆ segmentIsVisibleInCone()

bool VisibilityCone::segmentIsVisibleInCone ( const OSegment3D segmentToTest) const

Test if a segment is visible in the visibility cone.

Parameters
segmentToTestsegment to test (third coordinates of points are ignored)
Returns
true if segmentToTest intersects the visibility cone

Definition at line 28 of file TYVisibilityCone.cpp.

Here is the call graph for this function:

◆ setupNormalsOfCone()

void VisibilityCone::setupNormalsOfCone ( )
private

Compute exterior normal of the cone.

Definition at line 56 of file TYVisibilityCone.cpp.

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

Member Data Documentation

◆ _nAB

OVector3D VisibilityCone::_nAB
private

Definition at line 77 of file TYVisibilityCone.h.

◆ _nAC

OVector3D VisibilityCone::_nAC
private

Definition at line 78 of file TYVisibilityCone.h.

◆ _pA2D

OPoint3D VisibilityCone::_pA2D
private

Definition at line 72 of file TYVisibilityCone.h.

◆ _pB2D

OPoint3D VisibilityCone::_pB2D
private

Definition at line 73 of file TYVisibilityCone.h.

◆ _pC2D

OPoint3D VisibilityCone::_pC2D
private

Definition at line 74 of file TYVisibilityCone.h.

◆ _vAB

OVector3D VisibilityCone::_vAB
private

Definition at line 75 of file TYVisibilityCone.h.

◆ _vAC

OVector3D VisibilityCone::_vAC
private

Definition at line 76 of file TYVisibilityCone.h.


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