fixed some const correctness issues on tetrahedrons
This commit is contained in:
parent
ba3e4370bb
commit
5556f4184c
|
@ -250,7 +250,7 @@ public:
|
||||||
return V;
|
return V;
|
||||||
}
|
}
|
||||||
|
|
||||||
static ScalarType ComputeMeshVolume(const MeshType & m)
|
static ScalarType ComputeMeshVolume(MeshType & m)
|
||||||
{
|
{
|
||||||
Inertia<MeshType> I(m);
|
Inertia<MeshType> I(m);
|
||||||
return I.Mass();
|
return I.Mass();
|
||||||
|
|
|
@ -2049,7 +2049,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class ATTR_TYPE>
|
template <class ATTR_TYPE>
|
||||||
static typename MeshType::template ConstPerTetraAttributeHandle<ATTR_TYPE> FindPerTetraAttribute(MeshType &m, const std::string &name)
|
static typename MeshType::template ConstPerTetraAttributeHandle<ATTR_TYPE> FindPerTetraAttribute(const MeshType &m, const std::string &name)
|
||||||
{
|
{
|
||||||
if(!name.empty()){
|
if(!name.empty()){
|
||||||
PointerToAttribute h1;
|
PointerToAttribute h1;
|
||||||
|
|
|
@ -48,7 +48,7 @@ template <class T> class EmptyCore : public T {
|
||||||
public:
|
public:
|
||||||
//Empty vertexref
|
//Empty vertexref
|
||||||
inline typename T::VertexType * & V( const int ) { assert(0); static typename T::VertexType *vp=0; return vp; }
|
inline typename T::VertexType * & V( const int ) { assert(0); static typename T::VertexType *vp=0; return vp; }
|
||||||
inline typename T::VertexType * const & V( const int ) const { assert(0); static typename T::VertexType *vp=0; return vp; }
|
inline const typename T::VertexType * V( const int ) const { assert(0); static typename T::VertexType *vp=0; return vp; }
|
||||||
inline const typename T::VertexType * cV( const int ) const { assert(0); static typename T::VertexType *vp=0; return vp; }
|
inline const typename T::VertexType * cV( const int ) const { assert(0); static typename T::VertexType *vp=0; return vp; }
|
||||||
inline typename T::CoordType & P( const int ) { assert(0); static typename T::CoordType coord(0, 0, 0); return coord; }
|
inline typename T::CoordType & P( const int ) { assert(0); static typename T::CoordType coord(0, 0, 0); return coord; }
|
||||||
inline const typename T::CoordType & P( const int ) const { assert(0); static typename T::CoordType coord(0, 0, 0); return coord; }
|
inline const typename T::CoordType & P( const int ) const { assert(0); static typename T::CoordType coord(0, 0, 0); return coord; }
|
||||||
|
@ -181,7 +181,8 @@ public:
|
||||||
typedef typename T::VertexType::ScalarType ScalarType;
|
typedef typename T::VertexType::ScalarType ScalarType;
|
||||||
|
|
||||||
inline typename T::VertexType * & V( const int j ) { assert(j>=0 && j<4); return v[j]; }
|
inline typename T::VertexType * & V( const int j ) { assert(j>=0 && j<4); return v[j]; }
|
||||||
inline const typename T::VertexType * cV( const int j ) { assert(j>=0 && j<4); return v[j]; }
|
inline const typename T::VertexType * V( const int j ) const { assert(j>=0 && j<4); return v[j]; }
|
||||||
|
inline const typename T::VertexType * cV( const int j ) const { assert(j>=0 && j<4); return v[j]; }
|
||||||
|
|
||||||
inline size_t cFtoVi (const int f, const int j) const { assert(f >= 0 && f < 4); assert(j >= 0 && j < 3); return findices[f][j]; }
|
inline size_t cFtoVi (const int f, const int j) const { assert(f >= 0 && f < 4); assert(j >= 0 && j < 3); return findices[f][j]; }
|
||||||
|
|
||||||
|
@ -457,7 +458,8 @@ public:
|
||||||
typename T::TetraPointer const cVTp( const int j ) const { assert( j >= 0 && j < 4 ); return _vtp[j]; }
|
typename T::TetraPointer const cVTp( const int j ) const { assert( j >= 0 && j < 4 ); return _vtp[j]; }
|
||||||
|
|
||||||
char & VTi( const int j ) { return _vti[j]; }
|
char & VTi( const int j ) { return _vti[j]; }
|
||||||
const char & cVTi( const int j ) const { return _vti[j]; }
|
char VTi( const int j ) const { return _vti[j]; }
|
||||||
|
char cVTi( const int j ) const { return _vti[j]; }
|
||||||
|
|
||||||
static bool HasVTAdjacency() { return true; }
|
static bool HasVTAdjacency() { return true; }
|
||||||
static bool HasVTAdjacencyOcc() { return false; }
|
static bool HasVTAdjacencyOcc() { return false; }
|
||||||
|
|
|
@ -572,6 +572,7 @@ public:
|
||||||
typename T::TetraPointer &VTp() { return _tp; }
|
typename T::TetraPointer &VTp() { return _tp; }
|
||||||
typename T::TetraPointer cVTp() const { return _tp; }
|
typename T::TetraPointer cVTp() const { return _tp; }
|
||||||
int &VTi() {return _zp; }
|
int &VTi() {return _zp; }
|
||||||
|
int VTi() const { return _zp; }
|
||||||
int cVTi() const { return _zp; }
|
int cVTi() const { return _zp; }
|
||||||
static bool HasVTAdjacency() { return true; }
|
static bool HasVTAdjacency() { return true; }
|
||||||
static void Name( std::vector< std::string > & name ) { name.push_back( std::string("VTAdj") ); T::Name(name); }
|
static void Name( std::vector< std::string > & name ) { name.push_back( std::string("VTAdj") ); T::Name(name); }
|
||||||
|
|
Loading…
Reference in New Issue