Torque3D Documentation / _generateds / SilhouetteExtractorPerspective

SilhouetteExtractorPerspective

Engine/source/math/mSilhouetteExtractor.h

Silhouette edge extraction for perspective projections.

More...

Protected Attributes

The actual extractor implementation.

Public Functions

extractSilhouette(const MatrixF & camView, U32 * outIndices, U32 maxOutIndices)

Generate a silhouette polygon for this polyhedron based on the transforms.

Detailed Description

Silhouette edge extraction for perspective projections.

Protected Types

typedef SilhouetteExtractorImpl< SilhouetteExtractorBasePerspective< Polyhedron > > ExtractorType 

Protected Attributes

ExtractorType mExtractor 

The actual extractor implementation.

Public Functions

SilhouetteExtractorPerspective(const Polyhedron & polyhedron)

extractSilhouette(const MatrixF & camView, U32 * outIndices, U32 maxOutIndices)

Generate a silhouette polygon for this polyhedron based on the transforms.

Parameters:

camView

View->object matrix.

outIndices

Array where the resulting vertex indices will be stored. Must have enough room. If you don't know the exact size that you need, just allocate one index for any point in the mesh.

maxOutIndices

The number of indices that can be stored in outIndices. If insufficient, the return value will be 0.

return:

Number of indices written to outIndices.

note:

Be aware that silhouette polygons are in most cases non-planar!

note:

The direction of the ordering of the resulting indices is undefined meaning that different silhouettes extracted from the same polyhedron may have different CCW/CW ordering. The only guarantee is that the resulting indices are consecutive.