HighMap library (C++)
Loading...
Searching...
No Matches
hmap::FieldFunction< BaseFn > Class Template Reference

Field function class. More...

#include <functions.hpp>

Collaboration diagram for hmap::FieldFunction< BaseFn >:

Public Member Functions

float operator() (float x, float y, float ctrl_param=0.f) const
 FieldFunction (BaseFn base)
 Construct a new FieldFunction object.
 FieldFunction (BaseFn base, std::vector< float > xr, std::vector< float > yr, std::vector< float > zr)
 Construct a new FieldFunction object with given vectors.
void set_xr (std::vector< float > new_xr)
 Set the x coordinates representing the centers of the primitive.
void set_yr (std::vector< float > new_yr)
 Set the y coordinates representing the centers of the primitive.
void set_zr (std::vector< float > new_zr)
 Set the z coordinates used to scale the primitive in x and y directions, and also to scale the primitive amplitude if requested.

Protected Attributes

std::vector< float > xr
std::vector< float > yr
std::vector< float > zr
 directions, and to scale the primitive amplitude if requested.

Detailed Description

template<typename BaseFn>
class hmap::FieldFunction< BaseFn >

Field function class.

Constructor & Destructor Documentation

◆ FieldFunction() [1/2]

template<typename BaseFn>
hmap::FieldFunction< BaseFn >::FieldFunction ( BaseFn base)
explicit

Construct a new FieldFunction object.

Parameters
baseBase function functor.

◆ FieldFunction() [2/2]

template<typename BaseFn>
hmap::FieldFunction< BaseFn >::FieldFunction ( BaseFn base,
std::vector< float > xr,
std::vector< float > yr,
std::vector< float > zr )

Construct a new FieldFunction object with given vectors.

Parameters
baseBase function functor.
xrVector of x coordinates representing the centers of the primitive.
yrVector of y coordinates representing the centers of the primitive.
zrVector of z coordinates used to scale the primitive in x and y directions, and also to scale the primitive amplitude if requested.

Member Function Documentation

◆ operator()()

template<typename BaseFn>
float hmap::FieldFunction< BaseFn >::operator() ( float x,
float y,
float ctrl_param = 0.f ) const

◆ set_xr()

template<typename BaseFn>
void hmap::FieldFunction< BaseFn >::set_xr ( std::vector< float > new_xr)
inline

Set the x coordinates representing the centers of the primitive.

Parameters
new_xrNew vector of x coordinates.

◆ set_yr()

template<typename BaseFn>
void hmap::FieldFunction< BaseFn >::set_yr ( std::vector< float > new_yr)
inline

Set the y coordinates representing the centers of the primitive.

Parameters
new_yrNew vector of y coordinates.

◆ set_zr()

template<typename BaseFn>
void hmap::FieldFunction< BaseFn >::set_zr ( std::vector< float > new_zr)
inline

Set the z coordinates used to scale the primitive in x and y directions, and also to scale the primitive amplitude if requested.

Parameters
new_zrNew vector of z coordinates.

Member Data Documentation

◆ xr

template<typename BaseFn>
std::vector<float> hmap::FieldFunction< BaseFn >::xr
protected

Vector of x coordinates representing the centers of the primitive.

◆ yr

template<typename BaseFn>
std::vector<float> hmap::FieldFunction< BaseFn >::yr
protected

Vector of y coordinates representing the centers of the primitive.

◆ zr

template<typename BaseFn>
std::vector<float> hmap::FieldFunction< BaseFn >::zr
protected

directions, and to scale the primitive amplitude if requested.

Vector of z coordinates used to scale the primitive in x and y


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