Torque 3D 3.8
ContentsIndexHome
PreviousUpNext
Functions

The following table lists functions in this documentation.

 
Name 
Description 
 
GBitmap * makeDistanceField(const GBitmap * sourceBmp, S32 targetSizeX, S32 targetSizeY, F32 rangePct);
GBitmap * GFXUtil::DistanceField::makeDistanceField(GBitmap * sourceBmp, S32 targetSizeX, S32 targetSizeY, F32 rangePct) { AssertFatal(sourceBmp->getFormat() == GFXFormatA8,"Use an alpha-only texture to create distance fields");
static VectorsearchSpace;
S32 sourceSizeX = sourceBmp->getWidth(); S32 sourceSizeY = sourceBmp->getHeight();
S32 targetToSourceScalarX = sourceSizeX / targetSizeX; S32 targetToSourceScalarY = sourceSizeY / targetSizeY; S32 targetToSourcePixOffsetX = targetToSourceScalarX / 2; S32 targetToSourcePixOffsetY = targetToSourceScalarY / 2;
F32 range = getMin(sourceSizeX,sourceSizeY) * rangePct; F32 range2 = range * 2.f;
{ S32 intRange = mCeil(range); for(S32 spaceY = -intRange; spaceY < intRange; spaceY++) { for(... more 
Copyright (c) 2015. All rights reserved.
What do you think about this topic? Send feedback!