#pragma once #include "datatypes/cframe.h" #include #include class Part; class Instance; const std::vector> getSelection(); class PartAssembly { CFrame _assemblyOrigin; Vector3 _bounds; std::vector> parts; public: PartAssembly(std::vector>, bool worldMode = false); static PartAssembly FromSelection(std::vector> selection = getSelection()); inline CFrame assemblyOrigin() { return _assemblyOrigin; }; inline Vector3 bounds() { return _bounds; }; // Transforms the assembly such that newOrigin is now this assembly's new assemblyOrigin void SetOrigin(CFrame newOrigin); // Rotates and translates the assembly by the transformation void TransformBy(CFrame transform); // Scales the assembly to the desired size // If multiple parts are selected, finds the greatest scale factor of each component pair, and // scales it up by that amount void Scale(Vector3 newSize, bool scaleUp = true); };