Subversion Repositories gelsvn

Rev

Blame | Last modification | View Log | RSS feed

#ifndef __HMESH_MESHTYPES_H__
#define __HMESH_MESHTYPES_H__

#include <CGLA/Vec3f.h>
#include "HMesh.h"

namespace HMesh
{
    struct Vertex
    {
        /// Position of vertex
            CGLA::Vec3f pos;

        /// Index of outgoing halfedge
        Hidx out_idx;

        /// General purpose integer. Normally used as index or flag.
        TouchType touched;

        /// Default Constructor
        Vertex() : 
            pos(CGLA::Vec3f(0)), 
            out_idx(NULL_HALFEDGE_IDX), 
            touched(0){}

        /// Constructor
        Vertex(const CGLA::Vec3f& _pos) : 
            pos(_pos), 
            out_idx(NULL_HALFEDGE_IDX), 
            touched(0){}
    };

    struct HalfEdge
    {
        /// Index of vertex pointed to
        Vidx vert_idx;
        /// Index of next halfedge in face loop
        Hidx next_idx;
        /// Index of previous halfedge in face loop
        Hidx prev_idx;
        /// Index of opposite halfedge
        Hidx opp_idx;
        /// Index of face owning this halfedge
        Fidx face_idx;

        /// General purpose integer. Normally used as index or flag.
        TouchType touched;

        /// Constructor
        HalfEdge() :    
            vert_idx(NULL_VERTEX_IDX), 
                        next_idx(NULL_HALFEDGE_IDX), 
                        prev_idx(NULL_HALFEDGE_IDX),
                        opp_idx(NULL_HALFEDGE_IDX), 
                        face_idx(NULL_FACE_IDX),
            touched(0){}
    };

    struct Face
    {
        /// Index of some halfedge owned by this face
        Hidx last_idx;

        /// General purpose integer. Normally used as index or flag.
        TouchType touched;
  
        /// Constructor
        Face() : 
            last_idx(NULL_HALFEDGE_IDX), 
            touched(0){}
    };
}

#endif

Generated by GNU Enscript 1.6.6.