My favorites
▼
|
Sign in
managed-assimp
A c# managed wrapper for the Open Asset Importer
Project Home
Downloads
Wiki
Issues
Source
Export to GitHub
READ-ONLY: This project has been
archived
. For more information see
this post
.
Search
Search within:
All issues
Open issues
New issues
Issues to verify
for
Advanced search
Search tips
Subscriptions
Issue
2
attachment: mesh_sname.diff
(2.3 KB)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
Index: Open Asset Importer Managed Wrapper/Wrappers/Mesh.cs
===================================================================
--- Open Asset Importer Managed Wrapper/Wrappers/Mesh.cs (Revision 4)
+++ Open Asset Importer Managed Wrapper/Wrappers/Mesh.cs (Arbeitskopie)
@@ -64,6 +64,11 @@
#region Properties
/// <summary>
+ /// The name of the mesh. May be empty.
+ /// </summary>
+ private String sName = null;
+
+ /// <summary>
/// Contains normal vectors in a continuous float array, xyz order. Can't be <code>null</code>
/// </summary>
private aiVector3D[] tVertices = null;
@@ -133,6 +138,9 @@
this.iPrimitiveTypes = tMesh.mPrimitiveTypes;
this.iMaterialIndex = tMesh.mMaterialIndex;
+ // Note that with strings, prepending an empty string "" forces a copy.
+ this.sName = "" + tMesh.mName.data;
+
// Marshal the arrays of vertices,
tVertices = UnmanagedAssimp.MarshalArray<aiVector3D>(new IntPtr(tMesh.mVertices), tMesh.mNumVertices);
tNormals = UnmanagedAssimp.MarshalArray<aiVector3D>(new IntPtr(tMesh.mNormals), tMesh.mNumVertices);
@@ -276,6 +284,15 @@
return tVertices.Length;
}
+ /// <summary>
+ /// Get the name of this mesh.
+ /// </summary>
+ /// <returns>The name of this mesh. May be empty.</returns>
+ public String getName()
+ {
+ return sName;
+ }
+
/// <summary>
/// Get the number of faces in the model.
/// </summary>
Index: Open Asset Importer Managed Wrapper/Common/Unmanaged.cs
===================================================================
--- Open Asset Importer Managed Wrapper/Common/Unmanaged.cs (Revision 4)
+++ Open Asset Importer Managed Wrapper/Common/Unmanaged.cs (Arbeitskopie)
@@ -777,6 +777,11 @@
public uint mMaterialIndex;
/// <summary>
+ /// The name of the mesh. May be empty.
+ /// </summary>
+ public aiString mName;
+
+ /// <summary>
/// The maximum number of colour sets a mesh can have.
/// </summary>
public const int AI_MAX_NUMBER_OF_COLOR_SETS = 4;
Powered by
Google Project Hosting