@Override public float computeDistanceToOut(Transform xf, Vec2 p, int childIndex, Vec2 normalOut) { final EdgeShape edge = pool0; getChildEdge(edge, childIndex); return edge.computeDistanceToOut(xf, p, 0, normalOut); }
public final Shape clone() { CircleShape shape = new CircleShape(); shape.m_p.x = m_p.x; shape.m_p.y = m_p.y; shape.m_radius = m_radius; return shape; }
/** * Get the type of the child shape. You can use this to down cast to the concrete shape. * * @return the shape type. */ public ShapeType getType() { return m_shape.getType(); }
/** Constructs a new polygon */ public PolygonShape () { super(new org.jbox2d.collision.shapes.PolygonShape()); shape = (org.jbox2d.collision.shapes.PolygonShape)super.shape; }
/** Build vertices to represent an axis-aligned box. * @param hx the half-width. * @param hy the half-height. */ public void setAsBox (float hx, float hy) { shape.setAsBox(hx, hy); }
/** * Create a convex hull from the given array of points. The count must be in the range [3, * Settings.maxPolygonVertices]. * * @warning the points may be re-ordered, even if they form a convex polygon. * @warning collinear points are removed. */ public final void set(final Vec2[] vertices, final int count) { set(vertices, count, null, null); }
public EdgeShape () { super(new org.jbox2d.collision.shapes.EdgeShape()); shape = (org.jbox2d.collision.shapes.EdgeShape)super.shape; }
/** Return a copy of this object. */ public MassData clone() { return new MassData(this); } }
@Override public void setRadius (float radius) { shape.setRadius(radius); }
/** * Test a point for containment in this fixture. This only works for convex shapes. * * @param p a point in world coordinates. * @return */ public boolean testPoint(final Vec2 p) { return m_shape.testPoint(m_body.m_xf, p); }
/** * Cast a ray against this shape. * * @param output the ray-cast results. * @param input the ray-cast input parameters. * @param output * @param input */ public boolean raycast(RayCastOutput output, RayCastInput input, int childIndex) { return m_shape.raycast(output, input, m_body.m_xf, childIndex); }
/** * Get the mass data for this fixture. The mass data is based on the density and the shape. The * rotational inertia is about the shape's origin. * * @return */ public void getMassData(MassData massData) { m_shape.computeMass(massData, m_density); }
@Override public float getRadius () { return shape.getRadius(); }
@Override public void setRadius (float radius) { shape.setRadius(radius); }
@Override public float getRadius () { return shape.getRadius(); }
@Override public int getChildCount () { return shape.getChildCount(); } }
@Override public int getChildCount () { return shape.getChildCount(); }
@Override public int getChildCount () { return shape.getChildCount(); }
@Override public int getChildCount () { return shape.getChildCount(); }
public CircleShape () { super(new org.jbox2d.collision.shapes.CircleShape()); shape = (org.jbox2d.collision.shapes.CircleShape)super.shape; }