Ignore:
Timestamp:
Mar 28, 2009, 3:50:16 PM (16 years ago)
Author:
vrinside
Message:

improving the flow vis engine

  • particle advection for multiple vector field
  • specifying multiple advection planes
  • specifying the position of a particle injection plane
  • specifying the axis of a particle injection plane
  • specifying the visibility of particle injection planes
  • specifying the particle color for each particle injection plane
  • rendering device shapes

[NOTE] Currently, I commented out with the MACRO NEW_FLOW_ENGINE in config
To use this, please comment NEW_FLOW_ENGINE in

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/vizservers/nanovis/NvParticleRenderer.h

    r1333 r1370  
    4242  Particle(float _x, float _y, float _z, float _life) :
    4343   x(_x), y(_y), z(_z), aux(_life){}
    44 };
    45 
    46 struct ParticleInitSlice {
    47   int slice_id;
    48   int slice_axis;
    49   float slice_pos;
    50   bool enabled;
    5144};
    5245
     
    9790    NvParticleAdvectionShader* _advectionShader;
    9891
    99     std::vector<ParticleInitSlice> _initSliceArray;
    100 
    10192    /**
    10293     * @brief scale of flow data
     
    10899    bool _activate;
    109100
     101    float _slice_pos;
     102    int _slice_axis;
     103    Vector4 _color;
     104
     105
    110106public:
    111107    int psys_width;     //the storage of particles is implemented as a 2D array.
     
    115111    ~NvParticleRenderer();
    116112    void setVectorField(unsigned int texID, const Vector3& ori, float scaleX, float scaleY, float scaleZ, float max);
    117     void initialize(Particle* data);
     113    void initialize();
    118114    void advect();
    119115    void update_vertex_buffer();
     
    126122    bool isActivated() const;
    127123
     124    void setAxis(int axis);
     125    void setColor(const Vector4& color);
     126    void setPos(float pos);
     127
    128128    void draw_bounding_box(float x0, float y0, float z0, float x1, float y1, float z1, float r, float g, float b, float line_width);
     129    void initializeDataArray();
    129130};
    130131
     
    144145}
    145146
     147inline void NvParticleRenderer::setColor(const Vector4& color)
     148{
     149        _color = color;
     150}
    146151#endif
Note: See TracChangeset for help on using the changeset viewer.