Represents the header of a V2 KCL binary collision file.
More...
|
| KCLFile (List< Triangle > triangles, FileVersion version, bool isBigEndian, CollisionImportSettings settings=null) |
| Initializes a new instance of the KclFile class, created from the given objModel .
|
|
| KCLFile (string fileName) |
| Loads the data from the given file.
|
|
| KCLFile () |
|
| KCLFile (Stream stream) |
| Loads the data from the given stream.
|
|
ObjModel | CreateGenericModel () |
| Creates a generic model which can be exported into a .obj file format.
|
|
void | Load (Stream stream, bool leaveOpen=false) |
| Loads the data from the given stream .
|
|
void | Save (string fileName) |
| Saves the data in the given file.
|
|
void | Save (Stream stream) |
| Saves the data from the given stream .
|
|
void | Replace (List< Triangle > triangles, CollisionImportSettings settings) |
| Replaces the current collision model from the given objModel .
|
|
void | ResetHits () |
| Resets the list of prisim and octree data for any that has been previously hit.
|
|
KCLHit | CheckHit (Vector3 point) |
| Checks if a prism gets hit from a given point and returns hit information.
|
|
void | Read (BinaryDataReader reader) |
|
|
Matrix4x4 | Transform = Matrix4x4.Identity |
| The world transformation of the collision.
|
|
|
ModelOctreeNode | SearchModelBlock (ModelOctreeNode[] children, Vector3 point, Vector3 position, Vector3 boxSize) |
|
void | PrintModelOctree (ModelOctreeNode[] children, string indent="") |
|
void | CreateModelOctree (List< ModelGroup > modelRoots, ModelOctreeNode[] nodes, CollisionImportSettings settings, uint baseTriCount, int level=0) |
|
List< ModelGroup > | TryMergeModelGroups (List< ModelGroup > modelRoots) |
|
List< ModelGroup > | CreateModelDivision (Vector3 position, List< Triangle > triangles, Vector3 boxSize, int level=0) |
|
ByteOrder | CheckByteOrder (BinaryDataReader reader) |
|
void | Write (BinaryDataWriter writer) |
|
void | WriteV1 (BinaryDataWriter writer) |
|
void | WriteV2 (BinaryDataWriter writer) |
|
Represents the header of a V2 KCL binary collision file.
◆ KCLFile() [1/4]
Initializes a new instance of the KclFile class, created from the given objModel .
◆ KCLFile() [2/4]
KclLibrary.KCLFile.KCLFile |
( |
string | fileName | ) |
|
Loads the data from the given file.
- Parameters
-
fileName | The name of the file to load the data from. |
◆ KCLFile() [3/4]
KclLibrary.KCLFile.KCLFile |
( |
| ) |
|
◆ KCLFile() [4/4]
KclLibrary.KCLFile.KCLFile |
( |
Stream | stream | ) |
|
Loads the data from the given stream.
- Parameters
-
fileName | The name of the file to load the data from. |
◆ CheckByteOrder()
ByteOrder KclLibrary.KCLFile.CheckByteOrder |
( |
BinaryDataReader | reader | ) |
|
|
private |
◆ CheckHit()
Checks if a prism gets hit from a given point and returns hit information.
- Returns
◆ CreateGenericModel()
ObjModel KclLibrary.KCLFile.CreateGenericModel |
( |
| ) |
|
Creates a generic model which can be exported into a .obj file format.
- Returns
◆ CreateModelDivision()
◆ CreateModelOctree()
◆ Load()
void KclLibrary.KCLFile.Load |
( |
Stream | stream, |
|
|
bool | leaveOpen = false ) |
Loads the data from the given stream .
- Parameters
-
stream | The Stream to load the data from. |
leaveOpen | true to leave stream open after loading the instance. |
◆ PrintModelOctree()
void KclLibrary.KCLFile.PrintModelOctree |
( |
ModelOctreeNode[] | children, |
|
|
string | indent = "" ) |
|
private |
◆ Read()
void KclLibrary.KCLFile.Read |
( |
BinaryDataReader | reader | ) |
|
◆ Replace()
Replaces the current collision model from the given objModel .
- Parameters
-
objModel | The ObjModel to create the collision data from. |
◆ ResetHits()
void KclLibrary.KCLFile.ResetHits |
( |
| ) |
|
Resets the list of prisim and octree data for any that has been previously hit.
◆ Save() [1/2]
void KclLibrary.KCLFile.Save |
( |
Stream | stream | ) |
|
Saves the data from the given stream .
- Parameters
-
stream | The Stream to load the data from. |
◆ Save() [2/2]
void KclLibrary.KCLFile.Save |
( |
string | fileName | ) |
|
Saves the data in the given file.
- Parameters
-
fileName | The name of the file to save the data in. |
◆ SearchModelBlock()
◆ TryMergeModelGroups()
◆ Write()
void KclLibrary.KCLFile.Write |
( |
BinaryDataWriter | writer | ) |
|
|
private |
◆ WriteV1()
void KclLibrary.KCLFile.WriteV1 |
( |
BinaryDataWriter | writer | ) |
|
|
private |
◆ WriteV2()
void KclLibrary.KCLFile.WriteV2 |
( |
BinaryDataWriter | writer | ) |
|
|
private |
◆ _version2
const int KclLibrary.KCLFile._version2 = 0x02020000 |
|
staticprivate |
◆ MaxModelPrismCount
readonly int KclLibrary.KCLFile.MaxModelPrismCount = 65535 / 4 |
|
staticprivate |
◆ Transform
Matrix4x4 KclLibrary.KCLFile.Transform = Matrix4x4.Identity |
The world transformation of the collision.
◆ ByteOrder
ByteOrder KclLibrary.KCLFile.ByteOrder |
|
getset |
Gets or sets the byte order of the KCL file.
◆ CoordinateShift
Vector3U KclLibrary.KCLFile.CoordinateShift |
|
getprivate set |
Gets the coordinate shift required to compute indices into the octree.
◆ MaxCoordinate
Vector3 KclLibrary.KCLFile.MaxCoordinate |
|
getprivate set |
Gets the biggest coordinate spanned by the octree in this file.
◆ MinCoordinate
Vector3 KclLibrary.KCLFile.MinCoordinate |
|
getprivate set |
Gets the smallest coordinate spanned by the octree in this file.
◆ ModelOctreeRoot
Gets the root node of the model octree.
◆ Models
List<KCLModel> KclLibrary.KCLFile.Models |
|
getprivate set |
Gets the list of KCLModel instances referenced by the model octree.
◆ PrismCount
int KclLibrary.KCLFile.PrismCount |
|
getprivate set |
Gets the total amount of prisms used in the KCL file.
◆ Version
Represents the version of the KCL.
The documentation for this class was generated from the following file:
- Assets/_Game/__DECOMP/KclLibrary/CollisonFile/KCLFile.cs