mirror of
https://github.com/mwpenny/portal64-still-alive.git
synced 2025-02-21 20:40:36 +00:00
fix animated objects after small refactor
This commit is contained in:
parent
bd55854bbc
commit
e32c299941
@ -67,7 +67,7 @@ void staticRenderPopulateRooms(struct FrustrumCullingInformation* cullingInfo, M
|
||||
|
||||
rotatedBoxTransform(&staticTransforms[staticElement->transformIndex], animatedBox, &rotatedBox);
|
||||
|
||||
if (isRotatedBoxOutsideFrustrum(cullingInfo, &rotatedBox) == FrustrumResultOutisde) {
|
||||
if (isRotatedBoxOutsideFrustrum(cullingInfo, &rotatedBox)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -13,9 +13,9 @@ void rotatedBoxTransform(struct Transform* transform, struct BoundingBoxs16* inp
|
||||
output->sides[1].y = input->maxY - input->minY;
|
||||
output->sides[1].z = 0.0f;
|
||||
|
||||
output->sides[1].x = 0.0f;
|
||||
output->sides[1].y = 0.0f;
|
||||
output->sides[1].z = input->maxZ - input->minZ;
|
||||
output->sides[2].x = 0.0f;
|
||||
output->sides[2].y = 0.0f;
|
||||
output->sides[2].z = input->maxZ - input->minZ;
|
||||
|
||||
transformPoint(transform, &output->origin, &output->origin);
|
||||
for (int axis = 0; axis < 3; ++axis) {
|
||||
|
@ -32,14 +32,14 @@ void sceneAnimatorInit(struct SceneAnimator* sceneAnimator, struct AnimationInfo
|
||||
|
||||
sceneAnimator->boneCount = 0;
|
||||
|
||||
sceneAnimator->transforms = malloc(sizeof(struct Transform) * sceneAnimator->boneCount);
|
||||
|
||||
struct Transform* pose = sceneAnimator->transforms;
|
||||
|
||||
for (int i = 0; i < animatorCount; ++i) {
|
||||
sceneAnimator->boneCount += animationInfo[i].armature.numberOfBones;
|
||||
}
|
||||
|
||||
sceneAnimator->transforms = malloc(sizeof(struct Transform) * sceneAnimator->boneCount);
|
||||
|
||||
struct Transform* pose = sceneAnimator->transforms;
|
||||
|
||||
for (int i = 0; i < animatorCount; ++i) {
|
||||
skArmatureInitWithPose(&sceneAnimator->armatures[i], &animationInfo[i].armature, pose);
|
||||
skAnimatorInit(&sceneAnimator->animators[i], animationInfo[i].armature.numberOfBones);
|
||||
|
@ -117,8 +117,7 @@ local function list_static_nodes(nodes)
|
||||
local parent_pos = bone.full_transformation:decompose()
|
||||
chunkV.mesh = chunkV.mesh:transform(bone.full_transformation:inverse())
|
||||
|
||||
original_bb.min = original_bb.min - parent_pos
|
||||
original_bb.max = original_bb.max - parent_pos
|
||||
original_bb = chunkV.mesh.bb
|
||||
end
|
||||
|
||||
local plane = sk_math.plane3_with_point(chunkV.mesh.normals[1], chunkV.mesh.vertices[1])
|
||||
|
Loading…
x
Reference in New Issue
Block a user