Oceax
09-09-2013 21:21:28
I'm trying to create a river where the width of the river should be different for each point along the path.
How could i achive this? Multishape?
How could i achive this? Multishape?
Oceax
09-09-2013 21:21:28
Oceax
09-09-2013 22:41:09
scaleSpline.setNumSeg(2);
spline.setNumSeg(2);
for (int i = 0; i < worldRiver.segmentList.size(); i++)
{
int addPoint = i % 4;
if (addPoint == 0)
{
spline.addPoint(worldRiver.segmentList.start.x, pSurfaceManager->getHeightAt(worldRiver.segmentList.start.x, worldRiver.segmentList.start.y), worldRiver.segmentList.start.y);
scaleSpline.addPoint(worldRiver.segmentListWidth,1);
}
}
scaleTrack = scaleSpline.realizeShape().convertToTrack(Procedural::Track::AM_POINT);
Procedural::Extruder().setExtrusionPath(&path).setShapeToExtrude(&shape).setScaleTrack(&scaleTrack).setUTile(0.01f).setVTile(0.01f).realizeMesh("extrudedMesh");
mikachu
27-09-2013 23:23:29
scaleSpline.addPoint(worldRiver.segmentListWidth,1);
AM_POINT : the key represents the index of a point in the main curve.