23 std::vector<math::Vector3R> positions,
24 std::vector<math::Vector3R> texCoords,
25 std::vector<math::Vector3R> normals);
33 std::vector<std::unique_ptr<Primitive>>& out_primitives)
const override;
42 std::vector<math::Vector3R> m_positions;
43 std::vector<math::Vector3R> m_texCoords;
44 std::vector<math::Vector3R> m_normals;
49 ClassType clazz(
"triangle-mesh");
50 clazz.docName(
"Triangle Mesh");
51 clazz.description(
"A cluster of triangles forming a singe shape in 3-D space.");
55 positions.description(
56 "Vertex coordinates of all triangles. Every three vector3s in the array represents "
57 "a single triangle. The vertices are expected to be given in counterclockwise order.");
59 clazz.addField(positions);
62 texCoords.description(
63 "Similar to positions, except that the array stores texture coordinates for each triangle.");
65 clazz.addField(texCoords);
69 "Similar to positions, except that the array stores normal vectors for each triangle.");
71 clazz.addField(normals);
Definition CookedGeometry.h:13
Information about the world being cooked.
Definition CookingContext.h:24
Definition GTriangle.h:13
Basic triangle mesh.
Definition GTriangleMesh.h:18
void genPrimitive(const PrimitiveBuildingMaterial &data, std::vector< std::unique_ptr< Primitive > > &out_primitives) const override
Definition GTriangleMesh.cpp:39
void storeCooked(CookedGeometry &out_geometry, const CookingContext &ctx) const override
Store data suitable for rendering into out_geometry.
Definition GTriangleMesh.cpp:28
std::vector< GTriangle > genTriangles() const
Definition GTriangleMesh.cpp:50
void addTriangle(const GTriangle &gTriangle)
Definition GTriangleMesh.cpp:116
GTriangleMesh()
Definition GTriangleMesh.cpp:12
PH_DEFINE_SDL_CLASS(TSdlOwnerClass< GTriangleMesh >)
Definition GTriangleMesh.h:47
std::shared_ptr< Geometry > genTransformed(const math::StaticAffineTransform &transform) const override
Definition GTriangleMesh.cpp:102
Definition PrimitiveBuildingMaterial.h:11
SDL binding type for a canonical SDL resource class.
Definition TSdlOwnerClass.h:23
Definition TSdlVector3Array.h:21
The root for all renderer implementations.
Definition EEngineProject.h:6