void GDynamicActor::RenderShadow( void ) { if( m_pShadow ) { float fMinX, fMaxX, fMinZ, fMaxZ; SVector vExtent; vExtent.X = vExtent.Z = Max( (m_vMeshMax.X-m_vMeshMin.X), (m_vMeshMax.Z-m_vMeshMin.Z) ); vExtent.Y = (m_vMeshMax.Y-m_vMeshMin.Y); if( vExtent.X<m_vExtent.X ) { vExtent.X = vExtent.Z = m_vExtent.X; } if( vExtent.Y<m_vExtent.Y ) { vExtent.Y = m_vExtent.Y; } vExtent.Y *= 1.2f; // for jumping m_pShadow->RangeRectGet( fMinX, fMinZ, fMaxX, fMaxZ, m_Locus.Location, vExtent*m_Locus.Scale*0.6f ); SMatrix matUnit; matUnit.SetIdentity(); m_pShadow->MakeVtxIdx(fMinX, fMinZ, fMaxX, fMaxZ); m_pShadow->MakeStart( matUnit ); m_pShadow->MakeEnd(); /* DTerrain *pTer = DTerrain::StaticGetTerrain( m_Locus.Location.X, m_Locus.Location.Y, m_Locus.Location.Z ); if( pTer ) { pTer->GetShadowVertex( m_Locus.Location, fMinX, fMinZ, fMaxX, fMaxZ, m_pShadow->GetVertexInterface(), m_pShadow->GetIndexInterface() ); m_pShadow->MakeStart( pTer->m_matUnitToWorld ); m_pShadow->MakeEnd(); } */ } else if( m_pApproxShadow ) { float fMinX, fMaxX, fMinZ, fMaxZ; SVector vExtent; vExtent.X = vExtent.Z = Max( (m_vMeshMax.X-m_vMeshMin.X), (m_vMeshMax.Z-m_vMeshMin.Z) ); vExtent.Y = (m_vMeshMax.Y-m_vMeshMin.Y); if( vExtent.X<m_vExtent.X ) { vExtent.X = vExtent.Z = m_vExtent.X; } if( vExtent.Y<m_vExtent.Y ) { vExtent.Y = m_vExtent.Y; } m_pApproxShadow->RangeRectGet( fMinX, fMinZ, fMaxX, fMaxZ, m_Locus.Location, vExtent*m_Locus.Scale*0.6f ); SMatrix matUnit; matUnit.SetIdentity(); m_pApproxShadow->MakeVtxIdx(fMinX, fMinZ, fMaxX, fMaxZ); m_pApproxShadow->Render( matUnit ); /* DTerrain *pTer = DTerrain::StaticGetTerrain( m_Locus.Location.X, m_Locus.Location.Y, m_Locus.Location.Z ); if( pTer ) { pTer->GetShadowVertex( m_Locus.Location, fMinX, fMinZ, fMaxX, fMaxZ, m_pApproxShadow->GetVertexInterface(), m_pApproxShadow->GetIndexInterface() ); m_pApproxShadow->Render( pTer->m_matUnitToWorld ); } */ } }
SMatrix* GDynamicActor::GetMatrixPointer( dword n ) { static SMatrix mat; mat.SetIdentity(); return &mat; }