You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
76 lines
1.8 KiB
76 lines
1.8 KiB
10 months ago
|
#pragma once
|
||
|
|
||
|
#ifdef _WIN32
|
||
|
#ifdef WIREROUTINGDLL_EXPORTS // VisualStudio DLL ��Ŀģ���Ὣ <PROJECTNAME>_EXPORTS ���ӵ�����Ԥ�������ꡣ
|
||
|
#define BUNDLE_API __declspec(dllexport) // _WIN32
|
||
|
#else
|
||
|
#define BUNDLE_API __declspec(dllimport)
|
||
|
#endif
|
||
|
#else
|
||
|
#define BUNDLE_API
|
||
|
#endif
|
||
|
|
||
|
#include "Path.h"
|
||
|
#include<cmath>
|
||
|
#include<vector>
|
||
|
#include<queue>
|
||
|
#include<map>
|
||
|
#include<iostream>
|
||
|
#include<fstream>
|
||
|
#include<sstream>
|
||
|
using namespace std;
|
||
|
|
||
|
|
||
|
//ʹ�������洢ͨ�����ݽṹ��BundleNode�������ڵ�
|
||
|
struct BUNDLE_API BundleNode{
|
||
|
Clip *pc; //ָ��
|
||
|
BranchPoint *pb; //ָ����֧��
|
||
|
Connector *pcn; //ָ��������
|
||
|
int type; //0����������1������֧��,2����������
|
||
|
BundleNode *pre,*next; //�����е����½ڵ�
|
||
|
int inOut; //��������������Ϊ0������Ϊ1
|
||
|
int rev; //ͨ���ڵ��Դ������Ƿ�������
|
||
|
int bundleID; //BundleNode������BundleID
|
||
|
int id; //BundleNode������id
|
||
|
vector<int> vb; //ָ�����ڱ�ͨ���εķ�֧�㼯��
|
||
|
|
||
|
BundleNode();
|
||
|
P coord();
|
||
|
};
|
||
|
|
||
|
extern BundleNode BUNDLE_API bdNode[MAXPointNum];
|
||
|
extern int BUNDLE_API bdNodeNum; //������ά��BundleNode��Ϣ
|
||
|
|
||
|
|
||
|
//������������ͨ������Ϣ
|
||
|
struct BUNDLE_API Bundle{
|
||
|
|
||
|
int id; //bundle�ı���
|
||
|
int length; //�ܵ���
|
||
|
bool abandoned; //��������bundle�Ѿ����ϲ�
|
||
|
BundleNode *head,*tail; //ͨ����ͷβ�ڵ�
|
||
|
|
||
|
void init();
|
||
|
Bundle();
|
||
|
|
||
|
//����һ����֧��,��ʼ������������ָ������������Ϣ
|
||
|
static BundleNode* createBundleNode(P& tp,int inOut,int bundleID);
|
||
|
|
||
|
//���ݼ���·������һ��Bundle
|
||
|
Bundle(Path& path,int bundleID);
|
||
|
|
||
|
//�������ڵ��Ƿ�֧�㣬���ط�֧���ı��ţ�����0
|
||
|
int startBranchPoint();
|
||
|
|
||
|
//����β���ڵ��Ƿ�֧�㣬���ط�֧���ı��ţ�����0
|
||
|
int endBranchPoint();
|
||
|
|
||
|
|
||
|
//����������Ϣ
|
||
|
void updateOutput(vector<vector<pair<int,int> > >& resClip,
|
||
|
vector<vector<int> >& resBranchPoint,
|
||
|
vector<int>& startBranchPoint,
|
||
|
vector<int>& endBranchPoint,
|
||
|
bool basic=false);
|
||
|
};
|