a2dVpathQBCurveSegment Class Reference
[vector path a2dCanvasObject plus segment classes]

Quadratic Bezier curve. More...

#include <polyver.h>

Inheritance diagram for a2dVpathQBCurveSegment:

Inheritance graph
[legend]
Collaboration diagram for a2dVpathQBCurveSegment:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 a2dVpathQBCurveSegment (double x1, double y1, double x2, double y2, a2dPATHSEG type=a2dPATHSEG_QBCURVETO, a2dPATHSEG_END close=a2dPATHSEG_END_OPEN)
 constructor
 a2dVpathQBCurveSegment (const a2dVpathSegment &prev, double x1, double y1, a2dPATHSEG type=a2dPATHSEG_QBCURVETO, a2dPATHSEG_END close=a2dPATHSEG_END_OPEN)
 constructor
 a2dVpathQBCurveSegment (const a2dVpathQBCurveSegment &other)
 copy constructor
 ~a2dVpathQBCurveSegment ()
 destructor
virtual a2dVpathSegmentClone ()
 create exact copy
virtual double Length (const a2dVpathSegment &prev)
 calculate length
void PositionAt (const a2dVpathSegment &prev, double t, double &xt, double &yt)
 calculate position at t, used for length

Public Attributes

double m_x2
 control point
double m_y2
 control point


Detailed Description

Quadratic Bezier curve.

Create a curved segment based on qaudratic Bezier spline let P0 be end point of previous segment let P1 be inbetween point of this segment (m_x2, m_y2) let P2 be end point of this segment (m_x1, m_y1)

Then the formula describing points on the curve are:

For ( 0 <= t <= 1 ) Point(t) = (1-t)^2*P0 + 2*t*(1-t)*P1 + t^2*P2

Definition at line 941 of file polyver.h.


Constructor & Destructor Documentation

a2dVpathQBCurveSegment::a2dVpathQBCurveSegment ( double  x1,
double  y1,
double  x2,
double  y2,
a2dPATHSEG  type = a2dPATHSEG_QBCURVETO,
a2dPATHSEG_END  close = a2dPATHSEG_END_OPEN 
)

constructor

Parameters:
x1 endpoint of curve
y1 endpoint of curve
x2 first control point coming from previous segment in path
y2 first control point coming from previous segment in path
type draw or move towards point
close if true close this path with the last move command/segment

Definition at line 3549 of file polyver.cpp.

a2dVpathQBCurveSegment::a2dVpathQBCurveSegment ( const a2dVpathSegment prev,
double  x1,
double  y1,
a2dPATHSEG  type = a2dPATHSEG_QBCURVETO,
a2dPATHSEG_END  close = a2dPATHSEG_END_OPEN 
)

constructor

Parameters:
prev previous segment
x1 endpoint of curve
y1 endpoint of curve
type draw or move towards point
close if true close this path with the last move command/segment

Definition at line 3561 of file polyver.cpp.


The documentation for this class was generated from the following files:
a2dVpathQBCurveSegment Class Reference -- Tue Aug 31 18:36:50 2010 -- 31 Aug 2010 -- 1.5.5 -- wxArt2D -- . -- Main Page Reference Documentation