Class TModelFormat

Unit

Declaration

type TModelFormat = class(TObject)

Description

Information about a model format, used with RegisterModelFormat.

Source: scene/load/x3dload.pas (line 251).

Hierarchy

  • TObject
  • TModelFormat

Overview

Fields

Public OnLoad: TModelLoadEvent;
Public OnLoadForceMemoryStream: Boolean;
Public OnSave: TModelSaveEvent;
Public MimeTypes: TCastleStringList;
Public FileFilterName: String;
Public Extensions: TCastleStringList;

Methods

Public constructor Create;
Public destructor Destroy; override;

Description

Fields

Public OnLoad: TModelLoadEvent;

How to load given model format (from TStream to TX3DRootNode). May be unassigned if we cannot load it.

Source: scene/load/x3dload.pas (line 255).

Public OnLoadForceMemoryStream: Boolean;

Does the OnLoad event require a TStream within which we can freely seek. If True, we will load it with soForceMemoryStream for Download.

Source: scene/load/x3dload.pas (line 260).

Public OnSave: TModelSaveEvent;

How to save given model format (from TX3DRootNode to TStream). May be unassigned if we cannot save it.

Source: scene/load/x3dload.pas (line 264).

Public MimeTypes: TCastleStringList;

List of MIME types. At least one MIME type must be provided here, at the time you call RegisterModelFormat.

Source: scene/load/x3dload.pas (line 268).

Public FileFilterName: String;

File filter name, like "X3D classic (*.x3dv)". Must be non-empty.

It's your choice whether to show here extensions, and if yes -> it's your responsibility to make sure they match information in Extensions and map to one of the MIME types specified in MimeTypes.

To map extensions -> MIME types, add the map to UriMimeExtensions.

Source: scene/load/x3dload.pas (line 279).

Public Extensions: TCastleStringList;

List of file extensions (including the leading dot) like '.x3dv'. Must be non-empty, that is: at least one extension must be provided here.

If the model filenames contains multiple extensions, you can specify them here, e.g. ".x3dv.gz" is a valid extension on this list. It is common to pack X3D files in gzip and use ".x3dv.gz" extension, so we handle it here.

It's your responsibility to make sure that all extensions here map to one of the MIME types specified in MimeTypes.

To map extensions -> MIME types, add the map to UriMimeExtensions.

Source: scene/load/x3dload.pas (line 293).

Methods

Public constructor Create;

This item has no description.

Source: scene/load/x3dload.pas (line 295).

Public destructor Destroy; override;

This item has no description.

Source: scene/load/x3dload.pas (line 296).


Generated by PasDoc 0.17.0.snapshot.