26 std::vector<std::unique_ptr<Primitive>>& out_primitives)
const override;
45 static bool checkData(
47 const real xLen,
const real yLen,
const real zLen);
49 static bool checkData(real xLen, real yLen, real zLen);
56 ClassType clazz(
"cuboid");
57 clazz.docName(
"Cuboid Geometry");
59 "A shape that is similar to cube but may contain rectangular faces. "
60 "It is centered around origin.");
64 size.description(
"x, y, z dimensions of the cuboid.");
65 size.defaultTo({1, 1, 1});
69 offset.
description(
"x, y, z offsets of the cuboid, origin is at the centroid.");
72 clazz.addField(offset);
76 "UV coordinates of the +x face (+y as upward), in (min-u, min-v, max-u, max-v).");
77 pxFaceUV.
defaultTo(makeNormalizedFaceUV());
79 clazz.addField(pxFaceUV);
83 "UV coordinates of the -x face (+y as upward), in (min-u, min-v, max-u, max-v).");
84 nxFaceUV.
defaultTo(makeNormalizedFaceUV());
86 clazz.addField(nxFaceUV);
90 "UV coordinates of the +y face (-z as upward), in (min-u, min-v, max-u, max-v).");
91 pyFaceUV.
defaultTo(makeNormalizedFaceUV());
93 clazz.addField(pyFaceUV);
97 "UV coordinates of the -y face (+z as upward), in (min-u, min-v, max-u, max-v).");
98 nyFaceUV.
defaultTo(makeNormalizedFaceUV());
100 clazz.addField(nyFaceUV);
104 "UV coordinates of the +z face (+y as upward), in (min-u, min-v, max-u, max-v).");
105 pzFaceUV.
defaultTo(makeNormalizedFaceUV());
107 clazz.addField(pzFaceUV);
111 "UV coordinates of the -z face (+y as upward), in (min-u, min-v, max-u, max-v).");
112 nzFaceUV.
defaultTo(makeNormalizedFaceUV());
114 clazz.addField(nzFaceUV);
Information about the world being cooked.
Definition CookingContext.h:24
void storeCooked(CookedGeometry &out_geometry, const CookingContext &ctx) const override
Store data suitable for rendering into out_geometry.
Definition GCuboid.cpp:20