move actor masks to package
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit

This commit is contained in:
austin 2025-05-29 15:10:23 -04:00
parent eade09aaa7
commit 083198e5e5
18 changed files with 30 additions and 25 deletions

View File

@ -2058,6 +2058,7 @@ Code cleanup work
Logging for loading thread failure Logging for loading thread failure
Code cleanup Code cleanup
More tests More tests
Move actor masks into dedicated package

View File

@ -11,7 +11,7 @@ import electrosphere.entity.EntityTags;
import electrosphere.entity.EntityUtils; import electrosphere.entity.EntityUtils;
import electrosphere.entity.state.client.particle.ClientParticleTree; import electrosphere.entity.state.client.particle.ClientParticleTree;
import electrosphere.renderer.actor.Actor; import electrosphere.renderer.actor.Actor;
import electrosphere.renderer.actor.ActorTextureMask; import electrosphere.renderer.actor.mask.ActorTextureMask;
import java.util.Arrays; import java.util.Arrays;

View File

@ -40,8 +40,8 @@ import electrosphere.entity.types.foliage.FoliageUtils;
import electrosphere.entity.types.item.ItemUtils; import electrosphere.entity.types.item.ItemUtils;
import electrosphere.entity.types.terrain.TerrainChunk; import electrosphere.entity.types.terrain.TerrainChunk;
import electrosphere.logger.LoggerInterface; import electrosphere.logger.LoggerInterface;
import electrosphere.renderer.actor.ActorAnimationMask;
import electrosphere.renderer.actor.instance.InstancedActor; import electrosphere.renderer.actor.instance.InstancedActor;
import electrosphere.renderer.actor.mask.ActorAnimationMask;
import electrosphere.renderer.anim.AnimChannel; import electrosphere.renderer.anim.AnimChannel;
import electrosphere.renderer.anim.Animation; import electrosphere.renderer.anim.Animation;
import electrosphere.renderer.model.Bone; import electrosphere.renderer.model.Bone;

View File

@ -17,9 +17,9 @@ import electrosphere.entity.types.common.CommonEntityUtils;
import electrosphere.entity.types.tree.ProceduralTree; import electrosphere.entity.types.tree.ProceduralTree;
import electrosphere.logger.LoggerInterface; import electrosphere.logger.LoggerInterface;
import electrosphere.renderer.actor.Actor; import electrosphere.renderer.actor.Actor;
import electrosphere.renderer.actor.ActorAnimationMask;
import electrosphere.renderer.actor.ActorMeshMask;
import electrosphere.renderer.actor.instance.InstancedActor; import electrosphere.renderer.actor.instance.InstancedActor;
import electrosphere.renderer.actor.mask.ActorAnimationMask;
import electrosphere.renderer.actor.mask.ActorMeshMask;
import electrosphere.renderer.anim.AnimChannel; import electrosphere.renderer.anim.AnimChannel;
import electrosphere.renderer.anim.Animation; import electrosphere.renderer.anim.Animation;
import electrosphere.renderer.model.Bone; import electrosphere.renderer.model.Bone;

View File

@ -15,7 +15,7 @@ import electrosphere.entity.EntityCreationUtils;
import electrosphere.entity.EntityUtils; import electrosphere.entity.EntityUtils;
import electrosphere.entity.state.server.ServerCharacterData; import electrosphere.entity.state.server.ServerCharacterData;
import electrosphere.renderer.actor.Actor; import electrosphere.renderer.actor.Actor;
import electrosphere.renderer.actor.ActorTextureMask; import electrosphere.renderer.actor.mask.ActorTextureMask;
import electrosphere.renderer.ui.imgui.ImGuiWindow; import electrosphere.renderer.ui.imgui.ImGuiWindow;
import electrosphere.renderer.ui.imgui.ImGuiWindow.ImGuiWindowCallback; import electrosphere.renderer.ui.imgui.ImGuiWindow.ImGuiWindowCallback;
import electrosphere.server.ai.AI; import electrosphere.server.ai.AI;

View File

@ -23,7 +23,7 @@ import electrosphere.entity.EntityTags;
import electrosphere.entity.EntityUtils; import electrosphere.entity.EntityUtils;
import electrosphere.entity.state.equip.ClientToolbarState; import electrosphere.entity.state.equip.ClientToolbarState;
import electrosphere.renderer.actor.Actor; import electrosphere.renderer.actor.Actor;
import electrosphere.renderer.actor.ActorTextureMask; import electrosphere.renderer.actor.mask.ActorTextureMask;
import electrosphere.renderer.meshgen.BlockMeshgen; import electrosphere.renderer.meshgen.BlockMeshgen;
import electrosphere.renderer.ui.events.ScrollEvent; import electrosphere.renderer.ui.events.ScrollEvent;

View File

