hx3d  1
2D/3D Simple Game Framework
Public Member Functions | List of all members
hx3d::math::Function Class Reference

Math function definition. More...

#include <function.hpp>

Public Member Functions

 Function (float init, float speed, std::function< void(float &, float &, float)> func)
 Create a function from an initial time value, speed and a math function. More...
 
void reset ()
 Reset the function time.
 
void step ()
 Step the function time.
 
glm::vec2 sample ()
 Sample the current coordinates from the math function. More...
 

Detailed Description

Math function definition.

Definition at line 33 of file function.hpp.

Constructor & Destructor Documentation

hx3d::math::Function::Function ( float  init,
float  speed,
std::function< void(float &, float &, float)>  func 
)

Create a function from an initial time value, speed and a math function.

The math function takes 3 parameters:

  • X coordinate (inout)
  • Y coordinate (inout)
  • Time (in)
Parameters
initInitial time value
speedSpeed
funcMath function

Definition at line 26 of file function.cpp.

Member Function Documentation

glm::vec2 hx3d::math::Function::sample ( )

Sample the current coordinates from the math function.

Returns
Coordinates (vec2)

Definition at line 34 of file function.cpp.


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