PageRenderTime 17ms CodeModel.GetById 12ms app.highlight 4ms RepoModel.GetById 0ms app.codeStats 0ms

/src/aerys/minko/render/shader/part/animation/MorphingShaderPart.as

https://bitbucket.org/HopeSky/mars_nd2d
ActionScript | 34 lines | 26 code | 4 blank | 4 comment | 0 complexity | f299cb94983a4f22cc5df381bb1573e9 MD5 | raw file
 1package aerys.minko.render.shader.part.animation
 2{
 3	import aerys.minko.render.shader.SFloat;
 4	import aerys.minko.render.shader.Shader;
 5	import aerys.minko.render.shader.part.ShaderPart;
 6	import aerys.minko.render.geometry.stream.format.VertexComponent;
 7	
 8	/**
 9	 * The shader part to handle morphing vertex animations.
10	 * @author Romain Gilliotte
11	 */
12	public class MorphingShaderPart extends ShaderPart
13	{
14		public function MorphingShaderPart(main:Shader)
15		{
16			super(main);
17		}
18		
19		public function getMorphedPosition() : SFloat
20		{
21			return getVertexAttribute(VertexComponent.XYZ);
22		}
23		
24		public function getMorphedNormal() : SFloat
25		{
26			return getVertexAttribute(VertexComponent.NORMAL);
27		}
28		
29		public function getMorphedTangent() : SFloat
30		{
31			return getVertexAttribute(VertexComponent.TANGENT);
32		}
33	}
34}