Class TVRMLGLHeadLight

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TVRMLGLHeadLight = class(TObject)

Description

This is a class that helps you render a headlight.

The most common use is to render a headlight conforming to VRML specification, and configurable by KambiHeadLight VRML node (see [http://vrmlengine.sourceforge.net/kambi_vrml_extensions.php#ext_headlight]).

Hierarchy

Overview

Methods

Public constructor Create(HeadLightNode: TNodeKambiHeadLight);
Public destructor Destroy; override;
Public procedure Render(GLLightNumber: Cardinal; CallEnabled: boolean);
Public class procedure RenderOrDisable(Light: TVRMLGLHeadlight; GLLightNumber: Cardinal);

Properties

Public property AmbientIntensity: Single read FAmbientIntensity write FAmbientIntensity;
Public property Attenuation: TVector3Single read FAttenuation write FAttenuation;
Public property Color: TVector3Single read FColor write FColor;
Public property Intensity: Single read FIntensity write FIntensity;
Public property Spot: boolean read FSpot write FSpot;
Public property SpotCutOffAngle: Single read FSpotCutOffAngle write FSpotCutOffAngle;
Public property SpotDropOffRate: Single read FSpotDropOffRate write FSpotDropOffRate;

Description

Methods

Public constructor Create(HeadLightNode: TNodeKambiHeadLight);
 
Public destructor Destroy; override;
 
Public procedure Render(GLLightNumber: Cardinal; CallEnabled: boolean);

This sets properties of GL_LIGHT_GLLightNumber to render given light.

Note that this requires that current matrix is modelview. Matrix may be reset to identity by this procedure.

If CallEnabled then it will also call glEnable(GL_LIGHT_GLLightNumber).

Public class procedure RenderOrDisable(Light: TVRMLGLHeadlight; GLLightNumber: Cardinal);

This is like Light.Render(GLLightNumber, true), but will call glDisable(GL_LIGHT_GLLightNumber) if Light is nil.

In effect, you can call this procedure with nil or non-nil parameter, and you can be sure that enabled/disabled state of light GL_LIGHT_GLLightNumber will be set.

Properties

Public property AmbientIntensity: Single read FAmbientIntensity write FAmbientIntensity;
 
Public property Attenuation: TVector3Single read FAttenuation write FAttenuation;
 
Public property Color: TVector3Single read FColor write FColor;
 
Public property Intensity: Single read FIntensity write FIntensity;
 
Public property Spot: boolean read FSpot write FSpot;
 
Public property SpotCutOffAngle: Single read FSpotCutOffAngle write FSpotCutOffAngle;
 
Public property SpotDropOffRate: Single read FSpotDropOffRate write FSpotDropOffRate;
 

Generated by PasDoc 0.10.0 on 2008-02-25 00:00:41