Photon Quantum 3.0.0

Public Member Functions | Static Public Member Functions | Static Public Attributes | Properties | List of all members
Quantum.TriangleReference Struct Reference

Represents a reference to a triangle in the triangle mesh. More...

Inherits IEquatable< TriangleReference >.

Public Member Functions

 TriangleReference (int index, bool isMany)
 Initializes a new instance of the TriangleReference struct. More...
 
override bool Equals (object obj)
 Checks if this instance is equal to another object. More...
 
bool Equals (TriangleReference other)
 Checks if this instance is equal to another TriangleReference. More...
 
override int GetHashCode ()
 Overrides the hash code generation of this type. More...
 

Static Public Member Functions

static bool operator!= (TriangleReference a, TriangleReference b)
 Checks if two TriangleReference instances are not equal. More...
 
static bool operator== (TriangleReference a, TriangleReference b)
 Checks if two TriangleReference instances are equal. More...
 
static void Serialize (void *p, IDeterministicFrameSerializer serializer)
 Serializes a TriangleReference into an instance of IDeterministicFrameSerializer. More...
 

Static Public Attributes

const int ALIGNMENT = 4
 The struct alignment in bytes. More...
 
const int SIZE = sizeof(Int32) * 2
 The size of the struct in bytes. More...
 

Properties

int Index [get]
 The index of the triangle. More...
 
bool IsMany [get]
 If this reference point to multiple triangles. More...
 
bool IsValid [get]
 If this triangle reference is valid. More...
 

Detailed Description

Represents a reference to a triangle in the triangle mesh.

Constructor & Destructor Documentation

◆ TriangleReference()

Quantum.TriangleReference.TriangleReference ( int  index,
bool  isMany 
)
inline

Initializes a new instance of the TriangleReference struct.

Parameters
indexThe index of the referenced triangle.
isManyIf the reference point to multiple triangles.
See also
IsMany

Member Function Documentation

◆ Equals() [1/2]

bool Quantum.TriangleReference.Equals ( TriangleReference  other)
inline

Checks if this instance is equal to another TriangleReference.

Parameters
otherThe other triangle reference to be checked against.
Returns
true if the triangle references are equal. false otherwise.

◆ Equals() [2/2]

override bool Quantum.TriangleReference.Equals ( object  obj)
inline

Checks if this instance is equal to another object.

Parameters
objThe object to be checked against.
Returns
true if the object is a TriangleReference and they are equal to each other. false otherwise.

◆ GetHashCode()

override int Quantum.TriangleReference.GetHashCode ( )
inline

Overrides the hash code generation of this type.

Returns
A hash code of the current state of this instance.

◆ Serialize()

static void Quantum.TriangleReference.Serialize ( void *  p,
IDeterministicFrameSerializer  serializer 
)
inlinestatic

Serializes a TriangleReference into an instance of IDeterministicFrameSerializer.

Parameters
pThe pointer to the TriangleReference.
serializerThe IDeterministicFrameSerializer instance into which the struct will be serialized.

◆ operator==()

static bool Quantum.TriangleReference.operator== ( TriangleReference  a,
TriangleReference  b 
)
inlinestatic

Checks if two TriangleReference instances are equal.

Parameters
a
b
Returns
true if equal. false if not.

◆ operator!=()

static bool Quantum.TriangleReference.operator!= ( TriangleReference  a,
TriangleReference  b 
)
inlinestatic

Checks if two TriangleReference instances are not equal.

Parameters
a
b
Returns
true if not equal. false if equal.

Member Data Documentation

◆ SIZE

const int Quantum.TriangleReference.SIZE = sizeof(Int32) * 2
static

The size of the struct in bytes.

◆ ALIGNMENT

const int Quantum.TriangleReference.ALIGNMENT = 4
static

The struct alignment in bytes.

Property Documentation

◆ Index

int Quantum.TriangleReference.Index
get

The index of the triangle.

◆ IsValid

bool Quantum.TriangleReference.IsValid
get

If this triangle reference is valid.

◆ IsMany

bool Quantum.TriangleReference.IsMany
get

If this reference point to multiple triangles.