Click or drag to resize
Ab4d.SharpEngine logo

TubeLineModelNode Class

TubeLineModelNode is a 3D tube model that represents a 3D line from StartPosition to EndPosition.
Inheritance Hierarchy

Namespace: Ab4d.SharpEngine.SceneNodes
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 1.0.8740+deb2991acfe86a95cca780cd4f82bcae2805c1a5
Syntax
C#
public class TubeLineModelNode : ModelNode

The TubeLineModelNode type exposes the following members.

Constructors
Properties
 NameDescription
Public propertyEndPosition 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.
Public propertyGenerateTextureCoordinates 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.
Public propertyIsEndPositionClosed 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.
Public propertyIsStartPositionClosed 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.
Public propertyRadius 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.
Public propertySegments 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.
Public propertyStartPosition 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.
Top
Methods
 NameDescription
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
Remarks

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.

See Also