Fovia's C++ Client/Server API
Public Member Functions | List of all members
IVertexCallListContext Struct Referenceabstract
Inheritance diagram for IVertexCallListContext:
IRoot

Public Member Functions

virtual signed int AskInterface (const BGUID *piid, IRoot **ppr)=0
 
virtual signed int CleanMesh (signed int bDoClean, MESH_PROPS *pMeshProps)=0
 
virtual signed int ColorizeFromVolumeData (IRenderEngineContext *pEngine, double offset, signed int bVRColor=true)=0
 
virtual signed int ConvertToIndexBuffer ()=0
 
virtual signed int DecRef ()=0
 
virtual signed int GetColors (COLOR_RGBA **arrColors)=0
 
virtual signed int GetCullMode (ENUM_CULL_MODE *pCullMode)=0
 
virtual signed int GetFlags (ENUM_VERTEX_CALL_LIST_FLAGS *flags)=0
 
virtual signed int GetID (signed long long *id)=0
 
virtual signed int GetIndices (unsigned int **arrIndices)=0
 
virtual signed int GetLineWidth (float *width)=0
 
virtual signed int GetNormals (VECTOR3D **arrNormals)=0
 
virtual signed int GetNumIndices (unsigned int *numIndices)=0
 
virtual signed int GetNumVertices (unsigned int *num)=0
 
virtual signed int GetShadingEnabled (unsigned char **arrShadingEnabled)=0
 
virtual signed int GetTextureCoords (VECTOR2F **arrTextureCoords)=0
 
virtual signed int GetTextureLighting (signed int *pbLighting)=0
 
virtual signed int GetTextureMap (ITextureMapContext **pTextureMap)=0
 
virtual signed int GetTextureMap (IRenderEngineContext **pEngineMap)=0
 
virtual signed int GetTransform (MATRIX44D *transform)=0
 
virtual signed int GetType (ENUM_VCL_TYPE *type)=0
 
virtual signed int GetVertices (VECTOR3D **arrVertices)=0
 
virtual signed int IncRef ()=0
 
virtual signed int InvalidateClientState (ENUM_MESH_UPDATE updateFlags)=0
 
virtual signed int IsEdited (signed int *bEdited)=0
 
virtual signed int Optimize (signed int bCleanIslands, double islandPercentage, signed int bDecimate, double decimatePercentage, signed int bSmoothBefore, signed int bSmoothAfter, double smoothParam, signed int bFlip)=0
 
virtual signed int ReleaseSessionResources ()=0
 
virtual signed int SetColorsModified (signed int bModified, unsigned int min, unsigned int max)=0
 
virtual signed int SetCullMode (ENUM_CULL_MODE cullMode)=0
 
virtual signed int SetFlags (ENUM_VERTEX_CALL_LIST_FLAGS flags)=0
 
virtual signed int SetIndicesModified (signed int bModified, unsigned int min, unsigned int max)=0
 
virtual signed int SetLineWidth (float width)=0
 
virtual signed int SetNormalsModified (signed int bModified, unsigned int min, unsigned int max)=0
 
virtual signed int SetNumIndices (unsigned int numIndices)=0
 
virtual signed int SetNumVertices (unsigned int num)=0
 
virtual signed int SetRenderToTextureParams (RENDER_PARAMS *rp)=0
 
virtual signed int SetShadingEnabledModified (signed int bModified, unsigned int min, unsigned int max)=0
 
virtual signed int SetTextureCoordsModified (signed int bModified, unsigned int min, unsigned int max)=0
 
virtual signed int SetTextureLighting (signed int bLighting)=0
 
virtual signed int SetTextureMap (ITextureMapContext *pTextureMap)=0
 
virtual signed int SetTextureMap (IRenderEngineContext *pEngineMap)=0
 
virtual signed int SetTransform (MATRIX44D *transform)=0
 
virtual signed int SetType (ENUM_VCL_TYPE type)=0
 
virtual signed int SetVerticesModified (signed int bModified, unsigned int min, unsigned int max)=0
 
- Public Member Functions inherited from IRoot
template<class T >
signed int AskInterface (T **pp)
 

Detailed Description

This object represents a collection of triangles to be rendered using our integrated CPU based polygon rendering engine. You are able to assign several of these objects to a single rendering scene. This, combined with the m_transform parameter should allow you to maintain a complex scene graph of objects being separately manipulated in your world.

It should also be noted that you may (optionally) use an array of indices in this call list for higher storage efficiency. Arrays of indices are only supported by VCL_TYPE_TRIANGLES. See the documentation for SetNumIndices() for more information.

