Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get the current Camera Position? #126

Closed
WuhanMonkey opened this issue Aug 7, 2015 · 3 comments
Closed

How to get the current Camera Position? #126

WuhanMonkey opened this issue Aug 7, 2015 · 3 comments

Comments

@WuhanMonkey
Copy link

Using g3mWidget_iOS. How can I get the current camera position include (Geodetic3D *position), heading and pitching? In g3mWidget.hpp, there is function called getCurrentCamera(). How would I be able to call it from g3mWidget_iOS class?

Thanks

@DiegoGomezDeck
Copy link
Member

Hi @WuhanMonkey

G3MWidget_iOS is an (incomplete) wrapper to G3MWidget. G3MWidget is the multi-platform piece of the G3M Widgets. From the iOS widget instance, you can get a pointer to the multi-platform widget:

G3MWidget* g3mw = g3mWidget_iOS.widget;

And from there:

const Camera* camera = g3mw->getCurrentCamera();
const Angle heading = camera->getHeading();
const Angle pitch = camera->getPitch();
const Geodetic3D pos = camera->getGeodeticPosition();

@DiegoGomezDeck
Copy link
Member

Hi @WuhanMonkey, did it work? can I close this issue?

@WuhanMonkey
Copy link
Author

Yes it works. Please close it.

Thanks

On Thursday, September 17, 2015, Diego Gomez Deck notifications@github.com
wrote:

Hi @WuhanMonkey https://github.com/WuhanMonkey, did it work? can I
close this issue?


Reply to this email directly or view it on GitHub
#126 (comment).

Chengpeng(Chester) Hu

University of Illinois-Urbana Champaign

Major in Computer Engineering | Department of Electrical and Computer
Engineering

Research Assistant in Liu Nanobionics Lab

hu43@illinois.edu hu43@illinois.edu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants