Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7433219
commit 4290dde
Showing
8 changed files
with
132 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/*************************************************************************** | ||
qgs3dsceneexporter.h | ||
-------------------------------------- | ||
Date : July 2020 | ||
Copyright : (C) 2020 by Belgacem Nedjima | ||
Email : gb underscore nedjima at esi dot dz | ||
*************************************************************************** | ||
* * | ||
* This program is free software; you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation; either version 2 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
***************************************************************************/ | ||
|
||
#include "qgsimagetexture.h" | ||
|
||
|
||
QgsImageTexture::QgsImageTexture( const QImage &image, Qt3DCore::QNode *parent ) | ||
: Qt3DRender::QPaintedTextureImage( parent ) | ||
, mImage( image ) | ||
{ | ||
setSize( mImage.size() ); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/*************************************************************************** | ||
qgs3dsceneexporter.h | ||
-------------------------------------- | ||
Date : July 2020 | ||
Copyright : (C) 2020 by Belgacem Nedjima | ||
Email : gb underscore nedjima at esi dot dz | ||
*************************************************************************** | ||
* * | ||
* This program is free software; you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation; either version 2 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
***************************************************************************/ | ||
|
||
#ifndef QGSIMAGETEXTURE_H | ||
#define QGSIMAGETEXTURE_H | ||
|
||
#include <QImage> | ||
#include <QPainter> | ||
#include <Qt3DCore/QNode> | ||
#include <Qt3DRender/QPaintedTextureImage> | ||
|
||
class QgsImageTexture : public Qt3DRender::QPaintedTextureImage | ||
{ | ||
public: | ||
QgsImageTexture( const QImage &image, Qt3DCore::QNode *parent = nullptr ); | ||
|
||
void paint( QPainter *painter ) override | ||
{ | ||
painter->drawImage( mImage.rect(), mImage, mImage.rect() ); | ||
} | ||
|
||
QImage getImage() const { return mImage; } | ||
|
||
private: | ||
|
||
QImage mImage; | ||
|
||
}; | ||
|
||
#endif // QGSIMAGETEXTURE_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters