AGX Dynamics 2.42.3.1
Loading...
Searching...
No Matches
agxTerrain::RegressionPlanesParameters Class Reference

Container for all user configurable parameters for the regression planes. More...

#include <RegressionPlanesParameters.h>

+ Inheritance diagram for agxTerrain::RegressionPlanesParameters:

Classes

struct  GridScalePair
 

Public Types

enum class  ContributionMode { INCLUDE , EXCLUDE }
 
enum class  GridScale { RADIUS , WIDTH , ELEMENT_SIZE , UNITY }
 Scaling factors for regression-plane grid step sizes. More...
 
enum class  GridShape { RECTANGLE , ELLIPSE }
 

Public Member Functions

 RegressionPlanesParameters ()
 
bool areScalesTerrainDependent () const
 
bool isDirty () const
 
bool isValid () const
 
void setDirty (bool isDirty)
 Set dirty flag on the RegressionPlanesParameters.
 
void setRegressionPlanesForceFeedbackHeightFieldLengths (const agx::Vec2 &lengths)
 Set the lengths of the force-feedback plane along its local x- and y-axes.
 
void setRegressionPlanesForceFeedbackHeightFieldLengthsScale (const GridScalePair &scales)
 Set the scale expressions for the force-feedback plane length sizes.
 
void setRegressionPlanesForwardDirectionOmegaYThreshold (const agx::Real threshold)
 Set the threshold for the wheel axle axis angular velocity magnitude used to suppress the update of the sign of the forward direction of the frame associated with the regression planes.
 
void setRegressionPlanesForwardDirectionVxAngularEquivalentThreshold (const agx::Real threshold)
 Set the threshold for the longitudinal wheel velocity expressed as an angular-equivalent velocity used to suppress the update of the sign of the forward direction of the frame associated with the regression planes.
 
void setRegressionPlanesGridCombinationIndexForceFeedbackPlane (const agx::Int index)
 Set which grid combination is used to construct the force-feedback plane.
 
void setRegressionPlanesGridCombinationIndexFrontAnglePlane (const agx::Int index)
 Set which grid combination defines the front-angle plane.
 
void setRegressionPlanesGridCombinationIndexRearAndFrontAngleReferencePlane (const agx::Int index)
 Set which grid combination defines the reference plane used for rear- and front-angle measurements.
 
void setRegressionPlanesGridCombinationIndexRearAnglePlane (const agx::Int index)
 Set which grid combination defines the rear-angle plane.
 
void setRegressionPlanesGridCombinations (const std::vector< std::vector< std::vector< agx::Int > > > &combinations)
 Set the grid-combination definition used for constructing combined regression planes.
 
void setRegressionPlanesGridCombinationsIndicesOrigin (const std::vector< std::vector< agx::Int > > &indices)
 Set the origin indices for each grid inside each regression-plane grid combination.
 
void setRegressionPlanesGridCombinationsIndicesReferenceNormal (const std::vector< std::vector< agx::Int > > &indices)
 Set the reference-normal indices for each grid inside each regression-plane grid combination.
 
void setRegressionPlanesGridsAdaptToRearAndFrontAngles (const std::vector< bool > &adapts)
 Enable or disable adaptation of each regression-plane grid to the wheel's rear and front angles.
 
void setRegressionPlanesGridsCenterPoint (const agx::Vec2Vector &gridsCenterPoint)
 Configure the center points for all regression-plane sampling grids.
 
void setRegressionPlanesGridsCenterPointScale (const agx::VectorPOD< GridScalePair > &scales)
 Set the scale expressions for each regression-plane grid center point.
 
void setRegressionPlanesGridsContributionMode (const agx::VectorPOD< ContributionMode > &modes)
 Set the contribution mode for each regression-plane grid.
 
void setRegressionPlanesGridsNumGridPoints (const agx::Vec2iVector &gridsNumGridPoints)
 Set the number of sampling points for each regression-plane grid.
 
void setRegressionPlanesGridsShape (const agx::VectorPOD< GridShape > &shapes)
 Set the geometric shape for each regression-plane grid.
 
void setRegressionPlanesGridsStepSize (const agx::Vec2Vector &gridsStepSize)
 Set the step size for each regression-plane sampling grid.
 
