00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef _MBLINEMESHREGULAR_H
00025 #define _MBLINEMESHREGULAR_H
00026
00027 #ifdef _WIN32
00028 # pragma warning( push )
00029 # pragma warning(disable:4250)
00030 # pragma warning(disable:4251)
00031 #endif
00032
00033 #include <MeshVizXLM/mesh/MiLineMeshRegular.h>
00034 #include <mesh/MbMesh.h>
00035
00036 #include <geometry/MbGeometryRegular.h>
00037 #include <topology/MbLineTopologyI.h>
00038
00049 template <typename _CoordT= MbVec3d, typename _ScalarT=double, typename _Vec3T=MbVec3d>
00050 class MbLineMeshRegular : virtual public MiLineMeshRegular, public MbDataSetStorageI<_ScalarT, _Vec3T>
00051 {
00052 public:
00053
00055 MbLineMeshRegular(size_t numCells, MbVec3d min, MbVec3d max)
00056 : m_topology(numCells), m_geometry(min, max)
00057 {
00058 }
00059
00060 virtual const MiTopologyI& getTopology() const
00061 {
00062 return m_topology;
00063 }
00064
00065 MbLineTopologyI& getTopology()
00066 {
00067 return m_topology;
00068 }
00069
00073 virtual const MiGeometryRegular& getGeometry() const
00074 {
00075 return m_geometry;
00076 }
00077
00078 private:
00079 virtual std::ostream& toStream(std::ostream& s) const;
00080
00081 MbGeometryRegular<MbVec3d::ValueType> m_geometry;
00082 MbLineTopologyI m_topology;
00083 };
00084
00085
00086 template <typename _CoordT, typename _ScalarT, typename _Vec3T>
00087 inline std::ostream&
00088 MbLineMeshRegular<_CoordT, _ScalarT, _Vec3T>::toStream(std::ostream& s) const
00089 {
00090 MiLineMeshRegular::toStream(s);
00091 MbDataSetStorageI<_ScalarT, _Vec3T>::toStream(s);
00092 return s;
00093 }
00094
00095 #ifdef _WIN32
00096 # pragma warning( pop )
00097 #endif
00098
00099 #endif
00100
00101
00102