generated from Kaweees/KiwiCPP
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
100 additions
and
23 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#pragma once | ||
#include "../include/color.hpp" | ||
#include "../include/texture.hpp" | ||
|
||
namespace graphics { | ||
// Represents a two-dimensional texture | ||
class Face { | ||
public: | ||
// Constructor to initialize memory | ||
Face(int v1, int v2, int v3, const Texture2D& t1, const Texture2D& t2, | ||
const Texture2D& t3, const Color& color) | ||
: v1(v1), v2(v2), v3(v3), t1(t1), t2(t2), t3(t3), color(color) {} | ||
|
||
// Destructor to free the memory allocated | ||
~Face() = default; | ||
|
||
// The first vertex index | ||
int v1; | ||
// The second vertex index | ||
int v2; | ||
// The third vertex index | ||
int v3; | ||
// The first texture | ||
Texture2D t1; | ||
// The second texture | ||
Texture2D t2; | ||
// The third texture | ||
Texture2D t3; | ||
// The color of the face | ||
Color color; | ||
}; | ||
} // namespace graphics |
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,3 @@ | ||
#include "../include/face.hpp" | ||
|
||
namespace graphics {} // namespace graphics |
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