Transform3Bvr rot = rotate(vector3(sin(aniAngle), cos(aniAngle),
div(sin(aniAngle), toBvr(2))), aniAngle);
tumbling in 3-D animation, performs a complete cycle in one "period": |
Transform3Bvr rot1 = compose(trans, rot);
open page animation, opens in one quarter of "period": |
Transform3Bvr rot2 =
compose(translate(neg(xUpperRight), toBvr(0), toBvr(0)),
compose(rotate(yVector3, neg(aniAngle)),
translate(xUpperRight, toBvr(0), toBvr(0))));
close page animation, closes in one quarter of "period": |
Transform3Bvr rot3 =
compose(translate(neg(xUpperRight), toBvr(0), toBvr(0)),
the -PI/2 is to pick up from where the page open animation left of |
compose(rotate(yVector3, add(div(neg(toBvr(Math.PI)), toBvr(2)), aniAngle)),
translate(xUpperRight, toBvr(0), toBvr(0))));
the cyclic animation of the geoimage:
- tumbling in 3-D in one "period"
- open page in quarter of "period"
- close page in quarter of "period" |
NumberBvr quarterPeriod = div(period, toBvr(4));
Transform3Bvr loopingTrans = Transform3Bvr.newUninitBvr();
loopingTrans.init(until(rot1, timer(period),
until(rot2, timer(quarterPeriod),
until(rot3, timer(quarterPeriod), loopingTrans))));
GeometryBvr loopingGeoImage = geoImage.transform(loopingTrans);
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.