| 
						
						
							
								
							
						
						
					 | 
					@ -16,15 +16,6 @@ struct cylinder_t final : primitive { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    marked_subface_ptr_t<internal::plane_t>         bottom_plane{}; | 
					 | 
					 | 
					    marked_subface_ptr_t<internal::plane_t>         bottom_plane{}; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    marked_subface_ptr_t<internal::plane_t>         top_plane{}; | 
					 | 
					 | 
					    marked_subface_ptr_t<internal::plane_t>         top_plane{}; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    // why virtual? For special primitives like cylinder, it may have multiple parts.
 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    // The part with index 0 may not be the identity transform. 
 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    // For example, the cylinder face has no z translation.
 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    // Note: The AABB of a cylinder is defined by the side surface, and z-axis scaling does not affect the side surface's radius.
 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    // The degeneracy (simplification) check for a cylinder only considers the first two rows of the transform matrix (x/y directions),
 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    // because scaling along z does not change the essential geometry of the cylinder side surface.
 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    // TODO: the better way is to redefine cylinder, make identity transform as the first part.
 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    const internal::transform_block &get_identity_local_to_world() const override; | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					protected: | 
					 | 
					 | 
					protected: | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    void initialize(primitive_data_center_t &, const std::vector<std::pair<internal::paired_model_matrix *, bool>> &) override; | 
					 | 
					 | 
					    void initialize(primitive_data_center_t &, const std::vector<std::pair<internal::paired_model_matrix *, bool>> &) override; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					
  |