Image where the ray-tracer result will be stored. Must be set before calling Execute.
We will not resize given here Image. Instead we will use it's current size — so you just have to set Image size as appropriate before calling this method.
For every pixel, we calculate it's color and store it by TCastleImage.SetColorRGB method. So make sure SetColorRGB is implemented for your image class (it's implemented in all 3 classes TRGBImage, TRGBAlphaImage, TRGBFloatImage, so usually just don't worry about that). We don't modify alpha channel of the image.
Using TRGBFloatImage class is advised if you want the full color information. Otherwise color precision is lost beyond 8 bits, and values above 1.0 are clamped.
Camera view. CamDirection and CamUp do not have to be normalized — we will correct them here if needed. CamUp will be automatically corrected to be orthogonal to CamDirection if necessary, you only make sure it's not parallel to CamDirection.
Camera view. CamDirection and CamUp do not have to be normalized — we will correct them here if needed. CamUp will be automatically corrected to be orthogonal to CamDirection if necessary, you only make sure it's not parallel to CamDirection.
Camera view. CamDirection and CamUp do not have to be normalized — we will correct them here if needed. CamUp will be automatically corrected to be orthogonal to CamDirection if necessary, you only make sure it's not parallel to CamDirection.
PerspectiveView: boolean;
Camera projection properties. See TCastleSceneManager.PerspectiveView for specification.
Callback notified (if assigned) about writing each image pixel. This way you can display somewhere, or store to file, partially generated image. This callback gets information (in PixelsMadeCount) about how many pixels were generated (this includes also pixels skipped in case FirstPixel > 0).
Remember that pixels not done yet have the same content as they had when you Execute method started. In other words, if you set PixelsMadeNotifier <> nil, then often it's desirable to initialize Image content (e.g. to all SceneBGColor) before calling Execute. Otherwise at the time of Execute call, the pixels not done yet will have undefined colors.
PixelsMadeNotifierData: Pointer;
FirstPixel: Cardinal;
Initial pixel to start rendering from. By setting this to something > 0, you can (re-)start rendering from the middle. Useful to finish the job of a previous terminated ray-tracer process.
Must be in [0 .. Image.Width * Image.Height] range. Setting to Image.Width * Image.Height makes the ray-tracer do nothing.