Class TBGRAScene3D

Unit

Declaration

type TBGRAScene3D = class(TObject)

Description

3D scene

Hierarchy

Overview

Fields

Public DefaultLightingNormal: TLightingNormal3D;
Public FetchDirectory: string;
Public FetchThrowsException: boolean;
Protected FMaterialLibrariesFetched: array of string;
Protected FRenderer: TCustomRenderer3D;
Protected FTexturesFetched: array of record Name: string; Bitmap: TBGRACustomBitmap; end;
Public RenderingOptions: TRenderingOptions;
Public UnknownColor: TBGRAPixel;

Methods

Public constructor Create(ASurface: TBGRACustomBitmap); overload;
Public constructor Create; overload;
Public destructor Destroy; override;
Public function AddDirectionalLight(ADirection: TPoint3D; ALightness: single = 1; AMinIntensity : single = 0): IBGRADirectionalLight3D; overload;
Public function AddDirectionalLight(ADirection: TPoint3D; AColor: TBGRAPixel; AMinIntensity: single = 0): IBGRADirectionalLight3D; overload;
Public function AddPointLight(AVertex: IBGRAVertex3D; AOptimalDistance: single; AColor: TBGRAPixel; AMinIntensity: single = 0): IBGRAPointLight3D; overload;
Public function AddPointLight(AVertex: IBGRAVertex3D; AOptimalDistance: single; ALightness: single = 1; AMinIntensity : single = 0): IBGRAPointLight3D; overload;
Public function CreateHalfSphere(ARadius: Single; AColor: TBGRAPixel; AHorizPrecision: integer = 6; AVerticalPrecision : integer = 6): IBGRAObject3D; overload;
Public function CreateHalfSphere(ARadius: Single; AHorizPrecision: integer = 6; AVerticalPrecision : integer = 6): IBGRAObject3D; overload;
Public function CreateMaterial: IBGRAMaterial3D; overload;
Public function CreateMaterial(ASpecularIndex: integer): IBGRAMaterial3D; overload;
Public function CreateObject(AColor: TBGRAPixel): IBGRAObject3D; overload;
Public function CreateObject(ATexture: IBGRAScanner): IBGRAObject3D; overload;
Public function CreateObject: IBGRAObject3D; overload;
Public function CreateSphere(ARadius: Single; AHorizPrecision: integer = 8; AVerticalPrecision : integer = 6): IBGRAObject3D; overload;
Public function CreateSphere(ARadius: Single; AColor: TBGRAPixel; AHorizPrecision: integer = 8; AVerticalPrecision : integer = 6): IBGRAObject3D; overload;
Public function FetchObject(AName: string; SwapFacesOrientation: boolean = true): IBGRAObject3D;
Public function GetMaterialByName(AName: string): IBGRAMaterial3D;
Public function LoadObjectFromFile(AFilename: string; SwapFacesOrientation: boolean = true): IBGRAObject3D;
Public function LoadObjectFromFileUTF8(AFilename: string; SwapFacesOrientation: boolean = true): IBGRAObject3D;
Public function LoadObjectFromStream(AStream: TStream; SwapFacesOrientation: boolean = true): IBGRAObject3D;
Public function MakeLightList: TList;
Protected function FetchTexture(AName: string; out texSize: TPointF): IBGRAScanner; virtual;
Protected function GetRenderHeight: integer;
Protected function GetRenderWidth: integer;
Protected function LoadBitmapFromFileUTF8(AFilenameUTF8: string): TBGRACustomBitmap; virtual;
Public procedure Clear; virtual;
Public procedure FetchMaterials(ALibraryName: string); virtual;
Public procedure ForEachFace(ACallback: TFace3DCallback);
Public procedure ForEachVertex(ACallback: TVertex3DCallback);
Public procedure LoadMaterialsFromFile(AFilename: string);
Public procedure LoadMaterialsFromFileUTF8(AFilename: string);
Public procedure LoadMaterialsFromStream(AStream: TStream);
Public procedure LookAt(AWhere: TPoint3D; ATopDir: TPoint3D);
Public procedure LookDown(angleDeg: single);
Public procedure LookLeft(angleDeg: single);
Public procedure LookRight(angleDeg: single);
Public procedure LookUp(angleDeg: single);
Public procedure RemoveLight(ALight: IBGRALight3D);
Public procedure RemoveObject(AObject: IBGRAObject3D);
Public procedure Render(ARenderer: TCustomRenderer3D); overload;
Public procedure Render; overload; virtual;
Public procedure SetZoom(value: TPointF); overload;
Public procedure SetZoom(value: Single); overload;
Public procedure UpdateMaterial(AMaterialName: string); virtual;
Public procedure UpdateMaterials; virtual;
Protected procedure DoClear; virtual;
Protected procedure DoRender; virtual;
Protected procedure HandleFetchException(AException: Exception); virtual;
Protected procedure InvalidateMaterial;
Protected procedure OnMaterialTextureChanged(ASender: TObject); virtual;
Protected procedure SetDefaultMaterial(AValue: IBGRAMaterial3D);
Protected procedure UseMaterial(AMaterialName: string; AFace: IBGRAFace3D); virtual;

Properties

Public property AmbiantLightColor: TBGRAPixel read GetAmbiantLightColor write SetAmbiantLightColor;
Public property AmbiantLightColorF: TColorF read GetAmbiantLightColorF write SetAmbiantLightColorF;
Public property AmbiantLightness: single read GetAmbiantLightness write SetAmbiantLightness;
Public property AutoViewCenter: boolean read FAutoViewCenter write SetAutoViewCenter;
Public property AutoZoom: boolean read FAutoZoom write SetAutoZoom;
Public property Camera: TCamera3D read FCamera;
Public property DefaultMaterial: IBGRAMaterial3D read FDefaultMaterial write SetDefaultMaterial;
Public property FaceCount: integer read GetFaceCount;
Public property Light[AIndex: integer]: IBGRALight3D read GetLight;
Public property LightCount: integer read GetLightCount;
Public property Material[AIndex: integer]: IBGRAMaterial3D read GetMaterial;
Public property MaterialCount: integer read FMaterialCount;
Public property NormalCount: integer read GetNormalCount;
Public property Object3D[AIndex: integer]: IBGRAObject3D read GetObject;
Public property Object3DCount: integer read FObjectCount;
Public property RenderedFaceCount : integer read FRenderedFaceCount;
Public property Surface: TBGRACustomBitmap read FSurface write FSurface;
Public property VertexCount: integer read GetVertexCount;
Public property ViewCenter: TPointF read GetViewCenter write SetViewCenter;
Public property ViewPoint: TPoint3D read GetViewPoint write SetViewPoint;
Public property Zoom: TPointF read GetZoom write SetZoom;

Description

Fields

Public DefaultLightingNormal: TLightingNormal3D;

This item has no description.

Public FetchDirectory: string;

This item has no description.

Public FetchThrowsException: boolean;

This item has no description.

Protected FMaterialLibrariesFetched: array of string;

This item has no description.

Protected FRenderer: TCustomRenderer3D;

This item has no description.

Protected FTexturesFetched: array of record Name: string; Bitmap: TBGRACustomBitmap; end;

This item has no description.

Public RenderingOptions: TRenderingOptions;

This item has no description.

Public UnknownColor: TBGRAPixel;

This item has no description.

Methods

Public constructor Create(ASurface: TBGRACustomBitmap); overload;

This item has no description.

Public constructor Create; overload;

This item has no description.

Public destructor Destroy; override;

This item has no description.

Public function AddDirectionalLight(ADirection: TPoint3D; ALightness: single = 1; AMinIntensity : single = 0): IBGRADirectionalLight3D; overload;

This item has no description.

Public function AddDirectionalLight(ADirection: TPoint3D; AColor: TBGRAPixel; AMinIntensity: single = 0): IBGRADirectionalLight3D; overload;

This item has no description.

Public function AddPointLight(AVertex: IBGRAVertex3D; AOptimalDistance: single; AColor: TBGRAPixel; AMinIntensity: single = 0): IBGRAPointLight3D; overload;

This item has no description.

Public function AddPointLight(AVertex: IBGRAVertex3D; AOptimalDistance: single; ALightness: single = 1; AMinIntensity : single = 0): IBGRAPointLight3D; overload;

This item has no description.

Public function CreateHalfSphere(ARadius: Single; AColor: TBGRAPixel; AHorizPrecision: integer = 6; AVerticalPrecision : integer = 6): IBGRAObject3D; overload;

This item has no description.

Public function CreateHalfSphere(ARadius: Single; AHorizPrecision: integer = 6; AVerticalPrecision : integer = 6): IBGRAObject3D; overload;

This item has no description.

Public function CreateMaterial: IBGRAMaterial3D; overload;

This item has no description.

Public function CreateMaterial(ASpecularIndex: integer): IBGRAMaterial3D; overload;

This item has no description.

Public function CreateObject(AColor: TBGRAPixel): IBGRAObject3D; overload;

This item has no description.

Public function CreateObject(ATexture: IBGRAScanner): IBGRAObject3D; overload;

This item has no description.

Public function CreateObject: IBGRAObject3D; overload;

This item has no description.

Public function CreateSphere(ARadius: Single; AHorizPrecision: integer = 8; AVerticalPrecision : integer = 6): IBGRAObject3D; overload;

This item has no description.

Public function CreateSphere(ARadius: Single; AColor: TBGRAPixel; AHorizPrecision: integer = 8; AVerticalPrecision : integer = 6): IBGRAObject3D; overload;

This item has no description.

Public function FetchObject(AName: string; SwapFacesOrientation: boolean = true): IBGRAObject3D;

This item has no description.

Public function GetMaterialByName(AName: string): IBGRAMaterial3D;

This item has no description.

