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
6f6056d9
Kaydet (Commit)
6f6056d9
authored
Kas 13, 2015
tarafından
Tomaž Vajngerl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
slideshow: improve rotation timing in glitter transition
Change-Id: I8b0475a6dcde53202a489b9d3265add9fe068cbc
üst
7dec6e6e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
20 deletions
+26
-20
OGLTrans_TransitionImpl.cxx
...ource/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx
+26
-20
No files found.
slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx
Dosyayı görüntüle @
6f6056d9
...
@@ -1866,7 +1866,8 @@ std::shared_ptr<OGLTransitionImpl> makeRipple()
...
@@ -1866,7 +1866,8 @@ std::shared_ptr<OGLTransitionImpl> makeRipple()
std
::
shared_ptr
<
OGLTransitionImpl
>
makeGlitter
()
std
::
shared_ptr
<
OGLTransitionImpl
>
makeGlitter
()
{
{
const
int
NX
=
30
,
NY
=
30
;
const
int
NX
=
80
;
const
int
NY
=
NX
*
4
/
3
;
Primitives_t
aLeavingSlide
;
Primitives_t
aLeavingSlide
;
Primitives_t
aEnteringSlide
;
Primitives_t
aEnteringSlide
;
...
@@ -1875,37 +1876,42 @@ std::shared_ptr<OGLTransitionImpl> makeGlitter()
...
@@ -1875,37 +1876,42 @@ std::shared_ptr<OGLTransitionImpl> makeGlitter()
{
{
for
(
int
x
=
0
;
x
<
NX
+
2
;
x
+=
2
)
for
(
int
x
=
0
;
x
<
NX
+
2
;
x
+=
2
)
{
{
Primitive
Slide
;
Primitive
aHexagon
;
if
(
y
%
4
==
0
)
if
(
y
%
4
==
0
)
{
{
Slide
.
pushTriangle
(
vec
(
x
-
1
,
y
-
1
,
NX
,
NY
),
vec
(
x
,
y
-
2
,
NX
,
NY
),
vec
(
x
,
y
+
0.5
,
NX
,
NY
));
aHexagon
.
pushTriangle
(
vec
(
x
-
1
,
y
-
1
,
NX
,
NY
),
vec
(
x
,
y
-
2
,
NX
,
NY
),
vec
(
x
,
y
+
0.5
,
NX
,
NY
));
Slide
.
pushTriangle
(
vec
(
x
,
y
-
2
,
NX
,
NY
),
vec
(
x
+
1
,
y
-
1
,
NX
,
NY
),
vec
(
x
,
y
+
0.5
,
NX
,
NY
));
aHexagon
.
pushTriangle
(
vec
(
x
,
y
-
2
,
NX
,
NY
),
vec
(
x
+
1
,
y
-
1
,
NX
,
NY
),
vec
(
x
,
y
+
0.5
,
NX
,
NY
));
Slide
.
pushTriangle
(
vec
(
x
+
1
,
y
-
1
,
NX
,
NY
),
vec
(
x
+
1
,
y
,
NX
,
NY
),
vec
(
x
,
y
+
0.5
,
NX
,
NY
));
aHexagon
.
pushTriangle
(
vec
(
x
+
1
,
y
-
1
,
NX
,
NY
),
vec
(
x
+
1
,
y
,
NX
,
NY
),
vec
(
x
,
y
+
0.5
,
NX
,
NY
));
Slide
.
pushTriangle
(
vec
(
x
+
1
,
y
,
NX
,
NY
),
vec
(
x
,
y
+
1
,
NX
,
NY
),
vec
(
x
,
y
+
0.5
,
NX
,
NY
));
aHexagon
.
pushTriangle
(
vec
(
x
+
1
,
y
,
NX
,
NY
),
vec
(
x
,
y
+
1
,
NX
,
NY
),
vec
(
x
,
y
+
0.5
,
NX
,
NY
));
Slide
.
pushTriangle
(
vec
(
x
,
y
+
1
,
NX
,
NY
),
vec
(
x
-
1
,
y
,
NX
,
NY
),
vec
(
x
,
y
+
0.5
,
NX
,
NY
));
aHexagon
.
pushTriangle
(
vec
(
x
,
y
+
1
,
NX
,
NY
),
vec
(
x
-
1
,
y
,
NX
,
NY
),
vec
(
x
,
y
+
0.5
,
NX
,
NY
));
Slide
.
pushTriangle
(
vec
(
x
-
1
,
y
,
NX
,
NY
),
vec
(
x
-
1
,
y
-
1
,
NX
,
NY
),
vec
(
x
,
y
+
0.5
,
NX
,
NY
));
aHexagon
.
pushTriangle
(
vec
(
x
-
1
,
y
,
NX
,
NY
),
vec
(
x
-
1
,
y
-
1
,
NX
,
NY
),
vec
(
x
,
y
+
0.5
,
NX
,
NY
));
}
}
else
else
{
{
Slide
.
pushTriangle
(
vec
(
x
-
2
,
y
-
1
,
NX
,
NY
),
vec
(
x
-
1
,
y
-
2
,
NX
,
NY
),
vec
(
x
,
y
+
0.5
,
NX
,
NY
));
aHexagon
.
pushTriangle
(
vec
(
x
-
2
,
y
-
1
,
NX
,
NY
),
vec
(
x
-
1
,
y
-
2
,
NX
,
NY
),
vec
(
x
,
y
+
0.5
,
NX
,
NY
));
Slide
.
pushTriangle
(
vec
(
x
-
1
,
y
-
2
,
NX
,
NY
),
vec
(
x
,
y
-
1
,
NX
,
NY
),
vec
(
x
,
y
+
0.5
,
NX
,
NY
));
aHexagon
.
pushTriangle
(
vec
(
x
-
1
,
y
-
2
,
NX
,
NY
),
vec
(
x
,
y
-
1
,
NX
,
NY
),
vec
(
x
,
y
+
0.5
,
NX
,
NY
));
Slide
.
pushTriangle
(
vec
(
x
,
y
-
1
,
NX
,
NY
),
vec
(
x
,
y
,
NX
,
NY
),
vec
(
x
,
y
+
0.5
,
NX
,
NY
));
aHexagon
.
pushTriangle
(
vec
(
x
,
y
-
1
,
NX
,
NY
),
vec
(
x
,
y
,
NX
,
NY
),
vec
(
x
,
y
+
0.5
,
NX
,
NY
));
Slide
.
pushTriangle
(
vec
(
x
,
y
,
NX
,
NY
),
vec
(
x
-
1
,
y
+
1
,
NX
,
NY
),
vec
(
x
,
y
+
0.5
,
NX
,
NY
));
aHexagon
.
pushTriangle
(
vec
(
x
,
y
,
NX
,
NY
),
vec
(
x
-
1
,
y
+
1
,
NX
,
NY
),
vec
(
x
,
y
+
0.5
,
NX
,
NY
));
Slide
.
pushTriangle
(
vec
(
x
-
1
,
y
+
1
,
NX
,
NY
),
vec
(
x
-
2
,
y
,
NX
,
NY
),
vec
(
x
,
y
+
0.5
,
NX
,
NY
));
aHexagon
.
pushTriangle
(
vec
(
x
-
1
,
y
+
1
,
NX
,
NY
),
vec
(
x
-
2
,
y
,
NX
,
NY
),
vec
(
x
,
y
+
0.5
,
NX
,
NY
));
Slide
.
pushTriangle
(
vec
(
x
-
2
,
y
,
NX
,
NY
),
vec
(
x
-
2
,
y
-
1
,
NX
,
NY
),
vec
(
x
,
y
+
0.5
,
NX
,
NY
));
aHexagon
.
pushTriangle
(
vec
(
x
-
2
,
y
,
NX
,
NY
),
vec
(
x
-
2
,
y
-
1
,
NX
,
NY
),
vec
(
x
,
y
+
0.5
,
NX
,
NY
));
}
}
glm
::
vec3
center
=
Slide
.
getVertices
()[
2
];
glm
::
vec3
aCenter
=
aHexagon
.
getVertices
()[
2
];
float
random
=
comphelper
::
rng
::
uniform_real_distribution
(
-
0.2
,
std
::
nextafter
(
0.2
,
DBL_MAX
));
float
fRandom
=
comphelper
::
rng
::
uniform_real_distribution
(
-
0.25
,
std
::
nextafter
(
0.2
,
DBL_MAX
));
Slide
.
Operations
.
push_back
(
makeSRotate
(
glm
::
vec3
(
0
,
1
,
0
),
center
,
180
,
true
,
fdiv
(
x
,
NX
)
+
random
,
1.0
));
double
fDelta
=
0.6
+
fRandom
;
double
fHorizontal
=
fdiv
(
x
,
NX
+
2
)
*
fDelta
;
aLeavingSlide
.
push_back
(
Slide
);
double
fStart
=
fHorizontal
;
double
fEnd
=
fHorizontal
+
(
1.0
-
fDelta
);
Slide
.
Operations
.
push_back
(
makeSRotate
(
glm
::
vec3
(
0
,
1
,
0
),
center
,
180
,
false
,
fdiv
(
x
,
NX
)
+
random
,
1.0
));
aHexagon
.
Operations
.
push_back
(
makeSRotate
(
glm
::
vec3
(
0
,
1
,
0
),
aCenter
,
180
,
true
,
fStart
,
fEnd
));
aEnteringSlide
.
push_back
(
Slide
);
aLeavingSlide
.
push_back
(
aHexagon
);
aHexagon
.
Operations
.
push_back
(
makeSRotate
(
glm
::
vec3
(
0
,
1
,
0
),
aCenter
,
180
,
false
,
fStart
,
fEnd
));
aEnteringSlide
.
push_back
(
aHexagon
);
}
}
}
}
...
...
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