Blender V5.0
btHeightfieldTerrainShape.cpp File Reference

Go to the source code of this file.

Classes

struct  ProcessTrianglesAction
struct  ProcessVBoundsAction

Functions

static int getQuantized (btScalar x)
template<typename Action_T>
void gridRaycast (Action_T &quadAction, const btVector3 &beginPos, const btVector3 &endPos, int indices[3])

Function Documentation

◆ getQuantized()

int getQuantized ( btScalar x)
inlinestatic

Definition at line 227 of file btHeightfieldTerrainShape.cpp.

References x.

Referenced by quantizeWithClamp().

◆ gridRaycast()

template<typename Action_T>
void gridRaycast ( Action_T & quadAction,
const btVector3 & beginPos,
const btVector3 & endPos,
int indices[3] )

Iterates through a virtual 2D grid of unit-sized square cells, and executes an action on each cell intersecting the given segment, ordered from begin to end. Initially inspired by http://www.cse.yorku.ca/~amana/research/grid.pdf

Definition at line 418 of file btHeightfieldTerrainShape.cpp.

References btFabs(), btSqrt(), btVector3, ceil, floor, and indices.

Referenced by ProcessVBoundsAction::operator()().