/*********************************************************************************************************************** * * 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/HXWBasicTessellation.h Header file for the wrapper Tessellation module. ***********************************************************************************************************************/ #include "HXWEntity.h" #include /*! \defgroup wrapper_tessellation_module Tessellation Module \ingroup wrapper_module Entity type is \ref HXWBasicTessellation. */ /*! \class HXWBasicTessellation HXWBasicTessellation.h "HXWBasicTessellation.h" * \brief This is a tessellation builder. * \ingroup wrapper_tessellation_module */ class HXWBasicTessellation: public HXWEntity { protected: static const int ALLOCATION_STEP = 5; /*! step in allocation or reallocation array of coords, codes, etc. */ protected: A3DTessBaseData m_coordsdata; /*!< tessellation that is built */ A3DUns32 m_uiCoordsAllocated; protected: A3DPtr my_alloc(A3DUns32 uiSize) { return malloc((size_t) uiSize); } /*!< allocation for A3DTessBaseData */ A3DVoid my_free(A3DPtr ptr) { free(ptr); ptr = NULL; } /*!< free for A3DTessBaseData */ public: HXWBasicTessellation(); ~HXWBasicTessellation(); protected: void add_coord(A3DDouble dCoord); /*!< add one double in tessellation */ void add_coords(A3DDouble* pdCoords, A3DUns32 uiCoordsSize); /*!< add an array of doubles in tessellation */ virtual void reset(); /*!< reset of doubles in tessellation */ void free_extra_coords(); /*!< to manage extra allocations */ public: /*!< set the tessellation in exchange owner structure */ inline int SetCoords(A3DTessBase* pTessMarkup) { return A3DTessBaseSet(pTessMarkup,&m_coordsdata); } };