ESyS-Particle  2.3.4
RectPatch Class Reference

#include <RectPatch.h>

Public Member Functions

 RectPatch (double, double, double, double, double, double)
 
double sep (const Vec3 &)
 
double dist (const Vec3 &)
 
bool intersect (const Vec3 &, const Vec3 &)
 
Plane3D getPlane (const Vec3 &)
 
Vec3 getBasePoint () const
 

Private Attributes

double m_xmin
 
double m_xmax
 
double m_zmin
 
double m_zmax
 
double m_y0
 
double m_dy
 

Constructor & Destructor Documentation

◆ RectPatch()

RectPatch::RectPatch ( double  xmin,
double  xmax,
double  zmin,
double  zmax,
double  y0,
double  dy 
)

construct a axis aligned rectangular patch in the x-z plane

Parameters
xminmin. x-pos
xmaxmax. x-pos
zminmin. z-pos
zmaxmax. z-pos
z0z-pos
dz"roughness" parameter

References m_dy, m_xmax, m_xmin, m_y0, m_zmax, and m_zmin.

Member Function Documentation

◆ dist()

double RectPatch::dist ( const Vec3 P)

Get distance from given point to closest point of patch.

Parameters
Pthe point

References sep().

Here is the call graph for this function:

◆ getBasePoint()

Vec3 RectPatch::getBasePoint ( ) const
inline

References m_xmin, m_y0, and m_zmin.

◆ getPlane()

Plane3D RectPatch::getPlane ( const Vec3 P)

get the plane further away from the given point

References m_dy, m_xmin, m_y0, m_zmin, and Vec3::Y().

Referenced by CRoughPaddedBlock3D::getClosestPlane().

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

◆ intersect()

bool RectPatch::intersect ( const Vec3 P1,
const Vec3 P2 
)

check if line between 2 points intersects patch

Parameters
P11st point
P22nd point

References m_xmax, m_xmin, m_y0, m_zmax, m_zmin, Vec3::X(), Vec3::Y(), and Vec3::Z().

Here is the call graph for this function:

◆ sep()

double RectPatch::sep ( const Vec3 P)

Get (perpendicular) distance from given point. If projection of point onto plane is outside patch return -1

Parameters
Pthe point

References m_dy, m_xmax, m_xmin, m_y0, m_zmax, m_zmin, Vec3::X(), Vec3::Y(), and Vec3::Z().

Referenced by dist(), and CRoughPaddedBlock3D::getClosestPlane().

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

Member Data Documentation

◆ m_dy

double RectPatch::m_dy
private

Referenced by getPlane(), RectPatch(), and sep().

◆ m_xmax

double RectPatch::m_xmax
private

Referenced by intersect(), RectPatch(), and sep().

◆ m_xmin

double RectPatch::m_xmin
private

◆ m_y0

double RectPatch::m_y0
private

◆ m_zmax

double RectPatch::m_zmax
private

Referenced by intersect(), RectPatch(), and sep().

◆ m_zmin

double RectPatch::m_zmin
private

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