add cubic interpolation type
This commit is contained in:
@@ -229,8 +229,10 @@ static int l_resize(lua::State* L) {
|
||||
uint height = touinteger(L, 3);
|
||||
auto interpName = tostring(L, 4);
|
||||
auto interpolation = InterpolationType::NEAREST;
|
||||
if (!std::strcmp(interpName, "linear")) {
|
||||
if (std::strcmp(interpName, "linear") == 0) {
|
||||
interpolation = InterpolationType::LINEAR;
|
||||
} else if (std::strcmp(interpName, "cubic") == 0) {
|
||||
interpolation = InterpolationType::CUBIC;
|
||||
}
|
||||
heightmap->getHeightmap()->resize(width, height, interpolation);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user