Newer
Older
Import / research / 3d-z-maps / phong-tesselation / PhongTriangle.cpp
@John John on 29 Dec 2020 712 bytes bulk import from macbookpro checkouts
/*
 * =====================================================================================
 *
 *       Filename:  PhongTriangle.cpp
 *
 *    Description:  
 *
 *        Version:  1.0
 *        Created:  16/09/2011 21:50:11
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  John Ryland (jryland), jryland@xiaofrog.com
 *        Company:  InvertedLogic
 *
 * =====================================================================================
 */

#include <PhongTriangle.h>
#include <math.h>


PhongTriangle::PhongTriangle()
{
}


PhongTriangle::~PhongTriangle()
{
}

    
void vec3::normalize()
{
    float d = 1.0f / sqrt(x * x + y * y + z * z);
    x *= d;
    y *= d;
    z *= d;
}