Cafu Engine
CafuModelT::MeshT::TriangleT Struct Reference

A single triangle. More...

#include "Model_cmdl.hpp"

Public Member Functions

 TriangleT (unsigned int v0=0, unsigned int v1=0, unsigned int v2=0)
 

Public Attributes

unsigned int VertexIdx [3]
 The indices to the three vertices that define this triangle. More...
 
uint32_t SmoothGroups
 The smoothing groups that this triangle is in: If bit i is set, the triangle is in smoothing group i. More...
 
int NeighbIdx [3]
 The array indices of the three neighbouring triangles at the edges 01, 12 and 20. -1 indicates no neighbour, -2 indicates more than one neighbour. More...
 
bool Polarity
 True if this triangle has positive polarity (texture is not mirrored), or false if it has negative polarity (texture is mirrored, SxT points inward). More...
 
bool SkipDraw
 True if this triangle should be skipped when drawing the mesh (but not for casting stencil shadows and not for collision detection). This is useful for hiding triangles that are in the same plane as GUI panels and would otherwise cause z-fighting. More...
 

Detailed Description

A single triangle.

Member Data Documentation

int CafuModelT::MeshT::TriangleT::NeighbIdx[3]

The array indices of the three neighbouring triangles at the edges 01, 12 and 20. -1 indicates no neighbour, -2 indicates more than one neighbour.

bool CafuModelT::MeshT::TriangleT::Polarity

True if this triangle has positive polarity (texture is not mirrored), or false if it has negative polarity (texture is mirrored, SxT points inward).

bool CafuModelT::MeshT::TriangleT::SkipDraw

True if this triangle should be skipped when drawing the mesh (but not for casting stencil shadows and not for collision detection). This is useful for hiding triangles that are in the same plane as GUI panels and would otherwise cause z-fighting.

uint32_t CafuModelT::MeshT::TriangleT::SmoothGroups

The smoothing groups that this triangle is in: If bit i is set, the triangle is in smoothing group i.

unsigned int CafuModelT::MeshT::TriangleT::VertexIdx[3]

The indices to the three vertices that define this triangle.


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