Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
timelinephase.h
Package: celestia-1.6.0.tar.gz [view]
Upload User: center1979
Upload Date: 2022-07-26
Package Size: 50633k
Code Size: 3k
Category:
OpenGL program
Development Platform:
Visual C++
- // timelinephase.h
- //
- // Object timeline phase
- //
- // Copyright (C) 2008, the Celestia Development Team
- // Initial version by Chris Laurel, claurel@gmail.com
- //
- // This program is free software; you can redistribute it and/or
- // modify it under the terms of the GNU General Public License
- // as published by the Free Software Foundation; either version 2
- // of the License, or (at your option) any later version.
- #ifndef _CELENGINE_TIMELINEPHASE_H_
- #define _CELENGINE_TIMELINEPHASE_H_
- class ReferenceFrame;
- class Orbit;
- class RotationModel;
- class FrameTree;
- class Universe;
- class Body;
- class TimelinePhase
- {
- public:
- int addRef() const;
- int release() const;
- Body* body() const
- {
- return m_body;
- }
- double startTime() const
- {
- return m_startTime;
- }
- double endTime() const
- {
- return m_endTime;
- }
- ReferenceFrame* orbitFrame() const
- {
- return m_orbitFrame;
- }
- Orbit* orbit() const
- {
- return m_orbit;
- }
- ReferenceFrame* bodyFrame() const
- {
- return m_bodyFrame;
- }
- RotationModel* rotationModel() const
- {
- return m_rotationModel;
- }
- /*! Get the frame tree that contains this phase (always the tree associated
- * with the center of the orbit frame.)
- */
- FrameTree* getFrameTree() const
- {
- return m_owner;
- }
- /*! Check whether the specified time t lies within this phase. True if
- * startTime <= t < endTime
- */
- bool includes(double t) const
- {
- return m_startTime <= t && t < m_endTime;
- }
- static TimelinePhase* CreateTimelinePhase(Universe& universe,
- Body* body,
- double startTime,
- double endTime,
- ReferenceFrame& orbitFrame,
- Orbit& orbit,
- ReferenceFrame& bodyFrame,
- RotationModel& rotationModel);
- private:
- // Private constructor; phases can only created with the
- // createTimelinePhase factory method.
- TimelinePhase(Body* _body,
- double _startTime,
- double _endTime,
- ReferenceFrame* _orbitFrame,
- Orbit* _orbit,
- ReferenceFrame* _bodyFrame,
- RotationModel* _rotationModel,
- FrameTree* _owner);
- // Private copy constructor and assignment operator; should never be used.
- TimelinePhase(const TimelinePhase& phase);
- TimelinePhase& operator=(const TimelinePhase& phase);
- // TimelinePhases are refCounted; use release() instead.
- ~TimelinePhase();
- private:
- Body* m_body;
- double m_startTime;
- double m_endTime;
- ReferenceFrame* m_orbitFrame;
- Orbit* m_orbit;
- ReferenceFrame* m_bodyFrame;
- RotationModel* m_rotationModel;
- FrameTree* m_owner;
- mutable int refCount;
- };
- #endif // _CELENGINE_TIMELINEPHASE_H_