| PathEngine home | previous: | next: |
Two kinds of input data can be passed into the 3D content processing: 'polygon soup' data, in the form of tri meshes, and convex solids, in the form of 'point clouds'.
Polygon soup is passed into the 3D content processing through
application-side wrapper classes derived from the
iFaceVertexMesh
interface class.
This is the same interface class that is used for passing source geometry into the 2D content processing, so refer to this page for more details about setting this up.
In contrast to the geometry passed in to the 2D content processing, this polygon soup data has no validation constraints (except for range constraints - see below) and zero area or downward facing tris are permitted.
Convex solids are passed into the 3D content processing as a sequence of point clouds.
The 3D content processing will generate a convex hull for each of these point
clouds, and treat the contained volume as an obstructed solid.
This input representation eliminates the need for validation constraints on the solid object geometry
(except for range constraints - see below),
since PathEngine takes care of generating correct volumes for each point cloud.
Where necessary, points with unit offsets will be added to ensure that each solid has non-zero volume.
The point clouds are passed into the 3D content processing through
an application-side implementation of the
iSolidObjects
interface class.
The following example implementation of the iSolidObjects interface is taken from the 3D content processing example project:
class cSolidObjects : public iSolidObjects
{
std::vector<tSigned32> _sizes;
std::vector<const tSigned32*> _dataPointers;
public:
void add(tSigned32 size, const tSigned32* dataPointer)
{
_sizes.push_back(size);
_dataPointers.push_back(dataPointer);
}
// interface to iSolidObjects
tSigned32 numberOfConvexSolids() const
{
return static_cast<tSigned32>(_sizes.size());
}
tSigned32 convexSolid_Points(tSigned32 convexSolidIndex) const
{
return _sizes[convexSolidIndex];
}
void
convexSolid_Point(tSigned32 convexSolidIndex, tSigned32 pointIndex, tSigned32& x, tSigned32& y, tSigned32& z) const
{
x = _dataPointers[convexSolidIndex][pointIndex * 3];
y = _dataPointers[convexSolidIndex][pointIndex * 3 + 1];
z = _dataPointers[convexSolidIndex][pointIndex * 3 + 2];
}
tSigned32 convexSolid_Attribute(tSigned32 convexSolidIndex, tSigned32 attributeIndex) const
{
return -1;
}
};
|
Any run-time
Coordinates for all points in the input data
must lie within PathEngine's supported world coordinate range.
(See
In the case of objects, or faces, with points outside the supported range, PathEngine will emit a non fatal error, and the relevant objects or faces will be skipped.
| Documentation for PathEngine release 5.16 - Copyright © 2002-2008 PathEngine | next: |