Class TemporaryGraphicCollection
A collection of TemporaryGraphic objects.
Namespace: ABB.Robotics.RobotStudio.Stations.Forms
Assembly: ABB.Robotics.RobotStudio.Stations.dll
Syntax
public class TemporaryGraphicCollection : ICollection, IEnumerable<TemporaryGraphic>, IEnumerable, IDisposable
Constructors
TemporaryGraphicCollection(Int32)
ABB Internal use
Declaration
public TemporaryGraphicCollection(int viewID = 0)
Parameters
Type | Name | Description |
---|---|---|
Int32 | viewID |
Properties
Count
Gets the number of elements contained in the collection.
Declaration
public virtual int Count { get; }
Property Value
Type | Description |
---|---|
Int32 |
IsSynchronized
Not supported
Declaration
public virtual bool IsSynchronized { get; }
Property Value
Type | Description |
---|---|
Boolean |
Item[Int32]
Gets the element at the specified position.
Declaration
public TemporaryGraphic this[int index] { get; }
Parameters
Type | Name | Description |
---|---|---|
Int32 | index |
Property Value
Type | Description |
---|---|
TemporaryGraphic |
SyncRoot
Not supported
Declaration
public virtual object SyncRoot { get; }
Property Value
Type | Description |
---|---|
Object |
Methods
CopyTo(TemporaryGraphic[], Int32)
Copies the elements of the collection to an Array, starting at a particular Array index.
Declaration
public virtual void CopyTo(TemporaryGraphic[] array, int index)
Parameters
Type | Name | Description |
---|---|---|
TemporaryGraphic[] | array | |
Int32 | index |
CopyTo(Array, Int32)
Copies the elements of the collection to an Array, starting at a particular Array index.
Declaration
public virtual void CopyTo(Array array, int index)
Parameters
Type | Name | Description |
---|---|---|
Array | array | |
Int32 | index |
Dispose()
Declaration
public void Dispose()
DrawArc(Matrix4, Double, Double, Double, Double, Color)
Creates an arc.
Declaration
public TemporaryGraphic DrawArc(Matrix4 center, double radius, double startAngle, double endAngle, double width, Color color)
Parameters
Type | Name | Description |
---|---|---|
Matrix4 | center | The position and orientation of the arc. The arc is created in the z=0 plane. |
Double | radius | The radius of the arc. |
Double | startAngle | The start angle (relative to the x-axis) of the arc |
Double | endAngle | The end angle (relative to the x-axis) of the arc |
Double | width | The line width of the arc, in pixels. |
Color | color | The color of the arc. |
Returns
Type | Description |
---|---|
TemporaryGraphic |
DrawArrow(Vector3, Vector3, Double, Double, Color)
Creates an arrow.
Declaration
public TemporaryGraphic DrawArrow(Vector3 start, Vector3 end, double tipLength, double width, Color color)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | start | The start (tip) of the arrow. |
Vector3 | end | The end of the arrow. |
Double | tipLength | The length of the arrow tip |
Double | width | The line width of the arrow, in pixels. |
Color | color | The color of the arrow. |
Returns
Type | Description |
---|---|
TemporaryGraphic |
DrawBox(Matrix4, Vector3, Color)
Creates a box.
Declaration
public TemporaryGraphic DrawBox(Matrix4 origin, Vector3 size, Color color)
Parameters
Type | Name | Description |
---|---|---|
Matrix4 | origin | The position and orientation of the corner of the box. |
Vector3 | size | The size of the box in x, y and z directions. |
Color | color | The color of the box. |
Returns
Type | Description |
---|---|
TemporaryGraphic |
DrawCable(Matrix4, Double, Vector3[], Color)
Creates a cable-like primitive along a sequence of points. The cable can be dynamically updated using UpdateCable(Double, Vector3[]).
Declaration
public TemporaryGraphic DrawCable(Matrix4 origin, double radius, Vector3[] points, Color color)
Parameters
Type | Name | Description |
---|---|---|
Matrix4 | origin | |
Double | radius | Cable radius |
Vector3[] | points | Center points along the cable |
Color | color |
Returns
Type | Description |
---|---|
TemporaryGraphic |
DrawCircle(Matrix4, Double, Double, Color)
Creates a circle.
Declaration
public TemporaryGraphic DrawCircle(Matrix4 center, double radius, double width, Color color)
Parameters
Type | Name | Description |
---|---|---|
Matrix4 | center | The position and orientation of the circle. The circle is created in the z=0 plane. |
Double | radius | The radius of the circle. |
Double | width | The line width of the circle, in pixels. |
Color | color | The color of the circle. |
Returns
Type | Description |
---|---|
TemporaryGraphic |
DrawCone(Matrix4, Double, Double, Color)
Creates a cone.
Declaration
public TemporaryGraphic DrawCone(Matrix4 center, double radius, double height, Color color)
Parameters
Type | Name | Description |
---|---|---|
Matrix4 | center | The position and orientation of the cone. The base of the cone will be in the z=0 plane. |
Double | radius | The radius of the base. |
Double | height | The height of the cone. |
Color | color | The color of the cone. |
Returns
Type | Description |
---|---|
TemporaryGraphic |
DrawCylinder(Matrix4, Double, Double, Double, Color)
Creates a cylinder with different bottom and top radii, e.g. a truncated cone.
Declaration
public TemporaryGraphic DrawCylinder(Matrix4 center, double bottomRadius, double topRadius, double height, Color color)
Parameters
Type | Name | Description |
---|---|---|
Matrix4 | center | The position and orientation of the cylinder. The base of the cylinder will be in the z=0 plane. |
Double | bottomRadius | The bottom radius of the cylinder. |
Double | topRadius | The top radius of the cylinder. |
Double | height | The height of the cylinder. |
Color | color | The color of the cylinder. |
Returns
Type | Description |
---|---|
TemporaryGraphic |
DrawCylinder(Matrix4, Double, Double, Color)
Creates a cylinder.
Declaration
public TemporaryGraphic DrawCylinder(Matrix4 center, double radius, double height, Color color)
Parameters
Type | Name | Description |
---|---|---|
Matrix4 | center | The position and orientation of the cylinder. The base of the cylinder will be in the z=0 plane. |
Double | radius | The radius of the cylinder. |
Double | height | The height of the cylinder. |
Color | color | The color of the cylinder. |
Returns
Type | Description |
---|---|
TemporaryGraphic |
DrawFrame(Matrix4, Double, Double)
Creates a color-coded frame representing a coordinate system
Declaration
public TemporaryGraphic DrawFrame(Matrix4 origin, double size, double width)
Parameters
Type | Name | Description |
---|---|---|
Matrix4 | origin | The position and orientation of the frame |
Double | size | The size of the frame. |
Double | width | The line width of the frame, in pixels. |
Returns
Type | Description |
---|---|
TemporaryGraphic |
DrawFrame(Matrix4, Double, Double, String, Int32)
Creates a color-coded frame representing a coordinate system
Declaration
public TemporaryGraphic DrawFrame(Matrix4 origin, double size, double width, string label, int labelSize = 16)
Parameters
Type | Name | Description |
---|---|---|
Matrix4 | origin | The position and orientation of the frame |
Double | size | The size of the frame. |
Double | width | The line width of the frame, in pixels. |
String | label | A text to show beside the frame |
Int32 | labelSize | Text size |
Returns
Type | Description |
---|---|
TemporaryGraphic |
DrawLine(Vector3, Vector3, Double, Color)
Creates a line.
Declaration
public TemporaryGraphic DrawLine(Vector3 start, Vector3 end, double width, Color color)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | start | The start of the line. |
Vector3 | end | The end of the line |
Double | width | The width of the line, in pixels. |
Color | color | The color of the line. |
Returns
Type | Description |
---|---|
TemporaryGraphic |
DrawLines(IEnumerable<Vector3>, Double, Color)
Creates lines between pairs of points.
Declaration
public TemporaryGraphic DrawLines(IEnumerable<Vector3> points, double width, Color color)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<Vector3> | points | The points between which to draw lines. Lines are drawn between the first and second point, between the third and fourth etc. |
Double | width | The width of the lines (in pixels) |
Color | color | The color of the the lines. |
Returns
Type | Description |
---|---|
TemporaryGraphic |
DrawLineStrip(IEnumerable<Vector3>, Double, Color)
Creates contiguous lines between a collection of points.
Declaration
public TemporaryGraphic DrawLineStrip(IEnumerable<Vector3> points, double width, Color color)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<Vector3> | points | The points between which to draw lines. |
Double | width | The width of the lines (in pixels) |
Color | color | The color of the the lines. |
Returns
Type | Description |
---|---|
TemporaryGraphic |
DrawMarker(Vector3, Double, Double, Boolean, Color)
Creates a fixed size Marker
Declaration
public TemporaryGraphic DrawMarker(Vector3 point, double size, double width, bool fixedSize, Color color)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | point | The position of the center point of the Marker |
Double | size | The size of the Marker. |
Double | width | The line width of the Marker, in pixels. |
Boolean | fixedSize | The fixed size of the Marker. |
Color | color | The color of the Marker. |
Returns
Type | Description |
---|---|
TemporaryGraphic |
DrawMesh(Matrix4, Mesh, Boolean)
Draws a Mesh.
Declaration
public TemporaryGraphic DrawMesh(Matrix4 origin, Mesh mesh, bool cloneMesh = false)
Parameters
Type | Name | Description |
---|---|---|
Matrix4 | origin | The position and orientation of the mesh. |
Mesh | mesh | The mesh to draw. |
Boolean | cloneMesh | Create a clone of the mesh. If true the object can be modified by e.g. Color, otherwise not. |
Returns
Type | Description |
---|---|
TemporaryGraphic |
DrawMesh(Matrix4, MeshPart)
Draws a MeshPart.
Declaration
public TemporaryGraphic DrawMesh(Matrix4 origin, MeshPart mesh)
Parameters
Type | Name | Description |
---|---|---|
Matrix4 | origin | The position and orientation of the mesh. |
MeshPart | mesh | The mesh. |
Returns
Type | Description |
---|---|
TemporaryGraphic |
DrawPart(Matrix4, Part)
Adds an existing part.
Declaration
public TemporaryGraphic DrawPart(Matrix4 origin, Part part)
Parameters
Type | Name | Description |
---|---|---|
Matrix4 | origin | The position and orientation of the part. |
Part | part | The part to add. |
Returns
Type | Description |
---|---|
TemporaryGraphic |
DrawPart(Matrix4, Part, Double)
Adds an existing part with an added transparency.
Declaration
public TemporaryGraphic DrawPart(Matrix4 origin, Part part, double opacity)
Parameters
Type | Name | Description |
---|---|---|
Matrix4 | origin | The position and orientation of the part. |
Part | part | The part to add. |
Double | opacity | Relative opacity, where 0 is completely transparent and 1 is the original material. |
Returns
Type | Description |
---|---|
TemporaryGraphic |
DrawParticleSystem(Matrix4, ParticleSystemData)
Creates a particle system.
Declaration
public TemporaryGraphic DrawParticleSystem(Matrix4 origin, ParticleSystemData data)
Parameters
Type | Name | Description |
---|---|---|
Matrix4 | origin | |
ParticleSystemData | data |
Returns
Type | Description |
---|---|
TemporaryGraphic |
DrawPointCloud(Matrix4, Vector3[], Color, Double)
Creates a point cloud.
Declaration
public TemporaryGraphic DrawPointCloud(Matrix4 origin, Vector3[] points, Color color, double pointSize)
Parameters
Type | Name | Description |
---|---|---|
Matrix4 | origin | The position and orientation of the point cloud. |
Vector3[] | points | The position of the points (relative to origin). |
Color | color | Color of the points. |
Double | pointSize | Point size (in pixels). |
Returns
Type | Description |
---|---|
TemporaryGraphic |
DrawPointCloud(Matrix4, Vector3[], Color[], Double)
Creates a point cloud.
Declaration
public TemporaryGraphic DrawPointCloud(Matrix4 origin, Vector3[] points, Color[] colors, double pointSize)
Parameters
Type | Name | Description |
---|---|---|
Matrix4 | origin | The position and orientation of the point cloud. |
Vector3[] | points | The position of the points (relative to origin). |
Color[] | colors | Colors of the points. Must have the same number of elements as points. |
Double | pointSize | Point size (in pixels). |
Returns
Type | Description |
---|---|
TemporaryGraphic |
DrawPyramid(Matrix4, Double, Double, Int32, Color)
Creates a pyramid.
Declaration
public TemporaryGraphic DrawPyramid(Matrix4 center, double radius, double height, int numSides, Color color)
Parameters
Type | Name | Description |
---|---|---|
Matrix4 | center | The position and orientation of the pyramid. The base of the pyramid will be in the z=0 plane. |
Double | radius | The radius of the pyramid. |
Double | height | The height of the pyramid. |
Int32 | numSides | The number of sides in the pyramid. |
Color | color | The color of the pyramid. |
Returns
Type | Description |
---|---|
TemporaryGraphic |
DrawRectangleWithMaterial(Vector3, Vector3, Vector3, Material)
Creates a surface rectangle TemporaryGraphic with a Material.
Declaration
public TemporaryGraphic DrawRectangleWithMaterial(Vector3 origin, Vector3 side1, Vector3 side2, Material material)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | origin | One corner of the rectangle. |
Vector3 | side1 | The first side of the rectangle. |
Vector3 | side2 | The second side of the rectangle. |
Material | material | The material to apply to the rectangle. |
Returns
Type | Description |
---|---|
TemporaryGraphic |
DrawSphere(Vector3, Double, Color)
Creates a sphere.
Declaration
public TemporaryGraphic DrawSphere(Vector3 center, double radius, Color color)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | center | The position of the sphere. |
Double | radius | The radius of the sphere. |
Color | color | The color of the sphere. |
Returns
Type | Description |
---|---|
TemporaryGraphic |
DrawSurfaceCircle(Matrix4, Double, Color)
Creates a surface circle
Declaration
public TemporaryGraphic DrawSurfaceCircle(Matrix4 origin, double radius, Color color)
Parameters
Type | Name | Description |
---|---|---|
Matrix4 | origin | The position (center-point) and orientation of the circle. The circle will be drawn in the X-Y plane. |
Double | radius | The radius of the circle. |
Color | color | The color of circle. |
Returns
Type | Description |
---|---|
TemporaryGraphic |
DrawSurfaceCircleSector(Matrix4, Double, Double, Double, Double, Color, Int32)
Creates a surface circle sector
Declaration
public TemporaryGraphic DrawSurfaceCircleSector(Matrix4 origin, double innerRadius, double outerRadius, double startAngle, double endAngle, Color color, int precision = 32)
Parameters
Type | Name | Description |
---|---|---|
Matrix4 | origin | The position (center-point) and orientation of the circle. The circle will be drawn in the X-Y plane. |
Double | innerRadius | The inner radius of the circle sector. |
Double | outerRadius | The outer radius of the circle sector. |
Double | startAngle | The start angle of the circle sector. |
Double | endAngle | The end angle of the circle sector. |
Color | color | The color of circle sector. |
Int32 | precision | The number of segments used to draw the circle sector. |
Returns
Type | Description |
---|---|
TemporaryGraphic |
DrawSurfacePolygon(IEnumerable<Vector3>, Color)
Creates a surface polygon
Declaration
public TemporaryGraphic DrawSurfacePolygon(IEnumerable<Vector3> vertices, Color color)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<Vector3> | vertices | Polygon vertices. The vertices must be planar and not self-intersecting. |
Color | color | The color of the polygon |
Returns
Type | Description |
---|---|
TemporaryGraphic |
DrawSurfaceRectangle(Matrix4, Double, Double, Color)
Creates a surface rectangle
Declaration
public TemporaryGraphic DrawSurfaceRectangle(Matrix4 origin, double width, double height, Color color)
Parameters
Type | Name | Description |
---|---|---|
Matrix4 | origin | The position (lower-left corner) and orientation of the rectangle. The rectangle will be drawn in the X-Y plane. |
Double | width | The width of the rectangle. |
Double | height | The height of the rectangle. |
Color | color | The color of the rectangle. |
Returns
Type | Description |
---|---|
TemporaryGraphic |
DrawSurfaceRectangle(Vector3, Vector3, Vector3, Material)
Creates a surface rectangle TemporaryGraphic with a Material.
Declaration
public TemporaryGraphic DrawSurfaceRectangle(Vector3 origin, Vector3 side1, Vector3 side2, Material material)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | origin | One corner of the rectangle. |
Vector3 | side1 | The first side of the rectangle. |
Vector3 | side2 | The second side of the rectangle. |
Material | material | The material to apply to the rectangle. |
Returns
Type | Description |
---|---|
TemporaryGraphic |
Remarks
This differs from other DrawRectangle methods in that the Matrix of the returned TemporaryGraphic is identity. In other methods its translation is equal to the origin parameter.
DrawSurfaceRectangle(Vector3, Vector3, Vector3, Color)
Creates a surface rectangle
Declaration
public TemporaryGraphic DrawSurfaceRectangle(Vector3 origin, Vector3 side1, Vector3 side2, Color color)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | origin | One corner of the rectangle. |
Vector3 | side1 | The first side of the rectangle. |
Vector3 | side2 | The second side of the rectangle. |
Color | color | The color of the rectangle. |
Returns
Type | Description |
---|---|
TemporaryGraphic |
DrawText(Vector3, String)
Creates a text markup.
Declaration
public TemporaryGraphic DrawText(Vector3 start, string text)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | start | The 3D position that the text is anchored to. |
String | text | The text to display. |
Returns
Type | Description |
---|---|
TemporaryGraphic |
DrawText(Vector3, String, Single, Color, Color)
Creates a text markup.
Declaration
public TemporaryGraphic DrawText(Vector3 start, string text, float fontSize, Color backgroundColor, Color textColor)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | start | The 3D position that the text is anchored to. |
String | text | The text to display. |
Single | fontSize | Font size |
Color | backgroundColor | Background color |
Color | textColor | Text color |
Returns
Type | Description |
---|---|
TemporaryGraphic |
DrawText(Vector3, String, Single, Color, Color, Vector2, Boolean)
Creates a text markup.
Declaration
public TemporaryGraphic DrawText(Vector3 start, string text, float fontSize, Color backgroundColor, Color textColor, Vector2 textOffset, bool arrow)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | start | The 3D position that the text is anchored to. |
String | text | The text to display. |
Single | fontSize | Font size |
Color | backgroundColor | Background color |
Color | textColor | Text color |
Vector2 | textOffset | Offset (in pixels) from the anchor point to the lower left corner of the text box. |
Boolean | arrow | Draw an arrow between the anchor point and the text box |
Returns
Type | Description |
---|---|
TemporaryGraphic |
DrawTexturedRectangle(Matrix4, Double, Double, Bitmap)
Creates a textured rectangle
Declaration
public TemporaryGraphic DrawTexturedRectangle(Matrix4 origin, double width, double height, Bitmap texture)
Parameters
Type | Name | Description |
---|---|---|
Matrix4 | origin | The position (lower-left corner) and orientation of the rectangle. The rectangle will be drawn in the X-Y plane. |
Double | width | The width of the rectangle. |
Double | height | The height of the rectangle. |
Bitmap | texture | The texture to apply to the rectangle. |
Returns
Type | Description |
---|---|
TemporaryGraphic |
DrawTexturedRectangle(Vector3, Vector3, Vector3, Texture)
Creates a surface rectangle
Declaration
public TemporaryGraphic DrawTexturedRectangle(Vector3 origin, Vector3 side1, Vector3 side2, Texture texture)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | origin | One corner of the rectangle. |
Vector3 | side1 | The first side of the rectangle. |
Vector3 | side2 | The second side of the rectangle. |
Texture | texture | The texture to apply to the rectangle. |
Returns
Type | Description |
---|---|
TemporaryGraphic |
DrawTrace(Vector3, Double, Double)
Creates a trace, e.g. a set of contiguous line segments that follows a path of points.
Declaration
public TemporaryGraphic DrawTrace(Vector3 start, double width, double maxLength)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | start | The start point of the trace. |
Double | width | The width of the trace lines (in pixels). |
Double | maxLength | The maximum length of the trace. |
Returns
Type | Description |
---|---|
TemporaryGraphic |
Remarks
Call TemporaryGraphic.ContinueTrace() to add new points to the trace.
GetEnumerator()
Returns an enumerator that can be used to iterate through this TemporaryGraphicCollection object.
Declaration
public virtual IEnumerator GetEnumerator()
Returns
Type | Description |
---|---|
IEnumerator | An IEnumerator object that represents this TemporaryGraphicCollection object. |
Remove(TemporaryGraphic)
Removes a TemporaryGraphic object from this TemporaryGraphicCollection object.
Declaration
public void Remove(TemporaryGraphic temporaryGraphic)
Parameters
Type | Name | Description |
---|---|---|
TemporaryGraphic | temporaryGraphic | The TemporaryGraphic object to be removed. |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | The TemporaryGraphic object has not been added to the collection. |
RemoveAll()
Removes all TemporaryGraphic objects from this TemporaryGraphicCollection object.
Declaration
public void RemoveAll()
Remarks
Use with caution, since this will also remove objects created by other clients.
Update()
Updates the graphics to reflect all changes
Declaration
public void Update()