예제 #1
0
Camera::Camera( const QVector3D & pos, const QVector3D & target, float fov,\
                float zNear, float zFar, int width, int height )
: pos_( pos )
, dir_( DEFAULT_DIR_VEC )
, up_( DEFAULT_UP_VEC )
, side_( DEFAULT_SIDE_VEC )
, transform_()
, fov_( fov )
, zNear_( zNear )
, zFar_( zFar )
, width_( width )
, height_( height )
, aspect_( 0.0f )
{
    computeAspect();   

    toTarget( target );

    computeMatrix();
}
예제 #2
0
Camera::Camera( const QVector3D & pos, const QQuaternion & orientation,\
                float fov, float zNear, float zFar, int width, int height )
: pos_( pos )
, dir_( DEFAULT_DIR_VEC )
, up_( DEFAULT_UP_VEC )
, side_( DEFAULT_SIDE_VEC )
, transform_()
, fov_( fov )
, zNear_( zNear )
, zFar_( zFar )
, width_( width )
, height_( height )
, aspect_( 0.0f )
{
    computeAspect();

    this->orientation( orientation );

    computeMatrix();
}
예제 #3
0
Camera::Camera( const QVector3D & pos, float pitch, float yaw, float roll, float fov, \
                float zNear, float zFar, int width, int height )
: pos_( pos )
, dir_( DEFAULT_DIR_VEC )
, up_( DEFAULT_UP_VEC )
, side_( DEFAULT_SIDE_VEC )
, transform_()
, fov_( fov )
, zNear_( zNear )
, zFar_( zFar )
, width_( width )
, height_( height )
, aspect_( 0.0f )
{
    computeAspect();

    orientation( pitch, yaw, roll );

    computeMatrix();
}
예제 #4
0
KisSprayShapeOption::KisSprayShapeOption()
    : KisPaintOpOption(i18n("Spray shape"), KisPaintOpOption::generalCategory(), true)
{
    m_checkable = true;
    // save this to be able to restore it back
    m_maxSize = 1000;

    m_options = new KisShapeOptionsWidget();
    m_useAspect = m_options->aspectButton->keepAspectRatio();
    computeAspect();

    // UI signals
    connect(m_options->proportionalBox, SIGNAL(clicked(bool)), SLOT(changeSizeUI(bool)));
    connect(m_options->aspectButton, SIGNAL(keepAspectRatioChanged(bool)), this, SLOT(aspectToggled(bool)));
    connect(m_options->imageUrl, SIGNAL(textChanged(QString)), this, SLOT(prepareImage()));

    connect(m_options->widthSpin, SIGNAL(valueChanged(int)), SLOT(updateHeight(int)));
    connect(m_options->heightSpin, SIGNAL(valueChanged(int)), SLOT(updateWidth(int)));

    setupBrushPreviewSignals();
    setConfigurationPage(m_options);
}