PathEngine home previous: iMesh::shapeHasPathfind6Preprocess()next: iMesh::storeNamedObstacle()
Contents, API Reference, Interfaces, iMesh, storeAnchor



Intended for use when building content. Associates a position and orientation with a string ID.


void storeAnchor(const char* id, const cPosition& position, int32_t orientation);


id A unique anchor ID for the given position.
This pointer is not retained after the method exits and may subsequently be safely deleted.
position This must be a valid cPosition on this mesh.
orientation Orientation for the anchor, represented as an integer.
See PathEngine Angles for details.


If you attempt to use the same ID twice then a non-fatal error will be emitted and no anchor stored.
Use iMesh::retrieveAnchor() if you need to check whether a string has already been used.

If you pass in an explicitly invalid position then a non-fatal error will be emitted and the position not stored.

Anchors are saved out with the mesh when you call iMesh::saveGroundEx().
This means that you can resolve positions in your world editor. Report any errors in position resolution directly to your content creators at this stage. Then lookup the positions with iMesh::retrieveAnchor() after the mesh is loaded.
The Max exporter plugin does this.

See Also

iMesh::storeAnchor(), iMesh::retrieveAnchor(), iMesh::getNumberOfAnchors(), iMesh::retrieveAnchorByIndex(), iMesh::positionFor3DPoint()

C# Mapping

void storeAnchor(string id, PathEngine.Position position, int orientation);

Java Mapping

void storeAnchor(String id, Position position, int orientation);

Documentation for PathEngine release 6.03 - Copyright © 2002-2021 PathEnginenext: iMesh::storeNamedObstacle()