Public Member Functions | Protected Attributes

MeshLib::CVertex Class Reference

CVertex class, which is the base class of all kinds of vertex classes. More...

#include <Vertex.h>

Inheritance diagram for MeshLib::CVertex:
Inheritance graph
[legend]
Collaboration diagram for MeshLib::CVertex:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 CVertex ()
 ~CVertex ()
CPointpoint ()
CPointnormal ()
CPoint2uv ()
CHalfEdgemost_ccw_out_halfedge ()
CHalfEdgemost_clw_out_halfedge ()
CHalfEdgemost_ccw_in_halfedge ()
CHalfEdgemost_clw_in_halfedge ()
CHalfEdge *& halfedge ()
std::string & string ()
int & id ()
boolboundary ()
void _to_string ()
void _from_string ()

Protected Attributes

int m_id
CPoint m_point
CPoint m_normal
CPoint2 m_uv
CHalfEdgem_halfedge
bool m_boundary
std::string m_string

Detailed Description

CVertex class, which is the base class of all kinds of vertex classes.

Definition at line 25 of file Vertex.h.


Constructor & Destructor Documentation

MeshLib::CVertex::CVertex (  )  [inline]

CVertex constructor

Definition at line 31 of file Vertex.h.

{ m_halfedge = NULL; m_boundary = false; };

MeshLib::CVertex::~CVertex (  )  [inline]

CVertex destructor

Definition at line 35 of file Vertex.h.

{};


Member Function Documentation

void MeshLib::CVertex::_from_string (  )  [inline]

Read traits from the string.

Reimplemented in MeshLib::CViewerVertex.

Definition at line 77 of file Vertex.h.

{};

Here is the caller graph for this function:

void MeshLib::CVertex::_to_string (  )  [inline]

Convert vertex traits to string.

Definition at line 74 of file Vertex.h.

{};

bool& MeshLib::CVertex::boundary (  )  [inline]

Whether the vertex is on the boundary.

Definition at line 71 of file Vertex.h.

{ return m_boundary;};

Here is the caller graph for this function:

CHalfEdge* & MeshLib::CVertex::halfedge (  )  [inline]

One incoming halfedge of the vertex .

Definition at line 62 of file Vertex.h.

{ return m_halfedge; };

Here is the caller graph for this function:

int& MeshLib::CVertex::id (  )  [inline]

Vertex id.

Definition at line 68 of file Vertex.h.

{ return m_id; };

Here is the caller graph for this function:

CHalfEdge * MeshLib::CVertex::most_ccw_in_halfedge (  )  [inline]

The most counter clockwise incoming halfedge of the vertex.

Returns:
the most CCW in halfedge

Definition at line 109 of file Vertex.h.

{ 
        //for interior vertex
        if( !m_boundary )
        {
                return m_halfedge; //current half edge is the most ccw in halfedge 
        }

        //for boundary vertex
        CHalfEdge * he = m_halfedge->ccw_rotate_about_target();
        //rotate to the most ccw in halfedge
        while( he != NULL )
        {
                m_halfedge = he;
                he = m_halfedge->ccw_rotate_about_target();
        }
        // the halfedge of the vertex becomes the most ccw in halfedge
        return m_halfedge;

Here is the caller graph for this function:

CHalfEdge * MeshLib::CVertex::most_ccw_out_halfedge (  )  [inline]

The most counter clockwise outgoing halfedge of the vertex .

Definition at line 152 of file Vertex.h.

{ 
        //for interior vertex
        if( !m_boundary )
        {
                return most_ccw_in_halfedge()->he_sym(); //most ccw out halfedge is the dual of the most ccw in halfedge
        }

        //for boundary vertex
        CHalfEdge * he = m_halfedge->he_next();
        //get the out halfedge which is the next halfedge of the most ccw in halfedge
        CHalfEdge * ne = he->ccw_rotate_about_source();
        //rotate ccwly around the source vertex
        while( ne != NULL )
        {
                he = ne;
                ne = he->ccw_rotate_about_source();
        }

        return he;

Here is the call graph for this function:

Here is the caller graph for this function:

CHalfEdge * MeshLib::CVertex::most_clw_in_halfedge (  )  [inline]

The most clockwise incoming halfedge of the vertex.

Definition at line 131 of file Vertex.h.

{ 
        //for interior vertex 
        if( !m_boundary )
        {
                return most_ccw_in_halfedge()->ccw_rotate_about_target(); //the most ccw in halfedge rotate ccwly once to get the most clw in halfedge
        }
        //for boundary vertex
        CHalfEdge * he = m_halfedge->clw_rotate_about_target();
        //rotate to the most clw in halfedge
        while( he != NULL )
        {
                m_halfedge = he;
                he = m_halfedge->clw_rotate_about_target();
        }

        return m_halfedge;

Here is the call graph for this function:

Here is the caller graph for this function:

CHalfEdge * MeshLib::CVertex::most_clw_out_halfedge (  )  [inline]

The most clockwise outgoing halfedge of the vertex .

Definition at line 176 of file Vertex.h.

{ 
        //for interior vertex
        if( !m_boundary )
        {
                return most_ccw_out_halfedge()->ccw_rotate_about_source();  //most ccw out halfedge rotate ccwly once about the source
        }
        //get one out halfedge
        CHalfEdge * he = m_halfedge->he_next();
        //rotate the out halfedge clwly about the source
        CHalfEdge * ne = he->clw_rotate_about_source();
        
        while( ne != NULL )
        {
                he = ne;
                ne = he->clw_rotate_about_source();
        }

        return he;

Here is the call graph for this function:

Here is the caller graph for this function:

CPoint& MeshLib::CVertex::normal (  )  [inline]

The normal of the vertex

Definition at line 42 of file Vertex.h.

{ return m_normal; };

Here is the caller graph for this function:

CPoint& MeshLib::CVertex::point (  )  [inline]

The point of the vertex

Definition at line 39 of file Vertex.h.

{ return m_point;};

Here is the caller graph for this function:

std::string& MeshLib::CVertex::string (  )  [inline]

the string of the vertex.

Definition at line 65 of file Vertex.h.

Here is the caller graph for this function:

CPoint2& MeshLib::CVertex::uv (  )  [inline]

The texutre coordinates of the vertex

Definition at line 45 of file Vertex.h.

{ return m_uv; };

Here is the caller graph for this function:


Member Data Documentation

Indicating if the vertex is on the boundary.

Definition at line 98 of file Vertex.h.

The most CCW incoming halfedge of the vertex.

Definition at line 95 of file Vertex.h.

int MeshLib::CVertex::m_id [protected]

Vertex ID.

Definition at line 77 of file Vertex.h.

Normal at the vertex.

Definition at line 89 of file Vertex.h.

Vertex position point.

Definition at line 86 of file Vertex.h.

std::string MeshLib::CVertex::m_string [protected]

The string of the vertex, which stores the traits information.

Definition at line 101 of file Vertex.h.

Texture coordinates of the vertex.

Definition at line 92 of file Vertex.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Defines