Include :
- aggiornamenti - nuovo header per gestore movimenti di regioni senza collisioni.
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2015-2016
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EGkSimpleCDSurfFrMove.h Data : 10.01.16 Versione : 1.6l7
|
||||
// Contenuto : Dichiarazione classe per movimento di superfici flat region
|
||||
// nel loro piano con semplice verifica di collisione
|
||||
// (ovvero controllando solo gli esterni).
|
||||
//
|
||||
// Modifiche : 23.09.15 DS Creazione modulo.
|
||||
//
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "/EgtDev/Include/EGkSurfFlatRegion.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
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Costanti per info su tipo di Semplice Collisione tra regioni piane
|
||||
const int SCI_NONE = 0 ; // non definito
|
||||
const int SCI_PNT_PNT = 1 ; // tra punto di mobile e punto di fissa
|
||||
const int SCI_PNT_LINE = 2 ; // tra punto di mobile e linea di fissa
|
||||
const int SCI_LINE_PNT = 3 ; // tra linea di mobile e punto di fissa
|
||||
const int SCI_LINE_LINE = 4 ; // tra linea di mobile e linea di fissa
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
struct SCollInfo
|
||||
{
|
||||
int nType ;
|
||||
int nIdM ;
|
||||
int nChunkM ;
|
||||
int nCrvM ;
|
||||
int nIdF ;
|
||||
int nChunkF ;
|
||||
int nCrvF ;
|
||||
Point3d ptP1 ; // punto di contatto
|
||||
Point3d ptP2 ; // se contatto linea-linea, secondo punto di contatto
|
||||
Vector3d vtDirM ; // se contatto del mobile con linea, sua direzione
|
||||
Vector3d vtDirF ; // se contatto del fisso con linea, sua direzione
|
||||
// costruttore
|
||||
SCollInfo() : nType( SCI_NONE), nIdM( GDB_ID_NULL), nChunkM( -1), nCrvM( -1),
|
||||
nIdF( GDB_ID_NULL), nChunkF( -1), nCrvF( -1), ptP1(), ptP2(), vtDirM(), vtDirF() {}
|
||||
} ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
class SimpleCDSurfFrMove
|
||||
{
|
||||
public :
|
||||
EGK_EXPORT SimpleCDSurfFrMove( const ISurfFlatRegion& SfrM, const ISurfFlatRegion& SfrF) ;
|
||||
|
||||
public :
|
||||
EGK_EXPORT bool Translate( const Vector3d& vtDir, double& dLen) ;
|
||||
EGK_EXPORT bool Rotate( const Point3d& ptCen, double& dAng) ;
|
||||
EGK_EXPORT const SCollInfo& GetSCollInfo()
|
||||
{ return m_SCollInfo ;}
|
||||
|
||||
private :
|
||||
const ISurfFlatRegion* m_pRegM ;
|
||||
const ISurfFlatRegion* m_pRegF ;
|
||||
SCollInfo m_SCollInfo ;
|
||||
} ;
|
||||
@@ -41,10 +41,6 @@ class __declspec( novtable) ISurfFlatRegion : public ISurf
|
||||
virtual bool GetChunkCentroid( int nChunk, Point3d& ptCen) const ;
|
||||
virtual bool GetCurveClassification( const ICurve& Crv, CRVCVECTOR& ccClass) const = 0 ;
|
||||
virtual int GetChunkSimpleClassification( int nChunk, const ISurfFlatRegion& Other, int nOthChunk) const ; // compare only outsides
|
||||
virtual bool TranslateSimpleNoCollision( const ISurfFlatRegion& Other, const Vector3d& vtDir,
|
||||
double& dLen) const = 0 ; // verify only outsides
|
||||
virtual bool RotateSimpleNoCollision( const ISurfFlatRegion& Other, const Point3d& ptCen,
|
||||
double& dAng) const = 0 ; // verify only outsides
|
||||
} ;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
@@ -465,6 +465,8 @@ EIN_EXPORT BOOL __stdcall EgtPackPartCluster( int nId[], int nCount, BOOL bReduc
|
||||
double dXmin, double dYmin, double dXmax, double dYmax, BOOL bBottomUp) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtMovePartCluster( int nId[], int nCount, BOOL bReducedCut, double vtMove[3],
|
||||
double dXmin, double dYmin, double dXmax, double dYmax) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtGetObstacleTangent( double vtTang[3]) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtGetMovingTangent( double vtTang[3]) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtRotatePartCluster( int nId[], int nCount, BOOL bReducedCut, const double ptCen[3], double* pdRotAngDeg,
|
||||
double dXmin, double dYmin, double dXmax, double dYmax) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtGetPartClusterCenterGlob( int nId[], int nCount, double ptCen[3]) ;
|
||||
|
||||
@@ -494,6 +494,8 @@ EXE_EXPORT bool ExePackPartCluster( const INTVECTOR& vIds, bool bReducedCut,
|
||||
double dXmin, double dYmin, double dXmax, double dYmax, bool bBottomUp) ;
|
||||
EXE_EXPORT bool ExeMovePartCluster( const INTVECTOR& vIds, bool bReducedCut, Vector3d& vtMove,
|
||||
double dXmin, double dYmin, double dXmax, double dYmax) ;
|
||||
EXE_EXPORT bool ExeGetObstacleTangent( Vector3d& vtTang) ;
|
||||
EXE_EXPORT bool ExeGetMovingTangent( Vector3d& vtTang) ;
|
||||
EXE_EXPORT bool ExeRotatePartCluster( const INTVECTOR& vIds, bool bReducedCut, const Point3d& ptCen, double& dRotAngDeg,
|
||||
double dXmin, double dYmin, double dXmax, double dYmax) ;
|
||||
EXE_EXPORT bool ExeGetPartClusterCenterGlob( const INTVECTOR& vIds, Point3d& ptCen) ;
|
||||
|
||||
Reference in New Issue
Block a user