PathEngine home previous: iContentChunk::hasRefs()next: iContentChunk::instantiate_FloatRotateAndScale()
Contents, API Reference, Interfaces, iContentChunk, instantiate

iContentChunk::instantiate()

Description

Used to place instances of content chunk geometry into the world. The instance objects generated can then be used to drive PathEngine's content processing functionality, and to place anchors and shapes against the resulting ground mesh.

Syntax

std::unique_ptr<iContentChunkInstance> instantiate(int32_t rotation, int32_t scale, int32_t translationX, int32_t translationY, float translationZ, int32_t sectionID)

Parameters

rotation Integer value in the range 0 to 63 specifying a quantised rotation around the z axis (in a clockwise direction as seen from above).
A value of 0 indicates no rotation, 16 indicates a 90 degree rotation, and so on.
scaleInteger scale factor.
translationXX origin for the instantiated geometry.
translationYY origin for the instantiated geometry.
translationZZ origin for the instantiated geometry.
sectionID If any value other than -1 is given for this parameter then the sectionID attribute for all faces in the resulting instance's ground geometry will be set to this value (overriding any attributes in the original ground geometry).
Set this parameter to -1 if you wish the sectionID attributed in the original geometry to be passed through unchanged.

Return Value

A pointer to a lightweight API object to represent an instance of this content chunk at the specific position and orientation.

Remarks

The instance objects generated are implemented in terms of references back to the base content chunk geometry, and are therefore very lightweight.

This version of the instantiate method restricts the possibilites for rotation and scaling in order to enable content chunks to be effectively pre-validated on creation.
For more flexible rotation and scaling you can use iContentChunk::instantiate_FloatRotateAndScale().

C# Mapping

ContentChunkInstance instantiate(int rotation, int scale, int translationX, int translationY, float translationZ, int sectionID);

Java Mapping

ContentChunkInstance instantiate(int rotation, int scale, int translationX, int translationY, float translationZ, int sectionID);

Documentation for PathEngine release 6.04 - Copyright © 2002-2024 PathEnginenext: iContentChunk::instantiate_FloatRotateAndScale()