Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Register
Sign in
Toggle navigation
Menu
Open sidebar
planning
ThirdParty
fcl
Commits
677539bb
Commit
677539bb
authored
11 years ago
by
Mark Moll
Browse files
Options
Download
Email Patches
Plain Diff
return shared_pointer to const for const methods
parent
44ea1ea9
master
0.7.0
0.6.1
0.6.0RC
0.5.0
0.4.1
0.4.0
0.3.4
0.3.3
0.3.2
0.3.1
v0.6.1
v0.6.0
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/fcl/collision_object.h
+16
-16
include/fcl/collision_object.h
src/broadphase/broadphase_SSaP.cpp
+1
-1
src/broadphase/broadphase_SSaP.cpp
with
17 additions
and
17 deletions
+17
-17
include/fcl/collision_object.h
+
16
-
16
View file @
677539bb
...
...
@@ -69,7 +69,7 @@ public:
/// @brief get the type of the object
virtual
OBJECT_TYPE
getObjectType
()
const
{
return
OT_UNKNOWN
;
}
/// @brief get the node type
/// @brief get the node type
virtual
NODE_TYPE
getNodeType
()
const
{
return
BV_UNKNOWN
;
}
/// @brief compute the AABB for object in local coordinate
...
...
@@ -150,29 +150,27 @@ public:
class
CollisionObject
{
public:
CollisionObject
(
const
boost
::
shared_ptr
<
CollisionGeometry
>
&
cgeom_
)
:
cgeom
(
cgeom_
)
CollisionObject
(
const
boost
::
shared_ptr
<
CollisionGeometry
>
&
cgeom_
)
:
cgeom
(
cgeom_
),
cgeom_const
(
cgeom_
)
{
cgeom
->
computeLocalAABB
();
computeAABB
();
}
CollisionObject
(
const
boost
::
shared_ptr
<
CollisionGeometry
>
&
cgeom_
,
const
Transform3f
&
tf
)
:
cgeom
(
cgeom_
),
t
(
tf
)
CollisionObject
(
const
boost
::
shared_ptr
<
CollisionGeometry
>
&
cgeom_
,
const
Transform3f
&
tf
)
:
cgeom
(
cgeom_
),
cgeom_const
(
cgeom_
),
t
(
tf
)
{
cgeom
->
computeLocalAABB
();
computeAABB
();
}
CollisionObject
(
const
boost
::
shared_ptr
<
CollisionGeometry
>
&
cgeom_
,
const
Matrix3f
&
R
,
const
Vec3f
&
T
)
:
cgeom
(
cgeom_
),
t
(
Transform3f
(
R
,
T
))
cgeom
(
cgeom_
),
cgeom_const
(
cgeom_
),
t
(
Transform3f
(
R
,
T
))
{
cgeom
->
computeLocalAABB
();
computeAABB
();
}
CollisionObject
()
{
}
~
CollisionObject
()
{
}
...
...
@@ -302,9 +300,9 @@ public:
}
/// @brief get geometry from the object instance
boost
::
shared_ptr
<
const
CollisionGeometry
>
collisionGeometry
()
const
const
boost
::
shared_ptr
<
const
CollisionGeometry
>
&
collisionGeometry
()
const
{
return
cgeom
;
return
cgeom
_const
;
}
/// @brief get object's cost density
...
...
@@ -340,6 +338,7 @@ public:
protected:
boost
::
shared_ptr
<
CollisionGeometry
>
cgeom
;
boost
::
shared_ptr
<
const
CollisionGeometry
>
cgeom_const
;
Transform3f
t
;
...
...
@@ -355,16 +354,16 @@ protected:
class
ContinuousCollisionObject
{
public:
ContinuousCollisionObject
(
const
boost
::
shared_ptr
<
CollisionGeometry
>&
cgeom_
)
:
cgeom
(
cgeom_
)
ContinuousCollisionObject
(
const
boost
::
shared_ptr
<
CollisionGeometry
>&
cgeom_
)
:
cgeom
(
cgeom_
),
cgeom_const
(
cgeom_
)
{
}
ContinuousCollisionObject
(
const
boost
::
shared_ptr
<
CollisionGeometry
>&
cgeom_
,
const
boost
::
shared_ptr
<
MotionBase
>&
motion_
)
:
cgeom
(
cgeom_
),
motion
(
motion_
)
ContinuousCollisionObject
(
const
boost
::
shared_ptr
<
CollisionGeometry
>&
cgeom_
,
const
boost
::
shared_ptr
<
MotionBase
>&
motion_
)
:
cgeom
(
cgeom_
),
cgeom_const
(
cgeom
),
motion
(
motion_
)
{
}
ContinuousCollisionObject
()
{}
~
ContinuousCollisionObject
()
{}
/// @brief get the type of the object
...
...
@@ -450,14 +449,15 @@ public:
}
/// @brief get geometry from the object instance
inline
boost
::
shared_ptr
<
const
CollisionGeometry
>
collisionGeometry
()
const
inline
const
boost
::
shared_ptr
<
const
CollisionGeometry
>
&
collisionGeometry
()
const
{
return
cgeom
;
return
cgeom
_const
;
}
protected:
boost
::
shared_ptr
<
CollisionGeometry
>
cgeom
;
boost
::
shared_ptr
<
const
CollisionGeometry
>
cgeom_const
;
boost
::
shared_ptr
<
MotionBase
>
motion
;
...
...
This diff is collapsed.
Click to expand it.
src/broadphase/broadphase_SSaP.cpp
+
1
-
1
View file @
677539bb
...
...
@@ -78,7 +78,7 @@ struct SortByZLow
class
DummyCollisionObject
:
public
CollisionObject
{
public:
DummyCollisionObject
(
const
AABB
&
aabb_
)
:
CollisionObject
()
DummyCollisionObject
(
const
AABB
&
aabb_
)
:
CollisionObject
(
boost
::
shared_ptr
<
CollisionGeometry
>
()
)
{
aabb
=
aabb_
;
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets