OpendTect-6_4  6.4
beachballdata.h
Go to the documentation of this file.
1 #ifndef beachballdata_h
2 #define beachballdata_h
3 /*+
4  * (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
5  * AUTHOR : Karthika
6  * DATE : Sep 2009
7  * ID : $Id$
8 -*/
9 
10 #include "generalmod.h"
11 #include "color.h"
12 #include "namedobj.h"
13 #include "position.h"
14 
15 namespace visBeachBall
16 {
17 
19 
21 {
22 public:
23 
24  BallProperties( const char* nm=0,
25  float r=500,
26  Color c1=Color(255,0,0),
27  Color c2=Color::White(),
28  Coord3 p=Coord3(0, 0, 0),
29  float el=0.5)
30  : ::NamedObject(nm)
31  , radius_(r)
32  , color1_(c1), color2_(c2)
33  , pos_(p), elasticity_(el) {}
34 
35  BallProperties get() const;
36  void set(const BallProperties&);
37 
38  float radius() const;
39  void setRadius(float);
40 
41  Color color1() const;
42  void setColor1(Color);
43 
44  Color color2() const;
45  void setColor2(Color);
46 
47  Coord3 pos() const;
48  void setPos(const Coord3&);
49 
50  float elasticity() const;
51  void setElasticity(float);
52 
53  BallProperties& operator = (const BallProperties& bp);
54  bool operator == (const BallProperties& bp) const;
55  bool operator != (const BallProperties& bp) const;
56 
57 protected:
58 
59  float radius_;
63  float elasticity_; // range is 0.0 to 1.0
64 
65 };
66 
67 
69 
70 mExpClass(General) BallDynamics: public ::NamedObject
71 {
72 public:
73 
74  BallDynamics(const char* nm=0,
75  float sp=1.0,
76  Coord3 dirvec=Coord3(1, 1, 1))
77  : ::NamedObject(nm)
78  , speed_(sp)
79  , directionvec_(dirvec) {}
80 
81  BallDynamics get() const;
82  void set(const BallDynamics&);
83 
84  float speed() const;
85  void setSpeed(const float&);
86 
87  Coord3 directionvector() const;
88  void setDirectionVector(const Coord3&);
89 
90  void velocity(float*, Coord3*) const;
91  void setVelocity(float, const Coord3&);
92 
93  BallDynamics& operator = (const BallDynamics& bd);
94  bool operator == (const BallDynamics& bd) const;
95  bool operator != (const BallDynamics& bd) const;
96 
97 protected:
98 
99  float speed_;
101 
102 };
103 
104 };
105 
106 
107 #endif
#define mExpClass(module)
Definition: commondefs.h:160
bool operator==(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:53
basic properties of the ball
Definition: beachballdata.h:20
float speed_
Definition: beachballdata.h:99
BallDynamics(const char *nm=0, float sp=1.0, Coord3 dirvec=Coord3(1, 1, 1))
Definition: beachballdata.h:74
BallProperties(const char *nm=0, float r=500, Color c1=Color(255, 0, 0), Color c2=Color::White(), Coord3 p=Coord3(0, 0, 0), float el=0.5)
Definition: beachballdata.h:24
float elasticity_
Definition: beachballdata.h:63
dynamic properties of the ball
Definition: beachballdata.h:70
FixedString Color()
Definition: keystrs.h:46
Color color2_
Definition: beachballdata.h:61
bool operator!=(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:62
float radius_
Definition: beachballdata.h:59
Color color1_
Definition: beachballdata.h:60
A cartesian coordinate in 3D space.
Definition: coord.h:72
Coord3 pos_
Definition: beachballdata.h:62
static Color White()
Definition: color.h:85
Object with a name.
Definition: namedobj.h:35
Definition: beachballdata.h:15
Coord3 directionvec_
movement dir
Definition: beachballdata.h:100
Color is an RGB color object, with a transparancy. The storage is in a 4-byte integer, similar to Qt.
Definition: color.h:26

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2019