Castle Game EngineIntroduction Units Class Hierarchy Classes, Interfaces, Objects and Records Types Variables Constants Functions and Procedures Identifiers
|
Class T3DList
Unit
Castle3D
Declaration
type T3DList = class(T3D)
Description
List of 3D objects (T3D instances), that can be treated like another, larger 3D object.
It inherits from T3D class, so this list is itself a 3D object, representing a sum of all it's children 3D objects. This allows you to group many 3D objects, and treat them as one T3D descendant.
Hierarchy
Overview
Methods
Properties
Description
Methods
 |
procedure SetWorld(const Value: T3DWorld); override; |
|
|
 |
function GetChild: T3D; virtual; |
|
Additional child inside the list, always processed before all children on the Items list. By default this method returns Nil, indicating no additional child exists. The presence of this child can be calculated in overriden method using any condition, which is sometimes more comfortable than adding item to Items.
This item cannot be removed by methods like T3DList.Remove or by setting RemoveMe in it's T3D.Update implementation. Presence of this item is completely determined by GetChild implementation.
|
 |
procedure Notification(AComponent: TComponent; Operation: TOperation); override; |
|
|
 |
function MoveCollision( const OldPos, NewPos: TVector3Single; const IsRadius: boolean; const Radius: Single; const OldBox, NewBox: TBox3D; const TrianglesToIgnoreFunc: T3DTriangleIgnoreFunc): boolean; override; |
|
|
 |
constructor Create(AOwner: TComponent); override; |
|
|
 |
destructor Destroy; override; |
|
|
 |
procedure Add(const Item: T3D); |
|
Operate on 3D objects contained in the list. You can also operate directly on List instance.
|
 |
procedure Insert(const Index: Integer; const Item: T3D); |
|
|
 |
procedure Remove(const Item: T3D); |
|
|
 |
function Count: Integer; |
|
|
 |
procedure Clear; |
|
|
 |
procedure Exchange(const Index1, Index2: Integer); |
|
|
 |
procedure SortBackToFront(const BlendingSort: TBlendingSort; const CameraPosition: TVector3Single); |
|
Sort objects back-to-front right now following one of the blending sorting algorithms. Only the immediate list items are reordered, looking at their bounding boxes.
Calling this method makes sense if you have a list of objects, and some of them are partially-transparent and may be visible at the same place on the screen. It may even make sense to call this method every frame (like in every TCastleWindowCustom.OnUpdate), if you move or otherwise change the objects (changing their bounding boxes), or if the CameraPosition may change (note that CameraPosition is only relevant if BlendingSort = bs3D).
Sorting partially-transparent objects avoids artifacts when rendering.
Note that this doesn't take care of sorting the shapes within the scenes. For this, you should set Scene.Attributes.BlendingSort to a value like bs3D, to keep it sorted. It is actually the default now.
See the TBlendingSort documentation for the exact specification of sorting algorithms. Using BlendingSort = bsNone does nothing.
|
 |
function BoundingBox: TBox3D; override; |
|
|
 |
function PrepareResourcesSteps: Cardinal; override; |
|
|
 |
procedure Update(const SecondsPassed: Single; var RemoveMe: TRemoveType); override; |
|
|
 |
procedure GLContextClose; override; |
|
|
 |
procedure UpdateGeneratedTextures( const RenderFunc: TRenderFromViewFunction; const ProjectionNear, ProjectionFar: Single; const OriginalViewport: TRectangle); override; |
|
|
 |
procedure VisibleChangeNotification(const Changes: TVisibleChanges); override; |
|
|
 |
procedure CameraChanged(ACamera: TCamera); override; |
|
|
 |
function Dragging: boolean; override; |
|
|
Properties
 |
property Items[I:Integer]: T3D read GetItem write SetItem; |
|
|
 |
property List: T3DListCore read FList; |
|
3D objects inside. Freeing these items automatically removes them from this list.
|
Generated by PasDoc 0.14.0.
|