| 569 | } |
| 570 | |
| 571 | void Spline::Initialize() |
| 572 | { |
| 573 | // Base |
| 574 | Actor::Initialize(); |
| 575 | |
| 576 | auto& keyframes = Curve.GetKeyframes(); |
| 577 | const int32 count = keyframes.Count(); |
| 578 | |
| 579 | // Update bounds |
| 580 | _localBounds = BoundingBox(count != 0 ? keyframes[0].Value.Translation : Vector3::Zero); |
| 581 | for (int32 i = 1; i < count; i++) |
| 582 | _localBounds.Merge(keyframes[i].Value.Translation); |
| 583 | Matrix world; |
| 584 | GetLocalToWorldMatrix(world); |
| 585 | BoundingBox::Transform(_localBounds, world, _box); |
| 586 | BoundingSphere::FromBox(_box, _sphere); |
| 587 | } |
| 588 | |
| 589 | void Spline::Serialize(SerializeStream& stream, const void* otherObj) |
| 590 | { |
nothing calls this directly
no test coverage detected