Public Member Functions | Public Attributes | List of all members
b2CircleShape Class Reference

A solid circle shape. More...

#include <b2_circle_shape.h>

Inheritance diagram for b2CircleShape:
Inheritance graph
[legend]

Public Member Functions

 b2CircleShape ()
 
b2ShapeClone (b2BlockAllocator *allocator) const override
 Implement b2Shape. More...
 
void ComputeAABB (b2AABB *aabb, const b2Transform &transform, int32 childIndex) const override
 
void ComputeMass (b2MassData *massData, float density) const override
 
int32 GetChildCount () const override
 
bool RayCast (b2RayCastOutput *output, const b2RayCastInput &input, const b2Transform &transform, int32 childIndex) const override
 
bool TestPoint (const b2Transform &transform, const b2Vec2 &p) const override
 Implement b2Shape. More...
 
- Public Member Functions inherited from b2Shape
Type GetType () const
 
virtual ~b2Shape ()
 

Public Attributes

b2Vec2 m_p
 Position. More...
 
- Public Attributes inherited from b2Shape
float m_radius
 
Type m_type
 

Additional Inherited Members

- Public Types inherited from b2Shape
enum  Type {
  e_circle = 0, e_edge = 1, e_polygon = 2, e_chain = 3,
  e_typeCount = 4
}
 

Detailed Description

A solid circle shape.

Definition at line 30 of file b2_circle_shape.h.

Constructor & Destructor Documentation

◆ b2CircleShape()

b2CircleShape::b2CircleShape ( )
inline

Definition at line 60 of file b2_circle_shape.h.

Member Function Documentation

◆ Clone()

b2Shape * b2CircleShape::Clone ( b2BlockAllocator allocator) const
overridevirtual

Implement b2Shape.

Implements b2Shape.

Definition at line 28 of file b2_circle_shape.cpp.

◆ ComputeAABB()

void b2CircleShape::ComputeAABB ( b2AABB aabb,
const b2Transform transform,
int32  childIndex 
) const
overridevirtual
See also
b2Shape::ComputeAABB

Implements b2Shape.

Definition at line 89 of file b2_circle_shape.cpp.

◆ ComputeMass()

void b2CircleShape::ComputeMass ( b2MassData massData,
float  density 
) const
overridevirtual
See also
b2Shape::ComputeMass

Implements b2Shape.

Definition at line 98 of file b2_circle_shape.cpp.

◆ GetChildCount()

int32 b2CircleShape::GetChildCount ( ) const
overridevirtual
See also
b2Shape::GetChildCount

Implements b2Shape.

Definition at line 36 of file b2_circle_shape.cpp.

◆ RayCast()

bool b2CircleShape::RayCast ( b2RayCastOutput output,
const b2RayCastInput input,
const b2Transform transform,
int32  childIndex 
) const
overridevirtual

Implement b2Shape.

Note
because the circle is solid, rays that start inside do not hit because the normal is not defined.

Implements b2Shape.

Definition at line 52 of file b2_circle_shape.cpp.

◆ TestPoint()

bool b2CircleShape::TestPoint ( const b2Transform transform,
const b2Vec2 p 
) const
overridevirtual

Implement b2Shape.

Implements b2Shape.

Definition at line 41 of file b2_circle_shape.cpp.

Member Data Documentation

◆ m_p

b2Vec2 b2CircleShape::m_p

Position.

Definition at line 57 of file b2_circle_shape.h.


The documentation for this class was generated from the following files:


mvsim
Author(s):
autogenerated on Tue Jul 4 2023 03:08:22