Skip to content

Plat 11607 modular ship assembly - #62

Open
Ikreb1 wants to merge 34 commits into
mainfrom
PLAT-11607-modular-ship-assembly
Open

Plat 11607 modular ship assembly#62
Ikreb1 wants to merge 34 commits into
mainfrom
PLAT-11607-modular-ship-assembly

Conversation

@Ikreb1

@Ikreb1 Ikreb1 commented Aug 13, 2026

Copy link
Copy Markdown
Member

Creating a system for building up a ship or otherwise from components and handling their attachments like locators

filipppavlov and others added 21 commits July 17, 2026 15:25
The new base class has support "owner", "parent" and "part tag" shared attributes.
Use `UnregisterChild` helper method

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
The new base class has support "owner", "parent" and "part tag" shared attributes.
Use `UnregisterChild` helper method

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings August 13, 2026 10:22

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for modular ship/space-object assembly by tagging parts, building SOF children as discrete parts, and enabling runtime add/remove/transform operations while keeping instanced meshes and locator sets attributable to the originating part.

Changes:

  • Introduces PartTag propagation through locators and shared instanced meshes to track ownership per modular part.
  • Adds EveSOF::BuildChild(...) plus related plumbing to build additional hull parts into an existing EveSpaceObject2.
  • Adds EveChildPartData + EveModularObjectModifier (and Blue bindings) to create/modify modular objects (add/remove parts, update transforms).

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
trinity/Eve/SpaceObjectFactory/EveSOFDataMgr.h Extends locator direction data with partTag and forwards it into Locator.
trinity/Eve/SpaceObjectFactory/EveSOF.h Declares BuildChild and extends SetupLocatorSets to accept an optional partTag.
trinity/Eve/SpaceObjectFactory/EveSOF.cpp Implements BuildChild, propagates partTag into locators, and adjusts placement/attachment behavior.
trinity/Eve/SpaceObject/Utils/EveLocatorSets.h Adds partTag to Locator and provides non-const locator list access.
trinity/Eve/SpaceObject/Utils/EveLocatorSets.cpp Updates structure definition to serialize/reflect partTag and adds non-const accessor impl.
trinity/Eve/SpaceObject/EveSpaceObject2.h Exposes mutable accessors for effect children and locator sets, plus public bounding-sphere getters.
trinity/Eve/SpaceObject/Children/EveSpaceObjectChild.cpp Loosens an assertion when unregistering a child with no parent.
trinity/Eve/SpaceObject/Children/EveChildPartData.h Adds new child type for per-object part bookkeeping and a modular-object modifier API.
trinity/Eve/SpaceObject/Children/EveChildPartData.cpp Implements modular-object creation/modification (add/remove parts, transform updates, locator cleanup).
trinity/Eve/SpaceObject/Children/EveChildPartData_Blue.cpp Exposes modular-object APIs to Blue.
trinity/Eve/SpaceObject/Children/EveChildInstancedMeshes.h Extends AddMesh with partTag, adds per-instance part tag storage and removal API.
trinity/Eve/SpaceObject/Children/EveChildInstancedMeshes.cpp Implements part-tag-aware merging and removal of instanced mesh instances.
trinity/Eve/EveInstancedMeshManager.h Adds move-assignment for DataHandle used by instanced-mesh registration handles.
trinity/CMakeLists.txt Adds new modular-object source files to the build.
Suppressed comments (1)

trinity/Eve/SpaceObject/Children/EveChildInstancedMeshes.cpp:570

  • After removing instances, the remaining instances keep their previous sphereIndex values. If removals happen in the middle, sphereIndex can become out-of-range for the resized bounding sphere group, breaking frustum culling/picking.
		mesh.instances.erase( newEnd, end( mesh.instances ) );
		auto newTagEnd = std::remove_if( begin( mesh.partTags ), end( mesh.partTags ), [&]( uint32_t tag ) {
			return tag == partTag;
		} );
		mesh.partTags.erase( newTagEnd, end( mesh.partTags ) );

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread trinity/Eve/SpaceObject/Children/EveChildInstancedMeshes.cpp Outdated
Comment thread trinity/Eve/SpaceObject/Children/EveChildInstancedMeshes.cpp
Comment thread trinity/Eve/EveInstancedMeshManager.h Outdated
Comment thread trinity/Eve/SpaceObject/Children/EveChildPartData.cpp Outdated
Comment thread trinity/Eve/SpaceObject/Children/EveChildPartData.cpp Outdated
Comment thread trinity/Eve/SpaceObjectFactory/EveSOF.cpp Outdated
Comment thread trinity/Eve/SpaceObject/Children/EveChildPartData_Blue.cpp Outdated
Comment thread trinity/Eve/SpaceObjectFactory/EveSOF.cpp Outdated
Comment thread trinity/Eve/SpaceObjectFactory/EveSOF.cpp
@Ikreb1
Ikreb1 marked this pull request as ready for review August 18, 2026 12:59

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cpp-linter Review

Used clang-format v21.1.8

Click here for the full clang-format patch
diff --git a/trinity/Eve/SpaceObject/Utils/EveLocatorSets.cpp b/trinity/Eve/SpaceObject/Utils/EveLocatorSets.cpp
index d308673..33be1c0 100644
--- a/trinity/Eve/SpaceObject/Utils/EveLocatorSets.cpp
+++ b/trinity/Eve/SpaceObject/Utils/EveLocatorSets.cpp
@@ -8 +8 @@ static_assert( sizeof( EveSpaceObjectChild::PartTag ) == sizeof( uint32_t ), "Si
-	// locator item definition
+// locator item definition
diff --git a/trinity/Eve/SpaceObjectFactory/EveSOF.h b/trinity/Eve/SpaceObjectFactory/EveSOF.h
index 892b335..367e136 100644
--- a/trinity/Eve/SpaceObjectFactory/EveSOF.h
+++ b/trinity/Eve/SpaceObjectFactory/EveSOF.h
@@ -48 +48 @@ public:
-	bool BuildChild( EveSpaceObject2* owner, const char* dnaString, uint32_t partTag, const Matrix& transform, uint32_t& nextPartTag );
+	bool BuildChild( EveSpaceObject2 * owner, const char* dnaString, uint32_t partTag, const Matrix& transform, uint32_t& nextPartTag );

Have any feedback or feature suggestions? Share it here.

Comment thread trinity/Eve/SpaceObject/Utils/EveLocatorSets.cpp Outdated
Comment thread trinity/Eve/SpaceObjectFactory/EveSOF.h Outdated
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@github-actions
github-actions Bot dismissed their stale review August 18, 2026 14:35

outdated suggestion

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cpp-linter Review

Used clang-format v21.1.8

Click here for the full clang-format patch
diff --git a/trinity/Eve/SpaceObjectFactory/EveSOF.h b/trinity/Eve/SpaceObjectFactory/EveSOF.h
index 892b335..367e136 100644
--- a/trinity/Eve/SpaceObjectFactory/EveSOF.h
+++ b/trinity/Eve/SpaceObjectFactory/EveSOF.h
@@ -48 +48 @@ public:
-	bool BuildChild( EveSpaceObject2* owner, const char* dnaString, uint32_t partTag, const Matrix& transform, uint32_t& nextPartTag );
+	bool BuildChild( EveSpaceObject2 * owner, const char* dnaString, uint32_t partTag, const Matrix& transform, uint32_t& nextPartTag );

Have any feedback or feature suggestions? Share it here.

Comment thread trinity/Eve/SpaceObjectFactory/EveSOF.h Outdated
@github-actions
github-actions Bot dismissed their stale review August 18, 2026 15:00

outdated suggestion

@filipppavlov

filipppavlov commented Aug 19, 2026

Copy link
Copy Markdown

It would be good to start adding documentation for new features

Comment thread trinity/Eve/SpaceObject/Children/EveChildPartData.h Outdated
Comment thread trinity/Eve/SpaceObject/Children/EveChildPartData_Blue.cpp Outdated
Comment thread trinity/Eve/SpaceObjectFactory/EveSOF.cpp Outdated
Comment thread trinity/Eve/SpaceObjectFactory/EveSOF.cpp Outdated
Comment thread trinity/Eve/SpaceObject/Children/EveChildPartData.cpp Outdated
Comment thread trinity/Eve/SpaceObjectFactory/EveSOF.cpp Outdated
Comment thread trinity/Eve/SpaceObjectFactory/EveSOF.cpp Outdated
Comment thread trinity/Eve/EveInstancedMeshManager.h

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cpp-linter Review

Used clang-format v21.1.8

Click here for the full clang-format patch
diff --git a/trinity/Eve/SpaceObject/Children/EveChildPartData_Blue.cpp b/trinity/Eve/SpaceObject/Children/EveChildPartData_Blue.cpp
index 6836501..79dfea0 100644
--- a/trinity/Eve/SpaceObject/Children/EveChildPartData_Blue.cpp
+++ b/trinity/Eve/SpaceObject/Children/EveChildPartData_Blue.cpp
@@ -35,8 +35,7 @@ const Be::ClassInfo* EveModularObjectModifier::ExposeToBlue()
-MAP_FUNCTION_AND_WRAP( "CreateModularObject", CreateModularObject,
-	"Creates an empty modular space object and an edit session for it. Returns (object, modifier).\n"
-	"\n"
-	"    obj, mod = trinity.CreateModularObject(sof, 'faction', 'race')\n"
-	"    tag = mod.AddHull('hullname', '', '', pos, rot, scale)  # '' -> seed faction/race\n"
-	"    mod.SetTransform(tag, pos2, rot2, scale2)\n"
-	"    mod.ApplyBounds()  # apply culling bounds after a batch of edits\n"
-	"    mod = None  # end the session (also applies bounds)" );
+MAP_FUNCTION_AND_WRAP( "CreateModularObject", CreateModularObject, "Creates an empty modular space object and an edit session for it. Returns (object, modifier).\n"
+																   "\n"
+																   "    obj, mod = trinity.CreateModularObject(sof, 'faction', 'race')\n"
+																   "    tag = mod.AddHull('hullname', '', '', pos, rot, scale)  # '' -> seed faction/race\n"
+																   "    mod.SetTransform(tag, pos2, rot2, scale2)\n"
+																   "    mod.ApplyBounds()  # apply culling bounds after a batch of edits\n"
+																   "    mod = None  # end the session (also applies bounds)" );

Have any feedback or feature suggestions? Share it here.

Comment thread trinity/Eve/SpaceObject/Children/EveChildPartData_Blue.cpp Outdated
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@github-actions
github-actions Bot dismissed their stale review August 20, 2026 14:36

outdated suggestion

@Ikreb1
Ikreb1 requested a review from CCPNobody August 20, 2026 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants