Made Instanced Version of Stick/Ball Model from Blender Molecular Nodes CSV
This commit is contained in:
parent
704ba31fb9
commit
e658df9854
39 changed files with 2914 additions and 45 deletions
15
VIRTUOS_ExpansionPluginTests/.idea/.idea.VRExpPluginExample.dir/.idea/.gitignore
generated
vendored
Normal file
15
VIRTUOS_ExpansionPluginTests/.idea/.idea.VRExpPluginExample.dir/.idea/.gitignore
generated
vendored
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
# Default ignored files
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
||||||
|
# Rider ignored files
|
||||||
|
/modules.xml
|
||||||
|
/contentModel.xml
|
||||||
|
/projectSettingsUpdater.xml
|
||||||
|
/.idea.VRExpPluginExample.iml
|
||||||
|
# Ignored default folder with query files
|
||||||
|
/queries/
|
||||||
|
# Datasource local storage ignored files
|
||||||
|
/dataSources/
|
||||||
|
/dataSources.local.xml
|
||||||
|
# Editor-based HTTP Client requests
|
||||||
|
/httpRequests/
|
||||||
1
VIRTUOS_ExpansionPluginTests/.idea/.idea.VRExpPluginExample.dir/.idea/.name
generated
Normal file
1
VIRTUOS_ExpansionPluginTests/.idea/.idea.VRExpPluginExample.dir/.idea/.name
generated
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
VRExpPluginExample
|
||||||
4
VIRTUOS_ExpansionPluginTests/.idea/.idea.VRExpPluginExample.dir/.idea/encodings.xml
generated
Normal file
4
VIRTUOS_ExpansionPluginTests/.idea/.idea.VRExpPluginExample.dir/.idea/encodings.xml
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="Encoding" addBOMForNewFiles="with BOM under Windows, with no BOM otherwise" />
|
||||||
|
</project>
|
||||||
8
VIRTUOS_ExpansionPluginTests/.idea/.idea.VRExpPluginExample.dir/.idea/indexLayout.xml
generated
Normal file
8
VIRTUOS_ExpansionPluginTests/.idea/.idea.VRExpPluginExample.dir/.idea/indexLayout.xml
generated
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="UserContentModel">
|
||||||
|
<attachedFolders />
|
||||||
|
<explicitIncludes />
|
||||||
|
<explicitExcludes />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
9
VIRTUOS_ExpansionPluginTests/.idea/.idea.VRExpPluginExample.dir/.idea/vcs.xml
generated
Normal file
9
VIRTUOS_ExpansionPluginTests/.idea/.idea.VRExpPluginExample.dir/.idea/vcs.xml
generated
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
|
||||||
|
<mapping directory="$PROJECT_DIR$/Plugins/SPUD" vcs="Git" />
|
||||||
|
<mapping directory="$PROJECT_DIR$/Plugins/SUDS" vcs="Git" />
|
||||||
|
<mapping directory="$PROJECT_DIR$/Plugins/StevesUEHelpers" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
15
VIRTUOS_ExpansionPluginTests/.idea/.idea.VRExpPluginExample/.idea/.gitignore
generated
vendored
Normal file
15
VIRTUOS_ExpansionPluginTests/.idea/.idea.VRExpPluginExample/.idea/.gitignore
generated
vendored
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
# Default ignored files
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
||||||
|
# Rider ignored files
|
||||||
|
/projectSettingsUpdater.xml
|
||||||
|
/.idea.VRExpPluginExample.iml
|
||||||
|
/modules.xml
|
||||||
|
/contentModel.xml
|
||||||
|
# Ignored default folder with query files
|
||||||
|
/queries/
|
||||||
|
# Datasource local storage ignored files
|
||||||
|
/dataSources/
|
||||||
|
/dataSources.local.xml
|
||||||
|
# Editor-based HTTP Client requests
|
||||||
|
/httpRequests/
|
||||||
1
VIRTUOS_ExpansionPluginTests/.idea/.idea.VRExpPluginExample/.idea/.name
generated
Normal file
1
VIRTUOS_ExpansionPluginTests/.idea/.idea.VRExpPluginExample/.idea/.name
generated
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
VRExpPluginExample
|
||||||
4
VIRTUOS_ExpansionPluginTests/.idea/.idea.VRExpPluginExample/.idea/encodings.xml
generated
Normal file
4
VIRTUOS_ExpansionPluginTests/.idea/.idea.VRExpPluginExample/.idea/encodings.xml
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="Encoding" addBOMForNewFiles="with BOM under Windows, with no BOM otherwise" />
|
||||||
|
</project>
|
||||||
8
VIRTUOS_ExpansionPluginTests/.idea/.idea.VRExpPluginExample/.idea/indexLayout.xml
generated
Normal file
8
VIRTUOS_ExpansionPluginTests/.idea/.idea.VRExpPluginExample/.idea/indexLayout.xml
generated
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="UserContentModel">
|
||||||
|
<attachedFolders />
|
||||||
|
<explicitIncludes />
|
||||||
|
<explicitExcludes />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
9
VIRTUOS_ExpansionPluginTests/.idea/.idea.VRExpPluginExample/.idea/vcs.xml
generated
Normal file
9
VIRTUOS_ExpansionPluginTests/.idea/.idea.VRExpPluginExample/.idea/vcs.xml
generated
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
|
||||||
|
<mapping directory="$PROJECT_DIR$/Plugins/SPUD" vcs="Git" />
|
||||||
|
<mapping directory="$PROJECT_DIR$/Plugins/SUDS" vcs="Git" />
|
||||||
|
<mapping directory="$PROJECT_DIR$/Plugins/StevesUEHelpers" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
BIN
VIRTUOS_ExpansionPluginTests/Content/Development/GLuten/Gluten/Materials/MN_Default.uasset
(Stored with Git LFS)
Normal file
BIN
VIRTUOS_ExpansionPluginTests/Content/Development/GLuten/Gluten/Materials/MN_Default.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
VIRTUOS_ExpansionPluginTests/Content/Development/GLuten/Gluten/SceneImport_Gluten.uasset
(Stored with Git LFS)
Normal file
BIN
VIRTUOS_ExpansionPluginTests/Content/Development/GLuten/Gluten/SceneImport_Gluten.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
VIRTUOS_ExpansionPluginTests/Content/Development/GLuten/Gluten/StaticMeshes/BP_Gluten.uasset
(Stored with Git LFS)
Normal file
BIN
VIRTUOS_ExpansionPluginTests/Content/Development/GLuten/Gluten/StaticMeshes/BP_Gluten.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
VIRTUOS_ExpansionPluginTests/Content/Development/GLuten/Gluten/StaticMeshes/BP_MoleculeFromMolecularNodes.uasset
(Stored with Git LFS)
Normal file
BIN
VIRTUOS_ExpansionPluginTests/Content/Development/GLuten/Gluten/StaticMeshes/BP_MoleculeFromMolecularNodes.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
VIRTUOS_ExpansionPluginTests/Content/Development/GLuten/Gluten/StaticMeshes/DT_AtomColorLookup.uasset
(Stored with Git LFS)
Normal file
BIN
VIRTUOS_ExpansionPluginTests/Content/Development/GLuten/Gluten/StaticMeshes/DT_AtomColorLookup.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
VIRTUOS_ExpansionPluginTests/Content/Development/GLuten/Gluten/StaticMeshes/DT_Atoms.uasset
(Stored with Git LFS)
Normal file
BIN
VIRTUOS_ExpansionPluginTests/Content/Development/GLuten/Gluten/StaticMeshes/DT_Atoms.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
VIRTUOS_ExpansionPluginTests/Content/Development/GLuten/Gluten/StaticMeshes/DT_Bonds.uasset
(Stored with Git LFS)
Normal file
BIN
VIRTUOS_ExpansionPluginTests/Content/Development/GLuten/Gluten/StaticMeshes/DT_Bonds.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
VIRTUOS_ExpansionPluginTests/Content/Development/GLuten/Gluten/StaticMeshes/Instances_Blueprint.uasset
(Stored with Git LFS)
Normal file
BIN
VIRTUOS_ExpansionPluginTests/Content/Development/GLuten/Gluten/StaticMeshes/Instances_Blueprint.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
VIRTUOS_ExpansionPluginTests/Content/Development/GLuten/Gluten/StaticMeshes/M_Atoms.uasset
(Stored with Git LFS)
Normal file
BIN
VIRTUOS_ExpansionPluginTests/Content/Development/GLuten/Gluten/StaticMeshes/M_Atoms.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
VIRTUOS_ExpansionPluginTests/Content/Development/GLuten/Gluten/StaticMeshes/M_Bonds.uasset
(Stored with Git LFS)
Normal file
BIN
VIRTUOS_ExpansionPluginTests/Content/Development/GLuten/Gluten/StaticMeshes/M_Bonds.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
VIRTUOS_ExpansionPluginTests/Content/Development/GLuten/Gluten/StaticMeshes/Mesh.uasset
(Stored with Git LFS)
Normal file
BIN
VIRTUOS_ExpansionPluginTests/Content/Development/GLuten/Gluten/StaticMeshes/Mesh.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
VIRTUOS_ExpansionPluginTests/Content/Development/GLuten/Gluten/StaticMeshes/SAtomColor.uasset
(Stored with Git LFS)
Normal file
BIN
VIRTUOS_ExpansionPluginTests/Content/Development/GLuten/Gluten/StaticMeshes/SAtomColor.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
VIRTUOS_ExpansionPluginTests/Content/Development/GLuten/Gluten/StaticMeshes/SGeoNodes.uasset
(Stored with Git LFS)
Normal file
BIN
VIRTUOS_ExpansionPluginTests/Content/Development/GLuten/Gluten/StaticMeshes/SGeoNodes.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
File diff suppressed because it is too large
Load diff
BIN
VIRTUOS_ExpansionPluginTests/Content/Development/ScifiFiDoor1/BP_ScifiDoor1.uasset
(Stored with Git LFS)
Normal file
BIN
VIRTUOS_ExpansionPluginTests/Content/Development/ScifiFiDoor1/BP_ScifiDoor1.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
VIRTUOS_ExpansionPluginTests/Content/Development/ScifiFiDoor1/MergedBake_Bake1_PBR_Diffuse.uasset
(Stored with Git LFS)
Normal file
BIN
VIRTUOS_ExpansionPluginTests/Content/Development/ScifiFiDoor1/MergedBake_Bake1_PBR_Diffuse.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
VIRTUOS_ExpansionPluginTests/Content/Development/ScifiFiDoor1/MergedBake_Bake1_PBR_Metalness-MergedBake_Bake1_PBR_Roughness.uasset
(Stored with Git LFS)
Normal file
BIN
VIRTUOS_ExpansionPluginTests/Content/Development/ScifiFiDoor1/MergedBake_Bake1_PBR_Metalness-MergedBake_Bake1_PBR_Roughness.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
VIRTUOS_ExpansionPluginTests/Content/Development/ScifiFiDoor1/MergedBake_Bake1_PBR_Normal.uasset
(Stored with Git LFS)
Normal file
BIN
VIRTUOS_ExpansionPluginTests/Content/Development/ScifiFiDoor1/MergedBake_Bake1_PBR_Normal.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
VIRTUOS_ExpansionPluginTests/Content/Development/ScifiFiDoor1/MergedBake_Baked_001.uasset
(Stored with Git LFS)
Normal file
BIN
VIRTUOS_ExpansionPluginTests/Content/Development/ScifiFiDoor1/MergedBake_Baked_001.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
VIRTUOS_ExpansionPluginTests/Content/Development/ScifiFiDoor1/defaultMaterial_002_Baked.uasset
(Stored with Git LFS)
Normal file
BIN
VIRTUOS_ExpansionPluginTests/Content/Development/ScifiFiDoor1/defaultMaterial_002_Baked.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
VIRTUOS_ExpansionPluginTests/Content/Development/ScifiFiDoor1/defaultMaterial_003_Baked.uasset
(Stored with Git LFS)
Normal file
BIN
VIRTUOS_ExpansionPluginTests/Content/Development/ScifiFiDoor1/defaultMaterial_003_Baked.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
VIRTUOS_ExpansionPluginTests/Content/Maps/Map_Bathrooms.umap
(Stored with Git LFS)
BIN
VIRTUOS_ExpansionPluginTests/Content/Maps/Map_Bathrooms.umap
(Stored with Git LFS)
Binary file not shown.
BIN
VIRTUOS_ExpansionPluginTests/Content/Maps/Map_Gameworld.umap
(Stored with Git LFS)
BIN
VIRTUOS_ExpansionPluginTests/Content/Maps/Map_Gameworld.umap
(Stored with Git LFS)
Binary file not shown.
BIN
VIRTUOS_ExpansionPluginTests/Content/Maps/Map_Gluten.umap
(Stored with Git LFS)
Normal file
BIN
VIRTUOS_ExpansionPluginTests/Content/Maps/Map_Gluten.umap
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
VIRTUOS_ExpansionPluginTests/Content/World/Static/Walls/BP_Floor.uasset
(Stored with Git LFS)
BIN
VIRTUOS_ExpansionPluginTests/Content/World/Static/Walls/BP_Floor.uasset
(Stored with Git LFS)
Binary file not shown.
|
|
@ -1,12 +0,0 @@
|
||||||
// Fill out your copyright notice in the Description page of Project Settings.
|
|
||||||
|
|
||||||
//#include "VRExpPluginExample.h"
|
|
||||||
#include "EmptyClassForProject.h"
|
|
||||||
|
|
||||||
EmptyClassForProject::EmptyClassForProject()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
EmptyClassForProject::~EmptyClassForProject()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
// Fill out your copyright notice in the Description page of Project Settings.
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
#include "VRCharacter.h"
|
|
||||||
#include "GripMotionControllerComponent.h"
|
|
||||||
#include "VRBPDatatypes.h"
|
|
||||||
#include "VRGripInterface.h"
|
|
||||||
#include "VRPlayerController.h"
|
|
||||||
#include "VRExpansionFunctionLibrary.h"
|
|
||||||
#include "Grippables/GrippableBoxComponent.h"
|
|
||||||
#include "VRStereoWidgetComponent.h"
|
|
||||||
#include "VRCharacterMovementComponent.h"
|
|
||||||
#include "Misc/VRLogComponent.h"
|
|
||||||
#include "VRAIController.h"
|
|
||||||
#include "VRPathFollowingComponent.h"
|
|
||||||
#include "VRRootComponent.h"
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
class VREXPPLUGINEXAMPLE_API EmptyClassForProject
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
EmptyClassForProject();
|
|
||||||
~EmptyClassForProject();
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
@ -0,0 +1,61 @@
|
||||||
|
#include "MoleculeFunctionLibrary.h"
|
||||||
|
#include "Misc/Paths.h"
|
||||||
|
#include "Misc/FileHelper.h"
|
||||||
|
|
||||||
|
bool UMoleculeFunctionLibrary::ParsePDBFromString(const FString& PDBContent, TArray<FAtom>& OutAtoms, TArray<FBond>& OutBonds)
|
||||||
|
{
|
||||||
|
OutAtoms.Empty();
|
||||||
|
OutBonds.Empty();
|
||||||
|
|
||||||
|
if (PDBContent.IsEmpty())
|
||||||
|
{
|
||||||
|
UE_LOG(LogTemp, Warning, TEXT("ParsePDBFromString: Input string is empty"));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
TArray<FString> Lines;
|
||||||
|
PDBContent.ParseIntoArrayLines(Lines, true);
|
||||||
|
|
||||||
|
for (const FString& Line : Lines)
|
||||||
|
{
|
||||||
|
if (!Line.StartsWith(TEXT("ATOM")) && !Line.StartsWith(TEXT("HETATM")))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (Line.Len() < 54) // At least enough for X, Y, Z
|
||||||
|
continue;
|
||||||
|
|
||||||
|
FAtom Atom;
|
||||||
|
|
||||||
|
// Coordinates (columns are 1-indexed in spec)
|
||||||
|
Atom.Position.X = FCString::Atof(*Line.Mid(30, 8));
|
||||||
|
Atom.Position.Y = FCString::Atof(*Line.Mid(38, 8));
|
||||||
|
Atom.Position.Z = FCString::Atof(*Line.Mid(46, 8));
|
||||||
|
|
||||||
|
// Element symbol (columns 77-78), fallback to atom name (columns 13-16)
|
||||||
|
if (Line.Len() >= 78)
|
||||||
|
Atom.Element = Line.Mid(76, 2).TrimStartAndEnd();
|
||||||
|
if (Atom.Element.IsEmpty())
|
||||||
|
Atom.Element = Line.Mid(12, 4).TrimStartAndEnd().Left(1); // fallback
|
||||||
|
|
||||||
|
OutAtoms.Add(Atom);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Bond inference: simple distance-based
|
||||||
|
const float MaxBondDistance = 1.6f; // can tweak for different atom types
|
||||||
|
for (int32 i = 0; i < OutAtoms.Num(); i++)
|
||||||
|
{
|
||||||
|
for (int32 j = i + 1; j < OutAtoms.Num(); j++)
|
||||||
|
{
|
||||||
|
if (FVector::Distance(OutAtoms[i].Position, OutAtoms[j].Position) <= MaxBondDistance)
|
||||||
|
{
|
||||||
|
FBond Bond;
|
||||||
|
Bond.AtomIndex1 = i;
|
||||||
|
Bond.AtomIndex2 = j;
|
||||||
|
OutBonds.Add(Bond);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
UE_LOG(LogTemp, Log, TEXT("Parsed %d atoms and %d bonds from string"), OutAtoms.Num(), OutBonds.Num());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,52 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "CoreMinimal.h"
|
||||||
|
#include "Kismet/BlueprintFunctionLibrary.h"
|
||||||
|
#include "MoleculeFunctionLibrary.generated.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Struct representing an atom
|
||||||
|
*/
|
||||||
|
USTRUCT(BlueprintType)
|
||||||
|
struct FAtom
|
||||||
|
{
|
||||||
|
GENERATED_BODY()
|
||||||
|
|
||||||
|
UPROPERTY(BlueprintReadWrite, Category="Molecule")
|
||||||
|
FString Element;
|
||||||
|
|
||||||
|
UPROPERTY(BlueprintReadWrite, Category="Molecule")
|
||||||
|
FVector Position; // Unreal coordinates
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Struct representing a bond
|
||||||
|
*/
|
||||||
|
USTRUCT(BlueprintType)
|
||||||
|
struct FBond
|
||||||
|
{
|
||||||
|
GENERATED_BODY()
|
||||||
|
|
||||||
|
UPROPERTY(BlueprintReadWrite, Category="Molecule")
|
||||||
|
int32 AtomIndex1;
|
||||||
|
|
||||||
|
UPROPERTY(BlueprintReadWrite, Category="Molecule")
|
||||||
|
int32 AtomIndex2;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Blueprint Function Library to parse PDB strings
|
||||||
|
*/
|
||||||
|
UCLASS()
|
||||||
|
class UMoleculeFunctionLibrary : public UBlueprintFunctionLibrary
|
||||||
|
{
|
||||||
|
GENERATED_BODY()
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Parses a PDB string and outputs arrays of atoms and bonds
|
||||||
|
*/
|
||||||
|
UFUNCTION(BlueprintCallable, Category="Molecule")
|
||||||
|
static bool ParsePDBFromString(const FString& PDBContent, TArray<FAtom>& OutAtoms, TArray<FBond>& OutBonds);
|
||||||
|
};
|
||||||
Loading…
Add table
Add a link
Reference in a new issue