| 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 #pragma once
6
7 #if !IMPELLER_ENABLE_3D
8 static_assert(false);
9 #endif
10
11 #include <memory>
12
13 #include "impeller/entity/contents/color_source_contents.h"
14
15 #include "impeller/geometry/matrix.h"
16 #include "impeller/geometry/rect.h"
17 #include "impeller/scene/node.h"
18
19 namespace impeller {
20
21 class SceneContents final : public ColorSourceContents {
22 public:
23 SceneContents();
24
25 ~SceneContents() override;
26
27 void SetCameraTransform(Matrix matrix);
28
29 void SetNode(std::shared_ptr<scene::Node> node);
30
31 // |Contents|
32 bool Render(const ContentContext& renderer,
33 const Entity& entity,
34 RenderPass& pass) const override;
35
36 private:
37 Matrix camera_transform_;
38 std::shared_ptr<scene::Node> node_;
39 };
40
41 } // namespace impeller
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:21
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:27
rect.h
impeller::ColorSourceContents
Definition: color_source_contents.h:33
impeller
Definition: aiks_context.cc:10
impeller::ContentContext
Definition: content_context.h:344
impeller::Matrix
A 4x4 matrix using column-major storage.
Definition: matrix.h:36