File indexing completed on 2024-11-15 09:45:47
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #ifndef _AIS_XRTrackedDevice_HeaderFile
0015 #define _AIS_XRTrackedDevice_HeaderFile
0016
0017 #include <AIS_InteractiveObject.hxx>
0018 #include <Aspect_XRTrackedDeviceRole.hxx>
0019
0020 class Graphic3d_ArrayOfTriangles;
0021 class Image_Texture;
0022
0023
0024 class AIS_XRTrackedDevice : public AIS_InteractiveObject
0025 {
0026 DEFINE_STANDARD_RTTIEXT(AIS_XRTrackedDevice, AIS_InteractiveObject)
0027 public:
0028
0029 Standard_EXPORT AIS_XRTrackedDevice (const Handle(Graphic3d_ArrayOfTriangles)& theTris,
0030 const Handle(Image_Texture)& theTexture);
0031
0032
0033 Standard_EXPORT AIS_XRTrackedDevice();
0034
0035
0036 Aspect_XRTrackedDeviceRole Role() const { return myRole; }
0037
0038
0039 void SetRole (Aspect_XRTrackedDeviceRole theRole) { myRole = theRole; }
0040
0041
0042 const Quantity_Color& LaserColor() const { return myLaserColor; }
0043
0044
0045 Standard_EXPORT void SetLaserColor (const Quantity_Color& theColor);
0046
0047
0048 Standard_ShortReal LaserLength() const { return myLaserLength; }
0049
0050
0051 Standard_EXPORT void SetLaserLength (Standard_ShortReal theLength);
0052
0053
0054 Standard_ShortReal UnitFactor() const { return myUnitFactor; }
0055
0056
0057 void SetUnitFactor (Standard_ShortReal theFactor) { myUnitFactor = theFactor; }
0058
0059 protected:
0060
0061
0062 virtual Standard_Boolean AcceptDisplayMode (const Standard_Integer theMode) const Standard_OVERRIDE { return theMode == 0; }
0063
0064
0065 Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
0066 const Handle(Prs3d_Presentation)& thePrs,
0067 const Standard_Integer theMode) Standard_OVERRIDE;
0068
0069
0070 Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& theSel,
0071 const Standard_Integer theMode) Standard_OVERRIDE;
0072
0073
0074 Standard_EXPORT void computeLaserRay();
0075
0076 private:
0077
0078 class XRTexture;
0079
0080 private:
0081
0082 Handle(Graphic3d_Group) myRayGroup;
0083
0084 Handle(Graphic3d_ArrayOfTriangles) myTris;
0085 Quantity_Color myLaserColor;
0086 Standard_ShortReal myLaserLength;
0087 Standard_ShortReal myUnitFactor;
0088 Aspect_XRTrackedDeviceRole myRole;
0089 Standard_Boolean myToShowAxes;
0090 };
0091
0092 #endif