Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
VTK
VTK
Commits
50651111
Commit
50651111
authored
Mar 08, 1994
by
Ken Martin
Browse files
Modified GetOrientation method
parent
dcd1125c
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/Trans.cc
View file @
50651111
...
@@ -329,11 +329,12 @@ void vlTransform::GetInverse ( vlMatrix4x4& inverse)
...
@@ -329,11 +329,12 @@ void vlTransform::GetInverse ( vlMatrix4x4& inverse)
inverse
.
Invert
(
**
this
->
Stack
,
inverse
);
inverse
.
Invert
(
**
this
->
Stack
,
inverse
);
}
}
void
vlTransform
::
GetOrientation
(
float
&
x
,
float
&
y
,
float
&
z
)
float
*
vlTransform
::
GetOrientation
()
{
{
#define AXIS_EPSILON .01
#define AXIS_EPSILON .01
float
scale_x
,
scale_y
,
scale_z
;
float
scale_x
,
scale_y
,
scale_z
;
vlMatrix4x4
temp
;
vlMatrix4x4
temp
;
float
x
,
y
,
z
;
float
d
;
float
d
;
float
d1
;
float
d1
;
float
d2
;
float
d2
;
...
@@ -423,6 +424,12 @@ void vlTransform::GetOrientation ( float & x, float & y, float & z)
...
@@ -423,6 +424,12 @@ void vlTransform::GetOrientation ( float & x, float & y, float & z)
alpha
=
atan2
(
sin_alpha
,
cos_alpha
);
alpha
=
atan2
(
sin_alpha
,
cos_alpha
);
z
=
-
alpha
/
RADIANS_PER_DEGREE
;
z
=
-
alpha
/
RADIANS_PER_DEGREE
;
this
->
Orientation
[
0
]
=
x
;
this
->
Orientation
[
1
]
=
y
;
this
->
Orientation
[
2
]
=
z
;
return
this
->
Orientation
;
}
}
void
vlTransform
::
GetPosition
(
float
&
x
,
float
&
y
,
float
&
z
)
void
vlTransform
::
GetPosition
(
float
&
x
,
float
&
y
,
float
&
z
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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