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

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