Documentation ¶
Index ¶
- func NewQuadTreeFromLatLon(latLon [][2]float64) *geoquad.QuadTree
- type SphereMesh
- type TriangleMesh
- func (tm *TriangleMesh) R_circulate_r(out_r []int, r int) []int
- func (tm *TriangleMesh) R_circulate_r_no_cache(out_r []int, r int) []int
- func (tm *TriangleMesh) R_circulate_t(out_t []int, r int) []int
- func (tm *TriangleMesh) S_begin_r(s int) int
- func (tm *TriangleMesh) S_end_r(s int) int
- func (tm *TriangleMesh) S_inner_t(s int) int
- func (tm *TriangleMesh) S_opposite_s(s int) int
- func (tm *TriangleMesh) S_outer_t(s int) int
- func (tm *TriangleMesh) T_circulate_r(out_r []int, t int) []int
- func (tm *TriangleMesh) T_circulate_s(out_s []int, t int) []int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewQuadTreeFromLatLon ¶
Types ¶
type SphereMesh ¶
type SphereMesh struct { *TriangleMesh XYZ []float64 // Region coordinates LatLon [][2]float64 // Region latitude and longitude TriXYZ []float64 // Triangle xyz coordinates TriLatLon [][2]float64 // Triangle latitude and longitude RegQuadTree *geoquad.QuadTree // Quadtree for region lookup TriQuadTree *geoquad.QuadTree // Quadtree for triangle lookup }
func MakeSphere ¶
func MakeSphere(seed int64, numPoints int, jitter float64) (*SphereMesh, error)
func NewSphereMesh ¶
func NewSphereMesh(latLon [][2]float64, xyz []float64, addSouthPole bool) (*SphereMesh, error)
func ReadSphereMesh ¶
func ReadSphereMesh(r io.Reader) (*SphereMesh, error)
ReadSphereMesh reads a sphere mesh from the given reader.
func (*SphereMesh) MakeCoarseSphereMesh ¶
func (m *SphereMesh) MakeCoarseSphereMesh(step int) (*SphereMesh, error)
MakeCoarseSphereMesh returns a sphere mesh with 1/step density.
type TriangleMesh ¶
type TriangleMesh struct { RegInSide []int Triangles []int Halfedges []int RegionNeighborsCache [][]int NumSides int NumRegions int NumTriangles int NumHalfedges int }
func NewTriangleMesh ¶
func NewTriangleMesh(numRegions int, tris, halfEdges []int) *TriangleMesh
NewTriangleMesh takes partial mesh information and fills in the rest; the partial information is generated in create.js or in fromDelaunator.
func (*TriangleMesh) R_circulate_r ¶
func (tm *TriangleMesh) R_circulate_r(out_r []int, r int) []int
R_circulate_r returns the regions adjacent to r using the cached neighbors. This is faster than r_circulate_r_no_cache, but it requires that the cached neighbors are up to date.
func (*TriangleMesh) R_circulate_r_no_cache ¶
func (tm *TriangleMesh) R_circulate_r_no_cache(out_r []int, r int) []int
R_circulate_r_no_cache returns the regions adjacent to r without using the cached neighbors. This is slower than r_circulate_r, but it does not require that the cached neighbors are up to date.
func (*TriangleMesh) R_circulate_t ¶
func (tm *TriangleMesh) R_circulate_t(out_t []int, r int) []int
func (*TriangleMesh) S_begin_r ¶
func (tm *TriangleMesh) S_begin_r(s int) int
func (*TriangleMesh) S_end_r ¶
func (tm *TriangleMesh) S_end_r(s int) int
func (*TriangleMesh) S_inner_t ¶
func (tm *TriangleMesh) S_inner_t(s int) int
func (*TriangleMesh) S_opposite_s ¶
func (tm *TriangleMesh) S_opposite_s(s int) int
func (*TriangleMesh) S_outer_t ¶
func (tm *TriangleMesh) S_outer_t(s int) int
func (*TriangleMesh) T_circulate_r ¶
func (tm *TriangleMesh) T_circulate_r(out_r []int, t int) []int
func (*TriangleMesh) T_circulate_s ¶
func (tm *TriangleMesh) T_circulate_s(out_s []int, t int) []int
Click to show internal directories.
Click to hide internal directories.