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