1 /* 2 * Copyright (C) 2016 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 package com.android.cts.verifier.sensors.sixdof.Renderer.RenderUtils; 17 18 import com.android.cts.verifier.sensors.sixdof.Renderer.Renderable.Light; 19 20 /** 21 * Parameters to be passed on a draw call 22 */ 23 public class DrawParameters { 24 private float[] mViewMatrix; 25 private float[] mProjectionMatrix; 26 private Light mLight; 27 update(float[] viewMatrix, float[] projectionMatrix)28 public void update(float[] viewMatrix, float[] projectionMatrix) { 29 mViewMatrix = viewMatrix; 30 mProjectionMatrix = projectionMatrix; 31 } 32 update(float[] viewMatrix, float[] projectionMatrix, Light light)33 public void update(float[] viewMatrix, float[] projectionMatrix, Light light) { 34 update(viewMatrix, projectionMatrix); 35 mLight = light; 36 } 37 getViewMatrix()38 public float[] getViewMatrix() { 39 return mViewMatrix; 40 } 41 getProjectionMatrix()42 public float[] getProjectionMatrix() { 43 return mProjectionMatrix; 44 } 45 getLight()46 public Light getLight() { 47 return mLight; 48 } 49 } 50