-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
105 additions
and
20 deletions.
There are no files selected for viewing
13 changes: 0 additions & 13 deletions
13
SightKeeper.Data/Binary/Model/DataSets/Assets/KeyPoint2D.cs
This file was deleted.
Oops, something went wrong.
19 changes: 19 additions & 0 deletions
19
SightKeeper.Data/Binary/Model/DataSets/Assets/PackableKeyPoint2D.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using MemoryPack; | ||
using SightKeeper.Domain.Model; | ||
|
||
namespace SightKeeper.Data.Binary.Model.DataSets.Assets; | ||
|
||
// TODO ISSUE KeyPoint2D actually doesn't exist right now | ||
/// <summary> | ||
/// MemoryPackable version of <see cref="KeyPoint2D"/> | ||
/// </summary> | ||
[MemoryPackable] | ||
internal sealed partial class PackableKeyPoint2D | ||
{ | ||
public Vector2<double> Position { get; } | ||
|
||
public PackableKeyPoint2D(Vector2<double> position) | ||
{ | ||
Position = position; | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
SightKeeper.Data/Binary/Model/DataSets/Assets/PackableKeyPoint3D.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using MemoryPack; | ||
using SightKeeper.Domain.Model; | ||
using SightKeeper.Domain.Model.DataSets.Poser3D; | ||
|
||
namespace SightKeeper.Data.Binary.Model.DataSets.Assets; | ||
|
||
/// <summary> | ||
/// MemoryPackable version of <see cref="KeyPoint3D"/> | ||
/// </summary> | ||
[MemoryPackable] | ||
internal sealed partial class PackableKeyPoint3D | ||
{ | ||
public Vector2<double> Position { get; } | ||
public bool IsVisible { get; } | ||
|
||
public PackableKeyPoint3D(Vector2<double> position, bool isVisible) | ||
{ | ||
Position = position; | ||
IsVisible = isVisible; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
SightKeeper.Data/Binary/Model/DataSets/Assets/PackablePoser3DItem.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using System.Collections.Immutable; | ||
using SightKeeper.Domain.Model.DataSets.Assets; | ||
using SightKeeper.Domain.Model.DataSets.Poser3D; | ||
|
||
namespace SightKeeper.Data.Binary.Model.DataSets.Assets; | ||
|
||
/// <summary> | ||
/// MemoryPackable version of <see cref="Poser3DItem"/> | ||
/// </summary> | ||
internal sealed class PackablePoser3DItem | ||
{ | ||
public byte TagId { get; } | ||
public Bounding Bounding { get; } | ||
public ImmutableArray<PackableKeyPoint3D> KeyPoints { get; } | ||
|
||
public PackablePoser3DItem(byte tagId, Bounding bounding, ImmutableArray<PackableKeyPoint3D> keyPoints) | ||
{ | ||
TagId = tagId; | ||
Bounding = bounding; | ||
KeyPoints = keyPoints; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
SightKeeper.Data/Binary/Model/DataSets/Tags/PackablePoser3DTag.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using System.Collections.Immutable; | ||
using MemoryPack; | ||
using SightKeeper.Domain.Model.DataSets.Poser3D; | ||
|
||
namespace SightKeeper.Data.Binary.Model.DataSets.Tags; | ||
|
||
/// <summary> | ||
/// MemoryPackable version of <see cref="Poser3DTag"/> | ||
/// </summary> | ||
[MemoryPackable] | ||
internal sealed partial class PackablePoser3DTag : PackablePoserTag | ||
{ | ||
public PackablePoser3DTag( | ||
byte id, | ||
string name, | ||
uint color, | ||
ImmutableArray<PackableTag> keyPointTags) | ||
: base(id, name, color, keyPointTags) | ||
{ | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
SightKeeper.Data/Binary/Model/DataSets/Tags/PackablePoserTag.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using System.Collections.Immutable; | ||
using SightKeeper.Domain.Model.DataSets.Poser; | ||
|
||
namespace SightKeeper.Data.Binary.Model.DataSets.Tags; | ||
|
||
/// <summary> | ||
/// MemoryPackable version of <see cref="PoserTag"/> | ||
/// </summary> | ||
internal abstract partial class PackablePoserTag : PackableTag | ||
{ | ||
public ImmutableArray<PackableTag> KeyPointTags { get; } | ||
|
||
protected PackablePoserTag(byte id, string name, uint color, ImmutableArray<PackableTag> keyPointTags) : base(id, name, color) | ||
{ | ||
KeyPointTags = keyPointTags; | ||
} | ||
} |