Русский | English

Class TCastlePolygon2D

Unit

Declaration

type TCastlePolygon2D = class(TCastleLine2DBase)

Description

A potentially non-convex polygon. It is constructed from a set of vertices using the triangulation method.
To enter edit mode, use "verb" (Edit mode ON) - right-click on the object in the object hierarchy window.

Hierarchy

Overview

Methods

Protected procedure ChangedTransform; override;
Protected procedure SetLineType(NewLineType:TCastleLineType); override;
Public function CalculateAreaWithoutDisplay:single;
Public procedure ReLoadoverride;
Public constructor Create(AOwner: TComponent); override;
Public destructor Destroy; override;
Public procedure Clear; override;
Public function PropertySections(const PropertyName: String): TPropertySections; override;

Properties

Public property Area: single read FArea;
Public property TextureScale: TVector2 read FTextureScale write SetTextureScale;
Published property TextureScalePersistent: TCastleVector2Persistent read FTextureScalePersistent;
Published property TexCoordMode: TPolygonTexCoordMode read FTexCoordMode write SetTexCoordMode default cmDefault;
Published property LineType;

Description

Methods

Protected procedure ChangedTransform; override;
 
Protected procedure SetLineType(NewLineType:TCastleLineType); override;

The line type is always ltClose

Public function CalculateAreaWithoutDisplay:single;
 
Public procedure ReLoadoverride;
 
Public constructor Create(AOwner: TComponent); override;
 
Public destructor Destroy; override;
 
Public procedure Clear; override;
 
Public function PropertySections(const PropertyName: String): TPropertySections; override;
 

Properties

Public property Area: single read FArea;

The area of the polygon is calculated in CastlePolygon2D.Reload. If the polygon does not need to be displayed, then the area can be calculated using the UNKNOWN If self-intersection is detected, then the area is 0.

Public property TextureScale: TVector2 read FTextureScale write SetTextureScale;

The parameter affects the texture magnification when TexCoordMode=cm Repeat. The smaller it is, the bigger the texture.

Published property TextureScalePersistent: TCastleVector2Persistent read FTextureScalePersistent;

TCastlePolygon2D.TextureScale

Published property TexCoordMode: TPolygonTexCoordMode read FTexCoordMode write SetTexCoordMode default cmDefault;

Method for calculating texture coordinates

Published property LineType;
 

Generated by PasDoc 0.16.0.