VectorEntity  1.1.0
Medical Data Segmentation Toolkit
Public Member Functions | Protected Types | Protected Attributes
vctl::MCEdge Class Reference

Edge of a polygonal mesh. More...

#include <mcedge.h>

Inheritance diagram for vctl::MCEdge:
Inheritance graph
[legend]

List of all members.

Public Member Functions

void ChangeVertex (MCVertex *old_uzel, MCVertex *new_uzel)
 Exchanges pointer to edge vertex.
void DeRegistration ()
 Deregistration of the edge in its vertices.
template<class S >
void DeserializeEntity (mds::mod::CChannelSerializer< S > &Reader, std::vector< MCVertex * > &index_array)
 Reads the edge data.
void GetCenter (MCPoint3D &_stred)
 Returns geometrical center of the edge.
void GetEdgePoint (MCPoint3D &bod_h, double pomer)
 Divides the edge with respect to a specified ratio <0,1>.
unsigned int GetHashCode () const
 Returns hash code of the edge.
double GetLength ()
 Returns length of the edge.
MCVertexGetRestVertex (MCVertex *_uzel)
 Returns pointer to the opossite vertex of the edge.
MCVertexGetVertex (int index)
 Returns pointer to a subscripted vertex.
MCEdgeGetVertexEdge (MCVertex *_uzel)
 Returns pointer to a first edge registered in a specified vertex.
void GetVerticeS (MCVertex **_u0, MCVertex **_u1) const
 Returns pointers to edge vertices.
void GetVerticeS (MCVertex *_u[2]) const
 Returns pointers to edge vertices.
int IsVertex (MCVertex *test_uzel) const
 Checks if a given vertex belongs to the edge.
bool IsVertexBool (MCVertex *test_uzel) const
 Checks if a given vertex belongs to the edge.
 MCEdge ()
 Default constructor.
 MCEdge (const MCEdge &_hrana)
 Copy constructor.
 MCEdge (MCEdge *_hrana)
 Constructor.
 MCEdge (MCVertex *_u0, MCVertex *_u1)
 Constructor.
 MCEdge (MCVertex *_u[2])
 Constructor.
void Registration ()
 Registers the edge into its vertices.
template<class S >
void SerializeEntity (mds::mod::CChannelSerializer< S > &Writer)
 Writes the edge data.
void SetVertex (int index, MCVertex *new_uzel)
 Sets pointer to one of the edge vertices.
void SetVertexEdge (MCVertex *_uzel, MCEdge *_hrana)
 Sets an edge registered in a specified vertex.
void SetVerticeS (MCVertex *_u0, MCVertex *_u1)
 Sets the both edge end-points.
void SetVerticeS (MCVertex *_u[2])
 Sets both edge end-points.
bool TestIdentity (MCEdge *test_edge) const
 Checks identity of two edges.
virtual std::string ToString () const
 Returns text description of the edge.
 ~MCEdge ()
 Empty destructor.

Protected Types

typedef MCEntity< MCEdgetBase
 Base class.

Protected Attributes

MCEdges [2]
 Pointers to edges sharing the same vertex.
MCVertexu [2]
 End-points of the edge.

Detailed Description

Edge of a polygonal mesh.


Member Typedef Documentation

typedef MCEntity<MCEdge> vctl::MCEdge::tBase [protected]

Base class.


Constructor & Destructor Documentation

vctl::MCEdge::MCEdge ( ) [inline]

Default constructor.

vctl::MCEdge::MCEdge ( const MCEdge _hrana) [inline]

Copy constructor.

  • Initializes pointers to vertices only!
vctl::MCEdge::MCEdge ( MCEdge _hrana) [inline]

Constructor.

  • Initializes pointers to vertices only!
vctl::MCEdge::MCEdge ( MCVertex _u0,
MCVertex _u1 
) [inline]

Constructor.

  • Initializes pointers to vertices only!
