Castle Game EngineIntroduction Units Class Hierarchy Classes, Interfaces, Objects and Records Types Variables Constants Functions and Procedures Identifiers |
Unit Castle3D
Description
Base 3D objects (T3D, T3DList, T3DTransform, T3DOrient, T3DMoving).
Uses
Overview
Classes, Interfaces, Objects and Records
Functions and Procedures
Types
Constants
MaxSingle = Math.MaxSingle; |
DefaultFallMinHeightToDamage = 5.0; |
DefaultFallDamageScaleMin = 0.8; |
DefaultFallDamageScaleMax = 1.2; |
DefaultCreatureFallMinHeightToSound = 1.0; |
DefaultPlayerFallMinHeightToSound = 4.0; |
DefaultCreatureFallSoundName = 'creature_fall'; |
DefaultPlayerFallSoundName = 'player_fall'; |
DirectionFromOrientation: array [TOrientationType] of TVector3Single =
( (0, 0, -1),
(0, -1, 0),
(1, 0, 0) ); |
UpFromOrientation: array [TOrientationType] of TVector3Single =
( (0, 1, 0),
(0, 0, 1),
(0, 0, 1) ); |
Variables
Description
Functions and Procedures
Types
TRenderFromViewFunction = procedure of object; |
|
TVisibleChange = (...); |
Describe what visible thing changed for T3D.VisibleChangeHere.
Values
-
vcVisibleGeometry: Something visible in the geometry changed. "Geometry" means that this is applicable only to actual 3D shape changes. (Think about "does depth buffer from some point in space changes" — this is actually why we have separate vcVisibleGeometry and vcVisibleNonGeometry for now, as GeneratedShadowMap does need to be updated only on geometry changes.) So it's not applicable when only light conditions, materials, textures and such change.
-
vcVisibleNonGeometry: Something visible changed, but not geometry. For example, material or texture on visible surface changed.
-
vcCamera: Camera view (the settings passed to TCastleSceneCore.CameraChanged) changed.
|
TPrepareResourcesOption = (...); |
Various things that T3D.PrepareResources may prepare.
Values
-
prRender:
-
prBackground:
-
prBoundingBox:
-
prTrianglesListShadowCasters:
-
prManifoldAndBorderEdges:
-
prSpatial: Prepare octrees (determined by things like TCastleSceneCore.Spatial).
-
prScreenEffects:
|
TAbstractLightInstancesList = TFPSList; |
List of lights. Always TLightInstancesList, but we cannot declare it here as such.
|
TRemoveType = (...); |
Values
-
rtNone:
-
rtRemove:
-
rtRemoveAndFree:
|
TOrientationType = (...); |
Values
-
otUpYDirectionMinusZ: Sensible for worlds oriented around Y axis. That is when gravity pulls in -Y and GravityUp vector is +Y. Transformation makes -Z and +Y match (respectively) Direction and Up.
This matches default direction/up of OpenGL and VRML/X3D cameras.
For example, using this value for T3DOrient.Orientation (or even T3DOrient.DefaultOrientation) is sensible if you use default Blender X3D exporter, and you let the exporter to make a transformation (to make +Z up into +Y up). This is the default setting. Then you can follow the standard Blender view names ("front", "top" and such) when modelling, and Blender tools like "X-axis mirror" will work best.
-
otUpZDirectionMinusY: Sensible for worlds oriented around Z axis. Transformation makes -Y and +Z match (respectively) Direction and Up.
Using this value for T3DOrient.Orientation (or even T3DOrient.DefaultOrientation) is sensible if you export your models from Blender without transforming them during export. Note that this is not the default Blender X3D exporter behavior. But you can configure the exporter to work like this (not transform), and then you can follow the standard Blender view names ("front", "top" and such) when modelling.
-
otUpZDirectionX:
Warning: this symbol is deprecated. Up in +Z (like otUpZDirectionMinusY) and direction in +X. Should not be used in new models.
|
T3DExistsEvent = function(const Item: T3D): boolean of object; |
|
Constants
MaxSingle = Math.MaxSingle; |
|
DefaultFallMinHeightToDamage = 5.0; |
Default values common to TPlayer and TCreature classes.
Note that FallMinHeightToSound is usually better to be larger for player, to avoid making "fall" sound when player merely jumps or walks down a steep hill. No such need for creature.
|
DefaultFallDamageScaleMin = 0.8; |
|
DefaultFallDamageScaleMax = 1.2; |
|
DefaultCreatureFallMinHeightToSound = 1.0; |
|
DefaultPlayerFallMinHeightToSound = 4.0; |
|
DefaultCreatureFallSoundName = 'creature_fall'; |
|
DefaultPlayerFallSoundName = 'player_fall'; |
|
Variables
RenderDebug3D: boolean = false; |
Creatures, items and possibly other 3D stuff may look at these variables to display additional features of 3D objects, helpful to debug collisions, AI and other things.
|
RenderDebugCaptions: boolean = false; |
|
LogShadowVolumes: boolean = false; |
Log shadow volume information.
Meaningful only if you initialized log (see CastleLog unit) by InitializeLog first.
|
Generated by PasDoc 0.13.0 on 2014-08-30 12:10:31
|