C# Class R3.Drawing.TextureHelper

Mostra file Open project: roice3/Honeycombs

Public Methods

Method Description
SetupElementIndices ( Polygon poly ) : void

Sets up our list of element indices

TextureCoords ( Polygon poly, Geometry g, bool doGeodesicDome = false ) : Vector3D[]

Helper to generate a set of texture coordinates. ZZZ - make this a non-euclidean calc?

TextureElements ( int numBaseTriangles, int LOD ) : int[]

Grabs an array of indices into the coordinate array for TextureCoords. The array represents individual triangles (each set of 3 is one triangle).

TextureHelper ( ) : System.Collections.Generic

Private Methods

Method Description
CalcPointsUsingRecursion ( int level, Vector3D p1, Vector3D p2, Vector3D p3, Geometry g ) : Vector3D[]
CalcPointsUsingTwoSegments ( Segment seg1, Segment seg2, int divisions, Geometry g ) : Vector3D[]
CalcViaProjections ( Vector3D p1, Vector3D p2, Vector3D p3, int divisions, Geometry g ) : Vector3D[]
FindClosestPoint ( Vector3D v, Vector3D list ) : Vector3D
SubdivideRadialInGeometry ( Segment radial, int divisions, Geometry g ) : Vector3D[]

Equally subdivides a segment with a startpoint at the origin, in the respective geometry.

SubdivideSegmentInGeometry ( Vector3D p1, Vector3D p2, int divisions, Geometry g ) : Vector3D[]

Subdivides a segment from p1->p2 with the two endpoints not on the origin, in the respective geometry.

TriangularNumber ( int n ) : int

Returns the sum of all the integers up to and including n.

Method Details

SetupElementIndices() public method

Sets up our list of element indices
public SetupElementIndices ( Polygon poly ) : void
poly Polygon
return void

TextureCoords() public static method

Helper to generate a set of texture coordinates. ZZZ - make this a non-euclidean calc?
public static TextureCoords ( Polygon poly, Geometry g, bool doGeodesicDome = false ) : Vector3D[]
poly Polygon
g Geometry
doGeodesicDome bool
return Vector3D[]

TextureElements() public static method

Grabs an array of indices into the coordinate array for TextureCoords. The array represents individual triangles (each set of 3 is one triangle).
public static TextureElements ( int numBaseTriangles, int LOD ) : int[]
numBaseTriangles int
LOD int
return int[]

TextureHelper() public method

public TextureHelper ( ) : System.Collections.Generic
return System.Collections.Generic