|
|
|
@ -5,12 +5,8 @@ |
|
|
|
#include "../../hardware/soc/general/3DLRF.h" |
|
|
|
#include "../../components/base/basicLogCollection.h" |
|
|
|
|
|
|
|
#if defined( WIN32 ) || defined( __GUI__ ) |
|
|
|
#include "../../gui/gui.h" |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
typedef struct{ |
|
|
|
#if defined( __linux__ ) && !defined( __GUI__ ) |
|
|
|
typedef struct{ |
|
|
|
private: |
|
|
|
int16_t m_x; |
|
|
|
int16_t m_y; |
|
|
|
@ -24,24 +20,26 @@ typedef struct{ |
|
|
|
int16_t x( void ){ return m_x; }; |
|
|
|
int16_t y( void ){ return m_y; }; |
|
|
|
|
|
|
|
} simplePoint; |
|
|
|
|
|
|
|
#if defined( WIN32 ) || defined( __GUI__ ) |
|
|
|
} simplePoint; |
|
|
|
typedef struct{ |
|
|
|
uint8_t color[3]; |
|
|
|
QPoint *points; |
|
|
|
simplePoint *points; |
|
|
|
uint16_t count; |
|
|
|
} simplePolygone; |
|
|
|
|
|
|
|
typedef std::vector<simplePolygone *> vectorMasking; |
|
|
|
typedef std::vector<QPolygon *> vectorQPoly; |
|
|
|
typedef std::vector<simplePolygone *> vectorQPoly; |
|
|
|
#else |
|
|
|
typedef struct{ |
|
|
|
#include "../../gui/gui.h" |
|
|
|
typedef QPoint simplePoint; |
|
|
|
typedef QPolygon simplePolygone; |
|
|
|
typedef struct{ |
|
|
|
uint8_t color[3]; |
|
|
|
simplePoint *points; |
|
|
|
QPoint *points; |
|
|
|
uint16_t count; |
|
|
|
} simplePolygone; |
|
|
|
|
|
|
|
typedef std::vector<simplePolygone *> vectorMasking; |
|
|
|
typedef std::vector<QPolygon *> vectorQPoly; |
|
|
|
#endif |
|
|
|
|
|
|
|
typedef struct{ |
|
|
|
@ -66,18 +64,16 @@ class ShadowMask{ |
|
|
|
bool m_bActive; |
|
|
|
vectorMasking m_vVectorMask; |
|
|
|
bool m_bRasterized; |
|
|
|
#if defined( WIN32 ) || defined( __GUI__ ) |
|
|
|
#if defined( __linux__ ) && !defined( __GUI__ ) |
|
|
|
CSTR m_pRasterFileName; |
|
|
|
CSTR m_pVertexFileName; |
|
|
|
#endif |
|
|
|
public: |
|
|
|
ShadowMask(); |
|
|
|
~ShadowMask(); |
|
|
|
#if defined( WIN32 ) || defined( __GUI__ ) |
|
|
|
#if defined( __linux__ ) && !defined( __GUI__ ) |
|
|
|
bool loadRastered(CSTR fName = NULL); |
|
|
|
bool saveRastered(CSTR fName = NULL); |
|
|
|
#endif |
|
|
|
#if defined( __linux__ ) && !defined( __GUI__ ) |
|
|
|
bool saveVertexes(CSTR fName = NULL); |
|
|
|
bool loadVertexes(CSTR fName = NULL); |
|
|
|
#endif |
|
|
|
@ -89,10 +85,10 @@ class ShadowMask{ |
|
|
|
bool deletePoly( int ID ); |
|
|
|
uint8_t getPolyCount( void ){ return ( m_vVectorMask.size() & 0xFF ); }; |
|
|
|
uint16_t getRayCount( void ){ return ( m_vZoneMask.size() & 0xFFFF ); }; |
|
|
|
#if defined( WIN32 ) || defined( __GUI__ ) |
|
|
|
#if defined( __linux__ ) && !defined( __GUI__ ) |
|
|
|
bool rasterizeVertexes( void ); |
|
|
|
bool getQPoly( vectorQPoly &VM ); |
|
|
|
bool addVertex( uint16_t polyID, QPoint SP ); |
|
|
|
bool addVertex( uint16_t polyID, simplePoint SP ); |
|
|
|
bool addVertex( uint16_t polyID, uint32_t SP ); // Binary Data to Vertex |
|
|
|
#endif |
|
|
|
bool isOutside( uint16_t x, uint16_t y ); |
|
|
|
|