SlideShare ist ein Scribd-Unternehmen logo
1 von 36
INTRODUCTION To
Qt
What is Qt?
❏ Cross-platform application development
framework.
❏ Used to create graphical user interfaces.
❏ It can be used with several different
programming languages.
❏ “t” in Qt refers to toolkit which defines Qt
much better. Therefore, it can effectively be
defined as a set of tools.
Qt TOOLS
❏ The main component is a set of libraries, written
natively in C++. These libraries include: the core library
providing the most important stuff, the GUI library
providing the GUI components, the XML library.
❏ Meta Object Compiler(moc) used to handle Qt’s C++
extensions.This extends C++ a little bit, adding nice
features like the signals/slots mechanism
❏ The GUI designer tool and the UIC. Qt Designer is a
graphical tool to create GUIs visually and save them to
XML files, and the UIC is a command-line tool to
translate those XML files to C++ code.
❏ Qt Linguist, tool to internationalize
applications.Qt Linguist is a graphical tool for
translator to edit those XML files and provide
translations.
❏ The qmake tool, used to automate build
process, so you don't have to run MOC, C++
compiler, UIC and other things manually.
❏ The Qt Creator, a graphical IDE to integrate
all the stuff described above into a single
environment.
qmake helps to create .pro file
Creating a Qt project
File and
t New
Select
Files generated
Examples
Similarly a 2D graphic
such as a circle,ellipse
can be built
The code uses QPainter on QMainWindow. Circle
drawing is done during gui decoration process , it is
not drawn as an animation.Drawing empty circle on
QMainWindow involves subclassing of
QMainWindow and overriding
paintEvent(QPaintEvent*) method.
using Coin3D and SoQt
3-D Graphics in Qt
❏ Coin3D is a high level 3D graphics toolkit for
developing cross-platform 3D visualizations.
❏ It uses scene graph data structures to render
3D graphics.
❏ Based on the de facto standard Open
Inventor, Coin3D is a set of libraries for
creating 3D graphics applications.
Coin3D
Few Steps to install
1. Download Coin-3.1.3.tar.gz fom
https://bitbucket.org/Coin3D/coin/downloads.
2. Next unzip the file using the following commands:
o cd /tmp
o gzip -cd Coin-3.1.3.tar.gz | tar xvf -
o mkdir coin-build
3. Run configure from the build directory:cd coin-build
4. ../Coin-3.1.3/configure
5. Build the Coin library:
6. make
7. Install the Coin library:
8. make install
Just install:libsoqt40-dev
SoQt is a library which provides bridge
between Coin3D visualistion and Qt
2D Graphical Interface.
Linking
Add in the pro file:
LIBS += -lCoin3D -lSoQt
Open Inventor
Open Inventor is a “scenegraph“ graphics API:
All visible objects are stored in a scenegraph
Capabilities of Open Inventor
❏ Easy construction of 3D scenes
❏ User interaction
❏ Animation
Scenegraph Anatomy
There are three kinds of nodes:
Group nodes: allow construction of trees
Property nodes: change the color / location /
... of the next object
Shapes: visible objects.
Common node types
❏ Group nodes
SoGroup: SoSeparator..
❏ Property nodes
Transform: SoTransform, SoRotation, ...
Appearance: SoMaterial….
❏ Shape nodes
SoShape SoCone, SoCube,
Scene objects
class name prefix: So (scene object)
❏ derived from SoNode
❏ can be inserted directly into the scenegraph
Example:
root->addChild(new SoSphere)
#
<Inventor/Qt/viewers/SoQtExaminerViewer.h>
#include <Inventor/nodes/SoSeparator.h>
#include <Inventor/nodes/SoCube.h>
int main(int argc, char ** argv)
{
QWidget * mainwin = SoQt::init(argc, argv,
argv[0]);
SoSeparator * root = new SoSeparator;
root->ref();
root->addChild(cube);
SoQtExaminerViewer * eviewer = new
SoQtExaminerViewer(mainwin);
eviewer->setSceneGraph(root);
eviewer->show();
SoQt::show(mainwin);
SoQt::mainLoop();
root->unref();
delete eviewer;
return 0;}
#include <Inventor/Qt/SoQt.h>: The SoQt class takes
care of Qt initialisation.
# include<Inventor/Qt/viewers/SoQtExaminerViewer.h>
It is the general purpose viewer to view the 3D object
generated.
#include <Inventor/nodes/SoSeparator.h>
It is subclass of SoGroup class.
#include <Inventor/nodes/SoCube.h>
This is the node for cube shape. It comes under the
category of shape nodes.
❏ QWidget * mainwin = SoQt::init(argc, argv, argv[0]);
SoQt ::init with a string creates a QApplication and its
main window, and returns its window handle.
❏ SoSeparator * root = new SoSeparator;
root->ref();
The root node of the scene graph is created here.
❏ SoCube *cube = new SoCube;
root->addChild(cube);
A cube is added to the scene as a child to the root node.
❏ SoQtExaminerViewer(mainwin);
eviewer->setSceneGraph(root);
eviewer->show();
The ExaminerViewer class of the viewer is used for
display of objects.
❏ SoQt::show(mainwin);
This pops up the main window.
❏ SoQt::mainLoop();
Cleans up all static data allocated by the SoQt library on
initialization.
Thank You

Weitere ähnliche Inhalte

Was ist angesagt?

Scripting Your Qt Application
Scripting Your Qt ApplicationScripting Your Qt Application
Scripting Your Qt Applicationaccount inactive
 
Qt Memory Management & Signal and Slots
Qt Memory Management & Signal and SlotsQt Memory Management & Signal and Slots
Qt Memory Management & Signal and SlotsJussi Pohjolainen
 
Necessitas - Qt on Android - from FSCONS 2011
Necessitas - Qt on Android - from FSCONS 2011Necessitas - Qt on Android - from FSCONS 2011
Necessitas - Qt on Android - from FSCONS 2011Johan Thelin
 
03 - Qt UI Development
03 - Qt UI Development03 - Qt UI Development
03 - Qt UI DevelopmentAndreas Jakl
 
OpenGL Fixed Function to Shaders - Porting a fixed function application to “m...
OpenGL Fixed Function to Shaders - Porting a fixed function application to “m...OpenGL Fixed Function to Shaders - Porting a fixed function application to “m...
OpenGL Fixed Function to Shaders - Porting a fixed function application to “m...ICS
 
State of the Art OpenGL and Qt
State of the Art OpenGL and QtState of the Art OpenGL and Qt
State of the Art OpenGL and QtICS
 
Qt on Real Time Operating Systems
Qt on Real Time Operating SystemsQt on Real Time Operating Systems
Qt on Real Time Operating Systemsaccount inactive
 
Qt Graphics View Framework (Qt Developers Meetup Isreal)
Qt Graphics View Framework (Qt Developers Meetup Isreal)Qt Graphics View Framework (Qt Developers Meetup Isreal)
Qt Graphics View Framework (Qt Developers Meetup Isreal)vitalipe
 
Meet the Widgets: Another Way to Implement UI
Meet the Widgets: Another Way to Implement UIMeet the Widgets: Another Way to Implement UI
Meet the Widgets: Another Way to Implement UIICS
 
QVariant, QObject — Qt's not just for GUI development
QVariant, QObject — Qt's not just for GUI developmentQVariant, QObject — Qt's not just for GUI development
QVariant, QObject — Qt's not just for GUI developmentICS
 
Qt and QML performance tips & tricks for Qt 4.7
Qt and QML performance tips & tricks for Qt 4.7Qt and QML performance tips & tricks for Qt 4.7
Qt and QML performance tips & tricks for Qt 4.7Pasi Kellokoski
 
Integrazione QML / C++
Integrazione QML / C++Integrazione QML / C++
Integrazione QML / C++Paolo Sereno
 
Qt for Beginners Part 3 - QML and Qt Quick
Qt for Beginners Part 3 - QML and Qt QuickQt for Beginners Part 3 - QML and Qt Quick
Qt for Beginners Part 3 - QML and Qt QuickICS
 

Was ist angesagt? (19)

Scripting Your Qt Application
Scripting Your Qt ApplicationScripting Your Qt Application
Scripting Your Qt Application
 
Qt Memory Management & Signal and Slots
Qt Memory Management & Signal and SlotsQt Memory Management & Signal and Slots
Qt Memory Management & Signal and Slots
 
Qt Workshop
Qt WorkshopQt Workshop
Qt Workshop
 
Necessitas - Qt on Android - from FSCONS 2011
Necessitas - Qt on Android - from FSCONS 2011Necessitas - Qt on Android - from FSCONS 2011
Necessitas - Qt on Android - from FSCONS 2011
 
Cross Platform Qt
Cross Platform QtCross Platform Qt
Cross Platform Qt
 
03 - Qt UI Development
03 - Qt UI Development03 - Qt UI Development
03 - Qt UI Development
 
OpenGL Fixed Function to Shaders - Porting a fixed function application to “m...
OpenGL Fixed Function to Shaders - Porting a fixed function application to “m...OpenGL Fixed Function to Shaders - Porting a fixed function application to “m...
OpenGL Fixed Function to Shaders - Porting a fixed function application to “m...
 
State of the Art OpenGL and Qt
State of the Art OpenGL and QtState of the Art OpenGL and Qt
State of the Art OpenGL and Qt
 
Qt on Real Time Operating Systems
Qt on Real Time Operating SystemsQt on Real Time Operating Systems
Qt on Real Time Operating Systems
 
Qt Widget In-Depth
Qt Widget In-DepthQt Widget In-Depth
Qt Widget In-Depth
 
State Machine Framework
State Machine FrameworkState Machine Framework
State Machine Framework
 
Qt Graphics View Framework (Qt Developers Meetup Isreal)
Qt Graphics View Framework (Qt Developers Meetup Isreal)Qt Graphics View Framework (Qt Developers Meetup Isreal)
Qt Graphics View Framework (Qt Developers Meetup Isreal)
 
Meet the Widgets: Another Way to Implement UI
Meet the Widgets: Another Way to Implement UIMeet the Widgets: Another Way to Implement UI
Meet the Widgets: Another Way to Implement UI
 
QVariant, QObject — Qt's not just for GUI development
QVariant, QObject — Qt's not just for GUI developmentQVariant, QObject — Qt's not just for GUI development
QVariant, QObject — Qt's not just for GUI development
 
Qt and QML performance tips & tricks for Qt 4.7
Qt and QML performance tips & tricks for Qt 4.7Qt and QML performance tips & tricks for Qt 4.7
Qt and QML performance tips & tricks for Qt 4.7
 
Qt
QtQt
Qt
 
Integrazione QML / C++
Integrazione QML / C++Integrazione QML / C++
Integrazione QML / C++
 
The Future of Qt Widgets
The Future of Qt WidgetsThe Future of Qt Widgets
The Future of Qt Widgets
 
Qt for Beginners Part 3 - QML and Qt Quick
Qt for Beginners Part 3 - QML and Qt QuickQt for Beginners Part 3 - QML and Qt Quick
Qt for Beginners Part 3 - QML and Qt Quick
 

Ähnlich wie Qt coin3d soqt

Qt for beginners part 1 overview and key concepts
Qt for beginners part 1   overview and key conceptsQt for beginners part 1   overview and key concepts
Qt for beginners part 1 overview and key conceptsICS
 
Making your app soar without a container manifest
Making your app soar without a container manifestMaking your app soar without a container manifest
Making your app soar without a container manifestLibbySchulze
 
Qt for beginners part 4 doing more
Qt for beginners part 4   doing moreQt for beginners part 4   doing more
Qt for beginners part 4 doing moreICS
 
Network programming with Qt (C++)
Network programming with Qt (C++)Network programming with Qt (C++)
Network programming with Qt (C++)Manohar Kuse
 
Настройка окружения для кросскомпиляции проектов на основе docker'a
Настройка окружения для кросскомпиляции проектов на основе docker'aНастройка окружения для кросскомпиляции проектов на основе docker'a
Настройка окружения для кросскомпиляции проектов на основе docker'acorehard_by
 
