/** * @brief Create a screen fixed 3D Model, meaning it is always stuck to the devices screen * @param String $id Id of the AREL Object * @param String $model Path to the model of the Object or to the zip package holding all the information * @param String $texture Path to the texture of the Object (jpg or png file) * @param int $screenAnchor A constant defining the screen anchor @see ArelAnchor. * @param Array $scale An array providing scale values along three axis (x, y, z) * @param ArelRotation $rotation Provides the rotation information. Can be defined as euler (rad / deg), quaternion, axisangle or matrix * @return ArelObjectModel3D The object created */ public static function createScreenFixedModel3D($id, $model, $texture, $screenAnchor, $scale, $rotation) { $obj = new ArelObjectModel3D($id); $obj->setModel($model); $obj->setTexture($texture); $obj->setScale($scale); $obj->setRotation($rotation); $obj->setScreenAnchor($screenAnchor); return $obj; }
/** * Create an 3D Model based on model and texture (can also only have modelPath if the model is a zipped obj or md2 including the texture) * @param String $_id object id * @param String $_modelPath path to the model's texture * @param String $_texturePath path to the model's texture * @static */ public static function create($_id, $_modelPath, $_texturePath) { $obj = new ArelObjectModel3D($_id); $obj->setModel($_modelPath); $obj->setTexture($_texturePath); return $obj; }