mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#5273 Struct Grid: Add enum GridAxisType for IJK axis
This commit is contained in:
@@ -204,6 +204,29 @@ void StructGridInterface::neighborIJKAtCellFace(size_t i, size_t j, size_t k, Fa
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
StructGridInterface::GridAxisType StructGridInterface::gridAxisFromFace(FaceType face)
|
||||
{
|
||||
GridAxisType axis = GridAxisType::NO_AXIS;
|
||||
|
||||
if (face == cvf::StructGridInterface::POS_I || face == cvf::StructGridInterface::NEG_I)
|
||||
{
|
||||
axis = GridAxisType::AXIS_I;
|
||||
}
|
||||
else if (face == cvf::StructGridInterface::POS_J || face == cvf::StructGridInterface::NEG_J)
|
||||
{
|
||||
axis = GridAxisType::AXIS_J;
|
||||
}
|
||||
else if (face == cvf::StructGridInterface::POS_K || face == cvf::StructGridInterface::NEG_K)
|
||||
{
|
||||
axis = GridAxisType::AXIS_K;
|
||||
}
|
||||
|
||||
return axis;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Models with large absolute values for coordinate scalars will often end up with z-fighting due
|
||||
/// to numerical limits in float used by OpenGL. displayModelOffset() is intended
|
||||
|
||||
@@ -70,6 +70,14 @@ public:
|
||||
typedef caf::AppEnum<StructGridInterface::FaceType> FaceEnum;
|
||||
|
||||
|
||||
enum class GridAxisType
|
||||
{
|
||||
AXIS_I,
|
||||
AXIS_J,
|
||||
AXIS_K,
|
||||
NO_AXIS
|
||||
};
|
||||
|
||||
public:
|
||||
StructGridInterface();
|
||||
|
||||
@@ -109,6 +117,8 @@ public:
|
||||
static FaceType oppositeFace(FaceType face);
|
||||
static void neighborIJKAtCellFace(size_t i, size_t j, size_t k, StructGridInterface::FaceType face, size_t* ni, size_t* nj, size_t* nk);
|
||||
|
||||
static GridAxisType gridAxisFromFace(FaceType face);
|
||||
|
||||
private:
|
||||
mutable double m_characteristicCellSizeI;
|
||||
mutable double m_characteristicCellSizeJ;
|
||||
|
||||
Reference in New Issue
Block a user