Graphviz 13.0.0~dev.20241220.2304
Loading...
Searching...
No Matches
visibility.c File Reference
#include <assert.h>
#include <pathplan/vis.h>
#include <stdbool.h>
#include <stdlib.h>
#include <util/alloc.h>
Include dependency graph for visibility.c:

Go to the source code of this file.

Functions

static array2 allocArray (int V, int extra)
 
COORD area2 (Ppoint_t a, Ppoint_t b, Ppoint_t c)
 
int wind (Ppoint_t a, Ppoint_t b, Ppoint_t c)
 
static bool inBetween (Ppoint_t a, Ppoint_t b, Ppoint_t c)
 
static bool intersect (Ppoint_t a, Ppoint_t b, Ppoint_t c, Ppoint_t d)
 
static bool in_cone (Ppoint_t a0, Ppoint_t a1, Ppoint_t a2, Ppoint_t b)
 
COORD dist2 (Ppoint_t a, Ppoint_t b)
 
static COORD dist (Ppoint_t a, Ppoint_t b)
 
static bool inCone (int i, int j, Ppoint_t pts[], int nextPt[], int prevPt[])
 
static bool clear (Ppoint_t pti, Ppoint_t ptj, int start, int end, int V, Ppoint_t pts[], int nextPt[])
 
static void compVis (vconfig_t *conf)
 
void visibility (vconfig_t *conf)
 
static int polyhit (vconfig_t *conf, Ppoint_t p)
 
COORDptVis (vconfig_t *conf, int pp, Ppoint_t p)
 
bool directVis (Ppoint_t p, int pp, Ppoint_t q, int qp, vconfig_t *conf)
 

Function Documentation

◆ allocArray()

static array2 allocArray ( int  V,
int  extra 
)
static

Definition at line 24 of file visibility.c.

References gv_calloc(), NULL, and V.

Referenced by visibility().

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

◆ area2()

COORD area2 ( Ppoint_t  a,
Ppoint_t  b,
Ppoint_t  c 
)

Definition at line 44 of file visibility.c.

References Pxy_t::x, and Pxy_t::y.

Referenced by inCone(), make_CW(), and make_map_internal().

Here is the caller graph for this function:

◆ clear()

static bool clear ( Ppoint_t  pti,
Ppoint_t  ptj,
int  start,
int  end,
int  V,
Ppoint_t  pts[],
int  nextPt[] 
)
static

Definition at line 145 of file visibility.c.

References intersect(), and V.

Referenced by compVis(), gobble(), and ptVis().

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

◆ compVis()

static void compVis ( vconfig_t conf)
static

Definition at line 169 of file visibility.c.

References clear(), dist(), inCone(), vconfig_s::N, vconfig_s::next, vconfig_s::P, vconfig_s::prev, V, and vconfig_s::vis.

Referenced by visibility().

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

◆ directVis()

bool directVis ( Ppoint_t  p,
int  pp,
Ppoint_t  q,
int  qp,
vconfig_t conf 
)

Definition at line 304 of file visibility.c.

References intersect(), vconfig_s::N, vconfig_s::next, vconfig_s::P, s1(), vconfig_s::start, and V.

Referenced by makePath().

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

◆ dist()

static COORD dist ( Ppoint_t  a,
Ppoint_t  b 
)
static

Definition at line 131 of file visibility.c.

References dist2().

Referenced by compVis(), and ptVis().

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

◆ dist2()

COORD dist2 ( Ppoint_t  a,
Ppoint_t  b 
)

Definition at line 120 of file visibility.c.

References Pxy_t::x, and Pxy_t::y.

Referenced by applyAttr(), cmpf(), dist(), doNeighbor(), doRep(), doRep(), edge_compatibility(), and edge_compatibility_full().

Here is the caller graph for this function:

◆ in_cone()

static bool in_cone ( Ppoint_t  a0,
Ppoint_t  a1,
Ppoint_t  a2,
Ppoint_t  b 
)
static

Definition at line 106 of file visibility.c.

References wind().

Referenced by inCone(), and ptVis().

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

◆ inBetween()

static bool inBetween ( Ppoint_t  a,
Ppoint_t  b,
Ppoint_t  c 
)
static

Definition at line 65 of file visibility.c.

References Pxy_t::x, and Pxy_t::y.

Referenced by intersect().

Here is the caller graph for this function:

◆ inCone()

static bool inCone ( int  i,
int  j,
Ppoint_t  pts[],
int  nextPt[],
int  prevPt[] 
)
static

Definition at line 136 of file visibility.c.

References in_cone().

Referenced by compVis().

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

◆ intersect()

static bool intersect ( Ppoint_t  a,
Ppoint_t  b,
Ppoint_t  c,
Ppoint_t  d 
)
static

Definition at line 78 of file visibility.c.

References inBetween(), and wind().

Referenced by clear(), directVis(), extract_adjacency(), mkConstraintG(), and mkNConstraintG().

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

◆ polyhit()

static int polyhit ( vconfig_t conf,
Ppoint_t  p 
)
static

Definition at line 222 of file visibility.c.

References in_poly(), vconfig_s::Npoly, vconfig_s::P, POLYID_NONE, and vconfig_s::start.

Referenced by ptVis().

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

◆ ptVis()

COORD * ptVis ( vconfig_t conf,
int  pp,
Ppoint_t  p 
)

Definition at line 245 of file visibility.c.

References clear(), dist(), gv_calloc(), in_cone(), vconfig_s::N, vconfig_s::next, vconfig_s::P, polyhit(), POLYID_UNKNOWN, vconfig_s::prev, vconfig_s::start, and V.

Referenced by Pobspath().

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

◆ visibility()

void visibility ( vconfig_t conf)

Definition at line 211 of file visibility.c.

References allocArray(), compVis(), vconfig_s::N, and vconfig_s::vis.

Referenced by Pobsopen(), and set_visibility().

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

◆ wind()

int wind ( Ppoint_t  a,
Ppoint_t  b,
Ppoint_t  c 
)

Definition at line 53 of file visibility.c.

References Pxy_t::x, and Pxy_t::y.

Referenced by in_cone(), in_poly(), intersect(), mkCtrlPts(), and raySeg().

Here is the caller graph for this function: