Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
coal
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Coal
coal
Commits
3e481afd
Unverified
Commit
3e481afd
authored
8 months ago
by
Louis Montaut
Browse files
Options
Downloads
Patches
Plain Diff
python: expose missing `Transform3s::Random`
parent
7b2e7b35
No related branches found
No related tags found
No related merge requests found
Pipeline
#44117
failed
7 months ago
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/coal/math/transform.h
+7
-5
7 additions, 5 deletions
include/coal/math/transform.h
python/math.cc
+4
-0
4 additions, 0 deletions
python/math.cc
with
11 additions
and
5 deletions
include/coal/math/transform.h
+
7
−
5
View file @
3e481afd
...
...
@@ -202,10 +202,14 @@ class COAL_DLLAPI Transform3s {
}
/// @brief return a random transform
static
Transform3s
Random
()
{
return
Transform3s
().
setRandom
();
}
static
Transform3s
Random
()
{
Transform3s
tf
=
Transform3s
();
tf
.
setRandom
();
return
tf
;
}
/// @brief set the transform to a random transform
Transform3s
&
setRandom
();
inline
void
setRandom
();
bool
operator
==
(
const
Transform3s
&
other
)
const
{
return
(
R
==
other
.
getRotation
())
&&
(
T
==
other
.
getTranslation
());
...
...
@@ -247,12 +251,10 @@ inline Quatf uniformRandomQuaternion() {
return
q
;
}
inline
Transform3s
&
Transform3s
::
setRandom
()
{
inline
void
Transform3s
::
setRandom
()
{
const
Quatf
q
=
uniformRandomQuaternion
();
this
->
rotation
()
=
q
.
matrix
();
this
->
translation
().
setRandom
();
return
*
this
;
}
/// @brief Construct othonormal basis from vector.
...
...
This diff is collapsed.
Click to expand it.
python/math.cc
+
4
−
0
View file @
3e481afd
...
...
@@ -111,6 +111,10 @@ void exposeMaths() {
.
def
(
dv
::
member_func
(
"Identity"
,
&
Transform3s
::
Identity
))
.
staticmethod
(
"Identity"
)
.
def
(
dv
::
member_func
(
"setRandom"
,
&
Transform3s
::
setRandom
))
.
def
(
dv
::
member_func
(
"Random"
,
&
Transform3s
::
Random
))
.
staticmethod
(
"Random"
)
.
def
(
dv
::
member_func
(
"transform"
,
&
Transform3s
::
transform
<
Vec3s
>
))
.
def
(
"inverseInPlace"
,
&
Transform3s
::
inverseInPlace
,
return_internal_reference
<>
(),
...
...
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