C3D Toolkit
Kernel - 117982, Vision - 2.9.2.2
|
Geometric object in two-dimensional space. More...
#include <plane_item.h>
Public Member Functions | |
virtual | ~MbPlaneItem () |
Destructor. | |
void | PrepareWrite () const |
Object registration. More... | |
Common functions of a geometric object | |
MbeRefType | RefType () const override |
Get the registration type (for copying, duplication). | |
virtual MbePlaneType | IsA () const =0 |
Get the object type. | |
virtual MbePlaneType | Type () const =0 |
Get the group type of the object. | |
virtual MbePlaneType | Family () const =0 |
Get family of object. | |
virtual MbPlaneItem & | Duplicate (MbRegDuplicate *iReg=nullptr) const =0 |
Create a copy. More... | |
virtual void | Transform (const MbMatrix &matr, MbRegTransform *iReg=nullptr, const MbSurface *newSurface=nullptr)=0 |
Transform according to the matrix. More... | |
virtual void | Move (const MbVector &to, MbRegTransform *iReg=nullptr, const MbSurface *newSurface=nullptr)=0 |
Translate along a vector. More... | |
virtual void | Rotate (const MbCartPoint &pnt, const MbDirection &angle, MbRegTransform *iReg=nullptr, const MbSurface *newSurface=nullptr)=0 |
Rotate about a point. More... | |
virtual void | Rotate (const MbCartPoint &pnt, double angle, MbRegTransform *iReg=nullptr, const MbSurface *newSurface=nullptr) |
Rotate about a point. More... | |
virtual bool | IsSame (const MbPlaneItem &item, double accuracy=LENGTH_EPSILON) const =0 |
Determine whether objects are equal. More... | |
virtual bool | IsSimilar (const MbPlaneItem &item) const |
Determine whether the objects are similar. More... | |
virtual bool | SetEqual (const MbPlaneItem &item)=0 |
Make the objects equal. More... | |
virtual void | AddYourGabaritTo (MbRect &r) const =0 |
Extend the given bounding rectangle so that it encloses this object. | |
virtual bool | IsVisibleInRect (const MbRect &rect, bool exact=false) const =0 |
Determine visibility of an object in rectangle. More... | |
virtual double | DistanceToPoint (const MbCartPoint &to) const =0 |
Calculate the distance to a point. | |
virtual bool | DistanceToPointIfLess (const MbCartPoint &to, double &d) const =0 |
Calculate the distance to a point. More... | |
virtual void | Refresh () |
Set all temporary (mutable) data of object to undefined (initial) state. | |
virtual MbProperty & | CreateProperty (MbePrompt name) const =0 |
Create your own property with specified name. | |
virtual void | GetProperties (MbProperties &properties)=0 |
Get properties of the object. More... | |
virtual void | SetProperties (const MbProperties &properties)=0 |
Change properties of the object. More... | |
virtual void | GetBasisPoints (MbControlData &) const =0 |
Get control points of object. | |
virtual void | SetBasisPoints (const MbControlData &)=0 |
Change the object by control points. | |
Public Member Functions inherited from TapeBase | |
TapeBase (RegistrableRec regs=noRegistrable) | |
Constructor. | |
TapeBase (const TapeBase &) | |
Copy-constructor. | |
virtual | ~TapeBase () |
Destructor. | |
RegistrableRec | GetRegistrable () const |
Whether the stream class is registrable. | |
void | SetRegistrable (RegistrableRec regs=registrable) const |
Set the state of registration of the stream class. | |
virtual const char * | GetPureName (const VersionContainer &) const |
Get the class name. | |
virtual bool | IsFamilyRegistrable () const |
Whether the object belongs to a registrable family. | |
Public Member Functions inherited from MbRefItem | |
refcount_t | GetUseCount () const |
Get count of references (get count of owners of an object). | |
refcount_t | AddRef () const |
Increase count of references by one. | |
refcount_t | DecRef () const |
Decrease count of references by one. | |
refcount_t | Release () const |
Decrease count of references by one and if count of references became zero, then remove itself. | |
Protected Member Functions | |
MbPlaneItem () | |
Constructor. | |
Protected Member Functions inherited from MbRefItem | |
MbRefItem () | |
Constructor without parameters. | |
Geometric object in two-dimensional space.
Parent class of geometric objects in two-dimensional space. Has reference counter. Inheritors are: MbCurve curve, MbMultiline multiline, MbRegion region.
|
pure virtual |
Create a copy.
Create a copy of the object using the registrator. The registrator is used for preventing multiple copying of an object. If the object contains references to other objects, then the included objects are copied too. It is allowed not to pass the registrator to a function. Then the new copy of the object will be created. It is allowed not to use the registrator while copying a single object or a set of disconnected objects. The registrator must be used to copy several correlated objects successively. It is possible that the objects' connection means that the objects contain references to the common objects. Then, while copying without using the registrator, one can get a set of copies which contain references to the different copies of a single included object, what leads to loss of connection between the copies.
[in] | iReg | - Registrator. |
Implemented in MbRegion, MbMultiline, MbTrimmedCurve, MbReparamCurve, MbProjCurve, MbPolyline, MbPointCurve, MbOffsetCurve, MbNurbs, MbLineSegment, MbLine, MbHermit, MbCubicSpline, MbCosinusoid, MbContourWithBreaks, MbContour, MbCharacterCurve, MbBezier, and MbArc.
|
pure virtual |
Transform according to the matrix.
Transform the initial object according to the matrix using the registrator. If the object contains references to the other geometric objects, then the nested objects are transformed according to the matrix. The registrator is used for preventing multiple transformation of the object. The function can be used without the registrator to transform a single object. The registrator must be used to transform a set of interdependent objects to prevent repeated transformation of the nested objects, since it is not ruled out that several objects from the set contain references to one or several common objects subject to transformation.
[in] | matr | - A transformation matrix. |
[in] | iReg | - Registrator. |
[in] | surface | - New base surface of object provided that 'matr' is a transformation matrix from the old surface to a new one. For transformation of projection curve. It isn't considered if the surface is planar. |
Implemented in MbOffsetCurve, MbNurbs, MbHermit, MbCosinusoid, MbContourWithBreaks, MbBezier, MbArc, MbMultiline, MbTrimmedCurve, MbProjCurve, MbPointCurve, MbLineSegment, MbLine, MbCubicSpline, MbContour, MbRegion, MbReparamCurve, MbPolyline, and MbCharacterCurve.
|
pure virtual |
Translate along a vector.
Translate a geometric object along the vector using the registrator. If the object contains references to the other objects, then the translation operation is applied to the nested objects. The registrator is used for preventing multiple transformation of the object. The function can be used without the registrator to transform a single object. The registrator must be used to transform a set of interdependent objects to prevent repeated transformation of the nested objects, since it is not ruled out that several objects from the set contain references to one or several common objects subject to translation.
[in] | to | - Translation vector. |
[in] | iReg | - Registrator. |
[in] | surface | - New base surface of object provided that 'matr' is a transformation matrix from the old surface to a new one. For transformation of projection curve. It isn't considered if the surface is planar. |
Implemented in MbMultiline, MbOffsetCurve, MbNurbs, MbHermit, MbCosinusoid, MbContourWithBreaks, MbBezier, MbRegion, MbTrimmedCurve, MbReparamCurve, MbProjCurve, MbPolyline, MbPointCurve, MbLineSegment, MbLine, MbCubicSpline, MbContour, MbCharacterCurve, and MbArc.
|
pure virtual |
Rotate about a point.
Rotate an object about a point by the given angle using the registrator. If the object contains references to the other geometric objects, then the rotation operation is applied to the nested objects too. The registrator is used for preventing multiple transformation of the object. The function can be used without the registrator to transform a single object. The registrator must be used to transform a set of interdependent objects to prevent repeated transformation of the nested objects, since it is not ruled out that several objects from the set contain references to one or several common objects subject to rotation.
[in] | pnt | - Fixed point. |
[in] | angle | - The rotation angle. |
[in] | iReg | - Registrator. |
[in] | surface | - New base surface of object provided that 'matr' is a transformation matrix from the old surface to a new one. For transformation of projection curve. It isn't considered if the surface is planar. |
Implemented in MbMultiline, MbTrimmedCurve, MbProjCurve, MbPointCurve, MbOffsetCurve, MbNurbs, MbLineSegment, MbLine, MbHermit, MbCosinusoid, MbContourWithBreaks, MbCharacterCurve, MbBezier, MbArc, MbRegion, MbReparamCurve, MbPolyline, MbContour, and MbCubicSpline.
|
virtual |
Rotate about a point.
Rotate an object about a point by the given angle using the registrator.
[in] | pnt | - Fixed point. |
[in] | angle | - The rotation angle. |
[in] | iReg | - Registrator. |
[in] | surface | - New base surface of object provided that 'matr' is a transformation matrix from the old surface to a new one. For transformation of projection curve. It isn't considered if the surface is planar. |
|
pure virtual |
Determine whether objects are equal.
Objects of the same types with similar (equal) data are considered to be equal.
[in] | item | - Object for comparison. |
[in] | accuracy | - The accuracy. |
Implemented in MbMultiline, MbTrimmedCurve, MbProjCurve, MbPointCurve, MbOffsetCurve, MbNurbs, MbLineSegment, MbLine, MbHermit, MbCosinusoid, MbCharacterCurve, MbBezier, MbArc, MbRegion, MbReparamCurve, MbPolyline, MbCubicSpline, and MbContour.
|
virtual |
Determine whether the objects are similar.
Objects of the same type are considered to be similar if data of the objects can be equated or the data are also similar (pointers). Similar object can be initialized by data of object similar to it (equate one to another without changing of addresses).
[in] | item | - Object for comparison. |
Reimplemented in MbMultiline, MbTrimmedCurve, MbReparamCurve, MbProjCurve, MbOffsetCurve, MbLine, and MbContour.
|
pure virtual |
Make the objects equal.
It is possible to make equal only similar objects. Similar object is equated to a given one by changing of numerical data.
[in] | item | - Object for initialization. |
Implemented in MbMultiline, MbRegion, MbTrimmedCurve, MbReparamCurve, MbProjCurve, MbPolyline, MbPointCurve, MbOffsetCurve, MbNurbs, MbLineSegment, MbLine, MbHermit, MbCubicSpline, MbCosinusoid, MbContour, MbCharacterCurve, MbBezier, and MbArc.
|
pure virtual |
Determine visibility of an object in rectangle.
It is considered that the object is visible in rectangle if bounds of an object is crossed with the given rectangle or (high requirements to accuracy, exact = true) at least one point of object is in the rectangle.
[in] | rect | - Rectangle to check getting to. |
[in] | exact | - Check accuracy. If exact = true, then at least one point of object gets to the rectangle. if exact = false, it is sufficient to find intersection between rectangle and bounding box of an object. |
Implemented in MbCurve, MbMultiline, MbPointCurve, MbLineSegment, MbCosinusoid, MbArc, MbRegion, MbReparamCurve, and MbLine.
|
pure virtual |
Calculate the distance to a point.
Calculate distance to object from a given point near the object. Distance is calculated and stored to 'd' variable if it is less then initial value of 'd'. There can be performance benefit in comparison with DistanceToPoint function due to primarily checking the distance from point to bounding box and performing the further calculations only if this distance is not greater than the given one.
[in] | to | - Point. |
[in,out] | d | - Specified distance from object on input. Distance from point to object on output if operation succeeded. |
Implemented in MbCurve, MbReparamCurve, MbPolyline, MbLine, MbContour, MbArc, MbMultiline, MbNurbs, MbBezier, and MbRegion.
|
pure virtual |
Get properties of the object.
Get internal data (properties) of an object for viewing and modification.
[in] | properties | - Container for internal data of an object. |
Implemented in MbMultiline, MbTrimmedCurve, MbPointCurve, MbOffsetCurve, MbLineSegment, MbHermit, MbCubicSpline, MbCosinusoid, MbBezier, MbArc, MbRegion, MbReparamCurve, MbProjCurve, MbPolyline, MbNurbs, MbLine, MbContour, and MbCharacterCurve.
|
pure virtual |
Change properties of the object.
Change internal data (properties) of object is performed by copying of corresponding values from the given object.
[in] | properties | - Container for internal data of an object. |
Implemented in MbMultiline, MbTrimmedCurve, MbPointCurve, MbOffsetCurve, MbLineSegment, MbHermit, MbCubicSpline, MbCosinusoid, MbBezier, MbArc, MbRegion, MbReparamCurve, MbProjCurve, MbPolyline, MbNurbs, MbLine, MbContour, and MbCharacterCurve.
|
inline |
Object registration.
Object registration for preventing its multiple writing. Other objects may contain a pointer to the given object. The function sets a flag that allow to write the object once and to use the references to the recorded instance in the other records. Reading is performed once too, in other cases of reading the address of the already read object is used.