![]() | |
Tube |
public class TubeLineModelNode : ModelNode
The TubeLineModelNode type exposes the following members.
Name | Description | |
---|---|---|
![]() | TubeLineModelNode | Create a 3D line. |
![]() | TubeLineModelNode(String) | Create a 3D line. |
![]() | TubeLineModelNode(Material, String) | Create a 3D line. |
![]() | TubeLineModelNode(Vector3, Vector3, Single, Int32, Boolean, Boolean, Boolean, String) | Create a 3D line. |
![]() | TubeLineModelNode(Vector3, Vector3, Single, Int32, Boolean, Boolean, Boolean, Material, String) | Create a 3D line. |
Name | Description | |
---|---|---|
![]() | EndPosition | End position of the line. Property change will re-generate the mesh in the next update phase. To immediately re-generate the mesh, call the Update method. |
![]() | GenerateTextureCoordinates | Generate texture coordinates. Property change will re-generate the mesh in the next update phase. To immediately re-generate the mesh, call the Update method. |
![]() | IsEndPositionClosed | Flag indicating whether the start position is closed (filled circle shape). Property change will re-generate the mesh in the next update phase. To immediately re-generate the mesh, call the Update method. |
![]() | IsStartPositionClosed | Flag indicating whether the start position is closed (filled circle shape). Property change will re-generate the mesh in the next update phase. To immediately re-generate the mesh, call the Update method. |
![]() | Radius | Radius of the line. Property change will re-generate the mesh in the next update phase. To immediately re-generate the mesh, call the Update method. |
![]() | Segments | Number of segments comprising the line's side surface. Default value is 30. Property change will re-generate the mesh in the next update phase. To immediately re-generate the mesh, call the Update method. |
![]() | StartPosition | Start position of the line. Property change will re-generate the mesh in the next update phase. To immediately re-generate the mesh, call the Update method. |
Name | Description | |
---|---|---|
![]() | 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) |
TubeLineModelNode is a 3D tube model that represents a 3D line from StartPosition to EndPosition.
3D lines that are created from 3D tubes are significantly different from the standard 3D lines (LineNode and other 3D lines that are derived from LineBaseNode class) because tube's 3D mesh is defined at creation time and does not need to change when camera and view size is changed. On the other hand, the mesh for standard 3D lines is generated in the geometry shader and represents a rectangle that is facing the camera.
Another difference between 3D tube lines and standard 3D lines is that the line thickness in TubeLineModelNode is defined as radius of the tube and is specified in 3D world coordinates, but the line thickness for standard 3D lines is defined in screen coordinates.
To prevent shading the TubeLineModelNode (making parts of the object darker based on the angle to the light), you can use EmissiveColor in the StandardMaterial or other material that implemented IEmissiveMaterial.