Twilight Princess
Remastered version of the GameCube game
Loading...
Searching...
No Matches
KclLibrary.KCLModel Class Reference

Classes

class  IndexEqualityComparer
 
class  OctreeBounding
 

Public Member Functions

 KCLModel ()
 
 KCLModel (List< Triangle > triangleList, uint baseTriCount, FileVersion version, CollisionImportSettings settings)
 
Triangle GetTriangle (KclPrism prism)
 Creates a triangle with 3 positions from the given collision prism.
 
KCLHit CheckHit (Vector3 point)
 
uint GetMaxTriangleCount ()
 Gets the maximum triangle count used by an octree.
 
float GetMinCubeSize ()
 Gets the smallest cube size used for the octrees.
 
int GetMaxOctreeDepth ()
 Gets the max amount of octree depth used within the tree.
 
Vector3 GetCoordinatePadding ()
 
List< OctreeBoundingGetOctreeBoundings ()
 Gets a global list of octrees with bounding information.
 

Properties

Vector3 MinCoordinate [get, set]
 Gets or sets the smallest coordinate of the cube spanned by the model.
 
Vector3U CoordinateMask [get, set]
 Gets the coordinate mask required to compute indices into the octree.
 
Vector3U CoordinateShift [get, set]
 Gets the coordinate shift required to compute indices into the octree.
 
List< Vector3Positions [get, set]
 Gets the array of vertex positions.
 
List< Vector3Normals [get, set]
 Gets the array of vertex normals.
 
KclPrism[] Prisms [get, set]
 Gets the array of triangles.
 
float PrismThickness [get, set]
 Gets or sets the thickness of the Prisms.
 
PolygonOctree[] PolygonOctreeRoots [get, private set]
 Gets the root nodes of the model triangle octree. Can be null if no octree was loaded or created yet.
 
float SphereRadius = 1f [get, set]
 Gets or sets the thickness of the prisms.
 
FileVersion Version = FileVersion.Version2 [get, private set]
 Gets the current file version to use in the binary file.
 
List< KclPrismHitPrisms = new List<KclPrism>() [get, set]
 A list of prisms which are hit detectedfrom the collision handler.
 
List< PolygonOctreeHitOctrees = new List<PolygonOctree>() [get, set]
 A list of octrees which are hit detected from the collision handler.
 

Private Member Functions

Dictionary< ushort[], int > CreateIndexBuffer (Queue< PolygonOctree[]> queuedNodes)
 
void GetOctreeBounding (List< OctreeBounding > boundings, PolygonOctree octree, Vector3 cubePosition, float cubeSize)
 
int GetPolygonOctreeDepth (PolygonOctree octree, Vector3 cubePosition, float cubeSize, int depth=0)
 
int GetNodeCount (PolygonOctree[] nodes)
 
int IndexOfVertex (Vector3 value, List< Vector3 > valueList, Dictionary< string, int > lookupTable)
 

Static Private Member Functions

static int ContainsVector3 (Vector3 a, List< Vector3 > b)
 

Constructor & Destructor Documentation

◆ KCLModel() [1/2]

KclLibrary.KCLModel.KCLModel ( )

◆ KCLModel() [2/2]

KclLibrary.KCLModel.KCLModel ( List< Triangle > triangleList,
uint baseTriCount,
FileVersion version,
CollisionImportSettings settings )

Member Function Documentation

◆ CheckHit()

KCLHit KclLibrary.KCLModel.CheckHit ( Vector3 point)

◆ ContainsVector3()

static int KclLibrary.KCLModel.ContainsVector3 ( Vector3 a,
List< Vector3 > b )
staticprivate

◆ CreateIndexBuffer()

Dictionary< ushort[], int > KclLibrary.KCLModel.CreateIndexBuffer ( Queue< PolygonOctree[]> queuedNodes)
private

◆ GetCoordinatePadding()

Vector3 KclLibrary.KCLModel.GetCoordinatePadding ( )

◆ GetMaxOctreeDepth()

int KclLibrary.KCLModel.GetMaxOctreeDepth ( )

Gets the max amount of octree depth used within the tree.

◆ GetMaxTriangleCount()

uint KclLibrary.KCLModel.GetMaxTriangleCount ( )

Gets the maximum triangle count used by an octree.

◆ GetMinCubeSize()

float KclLibrary.KCLModel.GetMinCubeSize ( )

Gets the smallest cube size used for the octrees.

◆ GetNodeCount()

int KclLibrary.KCLModel.GetNodeCount ( PolygonOctree[] nodes)
private

◆ GetOctreeBounding()

void KclLibrary.KCLModel.GetOctreeBounding ( List< OctreeBounding > boundings,
PolygonOctree octree,
Vector3 cubePosition,
float cubeSize )
private

◆ GetOctreeBoundings()

List< OctreeBounding > KclLibrary.KCLModel.GetOctreeBoundings ( )

Gets a global list of octrees with bounding information.

Returns

◆ GetPolygonOctreeDepth()

int KclLibrary.KCLModel.GetPolygonOctreeDepth ( PolygonOctree octree,
Vector3 cubePosition,
float cubeSize,
int depth = 0 )
private

◆ GetTriangle()

Triangle KclLibrary.KCLModel.GetTriangle ( KclPrism prism)

Creates a triangle with 3 positions from the given collision prism.

Returns

◆ IndexOfVertex()

int KclLibrary.KCLModel.IndexOfVertex ( Vector3 value,
List< Vector3 > valueList,
Dictionary< string, int > lookupTable )
private

Property Documentation

◆ CoordinateMask

Vector3U KclLibrary.KCLModel.CoordinateMask
getset

Gets the coordinate mask required to compute indices into the octree.

◆ CoordinateShift

Vector3U KclLibrary.KCLModel.CoordinateShift
getset

Gets the coordinate shift required to compute indices into the octree.

◆ HitOctrees

List<PolygonOctree> KclLibrary.KCLModel.HitOctrees = new List<PolygonOctree>()
getset

A list of octrees which are hit detected from the collision handler.

◆ HitPrisms

List<KclPrism> KclLibrary.KCLModel.HitPrisms = new List<KclPrism>()
getset

A list of prisms which are hit detectedfrom the collision handler.

◆ MinCoordinate

Vector3 KclLibrary.KCLModel.MinCoordinate
getset

Gets or sets the smallest coordinate of the cube spanned by the model.

◆ Normals

List<Vector3> KclLibrary.KCLModel.Normals
getset

Gets the array of vertex normals.

◆ PolygonOctreeRoots

PolygonOctree [] KclLibrary.KCLModel.PolygonOctreeRoots
getprivate set

Gets the root nodes of the model triangle octree. Can be null if no octree was loaded or created yet.

◆ Positions

List<Vector3> KclLibrary.KCLModel.Positions
getset

Gets the array of vertex positions.

◆ Prisms

KclPrism [] KclLibrary.KCLModel.Prisms
getset

Gets the array of triangles.

◆ PrismThickness

float KclLibrary.KCLModel.PrismThickness
getset

Gets or sets the thickness of the Prisms.

◆ SphereRadius

float KclLibrary.KCLModel.SphereRadius = 1f
getset

Gets or sets the thickness of the prisms.

◆ Version

FileVersion KclLibrary.KCLModel.Version = FileVersion.Version2
getprivate set

Gets the current file version to use in the binary file.


The documentation for this class was generated from the following file: