Skip to content

Commit 38c13de

Browse files
committed
add infinite view for body centered tetragonal
1 parent d24bbf6 commit 38c13de

4 files changed

Lines changed: 116 additions & 0 deletions

File tree

Binary file not shown.

Assets/Modules/ElementStructures/Resources/InfiniteViews/InfiniteBCT.fbx.meta

Lines changed: 103 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/Modules/ElementStructures/Scripts/Core/Crystal.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,13 +274,23 @@ public void Draw() {
274274
break;
275275
}
276276
break;
277+
case CellType.TETRA:
278+
switch (cellVariation){
279+
case CellVariation.BODY:
280+
fileName = "InfiniteBCT";
281+
break;
282+
}
283+
break;
277284
case CellType.HEX:
278285
switch (cellVariation){
279286
case CellVariation.BODY:
280287
fileName = "InfiniteBCH";
281288
break;
282289
}
283290
break;
291+
default:
292+
throw new Exception("Invalid cell type for infinite view");
293+
284294
}
285295

286296
infiniteObject = MonoBehaviour.Instantiate(Resources.Load<GameObject>("MeshPrefab"));

Assets/Modules/ElementStructures/Scripts/StructureBase.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ public void SetView(CrystalState state){
101101
}
102102

103103
// Enables infinite view for the crystal lattice
104+
[ContextMenu("Switch to infinite view")]
104105
public void InfiniteView(){
105106

106107
currentState = CrystalState.INFINITE;
@@ -114,6 +115,7 @@ public void InfiniteView(){
114115
}
115116

116117
// Enables multi-cell view for the crystal
118+
[ContextMenu("Switch to multi-cell view")]
117119
public void MultiCellView(){
118120

119121
if(currentState == CrystalState.INFINITE){
@@ -177,6 +179,7 @@ public void MultiCellView(CellType type, int version)
177179
}
178180

179181
// Enables single cell view for the crystal
182+
[ContextMenu("Switch to single-cell view")]
180183
public void SingleCellView(){
181184

182185
if(currentState == CrystalState.INFINITE){

0 commit comments

Comments
 (0)