Click or drag to resize
Ab4d.SharpEngine logo

PlaneModelNode Class

PlaneModelNode class is used to create a SceneNode that represents a 3D Plane.
Inheritance Hierarchy

Namespace: Ab4d.SharpEngine.SceneNodes
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 2.0.8956+4c7684e186ca1be74e7a284fbe739d9a1b843d3c
Syntax
C#
public class PlaneModelNode : ModelNode

The PlaneModelNode type exposes the following members.

Constructors
Properties
 NameDescription
Public propertyHeightDirection Gets or sets the Vector3 that defines the direction of the height (used in size). Default value if (0, 0, -1).
Public propertyHeightSegmentsCount Number of segments in the height direction. Default value is 1. Property change will re-generate the mesh in the next update phase. To immediately re-generate the mesh, call the Update method.
Public propertyNormal Gets or sets the normal vector of this plane (the vector that is perpendicular to the plane). Default value is (0, 1, 0).
Public propertyPosition Gets or sets a position of the 3D plane. Default value is (0, 0, 0). See also PositionType that defines the type of this position.
Public propertyPositionType Gets or sets the type of the Position. Default value is Center.
Public propertySize Gets or sets the size of the plane. Default value is (1, 1).
Public propertyUseSharedPlaneMesh Gets or sets a Boolean that specifies if a shared plane mesh with center at (0, 0, 0) and size (1, 1) is used for this plane (this uses the same vertex and index buffer for all planes 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 with positions that are calculated from the properties of this plane. Default value is true.
Public propertyWidthSegmentsCount Number of segments in the width direction. Default value is 1. Property change will re-generate the mesh in the next update phase. To immediately re-generate the mesh, call the Update method.
Top
Methods
 NameDescription
Public methodAlignWithCamera AlignWithCamera method aligns the PlaneModelNode to be oriented so that it faces the specified camera.
Public methodGetCenterPosition Returns center position of this Plane. When applyTransformation is true (by default), then center position is also transformed by Transform.
(Overrides ModelNodeGetCenterPosition(Boolean, Boolean))
Protected methodOnInitializeSceneResources OnInitializeSceneResources
(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