mirror of
https://github.com/opencv/opencv.git
synced 2024-11-29 13:47:32 +08:00
combine representation methods to one as setRepresentation
This commit is contained in:
parent
94ca5d65d0
commit
fcf437cf69
@ -65,9 +65,7 @@ namespace cv
|
||||
void setDesiredUpdateRate(double time);
|
||||
double getDesiredUpdateRate();
|
||||
|
||||
void setRepresentationToSurface();
|
||||
void setRepresentationToWireframe();
|
||||
void setRepresentationToPoints();
|
||||
void setRepresentation(int representation);
|
||||
private:
|
||||
|
||||
struct VizImpl;
|
||||
|
@ -87,6 +87,4 @@ double cv::viz::Viz3d::getRenderingProperty(const String &id, int property) { re
|
||||
void cv::viz::Viz3d::setDesiredUpdateRate(double time) { impl_->setDesiredUpdateRate(time); }
|
||||
double cv::viz::Viz3d::getDesiredUpdateRate() { return impl_->getDesiredUpdateRate(); }
|
||||
|
||||
void cv::viz::Viz3d::setRepresentationToSurface() { impl_->setRepresentationToSurface(); }
|
||||
void cv::viz::Viz3d::setRepresentationToWireframe() { impl_->setRepresentationToWireframe(); }
|
||||
void cv::viz::Viz3d::setRepresentationToPoints() { impl_->setRepresentationToPoints(); }
|
||||
void cv::viz::Viz3d::setRepresentation(int representation) { impl_->setRepresentation(representation); }
|
||||
|
@ -464,33 +464,32 @@ void cv::viz::Viz3d::VizImpl::resetCamera()
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
void cv::viz::Viz3d::VizImpl::setRepresentationToSurface()
|
||||
void cv::viz::Viz3d::VizImpl::setRepresentation(int representation)
|
||||
{
|
||||
vtkActorCollection * actors = renderer_->GetActors();
|
||||
actors->InitTraversal();
|
||||
vtkActor * actor;
|
||||
while ((actor = actors->GetNextActor()) != NULL)
|
||||
actor->GetProperty()->SetRepresentationToSurface();
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
void cv::viz::Viz3d::VizImpl::setRepresentationToPoints()
|
||||
{
|
||||
vtkActorCollection * actors = renderer_->GetActors();
|
||||
actors->InitTraversal();
|
||||
vtkActor * actor;
|
||||
while ((actor = actors->GetNextActor()) != NULL)
|
||||
actor->GetProperty()->SetRepresentationToPoints();
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
void cv::viz::Viz3d::VizImpl::setRepresentationToWireframe()
|
||||
{
|
||||
vtkActorCollection * actors = renderer_->GetActors();
|
||||
actors->InitTraversal();
|
||||
vtkActor *actor;
|
||||
while ((actor = actors->GetNextActor()) != NULL)
|
||||
actor->GetProperty()->SetRepresentationToWireframe();
|
||||
switch (representation)
|
||||
{
|
||||
case REPRESENTATION_POINTS:
|
||||
{
|
||||
while ((actor = actors->GetNextActor()) != NULL)
|
||||
actor->GetProperty()->SetRepresentationToPoints();
|
||||
break;
|
||||
}
|
||||
case REPRESENTATION_SURFACE:
|
||||
{
|
||||
while ((actor = actors->GetNextActor()) != NULL)
|
||||
actor->GetProperty()->SetRepresentationToSurface();
|
||||
break;
|
||||
}
|
||||
case REPRESENTATION_WIREFRAME:
|
||||
{
|
||||
while ((actor = actors->GetNextActor()) != NULL)
|
||||
actor->GetProperty()->SetRepresentationToWireframe();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -44,9 +44,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void setRepresentationToSurface();
|
||||
void setRepresentationToPoints();
|
||||
void setRepresentationToWireframe();
|
||||
void setRepresentation(int representation);
|
||||
|
||||
void setCamera(const Camera &camera);
|
||||
Camera getCamera() const;
|
||||
|
Loading…
Reference in New Issue
Block a user