Click or drag to resize
Ab4d.SharpEngine logo

IcosphereModelNode Class

SphereModelNode defines a SceneNode that represents a 3D sphere that consists of equally sized triangles. The number of created triangles is defined by the Subdivisions property (default value 3 creates 642 positions and 1280 triangles).
Inheritance Hierarchy

Namespace: Ab4d.SharpEngine.SceneNodes
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 5.0.1075+bc537c8d217949260b11f66ee86aefa6456ac517
Syntax
C#
public class IcosphereModelNode : ModelNode

The IcosphereModelNode type exposes the following members.

Constructors
Properties
 NameDescription
Public propertyCenterPosition Gets or sets a center position of the sphere.
Public propertyCreateTextureCoordinates Get or set a Boolean that specify if 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). Default value is true.
Public propertyRadius Gets or sets a radius of the sphere. By default set to 1.
Public propertySubdivisions Gets or sets the number of times the initial (12 positions, 20 triangles) Icosphere is subdivided. This value must be between 0 and 8. Default value is 3 that creates a sphere with 642 positions and 1280 triangles.
Public propertyUseSharedIcosphereMesh Gets or sets a Boolean that specifies is a shared icosphere Mesh is used and the final models is created by using a mesh transformation that changes the shared mesh based on CenterPosition and Radius. When false, then a new mesh instance is created that has the center and size that are specified for this icosphere model. Default value is true.
Top
Methods
 NameDescription
Public methodGetCenterPosition Returns center position of this sphere. When applyTransformation is true (by default), then center position is also transformed by Transform.
(Overrides ModelNodeGetCenterPosition(Boolean, Boolean))
Protected methodOnInitializeSceneResources Initializes resources with the specified Scene and GpuDevice. This method can be overriden and is called from InitializeSceneResources(Scene) method.
(Overrides ModelNodeOnInitializeSceneResources(Scene, VulkanDevice))
Protected methodUpdateLocalBoundingBox UpdateLocalBoundingBox
(Overrides ModelNodeUpdateLocalBoundingBox)
Protected methodUpdateMesh UpdateMesh method recreates the mesh based on the current object properties. The method should be overriden in the derived class that provides its own mesh generation.
(Overrides ModelNodeUpdateMesh)
Top
See Also