mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-20 16:20:52 +01:00
Download patch
Init branch git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@3492 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
52
sources/qetgraphicsitem/binarygrid.h
Normal file
52
sources/qetgraphicsitem/binarygrid.h
Normal file
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* binarygrid.h
|
||||
*
|
||||
* Created on: 8 nov. 2014
|
||||
* Author: rene
|
||||
*/
|
||||
|
||||
#ifndef BINARYGRID_H_
|
||||
#define BINARYGRID_H_
|
||||
|
||||
#include "diagram.h"
|
||||
#include "conductor.h"
|
||||
#include "Mathlib.h"
|
||||
|
||||
typedef unsigned long long U64;
|
||||
|
||||
#define HORI 0x01
|
||||
#define VERT 0x02
|
||||
|
||||
class BinaryGrid {
|
||||
|
||||
public:
|
||||
BinaryGrid(Diagram * diagram);
|
||||
~BinaryGrid();
|
||||
|
||||
void reset();
|
||||
void build(Conductor*);
|
||||
void reBuild(Conductor*);
|
||||
|
||||
void computeFirstMask( double, U64* );
|
||||
void computeSecondMask( double, U64*);
|
||||
int computeFirstLine( double );
|
||||
int computeLastLine( double );
|
||||
|
||||
void debugGrid(int, int);
|
||||
void debugGrid();
|
||||
void add2grid( vec2d, vec2d, int );
|
||||
void orderVect( vec2d&, vec2d& );
|
||||
void add2grid( Conductor* );
|
||||
|
||||
bool testMask( U64*, int, int, int );
|
||||
bool test( vec2d, vec2d );
|
||||
bool computeMinSegment( vec2d, vec2d );
|
||||
|
||||
private:
|
||||
U64 bitHrzt[400][5];
|
||||
U64 bitVrtc[400][5];
|
||||
|
||||
Diagram* diagram;
|
||||
};
|
||||
|
||||
#endif /* BINARYGRID_H_ */
|
||||
Reference in New Issue
Block a user