zoukankan      html  css  js  c++  java
  • [工具]toolbox_graph基本操作

    toolbox_graph提供了对3D模型的一些操作。MATLAB代码源自:http://www.mathworks.com/matlabcentral/fileexchange/5355-toolbox-graph/content/toolbox_graph/toolbox_graph.m

    关于代码的总结说明:(toolbox_graph.m)

    基本操作——

    compute_vertex_ring:为网格的每一个顶点计算第一环邻居。

    function vring = compute_vertex_ring(face)

    参数说明:face——3*f的矩阵,f表示面的数目。

    输出:vring{i} 表示与第i个顶点相邻的顶点集合。在MATLAB中的结果为1*f cell(f为顶点个数),cell中保存的为顶点序号。

    compute_normal:使用面的法向量的平均值作为顶点的法向量。

    function [normal,normalf] = compute_normal(vertex,face)

    参数说明:vertex——3*v的矩阵,v表示顶点的数目;

      face——同上。

    输出:normal——顶点的法向量。3*v的矩阵;

      normalf——面的法向量。3*f的矩阵。

    triangulation2adjacency:为给定的三角形网格计算邻接矩阵。

    function A = triangulation2adjacency(face,vertex)

    参数说明:face——同上;

      vertex——同上。

    输出:A——保存顶点相连的邻接矩阵,大小为v*v。

    reverse_orientation:翻转面的法向量的方向。

    function face1 = reverse_orientation(face)

    参数说明:face——同上。

    输出:face1——翻转后的面。

  • 相关阅读:
    互联网商业数据分析(二十七):运营分析(三)用户分层
    鲲鹏服务器上跑dpdk kni bug
    dpdk 网卡顺序
    dpvs ipvsadm.c:114:10: fatal error: popt.h: No such file or directory
    dpvs keepalived编译出错
    ps查看线程所在的cpu + pstack 线程+ strace 线程
    查看内核模块加载时参数
    dpdk kni二
    dpdk eal 参数
    dpdk project gdb
  • 原文地址:https://www.cnblogs.com/haoyul/p/5909491.html
Copyright © 2011-2022 走看看