Module At3dPrototypes

	'-----------
  ' Prototypes
  ' ----------
  Public Declare Function At3d_Start Lib "at3dx.dll" () As Int32
  Public Declare Function At3d_Stop Lib "at3dx.dll" () As Int32

  Public Declare Sub At3d_ShowSecurity Lib "at3dx.dll" ()
  Public Declare Sub At3d_Show Lib "at3dx.dll" ()
  Public Declare Sub At3d_Hide Lib "at3dx.dll" ()
  Public Declare Sub At3d_FormStyle Lib "at3dx.dll" (ByVal onTopFlag As Int32)
  Public Declare Sub At3d_Size Lib "at3dx.dll" (ByVal width As Int32, ByVal height As Int32)
  Public Declare Sub At3d_Position Lib "at3dx.dll" (ByVal left As Int32, ByVal top As Int32)
  Public Declare Sub At3d_UseWireframe Lib "at3dx.dll" (ByVal type As Int32)
  Public Declare Sub At3d_PlaneIndicator Lib "at3dx.dll" (ByVal showFlag As Int32)
  Public Declare Sub At3d_ViewType Lib "at3dx.dll" (ByVal parallelFlag As Int32)
  Public Declare Function At3d_SetParent Lib "at3dx.dll" (ByVal hwnd As System.IntPtr) As Int32
  Public Declare Sub At3d_SetCaption Lib "at3dx.dll" (ByRef name As Byte)

  Public Declare Function At3d_GetCameraViewPoint Lib "at3dx.dll" (ByRef xPtr As Double, ByRef yPtr As Double, ByRef zPtr As Double) As Int32
  Public Declare Function At3d_SetCameraViewPoint Lib "at3dx.dll" (ByVal x As Double, ByVal y As Double, ByVal z As Double) As Int32

  Public Declare Function At3d_GetCameraRotateSpeed Lib "at3dx.dll" (ByRef speedPtr As Int32) As Int32
  Public Declare Function At3d_SetCameraRotateSpeed Lib "at3dx.dll" (ByVal speed As Int32) As Int32
  Public Declare Sub At3d_GetCameraAngles Lib "at3dx.dll" (ByRef xAngle As Double, ByRef yAngle As Double, ByRef zAngle As Double)
  Public Declare Sub At3d_RotateCamera Lib "at3dx.dll" (ByVal relativeFlag As Int32, ByVal xAngle As Double, ByVal yAngle As Double, ByVal zAngle As Double)

  Public Declare Function At3d_GetCameraInitialDistance Lib "at3dx.dll" (ByRef distancePtr As Double) As Int32
  Public Declare Function At3d_SetCameraInitialDistance Lib "at3dx.dll" (ByVal distance As Double) As Int32
  Public Declare Function At3d_GetCameraDistance Lib "at3dx.dll" (ByRef distancePtr As Double) As Int32
  Public Declare Function At3d_SetCameraDistance Lib "at3dx.dll" (ByVal distance As Double) As Int32
  Public Declare Function At3d_GetCameraZoomSpeed Lib "at3dx.dll" (ByRef speedPtr As Int32) As Int32
  Public Declare Function At3d_SetCameraZoomSpeed Lib "at3dx.dll" (ByVal speed As Int32) As Int32
  Public Declare Sub At3d_ZoomIn Lib "at3dx.dll" ()
  Public Declare Sub At3d_ZoomOut Lib "at3dx.dll" ()
  Public Declare Sub At3d_ZoomReset Lib "at3dx.dll" ()

  Public Declare Function At3d_GetCameraFieldOfView Lib "at3dx.dll" (ByRef fieldOfViewvPtr As Double) As Int32
  Public Declare Function At3d_SetCameraFieldOfView Lib "at3dx.dll" (ByVal relativeFlag As Int32, ByVal fieldOfView As Double) As Int32

  Public Declare Sub At3d_GetCameraPan Lib "at3dx.dll" (ByRef xPan As Int32, ByRef zPan As Int32)
  Public Declare Sub At3d_PanCamera Lib "at3dx.dll" (ByVal relativeFlag As Int32, ByVal xPan As Int32, ByVal zPan As Int32)
  Public Declare Sub At3d_CenterX Lib "at3dx.dll" ()
  Public Declare Sub At3d_CenterZ Lib "at3dx.dll" ()

  Public Declare Sub At3d_PaintSolid Lib "at3dx.dll" ()
  Public Declare Sub At3d_PaintShaded Lib "at3dx.dll" ()

  Public Declare Sub At3d_ViewFront Lib "at3dx.dll" ()
  Public Declare Sub At3d_ViewBack Lib "at3dx.dll" ()
  Public Declare Sub At3d_ViewRight Lib "at3dx.dll" ()
  Public Declare Sub At3d_ViewLeft Lib "at3dx.dll" ()
  Public Declare Sub At3d_ViewTop Lib "at3dx.dll" ()
  Public Declare Sub At3d_ViewBottom Lib "at3dx.dll" ()

  Public Declare Sub At3d_DrawWireframe Lib "at3dx.dll" ()

  Public Declare Function At3d_Read Lib "at3dx.dll" (ByVal type As Int32, ByRef name As Byte, ByVal scaleFactor As Double) As Int32
  Public Declare Function At3d_BufferRead Lib "at3dx.dll" (ByVal type As Int32, ByVal scaleFactor As Double, ByRef bufferPtr As Byte, ByVal bufferSize As Int32) As Int32

  Public Declare Sub At3d_Write Lib "at3dx.dll" (ByVal type As Int32, ByRef name As Byte, ByVal scaleFactor As Double)
  Public Declare Function At3d_PreBufferWrite Lib "at3dx.dll" (ByVal type As Int32) As Int32
  Public Declare Sub At3d_BufferWrite Lib "at3dx.dll" (ByVal type As Int32, ByVal scaleFactor As Double, ByRef bufferPtr As Byte, ByVal bufferSize As Int32)
  Public Declare Sub At3d_BufferName Lib "at3dx.dll" (ByRef name As Byte)

  Public Declare Function At3d_GetMtlSize Lib "at3dx.dll" () As Int32
  Public Declare Sub At3d_SetMtlBuffer Lib "at3dx.dll" (ByRef bufferPtr As Byte, ByVal bufferSize As Int32)

  Public Declare Sub At3d_WriteDXF_3DAs2D Lib "at3dx.dll" (ByRef name As Byte, ByVal scaleFactor As Double)

  Public Declare Sub At3d_Clear Lib "at3dx.dll" ()

  Public Declare Function At3d_ReadFlag Lib "at3dx.dll" (ByVal flagType As Int32) As Int32
  Public Declare Sub At3d_WriteFlag Lib "at3dx.dll" (ByVal flagType As Int32, ByVal flagValue As Int32)

  Public Declare Function At3d_CheckName Lib "at3dx.dll" (ByRef name As Byte) As Int32
  Public Declare Function At3d_ChangeLayerName Lib "at3dx.dll" (ByRef oldName As Byte, ByRef newName As Byte) As Int32

  Public Declare Function At3d_LayerCount Lib "at3dx.dll" () As Int32
  Public Declare Function At3d_GetNextLayer Lib "at3dx.dll" (ByVal layer As Int32, ByRef layerName As Byte) As Int32
  Public Declare Function At3d_CreateLayer Lib "at3dx.dll" (ByRef layerName As Byte) As Int32
  Public Declare Function At3d_DeleteLayer Lib "at3dx.dll" (ByRef layerName As Byte) As Int32
  Public Declare Function At3d_SetLayerTransform Lib "at3dx.dll" (ByRef layerName As Byte, ByRef arrayPtr As Single) As Int32
  Public Declare Function At3d_GetLayerOutputFlag Lib "at3dx.dll" (ByRef layerName As Byte) As Int32
  Public Declare Sub At3d_SetLayerOutputFlag Lib "at3dx.dll" (ByRef layerName As Byte, ByVal flag As Int32)

  Public Declare Function At3d_VertexCount Lib "at3dx.dll" (ByRef layerName As Byte) As Int32
  Public Declare Function At3d_GetVertex Lib "at3dx.dll" (ByVal position As Int32, ByRef layerName As Byte, ByRef arrayPtr As Double) As Int32
  Public Declare Function At3d_GetAllVertices Lib "at3dx.dll" (ByRef layerName As Byte, ByVal count As Int32, ByRef arrayPtr As Double) As Int32

  Public Declare Function At3d_GetFloatVertex Lib "at3dx.dll" (ByVal position As Int32, ByRef layerName As Byte, ByRef arrayFloatPtr As Single) As Int32
  Public Declare Function At3d_GetAllFloatVertices Lib "at3dx.dll" (ByRef layerName As Byte, ByVal count As Int32, ByRef arrayFloatPtr As Single) As Int32

  Public Declare Function At3d_AllocVertexs Lib "at3dx.dll" (ByRef layerName As Byte, ByVal count As Int32) As Int32
  Public Declare Function At3d_SetVertex Lib "at3dx.dll" (ByVal position As Int32, ByRef layerName As Byte, ByRef arrayPtr As Double) As Int32
  Public Declare Function At3d_SetAllVertices Lib "at3dx.dll" (ByRef layerName As Byte, ByVal count As Int32, ByRef arrayPtr As Double) As Int32

  Public Declare Function At3d_SetFloatVertex Lib "at3dx.dll" (ByVal position As Int32, ByRef layerName As Byte, ByRef arrayFloatPtr As Single) As Int32
  Public Declare Function At3d_SetAllFloatVertices Lib "at3dx.dll" (ByRef layerName As Byte, ByVal count As Int32, ByRef arrayFloatPtr As Single) As Int32

  Public Declare Function At3d_FaceCount Lib "at3dx.dll" (ByRef layerName As Byte) As Int32
  Public Declare Function At3d_GetFace Lib "at3dx.dll" (ByVal position As Int32, ByRef layerName As Byte, ByRef arrayPtr As Int32) As Int32
  Public Declare Function At3d_GetAllFaces Lib "at3dx.dll" (ByRef layerName As Byte, ByVal count As Int32, ByRef arrayPtr As Int32) As Int32
  Public Declare Function At3d_AllocFaces Lib "at3dx.dll" (ByRef layerName As Byte, ByVal count As Int32) As Int32
  Public Declare Function At3d_SetFace Lib "at3dx.dll" (ByVal position As Int32, ByRef layerName As Byte, ByRef arrayPtr As Int32) As Int32
  Public Declare Function At3d_SetAllFaces Lib "at3dx.dll" (ByRef layerName As Byte, ByVal count As Int32, ByRef arrayPtr As Int32) As Int32

  Public Declare Function At3d_UVPresent Lib "at3dx.dll" (ByRef layerName As Byte) As Int32
  Public Declare Function At3d_GetUV_Face Lib "at3dx.dll" (ByVal position As Int32, ByRef layerName As Byte, ByRef arrayPtr As Single) As Int32
  Public Declare Function At3d_GetUV_AllFaces Lib "at3dx.dll" (ByRef layerName As Byte, ByVal count As Int32, ByRef arrayPtr As Single) As Int32
  Public Declare Function At3d_SetUV_Face Lib "at3dx.dll" (ByVal position As Int32, ByRef layerName As Byte, ByRef arrayPtr As Single) As Int32
  Public Declare Function At3d_SetUV_AllFaces Lib "at3dx.dll" (ByRef layerName As Byte, ByVal count As Int32, ByRef arrayPtr As Single) As Int32

  Public Declare Function At3d_VertNormPresent Lib "at3dx.dll" (ByRef layerName As Byte) As Int32
  Public Declare Sub At3d_VertNormCalculate Lib "at3dx.dll" (ByRef layerName As Byte)
  Public Declare Sub At3d_VertNormAllCalculate Lib "at3dx.dll" ()
  Public Declare Sub At3d_VertNormErase Lib "at3dx.dll" (ByRef layerName As Byte)
  Public Declare Sub At3d_VertNormAllErase Lib "at3dx.dll" ()
  Public Declare Function At3d_GetVertNorm_Face Lib "at3dx.dll" (ByVal position As Int32, ByRef layerName As Byte, ByRef arrayPtr As Single, ByVal flipFlag As Int32) As Int32
  Public Declare Function At3d_GetVertNorm_AllFaces Lib "at3dx.dll" (ByRef layerName As Byte, ByVal count As Int32, ByRef arrayPtr As Single, ByVal flipFlag As Int32) As Int32
  Public Declare Function At3d_SetVertNorm_Face Lib "at3dx.dll" (ByVal position As Int32, ByRef layerName As Byte, ByRef arrayPtr As Single, ByVal flipFlag As Int32) As Int32
  Public Declare Function At3d_SetVertNorm_AllFaces Lib "at3dx.dll" (ByRef layerName As Byte, ByVal count As Int32, ByRef arrayPtr As Single, ByVal flipFlag As Int32) As Int32

  Public Declare Function At3d_GetSurfNorm_Face Lib "at3dx.dll" (ByVal position As Int32, ByRef layerName As Byte, ByRef arrayPtr As Single, ByVal flipFlag As Int32) As Int32
  Public Declare Function At3d_GetSurfNorm_AllFaces Lib "at3dx.dll" (ByRef layerName As Byte, ByVal count As Int32, ByRef arrayPtr As Single, ByVal flipFlag As Int32) As Int32

  Public Declare Function At3d_2DVertexCount Lib "at3dx.dll" (ByRef layerName As Byte) As Int32
  Public Declare Function At3d_2DGetVertex Lib "at3dx.dll" (ByVal position As Int32, ByRef layerName As Byte, ByRef arrayPtr As Double) As Int32
  Public Declare Function At3d_2DGetAllVertices Lib "at3dx.dll" (ByRef layerName As Byte, ByVal count As Int32, ByRef arrayPtr As Double) As Int32

  Public Declare Function At3d_2DGetFloatVertex Lib "at3dx.dll" (ByVal position As Int32, ByRef layerName As Byte, ByRef arrayFloatPtr As Single) As Int32
  Public Declare Function At3d_2DGetAllFloatVertices Lib "at3dx.dll" (ByRef layerName As Byte, ByVal count As Int32, ByRef arrayFloatPtr As Single) As Int32

  Public Declare Function At3d_2DAllocVertexs Lib "at3dx.dll" (ByRef layerName As Byte, ByVal count As Int32) As Int32
  Public Declare Function At3d_2DSetVertex Lib "at3dx.dll" (ByVal position As Int32, ByRef layerName As Byte, ByRef arrayPtr As Double) As Int32
  Public Declare Function At3d_2DSetAllVertices Lib "at3dx.dll" (ByRef layerName As Byte, ByVal count As Int32, ByRef arrayPtr As Double) As Int32

  Public Declare Function At3d_2DSetFloatVertex Lib "at3dx.dll" (ByVal position As Int32, ByRef layerName As Byte, ByRef arrayFloatPtr As Single) As Int32
  Public Declare Function At3d_2DSetAllFloatVertices Lib "at3dx.dll" (ByRef layerName As Byte, ByVal count As Int32, ByRef arrayFloatPtr As Single) As Int32

  Public Declare Function At3d_2DEdgeCount Lib "at3dx.dll" (ByRef layerName As Byte) As Int32
  Public Declare Function At3d_2DGetEdge Lib "at3dx.dll" (ByVal position As Int32, ByRef layerName As Byte, ByRef arrayPtr As Int32) As Int32
  Public Declare Function At3d_2DGetAllEdges Lib "at3dx.dll" (ByRef layerName As Byte, ByVal count As Int32, ByRef arrayPtr As Int32) As Int32
  Public Declare Function At3d_2DAllocEdges Lib "at3dx.dll" (ByRef layerName As Byte, ByVal count As Int32) As Int32
  Public Declare Function At3d_2DSetEdge Lib "at3dx.dll" (ByVal position As Int32, ByRef layerName As Byte, ByRef arrayPtr As Int32) As Int32
  Public Declare Function At3d_2DSetAllEdges Lib "at3dx.dll" (ByRef layerName As Byte, ByVal count As Int32, ByRef arrayPtr As Int32) As Int32

  Public Declare Function At3d_CloudVertexCount Lib "at3dx.dll" (ByRef layerName As Byte) As Int32
  Public Declare Function At3d_CloudGetVertex Lib "at3dx.dll" (ByVal position As Int32, ByRef layerName As Byte, ByRef arrayPtr As Double) As Int32
  Public Declare Function At3d_CloudGetAllVertices Lib "at3dx.dll" (ByRef layerName As Byte, ByVal count As Int32, ByRef arrayPtr As Double) As Int32

  Public Declare Function At3d_CloudGetFloatVertex Lib "at3dx.dll" (ByVal position As Int32, ByRef layerName As Byte, ByRef arrayFloatPtr As Single) As Int32
  Public Declare Function At3d_CloudGetAllFloatVertices Lib "at3dx.dll" (ByRef layerName As Byte, ByVal count As Int32, ByRef arrayFloatPtr As Single) As Int32

  Public Declare Function At3d_CloudAllocVertexs Lib "at3dx.dll" (ByRef layerName As Byte, ByVal count As Int32) As Int32
  Public Declare Function At3d_CloudSetVertex Lib "at3dx.dll" (ByVal position As Int32, ByRef layerName As Byte, ByRef arrayPtr As Double) As Int32
  Public Declare Function At3d_CloudSetAllVertices Lib "at3dx.dll" (ByRef layerName As Byte, ByVal count As Int32, ByRef arrayPtr As Double) As Int32

  Public Declare Function At3d_CloudSetFloatVertex Lib "at3dx.dll" (ByVal position As Int32, ByRef layerName As Byte, ByRef arrayFloatPtr As Single) As Int32
  Public Declare Function At3d_CloudSetAllFloatVertices Lib "at3dx.dll" (ByRef layerName As Byte, ByVal count As Int32, ByRef arrayFloatPtr As Single) As Int32

  Public Declare Sub At3d_MarkObjectFaceColor Lib "at3dx.dll" ()
  Public Declare Sub At3d_MarkFaceColor Lib "at3dx.dll" (ByRef layerName As Byte)
  Public Declare Function At3d_GetFaceColor Lib "at3dx.dll" (ByVal position As Int32, ByRef layerName As Byte, ByRef arrayPtr As Single) As Int32
  Public Declare Function At3d_GetAllFaceColors Lib "at3dx.dll" (ByRef layerName As Byte, ByVal count As Int32, ByRef arrayPtr As Single) As Int32
  Public Declare Function At3d_SetFaceColor Lib "at3dx.dll" (ByVal position As Int32, ByRef layerName As Byte, ByRef arrayPtr As Single) As Int32
  Public Declare Function At3d_SetAllFaceColors Lib "at3dx.dll" (ByRef layerName As Byte, ByVal count As Int32, ByRef arrayPtr As Single) As Int32
  Public Declare Sub At3d_DivideFaceColors Lib "at3dx.dll" (ByRef layerName As Byte)

  Public Declare Function At3d_SetFaceLayerPointer Lib "at3dx.dll" (ByVal position As Int32, ByRef layerName As Byte, ByVal layerPtr As Int32) As Int32
  Public Declare Function At3d_SetAllFaceLayerPointers Lib "at3dx.dll" (ByRef layerName As Byte, ByVal count As Int32, ByRef arrayPtr As Int32) As Int32
  Public Declare Sub At3d_DivideFaceLayerPointers Lib "at3dx.dll" (ByRef layerName As Byte)

  Public Declare Sub At3d_TransferDone Lib "at3dx.dll" ()

  Public Declare Sub At3d_MakeQuads Lib "at3dx.dll" ()
  Public Declare Sub At3d_DeleteQuads Lib "at3dx.dll" ()

  Public Declare Sub At3d_AlignActivate Lib "at3dx.dll" ()
  Public Declare Sub At3d_AlignPresetNormals Lib "at3dx.dll" ()
  Public Declare Sub At3d_AlignShowAll Lib "at3dx.dll" ()
  Public Declare Sub At3d_AlignFlipOne Lib "at3dx.dll" ()
  Public Declare Sub At3d_AlignSelectLayer Lib "at3dx.dll" (ByRef layerName As Byte)
  Public Declare Function At3d_AlignDoLayerFlip Lib "at3dx.dll" (ByRef layerName As Byte) As Int32
  Public Declare Sub At3d_EditDefaultRotations Lib "at3dx.dll" ()

  Public Declare Sub At3d_TTF_SetFaceName Lib "at3dx.dll" (ByRef faceName As Byte)
  Public Declare Sub At3d_TTF_SetFontPath Lib "at3dx.dll" (ByRef path As Byte)
  Public Declare Sub At3d_TTF_SetHeight Lib "at3dx.dll" (ByVal height As Double)
  Public Declare Sub At3d_TTF_SetDepth Lib "at3dx.dll" (ByVal depth As Double)
  Public Declare Sub At3d_TTF_SetBorder Lib "at3dx.dll" (ByVal border As Double)
  Public Declare Function At3d_TTF_To3D Lib "at3dx.dll" (ByRef text As Byte) As Int32
  Public Declare Function At3d_TTF_Unicode_To_3D Lib "at3dx.dll" (ByRef text As UInt16) As Int32

  Public Declare Sub At3d_SetDxfFontName Lib "at3dx.dll" (ByRef fontName As Byte)

  Public Declare Sub At3d_MergeVertices Lib "at3dx.dll" (ByVal flag As Int32, ByVal distance As Double())
  Public Declare Sub At3d_MergeObjects Lib "at3dx.dll" (ByVal flag As Int32)

  Public Declare Function At3d_GetDefaultMaterial_I1 Lib "at3dx.dll" (ByVal flagType As Int32, ByRef valuePtr As Int32) As Int32
  Public Declare Function At3d_GetDefaultMaterial_F1 Lib "at3dx.dll" (ByVal flagType As Int32, ByRef valuePtr As Single) As Int32
  Public Declare Function At3d_GetDefaultMaterial_F3 Lib "at3dx.dll" (ByVal flagType As Int32, ByRef arrayPtr As Single) As Int32

  Public Declare Function At3d_SetDefaultMaterial_I1 Lib "at3dx.dll" (ByVal flagType As Int32, ByVal flagValue As Int32) As Int32
  Public Declare Function At3d_SetDefaultMaterial_F1 Lib "at3dx.dll" (ByVal flagType As Int32, ByVal flagValue As Single) As Int32
  Public Declare Function At3d_SetDefaultMaterial_F3 Lib "at3dx.dll" (ByVal flagType As Int32, ByRef arrayPtr As Single) As Int32

  Public Declare Function At3d_GetMaterial_I1 Lib "at3dx.dll" (ByRef layerName As Byte, ByVal flagType As Int32, ByRef valuePtr As Int32) As Int32
  Public Declare Function At3d_SetMaterial_I1 Lib "at3dx.dll" (ByRef layerName As Byte, ByVal flagType As Int32, ByVal flagValue As Int32) As Int32
  Public Declare Function At3d_GetMaterial_F1 Lib "at3dx.dll" (ByRef layerName As Byte, ByVal flagType As Int32, ByRef valuePtr As Single) As Int32
  Public Declare Function At3d_SetMaterial_F1 Lib "at3dx.dll" (ByRef layerName As Byte, ByVal flagType As Int32, ByVal flagValue As Single) As Int32
  Public Declare Function At3d_GetMaterial_F3 Lib "at3dx.dll" (ByRef layerName As Byte, ByVal flagType As Int32, ByRef arrayPtr As Single) As Int32
  Public Declare Function At3d_SetMaterial_F3 Lib "at3dx.dll" (ByRef layerName As Byte, ByVal flagType As Int32, ByRef arrayPtr As Single) As Int32
  Public Declare Function At3d_GetTextureName Lib "at3dx.dll" (ByRef layerName As Byte, ByRef textureName As Byte) As Int32
  Public Declare Function At3d_SetTextureName Lib "at3dx.dll" (ByRef layerName As Byte, ByRef textureName As Byte) As Int32

  Public Declare Function At3d_GetMaskName Lib "at3dx.dll" (ByRef layerName As Byte, ByRef maskName As Byte) As Int32
  Public Declare Function At3d_SetMaskName Lib "at3dx.dll" (ByRef layerName As Byte, ByRef maskName As Byte) As Int32
  Public Declare Function At3d_Relocate_Textures Lib "at3dx.dll" (ByRef path As Byte, ByVal overwriteFlag As Int32, ByVal typeFlag As Int32) As Int32

  Public Declare Sub At3d_OglLightsMaterials Lib "at3dx.dll" ()
  Public Declare Sub At3d_RenderOpenGLScene Lib "at3dx.dll" ()
  Public Declare Sub At3d_SetTriQuadAngle Lib "at3dx.dll" (ByVal angle As Double)
  Public Declare Sub At3d_SetTriQuadEdgeAngle Lib "at3dx.dll" (ByVal angle As Double)

  Public Declare Sub At3d_GetObjectMinMax Lib "at3dx.dll" (ByRef arrayPtr As Double)
  Public Declare Sub At3d_GetObjectCenter Lib "at3dx.dll" (ByRef arrayPtr As Double)
  Public Declare Sub At3d_SetObjectCenter Lib "at3dx.dll" (ByRef arrayPtr As Double)
  Public Declare Sub At3d_ScaleObject Lib "at3dx.dll" (ByRef arrayPtr As Double)
  Public Declare Sub At3d_SetObject_Min000 Lib "at3dx.dll" ()
  Public Declare Sub At3d_SetObject_MinXYZ Lib "at3dx.dll" (ByRef arrayPtr As Double)
  Public Declare Sub At3d_SetObject_XYCenter_Z0 Lib "at3dx.dll" ()
  Public Declare Sub At3d_MirrorObjectX Lib "at3dx.dll" ()
  Public Declare Sub At3d_MirrorObjectY Lib "at3dx.dll" ()
  Public Declare Sub At3d_MirrorObjectZ Lib "at3dx.dll" ()
  Public Declare Sub At3d_RotateObjectX_90Minus Lib "at3dx.dll" ()
  Public Declare Sub At3d_RotateObjectX_90Plus Lib "at3dx.dll" ()
  Public Declare Sub At3d_RotateObjectX_180 Lib "at3dx.dll" ()
  Public Declare Sub At3d_RotateObjectY_90Minus Lib "at3dx.dll" ()
  Public Declare Sub At3d_RotateObjectY_90Plus Lib "at3dx.dll" ()
  Public Declare Sub At3d_RotateObjectY_180 Lib "at3dx.dll" ()
  Public Declare Sub At3d_RotateObjectZ_90Minus Lib "at3dx.dll" ()
  Public Declare Sub At3d_RotateObjectZ_90Plus Lib "at3dx.dll" ()
  Public Declare Sub At3d_RotateObjectZ_180 Lib "at3dx.dll" ()
  Public Declare Sub At3d_RotateObjectXYZ Lib "at3dx.dll" ()
  Public Declare Sub At3d_ZeroAll_Z Lib "at3dx.dll" ()

  Public Declare Function At3d_GetColorMap Lib "at3dx.dll" (ByVal index As Int32, ByRef arrayPtr As Single) As Int32
  Public Declare Function At3d_SetColorMap Lib "at3dx.dll" (ByVal index As Int32, ByRef arrayPtr As Single) As Int32

  Public Declare Function At3d_GetDemColorMap Lib "at3dx.dll" (ByVal index As Int32, ByRef arrayPtr As Single) As Int32
  Public Declare Function At3d_SetDemColorMap Lib "at3dx.dll" (ByVal index As Int32, ByRef arrayPtr As Single) As Int32

  Public Declare Function At3d_GetDrawPen Lib "at3dx.dll" (ByVal index As Int32) As Int32
  Public Declare Function At3d_SetDrawPen Lib "at3dx.dll" (ByVal index As Int32, ByVal dxfPen As Int32) As Int32

  Public Declare Sub At3d_SetProducedByName Lib "at3dx.dll" (ByRef name As Byte)
  Public Declare Function At3d_FindDxfPen Lib "at3dx.dll" (ByVal red As Single, ByVal green As Single, ByVal blue As Single) As Int32

  Public Declare Function At3d_TransferFrom_Start Lib "at3dx.dll" (ByVal typeFlag As Int32) As Int32

  Public Declare Function At3d_UV_Array_Count Lib "at3dx.dll" (ByRef layerName As Byte) As Int32
  Public Declare Function At3d_GetUV_Array Lib "at3dx.dll" (ByRef layerName As Byte, ByVal count As Int32, ByRef arrayPtr As Single) As Int32
  Public Declare Function At3d_GetUV_Array_Face Lib "at3dx.dll" (ByVal position As Int32, ByRef layerName As Byte, ByRef arrayPtr As Int32) As Int32
  Public Declare Function At3d_GetUV_Array_AllFaces Lib "at3dx.dll" (ByRef layerName As Byte, ByVal count As Int32, ByRef arrayPtr As Int32) As Int32

  Public Declare Function At3d_VertNorm_Array_Count Lib "at3dx.dll" (ByRef layerName As Byte) As Int32
  Public Declare Function At3d_GetVertNorm_Array Lib "at3dx.dll" (ByRef layerName As Byte, ByVal count As Int32, ByRef arrayPtr As Single, ByVal flipFlag As Int32) As Int32
  Public Declare Function At3d_GetVertNorm_Array_Face Lib "at3dx.dll" (ByVal position As Int32, ByRef layerName As Byte, ByRef arrayPtr As Int32) As Int32
  Public Declare Function At3d_GetVertNorm_Array_AllFaces Lib "at3dx.dll" (ByRef layerName As Byte, ByVal count As Int32, ByRef arrayPtr As Int32) As Int32

  Public Declare Function At3d_XYZ_UV_Array_Count Lib "at3dx.dll" (ByRef layerName As Byte) As Int32
  Public Declare Function At3d_GetXYZ_UV_Array Lib "at3dx.dll" (ByVal position As Int32, ByRef layerName As Byte, ByRef xyzPtr As Double, ByRef uvPtr As Single) As Int32

  Public Declare Function At3d_GetFloatXYZ_UV_Array Lib "at3dx.dll" (ByVal position As Int32, ByRef layerName As Byte, ByRef xyzFloatPtr As Single, ByRef uvPtr As Single) As Int32

  Public Declare Function At3d_GetXYZ_UV_Array_Face Lib "at3dx.dll" (ByVal position As Int32, ByRef layerName As Byte, ByRef arrayPtr As Int32) As Int32
  Public Declare Function At3d_GetXYZ_UV_Array_AllFaces Lib "at3dx.dll" (ByRef layerName As Byte, ByVal count As Int32, ByRef arrayPtr As Int32) As Int32

  Public Declare Sub At3d_TransferFrom_Stop Lib "at3dx.dll" ()

  Public Declare Sub At3d_SetDefaultLayerName Lib "at3dx.dll" (ByRef name As Byte)

  Public Declare Sub At3d_SetPrimitiveCreaseAngle Lib "at3dx.dll" (ByVal type As Int32, ByVal creaseAngle As Single)

  Public Declare Function At3d_Set_UV_Transform Lib "at3dx.dll" (ByRef layerName As Byte, ByRef centerPtr As Single, ByVal rotation As Single, ByRef scalePtr As Single, ByRef translationPtr As Single) As Int32
  Public Declare Function At3d_Create_UV_Coordinates Lib "at3dx.dll" (ByRef layerName As Byte, ByVal type As Int32) As Int32
  Public Declare Function At3d_Remove_UV_Coordinates Lib "at3dx.dll" (ByRef layerName As Byte) As Int32
  Public Declare Sub At3d_Create_UV_Dialog Lib "at3dx.dll" ()

  Public Declare Sub At3d_DivideTriangles Lib "at3dx.dll" (ByRef layerName As Byte, ByVal typeFlag As Int32)

  Public Declare Function At3d_GetDemSize Lib "at3dx.dll" (ByRef columns As Int32, ByRef rows As Int32) As Int32
  Public Declare Function At3d_GetDemSpacing Lib "at3dx.dll" (ByRef xSpacing As Double, ByRef ySpacing As Double) As Int32
  Public Declare Function At3d_GetDemMinMax Lib "at3dx.dll" (ByRef minHeight As Double, ByRef maxHeight As Double) As Int32
  Public Declare Function At3d_CreateDemBitmap Lib "at3dx.dll" (ByVal bitsPerPixel As Int32, ByVal width As Int32, ByVal height As Int32) As Int32
  Public Declare Sub At3d_DeleteDemBitmap Lib "at3dx.dll" ()
  Public Declare Function At3d_GetDemClip Lib "at3dx.dll" (ByVal wdwHandle As System.IntPtr, ByVal xOffset As Int32, ByVal yOffset As Int32) As Int32
  Public Declare Function At3d_GetDemHeight Lib "at3dx.dll" (ByVal x As Int32, ByVal y As Int32, ByRef height As Single) As Int32
  Public Declare Sub At3d_WriteDemContourMap Lib "at3dx.dll" (ByRef name As Byte, ByVal seaLevelFlag As Int32, ByVal belowFactor As Single, ByVal aboveFactor As Single)

  Public Declare Function At3d_VertColorPresent Lib "at3dx.dll" (ByRef layerName As Byte) As Int32
  Public Declare Function At3d_GetVertColor_Face Lib "at3dx.dll" (ByVal position As Int32, ByRef layerName As Byte, ByRef arrayPtr As Single) As Int32
  Public Declare Function At3d_GetVertColor_AllFaces Lib "at3dx.dll" (ByRef layerName As Byte, ByVal count As Int32, ByRef arrayPtr As Single) As Int32
  Public Declare Function At3d_SetVertColor_Face Lib "at3dx.dll" (ByVal position As Int32, ByRef layerName As Byte, ByRef arrayPtr As Single) As Int32
  Public Declare Function At3d_SetVertColor_AllFaces Lib "at3dx.dll" (ByRef layerName As Byte, ByVal count As Int32, ByRef arrayPtr As Single) As Int32

  Public Declare Function At3d_VertColor_Array_Count Lib "at3dx.dll" (ByRef layerName As Byte) As Int32
  Public Declare Function At3d_GetVertColor_Array Lib "at3dx.dll" (ByRef layerName As Byte, ByVal count As Int32, ByRef arrayPtr As Single) As Int32
  Public Declare Function At3d_GetVertColor_Array_Face Lib "at3dx.dll" (ByVal position As Int32, ByRef layerName As Byte, ByRef arrayPtr As Int32) As Int32
  Public Declare Function At3d_GetVertColor_Array_AllFaces Lib "at3dx.dll" (ByRef layerName As Byte, ByVal count As Int32, ByRef arrayPtr As Int32) As Int32

  Public Declare Function At3d_GetLayerParent Lib "at3dx.dll" (ByRef layerName As Byte, ByRef parentName As Byte) As Int32
  Public Declare Function At3d_SetLayerParent Lib "at3dx.dll" (ByRef layerName As Byte, ByRef parentName As Byte) As Int32

  Public Declare Function At3d_GetLayerPivotPoint Lib "at3dx.dll" (ByRef layerName As Byte, ByRef arrayPtr As Double) As Int32
  Public Declare Function At3d_SetLayerPivotPoint Lib "at3dx.dll" (ByRef layerName As Byte, ByRef arrayPtr As Double) As Int32

  Public Declare Sub At3d_Erase_Lines Lib "at3dx.dll" (ByRef layerName As Byte)
  Public Declare Sub At3d_Erase_All_Lines Lib "at3dx.dll" ()
  Public Declare Sub At3d_Erase_Clouds Lib "at3dx.dll" (ByRef layerName As Byte)
  Public Declare Sub At3d_Erase_All_Clouds Lib "at3dx.dll" ()
  Public Declare Sub At3d_Erase_Empty_Layers Lib "at3dx.dll" ()

  Public Declare Function At3d_Check_For_Water_Tight_Meshes Lib "at3dx.dll" () As Int32 ' obsolete
  Public Declare Function At3d_Check_For_Watertight_Meshes Lib "at3dx.dll" () As Int32
  Public Declare Sub At3d_Make_Edges_For_Holes_Layer Lib "at3dx.dll" ()
  Public Declare Sub At3d_Make_Edges_For_Shared_Edges_Layer Lib "at3dx.dll" ()
  Public Declare Sub At3d_Remove_Layers_Water_Tight_Check Lib "at3dx.dll" () ' obsolete
  Public Declare Sub At3d_Remove_Layers_Watertight_Check Lib "at3dx.dll" ()

  Public Declare Function At3d_Start_Edit_Vertices Lib "at3dx.dll" () As Int32
  Public Declare Function At3d_Stop_Edit_Vertices Lib "at3dx.dll" () As Int32
  Public Declare Function At3d_Extrude_Mouse Lib "at3dx.dll" () As Int32
  Public Declare Function At3d_Edit_Extrude_Now Lib "at3dx.dll" () As Int32

  Public Declare Function At3d_Edit_Select_Layer Lib "at3dx.dll" (ByRef layerName As Byte) As Int32

  Public Declare Function At3d_Edit_Drag_Box Lib "at3dx.dll" () As Int32
  Public Declare Function At3d_Edit_Pick_Vertex Lib "at3dx.dll" () As Int32
  Public Declare Function At3d_Edit_Get_Pick_Mode Lib "at3dx.dll" () As Int32
  Public Declare Sub At3d_Edit_Set_Pick_Mode Lib "at3dx.dll" (ByVal flag As Int32)
  Public Declare Sub At3d_Edit_Pick_All_Vertices Lib "at3dx.dll" ()
  Public Declare Sub At3d_Edit_Pick_Solid_Wire Lib "at3dx.dll" (ByVal flag As Int32)
  Public Declare Sub At3d_Edit_Other_Solid_Wire Lib "at3dx.dll" (ByVal flag As Int32)
  Public Declare Function At3d_Edit_Pick_Edge Lib "at3dx.dll" () As Int32
  Public Declare Function At3d_Edit_New_Edge Lib "at3dx.dll" () As Int32
  Public Declare Sub At3d_Edit_Delete_Vertex Lib "at3dx.dll" ()
  Public Declare Sub At3d_Edit_Divide_Edge Lib "at3dx.dll" ()
  Public Declare Function At3d_Edit_Drag_Vertex Lib "at3dx.dll" () As Int32

  Public Declare Function At3d_Edit_Move_Vertex Lib "at3dx.dll" (ByVal xFactor As Double, ByVal yFactor As Double, ByVal zFactor As Double) As Int32
  Public Declare Function At3d_Edit_Get_Vertex Lib "at3dx.dll" (ByRef xPtr As Double, ByRef yPtr As Double, ByRef zPtr As Double) As Int32
  Public Declare Function At3d_Edit_Set_Vertex Lib "at3dx.dll" (ByVal x As Double, ByVal y As Double, ByVal z As Double) As Int32

  Public Declare Function At3d_Edit_Rotate_Group Lib "at3dx.dll" () As Int32
  Public Declare Sub At3d_Edit_GetRotateAngles Lib "at3dx.dll" (ByRef xAnglePtr As Double, ByRef yAnglePtr As Double, ByRef zAnglePtr As Double)
  Public Declare Sub At3d_Edit_SetRotateAngles Lib "at3dx.dll" (ByVal relativeFlag As Int32, ByVal xAngle As Double, ByVal yAngle As Double, ByVal zAngle As Double)
  Public Declare Function At3d_Edit_Rotate_Okay Lib "at3dx.dll" () As Int32
  Public Declare Function At3d_Edit_Rotate_Cancel Lib "at3dx.dll" () As Int32

  Public Declare Function At3d_Edit_Scale_Group Lib "at3dx.dll" () As Int32
  Public Declare Sub At3d_Edit_GetScaleFactors Lib "at3dx.dll" (ByRef xFactorPtr As Double, ByRef yFactorPtr As Double, ByRef zFactorPtr As Double)
  Public Declare Sub At3d_Edit_SetScaleFactors Lib "at3dx.dll" (ByVal relativeFlag As Int32, ByVal xFactor As Double, ByVal yFactor As Double, ByVal zFactor As Double)
  Public Declare Function At3d_Edit_Scale_Okay Lib "at3dx.dll" () As Int32
  Public Declare Function At3d_Edit_Scale_Cancel Lib "at3dx.dll" () As Int32

  Public Declare Function At3d_Edit_Vertex_Snap Lib "at3dx.dll" () As Int32
  Public Declare Sub At3d_Edit_Snap_Show_Other Lib "at3dx.dll" ()
  Public Declare Function At3d_Edit_Snap_Okay Lib "at3dx.dll" () As Int32
  Public Declare Function At3d_Edit_Snap_Cancel Lib "at3dx.dll" () As Int32

  Public Declare Sub At3d_Edit_Reduce_Vertices Lib "at3dx.dll" ()
  Public Declare Sub At3d_Edit_Mirror_Image_Flip_X Lib "at3dx.dll" ()
  Public Declare Sub At3d_Edit_Mirror_Image_Flip_Y Lib "at3dx.dll" ()
  Public Declare Sub At3d_Edit_Mirror_Image_Flip_Z Lib "at3dx.dll" ()

  Public Declare Function At3d_Edit_Get_Extrude_Flag Lib "at3dx.dll" (ByVal flagType As Int32) As Int32
  Public Declare Sub At3d_Edit_Set_Extrude_Flag Lib "at3dx.dll" (ByVal flagType As Int32, ByVal flagValue As Int32)
	Public Declare Function At3d_Edit_Get_Divide_Flag Lib "at3dx.dll" () As Int32
	Public Declare Sub At3d_Edit_Set_Divide_Flag Lib "at3dx.dll" (ByVal flagValue As Int32)

	Public Declare Function At3d_Edit_Make_Bevel_Sets Lib "at3dx.dll" () As Int32
	Public Declare Function At3d_Edit_Select_Bevel_Set Lib "at3dx.dll" (ByRef layerName As Byte) As Int32

  Public Declare Function At3d_Edit_Clear_Bevels Lib "at3dx.dll" (ByVal typeFlag As Int32) As Int32
  Public Declare Function At3d_Edit_Get_Bevel_Count Lib "at3dx.dll" (ByVal typeFlag As Int32) As Int32
  Public Declare Function At3d_Edit_Get_Bevel Lib "at3dx.dll" (ByVal typeFlag As Int32, ByVal index As Int32, ByRef widthPtr As Double, ByRef heightPtr As Double) As Int32
  Public Declare Function At3d_Edit_Set_Bevel Lib "at3dx.dll" (ByVal typeFlag As Int32, ByVal index As Int32, ByVal width As Double, ByVal height As Double) As Int32

  Public Declare Sub At3d_Edit_Upper_Lower_Switch Lib "at3dx.dll" (ByVal flag As Int32)
  Public Declare Sub At3d_Edit_Display_Grid Lib "at3dx.dll" (ByVal gridFlag As Int32, ByVal gridSize As Double)
  Public Declare Sub At3d_Edit_Snap_To_Grid Lib "at3dx.dll" (ByVal flag As Int32)
  Public Declare Sub At3d_Edit_Move_Bevel_Zero Lib "at3dx.dll" ()
  Public Declare Sub At3d_Edit_Switch_Bevels_Outlines Lib "at3dx.dll" ()
  Public Declare Sub At3d_Edit_Open_Outline Lib "at3dx.dll" ()
  Public Declare Sub At3d_Edit_Close_Outline Lib "at3dx.dll" ()
  Public Declare Function At3d_Edit_Pick_Ghost_Outline Lib "at3dx.dll" () As Int32
  Public Declare Function At3d_Edit_Pick_Ghost_Okay Lib "at3dx.dll" () As Int32
  Public Declare Function At3d_Edit_Pick_Ghost_Cancel Lib "at3dx.dll" () As Int32
  Public Declare Sub At3d_Edit_Use_Ghost_Outline Lib "at3dx.dll" (ByVal flag As Int32)

  Public Declare Sub At3d_Edit_Undo_Vertices_Selected Lib "at3dx.dll" ()
  Public Declare Sub At3d_Edit_Undo_Vertices_Layer Lib "at3dx.dll" ()
  Public Declare Sub At3d_Edit_Undo_Vertices_All_Layers Lib "at3dx.dll" ()
  Public Declare Sub At3d_Edit_Local_World_Axis_Switch Lib "at3dx.dll" (ByVal flag As Int32)

  Public Declare Function At3d_Get_Mesh_To_Landscape_Size Lib "at3dx.dll" (ByRef arrayPtr As Double) As Int32
  Public Declare Function At3d_Calculate_Mesh_To_Landscape Lib "at3dx.dll" (ByVal xSpacing As Double, ByVal ySpacing As Double, ByRef countPtr As Int32, ByRef sizePtr As Double) As Int32

  Public Declare Sub At3d_Convert_Mesh_To_Landscape Lib "at3dx.dll" (ByRef xyzName As Byte, ByVal dropElevation As Double, ByVal baseThickness As Double)

  Public Declare Function At3d_ExtrudePseudo2D_Start Lib "at3dx.dll" () As Int32
  Public Declare Function At3d_ExtrudePseudo2D_Stop Lib "at3dx.dll" () As Int32
  Public Declare Function At3d_ExtrudePseudo2D_SetLayer Lib "at3dx.dll" (ByRef layerName As Byte) As Int32
  Public Declare Sub At3d_ExtrudePseudo2D_Get_Mesh_Size Lib "at3dx.dll" (ByRef arrayPtr As Double)
  Public Declare Sub At3d_ExtrudePseudo2D_GetRotateAngles Lib "at3dx.dll" (ByRef xAnglePtr As Double, ByRef yAnglePtr As Double, ByRef zAnglePtr As Double)
  Public Declare Sub At3d_ExtrudePseudo2D_SetRotateAngles Lib "at3dx.dll" (ByVal relativeFlag As Int32, ByVal xAngle As Double, ByVal yAngle As Double, ByVal zAngle As Double)
  Public Declare Function At3d_ExtrudePseudo2D_GetTypeFlag Lib "at3dx.dll" () As Int32
  Public Declare Function At3d_ExtrudePseudo2D_GetThickness Lib "at3dx.dll" () As Double
  Public Declare Function At3d_ExtrudePseudo2D_GetAdjustLocation Lib "at3dx.dll" () As Double
  Public Declare Sub At3d_ExtrudePseudo2D_Mark Lib "at3dx.dll" ()
  Public Declare Sub At3d_ExtrudePseudo2D_Clear Lib "at3dx.dll" ()
  Public Declare Sub At3d_ExtrudePseudo2D_Extrude Lib "at3dx.dll" (ByVal typeFlag As Int32, ByVal thickness As Double, ByVal adjustLocation As Double)
  Public Declare Sub At3d_ExtrudePseudo2D_Redo Lib "at3dx.dll" (ByVal typeFlag As Int32, ByVal thickness As Double, ByVal adjustLocation As Double)
  Public Declare Sub At3d_ExtrudePseudo2D_Undo Lib "at3dx.dll" ()

  Public Declare Sub At3d_Kerkythea_GetMultiplier Lib "at3dx.dll" (ByVal type As Int32, ByRef multiplierPtr As Single)
  Public Declare Sub At3d_Kerkythea_SetMultiplier Lib "at3dx.dll" (ByVal type As Int32, ByVal multiplier As Single)

  Public Declare Sub At3d_Kerkythea_GetSpotFallOff Lib "at3dx.dll" (ByVal type As Int32, ByRef fallOffPtr As Single)
  Public Declare Sub At3d_Kerkythea_SetSpotFallOff Lib "at3dx.dll" (ByVal type As Int32, ByVal fallOff As Single)

  Public Declare Sub At3d_Kerkythea_GetSpotHotSpot Lib "at3dx.dll" (ByVal type As Int32, ByRef hotSpotPtr As Single)
  Public Declare Sub At3d_Kerkythea_SetSpotHotSpot Lib "at3dx.dll" (ByVal type As Int32, ByVal hotSpot As Single)

  Public Declare Sub At3d_Kerkythea_GetSpotHotFraction Lib "at3dx.dll" (ByRef fractionPtr As Single)
  Public Declare Sub At3d_Kerkythea_SetSpotHotFraction Lib "at3dx.dll" (ByVal fraction As Single)

  Public Declare Sub At3d_Kerkythea_GetRadius Lib "at3dx.dll" (ByVal type As Int32, ByRef radiusPtr As Single)
  Public Declare Sub At3d_Kerkythea_SetRadius Lib "at3dx.dll" (ByVal type As Int32, ByVal radius As Single)

  Public Declare Sub At3d_GetVrmlLightMergeDistance Lib "at3dx.dll" (ByRef distancePtr As Double)
  Public Declare Sub At3d_SetVrmlLightMergeDistance Lib "at3dx.dll" (ByVal distance As Double)

  Public Declare Sub At3d_CalculateVertNorm Lib "at3dx.dll" (ByRef layerName As Byte, ByVal smoothingAngle As Double)
  Public Declare Sub At3d_CalculateVertNormAll Lib "at3dx.dll" (ByVal smoothingAngle As Double)

  Public Declare Sub At3d_XYZ_SetDelimiters Lib "at3dx.dll" (ByRef delimitersPtr As Byte)
  Public Declare Sub At3d_XYZ_SetRowsColumns Lib "at3dx.dll" (ByVal rows As Int32, ByVal columns As Int32)
  Public Declare Sub At3d_XYZ_SetClipRectangle Lib "at3dx.dll" (ByVal fromRow As Int32, ByVal toRow As Int32, ByVal fromColumn As Int32, ByVal toColumn As Int32)
  Public Declare Sub At3d_XYZ_SetNoDataValue Lib "at3dx.dll" (ByVal noDataValue As Double)
  Public Declare Sub At3d_XYZ_SetNoDataReplaceValue Lib "at3dx.dll" (ByVal noDataReplaceValue As Double)
  Public Declare Sub At3d_XYZ_SetScaleFactorZ Lib "at3dx.dll" (ByVal scaleFactorZ As Double)
  Public Declare Sub At3d_XYZ_SetDxfOutFile Lib "at3dx.dll" (ByRef name As Byte, ByVal scaleFactor As Double)

  Public Declare Sub At3d_SetVrmlSerifFontName Lib "at3dx.dll" (ByRef fontName As Byte)
  Public Declare Sub At3d_SetVrmlSansFontName Lib "at3dx.dll" (ByRef fontName As Byte)
  Public Declare Sub At3d_SetVrmlTypewriterFontName Lib "at3dx.dll" (ByRef fontName As Byte)

  Public Declare Sub At3d_SetStageGrid Lib "at3dx.dll" (ByVal spacing As Double, ByVal width As Double, ByVal depth As Double, ByVal originX As Double, ByVal originY As Double)
  Public Declare Sub At3d_SetStageImage Lib "at3dx.dll" (ByRef imageName As Byte)

  Public Declare Sub At3d_StartReducePolygons Lib "at3dx.dll" (ByVal progressFlag As Int32)
  Public Declare Sub At3d_GetReducePolygonsData Lib "at3dx.dll" (ByRef layerName As Byte, ByRef vertexCount0Ptr As Int32, ByRef triangleCount0Ptr As Int32, ByRef vertexCount1Ptr As Int32, ByRef triangleCount1Ptr As Int32)
  Public Declare Sub At3d_SetReducePolygonsNumber Lib "at3dx.dll" (ByRef layerName As Byte, ByVal vertexCount As Int32)
  Public Declare Sub At3d_StopReducePolygons Lib "at3dx.dll" (ByVal okFlag As Int32)

  Public Declare Sub At3d_SetBackgroundImage Lib "at3dx.dll" (ByRef imageName As Byte)

  Public Declare Sub At3d_SetBitmapTo3D_ExtrudeHeight Lib "at3dx.dll" (ByVal extrudeHeight As Double)

  Public Declare Sub At3d_SetBitmapToLandscapeValues Lib "at3dx.dll" (ByVal belowMultiplier As Double, ByVal aboveMultiplier As Double, ByVal minHeight As Double, ByVal xySpacing As Double)

	Public Declare Function At3d_Get_OGL_Snapshot Lib "at3dx.dll" (ByRef rgbaArray As Byte, ByVal width As Int32, ByVal height As Int32) As Int32

	Public Declare Sub At3d_Revolve_Camera_Start Lib "at3dx.dll" (ByVal xAngle As Double, ByVal yAngle As Double, ByVal zAngle As Double, ByVal seconds As Double)
	Public Declare Sub At3d_Revolve_Camera_Stop Lib "at3dx.dll" ()

	Public Declare Sub At3d_Show_Statusbar Lib "at3dx.dll" ()
	Public Declare Sub At3d_Hide_Statusbar Lib "at3dx.dll" ()

	Public Declare Function At3d_Get_Layer_MinMax Lib "at3dx.dll" (ByRef layerName As Byte, ByRef countsArrayPtr As Int32, ByRef minMaxArrayPtr As Double) As Int32

	Public Declare Function At3d_Get_OGL_Global_Ambient_Light Lib "at3dx.dll" (ByRef ambientPtr As Single) As Int32
	Public Declare Function At3d_Set_OGL_Global_Ambient_Light Lib "at3dx.dll" (ByRef ambientPtr As Single) As Int32
	Public Declare Function At3d_Get_OGL_Directional_Light Lib "at3dx.dll" (ByVal index As Int32, ByRef enabledFlagPtr As Int32, ByRef ambientPtr As Single, ByRef diffusePtr As Single, ByRef specularPtr As Single, ByRef positionPtr As Single) As Int32
	Public Declare Function At3d_Set_OGL_Directional_Light Lib "at3dx.dll" (ByVal index As Int32, ByVal enabledFlag As Int32, ByRef ambientPtr As Single, ByRef diffusePtr As Single, ByRef specularPtr As Single, ByRef positionPtr As Single) As Int32

	Public Declare Function At3d_Convert_3D_To_2D Lib "at3dx.dll" () As Int32

  Public Declare Function At3d_Get_KML_Length_Folder Lib "at3dx.dll" (ByRef nameLengthPtr As Int32, ByRef descriptionLengthPtr As Int32) As Int32
  Public Declare Function At3d_Get_KML_Folder Lib "at3dx.dll" (ByRef namePtr As Byte, ByVal nameLength As Int32, ByRef descriptionPtr As Byte, ByVal descriptionLength As Int32) As Int32
  Public Declare Function At3d_Get_KML_Length_Placemark Lib "at3dx.dll" (ByRef nameLengthPtr As Int32, ByRef descriptionLengthPtr As Int32) As Int32
  Public Declare Function At3d_Get_KML_Placemark Lib "at3dx.dll" (ByRef namePtr As Byte, ByVal nameLength As Int32, ByRef descriptionPtr As Byte, ByVal descriptionLength As Int32) As Int32
  Public Declare Function At3d_Get_KML_LookAt Lib "at3dx.dll" (ByRef latitudePtr As Double, ByRef longitudePtr As Double, ByRef altitudePtr As Double, ByRef altitudeModePtr As Int32, ByRef headingPtr As Double, ByRef tiltPtr As Double, ByRef rangePtr As Double) As Int32
  Public Declare Function At3d_Get_KML_Model Lib "at3dx.dll" (ByRef latitudePtr As Double, ByRef longitudePtr As Double, ByRef altitudePtr As Double, ByRef altitudeModePtr As Int32, ByRef headingPtr As Double, ByRef tiltPtr As Double, ByRef rollPtr As Double, ByRef scaleXPtr As Double, ByRef scaleYPtr As Double, ByRef scaleZPtr As Double) As Int32
  Public Declare Function At3d_Get_KML_ModelImage_Folders Lib "at3dx.dll" (ByRef useModelsFlagPtr As Int32, ByRef modelsFolderNamePtr As Byte, ByRef useImagesFlagPtr As Int32, ByRef imagesFolderNamePtr As Byte) As Int32


	Public Declare Sub At3d_Set_KML_Folder Lib "at3dx.dll" (ByRef namePtr As Byte, ByRef descriptionPtr As Byte)
	Public Declare Sub At3d_Set_KML_Placemark Lib "at3dx.dll" (ByRef namePtr As Byte, ByRef descriptionPtr As Byte)
	Public Declare Sub At3d_Set_KML_LookAt Lib "at3dx.dll" (ByVal latitude As Double, ByVal longitude As Double, ByVal altitude As Double, ByVal altitudeMode As Int32, ByVal heading As Double, ByVal tilt As Double, ByVal range As Double)
  Public Declare Sub At3d_Set_KML_Model Lib "at3dx.dll" (ByVal latitude As Double, ByVal longitude As Double, ByVal altitude As Double, ByVal altitudeMode As Int32, ByVal heading As Double, ByVal tilt As Double, ByVal roll As Double)
  Public Declare Sub At3d_Set_KML_ModelEx Lib "at3dx.dll" (ByVal latitude As Double, ByVal longitude As Double, ByVal altitude As Double, ByVal altitudeMode As Int32, ByVal heading As Double, ByVal tilt As Double, ByVal roll As Double, ByVal scaleX As Double, ByVal scaleY As Double, ByVal scaleZ As Double)
	Public Declare Sub At3d_Set_KML_ModelImage_Folders Lib "at3dx.dll" (ByVal useModelsFlag As Int32, ByRef modelsFolderNamePtr As Byte, ByVal useImagesFlag As Int32, ByRef imagesFolderNamePtr As Byte)

	Public Declare Sub At3d_SetAppHandle Lib "at3dx.dll" (ByVal hwndApp As System.IntPtr)

	Public Declare Sub At3d_Rotate_Camera_Simulation_Start Lib "at3dx.dll" (ByVal mouseX As Int32, ByVal mouseY As Int32, ByVal seconds As Double)
	Public Declare Sub At3d_Rotate_Camera_Simulation_Stop Lib "at3dx.dll" ()

  Public Declare Function At3d_Set_2D_Outline Lib "at3dx.dll" (ByRef layerName As Byte, ByVal count As Int32, ByRef arrayPtr As Double, ByVal closedFlag As Int32) As Int32
  Public Declare Function At3d_Set_2D_FloatOutline Lib "at3dx.dll" (ByRef layerName As Byte, ByVal count As Int32, ByRef arrayFloatPtr As Single, ByVal closedFlag As Int32) As Int32
  Public Declare Function At3d_Transfer_2D_Outline_Done Lib "at3dx.dll" (ByVal extrusionHeight As Double) As Int32

  Public Declare Sub At3d_Set_White_For_UV_Layers Lib "at3dx.dll" ()

  Public Declare Sub At3d_Invert_All_Layer_Transparencies Lib "at3dx.dll" ()
  Public Declare Sub At3d_Make_All_Layers_Opaque Lib "at3dx.dll" ()

  Public Declare Function At3d_Set_Maya_Version Lib "at3dx.dll" (ByRef mayaVersion As Byte) As Int32

  Public Declare Function At3d_Set_DirectX_Frame_Prefix Lib "at3dx.dll" (ByVal outFlag As Int32, ByRef prefixPtr As Byte) As Int32
  Public Declare Function At3d_Set_DirectX_Material_Prefix Lib "at3dx.dll" (ByVal outFlag As Int32, ByRef prefixPtr As Byte) As Int32

  Public Declare Function At3d_Rename_Embedded_Textures Lib "at3dx.dll" (ByRef textureName As Byte) As Int32

  ' -----------------
  ' import file types
  ' -----------------
  Public Enum At3d_InType
    INTYPE_DXF = 0
    INTYPE_DXF_SPECIAL = 1
    INTYPE_IMAGINE = 2
    INTYPE_LIGHTWAVE = 3
    INTYPE_VIDEOSCAPE = 4
    INTYPE_SCULPT = 5
    INTYPE_3DSTUDIO = 6
    INTYPE_TRUESPACE = 7
    INTYPE_WAVEFRONT = 8
    INTYPE_STEREOLITHOGRAPHY = 9
    INTYPE_SCENERY_ANIMATOR = 10
    INTYPE_VISTAPRO = 11
    INTYPE_BINARY_DEM = 12
    INTYPE_USGS_DEM = 13
    INTYPE_IFF = 14
    INTYPE_IFF_DEM = 15
    INTYPE_BMP = 16
    INTYPE_BMP_DEM = 17
    INTYPE_VRML = 18
    INTYPE_XYZ = 19
    INTYPE_REALIMATION = 20
    INTYPE_LIGHTSCAPE = 21
    INTYPE_RENDERWARE = 22
    INTYPE_MAYA_RTG = 23
    INTYPE_DXF_POINTCLOUD = 24
    INTYPE_USGS_SDTS = 25
    ' read vertices but do not create a mesh
    ' use OpenGL viewer to display vertices
    INTYPE_XYZ_NO_MESH = 26
    INTYPE_DIRECTX = 27
    INTYPE_SOFTIMAGE_XSI = 28
    INTYPE_3DMF = 29
    INTYPE_XGL = 30
    INTYPE_MICRODEM = 31
    INTYPE_USGS_GTOPO30 = 32
    INTYPE_USGS_SRTM_1_3 = 33
    INTYPE_CDED = 34
    INTYPE_ASCII_DEM = 35
    INTYPE_X3D = 36
    INTYPE_MAXNC = 37
    INTYPE_SHOPBOT = 38
    INTYPE_OPEN_INVENTOR = 39
    INTYPE_ARCINFO_ASCII = 40
    INTYPE_NASTRAN = 41
    INTYPE_COLLADA = 42
    INTYPE_TECPLOT = 43
    INTYPE_SATELLITE_TOOLKIT = 44
    INTYPE_CABLEMOD = 45
		INTYPE_KERKYTHEA = 46
		INTYPE_MODO = 47
		INTYPE_GOOGLE_EARTH = 48
  End Enum


  ' -----------------
  ' export file types
  ' -----------------
  Public Enum At3d_OutType
    OUTTYPE_DXF = 0
    OUTTYPE_IMAGINE1 = 1
    OUTTYPE_IMAGINE2 = 2
    OUTTYPE_TURBOSILVER = 3
    OUTTYPE_LIGHTWAVE1 = 4
    OUTTYPE_LIGHTWAVE2 = 5
    OUTTYPE_VIDEOSCAPE = 6
    OUTTYPE_SCULPT = 7
    OUTTYPE_3DSTUDIO_BINARY = 8
    OUTTYPE_3DSTUDIO_ASCII = 9
    OUTTYPE_TRUESPACE_BINARY = 10
    OUTTYPE_TRUESPACE_ASCII = 11
    OUTTYPE_WAVEFRONT = 12
    OUTTYPE_STL_ASCII = 13
    OUTTYPE_STL_BINARY = 14
    OUTTYPE_SCENERY_ANIMATOR = 15
    OUTTYPE_VISTAPRO = 16
    OUTTYPE_BINARY_DEM = 17
    OUTTYPE_BMP = 18
    OUTTYPE_VRML1 = 19
    OUTTYPE_VRML2 = 20
    OUTTYPE_POVRAY = 21
    OUTTYPE_REALIMATION = 22
    OUTTYPE_LIGHTSCAPE = 23
    OUTTYPE_RENDERWARE = 24
    OUTTYPE_3DMETAFILE_ASCII = 25
    OUTTYPE_3DMETAFILE_BINARY = 26
    OUTTYPE_MAYA_MA = 27
    OUTTYPE_VIEWPOINT = 28
    OUTTYPE_DIRECTX_ASCII = 29
    OUTTYPE_DIRECTX_BINARY = 30
    OUTTYPE_SOFTIMAGE_XSI_ASCII = 31
    OUTTYPE_XGL = 32
    OUTTYPE_X3D = 33
    OUTTYPE_ZGL = 34
    OUTTYPE_DEM_CONTOUR_MAP = 35
    OUTTYPE_OPEN_INVENTOR = 36
    OUTTYPE_ARCINFO_ASCII = 37
    OUTTYPE_DEM_CONTOUR_LINES = 38
    OUTTYPE_COLLADA = 39
    OUTTYPE_SATELLITE_TOOLKIT = 40
    OUTTYPE_CABLEMOD = 41
		OUTTYPE_KERKYTHEA = 42
		OUTTYPE_MODO = 43
		OUTTYPE_GOOGLE_EARTH = 44
  End Enum


  ' ----------
  ' flag types
  ' ----------
  Public Enum At3d_LibFlag
    ' import flags
    '
    LIBFLAG_DXF_POLYLINE_CLOSE = 0
    LIBFLAG_EXTRUDE_MODE = 1
    LIBFLAG_NOCHECK_POLYLINE = 2
    LIBFLAG_CHANGE_PEN_COLOR = 3
    LIBFLAG_CREATE_QUADFACE = 4     ' obsolete
    LIBFLAG_DXF_DIVIDE = 5
    LIBFLAG_AUTO_ALIGN = 6

    ' ask before dividing - flag = 0
    ' never divide        - flag = 1
    ' always divide       - flag = 2
    '
    LIBFLAG_OBJECT_DIVIDE = 7

    ' export flags
    '
    LIBFLAG_MIN_MAX_USE_2D = 8     ' obsolete
    LIBFLAG_USE_CENTER = 9
    LIBFLAG_HOLD_CENTER = 10
    LIBFLAG_SAVEPARENT = 11
    LIBFLAG_SAVE_2D = 12
    LIBFLAG_GLOBAL_DOUBLE_SIDED = 13

    ' save layers only          - flag = 0
    ' save as layers and blocks - flag = 1
    ' save blocks only          - flag = 2
    '
    LIBFLAG_SAVE_TYPE = 14

    LIBFLAG_BY_LAYER = 15
    LIBFLAG_OUTPUT_FLIPYZ = 16     ' obsolete
    LIBFLAG_USE_QUADFACE = 17
    LIBFLAG_LIGHTSCAPE_OUT = 18
    LIBFLAG_USE_ORIGINAL_PARENT = 19

    ' DXF output flags 
    '
    LIBFLAG_DXF_PRECISION = 20      ' obsolete - use LIBFLAG_VERTEX_OUT_PRECISION

    ' use carriage return and linefeed - flag = 0
    ' use linefeed only                - flag = 1
    ' use carriage return only         - flag = 2
    '
    LIBFLAG_DXF_OUT1 = 21

    ' output entities only               - flag = 0
    ' output tables, blocks and entities - flag = 1
    ' output all sections                - flag = 2
    '
    LIBFLAG_DXF_OUT2 = 22

    ' output SHAPE entity     - flag = 1
    ' output TEXT entity      - flag = 2
    ' output ATTDEF entity    - flag = 4
    ' output ATTRIB entity    - flag = 8
    ' output DIMENSION entity - flag = 16
    ' OR flags to output more than one type of entity
    '
    LIBFLAG_DXF_OUT3 = 23

    ' Revision 10 (Flatland = 1) - flag = 0
    ' Revision 10 (Flatland = 0) - flag = 1
    ' Revision 11 or 12          - flag = 2
    '
    LIBFLAG_DXF_REV = 24

    LIBFLAG_DXF_FONT_OUT = 25
    LIBFLAG_DXF_OUTPUT_3DFACE = 26

    ' Lightscape output flags
    '
    ' save as LP file  - flag = 0
    ' save as BLK file - flag = 1
    '
    LIBFLAG_LIGHTSCAPE_SAVETYPE = 27

    ' do not center block at origin - flag = 0
    ' center block at origin        - flag = 1
    '
    LIBFLAG_LIGHTSCAPE_CENTERBLOCK = 28

    LIBFLAG_LIGHTSCAPE_LAYERDEFAULT = 29

    ' Millimeters - flag = 0
    ' Centimeters - flag = 1
    ' Meters      - flag = 2
    ' Kilometers  - flag = 3
    ' Inches      - flag = 4
    ' Feet        - flag = 5
    ' Miles       - flag = 6
    '
    LIBFLAG_LIGHTSCAPE_LENGTH = 30

    ' International (SI) - flag = 0
    ' American (AS)      - flag = 1
    '
    LIBFLAG_LIGHTSCAPE_LIGHTING = 31

    ' Seconds - flag = 0
    ' Minutes - flag = 1
    ' Hours   - flag = 2
    '
    LIBFLAG_LIGHTSCAPE_TIME = 32

    ' RenderWare output flags
    '
    ' each layer becomes a clump        - flag = 0
    ' all layers become one clump       - flag = 1
    ' each layer becomes one prototype  - flag = 2
    ' use layer hierarchy               - flag = 3
    '
    LIBFLAG_RWX_OUTPUT = 33

    LIBFLAG_RWX_VERTEX_LABEL = 34
    LIBFLAG_RWX_PRECISION = 35       'obsolete - use LIBFLAG_VERTEX_OUT_PRECISION
    LIBFLAG_RWX_PROTOCENTER = 36
    LIBFLAG_RWX_DEMCENTER = 37
    LIBFLAG_RWX_USEPROTOTYPES = 38

    ' avatar output flag
    ' used with all file formats that support avatars
    '
    LIBFLAG_AVATAR_OUTPUT = 39

    ' scale factor units flags
    ' used for both input and output
    '
    ' MSFUNITS_MILLIMETERS  - flag = 0
    ' MSFUNITS_CENTIMETERS  - flag = 1
    ' MSFUNITS_METERS       - flag = 2
    ' MSFUNITS_KILOMETERS   - flag = 3
    ' MSFUNITS_INCHES       - flag = 4
    ' MSFUNITS_FEET         - flag = 5
    ' MSFUNITS_MILES        - flag = 6
    '
    LIBFLAG_MSF_INUNITS = 40
    LIBFLAG_MSF_OUTUNITS = 41

    ' viewer flags
    '
    LIBFLAG_COLOR_EDGE = 42
    LIBFLAG_GREY_EDGE = 43
    LIBFLAG_SHOW_QUADFACE = 44
    LIBFLAG_SURFACE_NORMAL = 45
    LIBFLAG_HIDDEN_WIREFRAME = 46
    LIBFLAG_WIREFRAME_REDRAW = 47
    LIBFLAG_DEM_WIREFRAME = 48

    ' use bounding box - flag = 1
    ' use vertices     - flag = 2
    ' use wireframe    - flag = 4
    ' OR flags for combinations
    '
    LIBFLAG_FAST_TYPE = 49

    LIBFLAG_FAST_INDICATOR = 50

    ' Axis system used by app calling dll
    '
    ' DXF axes       - flag = 0
    ' LightWave axes - flag = 1
    ' VRML axes      - flag = 2
    '
    LIBFLAG_APP_AXES = 51

    ' TrueType Fonts
    '
    LIBFLAG_TT_POINTSPERCURVE = 52
    LIBFLAG_TT_BOLD = 53
    LIBFLAG_TT_ITALIC = 54
    LIBFLAG_TT_REDUCE = 55
    LIBFLAG_TT_JOIN = 56
    LIBFLAG_TT_FACE = 57
    LIBFLAG_TT_EXTRUDE = 58
    LIBFLAG_TT_LAYERS = 59
    LIBFLAG_TT_STENCIL = 60
    LIBFLAG_TT_PLUSCORE = 61

    ' Convert VRML proto nodes Text2 and Text3 to 3D
    '
    LIBFLAG_VRML_TEXT_TO_3D = 62

    ' Full Window Depth Buffer Flag
    '
    LIBFLAG_FULL_WDW_DEPTH_BUFFER = 63

    ' RenderWare output format flags
    '
    ' RWX_NOINDENT     - flag = 1     ' obsolete - use LIBFLAG_NOINDENT_OUT
    ' RWX_DROPZEROS    - flag = 2     ' obsolete - use DROPZERO_OUT_FLAG
    ' RWX_NOLAYERNAME  - flag = 4
    '
    LIBFLAG_RWX_NOFORMAT = 64

    ' VRML flags
    '
    ' number of decimals
    '
    LIBFLAG_VRML_PRECISION = 65        ' obsolete - use LIBFLAG_VERTEX_OUT_PRECISION

    ' No formatted VRML Output
    '
    ' VRML_NOINDENT     - flag = 1     ' obsolete - use LIBFLAG_NOINDENT_OUT
    ' VRML_DROPZEROS    - flag = 2     ' obsolete - use DROPZERO_OUT_FLAG
    '
    LIBFLAG_VRML_NOFORMAT = 66

    LIBFLAG_VRML_SPHERE_DENSITY = 67
    LIBFLAG_VRML_CONE_NSIDES = 68
    LIBFLAG_VRML_CYLINDER_NSIDES = 69
    LIBFLAG_VRML_WARNING = 70

    ' VRML1_INFO    - flag = 1
    '
    LIBFLAG_VRML1_WRITENODES = 71

    ' VRML2_WORLDINFO         - flag =   1
    ' VRML2_NAVIGATIONINFO    - flag =   2
    ' VRML2_VIEWPOINT_FRONT   - flag =   4
    ' VRML2_VIEWPOINT_RIGHT   - flag =   8
    ' VRML2_VIEWPOINT_BACK    - flag =  16
    ' VRML2_VIEWPOINT_LEFT    - flag =  32
    ' VRML2_VIEWPOINT_TOP     - flag =  64
    ' VRML2_VIEWPOINT_BOTTOM  - flag = 128
    '
    LIBFLAG_VRML2_WRITENODES = 72

    LIBFLAG_VRML_ELEVATIONGRID = 73

    ' uv texture flag
    ' if set, write uv coordinates to file
    '
    LIBFLAG_UV_OUTPUT = 74

    ' mtl_fileFlag
    ' if set, save Wavefront Material file 
    '
    LIBFLAG_MTL_FILE = 75

    ' RWX Use Grouping Clump Flag
    ' use parent grouping clump when
    ' writing each layer to a clump
    '
    LIBFLAG_RWX_GROUPCLUMP1 = 76

    ' remove duplicate faces when
    ' reading files and merging data
    '
    LIBFLAG_REMOVE_DUPLICATE_FACES = 77

    ' use OpenGL viewer
    '
    LIBFLAG_USE_OPENGL = 78

    ' OpenGL Render Type
    '
    ' OGL_RENDER_POINTCLOUD                   - flag = 0
    ' OGL_RENDER_BOUNDINGBOX                  - flag = 1
    ' OGL_RENDER_WIREFRAME_ONECOLOR           - flag = 2
    ' OGL_RENDER_HIDDEN_WIREFRAME_ONECOLOR    - flag = 3
    ' OGL_RENDER_WIREFRAME_MULTICOLOR         - flag = 4
    ' OGL_RENDER_HIDDEN_WIREFRAME_MULTICOLOR  - flag = 5
    ' OGL_RENDER_FLAT_EDGE                    - flag = 6
    ' OGL_RENDER_FLAT                         - flag = 7
    ' OGL_RENDER_SMOOTH                       - flag = 8
    '
    LIBFLAG_OGL_RENDER = 79

    ' type of object to save to 3DMF file
    '
    ' SAVE_3DMF_MESH        - flag = 0
    ' SAVE_3DMF_TRIANGLE    - flag = 1
    ' SAVE_3DMF_QUAD        - flag = 2
    ' SAVE_3DMF_TRIMESH     - flag = 3
    '
    LIBFLAG_SAVE_3DMF_TYPE = 80

    ' OpenGL Compile and Execute Flag for display lists
    ' if flag is clear, mode is GL_COMPILE
    ' if flag is set,   mode is GL_COMPILE_AND_EXECUTE
    '
    LIBFLAG_OGL_COMPILE_EXECUTE = 81

    ' if flag is set, display textures in OpenGL viewer
    '
    LIBFLAG_OGL_USE_TEXTURES = 82

    ' if flag is set, search directories for texture files
    ' after reading the file
    '
    LIBFLAG_TEXTURE_DIRECTORIES = 83

    ' a texture mode for OpenGL
    ' if flag is clear, mode is GL_MODULATE
    ' if flag is set,   mode is GL_REPLACE
    '
    LIBFLAG_OGL_REPLACE = 84

    ' for OpenGL texture mode of GL_MODULATE
    ' if flag is clear, use diffuse RGB color of material
    ' if flag is set, use diffuse RGB color of 1,1,1
    '
    LIBFLAG_OGL_WHITE_BASE = 85

    ' if set, write vertex normals to file
    '
    LIBFLAG_VERTNORM_OUTPUT = 86

    ' if set, display texture search prompt message
    '
    LIBFLAG_TEXTURESEARCH_PROMPT = 87

    ' if set, use two sided lighting
    '
    LIBFLAG_OGL_2SIDED_LIGHTING = 88

    ' if set, cull back faces
    '
    LIBFLAG_OGL_CULL_BACKFACES = 89

    ' if set, use text from DXF files
    '
    LIBFLAG_USE_DXF_TEXT = 90

    ' if set, display messages in a window when reading a file
    '
    LIBFLAG_SHOW_READ_MESSAGES = 91

    ' if set, display messages in a window when saving a file
    '
    LIBFLAG_SHOW_SAVE_MESSAGES = 92     ' discontinued at version 1.3.1

    ' if set, display prompt message before merging layers
    '
    LIBFLAG_MERGE_LAYERS_PROMPT = 93

    ' MTX Precision - number of decimals for Viewpoint output
    '
    LIBFLAG_MTX_PRECISION = 94     ' obsolete - use LIBFLAG_VERTEX_OUT_PRECISION

    ' No formatted MTX Output
    '
    ' MTX_NOINDENT  - flag = 1    ' obsolete - use LIBFLAG_NOINDENT_OUT
    ' MTX_DROPZEROS - flag = 2    ' obsolete - use DROPZERO_OUT_FLAG
    '
    LIBFLAG_MTX_NOFORMAT = 95

    ' MTX output flag
    '
    ' MTX_OUTPUT_SIMPLE     - flag = 0
    ' MTX_OUTPUT_HIERARCHY  - flag = 1
    '
    LIBFLAG_MTX_OUTPUT = 96


    ' Maya Precision - number of decimals for Maya MA output
    '
    LIBFLAG_MAYA_PRECISION = 97     ' obsolete - use LIBFLAG_VERTEX_OUT_PRECISION

    ' No formatted Maya MA Output
    '
    ' MAYA_NOINDENT   - flag = 1   ' obsolete - use LIBFLAG_NOINDENT_OUT
    ' MAYA_DROPZEROS  - flag = 2   ' obsolete - use DROPZERO_OUT_FLAG
    '
    LIBFLAG_MAYA_NOFORMAT = 98

    ' Maya Linear flag for currentUnit
    '
    ' MAYA_LINEAR_MILLIMETER - flag = 0
    ' MAYA_LINEAR_CENTIMETER - flag = 1
    ' MAYA_LINEAR_METER      - flag = 2
    ' MAYA_LINEAR_KILOMETER  - flag = 3
    ' MAYA_LINEAR_INCH       - flag = 4
    ' MAYA_LINEAR_FOOT       - flag = 5
    ' MAYA_LINEAR_YARD       - flag = 6
    ' MAYA_LINEAR_MILE       - flag = 7
    '
    LIBFLAG_MAYA_LINEAR = 99

    ' Maya Angle flag for currentUnit
    '
    ' MAYA_ANGULAR_DEGREE - flag = 0
    ' MAYA_ANGULAR_RADIAN - flag = 1
    '
    LIBFLAG_MAYA_ANGULAR = 100

    ' Maya Time flag for currentUnit
    '
    ' MAYA_TIME_HOUR      - flag =  0
    ' MAYA_TIME_MIN       - flag =  1
    ' MAYA_TIME_SEC       - flag =  2
    ' MAYA_TIME_MILLISEC  - flag =  3
    ' MAYA_TIME_GAME      - flag =  4
    ' MAYA_TIME_FILM      - flag =  5
    ' MAYA_TIME_PAL       - flag =  6
    ' MAYA_TIME_NTSC      - flag =  7
    ' MAYA_TIME_SHOW      - flag =  8
    ' MAYA_TIME_PALF      - flag =  9
    ' MAYA_TIME_NTSCF     - flag = 10
    '
    LIBFLAG_MAYA_TIME = 101


    ' DirectX Precision - number of decimals for output
    '
    LIBFLAG_DIRECTX_PRECISION = 102    ' obsolete - use LIBFLAG_VERTEX_OUT_PRECISION

    ' No formatted DirectX Output
    '
    ' DIRECTX_NOINDENT  - flag = 1     ' obsolete - use LIBFLAG_NOINDENT_OUT
    ' DIRECTX_DROPZEROS - flag = 2     ' obsolete - use DROPZERO_OUT_FLAG
    '
    LIBFLAG_DIRECTX_NOFORMAT = 103

    ' DirectX output flag
    '
    ' DIRECTX_OUTPUT_SIMPLE    - flag = 0
    ' DIRECTX_OUTPUT_HIERARCHY - flag = 1
    '
    LIBFLAG_DIRECTX_OUTPUT = 104


    ' Softimage XSI Precision - number of decimals for output
    '
    LIBFLAG_XSI_PRECISION = 105     ' obsolete - use LIBFLAG_VERTEX_OUT_PRECISION

    ' No formatted Softimage XSI Output
    '
    ' XSI_NOINDENT  - flag = 1     ' obsolete - use LIBFLAG_NOINDENT_OUT
    ' XSI_DROPZEROS - flag = 2     ' obsolete - use DROPZERO_OUT_FLAG
    '
    LIBFLAG_XSI_NOFORMAT = 106

    ' Softimage XSI output flag
    '
    ' XSI_OUTPUT_SIMPLE    - flag = 0
    ' XSI_OUTPUT_HIERARCHY - flag = 1
    '
    LIBFLAG_XSI_OUTPUT = 107

    ' if set, save Softimage lights
    '
    LIBFLAG_XSI_SAVE_LIGHTS = 108

    ' if set, save texture path
    '
    LIBFLAG_SAVE_TEXTUREPATH = 109

    ' if set, search drives for a texture file
    ' that can be displayed which matches the texture name
    ' read from the file or transferred to the DLL
    '
    LIBFLAG_TEXTURENAME_MATCH = 110

    ' if set, save as white base material for textures
    '
    LIBFLAG_SAVE_WHITE_BASE = 111

    ' if set, give warning if coordinates are <= zero
    ' when saving a STL file
    '
    LIBFLAG_STL_ZERO_WARNING = 112

    ' if set, give warning if more than one layer is
    ' written to a STL file
    '
    LIBFLAG_STL_LAYERS_WARNING = 113

    ' if set, read inline files contained in the
    ' VRML WWWInline and Inline nodes
    '
    LIBFLAG_VRML_INLINE = 114

    ' if set, divide layers that are too large
    ' to save to some file formats
    '
    LIBFLAG_DIVIDE_LAYER_SAVE = 115

    ' if set, when there are too many vertices and faces
    ' to save to a LW1 file then save each layer to it's own file
    '
    LIBFLAG_LW1_MULTI_SAVE = 116

    ' if set, save point clouds to file
    '
    LIBFLAG_SAVE_POINTCLOUD = 117

    ' if set, display OpenGL error flag
    '
    LIBFLAG_OGL_ERROR = 118

    ' pixel size for 3DMF pixmap
    '
    ' PIXEL_3DMF_16    flag = 0
    ' PIXEL_3DMF_24    flag = 1
    ' PIXEL_3DMF_32    flag = 2
    '
    LIBFLAG_PIXEL_SIZE_3DMF = 119

    ' if flag is set, do not draw to view window
    '
    LIBFLAG_NO_DRAW = 120

    ' if flag is set, display default texture
    ' when texture is missing or can not be read
    '
    LIBFLAG_OGL_USE_DEFAULT_TEXTURE = 121

    ' if set, DEM color range is variable
    '
    LIBFLAG_DEM_VARIABLE_COLOR = 122

    ' if set, display view/camera axes
    '
    LIBFLAG_VIEW_AXES = 123

    ' if set, write 'AddMaterialMode Double'
    '
    LIBFLAG_RWX_ADDMATERIALMODE_DOUBLE = 124   ' obsolete version 2.9.12 - always set

    ' if set, use BackfacingStyle
    '
    LIBFLAG_USE_3DMF_BACKFACINGSTYLE = 125

    ' X3D Precision - number of decimals for X3D output
    '
    LIBFLAG_X3D_PRECISION = 126      ' obsolete - use LIBFLAG_VERTEX_OUT_PRECISION


    ' formatted X3D Output
    '
    ' X3D_NOINDENT     1   ' obsolete - use LIBFLAG_NOINDENT_OUT
    ' X3D_DROPZEROS    2   ' obsolete - use DROPZERO_OUT_FLAG
    '
    LIBFLAG_X3D_NOFORMAT = 127


    ' X3D ElevationGrid
    ' if set, write ElevationGrid node instead of IndexedFaceSet node
    '
    LIBFLAG_X3D_ELEVATIONGRID = 128


    ' x3dWriteNodesFlag
    '
    ' X3D_WORLDINFO           1
    ' X3D_NAVIGATIONINFO      2
    ' X3D_VIEWPOINT_FRONT     4
    ' X3D_VIEWPOINT_RIGHT     8
    ' X3D_VIEWPOINT_BACK     16
    ' X3D_VIEWPOINT_LEFT     32
    ' X3D_VIEWPOINT_TOP      64
    ' X3D_VIEWPOINT_BOTTOM  128
    '
    LIBFLAG_X3D_WRITENODES = 129

    ' if set, use DisplayGroup
    '
    LIBFLAG_USE_3DMF_DISPLAYGROUP = 130

    ' RWX Precision - number of decimals for Renderware Translation
    '
    LIBFLAG_RWX_TRANSPRECISION = 131

    ' UV Precision - number of decimals for UV texture coordinates
    '
    LIBFLAG_UV_PRECISION = 132

    ' if set, use 3DS key frame data to scale, rotate, position and clone
    '
    LIBFLAG_USE_3DS_KEYFRAME = 133

    ' remove duplicate vertices when reading files and merging data
    '
    LIBFLAG_REMOVE_DUPLICATE_VERTICES = 134

    ' if set, check if texture is AW filmstrip
    '
    LIBFLAG_USE_AW_FILMSTRIP = 135

    ' frames per second for AW filmstrip
    '
    LIBFLAG_AW_FILMSTRIP_FPS = 136

    ' if set, enable timer for AW filmstrip
    '
    LIBFLAG_AW_FILMSTRIP_TIMER = 137

    ' Layer Attributes Precision - number of decimals for layer attributes
    '
    LIBFLAG_LAYER_ATTR_PRECISION = 138

    ' if set, write global layer attributes at start of RWX file
    '
    LIBFLAG_RWX_GLOBAL_ATTR = 139

    '// if set, write comment on first line of RWX file
    '
    LIBFLAG_RWX_TITLE_COMMENT = 140

    ' if set, do not write ModelBegin and ModelEnd pair to RWX file
    '
    LIBFLAG_RWX_NO_MODELBEGIN = 141

    ' if set, link emissive and RWX TextureModes Lit
    '
    LIBFLAG_LINK_EMISSIVE_RWXLIT = 142

    ' if set, write emissive as RWX Prelight
    '
    LIBFLAG_RWX_PRELIGHT = 143

    ' if set, do not write #! characters to RWX file
    '
    LIBFLAG_NO_RWX_SPECIAL_CHAR = 144

    ' if set, use ambient1 instead of ambientRGB
    '
    LIBFLAG_USE_AMBIENT1_FLAG = 145

    ' if set, use diffuse1 instead of diffuseRGB
    '
    LIBFLAG_USE_DIFFUSE1_FLAG = 146

    ' if set, use specular1 instead of specularRGB
    '
    LIBFLAG_USE_SPECULAR1_FLAG = 147

    ' if set, use transparency1 instead of transparencyRGB
    '
    LIBFLAG_USE_TRANSPARENCY1_FLAG = 148

    'if set, write vertex colors to file
    '
    LIBFLAG_VCOLOR_OUTPUT = 149

    ' if set, RGB vertex colors
    ' if clear, RGBA vertex colors
    '
    LIBFLAG_VCOLOR_RGB = 150

    ' use in place of
    ' DIRECTX_PRECISION, DXF_PRECISION, MAYA_PRECISION
    ' RWX_PRECISION, XSI_PRECISION, MTX_PRECISION
    ' VRML_PRECISION, X3D_PRECISION
    '
    LIBFLAG_VERTEX_OUT_PRECISION = 151

    ' Drop leading and trailing zeroes when writing files
    '
    LIBFLAG_DROPZERO_OUT = 152

    ' number of decimals when writing normals
    '
    LIBFLAG_NORMAL_OUT_PRECISION = 153

    ' if set, write POV camera, light, background nodes
    '
    LIBFLAG_WRITE_POV_NODES = 154

    ' if set, save one object with multiple materials
    '
    LIBFLAG_SAVE_ONEOBJECT_MULTIMATERIAL = 155

    ' if set, write "g" group name to Wavefront file
    '
    LIBFLAG_OBJ_G_GROUPNAME_OUT = 156

    ' if set, merge identical materials when reading trueSpace mesh
    '
    LIBFLAG_MERGE_TS_MATERIALS_IN = 157

    ' if set and LIBFLAG_SAVE_TEXTUREPATH is set, save partial texture path
    '
    LIBFLAG_PARTIAL_TEXTUREPATH = 158

    ' if set, no indented Open Inventor Output
    '
    LIBFLAG_IV_NOINDENT = 159    ' obsolete - use LIBFLAG_NOINDENT_OUT

    ' ivWriteNodesFlag
    '
    ' IV_INFO                     - flag =  1
    ' IV_PERSPECTIVECAMERA_FRONT  - flag =  2
    ' IV_PERSPECTIVECAMERA_RIGHT  - flag =  4
    ' IV_PERSPECTIVECAMERA_BACK   - flag =  8
    ' IV_PERSPECTIVECAMERA_LEFT   - flag = 16
    ' IV_PERSPECTIVECAMERA_TOP    - flag = 32
    ' IV_PERSPECTIVECAMERA_BOTTOM - flag = 64
    '
    LIBFLAG_IV_WRITENODES = 160

    ' if set, do not indent when writing files
    '
    LIBFLAG_NOINDENT_OUT = 161

    ' write DEM or 3D model to XYZ file
    '
    ' out XYZ File Type    
    ' flag = 0, ASCII
    ' flag = 1, Binary
  '
    LIBFLAG_OUT_XYZ_BINARY = 162

    ' out XYZ Byte Order
    ' flag = 0, Intel Byte Order
    ' flag = 1, Motorola Byte Order
    '
    LIBFLAG_OUT_XYZ_MOTOROLA = 163

    ' out XYZ float type
    ' flag = 0, float
    ' flag = 1, double
    '
    LIBFLAG_OUT_XYZ_DOUBLE = 164

    ' out XYZ axis
    ' XYZ_AXIS_CRHS - flag = 0
    ' XYZ_AXIS_LHS  - flag = 1
    ' XYZ_AXIS_RHS  - flag = 2
    '
    LIBFLAG_OUT_XYZ_AXIS = 165

    ' if set, write header to XYZ file
    '
    LIBFLAG_DEMOUT_XYZ_HEADER = 166

    ' if set, remove duplicate vertices before writing XYZ file
    '
    LIBFLAG_OUT_XYZ_REMOVE_DUPLICATES = 167

    ' out XYZ use tab
    ' flag = 0, space
    ' flag = 1, tab
    '
    LIBFLAG_OUT_XYZ_TAB = 168

    ' if set, add X, Y or Z prefix when writing XYZ file
    '
    LIBFLAG_OUT_XYZ_PREFIX = 169

    ' convert mesh to landscape
    '
    LIBFLAG_MESH_TO_DEM_STRETCH_X = 170
    LIBFLAG_MESH_TO_DEM_STRETCH_Y = 171

    ' flag = 0, keep original meshes
    ' flag = 1, convert to landscape
    ' flag = 2, convert to new mesh
    '
    LIBFLAG_MESH_TO_DEM_CONVERT = 172

    LIBFLAG_MESH_TO_DEM_ADD_CLOUD = 173
    LIBFLAG_MESH_TO_DEM_DROP_FACES = 174
    LIBFLAG_MESH_TO_DEM_ADD_BASE = 175
    LIBFLAG_MESH_TO_DEM_ADD_UV = 176
    LIBFLAG_MESH_TO_DEM_WRITE_XYZ = 177

    ' if set, use TableOfContents
    '
    LIBFLAG_USE_3DMF_TABLEOFCONTENTS = 178

    ' if set, keep relative position when doing
    ' snap to vertex
    '
    LIBFLAG_SNAP_KEEP_RELATIVE = 179

    ' if set, write one layer to each file
    '
    LIBFLAG_WRITE_ONE_LAYER_PER_FILE = 180

    ' if set, rotate object around origin
    ' this flag is cleared when a new file is read
    '
    LIBFLAG_ORIGIN_ROTATE = 181

    ' if this flag and ORIGIN_ROTATE_FLAG is set
    ' show the axes at the origin
    '
    LIBFLAG_DRAW_OBJECT_AXES = 182

    ' if set, allow rotation or drag on axis
    ' flag value can be changed by DLL without user input
    '
    LIBFLAG_X_AXIS_CONTROL = 183  ' obsolete version 1.4.8
    LIBFLAG_Y_AXIS_CONTROL = 184  ' obsolete version 1.4.8
    LIBFLAG_Z_AXIS_CONTROL = 185  ' obsolete version 1.4.8

    ' if set, do not write carriage return and line feed to XGL files
    '
    LIBFLAG_XGL_NORETURN = 186

    ' XGL output flag
    '
    ' XGL_OUTPUT_SIMPLE    - flag = 0
    ' XGL_OUTPUT_HIERARCHY - flag = 1
    '
    LIBFLAG_XGL_OUTPUT = 187

    ' XGL pelvis location flag
    ' XGL_LOCATION_PELVIS - flag = 0 - pelvis centered at origin
    ' XGL_LOCATION_FEET   - flag = 1 - feet on ground
    '    
    LIBFLAG_XGL_LOCATION = 188


    ' if set, do not write carriage return and line feed to CableMode files
    '
    LIBFLAG_CABLEMOD_NORETURN = 189


    ' CableMode output flag
    '
    ' CABLEMOD_OUTPUT_SIMPLE    - flag = 0
    ' CABLEMOD_OUTPUT_HIERARCHY - flag = 1
    '
    LIBFLAG_CABLEMOD_OUTPUT = 190


    ' CableMod units flag
    '
    ' 0 = "um"
    ' 1 = "mm"
    ' 2 = "cm"
    ' 3 = "m"
    ' 4 = "mil"
    ' 5 = "inch"
    '
    LIBFLAG_CABLEMOD_UNITS = 191

    ' if set, all DXF layers will be turned on
    '
    LIBFLAG_DXF_ALL_LAYERS_ON = 192

    ' if set, emissive is written as Kerkythea radiance
    '
    LIBFLAG_KERKYTHEA_USE_RADIANCE = 193


    ' if set, Kerkythea radiance is an emitter
    '
    LIBFLAG_KERKYTHEA_RADIANCE_EMITTER = 194


    ' if set, point lights are saved as spot lights to Kerkythea file
    '
    LIBFLAG_KERKYTHEA_POINT_AS_SPOT = 195


    ' if set, directional lights are saved as omni, sun or spot lights to Kerkythea file
    '
    ' 0 = omni
    ' 1 = sun
    ' 2 = spot
    '
    LIBFLAG_KERKYTHEA_DIRECTIONAL_AS_SPOT = 196


    ' if set, a point light will point up when saved to a KERKYTHEA file
    '
    LIBFLAG_KERKYTHEA_POINT_UP = 197


    ' Attenuation for Kerkythea lights
    '
    ' 0 = none
    ' 1 = inverse
    ' 2 = inverse square
    '
    LIBFLAG_KERKYTHEA_DIRECTIONAL_ATTENUATION = 198
    LIBFLAG_KERKYTHEA_POINT_ATTENUATION = 199
    LIBFLAG_KERKYTHEA_SPOT_ATTENUATION = 200


    ' if flag is set, spot light values for hot spot and falloff
    ' read from the import file are replaced with the same user specified values
    '
    LIBFLAG_KERKYTHEA_SPOT_REPLACE = 201


    ' if set, make spot light hot spot a fraction of the falloff angle
    '
    LIBFLAG_KERKYTHEA_SPOT_USE_HOT_FRACTION = 202


    ' if set, the VRML file was written by Chief Architect
    ' and the directiona and spot light direction vectors must be converted
    '
    LIBFLAG_VRML_BY_CHIEF_ARCHITECT = 203


    ' used when reading XYZ files
    '
    ' for DLL only, if set do not use XyzDlg
    '
    LIBFLAG_XYZ_SKIP_DLG = 204

    ' XYZ Type
    ' 0 = row and column mesh
    ' 1 = scan
    '
    LIBFLAG_XYZ_SCAN = 205

    ' XYZ File Type
    '
    ' 0 = ASCII
    ' 1 = binary
    '
    LIBFLAG_XYZ_BINARY_FILE = 206

 ' XYZ Byte Order
    '
    ' 0 = Intel
    ' 1 = Motorola
    '
    LIBFLAG_XYZ_MOTOROLA = 207

    ' XYZ Binary Floating Point Type
    '
    ' 0 = float
    ' 1 = double
    '
    LIBFLAG_XYZ_DOUBLE = 208

    ' XYZ Data Stored
    '
    ' 0 = by row
    ' 1 = by column
    '
    LIBFLAG_XYZ_BY_COLUMN = 209

    ' if set, use rectangular area from XYZ file
    '
    LIBFLAG_XYZ_CLIP = 210

    ' XYZ axis system
    ' XYZ_AXIS_CRHS - flag = 0
    ' XYZ_AXIS_LHS  - flag = 1
    ' XYZ_AXIS_RHS  - flag = 2
    '
    LIBFLAG_XYZ_AXIS = 211

    ' if set, save XYZ mesh as DXF polyline mesh
    '
    LIBFLAG_XYZ_SAVE_DXF = 212

    ' set DXF file version
    ' 0 = Release 10 (FLATLAND = 0)
    ' 1 = Release 10 (FLATLAND = 1)
    ' 2 = Release 11 and newer
    '
    LIBFLAG_XYZ_DXF_RELEASE = 213

    ' if set, XYZ file contains NoData values for some Z coordinates
    '
    LIBFLAG_XYZ_NODATA = 214

    ' flag indicates how NoData values in XYZ file will be handled
    '
    ' 0 = delete NoData triangles
    ' 1 = use minumum valid Z coordinate
    ' 2 = use specified replacement value
    '
    LIBFLAG_XYZ_NODATA_REPLACE = 215

    ' if set, scale the Z coordinate
    '
    LIBFLAG_XYZ_SCALE_Z = 216

    ' if set, there is a name or number after the XYZ coordinate
    '
    LIBFLAG_XYZ_HAS_ID = 217

    ' use XYZ ID as layer name
    '
    LIBFLAG_XYZ_USE_ID = 218

    ' if set, use .PNG Alpha Channel Masks for Kerkythea
    '
    LIBFLAG_KERKYTHEA_USE_PNG_ALPHA_MASKS = 219

    ' if set, write Text as the original text rather than as 3D meshes
    '
    LIBFLAG_WRITE_TEXT_AS_TEXT = 220

    '  if set, Shadow for Kerkythea lights
    '
    LIBFLAG_KERKYTHEA_DIRECTIONAL_SHADOW = 221
    LIBFLAG_KERKYTHEA_POINT_SHADOW = 222
    LIBFLAG_KERKYTHEA_SPOT_SHADOW = 223


    '  if set, Soft Shadow for Kerkythea lights
    '
    LIBFLAG_KERKYTHEA_DIRECTIONAL_SOFT_SHADOW = 224
    LIBFLAG_KERKYTHEA_POINT_SOFT_SHADOW = 225
    LIBFLAG_KERKYTHEA_SPOT_SOFT_SHADOW = 226


    '  if set, Global Photons for Kerkythea lights
    '
    LIBFLAG_KERKYTHEA_DIRECTIONAL_GLOBAL_PHOTONS = 227
    LIBFLAG_KERKYTHEA_POINT_GLOBAL_PHOTONS = 228
    LIBFLAG_KERKYTHEA_SPOT_GLOBAL_PHOTONS = 229


    '  if set, Caustic Photons for Kerkythea lights
    '
    LIBFLAG_KERKYTHEA_DIRECTIONAL_CAUSTIC_PHOTONS = 230
    LIBFLAG_KERKYTHEA_POINT_CAUSTIC_PHOTONS = 231
    LIBFLAG_KERKYTHEA_SPOT_CAUSTIC_PHOTONS = 232


    '  if set, Negative Light for Kerkythea lights
    '
    LIBFLAG_KERKYTHEA_DIRECTIONAL_NEGATIVE = 233
    LIBFLAG_KERKYTHEA_POINT_NEGATIVE = 234
    LIBFLAG_KERKYTHEA_SPOT_NEGATIVE = 235

    ' if set, display stage
    '
    LIBFLAG_STAGE_USE = 236

    ' type of stage to display
    '
    ' STAGE_TYPE_WIRES        0
    ' STAGE_TYPE_SQUARES      1
    '
    LIBFLAG_STAGE_TYPE = 237

    ' if set, display texture on stage
    '
    LIBFLAG_STAGE_UV = 238

    ' if set, use origin settings to position texture image
    '
    LIBFLAG_STAGE_ORIGIN = 239

    ' if set, display background image

    LIBFLAG_BACKGROUND_IMAGE_USE = 240

    ' used when reading Bitmap to 3D files
    '
    ' for DLL only, if set do not use BitmapTo3dDlg
    '
    LIBFLAG_BITMAP_TO_3D_SKIP_DLG = 241

    ' if set, outlines will be created for palette index 0
    '
    LIBFLAG_BITMAP_TO_3D_DECODE_0 = 242

    ' if set, save outlines as polylines to a DXF file
    '
    LIBFLAG_BITMAP_TO_3D_SAVE_OUTLINES = 243

    ' if set, triangles will be added to the outline
    '
    LIBFLAG_BITMAP_TO_3D_ADD_FACES = 244

    ' if set, the outlines with added faces will be extuded
    '
    LIBFLAG_BITMAP_TO_3D_EXTRUDE = 245


    ' used when reading Bitmap to Landscape files
    '
    ' for DLL only, if set do not use BitmapMultDlg
    '
    LIBFLAG_BITMAP_TO_LANDSCAPE_SKIP_DLG = 246

    ' if set, place sea level at color 4
    '
    LIBFLAG_BITMAP_TO_LANDSCAPE_SEA_LEVEL = 247

    ' if set, save Camera and Sunlight to LXO file
    '
		LIBFLAG_SAVE_LXO_CAMERA_LIGHT = 248

		' if set, save Heirarchy and Joints to LXO file
		'
		LIBFLAG_SAVE_LXO_HIERARCHY = 249
		LIBFLAG_SAVE_LXO_JOINTS = 250

		' if set, display OpenGL messages for debug purposes
		'
		LIBFLAG_DISPLAY_OGL_DEBUG_MSGS = 251

		' if set, reverse  mouse wheel zoom directon
		'
		LIBFLAG_REVERSE_ZOOM_DIRECTION = 252

		'if set, holes will be added to the outer outline
		'
		LIBFLAG_BITMAP_TO_3D_JOIN_OUTLINES = 253

		' when picking DXF Pen that matches diffuse color
		' use this pen for color black (RGB = 0,0,0)
		' pen range: 1 to 255
		'
		LIBFLAG_DXF_PEN_MATCH_RGB_000 = 254

		' if set, reverse camera pan directon
		'
		LIBFLAG_REVERSE_PAN_DIRECTION = 255

		' if set, focus will be set to the DLL during camera rotate, pan and zoom
		' and returned to the control that had focus afterwards
		'
		LIBFLAG_GRAB_KEYBOARD_FOCUS = 256

		' if set, always show cursor during camera rotate, pan and zoom
		'
    LIBFLAG_ALWAYS_SHOW_CAMERA_CURSOR = 257

    ' if set, debug messages will be displayed in At3d_Stop() function
    '
    LIBFLAG_DEBUG_STOP_MESSAGES = 258

    ' if set, save Heirarchy to 3DS, CableMod, DirectX, LXO, MTX, XGL, XSI files
    ' use in place of
    ' LIBFLAG_MTX_OUTPUT, LIBFLAG_DIRECTX_OUTPUT, LIBFLAG_XSI_OUTPUT,
    ' LIBFLAG_XGL_OUTPUT, LIBFLAG_CABLEMOD_OUTPUT, LIBFLAG_SAVE_LXO_HIERARCHY
    '
    LIBFLAG_HIERARCHY_OUTPUT = 259

    ' Avatar pelvis location flag
    ' flag = 0 - pelvis centered at origin
    ' flag = 1 - feet on ground
    '
    ' AV_LOCATION_PELVIS   0
    ' AV_LOCATION_FEET     1
    '
    ' use in place of LIBFLAG_XGL_LOCATION
    '
    LIBFLAG_AV_LOCATION_OUTPUT = 260


    ' if set, display OpenGL Snapshot messages for debug purposes
    ' Note: LIBFLAG_DISPLAY_OGL_DEBUG_MSGS must also be set
    '
    LIBFLAG_DISPLAY_OGL_SNAPSHOT_DEBUG_MSGS = 261

    ' UP Axis when writing Collada DAE files
    '
    ' COLLADA_UP_AXIS_X     0
    ' COLLADA_UP_AXIS_Y     1
    ' COLLADA_UP_AXIS_Z     2
    '
    LIBFLAG_COLLADA_OUTPUT_UP_AXIS = 262


    ' if set, zoom speeds automatically change while zooming
    '
    LIBFLAG_CAMERA_ZOOM_SPEED_AUTOMATIC = 263


    ' if set, after read invert transparencies if all layers are transparent
    '
    LIBFLAG_CHECK_AND_FIX_TRANSPARENCIES = 264

    ' if set, after reading KMZ file apply the KMZ model factors
    '
    LIBFLAG_KMZ_INPUT_MODEL_FACTORS = 265

    ' if set, always write transparency to Collada DAE files
    '
    LIBFLAG_ALWAYS_WRITE_COLLADA_TRANSPARENCY = 266

    ' TrueType Fonts - continued
    '
    ' if set, reverse points in outline
    '
    LIBFLAG_TT_REVERSE_OUTLINES = 267

    ' if set, make all vertices on the curve
    '
    LIBFLAG_TT_ON_CURVE = 268

    ' if set, keep original vertex coordinates
    '
    LIBFLAG_TT_ORIG_VERTS = 269

    ' if set, base height on all characters in the character set
    '
    LIBFLAG_TT_ALL_CHARS = 270

    ' if set, VRML extrusions will done with a miter joint
    '
    LIBFLAG_VRML_MITER_JOINT_EXTRUSION = 271

    ' before a 3D model is exported to a 3D file format, any embedded textures
    ' are first relocated to a folder which will be a child of the folder
    ' to which the 3D file is exported.
    ' if the flag is set, a partial texture path will be written to the 3D file
    ' otherwise a full texture path will be written.
    '
    LIBFLAG_EMBEDDED_TEXTURES_PARTIAL_PATH = 272

  End Enum


  ' ------------------
  ' OpenGL Render Type
  ' ------------------
  Public Enum At3d_OglRender
    OGL_RENDER_POINTCLOUD = 0
    OGL_RENDER_BOUNDINGBOX = 1
    OGL_RENDER_WIREFRAME_ONECOLOR = 2
    OGL_RENDER_HIDDEN_WIREFRAME_ONECOLOR = 3
    OGL_RENDER_WIREFRAME_MULTICOLOR = 4
    OGL_RENDER_HIDDEN_WIREFRAME_MULTICOLOR = 5
    OGL_RENDER_FLAT_EDGE = 6
    OGL_RENDER_FLAT = 7
    OGL_RENDER_SMOOTH = 8
    OGL_RENDER_SMOOTH_EDGE = 9
  End Enum


  ' --------------
  ' Material Flags
  ' --------------
  Enum At3d_MatFlag
    MATFLAG_F1_AMBIENT = 0   ' range: 0.0 to 1.0
    MATFLAG_F3_AMBIENT = 1   ' range: 0.0 to 1.0
    MATFLAG_F1_DIFFUSE = 2   ' range: 0.0 to 1.0
    MATFLAG_F3_DIFFUSE = 3   ' range: 0.0 to 1.0
    MATFLAG_F1_SPECULAR = 4   ' range: 0.0 to 1.0
    MATFLAG_F3_SPECULAR = 5   ' range: 0.0 to 1.0
    MATFLAG_F3_EMISSIVE = 6   ' range: 0.0 to 1.0
    MATFLAG_F1_ROUGHNESS = 7   ' range: 0.0 to 1.0
    MATFLAG_F1_SHININESS = 8   ' range: 0.0 to 1.0
    MATFLAG_F1_TRANSPARENCY = 9   ' range: 0.0 to 1.0
    MATFLAG_F3_TRANSPARENCY = 10   ' range: 0.0 to 1.0
    MATFLAG_F1_INDEXREFRACTION = 11
    MATFLAG_F1_CREASEANGLE = 12    ' >= 0.0 radians
    MATFLAG_F1_REFLECTION = 13     ' range: 0.0 to 1.0
    MATFLAG_F3_REFLECTION = 14     ' range: 0.0 to 1.0
    MATFLAG_F3_COLOR = 15          ' range: 0.0 to 1.0
    '                                use with ambient1, diffuse1, specular1


    MATFLAG_I1_DXF_COLOR = 100   ' range: 1 to 255
    MATFLAG_I1_DOUBLESIDED = 101   ' 0 or 1

    ' RWX_POINTCLOUD   0
    ' RWX_WIREFRAME    1
    ' RWX_SOLID        2
    '
    MATFLAG_I1_RWX_GEOMETRYSAMPLING = 102

    ' RWX_FACET   0
    ' RWX_VERTEX  1
    '
    MATFLAG_I1_RWX_LIGHTSAMPLING = 103

    ' RWX_NULL         0
    ' RWX_LIT          1
    ' RWX_FORESHORTEN  2
    ' RWX_FILTER       4
    '
    MATFLAG_I1_RWX_TEXTUREMODES = 104

    MATFLAG_I1_RWX_TAG = 105    'obsolete
    MATFLAG_I1_RWX_CLUMPTAG = 105

    MATFLAG_I1_RWX_FACETAG = 106
  End Enum


  ' ---------
  ' Color Map
  ' ---------
  Public Enum At3d_CMap
    ' Section 1:  DXF Pens
    '
    CMAP_DXF_PEN_0 = 0  ' DXF Pen 0 is background color
    CMAP_DXF_PEN_1 = 1  ' DXF Pen 1 to DXF Pen 255 are
    CMAP_DXF_PEN_255 = 255  ' used to draw the entities

    ' Section 2: Backgrounds for original software viewer
    '
    CMAP_COLOR_BACKGROUND = 256  ' color shades background
    CMAP_GREY_BACKGROUND = 257  ' grey shades background

    ' Section 3: Avatar module
    '
    CMAP_AV_SELECT = 258  ' avatar selected layer
    CMAP_AV_OTHER = 259  ' avatar other layers
    CMAP_AV_EDGE = 260  ' avatar edge on polygon
    CMAP_AV_JOINT = 261  ' avatar joint
    CMAP_AV_BACKGROUND1 = 262   ' avatar background 1   - wireframe
    CMAP_AV_BACKGROUND2 = 263  ' avatar background 2   - solid painted
    CMAP_AV_STAGE_WIREFRAME = 264  ' stage wireframe
    CMAP_AV_STAGE_SQUARE1 = 265  ' stage square 1
    CMAP_AV_STAGE_SQUARE2 = 266  ' stage square 2
    CMAP_OBJECT_BBOX = 267  ' object bounding box

    ' Section 4: OpenGL viewer
    '
    CMAP_OGL_WIRE_UNLIT_EDGE = 268
    CMAP_OGL_WIRE_UNLIT_FILL = 269
    CMAP_OGL_WIRE_LIT_FILL = 270
    CMAP_OGL_FLAT_EDGE = 271
    CMAP_OGL_BACKGROUND = 272
    CMAP_OGL_ALIGN_FRONT = 273
    CMAP_OGL_ALIGN_BACK = 274
    CMAP_OGL_ALIGN_OTHER = 275
    CMAP_OGL_ALIGN_EDGE = 276
    CMAP_OGL_EDIT_LINES = 277
    CMAP_OGL_EDIT_POINTS = 278
    CMAP_OGL_EDIT_PICK = 279
    CMAP_OGL_EDIT_MULTIPICK = 280
    CMAP_OGL_EDIT_OTHER = 281
    CMAP_OGL_EDIT_GHOST = 282
    CMAP_OGL_EDIT_GRID = 283
    CMAP_OGL_EDIT_DRAG = 284
    CMAP_OGL_JOIN_RED = 285
    CMAP_OGL_JOIN_BLUE = 286
    CMAP_OGL_JOIN_OTHER = 287
    CMAP_OGL_LAYER_TARGET = 288
    CMAP_OGL_LAYER_MOVE = 289
    CMAP_OGL_LAYER_OTHER = 290
    CMAP_AV_GHOST_PAST = 291
    CMAP_AV_GHOST_FUTURE = 292
    CMAP_OGL_ARROW_X = 293
    CMAP_OGL_ARROW_Y = 294
    CMAP_OGL_ARROW_Z = 295
    CMAP_OGL_TRIANGLE_OPS_STAY = 296
    CMAP_OGL_TRIANGLE_OPS_MOVE = 297
    CMAP_OGL_TRIANGLE_OPS_TARGET = 298
    CMAP_OGL_TRIANGLE_OPS_OTHER = 299
    CMAP_OGL_TRIANGLE_OPS_EDGE = 300
    CMAP_OGL_TRIANGLE_OPS_UNDO_STAY = 301
    CMAP_OGL_TRIANGLE_OPS_UNDO_MOVE = 302
    CMAP_OGL_EDIT_PICKED_LINES = 303
    CMAP_OGL_EDIT_FILL = 304
    CMAP_OGL_EDIT_LASSO = 305
    CMAP_OGL_ALIGN_LASSO = 306
    CMAP_OGL_MODIFY_QUADS_PLANAR = 307
    CMAP_OGL_MODIFY_QUADS_NONPLANAR = 308
    CMAP_OGL_MODIFY_QUADS_TRIANGLE = 309
    CMAP_OGL_MODIFY_QUADS_PICK_TRIANGLE = 310
    CMAP_OGL_MODIFY_QUADS_PICK_QUAD = 311
    CMAP_OGL_MODIFY_QUADS_PICK_QUAD_BENT = 312
    CMAP_OGL_MODIFY_QUADS_OTHER_FILL = 313
    CMAP_OGL_MODIFY_QUADS_LINES = 314
    CMAP_OGL_MODIFY_QUADS_PICK_LINES = 315
    CMAP_OGL_MODIFY_QUADS_OTHER_LINES = 316
    CMAP_OGL_MODIFY_QUADS_POINTS = 317
    CMAP_OGL_MODIFY_QUADS_PICK_POINT = 318
  End Enum


  ' -------------
  ' DEM Color Map
  ' -------------
  Public Enum At3d_DemCMap
    DEM_CMAP_2D_0 = 0  ' use indices 0 to 3 to draw 2D contour lines below sea level
    DEM_CMAP_2D_SEA_LEVEL = 4
    DEM_CMAP_2D_31 = 243  ' 0 is the lowest elevation and 243 is the highest

    DEM_CMAP_BACKGROUND = 244  ' background color for landscapes

    DEM_CMAP_PEN_0 = 245  ' use indices 245 to 254 for the pen colors to draw
    DEM_CMAP_PEN_9 = 254  ' new features on the 2D contour map

    DEM_CMAP_LAKE = 255  ' color to draw the lakes
  End Enum


  ' --------------------------------------------
  ' pens for drawing in original software viewer
  ' --------------------------------------------
  Public Enum At3d_DrawPen
    DRAWPEN_POINTS = 0
    DRAWPEN_LINES = 1
    DRAWPEN_PICK = 2
    DRAWPEN_MULTI = 3
    DRAWPEN_SCALE = 4
    DRAWPEN_GRID = 5
    DRAWPEN_GHOST = 6
    DRAWPEN_EDGE = 7
    DRAWPEN_FRONT = 8
    DRAWPEN_BACK = 9
    DRAWPEN_OTHER = 10
    DRAWPEN_JOINRED = 11
    DRAWPEN_JOINBLUE = 12
    DRAWPEN_JOINOTHER = 13
    DRAWPEN_TARGETLAYER = 14
    DRAWPEN_MOVELAYER = 15
    DRAWPEN_OTHERLAYER = 16
    DRAWPEN_AVJOINT = 17
    DRAWPEN_AVBBOX = 18
    DRAWPEN_OBJECTBBOX = 19
  End Enum

  ' --------------------------------
  '  values for transferFromTypeFlag
  ' --------------------------------
  Public Enum At3d_TransferFromFlag
    TYPE_BASIC = 0
    TYPE_ARRAYS = 1
    TYPE_XYZ_UV = 2
  End Enum

  ' -------------------------------------------
  ' type of map to use to create UV coordinates
  ' -------------------------------------------
  Public Enum At3d_TextureMapType
    TEXTUREMAP_PLANAR = 0
    TEXTUREMAP_CYLINDRICAL = 1
    TEXTUREMAP_SPHERICAL = 2
  End Enum

  ' ----------------------
  ' edit: pick vertex mode
  ' ----------------------
  Public Enum At3d_EditPickVertexMode
    EDIT_PICK_VERTEX_FIRST = 0
    EDIT_PICK_VERTEX_CONNECTED = 1
    EDIT_PICK_VERTEX_ANYWHERE = 2
    EDIT_PICK_VERTEX_ERASE = 3
    EDIT_PICK_VERTEX_DELETE_ALL = 4
    EDIT_PICK_VERTEX_SWITCH_FIRST = 5
  End Enum

  ' --------------------------
  ' edit upper or lower bevels
  ' --------------------------
  Public Enum At3d_EditBevelType
    EDIT_BEVELS_UPPER = 0
    EDIT_BEVELS_LOWER = 1
  End Enum

  ' -------------------
  ' edit: extrude flags
  ' -------------------
  Public Enum At3d_EditExtrudeFlags
    EDIT_FLAG_UPPER_FACES = 0
    EDIT_FLAG_UPPER_BEVELS = 1
    EDIT_FLAG_LOWER_FACES = 2
    EDIT_FLAG_LOWER_BEVELS = 3
  End Enum

  '--------------------------
  ' view window: camera flags
  ' -------------------------
  Public Enum At3d_CameraFlags
    CAMERA_ROTATE_SPEED_1 = 0
    CAMERA_ROTATE_SPEED_2 = 1
    '
    CAMERA_ZOOM_SPEED_1 = 0
    CAMERA_ZOOM_SPEED_2 = 1
    CAMERA_ZOOM_SPEED_3 = 2
    CAMERA_ZOOM_SPEED_4 = 3
    CAMERA_ZOOM_SPEED_5 = 4
    CAMERA_ZOOM_SPEED_6 = 5
  End Enum

  ' -------------------------
  ' extruce pseudo 2D surface
  ' -------------------------
  Public Enum At3d_Extrude2DFlags
    EXTRUDE_PSEUDO2D_NORMAL = 0
    EXTRUDE_PSEUDO2D_FLAT_TOP = 1
    EXTRUDE_PSEUDO2D_FLAT_BOTTOM = 2
	End Enum

	' -------------------------
	' KML values for doc.kml for Google Earth
	' -------------------------
	Public Enum At3d_Kml
		KML_CLAMP_TO_GROUND = 0
		KML_RELATIVE_TO_GROUND = 1
		KML_ABSOLUTE = 2
		KML_RELATIVE_TO_SEA_FLOOR = 3
		KML_CLAMP_TO_SEA_FLOOR = 4

		KML_ALTITUDE_MODE_COUNT = 5
	End Enum
	
End Module
