Go to the documentation of this file.
7 #ifndef INCLUDE_JET_SURFACE_SET2_H_
8 #define INCLUDE_JET_SURFACE_SET2_H_
61 std::vector<Surface2Ptr> _surfaces;
62 std::vector<Surface2Ptr> _unboundedSurfaces;
64 mutable bool _bvhInvalidated =
true;
72 double closestDistanceLocal(
const Vector2D& otherPoint)
const override;
74 bool intersectsLocal(
const Ray2D& ray)
const override;
79 const Ray2D& ray)
const override;
81 bool isInsideLocal(
const Vector2D& otherPoint)
const override;
85 void buildBvh()
const;
107 std::vector<Surface2Ptr> _surfaces;
112 #endif // INCLUDE_JET_SURFACE_SET2_H_
Struct that represents ray-surface intersection point.
Definition: surface2.h:19
bool isNormalFlipped
Flips normal.
Definition: surface2.h:33
bool isValidGeometry() const override
Returns true if the surface is a valid geometry.
SurfaceSet2()
Constructs an empty surface set.
Class for 2-D ray.
Definition: ray2.h:21
Builder & withSurfaces(const std::vector< Surface2Ptr > &others)
Returns builder with other surfaces.
std::shared_ptr< SurfaceSet2 > SurfaceSet2Ptr
Shared pointer for the SurfaceSet2 type.
Definition: surface_set2.h:89
Definition: advection_solver2.h:18
Transform2 transform
Local-to-world transform.
Definition: surface2.h:30
SurfaceSet2 build() const
Builds SurfaceSet2.
std::shared_ptr< Surface2 > Surface2Ptr
Shared pointer for the Surface2 type.
Definition: surface2.h:109
2-D vector class.
Definition: vector2.h:24
Base class for 2-D surface builder.
Definition: surface2.h:115
2-D surface set.
Definition: surface_set2.h:24
void updateQueryEngine() override
Updates internal spatial query engine.
size_t numberOfSurfaces() const
Returns the number of surfaces.
bool isBounded() const override
Returns true if bounding box can be defined.
SurfaceSet2(const std::vector< Surface2Ptr > &others, const Transform2 &transform=Transform2(), bool isNormalFlipped=false)
Constructs with a list of other surfaces.
2-D axis-aligned bounding box class.
Definition: bounding_box2.h:41
Abstract base class for 2-D surface.
Definition: surface2.h:27
SurfaceSet2(const SurfaceSet2 &other)
Copy constructor.
Front-end to create SurfaceSet2 objects step by step.
Definition: surface_set2.h:95
static Builder builder()
Returns builder for SurfaceSet2.
SurfaceSet2Ptr makeShared() const
Builds shared pointer of SurfaceSet2 instance.
void addSurface(const Surface2Ptr &surface)
Adds a surface instance.
const Surface2Ptr & surfaceAt(size_t i) const
Returns the i-th surface.