Page 1 of 1
[DONE] Camera placement
Posted: Thu Dec 16, 2010 12:20 pm
by VPO
Hello,
First of all thank you for sharing and the development of this software. It has already helped me a lot !
I notice a limitation in terms of camera's placement. Indeed, I would like to define " in hard" spatial position of the center of rotation by clicking a 3D point. This option is available ?
Hoping to have been sufficiently explicit.
Thank you in advance for your answers.
Sincerely,
Valentin
Re: Camera placement
Posted: Thu Dec 16, 2010 4:41 pm
by daniel
Interesting!
Two users asking the same thing the same day: we should definitively add this functionality!
The sole solution for changing camera 'placement' right now is to select one or more entity and to click on the "magnifier" icon (left toolbar). It will automatically center the camera on the center of gravity of the selection.
To do it "quick and dirty": we can simply activate at least the "camera translation" fields (Tx,Ty,Tz) in the camera parameters dialog (left toolbar) soon. As you can "pick" a point with the "point picking" tool (its coordinates are then displayed both on screen and in the console area), you could then recopy these coordinates in the translation fields. It should do the trick, at least temporarily.
I'll keep you informed.
Daniel
Re: Camera placement
Posted: Wed Jan 05, 2011 9:53 pm
by daniel
Ok, the 'camera parameters' dialog has been updated: now the user can set the 'pivot' point by specifying its 3 coordinates.
As you can also pick a point (with the 'camera parameters' dialog still active), you can copy its coordinates in those fields and you'll get the camera centered on a given point!
The next step will be to do this automatically... Meanwhile, I hope it will do the trick.
Daniel
Re: Camera placement
Posted: Tue Jan 11, 2011 1:29 pm
by VPO
Hello,
I just take the latest version of Cloud Compare and I made some manipulations on the camera position. The result is nice.
Thank you.
Sincerely,
Valentin
Re: Camera placement
Posted: Thu Jan 13, 2011 12:45 pm
by jfhullo
Thanks daniel for the improvment.
Re: Camera placement
Posted: Thu Feb 17, 2011 11:20 pm
by dktrudgett
I'm looking at coding an automated way for the user to set the rotation pivot point (i.e. to avoid the manual copy and pasting of values). Are there any suggestions about the preferred way this should be done? Or has any work been done on this since 2011-02-11?
Thanks,
David.
Re: Camera placement
Posted: Fri Feb 18, 2011 8:32 am
by daniel
Very good!
You should first look how the "point picking tool" works (ccPointPropertiesDlg or ccPointListPickingDlg).
I think a simple way to do it could be:
- Add a "ToolButton" to the camera dialog next to the camera center coordinates fields (with the "point picking" icon typically ;)
- When the user click on it, activate the point picking mechanism on the current window and connect the window 'point picked' signal to a new slot on this dialog
- When a point is picked, fill the coordinates fields with it (the standard process should then run as if the user had entered them himself)
- Deactivate the point picking mechanism
Here are some directions/hints:
- You can activate the point picking mechanism on a 3D window with the 'setPickingMode' method:
Code: Select all
win->setPickingMode(POINT_PICKING);
- To deactivate it:
Code: Select all
win->setPickingMode(DEFAULT_PICKING);
- The current 3D window is named 'associatedWin' in the ccCameraParamEditDlg class
- When the picking mechanism is activated, each time a point is selected, the window emit the 'pointPicked' signal
Code: Select all
//! Signal emitted in point picking mode to declare picking of a given point
/** \param cloudID cloud unique ID
\param pointIndex point index in cloud
**/
void pointPicked(int cloudUniqueID, unsigned pointIndex);
- To get the point coordinates, you just have to request the right point cloud to the DB (I've just added the 'dbRoot()' method to the MainWindow class to make this easier)
Code: Select all
ccHObject* obj = MainWindow::TheInstance()->dbRoot()->find(cloudID);
if (obj && obj->isKindOf(CC_POINT_CLOUD))
{
ccPointCloud* cloud = static_cast<ccPointCloud*>(obj);
const CCVector3* P = cloud->getPoint(pointIndex);
}
- Eventually, there's a mechanism to detect if the current window focus has changed, but for a first shot, you can forget it!
Don't hesitate to ask me for any precision and good luck!
Re: Camera placement
Posted: Wed Feb 23, 2011 12:32 am
by dktrudgett
Many thanks, Daniel! That should get me started. I'll certainly ask if I have any further questions.
David.
Re: Camera placement
Posted: Wed Apr 13, 2011 9:52 pm
by Dimitri
Hi all,
automatically positioning the center of rotation at picked point would be really great. This way you can navigate clouds with very large spatial extension. This works really well for instance in Leica Cyclone : you click on a specific icon (or you use a keyboard shortcut), the cursor changes to a target, you pick a point, and then you're centered and back to the noraml operation of the mouse (rotation, translation etc...).
Dim
Re: Camera placement
Posted: Thu Apr 14, 2011 12:57 pm
by daniel
I was waiting for updates about this functionnality from dktrudgett (who was willing to advance on this topic).
I might do it myself soon however.
Daniel