refactoredCPPNeuronMesher
draw_utils.h
Go to the documentation of this file.
1 
15 #pragma once
16 #include <array> // For std::array
17 #include <vector> // For std::vector
18 #include <GLFW/glfw3.h> // For OpenGL and GLFW functions
19 #include <GL/glu.h> // For GLU utilities
20 
21 // Forward declarations
22 struct SWCNode;
23 
32 void drawSimpleSphere(const SWCNode& node, double size = 0.5f);
33 
42 void drawSimpleLine(const SWCNode& a, const SWCNode& b);
43 
53 void drawSphere(const SWCNode& node, int slices = 6, int stacks = 6);
54 
65 void drawCylinder(const SWCNode& a, const SWCNode& b, int segments = 6);
66 
79 void drawBoundingBox(double minX, double maxX, double minY, double maxY, double minZ, double maxZ);
80 
93 void setColorByType(int type);
94 
104 void renderSWC(const std::vector<SWCNode>& nodes);
105 
void renderSWC(const std::vector< SWCNode > &nodes)
Renders a complete SWC neuron morphology.
Definition: draw_utils.cpp:262
void drawCylinder(const SWCNode &a, const SWCNode &b, int segments=6)
Draws a cylinder connecting two nodes.
Definition: draw_utils.cpp:137
void drawSimpleSphere(const SWCNode &node, double size=0.5f)
Draws a simple low-polygon sphere at a node's position.
Definition: draw_utils.cpp:49
void drawBoundingBox(double minX, double maxX, double minY, double maxY, double minZ, double maxZ)
Draws an axis-aligned bounding box.
Definition: draw_utils.cpp:181
void setColorByType(int type)
Sets the OpenGL color based on SWC node type.
Definition: draw_utils.cpp:223
void drawSimpleLine(const SWCNode &a, const SWCNode &b)
Draws a simple line between two nodes.
Definition: draw_utils.cpp:77
void drawSphere(const SWCNode &node, int slices=6, int stacks=6)
Draws a sphere with specified geometric detail.
Definition: draw_utils.cpp:104
Structure representing a single node in an SWC neuron morphology.
Definition: neurongraph.h:43
int type
Node type identifier.
Definition: neurongraph.h:61