From 2087c3bb9e6087ccce86360c1c57823aa8a9ff40 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sat, 22 Nov 2014 11:47:41 +0200 Subject: [PATCH] Comment tweaks --- source/geometry/extrudedshape.h | 4 ++-- source/geometry/halfspace.h | 4 ++-- source/geometry/intersection.h | 6 +++--- source/geometry/ray.h | 3 +++ source/geometry/union.h | 6 +++--- 5 files changed, 13 insertions(+), 10 deletions(-) diff --git a/source/geometry/extrudedshape.h b/source/geometry/extrudedshape.h index bacea7c..84addc4 100644 --- a/source/geometry/extrudedshape.h +++ b/source/geometry/extrudedshape.h @@ -134,8 +134,8 @@ inline unsigned ExtrudedShape::get_intersections(const Ray &ray, Sur SurfacePoint *base_points = 0; if(points) - /* Shamelessly reuse the provided storage. Align to the end of the array - so processing can start from the first (nearest) point. */ + /* Shamelessly reuse the provided storage. Align to the end of the + array so processing can start from the first (nearest) point. */ base_points = reinterpret_cast *>(points+size)-size; unsigned count = base->get_intersections(base_ray, base_points, size); diff --git a/source/geometry/halfspace.h b/source/geometry/halfspace.h index 4adc0df..518f91a 100644 --- a/source/geometry/halfspace.h +++ b/source/geometry/halfspace.h @@ -7,8 +7,8 @@ namespace Msp { namespace Geometry { /** -An infinite shape consisting of the space on one side of a plane. Mostly -useful when composited with other shapes. +An unbounded shape consisting of the space on one side of a plane. Mostly +useful when intersected with other shapes. */ template class HalfSpace: public Shape diff --git a/source/geometry/intersection.h b/source/geometry/intersection.h index 01707cd..7d21f75 100644 --- a/source/geometry/intersection.h +++ b/source/geometry/intersection.h @@ -6,9 +6,6 @@ namespace Msp { namespace Geometry { -/** -Forms a shape from the common parts of component shapes. -*/ template struct IntersectionOps { @@ -20,6 +17,9 @@ struct IntersectionOps static bool combine_surface(bool a, bool b) { return a && b; } }; +/** +Forms a shape from the common parts of component shapes. +*/ template class Intersection: public CompositeShape > { diff --git a/source/geometry/ray.h b/source/geometry/ray.h index 6c9a65b..d8eb7d8 100644 --- a/source/geometry/ray.h +++ b/source/geometry/ray.h @@ -7,6 +7,9 @@ namespace Msp { namespace Geometry { +/** +A directed line segment. Can be used to point at things. +*/ template class Ray { diff --git a/source/geometry/union.h b/source/geometry/union.h index 8461f84..a1562cb 100644 --- a/source/geometry/union.h +++ b/source/geometry/union.h @@ -6,9 +6,6 @@ namespace Msp { namespace Geometry { -/** -Joins component shapes together into one. -*/ template struct UnionOps { @@ -20,6 +17,9 @@ struct UnionOps static bool combine_surface(bool a, bool b) { return a && !b; } }; +/** +Joins component shapes together into one. +*/ template class Union: public CompositeShape > { -- 2.45.2