Programmer's Documentation

Public Member Functions | Protected Attributes | List of all members
BezierSegment Class Reference

Detailed Description

Single cubic Bezier segment.

Object representing a single cubic Bezier segment. This is not particularly useful in itself, but will be as a building block for other curves.

#include <beziersegment.h>

Inheritance diagram for BezierSegment:
Collaboration diagram for BezierSegment:

Public Member Functions

 BezierSegment (const std::string &s="")
 undefined segment
 BezierSegment (const Vct3 &p0, const Vct3 &t0, const Vct3 &p1, const Vct3 &t1)
 segment defined by two points and two tangents
virtual BezierSegmentclone () const
 create a clone
void byTangents (const Vct3 &p0, const Vct3 &t0, const Vct3 &p1, const Vct3 &t1)
 construct a Bezier segment from points and tangents
const Vct3 * controls () const
 access the array of 4 control points
Vct3 eval (Real t) const
 evaluate spline curve
Vct3 derive (Real t, uint k) const
 compute kth derivative
void apply ()
 apply hard transformation
- Public Member Functions inherited from AbstractCurve
 AbstractCurve (const std::string &s="")
 unamed curve
virtual ~AbstractCurve ()
 virtual destructor
void rename (const std::string &s)
 change name
const std::string & name () const
 return name
virtual void tgline (Real t, Vct3 &c, Vct3 &dc) const
 compute point and first derivative in one sweep
virtual Real curvature (Real t) const
 compute curvature at t
virtual void initGrid (Vector &t) const
 generate a reasonable discretization
virtual uint discretize (const DcMeshCritBase &mcrit, Vector &t) const
 discretization based on simple criteria
virtual void tessellate (CgMesh &cgr) const
 discretized for visualization based on default grid
virtual bool project (const Vct3 &pt, Real &s, Real stol=gmepsilon, Real ttol=1e-6) const
 project point onto curve, starting at t
virtual bool pierce (const Vct3 &pn, Real dp, Real &s, Real stol=gmepsilon) const
 compute intersection of curve with plane (pn,dp), return success
virtual XmlElement toXml (bool share=false) const
 XML output.
virtual void fromXml (const XmlElement &xe)
 XML input.
virtual int toIges (IgesFile &file, int tfi=0) const
 write curve to iges file
virtual bool fromIges (const IgesFile &file, const IgesDirEntry &dir)
 extract curve from iges file
- Public Member Functions inherited from RFrame
void clear ()
Vct3 getOrigin () const
void translate (const Vct3 &v)
void translate (Real dx, Real dy, Real dz)
void rotate (Real betax, Real betay, Real betaz)
void rotate (const Vct3 &rotax, Real angle)
void scale (Real xf, Real yf, Real zf)
void scale (Real f)
void mirror (const Vct3 &normal)
const SMatrix< 4, 4 > & trafoMatrix () const
void setTrafoMatrix (const SMatrix< 4, 4 > &m)
Vct3 forward (const Vct3 &a) const
void forward (const PointList< 4 > &a, PointList< 4 > &b) const

Protected Attributes

Vct3 m_cp [4]
 four control points
- Protected Attributes inherited from AbstractCurve
std::string ids
 curve object name
- Protected Attributes inherited from RFrame
SMatrix< 4, 4 > mat

Additional Inherited Members

- Static Public Member Functions inherited from AbstractCurve
static AbstractCurvePtr createFromXml (const XmlElement &xe)
 create curve from any xml representation
static AbstractCurvePtr createFromIges (const IgesFile &file, const IgesDirEntry &entry)
 create curve from IGES entity
static void gridFromKnots (uint n, const Vector &kts, Vector &t, Real tstart=0.0, Real tend=1.0)
 discretization from spline knot vector
static uint arclenParamet (const AbstractCurveArray &cpa, Vector &vp)
 Parametrization of curve sets. More...
- Protected Member Functions inherited from AbstractCurve
void setIgesName (const IgesFile &file, const IgesEntity &e)
 find curves that fit together and create a composite curve, decimate list More...
void setIgesTransform (const IgesFile &file, const IgesDirEntry &entry)
 extract referenced transformation matrix from IGES file, apply

The documentation for this class was generated from the following files:
Generated on Mon Jan 24 2022 03:03:17 for libsurf by   doxygen 1.8.5