-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
merge(gui): add right pannel objects and config file load in menu
core(gui): add right pannel objects and config file load in menu
- Loading branch information
Showing
20 changed files
with
524 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* | ||
** EPITECH PROJECT, 2024 | ||
** DFMY-Raytracer [WSL: Ubuntu-22.04] | ||
** File description: | ||
** AObject | ||
*/ | ||
|
||
#include "AObject.hpp" | ||
|
||
using namespace Raytracer::Common; | ||
|
||
AObject::AObject( | ||
const std::string &name, | ||
Common::Graphics::Material::Ptr material, | ||
const Common::Math::Vector3D &rotation, | ||
const Common::Math::Point3D &position) : | ||
_name(name), | ||
_material(material), | ||
_rotation(rotation), | ||
_position(position) | ||
{ | ||
} | ||
|
||
Graphics::Material::Ptr AObject::getMaterial() | ||
{ | ||
return _material; | ||
} | ||
|
||
std::string &AObject::getName() noexcept | ||
{ | ||
return _name; | ||
} | ||
|
||
Math::Point3D &AObject::getPosition() noexcept | ||
{ | ||
return _position; | ||
} | ||
|
||
Math::Vector3D &AObject::getRotation() noexcept | ||
{ | ||
return _rotation; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
/* | ||
** EPITECH PROJECT, 2024 | ||
** DFMY-Raytracer [WSL: Ubuntu-22.04] | ||
** File description: | ||
** AObject | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include "types/math/Ray.hpp" | ||
#include "types/math/HitInfo.hpp" | ||
#include "types/graphics/Material.hpp" | ||
#include "interfaces/IObject.hpp" | ||
|
||
namespace Raytracer::Common { | ||
class AObject : public IObject { | ||
public: | ||
/** | ||
* @brief Construct a new Cube object | ||
* @param name Name of the cube | ||
* @param material Material of the cube | ||
* @param rotation Rotation of the cube | ||
* @param position Position of the cube | ||
*/ | ||
AObject( | ||
const std::string &name, | ||
Graphics::Material::Ptr material, | ||
const Math::Vector3D &rotation, | ||
const Math::Point3D &position); | ||
|
||
/** | ||
* @brief Destroy the Cube object | ||
*/ | ||
~AObject() override = default; | ||
|
||
|
||
/// @brief Get the material associated to an object | ||
Graphics::Material::Ptr getMaterial() override; | ||
|
||
/// @brief Get the name of the object | ||
std::string &getName() noexcept override; | ||
|
||
/// @brief Get the position of the object | ||
Math::Point3D &getPosition() noexcept override; | ||
|
||
/// @brief Get the rotation of the object | ||
Math::Vector3D &getRotation() noexcept override; | ||
protected: | ||
/// @brief Name of the cube | ||
std::string _name; | ||
|
||
/// @brief Material of the cube | ||
Graphics::Material::Ptr _material; | ||
|
||
/// @brief Position of the cube | ||
Math::Point3D _position; | ||
|
||
/// @brief Rotation of the cube | ||
Math::Vector3D _rotation; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
target_sources(raytracer_common PRIVATE | ||
AObject.hpp | ||
AObject.cpp | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.