Record TTriangleHelper

Hierarchy
Fields
Properties

Unit

Declaration

type TTriangleHelper = record helper for TTriangle

Description

Triangle in a 3D model. Helper methods.

Overview

Methods

function Shape: TShape;
function State: TX3DGraphTraverseState;
procedure UpdateWorld;
function ShapeNode: TAbstractShapeNode;
function Material: TMaterialNode;
function MaterialNode: TMaterialNode; deprecated 'use Material';
function MaterialInfo: TMaterialInfo;
function Transparency: Single;
function IsTransparent: boolean;
function IgnoreForShadowRays: boolean;
function INormalWorldSpace(const Point: TVector3): TVector3;

Description

Methods

function Shape: TShape;

Shape containing this triangle.

function State: TX3DGraphTraverseState;

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

procedure UpdateWorld;

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

function ShapeNode: TAbstractShapeNode;

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

function Material: TMaterialNode;

X3D material node of this triangle. May be Nil in case material is not set, or in VRML 1.0.

function MaterialNode: TMaterialNode; deprecated 'use Material';

Warning: this symbol is deprecated: use Material

 
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 Material or CommonSurfaceShader node exists. Do not free it yourself, it will be automatically freed.

function Transparency: Single;

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

function IsTransparent: boolean;

Returns True for triangles that are transparent.

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

See also
TBaseTrianglesOctree.IgnoreForShadowRays
Ignore (return True) transparent triangles (with Material.Transparency > 0) and non-shadow-casting triangles (with Appearance.shadowCaster = FALSE).
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.15.0.