Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F94989991
shape.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, 23:48
Size
753 B
Mime Type
text/x-c
Expires
Fri, Dec 13, 23:48 (1 d, 22 h)
Engine
blob
Format
Raw Data
Handle
22908469
Attached To
rSYMKIT symkit
shape.cpp
View Options
#include "shape.h"
#include <QMatrix4x4>
#include <QGLShaderProgram>
#include "glmodel.h"
#include "camera.h"
#include "sktools.h"
using
namespace
symkit
;
Shape
::
Shape
(
GLModel
*
model
,
const
QString
&
label
,
specs_t
flags
)
:
SKActor
(
label
,
flags
),
model
(
model
)
{
// empty
}
void
Shape
::
setGLModel
(
GLModel
*
model
)
{
this
->
model
=
model
;
}
GLModel
*
Shape
::
getGLModel
()
{
return
model
;
}
color_s
Shape
::
color
()
const
{
return
renderColor
;
}
void
Shape
::
setColor
(
color_s
color
)
{
renderColor
=
color
;
}
void
Shape
::
setColor
(
float
r
,
float
g
,
float
b
,
float
alpha
)
{
color_s
color
=
{
r
,
g
,
b
,
alpha
};
setColor
(
color
);
}
void
Shape
::
render
(
render_s
&
args
)
{
if
(
model
)
model
->
draw
(
args
.
shaderProgram
);
}
Event Timeline
Log In to Comment