Package com.luciad.format.object3d.obj
Class TLcdOBJMeshDecoder
java.lang.Object
com.luciad.format.object3d.obj.TLcdOBJMeshDecoder
- All Implemented Interfaces:
ILcdInputStreamFactoryCapable
A decoder for WaveFront OBJ files. This decoder creates an ILcd3DMesh
object.
The decoder supports the following OBJ data constructs:
- Vertices
- Normal vectors
- Texture coordinates
- Faces
- Groups
- Material libraries
TLsp3DIconStyle
containing the OBJ 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.obj" ).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 Summary
-
Method Summary
Modifier and TypeMethodDescriptiondecodeMesh
(String aSourceName) Decodes a .OBJ file from the specified source.Returns the input stream factory that is used.void
setInputStreamFactory
(ILcdInputStreamFactory aILcdInputStreamFactory) Sets the input stream factory to be used.
-
Constructor Details
-
TLcdOBJMeshDecoder
public TLcdOBJMeshDecoder()
-
-
Method Details
-
setInputStreamFactory
Description copied from interface:ILcdInputStreamFactoryCapable
Sets the input stream factory to be used.- Specified by:
setInputStreamFactory
in interfaceILcdInputStreamFactoryCapable
- Parameters:
aILcdInputStreamFactory
- the input stream factory to be used.
-
getInputStreamFactory
Description copied from interface:ILcdInputStreamFactoryCapable
Returns the input stream factory that is used.- Specified by:
getInputStreamFactory
in interfaceILcdInputStreamFactoryCapable
- Returns:
- the input stream factory that is used.
-
decodeMesh
Decodes a .OBJ file from the specified source. Returns an ILcd3DMesh representing the decoded 3D model.- Parameters:
aSourceName
- the file to be decoded- Returns:
- an ILcd3DMesh
- Throws:
IOException
- if the file cannot be decoded
-