internalReadFile :: FilePath -> IO (Either String Scene)
internalReadFile filePath = do
    -- TODO: Catch exceptions here.
    model <- getModel filePath
    let scene = newScene & sceneMaterials .~ V.singleton mat
            & sceneMeshes .~ V.singleton mesh
            & sceneRootNode .~ node
        mesh = getMesh model
        node = newNode & nodeMeshes .~ V.singleton 0
        in return $ Right scene
  where
    -- TODO: Move DefaultMaterial to constants
    mat = foldl addProperty newMaterial
        [ MaterialName "DefaultMaterial"
        , MaterialColorDiffuse clrDiffuseColor
        , MaterialColorSpecular clrDiffuseColor
        , MaterialColorAmbient (V3 0.5 0.5 0.5)
        ]
    clrDiffuseColor = V3 0.6 0.6 0.6

-- | Creates mesh according to the 'Facet' data.
internalReadFile :: FilePath -> IO (Either String Scene)
internalReadFile filePath = do
    -- TODO: Catch exceptions here.
    model <- getModel filePath
    let scene = newScene & sceneMaterials .~ V.singleton mat
            & sceneMeshes .~ V.singleton mesh
            & sceneRootNode .~ node
        mesh = getMesh model
        node = newNode & nodeMeshes .~ V.singleton 0
        in return $ Right scene
  where
    -- TODO: Move DefaultMaterial to constants
    mat = foldl addProperty newMaterial
        [ MaterialName "DefaultMaterial"
        , MaterialColorDiffuse clrDiffuseColor
        , MaterialColorSpecular clrDiffuseColor
        , MaterialColorAmbient (V3 0.5 0.5 0.5)
        ]
    clrDiffuseColor = V3 0.6 0.6 0.6

-- | Creates mesh according to the 'Facet' data.
internalReadFile filePath = do
    -- TODO: Catch exceptions here.
    model <- getModel filePath
    let scene = newScene & sceneMaterials .~ V.singleton mat
            & sceneMeshes .~ V.singleton mesh
            & sceneRootNode .~ node
        mesh = getMesh model
        node = newNode & nodeMeshes .~ V.singleton 0
        in return $ Right scene
  where
    -- TODO: Move DefaultMaterial to constants
    mat = foldl addProperty newMaterial
        [ MaterialName "DefaultMaterial"
        , MaterialColorDiffuse clrDiffuseColor
        , MaterialColorSpecular clrDiffuseColor
        , MaterialColorAmbient (V3 0.5 0.5 0.5)
        ]
    clrDiffuseColor = V3 0.6 0.6 0.6

-- | Creates mesh according to the 'Facet' data.