Class Face
Represents a face in a 3D model with vertices, texture coordinates, and optional properties.
Inherited Members
Namespace: Genesis.Graphics
Assembly: Genesis.dll
Syntax
public class Face
Constructors
Face()
Initializes a new instance of the Face class.
Declaration
public Face()
Face(Texture)
Initializes a new instance of the Face class with a specified texture.
Declaration
public Face(Texture texture)
Parameters
Type | Name | Description |
---|---|---|
Texture | texture | The texture associated with the face. |
Face(Vec3[])
Initializes a new instance of the Face class with specified vertices.
Declaration
public Face(Vec3[] vecs)
Parameters
Type | Name | Description |
---|---|---|
Vec3[] | vecs | An array of vertices defining the face. |
Face(Vec3[], Vec3[], Texture)
Initializes a new instance of the Face class with specified vertices, texture coordinates, and a texture.
Declaration
public Face(Vec3[] vecs, Vec3[] texCords, Texture texture)
Parameters
Type | Name | Description |
---|---|---|
Vec3[] | vecs | An array of vertices defining the face. |
Vec3[] | texCords | An array of texture coordinates associated with the face vertices. |
Texture | texture | The texture associated with the face. |
Properties
Propertys
Gets or sets additional properties associated with the face.
Declaration
public Dictionary<string, object> Propertys { get; set; }
Property Value
Type | Description |
---|---|
Dictionary<string, object> |
TexCords
Gets or sets the list of texture coordinates associated with the face vertices.
Declaration
public List<Vec3> TexCords { get; set; }
Property Value
Type | Description |
---|---|
List<Vec3> |
Texture
Gets or sets the texture associated with the face.
Declaration
public Texture Texture { get; set; }
Property Value
Type | Description |
---|---|
Texture |
Vertices
Gets or sets the list of vertices defining the face.
Declaration
public List<Vec3> Vertices { get; set; }
Property Value
Type | Description |
---|---|
List<Vec3> |
Methods
InitFace(IRenderDevice)
Initializes the face by loading its associated texture using the specified renderer.
Declaration
public void InitFace(IRenderDevice renderer)
Parameters
Type | Name | Description |
---|---|---|
IRenderDevice | renderer | The renderer responsible for loading the texture. |