# Frustrum troubles...

This topic is 4821 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

This is my actual code to compute frustum planes...but sometthing is going wrong...WHY!?!?! const float fAspectRatio = GetAspectRatio(); const iVector3 vViewDiagonal(m_fTanHalfFov, m_fTanHalfFov/fAspectRatio, 1.0F); // Near and far planes m_VSFrustumPlanes[iFRUSTUM_PLANE_NEAR] = iPlane(0, 0, 1.0F, m_fNear); m_VSFrustumPlanes[iFRUSTUM_PLANE_FAR] = iPlane(0, 0, -1.0F, m_fFar); // Left and right planes m_VSFrustumPlanes[iFRUSTUM_PLANE_RIGHT] = iPlane(1.0F, 0.0F, -vViewDiagonal.x, 0.0F); m_VSFrustumPlanes[iFRUSTUM_PLANE_LEFT] = iPlane(-1.0F, 0.0F, -vViewDiagonal.x, 0.0F); // Top and bottom planes m_VSFrustumPlanes[iFRUSTUM_PLANE_TOP] = iPlane(0.0F, -1.0F, -vViewDiagonal.y, 0.0F); m_VSFrustumPlanes[iFRUSTUM_PLANE_BOTTOM] = iPlane(0.0F, 1.0F, -vViewDiagonal.y, 0.0F); if(m_Flag&iCAMERA_NORMALIZE_PLANES) { for(DWORD i=0; i<iFRUSTUM_PLANE_COUNT; i++) m_VSFrustumPlanes.Normalize(); } // Trasform all planes in world space std::vector<iPlane>::iterator plane = m_FrustumPlanes.begin(); for(DWORD i=0; i<iFRUSTUM_PLANE_COUNT; i++, plane++) (*plane) = m_VSFrustumPlanes * m_ViewMatrix;

1. 1
2. 2
Rutin
19
3. 3
4. 4
5. 5

• 9
• 9
• 9
• 14
• 12
• ### Forum Statistics

• Total Topics
633283
• Total Posts
3011210
• ### Who's Online (See full list)

There are no registered users currently online

×