/*********************************************************************************************************************** * * Copyright (c) 2010 - 2025 by Tech Soft 3D, Inc. * The information contained herein is confidential and proprietary to Tech Soft 3D, Inc., and considered a trade secret * as defined under civil and criminal statutes. Tech Soft 3D shall pursue its civil and criminal remedies in the event * of unauthorized use or misappropriation of its trade secrets. Use of this information by anyone other than authorized * employees of Tech Soft 3D, Inc. is granted only under a written non-disclosure agreement, expressly prescribing the * scope and manner of such use. * ***********************************************************************************************************************/ /** \file wrapper/HXWMarkupTessellation.h Header file for the wrapper Tessellation module. ***********************************************************************************************************************/ #include "HXWBasicTessellation.h" /*! \defgroup wrapper_markuptessellation_module Markup tessellation Module \ingroup wrapper_tessellation_module Entity type is \ref HXWMarkupTessellation. */ /*! \class HXWMarkupTessellation HXWMarkupTessellation.h "HXWMarkupTessellation.h" * \brief This is a markup tessellation builder. * \ingroup wrapper_markuptessellation_module */ class HXWMarkupTessellation : public HXWBasicTessellation { private: A3DFontKeyData m_sFontKeyData; A3DTessMarkupData m_data; /*!< markup tessellation data */ A3DUns32 m_uiAllocatedTexts; /*!< size of allocated texts */ A3DUns32 m_uiAllocatedCodes; /*!< size of allocated codes */ A3DUns32 m_uiStartSizeWireFD; A3DUns32 m_uiStartCoordsFD; A3DUns32 m_uiStartSizeWireFV; A3DUns32 m_uiStartCoordsFV; A3DUns32 m_uiStartSizeWireFS; A3DUns32 m_uiStartCoordsFS; public: HXWMarkupTessellation(); virtual ~HXWMarkupTessellation(); private: void free_extra_codes(); /*!< to manage extra allocation */ void add_code(A3DUns32 uiCode); /*!< add code in tessellation */ void reset(); /*!< reset tessellation data */ public: /*! set markup label \param pcLabel label. */ inline void setlabel(A3DUTF8Char* pcLabel); /*! set RGB color \param dRed [0..1] red value. \param dGreen [0..1] green value. \param dBlue [0..1] blue value. */ int set_color(A3DDouble dRed, A3DDouble dGreen, A3DDouble dBlue); /*! set color \param uiIndexColor color index in global data */ int set_color(A3DUns32 uiIndexColor); /*! set font information \param pcFamilyName Font family name. \param uiSize Font size. Must be set to 10. \param cAttributes Font attributes. See \ref a3d_fontattribdef. \param m_eCharset Font character set. */ int set_textfont(const A3DUTF8Char* pcFamilyName, A3DUns32 uiSize = 10, A3DInt8 cAttributes = 0, A3DECharSet m_eCharset = kA3DCharsetRoman); /*! set font information using current preferences */ //int add_current_textfont(); /*! set matrix \param matrix array of 16 doubles */ void begin_matrix(A3DDouble* matrix); /*! set matrix using 3 vector \param position_3d is the orgin \param plane_normal is the plane normal. Must be a unit vector \param x_direction is the x_direction; Must be a unit vector */ void begin_matrix(const A3DVector3dData& position_3d, const A3DVector3dData& plane_normal, const A3DVector3dData& x_direction); void end_matrix(); /*! define a polyline in tessellation \param ppoints array of 3xN doubles to define points of polyline. \param uPtSize number of points (N). */ void add_polyline(A3DDouble* ppoints, A3DUns32 uPtSize); void add_polygon(A3DDouble* ppoints, A3DUns32 uPtSize); /*! define add triangle tessellation \param pptriangles array of 3x3xN doubles to define triangle points. */ void add_triangle(A3DDouble* pptriangles); /*! define add triangle tessellation \param pptriangles array of 3x3xN doubles to define triangle points. \param uTriangleSize number of triangles (N). */ void add_triangles(A3DDouble* pptriangles, A3DUns32 uTriangleSize); /*! define add polygon tessellation \param ppolygons array of 3xN doubles to define polygon points. \param uPolygonSize number of points (N). */ void add_polygons(A3DDouble* ppolygons, A3DUns32 uPolygonSize); /*! define add ellipse tesselation \param width on current X axe \param height on current Y axe*/ void add_ellipse(A3DDouble dWidth, A3DDouble dHeight); void add_ellipseFrame(A3DDouble dWidth, A3DDouble dHeight); /*! define add rect tesselation \param width on current X axe \param height on current Y axe*/ void add_rect(A3DDouble dWidth, A3DDouble dHeight); void add_rectFrame(A3DDouble dWidth, A3DDouble dHeight); /*! define text in tessellation. Use add matrix to position the text \param pcText text to add. \param dWidth text width. \param dHeight text height. */ void add_text(const A3DUTF8Char* pcText, A3DDouble dWidth, A3DDouble dHeight); //, A3DDouble dWidth = 100.0, A3DDouble dHeight = 10.0); /*! define text in tessellation. Use add matrix to position the text. The width and height are automatically calculated from the string specified. \param pcText text to add. \param dHeight text height. */ void add_text(const A3DUTF8Char* pcText); //void set_line_width(double dWidth); //void end_line_width(); /*! define Start the Face View Mode (parralele / Billboard mode). Once Activated, The global coordinate system origin change becoming the Face Mode Origin. \param pOrigin 3D point*/ void BeginFaceView(A3DDouble* pOrigin); void BeginFaceViewAlwaysOnTop(A3DDouble* pOrigin); void EndFaceView(); /*! define Start the non Zoomable Mode \param pOrigin 3D point*/ void BeginFrameDraw(A3DDouble* pOrigin); void EndFrameDraw(); void GetMarkupTess(A3DTessMarkup*& pTessMarkup); virtual A3DEntity* GetEntity(); };