Interface IGLVertexManager
- Namespace
- SearchAThing.OpenGL.Core
- Assembly
- netcore-opengl-core.dll
Vertex manager primary purpose is to keep a linear sequence of distinct GLVertexStruct structs
that will populated by the gl vertex GLVertex objects.
The same GLVertex reference cannot be registered twice in vertex manager,
these stay connected to their figure primitives until removed from.
public interface IGLVertexManager : INotifyPropertyChanged
- Inherited Members
Properties
ExpandModelBBox
Flag to state if vertex added to this vertex manager imply expansion of the gl model (Default: true).
More (custom) vertex manager can be registered into the gl model, may for temporary purpose and
setting this variable to false at the construct of these custom vertex manager allow to unaffect
the gl model bbox.
Should be used to avoid the zoomfit to evaluate temporary vertex manager figures.
GLVertexManager
bool ExpandModelBBox { get; }
Property Value
FigureCount
Actual size of registered figures list.
int FigureCount { get; }
Property Value
Figures
Enumerates vertex manager registered figures.
IEnumerable<GLFigureBase> Figures { get; }
Property Value
LBBox
BBox of registered figure vertexes [local].
BBox LBBox { get; }
Property Value
TriangleCount
Actual count of gl triangles belonging to added figures.
int TriangleCount { get; }
Property Value
VertexCount
Actual size of GLVertexStruct vertex list.
int VertexCount { get; }
Property Value
Methods
AddFigure(GLFigureBase)
Adds given figure to the vertex manager.
All vertexes belonging to the figure's primitives will be added.
Emits FigureAdded event.
void AddFigure(GLFigureBase figure)
Parameters
figure
GLFigureBaseFigure to add.
Clear()
Clear all vertexes and figures from the vertex manager, and emit FiguresCleared and Invalidated event.
void Clear()
GetVboArray()
Used internally by the GLModel.RenderVertexManager
to render the scene.
Contains the list of vertex structs directly mapped to the gpu.
This array will be built each time a vertex changes from the ToArray() of the list Vertexes.
To avoid performance penalty in a scenario where you need to change the position of a figure
you can use ObjectMatrix that doesn't affects at all vertexes because is a figure
related information forwarded to the gl pipeline shader through UNINAME_uObject.
GLVertexStruct[] GetVboArray()
Returns
RemoveFigure(GLFigureBase)
Remove given figure from the vertex manager.
All vertexes belonging to the figure's primitives will be removed.
Emits FigureRemoved event.
bool RemoveFigure(GLFigureBase figure)
Parameters
figure
GLFigureBaseFigure to remove.
Returns
Events
FigureAdded
Event emitted when a figure was added.
event FigureEvent FigureAdded
Event Type
FigureRemoved
Event emitted when a figure was removed.
event FigureEvent FigureRemoved
Event Type
FiguresCleared
Event emitted when all figures cleared.
The list of figures removed is reported through the event argument of FiguresEvent delegate.
event FiguresEvent FiguresCleared
Event Type
Invalidated
Event emitted when a vertex was added or removed or all vertexes cleared.
Its used by the GLModel to track the model changes
and emit a ViewInvalidated event.
event VertexManagerInvalidatedDelegate Invalidated
Event Type
- See Also