Skip to content

Commit 6ec0e96

Browse files
committed
wip
1 parent 6882d5b commit 6ec0e96

64 files changed

Lines changed: 784 additions & 237 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

include/geode/basic/bitsery_archive.hpp

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ namespace geode
4848
using Deserializer =
4949
bitsery::Deserializer< bitsery::InputStreamAdapter, TContext >;
5050

51+
enum struct BITSERY
52+
{
53+
constructor
54+
};
55+
5156
/*!
5257
* Register all the information needed by Bitsery to serialize the objects
5358
* in the basic library.
@@ -87,8 +92,10 @@ namespace geode
8792
template < template < typename > class Attribute, typename T >
8893
void import_old_attribute( AttributeManager &manager,
8994
std::string_view old_attribute_name,
90-
geode::uuid new_attribute_id )
95+
geode::uuid new_attribute_id,
96+
index_t attribute_size )
9197
{
98+
DEBUG( "import_old_attribute" );
9299
const auto ids =
93100
manager.attribute_ids_with_name( old_attribute_name ).value();
94101
DEBUG( ids.size() );
@@ -106,14 +113,14 @@ namespace geode
106113
manager.read_attribute< T >( old_attribute_id );
107114
auto new_attribute =
108115
manager.find_attribute< Attribute, T >( new_attribute_id );
109-
manager.resize( old_attribute->nb_items() );
110-
for( const auto index : geode::Range{ old_attribute->nb_items() } )
116+
manager.resize( attribute_size );
117+
for( const auto index : geode::Range{ attribute_size } )
111118
{
112-
SDEBUG( old_attribute->value( index ) );
113119
new_attribute->set_value(
114120
index, old_attribute->value( index ) );
115121
}
116122
manager.delete_attribute( old_attribute_id );
123+
DEBUG( "import_old_attribute done" );
117124
}
118125
} // namespace detail
119126
} // namespace geode

include/geode/basic/growable.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include <bitsery/bitsery.h>
2929
#include <bitsery/ext/compact_value.h>
3030

31+
#include <geode/basic/logger.hpp>
3132
#include <geode/basic/types.hpp>
3233

3334
namespace geode

include/geode/basic/uuid.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ namespace geode
6868
{
6969
serializer.ext( *this, Growable< Archive, uuid >{
7070
{ []( Archive &archive, uuid &id ) {
71+
DEBUG( "uuid::serialize" );
7172
uint64_t ab;
7273
uint64_t cd;
7374
archive.value8b( ab );
@@ -88,6 +89,7 @@ namespace geode
8889
id.bytes_[13] = ( cd >> 16 ) & 0xFF;
8990
id.bytes_[14] = ( cd >> 8 ) & 0xFF;
9091
id.bytes_[15] = ( cd >> 0 ) & 0xFF;
92+
DEBUG( "uuid::serialize end" );
9193
},
9294
[]( Archive &archive, uuid &id ) {
9395
archive.container1b( id.bytes_ );

include/geode/mesh/core/attribute_coordinate_reference_system.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ namespace geode
4343

4444
public:
4545
explicit AttributeCoordinateReferenceSystem(
46-
AttributeManager& manager );
46+
AttributeManager& manager, const geode::uuid& uuid );
4747
AttributeCoordinateReferenceSystem(
4848
AttributeManager& manager, std::string_view attribute_name );
4949
~AttributeCoordinateReferenceSystem();

include/geode/mesh/core/detail/facet_storage.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ namespace geode
5757
}
5858

5959
protected:
60+
FacetStorage( BITSERY ) {}
61+
6062
FacetStorage()
6163
{
6264
const auto counter_attribute_id =
@@ -70,7 +72,7 @@ namespace geode
7072
const auto vertices_attribute_id =
7173
facet_attribute_manager_
7274
.create_attribute< VariableAttribute, VertexContainer >(
73-
"vertices", VertexContainer{},
75+
"facet_vertices", VertexContainer{},
7476
{ false, false, false } );
7577
SDEBUG( vertices_attribute_id );
7678
vertices_ =

include/geode/mesh/core/geode/geode_edged_curve.hpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
#pragma once
2525

26+
#include <geode/basic/bitsery_archive.hpp>
2627
#include <geode/basic/passkey.hpp>
2728
#include <geode/basic/pimpl.hpp>
2829

@@ -49,6 +50,7 @@ namespace geode
4950
static constexpr auto dim = dimension;
5051

5152
OpenGeodeEdgedCurve();
53+
OpenGeodeEdgedCurve( BITSERY );
5254
OpenGeodeEdgedCurve( OpenGeodeEdgedCurve&& other ) noexcept;
5355
OpenGeodeEdgedCurve& operator=( OpenGeodeEdgedCurve&& other ) noexcept;
5456
~OpenGeodeEdgedCurve();
@@ -82,10 +84,6 @@ namespace geode
8284
}
8385

8486
public:
85-
void set_vertex( index_t vertex_id,
86-
Point< dimension > point,
87-
OGEdgedCurveKey /*key*/ );
88-
8987
void set_edge_vertex( const EdgeVertex& edge_vertex,
9088
index_t vertex_id,
9189
OGEdgedCurveKey /*key*/ );

