Rename simulation placeholder helpers to sample surfaces
This commit is contained in:
parent
5de8e3dce5
commit
969647b399
4 changed files with 139 additions and 7 deletions
|
|
@ -3,29 +3,39 @@
|
|||
#include "HyperTwistBootstrap/HyperTwistContractLibrary.h"
|
||||
#include "HyperTwistSimulation/HyperTwistVirtual3333ProjectionLibrary.h"
|
||||
|
||||
FHyperTwistSimulationSceneContext UHyperTwistSimulationLibrary::MakeClassicPlaceholderSceneContext()
|
||||
FHyperTwistSimulationSceneContext UHyperTwistSimulationLibrary::MakeClassicSampleSceneContext()
|
||||
{
|
||||
FHyperTwistSimulationSceneContext SceneContext;
|
||||
SceneContext.SceneContextId = TEXT("scene_classic_placeholder");
|
||||
SceneContext.SceneContextId = TEXT("scene_classic_sample");
|
||||
SceneContext.PuzzleState = UHyperTwistContractLibrary::MakeSampleClassicPuzzleState();
|
||||
SceneContext.ProjectionSettings.ProjectionKind = EHyperTwistProjectionKind::ClassicPerspective;
|
||||
SceneContext.ProjectionSettings.ProjectionProfile = TEXT("classic-default");
|
||||
SceneContext.RenderStateProfile = TEXT("classic-placeholder-render-state");
|
||||
SceneContext.RenderStateProfile = TEXT("classic-sample-render-state");
|
||||
return SceneContext;
|
||||
}
|
||||
|
||||
FHyperTwistSimulationSceneContext UHyperTwistSimulationLibrary::MakeHyperPlaceholderSceneContext()
|
||||
FHyperTwistSimulationSceneContext UHyperTwistSimulationLibrary::MakeHyperSampleSceneContext()
|
||||
{
|
||||
FHyperTwistSimulationSceneContext SceneContext;
|
||||
SceneContext.SceneContextId = TEXT("scene_hyper_placeholder");
|
||||
SceneContext.SceneContextId = TEXT("scene_hyper_sample");
|
||||
SceneContext.PuzzleState = UHyperTwistContractLibrary::MakeSampleHyperPuzzleState();
|
||||
SceneContext.ProjectionSettings.ProjectionKind = EHyperTwistProjectionKind::HyperProjection;
|
||||
SceneContext.ProjectionSettings.ProjectionProfile = TEXT("hyper-default");
|
||||
SceneContext.ProjectionSettings.ProjectionDepth = 2.0f;
|
||||
SceneContext.RenderStateProfile = TEXT("hyper-placeholder-render-state");
|
||||
SceneContext.RenderStateProfile = TEXT("hyper-sample-render-state");
|
||||
return SceneContext;
|
||||
}
|
||||
|
||||
FHyperTwistSimulationSceneContext UHyperTwistSimulationLibrary::MakeClassicPlaceholderSceneContext()
|
||||
{
|
||||
return MakeClassicSampleSceneContext();
|
||||
}
|
||||
|
||||
FHyperTwistSimulationSceneContext UHyperTwistSimulationLibrary::MakeHyperPlaceholderSceneContext()
|
||||
{
|
||||
return MakeHyperSampleSceneContext();
|
||||
}
|
||||
|
||||
FHyperTwistSimulationSceneContext UHyperTwistSimulationLibrary::MakeMelindaCellFirstSceneContext()
|
||||
{
|
||||
FHyperTwistSimulationSceneContext SceneContext;
|
||||
|
|
|
|||
|
|
@ -12,9 +12,23 @@ class UNREALHYPERTWIST_API UHyperTwistSimulationLibrary : public UBlueprintFunct
|
|||
|
||||
public:
|
||||
UFUNCTION(BlueprintPure, Category = "HyperTwist|Simulation")
|
||||
static FHyperTwistSimulationSceneContext MakeClassicPlaceholderSceneContext();
|
||||
static FHyperTwistSimulationSceneContext MakeClassicSampleSceneContext();
|
||||
|
||||
UFUNCTION(BlueprintPure, Category = "HyperTwist|Simulation")
|
||||
static FHyperTwistSimulationSceneContext MakeHyperSampleSceneContext();
|
||||
|
||||
UFUNCTION(
|
||||
BlueprintPure,
|
||||
Category = "HyperTwist|Simulation",
|
||||
meta = (DeprecatedFunction, DeprecationMessage = "Use MakeClassicSampleSceneContext.")
|
||||
)
|
||||
static FHyperTwistSimulationSceneContext MakeClassicPlaceholderSceneContext();
|
||||
|
||||
UFUNCTION(
|
||||
BlueprintPure,
|
||||
Category = "HyperTwist|Simulation",
|
||||
meta = (DeprecatedFunction, DeprecationMessage = "Use MakeHyperSampleSceneContext.")
|
||||
)
|
||||
static FHyperTwistSimulationSceneContext MakeHyperPlaceholderSceneContext();
|
||||
|
||||
UFUNCTION(BlueprintPure, Category = "HyperTwist|Simulation")
|
||||
|
|
|
|||
|
|
@ -0,0 +1,102 @@
|
|||
// Copyright HyperTwist, Inc. All Rights Reserved.
|
||||
|
||||
#include "Misc/AutomationTest.h"
|
||||
|
||||
#include "HyperTwistSimulation/HyperTwistSimulationLibrary.h"
|
||||
|
||||
#if WITH_AUTOMATION_TESTS
|
||||
|
||||
IMPLEMENT_SIMPLE_AUTOMATION_TEST(
|
||||
FHyperTwistSimulationLibrarySceneContextSamplesTest,
|
||||
"HyperTwist.Simulation.SceneContext.SampleHelpers",
|
||||
EAutomationTestFlags::EditorContext | EAutomationTestFlags::EngineFilter
|
||||
)
|
||||
|
||||
bool FHyperTwistSimulationLibrarySceneContextSamplesTest::RunTest(const FString& Parameters)
|
||||
{
|
||||
const FHyperTwistSimulationSceneContext ClassicSample =
|
||||
UHyperTwistSimulationLibrary::MakeClassicSampleSceneContext();
|
||||
const FHyperTwistSimulationSceneContext ClassicLegacy =
|
||||
UHyperTwistSimulationLibrary::MakeClassicPlaceholderSceneContext();
|
||||
const FHyperTwistSimulationSceneContext HyperSample =
|
||||
UHyperTwistSimulationLibrary::MakeHyperSampleSceneContext();
|
||||
const FHyperTwistSimulationSceneContext HyperLegacy =
|
||||
UHyperTwistSimulationLibrary::MakeHyperPlaceholderSceneContext();
|
||||
|
||||
TestTrue(
|
||||
TEXT("The classic sample scene-context helper must remain structurally valid."),
|
||||
ClassicSample.IsStructurallyValid()
|
||||
);
|
||||
TestTrue(
|
||||
TEXT("The hyper sample scene-context helper must remain structurally valid."),
|
||||
HyperSample.IsStructurallyValid()
|
||||
);
|
||||
TestFalse(
|
||||
TEXT("The classic sample scene-context id should no longer advertise placeholder product posture."),
|
||||
ClassicSample.SceneContextId.Contains(TEXT("placeholder"), ESearchCase::IgnoreCase)
|
||||
);
|
||||
TestFalse(
|
||||
TEXT("The hyper sample scene-context id should no longer advertise placeholder product posture."),
|
||||
HyperSample.SceneContextId.Contains(TEXT("placeholder"), ESearchCase::IgnoreCase)
|
||||
);
|
||||
TestFalse(
|
||||
TEXT("The classic sample render-state profile should no longer advertise placeholder posture."),
|
||||
ClassicSample.RenderStateProfile.Contains(TEXT("placeholder"), ESearchCase::IgnoreCase)
|
||||
);
|
||||
TestFalse(
|
||||
TEXT("The hyper sample render-state profile should no longer advertise placeholder posture."),
|
||||
HyperSample.RenderStateProfile.Contains(TEXT("placeholder"), ESearchCase::IgnoreCase)
|
||||
);
|
||||
TestFalse(
|
||||
TEXT("The classic sample projection profile should no longer advertise placeholder posture."),
|
||||
ClassicSample.ProjectionSettings.ProjectionProfile.Contains(TEXT("placeholder"), ESearchCase::IgnoreCase)
|
||||
);
|
||||
TestFalse(
|
||||
TEXT("The hyper sample projection profile should no longer advertise placeholder posture."),
|
||||
HyperSample.ProjectionSettings.ProjectionProfile.Contains(TEXT("placeholder"), ESearchCase::IgnoreCase)
|
||||
);
|
||||
TestEqual(
|
||||
TEXT("The deprecated classic placeholder helper must remain a compatibility wrapper over the renamed sample helper."),
|
||||
ClassicLegacy.SceneContextId,
|
||||
ClassicSample.SceneContextId
|
||||
);
|
||||
TestEqual(
|
||||
TEXT("The deprecated hyper placeholder helper must remain a compatibility wrapper over the renamed sample helper."),
|
||||
HyperLegacy.SceneContextId,
|
||||
HyperSample.SceneContextId
|
||||
);
|
||||
TestEqual(
|
||||
TEXT("The deprecated classic placeholder helper must preserve the sample render-state profile."),
|
||||
ClassicLegacy.RenderStateProfile,
|
||||
ClassicSample.RenderStateProfile
|
||||
);
|
||||
TestEqual(
|
||||
TEXT("The deprecated hyper placeholder helper must preserve the sample render-state profile."),
|
||||
HyperLegacy.RenderStateProfile,
|
||||
HyperSample.RenderStateProfile
|
||||
);
|
||||
TestEqual(
|
||||
TEXT("The deprecated classic placeholder helper must preserve the sample projection profile."),
|
||||
ClassicLegacy.ProjectionSettings.ProjectionProfile,
|
||||
ClassicSample.ProjectionSettings.ProjectionProfile
|
||||
);
|
||||
TestEqual(
|
||||
TEXT("The deprecated hyper placeholder helper must preserve the sample projection profile."),
|
||||
HyperLegacy.ProjectionSettings.ProjectionProfile,
|
||||
HyperSample.ProjectionSettings.ProjectionProfile
|
||||
);
|
||||
TestEqual(
|
||||
TEXT("The deprecated classic placeholder helper must preserve the sample projection depth."),
|
||||
ClassicLegacy.ProjectionSettings.ProjectionDepth,
|
||||
ClassicSample.ProjectionSettings.ProjectionDepth
|
||||
);
|
||||
TestEqual(
|
||||
TEXT("The deprecated hyper placeholder helper must preserve the sample projection depth."),
|
||||
HyperLegacy.ProjectionSettings.ProjectionDepth,
|
||||
HyperSample.ProjectionSettings.ProjectionDepth
|
||||
);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
@ -647,6 +647,12 @@ My opinion:
|
|||
|
||||
Simulation is currently very light, with placeholder scene-context helpers and projection settings.
|
||||
|
||||
Later evidence update:
|
||||
|
||||
- current code no longer exposes those starter helpers under placeholder-named public APIs
|
||||
- the starter scene-context factories are now explicitly sample-named compatibility surfaces
|
||||
- the simulation lane has since widened into visible Melinda, virtual `3x3x3x3`, and higher-dimensional training/runtime ownership beyond this early priming snapshot
|
||||
|
||||
My opinion:
|
||||
|
||||
- this is the thinnest current first-party lane,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue