MCPcopy Create free account
hub / github.com/carbonengine/trinity / SetupMesh

Method SetupMesh

trinity/Eve/SpaceObjectFactory/EveSOF.cpp:476–493  ·  view source on GitHub ↗

-------------------------------------------------------------------------------- Description: This is where it is all going to happen --------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

474// This is where it is all going to happen
475// --------------------------------------------------------------------------------
476void EveSOF::SetupMesh( EveSpaceObject2Ptr obj, const EveSOFDNAPtr dna ) const
477{
478 CCP_STATS_ZONE( __FUNCTION__ );
479
480 // bounding sphere comes from data, is faster
481 obj->SetBoundingSphereInformation( dna->GetHullBoundingSphere() );
482 obj->SetShapeEllipsoid( dna->GetHullShapeEllipsoid() );
483 obj->EnableDynamicBoundingSphere( dna->DynamicBoundingSphereEnabled() );
484
485 obj->SetCastsShadow( dna->CastShadow() );
486 obj->SetIsAnimated( dna->IsHullAnimated() );
487
488 // assign mesh to ship
489 obj->SetMesh( CreateMesh( dna ) );
490
491 // Set the reflectionMode based on the category
492 obj->SetReflectionMode( dna->GetReflectionMode() );
493}
494
495
496// --------------------------------------------------------------------------------

Callers

nothing calls this directly

Calls 12

GetHullBoundingSphereMethod · 0.80
SetShapeEllipsoidMethod · 0.80
CastShadowMethod · 0.80
SetIsAnimatedMethod · 0.80
IsHullAnimatedMethod · 0.80
GetReflectionModeMethod · 0.80
SetCastsShadowMethod · 0.45
SetMeshMethod · 0.45
SetReflectionModeMethod · 0.45

Tested by

no test coverage detected