Class TRayTracer
Unit
Declaration
type TRayTracer = class(TObject)
Description
Hierarchy
- TObject
- TRayTracer
Overview
Fields
Octree: TBaseTrianglesOctree; |
|
Image: TCastleImage; |
|
CamPosition: TVector3; |
|
CamDirection: TVector3; |
|
CamUp: TVector3; |
|
Projection: TProjection; |
|
SceneBGColor: TVector3; |
|
Background: TAbstractBackgroundNode; |
|
PixelsMadeNotifier: TPixelsMadeNotifierFunc; |
|
PixelsMadeNotifierData: Pointer; |
|
FirstPixel: Cardinal; |
Methods
procedure Execute; virtual; abstract; |
|
procedure ExecuteStats(const Stats: TStrings); |
Description
Fields
Octree: TBaseTrianglesOctree; |
|
Scene to render. Must be set before calling Execute. |
Image: TCastleImage; |
|
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 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. |
CamPosition: TVector3; |
|
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. |
CamDirection: TVector3; |
|
Camera view. |
CamUp: TVector3; |
|
Camera view. CamDirection and |
Projection: TProjection; |
|
Camera projection properties. |
SceneBGColor: TVector3; |
|
Default background color, if scene doesn't have Background node with skyColor. |
Background: TAbstractBackgroundNode; |
|
Scene Background node. |
PixelsMadeNotifier: TPixelsMadeNotifierFunc; |
|
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). The pixels are written in the order of TSwapScanCurve for TClassicRayTracer, and in order dependent on TPathTracer.SFCurveClass for TPathTracer. When shadow cache will be implemented to TClassicRayTracer, then configurable SFCurveClass may be done also for TClassicRayTracer. Remember that pixels not done yet have the same content as they had when you Execute method started. In other words, if you set |
PixelsMadeNotifierData: Pointer; |
|
Methods
procedure Execute; virtual; abstract; |
|
Do ray-tracing, writing a ray-traced image into the Image. |
procedure ExecuteStats(const Stats: TStrings); |
|
Do ray-tracing, like Execute, additionally gathering some statistics. The statistics will be added to the given string list. |
Generated by PasDoc 0.16.0.