OpenFlightDatabase

Description

sealed class Tinman.AddOns.OpenFlight.OpenFlightDatabase

Derived from

Disposable abstract
IPathInfo
IBeginEnd

Full source code is included in the Tinman 3D SDK download.

A wrapper for an open OpenFlight database.

When a OpenFlightModelReader object is disposed after reading a 3D model, the OpenFlight database is closed. The created IModelGeometry objects perform lazy loading, so the database needs to be re-opened and closed repeatedly, which can quickly become a performance bottleneck. To avoid this, client code may keep an OpenFlightDatabase object: as long as it is alive, the OpenFlight database will remain open.

If a model has been read from a IFileData object which does not represent a file in the local filesystem (see IFileData.IsPathInfoValid), a temporary file is created and then opened as the OpenFlight database. The temporary database will be deleted when the OpenFlightModelReader object resp. the returned OpenFlightDatabase object is disposed. Then, the read IModelGeometry objects will no longer be able to lazy load data and the 3D model will become unusable.

Public / Constructors

For


[OwnerReturn]
public static method For → (1)

path in : Path

[not-null]
The database file.

returns → OpenFlightDatabase

The database wrapper.

Returns the OpenFlightDatabase wrapper for the given database file.

IOException

If an I/O error has occurred.

Public / Attributes

Is​Temporary


public attribute IsTemporary → (get)

value : bool

true if this is a temporary database file that will be deleted upon dispose,
false if this is a regular database file.

Is this a temporary database?

Logging

Logger


public static readonly attribute Logger → (ILogger)

The logger object of this class.