# Matter
declaration: package: swervelib.math, class: Matter

Package swervelib.math

# Class Matter

java.lang.Object
swervelib.math.Matter

public class Matter extends Object
Object with significant mass that needs to be taken into account.

## Field Summary

Fields
Modifier and Type
Field
Description
`double`
`mass`
Mass in kg of object.
`edu.wpi.first.math.geometry.Translation3d`
`position`
Position in meters from robot center in 3d space.

## Constructor Summary

Constructors
Constructor
Description
`Matter(edu.wpi.first.math.geometry.Translation3d position, double mass)`
Construct an object representing some significant matter on the robot.

## Method Summary

Modifier and Type
Method
Description
`edu.wpi.first.math.geometry.Translation3d`
`massMoment()`
Get the center mass of the object.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### position

public edu.wpi.first.math.geometry.Translation3d position
Position in meters from robot center in 3d space.

### mass

public double mass
Mass in kg of object.

## Constructor Details

### Matter

public Matter(edu.wpi.first.math.geometry.Translation3d position, double mass)
Construct an object representing some significant matter on the robot.

Parameters:
  `position` - Position of the matter in meters.
  `mass` - Mass in kg.

## Method Details

### massMoment

public edu.wpi.first.math.geometry.Translation3d massMoment()
Get the center mass of the object.

Returns:
  center mass = position * mass