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

Public Member Functions

virtual signed int ApplyTransformToQueue (MATRIX44D *trans)=0
 
virtual signed int AskInterface (const BGUID *piid, IRoot **ppr)=0
 
virtual signed int BreakStreaming ()=0
 
virtual signed int ClearQueue ()=0
 
virtual signed int DecRef ()=0
 
virtual signed int FastSwap (IVolumeDataContext *volumeData, IOctreeContext *octree)=0
 
virtual signed int GetAdaptiveJPEGStatus (signed int *status)=0
 
virtual signed int GetAndResetModifiedTFs (unsigned int *modifiedTFs)=0
 
virtual signed int GetAndResetModifiedTFsEx (unsigned long long *modifiedTFs)=0
 
virtual signed int GetCurvedReformat (IVolumeDataContext **pData, const unsigned int numProjPlanesPerSlice, const unsigned int numSlices, const unsigned int ppWidth, const unsigned int ppHeight, const unsigned int measurementSlice, const float Zoom, MATRIX44D **arrProjPlanes, const ENUM_CURVED_MPR_TYPE type)=0
 
virtual signed int GetMaximumFrameRate (unsigned int *pFPS)=0
 
virtual signed int GetRawFrameReadyCallbackEnabled (signed int *val)=0
 
virtual signed int GetRenderEngineContext (IRenderEngineContext **pREC)=0
 
virtual signed int GetRenderEngineType (ENUM_RENDER_TYPE *pRT)=0
 
virtual signed int GetRenderParams (RENDER_PARAMS *pRP)=0
 
virtual signed int GetRenderParamsCached (RENDER_PARAMS *pRP)=0
 
virtual signed int GetRenderParamsEx (RENDER_PARAMS *pRP, const signed int bIncludeQueuedParams)=0
 
virtual signed int GetTransferFunction (RENDER_RANGE_PARAMS *pRP, const unsigned int index)=0
 
virtual signed int GetTransferFunctionCached (RENDER_RANGE_PARAMS *pRP, const unsigned int index)=0
 
virtual signed int GetTransferFunctionEx (RENDER_RANGE_PARAMS *pRP, const unsigned int index, const signed int bIncludeQueuedParams)=0
 
virtual signed int IncRef ()=0
 
virtual signed int Init (IServerContext *serverContext, IVolumeDataContext *volumeData, IOctreeContext *octree)=0
 
virtual signed int Init4D (IServerContext *serverContext, IVolumeDataContext **volumeData, IOctreeContext **octree, const unsigned int numVolumes)=0
 
virtual signed int IsFinalShown (signed int *pVal)=0
 
virtual signed int IsRendering (signed int *pVal)=0
 
virtual signed int ReleaseSessionResources ()=0
 
virtual signed int Render ()=0
 
virtual signed int RenderFinal ()=0
 
virtual signed int RenderFinalEx (const signed int bNotifyListeners)=0
 
virtual signed int RenderFinalEx2 (const signed int bIgnoreParams, const ENUM_RENDER_PARAMS_MASK paramsToIgnore)=0
 
virtual signed int RenderFinalEx3 (const signed int bNotifyListeners, const signed int bIgnoreParams, const ENUM_RENDER_PARAMS_MASK paramsToIgnore)=0
 
virtual signed int SetAdaptiveJPEGParameters (ADAPTIVEJPEGPARAMS *params)=0
 
virtual signed int SetAdaptiveJPEGStatus (signed int status)=0
 
virtual signed int SetAutonavigating (const signed int bNav, const double speed)=0
 
virtual signed int SetCompressionType (const ENUM_COMPRESSION_TYPE type, const signed int quality)=0
 
virtual signed int SetCurvedMPRPath (const unsigned int numProjPlanes, MATRIX44D *arrProjPlanes, const ENUM_CURVED_MPR_TYPE type)=0
 
virtual signed int SetDontRenderWhileDisplaying (const signed int bVal)=0
 
virtual signed int SetFinalCompressionType (const ENUM_COMPRESSION_TYPE type, const signed int quality)=0
 
virtual signed int SetFinalRenderTimeout (const unsigned long long time)=0
 
virtual signed int SetFrameListener (IRQFrameListener *listener)=0
 
virtual signed int SetImageAllocator (IAllocator *pAlloc)=0
 
virtual signed int SetLocalRendering (const signed int bVal)=0
 
virtual signed int SetMaximumFrameRate (const unsigned int fps)=0
 
virtual signed int SetNoFinalRenders (const signed int bVal)=0
 
virtual signed int SetParameterIgnoringEnabled (const signed int bVal)=0
 
virtual signed int SetRawFrameReadyCallbackEnabled (signed int val)=0
 
virtual signed int SetRenderEngineContext (IRenderEngineContext *pRenderContext)=0
 
virtual signed int SetRenderParams (RENDER_PARAMS *rp)=0
 
virtual signed int SetRenderParamsEx (RENDER_PARAMS *rp, const signed int bNotifyLinked)=0
 
virtual signed int SetRenderParamsEx2 (RENDER_PARAMS *rp, const unsigned int numVertexCallLists, IVertexCallListContext **arrVertices)=0
 
virtual signed int SetRenderParamsEx3 (RENDER_PARAMS *rp, const unsigned int numVertexCallLists, IVertexCallListContext **arrVertices, const signed int bNotifyLinked)=0
 
virtual signed int SetStereoMode (signed int bEnabled)=0
 
virtual signed int SetTransferFunction (const unsigned int index, RENDER_RANGE_PARAMS *rrp)=0
 
virtual signed int SetViewMode (const ENUM_VIEW_MODE mode)=0
 
virtual signed int StopThreads ()=0
 
virtual signed int UpdateImage (VOLVISIMAGE *imm, RENDER_PARAMS *rp)=0
 
virtual signed int UpdateRenderParamMembers (RENDER_PARAMS *rp)=0
 
virtual signed int WaitForParamsToBeSet ()=0
 
- Public Member Functions inherited from IRoot
template<class T >
signed int AskInterface (T **pp)
 

Detailed Description

Provides render queueing functionality. You simply pass all RENDER_PARAMS to this object and efficient streaming and final rendering calls automatically happen. Specify an IRQFrameListener to recieve events when a frame is ready for display. Call RenderFinal() when you're sure you're done sending rendering parameters for a while (such as when the user releases the mouse after a drag operation).

Use ILibrary::CreateObject() to create this object.

Member Function Documentation

virtual signed int IRenderQueue::ApplyTransformToQueue ( MATRIX44D trans)
pure virtual

Deprecated. Just use SetRenderParams().

Parameters
transMATRIX44D
virtual signed int IRenderQueue::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 IRenderQueue::BreakStreaming ( )
pure virtual

Requests that streaming break at the next possible opportunity. Normally, the queue will wait a little while before breaking streaming to see if more params come in. This will make sure that wait does not happen.

virtual signed int IRenderQueue::ClearQueue ( )
pure virtual

Clears any queued up render param changes. They will be discarded and the information will be lost.

virtual signed int IRenderQueue::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 IRenderQueue::FastSwap ( IVolumeDataContext volumeData,
IOctreeContext octree 
)
pure virtual

Requests a fast swap of the current volume to another. The new volume must be the same dimension, orientation, spacing, and skew.

Parameters
volumeData
octree
virtual signed int IRenderQueue::GetAdaptiveJPEGStatus ( signed int *  status)
pure virtual

Gets the status of adaptive JPEG quality for interactive rendering.

virtual signed int IRenderQueue::GetCurvedReformat ( IVolumeDataContext **  pData,
const unsigned int  numProjPlanesPerSlice,
const unsigned int  numSlices,
const unsigned int  ppWidth,
const unsigned int  ppHeight,
const unsigned int  measurementSlice,
const float  Zoom,
MATRIX44D **  arrProjPlanes,
const ENUM_CURVED_MPR_TYPE  type 
)
pure virtual

This will not go through the queuing process. You MUST make sure you're actually in curved MPR mode before calling this function. To ensure this, call WaitForParamsToBeSet() after setting the render type.

Parameters
pDataThe address of the IVolumeDataContext pointer that will get the location of the newly created volume.
numProjPlanesPerSliceint
numSlicesint
ppWidthint
ppHeightint
measurementSliceThe index of the slice that can be used for accurate measurement. For accurate measurement on other slices, it is up to the user to understand the relationship between the input data and the output volume.
Zoomfloat
arrProjPlanesMATRIX44D**
typeint
Returns
hdrcVolumeDataContext
virtual signed int IRenderQueue::GetMaximumFrameRate ( unsigned int *  pFPS)
pure virtual

Returns the current max FPS. See SetMaximumFrameRate() for details.

virtual signed int IRenderQueue::GetRenderEngineContext ( IRenderEngineContext **  pREC)
pure virtual

Returns the render engine context associated with this queue.

Parameters
pRECIRenderEngineContext A pointer to the IRenderEngineContext* that will receive the context.

Implements IRenderParamsReceiver.

virtual signed int IRenderQueue::GetRenderEngineType ( ENUM_RENDER_TYPE pRT)
pure virtual

Returns the render engine type associated with this queue.

virtual signed int IRenderQueue::GetRenderParams ( RENDER_PARAMS pRP)
pure virtual

Returns the current state of the engine in a RENDER_PARAMS structure.

Parameters
pRPWill be filled with the parameters

Implements IRenderParamsReceiver.

virtual signed int IRenderQueue::GetRenderParamsCached ( RENDER_PARAMS pRP)
pure virtual

Gets the current RENDER_PARAMS as the queue knows them without sending a request to the server for engine state. This is almost always the preferred method of getting the RENDER_PARAMS.

Implements IRenderParamsReceiver.

virtual signed int IRenderQueue::GetRenderParamsEx ( RENDER_PARAMS pRP,
const signed int  bIncludeQueuedParams 
)
pure virtual

Returns the current state of the engine in a RENDER_PARAMS structure.

Parameters
bIncludeQueuedParamsSet to HT_TRUE if you want to include the RENDER_PARAMS currently queued to be sent to the server.
pRPWill be filled with the parameters

Implements IRenderParamsReceiver.

virtual signed int IRenderQueue::GetTransferFunction ( RENDER_RANGE_PARAMS pRP,
const unsigned int  index 
)
pure virtual

Reserved for future use.

virtual signed int IRenderQueue::GetTransferFunctionCached ( RENDER_RANGE_PARAMS pRP,
const unsigned int  index 
)
pure virtual

Reserved for future use.

virtual signed int IRenderQueue::GetTransferFunctionEx ( RENDER_RANGE_PARAMS pRP,
const unsigned int  index,
const signed int  bIncludeQueuedParams 
)
pure virtual

Reserved for future use.

virtual signed int IRenderQueue::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 IRenderQueue::Init ( IServerContext serverContext,
IVolumeDataContext volumeData,
IOctreeContext octree 
)
pure virtual

Initializes the render queue. You must call this function before calling other server related functions on the object.

Parameters
serverContextThe server context
volumeDataThe volume data
octreeThe octre. This can be null if you are going to use only RT_THIN_* rendering modes
virtual signed int IRenderQueue::Init4D ( IServerContext serverContext,
IVolumeDataContext **  volumeData,
IOctreeContext **  octree,
const unsigned int  numVolumes 
)
pure virtual

Initializes the render queue for 4D rendering on the server side. All volumes must be the same dimension, orientation, spacing, and skew.

Parameters
serverContextThe server context
volumeDataAn array of pointers to volume data contexts.
octreeAn array of pointers to octree contexts. This can be null if you are going to use only RT_THIN_* rendering modes
numVolumesThe number of volumes described in volumeData and octree.
virtual signed int IRenderQueue::IsRendering ( signed int *  pVal)
pure virtual

Returns HT_TRUE if the engine is currently rendering a frame.

virtual signed int IRenderQueue::ReleaseSessionResources ( )
pure virtual

Call this if you wish to free up server resources for this object but do not want to disconnect from the server yet.

virtual signed int IRenderQueue::Render ( )
pure virtual

Signals a render to happen at the next earliest convenience.

virtual signed int IRenderQueue::RenderFinal ( )
pure virtual

Enqueues a final render into the render queue. Call this if you do not think you will be setting render params for the foreeable future (like if the user released the mouse button after dragging).

Implements IRenderParamsReceiver.

virtual signed int IRenderQueue::RenderFinalEx ( const signed int  bNotifyListeners)
pure virtual

bNotifyLinked is ignored, so this is functionally identical to calling RenderFinal().

Implements IRenderParamsReceiver.

virtual signed int IRenderQueue::RenderFinalEx2 ( const signed int  bIgnoreParams,
const ENUM_RENDER_PARAMS_MASK  paramsToIgnore 
)
pure virtual

Just like renderFinal(), except allows parameter interrupting. You should consider this functionality if you're implementing a mouse drag operation.

Parameters
bIgnoreParamsSet to true if you want this final render to use the parameters from the last rendered frame
paramsToIgnoreLimits the parameters to be ignored. For example, if you're adjusting the orientation, you would put RPM_TRANSFORM in this parameter to specify that's the parameter that may have been adjusted since the last frame was displayed.

Implements IRenderParamsReceiver.

virtual signed int IRenderQueue::RenderFinalEx3 ( const signed int  bNotifyListeners,
const signed int  bIgnoreParams,
const ENUM_RENDER_PARAMS_MASK  paramsToIgnore 
)
pure virtual

bNotifyLinked is ignored, so this is functionally identical to calling RenderFinalEx2().

Implements IRenderParamsReceiver.

virtual signed int IRenderQueue::SetAdaptiveJPEGParameters ( ADAPTIVEJPEGPARAMS params)
pure virtual

Sets the parameters for adaptive JPEG quality for interactive rendering.

virtual signed int IRenderQueue::SetAdaptiveJPEGStatus ( signed int  status)
pure virtual

Turns the adaptive JPEG quality on or off for interactive rendering. This will adjust the JPEG compression based on the time taken for previous frames

virtual signed int IRenderQueue::SetAutonavigating ( const signed int  bNav,
const double  speed 
)
pure virtual

Call this to change whether we're autonavigating.

Parameters
bNavboolean
speeddouble

Implements IRenderParamsReceiver.

virtual signed int IRenderQueue::SetCompressionType ( const ENUM_COMPRESSION_TYPE  type,
const signed int  quality 
)
pure virtual

Sets the compression parameters for interactive rendering.

Parameters
typeType of compression.
qualityThis parameter depends on what value type has.
virtual signed int IRenderQueue::SetCurvedMPRPath ( const unsigned int  numProjPlanes,
MATRIX44D arrProjPlanes,
const ENUM_CURVED_MPR_TYPE  type 
)
pure virtual

This will not go through the queuing process. You MUST make sure you're actually in curved MPR mode before calling this function. To ensure this, call WaitForParamsToBeSet() after setting the render type.

Parameters
numProjPlanesint
arrProjPlanesMATRIX44D*
typeint

Implements IRenderParamsReceiver.

virtual signed int IRenderQueue::SetDontRenderWhileDisplaying ( const signed int  bVal)
pure virtual

Some systems will not perform as well if you are displaying while rendering (maybe the threading model is not well implemented). Set this to true if you experience jerkiness in more difficult to render scenes.

Parameters
bValH_TRUE if true, H_FALSE otherwise.
virtual signed int IRenderQueue::SetFinalCompressionType ( const ENUM_COMPRESSION_TYPE  type,
const signed int  quality 
)
pure virtual

Sets the compression parameters for final rendering.

Parameters
typeType of compression.
qualityThis parameter depends on what value type has.
virtual signed int IRenderQueue::SetFinalRenderTimeout ( const unsigned long long  time)
pure virtual

This should be a time in milliseconds. If it's 0xffffffffffffffff, no final renders will happen automatically. They will need to be requested with renderFinal().

Parameters
time
virtual signed int IRenderQueue::SetFrameListener ( IRQFrameListener listener)
pure virtual

Call this to register your IRQFrameListener to recieve events about frames rendered.

Parameters
listenerIRQFrameListener A pointer to your IRQFrameListener.
virtual signed int IRenderQueue::SetImageAllocator ( IAllocator pAlloc)
pure virtual

Sets a cusom IAllocator to be used for allocating/deallocating images as they are rendered. Images are allocated only when the render image size changes. Otherwise, the image is placed in the previous frame's buffer. Note that images are almost always different sizes when compression is used, and therefore compressed streaming performs a lot of allocation/deallocatioin.

virtual signed int IRenderQueue::SetLocalRendering ( const signed int  bVal)
pure virtual

If HT_TRUE is passed in here, a more accurate timing model is used and therefore the frames are more smooth and consistent However, This method requires two server calls per frame and is therefore not acceptable for remote rendering.

Parameters
bValH_TRUE if true, H_FALSE otherwise.
virtual signed int IRenderQueue::SetMaximumFrameRate ( const unsigned int  fps)
pure virtual

Set's the desired frame rate to the specified value. Use 100000 to specify no cap. There is no cap to the frame rate by default.

Parameters
fpsDesired frame rate.
virtual signed int IRenderQueue::SetNoFinalRenders ( const signed int  bVal)
pure virtual

If true, renderFinal() calls will be ignored.

Parameters
bValH_TRUE if true, H_FALSE otherwise.
virtual signed int IRenderQueue::SetParameterIgnoringEnabled ( const signed int  bVal)
pure virtual

This subsystem ensures that the last frame displayed is the state that the final render will have when the user releases the mouse button during a drag operation. Otherwise, the next frame would be rendered since it has already started rendering when the user releases the mouse button. Render widgets that use more than one engine simultaneously might not want this.

Parameters
bValH_TRUE if true, H_FALSE otherwise.
virtual signed int IRenderQueue::SetRenderEngineContext ( IRenderEngineContext pRenderContext)
pure virtual

Assigns pRenderContext as the render engine this queue should be associated with.

Parameters
pRenderContextThe engine
virtual signed int IRenderQueue::SetRenderParams ( RENDER_PARAMS rp)
pure virtual

Enqueues a RENDER_PARAMS to be set. Note that the settings are not set immediately. Also, this queue has the possibility of being collapsed some. For example, if you set the view very quickly in response to mouse events, some of the move events may be consolidated if the frame rate of the engine is not as fast as the mouse update. Information is never lost in this process.

Parameters
rpRENDER_PARAMS
Returns
int

Implements IRenderParamsReceiver.

virtual signed int IRenderQueue::SetRenderParamsEx ( RENDER_PARAMS rp,
const signed int  bNotifyLinked 
)
pure virtual

bNotifyLinked is ignored, so this is functionally identical to calling SetRenderParams().

Implements IRenderParamsReceiver.

virtual signed int IRenderQueue::SetRenderParamsEx2 ( RENDER_PARAMS rp,
const unsigned int  numVertexCallLists,
IVertexCallListContext **  arrVertices 
)
pure virtual

Identical to SetRenderParams(), but with two additional parameters.

Parameters
rpThe RENDER_PARAMS to set.
numVertexCallListsThe number of vertex call lists in arrVertices. If 0, arrVertices is ignored. However, if you wish to set 0 call lists to the engine so no polygons are rendered, set this parameter to 0xFFFFFFFF.
arrVerticesAn array of interface points to vertex call lists describing polygon objects to put into images rendered by this engine.

Implements IRenderParamsReceiver.

virtual signed int IRenderQueue::SetRenderParamsEx3 ( RENDER_PARAMS rp,
const unsigned int  numVertexCallLists,
IVertexCallListContext **  arrVertices,
const signed int  bNotifyLinked 
)
pure virtual

bNotifyLinked is ignored, so this is functionally identical to calling SetRenderParamsEx2().

Implements IRenderParamsReceiver.

virtual signed int IRenderQueue::SetTransferFunction ( const unsigned int  index,
RENDER_RANGE_PARAMS rrp 
)
pure virtual

Reserved for future use.

virtual signed int IRenderQueue::SetViewMode ( const ENUM_VIEW_MODE  mode)
pure virtual
Deprecated:
This is functionally equivalent to setting the RF_FRONT_CLIPPING_PLANE_ENABLED flag on the RENDER_PARAMS. That should be used instead.

Implements IRenderParamsReceiver.

virtual signed int IRenderQueue::StopThreads ( )
pure virtual

Stops the currently running threads on this object.

virtual signed int IRenderQueue::UpdateImage ( VOLVISIMAGE imm,
RENDER_PARAMS rp 
)
pure virtual

Public only for legacy reasons.

virtual signed int IRenderQueue::WaitForParamsToBeSet ( )
pure virtual

Will wait on the current thread until we've applied all params waiting in the queue. If params keep being added by some other thread, you will lock this thread until they stop being applied.