This consist of a center point (origin), a frustum polygon in 3D space (relative to center point) and a plane. The planes which go through the center and every edge of the polygon form the frustum. The plane is the back plane of the frustum. It is also possible to have an infinite frustum in which case the polygon will be NULL (not specified). The back plane can also be NULL.
Clip a frustum (defined from 0,0,0 origin) to the given plane.
This routine will also fill an array of clipinfo so that you can use this information to correctly interpolate information related to the vertex (like texture mapping coordinates). Note that clipinfo needs to be preinitialized correctly with CS_CLIPINFO_ORIGINAL instances and correct indices.
Clip a frustum (defined from 0,0,0 origin) to the given plane (defined as 0-v1-v2).
This routine will also fill an array of clipinfo so that you can use this information to correctly interpolate information related to the vertex (like texture mapping coordinates). Note that clipinfo needs to be preinitialized correctly with CS_CLIPINFO_ORIGINAL instances and correct indices.
The point and frustum are relative to (0,0,0). Note that this function does not work correctly if the point is in the other direction from the average direction of the frustum.
The triangle is given relative to the center point (origin) of this frustum.
Returns a new frustum which exactly covers the intersection of the triangle with the frustum (i.e. the smallest frustum which is part of this frustum and which 'sees' exactly the same of the given polygon as this frustum).
This function returns NULL if there is no intersection.
Note that the frustum polygon of the returned csFrustum is guaranteed to be coplanar with the given triangle.
The convex polygon is given relative to the center point (origin) of this frustum.
Returns a new frustum which exactly covers the intersection of the polygon with the frustum (i.e. the smallest frustum which is part of this frustum and which 'sees' exactly the same of the given polygon as this frustum).
This function returns NULL if there is no intersection.
Note that the frustum polygon of the returned csFrustum is guaranteed to be coplanar with the given polygon.
The convex polygon is given relative to the center point (origin) of this frustum.
Returns a new frustum which exactly covers the intersection of the polygon with the frustum (i.e. the smallest frustum which is part of this frustum and which 'sees' exactly the same of the given polygon as this frustum).
This function returns NULL if there is no intersection.
Note that the frustum polygon of the returned csFrustum is guaranteed to be coplanar with the given polygon.
csFrustum * csFrustum::Intersect (
const csFrustum & other )
Intersect with another frustum.
The other frustum must have the same origin as this one. Otherwise the result is undefined. Returns new frustum which you should delete after usage. If there is no intersection this function returns NULL.