[Td 2015] what is new in visual c++ 2015 and future directions(ulzii luvsanba...
[Td 2015] what is new in visual c++ 2015 and future directions(ulzii luvsanba...[Td 2015] what is new in visual c++ 2015 and future directions(ulzii luvsanba...
[Td 2015] what is new in visual c++ 2015 and future directions(ulzii luvsanba...Sang Don Kim
 
Developing and Benchmarking Qt applications on Hawkboard with Xgxperf
Developing and Benchmarking Qt applications on Hawkboard with XgxperfDeveloping and Benchmarking Qt applications on Hawkboard with Xgxperf
Developing and Benchmarking Qt applications on Hawkboard with XgxperfPrabindh Sundareson
 
The Ring programming language version 1.8 book - Part 77 of 202
The Ring programming language version 1.8 book - Part 77 of 202The Ring programming language version 1.8 book - Part 77 of 202
The Ring programming language version 1.8 book - Part 77 of 202Mahmoud Samir Fayed
 
Let's make it flow ... one way
Let's make it flow ... one wayLet's make it flow ... one way
Let's make it flow ... one wayRoberto Ciatti
 
The Ring programming language version 1.7 book - Part 75 of 196
The Ring programming language version 1.7 book - Part 75 of 196The Ring programming language version 1.7 book - Part 75 of 196
The Ring programming language version 1.7 book - Part 75 of 196Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 83 of 212
The Ring programming language version 1.10 book - Part 83 of 212The Ring programming language version 1.10 book - Part 83 of 212
The Ring programming language version 1.10 book - Part 83 of 212Mahmoud Samir Fayed
 
Codetainer: a Docker-based browser code 'sandbox'
Codetainer: a Docker-based browser code 'sandbox'Codetainer: a Docker-based browser code 'sandbox'
Codetainer: a Docker-based browser code 'sandbox'Jen Andre
 
Porting Motif Applications to Qt - Webinar
Porting Motif Applications to Qt - WebinarPorting Motif Applications to Qt - Webinar
Porting Motif Applications to Qt - WebinarICS
 
Porting Motif Applications to Qt - Webinar
Porting Motif Applications to Qt - WebinarPorting Motif Applications to Qt - Webinar
Porting Motif Applications to Qt - WebinarJanel Heilbrunn
 
Build 2016 - B880 - Top 6 Reasons to Move Your C++ Code to Visual Studio 2015
Build 2016 - B880 - Top 6 Reasons to Move Your C++ Code to Visual Studio 2015Build 2016 - B880 - Top 6 Reasons to Move Your C++ Code to Visual Studio 2015
Build 2016 - B880 - Top 6 Reasons to Move Your C++ Code to Visual Studio 2015Windows Developer
 

Ähnlich wie Qt coin3d soqt (20)

Qt for beginners part 1 overview and key concepts
Qt for beginners part 1   overview and key conceptsQt for beginners part 1   overview and key concepts
Qt for beginners part 1 overview and key concepts
 
Making your app soar without a container manifest
Making your app soar without a container manifestMaking your app soar without a container manifest
Making your app soar without a container manifest
 
Qt for beginners part 4 doing more
Qt for beginners part 4   doing moreQt for beginners part 4   doing more
Qt for beginners part 4 doing more
 
Network programming with Qt (C++)
Network programming with Qt (C++)Network programming with Qt (C++)
Network programming with Qt (C++)
 
Book
BookBook
Book
 
Deep Learning Edge
Deep Learning Edge Deep Learning Edge
Deep Learning Edge
 
Настройка окружения для кросскомпиляции проектов на основе docker'a
Настройка окружения для кросскомпиляции проектов на основе docker'aНастройка окружения для кросскомпиляции проектов на основе docker'a
Настройка окружения для кросскомпиляции проектов на основе docker'a
 
[Td 2015] what is new in visual c++ 2015 and future directions(ulzii luvsanba...
[Td 2015] what is new in visual c++ 2015 and future directions(ulzii luvsanba...[Td 2015] what is new in visual c++ 2015 and future directions(ulzii luvsanba...
[Td 2015] what is new in visual c++ 2015 and future directions(ulzii luvsanba...
 
Developing and Benchmarking Qt applications on Hawkboard with Xgxperf
Developing and Benchmarking Qt applications on Hawkboard with XgxperfDeveloping and Benchmarking Qt applications on Hawkboard with Xgxperf
Developing and Benchmarking Qt applications on Hawkboard with Xgxperf
 
Hidden Dragons of CGO
Hidden Dragons of CGOHidden Dragons of CGO
Hidden Dragons of CGO
 
The Ring programming language version 1.8 book - Part 77 of 202
The Ring programming language version 1.8 book - Part 77 of 202The Ring programming language version 1.8 book - Part 77 of 202
The Ring programming language version 1.8 book - Part 77 of 202
 
Let's make it flow ... one way
Let's make it flow ... one wayLet's make it flow ... one way
Let's make it flow ... one way
 
The Ring programming language version 1.7 book - Part 75 of 196
The Ring programming language version 1.7 book - Part 75 of 196The Ring programming language version 1.7 book - Part 75 of 196
The Ring programming language version 1.7 book - Part 75 of 196
 
The Ring programming language version 1.10 book - Part 83 of 212
The Ring programming language version 1.10 book - Part 83 of 212The Ring programming language version 1.10 book - Part 83 of 212
The Ring programming language version 1.10 book - Part 83 of 212
 
Qt for beginners
Qt for beginnersQt for beginners
Qt for beginners
 
Codetainer: a Docker-based browser code 'sandbox'
Codetainer: a Docker-based browser code 'sandbox'Codetainer: a Docker-based browser code 'sandbox'
Codetainer: a Docker-based browser code 'sandbox'
 
Porting Motif Applications to Qt - Webinar
Porting Motif Applications to Qt - WebinarPorting Motif Applications to Qt - Webinar
Porting Motif Applications to Qt - Webinar
 
Porting Motif Applications to Qt - Webinar
Porting Motif Applications to Qt - WebinarPorting Motif Applications to Qt - Webinar
Porting Motif Applications to Qt - Webinar
 
Treinamento Qt básico - aula I
Treinamento Qt básico - aula ITreinamento Qt básico - aula I
Treinamento Qt básico - aula I
 
Build 2016 - B880 - Top 6 Reasons to Move Your C++ Code to Visual Studio 2015
Build 2016 - B880 - Top 6 Reasons to Move Your C++ Code to Visual Studio 2015Build 2016 - B880 - Top 6 Reasons to Move Your C++ Code to Visual Studio 2015
Build 2016 - B880 - Top 6 Reasons to Move Your C++ Code to Visual Studio 2015
 

Kürzlich hochgeladen

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 

Kürzlich hochgeladen (20)

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 

Qt coin3d soqt

  • 2. What is Qt? ❏ Cross-platform application development framework. ❏ Used to create graphical user interfaces. ❏ It can be used with several different programming languages. ❏ “t” in Qt refers to toolkit which defines Qt much better. Therefore, it can effectively be defined as a set of tools.
  • 3. Qt TOOLS ❏ The main component is a set of libraries, written natively in C++. These libraries include: the core library providing the most important stuff, the GUI library providing the GUI components, the XML library. ❏ Meta Object Compiler(moc) used to handle Qt’s C++ extensions.This extends C++ a little bit, adding nice features like the signals/slots mechanism ❏ The GUI designer tool and the UIC. Qt Designer is a graphical tool to create GUIs visually and save them to XML files, and the UIC is a command-line tool to translate those XML files to C++ code.
  • 4. ❏ Qt Linguist, tool to internationalize applications.Qt Linguist is a graphical tool for translator to edit those XML files and provide translations. ❏ The qmake tool, used to automate build process, so you don't have to run MOC, C++ compiler, UIC and other things manually. ❏ The Qt Creator, a graphical IDE to integrate all the stuff described above into a single environment.
  • 5. qmake helps to create .pro file
  • 6. Creating a Qt project
  • 9.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16. Similarly a 2D graphic such as a circle,ellipse can be built
  • 17. The code uses QPainter on QMainWindow. Circle drawing is done during gui decoration process , it is not drawn as an animation.Drawing empty circle on QMainWindow involves subclassing of QMainWindow and overriding paintEvent(QPaintEvent*) method.
  • 18.
  • 19. using Coin3D and SoQt 3-D Graphics in Qt
  • 20. ❏ Coin3D is a high level 3D graphics toolkit for developing cross-platform 3D visualizations. ❏ It uses scene graph data structures to render 3D graphics. ❏ Based on the de facto standard Open Inventor, Coin3D is a set of libraries for creating 3D graphics applications.
  • 22. 1. Download Coin-3.1.3.tar.gz fom https://bitbucket.org/Coin3D/coin/downloads. 2. Next unzip the file using the following commands: o cd /tmp o gzip -cd Coin-3.1.3.tar.gz | tar xvf - o mkdir coin-build 3. Run configure from the build directory:cd coin-build 4. ../Coin-3.1.3/configure 5. Build the Coin library: 6. make 7. Install the Coin library: 8. make install
  • 23. Just install:libsoqt40-dev SoQt is a library which provides bridge between Coin3D visualistion and Qt 2D Graphical Interface.
  • 24. Linking Add in the pro file: LIBS += -lCoin3D -lSoQt
  • 25. Open Inventor Open Inventor is a “scenegraph“ graphics API: All visible objects are stored in a scenegraph
  • 26. Capabilities of Open Inventor ❏ Easy construction of 3D scenes ❏ User interaction ❏ Animation
  • 27. Scenegraph Anatomy There are three kinds of nodes: Group nodes: allow construction of trees Property nodes: change the color / location / ... of the next object Shapes: visible objects.
  • 28. Common node types ❏ Group nodes SoGroup: SoSeparator.. ❏ Property nodes Transform: SoTransform, SoRotation, ... Appearance: SoMaterial…. ❏ Shape nodes SoShape SoCone, SoCube,
  • 29. Scene objects class name prefix: So (scene object) ❏ derived from SoNode ❏ can be inserted directly into the scenegraph Example: root->addChild(new SoSphere)
  • 30. # <Inventor/Qt/viewers/SoQtExaminerViewer.h> #include <Inventor/nodes/SoSeparator.h> #include <Inventor/nodes/SoCube.h> int main(int argc, char ** argv) { QWidget * mainwin = SoQt::init(argc, argv, argv[0]); SoSeparator * root = new SoSeparator; root->ref();
  • 31. root->addChild(cube); SoQtExaminerViewer * eviewer = new SoQtExaminerViewer(mainwin); eviewer->setSceneGraph(root); eviewer->show(); SoQt::show(mainwin); SoQt::mainLoop(); root->unref(); delete eviewer; return 0;}
  • 32.
  • 33. #include <Inventor/Qt/SoQt.h>: The SoQt class takes care of Qt initialisation. # include<Inventor/Qt/viewers/SoQtExaminerViewer.h> It is the general purpose viewer to view the 3D object generated. #include <Inventor/nodes/SoSeparator.h> It is subclass of SoGroup class. #include <Inventor/nodes/SoCube.h> This is the node for cube shape. It comes under the category of shape nodes.
  • 34. ❏ QWidget * mainwin = SoQt::init(argc, argv, argv[0]); SoQt ::init with a string creates a QApplication and its main window, and returns its window handle. ❏ SoSeparator * root = new SoSeparator; root->ref(); The root node of the scene graph is created here. ❏ SoCube *cube = new SoCube; root->addChild(cube); A cube is added to the scene as a child to the root node.
  • 35. ❏ SoQtExaminerViewer(mainwin); eviewer->setSceneGraph(root); eviewer->show(); The ExaminerViewer class of the viewer is used for display of objects. ❏ SoQt::show(mainwin); This pops up the main window. ❏ SoQt::mainLoop(); Cleans up all static data allocated by the SoQt library on initialization.