Logo Search packages:      
Sourcecode: blender version File versions  Download package

void btHeightfieldTerrainShape::quantizeWithClamp ( int *  out,
const btVector3 &  point,
int  isMax 
) const [protected]

given input vector, return quantized version

This routine is basically determining the gridpoint indices for a given input vector, answering the question: "which gridpoint is closest to the provided point?".

"with clamp" means that we restrict the point to be in the heightfield's axis-aligned bounding box.

Definition at line 263 of file btHeightfieldTerrainShape.cpp.

Referenced by processAllTriangles().

      btVector3 clampedPoint(point);

      out[0] = getQuantized(clampedPoint.getX());
      out[1] = getQuantized(clampedPoint.getY());
      out[2] = getQuantized(clampedPoint.getZ());

Generated by  Doxygen 1.6.0   Back to index