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
0da2a52d
Kaydet (Commit)
0da2a52d
authored
Agu 13, 2014
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
use references where possible
Change-Id: Ie629d3d8b6d3048a0b34bb80f27eba6044d7f695
üst
80fe3e31
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
GL3DBarChart.cxx
chart2/source/view/charttypes/GL3DBarChart.cxx
+9
-9
GL3DBarChart.hxx
chart2/source/view/inc/GL3DBarChart.hxx
+2
-2
No files found.
chart2/source/view/charttypes/GL3DBarChart.cxx
Dosyayı görüntüle @
0da2a52d
...
@@ -928,11 +928,11 @@ void GL3DBarChart::contextDestroyed()
...
@@ -928,11 +928,11 @@ void GL3DBarChart::contextDestroyed()
mbValidContext
=
false
;
mbValidContext
=
false
;
}
}
void
GL3DBarChart
::
addScreenTextShape
(
OUString
&
nStr
,
glm
::
vec2
rLeftTop
,
float
nTextHeight
,
glm
::
vec3
rPos
,
sal_uInt32
nEvent
)
void
GL3DBarChart
::
addScreenTextShape
(
OUString
&
nStr
,
glm
::
vec2
rLeftTop
,
float
nTextHeight
,
const
glm
::
vec3
&
rPos
,
sal_uInt32
nEvent
)
{
{
maScreenTextShapes
.
push_back
(
new
opengl3D
::
ScreenText
(
mpRenderer
.
get
(),
*
mpTextCache
,
nStr
,
nEvent
));
maScreenTextShapes
.
push_back
(
new
opengl3D
::
ScreenText
(
mpRenderer
.
get
(),
*
mpTextCache
,
nStr
,
nEvent
));
opengl3D
::
TextCacheItem
a
TextCache
=
mpTextCache
->
getText
(
nStr
);
const
opengl3D
::
TextCacheItem
&
r
TextCache
=
mpTextCache
->
getText
(
nStr
);
float
nRectWidth
=
(
float
)
aTextCache
.
maSize
.
Width
()
/
(
float
)
a
TextCache
.
maSize
.
Height
()
*
0.05
;
float
nRectWidth
=
(
float
)
rTextCache
.
maSize
.
Width
()
/
(
float
)
r
TextCache
.
maSize
.
Height
()
*
0.05
;
opengl3D
::
ScreenText
*
pScreenText
=
static_cast
<
opengl3D
::
ScreenText
*>
(
&
maScreenTextShapes
.
back
());
opengl3D
::
ScreenText
*
pScreenText
=
static_cast
<
opengl3D
::
ScreenText
*>
(
&
maScreenTextShapes
.
back
());
pScreenText
->
setPosition
(
rLeftTop
,
glm
::
vec2
(
rLeftTop
.
x
+
nRectWidth
,
rLeftTop
.
y
-
nTextHeight
),
rPos
);
pScreenText
->
setPosition
(
rLeftTop
,
glm
::
vec2
(
rLeftTop
.
x
+
nRectWidth
,
rLeftTop
.
y
-
nTextHeight
),
rPos
);
}
}
...
@@ -1018,8 +1018,8 @@ void GL3DBarChart::updateClickEvent()
...
@@ -1018,8 +1018,8 @@ void GL3DBarChart::updateClickEvent()
{
{
aBarValue
=
OUString
(
"Value: "
)
+
OUString
::
number
(
*
it
);
aBarValue
=
OUString
(
"Value: "
)
+
OUString
::
number
(
*
it
);
maScreenTextShapes
.
push_back
(
new
opengl3D
::
ScreenText
(
mpRenderer
.
get
(),
*
mpTextCache
,
aBarValue
,
CALC_POS_EVENT_ID
));
maScreenTextShapes
.
push_back
(
new
opengl3D
::
ScreenText
(
mpRenderer
.
get
(),
*
mpTextCache
,
aBarValue
,
CALC_POS_EVENT_ID
));
opengl3D
::
TextCacheItem
a
TextCache
=
mpTextCache
->
getText
(
aBarValue
);
const
opengl3D
::
TextCacheItem
&
r
TextCache
=
mpTextCache
->
getText
(
aBarValue
);
float
nRectWidth
=
(
float
)
aTextCache
.
maSize
.
Width
()
/
(
float
)
a
TextCache
.
maSize
.
Height
()
*
0.03
;
float
nRectWidth
=
(
float
)
rTextCache
.
maSize
.
Width
()
/
(
float
)
r
TextCache
.
maSize
.
Height
()
*
0.03
;
std
::
map
<
sal_uInt32
,
const
BarInformation
>::
const_iterator
itr
=
maBarMap
.
find
(
mSelectBarId
);
std
::
map
<
sal_uInt32
,
const
BarInformation
>::
const_iterator
itr
=
maBarMap
.
find
(
mSelectBarId
);
const
BarInformation
&
rBarInfo
=
itr
->
second
;
const
BarInformation
&
rBarInfo
=
itr
->
second
;
glm
::
vec3
aTextPos
=
glm
::
vec3
(
rBarInfo
.
maPos
.
x
+
BAR_SIZE_X
/
2.0
f
,
glm
::
vec3
aTextPos
=
glm
::
vec3
(
rBarInfo
.
maPos
.
x
+
BAR_SIZE_X
/
2.0
f
,
...
@@ -1038,9 +1038,9 @@ void GL3DBarChart::updateClickEvent()
...
@@ -1038,9 +1038,9 @@ void GL3DBarChart::updateClickEvent()
}
}
}
}
float
GL3DBarChart
::
calcScrollDistance
(
glm
::
mat4
&
rMVP
,
glm
::
vec3
a
Pos
)
float
GL3DBarChart
::
calcScrollDistance
(
const
glm
::
mat4
&
rMVP
,
const
glm
::
vec3
&
r
Pos
)
{
{
glm
::
vec4
aScreenPos
=
rMVP
*
glm
::
vec4
(
a
Pos
,
1.0
);
glm
::
vec4
aScreenPos
=
rMVP
*
glm
::
vec4
(
r
Pos
,
1.0
);
glm
::
vec3
aActualPos
=
glm
::
vec3
(
aScreenPos
.
x
/
aScreenPos
.
w
,
aScreenPos
.
y
/
aScreenPos
.
w
,
0.0
);
glm
::
vec3
aActualPos
=
glm
::
vec3
(
aScreenPos
.
x
/
aScreenPos
.
w
,
aScreenPos
.
y
/
aScreenPos
.
w
,
0.0
);
return
glm
::
length
(
aActualPos
);
return
glm
::
length
(
aActualPos
);
}
}
...
@@ -1159,8 +1159,8 @@ void GL3DBarChart::updateScroll()
...
@@ -1159,8 +1159,8 @@ void GL3DBarChart::updateScroll()
{
{
OUString
aBarValue
=
OUString
(
"Value: "
)
+
OUString
::
number
(
aBarInfoList
[
i
].
mnVal
);
OUString
aBarValue
=
OUString
(
"Value: "
)
+
OUString
::
number
(
aBarInfoList
[
i
].
mnVal
);
maScreenTextShapes
.
push_back
(
new
opengl3D
::
ScreenText
(
mpRenderer
.
get
(),
*
mpTextCache
,
aBarValue
,
CALC_POS_EVENT_ID
));
maScreenTextShapes
.
push_back
(
new
opengl3D
::
ScreenText
(
mpRenderer
.
get
(),
*
mpTextCache
,
aBarValue
,
CALC_POS_EVENT_ID
));
opengl3D
::
TextCacheItem
a
TextCache
=
mpTextCache
->
getText
(
aBarValue
);
const
opengl3D
::
TextCacheItem
&
r
TextCache
=
mpTextCache
->
getText
(
aBarValue
);
float
nRectWidth
=
(
float
)
aTextCache
.
maSize
.
Width
()
/
(
float
)
a
TextCache
.
maSize
.
Height
()
*
0.03
;
float
nRectWidth
=
(
float
)
rTextCache
.
maSize
.
Width
()
/
(
float
)
r
TextCache
.
maSize
.
Height
()
*
0.03
;
glm
::
vec3
aTextPos
=
glm
::
vec3
(
aBarInfoList
[
i
].
maPos
.
x
+
BAR_SIZE_X
/
2.0
f
,
glm
::
vec3
aTextPos
=
glm
::
vec3
(
aBarInfoList
[
i
].
maPos
.
x
+
BAR_SIZE_X
/
2.0
f
,
aBarInfoList
[
i
].
maPos
.
y
+
BAR_SIZE_Y
/
2.0
f
,
aBarInfoList
[
i
].
maPos
.
y
+
BAR_SIZE_Y
/
2.0
f
,
aBarInfoList
[
i
].
maPos
.
z
);
aBarInfoList
[
i
].
maPos
.
z
);
...
...
chart2/source/view/inc/GL3DBarChart.hxx
Dosyayı görüntüle @
0da2a52d
...
@@ -90,11 +90,11 @@ private:
...
@@ -90,11 +90,11 @@ private:
void
updateDataUpdateFPS
();
void
updateDataUpdateFPS
();
DECL_LINK
(
updateTimer
,
void
*
);
DECL_LINK
(
updateTimer
,
void
*
);
int
calcTimeInterval
(
TimeValue
&
startTime
,
TimeValue
&
endTime
);
int
calcTimeInterval
(
TimeValue
&
startTime
,
TimeValue
&
endTime
);
void
addScreenTextShape
(
OUString
&
nStr
,
glm
::
vec2
rLeftTop
,
float
nTextHeight
,
glm
::
vec3
rPos
=
glm
::
vec3
(
0.0
f
,
0.0
f
,
0.0
f
),
sal_uInt32
nEvent
=
0
);
void
addScreenTextShape
(
OUString
&
nStr
,
glm
::
vec2
rLeftTop
,
float
nTextHeight
,
const
glm
::
vec3
&
rPos
=
glm
::
vec3
(
0.0
f
,
0.0
f
,
0.0
f
),
sal_uInt32
nEvent
=
0
);
void
recordBarHistory
(
sal_uInt32
&
nBarID
,
float
&
nVal
);
void
recordBarHistory
(
sal_uInt32
&
nBarID
,
float
&
nVal
);
void
updateClickEvent
();
void
updateClickEvent
();
void
calcDistance
(
std
::
vector
<
sal_uInt32
>
&
vectorNearest
);
void
calcDistance
(
std
::
vector
<
sal_uInt32
>
&
vectorNearest
);
float
calcScrollDistance
(
glm
::
mat4
&
mvp
,
glm
::
vec3
p
os
);
float
calcScrollDistance
(
const
glm
::
mat4
&
mvp
,
const
glm
::
vec3
&
rP
os
);
void
initDistanceHeap
(
std
::
vector
<
sal_uInt32
>
&
vectorNearest
);
void
initDistanceHeap
(
std
::
vector
<
sal_uInt32
>
&
vectorNearest
);
void
keepHeap
(
std
::
vector
<
sal_uInt32
>
&
vectorNearest
,
int
index
);
void
keepHeap
(
std
::
vector
<
sal_uInt32
>
&
vectorNearest
,
int
index
);
void
swapVector
(
int
i
,
int
j
,
std
::
vector
<
sal_uInt32
>
&
vectorNearest
);
void
swapVector
(
int
i
,
int
j
,
std
::
vector
<
sal_uInt32
>
&
vectorNearest
);
...
...
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