FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
SolarSystem/Scene/MaterialObjects/unlitobject.cpp at dev · Instand/SolarSystem · GitHub
Instand
/
SolarSystem
Public
Notifications
You must be signed in to change notification settings
Fork
12
Star
44
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
SolarSystem
/
Scene
/
MaterialObjects
/
unlitobject.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
28 lines (22 loc) · 990 Bytes
Breadcrumbs
SolarSystem
/
Scene
/
MaterialObjects
/
unlitobject.cpp
Copy path
File metadata and controls
28 lines (22 loc) · 990 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#
include
"
unlitobject.h
"
#
include
<
QTextureWrapMode
>
#
include
<
QAbstractTexture
>
#
include
<
QObjectPicker
>
SolarSystem::UnlitObject::UnlitObject
(Qt3DCore::QNode* parent):
Object3D(parent)
{
m_materialType = SolarMaterials::Unlit;
m_material =
new
Qt3DExtras::QTextureMaterial
();
auto
mat = qobject_cast<Qt3DExtras::QTextureMaterial*>(m_material);
Qt3DRender::QTextureWrapMode wrapMode;
wrapMode.
setX
(Qt3DRender::QTextureWrapMode::WrapMode::Repeat);
wrapMode.
setY
(Qt3DRender::QTextureWrapMode::WrapMode::Repeat);
wrapMode.
setZ
(Qt3DRender::QTextureWrapMode::WrapMode::Repeat);
mat->
texture
()->
setWrapMode
(wrapMode);
mat->
texture
()->
setGenerateMipMaps
(
true
);
mat->
texture
()->
setMagnificationFilter
(Qt3DRender::QAbstractTexture::Linear);
mat->
texture
()->
setMinificationFilter
(Qt3DRender::QAbstractTexture::LinearMipMapLinear);
mat->
texture
()->
setMaximumAnisotropy
(
16
.
0f
);
m_picker->
setEnabled
(
false
);
addComponent
(m_material);
}
Back
|
FazBrowse Home
|
New Git URL