Class TMaterialNode

Unit

Declaration

type TMaterialNode = class(TAbstractOneSidedMaterialNode)

Description

Material determines how the geometry looks on the screen, by providing parameters to the lighting equations. This is the material responsible for the Phong lighting model.

It may be one-sided material under some cirumstances (black from the back side). To have a two-sided material, either use TTwoSidedMaterialNode, or set the shading to Phong using TRenderingAttributes.PhongShading or TAbstractShapeNode.Shading.

Hierarchy

Overview

Methods

Public constructor Create(const AX3DName: string = ''; const ABaseUrl: string = ''); override;
Public destructor Destroy; override;
Public class function ForVRMLVersion(const Version: TX3DVersion): boolean; override;
Public function Opacity: Single;
Public function ShininessExp: Single;
Public function MaterialInfo: TMaterialInfo; override;
Public function PureEmissive: boolean;
Public procedure ForcePureEmissive; deprecated 'use TUnlitMaterialNode for unlit materials';
Public procedure CreateNode; override;
Public class function ClassX3DType: string; override;
Public procedure SetReflSpecular(const Value: array of TCastleColorRGB);
Public procedure SetReflSpecular(const Value: TVector3List);
Public procedure SetReflDiffuse(const Value: array of TCastleColorRGB);
Public procedure SetReflDiffuse(const Value: TVector3List);
Public procedure SetTransSpecular(const Value: array of TCastleColorRGB);
Public procedure SetTransSpecular(const Value: TVector3List);
Public procedure SetTransDiffuse(const Value: array of TCastleColorRGB);
Public procedure SetTransDiffuse(const Value: TVector3List);

Properties

Public property FdAmbientIntensity: TSFFloat read FFdAmbientIntensity;
Public property AmbientIntensity: Single read GetAmbientIntensity write SetAmbientIntensity;
Public property FdAmbientTexture: TSFNode read FFdAmbientTexture;
Public property AmbientTexture: TAbstractSingleTextureNode read GetAmbientTexture write SetAmbientTexture;
Public property FdAmbientTextureMapping: TSFString read FFdAmbientTextureMapping;
Public property AmbientTextureMapping: String read GetAmbientTextureMapping write SetAmbientTextureMapping;
Public property FdDiffuseColor: TSFColor read FFdDiffuseColor;
Public property DiffuseColor: TCastleColorRGB read GetDiffuseColor write SetDiffuseColor;
Public property FdDiffuseTexture: TSFNode read FFdDiffuseTexture;
Public property DiffuseTexture: TAbstractSingleTextureNode read GetDiffuseTexture write SetDiffuseTexture;
Public property FdDiffuseTextureMapping: TSFString read FFdDiffuseTextureMapping;
Public property DiffuseTextureMapping: String read GetDiffuseTextureMapping write SetDiffuseTextureMapping;
Public property FdOcclusionStrength: TSFFloat read FFdOcclusionStrength;
Public property OcclusionStrength: Single read GetOcclusionStrength write SetOcclusionStrength;
Public property FdOcclusionTexture: TSFNode read FFdOcclusionTexture;
Public property OcclusionTexture: TAbstractSingleTextureNode read GetOcclusionTexture write SetOcclusionTexture;
Public property FdOcclusionTextureMapping: TSFString read FFdOcclusionTextureMapping;
Public property OcclusionTextureMapping: String read GetOcclusionTextureMapping write SetOcclusionTextureMapping;
Public property FdShininess: TSFFloat read FFdShininess;
Public property Shininess: Single read GetShininess write SetShininess;
Public property FdShininessTexture: TSFNode read FFdShininessTexture;
Public property ShininessTexture: TAbstractSingleTextureNode read GetShininessTexture write SetShininessTexture;
Public property FdShininessTextureMapping: TSFString read FFdShininessTextureMapping;
Public property ShininessTextureMapping: String read GetShininessTextureMapping write SetShininessTextureMapping;
Public property FdSpecularColor: TSFColor read FFdSpecularColor;
Public property SpecularColor: TCastleColorRGB read GetSpecularColor write SetSpecularColor;
Public property FdSpecularTexture: TSFNode read FFdSpecularTexture;
Public property SpecularTexture: TAbstractSingleTextureNode read GetSpecularTexture write SetSpecularTexture;
Public property FdSpecularTextureMapping: TSFString read FFdSpecularTextureMapping;
Public property SpecularTextureMapping: String read GetSpecularTextureMapping write SetSpecularTextureMapping;
Public property FdTransparency: TSFFloat read FFdTransparency;
Public property Transparency: Single read GetTransparency write SetTransparency;
Public property FdFogImmune: TSFBool read FFdFogImmune;
Public property FogImmune: Boolean read GetFogImmune write SetFogImmune;
Public property FdMirror: TSFFloat read FFdMirror;
Public property Mirror: Single read GetMirror write SetMirror;
Public property FdReflSpecular: TMFColor read FFdReflSpecular;
Public property FdReflDiffuse: TMFColor read FFdReflDiffuse;
Public property FdTransSpecular: TMFColor read FFdTransSpecular;
Public property FdTransDiffuse: TMFColor read FFdTransDiffuse;
Public property FdReflSpecularExp: TSFFloat read FFdReflSpecularExp;
Public property ReflSpecularExp: Single read GetReflSpecularExp write SetReflSpecularExp;
Public property FdTransSpecularExp: TSFFloat read FFdTransSpecularExp;
Public property TransSpecularExp: Single read GetTransSpecularExp write SetTransSpecularExp;

Description

Methods

Public constructor Create(const AX3DName: string = ''; const ABaseUrl: string = ''); override;
 
Public destructor Destroy; override;
 
Public class function ForVRMLVersion(const Version: TX3DVersion): boolean; override;
 
Public function Opacity: Single;

Opacity is just a 1 - FdTransparency.Value. Defined for your comfort — for OpenGL you will usually want to pass Opacity, not Transparency.

Public function ShininessExp: Single;

ShininessExp is just 128 * FdShininess.Value, this is the "real" exponent indicated by shininess field value. Defined for your comfort — for any graphic library you will usually want to pass the "real" exponent given by this function, not just value of shininess field.

Public function MaterialInfo: TMaterialInfo; override;
 
Public function PureEmissive: boolean;

Only the emissiveColor is not black (zero), which means that the material behaves like unlit.

This checks that ambient and diffuse and specular colors are all zero. It's an important information about the material sometimes. It is similar to the NULL material situation (when "Appearance.material=NULL" case), but the color and transparency are still configurable (using FdEmissiveColor and FdTransparency fields).

We can optimize this case when rendering.

Public procedure ForcePureEmissive; deprecated 'use TUnlitMaterialNode for unlit materials';

Warning: this symbol is deprecated: use TUnlitMaterialNode for unlit materials

Force the material pure emissive (see PureEmissive) by setting other colors to black.

Public procedure CreateNode; override;
 
Public class function ClassX3DType: string; override;
 
Public procedure SetReflSpecular(const Value: array of TCastleColorRGB);
 
Public procedure SetReflSpecular(const Value: TVector3List);
 
Public procedure SetReflDiffuse(const Value: array of TCastleColorRGB);
 
Public procedure SetReflDiffuse(const Value: TVector3List);
 
Public procedure SetTransSpecular(const Value: array of TCastleColorRGB);
 
Public procedure SetTransSpecular(const Value: TVector3List);
 
Public procedure SetTransDiffuse(const Value: array of TCastleColorRGB);
 
Public procedure SetTransDiffuse(const Value: TVector3List);
 

Properties

Public property FdAmbientIntensity: TSFFloat read FFdAmbientIntensity;
 
Public property AmbientIntensity: Single read GetAmbientIntensity write SetAmbientIntensity;
 
