Twilight Princess
Remastered version of the GameCube game
Loading...
Searching...
No Matches
KclLibrary.ObjModel Class Reference

Represents a 3D model stored in the Wavefront OBJ format. More...

Public Member Functions

 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< TriangleToTriangles ()
 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.
 

Properties

List< ObjMeshMeshes [get, set]
 Gets or sets the list of meshes of the model.
 
List< ObjMaterialMaterials [get, set]
 Gets or sets the list of materials of the model.
 

Static Private Attributes

static readonly char[] _argSeparators = new char[] { ' ' }
 
static readonly char[] _vertexSeparators = new char[] { '/' }
 

Detailed Description

Represents a 3D model stored in the Wavefront OBJ format.

Constructor & Destructor Documentation

◆ 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
streamThe 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
fileNameThe name of the file from which the instance will be loaded.

Member Function Documentation

◆ 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
streamThe Stream to load the data from.
leaveOpentrue 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
fileNameThe 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
streamThe Stream to load the data from.
leaveOpentrue 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
streamThe 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
fileNameThe 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
streamThe Stream to load the data from.

◆ SaveMTL() [2/2]

void KclLibrary.ObjModel.SaveMTL ( string fileName)

Saves the material data to the given file.

Parameters
fileNameThe 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

Member Data Documentation

◆ _argSeparators

readonly char [] KclLibrary.ObjModel._argSeparators = new char[] { ' ' }
staticprivate

◆ _vertexSeparators

readonly char [] KclLibrary.ObjModel._vertexSeparators = new char[] { '/' }
staticprivate

Property Documentation

◆ Materials

List<ObjMaterial> KclLibrary.ObjModel.Materials
getset

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: