Line | |
---|

1 | /* |
---|

2 | * ---------------------------------------------------------------------- |
---|

3 | * Rappture::MeshPrism3D |
---|

4 | * This is a non-uniform 3D mesh, made of triangles in (x,y) and |
---|

5 | * line segments in z. Their product forms triangular prisms. |
---|

6 | * |
---|

7 | * ====================================================================== |
---|

8 | * AUTHOR: Michael McLennan, Purdue University |
---|

9 | * Copyright (c) 2004-2006 Purdue Research Foundation |
---|

10 | * |
---|

11 | * See the file "license.terms" for information on usage and |
---|

12 | * redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
---|

13 | * ====================================================================== |
---|

14 | */ |
---|

15 | #ifndef RPMESHPRISM3D_H |
---|

16 | #define RPMESHPRISM3D_H |
---|

17 | |
---|

18 | #include <RpMesh1D.h> |
---|

19 | #include <RpMeshTri2D.h> |
---|

20 | |
---|

21 | namespace Rappture { |
---|

22 | |
---|

23 | class CellPrism3D { |
---|

24 | public: |
---|

25 | CellPrism3D(); |
---|

26 | CellPrism3D(const CellPrism3D& cell); |
---|

27 | CellPrism3D& operator=(const CellPrism3D& cell); |
---|

28 | int& nodeId(int n); |
---|

29 | double& x(int n); |
---|

30 | double& y(int n); |
---|

31 | double& z(int n); |
---|

32 | |
---|

33 | int isOutside() const; |
---|

34 | |
---|

35 | private: |
---|

36 | int _nodeIds[6]; |
---|

37 | double _x[6]; |
---|

38 | double _y[6]; |
---|

39 | double _z[6]; |
---|

40 | }; |
---|

41 | |
---|

42 | class MeshPrism3D { |
---|

43 | public: |
---|

44 | MeshPrism3D(); |
---|

45 | MeshPrism3D(const MeshTri2D& xym, const Mesh1D& zm); |
---|

46 | MeshPrism3D(const MeshPrism3D& mesh); |
---|

47 | MeshPrism3D& operator=(const MeshPrism3D& mesh); |
---|

48 | virtual ~MeshPrism3D(); |
---|

49 | |
---|

50 | virtual double rangeMin(Axis which) const; |
---|

51 | virtual double rangeMax(Axis which) const; |
---|

52 | |
---|

53 | virtual CellPrism3D locate(const Node3D& node) const; |
---|

54 | |
---|

55 | // required for base class Serializable: |
---|

56 | const char* serializerType() const { return "MeshPrism3D"; } |
---|

57 | char serializerVersion() const { return 'A'; } |
---|

58 | |
---|

59 | private: |
---|

60 | MeshTri2D _xymesh; // triangular mesh in x/y axes |
---|

61 | Mesh1D _zmesh; // mesh along z-axis |
---|

62 | }; |
---|

63 | |
---|

64 | } // namespace Rappture |
---|

65 | |
---|

66 | #endif |
---|

**Note:** See

TracBrowser
for help on using the repository browser.