Ignore:
Timestamp:
Apr 2, 2013, 11:02:50 PM (6 years ago)
Author:
ldelgass
Message:

Use nv namespace for classes in nanovis rather than prefixing class names with
Nv (still need to convert shader classes).

File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/packages/vizservers/nanovis/ParticleRenderer.cpp

    r3610 r3611  
    11/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
    2 /*
    3  * ----------------------------------------------------------------------
    4  * NvParticleRenderer.cpp: particle system class
    5  *
    6  * ======================================================================
    7  *  AUTHOR:  Wei Qiao <qiaow@purdue.edu>
    8  *           Purdue Rendering and Perceptualization Lab (PURPL)
    9  *
     2/*
    103 *  Copyright (c) 2004-2013  HUBzero Foundation, LLC
    114 *
    12  *  See the file "license.terms" for information on usage and
    13  *  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
    14  * ======================================================================
     5 *  Authors:
     6 *    Wei Qiao <qiaow@purdue.edu>
    157 */
    168
     
    2113#include <GL/glew.h>
    2214
    23 #include "NvParticleRenderer.h"
     15#include "ParticleRenderer.h"
    2416#include "define.h"
    2517#include "Trace.h"
    2618
    27 NvParticleAdvectionShader *NvParticleRenderer::_advectionShader = NULL;
    28 
    29 class NvParticleAdvectionShaderInstance
    30 {
    31 public :
    32     NvParticleAdvectionShaderInstance()
    33     {}
    34 
    35     ~NvParticleAdvectionShaderInstance()
    36     {
    37         if (NvParticleRenderer::_advectionShader) {
    38             delete NvParticleRenderer::_advectionShader;
    39         }
    40     }
    41 };
    42 
    43 NvParticleAdvectionShaderInstance shaderInstance;
    44 
    45 NvParticleRenderer::NvParticleRenderer(int w, int h) :
     19using namespace nv;
     20
     21NvParticleAdvectionShader *ParticleRenderer::_advectionShader = NULL;
     22ParticleAdvectionShaderInstance shaderInstance;
     23
     24ParticleRenderer::ParticleRenderer(int w, int h) :
    4625    _initPosTex(0),
    4726    _data(NULL),
     
    128107}
    129108
    130 NvParticleRenderer::~NvParticleRenderer()
     109ParticleRenderer::~ParticleRenderer()
    131110{
    132111    glDeleteTextures(1, &_initPosTex);
     
    144123}
    145124
    146 void NvParticleRenderer::initializeDataArray()
     125void
     126ParticleRenderer::initializeDataArray()
    147127{
    148128    size_t n = _psysWidth * _psysHeight * 4;
     
    193173}
    194174
    195 void NvParticleRenderer::initialize()
     175void
     176ParticleRenderer::initialize()
    196177{
    197178    initializeDataArray();
     
    223204}
    224205
    225 void NvParticleRenderer::reset()
     206void
     207ParticleRenderer::reset()
    226208{
    227209    glBindTexture(GL_TEXTURE_RECTANGLE_ARB, _psysTex[0]);
     
    239221}
    240222
    241 void 
    242 NvParticleRenderer::advect()
     223void
     224ParticleRenderer::advect()
    243225{
    244226    if (_reborn)
     
    307289
    308290void
    309 NvParticleRenderer::updateVertexBuffer()
     291ParticleRenderer::updateVertexBuffer()
    310292{
    311293    _vertexArray->read(_psysWidth, _psysHeight);
     
    315297}
    316298
    317 void
    318 NvParticleRenderer::render()
     299void 
     300ParticleRenderer::render()
    319301{
    320302    glPushAttrib(GL_ENABLE_BIT);
     
    344326
    345327void
    346 NvParticleRenderer::setVectorField(unsigned int texID, const vrmath::Vector3f& origin,
    347                                    float scaleX, float scaleY, float scaleZ,
    348                                    float max)
     328ParticleRenderer::setVectorField(unsigned int texID, const vrmath::Vector3f& origin,
     329                                 float scaleX, float scaleY, float scaleZ,
     330                                 float max)
    349331{
    350332    _origin = origin;
     
    354336}
    355337
    356 void NvParticleRenderer::setAxis(int axis)
     338void
     339ParticleRenderer::setAxis(int axis)
    357340{
    358341    _sliceAxis = axis;
     
    360343}
    361344
    362 void NvParticleRenderer::setPos(float pos)
     345void
     346ParticleRenderer::setPos(float pos)
    363347{
    364348    _slicePos = pos;
Note: See TracChangeset for help on using the changeset viewer.