Instanced |
The InstancedMeshNode type exposes the following members.
Name | Description | |
---|---|---|
CollectRenderingItems |
CollectRenderingItems
(Overrides SceneNodeCollectRenderingItems(RenderingContext)) | |
Dispose | (Overrides SceneNodeDispose(Boolean)) | |
GetCenterPosition |
Returns center position of this InstancedMeshNode.
When applyTransformation is true (by default), then center position is also transformed by Transform.
(Overrides RenderedNodeGetCenterPosition(Boolean, Boolean)) | |
GetClosestHitResult | GetClosestHitResult method returns a RayHitTestResult with the closest triangle hit by the specified ray. When no triangle is hit, null is returned. | |
GetLocalBoundingBox |
Gets the BoundingBox of this SceneNode in local coordinates.
The BoundingBox is transformed by transformation on this SceneNode but not by parent's transformations.
(Overrides SceneNodeGetLocalBoundingBox(Boolean)) | |
GetNextHitResult | 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. | |
GetRenderingLayer |
GetRenderingLayer
(Overrides RenderedNodeGetRenderingLayer(Material, Mesh)) | |
GetWorldColorInstancesData | Returns an array of WorldColorInstanceData structs that define the instances data that were set by calling the SetInstancesData(WorldColorInstanceData) method. | |
OnInitializeSceneResources |
Initializes resources with the specified Scene and GpuDevice.
This method can be override and is called from InitializeSceneResources(Scene) method.
(Overrides InitializedSceneComponentOnInitializeSceneResources(Scene, VulkanDevice)) | |
OnUpdate |
OnUpdate
(Overrides SceneNodeOnUpdate) | |
OnWorldMatrixChanged |
OnWorldMatrixChanged
(Overrides SceneNodeOnWorldMatrixChanged) | |
SetInstancesData(WorldColorInstanceData) | SetInstancesData method sets an array of WorldColorInstanceData structs that define the world transformations (positions, scales, rotations) and colors or instanced geometry objects. Calling this method sets StartInstanceIndex to zero and InstancesCount to the number of elements in the instancesData array. After each change of InstancesData user must call UpdateInstancesData(Boolean) or UpdateInstancesData(BoundingBox) methods. This method also calculates a new BoundingBox from the instancesData. If you know the BoundingBox of all mesh instances, call the SetInstancesData(WorldColorInstanceData, BoundingBox) method. | |
SetInstancesData(WorldColorInstanceData, BoundingBox) | SetInstancesData method sets an array of WorldColorInstanceData structs that define the world transformations (positions, scales, rotations) and colors or instanced geometry objects. Calling this method sets StartInstanceIndex to zero and InstancesCount to the number of elements in the instancesData array. After each change of InstancesData user must call UpdateInstancesData(Boolean) or UpdateInstancesData(BoundingBox) methods. This method also gets the BoundingBox of all mesh instances. If you do not know the BoundingBox call the SetInstancesData(WorldColorInstanceData) method. | |
SetInstancesRange | SetInstancesRange method sets both StartInstanceIndex and InstancesCount and provides the new bounding box to prevent recalculating bounding box by this class. | |
UpdateInstancesData(Boolean) | UpdateInstancesData recreates the instances data buffer from the array of WorldColorInstanceData that was set by calling the SetInstancesData(WorldColorInstanceData) method. When the BoundingBox has changed and you know the new bounding box, call the UpdateInstancesData(BoundingBox) to prevent calculating it from the instances data. | |
UpdateInstancesData(BoundingBox) | UpdateInstancesData recreates the instances data buffer from the array of WorldColorInstanceData that was set by calling the SetInstancesData(WorldColorInstanceData) method. This method also sets new bounding box of all mesh instances (without the transformation that is applied to this SceneNode). | |
UpdateLocalBoundingBox |
UpdateLocalBoundingBox
(Overrides SceneNodeUpdateLocalBoundingBox) | |
UpdateRenderingItemMesh | ||
UseInstanceObjectColor | UseInstanceObjectColor method can be called after calling the UseSingleObjectColor(Color4). After calling this method, the object colors are get from diffuse color defined in instances data array. | |
UseSingleObjectColor | When UseSingleObjectColor is called, the specified objectColor is used as diffuse color for all instances. This overrides the color defined in the instances data. When color's alpha value is less than 1, then alpha blending is used. To use instance color after calling UseSingleObjectColor, call the UseInstanceObjectColor method. |