proland::BasicCurvePart Class Reference
[graph]

A part of a curve. More...

#include <BasicCurvePart.h>

Inheritance diagram for proland::BasicCurvePart:
proland::CurvePart

List of all members.

Public Member Functions

 BasicCurvePart (CurvePtr p, int start, int end)
 Creates a new CurvePart.
 BasicCurvePart (CurvePtr p, int orientation, int start, int end)
 Creates a new CurvePart.
virtual CurveId getId () const
 Returns the original curve Id.
virtual CurveId getParentId () const
 Returns the original curve parentId.
CurvePtr getCurve () const
 Returns the original curve.
int getCurveIndex (int i) const
 Returns the corresponding index of i in the original curve.
virtual int getType () const
 Returns the original curve type.
virtual float getWidth () const
 Returns the original curve width.
virtual int getEnd () const
 Returns the length if this curvepart.
virtual vec2d getXY (int i) const
 Returns the XY coords of the i'th point from this curve.
virtual bool getIsControl (int i) const
 Returns the value isControl of the i'th point from this curve.
virtual float getS (int i) const
 Returns the S coords of the i'th point from this curve.
virtual box2d getBounds () const
 Returns the bounds of this curvePart.
virtual bool canClip (int i) const
 Returns false if the i'th point is a controlPoint, else true.
virtual CurvePartclip (int start, int end) const
 Clips this curvePart.

Protected Attributes

CurvePtr curve
 The original curve.
int orientation
 The orientation of this curve part.
int start
 Start of the interval, inside path, to which this curve part corresponds (inclusive).
int end
 End of the interval, inside path, to which this curve part corresponds (inclusive).

Detailed Description

A part of a curve.

This part is defined by a curve, and by two indexes that give the start and end points of this curve part inside the whole curve.

Author:
Antoine Begault

Constructor & Destructor Documentation

proland::BasicCurvePart::BasicCurvePart ( CurvePtr  p,
int  start,
int  end 
)

Creates a new CurvePart.

Parameters:
p the whole curve.
start start of the interval in p to which this part corresponds.
end end of the interval in p to which this part corresponds.
proland::BasicCurvePart::BasicCurvePart ( CurvePtr  p,
int  orientation,
int  start,
int  end 
)

Creates a new CurvePart.

Parameters:
p the whole curve.
orientation the curve part orientation (see orientation).
start start of the interval in p to which this part corresponds.
end end of the interval in p to which this part corresponds.

Member Function Documentation

virtual bool proland::BasicCurvePart::canClip ( int  i  )  const [virtual]

Returns false if the i'th point is a controlPoint, else true.

Parameters:
i rank of the point.

Reimplemented from proland::CurvePart.

virtual CurvePart* proland::BasicCurvePart::clip ( int  start,
int  end 
) const [virtual]

Clips this curvePart.

Parameters:
start starting point.
end end point.
Returns:
a new CurvePart, result of the clipping of this CurvePart.

Implements proland::CurvePart.

virtual box2d proland::BasicCurvePart::getBounds (  )  const [virtual]

Returns the bounds of this curvePart.

Implements proland::CurvePart.

CurvePtr proland::BasicCurvePart::getCurve (  )  const [virtual]

Returns the original curve.

Reimplemented from proland::CurvePart.

int proland::BasicCurvePart::getCurveIndex ( int  i  )  const

Returns the corresponding index of i in the original curve.

Parameters:
i rank of the point
virtual int proland::BasicCurvePart::getEnd (  )  const [virtual]

Returns the length if this curvepart.

Implements proland::CurvePart.

virtual CurveId proland::BasicCurvePart::getId (  )  const [virtual]

Returns the original curve Id.

Reimplemented from proland::CurvePart.

virtual bool proland::BasicCurvePart::getIsControl ( int  i  )  const [virtual]

Returns the value isControl of the i'th point from this curve.

Parameters:
i rank of the point to get the boolean from.

Reimplemented from proland::CurvePart.

virtual CurveId proland::BasicCurvePart::getParentId (  )  const [virtual]

Returns the original curve parentId.

Reimplemented from proland::CurvePart.

virtual float proland::BasicCurvePart::getS ( int  i  )  const [virtual]

Returns the S coords of the i'th point from this curve.

Parameters:
i rank of the point to get the coord from.

Implements proland::CurvePart.

virtual int proland::BasicCurvePart::getType (  )  const [virtual]

Returns the original curve type.

Reimplemented from proland::CurvePart.

virtual float proland::BasicCurvePart::getWidth (  )  const [virtual]

Returns the original curve width.

Reimplemented from proland::CurvePart.

virtual vec2d proland::BasicCurvePart::getXY ( int  i  )  const [virtual]

Returns the XY coords of the i'th point from this curve.

Parameters:
i rank of the point to get the coords from.

Implements proland::CurvePart.


Member Data Documentation

CurvePtr proland::BasicCurvePart::curve [protected]

The original curve.

End of the interval, inside path, to which this curve part corresponds (inclusive).

The orientation of this curve part.

0 means that the curve's start and end are given by start and end respectively. 1 means that the curve's start and end are given by end and start respectively (note that end is always greater than start).

Start of the interval, inside path, to which this curve part corresponds (inclusive).


Generated on Sat May 12 09:42:47 2012 for proland by  doxygen 1.6.1