VectorFieldRepresentation.h
Go to the documentation of this file.
// This file is a part of the OpenSurgSim project.
// Copyright 2013, SimQuest Solutions Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef SURGSIM_GRAPHICS_VECTORFIELDREPRESENTATION_H
#define SURGSIM_GRAPHICS_VECTORFIELDREPRESENTATION_H
#include "SurgSim/Graphics/Representation.h"
#include "SurgSim/Graphics/VectorField.h"
namespace SurgSim
{
namespace Graphics
{
class VectorFieldRepresentation : public virtual Representation
{
public:
explicit VectorFieldRepresentation(const std::string& name) : Representation(name)
{
}
virtual ~VectorFieldRepresentation()
{
}
virtual std::shared_ptr<SurgSim::Graphics::VectorField> getVectorField() const = 0;
virtual void updateVectorField(const SurgSim::Graphics::VectorField& vectorfield) = 0;
virtual void setLineWidth(double width) = 0;
virtual double getLineWidth() const = 0;
virtual void setScale(double scale) = 0;
virtual double getScale() const = 0;
virtual void setPointSize(double size) = 0;
virtual double getPointSize() const = 0;
};
}; // Graphics
}; // SurgSim
#endif // SURGSIM_GRAPHICS_VECTORFIELDREPRESENTATION_H
SurgSim::Graphics::VectorFieldRepresentation::updateVectorField
virtual void updateVectorField(const SurgSim::Graphics::VectorField &vectorfield)=0
Updates the vector field in a threadsafe manner.
SurgSim::Graphics::VectorFieldRepresentation::setPointSize
virtual void setPointSize(double size)=0
Sets the size of point indicating the starting of vector.
SurgSim
Definition: CompoundShapeToGraphics.cpp:29
SurgSim::Graphics::VectorFieldRepresentation
Graphic representation of a vector field Each point/location, i.e.
Definition: VectorFieldRepresentation.h:30
SurgSim::Graphics::VectorFieldRepresentation::getScale
virtual double getScale() const =0
Gets the scale applied to all vectors.
SurgSim::Graphics::VectorFieldRepresentation::setScale
virtual void setScale(double scale)=0
Sets the scale to be applied to all vectors.
Representation.h
SurgSim::Graphics::VectorFieldRepresentation::getLineWidth
virtual double getLineWidth() const =0
Gets line width.
SurgSim::Graphics::VectorFieldRepresentation::setLineWidth
virtual void setLineWidth(double width)=0
Sets vector line width.
SurgSim::Graphics::Representation
Base graphics representation class, which defines the interface that all graphics representations mus...
Definition: Representation.h:39
SurgSim::Graphics::VectorFieldRepresentation::VectorFieldRepresentation
VectorFieldRepresentation(const std::string &name)
Constructor.
Definition: VectorFieldRepresentation.h:35
VectorField.h
SurgSim::Graphics::VectorFieldRepresentation::~VectorFieldRepresentation
virtual ~VectorFieldRepresentation()
Destructor.
Definition: VectorFieldRepresentation.h:40
SurgSim::Graphics::VectorFieldRepresentation::getPointSize
virtual double getPointSize() const =0
Gets the size of starting point of a vector.
SurgSim::Graphics::VectorFieldRepresentation::getVectorField
virtual std::shared_ptr< SurgSim::Graphics::VectorField > getVectorField() const =0
Gets the vector field.
SurgSim::DataStructures::Vertices
Base class for mesh structures, handling basic vertex functionality.
Definition: Vertices.h:51