b3d5483564
- aggiornamento prototipi.
63 lines
2.9 KiB
C++
63 lines
2.9 KiB
C++
//----------------------------------------------------------------------------
|
|
// EgalTech 2024-2024
|
|
//----------------------------------------------------------------------------
|
|
// File : EGkIntersLineVolZmap.h Data : 22.02.24 Versione : 2.6b4
|
|
// Contenuto : Dichiarazione prototipi intersezione Linea/VolZmap.
|
|
//
|
|
//
|
|
//
|
|
// Modifiche : 22.02.24 DS Creazione modulo.
|
|
//
|
|
//
|
|
//----------------------------------------------------------------------------
|
|
|
|
#pragma once
|
|
|
|
#include "/EgtDev/Include/EGkVolZmap.h"
|
|
#include "/EgtDev/Include/EGkIntersLineTria.h"
|
|
|
|
//----------------------- Macro per import/export ----------------------------
|
|
#undef EGK_EXPORT
|
|
#if defined( I_AM_EGK) // da definirsi solo nella DLL
|
|
#define EGK_EXPORT __declspec( dllexport)
|
|
#else
|
|
#define EGK_EXPORT __declspec( dllimport)
|
|
#endif
|
|
|
|
//-----------------------------------------------------------------------------
|
|
// dati di intersezione linea - volume Zmap
|
|
struct IntLineZmapInfo {
|
|
int nILTT ; // Tipo di intersezione linea-triangolo
|
|
double dU ; // Distanza sulla linea
|
|
double dU2 ; // Seconda distanza sulla linea
|
|
int nVox ; // Indice del voxel del triangolo
|
|
int nBlock ; // Indice del blocco del triangolo
|
|
Triangle3d trTria ; // Triangolo
|
|
double dCosDN ; // Coseno dell'angolo tra la direzione della linea e la normale del triangolo
|
|
Point3d ptI ; // Punto di intersezione
|
|
Point3d ptI2 ; // Secondo punto di intersezione (termine di tratto sovrapposto)
|
|
// Costruttori
|
|
IntLineZmapInfo( void)
|
|
: nILTT( ILTT_NO), dU( 0), dU2( 0), nVox( -1), nBlock( -1), trTria(), dCosDN( 0), ptI(), ptI2() {}
|
|
IntLineZmapInfo( int nIL, double dUU, int nVx, int nBl, Triangle3d& trTr, double dCos, const Point3d& ptP)
|
|
: nILTT( nIL), dU( dUU), dU2( 0), nVox( nVx), nBlock( nBl), dCosDN( dCos), trTria( trTr), ptI( ptP), ptI2() {}
|
|
IntLineZmapInfo( int nIL, double dUU, double dUU2, int nVx, int nBl, Triangle3d& trTr, double dCos,
|
|
const Point3d& ptP, const Point3d& ptP2)
|
|
: nILTT( nIL), dU( dUU), dU2( dUU2), nVox( nVx), nBlock( nBl), trTria( trTr), dCosDN( dCos), ptI( ptP), ptI2( ptP2) {}
|
|
} ;
|
|
// Vettore di IntLineZmapInfo
|
|
typedef std::vector<IntLineZmapInfo> ILZIVECTOR ;
|
|
|
|
//-----------------------------------------------------------------------------
|
|
// Costanti tipo intersezione Linea VolZmap dopo filtraggio
|
|
enum LZiType { LZT_NONE = 0,
|
|
LZT_IN = 1,
|
|
LZT_OUT = 2,
|
|
LZT_TG_INI = 3,
|
|
LZT_TG_FIN = 4,
|
|
LZT_TOUCH = 5} ;
|
|
|
|
//-----------------------------------------------------------------------------
|
|
EGK_EXPORT bool IntersLineVolZmap( const Point3d& ptL, const Vector3d& vtL, const IVolZmap& Vzm, ILZIVECTOR& vInfo) ;
|
|
EGK_EXPORT bool FilterLineVolZmapInters( const ILZIVECTOR& vInfo, INTDBLVECTOR& vInters) ;
|