PathEngine home previous: iAnchorsAndPinnedShapes::pinnedShape_Vertex()next: iSolidObjects::convexSolid_Attribute()
Contents, API Reference, Interfaces, iSolidObjects

Interface iSolidObjects


An interface class for passing information about solid source geometry into PathEngine's 3D content processing functionality.

Refer to 3D Content Processing for information about PathEngine's 3D content processing functionality.

This interface is defined in SDKRoot/code/externalAPI/i_pathengine.h.



Returns the number of points in a convex solid object.


Returns the coordinates of a point in a convex solid object.


Returns the number of points in a convex solid object.


Returns the number of convex solids.

Example implementation

This interface can be implemented in different ways, depending on the specific content processing situation.

In situations where the relevant information is already included in some data structure, a wrapper class approach should be used.

In situations where a wrapper class is not straightforward to set up, a container class approach can be used.

In other situations, other implementations, such as procedural generation of points, could also make sense.

The following example implementation of the iSolidObjects interface, taken from the 3D content processing example project, is based on the 'container class' approach.

Note that attribute generation is not handled by this code.
Where face attributes are required the convexSolid_Attribute() method will also need to be filled in accordingly.

#include <vector>
#include <i_pathengine.h>

class cSolidObjects : public iSolidObjects
    std::vector<int32_t> _sizes;
    std::vector<const int32_t*> _dataPointers;


    void add(int32_t size, const int32_t* dataPointer)

// interface to iSolidObjects

    int32_t numberOfConvexSolids() const
        return static_cast<int32_t>(_sizes.size());
    int32_t convexSolid_Points(int32_t convexSolidIndex) const
        return _sizes[convexSolidIndex];
    convexSolid_Point(int32_t convexSolidIndex, int32_t pointIndex, int32_t& x, int32_t& y, int32_t& z) const
        x = _dataPointers[convexSolidIndex][pointIndex * 3];
        y = _dataPointers[convexSolidIndex][pointIndex * 3 + 1];
        z = _dataPointers[convexSolidIndex][pointIndex * 3 + 2];
    int32_t convexSolid_Attribute(int32_t convexSolidIndex, int32_t attributeIndex) const
        return -1;

Container class

A generic implementation of this interface, as a container class, can also be found at SDKRoot/code/sampleShared/SolidObjectsBuilder.h.

Documentation for PathEngine release 6.04 - Copyright © 2002-2024 PathEnginenext: iSolidObjects::convexSolid_Attribute()