HughPH.Box2D
Organised dotnet bindings for Box2D 3.1.0
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
Box2D.MassData Struct Reference

This holds the mass data computed for a shape. More...

Public Member Functions

override string ToString ()
 Returns a string representation of the mass data.
 
 MassData (float mass, Vec2? center=null, float rotationalInertia=0)
 Constructs a new mass data object.
 
 MassData ()
 Constructs a new mass data object with default values.
 

Public Attributes

float Mass
 The mass of the shape, usually in kilograms.
 
Vec2 Center
 The position of the shape's centroid relative to the shape's origin.
 
float RotationalInertia
 The rotational inertia of the shape about the local origin.
 

Detailed Description

This holds the mass data computed for a shape.

Constructor & Destructor Documentation

◆ MassData()

Box2D.MassData.MassData ( float  mass,
Vec2?  center = null,
float  rotationalInertia = 0 
)
inline

Constructs a new mass data object.

Parameters
massThe mass of the shape, usually in kilograms.
centerThe position of the shape's centroid relative to the shape's origin.
rotationalInertiaThe rotational inertia of the shape about the local origin.

The documentation for this struct was generated from the following file: