![]() |
Public API Reference |
![]() |
Model that defines the surface of a cylinder. More...
#include <cstool/noise/model/cylinder.h>
Public Member Functions | |
Cylinder () | |
Constructor. | |
Cylinder (const CS::Math::Noise::Module::Module &module) | |
Constructor. | |
const CS::Math::Noise::Module::Module & | GetModule () const |
Returns the noise module that is used to generate the output values. | |
double | GetValue (double angle, double height) const |
Returns the output value from the noise module given the (angle, height) coordinates of the specified input value located on the surface of the cylinder. | |
void | SetModule (const CS::Math::Noise::Module::Module &module) |
Sets the noise module that is used to generate the output values. |
Model that defines the surface of a cylinder.
This model returns an output value from a noise module given the coordinates of an input value located on the surface of a cylinder.
To generate an output value, pass the (angle, height) coordinates of an input value to the GetValue() method.
This model is useful for creating:
This cylinder has a radius of 1.0 unit and has infinite height. It is oriented along the y axis. Its center is located at the origin.
Definition at line 58 of file cylinder.h.
Constructor.
CS::Math::Noise::Model::Cylinder::Cylinder | ( | const CS::Math::Noise::Module::Module & | module | ) |
Constructor.
module | The noise module that is used to generate the output values. |
const CS::Math::Noise::Module::Module& CS::Math::Noise::Model::Cylinder::GetModule | ( | ) | const [inline] |
Returns the noise module that is used to generate the output values.
Definition at line 78 of file cylinder.h.
double CS::Math::Noise::Model::Cylinder::GetValue | ( | double | angle, |
double | height | ||
) | const |
Returns the output value from the noise module given the (angle, height) coordinates of the specified input value located on the surface of the cylinder.
angle | The angle around the cylinder's center, in degrees. |
height | The height along the y axis. |
This output value is generated by the noise module passed to the SetModule() method.
This cylinder has a radius of 1.0 unit and has infinite height. It is oriented along the y axis. Its center is located at the origin.
void CS::Math::Noise::Model::Cylinder::SetModule | ( | const CS::Math::Noise::Module::Module & | module | ) | [inline] |
Sets the noise module that is used to generate the output values.
module | The noise module that is used to generate the output values. |
This noise module must exist for the lifetime of this object, until you pass a new noise module to this method.
Definition at line 110 of file cylinder.h.