gmsh-TingyuanDoc  0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
libol1.c File Reference
#include <assert.h>
#include <fcntl.h>
#include <limits.h>
#include <float.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include "libol1.h"
Include dependency graph for libol1.c:

Go to the source code of this file.

Classes

struct  VerSct
 
struct  EdgSct
 
struct  TriSct
 
struct  QadSct
 
struct  TetSct
 
struct  PyrSct
 
struct  PriSct
 
struct  HexSct
 
struct  LnkSctPtr
 
struct  MemSctPtr
 
struct  MshThrSct
 
struct  MshSct
 
struct  OctSctPtr
 
struct  BucSct
 
struct  OctThrSct
 
struct  TreSct
 

Macros

#define MaxItmOct   20
 
#define MaxOctLvl   10
 
#define MinGrdLvl   5
 
#define ItmPerBuc   100
 
#define MemBlkSiz   100000
 
#define TngFlg   1
 
#define AniFlg   2
 
#define MaxThr   256
 
#define MIN(a, b)   ((a) < (b) ? (a) : (b))
 
#define MAX(a, b)   ((a) > (b) ? (a) : (b))
 
#define POW(a)   ((a)*(a))
 
#define CUB(a)   ((a)*(a)*(a))
 

Typedefs

typedef struct LnkSctPtr LnkSct
 
typedef struct MemSctPtr MemSct
 
typedef struct OctSctPtr OctSct
 

Functions

static void SetMshBox (TreSct *, MshSct *)
 
static void AddVer (MshSct *, TreSct *, OctSct *, fpn *, fpn *)
 
static void AddEdg (MshSct *, TreSct *, OctSct *, fpn *, fpn *)
 
static void AddTri (MshSct *, TreSct *, OctSct *, fpn *, fpn *)
 
static void AddQad (MshSct *, TreSct *, OctSct *, fpn *, fpn *)
 
static void AddTet (MshSct *, TreSct *, OctSct *, fpn *, fpn *)
 
static void SubOct (MshSct *, TreSct *, OctSct *, fpn *, fpn *)
 
static void LnkItm (TreSct *, OctSct *, itg, itg, char)
 
static OctSctGetCrd (OctSct *, itg, fpn *, fpn *, fpn *)
 
static void GetBox (TreSct *, OctSct *, itg, itg *, itg, itg *, char *, fpn[2][3], fpn, fpn *, fpn *, itg)
 
static itg BoxIntBox (fpn[2][3], fpn[2][3], fpn)
 
static void SetItm (MshSct *, itg, itg, itg, itg)
 
static void AniTri (MshSct *, itg)
 
static void SetSonCrd (itg, fpn *, fpn *, fpn *, fpn *)
 
static void GetOctLnk (MshSct *, itg, fpn *, itg *, fpn *, OctSct *, fpn *, fpn *, itg(void *, itg), void *, itg)
 
static void IntRayOct (TreSct *, MshSct *, fpn *, fpn *, itg *, fpn *, OctSct *, fpn *, fpn *, itg(void *, itg), void *, itg)
 
static void GetBucBox (TreSct *, BucSct *, fpn *, fpn *)
 
static BucSctGetBucNgb (TreSct *, BucSct *, itg)
 
static fpn DisVerOct (fpn *, fpn *, fpn *)
 
static itg VerInsOct (fpn *, fpn *, fpn *)
 
static char * GetPtrItm (MshSct *, itg, itg)
 
static void BakMshItm (MshSct *)
 
static void RstMshItm (MshSct *)
 
static itg EdgIntEdg (EdgSct *, EdgSct *, VerSct *, fpn)
 
static fpn DisVerTri (MshSct *, fpn *, TriSct *)
 
static fpn DisVerQad (MshSct *, fpn *, QadSct *)
 
static fpn DisVerTet (MshSct *, fpn *, TetSct *)
 
static fpn GetTriSrf (TriSct *)
 
static fpn GetVolTet (TetSct *)
 
static fpn DisVerEdg (fpn *, EdgSct *)
 
static void GetTriVec (TriSct *, fpn *)
 
static void SetTriNrm (TriSct *)
 
static void SetTmpHex (HexSct *, fpn *, fpn *)
 
static itg VerInsTet (VerSct *, TetSct *, fpn)
 
static itg VerInsHex (VerSct *, HexSct *)
 
static itg EdgIntHex (EdgSct *, HexSct *, fpn)
 
static itg TriIntHex (TriSct *, HexSct *, fpn)
 
static itg QadIntHex (QadSct *, HexSct *, fpn)
 
static itg TetIntHex (TetSct *, HexSct *, fpn)
 
static itg EdgIntQad (HexSct *, itg, EdgSct *, VerSct *, fpn)
 
static itg EdgIntTri (TriSct *, EdgSct *, VerSct *, fpn)
 
static itg VerInsTri (TriSct *, VerSct *, fpn)
 
static itg VerInsEdg (EdgSct *, VerSct *, fpn)
 
static void SetEdgTng (EdgSct *)
 
static fpn GetTriAni (TriSct *)
 
static void PrjVerLin (fpn *, fpn *, fpn *, fpn *)
 
static fpn PrjVerPla (fpn *, fpn *, fpn *, fpn *)
 
static void LinCmbVec3 (fpn, fpn *, fpn, fpn *, fpn *)
 
static void ClrVec (fpn *)
 
static void CpyVec (fpn *, fpn *)
 
static void AddVec2 (fpn *, fpn *)
 
static void SubVec2 (fpn *, fpn *)
 
static void SubVec3 (fpn *, fpn *, fpn *)
 
static void AddScaVec1 (fpn, fpn *)
 
static void AddScaVec2 (fpn, fpn *, fpn *)
 
static void MulVec1 (fpn, fpn *)
 
static void MulVec2 (fpn, fpn *, fpn *)
 
static void NrmVec (fpn *)
 
static void CrsPrd (fpn *, fpn *, fpn *)
 
static fpn DotPrd (fpn *, fpn *)
 
static fpn dis (fpn *, fpn *)
 
static fpn DisPow (fpn *, fpn *)
 
static fpn DisVerPla (fpn *, fpn *, fpn *)
 
static fpn GetNrmVec (fpn *)
 
static fpn VerInsBox (fpn *, fpn *, fpn *, fpn)
 
static itg LinIntBox (fpn *, fpn *, fpn *, fpn *, fpn)
 
static void LinIntPla (fpn *, fpn *, fpn *, fpn *, fpn *)
 
static void * NewMem (TreSct *, size_t)
 
static void FreAllMem (TreSct *)
 
int64_t LolNewOctree (itg NmbVer, fpn *PtrCrd1, fpn *PtrCrd2, itg NmbEdg, itg *PtrEdg1, itg *PtrEdg2, itg NmbTri, itg *PtrTri1, itg *PtrTri2, itg NmbQad, itg *PtrQad1, itg *PtrQad2, itg NmbTet, itg *PtrTet1, itg *PtrTet2, itg NmbPyr, itg *PtrPyr1, itg *PtrPyr2, itg NmbPri, itg *PtrPri1, itg *PtrPri2, itg NmbHex, itg *PtrHex1, itg *PtrHex2, itg BasIdx, itg NmbThr)
 
size_t LolFreeOctree (int64_t OctIdx)
 
itg LolGetBoundingBox (int64_t OctIdx, itg typ, itg MaxItm, itg *ItmTab, fpn MinCrd[3], fpn MaxCrd[3], itg ThrIdx)
 
static OctSctGetCrd (OctSct *oct, itg MaxLvl, fpn VerCrd[3], fpn MinCrd[3], fpn MaxCrd[3])
 
static void GetBox (TreSct *tre, OctSct *oct, itg typ, itg *NmbItm, itg MaxItm, itg *ItmTab, char *FlgTab, fpn box[2][3], fpn eps, fpn MinCrd[3], fpn MaxCrd[3], itg ThrIdx)
 
itg LolGetNearest (int64_t OctIdx, itg typ, fpn *VerCrd, fpn *MinDis, fpn MaxDis, itg(UsrPrc)(void *, itg), void *UsrDat, itg ThrIdx)
 
itg LolIntersectSurface (int64_t OctIdx, fpn *VerCrd, fpn *VerTng, fpn *MinDis, fpn MaxDis, itg(UsrPrc)(void *, itg), void *UsrDat, itg ThrIdx)
 
itg LolProjectVertex (int64_t OctIdx, fpn *VerCrd, itg typ, itg MinItm, fpn *MinCrd, itg ThrIdx)
 
static void GetBucBox (TreSct *tre, BucSct *buc, fpn MinCrd[3], fpn MaxCrd[3])
 
static fpn DisVerOct (fpn VerCrd[3], fpn MinCrd[3], fpn MaxCrd[3])
 
static void GetOctLnk (MshSct *msh, itg typ, fpn VerCrd[3], itg *MinItm, fpn *MinDis, OctSct *oct, fpn MinCrd[3], fpn MaxCrd[3], itg(UsrPrc)(void *, itg), void *UsrDat, itg ThrIdx)
 
static void IntRayOct (TreSct *tre, MshSct *msh, fpn *crd, fpn *tng, itg *MinItm, fpn *MinDis, OctSct *oct, fpn MinCrd[3], fpn MaxCrd[3], itg(UsrPrc)(void *, itg), void *UsrDat, itg ThrIdx)
 
static void AddVer (MshSct *msh, TreSct *tre, OctSct *oct, fpn MinCrd[3], fpn MaxCrd[3])
 
static void AddEdg (MshSct *msh, TreSct *tre, OctSct *oct, fpn MinCrd[3], fpn MaxCrd[3])
 
static void AddTri (MshSct *msh, TreSct *tre, OctSct *oct, fpn MinCrd[3], fpn MaxCrd[3])
 
static void AddQad (MshSct *msh, TreSct *tre, OctSct *oct, fpn MinCrd[3], fpn MaxCrd[3])
 
static void AddTet (MshSct *msh, TreSct *tre, OctSct *oct, fpn MinCrd[3], fpn MaxCrd[3])
 
static void SubOct (MshSct *msh, TreSct *tre, OctSct *oct, fpn MinCrd[3], fpn MaxCrd[3])
 
static void SetSonCrd (itg SonIdx, fpn SonMin[3], fpn SonMax[3], fpn MinCrd[3], fpn MaxCrd[3])
 
static itg VerInsOct (fpn VerCrd[3], fpn MinCrd[3], fpn MaxCrd[3])
 
static void SetTmpHex (HexSct *hex, fpn MinCrd[3], fpn MaxCrd[3])
 
static fpn DisVerTri (MshSct *msh, fpn VerCrd[3], TriSct *tri)
 
static fpn DisVerQad (MshSct *msh, fpn VerCrd[3], QadSct *qad)
 
static fpn DisVerEdg (fpn VerCrd[3], EdgSct *edg)
 
static void GetTriVec (TriSct *tri, fpn w[3])
 
static void PrjVerLin (fpn VerCrd[3], fpn LinCrd[3], fpn LinTng[3], fpn ImgCrd[3])
 
static fpn PrjVerPla (fpn VerCrd[3], fpn PlaCrd[3], fpn PlaNrm[3], fpn ImgCrd[3])
 
static fpn DisVerPla (fpn VerCrd[3], fpn PlaCrd[3], fpn PlaNrm[3])
 
static fpn dis (fpn a[3], fpn b[3])
 
static fpn DisPow (fpn a[3], fpn b[3])
 
static void SubVec2 (fpn u[3], fpn v[3])
 
static void SubVec3 (fpn u[3], fpn v[3], fpn w[3])
 
static void NrmVec (fpn u[3])
 
static fpn DotPrd (fpn u[3], fpn v[3])
 
static void CrsPrd (fpn u[3], fpn v[3], fpn w[3])
 
static void LinCmbVec3 (fpn w1, fpn v1[3], fpn w2, fpn v2[3], fpn v3[3])
 
static void ClrVec (fpn u[3])
 
static void CpyVec (fpn u[3], fpn v[3])
 
static void AddVec2 (fpn u[3], fpn v[3])
 
static void AddScaVec1 (fpn s, fpn u[3])
 
static void AddScaVec2 (fpn s, fpn u[3], fpn v[3])
 
static void MulVec1 (const fpn w, fpn u[3])
 
static void MulVec2 (fpn w, fpn u[3], fpn v[3])
 
static fpn GetNrmVec (fpn u[3])
 
int64_t call() lolnewoctree (itg *NmbVer, fpn *VerTab1, fpn *VerTab2, itg *NmbEdg, itg *EdgTab1, itg *EdgTab2, itg *NmbTri, itg *TriTab1, itg *TriTab2, itg *NmbQad, itg *QadTab1, itg *QadTab2, itg *NmbTet, itg *TetTab1, itg *TetTab2, itg *NmbPyr, itg *PyrTab1, itg *PyrTab2, itg *NmbPri, itg *PriTab1, itg *PriTab2, itg *NmbHex, itg *HexTab1, itg *HexTab2, itg *BasIdx, itg *NmbThr)
 
int64_t call() lolfreeoctree (int64_t *OctIdx)
 
itg call() lolgetboundingbox (int64_t *OctIdx, itg *typ, itg *MaxItm, itg *ItmTab, fpn *MinCrd, fpn *MaxCrd, itg *ThrIdx)
 
itg call() lolgetnearest (int64_t *OctIdx, itg *typ, fpn *MinCrd, fpn *MinDis, fpn *MaxDis, void *UsrPrc, void *UsrDat, itg *ThrIdx)
 

Variables

static const itg TetEdg [6][2] = { {0,1}, {0,2}, {0,3}, {1,2}, {1,3}, {2,3} }
 
static const itg TetFac [4][3] = { {1,2,3}, {2,0,3}, {3,0,1}, {0,2,1} }
 
static const itg TetFacEdg [4][3] = { {5,4,3}, {2,5,1}, {0,4,2}, {3,1,0} }
 
static const itg tvpe [12][2]
 
static const itg tvpf [6][4]
 

Macro Definition Documentation

◆ AniFlg

#define AniFlg   2

Definition at line 79 of file libol1.c.

◆ CUB

#define CUB (   a)    ((a)*(a)*(a))

Definition at line 84 of file libol1.c.

◆ ItmPerBuc

#define ItmPerBuc   100

Definition at line 76 of file libol1.c.

◆ MAX

#define MAX (   a,
 
)    ((a) > (b) ? (a) : (b))

Definition at line 82 of file libol1.c.

◆ MaxItmOct

#define MaxItmOct   20

Definition at line 73 of file libol1.c.

◆ MaxOctLvl

#define MaxOctLvl   10

Definition at line 74 of file libol1.c.

◆ MaxThr

#define MaxThr   256

Definition at line 80 of file libol1.c.

◆ MemBlkSiz

#define MemBlkSiz   100000

Definition at line 77 of file libol1.c.

◆ MIN

#define MIN (   a,
 
)    ((a) < (b) ? (a) : (b))

Definition at line 81 of file libol1.c.

◆ MinGrdLvl

#define MinGrdLvl   5

Definition at line 75 of file libol1.c.

◆ POW

#define POW (   a)    ((a)*(a))

Definition at line 83 of file libol1.c.

◆ TngFlg

#define TngFlg   1

Definition at line 78 of file libol1.c.

Typedef Documentation

◆ LnkSct

typedef struct LnkSctPtr LnkSct

◆ MemSct

typedef struct MemSctPtr MemSct

◆ OctSct

typedef struct OctSctPtr OctSct

Function Documentation

◆ AddEdg() [1/2]

static void AddEdg ( MshSct ,
TreSct ,
OctSct ,
fpn ,
fpn  
)
static

Referenced by AddEdg(), and LolNewOctree().

Here is the caller graph for this function:

◆ AddEdg() [2/2]

static void AddEdg ( MshSct msh,
TreSct tre,
OctSct oct,
fpn  MinCrd[3],
fpn  MaxCrd[3] 
)
static

Definition at line 1509 of file libol1.c.

Here is the call graph for this function:

◆ AddQad() [1/2]

static void AddQad ( MshSct ,
TreSct ,
OctSct ,
fpn ,
fpn  
)
static

Referenced by AddQad(), and LolNewOctree().

Here is the caller graph for this function:

◆ AddQad() [2/2]

static void AddQad ( MshSct msh,
TreSct tre,
OctSct oct,
fpn  MinCrd[3],
fpn  MaxCrd[3] 
)
static

Definition at line 1577 of file libol1.c.

Here is the call graph for this function:

◆ AddScaVec1() [1/2]

static void AddScaVec1 ( fpn  s,
fpn  u[3] 
)
static

Definition at line 2942 of file libol1.c.

◆ AddScaVec1() [2/2]

static void AddScaVec1 ( fpn  ,
fpn  
)
static

Referenced by SetMshBox().

Here is the caller graph for this function:

◆ AddScaVec2() [1/2]

static void AddScaVec2 ( fpn  s,
fpn  u[3],
fpn  v[3] 
)
static

Definition at line 2951 of file libol1.c.

◆ AddScaVec2() [2/2]

static void AddScaVec2 ( fpn  ,
fpn ,
fpn  
)
static

Referenced by SetMshBox().

Here is the caller graph for this function:

◆ AddTet() [1/2]

static void AddTet ( MshSct ,
TreSct ,
OctSct ,
fpn ,
fpn  
)
static

