Doxygen \cond not working - comments

I am writing some documentation of some software in a .dox file and wand to include some comments that will not show in the webpage. I am using \cond but I am not getting any output after calling \endcond.
/// \section cuboids_sec Cuboids
///
/// \cond
/// [TODO]
/// \endcond
///
/// - \b Cuboid - Polyhedron bounded by six quadrilateral faces.
/// - \b Rectangular \b Cuboid - Cuboid with rectangular faces.
/// Then each pair of adjacent faces meet in a right angle. By
/// definition, a rectangular cuboid is also a right rectangular
/// prism.

\cond is to be used when you want to hide some code.
Internally doxygen will end the comment at \cond and restart a new comment block after \endcond. So the second part in your example does not belong to any page anymore.
For skipping part of a comment use \if:
/// \section cuboids_sec Cuboids
///
/// \if HIDDEN
/// [TODO]
/// \endif
///
/// - \b Cuboid - Polyhedron bounded by six quadrilateral faces.
/// - \b Rectangular \b Cuboid - Cuboid with rectangular faces.
/// Then each pair of adjacent faces meet in a right angle. By
/// definition, a rectangular cuboid is also a right rectangular
/// prism.

Have you tried:
For conditional sections within a comment block one should use a \if ... \endif block.
As stated in the documentation for \cond?

Related

Logic for shortest distance to cover all area of rectangle

I have to start from a point on rectangle of area lxb, and want to detect a object of certain area less than that of rectangle, object is placed inside rectangle.
I want to find the shortest distance to reach that object. if placed at a point I can check the area of about 'a' meters around me.strong text
In what manner should I need to travel to reach that object in shortest time?
Image

Given 2 non-crossing polygons in 3D, both visible by a view ray Oz, determine which one is in front

I'm building a simple 3D model to draw cuboids in 3D. In this model there is no special cyclic case like A in front of B in front of C in front of A, or part of A is in front of B but part of B is in front of A.
Now given 2 polygons which are not crossing each other in 3D, both are visible (or partly visible) by the view direction is Oz. Determine which one is in front?
Apparently, I couldn't use minZ or maxZ. Here is a counter-example:
May be in your case that would be defined by:
The plane that contains a given face defines two half spaces. The other face is in front if all four points of it are in the same half plane as that of the eye.
Be aware that there is no simple/obvious criterion, except if your model has very special/strong properties.
This is relatively simple where a solution exists: a cuboid (right rectangular prism) in projection is in front iff (if and only if) each of its visible faces appears as a complete parallelogram.
In your example above, the red cuboid is in front; two the the green faces are obscured (not parallelograms).

How to detect a click on an edge of a multigraph?

I have written a win32 api-based GUI app which uses GDI+ features such as DrawCurve() and DrawLine().
This app draws lines and curves that represent a multigraph.
The data structure for the edge is simply a struct of five int's. (x1, y1, x2, y2, and id)
If there is only one edge between two vertices, a straight line segment is drawn using DrawLine().
If there are more than one edges, curves are drawn using DrawCurve() -- Here, I spread straight-line edges about the midpoint of two vertices, making them curves. A point some unit pixels apart from it is calculated using the normal line equation. If more edges are added then a pixel two unit pixels apart from the midpoint is selected, then next time 3 unit pixels, and so on.
Now I have two questions on detecting the click on edges.
In finding straight-line edges, to minimize the search time, what should I do?
It's quite simple to check if the pixel clicked is on the line segment but comparing all edges would be inefficient if the number of edges large. It seems possible to do it in O(log n), where n is the number of edges.
EDIT: at this point the edges (class Edge) are stored in std::map that maps edge id (int)'s
to Edge objects and I'm considering declaring another container that maps pixels to edge id's.
I'm considering using binary search trees but what can be the key? Or should I use just a 2D pixel array?
Can I get the array of points used by DrawCurve()? If this is impossible, then I should re-calculate the cardinal spline, get the array of points, and check if the point clicked by the user matches any point in that array.
If you have complex shaped lines you can do as follows:
Create an internal bitmap the size of your graph and fill it with black.
When you render your graph also render to this bitmap the edges you want to have click-able, but, render them with a different color. Store these color values in a table together with the corresponding ID. The important thing here is that the colors are different (unique).
When the graph is clicked, transfer the X and Y co-ordinates to your internal bitmap and read the pixel. If non-black, look up the color value in your table and get the associated ID.
This way do don't need to worry about the shape at all, neither is there a need to use your own curve algorithm and so forth. The cost is extra memory, this will a consideration, but unless it is a huge graph (in which case you can buffer the drawing) it is in most cases not an issue. You can render the internal bitmap in a second pass to have main graphics appear faster (as usual).
Hope this helps!
(tip: you can render the "internal" lines with a wider Pen so it gets more sensitive).

All possible directions in which body can move in some closed space

Input: body and some closed space. Body and space are represented as meshes(or BReps, if you like). Initially body doesn't intersect the boundary of the space.
The problem is to find all possible directions in which body can move. For example, in following picture, body can move only in directions from (-1,0) to (0,1). If body has a circle(or sphere) surface - it is ok to return directions with some step (for example, for picture below, output can be (-1,0), (-pi/4,pi/4), (0,1) with step = 3).
Output: set of directions in which body can move.
Problem must be solved in 2d and 3d space.
You want to work in the configuration space. Basically increase the size of your boundary based on the shape of your body, then treat the body as a point object. What's left are all the valid positions of the body. Of course, if your body is not a circle and can rotate, then your configuration space is no longer 2D or 3D. It has as many dimensions as your body has degrees of freedom, so 6 for a rigid body that can translate and rotate.
This is a well known problem in robotic motion planning. Google for "configuration space" or "c-space", and "motion planning".
This is a good set of slides from a class at Carnegie Mellon:
Configuration Space Lecture
Displace the object (temporarily) by a vector (with a very small magnitude) representing the direction you want to test. Then run a collision detection algorithm between the object and the environment.
If there are no collisions, then the object can move in that direction. If there is a collision, then it can't.
I assume, the body initially doesn't intersect the boundary of your space.
As long as the body does not touch the boundary (or is closer to it than some epsilon), your body can move freely.
So start with the full range [0, 2 * pi] of valid directions.
Iterate over all vertices of your body and for each one, check if it touches the bondary. If so, compute the normal of the bondary segment touching the body and remove the 180-degree interval centered at your negative normal direction from the set of valid directions.

OpenGL ES - selecting an object on a 2d world

If I draw three rectangles to the surface, and "listen" to the onTouch event in a 2d Ortho world, then how can I identify which was the rectangle that was clicked?
If the triangles don't overlap you could keep track of the 3 xy points of each triangle in a triangle class object. then you can keep a list of those class objects to be compared later. then when the onTouch even is called you could see where the xy position of the finger is then compare it with the bounds of each rectangle to see if it is contained in it.
If it is within the bounds of one then you know that it is selected. If they overlap you just have to decide which is upfront. you can also keep track of order in the triangle objects if more that one triangle occupy the same space. then you would just choose the one that has the closest order with respect to the screen.

Resources