Click or drag to resize
Ab4d.SharpEngine logo

SphereModelNode Class

SphereModelNode defines a SceneNode that represents a 3D sphere.
Inheritance Hierarchy

Namespace: Ab4d.SharpEngine.SceneNodes
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 1.0.8740+deb2991acfe86a95cca780cd4f82bcae2805c1a5
Syntax
C#
public class SphereModelNode : ModelNode

The SphereModelNode type exposes the following members.

Constructors
Properties
 NameDescription
Public propertyCenterPosition Gets or sets a center position of the sphere.
Public propertyRadius Gets or sets a radius of the sphere. By default set to 1.
Public propertySegments Gets or sets the number of segments that define the sphere
Public propertyUseSharedSphereMesh Gets or sets a Boolean that specifies that when Segments is set to 30, then a shared mesh with center at (0, 0, 0), radius of 1 and 30 segments is used for this sphere (this uses the same vertex and index buffer for all boxes with shared mesh). In this case the final position and size is set by using a mesh transformation. When false, then a new mesh instance is created that has the center and size that are specified in this sphere 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 override 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