Referenced by AddTet(), and LolNewOctree().

Here is the caller graph for this function:

◆ AddTet() [2/2]

static void AddTet ( MshSct msh,
TreSct tre,
OctSct oct,
fpn  MinCrd[3],
fpn  MaxCrd[3] 
)
static

Definition at line 1611 of file libol1.c.

Here is the call graph for this function:

◆ AddTri() [1/2]

static void AddTri ( MshSct ,
TreSct ,
OctSct ,
fpn ,
fpn  
)
static

Referenced by AddTri(), and LolNewOctree().

Here is the caller graph for this function:

◆ AddTri() [2/2]

static void AddTri ( MshSct msh,
TreSct tre,
OctSct oct,
fpn  MinCrd[3],
fpn  MaxCrd[3] 
)
static

Definition at line 1543 of file libol1.c.

Here is the call graph for this function:

◆ AddVec2() [1/2]

static void AddVec2 ( fpn ,
fpn  
)
static

Referenced by DisVerTri(), and PrjVerPla().

Here is the caller graph for this function:

◆ AddVec2() [2/2]

static void AddVec2 ( fpn  u[3],
fpn  v[3] 
)
static

Definition at line 2933 of file libol1.c.

◆ AddVer() [1/2]

static void AddVer ( MshSct ,
TreSct ,
OctSct ,
fpn ,
fpn  
)
static

Referenced by AddVer(), and LolNewOctree().

Here is the caller graph for this function:

◆ AddVer() [2/2]

static void AddVer ( MshSct msh,
TreSct tre,
OctSct oct,
fpn  MinCrd[3],
fpn  MaxCrd[3] 
)
static

Definition at line 1476 of file libol1.c.

Here is the call graph for this function:

◆ AniTri()

static void AniTri ( MshSct ,
itg   
)
static

◆ BakMshItm()

static void BakMshItm ( MshSct msh)
static

Definition at line 1400 of file libol1.c.

Referenced by SubOct().

Here is the caller graph for this function:

◆ BoxIntBox()

static itg BoxIntBox ( fpn  box1[2][3],
fpn  box2[2][3],
fpn  eps 
)
static

Definition at line 2783 of file libol1.c.

Referenced by GetBox().

Here is the caller graph for this function:

◆ ClrVec() [1/2]

static void ClrVec ( fpn )
static

◆ ClrVec() [2/2]

static void ClrVec ( fpn  u[3])
static

Definition at line 2915 of file libol1.c.

◆ CpyVec() [1/2]

static void CpyVec ( fpn ,
fpn  
)
static

Referenced by DisVerTet(), EdgIntEdg(), EdgIntQad(), EdgIntTri(), GetCrd(), LolProjectVertex(), SetItm(), and SetMshBox().

Here is the caller graph for this function:

◆ CpyVec() [2/2]

static void CpyVec ( fpn  u[3],
fpn  v[3] 
)
static

Definition at line 2924 of file libol1.c.

◆ CrsPrd() [1/2]

static void CrsPrd ( fpn ,
fpn ,
fpn  
)
static

Referenced by DisVerTri(), GetTriVec(), and VerInsTri().

Here is the caller graph for this function:

◆ CrsPrd() [2/2]

static void CrsPrd ( fpn  u[3],
fpn  v[3],
fpn  w[3] 
)
static

Definition at line 2898 of file libol1.c.

◆ dis() [1/2]

static fpn dis ( fpn ,
fpn  
)
static

Referenced by SurfaceProjector::closestPoint(), DisVerEdg(), EdgIntEdg(), and LolProjectVertex().

Here is the caller graph for this function:

◆ dis() [2/2]

static fpn dis ( fpn  a[3],
fpn  b[3] 
)
static

Definition at line 2826 of file libol1.c.

◆ DisPow() [1/2]

static fpn DisPow ( fpn ,
fpn  
)
static

Referenced by DisVerEdg(), DisVerOct(), DisVerTet(), DisVerTri(), GetOctLnk(), GetTriAni(), IntRayOct(), and VerInsEdg().

Here is the caller graph for this function:

◆ DisPow() [2/2]

static fpn DisPow ( fpn  a[3],
fpn  b[3] 
)
static

Definition at line 2838 of file libol1.c.

◆ DisVerEdg() [1/2]

static fpn DisVerEdg ( fpn ,
EdgSct  
)
static

Referenced by GetOctLnk().

Here is the caller graph for this function:

◆ DisVerEdg() [2/2]

static fpn DisVerEdg ( fpn  VerCrd[3],
EdgSct edg 
)
static

Definition at line 2670 of file libol1.c.

Here is the call graph for this function:

◆ DisVerOct() [1/2]

static fpn DisVerOct ( fpn ,
fpn ,
fpn  
)
static

Referenced by GetOctLnk(), LolGetNearest(), and LolIntersectSurface().

Here is the caller graph for this function:

◆ DisVerOct() [2/2]

static fpn DisVerOct ( fpn  VerCrd[3],
fpn  MinCrd[3],
fpn  MaxCrd[3] 
)
static

Definition at line 1125 of file libol1.c.

Here is the call graph for this function:

◆ DisVerPla() [1/2]

static fpn DisVerPla ( fpn ,
fpn ,
fpn  
)
static

Referenced by EdgIntQad(), EdgIntTri(), and TriIntHex().

Here is the caller graph for this function:

◆ DisVerPla() [2/2]

static fpn DisVerPla ( fpn  VerCrd[3],
fpn  PlaCrd[3],
fpn  PlaNrm[3] 
)
static

Definition at line 2770 of file libol1.c.

Here is the call graph for this function:

◆ DisVerQad() [1/2]

static fpn DisVerQad ( MshSct ,
fpn ,
QadSct  
)
static

Referenced by GetOctLnk().

Here is the caller graph for this function:

◆ DisVerQad() [2/2]

static fpn DisVerQad ( MshSct msh,
fpn  VerCrd[3],
QadSct qad 
)
static

Definition at line 2590 of file libol1.c.

Here is the call graph for this function:

◆ DisVerTet()

static fpn DisVerTet ( MshSct msh,
fpn VerCrd,
TetSct tet 
)
static

Definition at line 2601 of file libol1.c.

Referenced by GetOctLnk().

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

◆ DisVerTri() [1/2]

static fpn DisVerTri ( MshSct ,
fpn ,
TriSct  
)
static

Referenced by DisVerQad(), and GetOctLnk().

Here is the caller graph for this function:

◆ DisVerTri() [2/2]

static fpn DisVerTri ( MshSct msh,
fpn  VerCrd[3],
TriSct tri 
)
static

Definition at line 2548 of file libol1.c.

Here is the call graph for this function:

◆ DotPrd() [1/2]

static fpn DotPrd ( fpn ,
fpn  
)
static

Referenced by DisVerPla(), DisVerTri(), IntRayOct(), LinIntPla(), PrjVerLin(), PrjVerPla(), VerInsEdg(), and VerInsTri().

Here is the caller graph for this function:

◆ DotPrd() [2/2]

static fpn DotPrd ( fpn  u[3],
fpn  v[3] 
)
static

Definition at line 2886 of file libol1.c.

◆ EdgIntEdg()

static itg EdgIntEdg ( EdgSct edg1,
EdgSct edg2,
VerSct IntVer,
fpn  eps 
)
static

Definition at line 2462 of file libol1.c.

Referenced by EdgIntQad(), and EdgIntTri().

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

◆ EdgIntHex()

static itg EdgIntHex ( EdgSct edg,
HexSct hex,
fpn  eps 
)
static

Definition at line 2033 of file libol1.c.

Referenced by AddEdg(), GetBox(), and SubOct().

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

◆ EdgIntQad()

static itg EdgIntQad ( HexSct hex,
itg  FacIdx,
EdgSct edg,
VerSct IntVer,
fpn  eps 
)
static

Definition at line 2267 of file libol1.c.

Referenced by EdgIntHex(), TetIntHex(), and TriIntHex().

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

◆ EdgIntTri()

static itg EdgIntTri ( TriSct tri,
EdgSct edg,
VerSct IntVer,
fpn  eps 
)
static

Definition at line 2340 of file libol1.c.

Referenced by TetIntHex(), and TriIntHex().

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

◆ FreAllMem()

static void FreAllMem ( TreSct tre)
static

Definition at line 3008 of file libol1.c.

Referenced by LolFreeOctree().

Here is the caller graph for this function:

◆ GetBox() [1/2]

static void GetBox ( TreSct ,
OctSct ,
itg  ,
itg ,
itg  ,
itg ,
char *  ,
fpn  [2][3],
fpn  ,
fpn ,
fpn ,
itg   
)
static

Referenced by GetBox(), and LolGetBoundingBox().

Here is the caller graph for this function:

◆ GetBox() [2/2]

static void GetBox ( TreSct tre,
OctSct oct,
itg  typ,
itg NmbItm,
itg  MaxItm,
itg ItmTab,
char *  FlgTab,
fpn  box[2][3],
fpn  eps,
fpn  MinCrd[3],
fpn  MaxCrd[3],
itg  ThrIdx 
)
static

Definition at line 695 of file libol1.c.

Here is the call graph for this function:

◆ GetBucBox() [1/2]

static void GetBucBox ( TreSct ,
BucSct ,
fpn ,
fpn  
)
static

Referenced by LolGetNearest(), and LolIntersectSurface().

Here is the caller graph for this function:

◆ GetBucBox() [2/2]

static void GetBucBox ( TreSct tre,
BucSct buc,
fpn  MinCrd[3],
fpn  MaxCrd[3] 
)
static

Definition at line 1073 of file libol1.c.

◆ GetBucNgb()

static BucSct * GetBucNgb ( TreSct tre,
BucSct buc,
itg  dir 
)
static

Definition at line 1091 of file libol1.c.

Referenced by LolGetNearest(), and LolIntersectSurface().

Here is the caller graph for this function:

◆ GetCrd() [1/2]

static OctSct* GetCrd ( OctSct ,
itg  ,
fpn ,
fpn ,
fpn  
)
static

Referenced by LolNewOctree().

Here is the caller graph for this function:

◆ GetCrd() [2/2]

static OctSct* GetCrd ( OctSct oct,
itg  MaxLvl,
fpn  VerCrd[3],
fpn  MinCrd[3],
fpn  MaxCrd[3] 
)
static

Definition at line 662 of file libol1.c.

Here is the call graph for this function:

◆ GetNrmVec() [1/2]

static fpn GetNrmVec ( fpn )
static

Referenced by GetTriSrf(), and SetEdgTng().

Here is the caller graph for this function:

◆ GetNrmVec() [2/2]

static fpn GetNrmVec ( fpn  u[3])
static

Definition at line 2977 of file libol1.c.

◆ GetOctLnk() [1/2]

static void GetOctLnk ( MshSct ,
itg  ,
fpn ,
itg ,
fpn ,
OctSct ,
fpn ,
fpn ,
itg(void *, itg ,
void *  ,
itg   
)
static

Referenced by GetOctLnk(), and LolGetNearest().

Here is the caller graph for this function:

◆ GetOctLnk() [2/2]

static void GetOctLnk ( MshSct msh,
itg  typ,
fpn  VerCrd[3],
itg MinItm,
fpn MinDis,
OctSct oct,
fpn  MinCrd[3],
fpn  MaxCrd[3],
itg(UsrPrc)(void *, itg ,
void *  UsrDat,
itg  ThrIdx 
)
static

Definition at line 1147 of file libol1.c.

Here is the call graph for this function:

◆ GetPtrItm()

static char * GetPtrItm ( MshSct msh,
itg  typ,
itg  idx 
)
static

Definition at line 1428 of file libol1.c.

Referenced by GetOctLnk(), LolProjectVertex(), SetItm(), and SetMshBox().

Here is the caller graph for this function:

◆ GetTriAni()

static fpn GetTriAni ( TriSct tri)
static

Definition at line 2806 of file libol1.c.

Referenced by SetItm().

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

◆ GetTriSrf()

static fpn GetTriSrf ( TriSct tri)
static

Definition at line 2628 of file libol1.c.

Referenced by GetTriAni().

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

◆ GetTriVec() [1/2]

static void GetTriVec ( TriSct ,
fpn  
)
static

Referenced by GetTriSrf(), and SetTriNrm().

Here is the caller graph for this function:

◆ GetTriVec() [2/2]

static void GetTriVec ( TriSct tri,
fpn  w[3] 
)
static

Definition at line 2692 of file libol1.c.

Here is the call graph for this function:

◆ GetVolTet()

static fpn GetVolTet ( TetSct tet)
static

Definition at line 2642 of file libol1.c.

Referenced by VerInsTet().

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

◆ IntRayOct() [1/2]

static void IntRayOct ( TreSct ,
MshSct ,
fpn ,
fpn ,
itg ,
fpn ,
OctSct ,
fpn ,
fpn ,
itg(void *, itg ,
void *  ,
itg   
)
static

Referenced by IntRayOct(), and LolIntersectSurface().

Here is the caller graph for this function:

◆ IntRayOct() [2/2]

static void IntRayOct ( TreSct tre,
MshSct msh,
fpn crd,
fpn tng,
itg MinItm,
fpn MinDis,
OctSct oct,
fpn  MinCrd[3],
fpn  MaxCrd[3],
itg(UsrPrc)(void *, itg ,
void *  UsrDat,
itg  ThrIdx 
)
static

Definition at line 1232 of file libol1.c.

Here is the call graph for this function:

◆ LinCmbVec3() [1/2]

static void LinCmbVec3 ( fpn  w1,
fpn  v1[3],
fpn  w2,
fpn  v2[3],
fpn  v3[3] 
)
static

Definition at line 2906 of file libol1.c.

◆ LinCmbVec3() [2/2]

static void LinCmbVec3 ( fpn  ,
fpn ,
fpn  ,
fpn ,
fpn  
)
static

Referenced by EdgIntEdg(), EdgIntQad(), EdgIntTri(), GetCrd(), LinIntPla(), PrjVerLin(), SetMshBox(), and SetSonCrd().

Here is the caller graph for this function:

◆ LinIntBox()

static itg LinIntBox ( fpn LinCrd,
fpn LinTng,
fpn BoxMin,
fpn BoxMax,
fpn  eps 
)
static

Definition at line 1970 of file libol1.c.

Referenced by IntRayOct(), and LolIntersectSurface().

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

◆ LinIntPla()

static void LinIntPla ( fpn LinCrd,
fpn LinTng,
fpn PlaCrd,
fpn PlaNrm,
fpn IntCrd 
)
static

Definition at line 2001 of file libol1.c.

Referenced by IntRayOct(), and LinIntBox().

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

◆ LnkItm()

static void LnkItm ( TreSct tre,
OctSct oct,
itg  typ,
itg  idx,
char  ani 
)
static

Definition at line 1773 of file libol1.c.

Referenced by AddEdg(), AddQad(), AddTet(), AddTri(), AddVer(), and SubOct().

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

◆ lolfreeoctree()

int64_t call() lolfreeoctree ( int64_t *  OctIdx)

Definition at line 3044 of file libol1.c.

Here is the call graph for this function:

◆ LolFreeOctree()

size_t LolFreeOctree ( int64_t  OctIdx)

Definition at line 623 of file libol1.c.

Referenced by SurfaceProjector::clear(), lolfreeoctree(), and libOLwrapper::~libOLwrapper().

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

◆ lolgetboundingbox()

itg call() lolgetboundingbox ( int64_t *  OctIdx,
itg typ,
itg MaxItm,
itg ItmTab,
fpn MinCrd,
fpn MaxCrd,
itg ThrIdx 
)

Definition at line 3049 of file libol1.c.

Here is the call graph for this function:

◆ LolGetBoundingBox()

itg LolGetBoundingBox ( int64_t  OctIdx,
itg  typ,
itg  MaxItm,
itg ItmTab,
fpn  MinCrd[3],
fpn  MaxCrd[3],
itg  ThrIdx 
)

Definition at line 639 of file libol1.c.

Referenced by libOLwrapper::elementsInsideBoundingBox(), and lolgetboundingbox().

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

◆ lolgetnearest()

itg call() lolgetnearest ( int64_t *  OctIdx,
itg typ,
fpn MinCrd,
fpn MinDis,
fpn MaxDis,
void *  UsrPrc,
void *  UsrDat,
itg ThrIdx 
)

Definition at line 3055 of file libol1.c.

Here is the call graph for this function:

◆ LolGetNearest()

itg LolGetNearest ( int64_t  OctIdx,
itg  typ,
fpn VerCrd,
fpn MinDis,
fpn  MaxDis,
itg(UsrPrc)(void *, itg ,
void *  UsrDat,
itg  ThrIdx 
)

Definition at line 786 of file libol1.c.

Referenced by SurfaceProjector::closestPoint(), and lolgetnearest().

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

◆ LolIntersectSurface()

itg LolIntersectSurface ( int64_t  OctIdx,
fpn VerCrd,
fpn VerTng,
fpn MinDis,
fpn  MaxDis,
itg(UsrPrc)(void *, itg ,
void *  UsrDat,
itg  ThrIdx 
)

Definition at line 857 of file libol1.c.

Here is the call graph for this function:

◆ lolnewoctree()

int64_t call() lolnewoctree ( itg NmbVer,
fpn VerTab1,
fpn VerTab2,
itg NmbEdg,
itg EdgTab1,
itg EdgTab2,
itg NmbTri,
itg TriTab1,
itg TriTab2,
itg NmbQad,
itg QadTab1,
itg QadTab2,
itg NmbTet,
itg TetTab1,
itg TetTab2,
itg NmbPyr,
itg PyrTab1,
itg PyrTab2,
itg NmbPri,
itg PriTab1,
itg PriTab2,
itg NmbHex,
itg HexTab1,
itg HexTab2,
itg BasIdx,
itg NmbThr 
)

Definition at line 3027 of file libol1.c.

Here is the call graph for this function:

◆ LolNewOctree()

int64_t LolNewOctree ( itg  NmbVer,
fpn PtrCrd1,
fpn PtrCrd2,
itg  NmbEdg,
itg PtrEdg1,
itg PtrEdg2,
itg  NmbTri,
itg PtrTri1,
itg PtrTri2,
itg  NmbQad,
itg PtrQad1,
itg PtrQad2,
itg  NmbTet,
itg PtrTet1,
itg PtrTet2,
itg  NmbPyr,
itg PtrPyr1,
itg PtrPyr2,
itg  NmbPri,
itg PtrPri1,
itg PtrPri2,
itg  NmbHex,
itg PtrHex1,
itg PtrHex2,
itg  BasIdx,
itg  NmbThr 
)

Definition at line 343 of file libol1.c.

Referenced by SurfaceProjector::initialize(), libOLwrapper::libOLwrapper(), and lolnewoctree().

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

◆ LolProjectVertex()

itg LolProjectVertex ( int64_t  OctIdx,
fpn VerCrd,
itg  typ,
itg  MinItm,
fpn MinCrd,
itg  ThrIdx 
)

Definition at line 930 of file libol1.c.

Here is the call graph for this function:

◆ MulVec1() [1/2]

static void MulVec1 ( const fpn  w,
fpn  u[3] 
)
static

Definition at line 2960 of file libol1.c.

◆ MulVec1() [2/2]

static void MulVec1 ( fpn  ,
fpn  
)
static

Referenced by SetEdgTng().

Here is the caller graph for this function:

◆ MulVec2() [1/2]

static void MulVec2 ( fpn  w,
fpn  u[3],
fpn  v[3] 
)
static

Definition at line 2968 of file libol1.c.

◆ MulVec2() [2/2]

static void MulVec2 ( fpn  ,
fpn ,
fpn  
)
static

Referenced by DisVerTri(), and PrjVerPla().

Here is the caller graph for this function:

◆ NewMem()

static void * NewMem ( TreSct tre,
size_t  siz 
)
static

Definition at line 2987 of file libol1.c.

Referenced by LnkItm(), LolNewOctree(), and SubOct().

Here is the caller graph for this function:

◆ NrmVec() [1/2]

static void NrmVec ( fpn )
static

Referenced by SetTriNrm().

Here is the caller graph for this function:

◆ NrmVec() [2/2]

static void NrmVec ( fpn  u[3])
static

Definition at line 2868 of file libol1.c.

◆ PrjVerLin() [1/2]

static void PrjVerLin ( fpn ,
fpn ,
fpn ,
fpn  
)
static

Referenced by DisVerEdg(), EdgIntEdg(), LolProjectVertex(), and VerInsEdg().

Here is the caller graph for this function:

◆ PrjVerLin() [2/2]

static void PrjVerLin ( fpn  VerCrd[3],
fpn  LinCrd[3],
fpn  LinTng[3],
fpn  ImgCrd[3] 
)
static

Definition at line 2733 of file libol1.c.

Here is the call graph for this function:

◆ PrjVerPla() [1/2]

static fpn PrjVerPla ( fpn ,
fpn ,
fpn ,
fpn  
)
static

Referenced by DisVerTri(), LolProjectVertex(), and VerInsTri().

Here is the caller graph for this function:

◆ PrjVerPla() [2/2]

static fpn PrjVerPla ( fpn  VerCrd[3],
fpn  PlaCrd[3],
fpn  PlaNrm[3],
fpn  ImgCrd[3] 
)
static

Definition at line 2749 of file libol1.c.

Here is the call graph for this function:

◆ QadIntHex()

static itg QadIntHex ( QadSct qad,
HexSct hex,
fpn  eps 
)
static

Definition at line 2128 of file libol1.c.

Referenced by AddQad(), GetBox(), and SubOct().

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

◆ RstMshItm()

static void RstMshItm ( MshSct msh)
static

Definition at line 1414 of file libol1.c.

Referenced by SubOct().

Here is the caller graph for this function:

◆ SetEdgTng()

static void SetEdgTng ( EdgSct edg)
static

Definition at line 2719 of file libol1.c.

Referenced by EdgIntQad(), EdgIntTri(), SetItm(), and VerInsTri().

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

◆ SetItm()

static void SetItm ( MshSct msh,
itg  typ,
itg  idx,
itg  flg,
itg  ThrIdx 
)
static

Definition at line 1302 of file libol1.c.

Referenced by GetBox(), GetOctLnk(), IntRayOct(), LolNewOctree(), LolProjectVertex(), and SubOct().

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

◆ SetMshBox()

static void SetMshBox ( TreSct box,
MshSct msh 
)
static

Definition at line 1438 of file libol1.c.

Referenced by LolNewOctree().

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

◆ SetSonCrd() [1/2]

static void SetSonCrd ( itg  SonIdx,
fpn  SonMin[3],
fpn  SonMax[3],
fpn  MinCrd[3],
fpn  MaxCrd[3] 
)
static

Definition at line 1833 of file libol1.c.

Here is the call graph for this function:

◆ SetSonCrd() [2/2]

static void SetSonCrd ( itg  ,
fpn ,
fpn ,
fpn ,
fpn  
)
static

Referenced by AddEdg(), AddQad(), AddTet(), AddTri(), AddVer(), GetCrd(), GetOctLnk(), IntRayOct(), and SubOct().

Here is the caller graph for this function:

◆ SetTmpHex() [1/2]

static void SetTmpHex ( HexSct ,
fpn ,
fpn  
)
static

Referenced by AddEdg(), AddQad(), AddTet(), AddTri(), GetBox(), and SubOct().

Here is the caller graph for this function:

◆ SetTmpHex() [2/2]

static void SetTmpHex ( HexSct hex,
fpn  MinCrd[3],
fpn  MaxCrd[3] 
)
static

Definition at line 1937 of file libol1.c.

◆ SetTriNrm()

static void SetTriNrm ( TriSct tri)
static

Definition at line 2707 of file libol1.c.

Referenced by SetItm().

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

◆ SubOct() [1/2]

static void SubOct ( MshSct ,
TreSct ,
OctSct ,
fpn ,
fpn  
)
static

Referenced by AddEdg(), AddQad(), AddTet(), AddTri(), and AddVer().

Here is the caller graph for this function:

◆ SubOct() [2/2]

static void SubOct ( MshSct msh,
TreSct tre,
OctSct oct,
fpn  MinCrd[3],
fpn  MaxCrd[3] 
)
static

Definition at line 1645 of file libol1.c.

Here is the call graph for this function:

◆ SubVec2() [1/2]

static void SubVec2 ( fpn ,
fpn  
)
static

◆ SubVec2() [2/2]

static void SubVec2 ( fpn  u[3],
fpn  v[3] 
)
static

Definition at line 2850 of file libol1.c.

◆ SubVec3() [1/2]

static void SubVec3 ( fpn ,
fpn ,
fpn  
)
static

Referenced by DisVerPla(), DisVerTri(), GetTriVec(), LinIntPla(), PrjVerLin(), PrjVerPla(), SetEdgTng(), VerInsEdg(), and VerInsTri().

Here is the caller graph for this function:

◆ SubVec3() [2/2]

static void SubVec3 ( fpn  u[3],
fpn  v[3],
fpn  w[3] 
)
static

Definition at line 2859 of file libol1.c.

◆ TetIntHex()

static itg TetIntHex ( TetSct tet,
HexSct hex,
fpn  eps 
)
static

Definition at line 2141 of file libol1.c.

Referenced by AddTet(), GetBox(), and SubOct().

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

◆ TriIntHex()

static itg TriIntHex ( TriSct tri,
HexSct hex,
fpn  eps 
)
static

Definition at line 2055 of file libol1.c.

Referenced by AddTri(), GetBox(), QadIntHex(), and SubOct().

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

◆ VerInsBox()

static fpn VerInsBox ( fpn VerCrd,
fpn BoxMin,
fpn BoxMax,
fpn  eps 
)
static

Definition at line 2016 of file libol1.c.

Referenced by LinIntBox().

Here is the caller graph for this function:

◆ VerInsEdg()

static itg VerInsEdg ( EdgSct edg,
VerSct ver,
fpn  eps 
)
static

Definition at line 2515 of file libol1.c.

Referenced by EdgIntEdg(), LolProjectVertex(), and VerInsTri().

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

◆ VerInsHex()

static itg VerInsHex ( VerSct ver,
HexSct hex 
)
static

Definition at line 2248 of file libol1.c.

Referenced by EdgIntHex(), EdgIntQad(), GetBox(), TetIntHex(), and TriIntHex().

Here is the caller graph for this function:

◆ VerInsOct() [1/2]

static itg VerInsOct ( fpn ,
fpn ,
fpn  
)
static

Referenced by AddVer(), and SubOct().

Here is the caller graph for this function:

◆ VerInsOct() [2/2]

static itg VerInsOct ( fpn  VerCrd[3],
fpn  MinCrd[3],
fpn  MaxCrd[3] 
)
static

Definition at line 1921 of file libol1.c.

◆ VerInsTet()

itg VerInsTet ( VerSct ver,
TetSct tet,
fpn  eps 
)
static

Definition at line 2208 of file libol1.c.

Referenced by DisVerTet(), and TetIntHex().

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

◆ VerInsTri()

static itg VerInsTri ( TriSct tri,
VerSct ver,
fpn  eps 
)
static

Definition at line 2411 of file libol1.c.

Referenced by EdgIntTri(), IntRayOct(), LolProjectVertex(), and VerInsTet().

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

Variable Documentation

◆ TetEdg

const itg TetEdg[6][2] = { {0,1}, {0,2}, {0,3}, {1,2}, {1,3}, {2,3} }
static

Definition at line 330 of file libol1.c.

Referenced by LolNewOctree(), and VerInsTet().

◆ TetFac

const itg TetFac[4][3] = { {1,2,3}, {2,0,3}, {3,0,1}, {0,2,1} }
static

Definition at line 331 of file libol1.c.

Referenced by LolNewOctree(), and VerInsTet().

◆ TetFacEdg

const itg TetFacEdg[4][3] = { {5,4,3}, {2,5,1}, {0,4,2}, {3,1,0} }
static

Definition at line 332 of file libol1.c.

Referenced by LolNewOctree().

◆ tvpe

const itg tvpe[12][2]
static
Initial value:
= { {3,2}, {0,1}, {4,5}, {7,6}, {3,7}, {2,6},
{1,5}, {0,4}, {3,0}, {7,4}, {6,5}, {2,1} }

Definition at line 333 of file libol1.c.

Referenced by LolNewOctree().

◆ tvpf

const itg tvpf[6][4]
static
Initial value:
= { {3,0,4,7}, {5,1,2,6}, {3,2,1,0},
{5,6,7,4},{3,7,6,2}, {5,4,0,1} }

Definition at line 335 of file libol1.c.

Referenced by LolNewOctree().