236 lines
7.8 KiB
C++
236 lines
7.8 KiB
C++
/***********************************************************
|
|
* File generated by the HALCON-Compiler hcomp version 18.05
|
|
* 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;
|
|
|
|
// 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;
|
|
|
|
// 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;
|
|
|
|
// 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;
|
|
|
|
// 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;
|
|
|
|
// 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;
|
|
|
|
// 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;
|
|
|
|
};
|
|
|
|
// 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
|