Public property FdAmbientTexture: TSFNode read FFdAmbientTexture;
 
Public property AmbientTexture: TAbstractSingleTextureNode read GetAmbientTexture write SetAmbientTexture;
 
Public property FdAmbientTextureMapping: TSFString read FFdAmbientTextureMapping;
 
Public property AmbientTextureMapping: String read GetAmbientTextureMapping write SetAmbientTextureMapping;
 
Public property FdDiffuseColor: TSFColor read FFdDiffuseColor;
 
Public property DiffuseColor: TCastleColorRGB read GetDiffuseColor write SetDiffuseColor;
 
Public property FdDiffuseTexture: TSFNode read FFdDiffuseTexture;
 
Public property DiffuseTexture: TAbstractSingleTextureNode read GetDiffuseTexture write SetDiffuseTexture;
 
Public property FdDiffuseTextureMapping: TSFString read FFdDiffuseTextureMapping;
 
Public property DiffuseTextureMapping: String read GetDiffuseTextureMapping write SetDiffuseTextureMapping;
 
Public property FdOcclusionStrength: TSFFloat read FFdOcclusionStrength;
 
Public property OcclusionStrength: Single read GetOcclusionStrength write SetOcclusionStrength;
 
Public property FdOcclusionTexture: TSFNode read FFdOcclusionTexture;
 
Public property OcclusionTexture: TAbstractSingleTextureNode read GetOcclusionTexture write SetOcclusionTexture;
 
Public property FdOcclusionTextureMapping: TSFString read FFdOcclusionTextureMapping;
 
Public property OcclusionTextureMapping: String read GetOcclusionTextureMapping write SetOcclusionTextureMapping;
 
Public property FdShininess: TSFFloat read FFdShininess;
 
Public property Shininess: Single read GetShininess write SetShininess;
 
Public property FdShininessTexture: TSFNode read FFdShininessTexture;
 
Public property ShininessTexture: TAbstractSingleTextureNode read GetShininessTexture write SetShininessTexture;
 
Public property FdShininessTextureMapping: TSFString read FFdShininessTextureMapping;
 
Public property ShininessTextureMapping: String read GetShininessTextureMapping write SetShininessTextureMapping;
 
Public property FdSpecularColor: TSFColor read FFdSpecularColor;
 
Public property SpecularColor: TCastleColorRGB read GetSpecularColor write SetSpecularColor;
 
Public property FdSpecularTexture: TSFNode read FFdSpecularTexture;
 
Public property SpecularTexture: TAbstractSingleTextureNode read GetSpecularTexture write SetSpecularTexture;
 
Public property FdSpecularTextureMapping: TSFString read FFdSpecularTextureMapping;
 
Public property SpecularTextureMapping: String read GetSpecularTextureMapping write SetSpecularTextureMapping;
 
Public property FdTransparency: TSFFloat read FFdTransparency;
 
Public property Transparency: Single read GetTransparency write SetTransparency;
 
Public property FdFogImmune: TSFBool read FFdFogImmune;
 
Public property FogImmune: Boolean read GetFogImmune write SetFogImmune;
 
Public property FdMirror: TSFFloat read FFdMirror;
 
Public property Mirror: Single read GetMirror write SetMirror;
 
Public property FdReflSpecular: TMFColor read FFdReflSpecular;
 
Public property FdReflDiffuse: TMFColor read FFdReflDiffuse;
 
Public property FdTransSpecular: TMFColor read FFdTransSpecular;
 
Public property FdTransDiffuse: TMFColor read FFdTransDiffuse;
 
Public property FdReflSpecularExp: TSFFloat read FFdReflSpecularExp;
 
Public property ReflSpecularExp: Single read GetReflSpecularExp write SetReflSpecularExp;
 
Public property FdTransSpecularExp: TSFFloat read FFdTransSpecularExp;
 
Public property TransSpecularExp: Single read GetTransSpecularExp write SetTransSpecularExp;
 

Generated by PasDoc 0.15.0.