123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271 |
- /***********************************************************
- * 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 T> class HSmartPtr;
- template<class T> class HHandleBaseArrayRef;
- typedef HHandleBaseArrayRef<HScene3D> 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
|