source: trunk/packages/vizservers/nanovis/NvFlowVisRenderer.h @ 3502

Last change on this file since 3502 was 3502, checked in by ldelgass, 11 years ago

Add basic VTK structured points reader to nanovis, update copyright dates.

  • Property svn:eol-style set to native
File size: 2.5 KB
RevLine 
[2798]1/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
[3502]2/*
3 * Copyright (c) 2004-2013  HUBzero Foundation, LLC
4 *
5 */
[2817]6#ifndef NVFLOWVISRENDERER_H
7#define NVFLOWVISRENDERER_H
[1369]8
[2833]9#include <map>
10#include <string>
[1369]11
[3492]12#include <vrmath/Vector3f.h>
13#include <vrmath/Vector4f.h>
14
[1369]15#include "NvVectorField.h"
16
17class NvParticleRenderer;
18
[2836]19class NvFlowVisRenderer
20{
[1369]21public:
[2836]22    NvFlowVisRenderer(int w, int h);
[2832]23
[1431]24    ~NvFlowVisRenderer();
[1369]25
[1431]26    void initialize();
[2832]27
[1431]28    void initialize(const std::string& vfName);
[2832]29
[1431]30    void advect();
[2832]31
[1431]32    void reset();
[2832]33
[1431]34    void render();
[1369]35
[3492]36    void addVectorField(Volume *volPtr, const vrmath::Vector3f& ori, float scaleX,
[2832]37                        float scaleY, float scaleZ, float max);
[1429]38
[3492]39    void addVectorField(const std::string& vfName, Volume *volPtr, const vrmath::Vector3f& ori,
[2832]40                        float scaleX, float scaleY, float scaleZ, float max);
41
[1431]42    void removeVectorField(const std::string& vfName);
[1369]43
[1431]44    void addPlane(const std::string& vfName, const std::string& name);
[2832]45
[1431]46    void removePlane(const std::string& vfName, const std::string& name);
[1369]47
[1431]48    /**
49     * @brief Specify the axis of the index plane
50     */
51    void setPlaneAxis(const std::string& vfName, const std::string& name, int axis);
[1369]52
[1431]53    /**
[2877]54     * @param pos Specify the position of slice
[1431]55     */
56    void setPlanePos(const std::string& vfName, const std::string& name, float pos);
[2832]57
[3492]58    void setParticleColor(const std::string& vfName, const std::string& name, const vrmath::Vector4f& color);
[2832]59
[1431]60    void activatePlane(const std::string& vfName, const std::string& name);
[2832]61
[1431]62    void deactivatePlane(const std::string& vfName, const std::string& name);
[1369]63
[1431]64    void activateVectorField(const std::string& vfName);
[2832]65
[1431]66    void deactivateVectorField(const std::string& vfName);
[1369]67
[1431]68    ////////////////////
69    // DEVICE SHAPE
70    void addDeviceShape(const std::string& vfName, const std::string& name, const NvDeviceShape& shape);
[2832]71
[1431]72    void removeDeviceShape(const std::string& vfName, const std::string& name);
[2832]73
[1431]74    void activateDeviceShape(const std::string& vfName);
[2832]75
[1431]76    void deactivateDeviceShape(const std::string& vfName);
[2832]77
[1431]78    void activateDeviceShape(const std::string& vfName, const std::string& name);
[2832]79
[1431]80    void deactivateDeviceShape(const std::string& vfName, const std::string& name);
[2832]81
82    bool active()
83    {
[1431]84        return _activated;
85    }
[2832]86
87    void active(bool state)
88    {
[1431]89        _activated = state;
90    }
[2832]91
92private:
93    int _psys_width;
94    int _psys_height;
95
96    std::map<std::string, NvVectorField *> _vectorFieldMap;
97
98    bool _activated;
[1369]99};
100
[2817]101#endif
Note: See TracBrowser for help on using the repository browser.