G
Guest
Hello all,
I'm familiar with the use of the dot operator to access properties of
instantiated classes, as well as declaring objects of classes (such as the
following):
SomeClass object1 = new SomeClass();
object1.SomeProperty = Somevalue;
But consider the following I recently came across:
CustomVertex.TransformedColored[] verts = new
CustomVertex.TransformedColored[3];
I believe that the author of this code is declaring a fixed-size array of
"TransformedColored" structures...what I find confusing is the dot-operator
indirection. "CustomVertex" is the name of a class type - no objects have
been instantiated, and yet we can declare variables of the types containd
within that class? In other words, does the CustomVertex class code look
like this (?):
public class CustomVertex {
..
..
public struct TransformedColored{
..
}
}
Could someone explain/describe what that line of code is actually doing? I
hope this question hasn't been too confusing. Thanks in advance everyone!
I'm familiar with the use of the dot operator to access properties of
instantiated classes, as well as declaring objects of classes (such as the
following):
SomeClass object1 = new SomeClass();
object1.SomeProperty = Somevalue;
But consider the following I recently came across:
CustomVertex.TransformedColored[] verts = new
CustomVertex.TransformedColored[3];
I believe that the author of this code is declaring a fixed-size array of
"TransformedColored" structures...what I find confusing is the dot-operator
indirection. "CustomVertex" is the name of a class type - no objects have
been instantiated, and yet we can declare variables of the types containd
within that class? In other words, does the CustomVertex class code look
like this (?):
public class CustomVertex {
..
..
public struct TransformedColored{
..
}
}
Could someone explain/describe what that line of code is actually doing? I
hope this question hasn't been too confusing. Thanks in advance everyone!