Start a new topic

Questions from a new API User

Original Post by: ryan.schneider Tue Dec 11 19:02:58 2012


My company and I are new to the OpenFlight API, and as a result we're running into some bumps in the road as we work to become more familiar with how everything works together, and how to go about testing what we already have worked on.


1. Does anyone know where to find a set of standard OpenFlight examples? Ideally, we're looking for something with a terrain and a few objects on said terrain, at least for initial tests.


2. Are paths for moving models stored in the file and used as it is rendered, or do API users have to manually direct motion themselves?


3. The manual mentions that OpenFlight files have binary space partitioning. Is that a part of all files by default, or is that on a case-by-case basis as file creators or API users invoke it?


I hope that I've been clear with my questions, but if I haven't, feel free to ask for clarification.


- Ryan Schneider


Original Post by: SteveThompson Tue Dec 11 23:04:41 2012


First, welcome, glad you are using the forum!

Are paths for moving models stored in the file and used as it is rendered, or do API users have to manually direct motion themselves?

The OpenFlight specification allows for a "Path" node which can be used for this purpose. For large terrain datasets (in which the dataset is spread across many many OpenFlight files), however, I suspect Path nodes are not sufficient. You might need a path that spans multiple files in this situation and this answer may differ from runtime to runtime.

The manual mentions that OpenFlight files have binary space partitioning. Is that a part of all files by default, or is that on a case-by-case basis as file creators or API users invoke it?

This is something file creators / api users would have to manually build into their scenes at construction time. There is no "automatic" BSP creation capability in the API. The Creator modeling tool has this kind of capability but not the OpenFlight API.
Original Post by: ryan.schneider Wed Dec 12 13:53:48 2012


Thanks for your help with the last two questions! No suggestions for test files, though?

Original Post by: SteveThompson Wed Dec 12 14:53:16 2012


I did a quick internet search on "sample openflight terrain files" and found some here:


http://www.grime.net/downloads/simulations.htm


I did not look too closely at the contents but did see OpenFlight terrains that looked promising for your use as samples.


If you have other questions, let us know here on the user forum.

Original Post by: ryan.schneider Wed Dec 12 15:22:04 2012


That's exactly what I was looking for! Thanks again!

Original Post by: ryan.schneider Wed Feb 6 15:49:01 2013


I have another question. Are the cardinal directions axis-aligned? If so, which axis corresponds to North?

Original Post by: ChrisRogers Wed Feb 6 16:37:23 2013


This really depends on what projection you are using. If you are using a Flat Earth projection for instance, the Y axis should correspond to north. Why do you need to know this information? If you are using the API to do something, then you can always convert any point into a latitude/longitude/height by using the api functions. Then you don't have to worry about what the x/y/z represents. You know that longitude always runs north/south. Take a look at: mgProject, and mgProjectionConvertXYZtoLLE for more information.

Login to post a comment