Represents a 3D model stored in the Wavefront OBJ format.
More...
|
| ObjModel () |
| Initializes a new instance of the ObjModel class.
|
|
| ObjModel (Stream stream) |
| Initializes a new instance of the ObjModel class from the given stream.
|
|
| ObjModel (string fileName) |
| Initializes a new instance of the ObjModel class from the file with the given name.
|
|
List< Triangle > | ToTriangles () |
| Gets a global list of all the triangles in the object file.
|
|
string[] | GetMeshNameList () |
|
string[] | GetMaterialNameList () |
|
void | Load (Stream stream) |
| Loads the object file data from the given stream .
|
|
void | LoadMTL (Stream stream, bool leaveOpen=false) |
| Loads the obj material data from the given stream .
|
|
void | SaveMTL (Stream stream) |
| Saves the material data from the given stream .
|
|
void | Save (Stream stream) |
| Saves the data from the given stream .
|
|
void | Load (string fileName) |
| Loads the data from the given file.
|
|
void | Save (string fileName, bool saveMTL=true) |
| Saves the data to the given file.
|
|
void | SaveMTL (string fileName) |
| Saves the material data to the given file.
|
|
|
List< ObjMesh > | Meshes [get, set] |
| Gets or sets the list of meshes of the model.
|
|
List< ObjMaterial > | Materials [get, set] |
| Gets or sets the list of materials of the model.
|
|
Represents a 3D model stored in the Wavefront OBJ format.
◆ ObjModel() [1/3]
KclLibrary.ObjModel.ObjModel |
( |
| ) |
|
Initializes a new instance of the ObjModel class.
◆ ObjModel() [2/3]
KclLibrary.ObjModel.ObjModel |
( |
Stream | stream | ) |
|
Initializes a new instance of the ObjModel class from the given stream.
- Parameters
-
stream | The stream from which the instance will be loaded. |
◆ ObjModel() [3/3]
KclLibrary.ObjModel.ObjModel |
( |
string | fileName | ) |
|
Initializes a new instance of the ObjModel class from the file with the given name.
- Parameters
-
fileName | The name of the file from which the instance will be loaded. |
◆ GetMaterialNameList()
string[] KclLibrary.ObjModel.GetMaterialNameList |
( |
| ) |
|
◆ GetMeshNameList()
string[] KclLibrary.ObjModel.GetMeshNameList |
( |
| ) |
|
◆ Load() [1/2]
void KclLibrary.ObjModel.Load |
( |
Stream | stream | ) |
|
Loads the object file data from the given stream .
- Parameters
-
stream | The Stream to load the data from. |
leaveOpen | true to leave stream open after loading the instance. |
◆ Load() [2/2]
void KclLibrary.ObjModel.Load |
( |
string | fileName | ) |
|
Loads the data from the given file.
- Parameters
-
fileName | The name of the file to load the data from. |
◆ LoadMTL()
void KclLibrary.ObjModel.LoadMTL |
( |
Stream | stream, |
|
|
bool | leaveOpen = false ) |
Loads the obj material data from the given stream .
- Parameters
-
stream | The Stream to load the data from. |
leaveOpen | true to leave stream open after loading the instance. |
◆ Save() [1/2]
void KclLibrary.ObjModel.Save |
( |
Stream | stream | ) |
|
Saves the data from the given stream .
- Parameters
-
stream | The Stream to load the data from. |
◆ Save() [2/2]
void KclLibrary.ObjModel.Save |
( |
string | fileName, |
|
|
bool | saveMTL = true ) |
Saves the data to the given file.
- Parameters
-
fileName | The name of the file to load the data from. |
◆ SaveMTL() [1/2]
void KclLibrary.ObjModel.SaveMTL |
( |
Stream | stream | ) |
|
Saves the material data from the given stream .
- Parameters
-
stream | The Stream to load the data from. |
◆ SaveMTL() [2/2]
void KclLibrary.ObjModel.SaveMTL |
( |
string | fileName | ) |
|
Saves the material data to the given file.
- Parameters
-
fileName | The name of the file to load the data from. |
◆ ToTriangles()
List< Triangle > KclLibrary.ObjModel.ToTriangles |
( |
| ) |
|
Gets a global list of all the triangles in the object file.
- Returns
◆ _argSeparators
readonly char [] KclLibrary.ObjModel._argSeparators = new char[] { ' ' } |
|
staticprivate |
◆ _vertexSeparators
readonly char [] KclLibrary.ObjModel._vertexSeparators = new char[] { '/' } |
|
staticprivate |
◆ Materials
Gets or sets the list of materials of the model.
◆ Meshes
List<ObjMesh> KclLibrary.ObjModel.Meshes |
|
getset |
Gets or sets the list of meshes of the model.
The documentation for this class was generated from the following file: