L3D.Net
0.10.0
See the version list below for details.
dotnet add package L3D.Net --version 0.10.0
NuGet\Install-Package L3D.Net -Version 0.10.0
<PackageReference Include="L3D.Net" Version="0.10.0" />
paket add L3D.Net --version 0.10.0
#r "nuget: L3D.Net, 0.10.0"
// Install L3D.Net as a Cake Addin #addin nuget:?package=L3D.Net&version=0.10.0 // Install L3D.Net as a Cake Tool #tool nuget:?package=L3D.Net&version=0.10.0
L3D .NET library
Intro
.NET Standard 2.0 library for the Luminaire 3D L3D
With the library it is possible to read and build L3D container files. For that the library exposes two classes 'Builder' and 'Reader'. The Builder has a fluent API for defining all the luminaire parts and build the target container file. With the Reader is is possible to read the content of a L3D container and to parse the containing .obj files at once. So there is no other .obj parser needed.
How to get started
Requirements
- .NET Standard 2.0 compatible project
Nuget package
Add the package within your IDE or using the CLI
dotnet add package L3D.Net
Building a L3D container
Simple builder exmaple.
Builder.NewLuminaire()
.WithTool("Example-Tool")
.AddGeometry("luminairePartName", "path/to/model.obj", GeometricUnits.m, geomOptions => geomOptions
.AddRectangularLightEmittingObject("lightEmittingPartName", 0.5, 0.25, leoOptions => leoOptions
.WithLightEmittingSurfaceOnParent(3)
)
)
.Build("path/to/new/container.l3d");
Reading a L3D container
Read an L3D container from disk:
var reader = new Reader();
var container = reader.ReadContainer("path/to/container.l3d");
foreach (var geometryPartDto in container.Parts)
{
// ...
var model = geometryPartDto.GeometryDefinition.Model;
foreach (var vertex in model.Vertices)
{
// .obj-Model vertices
}
// ...
foreach (var lightEmittingPartDto in geometryPartDto.LightEmittingObjects)
{
// do something for light emitting part
}
// ...
}
Read an L3D container already read from disk in byte array (byte[]) format:
var reader = new Reader();
byte[] l3dContainer = // Get a byte[] representation of an L3D container;
var container = reader.ReadContainer(l3dContainer);
foreach (var geometryPartDto in container.Parts)
{
// From here on out everything is identical to the reading an L3D container from disk example,
// see the code sample above.
}
Validating a L3D container
Validation of an L3D container from disk:
var validator = new Validator();
var validationResult = validator.ValidateContainer("path/to/container.l3d");
if (validationResult)
// Container validation successful
else
// Container validation unsuccessful
Validation of an L3D container already read from disk in byte array (byte[]) format:
var validator = new Validator();
byte[] l3dContainer = // Get a byte[] representation of an L3D container;
var validationResult = validator.ValidateContainer(l3dContainer);
if (validationResult)
// Container validation successful
else
// Container validation unsuccessful
Questions, Issues & Contribution
Please use the discussion section for questions or create issues, when something seems to be wrong. PRs are welcome.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- JeremyAnsel.Media.WavefrontObj (>= 3.0.23)
- Microsoft.Extensions.Logging.Abstractions (>= 7.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.15.1 | 128 | 5/6/2024 |
0.15.1-alpha.0.8 | 68 | 5/6/2024 |
0.15.0 | 273 | 6/1/2023 |
0.14.0 | 159 | 5/9/2023 |
0.13.0 | 195 | 4/5/2023 |
0.12.0 | 228 | 4/3/2023 |
0.11.0 | 246 | 3/7/2023 |
0.10.0 | 269 | 2/15/2023 |
0.9.3-preview.1.51 | 82 | 7/19/2023 |
0.9.3-preview.1 | 111 | 11/9/2022 |
0.9.2 | 441 | 5/25/2022 |
0.9.0 | 356 | 8/30/2021 |