mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: narrow represention for boundBox bits enums
- add boundBox::directionBit enum which contains the same values as the treeBoundBox::octantBit enum, but without the attached meaning
This commit is contained in:
committed by
Andrew Heather
parent
cdb36e08e9
commit
ace1491df3
@ -47,7 +47,7 @@ Note
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// Forward declarations
|
||||
// Forward Declarations
|
||||
class boundBox;
|
||||
class plane;
|
||||
template<class T> class tmp;
|
||||
@ -69,7 +69,15 @@ class boundBox
|
||||
|
||||
public:
|
||||
|
||||
// Static data members
|
||||
// Static Data Members
|
||||
|
||||
//- Bits used for (x/y/z) direction encoding.
|
||||
enum directionBit : direction
|
||||
{
|
||||
XDIR = 0x1, //!< 0: x-direction (vector component 0)
|
||||
YDIR = 0x2, //!< 2: y-direction (vector component 1)
|
||||
ZDIR = 0x4 //!< 4: z-direction (vector component 2)
|
||||
};
|
||||
|
||||
//- A large boundBox: min/max == -/+ ROOTVGREAT
|
||||
static const boundBox greatBox;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2017 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2017-2019 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
@ -73,7 +73,7 @@ SourceFiles
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// Forward declarations
|
||||
// Forward Declarations
|
||||
class Random;
|
||||
class treeBoundBox;
|
||||
Istream& operator>>(Istream& is, treeBoundBox& bb);
|
||||
@ -91,11 +91,11 @@ class treeBoundBox
|
||||
|
||||
public:
|
||||
|
||||
// Static data members
|
||||
// Static Data Members
|
||||
|
||||
//- Bits used for octant/point coding.
|
||||
//- Bits used for octant/point encoding.
|
||||
// Every octant/corner point is the combination of three faces.
|
||||
enum octantBit
|
||||
enum octantBit : direction
|
||||
{
|
||||
RIGHTHALF = 0x1,
|
||||
TOPHALF = 0x2,
|
||||
@ -114,16 +114,16 @@ public:
|
||||
FRONT = 5 //!< 5: z-max, front
|
||||
};
|
||||
|
||||
//- Bits used for face coding
|
||||
enum faceBit
|
||||
//- Bits used for face encoding
|
||||
enum faceBit : direction
|
||||
{
|
||||
NOFACE = 0,
|
||||
LEFTBIT = 0x1 << LEFT, //1
|
||||
RIGHTBIT = 0x1 << RIGHT, //2
|
||||
BOTTOMBIT = 0x1 << BOTTOM, //4
|
||||
TOPBIT = 0x1 << TOP, //8
|
||||
BACKBIT = 0x1 << BACK, //16
|
||||
FRONTBIT = 0x1 << FRONT, //32
|
||||
LEFTBIT = 0x1 << LEFT, //!< 1: x-min, left
|
||||
RIGHTBIT = 0x1 << RIGHT, //!< 2: x-max, right
|
||||
BOTTOMBIT = 0x1 << BOTTOM, //!< 4: y-min, bottom
|
||||
TOPBIT = 0x1 << TOP, //!< 8: y-max, top
|
||||
BACKBIT = 0x1 << BACK, //!< 16: z-min, back
|
||||
FRONTBIT = 0x1 << FRONT //!< 32: z-max, front
|
||||
};
|
||||
|
||||
//- Edges codes.
|
||||
|
||||
Reference in New Issue
Block a user