Rhino C++ API
7.26
|
#include <RhRdk_RDP_DisplayPipeline.h>
Classes | |
class | Factories |
class | Factory |
struct | FRAME_BUFFER_INFO_INPUTS |
struct | FRAME_BUFFER_INFO_OUTPUTS |
class | IHUDCallbacks |
class | IHUDCallbacks3 |
class | IHUDFunctionality |
Public Types | |
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 } |
Public Member Functions | |
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 *) |
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) |
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 |
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 void | OnMouseMove (unsigned int viewSerialNumber, UINT flags, const ON_2iPoint &point, bool defaultHandlerExecuted) |
Called at the end of CRhinoView processing a mouse move event. More... | |
![]() | |
virtual | ~ISignalUpdate () |
Static Public Member Functions | |
static ON__UINT32 | ComputeViewportCRC (const ON_Viewport &vp) |
static bool | DrawOrLockRendererFrameBufferImpl (const DisplayMode &dm, IRhRdkRenderWindow &rw, const FRAME_BUFFER_INFO_INPUTS &input, FRAME_BUFFER_INFO_OUTPUTS &outputs) |
static std::shared_ptr< DisplayMode > | FromPipeline (const CRhinoDisplayPipeline &pipe) |
static void | UnlockRendererFrameBufferImpl (const DisplayMode &dm, IRhRdkRenderWindow &rw) |
Protected Member Functions | |
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 BOOL | 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 | 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) |
Friends | |
class | Impl |
Additional Inherited Members | |
![]() | |
class CRhMouseCallbackManager * | m_cbm = nullptr |
RhRdk::Realtime::DisplayMode provides a way to integrate a new rendering method in the Rhino viewport.
|
strong |
RhRdk::Realtime::DisplayMode::DisplayMode | ( | const CRhinoDisplayPipeline & | pipeline | ) |
Constructor.
|
virtual |
Virtual deconstructor.
|
pure virtual |
You must override this with a generated UUID - and the one in your factory must match it.
|
virtual |
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.
|
static |
Calculate the CRC of ON_Viewport. Does not include properties that have no effect on the views appearance like the viewport ID .
|
pure virtual |
Create the world for this display mode instance. This sets up the changequeue.
|
pure virtual |
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.
|
static |
See comment for DrawOrLockRendererFrameBuffer.
void RhRdk::Realtime::DisplayMode::DrawShadedMesh | ( | const CRhinoDisplayPipeline & | pipeline, |
const ON_Mesh & | mesh, | ||
const CDisplayPipelineMaterial * | pMat | ||
) |
|
virtual |
Implements RhRdk::Realtime::ISignalUpdate.
|
virtual |
|
static |
Returns the display mode associated with a particular display pipline.
|
virtual |
Default implementation stops built in HUD from being displayed. Implementation may optionally return IHUDFunctionality or IHUDCallbacks3 - dynamic cast to access that functionality.
|
protectedvirtual |
|
protectedvirtual |
|
pure virtual |
Return true if the renderer is done.
|
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.
|
pure virtual |
We have started the renderer and set it up successfully.
|
pure virtual |
Used to pass information about which pass to render to for cloned (view capture) renderers.
|
overrideprotectedvirtual |
Called at the beginning of CRhinoView processing a mouse down event.
Reimplemented from CRhinoMouseCallback.
|
overrideprotectedvirtual |
Called at the beginning of CRhinoView processing a mouse up event.
Reimplemented from CRhinoMouseCallback.
|
virtual |
triggered when display pipeline attributes have changed.
|
protectedvirtual |
Triggered when OnInitFrameBuffer conduit stage is invoked.
|
virtual |
Triggered when the user has changed the maximum passes count in the HUD.
|
overrideprotectedvirtual |
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.
|
overrideprotectedvirtual |
Called at the end of CRhinoView processing a mouse down event.
Reimplemented from CRhinoMouseCallback.
|
overrideprotectedvirtual |
Called at the end of CRhinoView processing a mouse up event.
Reimplemented from CRhinoMouseCallback.
|
protectedvirtual |
Triggered when OnPostDrawObjects conduit stage is invoked.
|
protectedvirtual |
Triggered when OnPreDrawObjects conduit stage is invoked.
|
pure virtual |
Scene has changed, don't start from scratch, just get changes and continue.
|
virtual |
Triggered when a component on the HUD has been pressed. Deprecated - use IHUDCallbacks3::OnStatusBarMouseEvent
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.
unsigned int RhRdk::Realtime::DisplayMode::PipelineRuntimeSerialNumber | ( | void | ) | const |
Returns the runtime serial number of the CRhinoDisplayPipeline that is associated with this display mode.
|
protectedvirtual |
|
pure virtual |
Return the progress of an ongoing capture.
|
virtual |
|
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.
ON_2iSize RhRdk::Realtime::DisplayMode::RenderSize | ( | void | ) | const |
Returns the size of the viewport or renderframe related to the running session.
IRhRdkRenderWindow* RhRdk::Realtime::DisplayMode::RenderWindow | ( | void | ) |
|
protectedvirtual |
|
pure virtual |
Return true if custom display mode supports for the built-in view capture progress dialog .
|
pure virtual |
The display mode is switched out, you need to clean up your display mode integration.
|
overridevirtual |
Allows render engines to signal when they want the display pipeline to redraw.
Implements RhRdk::Realtime::ISignalUpdate.
|
pure virtual |
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)
|
pure virtual |
If you're calling DrawOrLockRendererFrameBufferImpl, you should call UnlockRendererFrameBufferImpl in your override of this function.
|
static |
See comment for UnlockRendererFrameBuffer.
|
virtual |
|
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();
unsigned int RhRdk::Realtime::DisplayMode::ViewRuntimeSerialNumber | ( | void | ) | const |
Returns the runtime serial number of the CRhinoView that is associated with this display mode.
|
friend |