void setRegressionPlanesGridsStepSizeScale (const agx::VectorPOD< GridScalePair > &scales)
 Set the scale expressions for each regression-plane grid step size.
 
void setRegressionPlanesOverrideRearAndFrontAngleReferenceWithZ (const bool enable)
 Determine if the rear and front angle reference normal should be overridden to always be (0,0,1).
 
- Public Member Functions inherited from agx::Referenced
 Referenced ()
 Default constructor.
 
 Referenced (const Referenced &)
 
template<typename T >
T * as ()
 Subclass casting.
 
template<typename T >
const T * as () const
 
template<typename T >
T * asSafe ()
 Safe subclass casting, return nullptr if template type does not match.
 
template<typename T >
const T * asSafe () const
 
int getReferenceCount () const
 
template<typename T >
bool is () const
 Subclass test.
 
Referenced & operator= (const Referenced &)
 Assignment operator. Will increment the number of references to the referenced object.
 
void reference (void *ptr=nullptr) const
 Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it.
 
void unreference (void *ptr=nullptr) const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it.
 
void unreference_nodelete () const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it.
 

Public Attributes

 AGXTERRAIN_TERRAINWHEEL_STORE_RESTORE_INTERFACE
 
agx::Vec2 m_forceFeedbackHeightFieldLengths
 
GridScalePair m_forceFeedbackHeightFieldLengthsScale
 
agx::Real m_forwardDirectionOmegaYThreshold
 
agx::Real m_forwardDirectionVxAngularEquivalentThreshold
 
agx::Int m_gridCombinationIndexForceFeedbackPlane
 
agx::Int m_gridCombinationIndexFrontAnglePlane
 
agx::Int m_gridCombinationIndexRearAndFrontAngleReferencePlane
 
agx::Int m_gridCombinationIndexRearAnglePlane
 
std::vector< std::vector< std::vector< agx::Int > > > m_gridCombinations
 
std::vector< std::vector< agx::Int > > m_gridCombinationsIndicesOrigin
 
std::vector< std::vector< agx::Int > > m_gridCombinationsIndicesReferenceNormal
 
agx::Vec2Vector m_gridsCenterPoint
 
agx::VectorPOD< GridScalePair > m_gridsCenterPointScale
 
agx::VectorPOD< ContributionMode > m_gridsContributionMode
 
std::vector< bool > m_gridsIsAdaptToRearAndFrontAngles
 
agx::Vec2iVector m_gridsNumGridPoints
 
agx::VectorPOD< GridShape > m_gridsShape
 
agx::Vec2Vector m_gridsStepSize
 
agx::VectorPOD< GridScalePair > m_gridsStepSizeScale
 
bool m_isDirty
 
bool m_overrideRearAndFrontAngleReferenceWithZ
 

Additional Inherited Members

- Static Public Member Functions inherited from agx::Referenced
template<typename T >
static bool ValidateCast (const Referenced *object)
 
- Protected Member Functions inherited from agx::Referenced
virtual ~Referenced ()
 Destructor.
 
void allocateObserverVector () const
 
void deleteUsingDeleteHandler () const
 
- Static Protected Member Functions inherited from agx::Referenced
static DeleteHandler * getDeleteHandler ()
 
static void setDeleteHandler (DeleteHandler *handler)
 Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to.
 
- Protected Attributes inherited from agx::Referenced
Mutex m_mutex
 
ObserverContainer m_observers
 
AtomicValue m_refCount
 

Detailed Description

Container for all user configurable parameters for the regression planes.

The parameters define e.g.:

The spatial layout of sampling grids (center, step size, shape, etc.).
Scaling rules (scale e.g. step size by wheel radius, element size, etc.)
How individual grids contribute to different regression planes
(force feedback, front/rear angle, reference planes, etc.).
Flags for adapting grids based on wheel angles or
overriding references with Z height.

Together, these parameters control how regression planes are generated, combined, and updated each timestep to represent the terrain under the wheel.

Definition at line 44 of file RegressionPlanesParameters.h.

Member Enumeration Documentation

◆ ContributionMode

Enumerator
INCLUDE 
EXCLUDE 

Definition at line 103 of file RegressionPlanesParameters.h.

◆ GridScale

Scaling factors for regression-plane grid step sizes.

Enumerator
RADIUS 
WIDTH 
ELEMENT_SIZE 
UNITY 

Definition at line 80 of file RegressionPlanesParameters.h.

◆ GridShape

Enumerator
RECTANGLE 
ELLIPSE 

Definition at line 97 of file RegressionPlanesParameters.h.

Constructor & Destructor Documentation

◆ RegressionPlanesParameters()

agxTerrain::RegressionPlanesParameters::RegressionPlanesParameters ( )

Member Function Documentation

◆ areScalesTerrainDependent()

bool agxTerrain::RegressionPlanesParameters::areScalesTerrainDependent ( ) const
Returns
true if any of the supplied scales are GridScale::ELEMENT_SIZE and therefore needs an active terrain to be initialized from.

◆ isDirty()

bool agxTerrain::RegressionPlanesParameters::isDirty ( ) const
Returns
whether the RegressionPlanesParameters is dirty.

◆ isValid()

bool agxTerrain::RegressionPlanesParameters::isValid ( ) const
Returns
whether the RegressionPlanesParameters are internally consistent wrt how many grids are specified.

◆ setDirty()

void agxTerrain::RegressionPlanesParameters::setDirty ( bool  isDirty)

Set dirty flag on the RegressionPlanesParameters.

This means that they have changed since last time, and internals dependent on the parameters might need reinitialization.

Parameters
isDirty- set whether the parameters should be marked as dirty or not.

◆ setRegressionPlanesForceFeedbackHeightFieldLengths()

void agxTerrain::RegressionPlanesParameters::setRegressionPlanesForceFeedbackHeightFieldLengths ( const agx::Vec2 &  lengths)

Set the lengths of the force-feedback plane along its local x- and y-axes.

The force-feedback plane is the plane that interacts physically with the wheel, producing forces and torques. Its size determines how large an area around the wheel is considered when evaluating force feedback. The two components specify the plane's half-extent (or radius-like measure) in each principal direction.

Example input: '{ 2.0, 2.0 }' meaning the plane spans 2 units in both x and y directions before scaling.

Parameters
lengthsA vector of two values:

◆ setRegressionPlanesForceFeedbackHeightFieldLengthsScale()

void agxTerrain::RegressionPlanesParameters::setRegressionPlanesForceFeedbackHeightFieldLengthsScale ( const GridScalePair &  scales)

Set the scale expressions for the force-feedback plane length sizes.

Each local lengthof the plane force-feedback plane can be multiplied by one of the predefined scale enums (See GridScale):

  • "RADIUS" : Multiplies the step size by the wheel radius.
  • "WIDTH" : Multiplies the step size by the wheel width.
  • "ELEMENT_SIZE" : Multiplies the step size by the terrain element size.
  • "UNITY" : Multiplies the step size by 1.0 (no scaling).

These scale identifiers allow the force-feedback plane size to adapt automatically to wheel geometry or terrain resolution, without changing the provided base lengths. (See setRegressionPlanesForceFeedbackHeightFieldLengths).

Parameters
scalesA 2D array of GridScale enums where scales[0] and scales[1] represent the scale used for the force feedback length scale in the x- or y-direction, respectively.

◆ setRegressionPlanesForwardDirectionOmegaYThreshold()

void agxTerrain::RegressionPlanesParameters::setRegressionPlanesForwardDirectionOmegaYThreshold ( const agx::Real  threshold)

Set the threshold for the wheel axle axis angular velocity magnitude used to suppress the update of the sign of the forward direction of the frame associated with the regression planes.

The longitudinal velocity vX is converted to an angular equivalent by dividing by the wheel radius R, i.e. |vX| / R.

If both:

  • the longitudinal velocity magnitude |vX| (evaluated via its angular equivalent), and
  • the wheel axle angular velocity magnitude |omegaY| are below their respective thresholds, then the forward direction sign is not updated (see updateRegressionPlanesForwardSign())
Parameters
thresholdThreshold for |omegaY| [rad/s]. Must be >= 0.

◆ setRegressionPlanesForwardDirectionVxAngularEquivalentThreshold()

void agxTerrain::RegressionPlanesParameters::setRegressionPlanesForwardDirectionVxAngularEquivalentThreshold ( const agx::Real  threshold)

Set the threshold for the longitudinal wheel velocity expressed as an angular-equivalent velocity used to suppress the update of the sign of the forward direction of the frame associated with the regression planes.

The longitudinal velocity vX is converted to an angular equivalent by dividing by the wheel radius R, i.e. |vX| / R.

If both:

  • the longitudinal velocity magnitude |vX| (evaluated via its angular equivalent), and
  • the wheel axle angular velocity magnitude |omegaY| are below their respective thresholds, then the forward direction sign is not updated (see updateRegressionPlanesForwardSign())

The corresponding linear velocity threshold is: |vX| < vXAngEquivThreshold * R

Parameters
thresholdThreshold for |vX| / R [rad/s]. Must be >= 0.

◆ setRegressionPlanesGridCombinationIndexForceFeedbackPlane()

void agxTerrain::RegressionPlanesParameters::setRegressionPlanesGridCombinationIndexForceFeedbackPlane ( const agx::Int  index)

Set which grid combination is used to construct the force-feedback plane.

The force-feedback plane is the plane that physically interacts with the wheel during simulation, generating forces and torques based on contact with the terrain. By supplying an index i, the plane will be built using the grid combination 'gridCombinations[i]'.

Parameters
indexThe grid-combination index used to construct the force-feedback plane. If index = i, then gridCombinations[i] defines the plane.

◆ setRegressionPlanesGridCombinationIndexFrontAnglePlane()

void agxTerrain::RegressionPlanesParameters::setRegressionPlanesGridCombinationIndexFrontAnglePlane ( const agx::Int  index)

Set which grid combination defines the front-angle plane.

The rear-angle plane determines the wheel's front angle by intersection the plane with the wheel

Parameters
indexThe grid-combination index used to construct the front-angle plane. If index = i, then gridCombinations[i] defines the plane.

◆ setRegressionPlanesGridCombinationIndexRearAndFrontAngleReferencePlane()

void agxTerrain::RegressionPlanesParameters::setRegressionPlanesGridCombinationIndexRearAndFrontAngleReferencePlane ( const agx::Int  index)

Set which grid combination defines the reference plane used for rear- and front-angle measurements.

The normal of this plane serves as the reference normal against which both the rear angle and front angle of the wheel are measured.

Parameters
indexThe grid-combination index used to construct the rear-and-front angle reference plane. If index = i, then gridCombinations[i] defines the reference plane.

◆ setRegressionPlanesGridCombinationIndexRearAnglePlane()

void agxTerrain::RegressionPlanesParameters::setRegressionPlanesGridCombinationIndexRearAnglePlane ( const agx::Int  index)

Set which grid combination defines the rear-angle plane.

The rear-angle plane determines the wheel's rear angle by intersection the plane with the wheel

Parameters
indexThe grid-combination index used to construct the rear-angle plane. If index = i, then gridCombinations[i] defines the plane.

◆ setRegressionPlanesGridCombinations()

void agxTerrain::RegressionPlanesParameters::setRegressionPlanesGridCombinations ( const std::vector< std::vector< std::vector< agx::Int > > > &  combinations)

Set the grid-combination definition used for constructing combined regression planes.

A grid combination defines how individual regression-plane grids (from the configuration arrays such as gridsCenterPoint, gridsStepSize, etc.) are grouped together to form a combined plane. Each entry in the outer vector corresponds to one combined plane, and each combined plane consists of one or more grid groups.

A grid group is a list of grid indices. All grids within a group are first aggregated together (their regression results are merged), producing:

  • one aggregated normal,
  • one aggregated regression center point,
  • one aggregated average normal,
  • one aggregated average regression center point.

If the combined plane contains multiple grid groups, each group produces its own aggregated normal and aggregated regression center point. These per-group results are then further averaged to produce the final average normal and average regression point of the combined plane.

Examples:

  • '[[0]]'
    • The combined plane is formed from a single grid (index 0).
    • Produces one normal, one regression point, and they are also the basis for the averaged results (since only one group exists).
  • '[[1], [2, 3, 5]]'
    • The combined plane contains two grid groups:
      • Group 1: grid {1}
      • Group 2: grids {2, 3, 5}
    • The result has:
      • Two normals: one from grid 1, one from the aggregated group {2,3,5}
      • Two regression center points (same grouping)
      • One average normal (average of the two group normals)
      • One averaged regression center point (average of the two group points)
Parameters
combinationsA 3D structure describing how grids are grouped into combined planes.
  • 'combinations[i]' defines combined plane i.
  • 'combinations[i][j]' is grid group j of that plane.
  • 'combinations[i][j][k]' is the k-th grid index belonging to that group.

◆ setRegressionPlanesGridCombinationsIndicesOrigin()

void agxTerrain::RegressionPlanesParameters::setRegressionPlanesGridCombinationsIndicesOrigin ( const std::vector< std::vector< agx::Int > > &  indices)

Set the origin indices for each grid inside each regression-plane grid combination.

This configuration mirrors the structure and logic of 'setRegressionPlanesGridCombinationsIndicesReferenceNormal', but instead determines which origin point (relative to the wheel center) should be used when constructing each combined regression-plane grid.

Structure:

  • 'indices[i]' corresponds to combined plane i (i.e., 'gridCombinations[i]').
  • 'indices[i][j]' corresponds to grid group j inside that combined plane.
  • The value 'I = indices[i][j]' specifies which plane's computed origin should be used for that grid group.

Origin-selection rules:

  • If 'I >= 0', the origin is the computed regression-plane origin (e.g., the aggregated regression center point) of combined plane 'I'.
  • If 'I == -1', the origin defaults to the wheel center.

This allows different grid groups within the same combined plane to use different origin sources—even if the grid-combination structure is identical. It also allows a combined plane to anchor its grids relative to completely different reference planes.

Example:

  • 'indices = [ [0], [1], [1], [3,3], ... ]'
    • Combined plane 0 uses its own computed origin.
    • Combined plane 1 uses the origin from combined plane 1.
    • Combined plane 2 uses origin from combined plane 1.
    • Combined plane 3 has two grid groups; both take their origins from combined plane 3.
    • If an entry were '-1', that group would use the wheel center as the origin.
Parameters
indicesA 2D structure describing origin selection:
  • indices[i] contains origin selectors for combined plane i.
  • indices[i][j] specifies the origin for grid group j: I >= 0 -> use origin computed from gridCombinations[I] I == -1 -> use wheel center

◆ setRegressionPlanesGridCombinationsIndicesReferenceNormal()

void agxTerrain::RegressionPlanesParameters::setRegressionPlanesGridCombinationsIndicesReferenceNormal ( const std::vector< std::vector< agx::Int > > &  indices)

Set the reference-normal indices for each grid inside each regression-plane grid combination.

For every combined regression-plane definition in 'gridCombinations', this method specifies which reference normal should be used when constructing the coordinate frame for each of its grid groups.

A reference normal determines the "up-axis" used when generating the sampling grid. Together with the wheel's local y-axis, it defines the grid's orientation in space.

Structure:

  • 'indices[i]' corresponds to combined plane i (i.e., 'gridCombinations[i]').
  • 'indices[i][j]' corresponds to grid group j inside that combined plane.
  • The value 'I = indices[i][j]' indicates that the reference normal should be taken from combined plane I.

Reference-normal rules:

  • If 'I >= 0', then the reference normal is the average normal computed from combined plane 'I' in 'gridCombinations'.
  • If 'I == -1', then the reference normal is the global up-vector '(0, 0, 1)'.

This mapping allows two combined planes with identical grid definitions to use different orientation frames, simply by assigning different reference-normal indices.

Example (simplified):

  • 'gridCombinations = [ [[0]], [[1]], [[2]], [[1],[2]], [[1],[2]] ]'
  • 'indices = [ [0], [2], [1], [3,3], [1,2] ]'

Interpretation:

  • Combined plane 0 uses its own normal as reference.
  • Combined plane 1 uses the normal computed from combined plane 2.
  • Combined plane 2 uses the normal from combined plane 1.
  • Combined plane 3 has two grid groups; both reference normals come from plane 3.
  • Combined plane 4 has two groups; the first references plane 1, the second plane 2.
Parameters
indicesA 2D structure where:
  • indices[i] lists reference-normal selectors for combined plane i.
  • indices[i][j] gives the reference-normal source for grid group j: I >= 0 -> use average normal from gridCombinations[I] I == -1 -> use global up-vector (0,0,1)

◆ setRegressionPlanesGridsAdaptToRearAndFrontAngles()

void agxTerrain::RegressionPlanesParameters::setRegressionPlanesGridsAdaptToRearAndFrontAngles ( const std::vector< bool > &  adapts)

Enable or disable adaptation of each regression-plane grid to the wheel's rear and front angles.

When adaptation is enabled for a grid, its sample points are dynamically shifted based on the wheel's current rear and front angles. This allows the grid to "follow" the effective contact geometry as the wheel sinkage increases or decreases.

When adaptation is disabled, the grid's points remain fixed relative to the wheel's local frame, independent of wheel sinkage.

Parameters
adaptsA list of boolean flags, one per regression-plane grid.
  • true : The grid adapts its point positions based on rear/front angles.
  • false : The grid remains static and does not adapt.

◆ setRegressionPlanesGridsCenterPoint()

void agxTerrain::RegressionPlanesParameters::setRegressionPlanesGridsCenterPoint ( const agx::Vec2Vector &  gridsCenterPoint)

Configure the center points for all regression-plane sampling grids.

This method defines the (x, y) offsets of each grid's center in the wheel's local coordinate frame, expressed relative to the wheel center. These center points are later used together with grid scale, step size, and number-of-points settings to construct the sampling grids used by the regression-plane pipeline.

Parameters
gridsCenterPointA 2D array where gridsCenterPoint[i] contains the center offset for grid i, specified as { xOffset, yOffset }. The length of the outer vector determines the number of regression-plane grids.

◆ setRegressionPlanesGridsCenterPointScale()

void agxTerrain::RegressionPlanesParameters::setRegressionPlanesGridsCenterPointScale ( const agx::VectorPOD< GridScalePair > &  scales)

Set the scale expressions for each regression-plane grid center point.

Each center-point component of a regression-plane grid can be multiplied by one of the predefined scale enums (See GridScale):

  • "RADIUS" : Multiplies the step size by the wheel radius.
  • "WIDTH" : Multiplies the step size by the wheel width.
  • "ELEMENT_SIZE" : Multiplies the step size by the terrain element size.
  • "UNITY" : Multiplies the step size by 1.0 (no scaling).

These symbolic scale identifiers allow grid center points to automatically adapt to wheel geometry or terrain resolution.

Parameters
scalesA 2D array where scales[i] contains the scale identifiers applied to the center-point components of grid i (e.g., { "width", "unity" }). The structure must match the dimensions of the center-point array supplied to setRegressionPlanesGridsCenterPoint().

◆ setRegressionPlanesGridsContributionMode()

void agxTerrain::RegressionPlanesParameters::setRegressionPlanesGridsContributionMode ( const agx::VectorPOD< ContributionMode > &  modes)

Set the contribution mode for each regression-plane grid.

Each grid determines how sample points falling within or on the boundary of its region should be treated:

  • "include": Any sample point inside the grid region or exactly on its boundary is added to the regression-plane point set.
  • "exclude": Any sample point inside the grid region or exactly on its boundary is removed (filtered out) from the regression-plane point set.

This allows grids to act either as additive regions (include) or masking regions (exclude) when constructing the final set of regression-plane samples. The mode strings are converted to AGX string types and applied during grid evaluation.

Parameters
modesA list of contribution-mode identifiers ("include" or "exclude"), one for each regression-plane grid. The number of entries must match the number of configured regression-plane grids.

◆ setRegressionPlanesGridsNumGridPoints()

void agxTerrain::RegressionPlanesParameters::setRegressionPlanesGridsNumGridPoints ( const agx::Vec2iVector &  gridsNumGridPoints)

Set the number of sampling points for each regression-plane grid.

Each regression-plane grid is discretized into a 2D array of sample points. This method specifies how many points should be used along each grid axis. These values, together with the grid step size and center point, determine the resolution and coverage of each regression-plane sampling grid.

