SkyNode

Search for usage in LXR

#include <skynode.h>

Inheritance diagram for SkyNode:

Public Member Functions

 SkyNode (SkyObject *skyObject)
 
void addChildNode (QSGNode *node)
 
virtual void changePos (QPointF pos)
 
virtual void hide ()
 
int hideCount ()
 
SkyMapLitemap () const
 
const Projectorprojector ()
 
virtual void show ()
 
SkyObjectskyObject () const
 
virtual void update ()
 
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
 
QSGNode::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 (QSGNode::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 (QSGNode::Flag f, bool enabled)
 
void setFlags (QSGNode::Flags f, bool enabled)
 
QSGNode::NodeType type () const const
 

Public Attributes

SkyOpacityNodem_opacity { nullptr }
 
- Public Attributes inherited from QSGNode
 BasicNodeType
 
 ClipNodeType
 
 DirtyForceUpdate
 
 DirtyGeometry
 
 DirtyMaterial
 
 DirtyMatrix
 
 DirtyNodeAdded
 
 DirtyNodeRemoved
 
 DirtyOpacity
 
 DirtyPropagationMask
 
typedef DirtyState
 
 DirtySubtreeBlocked
 
 DirtyUsePreprocess
 
typedef Flags
 
 GeometryNodeType
 
 InternalReserved
 
 IsVisitableNode
 
 OpacityNodeType
 
 OwnedByParent
 
 OwnsGeometry
 
 OwnsMaterial
 
 OwnsOpaqueMaterial
 
 RenderNodeType
 
 RootNodeType
 
 TransformNodeType
 
 UsePreprocess
 

Protected Attributes

bool m_drawLabel { false }
 
int m_hideCount { 0 }
 
SkyObjectm_skyObject { nullptr }
 

Additional Inherited Members

- Public Types inherited from QSGNode
enum  DirtyStateBit
 
enum  Flag
 
enum  NodeType
 

Detailed Description

Provides virtual functions for update of coordinates and nodes hiding.

A QSGTransformNode derived class that has to be subclassed by node containers like PlanetNode and PointSourceNode. SkyObject * that is passed as parameter to constructor is used in subclasses to calculate new coordinates in update(). Subclasses have to implement hide() so that each of their child nodes can be hidden.

Author
Artem Fedoskin
Version
1.0

Definition at line 27 of file skynode.h.

Constructor & Destructor Documentation

◆ SkyNode()

SkyNode::SkyNode ( SkyObject skyObject)
explicit

Constructor.

Parameters
skyObjectthat is represented on the SkyMapLIte

Definition at line 10 of file skynode.cpp.

Member Function Documentation

◆ changePos()

virtual void SkyNode::changePos ( QPointF  pos)
inlinevirtual

changes the position of SkyNode on SkyMapLite.

Has to be overridden by the classes that support moving

Parameters
posnew position

Reimplemented in PlanetNode, LabelNode, PointSourceNode, SatelliteNode, DeepSkyNode, GuideLabelNode, and SupernovaNode.

Definition at line 75 of file skynode.h.

◆ hide()

void SkyNode::hide ( )
virtual

hides all child nodes (sets opacity of m_opacity to 0)

Reimplemented in PointSourceNode, PlanetNode, DeepSkyNode, PlanetMoonsNode, SatelliteNode, ConstellationArtNode, SkyPolygonNode, and HorizonNode.

Definition at line 21 of file skynode.cpp.

◆ map()

SkyMapLite* SkyNode::map ( ) const
inline

short function to access SkyMapLite

Returns
pointer to instance of SkyMapLite class

Definition at line 45 of file skynode.h.

◆ show()

void SkyNode::show ( )
virtual

shows all child nodes (sets opacity of m_opacity to 1)

Definition at line 27 of file skynode.cpp.

◆ skyObject()

SkyObject* SkyNode::skyObject ( ) const
inline

returns SkyObject associated with this SkyNode

Returns
pointer to the object of type SkyObject

Definition at line 86 of file skynode.h.

◆ update() [1/2]

virtual void SkyNode::update ( )
inlinevirtual

Updates coordinate of the object on SkyMapLite.

Reimplemented in LabelNode, PointSourceNode, PlanetNode, GuideLabelNode, PlanetMoonsNode, SatelliteNode, ConstellationArtNode, SupernovaNode, and HorizonNode.

Definition at line 48 of file skynode.h.

◆ update() [2/2]

void SkyNode::update ( bool  drawLabel)

sets m_drawLabel to true if it is needed to be drawn and calls update()

Parameters
drawLabeltrue of label has to be drawn

Definition at line 33 of file skynode.cpp.

◆ visible()

bool SkyNode::visible ( )
Returns
true if object is visible (m_opacity->opacity() != 0) else returns false

Definition at line 44 of file skynode.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 Fri Aug 12 2022 04:01:02 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.