fr.cnes.genopus.nonWidget.vehicle.geometry
Class CustomParallelepiped

java.lang.Object
  extended by fr.cnes.genopus.nonWidget.vehicle.geometry.CustomParallelepiped
All Implemented Interfaces:
Serializable, org.apache.commons.math3.geometry.euclidean.threed.CrossSectionProvider

public class CustomParallelepiped
extends Object
implements org.apache.commons.math3.geometry.euclidean.threed.CrossSectionProvider, Serializable

Parallelepiped shape class.

Author:
sumelzi
See Also:
Serialized Form

Constructor Summary
CustomParallelepiped(double surfX, double surfY, double surfZ)
          Creates a new instance of a parallelepiped.
 
Method Summary
 boolean equals(Object other)
          
 double getCrossSection(org.apache.commons.math3.geometry.euclidean.threed.Vector3D direction)
          
 double getHeight()
          Get z direction dimension (m).
static double getHeightFromSurfs(double surfX, double surfY, double surfZ)
          Get parallelepiped height (Z direction dimension).
 double getLength()
          Get x direction dimension (m).
static double getLengthFromSurfs(double surfX, double surfY, double surfZ)
          Get parallelepiped length (X direction dimension).
 double getSurfX()
          Get surface perpendicular to X axis (m2).
 double getSurfY()
          Get surface perpendicular to Y axis (m2).
 double getSurfZ()
          Get surface perpendicular to Z axis (m2).
 double getWidth()
          Get y direction dimension (m).
static double getWidthFromSurfs(double surfX, double surfY, double surfZ)
          Get parallelepiped width (Y direction dimension).
 int hashCode()
          
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CustomParallelepiped

public CustomParallelepiped(double surfX,
                            double surfY,
                            double surfZ)
Creates a new instance of a parallelepiped.

Parameters:
surfX - surface perpendicular to X axis (m2)
surfY - surface perpendicular to Y axis (m2)
surfZ - surface perpendicular to Z axis (m2)
Method Detail

getCrossSection

public double getCrossSection(org.apache.commons.math3.geometry.euclidean.threed.Vector3D direction)

Specified by:
getCrossSection in interface org.apache.commons.math3.geometry.euclidean.threed.CrossSectionProvider

getSurfX

public double getSurfX()
Get surface perpendicular to X axis (m2).

Returns:
the surfX

getSurfY

public double getSurfY()
Get surface perpendicular to Y axis (m2).

Returns:
the surfY

getSurfZ

public double getSurfZ()
Get surface perpendicular to Z axis (m2).

Returns:
the surfZ

getLength

public double getLength()
                 throws NonWidgetException
Get x direction dimension (m).

Returns:
the length (x direction dimension)
Throws:
NonWidgetException - if surfX is negative or zero (undetermined Length)

getWidth

public double getWidth()
                throws NonWidgetException
Get y direction dimension (m).

Returns:
the width (y direction dimension)
Throws:
NonWidgetException - if surfZ is negative or zero (undetermined Width)

getHeight

public double getHeight()
                 throws NonWidgetException
Get z direction dimension (m).

Returns:
the height (z direction dimension)
Throws:
NonWidgetException - if surfZ is negative or zero (undetermined height)

getWidthFromSurfs

public static double getWidthFromSurfs(double surfX,
                                       double surfY,
                                       double surfZ)
                                throws NonWidgetException
Get parallelepiped width (Y direction dimension).

Parameters:
surfX - surface perpendicular to X axis (m2)
surfY - surface perpendicular to Y axis (m2)
surfZ - surface perpendicular to Z axis (m2)
Returns:
the parallelepiped width (y direction dimension)
Throws:
NonWidgetException - if surfZ is negative or zero (undetermined Width)

getLengthFromSurfs

public static double getLengthFromSurfs(double surfX,
                                        double surfY,
                                        double surfZ)
                                 throws NonWidgetException
Get parallelepiped length (X direction dimension).

Parameters:
surfX - surface perpendicular to X axis (m2)
surfY - surface perpendicular to Y axis (m2)
surfZ - surface perpendicular to Z axis (m2)
Returns:
the parallelepiped length (X direction dimension)
Throws:
NonWidgetException - if surfX is negative or zero (undetermined Length)

getHeightFromSurfs

public static double getHeightFromSurfs(double surfX,
                                        double surfY,
                                        double surfZ)
                                 throws NonWidgetException
Get parallelepiped height (Z direction dimension).

Parameters:
surfX - surface perpendicular to X axis (m2)
surfY - surface perpendicular to Y axis (m2)
surfZ - surface perpendicular to Z axis (m2)
Returns:
the parallelepiped height (Z direction dimension)
Throws:
NonWidgetException - if surfZ is negative or zero (undetermined height)

equals

public boolean equals(Object other)

Overrides:
equals in class Object

hashCode

public int hashCode()

Overrides:
hashCode in class Object

toString

public String toString()

Overrides:
toString in class Object


Copyright © 2017. All rights reserved.