Class TPolyhedron

Unit

Declaration

type TPolyhedron = class(TModel3D)

Description

Describe a polyhedron.

TPolyhedron introduces fields, properties and methods that helps to define and manage the 3D model.

This class doesn't use textures, thus it uses less memory and it's a bit faster than TTexturedPolyhedron.

Hierarchy

Overview

Methods

Protected function GetVertexList: TVector3DList;
Protected function GetNormalList: TVector3DList;
Protected function GetPolygonList: TPolygonList;
Public constructor Create; override;
Public destructor Destroy; override;
Public procedure SetNumVertices (const aNum: Integer);
Public procedure SetVertexList (aVectors: TVector3DList);
Public procedure SetNumNormals (const aNum: Integer);
Public procedure SetNormalList (aVectors: TVector3DList);
Public procedure SetNumPolygons (const aNum: Integer);
Public procedure SetPolygonList (aPolygons: TPolygonList);
Public function BoundingSphereRadius: Single; override;
Public function BoundingBox: TBox; override;
Public PROCEDURE Render (CONST aObject: TObject3D); OVERRIDE;

Properties

Public property NumVertices: Integer read GetNumVertices;
Public property Vertices[constaNdx:Integer]: TVector3D read GetVertex write SetVertex;
Public property NumNormals: Integer read GetNumNormals;
Public property Normals[constaNdx:Integer]: TVector3D read GetNormal write SetNormal;
Public property NumPolygons: Integer read GetNumPolygons;
Public property Polygons[constaNdx:Integer]: TPolygon read GetPolygon write SetPolygon;
Public property Materials: TMaterialList read fMaterials;

Description

Methods

Protected function GetVertexList: TVector3DList;

Get a copy of the vertices.

This is useful as access using the Vertices property might be slightly slower, specially when accessing to a lot of vertices.

See also
TPolyhedron.SetVertexList
Assign a list of vertices.
TPolyhedron.NumVertices
Number of vertices in the mesh.
TPolyhedron.Vertices
Provides access to the vertices.
Protected function GetNormalList: TVector3DList;

Get a copy of the normals.

This is useful as access using the Normals property might be slightly slower, specially when accessing to a lot of normals.

See also
TPolyhedron.SetNormalList
Assign a list of normals.
TPolyhedron.NumNormals
Number of normals.
TPolyhedron.Normals
Provides access to the normals.
Protected function GetPolygonList: TPolygonList;

Get a copy of the polygons.

This is useful as access using the Polygons property might be slightly slower, specially when accessing to a lot of polygons.

See also
TPolyhedron.SetPolygonList
Assign a list of polygons.
TPolyhedron.NumPolygons
Number of polygons.
TPolyhedron.Polygons
Provides access to the polygons.
Public constructor Create; override;

Constructor.

Public destructor Destroy; override;

Destructor.

Public procedure SetNumVertices (const aNum: Integer);

Set number of vertices of the polyhedron.

See also
TPolyhedron.SetVertexList
Assign a list of vertices.
TPolyhedron.GetVertexList
Get a copy of the vertices.
TPolyhedron.NumVertices
Number of vertices in the mesh.
TPolyhedron.Vertices
Provides access to the vertices.
Public procedure SetVertexList (aVectors: TVector3DList);

Assign a list of vertices.

This will replace all vertices with the given list. It also change the number of vertices.

See also
TPolyhedron.GetVertexList
Get a copy of the vertices.
TPolyhedron.NumVertices
Number of vertices in the mesh.
TPolyhedron.Vertices
Provides access to the vertices.
Public procedure SetNumNormals (const aNum: Integer);

Set number of normals used by the polyhedron.

See also
TPolyhedron.SetNormalList
Assign a list of normals.
TPolyhedron.GetNormalList
Get a copy of the normals.
TPolyhedron.NumNormals
Number of normals.
TPolyhedron.Normals
Provides access to the normals.
Public procedure SetNormalList (aVectors: TVector3DList);

Assign a list of normals.

This will replace all normals with the given list. It also change the number of normals.

See also
TPolyhedron.GetNormalList
Get a copy of the normals.
TPolyhedron.NumNormals
Number of normals.
TPolyhedron.Normals
Provides access to the normals.
Public procedure SetNumPolygons (const aNum: Integer);

Set number of polygons of the polyhedron.

See also
TPolyhedron.SetPolygonList
Assign a list of polygons.
TPolyhedron.GetPolygonList
Get a copy of the polygons.
TPolyhedron.NumPolygons
Number of polygons.
TPolyhedron.Polygons
Provides access to the polygons.
Public procedure SetPolygonList (aPolygons: TPolygonList);

Assign a list of polygons.

This will replace all polygons with the given list. It also change the number of polygons.

See also
TPolyhedron.GetPolygonList
Get a copy of the polygons.
TPolyhedron.NumPolygons
Number of polygons.
TPolyhedron.Polygons
Provides access to the polygons.
Public function BoundingSphereRadius: Single; override;

Calculate the bounding sphere radius of the model.

This method uses current Vertices to calculate the radius.

See also
TPolyhedron.Vertices
Provides access to the vertices.
Public function BoundingBox: TBox; override;

Returns the bounding box limits.

This method uses current Vertices to calculate the bounding box.

See also
TPolyhedron.Vertices
Provides access to the vertices.
Public PROCEDURE Render (CONST aObject: TObject3D); OVERRIDE;

Renders the polyedron.

Properties

Public property NumVertices: Integer read GetNumVertices;

Number of vertices in the mesh.

See also
TPolyhedron.Vertices
Provides access to the vertices.
TPolyhedron.SetNumVertices
Set number of vertices of the polyhedron.
Public property Vertices[constaNdx:Integer]: TVector3D read GetVertex write SetVertex;

Provides access to the vertices.

See also
TPolyhedron.NumVertices
Number of vertices in the mesh.
TPolyhedron.SetNumVertices
Set number of vertices of the polyhedron.
TPolyhedron.SetVertexList
Assign a list of vertices.
Public property NumNormals: Integer read GetNumNormals;

Number of normals.

See also
TPolyhedron.Normals
Provides access to the normals.
TPolyhedron.SetNumNormals
Set number of normals used by the polyhedron.
Public property Normals[constaNdx:Integer]: TVector3D read GetNormal write SetNormal;

Provides access to the normals.

See also
TPolyhedron.NumVertices
Number of vertices in the mesh.
TPolyhedron.SetNumNormals
Set number of normals used by the polyhedron.
TPolyhedron.SetNormalList
Assign a list of normals.
TPolyhedron.NumPolygons
Number of polygons.
TPolyhedron.SetNumPolygons
Set number of polygons of the polyhedron.
TPolyhedron.SetPolygonList
Assign a list of polygons.
Public property NumPolygons: Integer read GetNumPolygons;

Number of polygons.

See also
TPolyhedron.Polygons
Provides access to the polygons.
TPolyhedron.SetNumPolygons
Set number of polygons of the polyhedron.
Public property Polygons[constaNdx:Integer]: TPolygon read GetPolygon write SetPolygon;

Provides access to the polygons.

Public property Materials: TMaterialList read fMaterials;

Materials used by the model.


Generated by PasDoc 0.15.0. Generated on 2025-07-31 11:41:01.