Пример #1
0
/// This method creates an XML-snippet of the material phases.
std::string makePhases(std::vector<Phase> const& phases)
{
    std::stringstream sPhases;

    sPhases << indent(6) << "<phases>\n";
    for (auto const& p : phases)
    {
        sPhases << makePhase(p);
    }
    sPhases << indent(6) << "</phases>\n";
    return sPhases.str();
}
Пример #2
0
void PhaseDecoder::decode() {
	makeColor();
	makePhase();
	memcpy( wrappedPhase, phase, sizeof(float) * width * height);
	for (int pass = 0; pass < maxPasses; pass++) {
		unwrapPhase();
		if (minRemaining != 0 && getRemaining() < minRemaining)
			break;
	}
	if (phasePersistence)
		memcpy(lastPhase, phase, sizeof(float) * width * height);
	makeDepth();
}