hrplib
hrpCollision
Opcode
Ice
IceLSS.h
Go to the documentation of this file.
1
8
11
// Include Guard
12
#ifndef __ICELSS_H__
13
#define __ICELSS_H__
14
15
class
ICEMATHS_API
LSS
:
public
Segment
16
{
17
public
:
19
inline_
LSS
() {}
21
inline_
LSS
(
const
Segment
& seg,
float
radius) :
Segment
(seg), mRadius(radius) {}
23
inline_
~LSS
() {}
24
26
30
void
ComputeOBB(
OBB
&
box
);
32
34
40
inline_
bool
Contains(
const
Point
& pt)
const
{
return
SquareDistance
(pt) <= mRadius*mRadius; }
42
44
50
inline_
bool
Contains(
const
Sphere
& sphere)
52
{
53
float
d = mRadius - sphere.
mRadius
;
54
if
(d>=0.0
f
)
return
SquareDistance
(sphere.
mCenter
) <= d*d;
55
else
return
false
;
56
}
57
59
65
inline_
bool
Contains(
const
LSS
& lss)
67
{
68
// We check the LSS contains the two spheres at the start and end of the sweep
69
return
Contains(
Sphere
(lss.
mP0
, lss.
mRadius
)) && Contains(
Sphere
(lss.
mP0
, lss.
mRadius
));
70
}
71
72
float
mRadius
;
73
};
74
75
#endif // __ICELSS_H__
Segment::SquareDistance
float SquareDistance(const Point &point, float *t=null) const
Definition:
IceSegment.cpp:29
LSS::LSS
inline_ LSS(const Segment &seg, float radius)
Constructor.
Definition:
IceLSS.h:21
inline_
#define inline_
Definition:
IcePreprocessor.h:103
Point
Definition:
IcePoint.h:25
ICEMATHS_API
#define ICEMATHS_API
Definition:
OPC_IceHook.h:51
LSS::LSS
inline_ LSS()
Constructor.
Definition:
IceLSS.h:19
OBB
Definition:
IceOBB.h:18
Sphere::mRadius
float mRadius
Sphere radius.
Definition:
IceBoundingSphere.h:139
Sphere::mCenter
Point mCenter
Sphere center.
Definition:
IceBoundingSphere.h:138
Segment
Definition:
IceSegment.h:15
LSS::~LSS
inline_ ~LSS()
Destructor.
Definition:
IceLSS.h:23
LSS::mRadius
float mRadius
Sphere radius.
Definition:
IceLSS.h:72
Sphere
Definition:
IceBoundingSphere.h:24
swingTest.f
f
Definition:
swingTest.py:6
Segment::mP0
Point mP0
Start of segment.
Definition:
IceSegment.h:51
box
Definition:
jquant2.c:258
LSS
Definition:
IceLSS.h:15
openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Thu Sep 8 2022 02:24:03