#include <generatorparameters.h>
The GeneratorParameters class contains configuration parameters that control the characteristics of the NavData created by the Generator.
You can create an instance of this class, set up its data members as desired, and pass it in a call to Generator::SetGeneratorParameters().
Public Member Functions | |
void | BuildBlob (BlobHandler< GeneratorParametersBlob > &handler) const |
void | Clear () |
bool | operator!= (const GeneratorParameters &other) const |
bool | operator== (const GeneratorParameters &other) const |
KyResult | ReadFromAggregate (BlobAggregate &aggregate) |
KyResult | ReadFromBlob (const GeneratorParametersBlob &blob) |
KyResult | ReadFromBlobHandler (BlobHandler< GeneratorParametersBlob > &handler) |
void | SetDefaultValues () |
Private Attributes | |
DynamicNavTag | m_defaultNavTag |
void Kaim::GeneratorParameters::BuildBlob | ( | BlobHandler< GeneratorParametersBlob > & | handler | ) | const |
Build a GeneratorParametersBlob from these parameters.
void Kaim::GeneratorParameters::Clear | ( | ) |
default constructor
Reset members as if the object was freshly constructed
|
inline |
bool Kaim::GeneratorParameters::operator== | ( | const GeneratorParameters & | other | ) | const |
KyResult Kaim::GeneratorParameters::ReadFromAggregate | ( | BlobAggregate & | aggregate | ) |
Read parameters values from a BlobAggregate.
KyResult Kaim::GeneratorParameters::ReadFromBlob | ( | const GeneratorParametersBlob & | blob | ) |
Read parameters values from a GeneratorParametersBlob.
|
inline |
Read parameters values from a GeneratorParametersBlob.
|
inline |
alias for Clear()
GeneratorAdvancedParameters Kaim::GeneratorParameters::m_advancedParameters |
Contains more advanced configuration parameters.
The default values of the parameters offered by GeneratorAdvancedParameters should suffice for most projects.
KyFloat32 Kaim::GeneratorParameters::m_altitudeTolerance |
Determines the maximum difference in altitude that may exist between the NavMesh and the original terrain mesh.
units: meters
default value: 0.5f
KyFloat32 Kaim::GeneratorParameters::m_cellSize |
Determines the approximate width and length of each cell in the grid used to partition the NavMesh internally.
This value will be rounded so that a cell contains exactly "n" pixels where n is an integer The "Normalized" value is accessible using ComputeNormalizedCellSize()
units: meters
default value: 20.0f
|
private |
Specifies the default NavTag that will be applied to all input triangles that do not otherwise have a NavTag set explicitly.
KyFloat32 Kaim::GeneratorParameters::m_entityHeight |
KyFloat32 Kaim::GeneratorParameters::m_entityRadius |
The radius (or half-width) of the character that will use the NavData at runtime.
Particularly this radius is used to keep the navMesh borders at a distance of m_entityRadius from the walls, so that characters do not collide with the at runtime.
units: meters
default value: 0.4f
KyFloat32 Kaim::GeneratorParameters::m_rasterPrecision |
Determines the approximate width and length of each pixel used to rasterize the input triangles.
This value is rounded to a "Normalized" value so that a pixel is exactly m_entityRadius / N where N is an integer value of at least 1.
Ex: m_entityRadius = 0.4, m_rasterPrecision = 0.25 => m_normalizedRasterPrecision = 0.2
units: meters
default value: 0.2f
KyFloat32 Kaim::GeneratorParameters::m_slopeMax |
The maximum slope that the character that will use the NavData at runtime can traverse in its normal movement.
Any input triangle with a slope greater than this value is automatically tagged with the exclusive NavTag, and no NavData will be generated for that triangle.
units: degrees
default value: 50.0f
KyFloat32 Kaim::GeneratorParameters::m_stepMax |
The maximum difference in altitude that the character that will use the NavData at runtime can traverse in its normal movement.
units: meters
default value: 0.6f