Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
c23c32f1
Kaydet (Commit)
c23c32f1
authored
Nis 30, 2014
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
remove OPENGL_SCALE_VALUE that makes no sense without XShape
Change-Id: I1f8874d4d9fd5323fac9c31b9b5334b3d193cd63
üst
83c4db6d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
21 deletions
+17
-21
GL3DRenderer.cxx
chart2/source/view/main/GL3DRenderer.cxx
+17
-21
No files found.
chart2/source/view/main/GL3DRenderer.cxx
Dosyayı görüntüle @
c23c32f1
...
@@ -21,7 +21,6 @@
...
@@ -21,7 +21,6 @@
#include "glm/gtc/matrix_inverse.hpp"
#include "glm/gtc/matrix_inverse.hpp"
#define GL_PI 3.14159f
#define GL_PI 3.14159f
#define OPENGL_SCALE_VALUE 20
#define RGB_WHITE (0xFF | (0xFF << 8) | (0xFF << 16))
#define RGB_WHITE (0xFF | (0xFF << 8) | (0xFF << 16))
using
namespace
std
;
using
namespace
std
;
...
@@ -812,9 +811,9 @@ void OpenGL3DRenderer::AddPolygon3DObjectPoint(float x, float y, float z)
...
@@ -812,9 +811,9 @@ void OpenGL3DRenderer::AddPolygon3DObjectPoint(float x, float y, float z)
{
{
m_Polygon3DInfo
.
vertices
=
new
Vertices3D
;
m_Polygon3DInfo
.
vertices
=
new
Vertices3D
;
}
}
float
actualX
=
(
x
/
OPENGL_SCALE_VALUE
)
-
((
float
)
m_iWidth
/
2
)
;
float
actualX
=
x
-
(
float
)
m_iWidth
/
2
;
float
actualY
=
(
y
/
OPENGL_SCALE_VALUE
)
-
((
float
)
m_iHeight
/
2
)
;
float
actualY
=
y
-
(
float
)
m_iHeight
/
2
;
float
actualZ
=
z
/
OPENGL_SCALE_VALUE
;
float
actualZ
=
z
;
float
maxCoord
=
max
(
actualX
,
max
(
actualY
,
actualZ
));
float
maxCoord
=
max
(
actualX
,
max
(
actualY
,
actualZ
));
m_fZmax
=
max
(
maxCoord
,
m_fZmax
);
m_fZmax
=
max
(
maxCoord
,
m_fZmax
);
m_Polygon3DInfo
.
vertices
->
push_back
(
glm
::
vec3
(
actualX
,
-
actualY
,
actualZ
));
m_Polygon3DInfo
.
vertices
->
push_back
(
glm
::
vec3
(
actualX
,
-
actualY
,
actualZ
));
...
@@ -899,9 +898,9 @@ void OpenGL3DRenderer::AddShape3DExtrudeObject(sal_Int32 color,sal_Int32 specula
...
@@ -899,9 +898,9 @@ void OpenGL3DRenderer::AddShape3DExtrudeObject(sal_Int32 color,sal_Int32 specula
m_Extrude3DInfo
.
material
.
shininess
=
1.0
f
;
m_Extrude3DInfo
.
material
.
shininess
=
1.0
f
;
m_Extrude3DInfo
.
xTransform
=
xTransform
/
OPENGL_SCALE_VALUE
-
((
float
)
m_iWidth
/
2
);
m_Extrude3DInfo
.
xTransform
=
xTransform
-
((
float
)
m_iWidth
/
2
);
m_Extrude3DInfo
.
yTransform
=
yTransform
/
OPENGL_SCALE_VALUE
-
((
float
)
m_iHeight
/
2
);
m_Extrude3DInfo
.
yTransform
=
yTransform
-
((
float
)
m_iHeight
/
2
);
m_Extrude3DInfo
.
zTransform
=
zTransform
/
OPENGL_SCALE_VALUE
;
m_Extrude3DInfo
.
zTransform
=
zTransform
;
}
}
void
OpenGL3DRenderer
::
EndAddShape3DExtrudeObject
()
void
OpenGL3DRenderer
::
EndAddShape3DExtrudeObject
()
...
@@ -912,22 +911,19 @@ void OpenGL3DRenderer::EndAddShape3DExtrudeObject()
...
@@ -912,22 +911,19 @@ void OpenGL3DRenderer::EndAddShape3DExtrudeObject()
void
OpenGL3DRenderer
::
AddExtrude3DObjectPoint
(
float
x
,
float
y
,
float
z
)
void
OpenGL3DRenderer
::
AddExtrude3DObjectPoint
(
float
x
,
float
y
,
float
z
)
{
{
float
actualX
=
(
x
/
OPENGL_SCALE_VALUE
);
float
maxCoord
=
std
::
max
(
x
,
std
::
max
(
y
,
z
));
float
actualY
=
(
y
/
OPENGL_SCALE_VALUE
);
m_fZmax
=
std
::
max
(
maxCoord
,
m_fZmax
);
float
actualZ
=
z
/
OPENGL_SCALE_VALUE
;
float
maxCoord
=
max
(
actualX
,
max
(
actualY
,
actualZ
));
m_fZmax
=
max
(
maxCoord
,
m_fZmax
);
if
(
m_iPointNum
==
0
)
if
(
m_iPointNum
==
0
)
{
{
m_Extrude3DInfo
.
xRange
[
0
]
=
actualX
;
m_Extrude3DInfo
.
xRange
[
0
]
=
x
;
m_Extrude3DInfo
.
xRange
[
1
]
=
actualX
;
m_Extrude3DInfo
.
xRange
[
1
]
=
x
;
m_Extrude3DInfo
.
yRange
[
0
]
=
actualY
;
m_Extrude3DInfo
.
yRange
[
0
]
=
y
;
m_Extrude3DInfo
.
yRange
[
1
]
=
actualY
;
m_Extrude3DInfo
.
yRange
[
1
]
=
y
;
}
}
m_Extrude3DInfo
.
xRange
[
0
]
=
min
(
m_Extrude3DInfo
.
xRange
[
0
],
actualX
);
m_Extrude3DInfo
.
xRange
[
0
]
=
min
(
m_Extrude3DInfo
.
xRange
[
0
],
x
);
m_Extrude3DInfo
.
xRange
[
1
]
=
max
(
m_Extrude3DInfo
.
xRange
[
1
],
actualX
);
m_Extrude3DInfo
.
xRange
[
1
]
=
max
(
m_Extrude3DInfo
.
xRange
[
1
],
x
);
m_Extrude3DInfo
.
yRange
[
0
]
=
min
(
m_Extrude3DInfo
.
yRange
[
0
],
actualY
);
m_Extrude3DInfo
.
yRange
[
0
]
=
min
(
m_Extrude3DInfo
.
yRange
[
0
],
y
);
m_Extrude3DInfo
.
yRange
[
1
]
=
max
(
m_Extrude3DInfo
.
yRange
[
1
],
actualY
);
m_Extrude3DInfo
.
yRange
[
1
]
=
max
(
m_Extrude3DInfo
.
yRange
[
1
],
y
);
m_iPointNum
++
;
m_iPointNum
++
;
}
}
...
@@ -1318,7 +1314,7 @@ int OpenGL3DRenderer::ProcessExtrude3DPickingBox()
...
@@ -1318,7 +1314,7 @@ int OpenGL3DRenderer::ProcessExtrude3DPickingBox()
glDisableVertexAttribArray
(
m_2DVertexID
);
glDisableVertexAttribArray
(
m_2DVertexID
);
glUseProgram
(
0
);
glUseProgram
(
0
);
//read pixel to get the index
//read pixel to get the index
Point
select
=
Point
(
m_aMPos
.
X
()
/
OPENGL_SCALE_VALUE
,
m_aMPos
.
Y
()
/
OPENGL_SCALE_VALUE
);
Point
select
=
Point
(
m_aMPos
.
X
()
,
m_aMPos
.
Y
()
);
sal_uInt8
selectColor
[
4
]
=
{
0
};
sal_uInt8
selectColor
[
4
]
=
{
0
};
#if 0
#if 0
int picWidth = m_iWidth - select.X();
int picWidth = m_iWidth - select.X();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment