fr.cnes.sirius.patrius.assembly.properties
Class SensorProperty

java.lang.Object
  extended by fr.cnes.sirius.patrius.assembly.properties.SensorProperty
All Implemented Interfaces:
IPartProperty

public final class SensorProperty
extends Object
implements IPartProperty

This class represents a generic sensor property for a part of the assembly. This sensor is defined by a sight axis and some optional features : a target, some fields of view and inhibition.

Since:
1.2
Version:
$Id: SensorProperty.java 16427 2016-08-04 16:31:07Z rodrigues $
Author:
Thomas Trapier
See Also:
IPartProperty, IFieldOfView
Concurrency :
not thread-safe

Constructor Summary
SensorProperty(Vector3D sightAxis)
          Constructor of the generic sensor property
 
Method Summary
 IFieldOfView[] getInhibitionFields()
           
 PVCoordinatesProvider[] getInhibitionTargets()
           
 LocalRadiusProvider[] getInhibitionTargetsRadiuses()
           
 Vector3D getInSightAxis()
           
 IFieldOfView getMainField()
           
 PVCoordinatesProvider getMainTarget()
           
 LocalRadiusProvider getMainTargetRadius()
           
 Vector3D[] getReferenceAxis()
           
 PropertyType getType()
          Get the type of the property.
 void setInhibitionFieldsAndTargets(IFieldOfView[] fields, PVCoordinatesProvider[] targets, LocalRadiusProvider[] targetRadiuses)
          Sets the arrays of inhibition fields and the associated targets : the two array must have the same length.
 void setMainFieldOfView(IFieldOfView field)
          Sets the main field of view of this sensor
 void setMainTarget(PVCoordinatesProvider target, LocalRadiusProvider radius)
          Sets the main target of the sensor
 void setReferenceAxis(Vector3D[] refAxis)
          Sets the reference axis
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SensorProperty

public SensorProperty(Vector3D sightAxis)
Constructor of the generic sensor property

Parameters:
sightAxis - the main sight axis of this sensor.
Method Detail

setMainFieldOfView

public void setMainFieldOfView(IFieldOfView field)
Sets the main field of view of this sensor

Parameters:
field - the new main field of view

setInhibitionFieldsAndTargets

public void setInhibitionFieldsAndTargets(IFieldOfView[] fields,
                                          PVCoordinatesProvider[] targets,
                                          LocalRadiusProvider[] targetRadiuses)
Sets the arrays of inhibition fields and the associated targets : the two array must have the same length.

Parameters:
fields - the inhibition fields
targets - the targets associated to those fields
targetRadiuses - the radiuses of the target objects

setReferenceAxis

public void setReferenceAxis(Vector3D[] refAxis)
Sets the reference axis

Parameters:
refAxis - the axis array

getInSightAxis

public Vector3D getInSightAxis()
Returns:
the main sight axis (in the part's frame)

getMainField

public IFieldOfView getMainField()
Returns:
the main field of view (in the part's frame)

getInhibitionFields

public IFieldOfView[] getInhibitionFields()
Returns:
the inhibition fields array (in the part's frame)

getInhibitionTargets

public PVCoordinatesProvider[] getInhibitionTargets()
Returns:
the inhibition targets array

getInhibitionTargetsRadiuses

public LocalRadiusProvider[] getInhibitionTargetsRadiuses()
Returns:
the inhibition targets radiuses

getReferenceAxis

public Vector3D[] getReferenceAxis()
Returns:
the reference axis array (in the part's frame)

setMainTarget

public void setMainTarget(PVCoordinatesProvider target,
                          LocalRadiusProvider radius)
Sets the main target of the sensor

Parameters:
target - the new main target center
radius - the target's radius (set 0.0 for to create a simple point target)

getMainTarget

public PVCoordinatesProvider getMainTarget()
Returns:
the main target center

getMainTargetRadius

public LocalRadiusProvider getMainTargetRadius()
Returns:
the main target radius

getType

public PropertyType getType()
Get the type of the property.

Specified by:
getType in interface IPartProperty
Returns:
the type of the property (see PropertyType enumeration)


Copyright © 2016 CNES. All Rights Reserved.