| 123456789101112131415161718192021222324252627282930313233 |
- //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
- //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
- #pragma once
- #include "Prerequisites/BsPrerequisitesUtil.h"
- #include "Math/BsVector3.h"
- namespace bs
- {
- /** @addtogroup Math
- * @{
- */
- /**
- * Represents a torus at the world center. Outer radius represents the distance from the center, and inner radius
- * represents the radius of the tube. Inner radius must be less or equal than the outer radius.
- */
- class BS_UTILITY_EXPORT Torus
- {
- public:
- Torus();
- Torus(const Vector3& normal, float outerRadius, float innerRadius);
- /** Ray/torus intersection, returns boolean result and distance to nearest intersection point. */
- std::pair<bool, float> intersects(const Ray& ray) const;
- Vector3 normal;
- float outerRadius;
- float innerRadius;
- };
- /** @} */
- }
|