Class TModelFormat

Unit

Declaration

type TModelFormat = class(TObject)

Description

Information about a model format, used with RegisterModelFormat.

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.

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.

Public OnSave: TModelSaveEvent;

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

Public MimeTypes: TCastleStringList;

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

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.

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.

Methods

Public constructor Create;

This item has no description.

Public destructor Destroy; override;

This item has no description.


Generated by PasDoc 0.16.0-snapshot.