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
 
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
 

Public Attributes

SkyOpacityNodem_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

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

Additional Inherited Members

- Public Types inherited from QSGNode
typedef  DirtyState
 
enum  DirtyStateBit
 
enum  Flag
 
typedef  Flags
 
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() [1/2]

SkyNode::SkyNode ( SkyObject * skyObject)
explicit

Constructor.

Parameters
skyObjectthat is represented on the SkyMapLIte

Definition at line 10 of file skynode.cpp.

◆ SkyNode() [2/2]

SkyNode::SkyNode ( )

Definition at line 16 of file skynode.cpp.

◆ ~SkyNode()

virtual SkyNode::~SkyNode ( )
inlinevirtual

Definition at line 37 of file skynode.h.

Member Function Documentation

◆ addChildNode()

void SkyNode::addChildNode ( QSGNode * node)

Definition at line 39 of file skynode.cpp.

◆ 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 DeepSkyNode, GuideLabelNode, LabelNode, PlanetNode, PointSourceNode, SatelliteNode, 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 ConstellationArtNode, DeepSkyNode, HorizonNode, PlanetMoonsNode, PlanetNode, PointSourceNode, SatelliteNode, and SkyPolygonNode.

Definition at line 21 of file skynode.cpp.

◆ hideCount()

int SkyNode::hideCount ( )
inline

Definition at line 68 of file skynode.h.

◆ 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.

◆ projector()

const Projector * SkyNode::projector ( )
inline

Definition at line 39 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 ConstellationArtNode, GuideLabelNode, HorizonNode, LabelNode, PlanetMoonsNode, PlanetNode, PointSourceNode, SatelliteNode, and SupernovaNode.

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.

Member Data Documentation

◆ m_drawLabel

bool SkyNode::m_drawLabel { false }
protected

Definition at line 92 of file skynode.h.

◆ m_hideCount

int SkyNode::m_hideCount { 0 }
protected

Definition at line 93 of file skynode.h.

◆ m_opacity

SkyOpacityNode* SkyNode::m_opacity { nullptr }

Definition at line 88 of file skynode.h.

◆ m_skyObject

SkyObject* SkyNode::m_skyObject { nullptr }
protected

Definition at line 91 of file skynode.h.


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 Mon Nov 4 2024 16:38:45 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.