예제 #1
0
bool MgEllipse::setCircle3P(const Point2d& start, const Point2d& point, const Point2d& end)
{
    Point2d center;
    float radius;
    
    return (mgcurv::arc3P(start, point, end, center, radius)
            && setCircle(center, radius));
}
예제 #2
0
void AngleInterval::setCosLess(Real y)
{
  if(y < -One) setEmpty();
  else if(y >= One) setCircle();
  else {
    c=Acos(y);
    d=TwoPi-Two*c;
  }
}
예제 #3
0
void AngleInterval::setSinLess(Real y)
{
  if(y < -One) setEmpty();
  else if(y >= One) setCircle();
  else {
    c=Asin(y);
    d=Pi+c;
    c=Pi-c;
  }
}
예제 #4
0
void AngleInterval::setCosGreater(Real y)
{
  if(y >= One) setEmpty();
  else if(y <= -One) setCircle();
  else {
    c=Acos(y);
    d=c+c;
    c=AngleNormalize(-c);
  }
}
예제 #5
0
void AngleInterval::setSinGreater(Real y)
{
  if(y > One) setEmpty();
  else if(y <= -One) setCircle();
  else {
    c=Asin(y);
    d=Pi-c;
    c=AngleNormalize(c);
  }
}
예제 #6
0
파일: text.cpp 프로젝트: SSMN/MuseScore
bool Text::readProperties(XmlReader* r)
      {
      MString8 tag = r->tag();
      QString val;
      int i;
      qreal d;
      Color color;

      if (r->readString("style", &val)) {
            setTextStyle(score()->style().textStyleType(val));
            if (textStyle() != TEXT_STYLE_INVALID)
                  _styled = true;
            }
      else if (r->readInt("spatiumSizeDependent", &i)) {
            setSizeIsSpatiumDependent(i);
            _styled = false;
            }
      else if (r->readInt("frame", &i)) {
            setHasFrame(i);
            _styled = false;
            }
      else if (r->readString("text", &val))
            setText(val);
      else if (tag == "frameWidth") {
            setFrameWidth(val.toDouble());
            setHasFrame(true);
            _styled = false;
            }
      else if (r->readReal("paddingWidth", &d)) {
            setPaddingWidth(d);
            _styled = false;
            }
      else if (r->readColor("frameColor", &color)) {
//            setFrameColor(readColor(e));
            _styled = false;
            }
      else if (r->readInt("frameRound", &i)) {
            setFrameRound(i);
            _styled = false;
            }
      else if (r->readInt("circle", &i)) {
            setCircle(i);
            _styled = false;
            }
      else if (_localStyle.readProperties(r))
            _styled = false;
      else if (!Element::readProperties(r))
            return false;
      return true;
      }
예제 #7
0
void createDots(sf::CircleShape *dot, sf::Vector2f windowCenter)
{
	//настройка точек
	for (int i = 0; i<60; i++)
	{
		x = int((clockCircleSize - 10) * cos(angle));
		y = int((clockCircleSize - 10) * sin(angle));
		if (i % 5 == 0)
			dot[i] = sf::CircleShape(3);
		else
			dot[i] = sf::CircleShape(1);
		setCircle(&dot[i], 12, 1, sf::Color::Blue, 1, x + windowCenter.x, y + windowCenter.y);
		angle = angle + ((2 * PI) / 60);
	}
}
예제 #8
0
bool MgEllipse::setCircle2P(const Point2d& start, const Point2d& end)
{
    return setCircle((start + end) / 2, start.distanceTo(end) / 2);
}
예제 #9
0
Circle::Circle( ){
  setCircle( Vector2D(-1000.0,-1000.0), 0);
}
예제 #10
0
Circle::Circle( Vector2D pos, float dR ){
  setCircle( pos, dR );
}
예제 #11
0
파일: OsiCircle.cpp 프로젝트: ddcien/dbIris
 void OsiCircle::setCircle ( int rCenterX , int rCenterY , int rRadius )
 {
     setCircle(cvPoint(rCenterX,rCenterY),rRadius) ;
 }
예제 #12
0
int main()
{
	//устанавливаем уровень сглаживания
	sf::ContextSettings settings;
	settings.antialiasingLevel = 8;

	//создаем окно приложения
	sf::RenderWindow window(sf::VideoMode(screenWidth, screenHeight), "My Analog Clock", sf::Style::Close, settings);
	float windowX = float(window.getSize().x);
	float windowY = float(window.getSize().y);

	//Определяем центр окна
	sf::Vector2f windowCenter = sf::Vector2f(windowX / 2.0f, windowY / 2.0f);

	//создаем точки
	sf::CircleShape dot[60];
	createDots(dot,windowCenter);

	//создаем внешний контур
	sf::CircleShape clockCircle(clockCircleSize);

	//настраиваем внешний контур
	setCircle(&clockCircle,100, clockCircleThickness, sf::Color::Black,0, windowX / 2 + clockCircleThickness, windowY / 2 + clockCircleThickness);

	//создаем центральный круг
	sf::CircleShape centerCircle(10);

	//настраиваем центральный круг
	setCircle(&centerCircle, 100, 1, sf::Color::Yellow,1, windowX / 2, windowY / 2);

	//создаем стрелки
	sf::RectangleShape hourHand(sf::Vector2f(5, 150));
	sf::RectangleShape minuteHand(sf::Vector2f(3, 200));
	sf::RectangleShape secondsHand(sf::Vector2f(2, 220));

	//массив стрелок
	sf::RectangleShape *strelki[3];
	strelki[0] = &hourHand;
	strelki[1] = &minuteHand;
	strelki[2] = &secondsHand;

	//настройка стрелок
	setStrelki(strelki, windowCenter);

	//задний фон часов
	sf::Texture clockImage;
	if (!clockImage.loadFromFile("C:/Workshpase/Clock/fon.jpg"))
	{
		return EXIT_FAILURE;
	}
	clockCircle.setTexture(&clockImage);
	clockCircle.setTextureRect(sf::IntRect(40, 0, 500, 500));	

	while (window.isOpen())
	{
		sf::Event event;
		while (window.pollEvent(event))
		{
			if (event.type == sf::Event::Closed)
				window.close();
		}

		//Поворачиваем стрелки
		moveStrelki(strelki);

		//Отрисовываем
		drawing(&window, dot, strelki, clockCircle, centerCircle);
	}

	return EXIT_SUCCESS;
}
예제 #13
0
파일: window.cpp 프로젝트: chichichap/Cpp
Window::Window()
{
    setWindowTitle(tr("CSC 205 Assignment 1"));

    // define our drawing widget (see GLWidget.h / .cpp)
    glWidget = new GLWidget;

    menubar = new QMenuBar;
    QMenu *file = new QMenu("&File");
    QMenu *edit = new QMenu("&Edit");
    menubar->addMenu(file);
    menubar->addMenu(edit);

    QAction *quitAct = new QAction(tr("&Close"), this);
    file->addAction(quitAct);

    // define our color sliders
    hSlider = new QSlider(Qt::Horizontal);
    sSlider = new QSlider(Qt::Horizontal);
    vSlider = new QSlider(Qt::Horizontal);

    rSlider = new QSlider(Qt::Horizontal);
    gSlider = new QSlider(Qt::Horizontal);
    bSlider = new QSlider(Qt::Horizontal);

    // added slider
    bSizeSlider = new QSlider(Qt::Horizontal);

    // configure our color sliders
    hSlider->setRange(0,360);
    hSlider->setTickInterval(360/8);
    hSlider->setTickPosition(QSlider::TicksBelow);
    hSlider->setMinimumWidth(200);


    sSlider->setRange(0,100);
    sSlider->setTickInterval(100/8);
    sSlider->setTickPosition(QSlider::TicksBelow);

    vSlider->setRange(0,100);
    vSlider->setTickInterval(100/8);
    vSlider->setTickPosition(QSlider::TicksBelow);

    rSlider->setRange(0,255);
    rSlider->setTickInterval(255/8);
    rSlider->setTickPosition(QSlider::TicksBelow);

    gSlider->setRange(0,255);
    gSlider->setTickInterval(255/8);
    gSlider->setTickPosition(QSlider::TicksBelow);

    bSlider->setRange(0,255);
    bSlider->setTickInterval(255/8);
    bSlider->setTickPosition(QSlider::TicksBelow);

    bSizeSlider->setRange(2,80);
    bSizeSlider->setTickInterval(80/6);
    bSizeSlider->setTickPosition(QSlider::TicksBelow);

    // labels for our sliders
    hLabel = new QLabel("0");
    sLabel = new QLabel("0");
    vLabel = new QLabel("0");

    rLabel = new QLabel("0");
    gLabel = new QLabel("0");
    bLabel = new QLabel("0");

    bSizeLabel = new QLabel("2");


    // The main (biggest) layout for our screen is a horizontal layout
    // This means items added to this layout will be added horizontally
    QHBoxLayout *mainLayout = new QHBoxLayout;

    // add our drawing widget as the first (leftmost) widget in our horizontal layout
    mainLayout->addWidget(glWidget);

    // our sliders are going to be in a vertical column
    QVBoxLayout *sliderLayout = new QVBoxLayout;
    sliderLayout->setAlignment(Qt::AlignTop);
    sliderLayout->setSizeConstraint(QLayout::SizeConstraint());

    // each slider has 2 labels below it in a horizontal box
    QHBoxLayout *hLabels = new QHBoxLayout;
    // first is just a name that never changes
    hLabels->addWidget(new QLabel(QString("Hue")));
    // we keep a reference to the next one because it's the label we're going to use to show
    // the value of this slider, and we'll need to update it accordingly
    hLabels->addWidget(hLabel);


    QHBoxLayout *sLabels = new QHBoxLayout;
    sLabels->addWidget(new QLabel(QString("Saturation")));
    sLabels->addWidget(sLabel);

    QHBoxLayout *vLabels = new QHBoxLayout;
    vLabels->addWidget(new QLabel(QString("Value")));
    vLabels->addWidget(vLabel);

    QHBoxLayout *rLabels = new QHBoxLayout;
    rLabels->addWidget(new QLabel(QString("Red")));
    rLabels->addWidget(rLabel);

    QHBoxLayout *gLabels = new QHBoxLayout;
    gLabels->addWidget(new QLabel(QString("Green")));
    gLabels->addWidget(gLabel);

    QHBoxLayout *bLabels = new QHBoxLayout;
    bLabels->addWidget(new QLabel(QString("Blue")));
    bLabels->addWidget(bLabel);

    QHBoxLayout *bSizeLabels = new QHBoxLayout;
    bSizeLabels->addWidget(new QLabel(QString("Brush Size")));
    bSizeLabels->addWidget(bSizeLabel);


    // we're going to have a box that shows the currently selected color
    // this is that box
    colorFrame = new QFrame;
    colorFrame->setFrameStyle(QFrame::Panel | QFrame::Raised);
    colorFrame->setLineWidth(2);
    colorFrame->setAutoFillBackground(true);
    colorFrame->setMinimumHeight(75);
    colorFrame->setMinimumWidth(75);

    // this is how we change the color of a QFrame
    QPalette pal = colorFrame->palette();
    pal.setColor(colorFrame->backgroundRole(), QColor(0,0,0));
    colorFrame->setPalette(pal);

    // add all of our sliders and our color box to our vertical slider layout
    sliderLayout->addWidget(hSlider);
    sliderLayout->addLayout(hLabels);

    sliderLayout->addWidget(sSlider);
    sliderLayout->addLayout(sLabels);

    sliderLayout->addWidget(vSlider);
    sliderLayout->addLayout(vLabels);

    sliderLayout->addWidget(colorFrame);

    sliderLayout->addWidget(rSlider);
    sliderLayout->addLayout(rLabels);

    sliderLayout->addWidget(gSlider);
    sliderLayout->addLayout(gLabels);

    sliderLayout->addWidget(bSlider);
    sliderLayout->addLayout(bLabels);

    sliderLayout->addSpacing(30);
    sliderLayout->addWidget(bSizeSlider);
    sliderLayout->addLayout(bSizeLabels);

    // add the slider layout to the main layout
    mainLayout->addLayout(sliderLayout);

    QGridLayout *buttonsLayout = new QGridLayout;
    QPushButton *rectButton[14];

    //declare buttons
    rectButton[0] = new QPushButton("Brush 1");
    rectButton[1] = new QPushButton("Brush 2");
    rectButton[2] = new QPushButton("Brush 3");
    rectButton[3] = new QPushButton("Brush 4");
    rectButton[4] = new QPushButton("Bresenham's Line");
    rectButton[5] = new QPushButton("Wu's Line");
    rectButton[6] = new QPushButton("Rectangle");
    rectButton[7] = new QPushButton("Filled Rectangle");
    rectButton[8] = new QPushButton("Circle");
    rectButton[9] = new QPushButton("Filled Circle");
    rectButton[10] = new QPushButton("Polygon");
    rectButton[11] = new QPushButton("Filled Polygon");
    rectButton[12] = new QPushButton("Edit a Vertex");
    rectButton[13] = new QPushButton("Clear");

    for (int i=0; i < 14; i++)
        buttonsLayout->addWidget(rectButton[i], i/2, i%2, Qt::AlignTop);

    sliderLayout->addLayout(buttonsLayout);
    setLayout(mainLayout);

    /*  Connections between our sliders and their labels */
    connect(hSlider, SIGNAL(valueChanged(int)), hLabel, SLOT(setNum(int)));
    connect(bSizeSlider, SIGNAL(valueChanged(int)), bSizeLabel, SLOT(setNum(int)));

    // had to use a special method for saturation and value because sliders go from 0 - 100 and we want 0 - 1
    connect(sSlider, SIGNAL(valueChanged(int)), this, SLOT(updateSVal(int)));
    connect(vSlider, SIGNAL(valueChanged(int)), this, SLOT(updateVVal(int)));

    connect(rSlider, SIGNAL(valueChanged(int)), rLabel, SLOT(setNum(int)));
    connect(gSlider, SIGNAL(valueChanged(int)), gLabel, SLOT(setNum(int)));
    connect(bSlider, SIGNAL(valueChanged(int)), bLabel, SLOT(setNum(int)));

    connect(hSlider, SIGNAL(valueChanged(int)), this, SLOT(hsvChanged()));
    connect(sSlider, SIGNAL(valueChanged(int)), this, SLOT(hsvChanged()));
    connect(vSlider, SIGNAL(valueChanged(int)), this, SLOT(hsvChanged()));

    connect(rSlider, SIGNAL(valueChanged(int)), this, SLOT(rgbChanged()));
    connect(gSlider, SIGNAL(valueChanged(int)), this, SLOT(rgbChanged()));
    connect(bSlider, SIGNAL(valueChanged(int)), this, SLOT(rgbChanged()));

    connect(bSizeSlider, SIGNAL(valueChanged(int)), glWidget, SLOT(setSize(int)));

    connect(this, SIGNAL(colorChanged(RGBColor)), glWidget, SLOT(setColor(RGBColor)));

    connect(rectButton[0], SIGNAL(clicked()), glWidget, SLOT(setBrush1() ));
    connect(rectButton[1], SIGNAL(clicked()), glWidget, SLOT(setBrush2() ));
    connect(rectButton[2], SIGNAL(clicked()), glWidget, SLOT(setBrush3() ));
    connect(rectButton[3], SIGNAL(clicked()), glWidget, SLOT(setBrush4() ));
    connect(rectButton[4], SIGNAL(clicked()), glWidget, SLOT(setBresenhamLine() ));
    connect(rectButton[5], SIGNAL(clicked()), glWidget, SLOT(setWuLine() ));
    connect(rectButton[6], SIGNAL(clicked()), glWidget, SLOT(setRectangle() ));
    connect(rectButton[7], SIGNAL(clicked()), glWidget, SLOT(setFillRectangle() ));
    connect(rectButton[8], SIGNAL(clicked()), glWidget, SLOT(setCircle() ));
    connect(rectButton[9], SIGNAL(clicked()), glWidget, SLOT(setFillCircle() ));
    connect(rectButton[10], SIGNAL(clicked()), glWidget, SLOT(setPolygon() ));
    connect(rectButton[11], SIGNAL(clicked()), glWidget, SLOT(setFillPolygon() ));
    connect(rectButton[12], SIGNAL(clicked()), glWidget, SLOT(setEditVertex() ));
    connect(rectButton[13], SIGNAL(clicked()), glWidget, SLOT(clear() ));

    connect(quitAct, SIGNAL(triggered()), this, SLOT(close()));
}
예제 #14
0
int main(int argc, const char* argv[])
{
    if(argc != 5)
        return EXIT_FAILURE;

    SDL_Surface* p_screen = init_map(TABLE_LENGTH/GRID_SIZE, TABLE_WIDTH/GRID_SIZE, 2);
    //Create the table
    node_s ** p_table = NULL;
    //memory allocation
    p_table = createTable(TABLE_LENGTH/GRID_SIZE , TABLE_WIDTH/GRID_SIZE);

    //initialize the table
    initialiseTable(p_table, TABLE_LENGTH/GRID_SIZE, TABLE_WIDTH/GRID_SIZE);

    uint16_t robot_length = 30;
    uint16_t robot_width = 30;
    uint16_t half_width = robot_width/2 + (GRID_SIZE-1);
    uint8_t grid_half_width = (half_width / GRID_SIZE) + 1;
    uint16_t half_diag = (uint16_t) (sqrtf((robot_length * robot_length) + (robot_width * robot_width)) / 2) + (GRID_SIZE-1);
    uint8_t grid_half_diag = half_diag / GRID_SIZE;

    //Fill the table

    //expand walls soft
    setRectangle(p_table, TABLE_LENGTH / GRID_SIZE, grid_half_diag, 0, 0, SOFT_OBSTACLE);
    setRectangle(p_table, TABLE_LENGTH / GRID_SIZE, grid_half_diag, 0, TABLE_WIDTH/GRID_SIZE - grid_half_diag, SOFT_OBSTACLE);
    setRectangle(p_table, grid_half_diag, TABLE_WIDTH / GRID_SIZE, 0, 0, SOFT_OBSTACLE);
    setRectangle(p_table, grid_half_diag, TABLE_WIDTH / GRID_SIZE, TABLE_LENGTH / GRID_SIZE - grid_half_diag, 0, SOFT_OBSTACLE);

    // Expand dune soft
    setRectangle(p_table, grid_half_diag, 20/GRID_SIZE, 80/GRID_SIZE - grid_half_diag, 0/GRID_SIZE, SOFT_OBSTACLE);
    setRectangle(p_table, grid_half_diag, 20/GRID_SIZE, 80/GRID_SIZE + 1, 0/GRID_SIZE, SOFT_OBSTACLE);
    setCircle(p_table, 81/GRID_SIZE, 20/GRID_SIZE, (half_diag + 1) / GRID_SIZE, SOFT_OBSTACLE);
    setRectangle(p_table, grid_half_diag, 20/GRID_SIZE, 220/GRID_SIZE - grid_half_diag, 0/GRID_SIZE, SOFT_OBSTACLE);
    setRectangle(p_table, grid_half_diag, 20/GRID_SIZE, 220/GRID_SIZE + 1, 0/GRID_SIZE, SOFT_OBSTACLE);
    setCircle(p_table, 221/GRID_SIZE, 20/GRID_SIZE, (half_diag + 1) / GRID_SIZE, SOFT_OBSTACLE);

    //Central T soft
    setRectangle(p_table, 120/GRID_SIZE, grid_half_diag, 90/GRID_SIZE, 75/GRID_SIZE - grid_half_diag, SOFT_OBSTACLE);
    setRectangle(p_table, 120/GRID_SIZE, grid_half_diag, 90/GRID_SIZE, 75/GRID_SIZE + 1, SOFT_OBSTACLE);
    setCircle(p_table, 90/GRID_SIZE, 76/GRID_SIZE, (half_diag + 1) / GRID_SIZE, SOFT_OBSTACLE);
    setCircle(p_table, 210/GRID_SIZE, 76/GRID_SIZE, (half_diag + 1) / GRID_SIZE, SOFT_OBSTACLE);
    setRectangle(p_table, grid_half_diag, 60/GRID_SIZE, 147/GRID_SIZE - grid_half_diag, 75/GRID_SIZE, SOFT_OBSTACLE);
    setRectangle(p_table, grid_half_diag, 60/GRID_SIZE, 147/GRID_SIZE + 1, 75/GRID_SIZE, SOFT_OBSTACLE);
    setCircle(p_table, 150/GRID_SIZE, 135/GRID_SIZE, (half_diag + 2) / GRID_SIZE, SOFT_OBSTACLE);

    //iles soft
    setCircle(p_table, 0/GRID_SIZE, 200/GRID_SIZE, (25 + half_diag)/GRID_SIZE, SOFT_OBSTACLE);
    setCircle(p_table, 300/GRID_SIZE, 200/GRID_SIZE, (25 + half_diag)/GRID_SIZE, SOFT_OBSTACLE);

    // Expand walls forbidden
    setRectangle(p_table, TABLE_LENGTH / GRID_SIZE, grid_half_width, 0, 0, FORBIDDEN);
    setRectangle(p_table, TABLE_LENGTH / GRID_SIZE, grid_half_width, 0, TABLE_WIDTH/GRID_SIZE - grid_half_width, FORBIDDEN);
    setRectangle(p_table, grid_half_width, TABLE_WIDTH / GRID_SIZE, 0, 0, FORBIDDEN);
    setRectangle(p_table, grid_half_width, TABLE_WIDTH / GRID_SIZE, TABLE_LENGTH / GRID_SIZE - grid_half_width, 0, FORBIDDEN);

    //expand dune forbidden
    setRectangle(p_table, grid_half_width, 20/GRID_SIZE, 80/GRID_SIZE - grid_half_width, 0/GRID_SIZE, FORBIDDEN);
    setRectangle(p_table, grid_half_width, 20/GRID_SIZE, 80/GRID_SIZE + 1, 0/GRID_SIZE, FORBIDDEN);
    setCircle(p_table, 81/GRID_SIZE, 20/GRID_SIZE, (half_width + 1) / GRID_SIZE, FORBIDDEN);
    setRectangle(p_table, grid_half_width, 20/GRID_SIZE, 220/GRID_SIZE - grid_half_width, 0/GRID_SIZE, FORBIDDEN);
    setRectangle(p_table, grid_half_width, 20/GRID_SIZE, 220/GRID_SIZE + 1, 0/GRID_SIZE, FORBIDDEN);
    setCircle(p_table, 221/GRID_SIZE, 20/GRID_SIZE, (half_width + 1) / GRID_SIZE, FORBIDDEN);

    //Central T forbidden
    setRectangle(p_table, 120/GRID_SIZE, grid_half_width, 90/GRID_SIZE, 75/GRID_SIZE - grid_half_width, FORBIDDEN);
    setRectangle(p_table, 120/GRID_SIZE, grid_half_width, 90/GRID_SIZE, 75/GRID_SIZE + 1, FORBIDDEN);
    setCircle(p_table, 90/GRID_SIZE, 76/GRID_SIZE, (half_width + 1) / GRID_SIZE, FORBIDDEN);
    setCircle(p_table, 210/GRID_SIZE, 76/GRID_SIZE, (half_width + 1) / GRID_SIZE, FORBIDDEN);
    setRectangle(p_table, grid_half_width, 60/GRID_SIZE, 147/GRID_SIZE - grid_half_width, 75/GRID_SIZE, FORBIDDEN);
    setRectangle(p_table, grid_half_width, 60/GRID_SIZE, 147/GRID_SIZE + 1, 75/GRID_SIZE, FORBIDDEN);
    setCircle(p_table, 150/GRID_SIZE, 135/GRID_SIZE, (half_width + 2) / GRID_SIZE, FORBIDDEN);

    //iles forbidden
    setCircle(p_table, 0/GRID_SIZE, 200/GRID_SIZE, (25 + half_width)/GRID_SIZE, FORBIDDEN);
    setCircle(p_table, 300/GRID_SIZE, 200/GRID_SIZE, (25 + half_width)/GRID_SIZE, FORBIDDEN);

    //dune obstacle
    setRectangle(p_table, 2/GRID_SIZE, 20/GRID_SIZE, 80/GRID_SIZE, 0/GRID_SIZE, OBSTACLE);
    setRectangle(p_table, 2/GRID_SIZE, 20/GRID_SIZE, 220/GRID_SIZE, 0/GRID_SIZE, OBSTACLE);

    // central T obstacle
    setRectangle(p_table, 120/GRID_SIZE, 2/GRID_SIZE, 90/GRID_SIZE, 75/GRID_SIZE, OBSTACLE);
    setRectangle(p_table, 6/GRID_SIZE, 60/GRID_SIZE, 147/GRID_SIZE, 75/GRID_SIZE, OBSTACLE);

    //iles obstacle
    setCircle(p_table, 0/GRID_SIZE, 200/GRID_SIZE, 25/GRID_SIZE, OBSTACLE);
    setCircle(p_table, 300/GRID_SIZE, 200/GRID_SIZE, 25/GRID_SIZE, OBSTACLE);

    if(!setStartNode(p_table, atoi(argv[1]), atoi(argv[2])))
        if(!setTargetNode(p_table, atoi(argv[3]), atoi(argv[4])))
            startMainLoop(p_table, p_screen, 2);

    draw_map(p_table, TABLE_LENGTH/GRID_SIZE, TABLE_WIDTH/GRID_SIZE, 2, p_screen);
    sdl_pause();
    quit_map();
    return EXIT_SUCCESS;
}
예제 #15
0
파일: Circle.hpp 프로젝트: dparks1134/Art
	Circle(const Point& centre, int radius) { setCircle(centre, radius); }