Class TClassicRayTracer
Unit
Declaration
type TClassicRayTracer = class(TRayTracer)
Description
Classic Whitted-style ray-tracer. See [https://castle-engine.io/vrml_engine_doc/output/xsl/html/section.classic_ray_tracer.html] for documentation.
Make sure that VRML2Lights in states are properly initialized if you plan to render VRML 2.0 nodes. TCastleSceneCore and descendants do this for you automatically.
Source: scene/castleraytracer.pas (line 138).
Hierarchy
- TObject
- TRayTracer
- TClassicRayTracer
Overview
Fields
| Public | Octree: TBaseTrianglesOctree; |
| Public | Image: TCastleImage; |
| Public | CamPosition: TVector3; |
| Public | CamDirection: TVector3; |
| Public | CamUp: TVector3; |
| Public | Projection: TProjection; |
| Public | SceneBGColor: TVector3; |
| Public | Background: TAbstractBackgroundNode; |
| Public | PixelsMadeNotifier: TPixelsMadeNotifierFunc; |
| Public | PixelsMadeNotifierData: Pointer; |
| Public | FirstPixel: Cardinal; |
| Public | InitialDepth: Cardinal; |
| Public | FogNode: TFogNode; |
| Public | GlobalLights: TLightInstancesList; |
| Public | OwnsGlobalLights: boolean; |
Methods
| Public | procedure ExecuteStats(const Stats: TStrings); |
| Protected | procedure AppendStats(const Stats: TStrings; const RenderingTime: Single); override; |
| Public | procedure Execute; override; |
| Public | destructor Destroy; override; |
Properties
| Public | property BaseLights: TLightInstancesList read GlobalLights write GlobalLights; deprecated 'use GlobalLights'; |
| Public | property OwnsBaseLights: Boolean read OwnsGlobalLights write OwnsGlobalLights; deprecated 'use OwnsGlobalLights'; |
Description
Fields
| Public | Octree: TBaseTrianglesOctree; |
|
This item is declared in ancestor TRayTracer. Spatial structure (that contains geometry with materials) to render. You can create it using e.g. CreateOctreeVisibleTrianglesForScene for TCastleScene. Must be set before calling Execute. | |
| Public | Image: TCastleImage; |
|
This item is declared in ancestor TRayTracer. 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. | |
| Public | CamPosition: TVector3; |
|
This item is declared in ancestor TRayTracer. 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. | |
| Public | CamDirection: TVector3; |
|
This item is declared in ancestor TRayTracer.
Camera view. | |
| Public | CamUp: TVector3; |
|
This item is declared in ancestor TRayTracer.
Camera view. CamDirection and | |
| Public | Projection: TProjection; |
|
This item is declared in ancestor TRayTracer. Camera projection properties. | |
| Public | SceneBGColor: TVector3; |
|
This item is declared in ancestor TRayTracer. Default background color, if scene doesn't have Background node with skyColor. | |
| Public | Background: TAbstractBackgroundNode; |
|
This item is declared in ancestor TRayTracer. Scene Background node. | |
| Public | PixelsMadeNotifier: TPixelsMadeNotifierFunc; |
|
This item is declared in ancestor TRayTracer. 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 | |
| Public | PixelsMadeNotifierData: Pointer; |
|
This item is declared in ancestor TRayTracer. This item has no description. | |
| Public | FirstPixel: Cardinal; |
|
This item is declared in ancestor TRayTracer. 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 | |
| Public | InitialDepth: Cardinal; |
|
Limit for recursion depth. 0 means that only primary rays will be cast, 1 means that primary rays and 1 ray into mirror / transmitted / shadow, and so on. | |
| Public | FogNode: TFogNode; |
|
Fog to render. Set | |
| Public | GlobalLights: TLightInstancesList; |
|
Lights shining on everything, like a headlight. | |
| Public | OwnsGlobalLights: boolean; |
|
This item has no description. | |
Methods
| Public | procedure ExecuteStats(const Stats: TStrings); |
|
This item is declared in ancestor TRayTracer. Do ray-tracing, like Execute, additionally gathering some statistics. The statistics will be added to the given string list. | |
| Protected | procedure AppendStats(const Stats: TStrings; const RenderingTime: Single); override; |
|
This item has no description. | |
| Public | procedure Execute; override; |
|
This item has no description. Showing description inherited from TRayTracer.Execute. Do ray-tracing, writing a ray-traced image into the Image. | |
| Public | destructor Destroy; override; |
|
This item has no description. | |
Properties
| Public | property BaseLights: TLightInstancesList read GlobalLights write GlobalLights; deprecated 'use GlobalLights'; |
|
Warning: this symbol is deprecated: use GlobalLights This item has no description. | |
| Public | property OwnsBaseLights: Boolean read OwnsGlobalLights write OwnsGlobalLights; deprecated 'use OwnsGlobalLights'; |
|
Warning: this symbol is deprecated: use OwnsGlobalLights This item has no description. | |
Generated by PasDoc 0.17.0.snapshot.