You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, there is ExternalDistanceInteraction class and it receives Shape class such as AxisAlignedPlane. By doing this, we can encapsulate the detail of shapes. It means that to add a spherical cap, we need only a "Sphere" class that has a member function to calculate normal vector.
But it turned out that the scope of this class is a bit limited. For example, a normal vector of Box is always perpendicular to one of the planes of which the box is composed. But the force applied to a particle is not always parallel to the normal because a particle may interact with several planes.
Still, we can use ExternalDistanceInteraction, but I decided that I will gradually replace it with more concrete types such as PlanarSurfaceInteraction. It requires more effort and lines of codes, but sometimes (not always, of course) longer and specific code can be more helpful than abstraction.
The text was updated successfully, but these errors were encountered:
Currently, there is
ExternalDistanceInteraction
class and it receivesShape
class such asAxisAlignedPlane
. By doing this, we can encapsulate the detail of shapes. It means that to add a spherical cap, we need only a "Sphere" class that has a member function to calculate normal vector.But it turned out that the scope of this class is a bit limited. For example, a normal vector of
Box
is always perpendicular to one of the planes of which the box is composed. But the force applied to a particle is not always parallel to the normal because a particle may interact with several planes.Still, we can use
ExternalDistanceInteraction
, but I decided that I will gradually replace it with more concrete types such asPlanarSurfaceInteraction
. It requires more effort and lines of codes, but sometimes (not always, of course) longer and specific code can be more helpful than abstraction.The text was updated successfully, but these errors were encountered: