#ifndef CAMERA_NODE_H
#define CAMERA_NODE_H

#include "scene.h"
#include "scene_node_entity.h"
#include "transformable.h"
#include "utils/drop.h"
#include "raylib.h"

typedef struct CameraNode {
    SceneNode *node;
    Transformable transform;
} CameraNode;

//! Instantiate new camera node
extern SceneNode *CreateCameraNode();
//! Free all memory related to the camera node, invalidates all pointers to 'self'
extern void DestroyCameraNode(CameraNode *self);
//! Enter tree SceneNodeEntity callback for camera nodes
extern void CameraNodeEnterTree(CameraNode *self);
//! Exit tree SceneNodeEntity callback for camera nodes
extern void CameraNodeExitTree(CameraNode *self);
//! Constructs a camera object from the current location and rotation of this node
extern Camera3D CameraNodeGetCamera(CameraNode *self);

DECL_REFLECT(CameraNode)
decl_typeclass_impl(Drop, CameraNode)
decl_typeclass_impl(SceneNodeEntity, CameraNode)

#endif // !CAMERA_NODE_H
