/*********************************************************** * File generated by the HALCON-Compiler hcomp version 20.11 * Usage: Interface to C++ * * Software by: MVTec Software GmbH, www.mvtec.com ***********************************************************/ #ifndef HCPP_HSCENE3D #define HCPP_HSCENE3D namespace HalconCpp { // Represents an instance of a 3D graphic scene. class LIntExport HScene3D : public HHandle { public: // Copy constructor HScene3D(const HScene3D& source) : HHandle(source) {} // Copy constructor HScene3D(const HHandle& handle); // Create HScene3D from handle, taking ownership explicit HScene3D(Hlong handle); bool operator==(const HHandle& obj) const { return HHandleBase::operator==(obj); } bool operator!=(const HHandle& obj) const { return HHandleBase::operator!=(obj); } protected: // Verify matching semantic type ('scene_3d')! virtual void AssertType(Hphandle handle) const; public: /***************************************************************************** * Operator-based class constructors *****************************************************************************/ // create_scene_3d: Create the data structure that is needed to visualize collections of 3D objects. explicit HScene3D(); /*************************************************************************** * Operators * ***************************************************************************/ // Get the depth or the index of instances in a displayed 3D scene. HTuple GetDisplayScene3dInfo(const HWindow& WindowHandle, const HTuple& Row, const HTuple& Column, const HTuple& Information) const; // Get the depth or the index of instances in a displayed 3D scene. Hlong GetDisplayScene3dInfo(const HWindow& WindowHandle, double Row, double Column, const HString& Information) const; // Get the depth or the index of instances in a displayed 3D scene. Hlong GetDisplayScene3dInfo(const HWindow& WindowHandle, double Row, double Column, const char* Information) const; #ifdef _WIN32 // Get the depth or the index of instances in a displayed 3D scene. Hlong GetDisplayScene3dInfo(const HWindow& WindowHandle, double Row, double Column, const wchar_t* Information) const; #endif // Set the pose of a 3D scene. void SetScene3dToWorldPose(const HPose& ToWorldPose) const; // Set parameters of a 3D scene. void SetScene3dParam(const HString& GenParamName, const HTuple& GenParamValue) const; // Set parameters of a 3D scene. void SetScene3dParam(const HString& GenParamName, const HString& GenParamValue) const; // Set parameters of a 3D scene. void SetScene3dParam(const char* GenParamName, const char* GenParamValue) const; #ifdef _WIN32 // Set parameters of a 3D scene. void SetScene3dParam(const wchar_t* GenParamName, const wchar_t* GenParamValue) const; #endif // Set parameters of a light in a 3D scene. void SetScene3dLightParam(Hlong LightIndex, const HTuple& GenParamName, const HTuple& GenParamValue) const; // Set parameters of a light in a 3D scene. void SetScene3dLightParam(Hlong LightIndex, const HString& GenParamName, const HString& GenParamValue) const; // Set parameters of a light in a 3D scene. void SetScene3dLightParam(Hlong LightIndex, const char* GenParamName, const char* GenParamValue) const; #ifdef _WIN32 // Set parameters of a light in a 3D scene. void SetScene3dLightParam(Hlong LightIndex, const wchar_t* GenParamName, const wchar_t* GenParamValue) const; #endif // Set the pose of an instance in a 3D scene. void SetScene3dInstancePose(const HTuple& InstanceIndex, const HPoseArray& Pose) const; // Set the pose of an instance in a 3D scene. void SetScene3dInstancePose(Hlong InstanceIndex, const HPose& Pose) const; // Set parameters of an instance in a 3D scene. void SetScene3dInstanceParam(const HTuple& InstanceIndex, const HTuple& GenParamName, const HTuple& GenParamValue) const; // Set parameters of an instance in a 3D scene. void SetScene3dInstanceParam(Hlong InstanceIndex, const HTuple& GenParamName, const HTuple& GenParamValue) const; // Set the pose of a camera in a 3D scene. void SetScene3dCameraPose(Hlong CameraIndex, const HPose& Pose) const; // Render an image of a 3D scene. HImage RenderScene3d(Hlong CameraIndex) const; // Remove a light from a 3D scene. void RemoveScene3dLight(Hlong LightIndex) const; // Remove an object instance from a 3D scene. void RemoveScene3dInstance(const HTuple& InstanceIndex) const; // Remove an object instance from a 3D scene. void RemoveScene3dInstance(Hlong InstanceIndex) const; // Remove a camera from a 3D scene. void RemoveScene3dCamera(Hlong CameraIndex) const; // Display a 3D scene. void DisplayScene3d(const HWindow& WindowHandle, const HTuple& CameraIndex) const; // Display a 3D scene. void DisplayScene3d(const HWindow& WindowHandle, const HString& CameraIndex) const; // Display a 3D scene. void DisplayScene3d(const HWindow& WindowHandle, const char* CameraIndex) const; #ifdef _WIN32 // Display a 3D scene. void DisplayScene3d(const HWindow& WindowHandle, const wchar_t* CameraIndex) const; #endif // Add a light source to a 3D scene. Hlong AddScene3dLight(const HTuple& LightPosition, const HString& LightKind) const; // Add a light source to a 3D scene. Hlong AddScene3dLight(const HTuple& LightPosition, const char* LightKind) const; #ifdef _WIN32 // Add a light source to a 3D scene. Hlong AddScene3dLight(const HTuple& LightPosition, const wchar_t* LightKind) const; #endif // Add an instance of a 3D object model to a 3D scene. Hlong AddScene3dInstance(const HObjectModel3DArray& ObjectModel3D, const HPoseArray& Pose) const; // Add an instance of a 3D object model to a 3D scene. Hlong AddScene3dInstance(const HObjectModel3D& ObjectModel3D, const HPose& Pose) const; // Add a camera to a 3D scene. Hlong AddScene3dCamera(const HCamPar& CameraParam) const; // Delete a 3D scene and free all allocated memory. static void ClearScene3d(const HScene3DArray& Scene3D); // Delete a 3D scene and free all allocated memory. void ClearScene3d() const; // Create the data structure that is needed to visualize collections of 3D objects. void CreateScene3d(); // Add a text label to a 3D scene. Hlong AddScene3dLabel(const HTuple& Text, const HTuple& ReferencePoint, const HTuple& Position, const HTuple& RelatesTo) const; // Add a text label to a 3D scene. Hlong AddScene3dLabel(const HString& Text, const HTuple& ReferencePoint, const HTuple& Position, const HTuple& RelatesTo) const; // Add a text label to a 3D scene. Hlong AddScene3dLabel(const char* Text, const HTuple& ReferencePoint, const HTuple& Position, const HTuple& RelatesTo) const; #ifdef _WIN32 // Add a text label to a 3D scene. Hlong AddScene3dLabel(const wchar_t* Text, const HTuple& ReferencePoint, const HTuple& Position, const HTuple& RelatesTo) const; #endif // Remove a text label from a 3D scene. void RemoveScene3dLabel(const HTuple& LabelIndex) const; // Remove a text label from a 3D scene. void RemoveScene3dLabel(Hlong LabelIndex) const; // Set parameters of a text label in a 3D scene. void SetScene3dLabelParam(const HTuple& LabelIndex, const HString& GenParamName, const HTuple& GenParamValue) const; // Set parameters of a text label in a 3D scene. void SetScene3dLabelParam(Hlong LabelIndex, const HString& GenParamName, const HTuple& GenParamValue) const; // Set parameters of a text label in a 3D scene. void SetScene3dLabelParam(Hlong LabelIndex, const char* GenParamName, const HTuple& GenParamValue) const; #ifdef _WIN32 // Set parameters of a text label in a 3D scene. void SetScene3dLabelParam(Hlong LabelIndex, const wchar_t* GenParamName, const HTuple& GenParamValue) const; #endif }; // forward declarations and types for internal array implementation template class HSmartPtr; template class HHandleBaseArrayRef; typedef HHandleBaseArrayRef HScene3DArrayRef; typedef HSmartPtr< HScene3DArrayRef > HScene3DArrayPtr; // Represents multiple tool instances class LIntExport HScene3DArray : public HHandleBaseArray { public: // Create empty array HScene3DArray(); // Create array from native array of tool instances HScene3DArray(HScene3D* classes, Hlong length); // Copy constructor HScene3DArray(const HScene3DArray &tool_array); // Destructor virtual ~HScene3DArray(); // Assignment operator HScene3DArray &operator=(const HScene3DArray &tool_array); // Clears array and all tool instances virtual void Clear(); // Get array of native tool instances const HScene3D* Tools() const; // Get number of tools virtual Hlong Length() const; // Create tool array from tuple of handles virtual void SetFromTuple(const HTuple& handles); // Get tuple of handles for tool array virtual HTuple ConvertToTuple() const; protected: // Smart pointer to internal data container HScene3DArrayPtr *mArrayPtr; }; } #endif