BALL
1.5.0
include
BALL
VIEW
PRIMITIVES
sphere.h
Go to the documentation of this file.
1
// -*- Mode: C++; tab-width: 2; -*-
2
// vi: set ts=2:
3
//
4
// $Id: sphere.h,v 1.9.16.1 2007-03-25 21:26:11 oliver Exp $
5
//
6
7
#ifndef BALL_VIEW_PRIMITIV_SPHERE_H
8
#define BALL_VIEW_PRIMITIV_SPHERE_H
9
10
#ifndef BALL_VIEW_KERNEL_GEOMETRICOBJECT_H
11
# include <
BALL/VIEW/KERNEL/geometricObject.h
>
12
#endif
13
14
#ifndef BALL_VIEW_MATHS_SPHERE3_H
15
# include <
BALL/MATHS/sphere3.h
>
16
#endif
17
18
namespace
BALL
19
{
20
namespace
VIEW
21
{
22
30
class
BALL_VIEW_EXPORT
Sphere
31
:
public
GeometricObject
,
32
protected
Sphere3
33
{
34
public
:
35
36
BALL_CREATE
(
Sphere
)
37
38
41
44
Sphere
();
45
49
Sphere
(
const
Sphere
& sphere);
50
52
54
57
virtual
~
Sphere
();
58
63
virtual
void
clear();
64
66
69
72
void
set(
const
Sphere
& sphere);
73
76
const
Sphere
& operator = (
const
Sphere
& sphere);
77
80
void
swap(
Sphere
& sphere);
81
83
void
setRadius
(
float
new_radius)
84
{ radius = new_radius;}
85
87
float
getRadius
()
const
88
{
return
radius;}
89
91
void
setPosition
(
const
Vector3
& v3)
92
{ point_ptr_->set(v3);}
93
95
const
Vector3
&
getPosition
()
const
96
{
return
*point_ptr_;}
97
99
void
setPositionAddress
(
const
Vector3
& v3)
100
{ point_ptr_ = (
Vector3
*)&v3;}
101
103
Vector3
*
getPositionAddress
()
104
{
return
point_ptr_;}
105
107
bool
isDefaultPositionAddress
()
108
{
return
point_ptr_ == &p;}
109
111
void
setDefaultPositionAddress
()
112
{ point_ptr_ = & p;}
113
115
118
128
virtual
bool
isValid()
const
;
129
140
virtual
void
dump(std::ostream& s = std::cout,
Size
depth = 0)
const
;
141
142
// Method to get all vertices from a geometric object
143
virtual
void
getVertices(vector<Vector3>& vertices)
const
;
144
146
147
protected
:
148
149
Vector3
*
point_ptr_
;
150
};
151
152
} }
// namespaces
153
154
#endif // BALL_VIEW_PRIMITIV_SPHERE_H
geometricObject.h
BALL::VIEW::Sphere::isDefaultPositionAddress
bool isDefaultPositionAddress()
Definition:
sphere.h:107
BALL_VIEW_EXPORT
#define BALL_VIEW_EXPORT
Definition:
COMMON/global.h:52
BALL::VIEW::Sphere
Definition:
sphere.h:30
BALL::VIEW::Sphere::getRadius
float getRadius() const
Definition:
sphere.h:87
BALL::TVector3< float >
BALL_SIZE_TYPE
BALL::VIEW::Sphere::setPosition
void setPosition(const Vector3 &v3)
Definition:
sphere.h:91
BALL
Definition:
constants.h:12
BALL::TSphere3
Definition:
sphere3.h:32
BALL::VIEW::Sphere::setDefaultPositionAddress
void setDefaultPositionAddress()
Definition:
sphere.h:111
BALL::VIEW::Sphere::setPositionAddress
void setPositionAddress(const Vector3 &v3)
Definition:
sphere.h:99
BALL::VIEW::Sphere::setRadius
void setRadius(float new_radius)
Definition:
sphere.h:83
BALL::VIEW::Sphere::getPositionAddress
Vector3 * getPositionAddress()
Definition:
sphere.h:103
BALL::VIEW::Sphere::getPosition
const Vector3 & getPosition() const
Definition:
sphere.h:95
sphere3.h
BALL::VIEW::GeometricObject
Definition:
geometricObject.h:36
BALL_CREATE
#define BALL_CREATE(name)
Definition:
create.h:62
BALL::VIEW::Sphere::point_ptr_
Vector3 * point_ptr_
Definition:
sphere.h:149
Generated by
1.8.16