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],
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.
const Vector4 & getPosValueAt(unsigned int index) const
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
CSOPathPoints(const CSOPathPoints &pathPoints)
Copy constructor.
CSOSeedPoint * tailSeedPoint
A pointer to this path's tail seed point.
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
void getPositionValues(std::vector< Vector4 > &posValues) const
Fills the specified vector with all position/value pairs.
void clearPositions()
Clears internal world positions.
CSOSeedPoint * headSeedPoint
A pointer to this path's head seed point.
Tvec4< MLdouble > Vector4
A vector with four components of type double.
Tmat4< MLdouble > Matrix4
The standard 4x4 matrix of type double.
Tvec3< MLdouble > Vector3
A vector with three components of type double.