Record TTriangleHelper

Hierarchy
Fields
Properties

Unit

Declaration

type TTriangleHelper = record helper for TTriangle

Description

Triangle in a 3D model. Helper methods.

Overview

Methods

Public function Shape: TShape;
Public function State: TX3DGraphTraverseState;
Public procedure UpdateWorld;
Public function ShapeNode: TAbstractShapeNode;
Public function MaterialInfo: TMaterialInfo;
Public function Transparency: Single;
Public function IsTransparent: boolean;
Public function IgnoreForShadowRays: boolean;
Public function INormalWorldSpace(const Point: TVector3): TVector3;

Description

Methods

Public function Shape: TShape;

Shape containing this triangle.

Public function State: TX3DGraphTraverseState;

State of this shape, containing various information about 3D shape. This is a shortcut for Shape.State.

Public procedure UpdateWorld;

Use State.Transform to update triangle TTriangle.World geometry from triangle TTriangle.Local geometry.

Public function ShapeNode: TAbstractShapeNode;

X3D shape node of this triangle. May be Nil in case of VRML 1.0.

Public function MaterialInfo: TMaterialInfo;

Material information for the material of this triangle. See TMaterialInfo for usage description. Returns Nil when no node determines material properties (which indicates white unlit look).

Returned TMaterialInfo is valid only as long as the underlying node (TMaterialNode, TPhysicalMaterialNode, TUnlitMaterialNode, TCommonSurfaceShaderNode...) exists. Do not free it yourself, it will be automatically freed.

Public function Transparency: Single;

Return transparency of this triangle's material. Equivalent to MaterialInfo.Transparency, although a little faster.

Public function IsTransparent: boolean;

Returns True for triangles that are transparent.

Public function IgnoreForShadowRays: boolean;

Returns True for triangles that should be ignored by shadow rays. Returns True for transparent triangles (with Material.Transparency > 0) and non-shadow-casting triangles (with Appearance.shadowCaster = FALSE).

Public function INormalWorldSpace(const Point: TVector3): TVector3;

For a given position (in world coordinates), return the smooth normal vector at this point, with the resulting normal vector in world coordinates.

See also
TTriangle.INormal
For a given position (in world coordinates), return the smooth normal vector at this point.

Generated by PasDoc 0.16.0-snapshot.