vctl::MCEdge::MCEdge ( MCVertex _u[2]) [inline]

Constructor.

  • Initializes pointers to vertices only!
vctl::MCEdge::~MCEdge ( ) [inline]

Empty destructor.


Member Function Documentation

void vctl::MCEdge::ChangeVertex ( MCVertex old_uzel,
MCVertex new_uzel 
) [inline]

Exchanges pointer to edge vertex.

Parameters:
old_uzel- pointer to the original vertex.
new_uzel- pointer to a new vertex.

Deregistration of the edge in its vertices.

template<class S >
void vctl::MCEdge::DeserializeEntity ( mds::mod::CChannelSerializer< S > &  Reader,
std::vector< MCVertex * > &  index_array 
) [inline]

Reads the edge data.

void vctl::MCEdge::GetCenter ( MCPoint3D _stred) [inline]

Returns geometrical center of the edge.

void vctl::MCEdge::GetEdgePoint ( MCPoint3D bod_h,
double  pomer 
) [inline]

Divides the edge with respect to a specified ratio <0,1>.

  • Returns coordinates of calculated point.
unsigned int vctl::MCEdge::GetHashCode ( ) const [inline, virtual]

Returns hash code of the edge.

  • Not yet implemented!
    Todo:
    Doplnit implementaci generovani hash kodu.

Implements vctl::MCEntity< MCEdge >.

Returns length of the edge.

Returns pointer to the opossite vertex of the edge.

Parameters:
_uzel- pointer to a one of the edge vertices.
Returns:
NULL on failure.
MCVertex* vctl::MCEdge::GetVertex ( int  index) [inline]

Returns pointer to a subscripted vertex.

Returns pointer to a first edge registered in a specified vertex.

  • NULL on failure.
void vctl::MCEdge::GetVerticeS ( MCVertex **  _u0,
MCVertex **  _u1 
) const [inline]

Returns pointers to edge vertices.

void vctl::MCEdge::GetVerticeS ( MCVertex _u[2]) const [inline]

Returns pointers to edge vertices.

int vctl::MCEdge::IsVertex ( MCVertex test_uzel) const [inline]

Checks if a given vertex belongs to the edge.

Returns:
index of the vertex within the edge, or -1 otherwise.
bool vctl::MCEdge::IsVertexBool ( MCVertex test_uzel) const [inline]

Checks if a given vertex belongs to the edge.

void vctl::MCEdge::Registration ( ) [inline]

Registers the edge into its vertices.

template<class S >
void vctl::MCEdge::SerializeEntity ( mds::mod::CChannelSerializer< S > &  Writer) [inline]

Writes the edge data.

Reimplemented from vctl::MCEntity< MCEdge >.

void vctl::MCEdge::SetVertex ( int  index,
MCVertex new_uzel 
) [inline]

Sets pointer to one of the edge vertices.

Parameters:
index- index of the vertex (0 or 1).
void vctl::MCEdge::SetVertexEdge ( MCVertex _uzel,
MCEdge _hrana 
) [inline]

Sets an edge registered in a specified vertex.

void vctl::MCEdge::SetVerticeS ( MCVertex _u0,
MCVertex _u1 
) [inline]

Sets the both edge end-points.

void vctl::MCEdge::SetVerticeS ( MCVertex _u[2]) [inline]

Sets both edge end-points.

bool vctl::MCEdge::TestIdentity ( MCEdge test_edge) const [inline, virtual]

Checks identity of two edges.

Implements vctl::MCEntity< MCEdge >.

virtual std::string vctl::MCEdge::ToString ( ) const [inline, virtual]

Returns text description of the edge.

Implements vctl::MCEntity< MCEdge >.


Member Data Documentation

MCEdge* vctl::MCEdge::s[2] [protected]

Pointers to edges sharing the same vertex.

MCVertex* vctl::MCEdge::u[2] [protected]

End-points of the edge.


The documentation for this class was generated from the following files: