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_BoundingCone.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_BoundingCone.h (UT Library, C++)
7
*
8
* COMMENTS: A cone centered at the origin with a given direction and
9
* half-angle.
10
*/
11
12
#ifndef __UT_BoundingCone_h__
13
#define __UT_BoundingCone_h__
14
15
#include "
UT_API.h
"
16
#include "
UT_Vector3.h
"
17
18
class
UT_API
UT_BoundingCone
19
{
20
public
:
21
UT_BoundingCone
()
22
{
23
myDir = 0;
24
myAngle = 0;
25
}
26
27
// Cone angles are measured from the center to the edge of the cone.
28
UT_BoundingCone
(
const
UT_Vector3
&dir,
float
angle
)
29
: myDir(dir)
30
, myAngle(angle)
31
{
32
myDir.normalize();
33
}
34
35
const
UT_Vector3
&
getDir
()
const
{
return
myDir; }
36
float
getAngle
()
const
{
return
myAngle; }
37
38
// Initialize the direction vector and set the angle to 0
39
void
initBounds(
const
UT_Vector3
&dir);
40
41
// Enlarge the cone so that it encloses the given direction vector.
42
void
enlargeBounds(
const
UT_Vector3
&dir);
43
44
// Tests for any intersection between two cones
45
bool
intersects
(
const
UT_BoundingCone
&cone)
const
;
46
47
// Find the intersection of this bounding cone with another cone and
48
// store the result in this. The result will be a conservative bound,
49
// since the exact intersection may not be a cone. If the cones are
50
// disjoint, the angle for this cone will be set to 0 and this method
51
// will return false.
52
bool
computeIntersection(
const
UT_BoundingCone
&cone);
53
54
void
dump();
55
56
private
:
57
UT_Vector3
myDir;
58
float
myAngle;
59
};
60
61
#endif
UT_BoundingCone::UT_BoundingCone
UT_BoundingCone(const UT_Vector3 &dir, float angle)
Definition:
UT_BoundingCone.h:28
SIM_ConstraintNetwork::Names::angle
SIM_API const UT_StringHolder angle
UT_Vector3.h
UT_API.h
UT_API
#define UT_API
Definition:
UT_API.h:14
UT_Vector3T< float >
UT_BoundingCone::getDir
const UT_Vector3 & getDir() const
Definition:
UT_BoundingCone.h:35
UT_BoundingCone::UT_BoundingCone
UT_BoundingCone()
Definition:
UT_BoundingCone.h:21
intersects
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 bool intersects(const Box< Vec3< T >> &b, const Line3< T > &r, Vec3< T > &ip) IMATH_NOEXCEPT
Definition:
ImathBoxAlgo.h:642
UT_BoundingCone::getAngle
float getAngle() const
Definition:
UT_BoundingCone.h:36
UT_BoundingCone
Definition:
UT_BoundingCone.h:18
UT
UT_BoundingCone.h
Generated on Wed Aug 27 2025 03:08:37 for HDK by
1.8.6