• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

kig

Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
ConicImp Class Referenceabstract

#include <conic_imp.h>

Inheritance diagram for ConicImp:
Inheritance graph
[legend]

Public Types

typedef CurveImp Parent
 
- Public Types inherited from CurveImp
typedef ObjectImp Parent
 

Public Member Functions

virtual const ConicCartesianData cartesianData () const
 
virtual QString cartesianEquationString (const KigDocument &w) const
 
virtual Coordinate coniccenter () const
 
virtual int conicType () const
 
virtual QString conicTypeString () const
 
bool contains (const Coordinate &p, int width, const KigWidget &) const
 
bool containsPoint (const Coordinate &p, const KigDocument &doc) const
 
void draw (KigPainter &p) const
 
bool equals (const ObjectImp &rhs) const
 
virtual Coordinate focus1 () const
 
virtual Coordinate focus2 () const
 
double getParam (const Coordinate &point, const KigDocument &) const
 
double getParam (const Coordinate &point) const
 
const Coordinate getPoint (double param, const KigDocument &) const
 
const Coordinate getPoint (double param) const
 
const char * iconForProperty (int which) const
 
const ObjectImpType * impRequirementForProperty (int which) const
 
bool inRect (const Rect &r, int width, const KigWidget &) const
 
bool internalContainsPoint (const Coordinate &p, double threshold) const
 
bool isPropertyDefinedOnOrThroughThisImp (int which) const
 
bool isVerticalParabola (ConicCartesianData &data) const
 
int numberOfProperties () const
 
virtual const ConicPolarData polarData () const =0
 
virtual QString polarEquationString (const KigDocument &w) const
 
const QByteArrayList properties () const
 
const QByteArrayList propertiesInternalNames () const
 
ObjectImp * property (int which, const KigDocument &w) const
 
Rect surroundingRect () const
 
ObjectImp * transform (const Transformation &) const
 
const ObjectImpType * type () const
 
bool valid () const
 
void visit (ObjectImpVisitor *vtor) const
 
- Public Member Functions inherited from CurveImp
Coordinate attachPoint () const
 
QString cartesianEquationString (const KigDocument &w) const
 
virtual CurveImp * copy () const =0
 
- Public Member Functions inherited from ObjectImp
virtual ~ObjectImp ()
 
virtual bool canFillInNextEscape () const
 
virtual void fillInNextEscape (QString &s, const KigDocument &) const
 
int getPropGid (const char *pname) const
 
int getPropLid (int propgid) const
 
const char * getPropName (int propgid) const
 
bool inherits (const ObjectImpType *t) const
 
virtual bool isCache () const
 
bool valid () const
 

Static Public Member Functions

static const ObjectImpType * stype ()
 
- Static Public Member Functions inherited from CurveImp
static const ObjectImpType * stype ()
 
- Static Public Member Functions inherited from ObjectImp
static const ObjectImpType * stype ()
 

Protected Member Functions

 ConicImp ()
 
 ~ConicImp ()
 
- Protected Member Functions inherited from CurveImp
double getDist (double param, const Coordinate &p, const KigDocument &doc) const
 
double getParamofmin (double a, double b, const Coordinate &p, const KigDocument &doc) const
 
- Protected Member Functions inherited from ObjectImp
 ObjectImp ()
 

Detailed Description

An ObjectImp representing a conic.

A conic is a general second degree curve, and some beautiful theory has been developed about it. See a math book for more information. This class is in fact an abstract base class hiding the fact that a ConicImp can be constructed in two ways. If only its Cartesian equation is known, then you should use ConicImpCart, otherwise, you should use ConicImpPolar. If the other representation is needed, it will be calculated, but a cartesian representation is rarely needed, and not calculating saves some CPU cycles.

Definition at line 39 of file conic_imp.h.

Member Typedef Documentation

typedef CurveImp ConicImp::Parent

Definition at line 46 of file conic_imp.h.

Constructor & Destructor Documentation

ConicImp::ConicImp ( )
protected

Definition at line 357 of file conic_imp.cc.

ConicImp::~ConicImp ( )
protected

Definition at line 361 of file conic_imp.cc.

Member Function Documentation

const ConicCartesianData ConicImp::cartesianData ( ) const
virtual

Return the cartesian representation of this conic.

Reimplemented in ConicImpCart, and CircleImp.

Definition at line 285 of file conic_imp.cc.

QString ConicImp::cartesianEquationString ( const KigDocument &  w) const
virtual

A string containing the cartesian equation of the conic.

This will be of the form "a x^2 + b y^2 + c xy + d x + e y + f = 0".

Reimplemented in CircleImp.

Definition at line 221 of file conic_imp.cc.

Coordinate ConicImp::coniccenter ( ) const
virtual

Return the center of this conic.

Definition at line 295 of file conic_imp.cc.

int ConicImp::conicType ( ) const
virtual

Type of conic.

Return what type of conic this is: -1 for a hyperbola 0 for a parabola 1 for an ellipse

Reimplemented in CircleImp.

Definition at line 191 of file conic_imp.cc.

QString ConicImp::conicTypeString ( ) const
virtual

A string containing "Hyperbola", "Parabola" or "Ellipse".

Definition at line 205 of file conic_imp.cc.

bool ConicImp::contains ( const Coordinate &  p,
int  width,
const KigWidget &  w 
) const
virtual

Implements ObjectImp.

Reimplemented in ConicArcImp.

Definition at line 52 of file conic_imp.cc.

bool ConicImp::containsPoint ( const Coordinate &  p,
const KigDocument &   
) const
virtual

Return whether this Curve contains the given point.

This is implemented as a numerical approximation. Implementations can/should use the value test_threshold in common.h as a threshold value.

Implements CurveImp.

Reimplemented in ConicArcImp.

Definition at line 402 of file conic_imp.cc.

void ConicImp::draw ( KigPainter &  p) const
virtual

Implements ObjectImp.

Definition at line 42 of file conic_imp.cc.

bool ConicImp::equals ( const ObjectImp &  rhs) const
virtual

Returns true if this ObjectImp is equal to rhs.

This function checks whether rhs is of the same ObjectImp type, and whether it contains the same data as this ObjectImp.

It is used e.g. by the KigCommand stuff to see what the user has changed during a move.

Implements ObjectImp.

Definition at line 374 of file conic_imp.cc.

Coordinate ConicImp::focus1 ( ) const
virtual

Return the first focus of this conic.

Reimplemented in CircleImp.

Definition at line 290 of file conic_imp.cc.

Coordinate ConicImp::focus2 ( ) const
virtual

Return the second focus of this conic.

Reimplemented in CircleImp.

Definition at line 306 of file conic_imp.cc.

double ConicImp::getParam ( const Coordinate &  point,
const KigDocument &   
) const
virtual

Reimplemented from CurveImp.

Reimplemented in ConicArcImp.

Definition at line 144 of file conic_imp.cc.

double ConicImp::getParam ( const Coordinate &  point) const

Definition at line 149 of file conic_imp.cc.

const Coordinate ConicImp::getPoint ( double  param,
const KigDocument &   
) const
virtual

Implements CurveImp.

Reimplemented in ConicArcImp.

Definition at line 176 of file conic_imp.cc.

const Coordinate ConicImp::getPoint ( double  param) const

Definition at line 181 of file conic_imp.cc.

const char * ConicImp::iconForProperty ( int  which) const
virtual

Reimplemented from ObjectImp.

Reimplemented in ConicArcImp.

Definition at line 101 of file conic_imp.cc.

const ObjectImpType * ConicImp::impRequirementForProperty ( int  which) const
virtual

Reimplemented from ObjectImp.

Definition at line 94 of file conic_imp.cc.

bool ConicImp::inRect ( const Rect &  r,
int  width,
const KigWidget &   
) const
virtual

Implements ObjectImp.

Definition at line 57 of file conic_imp.cc.

bool ConicImp::internalContainsPoint ( const Coordinate &  p,
double  threshold 
) const

Definition at line 410 of file conic_imp.cc.

bool ConicImp::isPropertyDefinedOnOrThroughThisImp ( int  which) const
virtual

Reimplemented from ObjectImp.

Reimplemented in ConicArcImp.

Definition at line 439 of file conic_imp.cc.

bool ConicImp::isVerticalParabola ( ConicCartesianData &  data) const

Definition at line 446 of file conic_imp.cc.

int ConicImp::numberOfProperties ( ) const
virtual

Reimplemented from ObjectImp.

Reimplemented in ConicArcImp.

Definition at line 63 of file conic_imp.cc.

virtual const ConicPolarData ConicImp::polarData ( ) const
pure virtual

Return the polar representation of this conic.

Implemented in ConicImpPolar, ConicImpCart, and CircleImp.

QString ConicImp::polarEquationString ( const KigDocument &  w) const
virtual

A string containing the polar equation of the conic.

This will be of the form "rho = pdimen/(1 + ect cos( theta ) + est sin( theta ) )\n [centered at p]"

Reimplemented in CircleImp.

Definition at line 259 of file conic_imp.cc.

const QByteArrayList ConicImp::properties ( ) const
virtual

Reimplemented from ObjectImp.

Reimplemented in ConicArcImp.

Definition at line 81 of file conic_imp.cc.

const QByteArrayList ConicImp::propertiesInternalNames ( ) const
virtual

Reimplemented from ObjectImp.

Reimplemented in ConicArcImp.

Definition at line 68 of file conic_imp.cc.

ObjectImp * ConicImp::property ( int  which,
const KigDocument &  w 
) const
virtual

Reimplemented from ObjectImp.

Reimplemented in ConicArcImp.

Definition at line 122 of file conic_imp.cc.

const ObjectImpType * ConicImp::stype ( )
static

Returns the ObjectImpType representing the ConicImp type.

Definition at line 380 of file conic_imp.cc.

Rect ConicImp::surroundingRect ( ) const
virtual

Implements ObjectImp.

Definition at line 454 of file conic_imp.cc.

ObjectImp * ConicImp::transform ( const Transformation &  t) const
virtual

Return this ObjectImp, transformed by the transformation t.

Implements ObjectImp.

Reimplemented in ConicArcImp.

Definition at line 34 of file conic_imp.cc.

const ObjectImpType * ConicImp::type ( ) const
virtual

Returns the lowermost ObjectImpType that this object is an instantiation of.

E.g. if you want to get a string containing the internal name of the type of an object, you can do:

std::string typename = object.type()->internalName();

Implements ObjectImp.

Reimplemented in ConicArcImp.

Definition at line 397 of file conic_imp.cc.

bool ConicImp::valid ( ) const

Definition at line 47 of file conic_imp.cc.

void ConicImp::visit ( ObjectImpVisitor *  vtor) const
virtual

Implements ObjectImp.

Definition at line 369 of file conic_imp.cc.


The documentation for this class was generated from the following files:
  • conic_imp.h
  • conic_imp.cc
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:35:40 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kig

Skip menu "kig"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal