Go to the documentation of this file.
7 #ifndef INCLUDE_JET_RIGID_BODY_COLLIDER2_H_
8 #define INCLUDE_JET_RIGID_BODY_COLLIDER2_H_
73 double _angularVelocity = 0.0;
78 #endif // INCLUDE_JET_RIGID_BODY_COLLIDER2_H_
RigidBodyCollider2(const Surface2Ptr &surface)
Constructs a collider with a surface.
Front-end to create RigidBodyCollider2 objects step by step.
Definition: rigid_body_collider2.h:53
Vector2D velocityAt(const Vector2D &point) const override
Returns the velocity of the collider at given point.
static Builder builder()
Returns builder fox RigidBodyCollider2.
Abstract base class for generic collider object.
Definition: collider2.h:24
double angularVelocity
Angular velocity of the rigid body.
Definition: rigid_body_collider2.h:28
Definition: advection_solver2.h:18
const Surface2Ptr & surface() const
Returns the surface instance.
Builder & withLinearVelocity(const Vector2D &linearVelocity)
Returns builder with linear velocity.
RigidBodyCollider2 build() const
Builds RigidBodyCollider2.
std::shared_ptr< Surface2 > Surface2Ptr
Shared pointer for the Surface2 type.
Definition: surface2.h:109
Builder & withSurface(const Surface2Ptr &surface)
Returns builder with surface.
2-D vector class.
Definition: vector2.h:24
RigidBodyCollider2Ptr makeShared() const
Builds shared pointer of RigidBodyCollider2 instance.
2-D rigid body collider class.
Definition: rigid_body_collider2.h:20
Builder & withAngularVelocity(double angularVelocity)
Returns builder with angular velocity.
std::shared_ptr< RigidBodyCollider2 > RigidBodyCollider2Ptr
Shared pointer for the RigidBodyCollider2 type.
Definition: rigid_body_collider2.h:47
Vector2D linearVelocity
Linear velocity of the rigid body.
Definition: rigid_body_collider2.h:22
RigidBodyCollider2(const Surface2Ptr &surface, const Vector2D &linearVelocity, double angularVelocity)
Constructs a collider with a surface and other parameters.