PointSourceNode
#include <pointsourcenode.h>
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 () |
SkyMapLite * | map () const |
const Projector * | projector () |
virtual void | show () |
SkyObject * | skyObject () const |
void | update (bool drawLabel) |
bool | visible () |
Public Member Functions inherited from QSGTransformNode | |
const QMatrix4x4 & | matrix () const const |
void | setMatrix (const QMatrix4x4 &matrix) |
Public Member Functions inherited from QSGNode | |
void | appendChildNode (QSGNode *node) |
QSGNode * | childAtIndex (int i) const const |
int | childCount () const const |
QSGNode * | firstChild () const const |
Flags | flags () const const |
void | insertChildNodeAfter (QSGNode *node, QSGNode *after) |
void | insertChildNodeBefore (QSGNode *node, QSGNode *before) |
virtual bool | isSubtreeBlocked () const const |
QSGNode * | lastChild () const const |
void | markDirty (DirtyState bits) |
QSGNode * | nextSibling () const const |
QSGNode * | parent () const const |
void | prependChildNode (QSGNode *node) |
virtual void | preprocess () |
QSGNode * | previousSibling () 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 | |
typedef | DirtyState |
enum | DirtyStateBit |
enum | Flag |
typedef | Flags |
enum | NodeType |
Public Attributes inherited from SkyNode | |
SkyOpacityNode * | m_opacity { nullptr } |
Public Attributes inherited from QSGNode | |
BasicNodeType | |
ClipNodeType | |
DirtyForceUpdate | |
DirtyGeometry | |
DirtyMaterial | |
DirtyMatrix | |
DirtyNodeAdded | |
DirtyNodeRemoved | |
DirtyOpacity | |
DirtyPropagationMask | |
DirtySubtreeBlocked | |
DirtyUsePreprocess | |
GeometryNodeType | |
InternalReserved | |
IsVisitableNode | |
OpacityNodeType | |
OwnedByParent | |
OwnsGeometry | |
OwnsMaterial | |
OwnsOpaqueMaterial | |
RenderNodeType | |
RootNodeType | |
TransformNodeType | |
UsePreprocess | |
Protected Attributes inherited from SkyNode | |
bool | m_drawLabel { false } |
int | m_hideCount { 0 } |
SkyObject * | m_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
- Version
- 1.0
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 ) |
Constructor.
- Parameters
-
skyObject pointer to SkyObject that has to be displayed on SkyMapLite parentNode pointer to the top parent node, which holds texture cache labelType label type of PointNode spType spectral class of PointNode size initial size of PointNode trixel trixelID, with which this node is indexed
Definition at line 18 of file pointsourcenode.cpp.
◆ ~PointSourceNode()
|
virtual |
Definition at line 47 of file pointsourcenode.cpp.
Member Function Documentation
◆ changePos()
|
overridevirtual |
changePos changes the position m_point
- Parameters
-
pos new position
Reimplemented from SkyNode.
Definition at line 67 of file pointsourcenode.cpp.
◆ hide()
|
overridevirtual |
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()
|
overridevirtual |
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
- Parameters
-
pos position of this node on SkyMapLite drawLabel true 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:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 11 2024 12:15:13 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.