PathEngine home previous: iPathEngine::loadFederation()next: iPathEngine::loadSourceTiling()
Contents, API Reference, Interfaces, iPathEngine, loadMeshFromBuffer

iPathEngine::loadMeshFromBuffer()

Description

Constructs an iMesh object from a data buffer containing a 3d ground mesh.

Syntax

iMesh* loadMeshFromBuffer(const char* format, const char* dataBuffer, tUnsigned32 bufferSize, const char *const* options);

Parameters

format A C string specifying the format of the data in the buffer. Currently this can be "xml" or "tok" (lower case).
This format string is not retained after the call and can subsequently be safely deleted.
dataBufferA byte buffer. This buffer is not retained after the call and can subsequently be safely deleted.
bufferSizeThe size of the buffer pointed to by dataBuffer, in bytes.
options A set of attribute and value pairs that can be used to control some aspects of the mesh loading process.

Return Value

If the data passed in is valid then a newly created Interface iMesh object is returned.
Otherwise non-fatal errors will be reported relating to the validation failure and zero will be returned.

Remarks

Refer to Mesh Loading Options for a list of options that can be passed in to this method.

"xml" indicates that the buffer should be parsed as XML.
See XML Ground Meshes for details about the XML mesh format.

"tok" indicates that the buffer should be treated as tokenised XML.
Tokenised XML represents the same structure as XML but results in a smaller file size. See Tokenised XML for details.

The created Interface iMesh can be explicitly deleted when no longer required, but will also be deleted if iPathEngine::deleteAllObjects() is called - in either case the pointer can no longer be used. Any meshes not deleted will be cleaned up automatically when PathEngine is shut down.

See Also

Interface iMesh iPathEngine::loadMeshFromBuffer(), iPathEngine::deleteAllObjects()
Documentation for PathEngine release 5.24 - Copyright © 2002-2010 PathEnginenext: iPathEngine::loadSourceTiling()