Open Inventor Release 2024.1.1
 
Loading...
Searching...
No Matches
RenderAreaListener.h
1/*=======================================================================
2 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), ***
3 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. ***
4 *** ***
5 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS ***
6 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR ***
7 *** WRITTEN AUTHORIZATION OF FEI S.A.S. ***
8 *** ***
9 *** RESTRICTED RIGHTS LEGEND ***
10 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS ***
11 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN ***
12 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT ***
13 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN ***
14 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. ***
15 *** ***
16 *** COPYRIGHT (C) 1996-2023 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20
21#pragma once
22
23#include <Inventor/sys/port.h>
24#include <RemoteViz/Rendering/LibHelper.h>
25
26#include <string>
27#include <memory>
28
29#include <Inventor/events/SoKeyboardEvent.h>
30#include <Inventor/events/SoMouseButtonEvent.h>
31
32class SbRasterImage;
33
34namespace RemoteViz
35{
36 namespace Rendering
37 {
38
39 class Connection;
40
41 class RenderArea;
42
43 class FrameEncoders;
44
83 class RENDERSERVICE_API RenderAreaListener
84 {
85 public:
113 virtual void onOpenedConnection(std::shared_ptr<RenderArea> renderArea, std::shared_ptr<Connection> connection, std::shared_ptr<FrameEncoders> frameEncoders);
124 virtual void onInitializedConnection(std::shared_ptr<RenderArea> renderArea, std::shared_ptr<Connection> sender, std::shared_ptr<const FrameEncoders> frameEncoders);
138 virtual void onClosedConnection(std::shared_ptr<RenderArea> renderArea, const std::string& connectionId, bool aborted);
150 virtual void onReceivedMessage(std::shared_ptr<RenderArea> renderArea, std::shared_ptr<Connection> sender, const std::string& message);
162 virtual void onReceivedMessage(std::shared_ptr<RenderArea> renderArea, std::shared_ptr<Connection> sender, const std::vector<unsigned char>& buffer);
182 virtual bool onPreRender(std::shared_ptr<RenderArea> renderArea, bool &clearWindow, bool &clearZbuffer);
192 virtual void onPostRender(std::shared_ptr<RenderArea> renderArea);
203 virtual void onResize(std::shared_ptr<RenderArea> renderArea, unsigned int width, unsigned int height);
219 virtual void onRequestedSize(std::shared_ptr<RenderArea> renderArea, std::shared_ptr<Connection> sender, unsigned int width, unsigned int height);
236 virtual void onRefusedEncoder(std::shared_ptr<RenderArea> renderArea, std::shared_ptr<Connection> sender, std::shared_ptr<FrameEncoders> encoders);
238
257 virtual bool onMouseUp(std::shared_ptr<RenderArea> renderArea, std::shared_ptr<Connection> sender, int x, int y, SoMouseButtonEvent::Button button);
277 virtual bool onMouseDown(std::shared_ptr<RenderArea> renderArea, std::shared_ptr<Connection> sender, int x, int y, SoMouseButtonEvent::Button button);
297 virtual bool onMouseDoubleClick(std::shared_ptr<RenderArea> renderArea, std::shared_ptr<Connection> sender, int x, int y, SoMouseButtonEvent::Button button);
315 virtual bool onMouseMove(std::shared_ptr<RenderArea> renderArea, std::shared_ptr<Connection> sender, int x, int y);
333 virtual bool onMouseEnter(std::shared_ptr<RenderArea> renderArea, std::shared_ptr<Connection> sender, int x, int y);
351 virtual bool onMouseLeave(std::shared_ptr<RenderArea> renderArea, std::shared_ptr<Connection> sender, int x, int y);
371 virtual bool onMouseWheel(std::shared_ptr<RenderArea> renderArea, std::shared_ptr<Connection> sender, int x, int y, int delta);
391 virtual bool onKeyUp(std::shared_ptr<RenderArea> renderArea, std::shared_ptr<Connection> sender, int x, int y, const SoKeyboardEvent::Key& key);
411 virtual bool onKeyDown(std::shared_ptr<RenderArea> renderArea, std::shared_ptr<Connection> sender, int x, int y, const SoKeyboardEvent::Key& key);
431 virtual bool onTouchStart(std::shared_ptr<RenderArea> renderArea, std::shared_ptr<Connection> sender, unsigned int id, int x, int y);
451 virtual bool onTouchMove(std::shared_ptr<RenderArea> renderArea, std::shared_ptr<Connection> sender, unsigned int id, int x, int y);
471 virtual bool onTouchEnd(std::shared_ptr<RenderArea> renderArea, std::shared_ptr<Connection> sender, unsigned int id, int x, int y);
473
494 virtual void onRequestedFrame(std::shared_ptr<RenderArea> renderArea, std::shared_ptr<Connection> sender, SbRasterImage* rasterImage, bool& isInteractive);
495
517 virtual void onSendingFrame(std::shared_ptr<RenderArea> renderArea, std::shared_ptr<Connection> sender, std::string& message);
518
519 };
520
521
522 }
523}
<a href="IconLegend.html"><img src="extRV.gif" alt="RemoteViz" border="0"></a>
virtual void onSendingFrame(std::shared_ptr< RenderArea > renderArea, std::shared_ptr< Connection > sender, std::string &message)
Triggered before sending a frame to the client.
virtual bool onMouseUp(std::shared_ptr< RenderArea > renderArea, std::shared_ptr< Connection > sender, int x, int y, SoMouseButtonEvent::Button button)
Triggered when a MouseUp event is received from the client.
virtual void onClosedConnection(std::shared_ptr< RenderArea > renderArea, const std::string &connectionId, bool aborted)
Triggered when a connection is closed.
virtual bool onPreRender(std::shared_ptr< RenderArea > renderArea, bool &clearWindow, bool &clearZbuffer)
Triggered before a rendering is done.
virtual bool onTouchEnd(std::shared_ptr< RenderArea > renderArea, std::shared_ptr< Connection > sender, unsigned int id, int x, int y)
Triggered when a TouchEnd event is received from the client.
virtual bool onMouseLeave(std::shared_ptr< RenderArea > renderArea, std::shared_ptr< Connection > sender, int x, int y)
Triggered when a MouseLeave event is received from the client.
virtual void onReceivedMessage(std::shared_ptr< RenderArea > renderArea, std::shared_ptr< Connection > sender, const std::vector< unsigned char > &buffer)
Triggered when a binary message is received from a client.
virtual void onReceivedMessage(std::shared_ptr< RenderArea > renderArea, std::shared_ptr< Connection > sender, const std::string &message)
Triggered when a text message is received from a client.
virtual void onPostRender(std::shared_ptr< RenderArea > renderArea)
Triggered after a rendering is done.
virtual void onInitializedConnection(std::shared_ptr< RenderArea > renderArea, std::shared_ptr< Connection > sender, std::shared_ptr< const FrameEncoders > frameEncoders)
Triggered when the connection and the frame encoders are initialized successfully.
virtual void onRequestedFrame(std::shared_ptr< RenderArea > renderArea, std::shared_ptr< Connection > sender, SbRasterImage *rasterImage, bool &isInteractive)
Triggered when a new frame is requested by a connection.
virtual bool onMouseDoubleClick(std::shared_ptr< RenderArea > renderArea, std::shared_ptr< Connection > sender, int x, int y, SoMouseButtonEvent::Button button)
Triggered when a MouseDoubleClick event is received from the client.
virtual void onOpenedConnection(std::shared_ptr< RenderArea > renderArea, std::shared_ptr< Connection > connection, std::shared_ptr< FrameEncoders > frameEncoders)
Triggered when a client connects to the RenderArea.
virtual bool onMouseMove(std::shared_ptr< RenderArea > renderArea, std::shared_ptr< Connection > sender, int x, int y)
Triggered when a MouseMove event is received from the client.
virtual bool onMouseWheel(std::shared_ptr< RenderArea > renderArea, std::shared_ptr< Connection > sender, int x, int y, int delta)
Triggered when a mouse wheel event (rotatation) is received from the client.
virtual bool onTouchMove(std::shared_ptr< RenderArea > renderArea, std::shared_ptr< Connection > sender, unsigned int id, int x, int y)
Triggered when a TouchMove event is received from the client.
virtual bool onMouseDown(std::shared_ptr< RenderArea > renderArea, std::shared_ptr< Connection > sender, int x, int y, SoMouseButtonEvent::Button button)
Triggered when a MouseDown event is received from the client.
virtual void onRefusedEncoder(std::shared_ptr< RenderArea > renderArea, std::shared_ptr< Connection > sender, std::shared_ptr< FrameEncoders > encoders)
Triggered when a frame encoder cannot be initialized.
virtual bool onMouseEnter(std::shared_ptr< RenderArea > renderArea, std::shared_ptr< Connection > sender, int x, int y)
Triggered when a MouseEnter event is received from the client.
virtual void onRequestedSize(std::shared_ptr< RenderArea > renderArea, std::shared_ptr< Connection > sender, unsigned int width, unsigned int height)
Triggered when a client requests a new renderArea size.
virtual bool onTouchStart(std::shared_ptr< RenderArea > renderArea, std::shared_ptr< Connection > sender, unsigned int id, int x, int y)
Triggered when a TouchStart event is received from the client.
virtual bool onKeyUp(std::shared_ptr< RenderArea > renderArea, std::shared_ptr< Connection > sender, int x, int y, const SoKeyboardEvent::Key &key)
Triggered when a KeyUp event is received from the client.
virtual void onResize(std::shared_ptr< RenderArea > renderArea, unsigned int width, unsigned int height)
Triggered when the renderArea is resized.
virtual bool onKeyDown(std::shared_ptr< RenderArea > renderArea, std::shared_ptr< Connection > sender, int x, int y, const SoKeyboardEvent::Key &key)
Triggered when a KeyDown event is received from the client.
Class to render an OpenInventor scene in a Qt OpenGL window.
Definition RenderArea.h:46
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Class encapsulat...
Key
The keyboard keys.