HDK
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
UT_BoundingSphere.h
Go to the documentation of this file.
1
/*
2
* PROPRIETARY INFORMATION. This software is proprietary to
3
* Side Effects Software Inc., and is not to be reproduced,
4
* transmitted, or disclosed in any way without written permission.
5
*
6
* NAME: UT_BoundingSphere.h ( Utility Library, C++)
7
*
8
* COMMENTS:
9
* This class implements a bounding sphere (with unity scale).
10
* It's not very precise. It's mainly meant for a one time
11
* calculation of a bounding sphere. If you try combining bounding
12
* spheres, you get rather gross results compared to your initial
13
* points.
14
*/
15
16
#ifndef __UT_BoundingSphere__
17
#define __UT_BoundingSphere__
18
19
#include "
UT_API.h
"
20
#include "
UT_Vector3.h
"
21
#include "
UT_Vector4.h
"
22
#include "
UT_Vector3Array.h
"
23
#include "
UT_BoundingBox.h
"
24
25
26
class
UT_API
UT_BoundingSphere
27
{
28
public
:
29
UT_BoundingSphere
();
30
~
UT_BoundingSphere
();
31
32
bool
isInside(
const
UT_Vector3R
&pt)
const
;
33
34
fpreal
getRadius
()
const
{
return
myRadius; }
35
const
UT_Vector3R
&
getCenter
()
const
{
return
myCenter; }
36
37
void
initialize
(
bool
requires_update =
false
);
38
void
computeBound();
39
fpreal
computeRadius(
const
UT_Vector3R
&
center
)
const
;
40
41
void
addPoint(
const
UT_Vector3R
&pt);
42
void
addBox(
const
UT_BoundingBox
&
box
);
43
void
addSphere(
const
UT_BoundingSphere
&bsphere);
44
45
void
transform
(
const
UT_Matrix4R
&xform);
46
47
private
:
48
// NOTE: Currently, the default copy constructor and assignment operators
49
// are sufficient.
50
UT_Vector3R
myCenter;
51
fpreal
myRadius;
52
fpreal
myRadiusSquared;
53
UT_Vector3R
myMins[3];
54
UT_Vector3R
myMaxs[3];
55
bool
myDoDynamic;
56
UT_Vector3RArray
myPointArray;
57
};
58
#endif
59
UT_Matrix4T< fpreal >
UT_BoundingBoxT< float >
UT_BoundingSphere::getCenter
const UT_Vector3R & getCenter() const
Definition:
UT_BoundingSphere.h:35
UT_Vector3.h
UT_API.h
UT_API
#define UT_API
Definition:
UT_API.h:14
UT_BoundingSphere
Definition:
UT_BoundingSphere.h:26
UT_Vector3T< fpreal >
UT_ValArray< UT_Vector3R >
transform
GLuint GLenum GLenum transform
Definition:
glew.h:15055
UT_BoundingSphere::getRadius
fpreal getRadius() const
Definition:
UT_BoundingSphere.h:34
UT_Vector4.h
openvdb::OPENVDB_VERSION_NAME::initialize
OPENVDB_API void initialize()
Global registration of native Grid, Transform, Metadata and Point attribute types. Also initializes blosc (if enabled).
Definition:
logging.h:294
box
GLsizei const GLint box[]
Definition:
glew.h:11654
UT_Vector3Array.h
fpreal
fpreal64 fpreal
Definition:
SYS_Types.h:277
align::center
Definition:
core.h:1870
UT_BoundingBox.h
UT
UT_BoundingSphere.h
Generated on Thu Mar 30 2023 02:56:59 for HDK by
1.8.6