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 specifies how light affects one side of the surface.
Note: Whether the shape is visible from both sides depends on the geometry TAbstractGeometryNode.Solid field, and is independent of whether you use this node or TTwoSidedMaterialNode.
Hierarchy
- TObject
- TPersistent
- TX3DFileItem
- TX3DNode
- TAbstractNode
- TAbstractAppearanceChildNode
- TAbstractMaterialNode
- TAbstractOneSidedMaterialNode
- TMaterialNode
Overview
Methods
destructor Destroy; override; |
|
class function ForVRMLVersion(const Version: TX3DVersion): boolean; override; |
|
function Opacity: Single; |
|
function ShininessExp: Single; |
|
function MaterialInfo: TMaterialInfo; override; |
|
function PureEmissive: boolean; |
|
procedure ForcePureEmissive; deprecated 'use TUnlitMaterialNode for unlit materials'; |
|
procedure CreateNode; override; |
|
class function ClassX3DType: String; override; |
|
procedure SetReflSpecular(const Value: array of TCastleColorRGB); overload; |
|
procedure SetReflSpecular(const Value: TVector3List); overload; |
|
procedure SetReflDiffuse(const Value: array of TCastleColorRGB); overload; |
|
procedure SetReflDiffuse(const Value: TVector3List); overload; |
|
procedure SetTransSpecular(const Value: array of TCastleColorRGB); overload; |
|
procedure SetTransSpecular(const Value: TVector3List); overload; |
|
procedure SetTransDiffuse(const Value: array of TCastleColorRGB); overload; |
|
procedure SetTransDiffuse(const Value: TVector3List); overload; |
Properties
property FdAmbientIntensity: TSFFloat read FFdAmbientIntensity; |
|
property AmbientIntensity: Single read GetAmbientIntensity write SetAmbientIntensity; |
|
property FdAmbientTexture: TSFNode read FFdAmbientTexture; |
|
property AmbientTexture: TAbstractSingleTextureNode read GetAmbientTexture write SetAmbientTexture; |
|
property FdAmbientTextureMapping: TSFString read FFdAmbientTextureMapping; |
|
property AmbientTextureMapping: String read GetAmbientTextureMapping write SetAmbientTextureMapping; |
|
property FdDiffuseColor: TSFColor read FFdDiffuseColor; |
|
property DiffuseColor: TCastleColorRGB read GetDiffuseColor write SetDiffuseColor; |
|
property FdDiffuseTexture: TSFNode read FFdDiffuseTexture; |
|
property DiffuseTexture: TAbstractSingleTextureNode read GetDiffuseTexture write SetDiffuseTexture; |
|
property FdDiffuseTextureMapping: TSFString read FFdDiffuseTextureMapping; |
|
property DiffuseTextureMapping: String read GetDiffuseTextureMapping write SetDiffuseTextureMapping; |
|
property FdOcclusionStrength: TSFFloat read FFdOcclusionStrength; |
|
property OcclusionStrength: Single read GetOcclusionStrength write SetOcclusionStrength; |
|
property FdOcclusionTexture: TSFNode read FFdOcclusionTexture; |
|
property OcclusionTexture: TAbstractSingleTextureNode read GetOcclusionTexture write SetOcclusionTexture; |
|
property FdOcclusionTextureMapping: TSFString read FFdOcclusionTextureMapping; |
|
property OcclusionTextureMapping: String read GetOcclusionTextureMapping write SetOcclusionTextureMapping; |
|
property FdShininess: TSFFloat read FFdShininess; |
|
property Shininess: Single read GetShininess write SetShininess; |
|
property FdShininessTexture: TSFNode read FFdShininessTexture; |
|
property ShininessTexture: TAbstractSingleTextureNode read GetShininessTexture write SetShininessTexture; |
|
property FdShininessTextureMapping: TSFString read FFdShininessTextureMapping; |
|
property ShininessTextureMapping: String read GetShininessTextureMapping write SetShininessTextureMapping; |
|
property FdSpecularColor: TSFColor read FFdSpecularColor; |
|
property SpecularColor: TCastleColorRGB read GetSpecularColor write SetSpecularColor; |
|
property FdSpecularTexture: TSFNode read FFdSpecularTexture; |
|
property SpecularTexture: TAbstractSingleTextureNode read GetSpecularTexture write SetSpecularTexture; |
|
property FdSpecularTextureMapping: TSFString read FFdSpecularTextureMapping; |
|
property SpecularTextureMapping: String read GetSpecularTextureMapping write SetSpecularTextureMapping; |
|
property FdTransparency: TSFFloat read FFdTransparency; |
|
property Transparency: Single read GetTransparency write SetTransparency; |
|
property FdFogImmune: TSFBool read FFdFogImmune; |
|
property FogImmune: Boolean read GetFogImmune write SetFogImmune; |
|
property FdMirror: TSFFloat read FFdMirror; |
|
property Mirror: Single read GetMirror write SetMirror; |
|
property FdReflSpecular: TMFColor read FFdReflSpecular; |
|
property FdReflDiffuse: TMFColor read FFdReflDiffuse; |
|
property FdTransSpecular: TMFColor read FFdTransSpecular; |
|
property FdTransDiffuse: TMFColor read FFdTransDiffuse; |
|
property FdReflSpecularExp: TSFFloat read FFdReflSpecularExp; |
|
property ReflSpecularExp: Single read GetReflSpecularExp write SetReflSpecularExp; |
|
property FdTransSpecularExp: TSFFloat read FFdTransSpecularExp; |
|
property TransSpecularExp: Single read GetTransSpecularExp write SetTransSpecularExp; |
Description
Methods
destructor Destroy; override; |
|
This item has no description. |
class function ForVRMLVersion(const Version: TX3DVersion): boolean; override; |
|
This item has no description. Showing description inherited from TX3DNode.ForVRMLVersion. Some nodes are present only in specific VRML/X3D version. This functions decides it. For example some nodes can only work in VRML < 2.0, some others only in VRML >= 2.0. There are even some pairs of nodes: for example TConeNode_1 works with VRML < 2.0, TConeNode works with VRML >= 2.0. NodesManager will use this. Default implementation of this function returns always In practice I only use this function when various VRML/X3D versions specify the same node name but
|
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. |
function MaterialInfo: TMaterialInfo; override; |
|
This item has no description. Showing description inherited from TAbstractMaterialNode.MaterialInfo. 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. |
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. |
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. |
procedure CreateNode; override; |
|
Create node fields and events. |
class function ClassX3DType: String; override; |
|
This item has no description. Showing description inherited from TX3DNode.ClassX3DType. Node type name in VRML/X3D, for this class. Normal VRML/X3D node classes should override this to return something non-empty, and then X3DType automatically will return the same value. Empty for classes that don't have a hardcoded VRML/X3D node name, like a special TX3DUnknownNode. Such special classes should override then X3DType to return actual non-empty name there. You usually should call X3DType. The only use of this method is that it works on classes (it's "class function"), without needing at actual instance. |
procedure SetReflSpecular(const Value: array of TCastleColorRGB); overload; |
|
This item has no description. |
procedure SetReflSpecular(const Value: TVector3List); overload; |
|
This item has no description. |
procedure SetReflDiffuse(const Value: array of TCastleColorRGB); overload; |
|
This item has no description. |
procedure SetReflDiffuse(const Value: TVector3List); overload; |
|
This item has no description. |
procedure SetTransSpecular(const Value: array of TCastleColorRGB); overload; |
|
This item has no description. |
procedure SetTransSpecular(const Value: TVector3List); overload; |
|
This item has no description. |
procedure SetTransDiffuse(const Value: array of TCastleColorRGB); overload; |
|
This item has no description. |
procedure SetTransDiffuse(const Value: TVector3List); overload; |
|
This item has no description. |
Properties
property FdAmbientIntensity: TSFFloat read FFdAmbientIntensity; |
|
Internal wrapper for property |
property AmbientIntensity: Single read GetAmbientIntensity write SetAmbientIntensity; |
|
This item has no description. |
property FdAmbientTexture: TSFNode read FFdAmbientTexture; |
|
Internal wrapper for property |
property AmbientTexture: TAbstractSingleTextureNode read GetAmbientTexture write SetAmbientTexture; |
|
This item has no description. |
property FdAmbientTextureMapping: TSFString read FFdAmbientTextureMapping; |
|
Internal wrapper for property |
property AmbientTextureMapping: String read GetAmbientTextureMapping write SetAmbientTextureMapping; |
|
This item has no description. |
property FdDiffuseColor: TSFColor read FFdDiffuseColor; |
|
Internal wrapper for property |
property DiffuseColor: TCastleColorRGB read GetDiffuseColor write SetDiffuseColor; |
|
The primary way to control the color of object with Phong material. The object reflects light sources depending on the angle of the surface with respect to the light source. The more directly the surface faces the light, the more diffuse light reflects. |
property FdDiffuseTexture: TSFNode read FFdDiffuseTexture; |
|
Internal wrapper for property |
property DiffuseTexture: TAbstractSingleTextureNode read GetDiffuseTexture write SetDiffuseTexture; |
|
The primary texture to control the color of object with Phong material. The RGB channel of this texture is multiplied with DiffuseColor, and alpha channel is multiplied with the opacity (1-Transparency). |
property FdDiffuseTextureMapping: TSFString read FFdDiffuseTextureMapping; |
|
Internal wrapper for property |
property DiffuseTextureMapping: String read GetDiffuseTextureMapping write SetDiffuseTextureMapping; |
|
This item has no description. |
property FdOcclusionStrength: TSFFloat read FFdOcclusionStrength; |
|
Internal wrapper for property |
property OcclusionStrength: Single read GetOcclusionStrength write SetOcclusionStrength; |
|
This item has no description. |
property FdOcclusionTexture: TSFNode read FFdOcclusionTexture; |
|
Internal wrapper for property |
property OcclusionTexture: TAbstractSingleTextureNode read GetOcclusionTexture write SetOcclusionTexture; |
|
This item has no description. |
property FdOcclusionTextureMapping: TSFString read FFdOcclusionTextureMapping; |
|
Internal wrapper for property |
property OcclusionTextureMapping: String read GetOcclusionTextureMapping write SetOcclusionTextureMapping; |
|
This item has no description. |
property FdShininess: TSFFloat read FFdShininess; |
|
Internal wrapper for property |
property Shininess: Single read GetShininess write SetShininess; |
|
This item has no description. |
property FdShininessTexture: TSFNode read FFdShininessTexture; |
|
Internal wrapper for property |
property ShininessTexture: TAbstractSingleTextureNode read GetShininessTexture write SetShininessTexture; |
|
This item has no description. |
property FdShininessTextureMapping: TSFString read FFdShininessTextureMapping; |
|
Internal wrapper for property |
property ShininessTextureMapping: String read GetShininessTextureMapping write SetShininessTextureMapping; |
|
This item has no description. |
property FdSpecularColor: TSFColor read FFdSpecularColor; |
|
Internal wrapper for property |
property SpecularColor: TCastleColorRGB read GetSpecularColor write SetSpecularColor; |
|
Color of specular highlight, on shiny objects. |
property FdSpecularTexture: TSFNode read FFdSpecularTexture; |
|
Internal wrapper for property |
property SpecularTexture: TAbstractSingleTextureNode read GetSpecularTexture write SetSpecularTexture; |
|
This item has no description. |
property FdSpecularTextureMapping: TSFString read FFdSpecularTextureMapping; |
|
Internal wrapper for property |
property SpecularTextureMapping: String read GetSpecularTextureMapping write SetSpecularTextureMapping; |
|
This item has no description. |
property FdTransparency: TSFFloat read FFdTransparency; |
|
Internal wrapper for property |
property Transparency: Single read GetTransparency write SetTransparency; |
|
Setting |
property FdFogImmune: TSFBool read FFdFogImmune; |
|
Internal wrapper for property |
property FogImmune: Boolean read GetFogImmune write SetFogImmune; |
|
This item has no description. |
property FdMirror: TSFFloat read FFdMirror; |
|
Internal wrapper for property |
property Mirror: Single read GetMirror write SetMirror; |
|
This item has no description. |
property FdReflSpecular: TMFColor read FFdReflSpecular; |
|
Internal wrapper for property |
property FdReflDiffuse: TMFColor read FFdReflDiffuse; |
|
Internal wrapper for property |
property FdTransSpecular: TMFColor read FFdTransSpecular; |
|
Internal wrapper for property |
property FdTransDiffuse: TMFColor read FFdTransDiffuse; |
|
Internal wrapper for property |
property FdReflSpecularExp: TSFFloat read FFdReflSpecularExp; |
|
Internal wrapper for property |
property ReflSpecularExp: Single read GetReflSpecularExp write SetReflSpecularExp; |
|
This item has no description. |
property FdTransSpecularExp: TSFFloat read FFdTransSpecularExp; |
|
Internal wrapper for property |
property TransSpecularExp: Single read GetTransSpecularExp write SetTransSpecularExp; |
|
This item has no description. |
Generated by PasDoc 0.16.0-snapshot.