| 666 | } |
| 667 | |
| 668 | void MapDrawerSoft::DrawMapRelatedModels( |
| 669 | const MapRelatedModel* const models, const unsigned int model_count, |
| 670 | const m_Mat4& view_rotation_and_projection_matrix, |
| 671 | const m_Vec3& camera_position, |
| 672 | const ViewClipPlanes& view_clip_planes ) |
| 673 | { |
| 674 | if( current_map_data_ == nullptr ) |
| 675 | return; |
| 676 | |
| 677 | rasterizer_.ClearDepthBuffer(); |
| 678 | |
| 679 | m_Mat4 cam_shift_mat, cam_mat, screen_flip_mat; |
| 680 | cam_shift_mat.Translate( -camera_position ); |
| 681 | screen_flip_mat.Scale( m_Vec3( 1.0f, -1.0f, 1.0f ) ); |
| 682 | cam_mat= cam_shift_mat * view_rotation_and_projection_matrix * screen_flip_mat; |
| 683 | |
| 684 | for( unsigned int t= 0u; t < 2u; t++ ) |
| 685 | { |
| 686 | const bool transparent= t > 0u; |
| 687 | for( unsigned int m= 0u; m < model_count; m++ ) |
| 688 | { |
| 689 | const MapRelatedModel& model= models[m]; |
| 690 | |
| 691 | if( model.model_id >= current_map_data_->models_description.size() ) |
| 692 | continue; |
| 693 | |
| 694 | m_Mat4 rotate_mat; |
| 695 | rotate_mat.RotateZ( model.angle_z ); |
| 696 | |
| 697 | DrawModel( |
| 698 | map_models_, current_map_data_->models, model.model_id, |
| 699 | model.frame, |
| 700 | view_clip_planes, |
| 701 | model.pos, rotate_mat, |
| 702 | cam_mat, camera_position, |
| 703 | 255u, transparent ); |
| 704 | } // for models |
| 705 | } |
| 706 | } |
| 707 | |
| 708 | void MapDrawerSoft::LoadModelsGroup( const std::vector<Model>& models, ModelsGroup& out_group ) |
| 709 | { |
nothing calls this directly
no test coverage detected