- Timestamp:
- Jun 17, 2013, 1:48:27 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/vizservers/vtkvis/RendererGraphicsObjs.cpp
r3695 r3696 8 8 #include <cstring> 9 9 #include <typeinfo> 10 #include <vector> 10 11 11 12 #include <vtkVersion.h> … … 394 395 * \brief Create a new Arc and associate it with an ID 395 396 */ 396 bool Renderer::addArc(const DataSetId& id, double center[3], 397 double pt1[3], double pt2[3]) 397 bool Renderer::addArc(const DataSetId& id, 398 double center[3], 399 double pt1[3], 400 double normal[3], 401 double angle) 398 402 { 399 403 Arc *gobj; … … 419 423 420 424 gobj->setCenter(center); 421 gobj->setEndPoints(pt1, pt2); 425 gobj->setStartPoint(pt1); 426 gobj->setNormal(normal); 427 gobj->setAngle(angle); 422 428 423 429 getGraphicsObjectHashmap<Arc>()[id] = gobj; … … 2299 2305 2300 2306 /** 2307 * \brief Create a new Line and associate it with an ID 2308 */ 2309 bool Renderer::addLine(const DataSetId& id, std::vector<double> points) 2310 { 2311 Line *gobj; 2312 if ((gobj = getGraphicsObject<Line>(id)) != NULL) { 2313 WARN("Replacing existing %s %s", gobj->getClassName(), id.c_str()); 2314 deleteGraphicsObject<Line>(id); 2315 } 2316 2317 gobj = new Line(); 2318 2319 gobj->setDataSet(NULL, this); 2320 2321 if (gobj->getProp() == NULL && 2322 gobj->getOverlayProp() == NULL) { 2323 delete gobj; 2324 return false; 2325 } else { 2326 if (gobj->getProp()) 2327 _renderer->AddViewProp(gobj->getProp()); 2328 if (gobj->getOverlayProp()) 2329 _renderer->AddViewProp(gobj->getOverlayProp()); 2330 } 2331 2332 gobj->setPoints(points); 2333 2334 getGraphicsObjectHashmap<Line>()[id] = gobj; 2335 2336 sceneBoundsChanged(); 2337 _needsRedraw = true; 2338 return true; 2339 } 2340 2341 /** 2301 2342 * \brief Set atom sphere resolution 2302 2343 */
Note: See TracChangeset
for help on using the changeset viewer.