Click or drag to resize
Ab4d.SharpEngine logo

ModelNode Methods

The ModelNode type exposes the following members.

Methods
 NameDescription
Protected methodClearMesh ClearMesh method sets mesh to null. This method calls SetMesh(Mesh, Boolean, Transform, Boolean, Boolean) method with null as a mesh parameter.
Public methodCollectRenderingItems CollectRenderingItems
(Overrides SceneNodeCollectRenderingItems(RenderingContext))
Protected methodDisconnectBackMaterial DisconnectBackMaterial
Protected methodDisconnectMaterial DisconnectMaterial
Protected methodDisconnectMesh DisconnectMesh
Protected methodDispose Dispose
(Overrides SceneNodeDispose(Boolean))
Public methodDisposeRenderingItems DisposeRenderingItems
(Overrides SceneNodeDisposeRenderingItems)
Public methodDisposeWithMaterial DisposeWithMaterial disposes this SceneNode and also disposes the Material and BackMaterial even if the materials were created by the user and then set to the Material or BackMaterial properties. (in this case the standard Dispose method does not dispose the materials).
Public methodDump 
Public methodDumpMesh Dumps an overview of the mesh and values of individual vertices and triangle indices into the Visual Studio Output window.
Public methodGetCenterPosition Returns center position of this ModelNode. Center position is calculated from the center position of the mesh that is transformed by the Transform (when applyTransformation is true). When mesh is not defined, then (0, 0, 0) is returned (regardless of the Transformation).
(Overrides RenderedNodeGetCenterPosition(Boolean, Boolean))
Public methodGetClosestHitResult GetClosestHitResult method returns a RayHitTestResult with the closest triangle hit by the specified ray. When no triangle is hit, null is returned.
Public methodGetLocalBoundingBox Gets the BoundingBox of this SceneNode in local coordinates. The BoundingBox is transformed by transformation on this SceneNode but not by parent's transformations. When updateIfDirty parameter is true (by default) and when SceneNode's DirtyFlags have MeshDirty set, then this method will also call UpdateMesh method (this can regenerate the mesh). When updateIfDirty parameter is false then the current value of protected localBoundingBox field is returned.
(Overrides SceneNodeGetLocalBoundingBox(Boolean))
Public methodGetMesh Returns the mesh that is used by this ModelNode.
Public methodGetMeshBoundingBox Gets the BoundingBox of the Mesh that is used by this ModelNode. The BoundingBox is transformed by mesh transformation (for example this is used by the BoxModelNode when it is using a shared 1x1x1 mesh).
Public methodGetMeshTransform Returns the transformation that is used to transform the mesh. Mesh is transformed before the transformation of this SceneNode is applied. The mesh transformation is set when calling SetMesh(Mesh, Boolean, Transform, Boolean, Boolean) method.
Public methodGetNextHitResult GetNextHitResult method continues hit testing from the previously returned hit test and returns a RayHitTestResult with the next hit triangle (not necessary the next closest triangle) or null if no other triangle is hit. This method can be used to get all hit results.
Public methodGetOverviewText GetOverviewText adds string that writes details about this SceneNode into the specified StringBuilder.
(Overrides SceneNodeGetOverviewText(StringBuilder, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, 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 InitializedSceneComponentOnInitializeSceneResources(Scene, VulkanDevice))
Protected methodOnIsVisibleChanged OnIsVisibleChanged is called when the value of IsVisible property is changed. Overridden implementations should update the IsVisible property of the RenderingItem objects that were already added to RenderingLayers.
(Overrides SceneNodeOnIsVisibleChanged(Boolean))
Protected methodOnUpdate OnUpdate
(Overrides SceneNodeOnUpdate)
Protected methodOnWorldMatrixChanged OnWorldMatrixChanged
(Overrides SceneNodeOnWorldMatrixChanged)
Protected methodSetMesh SetMesh is a protected method that sets the mesh that is used for this SceneNode. If the previous mesh exists, then it is disposed (except when it was set by the user in MeshModelNode). If the new mesh was not yet initialized and if this scene node was, it calls InitializeDeviceResources method. The method can also set the meshTransform - a transformation that is applied before the SceneNode's Transform is used. This can be used by a derived class to use a shared mesh (for example for box) and then use meshTransform to position and scale the mesh for this instance.
Protected methodSetMeshTransform(Matrix4x4) 
Protected methodSetMeshTransform(Transform) 
Protected methodUpdateLocalBoundingBox UpdateLocalBoundingBox
(Overrides SceneNodeUpdateLocalBoundingBox)
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.
Protected methodUpdateRenderingItemMesh 
Protected methodUpdateWorldBoundingBox UpdateWorldBoundingBox
(Overrides SceneNodeUpdateWorldBoundingBox)
Protected methodUpdateWorldMatrix UpdateWorldMatrix
(Overrides SceneNodeUpdateWorldMatrix)
Protected methodUseMeshBoundingBox Sets LocalBoundingBox from the specified mesh's BoundingBox (taking Transform and _meshTransform into account).
Top
See Also