Search for usage in LXR

PointSourceNode Class Reference

#include <pointsourcenode.h>

Inheritance diagram for PointSourceNode:

Public Member Functions

 PointSourceNode (SkyObject *skyObject, RootNode *parentNode, LabelsItem::label_t labelType=LabelsItem::label_t::STAR_LABEL, char spType='A', float size=1, short trixel=-1)
virtual void changePos (QPointF pos) override
virtual void hide () override
float starWidth (float mag) const
virtual void update () override
void updatePoint ()
void updatePos (QPointF pos, bool drawLabel)
- Public Member Functions inherited from SkyNode
 SkyNode (SkyObject *skyObject)
void addChildNode (QSGNode *node)
int hideCount ()
SkyMapLitemap () const
const Projectorprojector ()
virtual void show ()
SkyObjectskyObject () const
void update (bool drawLabel)
bool visible ()
- Public Member Functions inherited from QSGTransformNode
const QMatrix4x4matrix () const const
void setMatrix (const QMatrix4x4 &matrix)
- Public Member Functions inherited from QSGNode
void appendChildNode (QSGNode *node)
QSGNodechildAtIndex (int i) const const
int childCount () const const
QSGNodefirstChild () const const
Flags flags () const const
void insertChildNodeAfter (QSGNode *node, QSGNode *after)
void insertChildNodeBefore (QSGNode *node, QSGNode *before)
virtual bool isSubtreeBlocked () const const
QSGNodelastChild () const const
void markDirty (DirtyState bits)
QSGNodenextSibling () const const
QSGNodeparent () const const
void prependChildNode (QSGNode *node)
virtual void preprocess ()
QSGNodepreviousSibling () const const
void removeAllChildNodes ()
void removeChildNode (QSGNode *node)
void setFlag (Flag f, bool enabled)
void setFlags (Flags f, bool enabled)
NodeType type () const const

Additional Inherited Members

- Public Types inherited from QSGNode
enum  DirtyStateBit
enum  Flag
enum  NodeType
- Public Attributes inherited from SkyNode
SkyOpacityNodem_opacity { nullptr }
- Public Attributes inherited from QSGNode
typedef DirtyState
typedef Flags
- Protected Attributes inherited from SkyNode
bool m_drawLabel { false }
int m_hideCount { 0 }
SkyObjectm_skyObject { nullptr }

Detailed Description

A SkyNode derived class used for displaying PointNode with coordinates provided by SkyObject.

A SkyNode derived class that represents stars and objects that are drawn as stars

Artem Fedoskin

Definition at line 26 of file pointsourcenode.h.

Constructor & Destructor Documentation

◆ PointSourceNode()

PointSourceNode::PointSourceNode ( SkyObject * skyObject,
RootNode * parentNode,
LabelsItem::label_t labelType = LabelsItem::label_t::STAR_LABEL,
char spType = 'A',
float size = 1,
short trixel = -1 )


skyObjectpointer to SkyObject that has to be displayed on SkyMapLite
parentNodepointer to the top parent node, which holds texture cache
labelTypelabel type of PointNode
spTypespectral class of PointNode
sizeinitial size of PointNode
trixeltrixelID, with which this node is indexed

Definition at line 18 of file pointsourcenode.cpp.

◆ ~PointSourceNode()

PointSourceNode::~PointSourceNode ( )

Definition at line 47 of file pointsourcenode.cpp.

Member Function Documentation

◆ changePos()

void PointSourceNode::changePos ( QPointF pos)

changePos changes the position m_point

posnew position

Reimplemented from SkyNode.

Definition at line 67 of file pointsourcenode.cpp.

◆ hide()

void PointSourceNode::hide ( )

hides this node and its label.

m_point is hided without explicitly doing this because it is a child node of m_opacity inherited from SkyNode

Reimplemented from SkyNode.

Definition at line 128 of file pointsourcenode.cpp.

◆ starWidth()

float PointSourceNode::starWidth ( float mag) const

Get the width of a star of magnitude mag.

Definition at line 25 of file pointsourcenode.cpp.

◆ update()

void PointSourceNode::update ( )

update updates coordinates of this node based on the visibility of its SkyObject

Reimplemented from SkyNode.

Definition at line 77 of file pointsourcenode.cpp.

◆ updatePoint()

void PointSourceNode::updatePoint ( )

updatePoint initializes PointNode if not done that yet.

Makes it visible and updates its size. By using this function we can save some memory because m_point is created only when this PointSourceNode becomes visible.

Definition at line 56 of file pointsourcenode.cpp.

◆ updatePos()

void PointSourceNode::updatePos ( QPointF pos,
bool drawLabel )

updatePos updates position of this node and its label.

Initializes label if needed The reason behind this function is that in StarItem we are already checking the visibility of star to decide whether we need to create this node or no. So to avoid calculating the same thing twice we set position of object directly. Also through this function StarItem sets the visibility of label

posposition of this node on SkyMapLite
drawLabeltrue if label has to be drawn

Definition at line 99 of file pointsourcenode.cpp.

The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 17 2024 11:48:28 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.