Class TShapeList

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TShapeList = class(specialize TFPGObjectList<TShape>)

Description

Hierarchy

  • TFPGObjectList
  • TShapeList

Overview

Methods

Public constructor Create;
Public constructor Create(Tree: TShapeTree; const OnlyActive: boolean; const OnlyVisible: boolean = false; const OnlyCollidable: boolean = false);
Public procedure SortFrontToBack(const Position: TVector3Single);
Public procedure SortBackToFront(const Position: TVector3Single; const Distance3D: boolean);

Description

Methods

Public constructor Create;
 
Public constructor Create(Tree: TShapeTree; const OnlyActive: boolean; const OnlyVisible: boolean = false; const OnlyCollidable: boolean = false);

Constructor that initializes list contents by traversing given tree.

Public procedure SortFrontToBack(const Position: TVector3Single);

Sort shapes by distance to given Position point, closest first.

Public procedure SortBackToFront(const Position: TVector3Single; const Distance3D: boolean);

Sort shapes by distance to given Position point, farthest first.

If Distance3D than we use real distance in 3D. Otherwise we use only the distance in Z coordinate (suitable for rendering things that pretend to be 2D, like Spine slots).