Rumba C++ SDK
Camera.h
Go to the documentation of this file.
1 /*
2 
3  *
4  ***
5  *****
6  ********************* Mercenaries Engineering SARL
7  ***************** Copyright (C) 2024
8  *************
9  ********* http://www.mercenaries-engineering.com
10  ***********
11  **** ****
12  ** **
13 
14 */
15 #pragma once
16 
17 #include "NodePlugin.h"
18 #include "Shape.h"
19 
20 #include <optional>
21 
22 namespace maquina
23 {
24 
26 // Rename CameraNode
28 {
29 public:
30  Camera(Node* node);
31 
33  Node camera_transform_node() const;
34 
36 
40  void set_aim(
41  const Node& aim, // The SceneGraphNode the camera must look at
42  bool undo_stack
43  );
44 
46 
50  void set_aim(
51  const Node& aim, // The SceneGraphNode the camera must look at
52  const Node& up, // The SceneGraphNode the camera's up vector must point
53  bool undo_stack
54  );
55 
57  void remove_aim(bool undo_stack);
58 
60  std::optional<Node> aim() const;
61 
63  std::optional<Node> up() const;
64 
65 };
66 
68 
69 // TODO rename Camera
71 {
72 public:
73 
74  CameraShape();
75  CameraShape(const Value& v);
76 
78  bool is_orthographic() const;
79 
81  void set_is_orthographic(bool );
82 
84  float orthographic_width() const;
85 
87  void set_orthographic_width(float width);
88 
90  float near_clipping_plane() const;
91 
93  void set_near_clipping_plane(float near_clipping_plane);
94 
96  float far_clipping_plane() const;
97 
99  void set_far_clipping_plane(float far_clipping_plane);
100 
102  float focal_length() const;
103 
105  void set_focal_length(float);
106 
108  float horizontal_aperture() const;
109 
111  void set_horizontal_aperture(float);
112 
114  float vertical_aperture() const;
115 
117  void set_vertical_aperture(float);
118 
121 
123  CameraShape(std::shared_ptr<Impl> impl) { _impl=impl; }
124 };
125 
126 }
Derive this class to create your own Node type.
Definition: NodePlugin.h:28
The camera node.
Definition: Camera.h:27
A value with geometrical attributes. Base of all shape values.
Definition: Shape.h:25
This version of the SDK is unstable, i-e, it may change with no warning.
Definition: AddCurveAction.h:20
#define MAQUINA_EXPORT
Definition: Export.h:31
static const CameraShape default_value
The default value.
Definition: Camera.h:120
The camera shape.
Definition: Camera.h:70
Base class of all Rumba nodes.
Definition: Node.h:37
Base class of all Rumba values.
Definition: Value.h:34