Flutter Engine
The Flutter Engine
third_party
skia
modules
skottie
src
Camera.h
Go to the documentation of this file.
1
/*
2
* Copyright 2020 Google Inc.
3
*
4
* Use of this source code is governed by a BSD-style license that can be
5
* found in the LICENSE file.
6
*/
7
8
#ifndef SkottieCamera_DEFINED
9
#define SkottieCamera_DEFINED
10
11
#include "
include/core/SkM44.h
"
12
#include "
include/core/SkRefCnt.h
"
13
#include "
include/core/SkSize.h
"
14
#include "
modules/skottie/src/SkottieValue.h
"
15
#include "
modules/skottie/src/Transform.h
"
16
17
namespace
skjson
{
18
class
ObjectValue;
19
}
20
namespace
sksg
{
21
class
Transform
;
22
}
23
24
namespace
skottie
{
25
namespace
internal {
26
class
AnimationBuilder;
27
28
class
CameraAdaper
final :
public
TransformAdapter3D
{
29
public
:
30
CameraAdaper
(
const
skjson::ObjectValue
& jlayer,
31
const
skjson::ObjectValue
& jtransform,
32
const
AnimationBuilder
& abuilder,
33
const
SkSize
& viewport_size);
34
~CameraAdaper
()
override
;
35
36
// Used in the absence of an explicit camera layer.
37
static
sk_sp<sksg::Transform>
DefaultCameraTransform
(
const
SkSize
& viewport_size);
38
39
SkM44
totalMatrix
()
const override
;
40
41
private
:
42
enum class
CameraType {
43
kOneNode,
// implicitly facing forward (decreasing z), does not auto-orient
44
kTwoNode,
// explicitly facing a POI (the anchor point), auto-orients
45
};
46
47
SkV3
poi(
const
SkV3
&
pos
)
const
;
48
49
const
SkSize
fViewportSize;
50
const
CameraType fType;
51
52
ScalarValue
fZoom = 0;
53
54
using
INHERITED =
TransformAdapter3D
;
55
};
56
57
}
// namespace internal
58
}
// namespace skottie
59
60
#endif
// SkottieCamera_DEFINED
pos
SkPoint pos
Definition:
ImageShaderTest.cpp:27
SkM44.h
SkRefCnt.h
SkSize.h
SkottieValue.h
Transform.h
SkM44
Definition:
SkM44.h:150
sk_sp< sksg::Transform >
skjson::ObjectValue
Definition:
SkJSON.h:337
skottie::internal::AnimationBuilder
Definition:
SkottiePriv.h:66
skottie::internal::CameraAdaper
Definition:
Camera.h:28
skottie::internal::CameraAdaper::CameraAdaper
CameraAdaper(const skjson::ObjectValue &jlayer, const skjson::ObjectValue &jtransform, const AnimationBuilder &abuilder, const SkSize &viewport_size)
Definition:
Camera.cpp:60
skottie::internal::CameraAdaper::totalMatrix
SkM44 totalMatrix() const override
Definition:
Camera.cpp:76
skottie::internal::CameraAdaper::~CameraAdaper
~CameraAdaper() override
skottie::internal::CameraAdaper::DefaultCameraTransform
static sk_sp< sksg::Transform > DefaultCameraTransform(const SkSize &viewport_size)
Definition:
Camera.cpp:110
skottie::internal::TransformAdapter3D
Definition:
Transform.h:78
skottie::internal::TransformAdapter3D::TransformAdapter3D
TransformAdapter3D(const skjson::ObjectValue &, const AnimationBuilder &)
Definition:
Transform.cpp:148
skjson
Definition:
Animator.h:17
skottie
Definition:
ExternalLayer.h:16
skottie::ScalarValue
SkScalar ScalarValue
Definition:
SkottieValue.h:22
sksg
Definition:
Skottie.h:32
sktext::gpu::Transform
skgpu::graphite::Transform Transform
Definition:
GraphiteVertexFiller.cpp:52
SkSize
Definition:
SkSize.h:52
SkV3
Definition:
SkM44.h:56
Generated on Sun Jun 23 2024 21:56:05 for Flutter Engine by
1.9.4