| Flutter Impeller |

scene_contents.h
Go to the documentation of this file.
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef FLUTTER_IMPELLER_ENTITY_CONTENTS_SCENE_CONTENTS_H_
6 #define FLUTTER_IMPELLER_ENTITY_CONTENTS_SCENE_CONTENTS_H_
7
8 #if !IMPELLER_ENABLE_3D
9 static_assert(false);
10 #endif
11
12 #include <memory>
13
14 #include "impeller/entity/contents/color_source_contents.h"
15
16 #include "impeller/geometry/matrix.h"
17 #include "impeller/geometry/rect.h"
18 #include "impeller/scene/node.h"
19
20 namespace impeller {
21
22 class SceneContents final : public ColorSourceContents {
23 public:
24 SceneContents();
25
26 ~SceneContents() override;
27
28 void SetCameraTransform(Matrix matrix);
29
30 void SetNode(std::shared_ptr<scene::Node> node);
31
32 // |Contents|
33 bool Render(const ContentContext& renderer,
34 const Entity& entity,
35 RenderPass& pass) const override;
36
37 private:
38 Matrix camera_transform_;
39 std::shared_ptr<scene::Node> node_;
40 };
41
42 } // namespace impeller
43
44 #endif // FLUTTER_IMPELLER_ENTITY_CONTENTS_SCENE_CONTENTS_H_
impeller::SceneContents::SetCameraTransform
void SetCameraTransform(Matrix matrix)
Definition: scene_contents.cc:21
impeller::SceneContents::SetNode
void SetNode(std::shared_ptr< scene::Node > node)
Definition: scene_contents.cc:25
impeller::SceneContents::SceneContents
SceneContents()
impeller::SceneContents
Definition: scene_contents.h:22
matrix.h
impeller::Entity
Definition: entity.h:21
impeller::SceneContents::~SceneContents
~SceneContents() override
color_source_contents.h
node.h
impeller::SceneContents::Render
bool Render(const ContentContext &renderer, const Entity &entity, RenderPass &pass) const override
Definition: scene_contents.cc:29
impeller::RenderPass
Render passes encode render commands directed as one specific render target into an underlying comman...
Definition: render_pass.h:33
rect.h
impeller::ColorSourceContents
Definition: color_source_contents.h:36
impeller
Definition: aiks_blur_unittests.cc:20
impeller::ContentContext
Definition: content_context.h:392
impeller::Matrix
A 4x4 matrix using column-major storage.
Definition: matrix.h:37