Rumba C++ SDK
NodeDelegateRumba.h
Go to the documentation of this file.
1 /*
2 
3  *
4  ***
5  *****
6  ********************* Mercenaries Engineering SARL
7  ***************** Copyright (C) 2020
8  *************
9  ********* http://www.mercenaries-engineering.com
10  ***********
11  **** ****
12  ** **
13 
14 */
15 
16 #pragma once
17 
18 #include "Maquina/NodeDelegate.h"
19 
20 namespace maquina
21 {
22  class NodeDelegateRumba;
23 }
24 
25 template class MAQUINA_EXPORT std::weak_ptr< maquina::NodeDelegateRumba >;
26 template class MAQUINA_EXPORT std::enable_shared_from_this< maquina::NodeDelegateRumba >;
27 
28 namespace maquina
29 {
30 
31 // maquina::NodeDelegate implementation for Rumba nodes
33 {
34 public:
35  NodeDelegateRumba(const std::shared_ptr<Impl>& node) : _node(node)
36  {}
37 
39  StringView type_name() const override;
40 
42  std::shared_ptr<maquina::NodeDelegate> parent() override;
43  maquina::StringView name() const override;
44  std::string path() const override;
45  Imath::Box3d bounding_box() const override;
46  bool operator==(const maquina::NodeDelegate& o) const override;
47  bool operator!=(const maquina::NodeDelegate& o) const override;
48  int child_count() const override;
49  std::shared_ptr<ChildIteratorDelegate> _children_begin() override;
50  std::shared_ptr<ChildIteratorDelegate> _children_end() override;
51  std::shared_ptr<maquina::NodeDelegate> find(const maquina::StringView& path) override;
52  int attribute_count() const override;
53  std::shared_ptr<maquina::NodeDelegate::AttributeDelegate> attribute(const maquina::StringView& name) override;
54  std::shared_ptr<AttributeIteratorDelegate> _attributes_begin() override;
55  std::shared_ptr<AttributeIteratorDelegate> _attributes_end() override;
56  bool is_node() const override;
57  StringView ui_description() const override;
58  maquina::Node node() const override;
59  void channels(std::unordered_set<Plug>& result) const override;
60  bool is_camera() const;
61  bool is_orthographic(const QueryContext& qc=QueryContext::at_current_frame) const override;
62  float orthographic_width(const QueryContext& qc=QueryContext::at_current_frame) const override;
63  void set_orthographic_width(float width, const ModificationContext& mc) override;
64  float center_of_interest(const QueryContext& qc=QueryContext::at_current_frame) const override;
65  void set_center_of_interest(float coi, const ModificationContext& mc) override;
66  float focal_length(const QueryContext& qc=QueryContext::at_current_frame) const override;
67  void set_focal_length(float fl, const ModificationContext& mc) override;
68  float horizontal_aperture(const QueryContext& qc=QueryContext::at_current_frame) const override;
69  void set_horizontal_aperture(float horizontal_aperture, const ModificationContext& mc) override;
70  float vertical_aperture(const QueryContext& qc=QueryContext::at_current_frame) const override;
71  void set_vertical_aperture(float vertical_aperture, const ModificationContext& mc) override;
72  float near_clipping_plane(const QueryContext& qc=QueryContext::at_current_frame) const override;
73  void set_near_clipping_plane(float near_clipping_plane, const ModificationContext& mc) override;
74  float far_clipping_plane(const QueryContext& qc=QueryContext::at_current_frame) const override;
75  void set_far_clipping_plane(float far_clipping_plane, const ModificationContext& mc) override;
76 
78  std::shared_ptr<Impl> _node;
79 };
80 
81 }
Definition: ImathBox.h:71
This version of the SDK is unstable, i-e, it may change with no warning.
Definition: AddCurveAction.h:20
Definition: ModificationContext.h:21
Definition: NodeDelegateRumba.h:32
#define MAQUINA_EXPORT
Definition: Export.h:31
bool operator!=(const C *str, const StringViewBase< C, STDS > &sv) noexcept
Definition: StringView.h:305
bool operator==(const C *str, const StringViewBase< C, STDS > &sv) noexcept
Definition: StringView.h:273
NodeDelegateRumba(const std::shared_ptr< Impl > &node)
Definition: NodeDelegateRumba.h:35
This interface gives a high level access to the document structure.
Definition: NodeDelegate.h:68
Definition: QueryContext.h:21
Base class of all Rumba nodes.
Definition: Node.h:36