com.kuka.nav.geometry
Class DetectionModel

java.lang.Object
  extended by com.kuka.nav.geometry.DetectionModel
All Implemented Interfaces:
com.kuka.parameters.IParameter

public final class DetectionModel
extends Object
implements com.kuka.parameters.IParameter

This class provides a unique system identifier that refers to detectable object data.


Field Summary
static int NO_ID
          default id, means that no id was set.
 
Constructor Summary
DetectionModel(int id, String name)
          Deprecated. the id should not be used anymore, use spatial objects instead
 
Method Summary
 boolean containsObject()
          Checks if this detection model contains a spatial object.
 com.kuka.parameters.IParameter copy()
           
 int getId()
          Returns the id of this detection model.
 String getName()
          Returns the name of this detection model.
 com.kuka.geometry.SpatialObject getObject()
          Returns the spatial object corresponding to this detection model if it exists.
static DetectionModel of(com.kuka.geometry.SpatialObject object)
          Creates a new detection model with the given spatial object.
static DetectionModel of(String templateName)
          Creates a new detection model referencing the object template with the given name.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NO_ID

public static final int NO_ID
default id, means that no id was set.

See Also:
Constant Field Values
Constructor Detail

DetectionModel

@Deprecated
public DetectionModel(int id,
                                 String name)
Deprecated. the id should not be used anymore, use spatial objects instead

Creates a new detection model referencing the object with the given id and name.

Parameters:
id - the id of the object
name - the name of the object
Method Detail

of

public static DetectionModel of(String templateName)
Creates a new detection model referencing the object template with the given name.

Parameters:
templateName - the name of the object template
Returns:
the detection model

of

public static DetectionModel of(com.kuka.geometry.SpatialObject object)
Creates a new detection model with the given spatial object.

Parameters:
object - the spatial object
Returns:
the detection model

getId

public int getId()
Returns the id of this detection model.

Returns:
the id of this detection model

getName

public String getName()
Returns the name of this detection model.

Returns:
the name of this detection model

containsObject

public boolean containsObject()
Checks if this detection model contains a spatial object.

Returns:
true if this detection model contains a spatial object, false otherwise

getObject

public com.kuka.geometry.SpatialObject getObject()
Returns the spatial object corresponding to this detection model if it exists. If it does not exist null is returned. Use containsObject() to check if the spatial object exists.

Returns:
the spatial object

copy

public com.kuka.parameters.IParameter copy()
Specified by:
copy in interface com.kuka.parameters.IParameter

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2019. All rights reserved.