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() const 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  std::shared_ptr<class AttributeDescriptor> description() const override;
58  maquina::Node node() const override;
59  void channel_plugs(std::unordered_set<Plug>& result) const override;
60  bool is_camera() const override;
61  bool is_locked() const override;
62  void set_locked(bool locked, const ModificationContext& mc) override;
63  bool is_orthographic(const QueryContext& qc=QueryContext::at_current_frame) const override;
64  float orthographic_width(const QueryContext& qc=QueryContext::at_current_frame) const override;
65  void set_orthographic_width(float width, const ModificationContext& mc) override;
66  float center_of_interest(const QueryContext& qc=QueryContext::at_current_frame) const override;
67  void set_center_of_interest(float coi, const ModificationContext& mc) override;
68  float near_clipping_plane(const QueryContext& qc=QueryContext::at_current_frame) const override;
69  void set_near_clipping_plane(float near_clipping_plane, const ModificationContext& mc) override;
70  float far_clipping_plane(const QueryContext& qc=QueryContext::at_current_frame) const override;
71  void set_far_clipping_plane(float far_clipping_plane, const ModificationContext& mc) override;
72  Imath::M44d projection_matrix(const QueryContext& qc=QueryContext::at_current_frame) const override;
73  float aspect_ratio() const override;
74  std::shared_ptr<NodeDelegate> aim() const override;
75  std::shared_ptr<NodeDelegate> up() const override;
76  std::shared_ptr<Observer> create_camera_observer(const std::function<void()>& func, bool in_interactive=true) override;
77 
79  std::shared_ptr<Impl> _node;
80 };
81 
82 }
Definition: ImathBox.h:71
Definition: ImathFrame.h:43
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:306
bool operator==(const C *str, const StringViewBase< C, STDS > &sv) noexcept
Definition: StringView.h:274
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:72
Definition: QueryContext.h:22
Base class of all Rumba nodes.
Definition: Node.h:37