Cog3DBox ClassCognex VisionPro
This class encapsulates an oriented 3D box. A Cog3DBox is defined by a size vector and a 3D rigid transform. The size vector defines an axis-aligned box which has the following pair of opposite vertices: cc3DVect(0,0,0) and size(). This is referred to as the "ScaledUnitBox". The rigid transform (ShapeFromScaledUnitBox) maps the ScaledUnitBox to the desired pose in 3D space.
Inheritance Hierarchy

System Object
  System MarshalByRefObject
    Cognex.VisionPro.Implementation CogObjectBase
      Cognex.VisionPro.Implementation CogSerializableObjectBase
        Cognex.VisionPro.Implementation CogSerializableChangedEventBase
          Cognex.VisionPro3D Cog3DShapeBase
            Cognex.VisionPro3D Cog3DBox

Namespace: Cognex.VisionPro3D
Assembly: Cognex.VisionPro3D.Core (in Cognex.VisionPro3D.Core.dll) Version: 65.1.0.0
Syntax

[SerializableAttribute]
public class Cog3DBox : Cog3DShapeBase, ICog3DShape, 
	ICog3DVertex, ICog3DCurve, ICog3DSurface, ICog3DVolume, IDisposable

The Cog3DBox type exposes the following members.

Constructors

  NameDescription
Public methodCog3DBox 
Constructs a degenerate box with size of (0,0,0), translation of (0,0,0), ShapeFromScaledUnitBox of identity transform, and Cog3DShapeStateConstants of Volume.
Public methodCog3DBox(Cog3DBox)
Construct this object by making a deep copy of the supplied object.
Protected methodCog3DBox(SerializationInfo, StreamingContext)
Serialization constructor.
Public methodCog3DBox(Cog3DVect3, Cog3DTransformRigid, Cog3DShapeStateConstants)
Constructs a box using the specified size, rigid transform, and Cog3DShapeStateConstants.
Top
Methods

  NameDescription
Public methodClone
Creates a deep copy of this shape.
Public methodComputeArea
Determines the area of this shape. For an infinite shape, like Cog3DPlane, the area is 0.
Public methodComputeBoundingBox
Computes the axis-aligned bounding box for this shape.
Public methodComputeDistance
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.
Public methodComputeDistanceCurve
Determines the distance from ComputeNearestPointCurve(point3D) to the specified point point3D.
Public methodComputeDistanceSurface
Determines the distance from ComputeNearestPointSurface(point3D) to the specified point point3D.
Public methodComputeDistanceVertex
Determines the distance from ComputeNearestPointVertex(point3D) to the specified point point3D.
Public methodComputeDistanceVolume
Determines the distance from ComputeNearestPointVolume(point3D) to the specified point point3D.
Public methodComputeNearestPoint
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.
Public methodComputeNearestPointCurve
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.
Public methodComputeNearestPointSurface
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.
Public methodComputeNearestPointVertex
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.
Public methodComputeNearestPointVolume
Determines the point on this volume shape that is nearest to the specified point. If the nearest point on this volume shape is not unique, returns one of the nearest points.
Public methodComputePerimeter
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.
Public methodComputeVolume
Determines the volume of this shape.
Public methodCreateObjRef
Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
(Inherited from MarshalByRefObject.)
Public methodDispose 
Dispose this object.
Protected methodDispose(Boolean)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Finalize this object.
(Overrides Object Finalize .)
Protected methodGetAttributes
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetClassName
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetComponentName
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetConverter
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetDefaultEvent
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetDefaultProperty
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetEditor
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetEvents 
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetEvents( Attribute )
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetLifetimeService
Retrieves the current lifetime service object that controls the lifetime policy for this instance.
(Inherited from MarshalByRefObject.)
Public methodGetLineSegments
Computes the line segments for the edges of this box.
Protected methodGetObjectData
Serializer for this object.
(Overrides CogSerializableObjectBase GetObjectData(SerializationInfo, StreamingContext).)
Public methodGetOriginVertexXVectorYVectorZ
Get the box's origin vertex, extent X vector, extent Y vector, and Z height.
Protected methodGetProperties 
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetProperties( Attribute )
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetPropertyOwner
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Public methodGetShapeFromScaledUnitBox
Get the ShapeFromScaledUnitBox transform of this box.
Public methodGetSurfaces
Computes the surfaces of this box.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetVertices
Computes the set of vertices defining this box. Assuming a unit box, the order of the returned vertices is: (0,0,0) (1,0,0) (1,1,0) (0,1,0) (0,0,1) (1,0,1) (1,1,1), (0,1,1).
Public methodGetVerticesV2
Public methodInitializeLifetimeService
Obtains a lifetime service object to control the lifetime policy for this instance.
(Inherited from MarshalByRefObject.)
Public methodMapRigid
Maps this box through the specified rigid transform and returns a new Cog3DBox.
Public methodMapShape
Creates a new shape by mapping this shape through the specified transform.
Protected methodMemberwiseClone 
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodMemberwiseClone(Boolean)
Creates a shallow copy of the current MarshalByRefObject object.
(Inherited from MarshalByRefObject.)
Protected methodOnChanged(Int64)
This method should be called internally whenever the object's state may have changed.
(Inherited from CogSerializableChangedEventBase.)
Protected methodOnChanged(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.)
Public methodStatic memberRealEqual
Compares the internal state of the specified instances and returns true if the internal state is within epsilon.
Public methodResumeAndRaiseChangedEvent
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.)
Public methodSetOriginVertexXVectorYVectorZ
Set the box's origin vertex, extent X vector, extent Y vector, and Z height.
Public methodSetShapeFromScaledUnitBox
Set the ShapeFromScaledUnitBox transform of this box. It may change the value of Center. It does not change the value of Size.
Public methodSuspendChangedEvent
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.)
Public methodToString
Override of ToString method to get a string for describing this object.
(Overrides Object ToString .)
Top
Fields

  NameDescription
Public fieldStatic memberSfCenter
Public fieldStatic memberSfGetLineSegments
Public fieldStatic memberSfGetOriginVertexXVectorYVectorZ
Public fieldStatic memberSfGetShapeFromScaledUnitBox
Public fieldStatic memberSfGetSurfaces
Public fieldStatic memberSfGetVertices
Protected fieldStatic memberSfNextSf
Public fieldStatic memberSfSize
Top
Properties

  NameDescription
Public propertyCenter
Gets the center position of this box.
Public propertyChangedEventSuspended
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.)
Public propertyHasChanged (Inherited from CogSerializableChangedEventBase.)
Public propertyIsDegenerateCurve
Determines whether or not this curve shape is degenerate. This occurs when curve shapes have a perimeter of 0.
Public propertyIsDegenerateSurface
Determines whether or not this surface shape is degenerate. This occurs when surface shapes have an area of 0.
Public propertyIsDegenerateVolume
Determines whether or not this volume shape is degenerate. This occurs when volume shapes have a volume of 0.
Public propertyIsEmpty
Indicates if the set of points lying on the boundary of this shape is empty.
Public propertyIsFinite
Indicates if this shape has finite extents.
Public propertySelectedSpaceName3D
The 3D coordinate space in which this shape is to be interpreted.
Public propertyShapeFromScaledUnitBox
Deprecated. Please use GetShapeFromScaledUnitBox() and SetShapeFromScaledUnitBox()instead.
Public propertyShapeState
Gets/sets the ShapeState for this shape.
Public propertySize
Gets/sets the size of this box. The setter may change the value of Center. It does not change the value of ShapeFromScaledUnitBox.
Public propertyStateFlags
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.)
Top
Events

  NameDescription
Public eventChanged
This event is raised when one or more parts of the object's state may have changed.
(Inherited from CogSerializableChangedEventBase.)
Top
See Also