Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openstructure
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor 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
schwede
openstructure
Commits
be1f78a1
Commit
be1f78a1
authored
14 years ago
by
Marco Biasini
Browse files
Options
Downloads
Patches
Plain Diff
added constructor to initialize Mat3 with diagonal elements
parent
c970c9c2
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/geom/pymod/export_mat3.cc
+1
-0
1 addition, 0 deletions
modules/geom/pymod/export_mat3.cc
modules/geom/src/mat3.hh
+5
-3
5 additions, 3 deletions
modules/geom/src/mat3.hh
with
6 additions
and
3 deletions
modules/geom/pymod/export_mat3.cc
+
1
−
0
View file @
be1f78a1
...
@@ -58,6 +58,7 @@ void export_Mat3()
...
@@ -58,6 +58,7 @@ void export_Mat3()
class_
<
Mat3
>
(
"Mat3"
,
init
<>
())
class_
<
Mat3
>
(
"Mat3"
,
init
<>
())
.
def
(
init
<
Real
,
Real
,
Real
,
Real
,
Real
,
Real
,
Real
,
Real
,
Real
>
())
.
def
(
init
<
Real
,
Real
,
Real
,
Real
,
Real
,
Real
,
Real
,
Real
,
Real
>
())
.
def
(
init
<
const
Mat2
&>
())
.
def
(
init
<
const
Mat2
&>
())
.
def
(
init
<
Real
,
Real
,
Real
>
())
.
def
(
self
+=
self
)
.
def
(
self
+=
self
)
.
def
(
self
-=
self
)
.
def
(
self
-=
self
)
.
def
(
self
+
self
)
.
def
(
self
+
self
)
...
...
This diff is collapsed.
Click to expand it.
modules/geom/src/mat3.hh
+
5
−
3
View file @
be1f78a1
...
@@ -27,10 +27,8 @@
...
@@ -27,10 +27,8 @@
#include
<ost/geom/module_config.hh>
#include
<ost/geom/module_config.hh>
#include
<ost/geom/mat2.hh>
#include
<ost/geom/mat2.hh>
namespace
geom
{
namespace
geom
{
class
Mat2
;
class
Vec3
;
class
Vec3
;
class
DLLEXPORT_OST_GEOM
Mat3
:
class
DLLEXPORT_OST_GEOM
Mat3
:
...
@@ -76,8 +74,12 @@ public:
...
@@ -76,8 +74,12 @@ public:
explicit
Mat3
(
const
Real
arr
[
9
])
explicit
Mat3
(
const
Real
arr
[
9
])
{
{
this
->
set
(
arr
[
0
],
arr
[
1
],
arr
[
2
],
arr
[
3
],
arr
[
4
],
arr
[
5
],
arr
[
6
],
arr
[
7
],
arr
[
8
]);
this
->
set
(
arr
[
0
],
arr
[
1
],
arr
[
2
],
arr
[
3
],
arr
[
4
],
arr
[
5
],
arr
[
6
],
arr
[
7
],
arr
[
8
]);
}
}
explicit
Mat3
(
Real
x
,
Real
y
,
Real
z
)
{
this
->
set
(
x
,
0.0
,
0.0
,
0.0
,
y
,
0.0
,
0.0
,
0.0
,
z
);
}
//! element access
//! element access
Real
&
operator
()(
std
::
size_t
r
,
std
::
size_t
c
)
Real
&
operator
()(
std
::
size_t
r
,
std
::
size_t
c
)
{
{
...
...
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