Fovia's Java Client/Server API
Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
com.fovia.hdrc.hdrcPolygonUtilContext Class Reference

Public Member Functions

int extractPolygons (hdrcVertexCallListContext destination, POLYGON_EXTRACT_PARAMS pep, hdrcVolumeDataContext data, hdrcOctreeContext octree) throws IOException
 
long getId ()
 
int loadOBJ (String fileName, hdrcVertexCallListContext vcl, int smoothMode) throws IOException
 
int loadOBJWithTextureMap (String fileName, String texture, hdrcVertexCallListContext vcl, int smoothMode) throws IOException
 
int loadSTL (String fileName, hdrcVertexCallListContext vcl, int smoothMode) throws IOException
 
long releaseSessionResources () throws IOException
 
int saveOBJ (String fileName, hdrcVertexCallListContext vcl) throws IOException
 
int savePLY (String fileName, hdrcVertexCallListContext vcl) throws IOException
 
int saveSTL (String fileName, hdrcVertexCallListContext vcl) throws IOException
 
int smooth (hdrcVertexCallListContext vcl, int smoothMode, int[] arrsg) throws IOException
 

Static Public Attributes

static final int SMOOTH_MODE_NOP =0
 

Protected Member Functions

native int extractPolygons (long id, long destination, POLYGON_EXTRACT_PARAMS pep, long data, long octree) throws IOException
 
native long getId (long nid)
 
 hdrcPolygonUtilContext (long id)
 
native int loadOBJWithTextureMap (long id, String fileName, String texture, long vcl, int smoothMode) throws IOException
 
native int loadSTL (long id, String fileName, long vcl, int smoothMode) throws IOException
 
native long releaseSessionResources (long id) throws IOException
 
native int saveOBJ (long id, String fileName, long vcl) throws IOException
 
native int savePLY (long id, String fileName, long vcl) throws IOException
 
native int saveSTL (long id, String fileName, long vcl) throws IOException
 
native int smooth (long id, long vcl, int smoothMode, int[] arrsg) throws IOException
 

Detailed Description

Utility interface for loading up polygon objects on the server side.

Member Function Documentation

int com.fovia.hdrc.hdrcPolygonUtilContext.extractPolygons ( hdrcVertexCallListContext  destination,
POLYGON_EXTRACT_PARAMS  pep,
hdrcVolumeDataContext  data,
hdrcOctreeContext  octree 
) throws IOException

Using a logarithmic time marching cubes variant to extract a surface model from volumetric data.

Parameters
destinationThe vertex call list that will get the results of the extraction.
pepThe parameters describing how to perform the extraction.
dataThe dataset to use for polygon extraction.
octreeThe octree attached to the dataset (required).
Returns
long - 0 if successful.
Exceptions
IOException
int com.fovia.hdrc.hdrcPolygonUtilContext.loadOBJ ( String  fileName,
hdrcVertexCallListContext  vcl,
int  smoothMode 
) throws IOException

Loads an OBJ (Wavefront's Advanced Visualizer) file into an IVertexCallList.

Parameters
[in]fileNameFile to be loaded.
[out]vclIVertexCallList representation of the input file
[in]smoothModeThe smoothing mode to apply. See defined modes as public static members of this class.
int com.fovia.hdrc.hdrcPolygonUtilContext.loadOBJWithTextureMap ( String  fileName,
String  texture,
hdrcVertexCallListContext  vcl,
int  smoothMode 
) throws IOException

Placeholder for loadOBJWithTextureMap()

int com.fovia.hdrc.hdrcPolygonUtilContext.loadSTL ( String  fileName,
hdrcVertexCallListContext  vcl,
int  smoothMode 
) throws IOException

Loads an STL file into an IVertexCallList.

Parameters
[in]fileNameFile to be loaded.
[out]vclIVertexCallList representation of the input file
[in]smoothModeThe smoothing mode to apply. See defined modes as public static members of this class.
long com.fovia.hdrc.hdrcPolygonUtilContext.releaseSessionResources ( ) throws IOException

Call this function if you wish to free server resources before disconnecting.

Returns
long - 0 if successful.
Exceptions
IOException
int com.fovia.hdrc.hdrcPolygonUtilContext.saveOBJ ( String  fileName,
hdrcVertexCallListContext  vcl 
) throws IOException

Placeholder for saveOBJ()

int com.fovia.hdrc.hdrcPolygonUtilContext.savePLY ( String  fileName,
hdrcVertexCallListContext  vcl 
) throws IOException

Placeholder for savePLY()

int com.fovia.hdrc.hdrcPolygonUtilContext.saveSTL ( String  fileName,
hdrcVertexCallListContext  vcl 
) throws IOException

Placeholder for saveSTL()

int com.fovia.hdrc.hdrcPolygonUtilContext.smooth ( hdrcVertexCallListContext  vcl,
int  smoothMode,
int[]  arrsg 
) throws IOException

Updates normal vectors of an IVertexCallList.

Parameters
[in,out]vclThe vertex call list to update.
[in]smoothMode
[in]arrsgSmoothing Groups Array. Can be specified NULL for smooth types SMOOTH_MODE_NOP, SMOOTH_MODE_FLAT or SMOOTH_MODE_SINGLE. If arrsg is not null, it must be of size pvcl->GetNumIndices()/3; i.e. One smoothing group assigned for each face.

Member Data Documentation

final int com.fovia.hdrc.hdrcPolygonUtilContext.SMOOTH_MODE_NOP =0
static

Don't do post processing, leave normals read from the file as are.