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

Function BLUE_INTERFACE

trinity/Eve/IEveSpaceObject2.h:20–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18class Tr2ImpostorManager;
19
20BLUE_INTERFACE( IEveSpaceObject2 ) :
21 public IRoot
22{
23
24 // public struct to pass this info to children
25 struct ParentData
26 {
27 Matrix transform = IdentityMatrix();
28 uint32_t killCount = 0;
29 Vector4 shipData = Vector4( 0, 0, 0, 0 );
30 Vector3 clipSphereCenter = Vector3( 0, 0, 0 );
31 float clipRadiusSq = 0;
32 float clipRadius2Sq = 0;
33 float clipFactor = 0;
34 float clipFactor2 = 0;
35 const Vector4* shLighting = nullptr;
36 Vector4 customData = Vector4( 0, 0, 0, 0 );
37 };
38
39 virtual void UpdateSyncronous( const EveUpdateContext& updateContext ) = 0;
40 virtual void UpdateAsyncronous( const EveUpdateContext& updateContext ) = 0;
41 virtual void UpdateVisibility( const EveUpdateContext& updateContext, const Matrix& parentTransform ) = 0;
42 virtual void GetRenderables( std::vector<ITr2Renderable*> & renderables, Tr2ImpostorManager * impostors ) = 0;
43 virtual bool GetBoundingSphere( Vector4 & sphere, BoundingSphereQuery query = EVE_BOUNDS_NORMAL ) const = 0;
44
45 // This version of the function should perform an update on the model / ball position
46 virtual void UpdateModelCenterWorldPosition( Vector3 & position, Be::Time t ) = 0;
47
48 // This version of the function should not update the object
49 virtual void GetModelCenterWorldPosition( Vector3 & position ) const = 0;
50
51 // If possible, return an AABB in local coordinates
52 virtual bool GetLocalBoundingBox( Vector3 & min, Vector3 & max ) = 0;
53 // Get the local to world transform
54 virtual void GetLocalToWorldTransform( Matrix & transform ) const = 0;
55
56 virtual void GetWorldVelocity( Vector3 & velocity ) const
57 {
58 velocity = Vector3( 0, 0, 0 );
59 }
60
61 // Registers an object and its attachments with the quad renderer
62 virtual void RegisterWithQuadRenderer( Tr2QuadRenderer & quadRenderer )
63 {
64 }
65 // Adds quads from space object and its attachments to the quad renderer. ATTENTION: this function is called in-parallel
66 virtual void AddQuadsToQuadRenderer( const TriFrustum& frustum, Tr2QuadRenderer& quadRenderer )
67 {
68 }
69
70 virtual void GetPerObjectStructs( EveSpaceObjectVSData & vsData, EveSpaceObjectPSData & psData ) const
71 {

Callers

nothing calls this directly

Calls 9

GetBoundingSphereFunction · 0.85
RegisterWithQuadRendererFunction · 0.70
AddQuadsToQuadRendererFunction · 0.70
Vector4Class · 0.50
Vector3Class · 0.50
GetLocalBoundingBoxFunction · 0.50
GetLocalToWorldTransformFunction · 0.50

Tested by

no test coverage detected