ReadingComplete
#5
Reader3ds only read cameras if they are defined in 3ds file.
You can get the collection of all cameras that are defined in 3ds file from Cameras property on Reader3ds.

If you are using Read method to read the 3ds file and specify the Viewport3D parameter and there is at least one camera defined in 3ds file, the first read camera is applied to the Viewport3D. If there are no cameras defined in 3ds file no camera is applied to Viewport3D. If you know that there are more cameras defined, you can also pass the cameraIndex as an additional parameter to Read method.

If it also possible to skip reading cameras with setting the ImportCameras to false. By default its value is true to enable reading cameras.


If you do not know if 3ds file will have cameras defined, I would recommend you to check the Cameras collection after reading the 3ds file. If there are no camera defined, you should create a fallback camera. I recommend that you measure the read scene and create a camera based on the size of read objects - see the CreateFreeCamera method in the Animator3ds sample.
Andrej Benedik
  


Messages In This Thread
ReadingComplete - by Bryan Gabric - 09-24-2010, 05:59 PM
RE: ReadingComplete - by abenedik - 09-25-2010, 09:34 PM
RE: ReadingComplete - by Bryan Gabric - 09-27-2010, 07:33 PM
RE: ReadingComplete - by abenedik - 12-03-2010, 02:46 PM
RE: ReadingComplete - by kellador26 - 12-03-2010, 03:31 AM

Forum Jump:


Users browsing this thread:
1 Guest(s)