DHART
Loading...
Searching...
No Matches
Todo List
Member HF::Geometry::LoadMeshObjects (std::string path, GROUP_METHOD gm=ONLY_FILE, bool change_coords=false, int scale=1)

the name of the mesh should probably just be the filename if the group type is ONLY_FILE.

Definitely some areas for minor speed gains by using indexing instead of .push_bcaks

Change std::exception to std::out_of_range.

Refactor this to break out whatever code can be repeated or reused. This has a McCabe complexity of 25!!!!

Member HF::Geometry::LoadRawVertices (std::string path)
Check if the file exists then thow file not found exception instead of invalidobj.
Member HF::Geometry::MeshInfo< numeric_type >::AddVerts (const std::vector< std::array< numeric_type, 3 > > &verts)
Change std::exception to DHARTAPI::InvalidOBJ.
Member HF::Geometry::MeshInfo< numeric_type >::ConvertToOBJCoordinates ()

Rename this to ConvertToYup.

Just use the RotateMesh function.

Member HF::Geometry::MeshInfo< numeric_type >::ConvertToRhinoCoordinates ()

Rename this to ConvertToZUp.

Just use the RotateMesh function.

Change exception to an assertion since it shouldn't happen in production code.

Member HF::Geometry::MeshInfo< numeric_type >::GetIndexedVertices () const
Make a version of this function that just returns a const reference or pointer to the data. There's not much reason to do a copy here.
Member HF::Geometry::MeshInfo< numeric_type >::getRawIndices () const
Version of this function that just returns a const reference to the data. There's not much reason to do a copy here.
Member HF::Geometry::MeshInfo< numeric_type >::MeshInfo (const std::vector< std::array< numeric_type, 3 > > &vertices, int id, std::string name="")

Change the std::exception to also be an InvalidOBJ exception.

Check for a number of vertices that aren't a multiple of 3 like the other functions.

Class HF::GraphGenerator::UniqueQueue
This could be a useful standalone templated class.
Member HF::GraphGenerator::UniqueQueue::popMany (int max=-1)
Opetion to pop every node by setting max to -1.
Member HF::Pathfinding::ConstructShortestPathFromPred (int start, int end, const std::vector< size_t > &pred, const std::vector< float > &distances)
Replace exception with an assert statment. It shouldn't be triggered unless there's a problem with this algorithm?
Member HF::Pathfinding::FindAllPaths (BoostGraph *bg)
Implement this function to the specifications outlined here.
Member HF::Pathfinding::FindPaths (BoostGraph *bg, const std::vector< int > &start_points, const std::vector< int > &end_points)
This isn't in parallel! Can be implemented using a similar approach to InsertPathsIntoArray.
Class HF::Pathfinding::vertex_data
Is the double d needed?
Member HF::RayTracer::buffersToStructs (std::vector< float > &in_vertices, std::vector< int > &in_indices, std::vector< Vertex > &out_vertices, std::vector< Triangle > &out_triangles)
May be faster as a std::move or std::copy.
Class HF::RayTracer::EmbreeRayTracer
Many functions support MeshID but don't actually check for it.
Member HF::RayTracer::EmbreeRayTracer::EmbreeRayTracer (std::vector< HF::Geometry::MeshInfo< float > > &MI, bool use_precise_intersection=false)
This function calls throw; which is meant to only be used to rethrow previously thrown exceptions. This should be throwing HF::Exceptions::InvalidOBJ
Member HF::RayTracer::vectorsToBuffers (const std::vector< std::array< float, 3 > > &vertices, std::vector< Triangle > &Tribuffer, std::vector< Vertex > &Vbuffer)
Performance here can be improved by using indexing.
Member HF::SpatialStructures::Graph::addEdge (const Node &parent, const Node &child, float score=1.0f, const std::string &cost_type="")
How should this signal that the graph can't have edges added to it? Or how do we add edges to an existing graph quickly without adding to its edge list?
Member HF::SpatialStructures::Graph::addEdge (int parent_id, int child_id, float score, const std::string &cost_type="")
How should this signal that the graph can't have edges added to it? Or how do we add edges to an existing graph quickly without adding to its edge list?
Member HF::SpatialStructures::Graph::operator[] (const Node &n) const
Should this just return an empty list instead of throwing?
Member HF::SpatialStructures::Node::operator[] (int i)
Exception should be std::out_of_range to match other functionality
Member HF::SpatialStructures::Node::operator[] (int i) const
Exception should be std::out_of_range to match other functionality
Member HF::ViewAnalysis::Aggregate (float &out_total, float new_value, const AGGREGATE_TYPE agg_type, int count=0)
Min/Max and maybe the other functions should handle NaNs for min/max to signal that no value already exists. The user can use the min and max numeric limits or zero for defaults like in the example, but it would be great to be able to use one value that would be reliably handled as default input for every case.
Member HF::ViewAnalysis::SphericalRayshootWithAnyRTForDistance (RT &ray_tracer, const std::vector< N > &Nodes, int num_rays, float upward_limit=50.0f, float downward_limit=70.0f, float height=1.7f, const AGGREGATE_TYPE aggregation=AGGREGATE_TYPE::SUM)

Should this have a height check like the one in the VisibilityGraph?

Rename this to ViewAnalysisAggregate.

Potential speed up here by using a Raytracer function that doesn't return the point of intersection.

Member HF::ViewAnalysis::SphericalViewAnalysis (RT &ray_tracer, const std::vector< N > &Nodes, int num_rays, float upward_limit=50.0f, float downward_limit=70.0f, float height=1.7f)
Should this have a height check like the one in the VisibilityGraph?
Member SphereicalViewAnalysisAggregate (HF::RayTracer::EmbreeRayTracer *ERT, HF::SpatialStructures::Node *node_ptr, int node_size, int max_rays, float upward_fov, float downward_fov, float height, AGGREGATE_TYPE AT, std::vector< float > **out_scores, float **out_scores_ptr, int *out_scores_size)
Is there any situation where out_scores_size is smaller than node_size?
Member SphereicalViewAnalysisAggregateFlat (HF::RayTracer::EmbreeRayTracer *ERT, const float *node_ptr, int node_size, int max_rays, float upward_fov, float downward_fov, float height, AGGREGATE_TYPE AT, std::vector< float > **out_scores, float **out_scores_ptr, int *out_scores_size)
Is there any situation where out_scores_size is smaller than node_size?