![]() |
VOOZH | about |
dotnet add package JeremyAnsel.Media.WavefrontObj --version 3.0.74
NuGet\Install-Package JeremyAnsel.Media.WavefrontObj -Version 3.0.74
<PackageReference Include="JeremyAnsel.Media.WavefrontObj" Version="3.0.74" />
<PackageVersion Include="JeremyAnsel.Media.WavefrontObj" Version="3.0.74" />Directory.Packages.props
<PackageReference Include="JeremyAnsel.Media.WavefrontObj" />Project file
paket add JeremyAnsel.Media.WavefrontObj --version 3.0.74
#r "nuget: JeremyAnsel.Media.WavefrontObj, 3.0.74"
#:package JeremyAnsel.Media.WavefrontObj@3.0.74
#addin nuget:?package=JeremyAnsel.Media.WavefrontObj&version=3.0.74Install as a Cake Addin
#tool nuget:?package=JeremyAnsel.Media.WavefrontObj&version=3.0.74Install as a Cake Tool
👁 Build status
👁 Code coverage
👁 NuGet Version
👁 License
JeremyAnsel.Media.WavefrontObj is a .Net library to handle Wavefront Obj .obj and .mtl files.
// Sample: read an obj file with textures.
// The obj file (.obj) contains the geometry of the 3d object. The material file (.mtl) defines the textures.
// open an obj file
ObjFile objFile = ObjFile.FromFile("objfile.obj");
// open the associated material file
ObjMaterialFile objMaterialFile = ObjMaterialFile.FromFile("objfile.mtl");
// Get the materials
foreach (ObjMaterial material in objMaterialFile.Materials)
{
// name of the material
string? name = material.Name;
// filename of the texture
string? filename = material.DiffuseMap?.FileName;
}
// The 3d geometry contains faces, vertices, normals, and texture coordinates.
// The vertices, normals, and texture coordinates are defined in global lists.
// The faces contain indices to these lists. The indices start at 1.
// Get the vertices
foreach (ObjVertex v in objFile.Vertices)
{
// a vertex has a position and an optional color
ObjVector4 position = v.Position;
ObjVector4? color = v.Color;
}
// Get the normals
foreach (ObjVector3 v in objFile.VertexNormals)
{
}
// Get the texture coordinates
foreach (ObjVector3 v in objFile.TextureVertices)
{
}
// Get the faces
foreach (ObjFace face in objFile.Faces)
{
// name of the texture as defined in the material file
// face.MaterialName is the name of the material as in material.Name
string? textureName = face.MaterialName;
// points of the face
// for a triangle there are 3 points
// for a quad there are 4 points
// there can be more points for a polygon
List<ObjTriplet> points = face.Vertices;
foreach (ObjTriplet point in points)
{
// index into the global vertices list
int vertexIndex = point.Vertex - 1;
// index into the global normals list
int normalIndex = point.Normal - 1;
// index into the global texture coordinates list
int textureCoordinatesIndex = point.Texture - 1;
}
}
An invalid index is 0. In the specs an index can be positive or negative. Positive means that the index starts at the beginning of the global list. Negative means that the index starts at the end of the list. While reading the library converts negative indices to positive indices. That is why the invalid index is 0.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 is compatible. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 netcoreapp2.0 was computed. netcoreapp2.1 netcoreapp2.1 was computed. netcoreapp2.2 netcoreapp2.2 was computed. netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 netstandard2.0 is compatible. netstandard2.1 netstandard2.1 was computed. |
| .NET Framework | net461 net461 was computed. net462 net462 was computed. net463 net463 was computed. net47 net47 was computed. net471 net471 was computed. net472 net472 was computed. net48 net48 is compatible. net481 net481 was computed. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen40 tizen40 was computed. tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
Showing the top 3 NuGet packages that depend on JeremyAnsel.Media.WavefrontObj:
| Package | Downloads |
|---|---|
|
BE32.Marathon
A library for SONIC THE HEDGEHOG (2006) file formats. |
|
|
L3D.Net
L3D XML serializer, validator, builder and .l3d container reader |
|
|
Tx.BimObj
Tx.BimObj是.NET的Bim数据传输库。有疑问发作者邮箱(QQ号)tengxuetech@qq.com,欢迎加入qq群694541328参与讨论。如果对你的学习和工作有帮助,希望能对作者捐助资金用于项目完善,捐助方式:支付宝账号tian_teng@qq.com。 |
Showing the top 1 popular GitHub repositories that depend on JeremyAnsel.Media.WavefrontObj:
| Repository | Stars |
|---|---|
|
freezy/VisualPinball.Engine
:video_game: Visual Pinball Engine for Unity
|
| Version | Downloads | Last Updated |
|---|---|---|
| 3.0.74 | 343 | 2/21/2026 |
| 3.0.72 | 126 | 2/21/2026 |
| 3.0.68 | 714 | 12/1/2025 |
| 3.0.64 | 473 | 11/10/2025 |
| 3.0.62 | 277 | 11/10/2025 |
| 3.0.58 | 1,052 | 8/21/2025 |
| 3.0.56 | 1,178 | 4/23/2025 |
| 3.0.54 | 204 | 4/12/2025 |
| 3.0.53 | 227 | 4/11/2025 |
| 3.0.52 | 202 | 4/11/2025 |
| 3.0.50 | 2,003 | 3/29/2025 |
| 3.0.49 | 189 | 3/29/2025 |
| 3.0.47 | 229 | 3/28/2025 |
| 3.0.46 | 431 | 3/13/2025 |
| 3.0.44 | 232 | 2/24/2025 |
| 3.0.42 | 188 | 2/24/2025 |
| 3.0.39 | 11,119 | 9/22/2024 |
| 3.0.38 | 7,253 | 7/28/2024 |
| 3.0.37 | 183 | 7/28/2024 |
| 3.0.36 | 446 | 4/26/2024 |