|
TrueReality
v0.1.1912
|
A rotating ring array model. More...
#include <RingArray.h>


Public Member Functions | |
| RingArray () | |
| Default constructor. More... | |
| RingArray (double angleCorrection) | |
| Constructor. More... | |
| virtual void | Update (double deltaTime) |
| This function gets called by the RingArrayCallback. More... | |
Static Public Attributes | |
| static const std::string | RING_1_FILE_NAME |
| static const std::string | RING_2_FILE_NAME |
| static const std::string | RING_3_FILE_NAME |
| static const std::string | RING_4_FILE_NAME |
Protected Member Functions | |
| ~RingArray () | |
| Destructor. More... | |
| void | LoadModels () |
| Loads the models and creates transform nodes for the model tree. More... | |
| void | SetupModelTree () |
| Sets up the model tree. More... | |
| void | UpdateRing1Slide (double deltaTime) |
| Updates the ring 1 slide. More... | |
| void | UpdateRing2Angle (double deltaTime) |
| Updates the ring 2 angle. More... | |
| void | UpdateRing2Slide (double deltaTime) |
| Updates the ring 2 slide. More... | |
| void | UpdateRing3Angle (double deltaTime) |
| Updates the ring 3 angle. More... | |
| void | UpdateRing3Slide (double deltaTime) |
| Updates the ring 3 slide. More... | |
| void | UpdateRing4Angle (double deltaTime) |
| Updates the ring 4 angle. More... | |
Private Attributes | |
| const double | MAX_RING_SPEED = 5.0 |
| const double | RING_ACCEL = 0.1 |
| const double | START_DELAY = 5.0 |
| trBase::SmrtPtr< osg::Group > | mRing1 |
| trBase::SmrtPtr< osg::PositionAttitudeTransform > | mRing1Slide |
| double | mRing1SlideSpeed = 0.0 |
| double | mRing1SlideAngle = 0.0 |
| double | mRing1SlideDelay = 0.0 |
| trBase::SmrtPtr< osg::Group > | mRing2 |
| trBase::SmrtPtr< osg::PositionAttitudeTransform > | mRing2Rotation |
| double | mRing2RotationSpeed = 0.0 |
| double | mRing2RotationAngle = 0.0 |
| double | mRing2RotationDelay = 0.0 |
| trBase::SmrtPtr< osg::PositionAttitudeTransform > | mRing2Slide |
| double | mRing2SlideSpeed = 0.0 |
| double | mRing2SlideAngle = 0.0 |
| double | mRing2SlideDelay = 0.0 |
| trBase::SmrtPtr< osg::Group > | mRing3 |
| trBase::SmrtPtr< osg::PositionAttitudeTransform > | mRing3Rotation |
| double | mRing3RotationSpeed = 0.0 |
| double | mRing3RotationAngle = 0.0 |
| double | mRing3RotationDelay = 0.0 |
| trBase::SmrtPtr< osg::PositionAttitudeTransform > | mRing3Slide |
| double | mRing3SlideSpeed = 0.0 |
| double | mRing3SlideAngle = 0.0 |
| double | mRing3SlideDelay = 0.0 |
| trBase::SmrtPtr< osg::Node > | mRing4 |
| trBase::SmrtPtr< osg::PositionAttitudeTransform > | mRing4Rotation |
| double | mRing4RotationSpeed = 0.0 |
| double | mRing4RotationAngle = 0.0 |
| double | mRing4RotationDelay = 0.0 |
| trBase::SmrtPtr< osg::PositionAttitudeTransform > | mAngleCorrection |
A rotating ring array model.
Definition at line 47 of file RingArray.h.
| trCore::SceneObjects::RingArray::RingArray | ( | ) |
Default constructor.
Definition at line 43 of file RingArray.cpp.
References LoadModels(), and SetupModelTree().

| trCore::SceneObjects::RingArray::RingArray | ( | double | angleCorrection | ) |
Constructor.
| angleCorrection | Changes the initial direction of the ring. Angle is in degrees. |
Definition at line 50 of file RingArray.cpp.
References trUtil::Math::Deg2Rad(), mAngleCorrection, and trBase::Z_AXIS().

|
protected |
Destructor.
Definition at line 62 of file RingArray.cpp.
|
protected |
Loads the models and creates transform nodes for the model tree.
Definition at line 67 of file RingArray.cpp.
References trUtil::PathUtils::GetStaticMeshesPath(), mAngleCorrection, mRing1, mRing1Slide, mRing2, mRing2Rotation, mRing2Slide, mRing3, mRing3Rotation, mRing3Slide, mRing4, mRing4Rotation, RING_1_FILE_NAME, RING_2_FILE_NAME, RING_3_FILE_NAME, and RING_4_FILE_NAME.
Referenced by RingArray().


|
protected |
Sets up the model tree.
Definition at line 96 of file RingArray.cpp.
References mAngleCorrection, mRing1, mRing1Slide, mRing2, mRing2Rotation, mRing2Slide, mRing3, mRing3Rotation, mRing3Slide, mRing4, and mRing4Rotation.
Referenced by RingArray().

|
virtual |
This function gets called by the RingArrayCallback.
| deltaTime | The delta time between frames. |
Definition at line 56 of file RingArray.cpp.
References UpdateRing1Slide().

|
protected |
Updates the ring 1 slide.
| deltaTime | The delta time. |
Definition at line 117 of file RingArray.cpp.
References MAX_RING_SPEED, mRing1Slide, mRing1SlideAngle, mRing1SlideDelay, mRing1SlideSpeed, RING_ACCEL, START_DELAY, trUtil::Math::TWO_PI, UpdateRing2Angle(), and trBase::X_AXIS().
Referenced by Update().


|
protected |
Updates the ring 2 angle.
| deltaTime | The delta time. |
Definition at line 146 of file RingArray.cpp.
References MAX_RING_SPEED, mRing2Rotation, mRing2RotationAngle, mRing2RotationDelay, mRing2RotationSpeed, RING_ACCEL, START_DELAY, trUtil::Math::TWO_PI, UpdateRing2Slide(), and trBase::Y_AXIS().
Referenced by UpdateRing1Slide().


|
protected |
Updates the ring 2 slide.
| deltaTime | The delta time. |
Definition at line 176 of file RingArray.cpp.
References MAX_RING_SPEED, mRing2Slide, mRing2SlideAngle, mRing2SlideDelay, mRing2SlideSpeed, RING_ACCEL, START_DELAY, trUtil::Math::TWO_PI, UpdateRing3Angle(), and trBase::X_AXIS().
Referenced by UpdateRing2Angle().


|
protected |
Updates the ring 3 angle.
| deltaTime | The delta time. |
Definition at line 205 of file RingArray.cpp.
References MAX_RING_SPEED, mRing3Rotation, mRing3RotationAngle, mRing3RotationDelay, mRing3RotationSpeed, RING_ACCEL, START_DELAY, trUtil::Math::TWO_PI, UpdateRing3Slide(), and trBase::Y_AXIS().
Referenced by UpdateRing2Slide().


|
protected |
Updates the ring 3 slide.
| deltaTime | The delta time. |
Definition at line 234 of file RingArray.cpp.
References MAX_RING_SPEED, mRing3Slide, mRing3SlideAngle, mRing3SlideDelay, mRing3SlideSpeed, RING_ACCEL, START_DELAY, trUtil::Math::TWO_PI, UpdateRing4Angle(), and trBase::X_AXIS().
Referenced by UpdateRing3Angle().


|
protected |
Updates the ring 4 angle.
| deltaTime | The delta time. |
Definition at line 263 of file RingArray.cpp.
References MAX_RING_SPEED, mRing4Rotation, mRing4RotationAngle, mRing4RotationDelay, mRing4RotationSpeed, RING_ACCEL, START_DELAY, trUtil::Math::TWO_PI, and trBase::Y_AXIS().
Referenced by UpdateRing3Slide().


|
private |
Definition at line 193 of file RingArray.h.
Referenced by LoadModels(), RingArray(), and SetupModelTree().
|
private |
Definition at line 160 of file RingArray.h.
Referenced by UpdateRing1Slide(), UpdateRing2Angle(), UpdateRing2Slide(), UpdateRing3Angle(), UpdateRing3Slide(), and UpdateRing4Angle().
|
private |
Definition at line 164 of file RingArray.h.
Referenced by LoadModels(), and SetupModelTree().
|
private |
Definition at line 165 of file RingArray.h.
Referenced by LoadModels(), SetupModelTree(), and UpdateRing1Slide().
|
private |
Definition at line 167 of file RingArray.h.
Referenced by UpdateRing1Slide().
|
private |
Definition at line 168 of file RingArray.h.
Referenced by UpdateRing1Slide().
|
private |
Definition at line 166 of file RingArray.h.
Referenced by UpdateRing1Slide().
|
private |
Definition at line 169 of file RingArray.h.
Referenced by LoadModels(), and SetupModelTree().
|
private |
Definition at line 170 of file RingArray.h.
Referenced by LoadModels(), SetupModelTree(), and UpdateRing2Angle().
|
private |
Definition at line 172 of file RingArray.h.
Referenced by UpdateRing2Angle().
|
private |
Definition at line 173 of file RingArray.h.
Referenced by UpdateRing2Angle().
|
private |
Definition at line 171 of file RingArray.h.
Referenced by UpdateRing2Angle().
|
private |
Definition at line 174 of file RingArray.h.
Referenced by LoadModels(), SetupModelTree(), and UpdateRing2Slide().
|
private |
Definition at line 176 of file RingArray.h.
Referenced by UpdateRing2Slide().
|
private |
Definition at line 177 of file RingArray.h.
Referenced by UpdateRing2Slide().
|
private |
Definition at line 175 of file RingArray.h.
Referenced by UpdateRing2Slide().
|
private |
Definition at line 178 of file RingArray.h.
Referenced by LoadModels(), and SetupModelTree().
|
private |
Definition at line 179 of file RingArray.h.
Referenced by LoadModels(), SetupModelTree(), and UpdateRing3Angle().
|
private |
Definition at line 181 of file RingArray.h.
Referenced by UpdateRing3Angle().
|
private |
Definition at line 182 of file RingArray.h.
Referenced by UpdateRing3Angle().
|
private |
Definition at line 180 of file RingArray.h.
Referenced by UpdateRing3Angle().
|
private |
Definition at line 183 of file RingArray.h.
Referenced by LoadModels(), SetupModelTree(), and UpdateRing3Slide().
|
private |
Definition at line 185 of file RingArray.h.
Referenced by UpdateRing3Slide().
|
private |
Definition at line 186 of file RingArray.h.
Referenced by UpdateRing3Slide().
|
private |
Definition at line 184 of file RingArray.h.
Referenced by UpdateRing3Slide().
|
private |
Definition at line 187 of file RingArray.h.
Referenced by LoadModels(), and SetupModelTree().
|
private |
Definition at line 188 of file RingArray.h.
Referenced by LoadModels(), SetupModelTree(), and UpdateRing4Angle().
|
private |
Definition at line 190 of file RingArray.h.
Referenced by UpdateRing4Angle().
|
private |
Definition at line 191 of file RingArray.h.
Referenced by UpdateRing4Angle().
|
private |
Definition at line 189 of file RingArray.h.
Referenced by UpdateRing4Angle().
|
static |
Definition at line 51 of file RingArray.h.
Referenced by LoadModels().
|
static |
Definition at line 52 of file RingArray.h.
Referenced by LoadModels().
|
static |
Definition at line 53 of file RingArray.h.
Referenced by LoadModels().
|
static |
Definition at line 54 of file RingArray.h.
Referenced by LoadModels().
|
private |
Definition at line 161 of file RingArray.h.
Referenced by UpdateRing1Slide(), UpdateRing2Angle(), UpdateRing2Slide(), UpdateRing3Angle(), UpdateRing3Slide(), and UpdateRing4Angle().
|
private |
Definition at line 162 of file RingArray.h.
Referenced by UpdateRing1Slide(), UpdateRing2Angle(), UpdateRing2Slide(), UpdateRing3Angle(), UpdateRing3Slide(), and UpdateRing4Angle().