HighMap library (C++)
Loading...
Searching...
No Matches
hmap::RectangleFunction Class Reference

RectangleFunction (x, y) function class. More...

#include <functions.hpp>

Inheritance diagram for hmap::RectangleFunction:
Collaboration diagram for hmap::RectangleFunction:

Public Member Functions

 RectangleFunction (float rx, float ry, float angle, float slope, Vec2< float > center)
 Construct a new Rectangle Function object.
 
void set_angle (float new_angle)
 Set the angle.
 
- Public Member Functions inherited from hmap::Function
 Function ()
 Default constructor. Initializes the delegate function to a default that returns 0.
 
virtual ~Function ()=default
 Virtual destructor to ensure proper cleanup in derived classes.
 
 Function (HMAP_FCT_XY_TYPE delegate)
 Constructor to initialize with a specific delegate function.
 
HMAP_FCT_XY_TYPE get_delegate () const
 Get the current delegate function.
 
float get_value (float x, float y, float ctrl_param) const
 Call the delegate function with given arguments.
 
void set_delegate (HMAP_FCT_XY_TYPE new_delegate)
 Set a new delegate function.
 

Protected Attributes

float rx
 
float ry
 Radius of the rectangle.
 
float angle
 Angle of the rectangle.
 
float slope
 Slope of the rectangle.
 
Vec2< float > center
 Primitive reference center.
 

Detailed Description

RectangleFunction (x, y) function class.

Constructor & Destructor Documentation

◆ RectangleFunction()

hmap::RectangleFunction::RectangleFunction ( float  rx,
float  ry,
float  angle,
float  slope,
Vec2< float >  center 
)

Construct a new Rectangle Function object.

Parameters
rxRadius of the rectangle (with respect to a unit domain).
ryRadius of the rectangle (with respect to a unit domain).
angleOverall rotation angle (in degrees).
slopeSide slope (with respect to a unit domain).
centerPrimitive reference center.

Member Function Documentation

◆ set_angle()

void hmap::RectangleFunction::set_angle ( float  new_angle)
inline

Set the angle.

Parameters
new_angleNew angle in degrees.

Member Data Documentation

◆ rx

float hmap::RectangleFunction::rx
protected

◆ ry

float hmap::RectangleFunction::ry
protected

Radius of the rectangle.

◆ angle

float hmap::RectangleFunction::angle
protected

Angle of the rectangle.

◆ slope

float hmap::RectangleFunction::slope
protected

Slope of the rectangle.

◆ center

Vec2<float> hmap::RectangleFunction::center
protected

Primitive reference center.


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