Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Simox
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Florian Leander Singer
Simox
Commits
bad23486
Commit
bad23486
authored
2 years ago
by
Fabian Reister
Browse files
Options
Downloads
Patches
Plain Diff
changing parameter type from pointer to const ref
parent
92064007
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
VirtualRobot/Visualization/TriMeshUtils.cpp
+2
-2
2 additions, 2 deletions
VirtualRobot/Visualization/TriMeshUtils.cpp
VirtualRobot/Visualization/TriMeshUtils.h
+1
-2
1 addition, 2 deletions
VirtualRobot/Visualization/TriMeshUtils.h
with
3 additions
and
4 deletions
VirtualRobot/Visualization/TriMeshUtils.cpp
+
2
−
2
View file @
bad23486
...
...
@@ -159,7 +159,7 @@ uniformDeviate(int seed)
return
ran
;
}
Eigen
::
Vector3f
TriMeshUtils
::
sampleSurfacePoint
(
std
::
vector
<
float
>
*
cumulativeAreas
,
double
totalArea
,
const
TriMeshModel
&
tri
)
Eigen
::
Vector3f
TriMeshUtils
::
sampleSurfacePoint
(
const
std
::
vector
<
float
>
&
cumulativeAreas
,
double
totalArea
,
const
TriMeshModel
&
tri
)
{
if
(
tri
.
faces
.
empty
())
{
...
...
@@ -196,7 +196,7 @@ std::vector<Eigen::Vector3f> TriMeshUtils::uniformSampling(const TriMeshModel& t
unsigned
int
i
=
0
;
unsigned
int
counter
=
0
;
while
(
i
<
n
)
{
Eigen
::
Vector3f
sampledPoint
=
sampleSurfacePoint
(
&
cumulativeAreas
,
totalArea
,
tri
);
Eigen
::
Vector3f
sampledPoint
=
sampleSurfacePoint
(
cumulativeAreas
,
totalArea
,
tri
);
if
(
!
sampledPoint
.
isZero
())
{
samples
[
i
]
=
sampledPoint
;
i
++
;
...
...
This diff is collapsed.
Click to expand it.
VirtualRobot/Visualization/TriMeshUtils.h
+
1
−
2
View file @
bad23486
...
...
@@ -39,10 +39,9 @@ public:
const
VisualizationFactory
::
Color
&
color
=
VisualizationFactory
::
Color
::
Gray
(),
const
std
::
vector
<
VisualizationFactory
::
Color
>&
colors
=
{});
static
Eigen
::
Vector3f
sampleSurfacePoint
(
std
::
vector
<
float
>
*
cumulativeAreas
,
double
totalArea
,
const
VirtualRobot
::
TriMeshModel
&
tri
);
static
Eigen
::
Vector3f
sampleSurfacePoint
(
const
std
::
vector
<
float
>
&
cumulativeAreas
,
double
totalArea
,
const
VirtualRobot
::
TriMeshModel
&
tri
);
//! Uniformly samples points on the surface of a trimesh model and can be used to create a point cloud of the model
static
std
::
vector
<
Eigen
::
Vector3f
>
uniformSampling
(
const
VirtualRobot
::
TriMeshModel
&
tri
,
unsigned
int
n
=
1000
);
};
}
// namespace VirtualRobot
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment