Unit X3DFields

DescriptionUsesClasses, Interfaces, Objects and RecordsFunctions and ProceduresTypesConstantsVariables

Description

VRML fields (TX3DField and many descendants).

Uses

Overview

Classes, Interfaces, Objects and Records

Name Description
Class EX3DFieldAssign  
Class EX3DFieldAssignInvalidClass  
Class EX3DNotFound Raised by various X3D methods searching for X3D items (nodes, fields, events and such) when given item cannot be found.
Class TX3DWriter Writer of VRML/X3D to stream.
Class TX3DReader Reading of VRML/X3D from stream.
Class TX3DFileItem Base class for any item within VRML/X3D file: a node, a field, a route, a prototype etc.
Class TX3DFileItemList  
Class TX3DFieldOrEvent Base class for VRML/X3D field or event.
Class TX3DField Base class for all VRML/X3D fields.
Class TX3DFieldList  
Class TX3DSingleField  
Class EX3DMultFieldDifferentCount  
Class TX3DMultField  
Class TX3DSimpleMultField Field holding multiple values.
Class TSFBitMask SFBitMask VRML 1.0 field.
Class TSFBool  
Class TSFEnum SFEnum VRML 1.0 field.
Class TSFFloat  
Class TSFDouble VRML/X3D field holding a double-precision floating point value.
Class TSFTime  
Class TSFImage  
Class TSFLong  
Class TSFInt32  
Class TSFMatrix3f  
Class TSFMatrix3d  
Class TSFMatrix4f  
Class TSFMatrix VRML 1.0 SFMatrix field.
Class TSFMatrix4d  
Class TSFRotation  
Class TSFString  
Class TSFVec2f  
Class TSFVec3f  
Class TSFColor  
Class TSFVec4f  
Class TSFColorRGBA  
Class TSFVec2d  
Class TSFVec3d  
Class TSFVec4d  
Class TMFBool  
Class TMFLong  
Class TMFInt32  
Class TMFMatrix3f  
Class TMFMatrix3d  
Class TMFMatrix4f  
Class TMFMatrix4d  
Class TMFVec2f  
Class TMFVec3f  
Class TMFColor  
Class TMFVec4f  
Class TMFColorRGBA  
Class TMFVec2d  
Class TMFVec3d  
Class TMFVec4d  
Class TMFRotation  
Class TMFFloat  
Class TMFDouble  
Class TMFTime  
Class TMFString  
Class TX3DFieldsManager Stores information about available VRML/X3D field classes.
Class TX3DEventReceiveList  
Class TX3DEvent X3D event.
Class TX3DEventList  

Functions and Procedures

function X3DFieldsManager: TX3DFieldsManager;
procedure DecodeImageColor(const Pixel: LongWord; var G: Byte);
procedure DecodeImageColor(const Pixel: LongWord; var GA: TVector2Byte);
procedure DecodeImageColor(const Pixel: LongWord; var RGB: TVector3Byte);
procedure DecodeImageColor(const Pixel: LongWord; var RGBA: TVector4Byte);
procedure DecodeImageColor(const Pixel: LongInt; var G: Byte);
procedure DecodeImageColor(const Pixel: LongInt; var GA: TVector2Byte);
procedure DecodeImageColor(const Pixel: LongInt; var RGB: TVector3Byte);
procedure DecodeImageColor(const Pixel: LongInt; var RGBA: TVector4Byte);
function X3DChangesToStr(const Changes: TX3DChanges): string;

Types

TSaveToXmlMethod = (...);
TX3DChange = (...);
TX3DChanges = set of TX3DChange;
TX3DFieldOrEventList = specialize TFPGObjectList<TX3DFieldOrEvent>;
TX3DFieldClass = class of TX3DField;
TX3DSingleFieldClass = class of TX3DSingleField;
TX3DSingleFieldList = specialize TFPGObjectList<TX3DSingleField>;
TX3DEventReceive = procedure (Event: TX3DEvent; Value: TX3DField; const Time: TX3DTime) of object;

Constants

DefaultRotation: TVector4Single = (0, 0, 1, 0);
X3DChangeToStr: array [TX3DChange] of string = ( 'Visible Geometry', 'Visible Non-Geometry', 'Camera', 'Redisplay', 'Transform', 'Coordinate', 'VRML 1.0 State (but not affecting geometry or Coordinate)', 'VRML 1.0 State (affecting geometry, but not Coordinate)', 'Material', 'Blending', 'Light active property', 'Light location/direction', 'Light for shadow volumes', 'Switch choice', 'Color node', 'Texture coordinate', 'Texture transform', 'Geometry', 'Environmental sensor bounds', 'Time stop/start/pause/resume', 'Viewpoint vectors', 'Viewpoint projection', 'Texture image', 'Texture renderer properties', 'TextureProperties node', 'Shadow caster', 'Generated texture update', 'FontStyle', 'HeadLight on', 'ClipPlane', 'X3DDragSensorNode.enabled', 'NavigationInfo', 'ScreenEffect.enabled', 'Background', 'Everything', 'Shadow maps');

Description

Functions and Procedures

function X3DFieldsManager: TX3DFieldsManager;
 
procedure DecodeImageColor(const Pixel: LongWord; var G: Byte);

Decode color from integer value, following VRML/X3D SFImage specification.

procedure DecodeImageColor(const Pixel: LongWord; var GA: TVector2Byte);
 
procedure DecodeImageColor(const Pixel: LongWord; var RGB: TVector3Byte);
 
procedure DecodeImageColor(const Pixel: LongWord; var RGBA: TVector4Byte);
 
procedure DecodeImageColor(const Pixel: LongInt; var G: Byte);
 
procedure DecodeImageColor(const Pixel: LongInt; var GA: TVector2Byte);
 
procedure DecodeImageColor(const Pixel: LongInt; var RGB: TVector3Byte);
 
procedure DecodeImageColor(const Pixel: LongInt; var RGBA: TVector4Byte);
 
function X3DChangesToStr(const Changes: TX3DChanges): string;
 

Types

TSaveToXmlMethod = (...);
 
Values
  • sxNone:  
  • sxAttribute:  
  • sxAttributeCustomQuotes:  
  • sxChildElement:  
TX3DChange = (...);

Possible things that happen when given field is changed. Used by TX3DField.ExecuteChanges.

Values
  • chVisibleGeometry: Something visible in the geometry changed. See vcVisibleGeometry. This means that VisibleChangeHere with vcVisibleGeometry included should be called.
  • chVisibleNonGeometry: Something visible changed, but not geometry. See vcVisibleNonGeometry. This means that VisibleChangeHere with vcVisibleNonGeometry included should be called.
  • chCamera: Camera changed. See vcCamera. This means that VisibleChangeHere with vcCamera included should be called.
  • chRedisplay: Call VisibleChangeHere to redisplay the scene.

    If you include one of the chVisibleGeometry, chVisibleNonGeometry, chCamera then this flag (chRedisplay) makes no effect. Otherwise, this flag should be used if your change requires redisplay of the 3D view for some other reasons.

  • chTransform: Transformation of children of this node changed.

    Caller will analyze the scene (your children) to know what this implicates, don't include other flags with this.

  • chCoordinate: Coordinate (both VRML 1.0 and >= 2.0) node "point" field changed.

    Caller will analyze the scene to know what this implicates, don't include other flags with this.

  • chVisibleVRML1State: Something visible in VRML 1.0 state node (that may be present in TX3DGraphTraverseState.LastNodes) changed, but not geometry. Excluding Coordinate node change (this one should go through chCoordinate only).

    This is allowed, and ignored, on nodes that are not part of VRML 1.0 state. (This is useful for alphaChannel field, that is declared in TAbstractGeometryNode, and so is part of some VRML 1.0 state nodes but is also part of VRML >= 2.0 nodes.)

    Caller will analyze the scene to know what this implicates, don't include other flags with this. Exception: you can (and should) include chUseBlending and chTextureImage for appropriate changes.

  • chGeometryVRML1State: Some visible geometry changed because of VRML 1.0 state node change. This is for VRML 1.0 state node changes, excluding non-geometry changes (these go to chVisibleVRML1State) and Coordinate changes (these go to chCoordinate).

    Caller will analyze the scene to know what this implicates, don't include other flags with this.

  • chMaterial2: Something visible in VRML >= 2.0 Material (or TwoSidedMaterial) changed.

    Caller will analyze the scene to know what this implicates, don't include other flags with this. Exception: you can (and should) include chUseBlending for appropriate Material changes.

  • chUseBlending: Something that may affect UseBlending calculation possibly changed. This is guaranteed to work only when used together with chVisibleVRML1State and chMaterial2. It's understood that only shapes that use given material need UseBlending recalculated.
  • chLightInstanceProperty: Light property that is also reflected in TLightInstance structure. Only allowed on node's descending from TAbstractLightNode.

    Caller will analyze the scene to know what this implicates, don't include other flags with this. Exception: include also chLightLocationDirection when appropriate.

  • chLightLocationDirection: Light's location and/or direction changed.

    Caller will analyze the scene to know what this implicates, don't include other flags with this. Exception: include also chLightInstanceProperty when appropriate.

  • chLightForShadowVolumes: TCastleSceneCore.MainLightForShadows possibly changed because of this change.

    Caller will analyze the scene to know what this implicates, don't include other flags with this.

  • chSwitch2: Switch.whichChoice changed, for VRML >= 2.0.

    Caller will analyze the scene to know what this implicates, don't include other flags with this.

  • chColorNode: X3DColorNode colors changed.

    Caller will analyze the scene to know what this implicates, don't include other flags with this.

  • chTextureCoordinate: X3DTextureCoordinateNode coords changed.

    Caller will analyze the scene to know what this implicates, don't include other flags with this.

  • chTextureTransform: VRML >= 2.0 TextureTransform changed. Not for multi-texture node changes, only the simple nodes changes.

    Caller will analyze the scene to know what this implicates, don't include other flags with this.

  • chGeometry: Geometry node visible (or collidable) changed.

    Caller will analyze the scene to know what this implicates, don't include other flags with this.

  • chEnvironmentalSensorBounds: X3DEnvironmentalSensorNode bounds (size/center) changed.

    Caller will analyze the scene to know what this implicates, don't include other flags with this.

  • chTimeStopStart: TimeDependent node is start/stop/pause/resume time changed.

    Caller will analyze the scene to know what this implicates, don't include other flags with this.

  • chViewpointVectors: Viewpoint vectors (position, direction, up, gravity up) changed.

    Caller will analyze the scene to know what this implicates, don't include other flags with this.

  • chViewpointProjection: Viewpoint projection changed.

    Caller will analyze the scene to know what this implicates, don't include other flags with this.

  • chTextureImage: Texture image (data) needs reloading (url or source SFImage data changed). This is for TAbstractTexture2DNode, or TAbstractTexture3DNode.

    Caller will analyze the scene to know what this implicates, don't include other flags with this. Exception: you can mix it with chVisibleVRML1State or chTextureRendererProperties.

  • chTextureRendererProperties: Texture properties used by the renderer changed (something other than only the texture data). This is for fields contained in X3DTextureNode.

    Caller will analyze the scene to know what this implicates, don't include other flags with this. Exception: you can mix it with chTextureImage.

  • chTexturePropertiesNode: Texture properties inside TextureProperties node changed.

    Caller will analyze the scene to know what this implicates, don't include other flags with this.

  • chShadowCasters: What is considered a shadow caster changed.

    Caller will analyze the scene to know what this implicates, don't include other flags with this.

  • chGeneratedTextureUpdateNeeded: Mark the generated texture node (parent of this field) as requiring update (assuming it's "update" field value wants it too).

    Caller will analyze the scene to know what this implicates, don't include other flags with this.

  • chFontStyle: VRML >= 2.0 FontStyle changed. Caller will analyze the scene to know what this implicates, don't include other flags with this.
  • chHeadLightOn: HeadLight on status changed. Caller will analyze the scene to know what this implicates, don't include other flags with this.
  • chClipPlane: Clip plane visible change (enabled or plane equation).
  • chDragSensorEnabled: Enabled field of the pointing-device drag sensor changed. Use only for TSFBool fields within TAbstractDragSensorNode.
  • chNavigationInfo: NavigationInfo field value used in TCastleSceneCore.CameraFromNavigationInfo changed.
  • chScreenEffectEnabled: ScreenEffect.enabled changed
  • chBackground: X3DBackgroundNode properties that are stored inside TBackground display list have changed.
  • chEverything: Everything changed and needs to be recalculated. This is needed for changes on stuff internally cached in TCastleSceneCore, TCastleScene, TShape that cannot be expressed as one of above flags.

    Use only as a last resort, as this is very costly! (And in an ideal implementation, should not be needed.)

    Don't include other flags with this.

  • chShadowMaps: Higher-level shadow maps fields changed. They have to be processed to lower-level fields by calling TCastleSceneCore.ProcessShadowMapsReceivers.

    Don't include other flags with this.

TX3DChanges = set of TX3DChange;
 
TX3DFieldOrEventList = specialize TFPGObjectList<TX3DFieldOrEvent>;
 
TX3DFieldClass = class of TX3DField;
 
TX3DSingleFieldClass = class of TX3DSingleField;
 
TX3DSingleFieldList = specialize TFPGObjectList<TX3DSingleField>;
 
TX3DEventReceive = procedure (Event: TX3DEvent; Value: TX3DField; const Time: TX3DTime) of object;
 

Constants

DefaultRotation: TVector4Single = (0, 0, 1, 0);
 
X3DChangeToStr: array [TX3DChange] of string = ( 'Visible Geometry', 'Visible Non-Geometry', 'Camera', 'Redisplay', 'Transform', 'Coordinate', 'VRML 1.0 State (but not affecting geometry or Coordinate)', 'VRML 1.0 State (affecting geometry, but not Coordinate)', 'Material', 'Blending', 'Light active property', 'Light location/direction', 'Light for shadow volumes', 'Switch choice', 'Color node', 'Texture coordinate', 'Texture transform', 'Geometry', 'Environmental sensor bounds', 'Time stop/start/pause/resume', 'Viewpoint vectors', 'Viewpoint projection', 'Texture image', 'Texture renderer properties', 'TextureProperties node', 'Shadow caster', 'Generated texture update', 'FontStyle', 'HeadLight on', 'ClipPlane', 'X3DDragSensorNode.enabled', 'NavigationInfo', 'ScreenEffect.enabled', 'Background', 'Everything', 'Shadow maps');
 

Generated by PasDoc 0.13.0 on 2013-08-17 21:27:15