VertexStream
The base class for DirectContext3D vertex streams, which are used to write vertex data into buffers.
Inheritance Hierarchy
System.Object
Autodesk.Revit.DB.DirectContext3D.VertexStream
Autodesk.Revit.DB.DirectContext3D.VertexStreamPosition
Autodesk.Revit.DB.DirectContext3D.VertexStreamPositionColored
Autodesk.Revit.DB.DirectContext3D.VertexStreamPositionNormal
Autodesk.Revit.DB.DirectContext3D.VertexStreamPositionNormalColored
Namespace: Autodesk.Revit.DB.DirectContext3D
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public class VertexStream : IDisposable
The VertexStream type exposes the following members.
Properties
Name
Description
Public Property
IsValidObject
Specifies whether the .NET object represents a valid Revit entity.
Methods
Name
Description
Public Method
Dispose
Releases all resources used by the VertexStream
Public Method
Equals
Determines whether the specified object is equal to the current object.
(Inherited from Object)
Public Method
GetHashCode
Serves as the default hash function.
(Inherited from Object)
Public Method
GetType
Gets the Type of the current instance.
(Inherited from Object)
Public Method
ToString
Returns a string that represents the current object.
(Inherited from Object)
Remarks
This base class cannot be used directly. Instead, a steam that is specific for each type of vertex must be used.
- Use VertexStreamPosition to insert VertexPosition instances.
- Use VertexStreamPositionColored to insert VertexPositionColored instances.
- Use VertexStreamPositionNormal to insert VertexPositionNormal instances.
- Use VertexStreamPositionNormalColored to insert VertexPositionNormalColored instances.
The process of putting vertex data into a buffer involves using a stream-buffer pair as follows:
- Map the vertex buffer.
- Get a stream of the appropriate type from the buffer.
- Add vertices of the same type to the stream. They will be written into the buffer that was used to create the stream.
- Unmap the buffer.
As an alternative to using streams, it is possible to write data into a buffer using a handle to its mapped memory.