16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-21 18:19:19 +02:00

Merge remote-tracking branch 'manul-public/master' into manul-staging

This commit is contained in:
WLs50
2025-04-05 14:24:53 +02:00
45 changed files with 875 additions and 477 deletions

View File

@@ -66,28 +66,25 @@ public:
gfx::geometrybank_handle
Create_Bank() override { return m_geometry.register_bank(std::make_unique<null_geometrybank>()); }
// creates a new indexed geometry chunk of specified type from supplied data, in specified bank. returns: handle to the chunk or NULL
gfx::geometry_handle
Insert( gfx::index_array &Indices, gfx::vertex_array &Vertices, gfx::geometrybank_handle const &Geometry, int const Type ) override { return m_geometry.create_chunk( Indices, Vertices, Geometry, Type ); }
gfx::geometry_handle Insert(gfx::index_array &Indices, gfx::vertex_array &Vertices, gfx::userdata_array &Userdata, gfx::geometrybank_handle const &Geometry, int const Type) override {
return m_geometry.create_chunk( Indices, Vertices, Userdata, Geometry, Type ); }
// creates a new geometry chunk of specified type from supplied data, in specified bank. returns: handle to the chunk or NULL
gfx::geometry_handle
Insert( gfx::vertex_array &Vertices, gfx::geometrybank_handle const &Geometry, int const Type ) override {
gfx::geometry_handle Insert(gfx::vertex_array &Vertices, gfx::userdata_array &Userdata, gfx::geometrybank_handle const &Geometry, int const Type) override {
gfx::calculate_tangents(Vertices, gfx::index_array(), Type);
return m_geometry.create_chunk(Vertices, Geometry, Type);
return m_geometry.create_chunk(Vertices, Userdata, Geometry, Type);
}
// replaces data of specified chunk with the supplied vertex data, starting from specified offset
bool
Replace( gfx::vertex_array &Vertices, gfx::geometry_handle const &Geometry, int const Type, std::size_t const Offset = 0 ) override {
bool Replace(gfx::vertex_array &Vertices, gfx::userdata_array &Userdata, gfx::geometry_handle const &Geometry, int const Type, const std::size_t Offset = 0) override {
gfx::calculate_tangents(Vertices, gfx::index_array(), Type);
return m_geometry.replace(Vertices, Geometry, Offset);
return m_geometry.replace(Vertices, Userdata, Geometry, Offset);
}
// adds supplied vertex data at the end of specified chunk
bool
Append( gfx::vertex_array &Vertices, gfx::geometry_handle const &Geometry, int const Type ) override {
bool Append(gfx::vertex_array &Vertices, gfx::userdata_array &Userdata, gfx::geometry_handle const &Geometry, int const Type) override {
gfx::calculate_tangents(Vertices, gfx::index_array(), Type);
return m_geometry.append(Vertices, Geometry);
return m_geometry.append(Vertices, Userdata, Geometry);
}
// provides direct access to index data of specfied chunk
gfx::index_array const &
@@ -95,6 +92,9 @@ public:
// provides direct access to vertex data of specfied chunk
gfx::vertex_array const &
Vertices( gfx::geometry_handle const &Geometry ) const override { return m_geometry.vertices(Geometry); }
// provides direct access to vertex data of specfied chunk
gfx::userdata_array const &
UserData( gfx::geometry_handle const &Geometry ) const override { return m_geometry.userdata(Geometry); }
// material methods
material_handle
Fetch_Material( std::string const &Filename, bool const Loadnow = true ) override {