Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

ngl3DSLoader Class Reference

#include <ngl3DSLoader.h>

List of all members.


Detailed Description

Autodesk 3D Studio file loader.

This class can load most static informations (no animations) from Autodesk 3DStudio files. Format supported are .3DS or .PRJ binary files, from revision 2 to 4. The loading process is event-driven : when the Load() method is invoked, the different callbacks are called, once by object instance (mesh, camera, material, light) and once for global settings (OnScene()).

The loader can currently parse only from a file. It has been tested against large and various files and is considered robust.

This code does not make any use of the (copyrighted) Autodesk SDK content. It is based on reverse engineering and consultation of the Wotsit.org documents. Autodesk and 3D Studio are trade marks registered by their respective owners.


Public Member Functions

Life cycle
 ngl3DSLoader (const nglPath &rFileName)
 ngl3DSLoader (nglFile *pFile)
virtual ~ngl3DSLoader ()
Loader interface
bool Load (int VerboseLevel=0)
virtual bool OnHeader (bool Is3DS, nglSize Size)
virtual bool OnMaterial (const ngl3DSMaterial &rMat)
virtual bool OnMesh (const ngl3DSMesh &rMesh)
virtual bool OnLight (const ngl3DSLight &rLight)
virtual bool OnCamera (const ngl3DSCamera &rCam)
virtual bool OnScene (const ngl3DSScene &rScene)


Constructor & Destructor Documentation

ngl3DSLoader::ngl3DSLoader const nglPath rFileName  ) 
 

ngl3DSLoader::ngl3DSLoader nglFile pFile  ) 
 

virtual ngl3DSLoader::~ngl3DSLoader  )  [virtual]
 


Member Function Documentation

bool ngl3DSLoader::Load int  VerboseLevel = 0  ) 
 

Start parsing.

Parameters:
VerboseLevel 
  • 0 : no output
  • 1 : show item list (with details)
  • 2 : show chunk tree
  • 3 : 1 and 2
If the file was succesfully parsed, returns true. If an error occured (malformed file, unexpected end of file, user break), returns false. The user can stop parsing by returning false from any of the callbacks. The output uses the "3ds" log domain of the application log.

virtual bool ngl3DSLoader::OnCamera const ngl3DSCamera rCam  )  [virtual]
 

New camera.

virtual bool ngl3DSLoader::OnHeader bool  Is3DS,
nglSize  Size
[virtual]
 

Check 3DS signature.

Parameters:
Is3DS 3DS signature found
Size data size in bytes
You can force loading even if Is3DS is false by returning true.

virtual bool ngl3DSLoader::OnLight const ngl3DSLight rLight  )  [virtual]
 

New light (omni or spot, NOT ambient).

virtual bool ngl3DSLoader::OnMaterial const ngl3DSMaterial rMat  )  [virtual]
 

New material.

virtual bool ngl3DSLoader::OnMesh const ngl3DSMesh rMesh  )  [virtual]
 

New mesh.

virtual bool ngl3DSLoader::OnScene const ngl3DSScene rScene  )  [virtual]
 

Global settings (called once).


Generated on Thu Feb 3 22:26:09 2005 for NGL by  doxygen 1.4.1