6#include <Common/primitive_type.h>
22 std::vector<std::unique_ptr<Primitive>>& out_primitives)
const override;
36 std::shared_ptr<GTriangleMesh> genTriangleMesh()
const;
39 static bool checkData(real width, real height);
44 ClassType clazz(
"rectangle");
45 clazz.docName(
"Rectangular Geometry");
46 clazz.description(
"A rectangular shape on xy-plane. It is centered around origin.");
50 width.description(
"Width of the rectangle.");
52 clazz.addField(width);
57 clazz.addField(height);
60 texCoordScale.
description(
"A scaling factor that scales the default-generated texture coordinates.");
63 clazz.addField(texCoordScale);
Definition CookedGeometry.h:13
Information about the world being cooked.
Definition CookingContext.h:24
Definition GRectangle.h:14
GRectangle & setTexCoordScale(const real scale)
Definition GRectangle.cpp:60
GRectangle & setWidth(real width)
Definition GRectangle.cpp:46
std::shared_ptr< Geometry > genTransformed(const math::StaticAffineTransform &transform) const override
Definition GRectangle.cpp:40
PH_DEFINE_SDL_CLASS(TSdlOwnerClass< GRectangle >)
Definition GRectangle.h:42
void storeCooked(CookedGeometry &out_geometry, const CookingContext &ctx) const override
Store data suitable for rendering into out_geometry.
Definition GRectangle.cpp:16
GRectangle & setHeight(real height)
Definition GRectangle.cpp:53
void genPrimitive(const PrimitiveBuildingMaterial &data, std::vector< std::unique_ptr< Primitive > > &out_primitives) const override
Definition GRectangle.cpp:28
Definition PrimitiveBuildingMaterial.h:11
SDL binding type for a canonical SDL resource class.
Definition TSdlOwnerClass.h:23
A field class that binds a floating point member variable.
Definition TSdlReal.h:21
TSdlValue & description(std::string descriptionStr)
Definition TSdlValue.ipp:95
TSdlValue & optional()
Definition TSdlValue.ipp:103
TSdlValue & defaultTo(T defaultValue)
Definition TSdlValue.ipp:71
The root for all renderer implementations.
Definition EEngineProject.h:6