Class TMaterialInfo

Unit

Declaration

type TMaterialInfo = class abstract(TObject)

Description

Abstract class for material information, that define material properties for various lighting equations. Particular public descendants define different lighting equations. Particular private descendants map X3D nodes' fields to these parameters.

Hierarchy

  • TObject
  • TMaterialInfo

Overview

Fields

Public nested const DefaultTransparency = 0.0;

Methods

Protected function GetMainColor: TVector3; virtual; abstract;
Protected procedure SetMainColor(const Value: TVector3); virtual; abstract;
Protected function GetEmissiveColor: TVector3; virtual; abstract;
Protected procedure SetEmissiveColor(const Value: TVector3); virtual; abstract;
Public constructor Create(ANode: TX3DNode);
Public function Transparency: Single; virtual; abstract;
Public function Opacity: Single;

Properties

Public property Node: TX3DNode read FNode;
Public property MainColor: TVector3 read GetMainColor write SetMainColor;
Public property EmissiveColor: TVector3 read GetEmissiveColor write SetEmissiveColor;

Description

Fields

Public nested const DefaultTransparency = 0.0;

This item has no description.

Methods

Protected function GetMainColor: TVector3; virtual; abstract;

This item has no description.

Protected procedure SetMainColor(const Value: TVector3); virtual; abstract;

This item has no description.

Protected function GetEmissiveColor: TVector3; virtual; abstract;

This item has no description.

Protected procedure SetEmissiveColor(const Value: TVector3); virtual; abstract;

This item has no description.

Public constructor Create(ANode: TX3DNode);

This item has no description.

Public function Transparency: Single; virtual; abstract;

This item has no description.

Public function Opacity: Single;

Opacity is just 1 - Transparency.

Properties

Public property Node: TX3DNode read FNode;

Associated material node.

Public property MainColor: TVector3 read GetMainColor write SetMainColor;

Single color that is the best approximation of this material look.

For Phong material, it's DiffuseColor. For unlit material, it's EmissiveColor. For physical material, it's BaseColor.

This is useful for debug purposes, for example when we force everything to be unlit by Attributes.Lighting=false. It doesn't follow any X3D official equations, it's only for debugging.

Public property EmissiveColor: TVector3 read GetEmissiveColor write SetEmissiveColor;

Emissive color represents the color of the material that is not affected by any light sources. All material types (unlit, Phong, physical) have this color.


Generated by PasDoc 0.16.0-snapshot.