Ignore:
Timestamp:
Mar 7, 2012 8:46:09 AM (9 years ago)
Author:
ldelgass
Message:

Fix spelling of some identifiers, formatting fixes

File:
1 edited

Legend:

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

    r2817 r2818  
    11/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
     2#include <stdio.h>
     3#include <string.h>
     4
     5#include <expat.h>
    26
    37#include <vrutil/vrFilePath.h>
     
    59#include "ParticleSystemFactory.h"
    610#include "ParticleSystem.h"
    7 
    8 #include <stdio.h>
    911#include "Trace.h"
    1012
    11 #include <expat.h>
    12 
    13 #include <string.h>
    14 
    1513#define BUFSIZE 4096
    1614
    1715void ParticleSystemFactory::text(void *data, const XML_Char *txt, int len)
    1816{
    19 } 
     17}
    2018
    2119void ParticleSystemFactory::startElement(void *userData, const char *elementName, const char **attrs)
     
    8583    int numOfUsedParticles = -1;
    8684    bool sortEnabled = false;
    87     bool glypEnabled = false;
     85    bool glyphEnabled = false;
    8886    bool bboxVisible = false;
    8987    bool advectionEnabled = false;
     
    114112            if (!strcmp(attrs[i + 1], "true"))
    115113                sortEnabled = true;
    116         } else if (!strcmp(attrs[i], "glyp-enabled")) {
    117             if (!strcmp(attrs[i + 1], "true"))
    118                 glypEnabled = true;
     114        } else if (!strcmp(attrs[i], "glyph-enabled")) {
     115            if (!strcmp(attrs[i + 1], "true"))
     116                glyphEnabled = true;
    119117        } else if (!strcmp(attrs[i], "bbox-draw-enabled")) {
    120118            if (!strcmp(attrs[i + 1], "true"))
     
    158156            dir = path.substr(0, index + 1);
    159157            path = dir + fileName;
    160 
    161             _newParticleSystem = new ParticleSystem(width, height, path.c_str(), fieldWidth, fieldHeight, fieldDepth, timeVaryingData, startIndex, endIndex);
     158               
     159            _newParticleSystem =
     160                new ParticleSystem(width, height, path.c_str(),
     161                                   fieldWidth, fieldHeight, fieldDepth,
     162                                   timeVaryingData, startIndex, endIndex);
    162163        } else {
    163             _newParticleSystem = new ParticleSystem(width, height, fileName.c_str(), fieldWidth, fieldHeight, fieldDepth, timeVaryingData, startIndex, endIndex);
     164            _newParticleSystem =
     165                new ParticleSystem(width, height, fileName.c_str(),
     166                                   fieldWidth, fieldHeight, fieldDepth,
     167                                   timeVaryingData, startIndex, endIndex);
    164168        }
    165169    } else {
    166170        std::string path = vrFilePath::getInstance()->getPath(fileName.c_str());
    167         _newParticleSystem = new ParticleSystem(width, height, path.c_str(), fieldWidth, fieldHeight, fieldDepth, timeVaryingData, startIndex, endIndex);
     171        _newParticleSystem =
     172            new ParticleSystem(width, height, path.c_str(),
     173                               fieldWidth, fieldHeight, fieldDepth,
     174                               timeVaryingData, startIndex, endIndex);
    168175    }
    169176
    170177    if (pointSize != -1.0f) _newParticleSystem->setDefaultPointSize(pointSize);
    171178    if (sortEnabled) _newParticleSystem->enable(ParticleSystem::PS_SORT);
    172     if (glypEnabled) _newParticleSystem->enable(ParticleSystem::PS_GLYPE);
     179    if (glyphEnabled) _newParticleSystem->enable(ParticleSystem::PS_GLYPH);
    173180    if (bboxVisible) _newParticleSystem->enable(ParticleSystem::PS_DRAW_BBOX);
    174181    if (advectionEnabled) _newParticleSystem->enable(ParticleSystem::PS_ADVECTION);
Note: See TracChangeset for help on using the changeset viewer.