Return the appropriate normal
I'm not actually sure this is necessary...
This commit is contained in:
		
							parent
							
								
									20b88f6dac
								
							
						
					
					
						commit
						662867f529
					
				
					 1 changed files with 5 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -148,9 +148,11 @@ Plane::compute_normal(const Vector3 &p)
 | 
			
		|||
    if (!point_is_on_surface(p)) {
 | 
			
		||||
        return Vector3::Zero;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    // This one's easy since planes are defined by their normals. :)
 | 
			
		||||
    return mNormal;
 | 
			
		||||
    if (mNormal.dot(p) < 0.0) {
 | 
			
		||||
        return mNormal;
 | 
			
		||||
    } else {
 | 
			
		||||
        return -mNormal;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
} /* namespace charles */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue