|
AsImpL 1.0
Asynchronous Importer and run-time Loader for Unity
|
Data set for storing data in a neutral format for a generic model More...
Classes | |
| class | FaceGroupData |
| Container class for faces group data. More... | |
| struct | FaceIndices |
| Indices for each vertex More... | |
| class | ObjectData |
| Container class for object data. More... | |
Public Member Functions | |
| DataSet () | |
| Constructor: create data lists and initialzize the default object. More... | |
| void | AddObject (string objectName) |
| Add and initialize a new object. More... | |
| void | AddGroup (string groupName) |
| Add and initialize a new group and add it to the current object. More... | |
| void | AddMaterialName (string matName) |
| Set a new material name to the current group (add a group if not yet added). More... | |
| void | AddVertex (Vector3 vertex) |
| Add a vertex to the global vertex list More... | |
| void | AddUV (Vector2 uv) |
| Add a texture coordinate (U,V) to the global list More... | |
| void | AddNormal (Vector3 normal) |
| Add a new normal to the global list More... | |
| void | AddColor (Color color) |
| Add a new color to the global list More... | |
| void | AddFaceIndices (FaceIndices faceIdx) |
| Add a new face indices entry to the current faces group More... | |
| void | PrintSummary () |
| Print a summary of the stored data More... | |
Static Public Member Functions | |
| static string | GetFaceIndicesKey (FaceIndices fi) |
| Get a string key based on the given face indices More... | |
| static string | FixMaterialName (string mtlName) |
| Change the material name to be compliant with Unity material asset naming. More... | |
Public Attributes | |
| List< ObjectData > | objectList = new List<ObjectData>() |
| List of objects More... | |
| List< Vector3 > | vertList = new List<Vector3>() |
| List of vertices More... | |
| List< Vector2 > | uvList = new List<Vector2>() |
| List of texture coordinates (UV) More... | |
| List< Vector3 > | normalList = new List<Vector3>() |
| List of normals More... | |
| List< Color > | colorList = new List<Color>() |
| List of colors More... | |
Properties | |
| string? | CurrGroupName [get] |
| Name of the current group. More... | |
| bool | IsEmpty [get] |
| Check if there is no vertex defined. More... | |
Data set for storing data in a neutral format for a generic model
This should be completed and extended to support more formats.
TODO: Classes to hold data for internal hierarchy should be defined.
| AsImpL.DataSet.DataSet | ( | ) |
Constructor: create data lists and initialzize the default object.
| void AsImpL.DataSet.AddColor | ( | Color | color | ) |
Add a new color to the global list
| color | color |
| void AsImpL.DataSet.AddFaceIndices | ( | FaceIndices | faceIdx | ) |
Add a new face indices entry to the current faces group
| faceIdx | new vertex indices |
| void AsImpL.DataSet.AddGroup | ( | string | groupName | ) |
Add and initialize a new group and add it to the current object.
| groupName | name of the new group |
| void AsImpL.DataSet.AddMaterialName | ( | string | matName | ) |
Set a new material name to the current group (add a group if not yet added).
| matName | name of the new material |
TODO: do not split by materials if there is only one meterial
| void AsImpL.DataSet.AddNormal | ( | Vector3 | normal | ) |
Add a new normal to the global list
| normal | normal |
| void AsImpL.DataSet.AddObject | ( | string | objectName | ) |
Add and initialize a new object.
| objectName | name of the new object |
| void AsImpL.DataSet.AddUV | ( | Vector2 | uv | ) |
Add a texture coordinate (U,V) to the global list
| uv | texture coordinate (U,V) |
| void AsImpL.DataSet.AddVertex | ( | Vector3 | vertex | ) |
Add a vertex to the global vertex list
| vertex | new vertex |
|
static |
Change the material name to be compliant with Unity material asset naming.
| mtlName | original material name |
|
static |
Get a string key based on the given face indices
| fi | face indices structure |
| void AsImpL.DataSet.PrintSummary | ( | ) |
Print a summary of the stored data
| List<Color> AsImpL.DataSet.colorList = new List<Color>() |
List of colors
| List<Vector3> AsImpL.DataSet.normalList = new List<Vector3>() |
List of normals
| List<ObjectData> AsImpL.DataSet.objectList = new List<ObjectData>() |
List of objects
| List<Vector2> AsImpL.DataSet.uvList = new List<Vector2>() |
List of texture coordinates (UV)
| List<Vector3> AsImpL.DataSet.vertList = new List<Vector3>() |
List of vertices
|
get |
Name of the current group.
|
get |
Check if there is no vertex defined.