@ -7,7 +7,7 @@ import electrosphere.collision.collidable.Collidable;
import electrosphere.engine.Globals; import electrosphere.engine.Globals;
import electrosphere.engine.assetmanager.queue.QueuedAsset; import electrosphere.engine.assetmanager.queue.QueuedAsset;
import electrosphere.logger.LoggerInterface; import electrosphere.logger.LoggerInterface;
import electrosphere.renderer.actor.ActorShaderMask; import electrosphere.renderer.actor.mask.ActorShaderMask;
import electrosphere.renderer.buffer.HomogenousInstancedArray; import electrosphere.renderer.buffer.HomogenousInstancedArray;
import electrosphere.renderer.buffer.HomogenousUniformBuffer; import electrosphere.renderer.buffer.HomogenousUniformBuffer;
import electrosphere.renderer.loading.ModelLoader; import electrosphere.renderer.loading.ModelLoader;

View File

@ -31,7 +31,7 @@ import electrosphere.net.parser.net.message.NetworkMessage;
import electrosphere.net.synchronization.annotation.SynchronizedBehaviorTree; import electrosphere.net.synchronization.annotation.SynchronizedBehaviorTree;
import electrosphere.net.synchronization.enums.BehaviorTreeIdEnums; import electrosphere.net.synchronization.enums.BehaviorTreeIdEnums;
import electrosphere.renderer.actor.Actor; import electrosphere.renderer.actor.Actor;
import electrosphere.renderer.actor.ActorMeshMask; import electrosphere.renderer.actor.mask.ActorMeshMask;
@SynchronizedBehaviorTree(name = "clientEquipState", isServer = false, correspondingTree="serverEquipState") @SynchronizedBehaviorTree(name = "clientEquipState", isServer = false, correspondingTree="serverEquipState")
/** /**

View File

@ -31,7 +31,7 @@ import electrosphere.entity.EntityTags;
import electrosphere.entity.EntityUtils; import electrosphere.entity.EntityUtils;
import electrosphere.net.synchronization.enums.BehaviorTreeIdEnums; import electrosphere.net.synchronization.enums.BehaviorTreeIdEnums;
import electrosphere.renderer.actor.Actor; import electrosphere.renderer.actor.Actor;
import electrosphere.renderer.actor.ActorMeshMask; import electrosphere.renderer.actor.mask.ActorMeshMask;
import electrosphere.util.FileUtils; import electrosphere.util.FileUtils;
import electrosphere.net.parser.net.message.InventoryMessage; import electrosphere.net.parser.net.message.InventoryMessage;
import electrosphere.net.parser.net.message.NetworkMessage; import electrosphere.net.parser.net.message.NetworkMessage;

View File

@ -5,7 +5,7 @@ import electrosphere.engine.Globals;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.List; import java.util.List;
import electrosphere.renderer.actor.ActorTextureMask; import electrosphere.renderer.actor.mask.ActorTextureMask;
import electrosphere.renderer.model.Mesh; import electrosphere.renderer.model.Mesh;
import electrosphere.renderer.model.Model; import electrosphere.renderer.model.Model;
import electrosphere.renderer.texture.Texture; import electrosphere.renderer.texture.Texture;

View File

@ -9,6 +9,10 @@ import electrosphere.mem.JomlPool;
import electrosphere.renderer.OpenGLState; import electrosphere.renderer.OpenGLState;
import electrosphere.renderer.RenderPipelineState; import electrosphere.renderer.RenderPipelineState;
import electrosphere.renderer.actor.ActorUniformMap.UniformValue; import electrosphere.renderer.actor.ActorUniformMap.UniformValue;
import electrosphere.renderer.actor.mask.ActorAnimationMask;
import electrosphere.renderer.actor.mask.ActorMeshMask;
import electrosphere.renderer.actor.mask.ActorShaderMask;
import electrosphere.renderer.actor.mask.ActorTextureMask;
import electrosphere.renderer.model.Bone; import electrosphere.renderer.model.Bone;
import electrosphere.renderer.model.Model; import electrosphere.renderer.model.Model;
import electrosphere.renderer.texture.Texture; import electrosphere.renderer.texture.Texture;
@ -198,7 +202,7 @@ public class Actor {
public double getAnimationTime(String animation){ public double getAnimationTime(String animation){
ActorAnimationMask mask = this.getAnimationMask(animation); ActorAnimationMask mask = this.getAnimationMask(animation);
if(mask != null){ if(mask != null){
return mask.time; return mask.getTime();
} }
return INVALID_ANIMATION; return INVALID_ANIMATION;
} }
@ -415,7 +419,7 @@ public class Actor {
toRemoveMasks.clear(); toRemoveMasks.clear();
for(ActorAnimationMask mask : this.animationQueue){ for(ActorAnimationMask mask : this.animationQueue){
if(mask.animationName == animationName && mask.priority == priority){ if(mask.getAnimationName() == animationName && mask.getPriority() == priority){
toRemoveMasks.add(mask); toRemoveMasks.add(mask);
} }
} }
@ -460,7 +464,7 @@ public class Actor {
List<String> currentAnimationMask = new LinkedList<String>(); List<String> currentAnimationMask = new LinkedList<String>();
for(ActorAnimationMask mask : animationQueue){ for(ActorAnimationMask mask : animationQueue){
currentAnimationMask.clear(); currentAnimationMask.clear();
for(String currentBone : mask.boneMask){ for(String currentBone : mask.getBones()){
if(!bonesUsed.contains(currentBone)){ if(!bonesUsed.contains(currentBone)){
bonesUsed.add(currentBone); bonesUsed.add(currentBone);
currentAnimationMask.add(currentBone); currentAnimationMask.add(currentBone);
@ -500,10 +504,10 @@ public class Actor {
*/ */
public ActorAnimationMask getAnimationMask(String animationName){ public ActorAnimationMask getAnimationMask(String animationName){
for(ActorAnimationMask mask : this.getAnimationQueue()){ for(ActorAnimationMask mask : this.getAnimationQueue()){
if(mask.animationName.equals(animationName)){ if(mask.getAnimationName().equals(animationName)){
return mask; return mask;
} else if(mask.animationName.equalsIgnoreCase(animationName)){ } else if(mask.getAnimationName().equalsIgnoreCase(animationName)){
LoggerInterface.loggerEngine.WARNING("Animation mask failed to find, but there is an animation with a very similar name! " + animationName + " vs " + mask.animationName); LoggerInterface.loggerEngine.WARNING("Animation mask failed to find, but there is an animation with a very similar name! " + animationName + " vs " + mask.getAnimationName());
} }
} }
return null; return null;

View File

@ -1,4 +1,4 @@
package electrosphere.renderer.actor; package electrosphere.renderer.actor.mask;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.List; import java.util.List;

View File

@ -1,4 +1,4 @@
package electrosphere.renderer.actor; package electrosphere.renderer.actor.mask;
import java.util.HashMap; import java.util.HashMap;
import java.util.LinkedList; import java.util.LinkedList;

View File

@ -1,4 +1,4 @@
package electrosphere.renderer.actor; package electrosphere.renderer.actor.mask;
/** /**
* Masks a shader on a mesh with another shader * Masks a shader on a mesh with another shader

View File

@ -1,4 +1,4 @@
package electrosphere.renderer.actor; package electrosphere.renderer.actor.mask;
import java.util.List; import java.util.List;

View File

@ -6,8 +6,8 @@ import electrosphere.engine.Globals;
import electrosphere.renderer.OpenGLState; import electrosphere.renderer.OpenGLState;
import electrosphere.renderer.RenderPipelineState; import electrosphere.renderer.RenderPipelineState;
import electrosphere.renderer.RenderingEngine; import electrosphere.renderer.RenderingEngine;
import electrosphere.renderer.actor.ActorTextureMask;
import electrosphere.renderer.actor.instance.InstanceData; import electrosphere.renderer.actor.instance.InstanceData;
import electrosphere.renderer.actor.mask.ActorTextureMask;
import electrosphere.renderer.light.LightManager; import electrosphere.renderer.light.LightManager;
import electrosphere.renderer.shader.StandardUniformManager; import electrosphere.renderer.shader.StandardUniformManager;
import electrosphere.renderer.shader.VisualShader; import electrosphere.renderer.shader.VisualShader;

View File

@ -3,10 +3,10 @@ package electrosphere.renderer.model;
import electrosphere.renderer.OpenGLState; import electrosphere.renderer.OpenGLState;
import electrosphere.renderer.RenderPipelineState; import electrosphere.renderer.RenderPipelineState;
import electrosphere.renderer.actor.ActorBoneRotator; import electrosphere.renderer.actor.ActorBoneRotator;
import electrosphere.renderer.actor.ActorMeshMask;
import electrosphere.renderer.actor.ActorShaderMask;
import electrosphere.renderer.actor.ActorStaticMorph; import electrosphere.renderer.actor.ActorStaticMorph;
import electrosphere.renderer.actor.ActorTextureMask; import electrosphere.renderer.actor.mask.ActorMeshMask;
import electrosphere.renderer.actor.mask.ActorShaderMask;
import electrosphere.renderer.actor.mask.ActorTextureMask;
import electrosphere.renderer.anim.AnimChannel; import electrosphere.renderer.anim.AnimChannel;
import electrosphere.renderer.anim.Animation; import electrosphere.renderer.anim.Animation;
import electrosphere.renderer.loading.ModelPretransforms; import electrosphere.renderer.loading.ModelPretransforms;

View File

@ -17,9 +17,9 @@ import electrosphere.data.entity.creature.bonegroups.BoneGroup;
import electrosphere.engine.Globals; import electrosphere.engine.Globals;
import electrosphere.entity.state.AnimationPriorities; import electrosphere.entity.state.AnimationPriorities;
import electrosphere.logger.LoggerInterface; import electrosphere.logger.LoggerInterface;
import electrosphere.renderer.actor.ActorAnimationMask;
import electrosphere.renderer.actor.ActorBoneRotator; import electrosphere.renderer.actor.ActorBoneRotator;
import electrosphere.renderer.actor.ActorStaticMorph; import electrosphere.renderer.actor.ActorStaticMorph;
import electrosphere.renderer.actor.mask.ActorAnimationMask;
import electrosphere.renderer.model.Bone; import electrosphere.renderer.model.Bone;
/** /**