Added surface selector, made faces reflect G3D faces

This commit is contained in:
Vulpovile
2021-03-15 10:12:45 -07:00
parent 0e3968acd4
commit bfcb3f83ab
10 changed files with 102 additions and 19 deletions

View File

@@ -18,12 +18,12 @@ PartInstance::PartInstance(void)
color = Color3::gray();
velocity = Vector3(0,0,0);
rotVelocity = Vector3(0,0,0);
top = Enum::SurfaceType::Bumps;
top = Enum::SurfaceType::Smooth;
front = Enum::SurfaceType::Bumps;
right = Enum::SurfaceType::Bumps;
back = Enum::SurfaceType::Bumps;
left = Enum::SurfaceType::Bumps;
bottom = Enum::SurfaceType::Bumps;
right = Enum::SurfaceType::Smooth;
back = Enum::SurfaceType::Smooth;
left = Enum::SurfaceType::Smooth;
bottom = Enum::SurfaceType::Smooth;
shape = Enum::Shape::Block;
}
@@ -82,6 +82,31 @@ void PartInstance::setChanged()
changed = true;
}
void PartInstance::setSurface(int face, Enum::SurfaceType::Value surface)
{
switch(face)
{
case TOP:
top = surface;
break;
case BOTTOM:
bottom = surface;
break;
case LEFT:
left = surface;
break;
case RIGHT:
right = surface;
break;
case FRONT:
front = surface;
break;
default:
back = surface;
}
changed = true;
}
void PartInstance::setParent(Instance* prnt)
{
Instance * cparent = getParent();