Parameters
gridsNumGridPointsA 2D array where gridsNumGridPoints[i] contains the number of grid points for grid i. Each entry should be { numX, numY }, defining the number of samples along the grid's local x- and y-directions.

◆ setRegressionPlanesGridsShape()

void agxTerrain::RegressionPlanesParameters::setRegressionPlanesGridsShape ( const agx::VectorPOD< GridShape > &  shapes)

Set the geometric shape for each regression-plane grid.

Each regression-plane grid can be generated using one of the supported shapes: "rectangle" or "ellipse". The chosen shape determines how sample points are distributed within the grid region:

  • "rectangle": Points are laid out on a rectangular lattice defined by the specified number of grid points and step sizes.
  • "ellipse": Points are distributed inside an elliptical boundary whose axes are defined by the grid's step sizes and number of sample points.

The provided shape identifiers are converted to AGX string types and stored for use during grid construction.

Parameters
shapesA list of shape identifiers (either "rectangle" or "ellipse"), one for each regression-plane grid. The size of this list must match the number of configured regression-plane grids.

◆ setRegressionPlanesGridsStepSize()

void agxTerrain::RegressionPlanesParameters::setRegressionPlanesGridsStepSize ( const agx::Vec2Vector &  gridsStepSize)

Set the step size for each regression-plane sampling grid.

The step size defines the spacing between adjacent sample points along the grid's local x- and y-directions. Together with the number of grid points and the grid center, these values determine the spatial extent and density of each regression-plane sampling grid.

Parameters
gridsStepSizeA 2D array where gridsStepSize[i] contains the step sizes for grid i, specified as { stepX, stepY }. These values determine how far apart neighboring points are placed along each axis.

◆ setRegressionPlanesGridsStepSizeScale()

void agxTerrain::RegressionPlanesParameters::setRegressionPlanesGridsStepSizeScale ( const agx::VectorPOD< GridScalePair > &  scales)

Set the scale expressions for each regression-plane grid step size.

Each step-size component of a regression-plane grid can be multiplied by one of the predefined scale enums (See GridScale):

  • "RADIUS" : Multiplies the step size by the wheel radius.
  • "WIDTH" : Multiplies the step size by the wheel width.
  • "ELEMENT_SIZE" : Multiplies the step size by the terrain element size.
  • "UNITY" : Multiplies the step size by 1.0 (no scaling).

These scale identifiers allow grid step sizes to adapt automatically to wheel geometry or terrain resolution.

Parameters
scalesA vector of enum 2D arrays where scales[i] contains the scale identifiers applied to the step-size components of grid i (e.g., { "RADIUS", "UNITY" }). The number of given scales must match the number of step-size-arrays given to setRegressionPlanesGridsStepSize().

◆ setRegressionPlanesOverrideRearAndFrontAngleReferenceWithZ()

void agxTerrain::RegressionPlanesParameters::setRegressionPlanesOverrideRearAndFrontAngleReferenceWithZ ( const bool  enable)

Determine if the rear and front angle reference normal should be overridden to always be (0,0,1).

Parameters
enableIf true, (0,0,1) is used. If false, refernce normal is computed via the regression planes

Member Data Documentation

◆ AGXTERRAIN_TERRAINWHEEL_STORE_RESTORE_INTERFACE

agxTerrain::RegressionPlanesParameters::AGXTERRAIN_TERRAINWHEEL_STORE_RESTORE_INTERFACE

Definition at line 551 of file RegressionPlanesParameters.h.

◆ m_forceFeedbackHeightFieldLengths

agx::Vec2 agxTerrain::RegressionPlanesParameters::m_forceFeedbackHeightFieldLengths

Definition at line 573 of file RegressionPlanesParameters.h.

◆ m_forceFeedbackHeightFieldLengthsScale

GridScalePair agxTerrain::RegressionPlanesParameters::m_forceFeedbackHeightFieldLengthsScale

Definition at line 574 of file RegressionPlanesParameters.h.

◆ m_forwardDirectionOmegaYThreshold

agx::Real agxTerrain::RegressionPlanesParameters::m_forwardDirectionOmegaYThreshold