include/geode/mesh/core/geode/geode_graph.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
#pragma once
2525

26+
#include <geode/basic/bitsery_archive.hpp>
2627
#include <geode/basic/passkey.hpp>
2728
#include <geode/basic/pimpl.hpp>
2829

@@ -44,6 +45,7 @@ namespace geode
4445
using Builder = OpenGeodeGraphBuilder;
4546

4647
OpenGeodeGraph();
48+
OpenGeodeGraph( BITSERY );
4749
OpenGeodeGraph( OpenGeodeGraph&& other ) noexcept;
4850
OpenGeodeGraph& operator=( OpenGeodeGraph&& other ) noexcept;
4951
~OpenGeodeGraph();

include/geode/mesh/core/geode/geode_hybrid_solid.hpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525

2626
#include <array>
2727

28+
#include <geode/basic/bitsery_archive.hpp>
2829
#include <geode/basic/passkey.hpp>
2930
#include <geode/basic/pimpl.hpp>
3031

@@ -51,6 +52,7 @@ namespace geode
5152
static constexpr auto dim = dimension;
5253

5354
OpenGeodeHybridSolid();
55+
OpenGeodeHybridSolid( BITSERY );
5456
OpenGeodeHybridSolid( OpenGeodeHybridSolid&& other ) noexcept;
5557
OpenGeodeHybridSolid& operator=(
5658
OpenGeodeHybridSolid&& other ) noexcept;
@@ -85,10 +87,6 @@ namespace geode
8587
}
8688

8789
public:
88-
void set_vertex( index_t vertex_id,
89-
Point< dimension > point,
90-
OGHybridSolidKey /*key*/ );
91-
9290
void set_polyhedron_vertex( const PolyhedronVertex& polyhedron_vertex,
9391
index_t vertex_id,
9492
OGHybridSolidKey /*key*/ );

include/geode/mesh/core/geode/geode_point_set.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525

2626
#include <iostream>
2727

28+
#include <geode/basic/bitsery_archive.hpp>
2829
#include <geode/basic/passkey.hpp>
2930
#include <geode/basic/pimpl.hpp>
3031

@@ -50,6 +51,7 @@ namespace geode
5051
static constexpr auto dim = dimension;
5152

5253
OpenGeodePointSet();
54+
OpenGeodePointSet( BITSERY );
5355
OpenGeodePointSet( OpenGeodePointSet&& other ) noexcept;
5456
OpenGeodePointSet& operator=( OpenGeodePointSet&& other ) noexcept;
5557
~OpenGeodePointSet();

include/geode/mesh/core/geode/geode_polygonal_surface.hpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
#pragma once
2525

26+
#include <geode/basic/bitsery_archive.hpp>
2627
#include <geode/basic/passkey.hpp>
2728
#include <geode/basic/pimpl.hpp>
2829

@@ -49,6 +50,7 @@ namespace geode
4950
static constexpr auto dim = dimension;
5051

5152
OpenGeodePolygonalSurface();
53+
OpenGeodePolygonalSurface( BITSERY );
5254
OpenGeodePolygonalSurface( OpenGeodePolygonalSurface&& other ) noexcept;
5355
OpenGeodePolygonalSurface& operator=(
5456
OpenGeodePolygonalSurface&& other ) noexcept;
@@ -83,10 +85,6 @@ namespace geode
8385
}
8486

8587
public:
86-
void set_vertex( index_t vertex_id,
87-
Point< dimension > point,
88-
OGPolygonalSurfaceKey /*key*/ );
89-
9088
void set_polygon_vertex( const PolygonVertex& polygon_vertex,
9189
index_t vertex_id,
9290
OGPolygonalSurfaceKey /*key*/ );

0 commit comments

Comments
 (0)