Subversion Repositories gelsvn

Rev

Rev 489 | Blame | Last modification | View Log | RSS feed

#ifndef __HMESH_ENTITIES_H__
#define __HMESH_ENTITIES_H__

#include <CGLA/Vec3f.h>

#include "definitions.h"

namespace HMesh
{


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

        /// Index of outgoing halfedge
        HalfedgeIndex out_idx;

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

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

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

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

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

        /// Constructor
        HalfEdge() :    
            vert_idx(NULL_VIDX), 
                        next_idx(NULL_HIDX), 
                        prev_idx(NULL_HIDX),
                        opp_idx(NULL_HIDX), 
                        face_idx(NULL_FIDX),
            touched(NULL){}
    };

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

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

#endif

Generated by GNU Enscript 1.6.6.