Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members

mitkGeometryTypes.h

00001 /*=========================================================================
00002 
00003   Program:   3DMed
00004   Date:      $Date: 2014-02-25 18:30:00 +0800 $
00005   Version:   $Version: 4.6.0 $
00006   Copyright: MIPG, Institute of Automation, Chinese Academy of Sciences
00007 
00008 =========================================================================*/
00009 
00010 
00011 #ifndef __mitkGeometryTypes_h
00012 #define __mitkGeometryTypes_h
00013 
00014 #include "mitkGlobal.h"
00015 
00016 template <typename T>
00017 struct _3d_point_type
00018 {
00019     union
00020     {
00021         struct { T x, y, z; };
00022         T coord[3];
00023     };
00024 };
00025 
00026 template <typename PointType, typename NormalType>
00027 struct _3d_vertex_type
00028 {
00029     _3d_point_type<PointType> point;
00030     _3d_point_type<NormalType> normal;
00031 };
00032 
00033 template <typename IndexType, unsigned int indexNum>
00034 struct _face_type
00035 {
00036     enum { vertNum = indexNum };
00037     IndexType verts[indexNum];
00038 };
00039 
00040 typedef _3d_point_type<float> Point3f;
00041 typedef _3d_vertex_type<float, float> Vertex3f;
00042 typedef _face_type<index_type, 3> TriangleFace;
00043 
00044 const index_type INVALID_INDEX = -1;//MITK_UNSIGNED_INT_MAX;
00045 
00046 #endif
00047 

Generated on Tue Feb 25 15:00:37 2014 for MITK (Medical Imaging ToolKit) by  doxygen 1.4.3