Draw solid stuff inside b3World
This commit is contained in:
@ -95,24 +95,24 @@ public :
|
||||
// Draw a solid circle with center, normal, and radius.
|
||||
virtual void DrawSolidCircle(const b3Vec3& normal, const b3Vec3& center, float32 radius, const b3Color& color) = 0;
|
||||
|
||||
// Draw a sphere with center and radius.
|
||||
virtual void DrawSphere(const b3Vec3& center, float32 radius, const b3Color& color) = 0;
|
||||
|
||||
// Draw a solid sphere with center and radius.
|
||||
virtual void DrawSolidSphere(const b3Vec3& center, float32 radius, const b3Color& color) = 0;
|
||||
|
||||
// Draw a capsule with segment and radius.
|
||||
virtual void DrawCapsule(const b3Vec3& p1, const b3Vec3& p2, float32 radius, const b3Color& color) = 0;
|
||||
|
||||
// Draw a solid capsule with segment and radius.
|
||||
virtual void DrawSolidCapsule(const b3Vec3& p1, const b3Vec3& p2, float32 radius, const b3Color& color) = 0;
|
||||
|
||||
// Draw a plane with center, normal and radius.
|
||||
virtual void DrawPlane(const b3Vec3& center, const b3Vec3& normal, float32 radius, const b3Color& color) = 0;
|
||||
|
||||
// Draw a solid plane with center, normal and radius.
|
||||
virtual void DrawSolidPlane(const b3Vec3& center, const b3Vec3& normal, float32 radius, const b3Color& color) = 0;
|
||||
|
||||
// Draw a sphere with center, and radius.
|
||||
virtual void DrawSphere(const b3Vec3& center, float32 radius, const b3Color& color) = 0;
|
||||
|
||||
// Draw a solid sphere with center, radius, and rotation.
|
||||
virtual void DrawSolidSphere(const b3Vec3& center, float32 radius, const b3Mat33& rotation, const b3Color& color) = 0;
|
||||
|
||||
// Draw a capsule with segment, and radius.
|
||||
virtual void DrawCapsule(const b3Vec3& p1, const b3Vec3& p2, float32 radius, const b3Color& color) = 0;
|
||||
|
||||
// Draw a solid capsule with segment, and radius.
|
||||
virtual void DrawSolidCapsule(const b3Vec3& p1, const b3Vec3& p2, float32 radius, const b3Color& color) = 0;
|
||||
|
||||
// Draw a AABB.
|
||||
virtual void DrawAABB(const b3AABB3& aabb, const b3Color& color) = 0;
|
||||
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include <bounce/common/memory/stack_allocator.h>
|
||||
#include <bounce/common/memory/block_pool.h>
|
||||
#include <bounce/common/template/list.h>
|
||||
#include <bounce/common/draw.h>
|
||||
#include <bounce/dynamics/time_step.h>
|
||||
#include <bounce/dynamics/joint_manager.h>
|
||||
#include <bounce/dynamics/contact_manager.h>
|
||||
@ -121,9 +122,15 @@ public:
|
||||
// Draw the entities in this world.
|
||||
void Draw() const;
|
||||
|
||||
// Draw solid the entities in this world.
|
||||
void DrawSolid() const;
|
||||
|
||||
// Draw a shape.
|
||||
void DrawShape(const b3Transform& xf, const b3Shape* shape) const;
|
||||
private :
|
||||
void DrawShape(const b3Transform& xf, const b3Shape* shape, const b3Color& color) const;
|
||||
|
||||
// Draw solid a shape.
|
||||
void DrawSolidShape(const b3Transform& xf, const b3Shape* shape, const b3Color& color) const;
|
||||
private:
|
||||
enum b3Flags
|
||||
{
|
||||
e_shapeAddedFlag = 0x0001,
|
||||
|
Reference in New Issue
Block a user