PathEngine home previous: iPathEngine::loadSourceTiling()next: iPathEngine::newShape()
Contents, API Reference, Interfaces, iPathEngine, newContentChunk

iPathEngine::newContentChunk()

Description

Constructs a content chunk object which can then be saved out and later loaded for instantiation in a separate content tool.

Syntax

iContentChunk* newContentChunk(const iFaceVertexMesh* ground, const iAnchorsAndPinnedShapes* anchorsAndShapes, const char *const* attributes);

Parameters

ground Pointer to an object derived from iFaceVertexMesh, defining the ground elements of the content chunk.
A null pointer may be passed into this argument to indicate that a content chunk has no ground component.
Otherwise, this ground component must be non-empty (i.e. ground->faces() must not be zero).
The client application remains responsible for deleting this object. The information provided by this callback is copied on content chunk creation, and PathEngine does not retain a pointer to this object after the method call completes.
anchorsAndShapes Pointer to an object derived from iAnchorsAndPinnedShapes, defining the set of anchors and pinned shape associated with the content chunk.
A null pointer may be passed into this argument to indicate that a content chunk has no anchors and shapes component.
Otherwise, this anchors and shapes component must be non-empty (i.e. anchorsAndShapes->numberOfAnchors() must not be zero).
The client application remains responsible for deleting this object. The information provided by this callback is copied on content chunk creation, and PathEngine does not retain a pointer to this object after the method call completes.
attributes A set of attribute and value pairs that can be used to control the behaviour of the newly constructed content chunk.

Return Value

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

Remarks

Content chunks cannot be empty.
In other words, either a ground, or anchors and shapes component must be specified.

See Also

iContentChunk::save(), iPathEngine::loadContentChunk()

C# Mapping

ContentChunk newContentChunk(FaceVertexMesh ground, AnchorsAndPinnedShapes anchorsAndShapes, string[] attributes);

Java Mapping

ContentChunk newContentChunk(FaceVertexMesh ground, AnchorsAndPinnedShapes anchorsAndShapes, String[] attributes);

Documentation for PathEngine release 6.00 - Copyright © 2002-2016 PathEnginenext: iPathEngine::newShape()