#include <RhRdk_RDP_DisplayPipeline.h>
|
enum | StatusBarComponent : int {
StatusBarComponent::All,
StatusBarComponent::Play,
StatusBarComponent::Pause,
StatusBarComponent::Stop,
StatusBarComponent::Lock,
StatusBarComponent::Unlock,
StatusBarComponent::ProductName,
StatusBarComponent::StatusText,
StatusBarComponent::Time,
StatusBarComponent::PassAmount,
StatusBarComponent::PostEffectsOn,
StatusBarComponent::PostEffectsOff
} |
|
enum | mouse_button {
no_mouse_button = 0,
left_mouse_button = 1,
right_mouse_button = 2,
middle_mouse_button = 3,
x_mouse_button = 4
} |
|
|
| DisplayMode (const CRhinoDisplayPipeline &pipeline) |
|
virtual | ~DisplayMode () |
|
virtual const UUID & | ClassId (void) const =0 |
|
virtual std::shared_ptr< DisplayMode > | Clone (const CRhinoDisplayPipeline &pipeline) const |
|
virtual void | CreateWorld (const CRhinoDoc &doc, const ON_3dmView &view, const CDisplayPipelineAttributes &attributes)=0 |
|
virtual bool | DrawOrLockRendererFrameBuffer (const FRAME_BUFFER_INFO_INPUTS &input, FRAME_BUFFER_INFO_OUTPUTS &outputs)=0 |
|
void | DrawShadedMesh (const CRhinoDisplayPipeline &pipeline, const ON_Mesh &mesh, const CDisplayPipelineMaterial *pMat) |
|
virtual void * | EVF (const wchar_t *, void *) override |
|
virtual bool | ExecConduit (CRhinoDisplayPipeline &pipeline, UINT channel, bool &terminate) |
|
virtual const IHUDCallbacks * | HUDCallbacks () const |
|
virtual bool | IsCompleted (void) const =0 |
|
virtual bool | IsFrameBufferAvailable (const ON_3dmView &vp) const =0 |
|
virtual bool | IsRendererStarted (void) const =0 |
|
virtual int | LastRenderedPass (void) const =0 |
|
virtual void | OnDisplayPipelineSettingsChanged (const CDisplayPipelineAttributes &) |
|
virtual void | OnMaxPassesChanged (int) |
|
void | OnMouseLeave () |
|
virtual bool | OnRenderSizeChanged (const ON_2iSize &newFrameSize)=0 |
|
virtual void | OnStatusBarComponentPressed (StatusBarComponent) |
|
const DisplayMode * | Parent (void) const |
|
unsigned int | PipelineRuntimeSerialNumber (void) const |
|
virtual double | Progress (void) const =0 |
|
virtual void | PushDynamicMeshes (void) |
|
virtual bool | RendererIsAvailable (void) const =0 |
|
ON_2iSize | RenderSize (void) const |
|
virtual_su IRhRdkRenderWindow * | RenderWindow (void) |
|
virtual bool | ShowCaptureProgress (void) const =0 |
|
virtual void | ShutdownRenderer ()=0 |
|
virtual void | SignalUpdate (void) override |
|
virtual bool | StartRenderer (const ON_2iSize &frameSize, const CRhinoDoc &doc, const ON_3dmView &view, const ON_Viewport &vp, const DisplayMode *pParent)=0 |
|
virtual void | UnlockRendererFrameBuffer ()=0 |
|
virtual void | UpdateDynamicMesh (const ON_Mesh &, const ON_Material &) |
|
virtual bool | UseFastDraw ()=0 |
|
unsigned int | ViewRuntimeSerialNumber (void) const |
|
| CRhinoMouseCallback ()=default |
|
virtual | ~CRhinoMouseCallback () |
|
void | Enable (bool enabled) |
|
bool | IsEnabled () const |
| Returns TRUE if the mouse callback is enabled. More...
|
|
virtual void | OnBeginMouseMove (unsigned int viewSerialNumber, UINT flags, const ON_2iPoint &point, bool &executeDefaultHandler) |
| Called at the beginning of CRhinoView processing a mouse move event. More...
|
|
virtual | ~ISignalUpdate () |
|
|
virtual void | InternalShutdown (void) |
|
virtual bool | InternalStartRenderer (const CRhinoDisplayPipeline &pipe) |
|
virtual void | OnBeginMouseDown (unsigned int viewSerialNumber, mouse_button button, UINT flags, const ON_2iPoint &point, bool &defaultHandlerExecuted) override |
| Called at the beginning of CRhinoView processing a mouse down event. More...
|
|
virtual void | OnBeginMouseUp (unsigned int viewSerialNumber, mouse_button button, UINT flags, const ON_2iPoint &point, bool &executeDefaultHandler) override |
| Called at the beginning of CRhinoView processing a mouse up event. More...
|
|
virtual void | OnInitFrameBuffer (CRhinoDisplayPipeline &pipeline) |
|
virtual BOOL32 | OnMouseDblClk (CRhinoView &view, CRhinoMouseCallback::mouse_button, UINT flags, const ON_2iPoint &pt) override |
|
virtual void | OnMouseDown (unsigned int viewSerialNumber, mouse_button button, UINT flags, const ON_2iPoint &point, bool defaultHandlerExecuted) override |
| Called at the end of CRhinoView processing a mouse down event. More...
|
|
virtual void | OnMouseMove (unsigned int viewSerialNumber, UINT flags, const ON_2iPoint &point, bool defaultHandlerExecuted) override |
| Called at the end of CRhinoView processing a mouse move event. More...
|
|
virtual void | OnMouseUp (unsigned int viewSerialNumber, mouse_button button, UINT flags, const ON_2iPoint &point, bool defaultHandlerExecuted) override |
| Called at the end of CRhinoView processing a mouse up event. More...
|
|
virtual void | OnPostDrawObjects (CRhinoDisplayPipeline &pipeline) |
|
virtual void | OnPreDrawObjects (CRhinoDisplayPipeline &pipeline) |
|
virtual bool | PrepareRenderer (const CRhinoDisplayPipeline &pipe) |
|
virtual bool | SetupSceneServer (const CRhinoDisplayPipeline &pipe) |
|
|
class CRhMouseCallbackManager * | m_cbm = nullptr |
|
◆ StatusBarComponent
Enumerator |
---|
All | |
Play | |
Pause | |
Stop | |
Lock | |
Unlock | |
ProductName | |
StatusText | |
Time | |
PassAmount | |
PostEffectsOn | |
PostEffectsOff | |
◆ DisplayMode()
◆ ~DisplayMode()
virtual RhRdk::Realtime::DisplayMode::~DisplayMode |
( |
| ) |
|
|
virtual |
◆ ClassId()
virtual const UUID& RhRdk::Realtime::DisplayMode::ClassId |
( |
void |
| ) |
const |
|
pure virtual |
You must override this with a generated UUID - and the one in your factory must match it.
◆ Clone()
Default behaviour is to return nullptr if the view dimensions are the same, or construct a new one if not. Relies on "RenderSize" to determine if something has changed.
◆ ComputeViewportCRC()
Calculate the CRC of ON_Viewport. Does not include properties that have no effect on the views appearance like the viewport ID .
◆ CreateWorld()
Create the world for this display mode instance. This sets up the changequeue.
◆ DrawOrLockRendererFrameBuffer()
Return true if you have drawn the frame into the current OpenGL view, or you have supplied one of the other methods for drawing in outputs. Return false if the frame was not available, and the framework should wait. If you're using IRhRdkRenderWindow as your framebuffer (which is recommended), you can implement DrawOrLockRendererFrameBuffer simply by calling DrawOrLockRendererFrameBufferImpl.
◆ DrawOrLockRendererFrameBufferImpl()
See comment for DrawOrLockRendererFrameBuffer.
◆ DrawShadedMesh()
◆ EVF()
virtual void* RhRdk::Realtime::DisplayMode::EVF |
( |
const wchar_t * |
, |
|
|
void * |
|
|
) |
| |
|
overridevirtual |
◆ ExecConduit()
virtual bool RhRdk::Realtime::DisplayMode::ExecConduit |
( |
CRhinoDisplayPipeline & |
pipeline, |
|
|
UINT |
channel, |
|
|
bool & |
terminate |
|
) |
| |
|
virtual |
◆ FromPipeline()
Returns the display mode associated with a particular display pipline.
◆ HUDCallbacks()
virtual const IHUDCallbacks* RhRdk::Realtime::DisplayMode::HUDCallbacks |
( |
| ) |
const |
|
virtual |
Default implementation stops built in HUD from being displayed. Implementation may optionally return IHUDFunctionality or IHUDCallbacks3 - dynamic cast to access that functionality.
◆ InternalShutdown()
virtual void RhRdk::Realtime::DisplayMode::InternalShutdown |
( |
void |
| ) |
|
|
protectedvirtual |
◆ InternalStartRenderer()
◆ IsCompleted()
virtual bool RhRdk::Realtime::DisplayMode::IsCompleted |
( |
void |
| ) |
const |
|
pure virtual |
Return true if the renderer is done.
◆ IsFrameBufferAvailable()
virtual bool RhRdk::Realtime::DisplayMode::IsFrameBufferAvailable |
( |
const ON_3dmView & |
vp | ) |
const |
|
pure virtual |
Called during the frame draw to decide whether there is relevant data when "LockRendererFrameBuffer" is called. Return false if the image is still being rendered.
◆ IsRendererStarted()
virtual bool RhRdk::Realtime::DisplayMode::IsRendererStarted |
( |
void |
| ) |
const |
|
pure virtual |
We have started the renderer and set it up successfully.
◆ LastRenderedPass()
virtual int RhRdk::Realtime::DisplayMode::LastRenderedPass |
( |
void |
| ) |
const |
|
pure virtual |
Used to pass information about which pass to render to for cloned (view capture) renderers.
◆ OnBeginMouseDown()
virtual void RhRdk::Realtime::DisplayMode::OnBeginMouseDown |
( |
unsigned int |
viewSerialNumber, |
|
|
mouse_button |
button, |
|
|
UINT |
flags, |
|
|
const ON_2iPoint & |
point, |
|
|
bool & |
executeDefaultHandler |
|
) |
| |
|
overrideprotectedvirtual |
◆ OnBeginMouseUp()
virtual void RhRdk::Realtime::DisplayMode::OnBeginMouseUp |
( |
unsigned int |
viewSerialNumber, |
|
|
mouse_button |
button, |
|
|
UINT |
flags, |
|
|
const ON_2iPoint & |
point, |
|
|
bool & |
executeDefaultHandler |
|
) |
| |
|
overrideprotectedvirtual |
◆ OnDisplayPipelineSettingsChanged()
triggered when display pipeline attributes have changed.
◆ OnInitFrameBuffer()
Triggered when OnInitFrameBuffer conduit stage is invoked.
◆ OnMaxPassesChanged()
virtual void RhRdk::Realtime::DisplayMode::OnMaxPassesChanged |
( |
int |
| ) |
|
|
virtual |
Triggered when the user has changed the maximum passes count in the HUD.
◆ OnMouseDblClk()
Override if you want to handle mouse double click events. If you return TRUE, the default handler is not called. If you return FALSE, the default OnMouseDblClick() handler is called.
Reimplemented from CRhinoMouseCallback.
◆ OnMouseDown()
virtual void RhRdk::Realtime::DisplayMode::OnMouseDown |
( |
unsigned int |
viewSerialNumber, |
|
|
mouse_button |
button, |
|
|
UINT |
flags, |
|
|
const ON_2iPoint & |
point, |
|
|
bool |
defaultHandlerExecuted |
|
) |
| |
|
overrideprotectedvirtual |
◆ OnMouseLeave()
void RhRdk::Realtime::DisplayMode::OnMouseLeave |
( |
| ) |
|
◆ OnMouseMove()
virtual void RhRdk::Realtime::DisplayMode::OnMouseMove |
( |
unsigned int |
viewSerialNumber, |
|
|
UINT |
flags, |
|
|
const ON_2iPoint & |
point, |
|
|
bool |
defaultHandlerExecuted |
|
) |
| |
|
overrideprotectedvirtual |
◆ OnMouseUp()
virtual void RhRdk::Realtime::DisplayMode::OnMouseUp |
( |
unsigned int |
viewSerialNumber, |
|
|
mouse_button |
button, |
|
|
UINT |
flags, |
|
|
const ON_2iPoint & |
point, |
|
|
bool |
defaultHandlerExecuted |
|
) |
| |
|
overrideprotectedvirtual |
◆ OnPostDrawObjects()
Triggered when OnPostDrawObjects conduit stage is invoked.
◆ OnPreDrawObjects()
Triggered when OnPreDrawObjects conduit stage is invoked.
◆ OnRenderSizeChanged()
virtual bool RhRdk::Realtime::DisplayMode::OnRenderSizeChanged |
( |
const ON_2iSize & |
newFrameSize | ) |
|
|
pure virtual |
Scene has changed, don't start from scratch, just get changes and continue.
◆ OnStatusBarComponentPressed()
virtual void RhRdk::Realtime::DisplayMode::OnStatusBarComponentPressed |
( |
StatusBarComponent |
| ) |
|
|
virtual |
◆ Parent()
const DisplayMode* RhRdk::Realtime::DisplayMode::Parent |
( |
void |
| ) |
const |
If this display mode has a parent, then it is an offline capture started from another pipeline. Either a view capture or a print.
◆ PipelineRuntimeSerialNumber()
unsigned int RhRdk::Realtime::DisplayMode::PipelineRuntimeSerialNumber |
( |
void |
| ) |
const |
Returns the runtime serial number of the CRhinoDisplayPipeline that is associated with this display mode.
◆ PrepareRenderer()
◆ Progress()
virtual double RhRdk::Realtime::DisplayMode::Progress |
( |
void |
| ) |
const |
|
pure virtual |
Return the progress of an ongoing capture.
◆ PushDynamicMeshes()
virtual void RhRdk::Realtime::DisplayMode::PushDynamicMeshes |
( |
void |
| ) |
|
|
virtual |
◆ RendererIsAvailable()
virtual bool RhRdk::Realtime::DisplayMode::RendererIsAvailable |
( |
void |
| ) |
const |
|
pure virtual |
The system's best guess as to whether StartRenderer will succeed. If your renderer is available return true, if it isn't ready yet return false.
◆ RenderSize()
ON_2iSize RhRdk::Realtime::DisplayMode::RenderSize |
( |
void |
| ) |
const |
Returns the size of the viewport or renderframe related to the running session.
◆ RenderWindow()
◆ SetupSceneServer()
◆ ShowCaptureProgress()
virtual bool RhRdk::Realtime::DisplayMode::ShowCaptureProgress |
( |
void |
| ) |
const |
|
pure virtual |
Return true if custom display mode supports for the built-in view capture progress dialog .
◆ ShutdownRenderer()
virtual void RhRdk::Realtime::DisplayMode::ShutdownRenderer |
( |
| ) |
|
|
pure virtual |
The display mode is switched out, you need to clean up your display mode integration.
◆ SignalUpdate()
virtual void RhRdk::Realtime::DisplayMode::SignalUpdate |
( |
void |
| ) |
|
|
overridevirtual |
◆ StartRenderer()
The display pipeline has successfully requested a lock on the renderer and we can use this to render the viewport. pParent points to the original engine if this rendering is being used for capture (render an existing view at a new size)
◆ UnlockRendererFrameBuffer()
virtual void RhRdk::Realtime::DisplayMode::UnlockRendererFrameBuffer |
( |
| ) |
|
|
pure virtual |
If you're calling DrawOrLockRendererFrameBufferImpl, you should call UnlockRendererFrameBufferImpl in your override of this function.
◆ UnlockRendererFrameBufferImpl()
See comment for UnlockRendererFrameBuffer.
◆ UpdateDynamicMesh()
virtual void RhRdk::Realtime::DisplayMode::UpdateDynamicMesh |
( |
const ON_Mesh & |
, |
|
|
const ON_Material & |
|
|
) |
| |
|
virtual |
◆ UseFastDraw()
virtual bool RhRdk::Realtime::DisplayMode::UseFastDraw |
( |
| ) |
|
|
pure virtual |
Return true for fast draw mechanism. Default is old behavior where the pipeline would wait for a short period on several occasions for the implementor to get a framebuffer ready. This function is called just before StartRenderer();
◆ ViewRuntimeSerialNumber()
unsigned int RhRdk::Realtime::DisplayMode::ViewRuntimeSerialNumber |
( |
void |
| ) |
const |
Returns the runtime serial number of the CRhinoView that is associated with this display mode.
◆ Impl