Class to enable simple visualization of objects drawn an a given image.
Supported objects are points, lines, line strips, circles and texts.
Inherits CLUViz::Net::ViewToolBase.
Public Member Functions | |
ViewImageTool () | |
Default constructor. More... | |
ViewImageTool (ViewCtrl^ xViewCtrl) | |
Constructor that attaches to the given view control. See AttachTo. More... | |
void | AddCircleList (System::String^ sName, array< Rx::Net::ColorCircle2D >^aCircleList, CircleViewPars^ xPars, bool bClearScene) |
Adds one or more colored circles to the tool script. More... | |
void | AddCircleList (System::String^ sName, array< Rx::Net::Circle2D >^aCircleList, Rx::Net::Vector4D vColor, CircleViewPars^ xPars, bool bClearScene) |
Adds one or more colored circles to the tool script. More... | |
void | AddLineStripList (System::String^ sName, array< Rx::Net::LineStrip2D^ >^aLineStripList, LineStripViewPars^ xPars, bool bClearScene) |
Adds one or more colored line strips to the tool script. More... | |
void | AddLineStripList (System::String^ sName, array< Rx::Net::LineStrip2D^ >^aLineStripList, array< bool >^aLineStripListMask, LineStripViewPars^ xPars, bool bClearScene) |
Adds one or more colored line strips to the tool script. More... | |
void | AddPointList (System::String^ sName, array< Rx::Net::ColorPoint2D >^aPointList, PointViewPars^ xPars, bool bClearScene) |
Adds one or more colored points to the tool script. More... | |
void | AddPointList (System::String^ sName, array< Rx::Net::Vector2D >^aPointList, Rx::Net::Vector4D vColor, PointViewPars^ xPars, bool bClearScene) |
Adds one or more colored points to the tool script. More... | |
void | AddText (System::String^ sName, Rx::Net::Text2D xText) |
Adds a text to the tool script. More... | |
void | AddText (System::String^ sName, array< Rx::Net::Text2D >^aTextList) |
Adds one or more texts to the tool script. More... | |
void | AttachTo (ViewCtrl^ xViewCtrl) |
Attaches to the given view control. Detaches from last view control by calling Detach. Loads the provided tool script. More... | |
void | ClearImage () |
Clears the image set by SetImage. More... | |
void | ClearObjectsAndText () |
Clears all objects and texts added to the tool script. More... | |
ViewCtrl^ | Detach () |
Detaches this ViewToolBase from the last view control. This resets the loaded script and makes this class invalid. More... | |
void | DrawToScene (System::String^ sName, bool bClearScene) |
Makes the given scene current. All further drawings are done in this scene. More... | |
void | EnableLineStripAnimation (System::String^ sName, bool bEnable, bool bPointsOnly, bool bEnablePicking) |
Enables or disables the animation of the given line strips. More... | |
void | SelectObject (System::String^ sName, int iIndex) |
Selects the object (circle, point, etc.) with the given index from the list of objects (circle list, point list, etc.) described by the given name. More... | |
void | SetImage (Rx::InteropNet::Runtime28::IImage^ xImage, bool bUpdate) |
Sets the image handled by this view image tool. More... | |
void | SetTextureID (unsigned int uTextureID) |
Set the OpenGL Texture ID to display. The texture has to be created within a shared OpenGL context. Once the texture is set, you can draw new content to it and call the Update() function of the ViewCtrl to display the new content. More... | |
void | UpdateTexture () |
Updates the texture plane aspect ratio. More... | |
Protected Member Functions | |
virtual void | _LoadToolScript () override |
Loads the tool script. More... | |
Protected Attributes | |
Rx::Net::StdVboMoniker^ | m_xObject |
The standard VBO moniker More... | |
ViewCtrl^ | m_xViewCtrl |
The view control More... | |
Properties | |
int | CircleEdgeCount |
Gets or sets the number of edges that describes a circle. The higher the number the slower the drawing. Default: 32. More... | |
bool | IsValid [get] |
Gets a value indicating whether this ViewToolBase is valid. This base is valid if ViewToolBase or AttachTo has been called with a valid reference to a ViewCtrl. More... | |
ViewCtrl^ | ViewControl [get] |
Gets the view control that has this ViewToolBase attached. More... | |
CLUViz::Net::ViewImageTool::ViewImageTool | ( | ) |
Default constructor.
To make the instance valid, you have to call AttachTo with a valid reference to a view control.
CLUViz::Net::ViewImageTool::ViewImageTool | ( | ViewCtrl^ | xViewCtrl | ) |
Constructor that attaches to the given view control. See AttachTo.
xViewCtrl | [in] The view control to attach to. |
|
overrideprotectedvirtual |
Loads the tool script.
Implements CLUViz::Net::ViewToolBase.
void CLUViz::Net::ViewImageTool::AddCircleList | ( | System::String^ | sName, |
array< Rx::Net::ColorCircle2D >^ | aCircleList, | ||
CircleViewPars^ | xPars, | ||
bool | bClearScene | ||
) |
Adds one or more colored circles to the tool script.
sName | [in] The name of the circle list. This should be an unique string. |
aCircleList | [in] The circle list. |
xPars | [in] Parameter instance determining the visual appearance of the circles. |
bClearScene | True to clear the drawing scene before drawing new objects. |
void CLUViz::Net::ViewImageTool::AddCircleList | ( | System::String^ | sName, |
array< Rx::Net::Circle2D >^ | aCircleList, | ||
Rx::Net::Vector4D | vColor, | ||
CircleViewPars^ | xPars, | ||
bool | bClearScene | ||
) |
Adds one or more colored circles to the tool script.
sName | [in] The name of the circle list. This should be an unique string. |
aCircleList | [in] The circle list. |
vColor | The color applied to each circle in the list. |
xPars | [in] Parameter instance determining the visual appearance of the circles. |
bClearScene | True to clear the drawing scene before drawing new objects. |
void CLUViz::Net::ViewImageTool::AddLineStripList | ( | System::String^ | sName, |
array< Rx::Net::LineStrip2D^ >^ | aLineStripList, | ||
LineStripViewPars^ | xPars, | ||
bool | bClearScene | ||
) |
Adds one or more colored line strips to the tool script.
sName | [in] The name of the line strip list. This should be an unique string. |
aLineStripList | [in] The line strip list. |
xPars | [in] Parameter instance determining the visual appearance of the line strips. |
bClearScene | True to clear the drawing scene before drawing new objects. |
void CLUViz::Net::ViewImageTool::AddLineStripList | ( | System::String^ | sName, |
array< Rx::Net::LineStrip2D^ >^ | aLineStripList, | ||
array< bool >^ | aLineStripListMask, | ||
LineStripViewPars^ | xPars, | ||
bool | bClearScene | ||
) |
Adds one or more colored line strips to the tool script.
This method provides a way to make some line strips invisible. You can specify a list of flags that must have the same size as the line strip list. Each flag determines the visibility of the line strip at the same array position.
sName | [in] The name of the line strip list. This should be an unique string. |
aLineStripList | [in] The line strip list. |
aLineStripListMask | [in] A list of flags for each line strip determining its visibility. |
xPars | [in] Parameter instance determining the visual appearance of the line strips. |
bClearScene | True to clear the drawing scene before drawing new objects. |
void CLUViz::Net::ViewImageTool::AddPointList | ( | System::String^ | sName, |
array< Rx::Net::ColorPoint2D >^ | aPointList, | ||
PointViewPars^ | xPars, | ||
bool | bClearScene | ||
) |
Adds one or more colored points to the tool script.
sName | [in] The name of the point list. This should be an unique string. |
aPointList | [in] The point list. |
xPars | [in] Parameter instance determining the visual appearance of the points. |
bClearScene | True to clear the drawing scene before drawing new objects. |
void CLUViz::Net::ViewImageTool::AddPointList | ( | System::String^ | sName, |
array< Rx::Net::Vector2D >^ | aPointList, | ||
Rx::Net::Vector4D | vColor, | ||
PointViewPars^ | xPars, | ||
bool | bClearScene | ||
) |
Adds one or more colored points to the tool script.
sName | [in] The name of the point list. This should be an unique string. |
aPointList | [in] The point list. |
vColor | The color applied to each point in the list. |
xPars | [in] Parameter instance determining the visual appearance of the points. |
bClearScene | True to clear the drawing scene before drawing new objects. |
void CLUViz::Net::ViewImageTool::AddText | ( | System::String^ | sName, |
Rx::Net::Text2D | xText | ||
) |
Adds a text to the tool script.
sName | [in] The name of the text. This should be an unique string. |
xText | The 2D text. |
void CLUViz::Net::ViewImageTool::AddText | ( | System::String^ | sName, |
array< Rx::Net::Text2D >^ | aTextList | ||
) |
Adds one or more texts to the tool script.
sName | [in] The name of the text list. This should be an unique string. |
aTextList | [in] The list of 2D texts. |
|
inherited |
Attaches to the given view control. Detaches from last view control by calling Detach. Loads the provided tool script.
xViewCtrl | [in] The view control. |
void CLUViz::Net::ViewImageTool::ClearImage | ( | ) |
Clears the image set by SetImage.
void CLUViz::Net::ViewImageTool::ClearObjectsAndText | ( | ) |
Clears all objects and texts added to the tool script.
|
inherited |
Detaches this ViewToolBase from the last view control. This resets the loaded script and makes this class invalid.
void CLUViz::Net::ViewImageTool::DrawToScene | ( | System::String^ | sName, |
bool | bClearScene | ||
) |
Makes the given scene current. All further drawings are done in this scene.
sName | [in] The name of the scene. |
bClearScene | True to clear the drawing scene before drawing new objects. |
void CLUViz::Net::ViewImageTool::EnableLineStripAnimation | ( | System::String^ | sName, |
bool | bEnable, | ||
bool | bPointsOnly, | ||
bool | bEnablePicking | ||
) |
Enables or disables the animation of the given line strips.
sName | [in] The name of the line strip list passed to the add function that added the desired strip. |
bEnable | True to enable the animation, false to disable it. |
bPointsOnly | True to animate only the points of the line strips, false to enable the entire line strips. |
bEnablePicking | True to enable mouse over appearance, false to disable it. |
void CLUViz::Net::ViewImageTool::SelectObject | ( | System::String^ | sName, |
int | iIndex | ||
) |
Selects the object (circle, point, etc.) with the given index from the list of objects (circle list, point list, etc.) described by the given name.
sName | [in] The name of the list passed to the add function that added the desired object. |
iIndex | The index of the desired object in its list. |
void CLUViz::Net::ViewImageTool::SetImage | ( | Rx::InteropNet::Runtime28::IImage^ | xImage, |
bool | bUpdate | ||
) |
Sets the image handled by this view image tool.
xImage | [in] The image. |
bUpdate | True to update only the image content. False to provide an image with a changed image format. |
void CLUViz::Net::ViewImageTool::SetTextureID | ( | unsigned int | uTextureID | ) |
Set the OpenGL Texture ID to display. The texture has to be created within a shared OpenGL context. Once the texture is set, you can draw new content to it and call the Update() function of the ViewCtrl to display the new content.
If the aspect Ratio of the texture has changed, call UpdateTexture() to apply the new aspect to the image plane.
uTextureID | The new texture ID. |
void CLUViz::Net::ViewImageTool::UpdateTexture | ( | ) |
Updates the texture plane aspect ratio.
|
protectedinherited |
The standard VBO moniker
|
protectedinherited |
The view control
|
inherited |
Gets or sets the number of edges that describes a circle. The higher the number the slower the drawing. Default: 32.
|
getinherited |
Gets a value indicating whether this ViewToolBase is valid. This base is valid if ViewToolBase or AttachTo has been called with a valid reference to a ViewCtrl.
|
getinherited |
Gets the view control that has this ViewToolBase attached.