Class TMaterialNode_1

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TMaterialNode_1 = class(TAbstractChildNode)

Description

no description available, TAbstractChildNode description follows

Abstract node type that indicates that the node may be used as a child of a grouping node, e.g. inside TAbstractX3DGroupingNode.FdChildren.

Hierarchy

Overview

Methods

Public procedure CreateNode; override;
Public destructor Destroy; override;
Public class function ClassX3DType: 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 PureEmissive: boolean;
Public procedure ForcePureEmissive;
Public class function ForVRMLVersion(const Version: TX3DVersion): boolean; override;
Public function MaterialInfo: TMaterialInfo;

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 destructor Destroy; override;
 
Public class function ClassX3DType: 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 PureEmissive: boolean;

Only the emissive color is not black (zero). 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 procedure ForcePureEmissive;

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

Public class function ForVRMLVersion(const Version: TX3DVersion): boolean; override;
 
Public function MaterialInfo: TMaterialInfo;

Material information based on this node. It is automatically updated when properties of this material change. Do not free it yourself, it will be automatically freed when this node is freed.

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.14.0.