 |
MeshFactoryGetSharedIcosphereMesh Method |
Gets the shared icosphere mesh with center at (0, 0, 0), radius of 1 and specified subdivisions count.
If createTextureCoordinates is set to false and icosphere mesh with the same subdivisions exists, then it will be returned even if it was created with texture coordinates.
When createTextureCoordinates is true, then mesh with generated texture coordinates is always returned.
Namespace: Ab4d.SharpEngine.MeshesAssembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 5.0.1075+bc537c8d217949260b11f66ee86aefa6456ac517
Syntaxpublic static StandardMesh GetSharedIcosphereMesh(
Scene scene,
int subdivisions = 3,
bool createTextureCoordinates = true
)
Parameters
- scene Scene
- Scene is used to cache the shared mesh
- subdivisions Int32 (Optional)
- Gets or sets the number of times the initial (12 positions, 20 triangles) Icosphere is subdivided. Some examples: 2 (162 positions, 320 triangles); 3 (642 positions, 1280 triangles); 4 (2562 positions, 5120 triangles). This value must be between 0 and 8.
- createTextureCoordinates Boolean (Optional)
- when true (by default), then the texture coordinates are also generated (this requires duplicating some positions and using a slower code path). When false, all TextureCoordinate values are set to (0, 0).
Return Value
StandardMeshshared icosphere mesh with center at (0, 0, 0), radius of 1
See Also