interface/mesh: namespace interface -> namespace interface::mesh
This commit is contained in:
parent
b24190810f
commit
1d8c7c8e3f
@ -532,7 +532,7 @@ struct Module: public interface::Module, public voxelworld::Interface
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Update collision shape
|
// Update collision shape
|
||||||
interface::set_voxel_physics_boxes(n, context, *volume,
|
interface::mesh::set_voxel_physics_boxes(n, context, *volume,
|
||||||
m_voxel_reg.get());
|
m_voxel_reg.get());
|
||||||
}
|
}
|
||||||
m_nodes_needing_physics_update.clear();
|
m_nodes_needing_physics_update.clear();
|
||||||
|
@ -146,7 +146,7 @@ struct Module: public interface::Module
|
|||||||
|
|
||||||
// Load the same model in here and give it to the physics
|
// Load the same model in here and give it to the physics
|
||||||
// subsystem so that it can be collided to
|
// subsystem so that it can be collided to
|
||||||
SharedPtr<Model> model(interface::
|
SharedPtr<Model> model(interface::mesh::
|
||||||
create_8bit_voxel_physics_model(context, w, h, d, data,
|
create_8bit_voxel_physics_model(context, w, h, d, data,
|
||||||
voxel_reg));
|
voxel_reg));
|
||||||
|
|
||||||
|
@ -36,6 +36,7 @@ using interface::VoxelInstance;
|
|||||||
using namespace Urho3D;
|
using namespace Urho3D;
|
||||||
|
|
||||||
namespace interface {
|
namespace interface {
|
||||||
|
namespace mesh {
|
||||||
|
|
||||||
// Create a model from a string; eg. (2, 2, 2, "11101111")
|
// Create a model from a string; eg. (2, 2, 2, "11101111")
|
||||||
Model* create_simple_voxel_model(Context *context,
|
Model* create_simple_voxel_model(Context *context,
|
||||||
@ -942,5 +943,6 @@ z_plane_does_not_fit:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} // namespace mesh
|
||||||
} // namespace interface
|
} // namespace interface
|
||||||
// vim: set noet ts=4 sw=4:
|
// vim: set noet ts=4 sw=4:
|
||||||
|
@ -14,6 +14,8 @@ namespace Urho3D
|
|||||||
}
|
}
|
||||||
|
|
||||||
namespace interface
|
namespace interface
|
||||||
|
{
|
||||||
|
namespace mesh
|
||||||
{
|
{
|
||||||
using namespace Urho3D;
|
using namespace Urho3D;
|
||||||
namespace pv = PolyVox;
|
namespace pv = PolyVox;
|
||||||
@ -58,4 +60,5 @@ namespace interface
|
|||||||
pv::RawVolume<VoxelInstance> &volume,
|
pv::RawVolume<VoxelInstance> &volume,
|
||||||
VoxelRegistry *voxel_reg);
|
VoxelRegistry *voxel_reg);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// vim: set noet ts=4 sw=4:
|
// vim: set noet ts=4 sw=4:
|
||||||
|
@ -73,7 +73,7 @@ static int l_set_simple_voxel_model(lua_State *L)
|
|||||||
Context *context = buildat_app->get_scene()->GetContext();
|
Context *context = buildat_app->get_scene()->GetContext();
|
||||||
|
|
||||||
SharedPtr<Model> fromScratchModel(
|
SharedPtr<Model> fromScratchModel(
|
||||||
interface::create_simple_voxel_model(context, w, h, d, data));
|
interface::mesh::create_simple_voxel_model(context, w, h, d, data));
|
||||||
|
|
||||||
StaticModel *object = node->GetOrCreateComponent<StaticModel>();
|
StaticModel *object = node->GetOrCreateComponent<StaticModel>();
|
||||||
object->SetModel(fromScratchModel);
|
object->SetModel(fromScratchModel);
|
||||||
@ -116,7 +116,7 @@ static int l_set_8bit_voxel_geometry(lua_State *L)
|
|||||||
|
|
||||||
CustomGeometry *cg = node->GetOrCreateComponent<CustomGeometry>();
|
CustomGeometry *cg = node->GetOrCreateComponent<CustomGeometry>();
|
||||||
|
|
||||||
interface::set_8bit_voxel_geometry(cg, context, w, h, d, data,
|
interface::mesh::set_8bit_voxel_geometry(cg, context, w, h, d, data,
|
||||||
voxel_reg, atlas_reg);
|
voxel_reg, atlas_reg);
|
||||||
|
|
||||||
// Maybe appropriate
|
// Maybe appropriate
|
||||||
@ -156,7 +156,7 @@ static int l_set_voxel_geometry(lua_State *L)
|
|||||||
|
|
||||||
up_<pv::RawVolume<VoxelInstance>> volume = interface::deserialize_volume(data);
|
up_<pv::RawVolume<VoxelInstance>> volume = interface::deserialize_volume(data);
|
||||||
|
|
||||||
interface::set_voxel_geometry(cg, context, *volume, voxel_reg, atlas_reg);
|
interface::mesh::set_voxel_geometry(cg, context, *volume, voxel_reg, atlas_reg);
|
||||||
|
|
||||||
// Maybe appropriate
|
// Maybe appropriate
|
||||||
cg->SetOccluder(true);
|
cg->SetOccluder(true);
|
||||||
@ -197,7 +197,7 @@ static int l_set_voxel_lod_geometry(lua_State *L)
|
|||||||
|
|
||||||
up_<pv::RawVolume<VoxelInstance>> volume = interface::deserialize_volume(data);
|
up_<pv::RawVolume<VoxelInstance>> volume = interface::deserialize_volume(data);
|
||||||
|
|
||||||
interface::set_voxel_lod_geometry(lod, cg, context, *volume,
|
interface::mesh::set_voxel_lod_geometry(lod, cg, context, *volume,
|
||||||
voxel_reg, atlas_reg);
|
voxel_reg, atlas_reg);
|
||||||
|
|
||||||
// Maybe appropriate
|
// Maybe appropriate
|
||||||
@ -255,7 +255,7 @@ static int l_set_voxel_physics_boxes(lua_State *L)
|
|||||||
up_<pv::RawVolume<VoxelInstance>> volume = interface::deserialize_volume(data);
|
up_<pv::RawVolume<VoxelInstance>> volume = interface::deserialize_volume(data);
|
||||||
|
|
||||||
node->GetOrCreateComponent<RigidBody>(LOCAL);
|
node->GetOrCreateComponent<RigidBody>(LOCAL);
|
||||||
interface::set_voxel_physics_boxes(node, context, *volume, voxel_reg);
|
interface::mesh::set_voxel_physics_boxes(node, context, *volume, voxel_reg);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user