You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.7 KiB
C++

#pragma once
#include "ObjContainer.h"
//阵列用参数
struct SArrayPar{
public:
SArrayPar()
{
m_bRectArray = true;//是否为矩形阵列
m_bCircleArray = false;
m_bFillArray = false;
m_ArrayCntH = 10;//阵列行数
m_ArrayCntV = 1;//阵列行数
m_ArrayOffsetH = 20;//横向间距
m_ArrayOffsetV = 1;//纵向间距
m_ArrayCnt = 36;//圆形阵列的数量
m_Radius = 10;//阵列半径
m_StartAngle = 90;//阵列开始角度
m_GapAngle = 10;//阵列间隔角度(360 度角)
m_FillOffset = -0.1;
m_FillCnt = 1000;
}
public:
bool m_bRectArray;//是否为矩形阵列
bool m_bCircleArray;
bool m_bFillArray;
int m_ArrayCntH;//阵列行数
int m_ArrayCntV;//阵列列数
double m_ArrayOffsetH;//横向间距
double m_ArrayOffsetV;//纵向间距
int m_ArrayCnt;//圆形阵列的数量
double m_Radius;//阵列半径
double m_StartAngle;//阵列开始角度(360 度角)
double m_GapAngle;//阵列间隔角度(360 度角)
double m_FillOffset;
int m_FillCnt;
};
class CArrayMgr
{
public:
CArrayMgr(void);
~CArrayMgr(void);
void Creat(SArrayPar &par);
private:
void RectCreat(SArrayPar &ArrayPar);
void CircleCreat(SArrayPar &ArrayPar);
void FillCreat(SArrayPar &ArrayPar);
void CreatCmd();
private:
CObjContainer m_ObjContainer;
};