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
31
bool
isInside(
const
UT_Vector3R
&pt)
const
;
32
33
fpreal
getRadius
()
const
{
return
myRadius; }
34
const
UT_Vector3R
&
getCenter
()
const
{
return
myCenter; }
35
36
void
initialize
(
bool
requires_update =
false
);
37
void
computeBound();
38
fpreal
computeRadius(
const
UT_Vector3R
&
center
)
const
;
39
40
void
addPoint(
const
UT_Vector3R
&pt);
41
void
addBox(
const
UT_BoundingBox
&box);
42
void
addSphere(
const
UT_BoundingSphere
&bsphere);
43
44
void
transform
(
const
UT_Matrix4R
&xform);
45
46
private
:
47
UT_Vector3R
myCenter;
48
fpreal
myRadius;
49
fpreal
myRadiusSquared;
50
UT_Vector3R
myMins[3];
51
UT_Vector3R
myMaxs[3];
52
bool
myDoDynamic;
53
UT_Vector3RArray
myPointArray;
54
};
55
#endif
56
UT_Matrix4T< fpreal >
UT_BoundingBoxT< float >
UT_BoundingSphere::getCenter
const UT_Vector3R & getCenter() const
Definition:
UT_BoundingSphere.h:34
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 >
UT_BoundingSphere::getRadius
fpreal getRadius() const
Definition:
UT_BoundingSphere.h:33
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
GA_Names::transform
GA_API const UT_StringHolder transform
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 Tue Oct 8 2024 02:44:22 for HDK by
1.8.6