Castle Game Engine: Castle3D: Class T3DWorld

# Class T3DWorld
Description | Hierarchy | Fields | Methods | Properties
## Unit Castle3D ## Declaration `type T3DWorld = class(T3DList)` ## Description 3D world. List of 3D objects, with some central properties. ## Hierarchy TComponent T3D T3DList T3DWorld ## Overview ### Methods
| `function World: T3DWorld; override;`
| `function CollisionIgnoreItem(const Sender: TObject; const Triangle: P3DTriangle): boolean; virtual; abstract;`
| `function GravityUp: TVector3Single; virtual; abstract;`
| `function GravityCoordinate: Integer;`
| `function Player: T3DAlive; virtual; abstract;`
| `function BaseLights: TAbstractLightInstancesList; virtual; abstract;`
| `function Sectors: TSectorList; virtual; abstract;`
| `function Water: TBox3D; virtual; abstract;`
| `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;`
| `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;`
| `function WorldRay(const RayOrigin, RayDirection: TVector3Single): TRayCollision; virtual; abstract;`
## Description ### Methods
| `function World: T3DWorld; override;`
| `function CollisionIgnoreItem(const Sender: TObject; const Triangle: P3DTriangle): boolean; virtual; abstract;`
See TCastleSceneManager.CollisionIgnoreItem.
| `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 Player: T3DAlive; virtual; abstract;`
Player, see TCastleSceneManager.Player.
| `function BaseLights: TAbstractLightInstancesList; virtual; abstract;`
Base lights, see TCastleSceneManager.BaseLights.
| `function Sectors: TSectorList; virtual; abstract;`
Sectors in the world, for AI. See TCastleSceneManager.Sectors.
| `function Water: TBox3D; virtual; abstract;`
Water volume. See TCastleSceneManager.Water.
| `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;`
| `function WorldRay(const RayOrigin, RayDirection: TVector3Single): TRayCollision; virtual; abstract;`
Generated by PasDoc 0.13.0 on 2015-06-15 04:43:07