source: trunk/packages/vizservers/vtkvis/Line.h @ 3616

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

Remove Rp from vtkvis filenames

  • Property svn:eol-style set to native
File size: 866 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#ifndef VTKVIS_LINE_H
9#define VTKVIS_LINE_H
10
11#include <vtkSmartPointer.h>
12#include <vtkPolyDataMapper.h>
13#include <vtkActor.h>
14#include <vtkLineSource.h>
15
16#include "Shape.h"
17#include "VtkDataSet.h"
18
19namespace VtkVis {
20
21/**
22 * \brief VTK PolyData Line
23 *
24 * This class creates a line
25 */
26class Line : public Shape
27{
28public:
29    Line();
30    virtual ~Line();
31
32    virtual const char *getClassName() const
33    {
34        return "Line";
35    }
36
37    void setEndPoints(double pt1[3], double pt2[3])
38    {
39        if (_line != NULL) {
40            _line->SetPoint1(pt1);
41            _line->SetPoint2(pt2);
42        }
43    }
44
45private:
46    virtual void update();
47
48    vtkSmartPointer<vtkLineSource> _line;
49};
50
51}
52
53#endif
Note: See TracBrowser for help on using the repository browser.