2024-04-11 10:38:56 -03:00
|
|
|
#ifndef XNA_GRAPHICS_VERTEXPOSITION_HPP
|
|
|
|
#define XNA_GRAPHICS_VERTEXPOSITION_HPP
|
|
|
|
|
2024-05-18 16:22:00 -03:00
|
|
|
#include "../common/numerics.hpp"
|
2024-04-11 10:38:56 -03:00
|
|
|
#include "../common/color.hpp"
|
|
|
|
#include "../default.hpp"
|
|
|
|
|
|
|
|
namespace xna {
|
|
|
|
struct VertexPositionColor {
|
|
|
|
Vector3 position{};
|
|
|
|
Color color{};
|
|
|
|
|
|
|
|
constexpr VertexPositionColor() = default;
|
2024-04-24 21:19:39 -03:00
|
|
|
constexpr VertexPositionColor(Vector3 const& position, Color const& color):
|
|
|
|
position(position), color(color){}
|
2024-04-11 10:38:56 -03:00
|
|
|
|
|
|
|
constexpr bool operator==(const VertexPositionColor& other) const {
|
|
|
|
return position == other.position && color == other.color;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
struct VertexPositionTexture {
|
|
|
|
Vector3 position{};
|
|
|
|
Vector2 textureCoordinate{};
|
|
|
|
|
|
|
|
constexpr VertexPositionTexture() = default;
|
|
|
|
|
|
|
|
constexpr bool operator==(const VertexPositionTexture& other) const {
|
|
|
|
return position == other.position
|
|
|
|
&& textureCoordinate == other.textureCoordinate;
|
|
|
|
}
|
2024-04-24 21:19:39 -03:00
|
|
|
|
2024-05-23 16:50:41 -03:00
|
|
|
constexpr VertexPositionTexture(const Vector3& position, const Vector2& textureCoordinate)
|
2024-04-24 21:19:39 -03:00
|
|
|
: position(position), textureCoordinate(textureCoordinate)
|
|
|
|
{
|
|
|
|
}
|
2024-04-11 10:38:56 -03:00
|
|
|
};
|
|
|
|
|
|
|
|
struct VertexPositionColorTexture {
|
|
|
|
Vector3 position{};
|
|
|
|
Vector2 textureCoodinate{};
|
|
|
|
Color color{};
|
|
|
|
|
|
|
|
constexpr VertexPositionColorTexture() = default;
|
|
|
|
|
|
|
|
constexpr bool operator==(const VertexPositionColorTexture& other) const {
|
|
|
|
return position == other.position
|
|
|
|
&& textureCoodinate == other.textureCoodinate
|
|
|
|
&& color == other.color;
|
|
|
|
}
|
2024-04-24 21:19:39 -03:00
|
|
|
|
2024-05-23 16:50:41 -03:00
|
|
|
constexpr VertexPositionColorTexture(const Vector3& position, const Vector2& textureCoodinate, const Color& color)
|
2024-04-24 21:19:39 -03:00
|
|
|
: position(position), textureCoodinate(textureCoodinate), color(color)
|
|
|
|
{
|
|
|
|
}
|
2024-04-11 10:38:56 -03:00
|
|
|
};
|
|
|
|
|
|
|
|
struct VertexPositionNormalTexture {
|
|
|
|
Vector3 position{};
|
|
|
|
Vector3 normal{};
|
|
|
|
Vector2 textureCoodinate{};
|
|
|
|
|
|
|
|
constexpr VertexPositionNormalTexture() = default;
|
|
|
|
|
|
|
|
bool operator==(const VertexPositionNormalTexture& other) const {
|
|
|
|
return position == other.position
|
|
|
|
&& normal == other.normal
|
|
|
|
&& textureCoodinate == other.textureCoodinate;
|
|
|
|
}
|
2024-04-24 21:19:39 -03:00
|
|
|
|
2024-05-23 16:50:41 -03:00
|
|
|
constexpr VertexPositionNormalTexture(const Vector3& position, const Vector3& normal, const Vector2& textureCoodinate)
|
2024-04-24 21:19:39 -03:00
|
|
|
: position(position), normal(normal), textureCoodinate(textureCoodinate)
|
|
|
|
{
|
|
|
|
}
|
2024-04-11 10:38:56 -03:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|