Click or drag to resize
Ab4d.SharpEngine logo

TubeModelNode Class

A 3D tube object.
Inheritance Hierarchy

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

The TubeModelNode type exposes the following members.

Constructors
 NameDescription
Public methodTubeModelNodeCreate a 3D tube.
Public methodTubeModelNode(String)Create a 3D tube.
Public methodTubeModelNode(Material, String)Create a 3D tube.
Public methodTubeModelNode(Vector3, Single, Single, Single, Int32, String) Create an upright 3D tube with same inner and outer radius at both ends. When height is zero, the resulting mesh is a flat 2D shape. When inner radius is zero, the mesh becomes a cylinder (generated as a lathe mesh).
Public methodTubeModelNode(Vector3, Vector3, Single, Single, Single, Int32, String) Create a 3D tube with same inner and outer radius at both ends, and direction given by the specified height direction vector. When height is zero, the resulting mesh is a flat 2D shape. When inner radius is zero, the mesh becomes a cylinder (generated as a lathe mesh).
Public methodTubeModelNode(Vector3, Single, Single, Single, Int32, Material, String) Create an upright 3D tube with same inner and outer radius at both ends. When height is zero, the resulting mesh is a flat 2D shape. When inner radius is zero, the mesh becomes a cylinder (generated as a lathe mesh).
Public methodTubeModelNode(Vector3, Vector3, Single, Single, Single, Int32, Material, String) Create a 3D tube with same inner and outer radius at both ends, and direction given by the specified height direction vector. When height is zero, the resulting mesh is a flat 2D shape. When inner radius is zero, the mesh becomes a cylinder (generated as a lathe mesh).
Public methodTubeModelNode(Vector3, Vector3, Single, Single, Single, Single, Single, Int32, Single, Single, String) Create a 3D tube with custom parametrization (i.e., height direction vector, start and end angle for the tube's side surface, separate radii settings for each end of the tube). When height is zero, the resulting mesh is a flat 2D shape. When inner radius is zero, the mesh becomes a cylinder (generated as a lathe mesh).
Public methodTubeModelNode(Vector3, Vector3, Single, Single, Single, Single, Single, Int32, Single, Single, Material, String) Create a 3D tube with custom parametrization (i.e., height direction vector, start and end angle for the tube's side surface, separate radii settings for each end of the tube). When height is zero, the resulting mesh is a flat 2D shape. When inner radius is zero, the mesh becomes a cylinder (generated as a lathe mesh).
Top
Properties
 NameDescription
Public propertyBottomCenterPosition Bottom center position of the tube. Property change will re-generate the mesh in the next update phase. To immediately re-generate the mesh, call the Update method.
Public propertyBottomInnerRadius Inner radius of the tube at the bottom end. If both inner radii are zero, a cylinder is rendered as a special case. Property change will re-generate the mesh in the next update phase. To immediately re-generate the mesh, call the Update method.
Public propertyBottomOuterRadius Outer radius of the tube at the bottom end. Property change will re-generate the mesh in the next update phase. To immediately re-generate the mesh, call the Update method.
Public propertyEndAngle End angle of the arc that defines the tube's side surface, in degrees. Default value is 360. Property change will re-generate the mesh in the next update phase. To immediately re-generate the mesh, call the Update method.
Public propertyHeight Height of the tube. If zero, a flattened 2D shape (e.g., a circle with a hole) is rendered as a special case. Property change will re-generate the mesh in the next update phase. To immediately re-generate the mesh, call the Update method.
Public propertyHeightDirection Height direction vector. The default value is (0, 1, 0), i.e., vector pointing up. 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 tube'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 propertyStartAngle Start angle of the arc that defines the tube's side surface, in degrees. Default value is 0. Property change will re-generate the mesh in the next update phase. To immediately re-generate the mesh, call the Update method.
Public propertyTopInnerRadius Inner radius of the tube at the top end. If both inner radii are zero, a cylinder is rendered as a special case. Property change will re-generate the mesh in the next update phase. To immediately re-generate the mesh, call the Update method.
Public propertyTopOuterRadius Outer radius of the tube at the top end. 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

TubeModelNode represents a 3D tube object.

On change of a property a new mesh is generated. To optimize the generation process and create only a single mesh for the tube, it is possible to get the mesh by calling MeshFactory.CreateTubeMesh and the using MeshModelNode object.

See Also