예제 #1
0
 public final void transform(ElementRenderState render_state) {
   Plants plants = (Plants) render_state.getModel();
   RenderTools.translateAndRotate(plants);
   float dist_squared = render_state.f;
   if (dist_squared > START_FADE_DIST * START_FADE_DIST) {
     float camera_dist = (float) Math.sqrt(dist_squared);
     float alpha =
         1f - ((camera_dist - START_FADE_DIST) / (PLANTS_CUT_DIST - START_FADE_DIST));
     GL11.glColor4f(1f, 1f, 1f, alpha);
   }
 }
예제 #2
0
 public final void transform(ElementRenderState render_state) {
   RotatingThrowingWeapon model = (RotatingThrowingWeapon) render_state.getModel();
   RenderTools.translateAndRotate(render_state.getModel());
   GL11.glRotatef(model.getAngle(), 0f, 1f, 0f);
 }
예제 #3
0
 public final void transform(ElementRenderState render_state) {
   DirectedThrowingWeapon model = (DirectedThrowingWeapon) render_state.getModel();
   RenderTools.translateAndRotate(render_state.getModel());
   GL11.glRotatef(-model.getZSpeed(), 0f, 1f, 0f);
 }
예제 #4
0
 public void transform(ElementRenderState render_state) {
   RenderTools.translateAndRotate(render_state.getModel());
   GL11.glColor4f(1f, 1f, 1f, 1f);
 }
예제 #5
0
 public final void transform(ElementRenderState render_state) {
   SupplyModel model = (SupplyModel) render_state.getModel();
   GL11.glTranslatef(model.getPositionX(), model.getPositionY(), model.getPositionZ());
   GL11.glRotatef(model.getRotation(), 0f, 0f, 1f);
 }