52 inline unsigned int numPathPoints()
const {
return static_cast<unsigned int>(_wPositions.size()); }
55 inline float getValueAt(
unsigned int index)
const {
return static_cast<float>(_wPositions[index][3]); }
62 const Vector3 retPos(atIndex[0],
69 inline void getPosAt(
unsigned int index,
Vector4& pos) { pos = getPosValueAt(index); }
127 std::vector<Vector4>_wPositions;
130 bool _hasValidWorldBoundingBox;
136 boost::unordered_map < MatrixHashPair, CSOBoundingBox, MatrixHashFunction > _voxelBoundingBoxCache;
#define MLCSO_EXPORT
Defines export symbols for classes, so they can be used in other DLLs.
The CSOBoundingBox defines an axis-parallel bounding box with double precision.
The CSOPathPoints is a list of world coordinates that are interpolated by a certain interpolation sch...
const Vector4 & getPosValueAt(unsigned int index) const
Returns a position with a value at a specified index.
const CSOBoundingBox & getWorldBoundingBox()
Returns the world bounding box for this PathPoints.
unsigned int numPathPoints() const
Returns the number of stored points.
void appendPosition(const Vector3 &pos)
Adds a new position to the internal vector.
void getPosAt(unsigned int index, Vector3 &pos)
Variants of getPosAt for use in templates.
CSOBoundingBox getVoxelBoundingBox(const Matrix4 &worldToVoxelMatrix, size_t hashKey)
Returns the voxel bounding box for this PathPoints.
virtual ~CSOPathPoints()
Standard destructor.
void setAllValuesTo(float value)
Sets all posValues to the specified value.
void setPositionValues(const std::vector< Vector4 > &newPosValues)
Sets the position/value pairs from the specified vector.
void setAllValuesTo(float startVal, float endVal)
Sets all posValues from first pos:startVal to last pos-:endVal.
void getPosAt(unsigned int index, Vector4 &pos)
float getValueAt(unsigned int index) const
Returns a value at a specified index.
CSOPathPoints(const CSOPathPoints &pathPoints)
Copy constructor.
CSOSeedPoint * tailSeedPoint
A pointer to this path's tail seed point.
void removePositions()
Removes all positions from the internal vector and marks this path point list as being changed (for b...
void setValueAt(const float value, unsigned int index)
Sets a value at the specified index.
void setPosAt(const Vector3 &pos, unsigned int index)
Sets the specified position at the specified index.
void getWorldPositions(std::vector< Vector3 > &positions) const
Fills the specified vector with all the internal positions.
void setPosValueAt(const Vector4 &posVal, unsigned int index)
Sets a position/value pair at the specified index.
void removePositions(unsigned int startIndex, unsigned int endIndex)
Removes positions from the internal vector in the specified range.
void setWorldPositions(const std::vector< Vector3 > &newPositions)
Sets the coordinates from the specified vector as the PathPoints world positions.
CSOPathPoints()
Standard constructor.
double getLength() const
Returns the length of this path point list.
void movePathPoints(double x, double y, double z)
Moves all the path points by the specified offset.
Vector3 getPosAt(unsigned int index) const
Returns a position at a specified index index.
void getPositionValues(std::vector< Vector4 > &posValues) const
Fills the specified vector with all position/value pairs.
void clearPositions()
Clears internal world positions.
void pathChanged()
Invalidates the world and voxel bounding boxes, so they are computed anew.
CSOSeedPoint * headSeedPoint
A pointer to this path's head seed point.
The CSOSeedPoint can be interactively set and modified, and is the framework for contours.