IMHOTEP Framework
Main Page
Related Pages
Namespaces
Classes
Files
File List
All
Classes
Namespaces
Functions
Variables
Enumerations
Enumerator
Properties
Pages
Assets
Core
Patient
BlenderFileLoader
BlenderMeshReader
Field.cs
1
using
System;
2
3
4
namespace
BlenderMeshReader
5
{
6
class
Field
7
{
8
public
string
Name {
get
; set; }
9
public
Type
Type
{
get
; set; }
10
11
public
Field
(
string
name,
Type
type)
12
{
13
this.Name = name;
14
this.Type = type;
15
}
16
17
public
int
getLength()
18
{
19
if
(Name.StartsWith(
"*"
))
20
{
21
return
BlenderFile.PointerSize;
22
}
23
else
24
{
25
if
(Name.Contains(
"["
) && Name.Contains(
"]"
))
26
{
27
int
start = Name.IndexOf(
"["
);
28
int
end = Name.IndexOf(
"]"
);
29
return
Type.Length * Int32.Parse(Name.Substring(start + 1, end - start - 1));
30
}
31
else
32
{
33
return
Type.Length;
34
}
35
}
36
37
}
38
39
public
override
string
ToString()
40
{
41
return
Name +
": "
+ Type.ToString() +
" - "
+ getLength() +
"byte"
;
42
}
43
}
44
}
BlenderMeshReader.Type
Definition:
Type.cs:6
BlenderMeshReader.Field
Definition:
Field.cs:6
Generated by
1.8.6