Ejemplo n.º 1
0
END_TEST


START_TEST (test_Dimensions_createWithSize)
{
    Dimensions* d = new(std::nothrow) Dimensions( 1.2 , 0.4 , 3.1415 );
    fail_unless( d->getTypeCode   () == SBML_LAYOUT_DIMENSIONS );
    fail_unless( d->getMetaId     () == "" );
//    fail_unless( d->getNotes      () == "" );
//    fail_unless( d->getAnnotation () == "" );
    fail_unless( d->getWidth () == 1.2 );
    fail_unless( d->getHeight() == 0.4 );
    fail_unless( d->getDepth () == 3.1415 );

    delete d;
}
Ejemplo n.º 2
0
void PlayerData::GenerateVertices(Dimensions &dimensions)
{
    float widthX = dimensions.getWidth()/2.0f;
    float heightY = dimensions.getHeight()/2.0f;
    float x= dimensions.getPosition().getX();
    float y=dimensions.getPosition().getY();

    vertices.clear();

    vertices.push_back({glm::vec2(-widthX+x,-heightY+y)});
    vertices.push_back({glm::vec2(widthX+x,-heightY+y)});
    vertices.push_back({glm::vec2(widthX+x,heightY+y)});
    vertices.push_back({glm::vec2(-widthX+x,heightY+y)});
    vertices.push_back({glm::vec2(-widthX+x,-heightY+y)});
    vertices.push_back({glm::vec2(widthX+x,heightY+y)});
}
Ejemplo n.º 3
0
CLDimensions::CLDimensions(const Dimensions& d)
    : mWidth(d.getWidth()),
    mHeight(d.getHeight())
{}