Skip to content

Commit

Permalink
[BMSPT-299] generation of superbcf file
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielLepold committed Sep 3, 2024
1 parent 846135b commit 3e19b18
Show file tree
Hide file tree
Showing 9 changed files with 669 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System;
using System.Collections.Generic;
using BcfToolkit.Model;
using BcfToolkit.Model.Bcf21;

namespace BcfToolkit.Builder.Bcf21;
Expand Down Expand Up @@ -51,6 +49,12 @@ public VisualizationInfoBuilder SetPerspectiveCamera(
return this;
}

public VisualizationInfoBuilder SetViewSetupHints(
ViewSetupHints? viewSetupHints) {
_visualizationInfo.GetComponentsInstance().ViewSetupHints = viewSetupHints;
return this;
}



}
5 changes: 5 additions & 0 deletions src/bcf-toolkit/Builder/Bcf30/MarkupBuilderExensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,9 @@ public MarkupBuilder AddDocumentReferences(
documentReferences.ForEach(_markup.Topic.DocumentReferences.Add);
return this;
}

public MarkupBuilder SetBimSnippet(BimSnippet bimSnippet) {
_markup.Topic.BimSnippet = bimSnippet;
return this;
}
}
33 changes: 33 additions & 0 deletions src/bcf-toolkit/Builder/Bcf30/OrthogonalCameraBuilderExtensions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
using BcfToolkit.Model.Bcf30;

namespace BcfToolkit.Builder.Bcf30;

public partial class OrthogonalCameraBuilder {
public OrthogonalCameraBuilder SetCameraViewPoint(double x, double y, double z) {
_camera.CameraViewPoint = new Point {
X = x,
Y = y,
Z = z
};
return this;
}

public OrthogonalCameraBuilder SetCameraDirection(double x, double y, double z) {
_camera.CameraDirection = new Direction {
X = x,
Y = y,
Z = z
};
return this;
}

public OrthogonalCameraBuilder SetCameraUpVector(double x, double y, double z) {
_camera.CameraUpVector = new Direction {
X = x,
Y = y,
Z = z
};
return this;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
using BcfToolkit.Model.Bcf30;
namespace BcfToolkit.Builder.Bcf30;

public partial class PerspectiveCameraBuilder {
public PerspectiveCameraBuilder SetCameraViewPoint(double x, double y, double z) {
_camera.CameraViewPoint = new Point {
X = x,
Y = y,
Z = z
};
return this;
}

public PerspectiveCameraBuilder SetCameraDirection(double x, double y, double z) {
_camera.CameraDirection = new Direction {
X = x,
Y = y,
Z = z
};
return this;
}

public PerspectiveCameraBuilder SetCameraUpVector(double x, double y, double z) {
_camera.CameraUpVector = new Direction {
X = x,
Y = y,
Z = z
};
return this;
}
}
2 changes: 1 addition & 1 deletion src/bcf-toolkit/Builder/Bcf30/ViewPointBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace BcfToolkit.Builder.Bcf30;

public class ViewPointBuilder : IViewPointBuilder<
public partial class ViewPointBuilder : IViewPointBuilder<
ViewPointBuilder, VisualizationInfoBuilder> {
private readonly ViewPoint _viewPoint = new();

Expand Down
11 changes: 11 additions & 0 deletions src/bcf-toolkit/Builder/Bcf30/ViewPointBuilderExtensions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using BcfToolkit.Model.Bcf30;

namespace BcfToolkit.Builder.Bcf30;

public partial class ViewPointBuilder {

public ViewPointBuilder SetVisualizationInfo(VisualizationInfo visualizationInfo) {
_viewPoint.VisualizationInfo = visualizationInfo;
return this;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,19 @@ public VisualizationInfoBuilder AddBitmaps(List<Bitmap>? bitmaps) {
bitmaps?.ForEach(_visualizationInfo.Bitmaps.Add);
return this;
}

public VisualizationInfoBuilder SetOrthogonalCamera(OrthogonalCamera orthogonalCamera) {
_visualizationInfo.OrthogonalCamera = orthogonalCamera;
return this;
}

public VisualizationInfoBuilder SetPerspectiveCamera(PerspectiveCamera perspectiveCamera) {
_visualizationInfo.PerspectiveCamera = perspectiveCamera;
return this;
}

public VisualizationInfoBuilder SetVisibility(ComponentVisibility visibility) {
_visualizationInfo.GetComponentsInstance().Visibility = visibility;
return this;
}
}
Loading

0 comments on commit 3e19b18

Please sign in to comment.