source: trunk/packages/vizservers/vtkvis/RpCylinder.cpp @ 3615

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

Remove enclosing Rappture namespace from vtkvis. Remove outline and outline
color subcommands from dataset in vtkvis protocol -- they are replaced by the
outline object. Translate heightmap to dataset z plane (client is doing this
right now).

  • Property svn:eol-style set to native
File size: 899 bytes
Line 
1/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2/*
3 * Copyright (C) 2004-2012  HUBzero Foundation, LLC
4 *
5 * Author: Leif Delgass <ldelgass@purdue.edu>
6 */
7
8#include <vtkPolyDataMapper.h>
9#include <vtkActor.h>
10#include <vtkCylinderSource.h>
11
12#include "RpCylinder.h"
13#include "Trace.h"
14
15using namespace VtkVis;
16
17Cylinder::Cylinder() :
18    Shape()
19{
20}
21
22Cylinder::~Cylinder()
23{
24    TRACE("Deleting Cylinder");
25}
26
27void Cylinder::update()
28{
29    if (_cylinder == NULL) {
30        _cylinder = vtkSmartPointer<vtkCylinderSource>::New();
31    }
32
33    if (_pdMapper == NULL) {
34        _pdMapper = vtkSmartPointer<vtkPolyDataMapper>::New();
35        _pdMapper->SetResolveCoincidentTopologyToPolygonOffset();
36        _pdMapper->ScalarVisibilityOff();
37    }
38
39    _pdMapper->SetInputConnection(_cylinder->GetOutputPort());
40
41    initProp();
42
43    getActor()->SetMapper(_pdMapper);
44    _pdMapper->Update();
45}
Note: See TracBrowser for help on using the repository browser.