|
|
@ -23,7 +23,8 @@ namespace SemiColinGames { |
|
|
|
World = Matrix.CreateTranslation(0, 0, 0), |
|
|
|
View = Matrix.CreateLookAt(Vector3.Backward, Vector3.Zero, Vector3.Up), |
|
|
|
VertexColorEnabled = true, |
|
|
|
Projection = Matrix.CreateOrthographicOffCenter(-1920 / 2, 1920 / 2, -1080 / 4, 1080 * 3 / 4, -1, 1) |
|
|
|
Projection = Matrix.CreateOrthographicOffCenter( |
|
|
|
-1920 / 2, 1920 / 2, -1080 / 4, 1080 * 3 / 4, -1, 1) |
|
|
|
}; |
|
|
|
|
|
|
|
vertices = new VertexPositionColor[MAX_VERTICES]; |
|
|
@ -76,19 +77,24 @@ namespace SemiColinGames { |
|
|
|
this(orientation, length, inWidth, outWidth, new List<TreeNode>()) { |
|
|
|
} |
|
|
|
|
|
|
|
public TreeNode(float orientation, float length, float inWidth, float outWidth, TreeNode child) : |
|
|
|
public TreeNode(float orientation, float length, float inWidth, float outWidth, |
|
|
|
TreeNode child) : |
|
|
|
this(orientation, length, inWidth, outWidth, new List<TreeNode>() { child }) { |
|
|
|
} |
|
|
|
|
|
|
|
public TreeNode(float orientation, float length, float inWidth, float outWidth, TreeNode child1, TreeNode child2) : |
|
|
|
public TreeNode(float orientation, float length, float inWidth, float outWidth, |
|
|
|
TreeNode child1, TreeNode child2) : |
|
|
|
this(orientation, length, inWidth, outWidth, new List<TreeNode>() { child1, child2 }) { |
|
|
|
} |
|
|
|
|
|
|
|
public TreeNode(float orientation, float length, float inWidth, float outWidth, TreeNode child1, TreeNode child2, TreeNode child3) : |
|
|
|
this(orientation, length, inWidth, outWidth, new List<TreeNode>() { child1, child2, child3 }) { |
|
|
|
public TreeNode(float orientation, float length, float inWidth, float outWidth, |
|
|
|
TreeNode child1, TreeNode child2, TreeNode child3) : |
|
|
|
this(orientation, length, inWidth, outWidth, |
|
|
|
new List<TreeNode>() { child1, child2, child3 }) { |
|
|
|
} |
|
|
|
|
|
|
|
public TreeNode(float orientation, float length, float inWidth, float outWidth, List<TreeNode> children) { |
|
|
|
public TreeNode(float orientation, float length, float inWidth, float outWidth, |
|
|
|
List<TreeNode> children) { |
|
|
|
Orientation = orientation; |
|
|
|
WorldOrientation = orientation; |
|
|
|
Length = length; |
|
|
|