23#ifndef B2_EDGE_SHAPE_H
24#define B2_EDGE_SHAPE_H
57 const b2Transform& transform, int32 childIndex)
const override;
75inline b2EdgeShape::b2EdgeShape()
#define b2_polygonRadius
Definition b2_common.h:74
Definition b2_block_allocator.h:38
Definition b2_edge_shape.h:33
bool TestPoint(const b2Transform &transform, const b2Vec2 &p) const override
bool RayCast(b2RayCastOutput *output, const b2RayCastInput &input, const b2Transform &transform, int32 childIndex) const override
Implement b2Shape.
void ComputeAABB(b2AABB *aabb, const b2Transform &transform, int32 childIndex) const override
void ComputeMass(b2MassData *massData, float density) const override
b2Shape * Clone(b2BlockAllocator *allocator) const override
Implement b2Shape.
b2Vec2 m_vertex0
Optional adjacent vertices. These are used for smooth collision.
Definition b2_edge_shape.h:69
b2Vec2 m_vertex1
These are the edge vertices.
Definition b2_edge_shape.h:66
bool m_oneSided
Uses m_vertex0 and m_vertex3 to create smooth collision.
Definition b2_edge_shape.h:72
void SetOneSided(const b2Vec2 &v0, const b2Vec2 &v1, const b2Vec2 &v2, const b2Vec2 &v3)
void SetTwoSided(const b2Vec2 &v1, const b2Vec2 &v2)
Set this as an isolated edge. Collision is two-sided.
int32 GetChildCount() const override
float m_radius
Definition b2_shape.h:102
An axis aligned bounding box.
Definition b2_collision.h:169
This holds the mass data computed for a shape.
Definition b2_shape.h:34
Definition b2_collision.h:162
A 2D column vector.
Definition b2_math.h:42