ProtoTracer  1.0
Real-time 3D rendering and animation engine
Loading...
Searching...
No Matches
ITriangleGroup.h
Go to the documentation of this file.
1/**
2 * @file ITriangleGroup.h
3 * @brief Defines the ITriangleGroup interface for managing a collection of mutable 3D triangles.
4 *
5 * This interface provides methods to access and manipulate triangle data, including vertices,
6 * UV coordinates, and indices. It allows for dynamic modifications and updates to the triangle group.
7 *
8 * @date 22/12/2024
9 * @version 1.0
10 * @author Coela Can't
11 */
12
13#pragma once
14
15#include "Triangle3D.h"
16#include "IndexGroup.h"
18
19/**
20 * @class ITriangleGroup
21 * @brief Interface for managing a dynamic group of 3D triangles and associated data.
22 */
24public:
25 /**
26 * @brief Retrieves the index group for the triangle group.
27 * @return A pointer to the IndexGroup array.
28 */
29 virtual const IndexGroup* GetIndexGroup() = 0;
30
31 /**
32 * @brief Retrieves the total number of triangles in the group.
33 * @return The number of triangles.
34 */
35 virtual int GetTriangleCount() = 0;
36
37 /**
38 * @brief Retrieves the array of mutable vertices in the triangle group.
39 * @return A pointer to the array of Vector3D vertices.
40 */
41 virtual Vector3D* GetVertices() = 0;
42
43 /**
44 * @brief Retrieves the total number of vertices in the group.
45 * @return The number of vertices.
46 */
47 virtual int GetVertexCount() = 0;
48
49 /**
50 * @brief Retrieves the array of Triangle3D objects representing the triangles.
51 * @return A pointer to the array of Triangle3D objects.
52 */
53 virtual Triangle3D* GetTriangles() = 0;
54
55 /**
56 * @brief Retrieves the array of UV vertices in the triangle group.
57 * @return A pointer to the array of Vector2D UV vertices.
58 */
59 virtual const Vector2D* GetUVVertices() = 0;
60
61 /**
62 * @brief Retrieves the index group for the UV vertices.
63 * @return A pointer to the IndexGroup array for UV vertices.
64 */
65 virtual const IndexGroup* GetUVIndexGroup() = 0;
66};
Defines the IStaticTriangleGroup interface for managing a collection of static 3D triangles.
Defines the IndexGroup class for handling a group of three unsigned integer indices.
Defines the Triangle3D class for representing and manipulating 3D triangles.
Interface for managing a dynamic group of 3D triangles and associated data.
virtual Vector3D * GetVertices()=0
Retrieves the array of mutable vertices in the triangle group.
virtual int GetVertexCount()=0
Retrieves the total number of vertices in the group.
virtual const IndexGroup * GetIndexGroup()=0
Retrieves the index group for the triangle group.
virtual Triangle3D * GetTriangles()=0
Retrieves the array of Triangle3D objects representing the triangles.
virtual const Vector2D * GetUVVertices()=0
Retrieves the array of UV vertices in the triangle group.
virtual int GetTriangleCount()=0
Retrieves the total number of triangles in the group.
virtual const IndexGroup * GetUVIndexGroup()=0
Retrieves the index group for the UV vertices.
Represents a group of three unsigned integer indices.
Definition IndexGroup.h:22
Represents a 3D triangle with support for UV mapping and ray intersection testing.
Definition Triangle3D.h:22
Represents a 2D vector (X, Y) and provides methods for vector arithmetic.
Definition Vector2D.h:27
Represents a 3D vector (X, Y, Z) and provides methods for vector arithmetic.
Definition Vector3D.h:26