Ejemplo n.º 1
0
void PlaneCollision::create(Vector3 origin, float length, float width, float elast, float friction, bool is_container, Vector3 orientation)
{
	setElast(elast);
	setFriction(friction);
	setIsContainer(is_container);
	Quadrilateral::create(origin,length,width,orientation);
       
}
Ejemplo n.º 2
0
void ClassElement::initElementProperties()
{
    Element::initElementProperties();
    
    setIsContainer( true );
    
    setFilePath( qobject_cast<Element*>( parent() )->filePath() + "/class_" + QString::number( QUuid::createUuid().data1 ) );
    setProperty( g_contextInfoElementNameKey, "New Class" );
    setProperty( g_contextInfoElementTypeKey, Elements::ET_FOLDER | Elements::ET_CLASS );
    
    // Save data.
    model()->slotCommit( model()->indexForElement( this ) );    
}