made name more descriptive
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				Gitea Actions Demo / Scan the project (push) Successful in 18s
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	Gitea Actions Demo / Scan the project (push) Successful in 18s
				
			This commit is contained in:
		@ -85,7 +85,7 @@ namespace Engine_silk.NET
 | 
			
		||||
					Vector2D<float> percent = new Vector2D<float>(x, y) / (_resolution - 1);
 | 
			
		||||
					// place vertex on correct position of the plane to easily calculate indices
 | 
			
		||||
					Vector3D<float> vertexPosition = _localUp + (percent.X - 0.5f) * 2 * _localX + (percent.Y - 0.5f) * 2 * _localY;
 | 
			
		||||
					vertices[i] = ConvertToPointOnSphere(vertexPosition);
 | 
			
		||||
					vertices[i] = PointOnCubeToPointOnSphere(vertexPosition);
 | 
			
		||||
 | 
			
		||||
					if (x != _resolution - 1 && y != _resolution - 1) // we didn't reach the bottom right point yet
 | 
			
		||||
					{
 | 
			
		||||
@ -110,7 +110,7 @@ namespace Engine_silk.NET
 | 
			
		||||
 | 
			
		||||
		// Smooth mapping so that the points are not clumped on the former corners of the cube
 | 
			
		||||
		// http://mathproofs.blogspot.com/2005/07/mapping-cube-to-sphere.html
 | 
			
		||||
		private Vector3D<float> ConvertToPointOnSphere(Vector3D<float> point)
 | 
			
		||||
		private Vector3D<float> PointOnCubeToPointOnSphere(Vector3D<float> point)
 | 
			
		||||
		{
 | 
			
		||||
			float x2 = point.X * point.X;
 | 
			
		||||
			float y2 = point.Y * point.Y;
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user