source: trunk/packages/vizservers/vtkvis/RpSphere.h @ 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: 1.7 KB
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_SPHERE_H
9#define VTKVIS_SPHERE_H
10
11#include <vtkSmartPointer.h>
12#include <vtkPolyDataMapper.h>
13#include <vtkActor.h>
14#include <vtkSphereSource.h>
15
16#include "RpShape.h"
17#include "RpVtkDataSet.h"
18
19namespace VtkVis {
20
21/**
22 * \brief VTK PolyData sphere
23 *
24 * This class creates a mesh sphere
25 */
26class Sphere : public Shape
27{
28public:
29    Sphere();
30    virtual ~Sphere();
31
32    virtual const char *getClassName() const
33    {
34        return "Sphere";
35    }
36
37    void setThetaResolution(int res)
38    {
39        if (_sphere != NULL)
40            _sphere->SetThetaResolution(res);
41    }
42
43    void setPhiResolution(int res)
44    {
45        if (_sphere != NULL)
46            _sphere->SetPhiResolution(res);
47    }
48
49    void setStartTheta(double val)
50    {
51        if (_sphere != NULL)
52            _sphere->SetStartTheta(val);
53    }
54
55    void setEndTheta(double val)
56    {
57        if (_sphere != NULL)
58            _sphere->SetEndTheta(val);
59    }
60
61    void setStartPhi(double val)
62    {
63        if (_sphere != NULL)
64            _sphere->SetStartPhi(val);
65    }
66
67    void setEndPhi(double val)
68    {
69        if (_sphere != NULL)
70            _sphere->SetEndPhi(val);
71    }
72
73    void setLatLongTessellation(bool val)
74    {
75        if (_sphere != NULL)
76            _sphere->SetLatLongTessellation((val ? 1 : 0));
77    }
78
79    void setRadius(double radius)
80    {
81        if (_sphere != NULL)
82            _sphere->SetRadius(radius);
83    }
84
85private:
86    virtual void update();
87
88    vtkSmartPointer<vtkSphereSource> _sphere;
89};
90
91}
92
93#endif
Note: See TracBrowser for help on using the repository browser.