Class TemporaryGraphic
A simple non-persistent graphics object.
Namespace: ABB.Robotics.RobotStudio.Stations.Forms
Assembly: ABB.Robotics.RobotStudio.Stations.dll
Syntax
public sealed class TemporaryGraphic : TempGfxInternal
Properties
Color
Gets or sets the color of this object.
Declaration
public Color Color { get; set; }
Property Value
Type | Description |
---|---|
Color |
FixedSize
Gets or sets a value that indicates if this object should be rendered in a fixed size, regardless of the distance from the view point.
Declaration
public bool FixedSize { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
FlatStyle
Render 3D primitives in a flat unshaded appearance.
Declaration
public bool FlatStyle { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
GlobalMatrix
Gets the global transform of this object. If it is not attached is is identical to Matrix
Declaration
public Matrix4 GlobalMatrix { get; }
Property Value
Type | Description |
---|---|
Matrix4 |
GroupLabel
Gets or sets a text that can be used for grouping TemporaryGraphic objects.
Declaration
public string GroupLabel { get; set; }
Property Value
Type | Description |
---|---|
String |
Remarks
Setting this property also marks this object as possible to include when exporting station geomtry. All groups selected by the user will be exported. Note that not all kinds of TemporaryGraphic are supported.
IsDeleted
Returns true if this object is deleted and no longer valid.
Declaration
public bool IsDeleted { get; }
Property Value
Type | Description |
---|---|
Boolean |
Matrix
Gets or sets the global transform of this object, or the offset if the object is attached.
Declaration
public Matrix4 Matrix { get; set; }
Property Value
Type | Description |
---|---|
Matrix4 |
MeasureObject
Gets or sets an IMeasureTemporaryGraphic object that can be used for customizing measurements when the user has selected this object in the graphics.
Declaration
public IMeasureTemporaryGraphic MeasureObject { get; set; }
Property Value
Type | Description |
---|---|
IMeasureTemporaryGraphic |
Pickable
Gets or sets a value that indicates if this object can be picked in the graphics.
Declaration
public bool Pickable { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
Picked objects are returned in PickedTemporaryGraphic.
Tag
Gets or sets user-defined data associated with this object.
Declaration
public object Tag { get; set; }
Property Value
Type | Description |
---|---|
Object |
Text
Sets the text of this object.
Declaration
public string Text { get; set; }
Property Value
Type | Description |
---|---|
String |
Remarks
Only valid for objects created with the DrawText method.
Texture
Gets the Texture of this object, for supported types.
Declaration
public Texture Texture { get; }
Property Value
Type | Description |
---|---|
Texture |
Topmost
Gets or sets a value that indicates if this object should be rendered on top of other objects in the graphics.
Declaration
public bool Topmost { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Visible
Gets or sets a value that indicates if this object is visible in the graphics.
Declaration
public bool Visible { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
Attach(ProjectObject)
Attaches this to an object in the station.
Declaration
public void Attach(ProjectObject obj)
Parameters
Type | Name | Description |
---|---|---|
ProjectObject | obj | The object to attach to, or NULL to break the attachment. This must be a graphical object, e.g. a GraphicComponent, RsTarget, RsWorkObject, RsToolData or RsPathProcedure. |
Remarks
The Matrix property represents an offset from the object's origin.
Exceptions
Type | Condition |
---|---|
ArgumentException | The argument is not a graphical object. |
ContinueTrace(Vector3, Color, Boolean)
Adds a new point to a trace.
Declaration
public void ContinueTrace(Vector3 point, Color color, bool discontinue)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | point | The endpoint of the new segment. |
Color | color | The color of the new segment. |
Boolean | discontinue | Creates a discontinuity, e.g. no line is drawn from the previous point |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | This was not created by DrawTrace(). |
Copy()
Returns a copy of this TemporaryGraphic object.
Declaration
public TemporaryGraphic Copy()
Returns
Type | Description |
---|---|
TemporaryGraphic | The copied TemporaryGraphic object. |
Delete()
Deletes this object from the graphics.
Declaration
public void Delete()
GetBoundingBox(Boolean)
Computes the (axis-aligned) bounding box for this object.
Declaration
public BoundingBox GetBoundingBox(bool global)
Parameters
Type | Name | Description |
---|---|---|
Boolean | global | Specifies that the bounding box should be in the global (world) coordinate system rather than in this object's local coordinate system. |
Returns
Type | Description |
---|---|
BoundingBox |
Remarks
The result is undefined for objects with FixedSize = true.
GetBoundingBox(Boolean, out Vector3, out Vector3)
Declaration
olete("Use GetBoundingBox(bool global) instead")]
public void GetBoundingBox(bool global, out Vector3 min, out Vector3 max)
Parameters
Type | Name | Description |
---|---|---|
Boolean | global | |
Vector3 | min | |
Vector3 | max |
Highlight(HighlightStyle, Color)
Highlights this object in the specified color and style.
Declaration
public void Highlight(HighlightStyle style, Color color)
Parameters
Type | Name | Description |
---|---|---|
HighlightStyle | style | |
Color | color |
Highlight(Boolean)
Highlights this object using the default highlight color and style for selections.
Declaration
public void Highlight(bool highlight)
Parameters
Type | Name | Description |
---|---|---|
Boolean | highlight | True if the object should be highlighted, False to turn the highlighting off. |
Highlight(Boolean, Color)
Highlights this object in the specified color.
Declaration
public void Highlight(bool highlight, Color color)
Parameters
Type | Name | Description |
---|---|---|
Boolean | highlight | True if the object should be highlighted, False to turn the highlighting off. |
Color | color | Highlight color |
SetAlpha(Single)
Sets the alpha of this objcect.
Declaration
public void SetAlpha(float alpha)
Parameters
Type | Name | Description |
---|---|---|
Single | alpha | Alpha to set. Should be in the range 0..1. |
UpdateCable(Double, Vector3[])
Updates a cable created by DrawCable(Matrix4, Double, Vector3[], Color).
Declaration
public void UpdateCable(double radius, Vector3[] points)
Parameters
Type | Name | Description |
---|---|---|
Double | radius | New radius |
Vector3[] | points | New points |
Remarks
The number of points can be different than when the cable was created.
UpdateParticleSystem(ParticleSystemData)
Updates a particle system created by DrawParticleSystem(Matrix4, ParticleSystemData)
Declaration
public void UpdateParticleSystem(ParticleSystemData data)
Parameters
Type | Name | Description |
---|---|---|
ParticleSystemData | data |
Events
GlobalMatrixChanged
Occurs when GlobalMatrix has changed.
Declaration
public event EventHandler GlobalMatrixChanged
Event Type
Type | Description |
---|---|
EventHandler |