controllers, ray3

This commit is contained in:
Irlan
2018-06-29 15:40:12 -03:00
parent 8ebdb67a75
commit b18654c7a5
10 changed files with 413 additions and 357 deletions

View File

@ -27,27 +27,6 @@ struct DrawTriangles;
struct DrawWire;
struct DrawSolid;
//
struct Ray3
{
b3Vec3 A() const;
b3Vec3 B() const;
b3Vec3 direction;
b3Vec3 origin;
float32 fraction;
};
inline b3Vec3 Ray3::A() const
{
return origin;
}
inline b3Vec3 Ray3::B() const
{
return origin + fraction * direction;
}
//
class Camera
{
@ -61,7 +40,7 @@ public:
b3Transform BuildWorldTransform() const;
b3Vec2 ConvertWorldToScreen(const b3Vec3& pw) const;
Ray3 ConvertScreenToWorld(const b3Vec2& ps) const;
b3Ray3 ConvertScreenToWorld(const b3Vec2& ps) const;
float32 m_zoom;
b3Vec3 m_center;