File: arrow.h

package info (click to toggle)
python-visual 3.2.9-4.1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 2,796 kB
  • ctags: 2,664
  • sloc: cpp: 11,958; sh: 8,185; python: 3,709; ansic: 480; makefile: 311
file content (45 lines) | stat: -rw-r--r-- 1,111 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef VISUAL_ARROW_H
#define VISUAL_ARROW_H

// Copyright (c) 2000, 2001, 2002, 2003 by David Scherer and others.
// See the file license.txt for complete license terms.
// See the file authors.txt for a complete list of contributors.
#include "axial.h"

namespace visual {

class arrow : public axialSymmetry
{
public:
	arrow();
	arrow( const arrow& other);
	
	virtual void glRender( rView& view);
	virtual vector getScale();
	
	double get_headwidth();
	double get_shaftwidth();
	double get_headlength();
	int get_fixedwidth() const;
	
	void set_headwidth( const double& width);
	void set_headlength( const double& length);
	void set_shaftwidth( const double& width);
	void set_fixedwidth( const int& width);
	
private:
	int fixedwidth;
	double headwidth;
	double headlength;
	// shaftwidth is actually the radius data member from the parent class.
	
	// These variables are used to cache the drawn elements when
	// There is probably a better way to go about this
	double effective_headwidth;
	double effective_shaftwidth;
	double effective_headlength;
};

} // !namespace visual

#endif // !VISUAL_AXIAL_H