Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F94983896
decoration.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, Dec 11, 22:46
Size
1 KB
Mime Type
text/x-c
Expires
Fri, Dec 13, 22:46 (2 d)
Engine
blob
Format
Raw Data
Handle
22908421
Attached To
rSYMKIT symkit
decoration.cpp
View Options
#include "decoration.h"
Decoration
::
Decoration
(
GLModel
*
model
,
const
SVector
<
3
>
location
,
const
SVector
<
3
>
angles
,
const
double
&
scale
,
const
QString
&
label
,
specs_t
flags
)
:
Shape
(
model
,
label
,
flags
),
location
(
location
),
angles
(
angles
),
scalingRatio
(
scale
)
{
}
Decoration
::~
Decoration
()
{
}
/* returns the centre position */
SVector
<
3
>
Decoration
::
position
()
const
{
return
location
;
}
SVector
<
3
>
Decoration
::
orientation
()
const
{
return
angles
;
}
double
Decoration
::
scaling
()
const
{
return
scalingRatio
;
}
void
Decoration
::
setPosition
(
const
SVector
<
3
>&
location
)
{
this
->
location
=
location
;
}
void
Decoration
::
setOrientation
(
const
SVector
<
3
>&
angles
)
{
this
->
angles
=
angles
;
}
void
Decoration
::
setScalingRatio
(
const
double
&
scale
)
{
this
->
scalingRatio
=
scale
;
}
void
Decoration
::
move
(
const
SVector
<
3
>&
delta
)
{
this
->
location
+=
delta
;
}
void
Decoration
::
rotate
(
const
SVector
<
3
>&
delta
)
{
this
->
angles
+=
delta
;
}
void
Decoration
::
scale
(
const
double
&
ratio
)
{
this
->
scalingRatio
*=
ratio
;
}
Event Timeline
Log In to Comment