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

Last change on this file since 3621 was 3621, checked in by ldelgass, 12 years ago

Some more renaming: remove Vtk from some filenames and rename VtkGraphicsObject?
to GraphicsObject? to avoid confusion with vtk classes.

  • Property svn:eol-style set to native
File size: 863 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 "DataSet.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.