merge
This commit is contained in:
commit
cfee60d71a
14 files changed
+975
-15
No files matched your search
@@ -179,6 +179,24 @@ namespace ZL {
|
||||
return result;
|
||||
}
|
||||
|
||||
VertexDataStruct CreatePolygonFloor(const std::vector<Eigen::Vector2f>& polygon, float yLevel, const Vector3f& color)
|
||||
{
|
||||
VertexDataStruct result;
|
||||
if (polygon.size() < 3) return result;
|
||||
|
||||
for (size_t i = 1; i + 1 < polygon.size(); ++i) {
|
||||
result.PositionData.push_back({ polygon[0].x(), yLevel, polygon[0].y() });
|
||||
result.PositionData.push_back({ polygon[i].x(), yLevel, polygon[i].y() });
|
||||
result.PositionData.push_back({ polygon[i + 1].x(), yLevel, polygon[i + 1].y() });
|
||||
|
||||
result.ColorData.push_back(color);
|
||||
result.ColorData.push_back(color);
|
||||
result.ColorData.push_back(color);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
VertexDataStruct CreateRectHorizontalSections2D(Vector2f center, Vector2f halfWidthHeight, float zLevel, size_t sectionCount)
|
||||
{
|
||||
Vector2f posFrom = center - halfWidthHeight;
|
||||
|
||||
@@ -87,6 +87,7 @@ namespace ZL {
|
||||
};
|
||||
|
||||
VertexDataStruct CreateRect2D(Vector2f center, Vector2f halfWidthHeight, float zLevel);
|
||||
VertexDataStruct CreatePolygonFloor(const std::vector<Eigen::Vector2f>& polygon, float yLevel, const Vector3f& color);
|
||||
VertexDataStruct CreateRectHorizontalSections2D(Vector2f center, Vector2f halfWidthHeight, float zLevel, size_t sectionCount);
|
||||
VertexDataStruct CreateCube3D(float scale);
|
||||
VertexDataStruct CreateCubemap(float scale = 1000.f);
|
||||
|
||||
Reference in new issue
Block a user