Class Circle
Definition
- Assembly:
- Tizen.NUI.Physics2D.dll
A circle shape defined by a radius This is the fastest and simplest collision shape
public class Circle : Shape
- Inheritance
Constructors
View SourceCircle(Body, double, Vect)
Create and initialize an offset circle polygon shape.
Declaration
public Circle(Body body, double radius, Vect offset)
Parameters
Type | Name | Description |
---|---|---|
Body | body | The body to attach the circle to. |
double | radius | The radius of the circle. |
Vect | offset | The offset from the body's center of gravity in coordinates local to the body. |
Circle(Body, double)
Create and initialize a circle polygon shape.
Declaration
public Circle(Body body, double radius)
Parameters
Type | Name | Description |
---|---|---|
Body | body | The body to attach the circle to. |
double | radius | The radius of the circle. |
Properties
View SourceArea
Get the calculated area of the circle.
Declaration
public double Area { get; }
Property Value
Type | Description |
---|---|
double |
Offset
Get the offset of the circle.
Declaration
public Vect Offset { get; }
Property Value
Type | Description |
---|---|
Vect |
Radius
Get the radius of the circle.
Declaration
public double Radius { get; }
Property Value
Type | Description |
---|---|
double |
Methods
View SourceAreaForCircle(double, double)
Calculate the area of a circle or donut.
Declaration
public static double AreaForCircle(double innerRadius, double radius)
Parameters
Type | Name | Description |
---|---|---|
double | innerRadius | The radius of the 'donut hole', which defines the area missing. |
double | radius | The outer radius of the donut. This should be greater than the
|
Returns
Type | Description |
---|---|
double |
MomentForCircle(double, double, double, Vect)
Calculate the moment of inertia for the circle.
Declaration
public static double MomentForCircle(double mass, double innerRadius, double radius, Vect offset)
Parameters
Type | Name | Description |
---|---|---|
double | mass | |
double | innerRadius | |
double | radius | |
Vect | offset |
Returns
Type | Description |
---|---|
double |
MomentForCircle(double, double, Vect)
Calculate the moment of inertia for the circle.
Declaration
public static double MomentForCircle(double mass, double radius, Vect offset)
Parameters
Type | Name | Description |
---|---|---|
double | mass | |
double | radius | |
Vect | offset |
Returns
Type | Description |
---|---|
double |
MomentForMass(double)
Calculate the moment of the circle for the given mass.
Declaration
public double MomentForMass(double mass)
Parameters
Type | Name | Description |
---|---|---|
double | mass |
Returns
Type | Description |
---|---|
double |