UnityMol  0.9.6-875
UnityMol viewer / In developement
OBJ Class Reference
+ Inheritance diagram for OBJ:
+ Collaboration diagram for OBJ:

Classes

class  MaterialData
 

Public Member Functions

 OBJ ()
 
 OBJ (TextReader reader)
 
 OBJ (TextReader reader, TextReader mtl_reader)
 
 OBJ (string path)
 
 OBJ (string path, string mtl_path)
 
void Load ()
 

Public Attributes

string objPath
 

Properties

bool hasMaterials [get]
 

Private Member Functions

void SetGeometryData (string data)
 
float cf (string v)
 
int ci (string v)
 
void SetMaterialData (string data)
 
Material GetMaterial (MaterialData md)
 
Color gc (string[] p)
 
void Build ()
 

Private Attributes

TextReader sr
 
TextReader mtl_reader = null
 
int compteurvertice = 0
 
const string O = "o"
 
const string G = "g"
 
const string V = "v"
 
const string VT = "vt"
 
const string VN = "vn"
 
const string F = "f"
 
const string MTL = "mtllib"
 
const string UML = "usemtl"
 
const string NML = "newmtl"
 
const string NS = "Ns"
 
const string KA = "Ka"
 
const string KD = "Kd"
 
const string KS = "Ks"
 
const string D = "d"
 
const string TR = "Tr"
 
const string ILLUM = "illum"
 
const string MAP_KD = "map_Kd"
 
string mtllib
 
GeometryBuffer buffer
 
List< MaterialDatamaterialData
 

Detailed Description

Definition at line 84 of file OBJ.cs.

Constructor & Destructor Documentation

OBJ.OBJ ( )

Definition at line 117 of file OBJ.cs.

OBJ.OBJ ( TextReader  reader)

Definition at line 124 of file OBJ.cs.

OBJ.OBJ ( TextReader  reader,
TextReader  mtl_reader 
)

Definition at line 130 of file OBJ.cs.

References mtl_reader.

OBJ.OBJ ( string  path)

Definition at line 136 of file OBJ.cs.

OBJ.OBJ ( string  path,
string  mtl_path 
)

Definition at line 143 of file OBJ.cs.

Member Function Documentation

void OBJ.Build ( )
private

Definition at line 365 of file OBJ.cs.

References SurfaceManager.addSurface(), GetMaterial(), SurfaceManager.getParentGameObject(), UnityMolMain.getSurfaceManager(), hasMaterials, OBJ.MaterialData.name, GeometryBuffer.numObjects, GeometryBuffer.PopulateMeshes(), and SurfaceManager.surfaceInitialized.

Referenced by Load().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

float OBJ.cf ( string  v)
private

Definition at line 264 of file OBJ.cs.

Referenced by gc(), SetGeometryData(), and SetMaterialData().

+ Here is the caller graph for this function:

int OBJ.ci ( string  v)
private

Definition at line 268 of file OBJ.cs.

Referenced by SetGeometryData(), and SetMaterialData().

+ Here is the caller graph for this function:

Color OBJ.gc ( string[]  p)
private

Definition at line 361 of file OBJ.cs.

References cf().

Referenced by SetMaterialData().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Material OBJ.GetMaterial ( MaterialData  md)
private

Definition at line 338 of file OBJ.cs.

References OBJ.MaterialData.diffuse, OBJ.MaterialData.diffuseTex, OBJ.MaterialData.illumType, and OBJ.MaterialData.shininess.

Referenced by Build().

+ Here is the caller graph for this function:

void OBJ.Load ( )

Definition at line 149 of file OBJ.cs.

References Build(), OBJ.MaterialData.diffuseTex, OBJ.MaterialData.diffuseTexPath, hasMaterials, materialData, mtl_reader, SetGeometryData(), SetMaterialData(), and sr.

Referenced by ParsePDB.LoadOBJRequest(), and ParseData.ParsePDB.RequestPDB.LoadOBJWWW().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void OBJ.SetGeometryData ( string  data)
private

Definition at line 189 of file OBJ.cs.

References cf(), ci(), GeometryBuffer.PushFace(), GeometryBuffer.PushGroup(), GeometryBuffer.PushMaterialName(), GeometryBuffer.PushNormal(), GeometryBuffer.PushObject(), GeometryBuffer.PushUV(), GeometryBuffer.PushVertex(), FaceIndices.vi, FaceIndices.vn, and FaceIndices.vu.

Referenced by Load().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void OBJ.SetMaterialData ( string  data)
private

Definition at line 293 of file OBJ.cs.

References cf(), ci(), and gc().

Referenced by Load().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

GeometryBuffer OBJ.buffer
private

Definition at line 114 of file OBJ.cs.

int OBJ.compteurvertice = 0
private

Definition at line 89 of file OBJ.cs.

const string OBJ.D = "d"
private

Definition at line 107 of file OBJ.cs.

const string OBJ.F = "f"
private

Definition at line 97 of file OBJ.cs.

const string OBJ.G = "g"
private

Definition at line 93 of file OBJ.cs.

const string OBJ.ILLUM = "illum"
private

Definition at line 109 of file OBJ.cs.

const string OBJ.KA = "Ka"
private

Definition at line 104 of file OBJ.cs.

const string OBJ.KD = "Kd"
private

Definition at line 105 of file OBJ.cs.

const string OBJ.KS = "Ks"
private

Definition at line 106 of file OBJ.cs.

const string OBJ.MAP_KD = "map_Kd"
private

Definition at line 110 of file OBJ.cs.

List<MaterialData> OBJ.materialData
private

Definition at line 280 of file OBJ.cs.

Referenced by Load().

const string OBJ.MTL = "mtllib"
private

Definition at line 98 of file OBJ.cs.

TextReader OBJ.mtl_reader = null
private

Definition at line 88 of file OBJ.cs.

Referenced by Load(), and OBJ().

string OBJ.mtllib
private

Definition at line 113 of file OBJ.cs.

const string OBJ.NML = "newmtl"
private

Definition at line 102 of file OBJ.cs.

const string OBJ.NS = "Ns"
private

Definition at line 103 of file OBJ.cs.

const string OBJ.O = "o"
private

Definition at line 92 of file OBJ.cs.

string OBJ.objPath

Definition at line 86 of file OBJ.cs.

TextReader OBJ.sr
private

Definition at line 87 of file OBJ.cs.

Referenced by Load().

const string OBJ.TR = "Tr"
private

Definition at line 108 of file OBJ.cs.

const string OBJ.UML = "usemtl"
private

Definition at line 99 of file OBJ.cs.

const string OBJ.V = "v"
private

Definition at line 94 of file OBJ.cs.

const string OBJ.VN = "vn"
private

Definition at line 96 of file OBJ.cs.

const string OBJ.VT = "vt"
private

Definition at line 95 of file OBJ.cs.

Property Documentation

bool OBJ.hasMaterials
getprivate

Definition at line 273 of file OBJ.cs.

Referenced by Build(), and Load().


The documentation for this class was generated from the following file: