Torque 3D 3.8
ContentsIndexHome
PreviousUpNext
MathUtils::clipFrustumByPolygon Function
Syntax
C++
bool clipFrustumByPolygon(const Point3F* points, U32 numPoints, const RectI& viewport, const MatrixF& world, const MatrixF& projection, const Frustum& inFrustum, const Frustum& rootFrustum, Frustum& outFrustum);

Clip @a inFrustum by the given polygon. 

@note The input polygon is limited to 58 vertices. 

@param points Polygon vertices. @param numPoints Number of vertices in @a points. @param viewport Screen viewport. Note that this corresponds to the root frustum and not necessarily to @a inFrustum. @param world World->view transform. @param projection Projection matrix. @param inFrustum Frustum to clip. @param rootFrustum Frustum corresponding to @a viewport. @param outFrustum Resulting clipped frustum. 

@return True if the frustum was successfully clipped and @a outFrustum is valid, false otherwise (if, for example, the input polygon is completely outside @a inFrustum). 

 

Copyright (c) 2015. All rights reserved.
What do you think about this topic? Send feedback!