⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tangent_frames.h

📁 国外游戏开发者杂志2003年第七期配套代码
💻 H
字号:
struct Triangle_List_Mesh;

struct Tangent_Frame_Maker {
    Tangent_Frame_Maker();
    ~Tangent_Frame_Maker();

    // If you want to compute the frames all in one shot, use this.
    void compute_tangent_frames(Triangle_List_Mesh *mesh);

    // If you want to init/compute them incrementally, use this...
    void begin_tangent_frames(int num_vertices);
    void accumulate_triangle(int indices[3], Vector3 vertices[3], 
                             Vector3 texture_coordinates[3]);
    void complete_tangent_frames();


    int num_vertices;
    Quaternion *tangent_frames;   // You will need to delete this yourself
                                  // if you don't want it.


    Vector3 *normals, *tangents, *binormals;  // These are deleted by this class.
};

// @Robustness: Epsilons like this are really dumb since we don't
// know what scale the user's model is at.
const double LAME_ASS_EPSILON = 1.0e-12;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -