C3DMesh::Load3DS

Top  Previous  Next

Syntax:

 

Load3DS(C3DScreen pScreen, string  filename, int  bSeparate), int

 

Purpose:

Loads a mesh from a 3D Studio format mesh file.

 

Parameters:

pScreen - A C3DScreen object.

filename - Filename of the 3DS file to load.

bSeparate - Whether to combine all models or not.

 

Returned value(s):

TRUE if the mesh could be loaded, FALSE otherwise.

 

Application:

if Mesh3.Load3DS(s, GETSTARTPATH + "park.3ds",FALSE)
    mesh3.BuildOctree(500,4)
    'initialize the collision system for this mesh
    mesh3.InitCollision(FALSE)
endif

 

Class Hierarchy

C3DObject

-------C3DMesh

 

Additional Info:

.3DS files can contain multiple model and texture references.  If bSeparate is FALSE then all models in the file are combined into a single mesh while still maintaining correct orientation of the original models.  If bSeparate is TRUE then the models are placed into separate objects in an internal hierarchy allowing multi texturing to work properly. Separating the models requires more memory but no extra effort to draw or position the total mesh object.

 

If using octrees to determine visibility then you should use bSeparate as FALSE to allow a complete octree to be contstructed.