de.grogra.greenlab.amapsymbol
Class SMBReader
java.lang.Object
de.grogra.greenlab.amapsymbol.SMBReader
public class SMBReader
- extends java.lang.Object
Class providing functionality to load SMB geometry data
The SMBObject describes a geometric object stored in an .smb file. The .smb
file format is used by the AMAPmod software.
In this implementation, the class #PolygonMesh
is re-used to
represent an SMB object.
As .smb files use unsigned variable types not supported by Java, the
following Java variable types are used to represent the unsigned variable
types.
Java 'long' to represent C++ 'unsigned int32' Java 'int' to represent C++
'unsigned int16' Java 'float' to represent C++ 'float'
Due to the use of unsigned variables, the SMB object can contain more
vertices than what the class #PolygonMesh
can support. (Because
#PolygonMesh
uses int indices for indexing the vertices.)
Considering that it is unlikely for the number of vertices to exceed the max
of Java's int, PolygonMesh is re-used. This also allows re-use of the mesh
calculation algorithms already existing in GroIMP.
- Author:
- yongzhi ong
Constructor Summary |
SMBReader(java.io.InputStream input)
|
SMBReader(java.io.InputStream input,
long length)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SMBReader
public SMBReader(java.io.InputStream input)
SMBReader
public SMBReader(java.io.InputStream input,
long length)
getObeject
public Node getObeject()
getPolygonMesh
public PolygonMesh getPolygonMesh()