Box |
public class BoxModelNode : ModelNode
The BoxModelNode type exposes the following members.
Name | Description | |
---|---|---|
BoxModelNode | Constructor | |
BoxModelNode(String) | Constructor | |
BoxModelNode(Material, String) | Constructor | |
BoxModelNode(Vector3, Vector3, String) | Constructor | |
BoxModelNode(Vector3, Vector3, Material, String) | Constructor |
Name | Description | |
---|---|---|
Position | Position of the box. By default this represents the center position of the box, but can be changed by PositionType property. Default value is (0, 0, 0). Property change will re-generate the mesh in the next update phase. To immediately re-generate the mesh, call the Update method. | |
PositionType | Type of the Position. Default value is Center. Property change will re-generate the mesh in the next update phase. To immediately re-generate the mesh, call the Update method. | |
Size | Size of the box. Default value is (0, 0, 0). Property change will re-generate the mesh in the next update phase. To immediately re-generate the mesh, call the Update method. | |
UseSharedBoxMesh | Gets or sets a Boolean that specifies if a shared mesh with center at (0, 0, 0) and size (1, 1, 1) is used for this box (this uses the same vertex and index buffer for all boxes with shared mesh; this can be used only when XSegmentsCount, YSegmentsCount and ZSegmentsCount are 1). 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 box model. Default value is true. | |
XSegmentsCount | Number of segments in the X 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. | |
YSegmentsCount | Number of segments in the Y 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. | |
ZSegmentsCount | Number of segments in the Z 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. |
Name | Description | |
---|---|---|
GetCenterPosition |
Returns center position of this Box.
When applyTransformation is true (by default), then center position is also transformed by Transform.
(Overrides ModelNodeGetCenterPosition(Boolean, Boolean)) | |
OnInitializeSceneResources |
Initializes resources with the specified Scene and GpuDevice.
This method can be override and is called from InitializeSceneResources(Scene) method.
(Overrides ModelNodeOnInitializeSceneResources(Scene, VulkanDevice)) | |
UpdateLocalBoundingBox |
UpdateLocalBoundingBox
(Overrides ModelNodeUpdateLocalBoundingBox) | |
UpdateMesh |
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) |