y값 조절
더보기
void TerrainEditor::ResizeHeight()
{
vector<VertexType>& vertices = mesh->GetVertices();
if (KEY_PRESS('Z'))
{
for (int z = -editRange; z <= editRange; z++)
{
for (int x = -editRange; x <= editRange; x++)
{
vertices[(int)pickingPos.x + x + (width - (int)pickingPos.z + z - 1) * width].pos.y += editPower * DELTA;
}
}
}
else if (KEY_PRESS('X'))
{
for (int z = -editRange; z <= editRange; z++)
{
for (int x = -editRange; x <= editRange; x++)
{
vertices[(int)pickingPos.x + x + (width - (int)pickingPos.z + z - 1) * width].pos.y -= editPower * DELTA;
}
}
}
mesh->UpdateVertex();
}
'DirectX 3D > DirectX 3D 정리 및 영상' 카테고리의 다른 글
230302 Terrain 에디터 편집하기 (0) | 2023.03.02 |
---|---|
230226 자동차 만들기, Height에 따른 자동차 y값 보간하기, 실린더 출력하기 (0) | 2023.02.26 |
230222 Grid, Terrain 에디터 만들기 (0) | 2023.02.22 |
230220 DX11 3D 큐브 출력하기 (0) | 2023.02.20 |