forked from gradientspace/geometry3Sharp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added ray-inf-cylinder intersection, not really tested, possibly buggy.
- Loading branch information
Showing
3 changed files
with
85 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using System; | ||
using System.Linq; | ||
using System.IO; | ||
|
||
namespace g3 | ||
{ | ||
public static class FileSystemUtils | ||
{ | ||
static public bool CanAccessFolder(string sPath) | ||
{ | ||
try { | ||
Directory.GetDirectories(sPath); | ||
} catch (Exception) { | ||
return false; | ||
} | ||
return true; | ||
} | ||
|
||
|
||
static public bool IsValidFilenameCharacter(char c) | ||
{ | ||
return Path.GetInvalidFileNameChars().Contains(c) == false; | ||
} | ||
static public bool IsValidFilenameString(string s) | ||
{ | ||
for (int i = 0; i < s.Length; ++i) | ||
if (Path.GetInvalidFileNameChars().Contains(s[i])) | ||
return false; | ||
return true; | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters