This class encapsulates an oriented 3D rectangle.
A Cog3DRectangle is defined by a size vector and a 3D rigid transform. The size vector
defines an axis-aligned rectangle on the XY plane (whose
edges are parallel to x axis or y axis), whose vertex with minimum x
and minimum y is at the origin (cc3DVect(0,0,0)), and the opposite
vertex's coordinates are defined by the size vector
(Cog3DVect3(Size.X, Size.Y, 0)). This is referred to as the "ScaledUnitRectangle".
The rigid transform (ShapeFromScaledUnitRectangle)
maps the ScaledUnitRectangle to the desired pose in 3D space.
Inheritance Hierarchy
System MarshalByRefObject
Cognex.VisionPro.Implementation CogObjectBase
Cognex.VisionPro.Implementation CogSerializableObjectBase
Cognex.VisionPro.Implementation CogSerializableChangedEventBase
Cognex.VisionPro3D Cog3DShapeBase
Cognex.VisionPro3D Cog3DRectangle
Namespace: Cognex.VisionPro3D
Assembly: Cognex.VisionPro3D.Core (in Cognex.VisionPro3D.Core.dll) Version: 80.0.0.0
Syntax
The Cog3DRectangle type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| Cog3DRectangle |
Constructs a degenerate rectangle with Size of (0,0),
ShapeFromScaledUnitRectangle of identity transform,
and ShapeState of Cog3DShapeStateConstants.Surface.
| |
| Cog3DRectangle(Cog3DRectangle) |
Construct this object by making a deep copy of the supplied
object.
| |
| Cog3DRectangle(SerializationInfo, StreamingContext) |
Serialization constructor.
| |
| Cog3DRectangle(Cog3DVect2, Cog3DTransformRigid, Cog3DShapeStateConstants) |
Constructs a rectangle using the specified size, rigid transform, and Cog3DShapeStateConstants.
|
Methods
| Name | Description | |
|---|---|---|
| Clone |
Creates a deep copy of this shape.
| |
| ComputeArea |
Determines the area of this shape.
For an infinite shape, like Cog3DPlane, the area is 0.
| |
| ComputeBoundingBox |
Computes the axis-aligned bounding box for this shape.
| |
| ComputeDistance |
Computes the distance from this shape to the specified point.
The point on this shape used to compute the distance is a function of ShapeState.
| |
| ComputeDistanceCurve |
Determines the distance from ComputeNearestPointCurve(point3D)
to the specified point point3D.
| |
| ComputeDistanceSurface |
Determines the distance from ComputeNearestPointSurface(point3D)
to the specified point point3D.
| |
| ComputeDistanceVertex |
Determines the distance from ComputeNearestPointVertex(point3D)
to the specified point point3D.
| |
| ComputeNearestPoint |
Computes the point on this shape that is nearest to the specified point.
The nearest point on this shape to the specified point is a function of ShapeState.
If the nearest point is not unique, returns one of the nearest points.
| |
| ComputeNearestPointCurve |
Determines the point on this curve shape that is nearest to the specified point.
If the nearest point on this curve shape is not unique, returns one of the nearest points.
| |
| ComputeNearestPointSurface |
Determines the point on this surface shape that is nearest to the specified point.
If the nearest point on this surface shape is not unique, returns one of the nearest points.
| |
| ComputeNearestPointVertex |
Determines the vertex on this shape that is nearest to the specified point.
If the nearest vertex is not unique, returns one of the nearest vertices.
| |
| ComputePerimeter |
Determines the perimeter of this shape. For a wireframe shape, the
perimeter is the total length of all the wires. For an infinite shape, like Cog3DLine,
the perimeter is 0.
| |
| CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.) | |
| CreateShapeFromScaledUnitRectangle | ||
| Dispose |
Dispose this object.
| |
| Dispose(Boolean) | ||
| Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) | |
| Finalize |
Finalize this object.
(Overrides Object Finalize .) | |
| GetAttributes |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetClassName |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetComponentName |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetConverter |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetDefaultEvent |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetDefaultProperty |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetEditor |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetEvents |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetEvents( Attribute ) |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
| GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.) | |
| GetLineSegments |
Computes the line segments for the edges of this rectangle.
| |
| GetObjectData |
Serializer for this object.
(Overrides CogSerializableObjectBase GetObjectData(SerializationInfo, StreamingContext).) | |
| GetOriginVertexXVectorYVector |
Gets the rectangle's origin vertex, extent X vector and extent Y vector.
| |
| GetProperties |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetProperties( Attribute ) |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetPropertyOwner |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetShapeFromScaledUnitRectangle |
Get the ShapeFromScaledUnitRectangle transform of this rectangle.
| |
| GetType | Gets the Type of the current instance. (Inherited from Object.) | |
| GetVertices |
Computes the set of vertices defining this rectangle. Assuming a
unit rectangle, the order of the returned vertices is: (0,0,0) (1,0,0)
(1,1,0) (0,1,0).
| |
| GetVerticesV2 | ||
| InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.) | |
| MapRigid |
Maps this rectangle through the specified rigid transform and
returns a new Cog3DRectangle.
| |
| MapShape |
Creates a new shape by mapping this shape through the specified transform.
| |
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
| MemberwiseClone(Boolean) | Creates a shallow copy of the current MarshalByRefObject object. (Inherited from MarshalByRefObject.) | |
| OnChanged(Int64) |
This method should be called internally whenever the object's state may
have changed.
(Inherited from CogSerializableChangedEventBase.) | |
| OnChanged(CogChangedEventArgs) |
This method may be called internally whenever a derived object's state
may have changed and the derived object expresses this change via a
derived CogChangedEventArgs class.
(Inherited from CogSerializableChangedEventBase.) | |
| RealEqual |
Compares the internal state of the specified instances and returns
true if the internal state is within epsilon.
| |
| ResumeAndRaiseChangedEvent |
Re-enables raising of the Changed event after SuspendChangedEvent
has been called, and raises the Changed event if the
ChangedEventSuspended count is reduced to zero and any changes were
made while events were suspended. Must be called once for each call to
SuspendChangedEvent.
(Inherited from CogSerializableChangedEventBase.) | |
| SetOriginVertexXVectorYVector |
Sets the rectangle's origin vertex, extent X vector and extent Y vector.
| |
| SetShapeFromScaledUnitRectangle |
Set the ShapeFromScaledUnitRectangle transform of this rectangle.
It may change the
value of Center. It does not change the value of Size.
| |
| SuspendChangedEvent |
Temporarily suspends the raising of the Changed event. May be called
more than once, and a corresponding call to ResumeAndRaiseChangedEvent
must be made for each call to SuspendChangedEvent.
(Inherited from CogSerializableChangedEventBase.) | |
| ToString |
Override of ToString method to get a string for describing this object.
(Overrides Object ToString .) |
Fields
| Name | Description | |
|---|---|---|
| SfCenter | ||
| SfGetLineSegments | ||
| SfGetOriginVertexXVectorYVector | ||
| SfGetShapeFromScaledUnitRectangle | ||
| SfGetVertices | ||
| SfNextSf | ||
| SfSize |
Properties
| Name | Description | |
|---|---|---|
| Center |
Gets the center position of this rectangle.
| |
| ChangedEventSuspended |
If nonzero, indicates that the raising of the Changed event has been
suspended. This value is incremented when SuspendChangedEvent is called
and decremented when ResumeAndRaiseChangedEvent is called.
(Inherited from CogSerializableChangedEventBase.) | |
| HasChanged | (Inherited from CogSerializableChangedEventBase.) | |
| IsDegenerateCurve |
Determines whether or not this curve shape is degenerate. This occurs
when curve shapes have a perimeter of 0.
| |
| IsDegenerateSurface |
Determines whether or not this surface shape is degenerate. This occurs
when surface shapes have an area of 0.
| |
| IsEmpty |
Indicates if the set of points lying on the boundary of this shape is empty.
| |
| IsFinite |
Indicates if this shape has finite extents.
| |
| SelectedSpaceName3D |
The 3D coordinate space in which this shape is to be interpreted.
| |
| ShapeFromScaledUnitRectangle |
Deprecated. Please use GetShapeFromScaledUnitRectangle() and
SetShapeFromScaledUnitRectangle()instead.
| |
| ShapeState |
Gets/sets the ShapeState for this shape.
| |
| Size |
Gets/sets the size of this rectangle. The setter may change the
value of Center. It does not change the value of ShapeFromScaledUnitRectangle.
| |
| StateFlags |
Returns the complete set of state flags supported on this object. The
flags may be indexed by name as shown in the following C# code snippet:
if (changedObject.StateFlags["Color"] & eventArgs.StateFlags) { ... }
(Inherited from CogSerializableChangedEventBase.) |
Events
| Name | Description | |
|---|---|---|
| Changed |
This event is raised when one or more parts of the object's state may
have changed.
(Inherited from CogSerializableChangedEventBase.) |
See Also