Last change
on this file since 3616 was
3616,
checked in by ldelgass, 12 years ago
|
Remove Rp from vtkvis filenames
|
-
Property svn:eol-style set to
native
|
File size:
849 bytes
|
Rev | Line | |
---|
[3154] | 1 | /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */ |
---|
| 2 | /* |
---|
[3177] | 3 | * Copyright (C) 2004-2012 HUBzero Foundation, LLC |
---|
[3154] | 4 | * |
---|
| 5 | * Author: Leif Delgass <ldelgass@purdue.edu> |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | #include <vtkPolyDataMapper.h> |
---|
| 9 | #include <vtkActor.h> |
---|
| 10 | #include <vtkConeSource.h> |
---|
| 11 | |
---|
[3616] | 12 | #include "Cone.h" |
---|
[3154] | 13 | #include "Trace.h" |
---|
| 14 | |
---|
[3615] | 15 | using namespace VtkVis; |
---|
[3154] | 16 | |
---|
| 17 | Cone::Cone() : |
---|
| 18 | Shape() |
---|
| 19 | { |
---|
| 20 | } |
---|
| 21 | |
---|
| 22 | Cone::~Cone() |
---|
| 23 | { |
---|
| 24 | TRACE("Deleting Cone"); |
---|
| 25 | } |
---|
| 26 | |
---|
| 27 | void Cone::update() |
---|
| 28 | { |
---|
| 29 | if (_cone == NULL) { |
---|
| 30 | _cone = vtkSmartPointer<vtkConeSource>::New(); |
---|
| 31 | } |
---|
| 32 | |
---|
| 33 | if (_pdMapper == NULL) { |
---|
| 34 | _pdMapper = vtkSmartPointer<vtkPolyDataMapper>::New(); |
---|
| 35 | _pdMapper->SetResolveCoincidentTopologyToPolygonOffset(); |
---|
| 36 | _pdMapper->ScalarVisibilityOff(); |
---|
| 37 | } |
---|
| 38 | |
---|
| 39 | _pdMapper->SetInputConnection(_cone->GetOutputPort()); |
---|
| 40 | |
---|
| 41 | initProp(); |
---|
| 42 | |
---|
| 43 | getActor()->SetMapper(_pdMapper); |
---|
| 44 | _pdMapper->Update(); |
---|
| 45 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.