Castle Game EngineIntroduction Units Class Hierarchy Classes, Interfaces, Objects and Records Types Variables Constants Functions and Procedures Identifiers |
Class T3DWorld
Unit
Castle3D
Declaration
type T3DWorld = class(T3DList)
Description
3D world. List of 3D objects, with some central properties.
Hierarchy
Overview
Methods
Description
Methods
 |
function GravityUp: TVector3Single; virtual; abstract; |
Up vector, according to gravity. Gravity force pulls in -GravityUp direction.
|
 |
function GravityCoordinate: Integer; |
The major axis of gravity vector: 0, 1 or 2. This is derived from GravityUp value. It can only truly express GravityUp vector values (1,0,0) or (0,1,0) or (0,0,1), although in practice this is enough for normal games (normal 3D scenes use up either +Y or +Z).
We try to avoid using it in the engine, and use full GravityUp vector wherever possible. Full GravityUp vector may allow for more fun with weird gravity in future games.
|
 |
function WorldMoveAllowed( const OldPos, ProposedNewPos: TVector3Single; out NewPos: TVector3Single; const IsRadius: boolean; const Radius: Single; const OldBox, NewBox: TBox3D; const BecauseOfGravity: boolean): boolean; virtual; abstract; |
Collisions with world. They call corresponding methods without the World prefix, automatically taking into account some knowledge about this 3D world.
Calling these methods to check collisions makes sense if your collision query is not initiated by any existing T3D instance.
If your query originates from some existing T3D instance, you usually do not want to call these WorldXxx methods. Instead call T3D.MoveAllowed, T3D.Height methods. Underneath, they still call World.WorldMoveAllowed and World.WorldHeight , additionally making sure that the 3D object does not collide with itself.
|
 |
function WorldMoveAllowed( const OldPos, NewPos: TVector3Single; const IsRadius: boolean; const Radius: Single; const OldBox, NewBox: TBox3D; const BecauseOfGravity: boolean): boolean; virtual; abstract; |
|
 |
function WorldHeight(const Position: TVector3Single; out AboveHeight: Single; out AboveGround: P3DTriangle): boolean; virtual; abstract; |
|
 |
function WorldLineOfSight(const Pos1, Pos2: TVector3Single): boolean; virtual; abstract; |
|
Generated by PasDoc 0.13.0 on 2014-08-30 12:10:31
|