Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
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
9static_assert(false);
10#endif
11
12#include <memory>
13
15
18#include "impeller/scene/node.h"
19
20namespace impeller {
21
22class SceneContents final : public ColorSourceContents {
23 public:
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_
Render passes encode render commands directed as one specific render target into an underlying comman...
Definition render_pass.h:33
void SetCameraTransform(Matrix matrix)
void SetNode(std::shared_ptr< scene::Node > node)
bool Render(const ContentContext &renderer, const Entity &entity, RenderPass &pass) const override
A 4x4 matrix using column-major storage.
Definition matrix.h:37