Class TMaterialNode_1

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TMaterialNode_1 = class(TAbstractChildNode)

Description

no description available, TAbstractChildNode description follows
no description available, TAbstractNode description follows

Base X3D node.

Almost all X3D nodes inherit from this. (Exception: X3DMetadataObject. So you cannot have metadata of metadata of...)

Hierarchy

Overview

Methods

Public procedure CreateNode; override;
Public class function ClassNodeTypeName: string; override;
Public function AmbientColor3Single(MatNum: integer): TVector3Single;
Public function AmbientColor4Single(MatNum: integer): TVector4Single;
Public function DiffuseColor3Single(MatNum: integer): TVector3Single;
Public function DiffuseColor4Single(MatNum: integer): TVector4Single;
Public function SpecularColor3Single(MatNum: integer): TVector3Single;
Public function SpecularColor4Single(MatNum: integer): TVector4Single;
Public function EmissiveColor3Single(MatNum: integer): TVector3Single;
Public function EmissiveColor4Single(MatNum: integer): TVector4Single;
Public function Transparency(MatNum: integer): Single;
Public function Opacity(MatNum: integer): Single;
Public function Shininess(MatNum: integer): Single;
Public function ShininessExp(MatNum: integer): Single;
Public function Mirror(MatNum: integer): Single;
Public function ReflSpecularExp (MatNum: integer): Single;
Public function TransSpecularExp(MatNum: integer): Single;
Public function OnlyEmissiveMaterial: boolean;
Public function AllMaterialsTransparent: boolean;
Public class function ForVRMLVersion(const Version: TX3DVersion): boolean; override;
Public function MaterialInfo(const Index: Integer): TX3DMaterialInfo_1;

Properties

Public property FdAmbientColor: TMFColor read FFdAmbientColor;
Public property FdDiffuseColor: TMFColor read FFdDiffuseColor;
Public property FdSpecularColor: TMFColor read FFdSpecularColor;
Public property FdEmissiveColor: TMFColor read FFdEmissiveColor;
Public property FdShininess: TMFFloat read FFdShininess;
Public property FdTransparency: TMFFloat read FFdTransparency;
Public property FdMirror: TMFFloat read FFdMirror;
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: TMFFloat read FFdReflSpecularExp;
Public property FdTransSpecularExp: TMFFloat read FFdTransSpecularExp;
Public property FdFogImmune: TSFBool read FFdFogImmune;

Description

Methods

Public procedure CreateNode; override;
 
Public class function ClassNodeTypeName: string; override;
 
Public function AmbientColor3Single(MatNum: integer): TVector3Single;

Easily extract VRML 1.0 material properties. These methods secure you from accessing non-existing material index (will return the last existing value, or default value if field is empty).

Functions returning TVector4Single add Opacity at the last component.

Transparency and Opacity are in [0 .. 1] range. Opacity = 1 - Transparency.

ShininessExp is the not normalized shininess exponent for Phong lighting equations. Normal VRML/X3D shininess field is "normalized", that is it has to be multiplied by 128 to get actual exponent for lighting equations.

Public function AmbientColor4Single(MatNum: integer): TVector4Single;
 
Public function DiffuseColor3Single(MatNum: integer): TVector3Single;
 
Public function DiffuseColor4Single(MatNum: integer): TVector4Single;
 
Public function SpecularColor3Single(MatNum: integer): TVector3Single;
 
Public function SpecularColor4Single(MatNum: integer): TVector4Single;
 
Public function EmissiveColor3Single(MatNum: integer): TVector3Single;
 
Public function EmissiveColor4Single(MatNum: integer): TVector4Single;
 
Public function Transparency(MatNum: integer): Single;
 
Public function Opacity(MatNum: integer): Single;
 
Public function Shininess(MatNum: integer): Single;
 
Public function ShininessExp(MatNum: integer): Single;
 
Public function Mirror(MatNum: integer): Single;
 
Public function ReflSpecularExp (MatNum: integer): Single;
 
Public function TransSpecularExp(MatNum: integer): Single;
 
Public function OnlyEmissiveMaterial: boolean;

Only the emissive field is not empty. This detects a special case described in VRML 1.0 specification: when ambient, diffuse and specular are all empty (no values), then emissiveColor should be used at the final color and shape should be unlit.

You should use the EmissiveColor4Single in this case.

Public function AllMaterialsTransparent: boolean;

All the "transparency" field values are greater than zero. So the blending should be used when rendering.

Note that when "transparency" field is empty, then we assume a default transparency (0) should be used. So AllMaterialsTransparent is False then (contrary to the strict definition of "all", which should be true for empty sets).

Public class function ForVRMLVersion(const Version: TX3DVersion): boolean; override;
 
Public function MaterialInfo(const Index: Integer): TX3DMaterialInfo_1;
 

Properties

Public property FdAmbientColor: TMFColor read FFdAmbientColor;
 
Public property FdDiffuseColor: TMFColor read FFdDiffuseColor;
 
Public property FdSpecularColor: TMFColor read FFdSpecularColor;
 
Public property FdEmissiveColor: TMFColor read FFdEmissiveColor;
 
Public property FdShininess: TMFFloat read FFdShininess;
 
Public property FdTransparency: TMFFloat read FFdTransparency;
 
Public property FdMirror: TMFFloat read FFdMirror;
 
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: TMFFloat read FFdReflSpecularExp;
 
Public property FdTransSpecularExp: TMFFloat read FFdTransSpecularExp;
 
Public property FdFogImmune: TSFBool read FFdFogImmune;
 

Generated by PasDoc 0.13.0 on 2014-08-30 12:10:51