C# Class TechEngine.Engine.Model

Afficher le fichier Open project: DotTech/3D-software-renderer Class Usage Examples

Méthodes publiques

Méthode Description
AddTriangle ( int v0, int v1, int v2 ) : void
AddVertex ( double x, double y, double z, double intensity = 1 ) : void
CalculateColors ( ) : void

Call once after loading the model

CenterModel ( ) : void

Adjust vertex coordinates so that point 0,0,0 is the center of the model

Model ( ) : System
Transform ( Vector3 camera, double scale ) : void

Performs all transformations required for one rendering cycle

Private Methods

Méthode Description
BackfaceCulling ( ) : void
CenterPivot ( ) : void

Center the pivot in object space

ProjectVertices ( Vector3 camera, double scale ) : void
Rotate ( ) : void

Perform rotation

Rotate ( Vector3 angles ) : void
SortDepthBuffer ( ) : void

Sort the triangles descending by the sum of all vertices Z value

TransformToCameraSpace ( Vector3 camera ) : void

Method Details

AddTriangle() public méthode

public AddTriangle ( int v0, int v1, int v2 ) : void
v0 int
v1 int
v2 int
Résultat void

AddVertex() public méthode

public AddVertex ( double x, double y, double z, double intensity = 1 ) : void
x double
y double
z double
intensity double
Résultat void

CalculateColors() public méthode

Call once after loading the model
public CalculateColors ( ) : void
Résultat void

CenterModel() public méthode

Adjust vertex coordinates so that point 0,0,0 is the center of the model
public CenterModel ( ) : void
Résultat void

Model() public méthode

public Model ( ) : System
Résultat System

Transform() public méthode

Performs all transformations required for one rendering cycle
public Transform ( Vector3 camera, double scale ) : void
camera Vector3
scale double
Résultat void