This object is created by IServerContext::CreateVertexCallList().

Member Function Documentation

virtual signed int IVertexCallListContext::AskInterface ( const BGUID piid,
IRoot **  ppr 
)
pure virtual

Queries this object to see if the interface piid is supported and returns the result in ppr.

Parameters
piidThe BGUID of the requested interface.
pprThe address of an IRoot pointer which will receive the new interface.
Returns
S_OK if the interface is supported. E_FAIL if it is not.

Implements IRoot.

virtual signed int IVertexCallListContext::CleanMesh ( signed int  bDoClean,
MESH_PROPS pMeshProps 
)
pure virtual

Converts a mesh to a manifold representation for compatibility with a 3D printer. A manifold mesh has no holes, border edges, inverted triangles, or intersecting and interior polygons. Not all meshes can be cleaned in a single operation. Prior application of parameters in the Optimize function may be necessary to successfully clean a mesh.

Parameters
bDoCleanIf true the mesh will be cleaned, if false, the mesh will only be analyzed, with results returned in the MESH_PROPS structure.
pMeshPropsThe address of a MESH_PROPS structure that returns the number of mesh flaws after the cleanup operation is run. All fields in the MESH_PROPS structure should be zero after a successful cleanup pass.
virtual signed int IVertexCallListContext::ColorizeFromVolumeData ( IRenderEngineContext pEngine,
double  offset,
signed int  bVRColor = true 
)
pure virtual

This function will generate vertex colors for the vertex call list, resulting in a colorized object.

Parameters
pEnginethe render engine that will generate the colorization
offsetthe camera offset position from which the colorization rays are cast. (Currently unsupported)
virtual signed int IVertexCallListContext::ConvertToIndexBuffer ( )
pure virtual

Converts a mesh from an vertex buffer represtentation to an index buffer representation. This operation can result in a large reduction in the number of vertices needed to define the mesh. This will also reduce the amount of memory required to store the mesh data.

Returns
S_OK if the conversion was successfull, E_UNEXPECTED if the mesh is already in index buffer format.
virtual signed int IVertexCallListContext::DecRef ( )
pure virtual

Decreases the reference count on this object by 1. If the reference count reaches 0, the object is deallocated.

Implements IRoot.

virtual signed int IVertexCallListContext::GetColors ( COLOR_RGBA **  arrColors)
pure virtual

Supplies the location in memory of the colors for this list. If the number of vertices is 0, *arrColors will be set to NULL.

virtual signed int IVertexCallListContext::GetCullMode ( ENUM_CULL_MODE pCullMode)
pure virtual

Gets the backface culling mode.

Parameters
cullModeThe address of an ENUM_CULL_MODE variable to recieve the result.
virtual signed int IVertexCallListContext::GetFlags ( ENUM_VERTEX_CALL_LIST_FLAGS flags)
pure virtual

Gets the flags for this call list.

virtual signed int IVertexCallListContext::GetID ( signed long long *  id)
pure virtual

Returns the integer that represents the server side object that contains the octree.

virtual signed int IVertexCallListContext::GetIndices ( unsigned int **  arrIndices)
pure virtual

Gets the index buffer for this call list. If the number of indices is set to 0, *arrIndices will be set to NULL.

virtual signed int IVertexCallListContext::GetLineWidth ( float *  width)
pure virtual

Gets the line width

virtual signed int IVertexCallListContext::GetNormals ( VECTOR3D **  arrNormals)
pure virtual

Supplies the location in memory of the normals for this list. If the number of vertices is 0, *arrNormals will be set to NULL.

virtual signed int IVertexCallListContext::GetNumIndices ( unsigned int *  numIndices)
pure virtual

Gets the number of vertices in this call list. If this is 0, then every three vertices will constitute a triangle.

virtual signed int IVertexCallListContext::GetNumVertices ( unsigned int *  num)
pure virtual

Gets the number of vertices in this call list.

virtual signed int IVertexCallListContext::GetShadingEnabled ( unsigned char **  arrShadingEnabled)
pure virtual

Supplies the location in memory of the shading state for this list. If the number of vertices is 0, *arrShadingEnabled will be set to NULL.

virtual signed int IVertexCallListContext::GetTextureCoords ( VECTOR2F **  arrTextureCoords)
pure virtual

Supplies the location in memory of the texture mapping coordinates for this list. If the number of vertices is 0, *arrTextureCoords will be set to NULL.

virtual signed int IVertexCallListContext::GetTextureLighting ( signed int *  pbLighting)
pure virtual

Gets the texture lighting state for this call list.

Parameters
pbLightingThe address of an h_boolean object that recieves the true/false lighting state.
virtual signed int IVertexCallListContext::GetTextureMap ( ITextureMapContext **  pTextureMap)
pure virtual

Gets the ITextureMapContext object associated with this call list. If NULL is returned then the call list has no texture file association.

virtual signed int IVertexCallListContext::GetTextureMap ( IRenderEngineContext **  pEngineMap)
pure virtual

Gets the IRenderEngineContext object associated with this call list. If NULL is returned then the call list has no render engine texture source.

virtual signed int IVertexCallListContext::GetTransform ( MATRIX44D transform)
pure virtual

Gets the transformation matrix.

virtual signed int IVertexCallListContext::GetType ( ENUM_VCL_TYPE type)
pure virtual

Gets the type of this call list.

virtual signed int IVertexCallListContext::GetVertices ( VECTOR3D **  arrVertices)
pure virtual

Supplies the location in memory of the vertices for this list. If the number of vertices is 0, *arrVertices will be set to NULL.

virtual signed int IVertexCallListContext::IncRef ( )
pure virtual

Increases the reference count on this object by 1. You do not need to call this after an object is first created. It is 1 by default.

Implements IRoot.

virtual signed int IVertexCallListContext::InvalidateClientState ( ENUM_MESH_UPDATE  updateFlags)
pure virtual

Signals the client SDK that the local representation of mesh data is out of sync with the server side representation and needs to be updated. This can occur when certain server side operations change the mesh data, such as TF colorization.

Parameters
updateFlagsA set of ENUM_MESH_UPDATE bitflags to signal which client side mesh structures need updating. After setting a flag, the appropriate Get function will update the appropriate data. For example, calling InvalidateClientState(MESH_UPDATE_COLORS) will force the client SDK to update the client side vertex color data when GetColors() is next called.
virtual signed int IVertexCallListContext::IsEdited ( signed int *  bEdited)
pure virtual

This function is used internally by hdrcRenderQueue for bookkeepping. It returns H_TRUE if anything has been edited and H_FALSE otherwise.

virtual signed int IVertexCallListContext::Optimize ( signed int  bCleanIslands,
double  islandPercentage,
signed int  bDecimate,
double  decimatePercentage,
signed int  bSmoothBefore,
signed int  bSmoothAfter,
double  smoothParam,
signed int  bFlip 
)
pure virtual

Performs various cleanup operations on a mesh. These are the available cleanup operations. Remove islands: removed disconneted sets of trianges, preserving only the largest sets. Decimate: reduces the number of polygons in a mesh. Smoothen: smooths a mesh by softening edges between polygons. Flip orientation: flips the orientation of polygons in the mesh by reversing the vertex winding order.

Parameters
bCleanIslandsBoolean value that determings if the connected set reduction operation is run.
islandPercentageA value between 0 and 100 that sets the connected set size threshold. For example, if a mesh has 100 polygons and islandPercentage is set to 10, then all sets containing 10 or fewer polygons are deleted.
bDecimateBoolean value that determings if the decimate operation is run.
decimatePercentageA value between 0 and 100 that determines the percentage of polygons that will be removed. For example, if set to 75, then 75 percent of the polygons will be removed.
bSmoothBeforeBoolean value that determines if the smoothing operation is run before the decimate operation.
bSmoothAfterBoolean value that determines if the smoothing operation is run after the decimate operation.
smoothParamA value between 0 and 1 that determines how aggressively the mesh is smoothed. Higher values equate to more smoothing.
bFlipBoolean value that determines if the polygon flip operation is applied.
virtual signed int IVertexCallListContext::ReleaseSessionResources ( )
pure virtual

Call this if you wish to free up this object on the server before disconnecting.

virtual signed int IVertexCallListContext::SetColorsModified ( signed int  bModified,
unsigned int  min,
unsigned int  max 
)
pure virtual

Signifies that you've modified the colors in this object and they must be updated on the server. Unless you call this function, there will be no change to the visual representation in rendered images.

Parameters
bModifiedH_TRUE if modified, H_FALSE if not
minindex of first value changed
maxindex of last value changed plus one
virtual signed int IVertexCallListContext::SetCullMode ( ENUM_CULL_MODE  cullMode)
pure virtual

Sets the backface culling mode.

Parameters
cullModeThe cull mode to use. Acceptable values are CULL_MODE_NONE, CULL_MODE_BACK, and CULL_MODE_BACK_INV.
virtual signed int IVertexCallListContext::SetFlags ( ENUM_VERTEX_CALL_LIST_FLAGS  flags)
pure virtual

Sets the flags for this call list.

virtual signed int IVertexCallListContext::SetIndicesModified ( signed int  bModified,
unsigned int  min,
unsigned int  max 
)
pure virtual

Signifies that you've modified the indices in this object and they must be updated on the server. Unless you call this function, there will be no change to the visual representation in rendered images.

Parameters
bModifiedH_TRUE if modified, H_FALSE if not
minindex of first value changed
maxindex of last value changed plus one
virtual signed int IVertexCallListContext::SetLineWidth ( float  width)
pure virtual

If the type of this call list is VCL_TYPE_LINES, then this will set the width of those lines in patient coordinates.

virtual signed int IVertexCallListContext::SetNormalsModified ( signed int  bModified,
unsigned int  min,
unsigned int  max 
)
pure virtual

Signifies that you've modified the normals in this object and they must be updated on the server. Unless you call this function, there will be no change to the visual representation in rendered images.

Parameters
bModifiedH_TRUE if modified, H_FALSE if not
minindex of first value changed
maxindex of last value changed plus one
virtual signed int IVertexCallListContext::SetNumIndices ( unsigned int  numIndices)
pure virtual

Sets the number of indices to be used for this call list. These indices may be used to define triangles in the vertex list. For example, if the number of indices was 6 and the list contained { 0, 3, 2, 5, 3, 0 } then the call list would have two triangles. The first would be connecting vertices 0,3, and 2. The second would connect verties 5, 3, and 0.

If the number of indices is 0, then the vertices are interpreted as being a triangle for every three points. In other words, 0, 1, and 2 would be the first triangle and 3,4,5 would be the second and so on.

If numIndices is greater than 0, the memory for the index buffer is allocated at this time. If numIndices is 0, then any memory used for any previous index buffer is freed.

virtual signed int IVertexCallListContext::SetNumVertices ( unsigned int  num)
pure virtual

Sets the number of vertices this call list contains. This function will allocate all the memory necessary to hold these vertices, their normals, colors, and shading state.

virtual signed int IVertexCallListContext::SetRenderToTextureParams ( RENDER_PARAMS rp)
pure virtual

Sets the params to be set during the next update. Only relevant for a render engine texture source.

virtual signed int IVertexCallListContext::SetShadingEnabledModified ( signed int  bModified,
unsigned int  min,
unsigned int  max 
)
pure virtual

Signifies that you've modified the shading information in this object and they must be updated on the server. Unless you call this function, there will be no change to the visual representation in rendered images.

Parameters
bModifiedH_TRUE if modified, H_FALSE if not
minindex of first value changed
maxindex of last value changed plus one
virtual signed int IVertexCallListContext::SetTextureCoordsModified ( signed int  bModified,
unsigned int  min,
unsigned int  max 
)
pure virtual

Signifies that you've modified the texture coordinates in this object and they must be updated on the server. Unless you call this function, there will be no change to the visual representation in rendered images.

Parameters
bModifiedH_TRUE if modified, H_FALSE if not
minindex of first value changed
maxindex of last value changed plus one
virtual signed int IVertexCallListContext::SetTextureLighting ( signed int  bLighting)
pure virtual

Turns lighting on/off for texture mapped objects. Default is off. Generally, lighting should be on for mesh objects like implants and surgical guides. Lighting should be off for render-to-texture objects like VOI slices.

Parameters
bLightingIf true lighting is turned on, if false lighting is off.
virtual signed int IVertexCallListContext::SetTextureMap ( ITextureMapContext pTextureMap)
pure virtual

Sets the ITextureMapContext object associated with this call list. Set to NULL to clear the texture map file.

virtual signed int IVertexCallListContext::SetTextureMap ( IRenderEngineContext pEngineMap)
pure virtual

Sets the IRenderEngineContext object associated with this call list. Set to NULL to clear the render engine.

virtual signed int IVertexCallListContext::SetTransform ( MATRIX44D transform)
pure virtual

Sets a 4x4 matrix for each of the vertices to be multiplied by before being displayed.

virtual signed int IVertexCallListContext::SetType ( ENUM_VCL_TYPE  type)
pure virtual

Sets the type of this call list (polygons, lines...etc).

virtual signed int IVertexCallListContext::SetVerticesModified ( signed int  bModified,
unsigned int  min,
unsigned int  max 
)
pure virtual

Signifies that you've modified the vertices in this object and they must be updated on the server. Unless you call this function, there will be no change to the visual representation in rendered images.

Parameters
bModifiedH_TRUE if modified, H_FALSE if not
minindex of first value changed
maxindex of last value changed plus one