Definition at line 576 of file RegressionPlanesParameters.h.

◆ m_forwardDirectionVxAngularEquivalentThreshold

agx::Real agxTerrain::RegressionPlanesParameters::m_forwardDirectionVxAngularEquivalentThreshold

Definition at line 575 of file RegressionPlanesParameters.h.

◆ m_gridCombinationIndexForceFeedbackPlane

agx::Int agxTerrain::RegressionPlanesParameters::m_gridCombinationIndexForceFeedbackPlane

Definition at line 568 of file RegressionPlanesParameters.h.

◆ m_gridCombinationIndexFrontAnglePlane

agx::Int agxTerrain::RegressionPlanesParameters::m_gridCombinationIndexFrontAnglePlane

Definition at line 569 of file RegressionPlanesParameters.h.

◆ m_gridCombinationIndexRearAndFrontAngleReferencePlane

agx::Int agxTerrain::RegressionPlanesParameters::m_gridCombinationIndexRearAndFrontAngleReferencePlane

Definition at line 571 of file RegressionPlanesParameters.h.

◆ m_gridCombinationIndexRearAnglePlane

agx::Int agxTerrain::RegressionPlanesParameters::m_gridCombinationIndexRearAnglePlane

Definition at line 570 of file RegressionPlanesParameters.h.

◆ m_gridCombinations

std::vector<std::vector<std::vector<agx::Int> > > agxTerrain::RegressionPlanesParameters::m_gridCombinations

Definition at line 565 of file RegressionPlanesParameters.h.

◆ m_gridCombinationsIndicesOrigin

std::vector<std::vector<agx::Int> > agxTerrain::RegressionPlanesParameters::m_gridCombinationsIndicesOrigin

Definition at line 567 of file RegressionPlanesParameters.h.

◆ m_gridCombinationsIndicesReferenceNormal

std::vector<std::vector<agx::Int> > agxTerrain::RegressionPlanesParameters::m_gridCombinationsIndicesReferenceNormal

Definition at line 566 of file RegressionPlanesParameters.h.

◆ m_gridsCenterPoint

agx::Vec2Vector agxTerrain::RegressionPlanesParameters::m_gridsCenterPoint

Definition at line 557 of file RegressionPlanesParameters.h.

◆ m_gridsCenterPointScale

agx::VectorPOD<GridScalePair> agxTerrain::RegressionPlanesParameters::m_gridsCenterPointScale

Definition at line 558 of file RegressionPlanesParameters.h.

◆ m_gridsContributionMode

agx::VectorPOD<ContributionMode> agxTerrain::RegressionPlanesParameters::m_gridsContributionMode

Definition at line 563 of file RegressionPlanesParameters.h.

◆ m_gridsIsAdaptToRearAndFrontAngles

std::vector<bool> agxTerrain::RegressionPlanesParameters::m_gridsIsAdaptToRearAndFrontAngles

Definition at line 564 of file RegressionPlanesParameters.h.

◆ m_gridsNumGridPoints

agx::Vec2iVector agxTerrain::RegressionPlanesParameters::m_gridsNumGridPoints

Definition at line 559 of file RegressionPlanesParameters.h.

◆ m_gridsShape

agx::VectorPOD<GridShape> agxTerrain::RegressionPlanesParameters::m_gridsShape

Definition at line 562 of file RegressionPlanesParameters.h.

◆ m_gridsStepSize

agx::Vec2Vector agxTerrain::RegressionPlanesParameters::m_gridsStepSize

Definition at line 560 of file RegressionPlanesParameters.h.

◆ m_gridsStepSizeScale

agx::VectorPOD<GridScalePair> agxTerrain::RegressionPlanesParameters::m_gridsStepSizeScale

Definition at line 561 of file RegressionPlanesParameters.h.

◆ m_isDirty

bool agxTerrain::RegressionPlanesParameters::m_isDirty

Definition at line 577 of file RegressionPlanesParameters.h.

◆ m_overrideRearAndFrontAngleReferenceWithZ

bool agxTerrain::RegressionPlanesParameters::m_overrideRearAndFrontAngleReferenceWithZ

Definition at line 572 of file RegressionPlanesParameters.h.


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