Ecere SDK/eC Forums http://www.ecere.com/community/ Print view |
|
Cameras, Skyboxes http://www.ecere.com/community/viewtopic.php?f=7&t=19 |
Page 1 of 1 |
Author: | sacrebleu [ Thu Jan 21, 2010 12:33 am ] |
Post subject: | Cameras, Skyboxes |
Tell me about controlling and using Cameras with background skyboxes. |
Author: | jerome [ Fri Mar 12, 2010 1:24 am ] |
Post subject: | Re: Cameras, Skyboxes |
Sorry for the long delay Let's start with the Camera API. You must create a Camera object. You then use this camera object in a Window's OnRedraw method by 'setting it' on the surface to enter '3D graphics' mode, and then unsetting it to return to 2D mode: Code: Select all
Code: Select all
The Camera class as some sensible defaults (fixed, position of (0,0,0), orientation of (0,0,0), 90 degrees field of view, zMin = 5, zMax = 10000) which could let you get by with a simple "Camera { }" assuming there is something to see from the (0,0,0) location in your scene. Note that you will need to call Camera::Setup() with the width and height of the viewport in which you wish to use the camera, for example in a Window's OnResize() event. You will also need to call Camera::Update() prior to using it after any modification to the camera's settings. Code: Select all
Camera Type The type can be:
Checkout the terrain & camera sample. position orientation Computed Position (cPosition) Computed Orientation (cOrientation) Field of View (fov) zMin zMax Object targe FovDirection fovDirection aspectRatio focal |
All times are UTC-05:00 | Page 1 of 1 |
Powered by phpBB® Forum Software © phpBB Limited |