MCPcopy Create free account
hub / github.com/GarageGames/Torque3D / onAdd

Method onAdd

Engine/source/T3D/pathCamera.cpp:138–168  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

136//----------------------------------------------------------------------------
137
138bool PathCamera::onAdd()
139{
140 if(!Parent::onAdd())
141 return false;
142
143 // Initialize from the current transform.
144 if (!mNodeCount) {
145 QuatF rot(getTransform());
146 Point3F pos = getPosition();
147 mSpline.removeAll();
148 mSpline.push_back(new CameraSpline::Knot(pos,rot,1,
149 CameraSpline::Knot::NORMAL, CameraSpline::Knot::SPLINE));
150 mNodeCount = 1;
151 }
152
153 //
154 mObjBox.maxExtents = mObjScale;
155 mObjBox.minExtents = mObjScale;
156 mObjBox.minExtents.neg();
157 resetWorldBox();
158
159 if (mShapeInstance)
160 {
161 mNetFlags.set(Ghostable);
162 setScopeAlways();
163 }
164
165 addToScene();
166
167 return true;
168}
169
170void PathCamera::onRemove()
171{

Callers

nothing calls this directly

Calls 4

removeAllMethod · 0.45
push_backMethod · 0.45
negMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected