C++
struct AcGiClipBoundary { AcGeVector3d m_vNormal; AcGePoint3d m_ptPoint; AcGePoint2dArray m_aptPoints; AcGeMatrix3d m_xToClipSpace; AcGeMatrix3d m_xInverseBlockRefXForm; Adesk::Boolean m_bClippingFront = false; Adesk::Boolean m_bClippingBack = false; double m_dFrontClipZ = 0.0; double m_dBackClipZ = 0.0; Adesk::Boolean m_bDrawBoundary = false; };
File
acgi.h
Members
Members | Description |
---|---|
m_vNormal | This is Z-Axis of the clip space expressed in the compound object's coordinate system. Often this will be AcGeVector3d::kZAxis. |
m_ptPoint | This is the origin of the clip space expressed in the compound object's coordinate system. Often this will be AcGePoint3d::kOrigin. |
m_aptPoints | This is an array of 2D points expressed in the clip coordinate system. If the array contains less than two points, the boundary is invalid and the results are undefined. If the array contains only two points, then boundary is inferred to be rectangular, where the two points define the opposing corners of the rectangle. If the array contains more than two points, it is taken to define a polygon. The polygon must not be self-intersecting; the AcGi implementation may assume that this is the case. It is the caller's responsibility to ensure that the array does not describe a self-intersecting polygon. |
m_xToClipSpace | This is the transformation from the compound object's coordinate system to the desired clip space. Often this will be an identity transform. |
m_xInverseBlockRefXForm | This is the inverse of the transform that the compound object uses to transform its contents. For a block reference, this is based on the block insertion transform and the translation stored in the block table record. |
m_bClippingFront | If true, then a front clipping plane is active and m_dFrontClipZ should contain a valid Z depth. |
m_bClippingBack | If true, then a front clipping plane is active and m_dBackClipZ should contain a valid Z depth. |
m_dFrontClipZ | Specifies the Z depth for the front clipping plane, if active. |
m_dBackClipZ | Specifies the Z depth for the back clipping plane, if active. |
m_bDrawBoundary | If true, then the clipping boundary will be drawn to the display. |
Description
The struct AcGiClipBoundary is used to pass a clip boundary specification from a drawable to the underlying AcGi system.
struct AcGiClipBoundary { // Boundaries AcGeVector3d m_vNormal; AcGePoint3d m_ptPoint; AcGePoint2dArray m_aptPoints; // Transforms AcGeMatrix3d m_xToClipSpace; AcGeMatrix3d m_xInverseBlockRefXForm; // Z clipping Adesk::Boolean m_bClippingFront; Adesk::Boolean m_bClippingBack; double m_dFrontClipZ; double m_dBackClipZ; Adesk::Boolean m_bDrawBoundary; };
Since boundary clipping closely matches view clipping, it's easiest to consider the parameters in this sense. Imagine that the clip boundary defines a view on the model. To define a view a view direction and a target point are required. These are specified in the main coordinate system, the transformation to the coordinate system should match these values and include any required rotation or twist.