SWMMVis  6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
mesh::CrossField Class Reference

#include <meshcrossfield.h>

Collaboration diagram for mesh::CrossField:

Classes

struct  Options
 

Public Member Functions

 CrossField ()=default
 
bool build (const QRectF &bbox, const QVector< QVector< QPointF > > &alignedPolylines, const Options &opts)
 Solve the field over bbox with Dirichlet data along alignedPolylines (>= 2 points each; a closed ring passes its closing edge explicitly or via last==first). Returns false when pitch <= 0, bbox is empty, no polyline pins any cell, or the grid would exceed 4e6 cells.
 
void setConstant (double thetaDeg)
 Constant field: every query returns thetaDeg (folded). valid() → true.
 
bool valid () const noexcept
 
int cols () const noexcept
 
int rows () const noexcept
 
int sweepsUsed () const noexcept
 
double thetaAt (double x, double y) const
 Field angle in radians, folded to [0, π/2). Clamps outside the grid.
 
void directionsAt (double x, double y, QPointF d[4]) const
 The four unit directions θ, θ+90°, θ+180°, θ+270° at (x, y).
 
QPointF cellU (int col, int row) const
 Raw representation vector (cos 4θ, sin 4θ) at a cell (tests).
 
bool cellPinned (int col, int row) const
 

Constructor & Destructor Documentation

◆ CrossField()

mesh::CrossField::CrossField ( )
default

Member Function Documentation

◆ build()

bool mesh::CrossField::build ( const QRectF &  bbox,
const QVector< QVector< QPointF > > &  alignedPolylines,
const Options opts 
)

Solve the field over bbox with Dirichlet data along alignedPolylines (>= 2 points each; a closed ring passes its closing edge explicitly or via last==first). Returns false when pitch <= 0, bbox is empty, no polyline pins any cell, or the grid would exceed 4e6 cells.

Here is the caller graph for this function:

◆ cellPinned()

bool mesh::CrossField::cellPinned ( int  col,
int  row 
) const

◆ cellU()

QPointF mesh::CrossField::cellU ( int  col,
int  row 
) const

Raw representation vector (cos 4θ, sin 4θ) at a cell (tests).

◆ cols()

int mesh::CrossField::cols ( ) const
inlinenoexcept

◆ directionsAt()

void mesh::CrossField::directionsAt ( double  x,
double  y,
QPointF  d[4] 
) const

The four unit directions θ, θ+90°, θ+180°, θ+270° at (x, y).

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

◆ rows()

int mesh::CrossField::rows ( ) const
inlinenoexcept

◆ setConstant()

void mesh::CrossField::setConstant ( double  thetaDeg)

Constant field: every query returns thetaDeg (folded). valid() → true.

Here is the caller graph for this function:

◆ sweepsUsed()

int mesh::CrossField::sweepsUsed ( ) const
inlinenoexcept

◆ thetaAt()

double mesh::CrossField::thetaAt ( double  x,
double  y 
) const

Field angle in radians, folded to [0, π/2). Clamps outside the grid.

Here is the caller graph for this function:

◆ valid()

bool mesh::CrossField::valid ( ) const
inlinenoexcept

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