source: trunk/src/core2/RpFieldPrism3D.h @ 1031

Last change on this file since 1031 was 1031, checked in by gah, 16 years ago

more 1.1 fixes

File size: 1.7 KB
Line 
1/*
2 * ----------------------------------------------------------------------
3 *  Rappture::FieldPrism3D
4 *    This is a continuous, linear function defined by a series of
5 *    points on a 3D prismatic mesh.  It's a scalar field defined
6 *    in 3D space.
7 *
8 * ======================================================================
9 *  AUTHOR:  Michael McLennan, Purdue University
10 *  Copyright (c) 2004-2006  Purdue Research Foundation
11 *
12 *  See the file "license.terms" for information on usage and
13 *  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
14 * ======================================================================
15 */
16#ifndef RPFIELDPRISM3D_H
17#define RPFIELDPRISM3D_H
18
19#include <math.h>
20#include <vector>
21#include <RpPtr.h>
22#include <RpMeshPrism3D.h>
23
24namespace Rappture {
25
26class FieldPrism3D {
27public:
28    FieldPrism3D();
29    FieldPrism3D(const MeshTri2D& xyg, const Mesh1D& zg);
30    FieldPrism3D(const FieldPrism3D& field);
31    FieldPrism3D& operator=(const FieldPrism3D& field);
32    virtual ~FieldPrism3D();
33
34    virtual double rangeMin(Axis which) const;
35    virtual double rangeMax(Axis which) const;
36
37    virtual FieldPrism3D& define(int nodeId, double f);
38    virtual double value(double x, double y, double z,
39        double outside=NAN) const;
40    virtual double valueMin() const;
41    virtual double valueMax() const;
42
43private:
44    std::vector<double> _valuelist;  // list of all values, in nodeId order
45    double _vmin;                    // minimum value in _valuelist
46    double _vmax;                    // maximum value in _valuelist
47    Ptr<MeshPrism3D> _meshPtr;       // mesh for all (x,y,z) points
48    int _counter;                    // counter for generating node IDs
49};
50
51} // namespace Rappture
52
53#endif
Note: See TracBrowser for help on using the repository browser.