Class TFogNode

Unit

Declaration

type TFogNode = class(TAbstractBindableNode, IAbstractFogObject)

Description

Simulate atmospheric fog effects (for the whole scene) by blending with the fog colour, based on the distance from the viewer.

Hierarchy

Overview

Methods

Public procedure CreateNode; override;
Public class function ClassX3DType: string; override;
Public class function URNMatching(const URN: string): boolean; override;
Public function TransformationChange: TNodeTransformationChange; override;
Public function FogType: TFogType;
Public function FogTypeOrNone: TFogTypeOrNone;
Public procedure ApplyFog(var Color: TVector3; const Position, VertexPos: TVector3; const AFogType: TFogTypeOrNone);

Properties

Public property FdColor: TSFColor read FFdColor;
Public property FdFogType: TSFString read FFdFogType;
Public property FdVisibilityRange: TSFFloat read FFdVisibilityRange;
Public property FdVolumetric: TSFBool read FFdVolumetric;
Public property FdVolumetricDirection: TSFVec3f read FFdVolumetricDirection;
Public property FdVolumetricVisibilityStart: TSFFloat read FFdVolumetricVisibilityStart;
Public property FdAlternative: TSFNode read FFdAlternative;
Public property Color: TCastleColorRGB read GetColor write SetColor;
Public property VisibilityRange: Single read GetVisibilityRange write SetVisibilityRange;

Description

Methods

Public procedure CreateNode; override;
 
Public class function ClassX3DType: string; override;
 
Public class function URNMatching(const URN: string): boolean; override;
 
Public function TransformationChange: TNodeTransformationChange; override;
 
Public function FogType: TFogType;

Fog type.

Public function FogTypeOrNone: TFogTypeOrNone;

Fog type, but may also return ftNone if we are Nil (checks Self <> nil) or visibilityRange = 0.

Public procedure ApplyFog(var Color: TVector3; const Position, VertexPos: TVector3; const AFogType: TFogTypeOrNone);

Apply fog to the color of the vertex.

This can be used by software renderers (ray-tracers etc.) to calculate pixel color following VRML/X3D specifications. After all the lighting is summed up (see TX3DGraphTraverseState.Emission and TLightInstance.Contribution), process color by this method to apply fog.

Does nothing if AFogType = ftNone. In this special case, it's also allowed to call this on Nil instance.

Properties

Public property FdColor: TSFColor read FFdColor;
 
Public property FdFogType: TSFString read FFdFogType;
 
Public property FdVisibilityRange: TSFFloat read FFdVisibilityRange;
 
Public property FdVolumetric: TSFBool read FFdVolumetric;
 
Public property FdVolumetricDirection: TSFVec3f read FFdVolumetricDirection;
 
Public property FdVolumetricVisibilityStart: TSFFloat read FFdVolumetricVisibilityStart;
 
Public property FdAlternative: TSFNode read FFdAlternative;
 
Public property Color: TCastleColorRGB read GetColor write SetColor;
 
Public property VisibilityRange: Single read GetVisibilityRange write SetVisibilityRange;
 

Generated by PasDoc 0.15.0.