7#include <Common/assertion.h>
21 std::vector<std::unique_ptr<Primitive>>& out_primitives)
const override;
66 ClassType clazz(
"triangle");
67 clazz.docName(
"Triangle Geometry");
69 "A single triangle-shaped surface. Please note that using this type of triangle for "
70 "triangle mesh may induce significant overhead (in terms of memory usage). This is "
71 "meant for very simple shapes or debug usages.");
75 vA.description(
"The first vertex coordinates of the triangle.");
80 vB.
description(
"The second vertex coordinates of the triangle, in CCW.");
85 vC.
description(
"The third vertex coordinates of the triangle, in CCW.");
90 uvwA.
description(
"Texture coordinates of the first vertex.");
96 uvwB.
description(
"Texture coordinates of the first vertex.");
102 uvwC.
description(
"Texture coordinates of the first vertex.");
105 clazz.addField(uvwC);
108 nA.
description(
"Normal vector of the first vertex.");
114 nB.
description(
"Normal vector of the second vertex.");
120 nC.
description(
"Normal vector of the third vertex.");
Definition CookedGeometry.h:13
Information about the world being cooked.
Definition CookingContext.h:24
Definition GTriangle.h:13
void storeCooked(CookedGeometry &out_geometry, const CookingContext &ctx) const override
Store data suitable for rendering into out_geometry.
Definition GTriangle.cpp:21
const math::Vector3R & getUVWb() const
Definition GTriangle.h:166
const math::Vector3R & getNb() const
Definition GTriangle.h:151
const math::Vector3R & getVa() const
Definition GTriangle.h:131
GTriangle & setUVWc(const math::Vector3R &uvwC)
Definition GTriangle.h:211
std::shared_ptr< Geometry > genTransformed(const math::StaticAffineTransform &transform) const override
Definition GTriangle.cpp:76
GTriangle & setUVWb(const math::Vector3R &uvwB)
Definition GTriangle.h:204
GTriangle & setVertices(const math::Vector3R &vA, const math::Vector3R &vB, const math::Vector3R &vC)
Definition GTriangle.h:218
const math::Vector3R & getNa() const
Definition GTriangle.h:146
const math::Vector3R & getVc() const
Definition GTriangle.h:141
const math::Vector3R & getUVWc() const
Definition GTriangle.h:171
const math::Vector3R & getNc() const
Definition GTriangle.h:156
bool isDegenerate() const
Definition GTriangle.cpp:113
GTriangle & setUVWa(const math::Vector3R &uvwA)
Definition GTriangle.h:197
const math::Vector3R & getVb() const
Definition GTriangle.h:136
void genPrimitive(const PrimitiveBuildingMaterial &data, std::vector< std::unique_ptr< Primitive > > &out_primitives) const override
Definition GTriangle.cpp:45
PH_DEFINE_SDL_CLASS(TSdlOwnerClass< GTriangle >)
Definition GTriangle.h:64
GTriangle & setNa(const math::Vector3R &nA)
Definition GTriangle.h:176
GTriangle & setNb(const math::Vector3R &nB)
Definition GTriangle.h:183
GTriangle & setNc(const math::Vector3R &nC)
Definition GTriangle.h:190
const math::Vector3R & getUVWa() const
Definition GTriangle.h:161
Definition PrimitiveBuildingMaterial.h:11
SDL binding type for a canonical SDL resource class.
Definition TSdlOwnerClass.h:23
TSdlValue & description(std::string descriptionStr)
Definition TSdlValue.ipp:95
TSdlValue & optional()
Definition TSdlValue.ipp:103
TSdlValue & defaultTo(T defaultValue)
Definition TSdlValue.ipp:71
TSdlValue & required()
Definition TSdlValue.ipp:117
Definition TSdlVector3.h:19
The root for all renderer implementations.
Definition EEngineProject.h:6