C# Class MapAround.Extensions.Surfaces.ShadedReliefBuilder

Builds equally illuminated areas of 2.5D-surface.
Mostrar archivo Open project: gkrsu/maparound.core

Public Methods

Method Description
BuildShadedRelief ( IEnumerable surfacePoints, double lightX, double lightY, double lightZ, double zFactor, int luminosityLevelNumber ) : LightenedPolygon[]

Builds shaded relief.

BuildShadedRelief ( IEnumerable triangles, double lightX, double lightY, double lightZ, double zFactor, int luminosityLevelNumber ) : LightenedPolygon[]

Builds shaded relief.

GetLuminosity ( Triangle triangle, double lightX, double lightY, double lightZ, double zFactor ) : double

Calculates luminosity of the triangle.

Private Methods

Method Description
mergeTriangles ( List polygons ) : Polygon

Method Details

BuildShadedRelief() public method

Builds shaded relief.
public BuildShadedRelief ( IEnumerable surfacePoints, double lightX, double lightY, double lightZ, double zFactor, int luminosityLevelNumber ) : LightenedPolygon[]
surfacePoints IEnumerable A 3D-coordinates defining source
lightX double An X component of the light vector
lightY double A Y component of the light vector
lightZ double A Z component of the light vector
zFactor double A value at which to multiply z-values for luminosity calculation
luminosityLevelNumber int A number of resoluted luminosity levels
return LightenedPolygon[]

BuildShadedRelief() public method

Builds shaded relief.
public BuildShadedRelief ( IEnumerable triangles, double lightX, double lightY, double lightZ, double zFactor, int luminosityLevelNumber ) : LightenedPolygon[]
triangles IEnumerable An object that enumerates triangles defining surface. All triangle coordinates should be instances of the MapAround.Geometry.Coordinate3D.
lightX double An X component of the light vector
lightY double A Y component of the light vector
lightZ double A Z component of the light vector
zFactor double A value at which to multiply z-values for luminosity calculation
luminosityLevelNumber int A number of resoluted luminosity levels
return LightenedPolygon[]

GetLuminosity() public static method

Calculates luminosity of the triangle.
public static GetLuminosity ( Triangle triangle, double lightX, double lightY, double lightZ, double zFactor ) : double
triangle Triangle A triangle
lightX double An X component of the light vector
lightY double A Y component of the light vector
lightZ double A Z component of the light vector
zFactor double A value at which to multiply z-values for luminosity calculation
return double