source: trunk/packages/vizservers/nanovis/VelocityArrowsSlice.h @ 1484

Last change on this file since 1484 was 1484, checked in by vrinside, 15 years ago

added 2d arrows (arrow tip will be added)

File size: 1.6 KB
Line 
1#pragma once
2
3#include <Cg/cg.h>
4#include <Cg/cgGL.h>
5#include <vector>
6#include "Vector3.h"
7
8class VelocityArrowsSlice {
9
10        unsigned int _vectorFieldGraphicsID;
11        float _vfXscale;
12        float _vfYscale;
13        float _vfZscale;
14        float _slicePos;
15        int _axis;
16       
17        unsigned int _fbo;     
18    unsigned int _tex;
19       
20        CGcontext _context;
21        CGprogram _queryVelocityFP;
22        CGparameter _ipVectorFieldParam;
23
24        int _renderTargetWidth;
25        int _renderTargetHeight;
26        Vector3* _velocities;
27        std::vector<Vector3> _samplingPositions;
28        Vector3 _projectionVector;
29
30        int _tickCountForMinSizeAxis;
31        int _tickCountX;
32        int _tickCountY;
33        int _tickCountZ;
34       
35        int _pointCount;
36
37        Vector3 _maxVelocityScale;
38
39        bool _enabled; 
40        bool _dirty;
41        bool _dirtySamplingPosition;
42        bool _dirtyRenderTarget;
43       
44private :
45        void createRenderTarget();
46        void computeSamplingTicks();
47public :
48        VelocityArrowsSlice();
49
50        void vectorField(unsigned int vfGraphicsID, float xScale, float yScale, float zScale);
51        void axis(int axis);
52        int axis() const;
53        void slicePos(float pos);
54        float slicePos() const;
55        void queryVelocity();
56        void render();
57        void enabled(bool e);
58        bool enabled() const;
59        void tickCountForMinSizeAxis(int tickCount);
60        int tickCountForMinSizeAxis() const;
61};
62
63inline int VelocityArrowsSlice::axis() const
64{
65        return _axis;
66}
67
68inline float VelocityArrowsSlice::slicePos() const
69{
70        return _slicePos;
71}
72
73
74inline bool VelocityArrowsSlice::enabled() const
75{
76        return _enabled;
77}
78
79inline int VelocityArrowsSlice::tickCountForMinSizeAxis() const
80{
81        return _tickCountForMinSizeAxis;
82}
Note: See TracBrowser for help on using the repository browser.