C# Class WaveEngine.Components.Primitives.Teapot

Util for create teapot primitives.
Inheritance: Geometric
Datei anzeigen Open project: WaveEngine/Components

Public Methods

Method Description
Teapot ( float size, int tessellation ) : System

Initializes a new instance of the Teapot class.

Private Methods

Method Description
Bezier ( System.Vector3 p1, System.Vector3 p2, System.Vector3 p3, System.Vector3 p4, float t ) : System.Vector3

Performs a cubic bezier interpolation between four Vector3 control points, returning the value at the specified time (t ranges 0 to 1).

Bezier ( float p1, float p2, float p3, float p4, float t ) : float

Performs a cubic bezier interpolation between four scalar control points, returning the value at the specified time (t ranges 0 to 1).

BezierTangent ( System.Vector3 p1, System.Vector3 p2, System.Vector3 p3, System.Vector3 p4, float t ) : System.Vector3

Computes the tangent of a cubic bezier curve at the specified time, when given four Vector3 control points. This is used for calculating normals (by crossing the horizontal and vertical tangent vectors).

BezierTangent ( float p1, float p2, float p3, float p4, float t ) : float

Computes the tangent of a cubic bezier curve at the specified time, when given four scalar control points.

CreatePatchIndices ( int tessellation, bool isMirrored ) : void

Creates indices for a patch that is tessellated at the specified level.

CreatePatchVertices ( System.Vector3 patch, int tessellation, bool isMirrored ) : void

Creates vertices for a patch that is tessellated at the specified level.

TessellatePatch ( TeapotPatch patch, int tessellation, System.Vector3 scale ) : void

Tessellates the specified bezier patch.

Method Details

Teapot() public method

Initializes a new instance of the Teapot class.
public Teapot ( float size, int tessellation ) : System
size float The size (1 by default).
tessellation int The tessellation (8 by default).
return System