C# Class TagTool.Geometry.CollisionGeometryBuilder

Exibir arquivo Open project: TheGuardians/TagTool Class Usage Examples

Public Methods

Method Description
Build ( ) : CollisionModel
CollisionGeometryBuilder ( ) : System
ParseBSP ( CollisionModel permutation, BinaryReader reader ) : long
ParseBSP2DNodes ( TagTool.TagDefinitions.CollisionModel.Region.Permutation.Bsp bsp, BinaryReader reader, int count ) : long
ParseBSP2DReferences ( TagTool.TagDefinitions.CollisionModel.Region.Permutation.Bsp bsp, BinaryReader reader, int count ) : long
ParseBSP3DNodes ( TagTool.TagDefinitions.CollisionModel.Region.Permutation.Bsp bsp, BinaryReader reader, int count ) : long
ParseEdges ( TagTool.TagDefinitions.CollisionModel.Region.Permutation.Bsp bsp, BinaryReader reader, int count ) : long
ParseFromFile ( string fpath ) : bool

This file parser will parse Halo 1 CE 'model_collision_geometry' tags. The addresses of the tagblocks inside the tag are likely to be garbage values. The Halo 1 CE development tool 'guerilla' does not use the reflexive address value and expects chunks to occur in the order that the reflexives occur in the parent struct. The Halo1 CE collision tag is used due to high compatibility and availability of 'Tool' - a program which can compile collision tags. The parser expects the following format: h1ce coll tag format: main struct all materials sequential all regions sequential all permutations sequential all path finding spheres sequential all nodes sequential bsp 0 bsp0 3dnodes sequential ... bsp0 vertices sequential bsp 1 ... ...

ParseLeaves ( TagTool.TagDefinitions.CollisionModel.Region.Permutation.Bsp bsp, BinaryReader reader, int count ) : long
ParseMain ( CollisionModel coll, BinaryReader reader ) : long
ParseMaterials ( CollisionModel coll, BinaryReader reader, int count ) : long

Stub for now, creates n materials, which are named 0 to (n-1)

ParseNodes ( CollisionModel coll, BinaryReader reader, int count ) : long

Parses all H1CE Collision Node tagblocks stored sequentially. The purpose of 'Node' is similar to 'Region' in Halo Online.

ParsePathFindingSpheres ( CollisionModel coll, BinaryReader reader, int count ) : long
ParsePlanes ( TagTool.TagDefinitions.CollisionModel.Region.Permutation.Bsp bsp, BinaryReader reader, int count ) : long
ParseRegions ( CollisionModel coll, BinaryReader reader, int count ) : long

Parses regions into Halo Online collision 'Region' tagblocks. Names are not preserved.

ParseSurfaces ( TagTool.TagDefinitions.CollisionModel.Region.Permutation.Bsp bsp, BinaryReader reader, int count ) : long
ParseVertices ( TagTool.TagDefinitions.CollisionModel.Region.Permutation.Bsp bsp, BinaryReader reader, int count ) : long

Method Details

Build() public method

public Build ( ) : CollisionModel
return TagTool.TagDefinitions.CollisionModel

CollisionGeometryBuilder() public method

public CollisionGeometryBuilder ( ) : System
return System

ParseBSP() public method

public ParseBSP ( CollisionModel permutation, BinaryReader reader ) : long
permutation TagTool.TagDefinitions.CollisionModel
reader System.IO.BinaryReader
return long

ParseBSP2DNodes() public method

public ParseBSP2DNodes ( TagTool.TagDefinitions.CollisionModel.Region.Permutation.Bsp bsp, BinaryReader reader, int count ) : long
bsp TagTool.TagDefinitions.CollisionModel.Region.Permutation.Bsp
reader System.IO.BinaryReader
count int
return long

ParseBSP2DReferences() public method

public ParseBSP2DReferences ( TagTool.TagDefinitions.CollisionModel.Region.Permutation.Bsp bsp, BinaryReader reader, int count ) : long
bsp TagTool.TagDefinitions.CollisionModel.Region.Permutation.Bsp
reader System.IO.BinaryReader
count int
return long

ParseBSP3DNodes() public method

public ParseBSP3DNodes ( TagTool.TagDefinitions.CollisionModel.Region.Permutation.Bsp bsp, BinaryReader reader, int count ) : long
bsp TagTool.TagDefinitions.CollisionModel.Region.Permutation.Bsp
reader System.IO.BinaryReader
count int
return long

ParseEdges() public method

public ParseEdges ( TagTool.TagDefinitions.CollisionModel.Region.Permutation.Bsp bsp, BinaryReader reader, int count ) : long
bsp TagTool.TagDefinitions.CollisionModel.Region.Permutation.Bsp
reader System.IO.BinaryReader
count int
return long

ParseFromFile() public method

This file parser will parse Halo 1 CE 'model_collision_geometry' tags. The addresses of the tagblocks inside the tag are likely to be garbage values. The Halo 1 CE development tool 'guerilla' does not use the reflexive address value and expects chunks to occur in the order that the reflexives occur in the parent struct. The Halo1 CE collision tag is used due to high compatibility and availability of 'Tool' - a program which can compile collision tags. The parser expects the following format: h1ce coll tag format: main struct all materials sequential all regions sequential all permutations sequential all path finding spheres sequential all nodes sequential bsp 0 bsp0 3dnodes sequential ... bsp0 vertices sequential bsp 1 ... ...
public ParseFromFile ( string fpath ) : bool
fpath string
return bool

ParseLeaves() public method

public ParseLeaves ( TagTool.TagDefinitions.CollisionModel.Region.Permutation.Bsp bsp, BinaryReader reader, int count ) : long
bsp TagTool.TagDefinitions.CollisionModel.Region.Permutation.Bsp
reader System.IO.BinaryReader
count int
return long

ParseMain() public method

public ParseMain ( CollisionModel coll, BinaryReader reader ) : long
coll TagTool.TagDefinitions.CollisionModel
reader System.IO.BinaryReader
return long

ParseMaterials() public method

Stub for now, creates n materials, which are named 0 to (n-1)
public ParseMaterials ( CollisionModel coll, BinaryReader reader, int count ) : long
coll TagTool.TagDefinitions.CollisionModel
reader System.IO.BinaryReader
count int
return long

ParseNodes() public method

Parses all H1CE Collision Node tagblocks stored sequentially. The purpose of 'Node' is similar to 'Region' in Halo Online.
public ParseNodes ( CollisionModel coll, BinaryReader reader, int count ) : long
coll TagTool.TagDefinitions.CollisionModel
reader System.IO.BinaryReader
count int
return long

ParsePathFindingSpheres() public method

public ParsePathFindingSpheres ( CollisionModel coll, BinaryReader reader, int count ) : long
coll TagTool.TagDefinitions.CollisionModel
reader System.IO.BinaryReader
count int
return long

ParsePlanes() public method

public ParsePlanes ( TagTool.TagDefinitions.CollisionModel.Region.Permutation.Bsp bsp, BinaryReader reader, int count ) : long
bsp TagTool.TagDefinitions.CollisionModel.Region.Permutation.Bsp
reader System.IO.BinaryReader
count int
return long

ParseRegions() public method

Parses regions into Halo Online collision 'Region' tagblocks. Names are not preserved.
public ParseRegions ( CollisionModel coll, BinaryReader reader, int count ) : long
coll TagTool.TagDefinitions.CollisionModel
reader System.IO.BinaryReader
count int
return long

ParseSurfaces() public method

public ParseSurfaces ( TagTool.TagDefinitions.CollisionModel.Region.Permutation.Bsp bsp, BinaryReader reader, int count ) : long
bsp TagTool.TagDefinitions.CollisionModel.Region.Permutation.Bsp
reader System.IO.BinaryReader
count int
return long

ParseVertices() public method

public ParseVertices ( TagTool.TagDefinitions.CollisionModel.Region.Permutation.Bsp bsp, BinaryReader reader, int count ) : long
bsp TagTool.TagDefinitions.CollisionModel.Region.Permutation.Bsp
reader System.IO.BinaryReader
count int
return long