Loading...
Searching...
No Matches
Cylinder3.hpp
Go to the documentation of this file.
1// This code is based on Jet framework.
2// Copyright (c) 2018 Doyub Kim
3// CubbyFlow is voxel-based fluid simulation engine for computer games.
4// Copyright (c) 2020 CubbyFlow Team
5// Core Part: Chris Ohk, Junwoo Hwang, Jihong Sin, Seungwoo Yoo
6// AI Part: Dongheon Cho, Minseo Kim
7// We are making my contributions/submissions to this project solely in our
8// personal capacity and are not conveying any rights to any intellectual
9// property of any third parties.
10
11#ifndef CUBBYFLOW_CYLINDER3_HPP
12#define CUBBYFLOW_CYLINDER3_HPP
13
15
16namespace CubbyFlow
17{
89
92
97{
98 public:
101
104
107
110
113
114 private:
115 Vector3D m_center{ 0, 0, 0 };
116 double m_radius = 1.0;
117 double m_height = 1.0;
118};
119} // namespace CubbyFlow
120
121#endif
N-D axis-aligned bounding box class.
Definition BoundingBox.hpp:47
Front-end to create Cylinder3 objects step by step.
Definition Cylinder3.hpp:97
Builder & WithRadius(double _radius)
Returns builder with radius.
Builder & WithHeight(double _height)
Returns builder with height.
Cylinder3 Build() const
Builds Cylinder3.
Builder & WithCenter(const Vector3D &_center)
Returns builder with center.
Cylinder3Ptr MakeShared() const
Builds shared pointer of Cylinder3 instance.
3-D cylinder geometry.
Definition Cylinder3.hpp:25
Cylinder3(const Cylinder3 &)=default
Default copy constructor.
Vector3D center
Center of the cylinder.
Definition Cylinder3.hpp:64
Cylinder3(Cylinder3 &&) noexcept=default
Default move constructor.
Vector3D ClosestNormalLocal(const Vector3D &otherPoint) const override
SurfaceRayIntersection3 ClosestIntersectionLocal(const Ray3D &ray) const override
Cylinder3(const Transform3 &_transform, bool _isNormalFlipped=false)
Constructs a cylinder with _transform and _isNormalFlipped.
bool IntersectsLocal(const Ray3D &ray) const override
Cylinder3(Vector3D _center, double _radius, double _height, const Transform3 &_transform=Transform3{}, bool _isNormalFlipped=false)
double radius
Radius of the cylinder.
Definition Cylinder3.hpp:67
double height
Height of the cylinder.
Definition Cylinder3.hpp:70
BoundingBox3D BoundingBoxLocal() const override
Returns the bounding box of this surface object in local frame.
Vector3D ClosestPointLocal(const Vector3D &otherPoint) const override
Cylinder3()
Constructs a cylinder with default parameters.
Definition Cylinder3.hpp:30
double ClosestDistanceLocal(const Vector3D &otherPoint) const override
static Builder GetBuilder()
Returns builder fox Cylinder3.
Definition Matrix.hpp:30
Class for N-D ray.
Definition Ray.hpp:26
Base class for N-D surface builder.
Definition Surface.hpp:154
Abstract base class for N-D surface.
Definition Surface.hpp:39
Represents N-D rigid body transform.
Definition Transform.hpp:83
Definition pybind11Utils.hpp:22
std::shared_ptr< Cylinder3 > Cylinder3Ptr
Shared pointer type for the Cylinder3.
Definition Cylinder3.hpp:91
Matrix< T, Rows, 1 > Vector
Definition Matrix.hpp:719
Struct that represents ray-surface intersection point.
Definition Surface.hpp:26