/*
* Function Objective
* Figuru saga,sola yurutup saga sola dondurebilir ve zıplatabilir.
* Pre: Figurun yonunu, o anlık pozisyonunu, o anki goruntusunu alir 
* ve hareket stringini alir.
* Post: Cin Ali kullanicinin secimine gore hareket etmis olur.
*/
void move(int currentPosition, courses direction, char character[][WIDTH], void posture(char [][WIDTH]))
{
    system("clear");
    deleteCinAli(character);
    posture(character);
    printCinAli(currentPosition, character);
    wait(WAITING_TIME);
}
Beispiel #2
0
Properties CmpSimulation::save() const
{
	Properties properties;
	properties.set("BoundsGroup", bounds_group());
	properties.set("DampingFactor", m_physicsObject->damping_factor());
	properties.set("GravityStrength", m_gravityStrength);
	properties.set("InverseMass", m_physicsObject->inverse_mass());
	properties.set("Material", m_physicsObject->material());
	properties.set("Position", position());
	properties.set("Posture", posture());
	properties.set("Velocity", velocity());
	return properties;
}
    void TestOne::
    init(double gui_dimx, double gui_dimy)
    {
      h_ee_.point_     << gui_dimx / 2.0 - 1.0, gui_dimy / 2.0      ,     0.0;
      h_ee_ori_.point_ << gui_dimx / 2.0 + 1.0, gui_dimy / 2.0 + 1.0,     0.0;
      h_base_.point_   << gui_dimx / 2.0      ,                  1.0,     0.0;
      
      Vector posture(5);
      posture <<
	gui_dimx / 2.0,
	gui_dimy / 2.0,
	80.0 * deg,
	- 40.0 * deg,
	25.0 * deg;
      robot_.update(posture, Vector::Zero(posture.size()));
      compound_objective_.init(robot_);
    }
    void FirstInteractiveCompound::
    init(double gui_dimx, double gui_dimy)
    {
      h_ee_.point_         <<             1.0, gui_dimy / 2.0      ,     0.0;
      h_ee_ori_.point_     <<             2.0, gui_dimy / 2.0 + 1.0,     0.0;
      h_base_.point_       <<             1.0,                  1.0,     0.0;
      h_repulsor_.point_   <<  gui_dimx / 2.0,                  1.0,     0.0;
      h_obstacle_.point_   <<  gui_dimx / 2.0,       gui_dimy - 1.0,     0.0;
      
      Vector posture(5);
      posture <<
	gui_dimx / 2.0,
	gui_dimy / 2.0,
	80.0 * deg,
	- 40.0 * deg,
	25.0 * deg;
      robot_.update(posture, Vector::Zero(posture.size()));
      compound_objective_.init(robot_);
    }