MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / toString

Method toString

Engine/source/Verve/VPath/VPathNode.cpp:217–255  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

215}
216
217String VPathNode::toString( void )
218{
219 String retBuffer;
220
221 // Buffer Node Properties.
222 // {Position} {Rotation} {Weight}
223 const AngAxisF aa( mLocalRotation );
224 retBuffer = String::ToString( "%f %f %f %f %f %f %f %f", mLocalPosition.x, mLocalPosition.y, mLocalPosition.z,
225 aa.axis.x, aa.axis.y, aa.axis.z, aa.angle,
226 mWeight );
227
228 // Add Tab.
229 retBuffer += "\t";
230
231 // Determine the Type.
232 StringTableEntry typeString = getOrientationTypeLabel( mOrientationMode.Type );
233 switch( mOrientationMode.Type )
234 {
235 case k_OrientationFree :
236 {
237 // Buffer String.
238 retBuffer += typeString;
239
240 } break;
241
242 case k_OrientationToPoint:
243 {
244 // Fetch Point.
245 const Point3F &lookAtPoint = mOrientationMode.Point;
246
247 // Buffer String.
248 retBuffer += String::ToString( "%s %f %f %f", typeString, lookAtPoint.x, lookAtPoint.y, lookAtPoint.z );
249
250 } break;
251 }
252
253 // Return String.
254 return retBuffer;
255}
256
257bool VPathNode::fromString( const String &pString )
258{

Callers 1

writeFieldsMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected