LineListIndex

Search for usage in LXR

#include <linelistindex.h>

Inheritance diagram for LineListIndex:

Public Member Functions

 LineListIndex (SkyComposite *parent, const QString &name="")
 
void draw (SkyPainter *skyp) override
 
virtual void JITupdate (LineList *lineList)
 
- Public Member Functions inherited from SkyComponent
 SkyComponent (SkyComposite *parent=nullptr)
 
virtual void drawTrails (SkyPainter *skyp)
 
virtual void emitProgressText (const QString &message)
 
virtual SkyObjectfindByName (const QString &name, bool exact=true)
 
QHash< int, QVector< QPair< QString, const SkyObject * > > > & objectLists ()
 
QVector< QPair< QString, const SkyObject * > > & objectLists (int type)
 
QHash< int, QStringList > & objectNames ()
 
QStringListobjectNames (int type)
 
virtual SkyObjectobjectNearest (SkyPoint *p, double &maxrad)
 
virtual void objectsInArea (QList< SkyObject * > &list, const SkyRegion &region)
 
SkyCompositeparent ()
 
void removeFromLists (const SkyObject *obj)
 
void removeFromNames (const SkyObject *obj)
 
virtual bool selected ()
 
virtual void update (KSNumbers *)
 
virtual void updateMoons (KSNumbers *)
 
virtual void updateSolarSystemBodies (KSNumbers *)
 

Protected Member Functions

void appendBoth (const std::shared_ptr< LineList > &lineList)
 
void appendLine (const std::shared_ptr< LineList > &lineList)
 
void appendPoly (const std::shared_ptr< LineList > &lineList)
 
virtual MeshBufNum_t drawBuffer ()
 
void drawFilled (SkyPainter *skyp)
 
void drawLines (SkyPainter *skyp)
 
virtual const IndexHashgetIndexHash (LineList *lineList)
 
void intro ()
 
virtual LineListLabel * label ()
 
LineListList listList () const
 
QString name () const
 
virtual void preDraw (SkyPainter *skyp)
 
void reindexLines ()
 
void removeLine (const std::shared_ptr< LineList > &lineList)
 
virtual SkipHashList * skipList (LineList *lineList)
 
SkyMeshskyMesh ()
 
void summary ()
 

Detailed Description

Contains almost all the code needed for indexing and drawing and clipping lines and polygons.

Author
James B. Bowlin
Version
0.1

Definition at line 29 of file linelistindex.h.

Constructor & Destructor Documentation

◆ LineListIndex()

LineListIndex::LineListIndex ( SkyComposite parent,
const QString name = "" 
)
explicit

Constructor Simply set the internal skyMesh, parent, and name.

Parameters
parentPointer to the parent SkyComponent object
namename of the subclass used for debugging

Definition at line 34 of file linelistindex.cpp.

Member Function Documentation

◆ appendBoth()

void LineListIndex::appendBoth ( const std::shared_ptr< LineList > &  lineList)
protected

a convenience method that adds a lineList to both the lineIndex and the polyIndex.

Definition at line 100 of file linelistindex.cpp.

◆ appendLine()

void LineListIndex::appendLine ( const std::shared_ptr< LineList > &  lineList)
protected

Typically called from within a subclasses constructors.

Adds the trixels covering the outline of lineList to the lineIndex.

Definition at line 63 of file linelistindex.cpp.

◆ appendPoly()

void LineListIndex::appendPoly ( const std::shared_ptr< LineList > &  lineList)
protected

Typically called from within a subclasses constructors.

Adds the trixels covering the full lineList to the polyIndex.

Definition at line 82 of file linelistindex.cpp.

◆ draw()

void LineListIndex::draw ( SkyPainter skyp)
overridevirtual

The top level draw routine.

Draws all the LineLists for any subclass in one fell swoop which minimizes some of the loop overhead. Overridden by MilkWay so it can decide whether to draw outlines or filled. Therefore MilkyWay does not need to override preDraw(). The MilkyWay draw() routine calls all of the more specific draw() routines below.

Implements SkyComponent.

Reimplemented in MilkyWay.

Definition at line 158 of file linelistindex.cpp.

◆ drawBuffer()

virtual MeshBufNum_t LineListIndex::drawBuffer ( )
inlineprotectedvirtual

a callback overridden by NoPrecessIndex so it can use the drawing code with the non-reverse-precessed mesh buffer.

Reimplemented in NoPrecessIndex.

Definition at line 142 of file linelistindex.h.

◆ drawFilled()

void LineListIndex::drawFilled ( SkyPainter skyp)
protected

Draws all the lines in m_listList as filled polygons in float mode.

Definition at line 203 of file linelistindex.cpp.

◆ drawLines()

void LineListIndex::drawLines ( SkyPainter skyp)
protected

Draws all the lines in m_listList as simple lines in float mode.

Definition at line 180 of file linelistindex.cpp.

◆ getIndexHash()

const IndexHash & LineListIndex::getIndexHash ( LineList lineList)
protectedvirtual

Returns an IndexHash from the SkyMesh that contains the set of trixels that cover lineList.

Overridden by SkipListIndex so it can pass SkyMesh an IndexHash indicating which line segments should not be indexed

Parameters
lineListcontains the list of points to be covered.

Reimplemented in MilkyWay, and ConstellationLines.

Definition at line 42 of file linelistindex.cpp.

◆ intro()

void LineListIndex::intro ( )
protected

displays a message that we are loading m_name.

Also prints out the message if skyMesh debug is greater than zero.

Definition at line 234 of file linelistindex.cpp.

◆ JITupdate()

void LineListIndex::JITupdate ( LineList lineList)
virtual

this is called from within the draw routines when the updateID of the lineList is stale.

It is virtual because different subclasses have different update routines. NoPrecessIndex doesn't precess in the updates and ConstellationLines must update its points as stars, not points. that doesn't precess the points.

Reimplemented in ConstellationLines, and NoPrecessIndex.

Definition at line 129 of file linelistindex.cpp.

◆ name()

QString LineListIndex::name ( ) const
inlineprotected

retrieve name of object

Definition at line 84 of file linelistindex.h.

◆ preDraw()

void LineListIndex::preDraw ( SkyPainter skyp)
protectedvirtual

Gives the subclasses access to the top of the draw() method.

Typically used for setting the QPen, etc. in the QPainter being passed in. Defaults to setting a thin white pen.

Reimplemented in CoordinateGrid, ConstellationLines, Equator, EquatorialCoordinateGrid, HorizontalCoordinateGrid, and LocalMeridianComponent.

Definition at line 153 of file linelistindex.cpp.

◆ reindexLines()

void LineListIndex::reindexLines ( )
protected

as the name says, recreates the lineIndex using the LineLists in the previous index.

Since we are indexing everything at J2000 this is only used by ConstellationLines which needs to reindex because of the proper motion of the stars.

Definition at line 108 of file linelistindex.cpp.

◆ skipList()

SkipHashList * LineListIndex::skipList ( LineList lineList)
protectedvirtual

Also overridden by SkipListIndex.

Controls skipping inside of the draw() routines. The default behavior is to simply return a null pointer.

FIXME: I don't think that the SkipListIndex class even exists – hdevalence

Reimplemented in MilkyWay.

Definition at line 174 of file linelistindex.cpp.

◆ skyMesh()

SkyMesh* LineListIndex::skyMesh ( )
inlineprotected

Returns the SkyMesh object.

Definition at line 99 of file linelistindex.h.

◆ summary()

void LineListIndex::summary ( )
protected

prints out some summary statistics if the skyMesh debug is greater than 1.

Definition at line 241 of file linelistindex.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Wed Aug 17 2022 04:14:21 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.