Infohazard.HyperNav 1.1.5
3D Navigation for Flying Characters
Loading...
Searching...
No Matches
Infohazard.HyperNav.Triangle Struct Reference

Represents the indices of a triangle (three vertices by a face) in an indexed mesh. More...

Public Member Functions

 Triangle (int vertex1, int vertex2, int vertex3)
 Construct a new Triangle with the given indices. More...
 
override bool Equals (object obj)
 Compare to another object. More...
 
bool Equals (Triangle other)
 Compare to another Triangle. More...
 
override int GetHashCode ()
 Get integer for use with hash table. More...
 

Properties

int Vertex1 [get]
 First vertex index, which is the lower of the three. More...
 
int Vertex2 [get]
 Second vertex index, which is the middle of the three. More...
 
int Vertex3 [get]
 Third vertex index, which is the larger of the three. More...
 

Private Attributes

int _minVertex
 (Serialized) First vertex index, which is the lower of the three. More...
 
int _midVertex
 (Serialized) Second vertex index, which is the middle of the three. More...
 
int _maxVertex
 (Serialized) Third vertex index, which is the larger of the three. More...
 

Detailed Description

Represents the indices of a triangle (three vertices by a face) in an indexed mesh.

The same Triangle will be created regardless of the order in which indices are fed to the constructor.

Constructor & Destructor Documentation

◆ Triangle()

Infohazard.HyperNav.Triangle.Triangle ( int  vertex1,
int  vertex2,
int  vertex3 
)

Construct a new Triangle with the given indices.

The order of the indices doesn't matter; the same Triangle is constructed either way. No two of the indices can be the same.

Parameters
vertex1First vertex index.
vertex2Second vertex index.
vertex3Third vertex index.

Member Function Documentation

◆ Equals() [1/2]

override bool Infohazard.HyperNav.Triangle.Equals ( object  obj)

Compare to another object.

Parameters
objObject to compare to.
Returns
Whether the two objects are equal.

◆ Equals() [2/2]

bool Infohazard.HyperNav.Triangle.Equals ( Triangle  other)

Compare to another Triangle.

Parameters
otherTriangle to compare to.
Returns
Whether the two triangles are equal.

◆ GetHashCode()

override int Infohazard.HyperNav.Triangle.GetHashCode ( )

Get integer for use with hash table.

Returns
Integer hash code.

Member Data Documentation

◆ _maxVertex

int Infohazard.HyperNav.Triangle._maxVertex
private

(Serialized) Third vertex index, which is the larger of the three.

◆ _midVertex

int Infohazard.HyperNav.Triangle._midVertex
private

(Serialized) Second vertex index, which is the middle of the three.

◆ _minVertex

int Infohazard.HyperNav.Triangle._minVertex
private

(Serialized) First vertex index, which is the lower of the three.

Property Documentation

◆ Vertex1

int Infohazard.HyperNav.Triangle.Vertex1
get

First vertex index, which is the lower of the three.

◆ Vertex2

int Infohazard.HyperNav.Triangle.Vertex2
get

Second vertex index, which is the middle of the three.

◆ Vertex3

int Infohazard.HyperNav.Triangle.Vertex3
get

Third vertex index, which is the larger of the three.


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