Class unit


public class unit extends X3DConcreteStatement
Functional summary: unit statement defines data-conversion factors for typed values defined in a scene. This concrete class represents an X3D unit statement.

X3D statement tooltip: (X3D version 3.3 or later) [X3D statement] A unit statement defines data-conversion factors for typed values defined within a scene. ` X3D specification: 4.3.6 Standard units and coordinate system defines how scale factors can modify an entire scene. Scale-conversion constants provide correct names and values for common conversion factors. References:
See Also:
X3D Abstract Specification: unit, X3D Tooltips: unit, X3D Scene Authoring Hints
  • Field Details

    • CONVERSIONFACTOR_ANGLES_toRadiansFromDegrees

      public static final double CONVERSIONFACTOR_ANGLES_toRadiansFromDegrees
      unit statement conversionFactor for converting scene values of angles to Radians from Degrees
      See Also:
      Constant Field Values
    • CONVERSIONFACTOR_ANGLES_toRadiansFromFullCircle

      public static final double CONVERSIONFACTOR_ANGLES_toRadiansFromFullCircle
      unit statement conversionFactor for converting scene values of angles to Radians from FullCircle
      See Also:
      Constant Field Values
    • CONVERSIONFACTOR_ANGLES_toRadiansFromGrads

      public static final double CONVERSIONFACTOR_ANGLES_toRadiansFromGrads
      unit statement conversionFactor for converting scene values of angles to Radians from Grads
      See Also:
      Constant Field Values
    • CONVERSIONFACTOR_LENGTH_toMetersFromPica

      public static final double CONVERSIONFACTOR_LENGTH_toMetersFromPica
      unit statement conversionFactor for converting scene values of length to Meters from Pica
      See Also:
      Constant Field Values
    • CONVERSIONFACTOR_LENGTH_toMetersFromInches

      public static final double CONVERSIONFACTOR_LENGTH_toMetersFromInches
      unit statement conversionFactor for converting scene values of length to Meters from Inches
      See Also:
      Constant Field Values
    • CONVERSIONFACTOR_LENGTH_toMetersFromFeet

      public static final double CONVERSIONFACTOR_LENGTH_toMetersFromFeet
      unit statement conversionFactor for converting scene values of length to Meters from Feet
      See Also:
      Constant Field Values
    • CONVERSIONFACTOR_LENGTH_toMetersFromYards

      public static final double CONVERSIONFACTOR_LENGTH_toMetersFromYards
      unit statement conversionFactor for converting scene values of length to Meters from Yards
      See Also:
      Constant Field Values
    • CONVERSIONFACTOR_LENGTH_toMetersFromFathoms

      public static final double CONVERSIONFACTOR_LENGTH_toMetersFromFathoms
      unit statement conversionFactor for converting scene values of length to Meters from Fathoms
      See Also:
      Constant Field Values
    • CONVERSIONFACTOR_LENGTH_toMetersFromFurlongs

      public static final double CONVERSIONFACTOR_LENGTH_toMetersFromFurlongs
      unit statement conversionFactor for converting scene values of length to Meters from Furlongs
      See Also:
      Constant Field Values
    • CONVERSIONFACTOR_LENGTH_toMetersFromMiles

      public static final double CONVERSIONFACTOR_LENGTH_toMetersFromMiles
      unit statement conversionFactor for converting scene values of length to Meters from Miles
      See Also:
      Constant Field Values
    • CONVERSIONFACTOR_LENGTH_toMetersFromNauticalMiles

      public static final double CONVERSIONFACTOR_LENGTH_toMetersFromNauticalMiles
      unit statement conversionFactor for converting scene values of length to Meters from Nautical Miles
      See Also:
      Constant Field Values
    • CONVERSIONFACTOR_LENGTH_toMetersFromMicrons

      public static final double CONVERSIONFACTOR_LENGTH_toMetersFromMicrons
      unit statement conversionFactor for converting scene values of length to Meters from Microns
      See Also:
      Constant Field Values
    • CONVERSIONFACTOR_LENGTH_toMetersFromMillimeters

      public static final double CONVERSIONFACTOR_LENGTH_toMetersFromMillimeters
      unit statement conversionFactor for converting scene values of length to Meters from Millimeters
      See Also:
      Constant Field Values
    • CONVERSIONFACTOR_LENGTH_toMetersFromCentimeters

      public static final double CONVERSIONFACTOR_LENGTH_toMetersFromCentimeters
      unit statement conversionFactor for converting scene values of length to Meters from Centimeters
      See Also:
      Constant Field Values
    • CONVERSIONFACTOR_LENGTH_toMetersFromKilometers

      public static final double CONVERSIONFACTOR_LENGTH_toMetersFromKilometers
      unit statement conversionFactor for converting scene values of length to Meters from Kilometers
      See Also:
      Constant Field Values
    • CONVERSIONFACTOR_FORCE_toNewtonsFromDynes

      public static final double CONVERSIONFACTOR_FORCE_toNewtonsFromDynes
      unit statement conversionFactor for converting scene values of force to Newtons from Dynes
      See Also:
      Constant Field Values
    • CONVERSIONFACTOR_FORCE_toNewtonsFromKilogramForce

      public static final double CONVERSIONFACTOR_FORCE_toNewtonsFromKilogramForce
      unit statement conversionFactor for converting scene values of force to Newtons from Kilogram-force
      See Also:
      Constant Field Values
    • CONVERSIONFACTOR_FORCE_toNewtonsFromPoundsForce

      public static final double CONVERSIONFACTOR_FORCE_toNewtonsFromPoundsForce
      unit statement conversionFactor for converting scene values of force to Newtons from Pounds-force
      See Also:
      Constant Field Values
    • CONVERSIONFACTOR_FORCE_toNewtonsFromPoundal

      public static final double CONVERSIONFACTOR_FORCE_toNewtonsFromPoundal
      unit statement conversionFactor for converting scene values of force to Newtons from Poundal
      See Also:
      Constant Field Values
    • CONVERSIONFACTOR_MASS_toKilogramsFromGrains

      public static final double CONVERSIONFACTOR_MASS_toKilogramsFromGrains
      unit statement conversionFactor for converting scene values of mass to Kilograms (kg) from Grains Avoirdupois (gr)
      See Also:
      Constant Field Values
    • CONVERSIONFACTOR_MASS_toKilogramsFromDrams

      public static final double CONVERSIONFACTOR_MASS_toKilogramsFromDrams
      unit statement conversionFactor for converting scene values of mass to Kilograms (kg) from Drams Avoirdupois (dr)
      See Also:
      Constant Field Values
    • CONVERSIONFACTOR_MASS_toKilogramsFromOunces

      public static final double CONVERSIONFACTOR_MASS_toKilogramsFromOunces
      unit statement conversionFactor for converting scene values of mass to Kilograms (kg) from Ounces Avoirdupois (oz)
      See Also:
      Constant Field Values
    • CONVERSIONFACTOR_MASS_toKilogramsFromTroyOunces

      public static final double CONVERSIONFACTOR_MASS_toKilogramsFromTroyOunces
      unit statement conversionFactor for converting scene values of mass to Kilograms (kg) from Troy Ounces (toz)
      See Also:
      Constant Field Values
    • CONVERSIONFACTOR_MASS_toKilogramsFromPounds

      public static final double CONVERSIONFACTOR_MASS_toKilogramsFromPounds
      unit statement conversionFactor for converting scene values of mass to Kilograms (kg) from Pounds Avoirdupois (lb)
      See Also:
      Constant Field Values
    • CONVERSIONFACTOR_MASS_toKilogramsFromStone

      public static final double CONVERSIONFACTOR_MASS_toKilogramsFromStone
      unit statement conversionFactor for converting scene values of mass to Kilograms (kg) from Stone, i.e. 14 Pounds Avoirdupois (lb)
      See Also:
      Constant Field Values
    • CONVERSIONFACTOR_MASS_toKilogramsFromTons

      public static final double CONVERSIONFACTOR_MASS_toKilogramsFromTons
      unit statement conversionFactor for converting scene values of mass to Kilograms (kg) from Tons (U.S. short)
      See Also:
      Constant Field Values
    • CONVERSIONFACTOR_MASS_toKilogramsFrom

      public static final double CONVERSIONFACTOR_MASS_toKilogramsFrom
      unit statement conversionFactor for converting scene values of mass to Kilograms (kg) from Micrograms
      See Also:
      Constant Field Values
    • CONVERSIONFACTOR_MASS_toKilogramsFromMilligrams

      public static final double CONVERSIONFACTOR_MASS_toKilogramsFromMilligrams
      unit statement conversionFactor for converting scene values of mass to Kilograms (kg) from Milligrams
      See Also:
      Constant Field Values
    • CONVERSIONFACTOR_MASS_toKilogramsFromCentigrams

      public static final double CONVERSIONFACTOR_MASS_toKilogramsFromCentigrams
      unit statement conversionFactor for converting scene values of mass to Kilograms (kg) from Centigrams
      See Also:
      Constant Field Values
    • CONVERSIONFACTOR_MASS_toKilogramsFromCarats

      public static final double CONVERSIONFACTOR_MASS_toKilogramsFromCarats
      unit statement conversionFactor for converting scene values of mass to Kilograms (kg) from Carats
      See Also:
      Constant Field Values
    • CONVERSIONFACTOR_MASS_toKilogramsFromGrams

      public static final double CONVERSIONFACTOR_MASS_toKilogramsFromGrams
      unit statement conversionFactor for converting scene values of mass to Kilograms (kg) from Grams (g)
      See Also:
      Constant Field Values
    • CONVERSIONFACTOR_MASS_toKilogramsFromDekagrams

      public static final double CONVERSIONFACTOR_MASS_toKilogramsFromDekagrams
      unit statement conversionFactor for converting scene values of mass to Kilograms (kg) from Dekagrams
      See Also:
      Constant Field Values
    • CONVERSIONFACTOR_MASS_toKilogramsFromMetricTonnes

      public static final double CONVERSIONFACTOR_MASS_toKilogramsFromMetricTonnes
      unit statement conversionFactor for converting scene values of mass to Kilograms (kg) from Metric Tonnes (t)
      See Also:
      Constant Field Values
    • CATEGORY_ANGLE

      public static final String CATEGORY_ANGLE
      Tooltip: angle default is radians. SFString field named category with X3DUOM simpleType unitCategoryChoices and with X3DUOM baseType xs:NMTOKEN can equal this value "angle" (Java syntax) or angle (XML syntax).
      See Also:
      XML Schema: unitCategoryChoices, Constant Field Values
    • CATEGORY_FORCE

      public static final String CATEGORY_FORCE
      Tooltip: force default is newtons. SFString field named category with X3DUOM simpleType unitCategoryChoices and with X3DUOM baseType xs:NMTOKEN can equal this value "force" (Java syntax) or force (XML syntax).
      See Also:
      XML Schema: unitCategoryChoices, Constant Field Values
    • CATEGORY_LENGTH

      public static final String CATEGORY_LENGTH
      Tooltip: length default is meters. SFString field named category with X3DUOM simpleType unitCategoryChoices and with X3DUOM baseType xs:NMTOKEN can equal this value "length" (Java syntax) or length (XML syntax).
      See Also:
      XML Schema: unitCategoryChoices, Constant Field Values
    • CATEGORY_MASS

      public static final String CATEGORY_MASS
      Tooltip: mass default is kilograms. SFString field named category with X3DUOM simpleType unitCategoryChoices and with X3DUOM baseType xs:NMTOKEN can equal this value "mass" (Java syntax) or mass (XML syntax).
      See Also:
      XML Schema: unitCategoryChoices, Constant Field Values
    • NAME

      public static final String NAME
      String constant NAME provides name of this element: unit.
      See Also:
      Constant Field Values
    • COMPONENT

      public static final String COMPONENT
      String constant COMPONENT defines X3D component for the unit element: Core
      See Also:
      Constant Field Values
    • LEVEL

      public static final int LEVEL
      Integer constant LEVEL provides default X3D Core component level for this element: 1
      See Also:
      Constant Field Values
    • CATEGORY_DEFAULT_VALUE

      public static final String CATEGORY_DEFAULT_VALUE
      SFString field named category has default value equal to an empty string.
      See Also:
      Constant Field Values
    • CONVERSIONFACTOR_DEFAULT_VALUE

      public static final double CONVERSIONFACTOR_DEFAULT_VALUE
      SFDouble field named conversionFactor has default value 1.0 (Java syntax) or 1.0 (XML syntax).
      See Also:
      Constant Field Values
    • NAME_DEFAULT_VALUE

      public static final String NAME_DEFAULT_VALUE
      SFString field named name has default value equal to an empty string.
      See Also:
      Constant Field Values
  • Constructor Details

    • unit

      public unit()
      Constructor for unit to initialize member variables with default values.
    • unit

      public unit(String newName, String newCategory, float newConversionFactor)
      Utility constructor that assigns name-category-conversionFactor triplet attributes.
      Parameters:
      newName - name for this unit statement
      newCategory - category value for this unit statement
      newConversionFactor - conversion factor for this unit statement
      See Also:
      X3D Tooltips: meta, X3D Scene Authoring Hints: Scale Factors and Unit Conversions
    • unit

      public unit(String newName, String newCategory, double newConversionFactor)
      Utility constructor that assigns name-category-conversionFactor triplet attributes.
      Parameters:
      newName - name for this unit statement
      newCategory - category value for this unit statement
      newConversionFactor - conversion factor for this unit statement
      See Also:
      X3D Tooltips: meta, X3D Scene Authoring Hints: Scale Factors and Unit Conversions
  • Method Details