Go to the documentation of this file.
7 #ifndef INCLUDE_JET_BOX2_H_
8 #define INCLUDE_JET_BOX2_H_
65 const Ray2D& ray)
const override;
100 #endif // INCLUDE_JET_BOX2_H_
Box2Ptr makeShared() const
Builds shared pointer of Box2 instance.
Struct that represents ray-surface intersection point.
Definition: surface2.h:19
bool isNormalFlipped
Flips normal.
Definition: surface2.h:33
BoundingBox2D bound
Bounding box of this box.
Definition: box2.h:27
Vector2< double > Vector2D
Double-type 2D vector.
Definition: vector2.h:340
Vector2D closestNormalLocal(const Vector2D &otherPoint) const override
BoundingBox2D boundingBoxLocal() const override
Returns the bounding box of this surface object in local frame.
Class for 2-D ray.
Definition: ray2.h:21
BoundingBox2D boundingBox() const
Returns the bounding box of this surface object.
Box2(const Box2 &other)
Copy constructor.
Box2(const Transform2 &transform=Transform2(), bool isNormalFlipped=false)
Constructs (0, 0) x (1, 1) box.
BoundingBox2< double > BoundingBox2D
Double-type 2-D BoundingBox.
Definition: bounding_box2.h:124
Vector2D closestPointLocal(const Vector2D &otherPoint) const override
static Builder builder()
Returns builder fox Box2.
Definition: advection_solver2.h:18
Transform2 transform
Local-to-world transform.
Definition: surface2.h:30
2-D vector class.
Definition: vector2.h:24
Base class for 2-D surface builder.
Definition: surface2.h:115
std::shared_ptr< Box2 > Box2Ptr
Shared pointer type for the Box2.
Definition: box2.h:69
bool intersectsLocal(const Ray2D &ray) const override
SurfaceRayIntersection2 closestIntersectionLocal(const Ray2D &ray) const override
Returns the closest intersection point for given ray in local frame.
2-D box geometry.
Definition: box2.h:22
Builder & withLowerCorner(const Vector2D &pt)
Returns builder with lower corner set.
2-D axis-aligned bounding box class.
Definition: bounding_box2.h:41
Abstract base class for 2-D surface.
Definition: surface2.h:27
Builder & withBoundingBox(const BoundingBox2D &bbox)
Returns builder with bounding box.
Builder & withUpperCorner(const Vector2D &pt)
Returns builder with upper corner set.
Front-end to create Box2 objects step by step.
Definition: box2.h:75
Box2 build() const
Builds Box2.
Box2(const BoundingBox2D &boundingBox, const Transform2 &transform=Transform2(), bool isNormalFlipped=false)
Constructs a box with BoundingBox2D instance.
Box2(const Vector2D &lowerCorner, const Vector2D &upperCorner, const Transform2 &transform=Transform2(), bool isNormalFlipped=false)
Constructs a box with given lowerCorner and upperCorner.