Class TLcdOpenFlightFileDecoder

java.lang.Object
com.luciad.format.object3d.openflight.TLcdOpenFlightFileDecoder
All Implemented Interfaces:
ILcdInputStreamFactoryCapable

public class TLcdOpenFlightFileDecoder extends Object implements ILcdInputStreamFactoryCapable
A decoder for OpenFlight (.FLT) files. This decoder produces a TLcdOpenFlightHeaderNode object, representing the complete scene graph as stored in the OpenFlight database.

This decoder supports versions 15.x and 16.x of the OpenFlight specification. The following node and record types are currently supported:

  • Degree of freedom
  • External reference
  • Face
  • Group
  • Header
  • Instance definition and instance reference
  • Level Of Detail
  • Material palettes
  • Object
  • Subface
  • Switch
  • Texture palettes
  • Transformation matrix
  • Vertex
  • Vertex palettes
  • Binary Separating Plane (BSP)
The following limitations exist:
  • The attributes of external reference records are ignored. The referenced file must always be included in its entirety.

A typical use-case is to use an OpenFlight file to style a point with a 3D icon. For data on a Lightspeed view, this is achieved by creating a TLsp3DIconStyle containing the OpenFlight icon. This icon style can then be used as style for your point. The creation of the icon style is illustrated in the following snippet:


   TLsp3DIconStyle iconStyle = TLsp3DIconStyle.newBuilder().icon( "iconFile.flt" ).build();
 
The LuciadLightspeed developer guide contains more information on how to use the created TLsp3DIconStyle in your layer factory.

Note that Lightspeed also supports the use of Collada data for 3D icons. See the package documentation of com.luciad.format.object3d for more information.

  • Constructor Details

    • TLcdOpenFlightFileDecoder

      public TLcdOpenFlightFileDecoder()
  • Method Details

    • setInputStreamFactory

      public void setInputStreamFactory(ILcdInputStreamFactory aILcdInputStreamFactory)
      Description copied from interface: ILcdInputStreamFactoryCapable
      Sets the input stream factory to be used.
      Specified by:
      setInputStreamFactory in interface ILcdInputStreamFactoryCapable
      Parameters:
      aILcdInputStreamFactory - the input stream factory to be used.
    • getInputStreamFactory

      public ILcdInputStreamFactory getInputStreamFactory()
      Description copied from interface: ILcdInputStreamFactoryCapable
      Returns the input stream factory that is used.
      Specified by:
      getInputStreamFactory in interface ILcdInputStreamFactoryCapable
      Returns:
      the input stream factory that is used.
    • addStatusListener

      public void addStatusListener(ILcdStatusListener aStatusListener)
      Adds a status listener to be notified of decoding progress.
      Parameters:
      aStatusListener - an ILcdStatusListener
    • removeStatusListener

      public boolean removeStatusListener(ILcdStatusListener aStatusListener)
      Removes a previously registered status listener
      Parameters:
      aStatusListener - an ILcdStatusListener
      Returns:
      true if the status listener was successfully removed
    • decode

      public TLcdOpenFlightHeaderNode decode(String aSourceName) throws IOException
      Decodes the given .FLT file and returns a fully defined scene graph, accessible through its top-level TLcdOpenFlightHeaderNode.
      Parameters:
      aSourceName - the file to decode
      Returns:
      a TLcdOpenFlightHeaderNode
      Throws:
      IOException