source: vtkvis/branches/1.7/Parallelepiped.h @ 4604

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

Fix spelling of parallelepiped, silently fix left-handed ordering of vectors

File size: 1.1 KB
Line 
1/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2/*
3 * Copyright (C) 2004-2013  HUBzero Foundation, LLC
4 *
5 * Author: Leif Delgass <ldelgass@purdue.edu>
6 */
7
8#ifndef VTKVIS_PARALLELEPIPED_H
9#define VTKVIS_PARALLELEPIPED_H
10
11#include <vtkSmartPointer.h>
12#include <vtkPolyDataMapper.h>
13#include <vtkActor.h>
14#include <vtkCubeSource.h>
15#include <vtkTransform.h>
16
17#include "Shape.h"
18#include "DataSet.h"
19
20namespace VtkVis {
21
22/**
23 * \brief VTK PolyData Parallelepiped
24 *
25 * This class creates a mesh parallelepiped
26 */
27class Parallelepiped : public Shape
28{
29public:
30    Parallelepiped();
31    virtual ~Parallelepiped();
32
33    virtual const char *getClassName() const
34    {
35        return "Parallelepiped";
36    }
37
38    void setVectors(double vec1[3], double vec2[3], double vec3[3]);
39
40    void setSize(double xlen, double ylen, double zlen)
41    {
42        if (_box != NULL) {
43            _box->SetXLength(xlen);
44            _box->SetYLength(ylen);
45            _box->SetZLength(zlen);
46        }
47    }
48
49    void flipNormals(bool state);
50
51private:
52    virtual void update();
53
54    vtkSmartPointer<vtkCubeSource> _box;
55    vtkSmartPointer<vtkTransform> _transform;
56};
57
58}
59
60#endif
Note: See TracBrowser for help on using the repository browser.