/*********************************************************************************************************************** * * 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 callback_opengl.h This file demonstrates how to programmatically visualize a PRC file from a basic OpenGL program using HOOPS Exchange. ***********************************************************************************************************************/ #ifndef _CALLBACK_OPENGL_H_ #define _CALLBACK_OPENGL_H_ #include #ifdef __APPLE__ #include #else #include #endif #include "TreeTraverse.h" //###################################################################################################################### bool GetstbUseCallbacks(); void SetstbUseCallbacks(bool UseCallBack); bool GetstbCallbacksInitialized(); A3DBoundingBoxData* GetstpsBoundingBox(); void SetstpsBoundingBox(A3DBoundingBoxData* sBoudingBoxData); bool GetstbDrawMarkups(); void SetstbDrawMarkups(bool bDrawMarkups); //###################################################################################################################### #define A3D_MIN(a,b) (((a)<(b)) ? (a) : (b)) #define A3D_MAX(a,b) (((a)>(b)) ? (a) : (b)) //###################################################################################################################### void stVectoriel(const A3DVector3dData* X, const A3DVector3dData* Y, A3DVector3dData* Z); //###################################################################################################################### void stMatrixMatrixMult(double m[16], const double o[16]); //###################################################################################################################### void stLoadIdentity(); //###################################################################################################################### void stMultMatrix(const double m[16]); //###################################################################################################################### void stPushMatrix(); //###################################################################################################################### void stPopMatrix(); //###################################################################################################################### void stExtentInit(A3DBoundingBoxData* e); //###################################################################################################################### void stBoundingBoxAddPoint(A3DBoundingBoxData* e, double x, double y, double z); //###################################################################################################################### void OpenGL_PushMatrix(); //###################################################################################################################### void OpenGL_PopMatrix(); //###################################################################################################################### void OpenGL_MultMatrix(const A3DDouble adMatrix[16]); //###################################################################################################################### void OpenGL_Begin(A3DEDrawBeginEndType eType, const A3DUTF8Char* pcName, A3DUns32 uiTrianglesCount); //###################################################################################################################### void OpenGL_End(A3DEDrawBeginEndType eType); //###################################################################################################################### void OpenGL_Triangle(const double* pasNormals, A3DUns32 uiNormalSize, const double* pasPoints, A3DUns32 uiPointSize, std::vector auIndiceTrianglePerFace, unsigned uTextureCount); //###################################################################################################################### void OpenGL_Material(A3DEDrawMaterialType eType, const A3DDouble* pdValues, A3DUns32 uiSize); //###################################################################################################################### void OpenGL_MarkupTriangle(A3DDouble* pdPoints, A3DUns32 uiPointSize); //###################################################################################################################### void OpenGL_Point(const A3DDouble* pdPoints, A3DUns32 uiPointSize); //###################################################################################################################### void OpenGL_Font(const A3DFontKeyData* psFontKeyData); //###################################################################################################################### void OpenGL_Symbol(const A3DGraphVPicturePatternData* psPatternData, const A3DVector3dData* psPosition); //###################################################################################################################### void OpenGL_PolyLine(A3DDouble* pdPoints, A3DUns32 uiPointSize); //###################################################################################################################### void OpenGL_Color(const A3DDouble [3]); //###################################################################################################################### int& DisplayTriangles(); //###################################################################################################################### int& DisplayTriangleNormals(); //###################################################################################################################### double& DisplayTriangleNormalLength(); #endif