<commit_before>// Copyright (C) 2017 <NAME>
// This file is part of the Ouzel engine.

#pragma once

#include <memory>
#include "scene/Node.h"
#include "math/MathUtils.h"
#include "math/Rectangle.h"
#include "graphics/Texture.h"

namespace ouzel
{
    namespace scene
    {
        class Layer;

        class Camera: public Node
        {
            friend Layer;
        public:
            enum class Type
            {
                ORTHOGRAPHIC,
                PERSPECTIVE
            };

            enum class ScaleMode
            {
                NONE,
                EXACT_FIT,
                NO_BORDER,
                SHOW_ALL
            };

            Camera(Type aType = Type::ORTHOGRAPHIC, float aFov = TAU / 6.0f, float aNearPlane = 1.0f, float aFarPlane = 100.0f);

            void setType(Type newType) { type = newType; }
            Type getType() const { return type; }

            void setFOV(float newFOV) { fov = newFOV; }
            float getFOV() const { return fov; }

            void setNearPlane(float newNearPlane) { nearPlane = newNearPlane; }
            float getNearPlane() const { return nearPlane; }

            void setFarPlane(float newFarPlane) { farPlane = newFarPlane; }
            float getFarPlane() const { return farPlane; }

            Layer* getLayer() const { return layer; }
            void removeFromLayer();

            const Matrix4& getProjection() const { return projection; }
            void recalculateProjection();

            const Matrix4& getViewProjection() const;
            const Matrix4& getRenderViewProjection() const;
            const Matrix4& getInverseViewProjection() const;

            Vector3 convertNormalizedToWorld(const Vector2& position) const;
            Vector2 convertWorldToNormalized(const Vector3& position) const;

            bool checkVisibility(const Matrix4& boxTransform, const Box3& boundingBox) const;

            void setViewport(const Rectangle& newViewport);
            const Rectangle& getViewport() const { return viewport; }
            const Rectangle& getRenderViewport() const { return renderViewport; }

            void setScaleMode(ScaleMode newScaleMode);
            ScaleMode getScaleMode() const { return scaleMode; }<commit_msg>Remove the declaration of removeFromLayer from Camera<commit_after>// Copyright (C) 2017 <NAME>
// This file is part of the Ouzel engine.

#pragma once

#include <memory>
#include "scene/Node.h"
#include "math/MathUtils.h"
#include "math/Rectangle.h"
#include "graphics/Texture.h"

namespace ouzel
{
    namespace scene
    {
        class Layer;

        class Camera: public Node
        {
            friend Layer;
        public:
            enum class Type
            {
                ORTHOGRAPHIC,
                PERSPECTIVE
            };

            enum class ScaleMode
            {
                NONE,
                EXACT_FIT,
                NO_BORDER,
                SHOW_ALL
            };

            Camera(Type aType = Type::ORTHOGRAPHIC, float aFov = TAU / 6.0f, float aNearPlane = 1.0f, float aFarPlane = 100.0f);

            void setType(Type newType) { type = newType; }
            Type getType() const { return type; }

            void setFOV(float newFOV) { fov = newFOV; }
            float getFOV() const { return fov; }

            void setNearPlane(float newNearPlane) { nearPlane = newNearPlane; }
            float getNearPlane() const { return nearPlane; }

            void setFarPlane(float newFarPlane) { farPlane = newFarPlane; }
            float getFarPlane() const { return farPlane; }

            Layer* getLayer() const { return layer; }

            const Matrix4& getProjection() const { return projection; }
            void recalculateProjection();

            const Matrix4& getViewProjection() const;
            const Matrix4& getRenderViewProjection() const;
            const Matrix4& getInverseViewProjection() const;

            Vector3 convertNormalizedToWorld(const Vector2& position) const;
            Vector2 convertWorldToNormalized(const Vector3& position) const;

            bool checkVisibility(const Matrix4& boxTransform, const Box3& boundingBox) const;

            void setViewport(const Rectangle& newViewport);
            const Rectangle& getViewport() const { return viewport; }
            const Rectangle& getRenderViewport() const { return renderViewport; }

            void setScaleMode(ScaleMode newScaleMode);
            ScaleMode getScaleMode() const { return scaleMode; }
{'fraction_non_alphanumeric': 0.07928445229681978, 'fraction_numerical': 0.009717314487632508, 'mean_word_length': 2.0093023255813955, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6571796', 'n_tokens_mistral': 1310, 'n_tokens_neox': 1215, 'n_words': 348}