Public function LoadObjectFromFile(AFilename: string; SwapFacesOrientation: boolean = true): IBGRAObject3D;

This item has no description.

Public function LoadObjectFromFileUTF8(AFilename: string; SwapFacesOrientation: boolean = true): IBGRAObject3D;

This item has no description.

Public function LoadObjectFromStream(AStream: TStream; SwapFacesOrientation: boolean = true): IBGRAObject3D;

This item has no description.

Public function MakeLightList: TList;

This item has no description.

Protected function FetchTexture(AName: string; out texSize: TPointF): IBGRAScanner; virtual;

This item has no description.

Protected function GetRenderHeight: integer;

This item has no description.

Protected function GetRenderWidth: integer;

This item has no description.

Protected function LoadBitmapFromFileUTF8(AFilenameUTF8: string): TBGRACustomBitmap; virtual;

This item has no description.

Public procedure Clear; virtual;

This item has no description.

Public procedure FetchMaterials(ALibraryName: string); virtual;

This item has no description.

Public procedure ForEachFace(ACallback: TFace3DCallback);

This item has no description.

Public procedure ForEachVertex(ACallback: TVertex3DCallback);

This item has no description.

Public procedure LoadMaterialsFromFile(AFilename: string);

This item has no description.

Public procedure LoadMaterialsFromFileUTF8(AFilename: string);

This item has no description.

Public procedure LoadMaterialsFromStream(AStream: TStream);

This item has no description.

Public procedure LookAt(AWhere: TPoint3D; ATopDir: TPoint3D);

This item has no description.

Public procedure LookDown(angleDeg: single);

This item has no description.

Public procedure LookLeft(angleDeg: single);

This item has no description.

Public procedure LookRight(angleDeg: single);

This item has no description.

Public procedure LookUp(angleDeg: single);

This item has no description.

Public procedure RemoveLight(ALight: IBGRALight3D);

This item has no description.

Public procedure RemoveObject(AObject: IBGRAObject3D);

This item has no description.

Public procedure Render(ARenderer: TCustomRenderer3D); overload;

This item has no description.

Public procedure Render; overload; virtual;

This item has no description.

Public procedure SetZoom(value: TPointF); overload;

This item has no description.

Public procedure SetZoom(value: Single); overload;

This item has no description.

Public procedure UpdateMaterial(AMaterialName: string); virtual;

This item has no description.

Public procedure UpdateMaterials; virtual;

This item has no description.

Protected procedure DoClear; virtual;

This item has no description.

Protected procedure DoRender; virtual;

This item has no description.

Protected procedure HandleFetchException(AException: Exception); virtual;

This item has no description.

Protected procedure InvalidateMaterial;

This item has no description.

Protected procedure OnMaterialTextureChanged(ASender: TObject); virtual;

This item has no description.

Protected procedure SetDefaultMaterial(AValue: IBGRAMaterial3D);

This item has no description.

Protected procedure UseMaterial(AMaterialName: string; AFace: IBGRAFace3D); virtual;

This item has no description.

Properties

Public property AmbiantLightColor: TBGRAPixel read GetAmbiantLightColor write SetAmbiantLightColor;

This item has no description.

Public property AmbiantLightColorF: TColorF read GetAmbiantLightColorF write SetAmbiantLightColorF;

This item has no description.

Public property AmbiantLightness: single read GetAmbiantLightness write SetAmbiantLightness;

This item has no description.

Public property AutoViewCenter: boolean read FAutoViewCenter write SetAutoViewCenter;

This item has no description.

Public property AutoZoom: boolean read FAutoZoom write SetAutoZoom;

This item has no description.

Public property Camera: TCamera3D read FCamera;

This item has no description.

Public property DefaultMaterial: IBGRAMaterial3D read FDefaultMaterial write SetDefaultMaterial;

This item has no description.

Public property FaceCount: integer read GetFaceCount;

This item has no description.

Public property Light[AIndex: integer]: IBGRALight3D read GetLight;

This item has no description.

Public property LightCount: integer read GetLightCount;

This item has no description.

Public property Material[AIndex: integer]: IBGRAMaterial3D read GetMaterial;

This item has no description.

Public property MaterialCount: integer read FMaterialCount;

This item has no description.

Public property NormalCount: integer read GetNormalCount;

This item has no description.

Public property Object3D[AIndex: integer]: IBGRAObject3D read GetObject;

This item has no description.

Public property Object3DCount: integer read FObjectCount;

This item has no description.

Public property RenderedFaceCount : integer read FRenderedFaceCount;

This item has no description.

Public property Surface: TBGRACustomBitmap read FSurface write FSurface;

This item has no description.

Public property VertexCount: integer read GetVertexCount;

This item has no description.

Public property ViewCenter: TPointF read GetViewCenter write SetViewCenter;

This item has no description.

Public property ViewPoint: TPoint3D read GetViewPoint write SetViewPoint;

This item has no description.

Public property Zoom: TPointF read GetZoom write SetZoom;

This item has no description.