Class Shape
Definition
- Namespace:
- Tizen.NUI.Physics2D.Chipmunk
- Assembly:
- Tizen.NUI.Physics2D.dll
public abstract class Shape : IDisposable
- Inheritance
-
- Derived
-
Constructors
View Source
Shape(IntPtr)
Create a Shape with the given shapeHandle
.
Declaration
protected Shape(System.IntPtr shapeHandle)
Parameters
Type |
Name |
Description |
System.IntPtr |
shapeHandle |
The native shape handle.
|
Properties
View Source
Area
Get the calculated area of the shape.
Declaration
public double Area { get; }
Property Value
View Source
Body
The body that this shape is associated with.
Declaration
public Body Body { get; set; }
Property Value
View Source
BoundingBox
Get the bounding box that contains the shape, given it's current position and angle.
Declaration
public BoundingBox BoundingBox { get; }
Property Value
View Source
CenterOfGravity
Get the center of gravity of the shape.
Declaration
public Vect CenterOfGravity { get; }
Property Value
View Source
CollisionType
An arbitrary value representing the collision type of this shape. Only shapes with like
collision types will collide.
Declaration
public int CollisionType { get; set; }
Property Value
View Source
Data
Declaration
public object Data { get; set; }
Property Value
View Source
Density
Density of the shape if you are having Chipmunk calculate mass properties for you.
Declaration
public double Density { get; set; }
Property Value
View Source
Elasticity
The elasticity of the shape. A value of 0.0 is perfectly inelastic (no bounce). A
value of 1.0 is perfectly elastic. Due to simulation inaccuracy, values of 1.0 or
greater are not recommended.
Declaration
public double Elasticity { get; set; }
Property Value
View Source
Filter
An arbitrary value representing the collision type of this shape. Only shapes with like
collision types will collide.
Declaration
public ShapeFilter Filter { get; set; }
Property Value
View Source
Friction
Declaration
public double Friction { get; set; }
Property Value
View Source
Handle
Declaration
public System.IntPtr Handle { get; }
Property Value
Type |
Description |
System.IntPtr |
|
View Source
Mass
Mass of the shape to have Chipmunk calculate mass properties for you.
Declaration
public double Mass { get; set; }
Property Value
View Source
Moment
Get the calculated moment of inertia for the shape.
Declaration
public double Moment { get; }
Property Value
View Source
Sensor
Whether the shape is a sensor.
Declaration
public bool Sensor { get; set; }
Property Value
View Source
Space
Gets the space that this shape is registered within.
Declaration
public Space Space { get; }
Property Value
View Source
SurfaceVelocity
The surface velocity of the object. Useful for creating conveyor belts or players that
move around. This value is only used when calculating friction, not resolving the
collision.
Declaration
public Vect SurfaceVelocity { get; set; }
Property Value
Methods
View Source
CacheBB()
Update, cache and return the bounding box of a shape based on the body it's attached to.
Declaration
public BoundingBox CacheBB()
Returns
View Source
Collide(Shape)
Get the contact information between two shapes.
Declaration
public ContactPointSet Collide(Shape other)
Parameters
Type |
Name |
Description |
Shape |
other |
|
Returns
View Source
Dispose()
Destroy and free the shape.
Declaration
View Source
Dispose(bool)
Declaration
protected virtual void Dispose(bool dispose)
Parameters
Type |
Name |
Description |
bool |
dispose |
|
View Source
Free()
Destroy and free the shape.
Declaration
View Source
FromHandle(IntPtr)
Get a managed Shape from a native handle.
Declaration
public static Shape FromHandle(System.IntPtr shape)
Parameters
Type |
Name |
Description |
System.IntPtr |
shape |
|
Returns
View Source
PointQuery(Vect)
Finds the point on the surface of the shape which is closest to the given point.
Declaration
public PointQueryInfo PointQuery(Vect point)
Parameters
Type |
Name |
Description |
Vect |
point |
|
Returns
View Source
SegmentQuery(Vect, Vect, double)
Perform a segment query against a shape.
Declaration
public SegmentQueryInfo SegmentQuery(Vect a, Vect b, double radius)
Parameters
Type |
Name |
Description |
Vect |
a |
|
Vect |
b |
|
double |
radius |
|
Returns
View Source
Update, cache and return the bounding box of a shape with an explicit transformation.
Declaration
public BoundingBox Update(Transform transform)
Parameters
Returns
Extension Methods