http://www.sim.no/
http://www.coin3d.org/
include
Inventor
SbSphere.h
1
#ifndef COIN_SBSPHERE_H
2
#define COIN_SBSPHERE_H
3
4
/**************************************************************************\
5
*
6
* This file is part of the Coin 3D visualization library.
7
* Copyright (C) by Kongsberg Oil & Gas Technologies.
8
*
9
* This library is free software; you can redistribute it and/or
10
* modify it under the terms of the GNU General Public License
11
* ("GPL") version 2 as published by the Free Software Foundation.
12
* See the file LICENSE.GPL at the root directory of this source
13
* distribution for additional information about the GNU GPL.
14
*
15
* For using Coin with software that can not be combined with the GNU
16
* GPL, and for taking advantage of the additional benefits of our
17
* support services, please contact Kongsberg Oil & Gas Technologies
18
* about acquiring a Coin Professional Edition License.
19
*
20
* See http://www.coin3d.org/ for more information.
21
*
22
* Kongsberg Oil & Gas Technologies, Bygdoy Alle 5, 0257 Oslo, NORWAY.
23
* http://www.sim.no/ sales@sim.no coin-support@coin3d.org
24
*
25
\**************************************************************************/
26
27
#include <stdio.h>
28
#include <Inventor/SbVec3f.h>
29
30
class
SbLine
;
31
class
SbBox3f
;
32
33
class
COIN_DLL_API
SbSphere
{
34
public
:
35
SbSphere
(
void
);
36
SbSphere
(
const
SbVec3f
& center,
const
float
radius);
37
void
setValue(
const
SbVec3f
& center,
const
float
radius);
38
void
setCenter(
const
SbVec3f
& center);
39
void
setRadius(
const
float
radius);
40
const
SbVec3f
& getCenter(
void
)
const
;
41
float
getRadius(
void
)
const
;
42
void
circumscribe(
const
SbBox3f
& box);
43
SbBool intersect(
const
SbLine
& l,
SbVec3f
& intersection)
const
;
44
SbBool intersect(
const
SbLine
& l,
SbVec3f
& enter,
SbVec3f
& exit)
const
;
45
SbBool pointInside(
const
SbVec3f
& p)
const
;
46
47
void
print(FILE * file)
const
;
48
49
private
:
50
SbVec3f
center;
51
float
radius;
52
};
53
54
#endif // !COIN_SBSPHERE_H
SbBox3f
The SbBox3f class is an abstraction for an axis aligned 3 dimensional box.
Definition:
SbBox3f.h:37
SbSphere
The SbSphere class is a representation of a sphere.
Definition:
SbSphere.h:33
SbVec3f
The SbVec3f class is a 3 dimensional vector with floating point coordinates.
Definition:
SbVec3f.h:40
SbLine
The SbLine class represents a line in 3D space.
Definition:
SbLine.h:32
Copyright © 1998-2010 by
Kongsberg Oil & Gas Technologies
. All rights reserved.
Generated on Mon Jul 27 2020 for Coin by
Doxygen
1.8.18.