CG Framework 0.1
Chloroplast Games Framework
Dest.Modeling.TeapotGenerator Class Reference

Classes

struct  TeapotPatch
 

Static Public Member Functions

static Mesh CreateTeapot (float size, int tessellation, bool spoute, bool handle, bool lid, bool generateNormals, bool generateUVs)
 Creates a teapot primitive. More...
 

Static Private Member Functions

static void TessellatePatch (List< Vector3 > positions, List< Vector3 > normals, List< Vector2 > uvs, List< int > indices, ref TeapotPatch patch, int tessellation, Vector3 scale, bool isMirrored)
 
static Vector3 CubicInterpolate (ref Vector3 p1, ref Vector3 p2, ref Vector3 p3, ref Vector3 p4, float t)
 
static Vector3 CubicTangent (ref Vector3 p1, ref Vector3 p2, ref Vector3 p3, ref Vector3 p4, float t)
 
static void CreatePatchVertices (Vector3[] patch, int tessellation, bool isMirrored, List< Vector3 > positions, List< Vector3 > normals, List< Vector2 > uvs)
 
static IEnumerable< int > CreatePatchIndices (int tessellation, bool isMirrored, int baseIndex)
 

Static Private Attributes

static readonly TeapotPatch[] TeapotPatches
 
static readonly Vector3[] TeapotControlPoints
 

Member Function Documentation

◆ CreatePatchIndices()

static IEnumerable< int > Dest.Modeling.TeapotGenerator.CreatePatchIndices ( int  tessellation,
bool  isMirrored,
int  baseIndex 
)
staticprivate

◆ CreatePatchVertices()

static void Dest.Modeling.TeapotGenerator.CreatePatchVertices ( Vector3[]  patch,
int  tessellation,
bool  isMirrored,
List< Vector3 >  positions,
List< Vector3 >  normals,
List< Vector2 >  uvs 
)
staticprivate

◆ CreateTeapot()

static Mesh Dest.Modeling.TeapotGenerator.CreateTeapot ( float  size,
int  tessellation,
bool  spoute,
bool  handle,
bool  lid,
bool  generateNormals,
bool  generateUVs 
)
static

Creates a teapot primitive.

Parameters
sizeThe size.
tessellationThe tessellation.

◆ CubicInterpolate()

static Vector3 Dest.Modeling.TeapotGenerator.CubicInterpolate ( ref Vector3  p1,
ref Vector3  p2,
ref Vector3  p3,
ref Vector3  p4,
float  t 
)
staticprivate

◆ CubicTangent()

static Vector3 Dest.Modeling.TeapotGenerator.CubicTangent ( ref Vector3  p1,
ref Vector3  p2,
ref Vector3  p3,
ref Vector3  p4,
float  t 
)
staticprivate

◆ TessellatePatch()

static void Dest.Modeling.TeapotGenerator.TessellatePatch ( List< Vector3 >  positions,
List< Vector3 >  normals,
List< Vector2 >  uvs,
List< int >  indices,
ref TeapotPatch  patch,
int  tessellation,
Vector3  scale,
bool  isMirrored 
)
staticprivate

Member Data Documentation

◆ TeapotControlPoints

readonly Vector3 [] Dest.Modeling.TeapotGenerator.TeapotControlPoints
staticprivate

◆ TeapotPatches

readonly TeapotPatch [] Dest.Modeling.TeapotGenerator.TeapotPatches
staticprivate
Initial value:
=
{
new TeapotPatch(true, new[] {102, 103, 104, 105, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}),
new TeapotPatch(true, new[] {12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27}),
new TeapotPatch(true, new[] {24, 25, 26, 27, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40}),
new TeapotPatch(true, new[] {96, 96, 96, 96, 97, 98, 99, 100, 101, 101, 101, 101, 0, 1, 2, 3}),
new TeapotPatch(true, new[] {0, 1, 2, 3, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117}),
new TeapotPatch(false, new[] {41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56}),
new TeapotPatch(false, new[] {53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 28, 65, 66, 67}),
new TeapotPatch(false, new[] {68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83}),
new TeapotPatch(false, new[] {80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95}),
new TeapotPatch(true, new[] {118, 118, 118, 118, 124, 122, 119, 121, 123, 126, 125, 120, 40, 39, 38, 37}),
}

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