World Builder  1.1.0-pre
A geodynamic initial conditions generator
WorldBuilder::Objects::Surface Class Reference

#include <surface.h>

Collaboration diagram for WorldBuilder::Objects::Surface:

Public Member Functions

 Surface ()
 
 Surface (std::pair< std::vector< double >, std::vector< double >> values_at_points)
 
SurfaceValueInfo local_value (const Point< 2 > &check_point) const
 

Public Attributes

bool constant_value
 
double minimum
 
double maximum
 
KDTree::KDTree tree
 
std::vector< std::array< std::array< double, 3 >, 3 > > triangles
 
std::vector< std::array< double, 8 > > in_triangle_precomputed
 Stores precomputed values. More...
 

Detailed Description

Definition at line 56 of file surface.h.

Constructor & Destructor Documentation

◆ Surface() [1/2]

WorldBuilder::Objects::Surface::Surface ( )
default

Constructor to create an empty surface.

◆ Surface() [2/2]

WorldBuilder::Objects::Surface::Surface ( std::pair< std::vector< double >, std::vector< double >>  values_at_points)

Constructor to create a surface from value at points object output.

Definition at line 67 of file surface.cc.

Here is the call graph for this function:

Member Function Documentation

◆ local_value()

SurfaceValueInfo WorldBuilder::Objects::Surface::local_value ( const Point< 2 > &  check_point) const

Returns the value of the surface at the check point.

Definition at line 149 of file surface.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ constant_value

bool WorldBuilder::Objects::Surface::constant_value

Whether the surface is a constant value or not. This is used for optimalization.

Definition at line 77 of file surface.h.

◆ in_triangle_precomputed

std::vector<std::array<double,8> > WorldBuilder::Objects::Surface::in_triangle_precomputed

Stores precomputed values.

Definition at line 103 of file surface.h.

◆ maximum

double WorldBuilder::Objects::Surface::maximum

The maximum value of all provided points.

Definition at line 87 of file surface.h.

◆ minimum

double WorldBuilder::Objects::Surface::minimum

The minimum value of all provided points.

Definition at line 82 of file surface.h.

◆ tree

KDTree::KDTree WorldBuilder::Objects::Surface::tree

The KD tree which stores the centroids of all triangles and an index to the triangle points and values stored in the triangles member variable.

Definition at line 93 of file surface.h.

◆ triangles

std::vector<std::array<std::array<double,3>,3> > WorldBuilder::Objects::Surface::triangles

Stores the triangles as a list of three points.

Definition at line 98 of file surface.h.


The documentation for this class was generated from the following files: