You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 lines
390 B

4 years ago
4 years ago
  1. #pragma once
  2. #include "Vector3.h"
  3. class Sphere : public Geometry {
  4. public:
  5. Vector3 mOrigin;
  6. float mRadius;
  7. Sphere(const Vector3& origin, float radius);
  8. void set(const Vector3& origin, float radius);
  9. bool HitTest(const Ray& input_ray, float min_distance, float max_distance, HitPoint& hit_point);
  10. void CalculateTexcoord(const Vector3& pos_on_sphere, float &u, float &v);
  11. };