fix double definition of cast operator

This commit is contained in:
arthur.jamet
2021-05-23 19:22:49 +02:00
parent 7bab6e8b55
commit 77534276ef
6 changed files with 13 additions and 14 deletions

Before

Width:  |  Height:  |  Size: 295 KiB

After

Width:  |  Height:  |  Size: 295 KiB

-2
View File
@@ -65,8 +65,6 @@ namespace RAY::Camera {
//! @brief Update camera position for selected mode
void update(void);
//! @brief get camera struct
operator ::Camera3D() const;
private:
::Camera3D _camera;
Mode _mode;
+4 -3
View File
@@ -59,14 +59,15 @@ namespace RAY {
//! @param texture the texture to apply
bool setTextureToMaterial(MaterialType materialType, const RAY::Texture &texture);
//! @brief A RAY Model is cast-able in libray's model
operator ::Model() const;
//! @return The number of bones in the model
int getBoneCount() const;
private:
//! @brief Raw data from raylib
::Model _model;
INTERNAL:
//! @brief A RAY Model is cast-able in libray's model
operator ::Model() const;
};
};
+6 -6
View File
@@ -25,12 +25,6 @@ namespace RAY {
//! @brief A model animation is assignable
ModelAnimation &operator=(const ModelAnimation &) = default;
//! @brief Castin Object to raw model animation pointer
operator ::ModelAnimation *();
//! @brief Castin Object to raw model animation pointer
operator ::ModelAnimation() const;
//! @brief Returns the current frame the animation is at
size_t getFrameCounter() const;
@@ -49,7 +43,13 @@ namespace RAY {
private:
::ModelAnimation &_animation;
INTERNAL:
size_t _frameCounter;
//! @brief Castin Object to raw model animation pointer
operator ::ModelAnimation *();
//! @brief Castin Object to raw model animation pointer
operator ::ModelAnimation() const;
};
}
+3 -3
View File
@@ -30,9 +30,9 @@ int main()
RAY::Vector3(0.0f, 1.0f, 0.0f),
45.0f, CAMERA_PERSPECTIVE
);
RAY::Model model("ressources/guy.iqm");
RAY::Texture texture("ressources/guytex.png");
RAY::ModelAnimations animations("ressources/guy.iqm");
RAY::Model model("assets/guy.iqm");
RAY::Texture texture("assets/guytex.png");
RAY::ModelAnimations animations("assets/guy.iqm");
RAY::Drawables::Drawables3D::Grid grid(10, 1.0f);
RAY::Drawables::Drawables2D::Text instructionText("PRESS SPACE to PLAY MODEL ANIMATION", 10, {10, 20} , MAROON);
model.setTextureToMaterial(MAP_DIFFUSE, texture);