mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-18 19:39:22 +00:00
Minor model system cleanup/documentation (#6089)
This commit is contained in:
1 parent
799e864d93
commit
bae2ee0420
13 files changed
+76
-240
No files matched your search
@@ -19,9 +19,9 @@
|
||||
|
||||
package net.minecraftforge.common.model;
|
||||
|
||||
/*
|
||||
* Represents the part of the model you can refer to, for example: mesh,
|
||||
/**
|
||||
* Represents some part of a model you can refer to, for example: mesh,
|
||||
* skeleton, bone or some separately animated submodel.
|
||||
* Primary function of this interface is the argument type of IModelState.apply.
|
||||
* @see IModelState
|
||||
*/
|
||||
public interface IModelPart {}
|
||||
@@ -21,16 +21,17 @@ package net.minecraftforge.common.model;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
/*
|
||||
* Represents the dynamic information associated with the model.
|
||||
* Common use case is (possibly interpolated) animation frame.
|
||||
/**
|
||||
* An {@code IModelState} is a function from model part to a transformation that should be applied
|
||||
* when that part is baked, thus representing the current "state" of the model and its parts.
|
||||
*/
|
||||
public interface IModelState
|
||||
{
|
||||
/*
|
||||
* Returns the transformation that needs to be applied to the specific part of the model.
|
||||
* Coordinate system is determined by the part type.
|
||||
* if no part is provided, global model transformation is returned.
|
||||
/**
|
||||
* @param part Part of the model we are wanting to transform. An empty optional means
|
||||
* we want a transform for the entire model.
|
||||
* @return A transformation to apply to the part, if any. The coordinate system of the transform
|
||||
* is determined by the part type.
|
||||
*/
|
||||
Optional<TRSRTransformation> apply(Optional<? extends IModelPart> part);
|
||||
}
|
||||
Reference in new issue
Block a user