Class TMaterialNode_1
Unit
X3DNodes
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
Properties
Description
Methods
 |
procedure CreateNode; override; |
|
 |
class function ClassNodeTypeName: string; override; |
|
 |
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.
|
 |
function Transparency(MatNum: integer): Single; |
|
 |
function Opacity(MatNum: integer): Single; |
|
 |
function Shininess(MatNum: integer): Single; |
|
 |
function ShininessExp(MatNum: integer): Single; |
|
 |
function Mirror(MatNum: integer): Single; |
|
 |
function ReflSpecularExp (MatNum: integer): Single; |
|
 |
function TransSpecularExp(MatNum: integer): Single; |
|
 |
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.
|
 |
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).
|
 |
class function ForVRMLVersion(const Version: TX3DVersion): boolean; override; |
|
Properties
 |
property FdAmbientColor: TMFColor read FFdAmbientColor; |
|
 |
property FdDiffuseColor: TMFColor read FFdDiffuseColor; |
|
 |
property FdSpecularColor: TMFColor read FFdSpecularColor; |
|
 |
property FdEmissiveColor: TMFColor read FFdEmissiveColor; |
|
 |
property FdShininess: TMFFloat read FFdShininess; |
|
 |
property FdTransparency: TMFFloat read FFdTransparency; |
|
 |
property FdMirror: TMFFloat read FFdMirror; |
|
 |
property FdReflSpecular: TMFColor read FFdReflSpecular; |
|
 |
property FdReflDiffuse: TMFColor read FFdReflDiffuse; |
|
 |
property FdTransSpecular: TMFColor read FFdTransSpecular; |
|
 |
property FdTransDiffuse: TMFColor read FFdTransDiffuse; |
|
 |
property FdReflSpecularExp: TMFFloat read FFdReflSpecularExp; |
|
 |
property FdTransSpecularExp: TMFFloat read FFdTransSpecularExp; |
|
 |
property FdFogImmune: TSFBool read FFdFogImmune; |
|
Generated by PasDoc 0.13.0 on 2013-08-17 21:27:17
|