Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Polyhedron Demo

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Polyhedron Demo


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] Polyhedron Demo
  • Date: Thu, 20 Nov 2014 17:05:50 +0100
  • Organization: GeometryFactory

Try in the menu:
View -> Look at
x, y,z
to recenter the view at (x,y,z)

Sebastien.


On 11/20/2014 04:51 PM, Omer Ozturk wrote:
Hi,

I want to change or at least set the position of a polyhedron in the scene.
What I tried is the following;

I edited Scene.cpp/Scene::addItem() function like this;

Scene::Item_id Scene::addItem(Scene_item* item)
{

//Coordinate definitions
double posX, posY, posZ;

//Get the coordinates from user
std::cin posX posY posZ;

//Move polyhedron to the given coordinates
::gltranslatef(posX,posY,posZ);


//The rest is the same
m_entries.push_back(item);


connect(item, SIGNAL(itemChanged()),
this, SLOT(itemChanged()));
emit updated_bbox();
emit updated();
QAbstractListModel::reset();
Item_id id = m_entries.size() - 1;
emit newItem(id);



return id;
}

However I couldn't change the position of the object. I don't know if the
method I'm trying is correct but somehow I need to change the position of
the polyhedron. How can I do that? I'm new at CGAL and OpenGL and I couldn't
figure out to do this. Please help me.

Thanks.



--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Polyhedron-Demo-tp4660144.html
Sent from the cgal-discuss mailing list archive at Nabble.com.





Archive powered by MHonArc 2.6.18.

Top of Page